vendor: 253,829 bytes, lines 1-3
1 2 3!function(t){"use strict";"function"==typeof define&&define.amd?define(["jquery"],t):t(jQuery)}(function(V){"use strict";V.ui=V.ui||{};V.ui.version="1.13.3";var n,s,x,k,o,a,r,l,h,i,N=0,E=Array.prototype.hasOwnProperty,c=Array.prototype.slice;V.cleanData=(n=V.cleanData,function(t){for(var e,i,s=0;null!=(i=t[s]);s++)(e=V._data(i,"events"))&&e.remove&&V(i).triggerHandler("remove");n(t)}),V.widget=function(t,i,e){var s,n,o,a={},r=t.split(".")[0],l=r+"-"+(t=t.split(".")[1]);return e||(e=i,i=V.Widget),Array.isArray(e)&&(e=V.extend.apply(null,[{}].concat(e))),V.expr.pseudos[l.toLowerCase()]=function(t){return!!V.data(t,l)},V[r]=V[r]||{},s=V[r][t],n=V[r][t]=function(t,e){if(!this||!this._createWidget)return new n(t,e);arguments.length&&this._createWidget(t,e)},V.extend(n,s,{version:e.version,_proto:V.extend({},e),_childConstructors:[]}),(o=new i).options=V.widget.extend({},o.options),V.each(e,function(e,s){function n(){return i.prototype[e].apply(this,arguments)}function o(t){return i.prototype[e].apply(this,t)}a[e]="function"!=typeof s?s:function(){var t,e=this._super,i=this._superApply;return this._super=n,this._superApply=o,t=s.apply(this,arguments),this._super=e,this._superApply=i,t}}),n.prototype=V.widget.extend(o,{widgetEventPrefix:s&&o.widgetEventPrefix||t},a,{constructor:n,namespace:r,widgetName:t,widgetFullName:l}),s?(V.each(s._childConstructors,function(t,e){var i=e.prototype;V.widget(i.namespace+"."+i.widgetName,n,e._proto)}),delete s._childConstructors):i._childConstructors.push(n),V.widget.bridge(t,n),n},V.widget.extend=function(t){for(var e,i,s=c.call(arguments,1),n=0,o=s.length;n<o;n++)for(e in s[n])i=s[n][e],E.call(s[n],e)&&void 0!==i&&(V.isPlainObject(i)?t[e]=V.isPlainObject(t[e])?V.widget.extend({},t[e],i):V.widget.extend({},i):t[e]=i);return t},V.widget.bridge=function(o,e){var a=e.prototype.widgetFullName||o;V.fn[o]=function(i){var t="string"==typeof i,s=c.call(arguments,1),n=this;return t?this.length||"instance"!==i?this.each(function(){var t,e=V.data(this,a);return"instance"===i?(n=e,!1):e?"function"!=typeof e[i]||"_"===i.charAt(0)?V.error("no such method '"+i+"' for "+o+" widget instance"):(t=e[i].apply(e,s))!==e&&void 0!==t?(n=t&&t.jquery?n.pushStack(t.get()):t,!1):void 0:V.error("cannot call methods on "+o+" prior to initialization; attempted to call method '"+i+"'")}):n=void 0:(s.length&&(i=V.widget.extend.apply(null,[i].concat(s))),this.each(function(){var t=V.data(this,a);t?(t.option(i||{}),t._init&&t._init()):V.data(this,a,new e(i,this))})),n}},V.Widget=function(){},V.Widget._childConstructors=[],V.Widget.prototype={widgetName:"widget",widgetEventPrefix:"",defaultElement:"<div>",options:{classes:{},disabled:!1,create:null},_createWidget:function(t,e){e=V(e||this.defaultElement||this)[0],this.element=V(e),this.uuid=N++,this.eventNamespace="."+this.widgetName+this.uuid,this.bindings=V(),this.hoverable=V(),this.focusable=V(),this.classesElementLookup={},e!==this&&(V.data(e,this.widgetFullName,this),this._on(!0,this.element,{remove:function(t){t.target===e&&this.destroy()}}),this.document=V(e.style?e.ownerDocument:e.document||e),this.window=V(this.document[0].defaultView||this.document[0].parentWindow)),this.options=V.widget.extend({},this.options,this._getCreateOptions(),t),this._create(),this.options.disabled&&this._setOptionDisabled(this.options.disabled),this._trigger("create",null,this._getCreateEventData()),this._init()},_getCreateOptions:function(){return{}},_getCreateEventData:V.noop,_create:V.noop,_init:V.noop,destroy:function(){var i=this;this._destroy(),V.each(this.classesElementLookup,function(t,e){i._removeClass(e,t)}),this.element.off(this.eventNamespace).removeData(this.widgetFullName),this.widget().off(this.eventNamespace).removeAttr("aria-disabled"),this.bindings.off(this.eventNamespace)},_destroy:V.noop,widget:function(){return this.element},option:function(t,e){var i,s,n,o=t;if(0===arguments.length)return V.widget.extend({},this.options);if("string"==typeof t)if(o={},t=(i=t.split(".")).shift(),i.length){for(s=o[t]=V.widget.extend({},this.options[t]),n=0;n<i.length-1;n++)s[i[n]]=s[i[n]]||{},s=s[i[n]];if(t=i.pop(),1===arguments.length)return void 0===s[t]?null:s[t];s[t]=e}else{if(1===arguments.length)return void 0===this.options[t]?null:this.options[t];o[t]=e}return this._setOptions(o),this},_setOptions:function(t){for(var e in t)this._setOption(e,t[e]);return this},_setOption:function(t,e){return"classes"===t&&this._setOptionClasses(e),this.options[t]=e,"disabled"===t&&this._setOptionDisabled(e),this},_setOptionClasses:function(t){var e,i,s;for(e in t)s=this.classesElementLookup[e],t[e]!==this.options.classes[e]&&s&&s.length&&(i=V(s.get()),this._removeClass(s,e),i.addClass(this._classes({element:i,keys:e,classes:t,add:!0})))},_setOptionDisabled:function(t){this._toggleClass(this.widget(),this.widgetFullName+"-disabled",null,!!t),t&&(this._removeClass(this.hoverable,null,"ui-state-hover"),this._removeClass(this.focusable,null,"ui-state-focus"))},enable:function(){return this._setOptions({disabled:!1})},disable:function(){return this._setOptions({disabled:!0})},_classes:function(n){var o=[],a=this;function t(t,e){for(var i,s=0;s<t.length;s++)i=a.classesElementLookup[t[s]]||V(),i=n.add?(function(){var i=[];n.element.each(function(t,e){V.map(a.classesElementLookup,function(t){return t}).some(function(t){return t.is(e)})||i.push(e)}),a._on(V(i),{remove:"_untrackClassesElement"})}(),V(V.uniqueSort(i.get().concat(n.element.get())))):V(i.not(n.element).get()),a.classesElementLookup[t[s]]=i,o.push(t[s]),e&&n.classes[t[s]]&&o.push(n.classes[t[s]])}return(n=V.extend({element:this.element,classes:this.options.classes||{}},n)).keys&&t(n.keys.match(/\S+/g)||[],!0),n.extra&&t(n.extra.match(/\S+/g)||[]),o.join(" ")},_untrackClassesElement:function(i){var s=this;V.each(s.classesElementLookup,function(t,e){-1!==V.inArray(i.target,e)&&(s.classesElementLookup[t]=V(e.not(i.target).get()))}),this._off(V(i.target))},_removeClass:function(t,e,i){return this._toggleClass(t,e,i,!1)},_addClass:function(t,e,i){return this._toggleClass(t,e,i,!0)},_toggleClass:function(t,e,i,s){var n="string"==typeof t||null===t,e={extra:n?e:i,keys:n?t:e,element:n?this.element:t,add:s="boolean"==typeof s?s:i};return e.element.toggleClass(this._classes(e),s),this},_on:function(n,o,t){var a,r=this;"boolean"!=typeof n&&(t=o,o=n,n=!1),t?(o=a=V(o),this.bindings=this.bindings.add(o)):(t=o,o=this.element,a=this.widget()),V.each(t,function(t,e){function i(){if(n||!0!==r.options.disabled&&!V(this).hasClass("ui-state-disabled"))return("string"==typeof e?r[e]:e).apply(r,arguments)}"string"!=typeof e&&(i.guid=e.guid=e.guid||i.guid||V.guid++);var t=t.match(/^([\w:-]*)\s*(.*)$/),s=t[1]+r.eventNamespace,t=t[2];t?a.on(s,t,i):o.on(s,i)})},_off:function(t,e){e=(e||"").split(" ").join(this.eventNamespace+" ")+this.eventNamespace,t.off(e),this.bindings=V(this.bindings.not(t).get()),this.focusable=V(this.focusable.not(t).get()),this.hoverable=V(this.hoverable.not(t).get())},_delay:function(t,e){var i=this;return setTimeout(function(){return("string"==typeof t?i[t]:t).apply(i,arguments)},e||0)},_hoverable:function(t){this.hoverable=this.hoverable.add(t),this._on(t,{mouseenter:function(t){this._addClass(V(t.currentTarget),null,"ui-state-hover")},mouseleave:function(t){this._removeClass(V(t.currentTarget),null,"ui-state-hover")}})},_focusable:function(t){this.focusable=this.focusable.add(t),this._on(t,{focusin:function(t){this._addClass(V(t.currentTarget),null,"ui-state-focus")},focusout:function(t){this._removeClass(V(t.currentTarget),null,"ui-state-focus")}})},_trigger:function(t,e,i){var s,n,o=this.options[t];if(i=i||{},(e=V.Event(e)).type=(t===this.widgetEventPrefix?t:this.widgetEventPrefix+t).toLowerCase(),e.target=this.element[0],n=e.originalEvent)for(s in n)s in e||(e[s]=n[s]);return this.element.trigger(e,i),!("function"==typeof o&&!1===o.apply(this.element[0],[e].concat(i))||e.isDefaultPrevented())}},V.each({show:"fadeIn",hide:"fadeOut"},function(o,a){V.Widget.prototype["_"+o]=function(e,t,i){var s,n=(t="string"==typeof t?{effect:t}:t)?!0!==t&&"number"!=typeof t&&t.effect||a:o;"number"==typeof(t=t||{})?t={duration:t}:!0===t&&(t={}),s=!V.isEmptyObject(t),t.complete=i,t.delay&&e.delay(t.delay),s&&V.effects&&V.effects.effect[n]?e[o](t):n!==o&&e[n]?e[n](t.duration,t.easing,i):e.queue(function(t){V(this)[o](),i&&i.call(e[0]),t()})}}),V.widget;function C(t,e,i){return[parseFloat(t[0])*(h.test(t[0])?e/100:1),parseFloat(t[1])*(h.test(t[1])?i/100:1)]}function D(t,e){return parseInt(V.css(t,e),10)||0}function I(t){return null!=t&&t===t.window}x=Math.max,k=Math.abs,o=/left|center|right/,a=/top|center|bottom/,r=/[\+\-]\d+(\.[\d]+)?%?/,l=/^\w+/,h=/%$/,i=V.fn.position,V.position={scrollbarWidth:function(){var t,e,i;return void 0!==s?s:(i=(e=V("<div style='display:block;position:absolute;width:200px;height:200px;overflow:hidden;'><div style='height:300px;width:auto;'></div></div>")).children()[0],V("body").append(e),t=i.offsetWidth,e.css("overflow","scroll"),t===(i=i.offsetWidth)&&(i=e[0].clientWidth),e.remove(),s=t-i)},getScrollInfo:function(t){var e=t.isWindow||t.isDocument?"":t.element.css("overflow-x"),i=t.isWindow||t.isDocument?"":t.element.css("overflow-y"),e="scroll"===e||"auto"===e&&t.width<t.element[0].scrollWidth;return{width:"scroll"===i||"auto"===i&&t.height<t.element[0].scrollHeight?V.position.scrollbarWidth():0,height:e?V.position.scrollbarWidth():0}},getWithinInfo:function(t){var e=V(t||window),i=I(e[0]),s=!!e[0]&&9===e[0].nodeType;return{element:e,isWindow:i,isDocument:s,offset:!i&&!s?V(t).offset():{left:0,top:0},scrollLeft:e.scrollLeft(),scrollTop:e.scrollTop(),width:e.outerWidth(),height:e.outerHeight()}}},V.fn.position=function(u){var d,p,f,g,m,_,v,b,y,w,t,e;return u&&u.of?(_="string"==typeof(u=V.extend({},u)).of?V(document).find(u.of):V(u.of),v=V.position.getWithinInfo(u.within),b=V.position.getScrollInfo(v),y=(u.collision||"flip").split(" "),w={},e=9===(e=(t=_)[0]).nodeType?{width:t.width(),height:t.height(),offset:{top:0,left:0}}:I(e)?{width:t.width(),height:t.height(),offset:{top:t.scrollTop(),left:t.scrollLeft()}}:e.preventDefault?{width:0,height:0,offset:{top:e.pageY,left:e.pageX}}:{width:t.outerWidth(),height:t.outerHeight(),offset:t.offset()},_[0].preventDefault&&(u.at="left top"),p=e.width,f=e.height,m=V.extend({},g=e.offset),V.each(["my","at"],function(){var t,e,i=(u[this]||"").split(" ");(i=1===i.length?o.test(i[0])?i.concat(["center"]):a.test(i[0])?["center"].concat(i):["center","center"]:i)[0]=o.test(i[0])?i[0]:"center",i[1]=a.test(i[1])?i[1]:"center",t=r.exec(i[0]),e=r.exec(i[1]),w[this]=[t?t[0]:0,e?e[0]:0],u[this]=[l.exec(i[0])[0],l.exec(i[1])[0]]}),1===y.length&&(y[1]=y[0]),"right"===u.at[0]?m.left+=p:"center"===u.at[0]&&(m.left+=p/2),"bottom"===u.at[1]?m.top+=f:"center"===u.at[1]&&(m.top+=f/2),d=C(w.at,p,f),m.left+=d[0],m.top+=d[1],this.each(function(){var i,t,a=V(this),r=a.outerWidth(),l=a.outerHeight(),e=D(this,"marginLeft"),s=D(this,"marginTop"),n=r+e+D(this,"marginRight")+b.width,o=l+s+D(this,"marginBottom")+b.height,h=V.extend({},m),c=C(w.my,a.outerWidth(),a.outerHeight());"right"===u.my[0]?h.left-=r:"center"===u.my[0]&&(h.left-=r/2),"bottom"===u.my[1]?h.top-=l:"center"===u.my[1]&&(h.top-=l/2),h.left+=c[0],h.top+=c[1],i={marginLeft:e,marginTop:s},V.each(["left","top"],function(t,e){V.ui.position[y[t]]&&V.ui.position[y[t]][e](h,{targetWidth:p,targetHeight:f,elemWidth:r,elemHeight:l,collisionPosition:i,collisionWidth:n,collisionHeight:o,offset:[d[0]+c[0],d[1]+c[1]],my:u.my,at:u.at,within:v,elem:a})}),u.using&&(t=function(t){var e=g.left-h.left,i=e+p-r,s=g.top-h.top,n=s+f-l,o={target:{element:_,left:g.left,top:g.top,width:p,height:f},element:{element:a,left:h.left,top:h.top,width:r,height:l},horizontal:i<0?"left":0<e?"right":"center",vertical:n<0?"top":0<s?"bottom":"middle"};p<r&&k(e+i)<p&&(o.horizontal="center"),f<l&&k(s+n)<f&&(o.vertical="middle"),x(k(e),k(i))>x(k(s),k(n))?o.important="horizontal":o.important="vertical",u.using.call(this,t,o)}),a.offset(V.extend(h,{using:t}))})):i.apply(this,arguments)},V.ui.position={fit:{left:function(t,e){var i,s=e.within,n=s.isWindow?s.scrollLeft:s.offset.left,s=s.width,o=t.left-e.collisionPosition.marginLeft,a=n-o,r=o+e.collisionWidth-s-n;e.collisionWidth>s?0<a&&r<=0?(i=t.left+a+e.collisionWidth-s-n,t.left+=a-i):t.left=!(0<r&&a<=0)&&r<a?n+s-e.collisionWidth:n:0<a?t.left+=a:0<r?t.left-=r:t.left=x(t.left-o,t.left)},top:function(t,e){var i,s=e.within,s=s.isWindow?s.scrollTop:s.offset.top,n=e.within.height,o=t.top-e.collisionPosition.marginTop,a=s-o,r=o+e.collisionHeight-n-s;e.collisionHeight>n?0<a&&r<=0?(i=t.top+a+e.collisionHeight-n-s,t.top+=a-i):t.top=!(0<r&&a<=0)&&r<a?s+n-e.collisionHeight:s:0<a?t.top+=a:0<r?t.top-=r:t.top=x(t.top-o,t.top)}},flip:{left:function(t,e){var i=e.within,s=i.offset.left+i.scrollLeft,n=i.width,i=i.isWindow?i.scrollLeft:i.offset.left,o=t.left-e.collisionPosition.marginLeft,a=o-i,o=o+e.collisionWidth-n-i,r="left"===e.my[0]?-e.elemWidth:"right"===e.my[0]?e.elemWidth:0,l="left"===e.at[0]?e.targetWidth:"right"===e.at[0]?-e.targetWidth:0,h=-2*e.offset[0];a<0?((n=t.left+r+l+h+e.collisionWidth-n-s)<0||n<k(a))&&(t.left+=r+l+h):0<o&&(0<(s=t.left-e.collisionPosition.marginLeft+r+l+h-i)||k(s)<o)&&(t.left+=r+l+h)},top:function(t,e){var i=e.within,s=i.offset.top+i.scrollTop,n=i.height,i=i.isWindow?i.scrollTop:i.offset.top,o=t.top-e.collisionPosition.marginTop,a=o-i,o=o+e.collisionHeight-n-i,r="top"===e.my[1]?-e.elemHeight:"bottom"===e.my[1]?e.elemHeight:0,l="top"===e.at[1]?e.targetHeight:"bottom"===e.at[1]?-e.targetHeight:0,h=-2*e.offset[1];a<0?((n=t.top+r+l+h+e.collisionHeight-n-s)<0||n<k(a))&&(t.top+=r+l+h):0<o&&(0<(s=t.top-e.collisionPosition.marginTop+r+l+h-i)||k(s)<o)&&(t.top+=r+l+h)}},flipfit:{left:function(){V.ui.position.flip.left.apply(this,arguments),V.ui.position.fit.left.apply(this,arguments)},top:function(){V.ui.position.flip.top.apply(this,arguments),V.ui.position.fit.top.apply(this,arguments)}}};V.ui.position,V.extend(V.expr.pseudos,{data:V.expr.createPseudo?V.expr.createPseudo(function(e){return function(t){return!!V.data(t,e)}}):function(t,e,i){return!!V.data(t,i[3])}}),V.fn.extend({disableSelection:(W="onselectstart"in document.createElement("div")?"selectstart":"mousedown",function(){return this.on(W+".ui-disableSelection",function(t){t.preventDefault()})}),enableSelection:function(){return this.off(".ui-disableSelection")}});var W,u=V,d={},F=d.toString,L=/^([\-+])=\s*(\d+\.?\d*)/,R=[{re:/rgba?\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*(?:,\s*(\d?(?:\.\d+)?)\s*)?\)/,parse:function(t){return[t[1],t[2],t[3],t[4]]}},{re:/rgba?\(\s*(\d+(?:\.\d+)?)\%\s*,\s*(\d+(?:\.\d+)?)\%\s*,\s*(\d+(?:\.\d+)?)\%\s*(?:,\s*(\d?(?:\.\d+)?)\s*)?\)/,parse:function(t){return[2.55*t[1],2.55*t[2],2.55*t[3],t[4]]}},{re:/#([a-f0-9]{2})([a-f0-9]{2})([a-f0-9]{2})([a-f0-9]{2})?/,parse:function(t){return[parseInt(t[1],16),parseInt(t[2],16),parseInt(t[3],16),t[4]?(parseInt(t[4],16)/255).toFixed(2):1]}},{re:/#([a-f0-9])([a-f0-9])([a-f0-9])([a-f0-9])?/,parse:function(t){return[parseInt(t[1]+t[1],16),parseInt(t[2]+t[2],16),parseInt(t[3]+t[3],16),t[4]?(parseInt(t[4]+t[4],16)/255).toFixed(2):1]}},{re:/hsla?\(\s*(\d+(?:\.\d+)?)\s*,\s*(\d+(?:\.\d+)?)\%\s*,\s*(\d+(?:\.\d+)?)\%\s*(?:,\s*(\d?(?:\.\d+)?)\s*)?\)/,space:"hsla",parse:function(t){return[t[1],t[2]/100,t[3]/100,t[4]]}}],p=u.Color=function(t,e,i,s){return new u.Color.fn.parse(t,e,i,s)},f={rgba:{props:{red:{idx:0,type:"byte"},green:{idx:1,type:"byte"},blue:{idx:2,type:"byte"}}},hsla:{props:{hue:{idx:0,type:"degrees"},saturation:{idx:1,type:"percent"},lightness:{idx:2,type:"percent"}}}},Y={byte:{floor:!0,max:255},percent:{max:1},degrees:{mod:360,floor:!0}},B=p.support={},t=u("<p>")[0],g=u.each;function m(t){return null==t?t+"":"object"==typeof t?d[F.call(t)]||"object":typeof t}function _(t,e,i){var s=Y[e.type]||{};return null==t?i||!e.def?null:e.def:(t=s.floor?~~t:parseFloat(t),isNaN(t)?e.def:s.mod?(t+s.mod)%s.mod:Math.min(s.max,Math.max(0,t)))}function j(s){var n=p(),o=n._rgba=[];return s=s.toLowerCase(),g(R,function(t,e){var i=e.re.exec(s),i=i&&e.parse(i),e=e.space||"rgba";if(i)return i=n[e](i),n[f[e].cache]=i[f[e].cache],o=n._rgba=i._rgba,!1}),o.length?("0,0,0,0"===o.join()&&u.extend(o,y.transparent),n):y[s]}function v(t,e,i){return 6*(i=(i+1)%1)<1?t+(e-t)*i*6:2*i<1?e:3*i<2?t+(e-t)*(2/3-i)*6:t}t.style.cssText="background-color:rgba(1,1,1,.5)",B.rgba=-1<t.style.backgroundColor.indexOf("rgba"),g(f,function(t,e){e.cache="_"+t,e.props.alpha={idx:3,type:"percent",def:1}}),u.each("Boolean Number String Function Array Date RegExp Object Error Symbol".split(" "),function(t,e){d["[object "+e+"]"]=e.toLowerCase()}),(p.fn=u.extend(p.prototype,{parse:function(n,t,e,i){if(void 0===n)return this._rgba=[null,null,null,null],this;(n.jquery||n.nodeType)&&(n=u(n).css(t),t=void 0);var o=this,s=m(n),a=this._rgba=[];return void 0!==t&&(n=[n,t,e,i],s="array"),"string"===s?this.parse(j(n)||y._default):"array"===s?(g(f.rgba.props,function(t,e){a[e.idx]=_(n[e.idx],e)}),this):"object"===s?(n instanceof p?g(f,function(t,e){n[e.cache]&&(o[e.cache]=n[e.cache].slice())}):g(f,function(t,i){var s=i.cache;g(i.props,function(t,e){if(!o[s]&&i.to){if("alpha"===t||null==n[t])return;o[s]=i.to(o._rgba)}o[s][e.idx]=_(n[t],e,!0)}),o[s]&&u.inArray(null,o[s].slice(0,3))<0&&(null==o[s][3]&&(o[s][3]=1),i.from)&&(o._rgba=i.from(o[s]))}),this):void 0},is:function(t){var n=p(t),o=!0,a=this;return g(f,function(t,e){var i,s=n[e.cache];return s&&(i=a[e.cache]||e.to&&e.to(a._rgba)||[],g(e.props,function(t,e){if(null!=s[e.idx])return o=s[e.idx]===i[e.idx]})),o}),o},_space:function(){var i=[],s=this;return g(f,function(t,e){s[e.cache]&&i.push(t)}),i.pop()},transition:function(t,a){var t=(h=p(t))._space(),e=f[t],i=0===this.alpha()?p("transparent"):this,r=i[e.cache]||e.to(i._rgba),l=r.slice(),h=h[e.cache];return g(e.props,function(t,e){var i=e.idx,s=r[i],n=h[i],o=Y[e.type]||{};null!==n&&(null===s?l[i]=n:(o.mod&&(n-s>o.mod/2?s+=o.mod:s-n>o.mod/2&&(s-=o.mod)),l[i]=_((n-s)*a+s,e)))}),this[t](l)},blend:function(t){var e,i,s;return 1===this._rgba[3]?this:(e=this._rgba.slice(),i=e.pop(),s=p(t)._rgba,p(u.map(e,function(t,e){return(1-i)*s[e]+i*t})))},toRgbaString:function(){var t="rgba(",e=u.map(this._rgba,function(t,e){return null!=t?t:2<e?1:0});return 1===e[3]&&(e.pop(),t="rgb("),t+e.join()+")"},toHslaString:function(){var t="hsla(",e=u.map(this.hsla(),function(t,e){return null==t&&(t=2<e?1:0),t=e&&e<3?Math.round(100*t)+"%":t});return 1===e[3]&&(e.pop(),t="hsl("),t+e.join()+")"},toHexString:function(t){var e=this._rgba.slice(),i=e.pop();return t&&e.push(~~(255*i)),"#"+u.map(e,function(t){return 1===(t=(t||0).toString(16)).length?"0"+t:t}).join("")},toString:function(){return 0===this._rgba[3]?"transparent":this.toRgbaString()}})).parse.prototype=p.fn,f.hsla.to=function(t){var e,i,s,n,o,a,r,l;return null==t[0]||null==t[1]||null==t[2]?[null,null,null,t[3]]:(e=t[0]/255,i=t[1]/255,s=t[2]/255,t=t[3],n=(l=Math.max(e,i,s))-(r=Math.min(e,i,s)),a=.5*(o=l+r),r=r===l?0:e===l?60*(i-s)/n+360:i===l?60*(s-e)/n+120:60*(e-i)/n+240,l=0==n?0:a<=.5?n/o:n/(2-o),[Math.round(r)%360,l,a,null==t?1:t])},f.hsla.from=function(t){var e,i,s;return null==t[0]||null==t[1]||null==t[2]?[null,null,null,t[3]]:(e=t[0]/360,s=t[1],i=t[2],t=t[3],s=2*i-(i=i<=.5?i*(1+s):i+s-i*s),[Math.round(255*v(s,i,e+1/3)),Math.round(255*v(s,i,e)),Math.round(255*v(s,i,e-1/3)),t])},g(f,function(r,t){var e=t.props,o=t.cache,a=t.to,l=t.from;p.fn[r]=function(t){var i,s,n;return a&&!this[o]&&(this[o]=a(this._rgba)),void 0===t?this[o].slice():(i=m(t),s="array"===i||"object"===i?t:arguments,n=this[o].slice(),g(e,function(t,e){t=s["object"===i?t:e.idx];null==t&&(t=n[e.idx]),n[e.idx]=_(t,e)}),l?((t=p(l(n)))[o]=n,t):p(n))},g(e,function(o,a){p.fn[o]||(p.fn[o]=function(t){var e=m(t),i="alpha"===o?this._hsla?"hsla":"rgba":r,s=this[i](),n=s[a.idx];return"undefined"===e?n:("function"===e&&(e=m(t=t.call(this,n))),null==t&&a.empty?this:("string"===e&&(e=L.exec(t))&&(t=n+parseFloat(e[2])*("+"===e[1]?1:-1)),s[a.idx]=t,this[i](s)))})})}),(p.hook=function(t){t=t.split(" ");g(t,function(t,o){u.cssHooks[o]={set:function(t,e){var i,s,n="";if("transparent"!==e&&("string"!==m(e)||(i=j(e)))){if(e=p(i||e),!B.rgba&&1!==e._rgba[3]){for(s="backgroundColor"===o?t.parentNode:t;(""===n||"transparent"===n)&&s&&s.style;)try{n=u.css(s,"backgroundColor"),s=s.parentNode}catch(t){}e=e.blend(n&&"transparent"!==n?n:"_default")}e=e.toRgbaString()}try{t.style[o]=e}catch(t){}}},u.fx.step[o]=function(t){t.colorInit||(t.start=p(t.elem,o),t.end=p(t.end),t.colorInit=!0),u.cssHooks[o].set(t.elem,t.start.transition(t.end,t.pos))}})})("backgroundColor borderBottomColor borderLeftColor borderRightColor borderTopColor color columnRuleColor outlineColor textDecorationColor textEmphasisColor"),u.cssHooks.borderColor={expand:function(i){var s={};return g(["Top","Right","Bottom","Left"],function(t,e){s["border"+e+"Color"]=i}),s}};var q,K,U,X,$,G,Q,J,Z,b,y=u.Color.names={aqua:"#00ffff",black:"#000000",blue:"#0000ff",fuchsia:"#ff00ff",gray:"#808080",green:"#008000",lime:"#00ff00",maroon:"#800000",navy:"#000080",olive:"#808000",purple:"#800080",red:"#ff0000",silver:"#c0c0c0",teal:"#008080",white:"#ffffff",yellow:"#ffff00",transparent:[null,null,null,0],_default:"#ffffff"},w="ui-effects-",e="ui-effects-style",T="ui-effects-animated";function tt(t){var e,i,s=t.ownerDocument.defaultView?t.ownerDocument.defaultView.getComputedStyle(t,null):t.currentStyle,n={};if(s&&s.length&&s[0]&&s[s[0]])for(i=s.length;i--;)"string"==typeof s[e=s[i]]&&(n[e.replace(/-([\da-z])/gi,function(t,e){return e.toUpperCase()})]=s[e]);else for(e in s)"string"==typeof s[e]&&(n[e]=s[e]);return n}function P(t,e,i,s){return t={effect:t=V.isPlainObject(t)?(e=t).effect:t},"function"==typeof(e=null==e?{}:e)&&(s=e,i=null,e={}),"number"!=typeof e&&!V.fx.speeds[e]||(s=i,i=e,e={}),"function"==typeof i&&(s=i,i=null),e&&V.extend(t,e),i=i||e.duration,t.duration=V.fx.off?0:"number"==typeof i?i:i in V.fx.speeds?V.fx.speeds[i]:V.fx.speeds._default,t.complete=s||e.complete,t}function M(t){return!t||"number"==typeof t||V.fx.speeds[t]||"string"==typeof t&&!V.effects.effect[t]||"function"==typeof t||"object"==typeof t&&!t.effect}function et(t,e){var i=e.outerWidth(),e=e.outerHeight(),t=/^rect\((-?\d*\.?\d*px|-?\d+%|auto),?\s*(-?\d*\.?\d*px|-?\d+%|auto),?\s*(-?\d*\.?\d*px|-?\d+%|auto),?\s*(-?\d*\.?\d*px|-?\d+%|auto)\)$/.exec(t)||["",0,i,e,0];return{top:parseFloat(t[1])||0,right:"auto"===t[2]?i:parseFloat(t[2]),bottom:"auto"===t[3]?e:parseFloat(t[3]),left:parseFloat(t[4])||0}}V.effects={effect:{}},X=["add","remove","toggle"],$={border:1,borderBottom:1,borderColor:1,borderLeft:1,borderRight:1,borderTop:1,borderWidth:1,margin:1,padding:1},V.each(["borderLeftStyle","borderRightStyle","borderBottomStyle","borderTopStyle"],function(t,e){V.fx.step[e]=function(t){("none"!==t.end&&!t.setAttr||1===t.pos&&!t.setAttr)&&(u.style(t.elem,e,t.end),t.setAttr=!0)}}),V.fn.addBack||(V.fn.addBack=function(t){return this.add(null==t?this.prevObject:this.prevObject.filter(t))}),V.effects.animateClass=function(n,t,e,i){var o=V.speed(t,e,i);return this.queue(function(){var i=V(this),t=i.attr("class")||"",e=(e=o.children?i.find("*").addBack():i).map(function(){return{el:V(this),start:tt(this)}}),s=function(){V.each(X,function(t,e){n[e]&&i[e+"Class"](n[e])})};s(),e=e.map(function(){return this.end=tt(this.el[0]),this.diff=function(t,e){var i,s,n={};for(i in e)s=e[i],t[i]===s||$[i]||!V.fx.step[i]&&isNaN(parseFloat(s))||(n[i]=s);return n}(this.start,this.end),this}),i.attr("class",t),e=e.map(function(){var t=this,e=V.Deferred(),i=V.extend({},o,{queue:!1,complete:function(){e.resolve(t)}});return this.el.animate(this.diff,i),e.promise()}),V.when.apply(V,e.get()).done(function(){s(),V.each(arguments,function(){var e=this.el;V.each(this.diff,function(t){e.css(t,"")})}),o.complete.call(i[0])})})},V.fn.extend({addClass:(U=V.fn.addClass,function(t,e,i,s){return e?V.effects.animateClass.call(this,{add:t},e,i,s):U.apply(this,arguments)}),removeClass:(K=V.fn.removeClass,function(t,e,i,s){return 1<arguments.length?V.effects.animateClass.call(this,{remove:t},e,i,s):K.apply(this,arguments)}),toggleClass:(q=V.fn.toggleClass,function(t,e,i,s,n){return"boolean"==typeof e||void 0===e?i?V.effects.animateClass.call(this,e?{add:t}:{remove:t},i,s,n):q.apply(this,arguments):V.effects.animateClass.call(this,{toggle:t},e,i,s)}),switchClass:function(t,e,i,s,n){return V.effects.animateClass.call(this,{add:e,remove:t},i,s,n)}}),V.expr&&V.expr.pseudos&&V.expr.pseudos.animated&&(V.expr.pseudos.animated=(G=V.expr.pseudos.animated,function(t){return!!V(t).data(T)||G(t)})),!1!==V.uiBackCompat&&V.extend(V.effects,{save:function(t,e){for(var i=0,s=e.length;i<s;i++)null!==e[i]&&t.data(w+e[i],t[0].style[e[i]])},restore:function(t,e){for(var i,s=0,n=e.length;s<n;s++)null!==e[s]&&(i=t.data(w+e[s]),t.css(e[s],i))},setMode:function(t,e){return e="toggle"===e?t.is(":hidden")?"show":"hide":e},createWrapper:function(i){if(i.parent().is(".ui-effects-wrapper"))return i.parent();var s={width:i.outerWidth(!0),height:i.outerHeight(!0),float:i.css("float")},t=V("<div></div>").addClass("ui-effects-wrapper").css({fontSize:"100%",background:"transparent",border:"none",margin:0,padding:0}),e={width:i.width(),height:i.height()},n=document.activeElement;try{n.id}catch(t){n=document.body}return i.wrap(t),i[0]!==n&&!V.contains(i[0],n)||V(n).trigger("focus"),t=i.parent(),"static"===i.css("position")?(t.css({position:"relative"}),i.css({position:"relative"})):(V.extend(s,{position:i.css("position"),zIndex:i.css("z-index")}),V.each(["top","left","bottom","right"],function(t,e){s[e]=i.css(e),isNaN(parseInt(s[e],10))&&(s[e]="auto")}),i.css({position:"relative",top:0,left:0,right:"auto",bottom:"auto"})),i.css(e),t.css(s).show()},removeWrapper:function(t){var e=document.activeElement;return t.parent().is(".ui-effects-wrapper")&&(t.parent().replaceWith(t),t[0]!==e&&!V.contains(t[0],e)||V(e).trigger("focus")),t}}),V.extend(V.effects,{version:"1.13.3",define:function(t,e,i){return i||(i=e,e="effect"),V.effects.effect[t]=i,V.effects.effect[t].mode=e,i},scaledDimensions:function(t,e,i){var s;return 0===e?{height:0,width:0,outerHeight:0,outerWidth:0}:(s="horizontal"!==i?(e||100)/100:1,i="vertical"!==i?(e||100)/100:1,{height:t.height()*i,width:t.width()*s,outerHeight:t.outerHeight()*i,outerWidth:t.outerWidth()*s})},clipToBox:function(t){return{width:t.clip.right-t.clip.left,height:t.clip.bottom-t.clip.top,left:t.clip.left,top:t.clip.top}},unshift:function(t,e,i){var s=t.queue();1<e&&s.splice.apply(s,[1,0].concat(s.splice(e,i))),t.dequeue()},saveStyle:function(t){t.data(e,t[0].style.cssText)},restoreStyle:function(t){t[0].style.cssText=t.data(e)||"",t.removeData(e)},mode:function(t,e){t=t.is(":hidden");return"toggle"===e&&(e=t?"show":"hide"),e=(t?"hide"===e:"show"===e)?"none":e},getBaseline:function(t,e){var i,s;switch(t[0]){case"top":i=0;break;case"middle":i=.5;break;case"bottom":i=1;break;default:i=t[0]/e.height}switch(t[1]){case"left":s=0;break;case"center":s=.5;break;case"right":s=1;break;default:s=t[1]/e.width}return{x:s,y:i}},createPlaceholder:function(t){var e,i=t.css("position"),s=t.position();return t.css({marginTop:t.css("marginTop"),marginBottom:t.css("marginBottom"),marginLeft:t.css("marginLeft"),marginRight:t.css("marginRight")}).outerWidth(t.outerWidth()).outerHeight(t.outerHeight()),/^(static|relative)/.test(i)&&(i="absolute",e=V("<"+t[0].nodeName+">").insertAfter(t).css({display:/^(inline|ruby)/.test(t.css("display"))?"inline-block":"block",visibility:"hidden",marginTop:t.css("marginTop"),marginBottom:t.css("marginBottom"),marginLeft:t.css("marginLeft"),marginRight:t.css("marginRight"),float:t.css("float")}).outerWidth(t.outerWidth()).outerHeight(t.outerHeight()).addClass("ui-effects-placeholder"),t.data(w+"placeholder",e)),t.css({position:i,left:s.left,top:s.top}),e},removePlaceholder:function(t){var e=w+"placeholder",i=t.data(e);i&&(i.remove(),t.removeData(e))},cleanUp:function(t){V.effects.restoreStyle(t),V.effects.removePlaceholder(t)},setTransition:function(s,t,n,o){return o=o||{},V.each(t,function(t,e){var i=s.cssUnit(e);0<i[0]&&(o[e]=i[0]*n+i[1])}),o}}),V.fn.extend({effect:function(){function t(t){var e=V(this),i=V.effects.mode(e,r)||o;e.data(T,!0),l.push(i),o&&("show"===i||i===o&&"hide"===i)&&e.show(),o&&"none"===i||V.effects.saveStyle(e),"function"==typeof t&&t()}var s=P.apply(this,arguments),n=V.effects.effect[s.effect],o=n.mode,e=s.queue,i=e||"fx",a=s.complete,r=s.mode,l=[];return V.fx.off||!n?r?this[r](s.duration,a):this.each(function(){a&&a.call(this)}):!1===e?this.each(t).each(h):this.queue(i,t).queue(i,h);function h(t){var e=V(this);function i(){"function"==typeof a&&a.call(e[0]),"function"==typeof t&&t()}s.mode=l.shift(),!1===V.uiBackCompat||o?"none"===s.mode?(e[r](),i()):n.call(e[0],s,function(){e.removeData(T),V.effects.cleanUp(e),"hide"===s.mode&&e.hide(),i()}):(e.is(":hidden")?"hide"===r:"show"===r)?(e[r](),i()):n.call(e[0],s,i)}},show:(Z=V.fn.show,function(t){return M(t)?Z.apply(this,arguments):((t=P.apply(this,arguments)).mode="show",this.effect.call(this,t))}),hide:(J=V.fn.hide,function(t){return M(t)?J.apply(this,arguments):((t=P.apply(this,arguments)).mode="hide",this.effect.call(this,t))}),toggle:(Q=V.fn.toggle,function(t){return M(t)||"boolean"==typeof t?Q.apply(this,arguments):((t=P.apply(this,arguments)).mode="toggle",this.effect.call(this,t))}),cssUnit:function(t){var i=this.css(t),s=[];return V.each(["em","px","%","pt"],function(t,e){0<i.indexOf(e)&&(s=[parseFloat(i),e])}),s},cssClip:function(t){return t?this.css("clip","rect("+t.top+"px "+t.right+"px "+t.bottom+"px "+t.left+"px)"):et(this.css("clip"),this)},transfer:function(t,e){var i=V(this),s=V(t.to),n="fixed"===s.css("position"),o=V("body"),a=n?o.scrollTop():0,o=n?o.scrollLeft():0,r=s.offset(),r={top:r.top-a,left:r.left-o,height:s.innerHeight(),width:s.innerWidth()},s=i.offset(),l=V("<div class='ui-effects-transfer'></div>");l.appendTo("body").addClass(t.className).css({top:s.top-a,left:s.left-o,height:i.innerHeight(),width:i.innerWidth(),position:n?"fixed":"absolute"}).animate(r,t.duration,t.easing,function(){l.remove(),"function"==typeof e&&e()})}}),V.fx.step.clip=function(t){t.clipInit||(t.start=V(t.elem).cssClip(),"string"==typeof t.end&&(t.end=et(t.end,t.elem)),t.clipInit=!0),V(t.elem).cssClip({top:t.pos*(t.end.top-t.start.top)+t.start.top,right:t.pos*(t.end.right-t.start.right)+t.start.right,bottom:t.pos*(t.end.bottom-t.start.bottom)+t.start.bottom,left:t.pos*(t.end.left-t.start.left)+t.start.left})},b={},V.each(["Quad","Cubic","Quart","Quint","Expo"],function(e,t){b[t]=function(t){return Math.pow(t,e+2)}}),V.extend(b,{Sine:function(t){return 1-Math.cos(t*Math.PI/2)},Circ:function(t){return 1-Math.sqrt(1-t*t)},Elastic:function(t){return 0===t||1===t?t:-Math.pow(2,8*(t-1))*Math.sin((80*(t-1)-7.5)*Math.PI/15)},Back:function(t){return t*t*(3*t-2)},Bounce:function(t){for(var e,i=4;t<((e=Math.pow(2,--i))-1)/11;);return 1/Math.pow(4,3-i)-7.5625*Math.pow((3*e-2)/22-t,2)}}),V.each(b,function(t,e){V.easing["easeIn"+t]=e,V.easing["easeOut"+t]=function(t){return 1-e(1-t)},V.easing["easeInOut"+t]=function(t){return t<.5?e(2*t)/2:1-e(-2*t+2)/2}});t=V.effects;V.effects.define("blind","hide",function(t,e){var i={up:["bottom","top"],vertical:["bottom","top"],down:["top","bottom"],left:["right","left"],horizontal:["right","left"],right:["left","right"]},s=V(this),n=t.direction||"up",o=s.cssClip(),a={clip:V.extend({},o)},r=V.effects.createPlaceholder(s);a.clip[i[n][0]]=a.clip[i[n][1]],"show"===t.mode&&(s.cssClip(a.clip),r&&r.css(V.effects.clipToBox(a)),a.clip=o),r&&r.animate(V.effects.clipToBox(a),t.duration,t.easing),s.animate(a,{queue:!1,duration:t.duration,easing:t.easing,complete:e})}),V.effects.define("bounce",function(t,e){var i,s,n=V(this),o=t.mode,a="hide"===o,o="show"===o,r=t.direction||"up",l=t.distance,h=t.times||5,c=2*h+(o||a?1:0),u=t.duration/c,d=t.easing,p="up"===r||"down"===r?"top":"left",f="up"===r||"left"===r,g=0,t=n.queue().length;for(V.effects.createPlaceholder(n),r=n.css(p),l=l||n["top"==p?"outerHeight":"outerWidth"]()/3,o&&((s={opacity:1})[p]=r,n.css("opacity",0).css(p,f?2*-l:2*l).animate(s,u,d)),a&&(l/=Math.pow(2,h-1)),(s={})[p]=r;g<h;g++)(i={})[p]=(f?"-=":"+=")+l,n.animate(i,u,d).animate(s,u,d),l=a?2*l:l/2;a&&((i={opacity:0})[p]=(f?"-=":"+=")+l,n.animate(i,u,d)),n.queue(e),V.effects.unshift(n,t,1+c)}),V.effects.define("clip","hide",function(t,e){var i={},s=V(this),n=t.direction||"vertical",o="both"===n,a=o||"horizontal"===n,o=o||"vertical"===n,n=s.cssClip();i.clip={top:o?(n.bottom-n.top)/2:n.top,right:a?(n.right-n.left)/2:n.right,bottom:o?(n.bottom-n.top)/2:n.bottom,left:a?(n.right-n.left)/2:n.left},V.effects.createPlaceholder(s),"show"===t.mode&&(s.cssClip(i.clip),i.clip=n),s.animate(i,{queue:!1,duration:t.duration,easing:t.easing,complete:e})}),V.effects.define("drop","hide",function(t,e){var i,s=V(this),n="show"===t.mode,o=t.direction||"left",a="up"===o||"down"===o?"top":"left",o="up"===o||"left"===o?"-=":"+=",r="+="==o?"-=":"+=",l={opacity:0};V.effects.createPlaceholder(s),i=t.distance||s["top"==a?"outerHeight":"outerWidth"](!0)/2,l[a]=o+i,n&&(s.css(l),l[a]=r+i,l.opacity=1),s.animate(l,{queue:!1,duration:t.duration,easing:t.easing,complete:e})}),V.effects.define("explode","hide",function(t,e){var i,s,n,o,a,r,l=t.pieces?Math.round(Math.sqrt(t.pieces)):3,h=l,c=V(this),u="show"===t.mode,d=c.show().css("visibility","hidden").offset(),p=Math.ceil(c.outerWidth()/h),f=Math.ceil(c.outerHeight()/l),g=[];function m(){g.push(this),g.length===l*h&&(c.css({visibility:"visible"}),V(g).remove(),e())}for(i=0;i<l;i++)for(o=d.top+i*f,r=i-(l-1)/2,s=0;s<h;s++)n=d.left+s*p,a=s-(h-1)/2,c.clone().appendTo("body").wrap("<div></div>").css({position:"absolute",visibility:"visible",left:-s*p,top:-i*f}).parent().addClass("ui-effects-explode").css({position:"absolute",overflow:"hidden",width:p,height:f,left:n+(u?a*p:0),top:o+(u?r*f:0),opacity:u?0:1}).animate({left:n+(u?0:a*p),top:o+(u?0:r*f),opacity:u?1:0},t.duration||500,t.easing,m)}),V.effects.define("fade","toggle",function(t,e){var i="show"===t.mode;V(this).css("opacity",i?0:1).animate({opacity:i?1:0},{queue:!1,duration:t.duration,easing:t.easing,complete:e})}),V.effects.define("fold","hide",function(e,t){var i=V(this),s=e.mode,n="show"===s,s="hide"===s,o=e.size||15,a=/([0-9]+)%/.exec(o),r=!!e.horizFirst?["right","bottom"]:["bottom","right"],l=e.duration/2,h=V.effects.createPlaceholder(i),c=i.cssClip(),u={clip:V.extend({},c)},d={clip:V.extend({},c)},p=[c[r[0]],c[r[1]]],f=i.queue().length;a&&(o=parseInt(a[1],10)/100*p[s?0:1]),u.clip[r[0]]=o,d.clip[r[0]]=o,d.clip[r[1]]=0,n&&(i.cssClip(d.clip),h&&h.css(V.effects.clipToBox(d)),d.clip=c),i.queue(function(t){h&&h.animate(V.effects.clipToBox(u),l,e.easing).animate(V.effects.clipToBox(d),l,e.easing),t()}).animate(u,l,e.easing).animate(d,l,e.easing).queue(t),V.effects.unshift(i,f,4)}),V.effects.define("highlight","show",function(t,e){var i=V(this),s={backgroundColor:i.css("backgroundColor")};"hide"===t.mode&&(s.opacity=0),V.effects.saveStyle(i),i.css({backgroundImage:"none",backgroundColor:t.color||"#ffff99"}).animate(s,{queue:!1,duration:t.duration,easing:t.easing,complete:e})}),V.effects.define("size",function(s,e){var n,i=V(this),t=["fontSize"],o=["borderTopWidth","borderBottomWidth","paddingTop","paddingBottom"],a=["borderLeftWidth","borderRightWidth","paddingLeft","paddingRight"],r=s.mode,l="effect"!==r,h=s.scale||"both",c=s.origin||["middle","center"],u=i.css("position"),d=i.position(),p=V.effects.scaledDimensions(i),f=s.from||p,g=s.to||V.effects.scaledDimensions(i,0);V.effects.createPlaceholder(i),"show"===r&&(r=f,f=g,g=r),n={from:{y:f.height/p.height,x:f.width/p.width},to:{y:g.height/p.height,x:g.width/p.width}},"box"!==h&&"both"!==h||(n.from.y!==n.to.y&&(f=V.effects.setTransition(i,o,n.from.y,f),g=V.effects.setTransition(i,o,n.to.y,g)),n.from.x!==n.to.x&&(f=V.effects.setTransition(i,a,n.from.x,f),g=V.effects.setTransition(i,a,n.to.x,g))),"content"!==h&&"both"!==h||n.from.y!==n.to.y&&(f=V.effects.setTransition(i,t,n.from.y,f),g=V.effects.setTransition(i,t,n.to.y,g)),c&&(r=V.effects.getBaseline(c,p),f.top=(p.outerHeight-f.outerHeight)*r.y+d.top,f.left=(p.outerWidth-f.outerWidth)*r.x+d.left,g.top=(p.outerHeight-g.outerHeight)*r.y+d.top,g.left=(p.outerWidth-g.outerWidth)*r.x+d.left),delete f.outerHeight,delete f.outerWidth,i.css(f),"content"!==h&&"both"!==h||(o=o.concat(["marginTop","marginBottom"]).concat(t),a=a.concat(["marginLeft","marginRight"]),i.find("*[width]").each(function(){var t=V(this),e=V.effects.scaledDimensions(t),i={height:e.height*n.from.y,width:e.width*n.from.x,outerHeight:e.outerHeight*n.from.y,outerWidth:e.outerWidth*n.from.x},e={height:e.height*n.to.y,width:e.width*n.to.x,outerHeight:e.height*n.to.y,outerWidth:e.width*n.to.x};n.from.y!==n.to.y&&(i=V.effects.setTransition(t,o,n.from.y,i),e=V.effects.setTransition(t,o,n.to.y,e)),n.from.x!==n.to.x&&(i=V.effects.setTransition(t,a,n.from.x,i),e=V.effects.setTransition(t,a,n.to.x,e)),l&&V.effects.saveStyle(t),t.css(i),t.animate(e,s.duration,s.easing,function(){l&&V.effects.restoreStyle(t)})})),i.animate(g,{queue:!1,duration:s.duration,easing:s.easing,complete:function(){var t=i.offset();0===g.opacity&&i.css("opacity",f.opacity),l||(i.css("position","static"===u?"relative":u).offset(t),V.effects.saveStyle(i)),e()}})}),V.effects.define("scale",function(t,e){var i=V(this),s=t.mode,s=parseInt(t.percent,10)||(0===parseInt(t.percent,10)||"effect"!==s?0:100),i=V.extend(!0,{from:V.effects.scaledDimensions(i),to:V.effects.scaledDimensions(i,s,t.direction||"both"),origin:t.origin||["middle","center"]},t);t.fade&&(i.from.opacity=1,i.to.opacity=0),V.effects.effect.size.call(this,i,e)}),V.effects.define("puff","hide",function(t,e){t=V.extend(!0,{},t,{fade:!0,percent:parseInt(t.percent,10)||150});V.effects.effect.scale.call(this,t,e)}),V.effects.define("pulsate","show",function(t,e){var i=V(this),s=t.mode,n="show"===s,o=2*(t.times||5)+(n||"hide"===s?1:0),a=t.duration/o,r=0,l=1,s=i.queue().length;for(!n&&i.is(":visible")||(i.css("opacity",0).show(),r=1);l<o;l++)i.animate({opacity:r},a,t.easing),r=1-r;i.animate({opacity:r},a,t.easing),i.queue(e),V.effects.unshift(i,s,1+o)}),V.effects.define("shake",function(t,e){var i=1,s=V(this),n=t.direction||"left",o=t.distance||20,a=t.times||3,r=2*a+1,l=Math.round(t.duration/r),h="up"===n||"down"===n?"top":"left",n="up"===n||"left"===n,c={},u={},d={},p=s.queue().length;for(V.effects.createPlaceholder(s),c[h]=(n?"-=":"+=")+o,u[h]=(n?"+=":"-=")+2*o,d[h]=(n?"-=":"+=")+2*o,s.animate(c,l,t.easing);i<a;i++)s.animate(u,l,t.easing).animate(d,l,t.easing);s.animate(u,l,t.easing).animate(c,l/2,t.easing).queue(e),V.effects.unshift(s,p,1+r)}),V.effects.define("slide","show",function(t,e){var i,s,n=V(this),o={up:["bottom","top"],down:["top","bottom"],left:["right","left"],right:["left","right"]},a=t.mode,r=t.direction||"left",l="up"===r||"down"===r?"top":"left",h="up"===r||"left"===r,c=t.distance||n["top"==l?"outerHeight":"outerWidth"](!0),u={};V.effects.createPlaceholder(n),i=n.cssClip(),s=n.position()[l],u[l]=(h?-1:1)*c+s,u.clip=n.cssClip(),u.clip[o[r][1]]=u.clip[o[r][0]],"show"===a&&(n.cssClip(u.clip),n.css(l,u[l]),u.clip=i,u[l]=s),n.animate(u,{queue:!1,duration:t.duration,easing:t.easing,complete:e})}),t=!1!==V.uiBackCompat?V.effects.define("transfer",function(t,e){V(this).transfer(t,e)}):t;V.ui.focusable=function(t,e){var i,s,n,o=t.nodeName.toLowerCase();return"area"===o?(n=(i=t.parentNode).name,!(!t.href||!n||"map"!==i.nodeName.toLowerCase())&&0<(i=V("img[usemap='#"+n+"']")).length&&i.is(":visible")):(/^(input|select|textarea|button|object)$/.test(o)?(s=!t.disabled)&&(n=V(t).closest("fieldset")[0])&&(s=!n.disabled):s="a"===o&&t.href||e,s&&V(t).is(":visible")&&function(t){var e=t.css("visibility");for(;"inherit"===e;)t=t.parent(),e=t.css("visibility");return"visible"===e}(V(t)))},V.extend(V.expr.pseudos,{focusable:function(t){return V.ui.focusable(t,null!=V.attr(t,"tabindex"))}});V.ui.focusable,V.fn._form=function(){return"string"==typeof this[0].form?this.closest("form"):V(this[0].form)},V.ui.formResetMixin={_formResetHandler:function(){var e=V(this);setTimeout(function(){var t=e.data("ui-form-reset-instances");V.each(t,function(){this.refresh()})})},_bindFormResetHandler:function(){var t;this.form=this.element._form(),this.form.length&&((t=this.form.data("ui-form-reset-instances")||[]).length||this.form.on("reset.ui-form-reset",this._formResetHandler),t.push(this),this.form.data("ui-form-reset-instances",t))},_unbindFormResetHandler:function(){var t;this.form.length&&((t=this.form.data("ui-form-reset-instances")).splice(V.inArray(this,t),1),t.length?this.form.data("ui-form-reset-instances",t):this.form.removeData("ui-form-reset-instances").off("reset.ui-form-reset"))}},V.expr.pseudos||(V.expr.pseudos=V.expr[":"]),V.uniqueSort||(V.uniqueSort=V.unique),V.escapeSelector||(it=/([\0-\x1f\x7f]|^-?\d)|^-$|[^\x80-\uFFFF\w-]/g,st=function(t,e){return e?"\0"===t?"�":t.slice(0,-1)+"\\"+t.charCodeAt(t.length-1).toString(16)+" ":"\\"+t},V.escapeSelector=function(t){return(t+"").replace(it,st)}),V.fn.even&&V.fn.odd||V.fn.extend({even:function(){return this.filter(function(t){return t%2==0})},odd:function(){return this.filter(function(t){return t%2==1})}}),V.ui.keyCode={BACKSPACE:8,COMMA:188,DELETE:46,DOWN:40,END:35,ENTER:13,ESCAPE:27,HOME:36,LEFT:37,PAGE_DOWN:34,PAGE_UP:33,PERIOD:190,RIGHT:39,SPACE:32,TAB:9,UP:38},V.fn.labels=function(){var t,e,i;return this.length?this[0].labels&&this[0].labels.length?this.pushStack(this[0].labels):(e=this.eq(0).parents("label"),(t=this.attr("id"))&&(i=(i=this.eq(0).parents().last()).add((i.length?i:this).siblings()),t="label[for='"+V.escapeSelector(t)+"']",e=e.add(i.find(t).addBack(t))),this.pushStack(e)):this.pushStack([])},V.fn.scrollParent=function(t){var e=this.css("position"),i="absolute"===e,s=t?/(auto|scroll|hidden)/:/(auto|scroll)/,t=this.parents().filter(function(){var t=V(this);return(!i||"static"!==t.css("position"))&&s.test(t.css("overflow")+t.css("overflow-y")+t.css("overflow-x"))}).eq(0);return"fixed"!==e&&t.length?t:V(this[0].ownerDocument||document)},V.extend(V.expr.pseudos,{tabbable:function(t){var e=V.attr(t,"tabindex"),i=null!=e;return(!i||0<=e)&&V.ui.focusable(t,i)}}),V.fn.extend({uniqueId:(nt=0,function(){return this.each(function(){this.id||(this.id="ui-id-"+ ++nt)})}),removeUniqueId:function(){return this.each(function(){/^ui-id-\d+$/.test(this.id)&&V(this).removeAttr("id")})}}),V.widget("ui.accordion",{version:"1.13.3",options:{active:0,animate:{},classes:{"ui-accordion-header":"ui-corner-top","ui-accordion-header-collapsed":"ui-corner-all","ui-accordion-content":"ui-corner-bottom"},collapsible:!1,event:"click",header:function(t){return t.find("> li > :first-child").add(t.find("> :not(li)").even())},heightStyle:"auto",icons:{activeHeader:"ui-icon-triangle-1-s",header:"ui-icon-triangle-1-e"},activate:null,beforeActivate:null},hideProps:{borderTopWidth:"hide",borderBottomWidth:"hide",paddingTop:"hide",paddingBottom:"hide",height:"hide"},showProps:{borderTopWidth:"show",borderBottomWidth:"show",paddingTop:"show",paddingBottom:"show",height:"show"},_create:function(){var t=this.options;this.prevShow=this.prevHide=V(),this._addClass("ui-accordion","ui-widget ui-helper-reset"),this.element.attr("role","tablist"),t.collapsible||!1!==t.active&&null!=t.active||(t.active=0),this._processPanels(),t.active<0&&(t.active+=this.headers.length),this._refresh()},_getCreateEventData:function(){return{header:this.active,panel:this.active.length?this.active.next():V()}},_createIcons:function(){var t,e=this.options.icons;e&&(t=V("<span>"),this._addClass(t,"ui-accordion-header-icon","ui-icon "+e.header),t.prependTo(this.headers),t=this.active.children(".ui-accordion-header-icon"),this._removeClass(t,e.header)._addClass(t,null,e.activeHeader)._addClass(this.headers,"ui-accordion-icons"))},_destroyIcons:function(){this._removeClass(this.headers,"ui-accordion-icons"),this.headers.children(".ui-accordion-header-icon").remove()},_destroy:function(){var t;this.element.removeAttr("role"),this.headers.removeAttr("role aria-expanded aria-selected aria-controls tabIndex").removeUniqueId(),this._destroyIcons(),t=this.headers.next().css("display","").removeAttr("role aria-hidden aria-labelledby").removeUniqueId(),"content"!==this.options.heightStyle&&t.css("height","")},_setOption:function(t,e){"active"===t?this._activate(e):("event"===t&&(this.options.event&&this._off(this.headers,this.options.event),this._setupEvents(e)),this._super(t,e),"collapsible"!==t||e||!1!==this.options.active||this._activate(0),"icons"===t&&(this._destroyIcons(),e)&&this._createIcons())},_setOptionDisabled:function(t){this._super(t),this.element.attr("aria-disabled",t),this._toggleClass(null,"ui-state-disabled",!!t),this._toggleClass(this.headers.add(this.headers.next()),null,"ui-state-disabled",!!t)},_keydown:function(t){if(!t.altKey&&!t.ctrlKey){var e=V.ui.keyCode,i=this.headers.length,s=this.headers.index(t.target),n=!1;switch(t.keyCode){case e.RIGHT:case e.DOWN:n=this.headers[(s+1)%i];break;case e.LEFT:case e.UP:n=this.headers[(s-1+i)%i];break;case e.SPACE:case e.ENTER:this._eventHandler(t);break;case e.HOME:n=this.headers[0];break;case e.END:n=this.headers[i-1]}n&&(V(t.target).attr("tabIndex",-1),V(n).attr("tabIndex",0),V(n).trigger("focus"),t.preventDefault())}},_panelKeyDown:function(t){t.keyCode===V.ui.keyCode.UP&&t.ctrlKey&&V(t.currentTarget).prev().trigger("focus")},refresh:function(){var t=this.options;this._processPanels(),!1===t.active&&!0===t.collapsible||!this.headers.length?(t.active=!1,this.active=V()):!1===t.active?this._activate(0):this.active.length&&!V.contains(this.element[0],this.active[0])?this.headers.length===this.headers.find(".ui-state-disabled").length?(t.active=!1,this.active=V()):this._activate(Math.max(0,t.active-1)):t.active=this.headers.index(this.active),this._destroyIcons(),this._refresh()},_processPanels:function(){var t=this.headers,e=this.panels;"function"==typeof this.options.header?this.headers=this.options.header(this.element):this.headers=this.element.find(this.options.header),this._addClass(this.headers,"ui-accordion-header ui-accordion-header-collapsed","ui-state-default"),this.panels=this.headers.next().filter(":not(.ui-accordion-content-active)").hide(),this._addClass(this.panels,"ui-accordion-content","ui-helper-reset ui-widget-content"),e&&(this._off(t.not(this.headers)),this._off(e.not(this.panels)))},_refresh:function(){var i,t=this.options,e=t.heightStyle,s=this.element.parent();this.active=this._findActive(t.active),this._addClass(this.active,"ui-accordion-header-active","ui-state-active")._removeClass(this.active,"ui-accordion-header-collapsed"),this._addClass(this.active.next(),"ui-accordion-content-active"),this.active.next().show(),this.headers.attr("role","tab").each(function(){var t=V(this),e=t.uniqueId().attr("id"),i=t.next(),s=i.uniqueId().attr("id");t.attr("aria-controls",s),i.attr("aria-labelledby",e)}).next().attr("role","tabpanel"),this.headers.not(this.active).attr({"aria-selected":"false","aria-expanded":"false",tabIndex:-1}).next().attr({"aria-hidden":"true"}).hide(),this.active.length?this.active.attr({"aria-selected":"true","aria-expanded":"true",tabIndex:0}).next().attr({"aria-hidden":"false"}):this.headers.eq(0).attr("tabIndex",0),this._createIcons(),this._setupEvents(t.event),"fill"===e?(i=s.height(),this.element.siblings(":visible").each(function(){var t=V(this),e=t.css("position");"absolute"!==e&&"fixed"!==e&&(i-=t.outerHeight(!0))}),this.headers.each(function(){i-=V(this).outerHeight(!0)}),this.headers.next().each(function(){V(this).height(Math.max(0,i-V(this).innerHeight()+V(this).height()))}).css("overflow","auto")):"auto"===e&&(i=0,this.headers.next().each(function(){var t=V(this).is(":visible");t||V(this).show(),i=Math.max(i,V(this).css("height","").height()),t||V(this).hide()}).height(i))},_activate:function(t){t=this._findActive(t)[0];t!==this.active[0]&&(t=t||this.active[0],this._eventHandler({target:t,currentTarget:t,preventDefault:V.noop}))},_findActive:function(t){return"number"==typeof t?this.headers.eq(t):V()},_setupEvents:function(t){var i={keydown:"_keydown"};t&&V.each(t.split(" "),function(t,e){i[e]="_eventHandler"}),this._off(this.headers.add(this.headers.next())),this._on(this.headers,i),this._on(this.headers.next(),{keydown:"_panelKeyDown"}),this._hoverable(this.headers),this._focusable(this.headers)},_eventHandler:function(t){var e=this.options,i=this.active,s=V(t.currentTarget),n=s[0]===i[0],o=n&&e.collapsible,a=o?V():s.next(),r=i.next(),r={oldHeader:i,oldPanel:r,newHeader:o?V():s,newPanel:a};t.preventDefault(),n&&!e.collapsible||!1===this._trigger("beforeActivate",t,r)||(e.active=!o&&this.headers.index(s),this.active=n?V():s,this._toggle(r),this._removeClass(i,"ui-accordion-header-active","ui-state-active"),e.icons&&(a=i.children(".ui-accordion-header-icon"),this._removeClass(a,null,e.icons.activeHeader)._addClass(a,null,e.icons.header)),n)||(this._removeClass(s,"ui-accordion-header-collapsed")._addClass(s,"ui-accordion-header-active","ui-state-active"),e.icons&&(t=s.children(".ui-accordion-header-icon"),this._removeClass(t,null,e.icons.header)._addClass(t,null,e.icons.activeHeader)),this._addClass(s.next(),"ui-accordion-content-active"))},_toggle:function(t){var e=t.newPanel,i=this.prevShow.length?this.prevShow:t.oldPanel;this.prevShow.add(this.prevHide).stop(!0,!0),this.prevShow=e,this.prevHide=i,this.options.animate?this._animate(e,i,t):(i.hide(),e.show(),this._toggleComplete(t)),i.attr({"aria-hidden":"true"}),i.prev().attr({"aria-selected":"false","aria-expanded":"false"}),e.length&&i.length?i.prev().attr({tabIndex:-1,"aria-expanded":"false"}):e.length&&this.headers.filter(function(){return 0===parseInt(V(this).attr("tabIndex"),10)}).attr("tabIndex",-1),e.attr("aria-hidden","false").prev().attr({"aria-selected":"true","aria-expanded":"true",tabIndex:0})},_animate:function(t,i,e){function s(){o._toggleComplete(e)}var n,o=this,a=0,r=t.css("box-sizing"),l=t.length&&(!i.length||t.index()<i.index()),h=this.options.animate||{},l=l&&h.down||h,c=(c="string"==typeof l?l:c)||l.easing||h.easing,u=(u="number"==typeof l?l:u)||l.duration||h.duration;return i.length?t.length?(n=t.show().outerHeight(),i.animate(this.hideProps,{duration:u,easing:c,step:function(t,e){e.now=Math.round(t)}}),void t.hide().animate(this.showProps,{duration:u,easing:c,complete:s,step:function(t,e){e.now=Math.round(t),"height"!==e.prop?"content-box"===r&&(a+=e.now):"content"!==o.options.heightStyle&&(e.now=Math.round(n-i.outerHeight()-a),a=0)}})):i.animate(this.hideProps,u,c,s):t.animate(this.showProps,u,c,s)},_toggleComplete:function(t){var e=t.oldPanel,i=e.prev();this._removeClass(e,"ui-accordion-content-active"),this._removeClass(i,"ui-accordion-header-active")._addClass(i,"ui-accordion-header-collapsed"),e.length&&(e.parent()[0].className=e.parent()[0].className),this._trigger("activate",null,t)}}),V.ui.safeActiveElement=function(e){var i;try{i=e.activeElement}catch(t){i=e.body}return i=(i=i||e.body).nodeName?i:e.body},V.widget("ui.menu",{version:"1.13.3",defaultElement:"<ul>",delay:300,options:{icons:{submenu:"ui-icon-caret-1-e"},items:"> *",menus:"ul",position:{my:"left top",at:"right top"},role:"menu",blur:null,focus:null,select:null},_create:function(){this.activeMenu=this.element,this.mouseHandled=!1,this.lastMousePosition={x:null,y:null},this.element.uniqueId().attr({role:this.options.role,tabIndex:0}),this._addClass("ui-menu","ui-widget ui-widget-content"),this._on({"mousedown .ui-menu-item":function(t){t.preventDefault(),this._activateItem(t)},"click .ui-menu-item":function(t){var e=V(t.target),i=V(V.ui.safeActiveElement(this.document[0]));!this.mouseHandled&&e.not(".ui-state-disabled").length&&(this.select(t),t.isPropagationStopped()||(this.mouseHandled=!0),e.has(".ui-menu").length?this.expand(t):!this.element.is(":focus")&&i.closest(".ui-menu").length&&(this.element.trigger("focus",[!0]),this.active)&&1===this.active.parents(".ui-menu").length&&clearTimeout(this.timer))},"mouseenter .ui-menu-item":"_activateItem","mousemove .ui-menu-item":"_activateItem",mouseleave:"collapseAll","mouseleave .ui-menu":"collapseAll",focus:function(t,e){var i=this.active||this._menuItems().first();e||this.focus(t,i)},blur:function(t){this._delay(function(){V.contains(this.element[0],V.ui.safeActiveElement(this.document[0]))||this.collapseAll(t)})},keydown:"_keydown"}),this.refresh(),this._on(this.document,{click:function(t){this._closeOnDocumentClick(t)&&this.collapseAll(t,!0),this.mouseHandled=!1}})},_activateItem:function(t){var e,i;this.previousFilter||t.clientX===this.lastMousePosition.x&&t.clientY===this.lastMousePosition.y||(this.lastMousePosition={x:t.clientX,y:t.clientY},e=V(t.target).closest(".ui-menu-item"),i=V(t.currentTarget),e[0]!==i[0])||i.is(".ui-state-active")||(this._removeClass(i.siblings().children(".ui-state-active"),null,"ui-state-active"),this.focus(t,i))},_destroy:function(){var t=this.element.find(".ui-menu-item").removeAttr("role aria-disabled").children(".ui-menu-item-wrapper").removeUniqueId().removeAttr("tabIndex role aria-haspopup");this.element.removeAttr("aria-activedescendant").find(".ui-menu").addBack().removeAttr("role aria-labelledby aria-expanded aria-hidden aria-disabled tabIndex").removeUniqueId().show(),t.children().each(function(){var t=V(this);t.data("ui-menu-submenu-caret")&&t.remove()})},_keydown:function(t){var e,i,s,n=!0;switch(t.keyCode){case V.ui.keyCode.PAGE_UP:this.previousPage(t);break;case V.ui.keyCode.PAGE_DOWN:this.nextPage(t);break;case V.ui.keyCode.HOME:this._move("first","first",t);break;case V.ui.keyCode.END:this._move("last","last",t);break;case V.ui.keyCode.UP:this.previous(t);break;case V.ui.keyCode.DOWN:this.next(t);break;case V.ui.keyCode.LEFT:this.collapse(t);break;case V.ui.keyCode.RIGHT:this.active&&!this.active.is(".ui-state-disabled")&&this.expand(t);break;case V.ui.keyCode.ENTER:case V.ui.keyCode.SPACE:this._activate(t);break;case V.ui.keyCode.ESCAPE:this.collapse(t);break;default:e=this.previousFilter||"",s=n=!1,i=96<=t.keyCode&&t.keyCode<=105?(t.keyCode-96).toString():String.fromCharCode(t.keyCode),clearTimeout(this.filterTimer),i===e?s=!0:i=e+i,e=this._filterMenuItems(i),(e=s&&-1!==e.index(this.active.next())?this.active.nextAll(".ui-menu-item"):e).length||(i=String.fromCharCode(t.keyCode),e=this._filterMenuItems(i)),e.length?(this.focus(t,e),this.previousFilter=i,this.filterTimer=this._delay(function(){delete this.previousFilter},1e3)):delete this.previousFilter}n&&t.preventDefault()},_activate:function(t){this.active&&!this.active.is(".ui-state-disabled")&&(this.active.children("[aria-haspopup='true']").length?this.expand(t):this.select(t))},refresh:function(){var t,e,s=this,n=this.options.icons.submenu,i=this.element.find(this.options.menus);this._toggleClass("ui-menu-icons",null,!!this.element.find(".ui-icon").length),t=i.filter(":not(.ui-menu)").hide().attr({role:this.options.role,"aria-hidden":"true","aria-expanded":"false"}).each(function(){var t=V(this),e=t.prev(),i=V("<span>").data("ui-menu-submenu-caret",!0);s._addClass(i,"ui-menu-icon","ui-icon "+n),e.attr("aria-haspopup","true").prepend(i),t.attr("aria-labelledby",e.attr("id"))}),this._addClass(t,"ui-menu","ui-widget ui-widget-content ui-front"),(t=i.add(this.element).find(this.options.items)).not(".ui-menu-item").each(function(){var t=V(this);s._isDivider(t)&&s._addClass(t,"ui-menu-divider","ui-widget-content")}),e=(i=t.not(".ui-menu-item, .ui-menu-divider")).children().not(".ui-menu").uniqueId().attr({tabIndex:-1,role:this._itemRole()}),this._addClass(i,"ui-menu-item")._addClass(e,"ui-menu-item-wrapper"),t.filter(".ui-state-disabled").attr("aria-disabled","true"),this.active&&!V.contains(this.element[0],this.active[0])&&this.blur()},_itemRole:function(){return{menu:"menuitem",listbox:"option"}[this.options.role]},_setOption:function(t,e){var i;"icons"===t&&(i=this.element.find(".ui-menu-icon"),this._removeClass(i,null,this.options.icons.submenu)._addClass(i,null,e.submenu)),this._super(t,e)},_setOptionDisabled:function(t){this._super(t),this.element.attr("aria-disabled",String(t)),this._toggleClass(null,"ui-state-disabled",!!t)},focus:function(t,e){var i;this.blur(t,t&&"focus"===t.type),this._scrollIntoView(e),this.active=e.first(),i=this.active.children(".ui-menu-item-wrapper"),this._addClass(i,null,"ui-state-active"),this.options.role&&this.element.attr("aria-activedescendant",i.attr("id")),i=this.active.parent().closest(".ui-menu-item").children(".ui-menu-item-wrapper"),this._addClass(i,null,"ui-state-active"),t&&"keydown"===t.type?this._close():this.timer=this._delay(function(){this._close()},this.delay),(i=e.children(".ui-menu")).length&&t&&/^mouse/.test(t.type)&&this._startOpening(i),this.activeMenu=e.parent(),this._trigger("focus",t,{item:e})},_scrollIntoView:function(t){var e,i,s;this._hasScroll()&&(e=parseFloat(V.css(this.activeMenu[0],"borderTopWidth"))||0,i=parseFloat(V.css(this.activeMenu[0],"paddingTop"))||0,e=t.offset().top-this.activeMenu.offset().top-e-i,i=this.activeMenu.scrollTop(),s=this.activeMenu.height(),t=t.outerHeight(),e<0?this.activeMenu.scrollTop(i+e):s<e+t&&this.activeMenu.scrollTop(i+e-s+t))},blur:function(t,e){e||clearTimeout(this.timer),this.active&&(this._removeClass(this.active.children(".ui-menu-item-wrapper"),null,"ui-state-active"),this._trigger("blur",t,{item:this.active}),this.active=null)},_startOpening:function(t){clearTimeout(this.timer),"true"===t.attr("aria-hidden")&&(this.timer=this._delay(function(){this._close(),this._open(t)},this.delay))},_open:function(t){var e=V.extend({of:this.active},this.options.position);clearTimeout(this.timer),this.element.find(".ui-menu").not(t.parents(".ui-menu")).hide().attr("aria-hidden","true"),t.show().removeAttr("aria-hidden").attr("aria-expanded","true").position(e)},collapseAll:function(e,i){clearTimeout(this.timer),this.timer=this._delay(function(){var t=i?this.element:V(e&&e.target).closest(this.element.find(".ui-menu"));t.length||(t=this.element),this._close(t),this.blur(e),this._removeClass(t.find(".ui-state-active"),null,"ui-state-active"),this.activeMenu=t},i?0:this.delay)},_close:function(t){(t=t||(this.active?this.active.parent():this.element)).find(".ui-menu").hide().attr("aria-hidden","true").attr("aria-expanded","false")},_closeOnDocumentClick:function(t){return!V(t.target).closest(".ui-menu").length},_isDivider:function(t){return!/[^\-\u2014\u2013\s]/.test(t.text())},collapse:function(t){var e=this.active&&this.active.parent().closest(".ui-menu-item",this.element);e&&e.length&&(this._close(),this.focus(t,e))},expand:function(t){var e=this.active&&this._menuItems(this.active.children(".ui-menu")).first();e&&e.length&&(this._open(e.parent()),this._delay(function(){this.focus(t,e)}))},next:function(t){this._move("next","first",t)},previous:function(t){this._move("prev","last",t)},isFirstItem:function(){return this.active&&!this.active.prevAll(".ui-menu-item").length},isLastItem:function(){return this.active&&!this.active.nextAll(".ui-menu-item").length},_menuItems:function(t){return(t||this.element).find(this.options.items).filter(".ui-menu-item")},_move:function(t,e,i){var s;(s=this.active?"first"===t||"last"===t?this.active["first"===t?"prevAll":"nextAll"](".ui-menu-item").last():this.active[t+"All"](".ui-menu-item").first():s)&&s.length&&this.active||(s=this._menuItems(this.activeMenu)[e]()),this.focus(i,s)},nextPage:function(t){var e,i,s;this.active?this.isLastItem()||(this._hasScroll()?(i=this.active.offset().top,s=this.element.innerHeight(),0===V.fn.jquery.indexOf("3.2.")&&(s+=this.element[0].offsetHeight-this.element.outerHeight()),this.active.nextAll(".ui-menu-item").each(function(){return(e=V(this)).offset().top-i-s<0}),this.focus(t,e)):this.focus(t,this._menuItems(this.activeMenu)[this.active?"last":"first"]())):this.next(t)},previousPage:function(t){var e,i,s;this.active?this.isFirstItem()||(this._hasScroll()?(i=this.active.offset().top,s=this.element.innerHeight(),0===V.fn.jquery.indexOf("3.2.")&&(s+=this.element[0].offsetHeight-this.element.outerHeight()),this.active.prevAll(".ui-menu-item").each(function(){return 0<(e=V(this)).offset().top-i+s}),this.focus(t,e)):this.focus(t,this._menuItems(this.activeMenu).first())):this.next(t)},_hasScroll:function(){return this.element.outerHeight()<this.element.prop("scrollHeight")},select:function(t){this.active=this.active||V(t.target).closest(".ui-menu-item");var e={item:this.active};this.active.has(".ui-menu").length||this.collapseAll(t,!0),this._trigger("select",t,e)},_filterMenuItems:function(t){var t=t.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g,"\\$&"),e=new RegExp("^"+t,"i");return this.activeMenu.find(this.options.items).filter(".ui-menu-item").filter(function(){return e.test(String.prototype.trim.call(V(this).children(".ui-menu-item-wrapper").text()))})}}),V.widget("ui.autocomplete",{version:"1.13.3",defaultElement:"<input>",options:{appendTo:null,autoFocus:!1,delay:300,minLength:1,position:{my:"left top",at:"left bottom",collision:"none"},source:null,change:null,close:null,focus:null,open:null,response:null,search:null,select:null},requestIndex:0,pending:0,liveRegionTimer:null,_create:function(){var i,s,n,t=this.element[0].nodeName.toLowerCase(),e="textarea"===t,t="input"===t;this.isMultiLine=e||!t&&this._isContentEditable(this.element),this.valueMethod=this.element[e||t?"val":"text"],this.isNewMenu=!0,this._addClass("ui-autocomplete-input"),this.element.attr("autocomplete","off"),this._on(this.element,{keydown:function(t){if(this.element.prop("readOnly"))s=n=i=!0;else{s=n=i=!1;var e=V.ui.keyCode;switch(t.keyCode){case e.PAGE_UP:i=!0,this._move("previousPage",t);break;case e.PAGE_DOWN:i=!0,this._move("nextPage",t);break;case e.UP:i=!0,this._keyEvent("previous",t);break;case e.DOWN:i=!0,this._keyEvent("next",t);break;case e.ENTER:this.menu.active&&(i=!0,t.preventDefault(),this.menu.select(t));break;case e.TAB:this.menu.active&&this.menu.select(t);break;case e.ESCAPE:this.menu.element.is(":visible")&&(this.isMultiLine||this._value(this.term),this.close(t),t.preventDefault());break;default:s=!0,this._searchTimeout(t)}}},keypress:function(t){if(i)i=!1,this.isMultiLine&&!this.menu.element.is(":visible")||t.preventDefault();else if(!s){var e=V.ui.keyCode;switch(t.keyCode){case e.PAGE_UP:this._move("previousPage",t);break;case e.PAGE_DOWN:this._move("nextPage",t);break;case e.UP:this._keyEvent("previous",t);break;case e.DOWN:this._keyEvent("next",t)}}},input:function(t){n?(n=!1,t.preventDefault()):this._searchTimeout(t)},focus:function(){this.selectedItem=null,this.previous=this._value()},blur:function(t){clearTimeout(this.searching),this.close(t),this._change(t)}}),this._initSource(),this.menu=V("<ul>").appendTo(this._appendTo()).menu({role:null}).hide().attr({unselectable:"on"}).menu("instance"),this._addClass(this.menu.element,"ui-autocomplete","ui-front"),this._on(this.menu.element,{mousedown:function(t){t.preventDefault()},menufocus:function(t,e){var i,s;this.isNewMenu&&(this.isNewMenu=!1,t.originalEvent)&&/^mouse/.test(t.originalEvent.type)?(this.menu.blur(),this.document.one("mousemove",function(){V(t.target).trigger(t.originalEvent)})):(s=e.item.data("ui-autocomplete-item"),!1!==this._trigger("focus",t,{item:s})&&t.originalEvent&&/^key/.test(t.originalEvent.type)&&this._value(s.value),(i=e.item.attr("aria-label")||s.value)&&String.prototype.trim.call(i).length&&(clearTimeout(this.liveRegionTimer),this.liveRegionTimer=this._delay(function(){this.liveRegion.html(V("<div>").text(i))},100)))},menuselect:function(t,e){var i=e.item.data("ui-autocomplete-item"),s=this.previous;this.element[0]!==V.ui.safeActiveElement(this.document[0])&&(this.element.trigger("focus"),this.previous=s,this._delay(function(){this.previous=s,this.selectedItem=i})),!1!==this._trigger("select",t,{item:i})&&this._value(i.value),this.term=this._value(),this.close(t),this.selectedItem=i}}),this.liveRegion=V("<div>",{role:"status","aria-live":"assertive","aria-relevant":"additions"}).appendTo(this.document[0].body),this._addClass(this.liveRegion,null,"ui-helper-hidden-accessible"),this._on(this.window,{beforeunload:function(){this.element.removeAttr("autocomplete")}})},_destroy:function(){clearTimeout(this.searching),this.element.removeAttr("autocomplete"),this.menu.element.remove(),this.liveRegion.remove()},_setOption:function(t,e){this._super(t,e),"source"===t&&this._initSource(),"appendTo"===t&&this.menu.element.appendTo(this._appendTo()),"disabled"===t&&e&&this.xhr&&this.xhr.abort()},_isEventTargetInWidget:function(t){var e=this.menu.element[0];return t.target===this.element[0]||t.target===e||V.contains(e,t.target)},_closeOnClickOutside:function(t){this._isEventTargetInWidget(t)||this.close()},_appendTo:function(){var t=this.options.appendTo;return t=(t=(t=t&&(t.jquery||t.nodeType?V(t):this.document.find(t).eq(0)))&&t[0]?t:this.element.closest(".ui-front, dialog")).length?t:this.document[0].body},_initSource:function(){var i,s,n=this;Array.isArray(this.options.source)?(i=this.options.source,this.source=function(t,e){e(V.ui.autocomplete.filter(i,t.term))}):"string"==typeof this.options.source?(s=this.options.source,this.source=function(t,e){n.xhr&&n.xhr.abort(),n.xhr=V.ajax({url:s,data:t,dataType:"json",success:function(t){e(t)},error:function(){e([])}})}):this.source=this.options.source},_searchTimeout:function(s){clearTimeout(this.searching),this.searching=this._delay(function(){var t=this.term===this._value(),e=this.menu.element.is(":visible"),i=s.altKey||s.ctrlKey||s.metaKey||s.shiftKey;t&&(e||i)||(this.selectedItem=null,this.search(null,s))},this.options.delay)},search:function(t,e){return t=null!=t?t:this._value(),this.term=this._value(),t.length<this.options.minLength?this.close(e):!1!==this._trigger("search",e)?this._search(t):void 0},_search:function(t){this.pending++,this._addClass("ui-autocomplete-loading"),this.cancelSearch=!1,this.source({term:t},this._response())},_response:function(){var e=++this.requestIndex;return function(t){e===this.requestIndex&&this.__response(t),this.pending--,this.pending||this._removeClass("ui-autocomplete-loading")}.bind(this)},__response:function(t){t=t&&this._normalize(t),this._trigger("response",null,{content:t}),!this.options.disabled&&t&&t.length&&!this.cancelSearch?(this._suggest(t),this._trigger("open")):this._close()},close:function(t){this.cancelSearch=!0,this._close(t)},_close:function(t){this._off(this.document,"mousedown"),this.menu.element.is(":visible")&&(this.menu.element.hide(),this.menu.blur(),this.isNewMenu=!0,this._trigger("close",t))},_change:function(t){this.previous!==this._value()&&this._trigger("change",t,{item:this.selectedItem})},_normalize:function(t){return t.length&&t[0].label&&t[0].value?t:V.map(t,function(t){return"string"==typeof t?{label:t,value:t}:V.extend({},t,{label:t.label||t.value,value:t.value||t.label})})},_suggest:function(t){var e=this.menu.element.empty();this._renderMenu(e,t),this.isNewMenu=!0,this.menu.refresh(),e.show(),this._resizeMenu(),e.position(V.extend({of:this.element},this.options.position)),this.options.autoFocus&&this.menu.next(),this._on(this.document,{mousedown:"_closeOnClickOutside"})},_resizeMenu:function(){var t=this.menu.element;t.outerWidth(Math.max(t.width("").outerWidth()+1,this.element.outerWidth()))},_renderMenu:function(i,t){var s=this;V.each(t,function(t,e){s._renderItemData(i,e)})},_renderItemData:function(t,e){return this._renderItem(t,e).data("ui-autocomplete-item",e)},_renderItem:function(t,e){return V("<li>").append(V("<div>").text(e.label)).appendTo(t)},_move:function(t,e){this.menu.element.is(":visible")?this.menu.isFirstItem()&&/^previous/.test(t)||this.menu.isLastItem()&&/^next/.test(t)?(this.isMultiLine||this._value(this.term),this.menu.blur()):this.menu[t](e):this.search(null,e)},widget:function(){return this.menu.element},_value:function(){return this.valueMethod.apply(this.element,arguments)},_keyEvent:function(t,e){this.isMultiLine&&!this.menu.element.is(":visible")||(this._move(t,e),e.preventDefault())},_isContentEditable:function(t){var e;return!!t.length&&("inherit"===(e=t.prop("contentEditable"))?this._isContentEditable(t.parent()):"true"===e)}}),V.extend(V.ui.autocomplete,{escapeRegex:function(t){return t.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g,"\\$&")},filter:function(t,e){var i=new RegExp(V.ui.autocomplete.escapeRegex(e),"i");return V.grep(t,function(t){return i.test(t.label||t.value||t)})}}),V.widget("ui.autocomplete",V.ui.autocomplete,{options:{messages:{noResults:"No search results.",results:function(t){return t+(1<t?" results are":" result is")+" available, use up and down arrow keys to navigate."}}},__response:function(t){var e;this._superApply(arguments),this.options.disabled||this.cancelSearch||(e=t&&t.length?this.options.messages.results(t.length):this.options.messages.noResults,clearTimeout(this.liveRegionTimer),this.liveRegionTimer=this._delay(function(){this.liveRegion.html(V("<div>").text(e))},100))}}),V.ui.autocomplete;var it,st,nt,ot,S,at=/ui-corner-([a-z]){2,6}/g;V.widget("ui.controlgroup",{version:"1.13.3",defaultElement:"<div>",options:{direction:"horizontal",disabled:null,onlyVisible:!0,items:{button:"input[type=button], input[type=submit], input[type=reset], button, a",controlgroupLabel:".ui-controlgroup-label",checkboxradio:"input[type='checkbox'], input[type='radio']",selectmenu:"select",spinner:".ui-spinner-input"}},_create:function(){this._enhance()},_enhance:function(){this.element.attr("role","toolbar"),this.refresh()},_destroy:function(){this._callChildMethod("destroy"),this.childWidgets.removeData("ui-controlgroup-data"),this.element.removeAttr("role"),this.options.items.controlgroupLabel&&this.element.find(this.options.items.controlgroupLabel).find(".ui-controlgroup-label-contents").contents().unwrap()},_initWidgets:function(){var o=this,a=[];V.each(this.options.items,function(s,t){var e,n={};t&&("controlgroupLabel"===s?((e=o.element.find(t)).each(function(){var t=V(this);t.children(".ui-controlgroup-label-contents").length||t.contents().wrapAll("<span class='ui-controlgroup-label-contents'></span>")}),o._addClass(e,null,"ui-widget ui-widget-content ui-state-default"),a=a.concat(e.get())):V.fn[s]&&(n=o["_"+s+"Options"]?o["_"+s+"Options"]("middle"):{classes:{}},o.element.find(t).each(function(){var t=V(this),e=t[s]("instance"),i=V.widget.extend({},n);"button"===s&&t.parent(".ui-spinner").length||((e=e||t[s]()[s]("instance"))&&(i.classes=o._resolveClassesValues(i.classes,e)),t[s](i),i=t[s]("widget"),V.data(i[0],"ui-controlgroup-data",e||t[s]("instance")),a.push(i[0]))})))}),this.childWidgets=V(V.uniqueSort(a)),this._addClass(this.childWidgets,"ui-controlgroup-item")},_callChildMethod:function(e){this.childWidgets.each(function(){var t=V(this).data("ui-controlgroup-data");t&&t[e]&&t[e]()})},_updateCornerClass:function(t,e){e=this._buildSimpleOptions(e,"label").classes.label;this._removeClass(t,null,"ui-corner-top ui-corner-bottom ui-corner-left ui-corner-right ui-corner-all"),this._addClass(t,null,e)},_buildSimpleOptions:function(t,e){var i="vertical"===this.options.direction,s={classes:{}};return s.classes[e]={middle:"",first:"ui-corner-"+(i?"top":"left"),last:"ui-corner-"+(i?"bottom":"right"),only:"ui-corner-all"}[t],s},_spinnerOptions:function(t){t=this._buildSimpleOptions(t,"ui-spinner");return t.classes["ui-spinner-up"]="",t.classes["ui-spinner-down"]="",t},_buttonOptions:function(t){return this._buildSimpleOptions(t,"ui-button")},_checkboxradioOptions:function(t){return this._buildSimpleOptions(t,"ui-checkboxradio-label")},_selectmenuOptions:function(t){var e="vertical"===this.options.direction;return{width:e&&"auto",classes:{middle:{"ui-selectmenu-button-open":"","ui-selectmenu-button-closed":""},first:{"ui-selectmenu-button-open":"ui-corner-"+(e?"top":"tl"),"ui-selectmenu-button-closed":"ui-corner-"+(e?"top":"left")},last:{"ui-selectmenu-button-open":e?"":"ui-corner-tr","ui-selectmenu-button-closed":"ui-corner-"+(e?"bottom":"right")},only:{"ui-selectmenu-button-open":"ui-corner-top","ui-selectmenu-button-closed":"ui-corner-all"}}[t]}},_resolveClassesValues:function(i,s){var n={};return V.each(i,function(t){var e=s.options.classes[t]||"",e=String.prototype.trim.call(e.replace(at,""));n[t]=(e+" "+i[t]).replace(/\s+/g," ")}),n},_setOption:function(t,e){"direction"===t&&this._removeClass("ui-controlgroup-"+this.options.direction),this._super(t,e),"disabled"===t?this._callChildMethod(e?"disable":"enable"):this.refresh()},refresh:function(){var n,o=this;this._addClass("ui-controlgroup ui-controlgroup-"+this.options.direction),"horizontal"===this.options.direction&&this._addClass(null,"ui-helper-clearfix"),this._initWidgets(),n=this.childWidgets,(n=this.options.onlyVisible?n.filter(":visible"):n).length&&(V.each(["first","last"],function(t,e){var i,s=n[e]().data("ui-controlgroup-data");s&&o["_"+s.widgetName+"Options"]?((i=o["_"+s.widgetName+"Options"](1===n.length?"only":e)).classes=o._resolveClassesValues(i.classes,s),s.element[s.widgetName](i)):o._updateCornerClass(n[e](),e)}),this._callChildMethod("refresh"))}}),V.widget("ui.checkboxradio",[V.ui.formResetMixin,{version:"1.13.3",options:{disabled:null,label:null,icon:!0,classes:{"ui-checkboxradio-label":"ui-corner-all","ui-checkboxradio-icon":"ui-corner-all"}},_getCreateOptions:function(){var t,e=this._super()||{};return this._readType(),t=this.element.labels(),this.label=V(t[t.length-1]),this.label.length||V.error("No label found for checkboxradio widget"),this.originalLabel="",(t=this.label.contents().not(this.element[0])).length&&(this.originalLabel+=t.clone().wrapAll("<div></div>").parent().html()),this.originalLabel&&(e.label=this.originalLabel),null!=(t=this.element[0].disabled)&&(e.disabled=t),e},_create:function(){var t=this.element[0].checked;this._bindFormResetHandler(),null==this.options.disabled&&(this.options.disabled=this.element[0].disabled),this._setOption("disabled",this.options.disabled),this._addClass("ui-checkboxradio","ui-helper-hidden-accessible"),this._addClass(this.label,"ui-checkboxradio-label","ui-button ui-widget"),"radio"===this.type&&this._addClass(this.label,"ui-checkboxradio-radio-label"),this.options.label&&this.options.label!==this.originalLabel?this._updateLabel():this.originalLabel&&(this.options.label=this.originalLabel),this._enhance(),t&&this._addClass(this.label,"ui-checkboxradio-checked","ui-state-active"),this._on({change:"_toggleClasses",focus:function(){this._addClass(this.label,null,"ui-state-focus ui-visual-focus")},blur:function(){this._removeClass(this.label,null,"ui-state-focus ui-visual-focus")}})},_readType:function(){var t=this.element[0].nodeName.toLowerCase();this.type=this.element[0].type,"input"===t&&/radio|checkbox/.test(this.type)||V.error("Can't create checkboxradio on element.nodeName="+t+" and element.type="+this.type)},_enhance:function(){this._updateIcon(this.element[0].checked)},widget:function(){return this.label},_getRadioGroup:function(){var t=this.element[0].name,e="input[name='"+V.escapeSelector(t)+"']";return t?(this.form.length?V(this.form[0].elements).filter(e):V(e).filter(function(){return 0===V(this)._form().length})).not(this.element):V([])},_toggleClasses:function(){var t=this.element[0].checked;this._toggleClass(this.label,"ui-checkboxradio-checked","ui-state-active",t),this.options.icon&&"checkbox"===this.type&&this._toggleClass(this.icon,null,"ui-icon-check ui-state-checked",t)._toggleClass(this.icon,null,"ui-icon-blank",!t),"radio"===this.type&&this._getRadioGroup().each(function(){var t=V(this).checkboxradio("instance");t&&t._removeClass(t.label,"ui-checkboxradio-checked","ui-state-active")})},_destroy:function(){this._unbindFormResetHandler(),this.icon&&(this.icon.remove(),this.iconSpace.remove())},_setOption:function(t,e){"label"===t&&!e||(this._super(t,e),"disabled"===t?(this._toggleClass(this.label,null,"ui-state-disabled",e),this.element[0].disabled=e):this.refresh())},_updateIcon:function(t){var e="ui-icon ui-icon-background ";this.options.icon?(this.icon||(this.icon=V("<span>"),this.iconSpace=V("<span> </span>"),this._addClass(this.iconSpace,"ui-checkboxradio-icon-space")),"checkbox"===this.type?(e+=t?"ui-icon-check ui-state-checked":"ui-icon-blank",this._removeClass(this.icon,null,t?"ui-icon-blank":"ui-icon-check")):e+="ui-icon-blank",this._addClass(this.icon,"ui-checkboxradio-icon",e),t||this._removeClass(this.icon,null,"ui-icon-check ui-state-checked"),this.icon.prependTo(this.label).after(this.iconSpace)):void 0!==this.icon&&(this.icon.remove(),this.iconSpace.remove(),delete this.icon)},_updateLabel:function(){var t=this.label.contents().not(this.element[0]);this.icon&&(t=t.not(this.icon[0])),(t=this.iconSpace?t.not(this.iconSpace[0]):t).remove(),this.label.append(this.options.label)},refresh:function(){var t=this.element[0].checked,e=this.element[0].disabled;this._updateIcon(t),this._toggleClass(this.label,"ui-checkboxradio-checked","ui-state-active",t),null!==this.options.label&&this._updateLabel(),e!==this.options.disabled&&this._setOptions({disabled:e})}}]),V.ui.checkboxradio,V.widget("ui.button",{version:"1.13.3",defaultElement:"<button>",options:{classes:{"ui-button":"ui-corner-all"},disabled:null,icon:null,iconPosition:"beginning",label:null,showLabel:!0},_getCreateOptions:function(){var t,e=this._super()||{};return this.isInput=this.element.is("input"),null!=(t=this.element[0].disabled)&&(e.disabled=t),this.originalLabel=this.isInput?this.element.val():this.element.html(),this.originalLabel&&(e.label=this.originalLabel),e},_create:function(){!this.option.showLabel&!this.options.icon&&(this.options.showLabel=!0),null==this.options.disabled&&(this.options.disabled=this.element[0].disabled||!1),this.hasTitle=!!this.element.attr("title"),this.options.label&&this.options.label!==this.originalLabel&&(this.isInput?this.element.val(this.options.label):this.element.html(this.options.label)),this._addClass("ui-button","ui-widget"),this._setOption("disabled",this.options.disabled),this._enhance(),this.element.is("a")&&this._on({keyup:function(t){t.keyCode===V.ui.keyCode.SPACE&&(t.preventDefault(),this.element[0].click?this.element[0].click():this.element.trigger("click"))}})},_enhance:function(){this.element.is("button")||this.element.attr("role","button"),this.options.icon&&(this._updateIcon("icon",this.options.icon),this._updateTooltip())},_updateTooltip:function(){this.title=this.element.attr("title"),this.options.showLabel||this.title||this.element.attr("title",this.options.label)},_updateIcon:function(t,e){var t="iconPosition"!==t,i=t?this.options.iconPosition:e,s="top"===i||"bottom"===i;this.icon?t&&this._removeClass(this.icon,null,this.options.icon):(this.icon=V("<span>"),this._addClass(this.icon,"ui-button-icon","ui-icon"),this.options.showLabel||this._addClass("ui-button-icon-only")),t&&this._addClass(this.icon,null,e),this._attachIcon(i),s?(this._addClass(this.icon,null,"ui-widget-icon-block"),this.iconSpace&&this.iconSpace.remove()):(this.iconSpace||(this.iconSpace=V("<span> </span>"),this._addClass(this.iconSpace,"ui-button-icon-space")),this._removeClass(this.icon,null,"ui-wiget-icon-block"),this._attachIconSpace(i))},_destroy:function(){this.element.removeAttr("role"),this.icon&&this.icon.remove(),this.iconSpace&&this.iconSpace.remove(),this.hasTitle||this.element.removeAttr("title")},_attachIconSpace:function(t){this.icon[/^(?:end|bottom)/.test(t)?"before":"after"](this.iconSpace)},_attachIcon:function(t){this.element[/^(?:end|bottom)/.test(t)?"append":"prepend"](this.icon)},_setOptions:function(t){var e=(void 0===t.showLabel?this.options:t).showLabel,i=(void 0===t.icon?this.options:t).icon;e||i||(t.showLabel=!0),this._super(t)},_setOption:function(t,e){"icon"===t&&(e?this._updateIcon(t,e):this.icon&&(this.icon.remove(),this.iconSpace)&&this.iconSpace.remove()),"iconPosition"===t&&this._updateIcon(t,e),"showLabel"===t&&(this._toggleClass("ui-button-icon-only",null,!e),this._updateTooltip()),"label"===t&&(this.isInput?this.element.val(e):(this.element.html(e),this.icon&&(this._attachIcon(this.options.iconPosition),this._attachIconSpace(this.options.iconPosition)))),this._super(t,e),"disabled"===t&&(this._toggleClass(null,"ui-state-disabled",e),this.element[0].disabled=e)&&this.element.trigger("blur")},refresh:function(){var t=this.element.is("input, button")?this.element[0].disabled:this.element.hasClass("ui-button-disabled");t!==this.options.disabled&&this._setOptions({disabled:t}),this._updateTooltip()}}),!1!==V.uiBackCompat&&(V.widget("ui.button",V.ui.button,{options:{text:!0,icons:{primary:null,secondary:null}},_create:function(){this.options.showLabel&&!this.options.text&&(this.options.showLabel=this.options.text),!this.options.showLabel&&this.options.text&&(this.options.text=this.options.showLabel),this.options.icon||!this.options.icons.primary&&!this.options.icons.secondary?this.options.icon&&(this.options.icons.primary=this.options.icon):this.options.icons.primary?this.options.icon=this.options.icons.primary:(this.options.icon=this.options.icons.secondary,this.options.iconPosition="end"),this._super()},_setOption:function(t,e){"text"===t?this._super("showLabel",e):("showLabel"===t&&(this.options.text=e),"icon"===t&&(this.options.icons.primary=e),"icons"===t&&(e.primary?(this._super("icon",e.primary),this._super("iconPosition","beginning")):e.secondary&&(this._super("icon",e.secondary),this._super("iconPosition","end"))),this._superApply(arguments))}}),V.fn.button=(ot=V.fn.button,function(i){var t="string"==typeof i,s=Array.prototype.slice.call(arguments,1),n=this;return t?this.length||"instance"!==i?this.each(function(){var t,e=V(this).attr("type"),e=V.data(this,"ui-"+("checkbox"!==e&&"radio"!==e?"button":"checkboxradio"));return"instance"===i?(n=e,!1):e?"function"!=typeof e[i]||"_"===i.charAt(0)?V.error("no such method '"+i+"' for button widget instance"):(t=e[i].apply(e,s))!==e&&void 0!==t?(n=t&&t.jquery?n.pushStack(t.get()):t,!1):void 0:V.error("cannot call methods on button prior to initialization; attempted to call method '"+i+"'")}):n=void 0:(s.length&&(i=V.widget.extend.apply(null,[i].concat(s))),this.each(function(){var t=V(this).attr("type"),t="checkbox"!==t&&"radio"!==t?"button":"checkboxradio",e=V.data(this,"ui-"+t);e?(e.option(i||{}),e._init&&e._init()):"button"==t?ot.call(V(this),i):V(this).checkboxradio(V.extend({icon:!1},i))})),n}),V.fn.buttonset=function(){return V.ui.controlgroup||V.error("Controlgroup widget missing"),"option"===arguments[0]&&"items"===arguments[1]&&arguments[2]?this.controlgroup.apply(this,[arguments[0],"items.button",arguments[2]]):"option"===arguments[0]&&"items"===arguments[1]?this.controlgroup.apply(this,[arguments[0],"items.button"]):("object"==typeof arguments[0]&&arguments[0].items&&(arguments[0].items={button:arguments[0].items}),this.controlgroup.apply(this,arguments))}),V.ui.button;function rt(){this._curInst=null,this._keyEvent=!1,this._disabledInputs=[],this._datepickerShowing=!1,this._inDialog=!1,this._mainDivId="ui-datepicker-div",this._inlineClass="ui-datepicker-inline",this._appendClass="ui-datepicker-append",this._triggerClass="ui-datepicker-trigger",this._dialogClass="ui-datepicker-dialog",this._disableClass="ui-datepicker-disabled",this._unselectableClass="ui-datepicker-unselectable",this._currentClass="ui-datepicker-current-day",this._dayOverClass="ui-datepicker-days-cell-over",this.regional=[],this.regional[""]={closeText:"Done",prevText:"Prev",nextText:"Next",currentText:"Today",monthNames:["January","February","March","April","May","June","July","August","September","October","November","December"],monthNamesShort:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],dayNames:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],dayNamesShort:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],dayNamesMin:["Su","Mo","Tu","We","Th","Fr","Sa"],weekHeader:"Wk",dateFormat:"mm/dd/yy",firstDay:0,isRTL:!1,showMonthAfterYear:!1,yearSuffix:"",selectMonthLabel:"Select month",selectYearLabel:"Select year"},this._defaults={showOn:"focus",showAnim:"fadeIn",showOptions:{},defaultDate:null,appendText:"",buttonText:"...",buttonImage:"",buttonImageOnly:!1,hideIfNoPrevNext:!1,navigationAsDateFormat:!1,gotoCurrent:!1,changeMonth:!1,changeYear:!1,yearRange:"c-10:c+10",showOtherMonths:!1,selectOtherMonths:!1,showWeek:!1,calculateWeek:this.iso8601Week,shortYearCutoff:"+10",minDate:null,maxDate:null,duration:"fast",beforeShowDay:null,beforeShow:null,onSelect:null,onChangeMonthYear:null,onClose:null,onUpdateDatepicker:null,numberOfMonths:1,showCurrentAtPos:0,stepMonths:1,stepBigMonths:12,altField:"",altFormat:"",constrainInput:!0,showButtonPanel:!1,autoSize:!1,disabled:!1},V.extend(this._defaults,this.regional[""]),this.regional.en=V.extend(!0,{},this.regional[""]),this.regional["en-US"]=V.extend(!0,{},this.regional.en),this.dpDiv=lt(V("<div id='"+this._mainDivId+"' class='ui-datepicker ui-widget ui-widget-content ui-helper-clearfix ui-corner-all'></div>"))}function lt(t){var e="button, .ui-datepicker-prev, .ui-datepicker-next, .ui-datepicker-calendar td a";return t.on("mouseout",e,function(){V(this).removeClass("ui-state-hover"),-1!==this.className.indexOf("ui-datepicker-prev")&&V(this).removeClass("ui-datepicker-prev-hover"),-1!==this.className.indexOf("ui-datepicker-next")&&V(this).removeClass("ui-datepicker-next-hover")}).on("mouseover",e,ht)}function ht(){V.datepicker._isDisabledDatepicker((S.inline?S.dpDiv.parent():S.input)[0])||(V(this).parents(".ui-datepicker-calendar").find("a").removeClass("ui-state-hover"),V(this).addClass("ui-state-hover"),-1!==this.className.indexOf("ui-datepicker-prev")&&V(this).addClass("ui-datepicker-prev-hover"),-1!==this.className.indexOf("ui-datepicker-next")&&V(this).addClass("ui-datepicker-next-hover"))}function H(t,e){for(var i in V.extend(t,e),e)null==e[i]&&(t[i]=e[i])}V.extend(V.ui,{datepicker:{version:"1.13.3"}}),V.extend(rt.prototype,{markerClassName:"hasDatepicker",maxRows:4,_widgetDatepicker:function(){return this.dpDiv},setDefaults:function(t){return H(this._defaults,t||{}),this},_attachDatepicker:function(t,e){var i,s=t.nodeName.toLowerCase(),n="div"===s||"span"===s;t.id||(this.uuid+=1,t.id="dp"+this.uuid),(i=this._newInst(V(t),n)).settings=V.extend({},e||{}),"input"===s?this._connectDatepicker(t,i):n&&this._inlineDatepicker(t,i)},_newInst:function(t,e){return{id:t[0].id.replace(/([^A-Za-z0-9_\-])/g,"\\\\$1"),input:t,selectedDay:0,selectedMonth:0,selectedYear:0,drawMonth:0,drawYear:0,inline:e,dpDiv:e?lt(V("<div class='"+this._inlineClass+" ui-datepicker ui-widget ui-widget-content ui-helper-clearfix ui-corner-all'></div>")):this.dpDiv}},_connectDatepicker:function(t,e){var i=V(t);e.append=V([]),e.trigger=V([]),i.hasClass(this.markerClassName)||(this._attachments(i,e),i.addClass(this.markerClassName).on("keydown",this._doKeyDown).on("keypress",this._doKeyPress).on("keyup",this._doKeyUp),this._autoSize(e),V.data(t,"datepicker",e),e.settings.disabled&&this._disableDatepicker(t))},_attachments:function(t,e){var i,s=this._get(e,"appendText"),n=this._get(e,"isRTL");e.append&&e.append.remove(),s&&(e.append=V("<span>").addClass(this._appendClass).text(s),t[n?"before":"after"](e.append)),t.off("focus",this._showDatepicker),e.trigger&&e.trigger.remove(),"focus"!==(s=this._get(e,"showOn"))&&"both"!==s||t.on("focus",this._showDatepicker),"button"!==s&&"both"!==s||(s=this._get(e,"buttonText"),i=this._get(e,"buttonImage"),this._get(e,"buttonImageOnly")?e.trigger=V("<img>").addClass(this._triggerClass).attr({src:i,alt:s,title:s}):(e.trigger=V("<button type='button'>").addClass(this._triggerClass),i?e.trigger.html(V("<img>").attr({src:i,alt:s,title:s})):e.trigger.text(s)),t[n?"before":"after"](e.trigger),e.trigger.on("click",function(){return V.datepicker._datepickerShowing&&V.datepicker._lastInput===t[0]?V.datepicker._hideDatepicker():(V.datepicker._datepickerShowing&&V.datepicker._lastInput!==t[0]&&V.datepicker._hideDatepicker(),V.datepicker._showDatepicker(t[0])),!1}))},_autoSize:function(t){var e,i,s,n,o,a;this._get(t,"autoSize")&&!t.inline&&(o=new Date(2009,11,20),(a=this._get(t,"dateFormat")).match(/[DM]/)&&(o.setMonth((e=function(t){for(n=s=i=0;n<t.length;n++)t[n].length>i&&(i=t[n].length,s=n);return s})(this._get(t,a.match(/MM/)?"monthNames":"monthNamesShort"))),o.setDate(e(this._get(t,a.match(/DD/)?"dayNames":"dayNamesShort"))+20-o.getDay())),t.input.attr("size",this._formatDate(t,o).length))},_inlineDatepicker:function(t,e){var i=V(t);i.hasClass(this.markerClassName)||(i.addClass(this.markerClassName).append(e.dpDiv),V.data(t,"datepicker",e),this._setDate(e,this._getDefaultDate(e),!0),this._updateDatepicker(e),this._updateAlternate(e),e.settings.disabled&&this._disableDatepicker(t),e.dpDiv.css("display","block"))},_dialogDatepicker:function(t,e,i,s,n){var o,a=this._dialogInst;return a||(this.uuid+=1,o="dp"+this.uuid,this._dialogInput=V("<input type='text' id='"+o+"' style='position: absolute; top: -100px; width: 0px;'/>"),this._dialogInput.on("keydown",this._doKeyDown),V("body").append(this._dialogInput),(a=this._dialogInst=this._newInst(this._dialogInput,!1)).settings={},V.data(this._dialogInput[0],"datepicker",a)),H(a.settings,s||{}),e=e&&e.constructor===Date?this._formatDate(a,e):e,this._dialogInput.val(e),this._pos=n?n.length?n:[n.pageX,n.pageY]:null,this._pos||(o=document.documentElement.clientWidth,s=document.documentElement.clientHeight,e=document.documentElement.scrollLeft||document.body.scrollLeft,n=document.documentElement.scrollTop||document.body.scrollTop,this._pos=[o/2-100+e,s/2-150+n]),this._dialogInput.css("left",this._pos[0]+20+"px").css("top",this._pos[1]+"px"),a.settings.onSelect=i,this._inDialog=!0,this.dpDiv.addClass(this._dialogClass),this._showDatepicker(this._dialogInput[0]),V.blockUI&&V.blockUI(this.dpDiv),V.data(this._dialogInput[0],"datepicker",a),this},_destroyDatepicker:function(t){var e,i=V(t),s=V.data(t,"datepicker");i.hasClass(this.markerClassName)&&(e=t.nodeName.toLowerCase(),V.removeData(t,"datepicker"),"input"===e?(s.append.remove(),s.trigger.remove(),i.removeClass(this.markerClassName).off("focus",this._showDatepicker).off("keydown",this._doKeyDown).off("keypress",this._doKeyPress).off("keyup",this._doKeyUp)):"div"!==e&&"span"!==e||i.removeClass(this.markerClassName).empty(),S===s)&&(S=null,this._curInst=null)},_enableDatepicker:function(e){var t,i=V(e),s=V.data(e,"datepicker");i.hasClass(this.markerClassName)&&("input"===(t=e.nodeName.toLowerCase())?(e.disabled=!1,s.trigger.filter("button").each(function(){this.disabled=!1}).end().filter("img").css({opacity:"1.0",cursor:""})):"div"!==t&&"span"!==t||((s=i.children("."+this._inlineClass)).children().removeClass("ui-state-disabled"),s.find("select.ui-datepicker-month, select.ui-datepicker-year").prop("disabled",!1)),this._disabledInputs=V.map(this._disabledInputs,function(t){return t===e?null:t}))},_disableDatepicker:function(e){var t,i=V(e),s=V.data(e,"datepicker");i.hasClass(this.markerClassName)&&("input"===(t=e.nodeName.toLowerCase())?(e.disabled=!0,s.trigger.filter("button").each(function(){this.disabled=!0}).end().filter("img").css({opacity:"0.5",cursor:"default"})):"div"!==t&&"span"!==t||((s=i.children("."+this._inlineClass)).children().addClass("ui-state-disabled"),s.find("select.ui-datepicker-month, select.ui-datepicker-year").prop("disabled",!0)),this._disabledInputs=V.map(this._disabledInputs,function(t){return t===e?null:t}),this._disabledInputs[this._disabledInputs.length]=e)},_isDisabledDatepicker:function(t){if(t)for(var e=0;e<this._disabledInputs.length;e++)if(this._disabledInputs[e]===t)return!0;return!1},_getInst:function(t){try{return V.data(t,"datepicker")}catch(t){throw"Missing instance data for this datepicker"}},_optionDatepicker:function(t,e,i){var s,n,o=this._getInst(t);if(2===arguments.length&&"string"==typeof e)return"defaults"===e?V.extend({},V.datepicker._defaults):o?"all"===e?V.extend({},o.settings):this._get(o,e):null;s=e||{},"string"==typeof e&&((s={})[e]=i),o&&(this._curInst===o&&this._hideDatepicker(),e=this._getDateDatepicker(t,!0),i=this._getMinMaxDate(o,"min"),n=this._getMinMaxDate(o,"max"),H(o.settings,s),null!==i&&void 0!==s.dateFormat&&void 0===s.minDate&&(o.settings.minDate=this._formatDate(o,i)),null!==n&&void 0!==s.dateFormat&&void 0===s.maxDate&&(o.settings.maxDate=this._formatDate(o,n)),"disabled"in s&&(s.disabled?this._disableDatepicker(t):this._enableDatepicker(t)),this._attachments(V(t),o),this._autoSize(o),this._setDate(o,e),this._updateAlternate(o),this._updateDatepicker(o))},_changeDatepicker:function(t,e,i){this._optionDatepicker(t,e,i)},_refreshDatepicker:function(t){t=this._getInst(t);t&&this._updateDatepicker(t)},_setDateDatepicker:function(t,e){t=this._getInst(t);t&&(this._setDate(t,e),this._updateDatepicker(t),this._updateAlternate(t))},_getDateDatepicker:function(t,e){t=this._getInst(t);return t&&!t.inline&&this._setDateFromField(t,e),t?this._getDate(t):null},_doKeyDown:function(t){var e,i,s=V.datepicker._getInst(t.target),n=!0,o=s.dpDiv.is(".ui-datepicker-rtl");if(s._keyEvent=!0,V.datepicker._datepickerShowing)switch(t.keyCode){case 9:V.datepicker._hideDatepicker(),n=!1;break;case 13:return(i=V("td."+V.datepicker._dayOverClass+":not(."+V.datepicker._currentClass+")",s.dpDiv))[0]&&V.datepicker._selectDay(t.target,s.selectedMonth,s.selectedYear,i[0]),(i=V.datepicker._get(s,"onSelect"))?(e=V.datepicker._formatDate(s),i.apply(s.input?s.input[0]:null,[e,s])):V.datepicker._hideDatepicker(),!1;case 27:V.datepicker._hideDatepicker();break;case 33:V.datepicker._adjustDate(t.target,t.ctrlKey?-V.datepicker._get(s,"stepBigMonths"):-V.datepicker._get(s,"stepMonths"),"M");break;case 34:V.datepicker._adjustDate(t.target,t.ctrlKey?+V.datepicker._get(s,"stepBigMonths"):+V.datepicker._get(s,"stepMonths"),"M");break;case 35:(t.ctrlKey||t.metaKey)&&V.datepicker._clearDate(t.target),n=t.ctrlKey||t.metaKey;break;case 36:(t.ctrlKey||t.metaKey)&&V.datepicker._gotoToday(t.target),n=t.ctrlKey||t.metaKey;break;case 37:(t.ctrlKey||t.metaKey)&&V.datepicker._adjustDate(t.target,o?1:-1,"D"),n=t.ctrlKey||t.metaKey,t.originalEvent.altKey&&V.datepicker._adjustDate(t.target,t.ctrlKey?-V.datepicker._get(s,"stepBigMonths"):-V.datepicker._get(s,"stepMonths"),"M");break;case 38:(t.ctrlKey||t.metaKey)&&V.datepicker._adjustDate(t.target,-7,"D"),n=t.ctrlKey||t.metaKey;break;case 39:(t.ctrlKey||t.metaKey)&&V.datepicker._adjustDate(t.target,o?-1:1,"D"),n=t.ctrlKey||t.metaKey,t.originalEvent.altKey&&V.datepicker._adjustDate(t.target,t.ctrlKey?+V.datepicker._get(s,"stepBigMonths"):+V.datepicker._get(s,"stepMonths"),"M");break;case 40:(t.ctrlKey||t.metaKey)&&V.datepicker._adjustDate(t.target,7,"D"),n=t.ctrlKey||t.metaKey;break;default:n=!1}else 36===t.keyCode&&t.ctrlKey?V.datepicker._showDatepicker(this):n=!1;n&&(t.preventDefault(),t.stopPropagation())},_doKeyPress:function(t){var e,i=V.datepicker._getInst(t.target);if(V.datepicker._get(i,"constrainInput"))return i=V.datepicker._possibleChars(V.datepicker._get(i,"dateFormat")),e=String.fromCharCode(null==t.charCode?t.keyCode:t.charCode),t.ctrlKey||t.metaKey||e<" "||!i||-1<i.indexOf(e)},_doKeyUp:function(t){t=V.datepicker._getInst(t.target);if(t.input.val()!==t.lastVal)try{V.datepicker.parseDate(V.datepicker._get(t,"dateFormat"),t.input?t.input.val():null,V.datepicker._getFormatConfig(t))&&(V.datepicker._setDateFromField(t),V.datepicker._updateAlternate(t),V.datepicker._updateDatepicker(t))}catch(t){}return!0},_showDatepicker:function(t){var e,i,s,n;"input"!==(t=t.target||t).nodeName.toLowerCase()&&(t=V("input",t.parentNode)[0]),V.datepicker._isDisabledDatepicker(t)||V.datepicker._lastInput===t||(n=V.datepicker._getInst(t),V.datepicker._curInst&&V.datepicker._curInst!==n&&(V.datepicker._curInst.dpDiv.stop(!0,!0),n)&&V.datepicker._datepickerShowing&&V.datepicker._hideDatepicker(V.datepicker._curInst.input[0]),!1===(i=(i=V.datepicker._get(n,"beforeShow"))?i.apply(t,[t,n]):{}))||(H(n.settings,i),n.lastVal=null,V.datepicker._lastInput=t,V.datepicker._setDateFromField(n),V.datepicker._inDialog&&(t.value=""),V.datepicker._pos||(V.datepicker._pos=V.datepicker._findPos(t),V.datepicker._pos[1]+=t.offsetHeight),e=!1,V(t).parents().each(function(){return!(e|="fixed"===V(this).css("position"))}),i={left:V.datepicker._pos[0],top:V.datepicker._pos[1]},V.datepicker._pos=null,n.dpDiv.empty(),n.dpDiv.css({position:"absolute",display:"block",top:"-1000px"}),V.datepicker._updateDatepicker(n),i=V.datepicker._checkOffset(n,i,e),n.dpDiv.css({position:V.datepicker._inDialog&&V.blockUI?"static":e?"fixed":"absolute",display:"none",left:i.left+"px",top:i.top+"px"}),n.inline)||(i=V.datepicker._get(n,"showAnim"),s=V.datepicker._get(n,"duration"),n.dpDiv.css("z-index",function(t){for(var e;t.length&&t[0]!==document;){if(("absolute"===(e=t.css("position"))||"relative"===e||"fixed"===e)&&(e=parseInt(t.css("zIndex"),10),!isNaN(e))&&0!==e)return e;t=t.parent()}return 0}(V(t))+1),V.datepicker._datepickerShowing=!0,V.effects&&V.effects.effect[i]?n.dpDiv.show(i,V.datepicker._get(n,"showOptions"),s):n.dpDiv[i||"show"](i?s:null),V.datepicker._shouldFocusInput(n)&&n.input.trigger("focus"),V.datepicker._curInst=n)},_updateDatepicker:function(t){this.maxRows=4,(S=t).dpDiv.empty().append(this._generateHTML(t)),this._attachHandlers(t);var e,i=this._getNumberOfMonths(t),s=i[1],n=t.dpDiv.find("."+this._dayOverClass+" a"),o=V.datepicker._get(t,"onUpdateDatepicker");0<n.length&&ht.apply(n.get(0)),t.dpDiv.removeClass("ui-datepicker-multi-2 ui-datepicker-multi-3 ui-datepicker-multi-4").width(""),1<s&&t.dpDiv.addClass("ui-datepicker-multi-"+s).css("width",17*s+"em"),t.dpDiv[(1!==i[0]||1!==i[1]?"add":"remove")+"Class"]("ui-datepicker-multi"),t.dpDiv[(this._get(t,"isRTL")?"add":"remove")+"Class"]("ui-datepicker-rtl"),t===V.datepicker._curInst&&V.datepicker._datepickerShowing&&V.datepicker._shouldFocusInput(t)&&t.input.trigger("focus"),t.yearshtml&&(e=t.yearshtml,setTimeout(function(){e===t.yearshtml&&t.yearshtml&&t.dpDiv.find("select.ui-datepicker-year").first().replaceWith(t.yearshtml),e=t.yearshtml=null},0)),o&&o.apply(t.input?t.input[0]:null,[t])},_shouldFocusInput:function(t){return t.input&&t.input.is(":visible")&&!t.input.is(":disabled")&&!t.input.is(":focus")},_checkOffset:function(t,e,i){var s=t.dpDiv.outerWidth(),n=t.dpDiv.outerHeight(),o=t.input?t.input.outerWidth():0,a=t.input?t.input.outerHeight():0,r=document.documentElement.clientWidth+(i?0:V(document).scrollLeft()),l=document.documentElement.clientHeight+(i?0:V(document).scrollTop());return e.left-=this._get(t,"isRTL")?s-o:0,e.left-=i&&e.left===t.input.offset().left?V(document).scrollLeft():0,e.top-=i&&e.top===t.input.offset().top+a?V(document).scrollTop():0,e.left-=Math.min(e.left,e.left+s>r&&s<r?Math.abs(e.left+s-r):0),e.top-=Math.min(e.top,e.top+n>l&&n<l?Math.abs(n+a):0),e},_findPos:function(t){for(var e=this._getInst(t),i=this._get(e,"isRTL");t&&("hidden"===t.type||1!==t.nodeType||V.expr.pseudos.hidden(t));)t=t[i?"previousSibling":"nextSibling"];return[(e=V(t).offset()).left,e.top]},_hideDatepicker:function(t){var e,i,s=this._curInst;!s||t&&s!==V.data(t,"datepicker")||this._datepickerShowing&&(t=this._get(s,"showAnim"),i=this._get(s,"duration"),e=function(){V.datepicker._tidyDialog(s)},V.effects&&(V.effects.effect[t]||V.effects[t])?s.dpDiv.hide(t,V.datepicker._get(s,"showOptions"),i,e):s.dpDiv["slideDown"===t?"slideUp":"fadeIn"===t?"fadeOut":"hide"](t?i:null,e),t||e(),this._datepickerShowing=!1,(i=this._get(s,"onClose"))&&i.apply(s.input?s.input[0]:null,[s.input?s.input.val():"",s]),this._lastInput=null,this._inDialog&&(this._dialogInput.css({position:"absolute",left:"0",top:"-100px"}),V.blockUI)&&(V.unblockUI(),V("body").append(this.dpDiv)),this._inDialog=!1)},_tidyDialog:function(t){t.dpDiv.removeClass(this._dialogClass).off(".ui-datepicker-calendar")},_checkExternalClick:function(t){var e;V.datepicker._curInst&&(t=V(t.target),e=V.datepicker._getInst(t[0]),!(t[0].id===V.datepicker._mainDivId||0!==t.parents("#"+V.datepicker._mainDivId).length||t.hasClass(V.datepicker.markerClassName)||t.closest("."+V.datepicker._triggerClass).length||!V.datepicker._datepickerShowing||V.datepicker._inDialog&&V.blockUI)||t.hasClass(V.datepicker.markerClassName)&&V.datepicker._curInst!==e)&&V.datepicker._hideDatepicker()},_adjustDate:function(t,e,i){var t=V(t),s=this._getInst(t[0]);this._isDisabledDatepicker(t[0])||(this._adjustInstDate(s,e,i),this._updateDatepicker(s))},_gotoToday:function(t){var e,t=V(t),i=this._getInst(t[0]);this._get(i,"gotoCurrent")&&i.currentDay?(i.selectedDay=i.currentDay,i.drawMonth=i.selectedMonth=i.currentMonth,i.drawYear=i.selectedYear=i.currentYear):(e=new Date,i.selectedDay=e.getDate(),i.drawMonth=i.selectedMonth=e.getMonth(),i.drawYear=i.selectedYear=e.getFullYear()),this._notifyChange(i),this._adjustDate(t)},_selectMonthYear:function(t,e,i){var t=V(t),s=this._getInst(t[0]);s["selected"+("M"===i?"Month":"Year")]=s["draw"+("M"===i?"Month":"Year")]=parseInt(e.options[e.selectedIndex].value,10),this._notifyChange(s),this._adjustDate(t)},_selectDay:function(t,e,i,s){var n=V(t);V(s).hasClass(this._unselectableClass)||this._isDisabledDatepicker(n[0])||((n=this._getInst(n[0])).selectedDay=n.currentDay=parseInt(V("a",s).attr("data-date")),n.selectedMonth=n.currentMonth=e,n.selectedYear=n.currentYear=i,this._selectDate(t,this._formatDate(n,n.currentDay,n.currentMonth,n.currentYear)))},_clearDate:function(t){t=V(t);this._selectDate(t,"")},_selectDate:function(t,e){var i,t=V(t),t=this._getInst(t[0]);e=null!=e?e:this._formatDate(t),t.input&&t.input.val(e),this._updateAlternate(t),(i=this._get(t,"onSelect"))?i.apply(t.input?t.input[0]:null,[e,t]):t.input&&t.input.trigger("change"),t.inline?this._updateDatepicker(t):(this._hideDatepicker(),this._lastInput=t.input[0],"object"!=typeof t.input[0]&&t.input.trigger("focus"),this._lastInput=null)},_updateAlternate:function(t){var e,i,s=this._get(t,"altField");s&&(i=this._get(t,"altFormat")||this._get(t,"dateFormat"),e=this._getDate(t),i=this.formatDate(i,e,this._getFormatConfig(t)),V(document).find(s).val(i))},noWeekends:function(t){t=t.getDay();return[0<t&&t<6,""]},iso8601Week:function(t){var e,t=new Date(t.getTime());return t.setDate(t.getDate()+4-(t.getDay()||7)),e=t.getTime(),t.setMonth(0),t.setDate(1),Math.floor(Math.round((e-t)/864e5)/7)+1},parseDate:function(e,n,t){if(null==e||null==n)throw"Invalid arguments";if(""===(n="object"==typeof n?n.toString():n+""))return null;for(var i,s,o=0,a=(t?t.shortYearCutoff:null)||this._defaults.shortYearCutoff,a="string"!=typeof a?a:(new Date).getFullYear()%100+parseInt(a,10),r=(t?t.dayNamesShort:null)||this._defaults.dayNamesShort,l=(t?t.dayNames:null)||this._defaults.dayNames,h=(t?t.monthNamesShort:null)||this._defaults.monthNamesShort,c=(t?t.monthNames:null)||this._defaults.monthNames,u=-1,d=-1,p=-1,f=-1,g=!1,m=function(t){t=y+1<e.length&&e.charAt(y+1)===t;return t&&y++,t},_=function(t){var e=m(t),e="@"===t?14:"!"===t?20:"y"===t&&e?4:"o"===t?3:2,t=new RegExp("^\\d{"+("y"===t?e:1)+","+e+"}"),e=n.substring(o).match(t);if(e)return o+=e[0].length,parseInt(e[0],10);throw"Missing number at position "+o},v=function(t,e,i){var s=-1,t=V.map(m(t)?i:e,function(t,e){return[[e,t]]}).sort(function(t,e){return-(t[1].length-e[1].length)});if(V.each(t,function(t,e){var i=e[1];if(n.substr(o,i.length).toLowerCase()===i.toLowerCase())return s=e[0],o+=i.length,!1}),-1!==s)return s+1;throw"Unknown name at position "+o},b=function(){if(n.charAt(o)!==e.charAt(y))throw"Unexpected literal at position "+o;o++},y=0;y<e.length;y++)if(g)"'"!==e.charAt(y)||m("'")?b():g=!1;else switch(e.charAt(y)){case"d":p=_("d");break;case"D":v("D",r,l);break;case"o":f=_("o");break;case"m":d=_("m");break;case"M":d=v("M",h,c);break;case"y":u=_("y");break;case"@":u=(s=new Date(_("@"))).getFullYear(),d=s.getMonth()+1,p=s.getDate();break;case"!":u=(s=new Date((_("!")-this._ticksTo1970)/1e4)).getFullYear(),d=s.getMonth()+1,p=s.getDate();break;case"'":m("'")?b():g=!0;break;default:b()}if(o<n.length&&(t=n.substr(o),!/^\s+/.test(t)))throw"Extra/unparsed characters found in date: "+t;if(-1===u?u=(new Date).getFullYear():u<100&&(u+=(new Date).getFullYear()-(new Date).getFullYear()%100+(u<=a?0:-100)),-1<f)for(d=1,p=f;;){if(p<=(i=this._getDaysInMonth(u,d-1)))break;d++,p-=i}if((s=this._daylightSavingAdjust(new Date(u,d-1,p))).getFullYear()!==u||s.getMonth()+1!==d||s.getDate()!==p)throw"Invalid date";return s},ATOM:"yy-mm-dd",COOKIE:"D, dd M yy",ISO_8601:"yy-mm-dd",RFC_822:"D, d M y",RFC_850:"DD, dd-M-y",RFC_1036:"D, d M y",RFC_1123:"D, d M yy",RFC_2822:"D, d M yy",RSS:"D, d M y",TICKS:"!",TIMESTAMP:"@",W3C:"yy-mm-dd",_ticksTo1970:24*(718685+Math.floor(492.5)-Math.floor(19.7)+Math.floor(4.925))*60*60*1e7,formatDate:function(e,t,i){if(!t)return"";function s(t,e,i){var s=""+e;if(c(t))for(;s.length<i;)s="0"+s;return s}function n(t,e,i,s){return(c(t)?s:i)[e]}var o,a=(i?i.dayNamesShort:null)||this._defaults.dayNamesShort,r=(i?i.dayNames:null)||this._defaults.dayNames,l=(i?i.monthNamesShort:null)||this._defaults.monthNamesShort,h=(i?i.monthNames:null)||this._defaults.monthNames,c=function(t){t=o+1<e.length&&e.charAt(o+1)===t;return t&&o++,t},u="",d=!1;if(t)for(o=0;o<e.length;o++)if(d)"'"!==e.charAt(o)||c("'")?u+=e.charAt(o):d=!1;else switch(e.charAt(o)){case"d":u+=s("d",t.getDate(),2);break;case"D":u+=n("D",t.getDay(),a,r);break;case"o":u+=s("o",Math.round((new Date(t.getFullYear(),t.getMonth(),t.getDate()).getTime()-new Date(t.getFullYear(),0,0).getTime())/864e5),3);break;case"m":u+=s("m",t.getMonth()+1,2);break;case"M":u+=n("M",t.getMonth(),l,h);break;case"y":u+=c("y")?t.getFullYear():(t.getFullYear()%100<10?"0":"")+t.getFullYear()%100;break;case"@":u+=t.getTime();break;case"!":u+=1e4*t.getTime()+this._ticksTo1970;break;case"'":c("'")?u+="'":d=!0;break;default:u+=e.charAt(o)}return u},_possibleChars:function(e){for(var t="",i=!1,s=function(t){t=n+1<e.length&&e.charAt(n+1)===t;return t&&n++,t},n=0;n<e.length;n++)if(i)"'"!==e.charAt(n)||s("'")?t+=e.charAt(n):i=!1;else switch(e.charAt(n)){case"d":case"m":case"y":case"@":t+="0123456789";break;case"D":case"M":return null;case"'":s("'")?t+="'":i=!0;break;default:t+=e.charAt(n)}return t},_get:function(t,e){return(void 0!==t.settings[e]?t.settings:this._defaults)[e]},_setDateFromField:function(t,e){if(t.input.val()!==t.lastVal){var i=this._get(t,"dateFormat"),s=t.lastVal=t.input?t.input.val():null,n=this._getDefaultDate(t),o=n,a=this._getFormatConfig(t);try{o=this.parseDate(i,s,a)||n}catch(t){s=e?"":s}t.selectedDay=o.getDate(),t.drawMonth=t.selectedMonth=o.getMonth(),t.drawYear=t.selectedYear=o.getFullYear(),t.currentDay=s?o.getDate():0,t.currentMonth=s?o.getMonth():0,t.currentYear=s?o.getFullYear():0,this._adjustInstDate(t)}},_getDefaultDate:function(t){return this._restrictMinMax(t,this._determineDate(t,this._get(t,"defaultDate"),new Date))},_determineDate:function(r,t,e){var i,s=null==t||""===t?e:"string"==typeof t?function(t){try{return V.datepicker.parseDate(V.datepicker._get(r,"dateFormat"),t,V.datepicker._getFormatConfig(r))}catch(t){}for(var e=(t.toLowerCase().match(/^c/)?V.datepicker._getDate(r):null)||new Date,i=e.getFullYear(),s=e.getMonth(),n=e.getDate(),o=/([+\-]?[0-9]+)\s*(d|D|w|W|m|M|y|Y)?/g,a=o.exec(t);a;){switch(a[2]||"d"){case"d":case"D":n+=parseInt(a[1],10);break;case"w":case"W":n+=7*parseInt(a[1],10);break;case"m":case"M":s+=parseInt(a[1],10),n=Math.min(n,V.datepicker._getDaysInMonth(i,s));break;case"y":case"Y":i+=parseInt(a[1],10),n=Math.min(n,V.datepicker._getDaysInMonth(i,s))}a=o.exec(t)}return new Date(i,s,n)}(t):"number"==typeof t?isNaN(t)?e:(s=t,(i=new Date).setDate(i.getDate()+s),i):new Date(t.getTime());return(s=s&&"Invalid Date"===s.toString()?e:s)&&(s.setHours(0),s.setMinutes(0),s.setSeconds(0),s.setMilliseconds(0)),this._daylightSavingAdjust(s)},_daylightSavingAdjust:function(t){return t?(t.setHours(12<t.getHours()?t.getHours()+2:0),t):null},_setDate:function(t,e,i){var s=!e,n=t.selectedMonth,o=t.selectedYear,e=this._restrictMinMax(t,this._determineDate(t,e,new Date));t.selectedDay=t.currentDay=e.getDate(),t.drawMonth=t.selectedMonth=t.currentMonth=e.getMonth(),t.drawYear=t.selectedYear=t.currentYear=e.getFullYear(),n===t.selectedMonth&&o===t.selectedYear||i||this._notifyChange(t),this._adjustInstDate(t),t.input&&t.input.val(s?"":this._formatDate(t))},_getDate:function(t){return!t.currentYear||t.input&&""===t.input.val()?null:this._daylightSavingAdjust(new Date(t.currentYear,t.currentMonth,t.currentDay))},_attachHandlers:function(t){var e=this._get(t,"stepMonths"),i="#"+t.id.replace(/\\\\/g,"\\");t.dpDiv.find("[data-handler]").map(function(){var t={prev:function(){V.datepicker._adjustDate(i,-e,"M")},next:function(){V.datepicker._adjustDate(i,+e,"M")},hide:function(){V.datepicker._hideDatepicker()},today:function(){V.datepicker._gotoToday(i)},selectDay:function(){return V.datepicker._selectDay(i,+this.getAttribute("data-month"),+this.getAttribute("data-year"),this),!1},selectMonth:function(){return V.datepicker._selectMonthYear(i,this,"M"),!1},selectYear:function(){return V.datepicker._selectMonthYear(i,this,"Y"),!1}};V(this).on(this.getAttribute("data-event"),t[this.getAttribute("data-handler")])})},_generateHTML:function(t){var e,i,s,n,o,E,W,F,L,a,r,R,l,h,c,u,d,p,f,g,m,_,Y,v,b,B,y,j,q,w,x,k,C=new Date,K=this._daylightSavingAdjust(new Date(C.getFullYear(),C.getMonth(),C.getDate())),D=this._get(t,"isRTL"),C=this._get(t,"showButtonPanel"),I=this._get(t,"hideIfNoPrevNext"),T=this._get(t,"navigationAsDateFormat"),P=this._getNumberOfMonths(t),M=this._get(t,"showCurrentAtPos"),S=this._get(t,"stepMonths"),U=1!==P[0]||1!==P[1],H=this._daylightSavingAdjust(t.currentDay?new Date(t.currentYear,t.currentMonth,t.currentDay):new Date(9999,9,9)),z=this._getMinMaxDate(t,"min"),A=this._getMinMaxDate(t,"max"),O=t.drawMonth-M,N=t.drawYear;if(O<0&&(O+=12,N--),A)for(e=this._daylightSavingAdjust(new Date(A.getFullYear(),A.getMonth()-P[0]*P[1]+1,A.getDate())),e=z&&e<z?z:e;this._daylightSavingAdjust(new Date(N,O,1))>e;)--O<0&&(O=11,N--);for(t.drawMonth=O,t.drawYear=N,M=this._get(t,"prevText"),M=T?this.formatDate(M,this._daylightSavingAdjust(new Date(N,O-S,1)),this._getFormatConfig(t)):M,i=this._canAdjustMonth(t,-1,N,O)?V("<a>").attr({class:"ui-datepicker-prev ui-corner-all","data-handler":"prev","data-event":"click",title:M}).append(V("<span>").addClass("ui-icon ui-icon-circle-triangle-"+(D?"e":"w")).text(M))[0].outerHTML:I?"":V("<a>").attr({class:"ui-datepicker-prev ui-corner-all ui-state-disabled",title:M}).append(V("<span>").addClass("ui-icon ui-icon-circle-triangle-"+(D?"e":"w")).text(M))[0].outerHTML,M=this._get(t,"nextText"),M=T?this.formatDate(M,this._daylightSavingAdjust(new Date(N,O+S,1)),this._getFormatConfig(t)):M,s=this._canAdjustMonth(t,1,N,O)?V("<a>").attr({class:"ui-datepicker-next ui-corner-all","data-handler":"next","data-event":"click",title:M}).append(V("<span>").addClass("ui-icon ui-icon-circle-triangle-"+(D?"w":"e")).text(M))[0].outerHTML:I?"":V("<a>").attr({class:"ui-datepicker-next ui-corner-all ui-state-disabled",title:M}).append(V("<span>").attr("class","ui-icon ui-icon-circle-triangle-"+(D?"w":"e")).text(M))[0].outerHTML,S=this._get(t,"currentText"),I=this._get(t,"gotoCurrent")&&t.currentDay?H:K,S=T?this.formatDate(S,I,this._getFormatConfig(t)):S,M="",t.inline||(M=V("<button>").attr({type:"button",class:"ui-datepicker-close ui-state-default ui-priority-primary ui-corner-all","data-handler":"hide","data-event":"click"}).text(this._get(t,"closeText"))[0].outerHTML),T="",C&&(T=V("<div class='ui-datepicker-buttonpane ui-widget-content'>").append(D?M:"").append(this._isInRange(t,I)?V("<button>").attr({type:"button",class:"ui-datepicker-current ui-state-default ui-priority-secondary ui-corner-all","data-handler":"today","data-event":"click"}).text(S):"").append(D?"":M)[0].outerHTML),n=parseInt(this._get(t,"firstDay"),10),n=isNaN(n)?0:n,o=this._get(t,"showWeek"),E=this._get(t,"dayNames"),W=this._get(t,"dayNamesMin"),F=this._get(t,"monthNames"),L=this._get(t,"monthNamesShort"),a=this._get(t,"beforeShowDay"),r=this._get(t,"showOtherMonths"),R=this._get(t,"selectOtherMonths"),l=this._getDefaultDate(t),h="",u=0;u<P[0];u++){for(d="",this.maxRows=4,p=0;p<P[1];p++){if(f=this._daylightSavingAdjust(new Date(N,O,t.selectedDay)),g=" ui-corner-all",m="",U){if(m+="<div class='ui-datepicker-group",1<P[1])switch(p){case 0:m+=" ui-datepicker-group-first",g=" ui-corner-"+(D?"right":"left");break;case P[1]-1:m+=" ui-datepicker-group-last",g=" ui-corner-"+(D?"left":"right");break;default:m+=" ui-datepicker-group-middle",g=""}m+="'>"}for(m+="<div class='ui-datepicker-header ui-widget-header ui-helper-clearfix"+g+"'>"+(/all|left/.test(g)&&0===u?D?s:i:"")+(/all|right/.test(g)&&0===u?D?i:s:"")+this._generateMonthYearHeader(t,O,N,z,A,0<u||0<p,F,L)+"</div><table class='ui-datepicker-calendar'><thead><tr>",_=o?"<th class='ui-datepicker-week-col'>"+this._get(t,"weekHeader")+"</th>":"",c=0;c<7;c++)_+="<th scope='col'"+(5<=(c+n+6)%7?" class='ui-datepicker-week-end'":"")+"><span title='"+E[Y=(c+n)%7]+"'>"+W[Y]+"</span></th>";for(m+=_+"</tr></thead><tbody>",b=this._getDaysInMonth(N,O),N===t.selectedYear&&O===t.selectedMonth&&(t.selectedDay=Math.min(t.selectedDay,b)),v=(this._getFirstDayOfMonth(N,O)-n+7)%7,b=Math.ceil((v+b)/7),B=U&&this.maxRows>b?this.maxRows:b,this.maxRows=B,y=this._daylightSavingAdjust(new Date(N,O,1-v)),j=0;j<B;j++){for(m+="<tr>",q=o?"<td class='ui-datepicker-week-col'>"+this._get(t,"calculateWeek")(y)+"</td>":"",c=0;c<7;c++)w=a?a.apply(t.input?t.input[0]:null,[y]):[!0,""],k=(x=y.getMonth()!==O)&&!R||!w[0]||z&&y<z||A&&A<y,q+="<td class='"+(5<=(c+n+6)%7?" ui-datepicker-week-end":"")+(x?" ui-datepicker-other-month":"")+(y.getTime()===f.getTime()&&O===t.selectedMonth&&t._keyEvent||l.getTime()===y.getTime()&&l.getTime()===f.getTime()?" "+this._dayOverClass:"")+(k?" "+this._unselectableClass+" ui-state-disabled":"")+(x&&!r?"":" "+w[1]+(y.getTime()===H.getTime()?" "+this._currentClass:"")+(y.getTime()===K.getTime()?" ui-datepicker-today":""))+"'"+(x&&!r||!w[2]?"":" title='"+w[2].replace(/'/g,"'")+"'")+(k?"":" data-handler='selectDay' data-event='click' data-month='"+y.getMonth()+"' data-year='"+y.getFullYear()+"'")+">"+(x&&!r?" ":k?"<span class='ui-state-default'>"+y.getDate()+"</span>":"<a class='ui-state-default"+(y.getTime()===K.getTime()?" ui-state-highlight":"")+(y.getTime()===H.getTime()?" ui-state-active":"")+(x?" ui-priority-secondary":"")+"' href='#' aria-current='"+(y.getTime()===H.getTime()?"true":"false")+"' data-date='"+y.getDate()+"'>"+y.getDate()+"</a>")+"</td>",y.setDate(y.getDate()+1),y=this._daylightSavingAdjust(y);m+=q+"</tr>"}11<++O&&(O=0,N++),d+=m+="</tbody></table>"+(U?"</div>"+(0<P[0]&&p===P[1]-1?"<div class='ui-datepicker-row-break'></div>":""):"")}h+=d}return h+=T,t._keyEvent=!1,h},_generateMonthYearHeader:function(t,e,i,s,n,o,a,r){var l,h,c,u,d,p,f=this._get(t,"changeMonth"),g=this._get(t,"changeYear"),m=this._get(t,"showMonthAfterYear"),_=this._get(t,"selectMonthLabel"),v=this._get(t,"selectYearLabel"),b="<div class='ui-datepicker-title'>",y="";if(o||!f)y+="<span class='ui-datepicker-month'>"+a[e]+"</span>";else{for(l=s&&s.getFullYear()===i,h=n&&n.getFullYear()===i,y+="<select class='ui-datepicker-month' aria-label='"+_+"' data-handler='selectMonth' data-event='change'>",c=0;c<12;c++)(!l||c>=s.getMonth())&&(!h||c<=n.getMonth())&&(y+="<option value='"+c+"'"+(c===e?" selected='selected'":"")+">"+r[c]+"</option>");y+="</select>"}if(m||(b+=y+(!o&&f&&g?"":" ")),!t.yearshtml)if(t.yearshtml="",o||!g)b+="<span class='ui-datepicker-year'>"+i+"</span>";else{for(a=this._get(t,"yearRange").split(":"),u=(new Date).getFullYear(),d=(_=function(t){t=t.match(/c[+\-].*/)?i+parseInt(t.substring(1),10):t.match(/[+\-].*/)?u+parseInt(t,10):parseInt(t,10);return isNaN(t)?u:t})(a[0]),p=Math.max(d,_(a[1]||"")),d=s?Math.max(d,s.getFullYear()):d,p=n?Math.min(p,n.getFullYear()):p,t.yearshtml+="<select class='ui-datepicker-year' aria-label='"+v+"' data-handler='selectYear' data-event='change'>";d<=p;d++)t.yearshtml+="<option value='"+d+"'"+(d===i?" selected='selected'":"")+">"+d+"</option>";t.yearshtml+="</select>",b+=t.yearshtml,t.yearshtml=null}return b+=this._get(t,"yearSuffix"),m&&(b+=(!o&&f&&g?"":" ")+y),b+="</div>"},_adjustInstDate:function(t,e,i){var s=t.selectedYear+("Y"===i?e:0),n=t.selectedMonth+("M"===i?e:0),e=Math.min(t.selectedDay,this._getDaysInMonth(s,n))+("D"===i?e:0),s=this._restrictMinMax(t,this._daylightSavingAdjust(new Date(s,n,e)));t.selectedDay=s.getDate(),t.drawMonth=t.selectedMonth=s.getMonth(),t.drawYear=t.selectedYear=s.getFullYear(),"M"!==i&&"Y"!==i||this._notifyChange(t)},_restrictMinMax:function(t,e){var i=this._getMinMaxDate(t,"min"),t=this._getMinMaxDate(t,"max"),i=i&&e<i?i:e;return t&&t<i?t:i},_notifyChange:function(t){var e=this._get(t,"onChangeMonthYear");e&&e.apply(t.input?t.input[0]:null,[t.selectedYear,t.selectedMonth+1,t])},_getNumberOfMonths:function(t){t=this._get(t,"numberOfMonths");return null==t?[1,1]:"number"==typeof t?[1,t]:t},_getMinMaxDate:function(t,e){return this._determineDate(t,this._get(t,e+"Date"),null)},_getDaysInMonth:function(t,e){return 32-this._daylightSavingAdjust(new Date(t,e,32)).getDate()},_getFirstDayOfMonth:function(t,e){return new Date(t,e,1).getDay()},_canAdjustMonth:function(t,e,i,s){var n=this._getNumberOfMonths(t),i=this._daylightSavingAdjust(new Date(i,s+(e<0?e:n[0]*n[1]),1));return e<0&&i.setDate(this._getDaysInMonth(i.getFullYear(),i.getMonth())),this._isInRange(t,i)},_isInRange:function(t,e){var i,s=this._getMinMaxDate(t,"min"),n=this._getMinMaxDate(t,"max"),o=null,a=null,t=this._get(t,"yearRange");return t&&(t=t.split(":"),i=(new Date).getFullYear(),o=parseInt(t[0],10),a=parseInt(t[1],10),t[0].match(/[+\-].*/)&&(o+=i),t[1].match(/[+\-].*/))&&(a+=i),(!s||e.getTime()>=s.getTime())&&(!n||e.getTime()<=n.getTime())&&(!o||e.getFullYear()>=o)&&(!a||e.getFullYear()<=a)},_getFormatConfig:function(t){var e=this._get(t,"shortYearCutoff");return{shortYearCutoff:"string"!=typeof e?e:(new Date).getFullYear()%100+parseInt(e,10),dayNamesShort:this._get(t,"dayNamesShort"),dayNames:this._get(t,"dayNames"),monthNamesShort:this._get(t,"monthNamesShort"),monthNames:this._get(t,"monthNames")}},_formatDate:function(t,e,i,s){e||(t.currentDay=t.selectedDay,t.currentMonth=t.selectedMonth,t.currentYear=t.selectedYear);s=e?"object"==typeof e?e:this._daylightSavingAdjust(new Date(s,i,e)):this._daylightSavingAdjust(new Date(t.currentYear,t.currentMonth,t.currentDay));return this.formatDate(this._get(t,"dateFormat"),s,this._getFormatConfig(t))}}),V.fn.datepicker=function(t){if(!this.length)return this;V.datepicker.initialized||(V(document).on("mousedown",V.datepicker._checkExternalClick),V.datepicker.initialized=!0),0===V("#"+V.datepicker._mainDivId).length&&V("body").append(V.datepicker.dpDiv);var e=Array.prototype.slice.call(arguments,1);return"string"==typeof t&&("isDisabled"===t||"getDate"===t||"widget"===t)||"option"===t&&2===arguments.length&&"string"==typeof arguments[1]?V.datepicker["_"+t+"Datepicker"].apply(V.datepicker,[this[0]].concat(e)):this.each(function(){"string"==typeof t?V.datepicker["_"+t+"Datepicker"].apply(V.datepicker,[this].concat(e)):V.datepicker._attachDatepicker(this,t)})},V.datepicker=new rt,V.datepicker.initialized=!1,V.datepicker.uuid=(new Date).getTime(),V.datepicker.version="1.13.3";V.datepicker,V.ui.ie=!!/msie [\w.]+/.exec(navigator.userAgent.toLowerCase());var z=!1;V(document).on("mouseup",function(){z=!1}),V.widget("ui.mouse",{version:"1.13.3",options:{cancel:"input, textarea, button, select, option",distance:1,delay:0},_mouseInit:function(){var e=this;this.element.on("mousedown."+this.widgetName,function(t){return e._mouseDown(t)}).on("click."+this.widgetName,function(t){if(!0===V.data(t.target,e.widgetName+".preventClickEvent"))return V.removeData(t.target,e.widgetName+".preventClickEvent"),t.stopImmediatePropagation(),!1}),this.started=!1},_mouseDestroy:function(){this.element.off("."+this.widgetName),this._mouseMoveDelegate&&this.document.off("mousemove."+this.widgetName,this._mouseMoveDelegate).off("mouseup."+this.widgetName,this._mouseUpDelegate)},_mouseDown:function(t){var e,i,s;if(!z)return this._mouseMoved=!1,this._mouseStarted&&this._mouseUp(t),i=1===(this._mouseDownEvent=t).which,s=!("string"!=typeof(e=this).options.cancel||!t.target.nodeName)&&V(t.target).closest(this.options.cancel).length,i&&!s&&this._mouseCapture(t)&&(this.mouseDelayMet=!this.options.delay,this.mouseDelayMet||(this._mouseDelayTimer=setTimeout(function(){e.mouseDelayMet=!0},this.options.delay)),this._mouseDistanceMet(t)&&this._mouseDelayMet(t)&&(this._mouseStarted=!1!==this._mouseStart(t),!this._mouseStarted)?t.preventDefault():(!0===V.data(t.target,this.widgetName+".preventClickEvent")&&V.removeData(t.target,this.widgetName+".preventClickEvent"),this._mouseMoveDelegate=function(t){return e._mouseMove(t)},this._mouseUpDelegate=function(t){return e._mouseUp(t)},this.document.on("mousemove."+this.widgetName,this._mouseMoveDelegate).on("mouseup."+this.widgetName,this._mouseUpDelegate),t.preventDefault(),z=!0)),!0},_mouseMove:function(t){if(this._mouseMoved){if(V.ui.ie&&(!document.documentMode||document.documentMode<9)&&!t.button)return this._mouseUp(t);if(!t.which)if(t.originalEvent.altKey||t.originalEvent.ctrlKey||t.originalEvent.metaKey||t.originalEvent.shiftKey)this.ignoreMissingWhich=!0;else if(!this.ignoreMissingWhich)return this._mouseUp(t)}return(t.which||t.button)&&(this._mouseMoved=!0),this._mouseStarted?(this._mouseDrag(t),t.preventDefault()):(this._mouseDistanceMet(t)&&this._mouseDelayMet(t)&&(this._mouseStarted=!1!==this._mouseStart(this._mouseDownEvent,t),this._mouseStarted?this._mouseDrag(t):this._mouseUp(t)),!this._mouseStarted)},_mouseUp:function(t){this.document.off("mousemove."+this.widgetName,this._mouseMoveDelegate).off("mouseup."+this.widgetName,this._mouseUpDelegate),this._mouseStarted&&(this._mouseStarted=!1,t.target===this._mouseDownEvent.target&&V.data(t.target,this.widgetName+".preventClickEvent",!0),this._mouseStop(t)),this._mouseDelayTimer&&(clearTimeout(this._mouseDelayTimer),delete this._mouseDelayTimer),this.ignoreMissingWhich=!1,z=!1,t.preventDefault()},_mouseDistanceMet:function(t){return Math.max(Math.abs(this._mouseDownEvent.pageX-t.pageX),Math.abs(this._mouseDownEvent.pageY-t.pageY))>=this.options.distance},_mouseDelayMet:function(){return this.mouseDelayMet},_mouseStart:function(){},_mouseDrag:function(){},_mouseStop:function(){},_mouseCapture:function(){return!0}}),V.ui.plugin={add:function(t,e,i){var s,n=V.ui[t].prototype;for(s in i)n.plugins[s]=n.plugins[s]||[],n.plugins[s].push([e,i[s]])},call:function(t,e,i,s){var n,o=t.plugins[e];if(o&&(s||t.element[0].parentNode&&11!==t.element[0].parentNode.nodeType))for(n=0;n<o.length;n++)t.options[o[n][0]]&&o[n][1].apply(t.element,i)}},V.ui.safeBlur=function(t){t&&"body"!==t.nodeName.toLowerCase()&&V(t).trigger("blur")},V.widget("ui.draggable",V.ui.mouse,{version:"1.13.3",widgetEventPrefix:"drag",options:{addClasses:!0,appendTo:"parent",axis:!1,connectToSortable:!1,containment:!1,cursor:"auto",cursorAt:!1,grid:!1,handle:!1,helper:"original",iframeFix:!1,opacity:!1,refreshPositions:!1,revert:!1,revertDuration:500,scope:"default",scroll:!0,scrollSensitivity:20,scrollSpeed:20,snap:!1,snapMode:"both",snapTolerance:20,stack:!1,zIndex:!1,drag:null,start:null,stop:null},_create:function(){"original"===this.options.helper&&this._setPositionRelative(),this.options.addClasses&&this._addClass("ui-draggable"),this._setHandleClassName(),this._mouseInit()},_setOption:function(t,e){this._super(t,e),"handle"===t&&(this._removeHandleClassName(),this._setHandleClassName())},_destroy:function(){(this.helper||this.element).is(".ui-draggable-dragging")?this.destroyOnClear=!0:(this._removeHandleClassName(),this._mouseDestroy())},_mouseCapture:function(t){var e=this.options;return!(this.helper||e.disabled||0<V(t.target).closest(".ui-resizable-handle").length||(this.handle=this._getHandle(t),!this.handle)||(this._blurActiveElement(t),this._blockFrames(!0===e.iframeFix?"iframe":e.iframeFix),0))},_blockFrames:function(t){this.iframeBlocks=this.document.find(t).map(function(){var t=V(this);return V("<div>").css("position","absolute").appendTo(t.parent()).outerWidth(t.outerWidth()).outerHeight(t.outerHeight()).offset(t.offset())[0]})},_unblockFrames:function(){this.iframeBlocks&&(this.iframeBlocks.remove(),delete this.iframeBlocks)},_blurActiveElement:function(t){var e=V.ui.safeActiveElement(this.document[0]);V(t.target).closest(e).length||V.ui.safeBlur(e)},_mouseStart:function(t){var e=this.options;return this.helper=this._createHelper(t),this._addClass(this.helper,"ui-draggable-dragging"),this._cacheHelperProportions(),V.ui.ddmanager&&(V.ui.ddmanager.current=this),this._cacheMargins(),this.cssPosition=this.helper.css("position"),this.scrollParent=this.helper.scrollParent(!0),this.offsetParent=this.helper.offsetParent(),this.hasFixedAncestor=0<this.helper.parents().filter(function(){return"fixed"===V(this).css("position")}).length,this.positionAbs=this.element.offset(),this._refreshOffsets(t),this.originalPosition=this.position=this._generatePosition(t,!1),this.originalPageX=t.pageX,this.originalPageY=t.pageY,e.cursorAt&&this._adjustOffsetFromHelper(e.cursorAt),this._setContainment(),!1===this._trigger("start",t)?(this._clear(),!1):(this._cacheHelperProportions(),V.ui.ddmanager&&!e.dropBehaviour&&V.ui.ddmanager.prepareOffsets(this,t),this._mouseDrag(t,!0),V.ui.ddmanager&&V.ui.ddmanager.dragStart(this,t),!0)},_refreshOffsets:function(t){this.offset={top:this.positionAbs.top-this.margins.top,left:this.positionAbs.left-this.margins.left,scroll:!1,parent:this._getParentOffset(),relative:this._getRelativeOffset()},this.offset.click={left:t.pageX-this.offset.left,top:t.pageY-this.offset.top}},_mouseDrag:function(t,e){if(this.hasFixedAncestor&&(this.offset.parent=this._getParentOffset()),this.position=this._generatePosition(t,!0),this.positionAbs=this._convertPositionTo("absolute"),!e){e=this._uiHash();if(!1===this._trigger("drag",t,e))return this._mouseUp(new V.Event("mouseup",t)),!1;this.position=e.position}return this.helper[0].style.left=this.position.left+"px",this.helper[0].style.top=this.position.top+"px",V.ui.ddmanager&&V.ui.ddmanager.drag(this,t),!1},_mouseStop:function(t){var e=this,i=!1;return V.ui.ddmanager&&!this.options.dropBehaviour&&(i=V.ui.ddmanager.drop(this,t)),this.dropped&&(i=this.dropped,this.dropped=!1),"invalid"===this.options.revert&&!i||"valid"===this.options.revert&&i||!0===this.options.revert||"function"==typeof this.options.revert&&this.options.revert.call(this.element,i)?V(this.helper).animate(this.originalPosition,parseInt(this.options.revertDuration,10),function(){!1!==e._trigger("stop",t)&&e._clear()}):!1!==this._trigger("stop",t)&&this._clear(),!1},_mouseUp:function(t){return this._unblockFrames(),V.ui.ddmanager&&V.ui.ddmanager.dragStop(this,t),this.handleElement.is(t.target)&&this.element.trigger("focus"),V.ui.mouse.prototype._mouseUp.call(this,t)},cancel:function(){return this.helper.is(".ui-draggable-dragging")?this._mouseUp(new V.Event("mouseup",{target:this.element[0]})):this._clear(),this},_getHandle:function(t){return!this.options.handle||!!V(t.target).closest(this.element.find(this.options.handle)).length},_setHandleClassName:function(){this.handleElement=this.options.handle?this.element.find(this.options.handle):this.element,this._addClass(this.handleElement,"ui-draggable-handle")},_removeHandleClassName:function(){this._removeClass(this.handleElement,"ui-draggable-handle")},_createHelper:function(t){var e=this.options,i="function"==typeof e.helper,t=i?V(e.helper.apply(this.element[0],[t])):"clone"===e.helper?this.element.clone().removeAttr("id"):this.element;return t.parents("body").length||t.appendTo("parent"===e.appendTo?this.element[0].parentNode:e.appendTo),i&&t[0]===this.element[0]&&this._setPositionRelative(),t[0]===this.element[0]||/(fixed|absolute)/.test(t.css("position"))||t.css("position","absolute"),t},_setPositionRelative:function(){/^(?:r|a|f)/.test(this.element.css("position"))||(this.element[0].style.position="relative")},_adjustOffsetFromHelper:function(t){"string"==typeof t&&(t=t.split(" ")),"left"in(t=Array.isArray(t)?{left:+t[0],top:+t[1]||0}:t)&&(this.offset.click.left=t.left+this.margins.left),"right"in t&&(this.offset.click.left=this.helperProportions.width-t.right+this.margins.left),"top"in t&&(this.offset.click.top=t.top+this.margins.top),"bottom"in t&&(this.offset.click.top=this.helperProportions.height-t.bottom+this.margins.top)},_isRootNode:function(t){return/(html|body)/i.test(t.tagName)||t===this.document[0]},_getParentOffset:function(){var t=this.offsetParent.offset(),e=this.document[0];return"absolute"===this.cssPosition&&this.scrollParent[0]!==e&&V.contains(this.scrollParent[0],this.offsetParent[0])&&(t.left+=this.scrollParent.scrollLeft(),t.top+=this.scrollParent.scrollTop()),{top:(t=this._isRootNode(this.offsetParent[0])?{top:0,left:0}:t).top+(parseInt(this.offsetParent.css("borderTopWidth"),10)||0),left:t.left+(parseInt(this.offsetParent.css("borderLeftWidth"),10)||0)}},_getRelativeOffset:function(){var t,e;return"relative"!==this.cssPosition?{top:0,left:0}:(t=this.element.position(),e=this._isRootNode(this.scrollParent[0]),{top:t.top-(parseInt(this.helper.css("top"),10)||0)+(e?0:this.scrollParent.scrollTop()),left:t.left-(parseInt(this.helper.css("left"),10)||0)+(e?0:this.scrollParent.scrollLeft())})},_cacheMargins:function(){this.margins={left:parseInt(this.element.css("marginLeft"),10)||0,top:parseInt(this.element.css("marginTop"),10)||0,right:parseInt(this.element.css("marginRight"),10)||0,bottom:parseInt(this.element.css("marginBottom"),10)||0}},_cacheHelperProportions:function(){this.helperProportions={width:this.helper.outerWidth(),height:this.helper.outerHeight()}},_setContainment:function(){var t,e=this.options,i=this.document[0];this.relativeContainer=null,e.containment?"window"===e.containment?this.containment=[V(window).scrollLeft()-this.offset.relative.left-this.offset.parent.left,V(window).scrollTop()-this.offset.relative.top-this.offset.parent.top,V(window).scrollLeft()+V(window).width()-this.helperProportions.width-this.margins.left,V(window).scrollTop()+(V(window).height()||i.body.parentNode.scrollHeight)-this.helperProportions.height-this.margins.top]:"document"===e.containment?this.containment=[0,0,V(i).width()-this.helperProportions.width-this.margins.left,(V(i).height()||i.body.parentNode.scrollHeight)-this.helperProportions.height-this.margins.top]:e.containment.constructor===Array?this.containment=e.containment:("parent"===e.containment&&(e.containment=this.helper[0].parentNode),(e=(i=V(e.containment))[0])&&(t=/(scroll|auto)/.test(i.css("overflow")),this.containment=[(parseInt(i.css("borderLeftWidth"),10)||0)+(parseInt(i.css("paddingLeft"),10)||0),(parseInt(i.css("borderTopWidth"),10)||0)+(parseInt(i.css("paddingTop"),10)||0),(t?Math.max(e.scrollWidth,e.offsetWidth):e.offsetWidth)-(parseInt(i.css("borderRightWidth"),10)||0)-(parseInt(i.css("paddingRight"),10)||0)-this.helperProportions.width-this.margins.left-this.margins.right,(t?Math.max(e.scrollHeight,e.offsetHeight):e.offsetHeight)-(parseInt(i.css("borderBottomWidth"),10)||0)-(parseInt(i.css("paddingBottom"),10)||0)-this.helperProportions.height-this.margins.top-this.margins.bottom],this.relativeContainer=i)):this.containment=null},_convertPositionTo:function(t,e){e=e||this.position;var t="absolute"===t?1:-1,i=this._isRootNode(this.scrollParent[0]);return{top:e.top+this.offset.relative.top*t+this.offset.parent.top*t-("fixed"===this.cssPosition?-this.offset.scroll.top:i?0:this.offset.scroll.top)*t,left:e.left+this.offset.relative.left*t+this.offset.parent.left*t-("fixed"===this.cssPosition?-this.offset.scroll.left:i?0:this.offset.scroll.left)*t}},_generatePosition:function(t,e){var i,s=this.options,n=this._isRootNode(this.scrollParent[0]),o=t.pageX,a=t.pageY;return n&&this.offset.scroll||(this.offset.scroll={top:this.scrollParent.scrollTop(),left:this.scrollParent.scrollLeft()}),{top:(a=e&&(this.containment&&(i=this.relativeContainer?(e=this.relativeContainer.offset(),[this.containment[0]+e.left,this.containment[1]+e.top,this.containment[2]+e.left,this.containment[3]+e.top]):this.containment,t.pageX-this.offset.click.left<i[0]&&(o=i[0]+this.offset.click.left),t.pageY-this.offset.click.top<i[1]&&(a=i[1]+this.offset.click.top),t.pageX-this.offset.click.left>i[2]&&(o=i[2]+this.offset.click.left),t.pageY-this.offset.click.top>i[3])&&(a=i[3]+this.offset.click.top),s.grid&&(e=s.grid[1]?this.originalPageY+Math.round((a-this.originalPageY)/s.grid[1])*s.grid[1]:this.originalPageY,a=!i||e-this.offset.click.top>=i[1]||e-this.offset.click.top>i[3]?e:e-this.offset.click.top>=i[1]?e-s.grid[1]:e+s.grid[1],t=s.grid[0]?this.originalPageX+Math.round((o-this.originalPageX)/s.grid[0])*s.grid[0]:this.originalPageX,o=!i||t-this.offset.click.left>=i[0]||t-this.offset.click.left>i[2]?t:t-this.offset.click.left>=i[0]?t-s.grid[0]:t+s.grid[0]),"y"===s.axis&&(o=this.originalPageX),"x"===s.axis)?this.originalPageY:a)-this.offset.click.top-this.offset.relative.top-this.offset.parent.top+("fixed"===this.cssPosition?-this.offset.scroll.top:n?0:this.offset.scroll.top),left:o-this.offset.click.left-this.offset.relative.left-this.offset.parent.left+("fixed"===this.cssPosition?-this.offset.scroll.left:n?0:this.offset.scroll.left)}},_clear:function(){this._removeClass(this.helper,"ui-draggable-dragging"),this.helper[0]===this.element[0]||this.cancelHelperRemoval||this.helper.remove(),this.helper=null,this.cancelHelperRemoval=!1,this.destroyOnClear&&this.destroy()},_trigger:function(t,e,i){return i=i||this._uiHash(),V.ui.plugin.call(this,t,[e,i,this],!0),/^(drag|start|stop)/.test(t)&&(this.positionAbs=this._convertPositionTo("absolute"),i.offset=this.positionAbs),V.Widget.prototype._trigger.call(this,t,e,i)},plugins:{},_uiHash:function(){return{helper:this.helper,position:this.position,originalPosition:this.originalPosition,offset:this.positionAbs}}}),V.ui.plugin.add("draggable","connectToSortable",{start:function(e,t,i){var s=V.extend({},t,{item:i.element});i.sortables=[],V(i.options.connectToSortable).each(function(){var t=V(this).sortable("instance");t&&!t.options.disabled&&(i.sortables.push(t),t.refreshPositions(),t._trigger("activate",e,s))})},stop:function(e,t,i){var s=V.extend({},t,{item:i.element});i.cancelHelperRemoval=!1,V.each(i.sortables,function(){var t=this;t.isOver?(t.isOver=0,i.cancelHelperRemoval=!0,t.cancelHelperRemoval=!1,t._storedCSS={position:t.placeholder.css("position"),top:t.placeholder.css("top"),left:t.placeholder.css("left")},t._mouseStop(e),t.options.helper=t.options._helper):(t.cancelHelperRemoval=!0,t._trigger("deactivate",e,s))})},drag:function(i,s,n){V.each(n.sortables,function(){var t=!1,e=this;e.positionAbs=n.positionAbs,e.helperProportions=n.helperProportions,e.offset.click=n.offset.click,e._intersectsWith(e.containerCache)&&(t=!0,V.each(n.sortables,function(){return this.positionAbs=n.positionAbs,this.helperProportions=n.helperProportions,this.offset.click=n.offset.click,t=this!==e&&this._intersectsWith(this.containerCache)&&V.contains(e.element[0],this.element[0])?!1:t})),t?(e.isOver||(e.isOver=1,n._parent=s.helper.parent(),e.currentItem=s.helper.appendTo(e.element).data("ui-sortable-item",!0),e.options._helper=e.options.helper,e.options.helper=function(){return s.helper[0]},i.target=e.currentItem[0],e._mouseCapture(i,!0),e._mouseStart(i,!0,!0),e.offset.click.top=n.offset.click.top,e.offset.click.left=n.offset.click.left,e.offset.parent.left-=n.offset.parent.left-e.offset.parent.left,e.offset.parent.top-=n.offset.parent.top-e.offset.parent.top,n._trigger("toSortable",i),n.dropped=e.element,V.each(n.sortables,function(){this.refreshPositions()}),n.currentItem=n.element,e.fromOutside=n),e.currentItem&&(e._mouseDrag(i),s.position=e.position)):e.isOver&&(e.isOver=0,e.cancelHelperRemoval=!0,e.options._revert=e.options.revert,e.options.revert=!1,e._trigger("out",i,e._uiHash(e)),e._mouseStop(i,!0),e.options.revert=e.options._revert,e.options.helper=e.options._helper,e.placeholder&&e.placeholder.remove(),s.helper.appendTo(n._parent),n._refreshOffsets(i),s.position=n._generatePosition(i,!0),n._trigger("fromSortable",i),n.dropped=!1,V.each(n.sortables,function(){this.refreshPositions()}))})}}),V.ui.plugin.add("draggable","cursor",{start:function(t,e,i){var s=V("body"),i=i.options;s.css("cursor")&&(i._cursor=s.css("cursor")),s.css("cursor",i.cursor)},stop:function(t,e,i){i=i.options;i._cursor&&V("body").css("cursor",i._cursor)}}),V.ui.plugin.add("draggable","opacity",{start:function(t,e,i){e=V(e.helper),i=i.options;e.css("opacity")&&(i._opacity=e.css("opacity")),e.css("opacity",i.opacity)},stop:function(t,e,i){i=i.options;i._opacity&&V(e.helper).css("opacity",i._opacity)}}),V.ui.plugin.add("draggable","scroll",{start:function(t,e,i){i.scrollParentNotHidden||(i.scrollParentNotHidden=i.helper.scrollParent(!1)),i.scrollParentNotHidden[0]!==i.document[0]&&"HTML"!==i.scrollParentNotHidden[0].tagName&&(i.overflowOffset=i.scrollParentNotHidden.offset())},drag:function(t,e,i){var s=i.options,n=!1,o=i.scrollParentNotHidden[0],a=i.document[0];o!==a&&"HTML"!==o.tagName?(s.axis&&"x"===s.axis||(i.overflowOffset.top+o.offsetHeight-t.pageY<s.scrollSensitivity?o.scrollTop=n=o.scrollTop+s.scrollSpeed:t.pageY-i.overflowOffset.top<s.scrollSensitivity&&(o.scrollTop=n=o.scrollTop-s.scrollSpeed)),s.axis&&"y"===s.axis||(i.overflowOffset.left+o.offsetWidth-t.pageX<s.scrollSensitivity?o.scrollLeft=n=o.scrollLeft+s.scrollSpeed:t.pageX-i.overflowOffset.left<s.scrollSensitivity&&(o.scrollLeft=n=o.scrollLeft-s.scrollSpeed))):(s.axis&&"x"===s.axis||(t.pageY-V(a).scrollTop()<s.scrollSensitivity?n=V(a).scrollTop(V(a).scrollTop()-s.scrollSpeed):V(window).height()-(t.pageY-V(a).scrollTop())<s.scrollSensitivity&&(n=V(a).scrollTop(V(a).scrollTop()+s.scrollSpeed))),s.axis&&"y"===s.axis||(t.pageX-V(a).scrollLeft()<s.scrollSensitivity?n=V(a).scrollLeft(V(a).scrollLeft()-s.scrollSpeed):V(window).width()-(t.pageX-V(a).scrollLeft())<s.scrollSensitivity&&(n=V(a).scrollLeft(V(a).scrollLeft()+s.scrollSpeed)))),!1!==n&&V.ui.ddmanager&&!s.dropBehaviour&&V.ui.ddmanager.prepareOffsets(i,t)}}),V.ui.plugin.add("draggable","snap",{start:function(t,e,i){var s=i.options;i.snapElements=[],V(s.snap.constructor!==String?s.snap.items||":data(ui-draggable)":s.snap).each(function(){var t=V(this),e=t.offset();this!==i.element[0]&&i.snapElements.push({item:this,width:t.outerWidth(),height:t.outerHeight(),top:e.top,left:e.left})})},drag:function(t,e,i){for(var s,n,o,a,r,l,h,c,u,d=i.options,p=d.snapTolerance,f=e.offset.left,g=f+i.helperProportions.width,m=e.offset.top,_=m+i.helperProportions.height,v=i.snapElements.length-1;0<=v;v--)l=(r=i.snapElements[v].left-i.margins.left)+i.snapElements[v].width,c=(h=i.snapElements[v].top-i.margins.top)+i.snapElements[v].height,g<r-p||l+p<f||_<h-p||c+p<m||!V.contains(i.snapElements[v].item.ownerDocument,i.snapElements[v].item)?(i.snapElements[v].snapping&&i.options.snap.release&&i.options.snap.release.call(i.element,t,V.extend(i._uiHash(),{snapItem:i.snapElements[v].item})),i.snapElements[v].snapping=!1):("inner"!==d.snapMode&&(s=Math.abs(h-_)<=p,n=Math.abs(c-m)<=p,o=Math.abs(r-g)<=p,a=Math.abs(l-f)<=p,s&&(e.position.top=i._convertPositionTo("relative",{top:h-i.helperProportions.height,left:0}).top),n&&(e.position.top=i._convertPositionTo("relative",{top:c,left:0}).top),o&&(e.position.left=i._convertPositionTo("relative",{top:0,left:r-i.helperProportions.width}).left),a)&&(e.position.left=i._convertPositionTo("relative",{top:0,left:l}).left),u=s||n||o||a,"outer"!==d.snapMode&&(s=Math.abs(h-m)<=p,n=Math.abs(c-_)<=p,o=Math.abs(r-f)<=p,a=Math.abs(l-g)<=p,s&&(e.position.top=i._convertPositionTo("relative",{top:h,left:0}).top),n&&(e.position.top=i._convertPositionTo("relative",{top:c-i.helperProportions.height,left:0}).top),o&&(e.position.left=i._convertPositionTo("relative",{top:0,left:r}).left),a)&&(e.position.left=i._convertPositionTo("relative",{top:0,left:l-i.helperProportions.width}).left),!i.snapElements[v].snapping&&(s||n||o||a||u)&&i.options.snap.snap&&i.options.snap.snap.call(i.element,t,V.extend(i._uiHash(),{snapItem:i.snapElements[v].item})),i.snapElements[v].snapping=s||n||o||a||u)}}),V.ui.plugin.add("draggable","stack",{start:function(t,e,i){var s,i=i.options,i=V.makeArray(V(i.stack)).sort(function(t,e){return(parseInt(V(t).css("zIndex"),10)||0)-(parseInt(V(e).css("zIndex"),10)||0)});i.length&&(s=parseInt(V(i[0]).css("zIndex"),10)||0,V(i).each(function(t){V(this).css("zIndex",s+t)}),this.css("zIndex",s+i.length))}}),V.ui.plugin.add("draggable","zIndex",{start:function(t,e,i){e=V(e.helper),i=i.options;e.css("zIndex")&&(i._zIndex=e.css("zIndex")),e.css("zIndex",i.zIndex)},stop:function(t,e,i){i=i.options;i._zIndex&&V(e.helper).css("zIndex",i._zIndex)}}),V.ui.draggable,V.widget("ui.resizable",V.ui.mouse,{version:"1.13.3",widgetEventPrefix:"resize",options:{alsoResize:!1,animate:!1,animateDuration:"slow",animateEasing:"swing",aspectRatio:!1,autoHide:!1,classes:{"ui-resizable-se":"ui-icon ui-icon-gripsmall-diagonal-se"},containment:!1,ghost:!1,grid:!1,handles:"e,s,se",helper:!1,maxHeight:null,maxWidth:null,minHeight:10,minWidth:10,zIndex:90,resize:null,start:null,stop:null},_num:function(t){return parseFloat(t)||0},_isNumber:function(t){return!isNaN(parseFloat(t))},_hasScroll:function(t,e){if("hidden"===V(t).css("overflow"))return!1;var e=e&&"left"===e?"scrollLeft":"scrollTop",i=!1;if(0<t[e])return!0;try{t[e]=1,i=0<t[e],t[e]=0}catch(t){}return i},_create:function(){var t,e=this.options,i=this;this._addClass("ui-resizable"),V.extend(this,{_aspectRatio:!!e.aspectRatio,aspectRatio:e.aspectRatio,originalElement:this.element,_proportionallyResizeElements:[],_helper:e.helper||e.ghost||e.animate?e.helper||"ui-resizable-helper":null}),this.element[0].nodeName.match(/^(canvas|textarea|input|select|button|img)$/i)&&(this.element.wrap(V("<div class='ui-wrapper'></div>").css({overflow:"hidden",position:this.element.css("position"),width:this.element.outerWidth(),height:this.element.outerHeight(),top:this.element.css("top"),left:this.element.css("left")})),this.element=this.element.parent().data("ui-resizable",this.element.resizable("instance")),this.elementIsWrapper=!0,t={marginTop:this.originalElement.css("marginTop"),marginRight:this.originalElement.css("marginRight"),marginBottom:this.originalElement.css("marginBottom"),marginLeft:this.originalElement.css("marginLeft")},this.element.css(t),this.originalElement.css("margin",0),this.originalResizeStyle=this.originalElement.css("resize"),this.originalElement.css("resize","none"),this._proportionallyResizeElements.push(this.originalElement.css({position:"static",zoom:1,display:"block"})),this.originalElement.css(t),this._proportionallyResize()),this._setupHandles(),e.autoHide&&V(this.element).on("mouseenter",function(){e.disabled||(i._removeClass("ui-resizable-autohide"),i._handles.show())}).on("mouseleave",function(){e.disabled||i.resizing||(i._addClass("ui-resizable-autohide"),i._handles.hide())}),this._mouseInit()},_destroy:function(){this._mouseDestroy(),this._addedHandles.remove();function t(t){V(t).removeData("resizable").removeData("ui-resizable").off(".resizable")}var e;return this.elementIsWrapper&&(t(this.element),e=this.element,this.originalElement.css({position:e.css("position"),width:e.outerWidth(),height:e.outerHeight(),top:e.css("top"),left:e.css("left")}).insertAfter(e),e.remove()),this.originalElement.css("resize",this.originalResizeStyle),t(this.originalElement),this},_setOption:function(t,e){switch(this._super(t,e),t){case"handles":this._removeHandles(),this._setupHandles();break;case"aspectRatio":this._aspectRatio=!!e}},_setupHandles:function(){var t,e,i,s,n,o=this.options,a=this;if(this.handles=o.handles||(V(".ui-resizable-handle",this.element).length?{n:".ui-resizable-n",e:".ui-resizable-e",s:".ui-resizable-s",w:".ui-resizable-w",se:".ui-resizable-se",sw:".ui-resizable-sw",ne:".ui-resizable-ne",nw:".ui-resizable-nw"}:"e,s,se"),this._handles=V(),this._addedHandles=V(),this.handles.constructor===String)for("all"===this.handles&&(this.handles="n,e,s,w,se,sw,ne,nw"),i=this.handles.split(","),this.handles={},e=0;e<i.length;e++)s="ui-resizable-"+(t=String.prototype.trim.call(i[e])),n=V("<div>"),this._addClass(n,"ui-resizable-handle "+s),n.css({zIndex:o.zIndex}),this.handles[t]=".ui-resizable-"+t,this.element.children(this.handles[t]).length||(this.element.append(n),this._addedHandles=this._addedHandles.add(n));this._renderAxis=function(t){var e,i,s;for(e in t=t||this.element,this.handles)this.handles[e].constructor===String?this.handles[e]=this.element.children(this.handles[e]).first().show():(this.handles[e].jquery||this.handles[e].nodeType)&&(this.handles[e]=V(this.handles[e]),this._on(this.handles[e],{mousedown:a._mouseDown})),this.elementIsWrapper&&this.originalElement[0].nodeName.match(/^(textarea|input|select|button)$/i)&&(s=V(this.handles[e],this.element),s=/sw|ne|nw|se|n|s/.test(e)?s.outerHeight():s.outerWidth(),i=["padding",/ne|nw|n/.test(e)?"Top":/se|sw|s/.test(e)?"Bottom":/^e$/.test(e)?"Right":"Left"].join(""),t.css(i,s),this._proportionallyResize()),this._handles=this._handles.add(this.handles[e])},this._renderAxis(this.element),this._handles=this._handles.add(this.element.find(".ui-resizable-handle")),this._handles.disableSelection(),this._handles.on("mouseover",function(){a.resizing||(this.className&&(n=this.className.match(/ui-resizable-(se|sw|ne|nw|n|e|s|w)/i)),a.axis=n&&n[1]?n[1]:"se")}),o.autoHide&&(this._handles.hide(),this._addClass("ui-resizable-autohide"))},_removeHandles:function(){this._addedHandles.remove()},_mouseCapture:function(t){var e,i,s=!1;for(e in this.handles)(i=V(this.handles[e])[0])!==t.target&&!V.contains(i,t.target)||(s=!0);return!this.options.disabled&&s},_mouseStart:function(t){var e,i,s=this.options,n=this.element;return this.resizing=!0,this._renderProxy(),e=this._num(this.helper.css("left")),i=this._num(this.helper.css("top")),s.containment&&(e+=V(s.containment).scrollLeft()||0,i+=V(s.containment).scrollTop()||0),this.offset=this.helper.offset(),this.position={left:e,top:i},this.size=this._helper?{width:this.helper.width(),height:this.helper.height()}:{width:n.width(),height:n.height()},this.originalSize=this._helper?{width:n.outerWidth(),height:n.outerHeight()}:{width:n.width(),height:n.height()},this.sizeDiff={width:n.outerWidth()-n.width(),height:n.outerHeight()-n.height()},this.originalPosition={left:e,top:i},this.originalMousePosition={left:t.pageX,top:t.pageY},this.aspectRatio="number"==typeof s.aspectRatio?s.aspectRatio:this.originalSize.width/this.originalSize.height||1,n=V(".ui-resizable-"+this.axis).css("cursor"),V("body").css("cursor","auto"===n?this.axis+"-resize":n),this._addClass("ui-resizable-resizing"),this._propagate("start",t),!0},_mouseDrag:function(t){var e=this.originalMousePosition,i=this.axis,s=t.pageX-e.left||0,e=t.pageY-e.top||0,i=this._change[i];return this._updatePrevProperties(),i&&(i=i.apply(this,[t,s,e]),this._updateVirtualBoundaries(t.shiftKey),(this._aspectRatio||t.shiftKey)&&(i=this._updateRatio(i,t)),i=this._respectSize(i,t),this._updateCache(i),this._propagate("resize",t),s=this._applyChanges(),!this._helper&&this._proportionallyResizeElements.length&&this._proportionallyResize(),V.isEmptyObject(s)||(this._updatePrevProperties(),this._trigger("resize",t,this.ui()),this._applyChanges())),!1},_mouseStop:function(t){this.resizing=!1;var e,i,s,n=this.options,o=this;return this._helper&&(i=(e=(i=this._proportionallyResizeElements).length&&/textarea/i.test(i[0].nodeName))&&this._hasScroll(i[0],"left")?0:o.sizeDiff.height,e=e?0:o.sizeDiff.width,e={width:o.helper.width()-e,height:o.helper.height()-i},i=parseFloat(o.element.css("left"))+(o.position.left-o.originalPosition.left)||null,s=parseFloat(o.element.css("top"))+(o.position.top-o.originalPosition.top)||null,n.animate||this.element.css(V.extend(e,{top:s,left:i})),o.helper.height(o.size.height),o.helper.width(o.size.width),this._helper)&&!n.animate&&this._proportionallyResize(),V("body").css("cursor","auto"),this._removeClass("ui-resizable-resizing"),this._propagate("stop",t),this._helper&&this.helper.remove(),!1},_updatePrevProperties:function(){this.prevPosition={top:this.position.top,left:this.position.left},this.prevSize={width:this.size.width,height:this.size.height}},_applyChanges:function(){var t={};return this.position.top!==this.prevPosition.top&&(t.top=this.position.top+"px"),this.position.left!==this.prevPosition.left&&(t.left=this.position.left+"px"),this.helper.css(t),this.size.width!==this.prevSize.width&&(t.width=this.size.width+"px",this.helper.width(t.width)),this.size.height!==this.prevSize.height&&(t.height=this.size.height+"px",this.helper.height(t.height)),t},_updateVirtualBoundaries:function(t){var e,i,s,n=this.options,n={minWidth:this._isNumber(n.minWidth)?n.minWidth:0,maxWidth:this._isNumber(n.maxWidth)?n.maxWidth:1/0,minHeight:this._isNumber(n.minHeight)?n.minHeight:0,maxHeight:this._isNumber(n.maxHeight)?n.maxHeight:1/0};(this._aspectRatio||t)&&(t=n.minHeight*this.aspectRatio,i=n.minWidth/this.aspectRatio,e=n.maxHeight*this.aspectRatio,s=n.maxWidth/this.aspectRatio,n.minWidth<t&&(n.minWidth=t),n.minHeight<i&&(n.minHeight=i),e<n.maxWidth&&(n.maxWidth=e),s<n.maxHeight)&&(n.maxHeight=s),this._vBoundaries=n},_updateCache:function(t){this.offset=this.helper.offset(),this._isNumber(t.left)&&(this.position.left=t.left),this._isNumber(t.top)&&(this.position.top=t.top),this._isNumber(t.height)&&(this.size.height=t.height),this._isNumber(t.width)&&(this.size.width=t.width)},_updateRatio:function(t){var e=this.position,i=this.size,s=this.axis;return this._isNumber(t.height)?t.width=t.height*this.aspectRatio:this._isNumber(t.width)&&(t.height=t.width/this.aspectRatio),"sw"===s&&(t.left=e.left+(i.width-t.width),t.top=null),"nw"===s&&(t.top=e.top+(i.height-t.height),t.left=e.left+(i.width-t.width)),t},_respectSize:function(t){var e=this._vBoundaries,i=this.axis,s=this._isNumber(t.width)&&e.maxWidth&&e.maxWidth<t.width,n=this._isNumber(t.height)&&e.maxHeight&&e.maxHeight<t.height,o=this._isNumber(t.width)&&e.minWidth&&e.minWidth>t.width,a=this._isNumber(t.height)&&e.minHeight&&e.minHeight>t.height,r=this.originalPosition.left+this.originalSize.width,l=this.originalPosition.top+this.originalSize.height,h=/sw|nw|w/.test(i),i=/nw|ne|n/.test(i);return o&&(t.width=e.minWidth),a&&(t.height=e.minHeight),s&&(t.width=e.maxWidth),n&&(t.height=e.maxHeight),o&&h&&(t.left=r-e.minWidth),s&&h&&(t.left=r-e.maxWidth),a&&i&&(t.top=l-e.minHeight),n&&i&&(t.top=l-e.maxHeight),t.width||t.height||t.left||!t.top?t.width||t.height||t.top||!t.left||(t.left=null):t.top=null,t},_getPaddingPlusBorderDimensions:function(t){for(var e=0,i=[],s=[t.css("borderTopWidth"),t.css("borderRightWidth"),t.css("borderBottomWidth"),t.css("borderLeftWidth")],n=[t.css("paddingTop"),t.css("paddingRight"),t.css("paddingBottom"),t.css("paddingLeft")];e<4;e++)i[e]=parseFloat(s[e])||0,i[e]+=parseFloat(n[e])||0;return{height:i[0]+i[2],width:i[1]+i[3]}},_proportionallyResize:function(){if(this._proportionallyResizeElements.length)for(var t,e=0,i=this.helper||this.element;e<this._proportionallyResizeElements.length;e++)t=this._proportionallyResizeElements[e],this.outerDimensions||(this.outerDimensions=this._getPaddingPlusBorderDimensions(t)),t.css({height:i.height()-this.outerDimensions.height||0,width:i.width()-this.outerDimensions.width||0})},_renderProxy:function(){var t=this.element,e=this.options;this.elementOffset=t.offset(),this._helper?(this.helper=this.helper||V("<div></div>").css({overflow:"hidden"}),this._addClass(this.helper,this._helper),this.helper.css({width:this.element.outerWidth(),height:this.element.outerHeight(),position:"absolute",left:this.elementOffset.left+"px",top:this.elementOffset.top+"px",zIndex:++e.zIndex}),this.helper.appendTo("body").disableSelection()):this.helper=this.element},_change:{e:function(t,e){return{width:this.originalSize.width+e}},w:function(t,e){var i=this.originalSize;return{left:this.originalPosition.left+e,width:i.width-e}},n:function(t,e,i){var s=this.originalSize;return{top:this.originalPosition.top+i,height:s.height-i}},s:function(t,e,i){return{height:this.originalSize.height+i}},se:function(t,e,i){return V.extend(this._change.s.apply(this,arguments),this._change.e.apply(this,[t,e,i]))},sw:function(t,e,i){return V.extend(this._change.s.apply(this,arguments),this._change.w.apply(this,[t,e,i]))},ne:function(t,e,i){return V.extend(this._change.n.apply(this,arguments),this._change.e.apply(this,[t,e,i]))},nw:function(t,e,i){return V.extend(this._change.n.apply(this,arguments),this._change.w.apply(this,[t,e,i]))}},_propagate:function(t,e){V.ui.plugin.call(this,t,[e,this.ui()]),"resize"!==t&&this._trigger(t,e,this.ui())},plugins:{},ui:function(){return{originalElement:this.originalElement,element:this.element,helper:this.helper,position:this.position,size:this.size,originalSize:this.originalSize,originalPosition:this.originalPosition}}}),V.ui.plugin.add("resizable","animate",{stop:function(e){var i=V(this).resizable("instance"),t=i.options,s=i._proportionallyResizeElements,n=s.length&&/textarea/i.test(s[0].nodeName),o=n&&i._hasScroll(s[0],"left")?0:i.sizeDiff.height,n=n?0:i.sizeDiff.width,n={width:i.size.width-n,height:i.size.height-o},o=parseFloat(i.element.css("left"))+(i.position.left-i.originalPosition.left)||null,a=parseFloat(i.element.css("top"))+(i.position.top-i.originalPosition.top)||null;i.element.animate(V.extend(n,a&&o?{top:a,left:o}:{}),{duration:t.animateDuration,easing:t.animateEasing,step:function(){var t={width:parseFloat(i.element.css("width")),height:parseFloat(i.element.css("height")),top:parseFloat(i.element.css("top")),left:parseFloat(i.element.css("left"))};s&&s.length&&V(s[0]).css({width:t.width,height:t.height}),i._updateCache(t),i._propagate("resize",e)}})}}),V.ui.plugin.add("resizable","containment",{start:function(){var i,s,t,e,n=V(this).resizable("instance"),o=n.options,a=n.element,o=o.containment,a=o instanceof V?o.get(0):/parent/.test(o)?a.parent().get(0):o;a&&(n.containerElement=V(a),/document/.test(o)||o===document?(n.containerOffset={left:0,top:0},n.containerPosition={left:0,top:0},n.parentData={element:V(document),left:0,top:0,width:V(document).width(),height:V(document).height()||document.body.parentNode.scrollHeight}):(i=V(a),s=[],V(["Top","Right","Left","Bottom"]).each(function(t,e){s[t]=n._num(i.css("padding"+e))}),n.containerOffset=i.offset(),n.containerPosition=i.position(),n.containerSize={height:i.innerHeight()-s[3],width:i.innerWidth()-s[1]},o=n.containerOffset,e=n.containerSize.height,t=n.containerSize.width,t=n._hasScroll(a,"left")?a.scrollWidth:t,e=n._hasScroll(a)?a.scrollHeight:e,n.parentData={element:a,left:o.left,top:o.top,width:t,height:e}))},resize:function(t){var e=V(this).resizable("instance"),i=e.options,s=e.containerOffset,n=e.position,t=e._aspectRatio||t.shiftKey,o={top:0,left:0},a=e.containerElement,r=!0;a[0]!==document&&/static/.test(a.css("position"))&&(o=s),n.left<(e._helper?s.left:0)&&(e.size.width=e.size.width+(e._helper?e.position.left-s.left:e.position.left-o.left),t&&(e.size.height=e.size.width/e.aspectRatio,r=!1),e.position.left=i.helper?s.left:0),n.top<(e._helper?s.top:0)&&(e.size.height=e.size.height+(e._helper?e.position.top-s.top:e.position.top),t&&(e.size.width=e.size.height*e.aspectRatio,r=!1),e.position.top=e._helper?s.top:0),a=e.containerElement.get(0)===e.element.parent().get(0),i=/relative|absolute/.test(e.containerElement.css("position")),a&&i?(e.offset.left=e.parentData.left+e.position.left,e.offset.top=e.parentData.top+e.position.top):(e.offset.left=e.element.offset().left,e.offset.top=e.element.offset().top),n=Math.abs(e.sizeDiff.width+(e._helper?e.offset.left-o.left:e.offset.left-s.left)),a=Math.abs(e.sizeDiff.height+(e._helper?e.offset.top-o.top:e.offset.top-s.top)),n+e.size.width>=e.parentData.width&&(e.size.width=e.parentData.width-n,t)&&(e.size.height=e.size.width/e.aspectRatio,r=!1),a+e.size.height>=e.parentData.height&&(e.size.height=e.parentData.height-a,t)&&(e.size.width=e.size.height*e.aspectRatio,r=!1),r||(e.position.left=e.prevPosition.left,e.position.top=e.prevPosition.top,e.size.width=e.prevSize.width,e.size.height=e.prevSize.height)},stop:function(){var t=V(this).resizable("instance"),e=t.options,i=t.containerOffset,s=t.containerPosition,n=t.containerElement,o=V(t.helper),a=o.offset(),r=o.outerWidth()-t.sizeDiff.width,o=o.outerHeight()-t.sizeDiff.height;t._helper&&!e.animate&&/relative/.test(n.css("position"))&&V(this).css({left:a.left-s.left-i.left,width:r,height:o}),t._helper&&!e.animate&&/static/.test(n.css("position"))&&V(this).css({left:a.left-s.left-i.left,width:r,height:o})}}),V.ui.plugin.add("resizable","alsoResize",{start:function(){var t=V(this).resizable("instance").options;V(t.alsoResize).each(function(){var t=V(this);t.data("ui-resizable-alsoresize",{width:parseFloat(t.css("width")),height:parseFloat(t.css("height")),left:parseFloat(t.css("left")),top:parseFloat(t.css("top"))})})},resize:function(t,i){var e=V(this).resizable("instance"),s=e.options,n=e.originalSize,o=e.originalPosition,a={height:e.size.height-n.height||0,width:e.size.width-n.width||0,top:e.position.top-o.top||0,left:e.position.left-o.left||0};V(s.alsoResize).each(function(){var t=V(this),s=V(this).data("ui-resizable-alsoresize"),n={},e=t.parents(i.originalElement[0]).length?["width","height"]:["width","height","top","left"];V.each(e,function(t,e){var i=(s[e]||0)+(a[e]||0);i&&0<=i&&(n[e]=i||null)}),t.css(n)})},stop:function(){V(this).removeData("ui-resizable-alsoresize")}}),V.ui.plugin.add("resizable","ghost",{start:function(){var t=V(this).resizable("instance"),e=t.size;t.ghost=t.originalElement.clone(),t.ghost.css({opacity:.25,display:"block",position:"relative",height:e.height,width:e.width,margin:0,left:0,top:0}),t._addClass(t.ghost,"ui-resizable-ghost"),!1!==V.uiBackCompat&&"string"==typeof t.options.ghost&&t.ghost.addClass(this.options.ghost),t.ghost.appendTo(t.helper)},resize:function(){var t=V(this).resizable("instance");t.ghost&&t.ghost.css({position:"relative",height:t.size.height,width:t.size.width})},stop:function(){var t=V(this).resizable("instance");t.ghost&&t.helper&&t.helper.get(0).removeChild(t.ghost.get(0))}}),V.ui.plugin.add("resizable","grid",{resize:function(){var t,e=V(this).resizable("instance"),i=e.options,s=e.size,n=e.originalSize,o=e.originalPosition,a=e.axis,r="number"==typeof i.grid?[i.grid,i.grid]:i.grid,l=r[0]||1,h=r[1]||1,c=Math.round((s.width-n.width)/l)*l,s=Math.round((s.height-n.height)/h)*h,u=n.width+c,d=n.height+s,p=i.maxWidth&&i.maxWidth<u,f=i.maxHeight&&i.maxHeight<d,g=i.minWidth&&i.minWidth>u,m=i.minHeight&&i.minHeight>d;i.grid=r,g&&(u+=l),m&&(d+=h),p&&(u-=l),f&&(d-=h),/^(se|s|e)$/.test(a)?(e.size.width=u,e.size.height=d):/^(ne)$/.test(a)?(e.size.width=u,e.size.height=d,e.position.top=o.top-s):/^(sw)$/.test(a)?(e.size.width=u,e.size.height=d,e.position.left=o.left-c):((d-h<=0||u-l<=0)&&(t=e._getPaddingPlusBorderDimensions(this)),0<d-h?(e.size.height=d,e.position.top=o.top-s):(d=h-t.height,e.size.height=d,e.position.top=o.top+n.height-d),0<u-l?(e.size.width=u,e.position.left=o.left-c):(u=l-t.width,e.size.width=u,e.position.left=o.left+n.width-u))}}),V.ui.resizable,V.widget("ui.dialog",{version:"1.13.3",options:{appendTo:"body",autoOpen:!0,buttons:[],classes:{"ui-dialog":"ui-corner-all","ui-dialog-titlebar":"ui-corner-all"},closeOnEscape:!0,closeText:"Close",draggable:!0,hide:null,height:"auto",maxHeight:null,maxWidth:null,minHeight:150,minWidth:150,modal:!1,position:{my:"center",at:"center",of:window,collision:"fit",using:function(t){var e=V(this).css(t).offset().top;e<0&&V(this).css("top",t.top-e)}},resizable:!0,show:null,title:null,width:300,beforeClose:null,close:null,drag:null,dragStart:null,dragStop:null,focus:null,open:null,resize:null,resizeStart:null,resizeStop:null},sizeRelatedOptions:{buttons:!0,height:!0,maxHeight:!0,maxWidth:!0,minHeight:!0,minWidth:!0,width:!0},resizableRelatedOptions:{maxHeight:!0,maxWidth:!0,minHeight:!0,minWidth:!0},_create:function(){this.originalCss={display:this.element[0].style.display,width:this.element[0].style.width,minHeight:this.element[0].style.minHeight,maxHeight:this.element[0].style.maxHeight,height:this.element[0].style.height},this.originalPosition={parent:this.element.parent(),index:this.element.parent().children().index(this.element)},this.originalTitle=this.element.attr("title"),null==this.options.title&&null!=this.originalTitle&&(this.options.title=this.originalTitle),this.options.disabled&&(this.options.disabled=!1),this._createWrapper(),this.element.show().removeAttr("title").appendTo(this.uiDialog),this._addClass("ui-dialog-content","ui-widget-content"),this._createTitlebar(),this._createButtonPane(),this.options.draggable&&V.fn.draggable&&this._makeDraggable(),this.options.resizable&&V.fn.resizable&&this._makeResizable(),this._isOpen=!1,this._trackFocus()},_init:function(){this.options.autoOpen&&this.open()},_appendTo:function(){var t=this.options.appendTo;return t&&(t.jquery||t.nodeType)?V(t):this.document.find(t||"body").eq(0)},_destroy:function(){var t,e=this.originalPosition;this._untrackInstance(),this._destroyOverlay(),this.element.removeUniqueId().css(this.originalCss).detach(),this.uiDialog.remove(),this.originalTitle&&this.element.attr("title",this.originalTitle),(t=e.parent.children().eq(e.index)).length&&t[0]!==this.element[0]?t.before(this.element):e.parent.append(this.element)},widget:function(){return this.uiDialog},disable:V.noop,enable:V.noop,close:function(t){var e=this;this._isOpen&&!1!==this._trigger("beforeClose",t)&&(this._isOpen=!1,this._focusedElement=null,this._destroyOverlay(),this._untrackInstance(),this.opener.filter(":focusable").trigger("focus").length||V.ui.safeBlur(V.ui.safeActiveElement(this.document[0])),this._hide(this.uiDialog,this.options.hide,function(){e._trigger("close",t)}))},isOpen:function(){return this._isOpen},moveToTop:function(){this._moveToTop()},_moveToTop:function(t,e){var i=!1,s=this.uiDialog.siblings(".ui-front:visible").map(function(){return+V(this).css("z-index")}).get(),s=Math.max.apply(null,s);return s>=+this.uiDialog.css("z-index")&&(this.uiDialog.css("z-index",s+1),i=!0),i&&!e&&this._trigger("focus",t),i},open:function(){var t=this;this._isOpen?this._moveToTop()&&this._focusTabbable():(this._isOpen=!0,this.opener=V(V.ui.safeActiveElement(this.document[0])),this._size(),this._position(),this._createOverlay(),this._moveToTop(null,!0),this.overlay&&this.overlay.css("z-index",this.uiDialog.css("z-index")-1),this._show(this.uiDialog,this.options.show,function(){t._focusTabbable(),t._trigger("focus")}),this._makeFocusTarget(),this._trigger("open"))},_focusTabbable:function(){var t=this._focusedElement;(t=(t=(t=(t=(t=t||this.element.find("[autofocus]")).length?t:this.element.find(":tabbable")).length?t:this.uiDialogButtonPane.find(":tabbable")).length?t:this.uiDialogTitlebarClose.filter(":tabbable")).length?t:this.uiDialog).eq(0).trigger("focus")},_restoreTabbableFocus:function(){var t=V.ui.safeActiveElement(this.document[0]);this.uiDialog[0]===t||V.contains(this.uiDialog[0],t)||this._focusTabbable()},_keepFocus:function(t){t.preventDefault(),this._restoreTabbableFocus(),this._delay(this._restoreTabbableFocus)},_createWrapper:function(){this.uiDialog=V("<div>").hide().attr({tabIndex:-1,role:"dialog"}).appendTo(this._appendTo()),this._addClass(this.uiDialog,"ui-dialog","ui-widget ui-widget-content ui-front"),this._on(this.uiDialog,{keydown:function(t){var e,i,s;this.options.closeOnEscape&&!t.isDefaultPrevented()&&t.keyCode&&t.keyCode===V.ui.keyCode.ESCAPE?(t.preventDefault(),this.close(t)):t.keyCode!==V.ui.keyCode.TAB||t.isDefaultPrevented()||(e=this.uiDialog.find(":tabbable"),i=e.first(),s=e.last(),t.target!==s[0]&&t.target!==this.uiDialog[0]||t.shiftKey?t.target!==i[0]&&t.target!==this.uiDialog[0]||!t.shiftKey||(this._delay(function(){s.trigger("focus")}),t.preventDefault()):(this._delay(function(){i.trigger("focus")}),t.preventDefault()))},mousedown:function(t){this._moveToTop(t)&&this._focusTabbable()}}),this.element.find("[aria-describedby]").length||this.uiDialog.attr({"aria-describedby":this.element.uniqueId().attr("id")})},_createTitlebar:function(){var t;this.uiDialogTitlebar=V("<div>"),this._addClass(this.uiDialogTitlebar,"ui-dialog-titlebar","ui-widget-header ui-helper-clearfix"),this._on(this.uiDialogTitlebar,{mousedown:function(t){V(t.target).closest(".ui-dialog-titlebar-close")||this.uiDialog.trigger("focus")}}),this.uiDialogTitlebarClose=V("<button type='button'></button>").button({label:V("<a>").text(this.options.closeText).html(),icon:"ui-icon-closethick",showLabel:!1}).appendTo(this.uiDialogTitlebar),this._addClass(this.uiDialogTitlebarClose,"ui-dialog-titlebar-close"),this._on(this.uiDialogTitlebarClose,{click:function(t){t.preventDefault(),this.close(t)}}),t=V("<span>").uniqueId().prependTo(this.uiDialogTitlebar),this._addClass(t,"ui-dialog-title"),this._title(t),this.uiDialogTitlebar.prependTo(this.uiDialog),this.uiDialog.attr({"aria-labelledby":t.attr("id")})},_title:function(t){this.options.title?t.text(this.options.title):t.html(" ")},_createButtonPane:function(){this.uiDialogButtonPane=V("<div>"),this._addClass(this.uiDialogButtonPane,"ui-dialog-buttonpane","ui-widget-content ui-helper-clearfix"),this.uiButtonSet=V("<div>").appendTo(this.uiDialogButtonPane),this._addClass(this.uiButtonSet,"ui-dialog-buttonset"),this._createButtons()},_createButtons:function(){var s=this,t=this.options.buttons;this.uiDialogButtonPane.remove(),this.uiButtonSet.empty(),V.isEmptyObject(t)||Array.isArray(t)&&!t.length?this._removeClass(this.uiDialog,"ui-dialog-buttons"):(V.each(t,function(t,e){var i;e=V.extend({type:"button"},e="function"==typeof e?{click:e,text:t}:e),i=e.click,t={icon:e.icon,iconPosition:e.iconPosition,showLabel:e.showLabel,icons:e.icons,text:e.text},delete e.click,delete e.icon,delete e.iconPosition,delete e.showLabel,delete e.icons,"boolean"==typeof e.text&&delete e.text,V("<button></button>",e).button(t).appendTo(s.uiButtonSet).on("click",function(){i.apply(s.element[0],arguments)})}),this._addClass(this.uiDialog,"ui-dialog-buttons"),this.uiDialogButtonPane.appendTo(this.uiDialog))},_makeDraggable:function(){var n=this,o=this.options;function a(t){return{position:t.position,offset:t.offset}}this.uiDialog.draggable({cancel:".ui-dialog-content, .ui-dialog-titlebar-close",handle:".ui-dialog-titlebar",containment:"document",start:function(t,e){n._addClass(V(this),"ui-dialog-dragging"),n._blockFrames(),n._trigger("dragStart",t,a(e))},drag:function(t,e){n._trigger("drag",t,a(e))},stop:function(t,e){var i=e.offset.left-n.document.scrollLeft(),s=e.offset.top-n.document.scrollTop();o.position={my:"left top",at:"left"+(0<=i?"+":"")+i+" top"+(0<=s?"+":"")+s,of:n.window},n._removeClass(V(this),"ui-dialog-dragging"),n._unblockFrames(),n._trigger("dragStop",t,a(e))}})},_makeResizable:function(){var n=this,o=this.options,t=o.resizable,e=this.uiDialog.css("position"),t="string"==typeof t?t:"n,e,s,w,se,sw,ne,nw";function a(t){return{originalPosition:t.originalPosition,originalSize:t.originalSize,position:t.position,size:t.size}}this.uiDialog.resizable({cancel:".ui-dialog-content",containment:"document",alsoResize:this.element,maxWidth:o.maxWidth,maxHeight:o.maxHeight,minWidth:o.minWidth,minHeight:this._minHeight(),handles:t,start:function(t,e){n._addClass(V(this),"ui-dialog-resizing"),n._blockFrames(),n._trigger("resizeStart",t,a(e))},resize:function(t,e){n._trigger("resize",t,a(e))},stop:function(t,e){var i=n.uiDialog.offset(),s=i.left-n.document.scrollLeft(),i=i.top-n.document.scrollTop();o.height=n.uiDialog.height(),o.width=n.uiDialog.width(),o.position={my:"left top",at:"left"+(0<=s?"+":"")+s+" top"+(0<=i?"+":"")+i,of:n.window},n._removeClass(V(this),"ui-dialog-resizing"),n._unblockFrames(),n._trigger("resizeStop",t,a(e))}}).css("position",e)},_trackFocus:function(){this._on(this.widget(),{focusin:function(t){this._makeFocusTarget(),this._focusedElement=V(t.target)}})},_makeFocusTarget:function(){this._untrackInstance(),this._trackingInstances().unshift(this)},_untrackInstance:function(){var t=this._trackingInstances(),e=V.inArray(this,t);-1!==e&&t.splice(e,1)},_trackingInstances:function(){var t=this.document.data("ui-dialog-instances");return t||this.document.data("ui-dialog-instances",t=[]),t},_minHeight:function(){var t=this.options;return"auto"===t.height?t.minHeight:Math.min(t.minHeight,t.height)},_position:function(){var t=this.uiDialog.is(":visible");t||this.uiDialog.show(),this.uiDialog.position(this.options.position),t||this.uiDialog.hide()},_setOptions:function(t){var i=this,s=!1,n={};V.each(t,function(t,e){i._setOption(t,e),t in i.sizeRelatedOptions&&(s=!0),t in i.resizableRelatedOptions&&(n[t]=e)}),s&&(this._size(),this._position()),this.uiDialog.is(":data(ui-resizable)")&&this.uiDialog.resizable("option",n)},_setOption:function(t,e){var i,s=this.uiDialog;"disabled"!==t&&(this._super(t,e),"appendTo"===t&&this.uiDialog.appendTo(this._appendTo()),"buttons"===t&&this._createButtons(),"closeText"===t&&this.uiDialogTitlebarClose.button({label:V("<a>").text(""+this.options.closeText).html()}),"draggable"===t&&((i=s.is(":data(ui-draggable)"))&&!e&&s.draggable("destroy"),!i)&&e&&this._makeDraggable(),"position"===t&&this._position(),"resizable"===t&&((i=s.is(":data(ui-resizable)"))&&!e&&s.resizable("destroy"),i&&"string"==typeof e&&s.resizable("option","handles",e),i||!1===e||this._makeResizable()),"title"===t)&&this._title(this.uiDialogTitlebar.find(".ui-dialog-title"))},_size:function(){var t,e,i,s=this.options;this.element.show().css({width:"auto",minHeight:0,maxHeight:"none",height:0}),s.minWidth>s.width&&(s.width=s.minWidth),t=this.uiDialog.css({height:"auto",width:s.width}).outerHeight(),e=Math.max(0,s.minHeight-t),i="number"==typeof s.maxHeight?Math.max(0,s.maxHeight-t):"none","auto"===s.height?this.element.css({minHeight:e,maxHeight:i,height:"auto"}):this.element.height(Math.max(0,s.height-t)),this.uiDialog.is(":data(ui-resizable)")&&this.uiDialog.resizable("option","minHeight",this._minHeight())},_blockFrames:function(){this.iframeBlocks=this.document.find("iframe").map(function(){var t=V(this);return V("<div>").css({position:"absolute",width:t.outerWidth(),height:t.outerHeight()}).appendTo(t.parent()).offset(t.offset())[0]})},_unblockFrames:function(){this.iframeBlocks&&(this.iframeBlocks.remove(),delete this.iframeBlocks)},_allowInteraction:function(t){return!!V(t.target).closest(".ui-dialog").length||!!V(t.target).closest(".ui-datepicker").length},_createOverlay:function(){var i,s;this.options.modal&&(i=V.fn.jquery.substring(0,4),s=!0,this._delay(function(){s=!1}),this.document.data("ui-dialog-overlays")||this.document.on("focusin.ui-dialog",function(t){var e;s||(e=this._trackingInstances()[0])._allowInteraction(t)||(t.preventDefault(),e._focusTabbable(),"3.4."!==i&&"3.5."!==i&&"3.6."!==i)||e._delay(e._restoreTabbableFocus)}.bind(this)),this.overlay=V("<div>").appendTo(this._appendTo()),this._addClass(this.overlay,null,"ui-widget-overlay ui-front"),this._on(this.overlay,{mousedown:"_keepFocus"}),this.document.data("ui-dialog-overlays",(this.document.data("ui-dialog-overlays")||0)+1))},_destroyOverlay:function(){var t;this.options.modal&&this.overlay&&((t=this.document.data("ui-dialog-overlays")-1)?this.document.data("ui-dialog-overlays",t):(this.document.off("focusin.ui-dialog"),this.document.removeData("ui-dialog-overlays")),this.overlay.remove(),this.overlay=null)}}),!1!==V.uiBackCompat&&V.widget("ui.dialog",V.ui.dialog,{options:{dialogClass:""},_createWrapper:function(){this._super(),this.uiDialog.addClass(this.options.dialogClass)},_setOption:function(t,e){"dialogClass"===t&&this.uiDialog.removeClass(this.options.dialogClass).addClass(e),this._superApply(arguments)}}),V.ui.dialog;function ct(t,e,i){return e<=t&&t<e+i}V.widget("ui.droppable",{version:"1.13.3",widgetEventPrefix:"drop",options:{accept:"*",addClasses:!0,greedy:!1,scope:"default",tolerance:"intersect",activate:null,deactivate:null,drop:null,out:null,over:null},_create:function(){var t,e=this.options,i=e.accept;this.isover=!1,this.isout=!0,this.accept="function"==typeof i?i:function(t){return t.is(i)},this.proportions=function(){if(!arguments.length)return t=t||{width:this.element[0].offsetWidth,height:this.element[0].offsetHeight};t=arguments[0]},this._addToManager(e.scope),e.addClasses&&this._addClass("ui-droppable")},_addToManager:function(t){V.ui.ddmanager.droppables[t]=V.ui.ddmanager.droppables[t]||[],V.ui.ddmanager.droppables[t].push(this)},_splice:function(t){for(var e=0;e<t.length;e++)t[e]===this&&t.splice(e,1)},_destroy:function(){var t=V.ui.ddmanager.droppables[this.options.scope];this._splice(t)},_setOption:function(t,e){var i;"accept"===t?this.accept="function"==typeof e?e:function(t){return t.is(e)}:"scope"===t&&(i=V.ui.ddmanager.droppables[this.options.scope],this._splice(i),this._addToManager(e)),this._super(t,e)},_activate:function(t){var e=V.ui.ddmanager.current;this._addActiveClass(),e&&this._trigger("activate",t,this.ui(e))},_deactivate:function(t){var e=V.ui.ddmanager.current;this._removeActiveClass(),e&&this._trigger("deactivate",t,this.ui(e))},_over:function(t){var e=V.ui.ddmanager.current;e&&(e.currentItem||e.element)[0]!==this.element[0]&&this.accept.call(this.element[0],e.currentItem||e.element)&&(this._addHoverClass(),this._trigger("over",t,this.ui(e)))},_out:function(t){var e=V.ui.ddmanager.current;e&&(e.currentItem||e.element)[0]!==this.element[0]&&this.accept.call(this.element[0],e.currentItem||e.element)&&(this._removeHoverClass(),this._trigger("out",t,this.ui(e)))},_drop:function(e,t){var i=t||V.ui.ddmanager.current,s=!1;return!(!i||(i.currentItem||i.element)[0]===this.element[0]||(this.element.find(":data(ui-droppable)").not(".ui-draggable-dragging").each(function(){var t=V(this).droppable("instance");if(t.options.greedy&&!t.options.disabled&&t.options.scope===i.options.scope&&t.accept.call(t.element[0],i.currentItem||i.element)&&V.ui.intersect(i,V.extend(t,{offset:t.element.offset()}),t.options.tolerance,e))return!(s=!0)}),s)||!this.accept.call(this.element[0],i.currentItem||i.element))&&(this._removeActiveClass(),this._removeHoverClass(),this._trigger("drop",e,this.ui(i)),this.element)},ui:function(t){return{draggable:t.currentItem||t.element,helper:t.helper,position:t.position,offset:t.positionAbs}},_addHoverClass:function(){this._addClass("ui-droppable-hover")},_removeHoverClass:function(){this._removeClass("ui-droppable-hover")},_addActiveClass:function(){this._addClass("ui-droppable-active")},_removeActiveClass:function(){this._removeClass("ui-droppable-active")}}),V.ui.intersect=function(t,e,i,s){if(!e.offset)return!1;var n=(t.positionAbs||t.position.absolute).left+t.margins.left,o=(t.positionAbs||t.position.absolute).top+t.margins.top,a=n+t.helperProportions.width,r=o+t.helperProportions.height,l=e.offset.left,h=e.offset.top,c=l+e.proportions().width,u=h+e.proportions().height;switch(i){case"fit":return l<=n&&a<=c&&h<=o&&r<=u;case"intersect":return l<n+t.helperProportions.width/2&&a-t.helperProportions.width/2<c&&h<o+t.helperProportions.height/2&&r-t.helperProportions.height/2<u;case"pointer":return ct(s.pageY,h,e.proportions().height)&&ct(s.pageX,l,e.proportions().width);case"touch":return(h<=o&&o<=u||h<=r&&r<=u||o<h&&u<r)&&(l<=n&&n<=c||l<=a&&a<=c||n<l&&c<a);default:return!1}},!(V.ui.ddmanager={current:null,droppables:{default:[]},prepareOffsets:function(t,e){var i,s,n=V.ui.ddmanager.droppables[t.options.scope]||[],o=e?e.type:null,a=(t.currentItem||t.element).find(":data(ui-droppable)").addBack();t:for(i=0;i<n.length;i++)if(!(n[i].options.disabled||t&&!n[i].accept.call(n[i].element[0],t.currentItem||t.element))){for(s=0;s<a.length;s++)if(a[s]===n[i].element[0]){n[i].proportions().height=0;continue t}n[i].visible="none"!==n[i].element.css("display"),n[i].visible&&("mousedown"===o&&n[i]._activate.call(n[i],e),n[i].offset=n[i].element.offset(),n[i].proportions({width:n[i].element[0].offsetWidth,height:n[i].element[0].offsetHeight}))}},drop:function(t,e){var i=!1;return V.each((V.ui.ddmanager.droppables[t.options.scope]||[]).slice(),function(){this.options&&(!this.options.disabled&&this.visible&&V.ui.intersect(t,this,this.options.tolerance,e)&&(i=this._drop.call(this,e)||i),!this.options.disabled)&&this.visible&&this.accept.call(this.element[0],t.currentItem||t.element)&&(this.isout=!0,this.isover=!1,this._deactivate.call(this,e))}),i},dragStart:function(t,e){t.element.parentsUntil("body").on("scroll.droppable",function(){t.options.refreshPositions||V.ui.ddmanager.prepareOffsets(t,e)})},drag:function(n,o){n.options.refreshPositions&&V.ui.ddmanager.prepareOffsets(n,o),V.each(V.ui.ddmanager.droppables[n.options.scope]||[],function(){var t,e,i,s;this.options.disabled||this.greedyChild||!this.visible||(s=!(s=V.ui.intersect(n,this,this.options.tolerance,o))&&this.isover?"isout":s&&!this.isover?"isover":null)&&(this.options.greedy&&(e=this.options.scope,(i=this.element.parents(":data(ui-droppable)").filter(function(){return V(this).droppable("instance").options.scope===e})).length)&&((t=V(i[0]).droppable("instance")).greedyChild="isover"===s),t&&"isover"===s&&(t.isover=!1,t.isout=!0,t._out.call(t,o)),this[s]=!0,this["isout"===s?"isover":"isout"]=!1,this["isover"===s?"_over":"_out"].call(this,o),t)&&"isout"===s&&(t.isout=!1,t.isover=!0,t._over.call(t,o))})},dragStop:function(t,e){t.element.parentsUntil("body").off("scroll.droppable"),t.options.refreshPositions||V.ui.ddmanager.prepareOffsets(t,e)}})!==V.uiBackCompat&&V.widget("ui.droppable",V.ui.droppable,{options:{hoverClass:!1,activeClass:!1},_addActiveClass:function(){this._super(),this.options.activeClass&&this.element.addClass(this.options.activeClass)},_removeActiveClass:function(){this._super(),this.options.activeClass&&this.element.removeClass(this.options.activeClass)},_addHoverClass:function(){this._super(),this.options.hoverClass&&this.element.addClass(this.options.hoverClass)},_removeHoverClass:function(){this._super(),this.options.hoverClass&&this.element.removeClass(this.options.hoverClass)}});V.ui.droppable,V.widget("ui.progressbar",{version:"1.13.3",options:{classes:{"ui-progressbar":"ui-corner-all","ui-progressbar-value":"ui-corner-left","ui-progressbar-complete":"ui-corner-right"},max:100,value:0,change:null,complete:null},min:0,_create:function(){this.oldValue=this.options.value=this._constrainedValue(),this.element.attr({role:"progressbar","aria-valuemin":this.min}),this._addClass("ui-progressbar","ui-widget ui-widget-content"),this.valueDiv=V("<div>").appendTo(this.element),this._addClass(this.valueDiv,"ui-progressbar-value","ui-widget-header"),this._refreshValue()},_destroy:function(){this.element.removeAttr("role aria-valuemin aria-valuemax aria-valuenow"),this.valueDiv.remove()},value:function(t){if(void 0===t)return this.options.value;this.options.value=this._constrainedValue(t),this._refreshValue()},_constrainedValue:function(t){return void 0===t&&(t=this.options.value),this.indeterminate=!1===t,"number"!=typeof t&&(t=0),!this.indeterminate&&Math.min(this.options.max,Math.max(this.min,t))},_setOptions:function(t){var e=t.value;delete t.value,this._super(t),this.options.value=this._constrainedValue(e),this._refreshValue()},_setOption:function(t,e){"max"===t&&(e=Math.max(this.min,e)),this._super(t,e)},_setOptionDisabled:function(t){this._super(t),this.element.attr("aria-disabled",t),this._toggleClass(null,"ui-state-disabled",!!t)},_percentage:function(){return this.indeterminate?100:100*(this.options.value-this.min)/(this.options.max-this.min)},_refreshValue:function(){var t=this.options.value,e=this._percentage();this.valueDiv.toggle(this.indeterminate||t>this.min).width(e.toFixed(0)+"%"),this._toggleClass(this.valueDiv,"ui-progressbar-complete",null,t===this.options.max)._toggleClass("ui-progressbar-indeterminate",null,this.indeterminate),this.indeterminate?(this.element.removeAttr("aria-valuenow"),this.overlayDiv||(this.overlayDiv=V("<div>").appendTo(this.valueDiv),this._addClass(this.overlayDiv,"ui-progressbar-overlay"))):(this.element.attr({"aria-valuemax":this.options.max,"aria-valuenow":t}),this.overlayDiv&&(this.overlayDiv.remove(),this.overlayDiv=null)),this.oldValue!==t&&(this.oldValue=t,this._trigger("change")),t===this.options.max&&this._trigger("complete")}}),V.widget("ui.selectable",V.ui.mouse,{version:"1.13.3",options:{appendTo:"body",autoRefresh:!0,distance:0,filter:"*",tolerance:"touch",selected:null,selecting:null,start:null,stop:null,unselected:null,unselecting:null},_create:function(){var i=this;this._addClass("ui-selectable"),this.dragged=!1,this.refresh=function(){i.elementPos=V(i.element[0]).offset(),i.selectees=V(i.options.filter,i.element[0]),i._addClass(i.selectees,"ui-selectee"),i.selectees.each(function(){var t=V(this),e=t.offset(),e={left:e.left-i.elementPos.left,top:e.top-i.elementPos.top};V.data(this,"selectable-item",{element:this,$element:t,left:e.left,top:e.top,right:e.left+t.outerWidth(),bottom:e.top+t.outerHeight(),startselected:!1,selected:t.hasClass("ui-selected"),selecting:t.hasClass("ui-selecting"),unselecting:t.hasClass("ui-unselecting")})})},this.refresh(),this._mouseInit(),this.helper=V("<div>"),this._addClass(this.helper,"ui-selectable-helper")},_destroy:function(){this.selectees.removeData("selectable-item"),this._mouseDestroy()},_mouseStart:function(i){var s=this,t=this.options;this.opos=[i.pageX,i.pageY],this.elementPos=V(this.element[0]).offset(),this.options.disabled||(this.selectees=V(t.filter,this.element[0]),this._trigger("start",i),V(t.appendTo).append(this.helper),this.helper.css({left:i.pageX,top:i.pageY,width:0,height:0}),t.autoRefresh&&this.refresh(),this.selectees.filter(".ui-selected").each(function(){var t=V.data(this,"selectable-item");t.startselected=!0,i.metaKey||i.ctrlKey||(s._removeClass(t.$element,"ui-selected"),t.selected=!1,s._addClass(t.$element,"ui-unselecting"),t.unselecting=!0,s._trigger("unselecting",i,{unselecting:t.element}))}),V(i.target).parents().addBack().each(function(){var t,e=V.data(this,"selectable-item");if(e)return t=!i.metaKey&&!i.ctrlKey||!e.$element.hasClass("ui-selected"),s._removeClass(e.$element,t?"ui-unselecting":"ui-selected")._addClass(e.$element,t?"ui-selecting":"ui-unselecting"),e.unselecting=!t,e.selecting=t,(e.selected=t)?s._trigger("selecting",i,{selecting:e.element}):s._trigger("unselecting",i,{unselecting:e.element}),!1}))},_mouseDrag:function(s){var t,n,o,a,r,l,h;if(this.dragged=!0,!this.options.disabled)return o=(n=this).options,a=this.opos[0],r=this.opos[1],l=s.pageX,h=s.pageY,l<a&&(t=l,l=a,a=t),h<r&&(t=h,h=r,r=t),this.helper.css({left:a,top:r,width:l-a,height:h-r}),this.selectees.each(function(){var t=V.data(this,"selectable-item"),e=!1,i={};t&&t.element!==n.element[0]&&(i.left=t.left+n.elementPos.left,i.right=t.right+n.elementPos.left,i.top=t.top+n.elementPos.top,i.bottom=t.bottom+n.elementPos.top,"touch"===o.tolerance?e=!(l<i.left||i.right<a||h<i.top||i.bottom<r):"fit"===o.tolerance&&(e=a<i.left&&i.right<l&&r<i.top&&i.bottom<h),e?(t.selected&&(n._removeClass(t.$element,"ui-selected"),t.selected=!1),t.unselecting&&(n._removeClass(t.$element,"ui-unselecting"),t.unselecting=!1),t.selecting||(n._addClass(t.$element,"ui-selecting"),t.selecting=!0,n._trigger("selecting",s,{selecting:t.element}))):(t.selecting&&((s.metaKey||s.ctrlKey)&&t.startselected?(n._removeClass(t.$element,"ui-selecting"),t.selecting=!1,n._addClass(t.$element,"ui-selected"),t.selected=!0):(n._removeClass(t.$element,"ui-selecting"),t.selecting=!1,t.startselected&&(n._addClass(t.$element,"ui-unselecting"),t.unselecting=!0),n._trigger("unselecting",s,{unselecting:t.element}))),!t.selected||s.metaKey||s.ctrlKey||t.startselected||(n._removeClass(t.$element,"ui-selected"),t.selected=!1,n._addClass(t.$element,"ui-unselecting"),t.unselecting=!0,n._trigger("unselecting",s,{unselecting:t.element}))))}),!1},_mouseStop:function(e){var i=this;return this.dragged=!1,V(".ui-unselecting",this.element[0]).each(function(){var t=V.data(this,"selectable-item");i._removeClass(t.$element,"ui-unselecting"),t.unselecting=!1,t.startselected=!1,i._trigger("unselected",e,{unselected:t.element})}),V(".ui-selecting",this.element[0]).each(function(){var t=V.data(this,"selectable-item");i._removeClass(t.$element,"ui-selecting")._addClass(t.$element,"ui-selected"),t.selecting=!1,t.selected=!0,t.startselected=!0,i._trigger("selected",e,{selected:t.element})}),this._trigger("stop",e),this.helper.remove(),!1}}),V.widget("ui.selectmenu",[V.ui.formResetMixin,{version:"1.13.3",defaultElement:"<select>",options:{appendTo:null,classes:{"ui-selectmenu-button-open":"ui-corner-top","ui-selectmenu-button-closed":"ui-corner-all"},disabled:null,icons:{button:"ui-icon-triangle-1-s"},position:{my:"left top",at:"left bottom",collision:"none"},width:!1,change:null,close:null,focus:null,open:null,select:null},_create:function(){var t=this.element.uniqueId().attr("id");this.ids={element:t,button:t+"-button",menu:t+"-menu"},this._drawButton(),this._drawMenu(),this._bindFormResetHandler(),this._rendered=!1,this.menuItems=V()},_drawButton:function(){var t,e=this,i=this._parseOption(this.element.find("option:selected"),this.element[0].selectedIndex);this.labels=this.element.labels().attr("for",this.ids.button),this._on(this.labels,{click:function(t){this.button.trigger("focus"),t.preventDefault()}}),this.element.hide(),this.button=V("<span>",{tabindex:this.options.disabled?-1:0,id:this.ids.button,role:"combobox","aria-expanded":"false","aria-autocomplete":"list","aria-owns":this.ids.menu,"aria-haspopup":"true",title:this.element.attr("title")}).insertAfter(this.element),this._addClass(this.button,"ui-selectmenu-button ui-selectmenu-button-closed","ui-button ui-widget"),t=V("<span>").appendTo(this.button),this._addClass(t,"ui-selectmenu-icon","ui-icon "+this.options.icons.button),this.buttonItem=this._renderButtonItem(i).appendTo(this.button),!1!==this.options.width&&this._resizeButton(),this._on(this.button,this._buttonEvents),this.button.one("focusin",function(){e._rendered||e._refreshMenu()})},_drawMenu:function(){var i=this;this.menu=V("<ul>",{"aria-hidden":"true","aria-labelledby":this.ids.button,id:this.ids.menu}),this.menuWrap=V("<div>").append(this.menu),this._addClass(this.menuWrap,"ui-selectmenu-menu","ui-front"),this.menuWrap.appendTo(this._appendTo()),this.menuInstance=this.menu.menu({classes:{"ui-menu":"ui-corner-bottom"},role:"listbox",select:function(t,e){t.preventDefault(),i._setSelection(),i._select(e.item.data("ui-selectmenu-item"),t)},focus:function(t,e){e=e.item.data("ui-selectmenu-item");null!=i.focusIndex&&e.index!==i.focusIndex&&(i._trigger("focus",t,{item:e}),i.isOpen||i._select(e,t)),i.focusIndex=e.index,i.button.attr("aria-activedescendant",i.menuItems.eq(e.index).attr("id"))}}).menu("instance"),this.menuInstance._off(this.menu,"mouseleave"),this.menuInstance._closeOnDocumentClick=function(){return!1},this.menuInstance._isDivider=function(){return!1}},refresh:function(){this._refreshMenu(),this.buttonItem.replaceWith(this.buttonItem=this._renderButtonItem(this._getSelectedItem().data("ui-selectmenu-item")||{})),null===this.options.width&&this._resizeButton()},_refreshMenu:function(){var t=this.element.find("option");this.menu.empty(),this._parseOptions(t),this._renderMenu(this.menu,this.items),this.menuInstance.refresh(),this.menuItems=this.menu.find("li").not(".ui-selectmenu-optgroup").find(".ui-menu-item-wrapper"),this._rendered=!0,t.length&&(t=this._getSelectedItem(),this.menuInstance.focus(null,t),this._setAria(t.data("ui-selectmenu-item")),this._setOption("disabled",this.element.prop("disabled")))},open:function(t){this.options.disabled||(this._rendered?(this._removeClass(this.menu.find(".ui-state-active"),null,"ui-state-active"),this.menuInstance.focus(null,this._getSelectedItem())):this._refreshMenu(),this.menuItems.length&&(this.isOpen=!0,this._toggleAttr(),this._resizeMenu(),this._position(),this._on(this.document,this._documentClick),this._trigger("open",t)))},_position:function(){this.menuWrap.position(V.extend({of:this.button},this.options.position))},close:function(t){this.isOpen&&(this.isOpen=!1,this._toggleAttr(),this.range=null,this._off(this.document),this._trigger("close",t))},widget:function(){return this.button},menuWidget:function(){return this.menu},_renderButtonItem:function(t){var e=V("<span>");return this._setText(e,t.label),this._addClass(e,"ui-selectmenu-text"),e},_renderMenu:function(s,t){var n=this,o="";V.each(t,function(t,e){var i;e.optgroup!==o&&(i=V("<li>",{text:e.optgroup}),n._addClass(i,"ui-selectmenu-optgroup","ui-menu-divider"+(e.element.parent("optgroup").prop("disabled")?" ui-state-disabled":"")),i.appendTo(s),o=e.optgroup),n._renderItemData(s,e)})},_renderItemData:function(t,e){return this._renderItem(t,e).data("ui-selectmenu-item",e)},_renderItem:function(t,e){var i=V("<li>"),s=V("<div>",{title:e.element.attr("title")});return e.disabled&&this._addClass(i,null,"ui-state-disabled"),e.hidden?i.prop("hidden",!0):this._setText(s,e.label),i.append(s).appendTo(t)},_setText:function(t,e){e?t.text(e):t.html(" ")},_move:function(t,e){var i,s=".ui-menu-item";this.isOpen?i=this.menuItems.eq(this.focusIndex).parent("li"):(i=this.menuItems.eq(this.element[0].selectedIndex).parent("li"),s+=":not(.ui-state-disabled)"),(i="first"===t||"last"===t?i["first"===t?"prevAll":"nextAll"](s).eq(-1):i[t+"All"](s).eq(0)).length&&this.menuInstance.focus(e,i)},_getSelectedItem:function(){return this.menuItems.eq(this.element[0].selectedIndex).parent("li")},_toggle:function(t){this[this.isOpen?"close":"open"](t)},_setSelection:function(){var t;this.range&&(window.getSelection?((t=window.getSelection()).removeAllRanges(),t.addRange(this.range)):this.range.select(),this.button.trigger("focus"))},_documentClick:{mousedown:function(t){!this.isOpen||V(t.target).closest(".ui-selectmenu-menu, #"+V.escapeSelector(this.ids.button)).length||this.close(t)}},_buttonEvents:{mousedown:function(){var t;window.getSelection?(t=window.getSelection()).rangeCount&&(this.range=t.getRangeAt(0)):this.range=document.selection.createRange()},click:function(t){this._setSelection(),this._toggle(t)},keydown:function(t){var e=!0;switch(t.keyCode){case V.ui.keyCode.TAB:case V.ui.keyCode.ESCAPE:this.close(t),e=!1;break;case V.ui.keyCode.ENTER:this.isOpen&&this._selectFocusedItem(t);break;case V.ui.keyCode.UP:t.altKey?this._toggle(t):this._move("prev",t);break;case V.ui.keyCode.DOWN:t.altKey?this._toggle(t):this._move("next",t);break;case V.ui.keyCode.SPACE:this.isOpen?this._selectFocusedItem(t):this._toggle(t);break;case V.ui.keyCode.LEFT:this._move("prev",t);break;case V.ui.keyCode.RIGHT:this._move("next",t);break;case V.ui.keyCode.HOME:case V.ui.keyCode.PAGE_UP:this._move("first",t);break;case V.ui.keyCode.END:case V.ui.keyCode.PAGE_DOWN:this._move("last",t);break;default:this.menu.trigger(t),e=!1}e&&t.preventDefault()}},_selectFocusedItem:function(t){var e=this.menuItems.eq(this.focusIndex).parent("li");e.hasClass("ui-state-disabled")||this._select(e.data("ui-selectmenu-item"),t)},_select:function(t,e){var i=this.element[0].selectedIndex;this.element[0].selectedIndex=t.index,this.buttonItem.replaceWith(this.buttonItem=this._renderButtonItem(t)),this._setAria(t),this._trigger("select",e,{item:t}),t.index!==i&&this._trigger("change",e,{item:t}),this.close(e)},_setAria:function(t){t=this.menuItems.eq(t.index).attr("id");this.button.attr({"aria-labelledby":t,"aria-activedescendant":t}),this.menu.attr("aria-activedescendant",t)},_setOption:function(t,e){var i;"icons"===t&&(i=this.button.find("span.ui-icon"),this._removeClass(i,null,this.options.icons.button)._addClass(i,null,e.button)),this._super(t,e),"appendTo"===t&&this.menuWrap.appendTo(this._appendTo()),"width"===t&&this._resizeButton()},_setOptionDisabled:function(t){this._super(t),this.menuInstance.option("disabled",t),this.button.attr("aria-disabled",t),this._toggleClass(this.button,null,"ui-state-disabled",t),this.element.prop("disabled",t),t?(this.button.attr("tabindex",-1),this.close()):this.button.attr("tabindex",0)},_appendTo:function(){var t=this.options.appendTo;return t=(t=(t=t&&(t.jquery||t.nodeType?V(t):this.document.find(t).eq(0)))&&t[0]?t:this.element.closest(".ui-front, dialog")).length?t:this.document[0].body},_toggleAttr:function(){this.button.attr("aria-expanded",this.isOpen),this._removeClass(this.button,"ui-selectmenu-button-"+(this.isOpen?"closed":"open"))._addClass(this.button,"ui-selectmenu-button-"+(this.isOpen?"open":"closed"))._toggleClass(this.menuWrap,"ui-selectmenu-open",null,this.isOpen),this.menu.attr("aria-hidden",!this.isOpen)},_resizeButton:function(){var t=this.options.width;!1===t?this.button.css("width",""):(null===t&&(t=this.element.show().outerWidth(),this.element.hide()),this.button.outerWidth(t))},_resizeMenu:function(){this.menu.outerWidth(Math.max(this.button.outerWidth(),this.menu.width("").outerWidth()+1))},_getCreateOptions:function(){var t=this._super();return t.disabled=this.element.prop("disabled"),t},_parseOptions:function(t){var i=this,s=[];t.each(function(t,e){s.push(i._parseOption(V(e),t))}),this.items=s},_parseOption:function(t,e){var i=t.parent("optgroup");return{element:t,index:e,value:t.val(),label:t.text(),hidden:i.prop("hidden")||t.prop("hidden"),optgroup:i.attr("label")||"",disabled:i.prop("disabled")||t.prop("disabled")}},_destroy:function(){this._unbindFormResetHandler(),this.menuWrap.remove(),this.button.remove(),this.element.show(),this.element.removeUniqueId(),this.labels.attr("for",this.ids.element)}}]),V.widget("ui.slider",V.ui.mouse,{version:"1.13.3",widgetEventPrefix:"slide",options:{animate:!1,classes:{"ui-slider":"ui-corner-all","ui-slider-handle":"ui-corner-all","ui-slider-range":"ui-corner-all ui-widget-header"},distance:0,max:100,min:0,orientation:"horizontal",range:!1,step:1,value:0,values:null,change:null,slide:null,start:null,stop:null},numPages:5,_create:function(){this._keySliding=!1,this._mouseSliding=!1,this._animateOff=!0,this._handleIndex=null,this._detectOrientation(),this._mouseInit(),this._calculateNewMax(),this._addClass("ui-slider ui-slider-"+this.orientation,"ui-widget ui-widget-content"),this._refresh(),this._animateOff=!1},_refresh:function(){this._createRange(),this._createHandles(),this._setupEvents(),this._refreshValue()},_createHandles:function(){var t,e=this.options,i=this.element.find(".ui-slider-handle"),s=[],n=e.values&&e.values.length||1;for(i.length>n&&(i.slice(n).remove(),i=i.slice(0,n)),t=i.length;t<n;t++)s.push("<span tabindex='0'></span>");this.handles=i.add(V(s.join("")).appendTo(this.element)),this._addClass(this.handles,"ui-slider-handle","ui-state-default"),this.handle=this.handles.eq(0),this.handles.each(function(t){V(this).data("ui-slider-handle-index",t).attr("tabIndex",0)})},_createRange:function(){var t=this.options;t.range?(!0===t.range&&(t.values?t.values.length&&2!==t.values.length?t.values=[t.values[0],t.values[0]]:Array.isArray(t.values)&&(t.values=t.values.slice(0)):t.values=[this._valueMin(),this._valueMin()]),this.range&&this.range.length?(this._removeClass(this.range,"ui-slider-range-min ui-slider-range-max"),this.range.css({left:"",bottom:""})):(this.range=V("<div>").appendTo(this.element),this._addClass(this.range,"ui-slider-range")),"min"!==t.range&&"max"!==t.range||this._addClass(this.range,"ui-slider-range-"+t.range)):(this.range&&this.range.remove(),this.range=null)},_setupEvents:function(){this._off(this.handles),this._on(this.handles,this._handleEvents),this._hoverable(this.handles),this._focusable(this.handles)},_destroy:function(){this.handles.remove(),this.range&&this.range.remove(),this._mouseDestroy()},_mouseCapture:function(t){var i,s,n,o,e,a,r=this,l=this.options;return!l.disabled&&(this.elementSize={width:this.element.outerWidth(),height:this.element.outerHeight()},this.elementOffset=this.element.offset(),e={x:t.pageX,y:t.pageY},i=this._normValueFromMouse(e),s=this._valueMax()-this._valueMin()+1,this.handles.each(function(t){var e=Math.abs(i-r.values(t));(e<s||s===e&&(t===r._lastChangedValue||r.values(t)===l.min))&&(s=e,n=V(this),o=t)}),!1!==this._start(t,o))&&(this._mouseSliding=!0,this._handleIndex=o,this._addClass(n,null,"ui-state-active"),n.trigger("focus"),e=n.offset(),a=!V(t.target).parents().addBack().is(".ui-slider-handle"),this._clickOffset=a?{left:0,top:0}:{left:t.pageX-e.left-n.width()/2,top:t.pageY-e.top-n.height()/2-(parseInt(n.css("borderTopWidth"),10)||0)-(parseInt(n.css("borderBottomWidth"),10)||0)+(parseInt(n.css("marginTop"),10)||0)},this.handles.hasClass("ui-state-hover")||this._slide(t,o,i),this._animateOff=!0)},_mouseStart:function(){return!0},_mouseDrag:function(t){var e={x:t.pageX,y:t.pageY},e=this._normValueFromMouse(e);return this._slide(t,this._handleIndex,e),!1},_mouseStop:function(t){return this._removeClass(this.handles,null,"ui-state-active"),this._mouseSliding=!1,this._stop(t,this._handleIndex),this._change(t,this._handleIndex),this._handleIndex=null,this._clickOffset=null,this._animateOff=!1},_detectOrientation:function(){this.orientation="vertical"===this.options.orientation?"vertical":"horizontal"},_normValueFromMouse:function(t){var e,t="horizontal"===this.orientation?(e=this.elementSize.width,t.x-this.elementOffset.left-(this._clickOffset?this._clickOffset.left:0)):(e=this.elementSize.height,t.y-this.elementOffset.top-(this._clickOffset?this._clickOffset.top:0)),t=t/e;return(t=1<t?1:t)<0&&(t=0),"vertical"===this.orientation&&(t=1-t),e=this._valueMax()-this._valueMin(),t=this._valueMin()+t*e,this._trimAlignValue(t)},_uiHash:function(t,e,i){var s={handle:this.handles[t],handleIndex:t,value:void 0!==e?e:this.value()};return this._hasMultipleValues()&&(s.value=void 0!==e?e:this.values(t),s.values=i||this.values()),s},_hasMultipleValues:function(){return this.options.values&&this.options.values.length},_start:function(t,e){return this._trigger("start",t,this._uiHash(e))},_slide:function(t,e,i){var s,n=this.value(),o=this.values();this._hasMultipleValues()&&(s=this.values(e?0:1),n=this.values(e),2===this.options.values.length&&!0===this.options.range&&(i=0===e?Math.min(s,i):Math.max(s,i)),o[e]=i),i!==n&&!1!==this._trigger("slide",t,this._uiHash(e,i,o))&&(this._hasMultipleValues()?this.values(e,i):this.value(i))},_stop:function(t,e){this._trigger("stop",t,this._uiHash(e))},_change:function(t,e){this._keySliding||this._mouseSliding||(this._lastChangedValue=e,this._trigger("change",t,this._uiHash(e)))},value:function(t){if(!arguments.length)return this._value();this.options.value=this._trimAlignValue(t),this._refreshValue(),this._change(null,0)},values:function(t,e){var i,s,n;if(1<arguments.length)this.options.values[t]=this._trimAlignValue(e),this._refreshValue(),this._change(null,t);else{if(!arguments.length)return this._values();if(!Array.isArray(t))return this._hasMultipleValues()?this._values(t):this.value();for(i=this.options.values,s=t,n=0;n<i.length;n+=1)i[n]=this._trimAlignValue(s[n]),this._change(null,n);this._refreshValue()}},_setOption:function(t,e){var i,s=0;switch("range"===t&&!0===this.options.range&&("min"===e?(this.options.value=this._values(0),this.options.values=null):"max"===e&&(this.options.value=this._values(this.options.values.length-1),this.options.values=null)),Array.isArray(this.options.values)&&(s=this.options.values.length),this._super(t,e),t){case"orientation":this._detectOrientation(),this._removeClass("ui-slider-horizontal ui-slider-vertical")._addClass("ui-slider-"+this.orientation),this._refreshValue(),this.options.range&&this._refreshRange(e),this.handles.css("horizontal"===e?"bottom":"left","");break;case"value":this._animateOff=!0,this._refreshValue(),this._change(null,0),this._animateOff=!1;break;case"values":for(this._animateOff=!0,this._refreshValue(),i=s-1;0<=i;i--)this._change(null,i);this._animateOff=!1;break;case"step":case"min":case"max":this._animateOff=!0,this._calculateNewMax(),this._refreshValue(),this._animateOff=!1;break;case"range":this._animateOff=!0,this._refresh(),this._animateOff=!1}},_setOptionDisabled:function(t){this._super(t),this._toggleClass(null,"ui-state-disabled",!!t)},_value:function(){var t=this.options.value;return this._trimAlignValue(t)},_values:function(t){var e,i;if(arguments.length)return t=this.options.values[t],this._trimAlignValue(t);if(this._hasMultipleValues()){for(e=this.options.values.slice(),i=0;i<e.length;i+=1)e[i]=this._trimAlignValue(e[i]);return e}return[]},_trimAlignValue:function(t){var e,i;return t<=this._valueMin()?this._valueMin():t>=this._valueMax()?this._valueMax():(e=0<this.options.step?this.options.step:1,i=t-(t=(t-this._valueMin())%e),2*Math.abs(t)>=e&&(i+=0<t?e:-e),parseFloat(i.toFixed(5)))},_calculateNewMax:function(){var t=this.options.max,e=this._valueMin(),i=this.options.step;(t=Math.round((t-e)/i)*i+e)>this.options.max&&(t-=i),this.max=parseFloat(t.toFixed(this._precision()))},_precision:function(){var t=this._precisionOf(this.options.step);return t=null!==this.options.min?Math.max(t,this._precisionOf(this.options.min)):t},_precisionOf:function(t){var t=t.toString(),e=t.indexOf(".");return-1===e?0:t.length-e-1},_valueMin:function(){return this.options.min},_valueMax:function(){return this.max},_refreshRange:function(t){"vertical"===t&&this.range.css({width:"",left:""}),"horizontal"===t&&this.range.css({height:"",bottom:""})},_refreshValue:function(){var e,i,t,s,n,o=this.options.range,a=this.options,r=this,l=!this._animateOff&&a.animate,h={};this._hasMultipleValues()?this.handles.each(function(t){i=(r.values(t)-r._valueMin())/(r._valueMax()-r._valueMin())*100,h["horizontal"===r.orientation?"left":"bottom"]=i+"%",V(this).stop(1,1)[l?"animate":"css"](h,a.animate),!0===r.options.range&&("horizontal"===r.orientation?(0===t&&r.range.stop(1,1)[l?"animate":"css"]({left:i+"%"},a.animate),1===t&&r.range[l?"animate":"css"]({width:i-e+"%"},{queue:!1,duration:a.animate})):(0===t&&r.range.stop(1,1)[l?"animate":"css"]({bottom:i+"%"},a.animate),1===t&&r.range[l?"animate":"css"]({height:i-e+"%"},{queue:!1,duration:a.animate}))),e=i}):(t=this.value(),s=this._valueMin(),n=this._valueMax(),i=n!==s?(t-s)/(n-s)*100:0,h["horizontal"===this.orientation?"left":"bottom"]=i+"%",this.handle.stop(1,1)[l?"animate":"css"](h,a.animate),"min"===o&&"horizontal"===this.orientation&&this.range.stop(1,1)[l?"animate":"css"]({width:i+"%"},a.animate),"max"===o&&"horizontal"===this.orientation&&this.range.stop(1,1)[l?"animate":"css"]({width:100-i+"%"},a.animate),"min"===o&&"vertical"===this.orientation&&this.range.stop(1,1)[l?"animate":"css"]({height:i+"%"},a.animate),"max"===o&&"vertical"===this.orientation&&this.range.stop(1,1)[l?"animate":"css"]({height:100-i+"%"},a.animate))},_handleEvents:{keydown:function(t){var e,i,s,n=V(t.target).data("ui-slider-handle-index");switch(t.keyCode){case V.ui.keyCode.HOME:case V.ui.keyCode.END:case V.ui.keyCode.PAGE_UP:case V.ui.keyCode.PAGE_DOWN:case V.ui.keyCode.UP:case V.ui.keyCode.RIGHT:case V.ui.keyCode.DOWN:case V.ui.keyCode.LEFT:if(t.preventDefault(),this._keySliding||(this._keySliding=!0,this._addClass(V(t.target),null,"ui-state-active"),!1!==this._start(t,n)))break;return}switch(s=this.options.step,e=i=this._hasMultipleValues()?this.values(n):this.value(),t.keyCode){case V.ui.keyCode.HOME:i=this._valueMin();break;case V.ui.keyCode.END:i=this._valueMax();break;case V.ui.keyCode.PAGE_UP:i=this._trimAlignValue(e+(this._valueMax()-this._valueMin())/this.numPages);break;case V.ui.keyCode.PAGE_DOWN:i=this._trimAlignValue(e-(this._valueMax()-this._valueMin())/this.numPages);break;case V.ui.keyCode.UP:case V.ui.keyCode.RIGHT:if(e===this._valueMax())return;i=this._trimAlignValue(e+s);break;case V.ui.keyCode.DOWN:case V.ui.keyCode.LEFT:if(e===this._valueMin())return;i=this._trimAlignValue(e-s)}this._slide(t,n,i)},keyup:function(t){var e=V(t.target).data("ui-slider-handle-index");this._keySliding&&(this._keySliding=!1,this._stop(t,e),this._change(t,e),this._removeClass(V(t.target),null,"ui-state-active"))}}}),V.widget("ui.sortable",V.ui.mouse,{version:"1.13.3",widgetEventPrefix:"sort",ready:!1,options:{appendTo:"parent",axis:!1,connectWith:!1,containment:!1,cursor:"auto",cursorAt:!1,dropOnEmpty:!0,forcePlaceholderSize:!1,forceHelperSize:!1,grid:!1,handle:!1,helper:"original",items:"> *",opacity:!1,placeholder:!1,revert:!1,scroll:!0,scrollSensitivity:20,scrollSpeed:20,scope:"default",tolerance:"intersect",zIndex:1e3,activate:null,beforeStop:null,change:null,deactivate:null,out:null,over:null,receive:null,remove:null,sort:null,start:null,stop:null,update:null},_isOverAxis:function(t,e,i){return e<=t&&t<e+i},_isFloating:function(t){return/left|right/.test(t.css("float"))||/inline|table-cell/.test(t.css("display"))},_create:function(){this.containerCache={},this._addClass("ui-sortable"),this.refresh(),this.offset=this.element.offset(),this._mouseInit(),this._setHandleClassName(),this.ready=!0},_setOption:function(t,e){this._super(t,e),"handle"===t&&this._setHandleClassName()},_setHandleClassName:function(){var t=this;this._removeClass(this.element.find(".ui-sortable-handle"),"ui-sortable-handle"),V.each(this.items,function(){t._addClass(this.instance.options.handle?this.item.find(this.instance.options.handle):this.item,"ui-sortable-handle")})},_destroy:function(){this._mouseDestroy();for(var t=this.items.length-1;0<=t;t--)this.items[t].item.removeData(this.widgetName+"-item");return this},_mouseCapture:function(t,e){var i=null,s=!1,n=this;return!(this.reverting||this.options.disabled||"static"===this.options.type||(this._refreshItems(t),V(t.target).parents().each(function(){if(V.data(this,n.widgetName+"-item")===n)return i=V(this),!1}),!(i=V.data(t.target,n.widgetName+"-item")===n?V(t.target):i))||(this.options.handle&&!e&&(V(this.options.handle,i).find("*").addBack().each(function(){this===t.target&&(s=!0)}),!s)||(this.currentItem=i,this._removeCurrentsFromItems(),0)))},_mouseStart:function(t,e,i){var s,n,o=this.options;if((this.currentContainer=this).refreshPositions(),this.appendTo=V("parent"!==o.appendTo?o.appendTo:this.currentItem.parent()),this.helper=this._createHelper(t),this._cacheHelperProportions(),this._cacheMargins(),this.offset=this.currentItem.offset(),this.offset={top:this.offset.top-this.margins.top,left:this.offset.left-this.margins.left},V.extend(this.offset,{click:{left:t.pageX-this.offset.left,top:t.pageY-this.offset.top},relative:this._getRelativeOffset()}),this.helper.css("position","absolute"),this.cssPosition=this.helper.css("position"),o.cursorAt&&this._adjustOffsetFromHelper(o.cursorAt),this.domPosition={prev:this.currentItem.prev()[0],parent:this.currentItem.parent()[0]},this.helper[0]!==this.currentItem[0]&&this.currentItem.hide(),this._createPlaceholder(),this.scrollParent=this.placeholder.scrollParent(),V.extend(this.offset,{parent:this._getParentOffset()}),o.containment&&this._setContainment(),o.cursor&&"auto"!==o.cursor&&(n=this.document.find("body"),this.storedCursor=n.css("cursor"),n.css("cursor",o.cursor),this.storedStylesheet=V("<style>*{ cursor: "+o.cursor+" !important; }</style>").appendTo(n)),o.zIndex&&(this.helper.css("zIndex")&&(this._storedZIndex=this.helper.css("zIndex")),this.helper.css("zIndex",o.zIndex)),o.opacity&&(this.helper.css("opacity")&&(this._storedOpacity=this.helper.css("opacity")),this.helper.css("opacity",o.opacity)),this.scrollParent[0]!==this.document[0]&&"HTML"!==this.scrollParent[0].tagName&&(this.overflowOffset=this.scrollParent.offset()),this._trigger("start",t,this._uiHash()),this._preserveHelperProportions||this._cacheHelperProportions(),!i)for(s=this.containers.length-1;0<=s;s--)this.containers[s]._trigger("activate",t,this._uiHash(this));return V.ui.ddmanager&&(V.ui.ddmanager.current=this),V.ui.ddmanager&&!o.dropBehaviour&&V.ui.ddmanager.prepareOffsets(this,t),this.dragging=!0,this._addClass(this.helper,"ui-sortable-helper"),this.helper.parent().is(this.appendTo)||(this.helper.detach().appendTo(this.appendTo),this.offset.parent=this._getParentOffset()),this.position=this.originalPosition=this._generatePosition(t),this.originalPageX=t.pageX,this.originalPageY=t.pageY,this.lastPositionAbs=this.positionAbs=this._convertPositionTo("absolute"),this._mouseDrag(t),!0},_scroll:function(t){var e=this.options,i=!1;return this.scrollParent[0]!==this.document[0]&&"HTML"!==this.scrollParent[0].tagName?(this.overflowOffset.top+this.scrollParent[0].offsetHeight-t.pageY<e.scrollSensitivity?this.scrollParent[0].scrollTop=i=this.scrollParent[0].scrollTop+e.scrollSpeed:t.pageY-this.overflowOffset.top<e.scrollSensitivity&&(this.scrollParent[0].scrollTop=i=this.scrollParent[0].scrollTop-e.scrollSpeed),this.overflowOffset.left+this.scrollParent[0].offsetWidth-t.pageX<e.scrollSensitivity?this.scrollParent[0].scrollLeft=i=this.scrollParent[0].scrollLeft+e.scrollSpeed:t.pageX-this.overflowOffset.left<e.scrollSensitivity&&(this.scrollParent[0].scrollLeft=i=this.scrollParent[0].scrollLeft-e.scrollSpeed)):(t.pageY-this.document.scrollTop()<e.scrollSensitivity?i=this.document.scrollTop(this.document.scrollTop()-e.scrollSpeed):this.window.height()-(t.pageY-this.document.scrollTop())<e.scrollSensitivity&&(i=this.document.scrollTop(this.document.scrollTop()+e.scrollSpeed)),t.pageX-this.document.scrollLeft()<e.scrollSensitivity?i=this.document.scrollLeft(this.document.scrollLeft()-e.scrollSpeed):this.window.width()-(t.pageX-this.document.scrollLeft())<e.scrollSensitivity&&(i=this.document.scrollLeft(this.document.scrollLeft()+e.scrollSpeed))),i},_mouseDrag:function(t){var e,i,s,n,o=this.options;for(this.position=this._generatePosition(t),this.positionAbs=this._convertPositionTo("absolute"),this.options.axis&&"y"===this.options.axis||(this.helper[0].style.left=this.position.left+"px"),this.options.axis&&"x"===this.options.axis||(this.helper[0].style.top=this.position.top+"px"),o.scroll&&!1!==this._scroll(t)&&(this._refreshItemPositions(!0),V.ui.ddmanager)&&!o.dropBehaviour&&V.ui.ddmanager.prepareOffsets(this,t),this.dragDirection={vertical:this._getDragVerticalDirection(),horizontal:this._getDragHorizontalDirection()},e=this.items.length-1;0<=e;e--)if(s=(i=this.items[e]).item[0],(n=this._intersectsWithPointer(i))&&i.instance===this.currentContainer&&!(s===this.currentItem[0]||this.placeholder[1===n?"next":"prev"]()[0]===s||V.contains(this.placeholder[0],s)||"semi-dynamic"===this.options.type&&V.contains(this.element[0],s))){if(this.direction=1===n?"down":"up","pointer"!==this.options.tolerance&&!this._intersectsWithSides(i))break;this._rearrange(t,i),this._trigger("change",t,this._uiHash());break}return this._contactContainers(t),V.ui.ddmanager&&V.ui.ddmanager.drag(this,t),this._trigger("sort",t,this._uiHash()),this.lastPositionAbs=this.positionAbs,!1},_mouseStop:function(t,e){var i,s,n,o;if(t)return V.ui.ddmanager&&!this.options.dropBehaviour&&V.ui.ddmanager.drop(this,t),this.options.revert?(s=(i=this).placeholder.offset(),o={},(n=this.options.axis)&&"x"!==n||(o.left=s.left-this.offset.parent.left-this.margins.left+(this.offsetParent[0]===this.document[0].body?0:this.offsetParent[0].scrollLeft)),n&&"y"!==n||(o.top=s.top-this.offset.parent.top-this.margins.top+(this.offsetParent[0]===this.document[0].body?0:this.offsetParent[0].scrollTop)),this.reverting=!0,V(this.helper).animate(o,parseInt(this.options.revert,10)||500,function(){i._clear(t)})):this._clear(t,e),!1},cancel:function(){if(this.dragging){this._mouseUp(new V.Event("mouseup",{target:null})),"original"===this.options.helper?(this.currentItem.css(this._storedCSS),this._removeClass(this.currentItem,"ui-sortable-helper")):this.currentItem.show();for(var t=this.containers.length-1;0<=t;t--)this.containers[t]._trigger("deactivate",null,this._uiHash(this)),this.containers[t].containerCache.over&&(this.containers[t]._trigger("out",null,this._uiHash(this)),this.containers[t].containerCache.over=0)}return this.placeholder&&(this.placeholder[0].parentNode&&this.placeholder[0].parentNode.removeChild(this.placeholder[0]),"original"!==this.options.helper&&this.helper&&this.helper[0].parentNode&&this.helper.remove(),V.extend(this,{helper:null,dragging:!1,reverting:!1,_noFinalSort:null}),this.domPosition.prev?V(this.domPosition.prev).after(this.currentItem):V(this.domPosition.parent).prepend(this.currentItem)),this},serialize:function(e){var t=this._getItemsAsjQuery(e&&e.connected),i=[];return e=e||{},V(t).each(function(){var t=(V(e.item||this).attr(e.attribute||"id")||"").match(e.expression||/(.+)[\-=_](.+)/);t&&i.push((e.key||t[1]+"[]")+"="+(e.key&&e.expression?t[1]:t[2]))}),!i.length&&e.key&&i.push(e.key+"="),i.join("&")},toArray:function(t){var e=this._getItemsAsjQuery(t&&t.connected),i=[];return t=t||{},e.each(function(){i.push(V(t.item||this).attr(t.attribute||"id")||"")}),i},_intersectsWith:function(t){var e=this.positionAbs.left,i=e+this.helperProportions.width,s=this.positionAbs.top,n=s+this.helperProportions.height,o=t.left,a=o+t.width,r=t.top,l=r+t.height,h=this.offset.click.top,c=this.offset.click.left,h="x"===this.options.axis||r<s+h&&s+h<l,c="y"===this.options.axis||o<e+c&&e+c<a;return"pointer"===this.options.tolerance||this.options.forcePointerForContainers||"pointer"!==this.options.tolerance&&this.helperProportions[this.floating?"width":"height"]>t[this.floating?"width":"height"]?h&&c:o<e+this.helperProportions.width/2&&i-this.helperProportions.width/2<a&&r<s+this.helperProportions.height/2&&n-this.helperProportions.height/2<l},_intersectsWithPointer:function(t){var e="x"===this.options.axis||this._isOverAxis(this.positionAbs.top+this.offset.click.top,t.top,t.height),t="y"===this.options.axis||this._isOverAxis(this.positionAbs.left+this.offset.click.left,t.left,t.width);return!(!e||!t)&&(e=this.dragDirection.vertical,t=this.dragDirection.horizontal,this.floating?"right"===t||"down"===e?2:1:e&&("down"===e?2:1))},_intersectsWithSides:function(t){var e=this._isOverAxis(this.positionAbs.top+this.offset.click.top,t.top+t.height/2,t.height),t=this._isOverAxis(this.positionAbs.left+this.offset.click.left,t.left+t.width/2,t.width),i=this.dragDirection.vertical,s=this.dragDirection.horizontal;return this.floating&&s?"right"===s&&t||"left"===s&&!t:i&&("down"===i&&e||"up"===i&&!e)},_getDragVerticalDirection:function(){var t=this.positionAbs.top-this.lastPositionAbs.top;return 0!=t&&(0<t?"down":"up")},_getDragHorizontalDirection:function(){var t=this.positionAbs.left-this.lastPositionAbs.left;return 0!=t&&(0<t?"right":"left")},refresh:function(t){return this._refreshItems(t),this._setHandleClassName(),this.refreshPositions(),this},_connectWith:function(){var t=this.options;return t.connectWith.constructor===String?[t.connectWith]:t.connectWith},_getItemsAsjQuery:function(t){var e,i,s,n,o=[],a=[],r=this._connectWith();if(r&&t)for(e=r.length-1;0<=e;e--)for(i=(s=V(r[e],this.document[0])).length-1;0<=i;i--)(n=V.data(s[i],this.widgetFullName))&&n!==this&&!n.options.disabled&&a.push(["function"==typeof n.options.items?n.options.items.call(n.element):V(n.options.items,n.element).not(".ui-sortable-helper").not(".ui-sortable-placeholder"),n]);function l(){o.push(this)}for(a.push(["function"==typeof this.options.items?this.options.items.call(this.element,null,{options:this.options,item:this.currentItem}):V(this.options.items,this.element).not(".ui-sortable-helper").not(".ui-sortable-placeholder"),this]),e=a.length-1;0<=e;e--)a[e][0].each(l);return V(o)},_removeCurrentsFromItems:function(){var i=this.currentItem.find(":data("+this.widgetName+"-item)");this.items=V.grep(this.items,function(t){for(var e=0;e<i.length;e++)if(i[e]===t.item[0])return!1;return!0})},_refreshItems:function(t){this.items=[],this.containers=[this];var e,i,s,n,o,a,r,l,h=this.items,c=[["function"==typeof this.options.items?this.options.items.call(this.element[0],t,{item:this.currentItem}):V(this.options.items,this.element),this]],u=this._connectWith();if(u&&this.ready)for(e=u.length-1;0<=e;e--)for(i=(s=V(u[e],this.document[0])).length-1;0<=i;i--)(n=V.data(s[i],this.widgetFullName))&&n!==this&&!n.options.disabled&&(c.push(["function"==typeof n.options.items?n.options.items.call(n.element[0],t,{item:this.currentItem}):V(n.options.items,n.element),n]),this.containers.push(n));for(e=c.length-1;0<=e;e--)for(o=c[e][1],l=(a=c[e][i=0]).length;i<l;i++)(r=V(a[i])).data(this.widgetName+"-item",o),h.push({item:r,instance:o,width:0,height:0,left:0,top:0})},_refreshItemPositions:function(t){for(var e,i,s=this.items.length-1;0<=s;s--)e=this.items[s],this.currentContainer&&e.instance!==this.currentContainer&&e.item[0]!==this.currentItem[0]||(i=this.options.toleranceElement?V(this.options.toleranceElement,e.item):e.item,t||(e.width=i.outerWidth(),e.height=i.outerHeight()),i=i.offset(),e.left=i.left,e.top=i.top)},refreshPositions:function(t){var e,i;if(this.floating=!!this.items.length&&("x"===this.options.axis||this._isFloating(this.items[0].item)),this.offsetParent&&this.helper&&(this.offset.parent=this._getParentOffset()),this._refreshItemPositions(t),this.options.custom&&this.options.custom.refreshContainers)this.options.custom.refreshContainers.call(this);else for(e=this.containers.length-1;0<=e;e--)i=this.containers[e].element.offset(),this.containers[e].containerCache.left=i.left,this.containers[e].containerCache.top=i.top,this.containers[e].containerCache.width=this.containers[e].element.outerWidth(),this.containers[e].containerCache.height=this.containers[e].element.outerHeight();return this},_createPlaceholder:function(i){var s,n,o=(i=i||this).options;o.placeholder&&o.placeholder.constructor!==String||(s=o.placeholder,n=i.currentItem[0].nodeName.toLowerCase(),o.placeholder={element:function(){var t=V("<"+n+">",i.document[0]);return i._addClass(t,"ui-sortable-placeholder",s||i.currentItem[0].className)._removeClass(t,"ui-sortable-helper"),"tbody"===n?i._createTrPlaceholder(i.currentItem.find("tr").eq(0),V("<tr>",i.document[0]).appendTo(t)):"tr"===n?i._createTrPlaceholder(i.currentItem,t):"img"===n&&t.attr("src",i.currentItem.attr("src")),s||t.css("visibility","hidden"),t},update:function(t,e){s&&!o.forcePlaceholderSize||(e.height()&&(!o.forcePlaceholderSize||"tbody"!==n&&"tr"!==n)||e.height(i.currentItem.innerHeight()-parseInt(i.currentItem.css("paddingTop")||0,10)-parseInt(i.currentItem.css("paddingBottom")||0,10)),e.width())||e.width(i.currentItem.innerWidth()-parseInt(i.currentItem.css("paddingLeft")||0,10)-parseInt(i.currentItem.css("paddingRight")||0,10))}}),i.placeholder=V(o.placeholder.element.call(i.element,i.currentItem)),i.currentItem.after(i.placeholder),o.placeholder.update(i,i.placeholder)},_createTrPlaceholder:function(t,e){var i=this;t.children().each(function(){V("<td> </td>",i.document[0]).attr("colspan",V(this).attr("colspan")||1).appendTo(e)})},_contactContainers:function(t){for(var e,i,s,n,o,a,r,l,h,c=null,u=null,d=this.containers.length-1;0<=d;d--)V.contains(this.currentItem[0],this.containers[d].element[0])||(this._intersectsWith(this.containers[d].containerCache)?c&&V.contains(this.containers[d].element[0],c.element[0])||(c=this.containers[d],u=d):this.containers[d].containerCache.over&&(this.containers[d]._trigger("out",t,this._uiHash(this)),this.containers[d].containerCache.over=0));if(c)if(1===this.containers.length)this.containers[u].containerCache.over||(this.containers[u]._trigger("over",t,this._uiHash(this)),this.containers[u].containerCache.over=1);else{for(i=1e4,s=null,n=(l=c.floating||this._isFloating(this.currentItem))?"left":"top",o=l?"width":"height",h=l?"pageX":"pageY",e=this.items.length-1;0<=e;e--)V.contains(this.containers[u].element[0],this.items[e].item[0])&&this.items[e].item[0]!==this.currentItem[0]&&(a=this.items[e].item.offset()[n],r=!1,t[h]-a>this.items[e][o]/2&&(r=!0),Math.abs(t[h]-a)<i)&&(i=Math.abs(t[h]-a),s=this.items[e],this.direction=r?"up":"down");(s||this.options.dropOnEmpty)&&(this.currentContainer===this.containers[u]?this.currentContainer.containerCache.over||(this.containers[u]._trigger("over",t,this._uiHash()),this.currentContainer.containerCache.over=1):(s?this._rearrange(t,s,null,!0):this._rearrange(t,null,this.containers[u].element,!0),this._trigger("change",t,this._uiHash()),this.containers[u]._trigger("change",t,this._uiHash(this)),this.currentContainer=this.containers[u],this.options.placeholder.update(this.currentContainer,this.placeholder),this.scrollParent=this.placeholder.scrollParent(),this.scrollParent[0]!==this.document[0]&&"HTML"!==this.scrollParent[0].tagName&&(this.overflowOffset=this.scrollParent.offset()),this.containers[u]._trigger("over",t,this._uiHash(this)),this.containers[u].containerCache.over=1))}},_createHelper:function(t){var e=this.options,t="function"==typeof e.helper?V(e.helper.apply(this.element[0],[t,this.currentItem])):"clone"===e.helper?this.currentItem.clone():this.currentItem;return t.parents("body").length||this.appendTo[0].appendChild(t[0]),t[0]===this.currentItem[0]&&(this._storedCSS={width:this.currentItem[0].style.width,height:this.currentItem[0].style.height,position:this.currentItem.css("position"),top:this.currentItem.css("top"),left:this.currentItem.css("left")}),t[0].style.width&&!e.forceHelperSize||t.width(this.currentItem.width()),t[0].style.height&&!e.forceHelperSize||t.height(this.currentItem.height()),t},_adjustOffsetFromHelper:function(t){"string"==typeof t&&(t=t.split(" ")),"left"in(t=Array.isArray(t)?{left:+t[0],top:+t[1]||0}:t)&&(this.offset.click.left=t.left+this.margins.left),"right"in t&&(this.offset.click.left=this.helperProportions.width-t.right+this.margins.left),"top"in t&&(this.offset.click.top=t.top+this.margins.top),"bottom"in t&&(this.offset.click.top=this.helperProportions.height-t.bottom+this.margins.top)},_getParentOffset:function(){this.offsetParent=this.helper.offsetParent();var t=this.offsetParent.offset();return"absolute"===this.cssPosition&&this.scrollParent[0]!==this.document[0]&&V.contains(this.scrollParent[0],this.offsetParent[0])&&(t.left+=this.scrollParent.scrollLeft(),t.top+=this.scrollParent.scrollTop()),{top:(t=this.offsetParent[0]===this.document[0].body||this.offsetParent[0].tagName&&"html"===this.offsetParent[0].tagName.toLowerCase()&&V.ui.ie?{top:0,left:0}:t).top+(parseInt(this.offsetParent.css("borderTopWidth"),10)||0),left:t.left+(parseInt(this.offsetParent.css("borderLeftWidth"),10)||0)}},_getRelativeOffset:function(){var t;return"relative"===this.cssPosition?{top:(t=this.currentItem.position()).top-(parseInt(this.helper.css("top"),10)||0)+this.scrollParent.scrollTop(),left:t.left-(parseInt(this.helper.css("left"),10)||0)+this.scrollParent.scrollLeft()}:{top:0,left:0}},_cacheMargins:function(){this.margins={left:parseInt(this.currentItem.css("marginLeft"),10)||0,top:parseInt(this.currentItem.css("marginTop"),10)||0}},_cacheHelperProportions:function(){this.helperProportions={width:this.helper.outerWidth(),height:this.helper.outerHeight()}},_setContainment:function(){var t,e,i=this.options;"parent"===i.containment&&(i.containment=this.helper[0].parentNode),"document"!==i.containment&&"window"!==i.containment||(this.containment=[0-this.offset.relative.left-this.offset.parent.left,0-this.offset.relative.top-this.offset.parent.top,"document"===i.containment?this.document.width():this.window.width()-this.helperProportions.width-this.margins.left,("document"===i.containment?this.document.height()||document.body.parentNode.scrollHeight:this.window.height()||this.document[0].body.parentNode.scrollHeight)-this.helperProportions.height-this.margins.top]),/^(document|window|parent)$/.test(i.containment)||(t=V(i.containment)[0],i=V(i.containment).offset(),e="hidden"!==V(t).css("overflow"),this.containment=[i.left+(parseInt(V(t).css("borderLeftWidth"),10)||0)+(parseInt(V(t).css("paddingLeft"),10)||0)-this.margins.left,i.top+(parseInt(V(t).css("borderTopWidth"),10)||0)+(parseInt(V(t).css("paddingTop"),10)||0)-this.margins.top,i.left+(e?Math.max(t.scrollWidth,t.offsetWidth):t.offsetWidth)-(parseInt(V(t).css("borderLeftWidth"),10)||0)-(parseInt(V(t).css("paddingRight"),10)||0)-this.helperProportions.width-this.margins.left,i.top+(e?Math.max(t.scrollHeight,t.offsetHeight):t.offsetHeight)-(parseInt(V(t).css("borderTopWidth"),10)||0)-(parseInt(V(t).css("paddingBottom"),10)||0)-this.helperProportions.height-this.margins.top])},_convertPositionTo:function(t,e){e=e||this.position;var t="absolute"===t?1:-1,i="absolute"!==this.cssPosition||this.scrollParent[0]!==this.document[0]&&V.contains(this.scrollParent[0],this.offsetParent[0])?this.scrollParent:this.offsetParent,s=/(html|body)/i.test(i[0].tagName);return{top:e.top+this.offset.relative.top*t+this.offset.parent.top*t-("fixed"===this.cssPosition?-this.scrollParent.scrollTop():s?0:i.scrollTop())*t,left:e.left+this.offset.relative.left*t+this.offset.parent.left*t-("fixed"===this.cssPosition?-this.scrollParent.scrollLeft():s?0:i.scrollLeft())*t}},_generatePosition:function(t){var e=this.options,i=t.pageX,s=t.pageY,n="absolute"!==this.cssPosition||this.scrollParent[0]!==this.document[0]&&V.contains(this.scrollParent[0],this.offsetParent[0])?this.scrollParent:this.offsetParent,o=/(html|body)/i.test(n[0].tagName);return"relative"!==this.cssPosition||this.scrollParent[0]!==this.document[0]&&this.scrollParent[0]!==this.offsetParent[0]||(this.offset.relative=this._getRelativeOffset()),this.originalPosition&&(this.containment&&(t.pageX-this.offset.click.left<this.containment[0]&&(i=this.containment[0]+this.offset.click.left),t.pageY-this.offset.click.top<this.containment[1]&&(s=this.containment[1]+this.offset.click.top),t.pageX-this.offset.click.left>this.containment[2]&&(i=this.containment[2]+this.offset.click.left),t.pageY-this.offset.click.top>this.containment[3])&&(s=this.containment[3]+this.offset.click.top),e.grid)&&(t=this.originalPageY+Math.round((s-this.originalPageY)/e.grid[1])*e.grid[1],s=!this.containment||t-this.offset.click.top>=this.containment[1]&&t-this.offset.click.top<=this.containment[3]?t:t-this.offset.click.top>=this.containment[1]?t-e.grid[1]:t+e.grid[1],t=this.originalPageX+Math.round((i-this.originalPageX)/e.grid[0])*e.grid[0],i=!this.containment||t-this.offset.click.left>=this.containment[0]&&t-this.offset.click.left<=this.containment[2]?t:t-this.offset.click.left>=this.containment[0]?t-e.grid[0]:t+e.grid[0]),{top:s-this.offset.click.top-this.offset.relative.top-this.offset.parent.top+("fixed"===this.cssPosition?-this.scrollParent.scrollTop():o?0:n.scrollTop()),left:i-this.offset.click.left-this.offset.relative.left-this.offset.parent.left+("fixed"===this.cssPosition?-this.scrollParent.scrollLeft():o?0:n.scrollLeft())}},_rearrange:function(t,e,i,s){i?i[0].appendChild(this.placeholder[0]):e.item[0].parentNode.insertBefore(this.placeholder[0],"down"===this.direction?e.item[0]:e.item[0].nextSibling),this.counter=this.counter?++this.counter:1;var n=this.counter;this._delay(function(){n===this.counter&&this.refreshPositions(!s)})},_clear:function(t,e){this.reverting=!1;var i,s=[];if(!this._noFinalSort&&this.currentItem.parent().length&&this.placeholder.before(this.currentItem),this._noFinalSort=null,this.helper[0]===this.currentItem[0]){for(i in this._storedCSS)"auto"!==this._storedCSS[i]&&"static"!==this._storedCSS[i]||(this._storedCSS[i]="");this.currentItem.css(this._storedCSS),this._removeClass(this.currentItem,"ui-sortable-helper")}else this.currentItem.show();function n(e,i,s){return function(t){s._trigger(e,t,i._uiHash(i))}}for(this.fromOutside&&!e&&s.push(function(t){this._trigger("receive",t,this._uiHash(this.fromOutside))}),!this.fromOutside&&this.domPosition.prev===this.currentItem.prev().not(".ui-sortable-helper")[0]&&this.domPosition.parent===this.currentItem.parent()[0]||e||s.push(function(t){this._trigger("update",t,this._uiHash())}),this===this.currentContainer||e||(s.push(function(t){this._trigger("remove",t,this._uiHash())}),s.push(function(e){return function(t){e._trigger("receive",t,this._uiHash(this))}}.call(this,this.currentContainer)),s.push(function(e){return function(t){e._trigger("update",t,this._uiHash(this))}}.call(this,this.currentContainer))),i=this.containers.length-1;0<=i;i--)e||s.push(n("deactivate",this,this.containers[i])),this.containers[i].containerCache.over&&(s.push(n("out",this,this.containers[i])),this.containers[i].containerCache.over=0);if(this.storedCursor&&(this.document.find("body").css("cursor",this.storedCursor),this.storedStylesheet.remove()),this._storedOpacity&&this.helper.css("opacity",this._storedOpacity),this._storedZIndex&&this.helper.css("zIndex","auto"===this._storedZIndex?"":this._storedZIndex),this.dragging=!1,e||this._trigger("beforeStop",t,this._uiHash()),this.placeholder[0].parentNode.removeChild(this.placeholder[0]),this.cancelHelperRemoval||(this.helper[0]!==this.currentItem[0]&&this.helper.remove(),this.helper=null),!e){for(i=0;i<s.length;i++)s[i].call(this,t);this._trigger("stop",t,this._uiHash())}return this.fromOutside=!1,!this.cancelHelperRemoval},_trigger:function(){!1===V.Widget.prototype._trigger.apply(this,arguments)&&this.cancel()},_uiHash:function(t){var e=t||this;return{helper:e.helper,placeholder:e.placeholder||V([]),position:e.position,originalPosition:e.originalPosition,offset:e.positionAbs,item:e.currentItem,sender:t?t.element:null}}});function A(e){return function(){var t=this.element.val();e.apply(this,arguments),this._refresh(),t!==this.element.val()&&this._trigger("change")}}V.widget("ui.spinner",{version:"1.13.3",defaultElement:"<input>",widgetEventPrefix:"spin",options:{classes:{"ui-spinner":"ui-corner-all","ui-spinner-down":"ui-corner-br","ui-spinner-up":"ui-corner-tr"},culture:null,icons:{down:"ui-icon-triangle-1-s",up:"ui-icon-triangle-1-n"},incremental:!0,max:null,min:null,numberFormat:null,page:10,step:1,change:null,spin:null,start:null,stop:null},_create:function(){this._setOption("max",this.options.max),this._setOption("min",this.options.min),this._setOption("step",this.options.step),""!==this.value()&&this._value(this.element.val(),!0),this._draw(),this._on(this._events),this._refresh(),this._on(this.window,{beforeunload:function(){this.element.removeAttr("autocomplete")}})},_getCreateOptions:function(){var s=this._super(),n=this.element;return V.each(["min","max","step"],function(t,e){var i=n.attr(e);null!=i&&i.length&&(s[e]=i)}),s},_events:{keydown:function(t){this._start(t)&&this._keydown(t)&&t.preventDefault()},keyup:"_stop",focus:function(){this.previous=this.element.val()},blur:function(t){this.cancelBlur?delete this.cancelBlur:(this._stop(),this._refresh(),this.previous!==this.element.val()&&this._trigger("change",t))},mousewheel:function(t,e){var i=V.ui.safeActiveElement(this.document[0]);if(this.element[0]===i&&e){if(!this.spinning&&!this._start(t))return!1;this._spin((0<e?1:-1)*this.options.step,t),clearTimeout(this.mousewheelTimer),this.mousewheelTimer=this._delay(function(){this.spinning&&this._stop(t)},100),t.preventDefault()}},"mousedown .ui-spinner-button":function(t){var e;function i(){this.element[0]!==V.ui.safeActiveElement(this.document[0])&&(this.element.trigger("focus"),this.previous=e,this._delay(function(){this.previous=e}))}e=this.element[0]===V.ui.safeActiveElement(this.document[0])?this.previous:this.element.val(),t.preventDefault(),i.call(this),this.cancelBlur=!0,this._delay(function(){delete this.cancelBlur,i.call(this)}),!1!==this._start(t)&&this._repeat(null,V(t.currentTarget).hasClass("ui-spinner-up")?1:-1,t)},"mouseup .ui-spinner-button":"_stop","mouseenter .ui-spinner-button":function(t){if(V(t.currentTarget).hasClass("ui-state-active"))return!1!==this._start(t)&&void this._repeat(null,V(t.currentTarget).hasClass("ui-spinner-up")?1:-1,t)},"mouseleave .ui-spinner-button":"_stop"},_enhance:function(){this.uiSpinner=this.element.attr("autocomplete","off").wrap("<span>").parent().append("<a></a><a></a>")},_draw:function(){this._enhance(),this._addClass(this.uiSpinner,"ui-spinner","ui-widget ui-widget-content"),this._addClass("ui-spinner-input"),this.element.attr("role","spinbutton"),this.buttons=this.uiSpinner.children("a").attr("tabIndex",-1).attr("aria-hidden",!0).button({classes:{"ui-button":""}}),this._removeClass(this.buttons,"ui-corner-all"),this._addClass(this.buttons.first(),"ui-spinner-button ui-spinner-up"),this._addClass(this.buttons.last(),"ui-spinner-button ui-spinner-down"),this.buttons.first().button({icon:this.options.icons.up,showLabel:!1}),this.buttons.last().button({icon:this.options.icons.down,showLabel:!1}),this.buttons.height()>Math.ceil(.5*this.uiSpinner.height())&&0<this.uiSpinner.height()&&this.uiSpinner.height(this.uiSpinner.height())},_keydown:function(t){var e=this.options,i=V.ui.keyCode;switch(t.keyCode){case i.UP:return this._repeat(null,1,t),!0;case i.DOWN:return this._repeat(null,-1,t),!0;case i.PAGE_UP:return this._repeat(null,e.page,t),!0;case i.PAGE_DOWN:return this._repeat(null,-e.page,t),!0}return!1},_start:function(t){return!(!this.spinning&&!1===this._trigger("start",t))&&(this.counter||(this.counter=1),this.spinning=!0)},_repeat:function(t,e,i){t=t||500,clearTimeout(this.timer),this.timer=this._delay(function(){this._repeat(40,e,i)},t),this._spin(e*this.options.step,i)},_spin:function(t,e){var i=this.value()||0;this.counter||(this.counter=1),i=this._adjustValue(i+t*this._increment(this.counter)),this.spinning&&!1===this._trigger("spin",e,{value:i})||(this._value(i),this.counter++)},_increment:function(t){var e=this.options.incremental;return e?"function"==typeof e?e(t):Math.floor(t*t*t/5e4-t*t/500+17*t/200+1):1},_precision:function(){var t=this._precisionOf(this.options.step);return t=null!==this.options.min?Math.max(t,this._precisionOf(this.options.min)):t},_precisionOf:function(t){var t=t.toString(),e=t.indexOf(".");return-1===e?0:t.length-e-1},_adjustValue:function(t){var e=this.options,i=null!==e.min?e.min:0,s=t-i;return t=i+Math.round(s/e.step)*e.step,t=parseFloat(t.toFixed(this._precision())),null!==e.max&&t>e.max?e.max:null!==e.min&&t<e.min?e.min:t},_stop:function(t){this.spinning&&(clearTimeout(this.timer),clearTimeout(this.mousewheelTimer),this.counter=0,this.spinning=!1,this._trigger("stop",t))},_setOption:function(t,e){var i;"culture"===t||"numberFormat"===t?(i=this._parse(this.element.val()),this.options[t]=e,this.element.val(this._format(i))):("max"!==t&&"min"!==t&&"step"!==t||"string"==typeof e&&(e=this._parse(e)),"icons"===t&&(i=this.buttons.first().find(".ui-icon"),this._removeClass(i,null,this.options.icons.up),this._addClass(i,null,e.up),i=this.buttons.last().find(".ui-icon"),this._removeClass(i,null,this.options.icons.down),this._addClass(i,null,e.down)),this._super(t,e))},_setOptionDisabled:function(t){this._super(t),this._toggleClass(this.uiSpinner,null,"ui-state-disabled",!!t),this.element.prop("disabled",!!t),this.buttons.button(t?"disable":"enable")},_setOptions:A(function(t){this._super(t)}),_parse:function(t){return""===(t="string"==typeof t&&""!==t?window.Globalize&&this.options.numberFormat?Globalize.parseFloat(t,10,this.options.culture):+t:t)||isNaN(t)?null:t},_format:function(t){return""===t?"":window.Globalize&&this.options.numberFormat?Globalize.format(t,this.options.numberFormat,this.options.culture):t},_refresh:function(){this.element.attr({"aria-valuemin":this.options.min,"aria-valuemax":this.options.max,"aria-valuenow":this._parse(this.element.val())})},isValid:function(){var t=this.value();return null!==t&&t===this._adjustValue(t)},_value:function(t,e){var i;""!==t&&null!==(i=this._parse(t))&&(e||(i=this._adjustValue(i)),t=this._format(i)),this.element.val(t),this._refresh()},_destroy:function(){this.element.prop("disabled",!1).removeAttr("autocomplete role aria-valuemin aria-valuemax aria-valuenow"),this.uiSpinner.replaceWith(this.element)},stepUp:A(function(t){this._stepUp(t)}),_stepUp:function(t){this._start()&&(this._spin((t||1)*this.options.step),this._stop())},stepDown:A(function(t){this._stepDown(t)}),_stepDown:function(t){this._start()&&(this._spin((t||1)*-this.options.step),this._stop())},pageUp:A(function(t){this._stepUp((t||1)*this.options.page)}),pageDown:A(function(t){this._stepDown((t||1)*this.options.page)}),value:function(t){if(!arguments.length)return this._parse(this.element.val());A(this._value).call(this,t)},widget:function(){return this.uiSpinner}}),!1!==V.uiBackCompat&&V.widget("ui.spinner",V.ui.spinner,{_enhance:function(){this.uiSpinner=this.element.attr("autocomplete","off").wrap(this._uiSpinnerHtml()).parent().append(this._buttonHtml())},_uiSpinnerHtml:function(){return"<span>"},_buttonHtml:function(){return"<a></a><a></a>"}});var O;V.ui.spinner,V.widget("ui.tabs",{version:"1.13.3",delay:300,options:{active:null,classes:{"ui-tabs":"ui-corner-all","ui-tabs-nav":"ui-corner-all","ui-tabs-panel":"ui-corner-bottom","ui-tabs-tab":"ui-corner-top"},collapsible:!1,event:"click",heightStyle:"content",hide:null,show:null,activate:null,beforeActivate:null,beforeLoad:null,load:null},_isLocal:(O=/#.*$/,function(t){var e=t.href.replace(O,""),i=location.href.replace(O,"");try{e=decodeURIComponent(e)}catch(t){}try{i=decodeURIComponent(i)}catch(t){}return 1<t.hash.length&&e===i}),_create:function(){var e=this,t=this.options;this.running=!1,this._addClass("ui-tabs","ui-widget ui-widget-content"),this._toggleClass("ui-tabs-collapsible",null,t.collapsible),this._processTabs(),t.active=this._initialActive(),Array.isArray(t.disabled)&&(t.disabled=V.uniqueSort(t.disabled.concat(V.map(this.tabs.filter(".ui-state-disabled"),function(t){return e.tabs.index(t)}))).sort()),!1!==this.options.active&&this.anchors.length?this.active=this._findActive(t.active):this.active=V(),this._refresh(),this.active.length&&this.load(t.active)},_initialActive:function(){var i=this.options.active,t=this.options.collapsible,s=location.hash.substring(1);return null===i&&(s&&this.tabs.each(function(t,e){if(V(e).attr("aria-controls")===s)return i=t,!1}),null!==(i=null===i?this.tabs.index(this.tabs.filter(".ui-tabs-active")):i)&&-1!==i||(i=!!this.tabs.length&&0)),!1!==i&&-1===(i=this.tabs.index(this.tabs.eq(i)))&&(i=!t&&0),i=!t&&!1===i&&this.anchors.length?0:i},_getCreateEventData:function(){return{tab:this.active,panel:this.active.length?this._getPanelForTab(this.active):V()}},_tabKeydown:function(t){var e=V(V.ui.safeActiveElement(this.document[0])).closest("li"),i=this.tabs.index(e),s=!0;if(!this._handlePageNav(t)){switch(t.keyCode){case V.ui.keyCode.RIGHT:case V.ui.keyCode.DOWN:i++;break;case V.ui.keyCode.UP:case V.ui.keyCode.LEFT:s=!1,i--;break;case V.ui.keyCode.END:i=this.anchors.length-1;break;case V.ui.keyCode.HOME:i=0;break;case V.ui.keyCode.SPACE:return t.preventDefault(),clearTimeout(this.activating),void this._activate(i);case V.ui.keyCode.ENTER:return t.preventDefault(),clearTimeout(this.activating),void this._activate(i!==this.options.active&&i);default:return}t.preventDefault(),clearTimeout(this.activating),i=this._focusNextTab(i,s),t.ctrlKey||t.metaKey||(e.attr("aria-selected","false"),this.tabs.eq(i).attr("aria-selected","true"),this.activating=this._delay(function(){this.option("active",i)},this.delay))}},_panelKeydown:function(t){this._handlePageNav(t)||t.ctrlKey&&t.keyCode===V.ui.keyCode.UP&&(t.preventDefault(),this.active.trigger("focus"))},_handlePageNav:function(t){return t.altKey&&t.keyCode===V.ui.keyCode.PAGE_UP?(this._activate(this._focusNextTab(this.options.active-1,!1)),!0):t.altKey&&t.keyCode===V.ui.keyCode.PAGE_DOWN?(this._activate(this._focusNextTab(this.options.active+1,!0)),!0):void 0},_findNextTab:function(t,e){var i=this.tabs.length-1;for(;-1!==V.inArray(t=(t=i<t?0:t)<0?i:t,this.options.disabled);)t=e?t+1:t-1;return t},_focusNextTab:function(t,e){return t=this._findNextTab(t,e),this.tabs.eq(t).trigger("focus"),t},_setOption:function(t,e){"active"===t?this._activate(e):(this._super(t,e),"collapsible"===t&&(this._toggleClass("ui-tabs-collapsible",null,e),e||!1!==this.options.active||this._activate(0)),"event"===t&&this._setupEvents(e),"heightStyle"===t&&this._setupHeightStyle(e))},_sanitizeSelector:function(t){return t?t.replace(/[!"$%&'()*+,.\/:;<=>?@\[\]\^`{|}~]/g,"\\$&"):""},refresh:function(){var t=this.options,e=this.tablist.children(":has(a[href])");t.disabled=V.map(e.filter(".ui-state-disabled"),function(t){return e.index(t)}),this._processTabs(),!1!==t.active&&this.anchors.length?this.active.length&&!V.contains(this.tablist[0],this.active[0])?this.tabs.length===t.disabled.length?(t.active=!1,this.active=V()):this._activate(this._findNextTab(Math.max(0,t.active-1),!1)):t.active=this.tabs.index(this.active):(t.active=!1,this.active=V()),this._refresh()},_refresh:function(){this._setOptionDisabled(this.options.disabled),this._setupEvents(this.options.event),this._setupHeightStyle(this.options.heightStyle),this.tabs.not(this.active).attr({"aria-selected":"false","aria-expanded":"false",tabIndex:-1}),this.panels.not(this._getPanelForTab(this.active)).hide().attr({"aria-hidden":"true"}),this.active.length?(this.active.attr({"aria-selected":"true","aria-expanded":"true",tabIndex:0}),this._addClass(this.active,"ui-tabs-active","ui-state-active"),this._getPanelForTab(this.active).show().attr({"aria-hidden":"false"})):this.tabs.eq(0).attr("tabIndex",0)},_processTabs:function(){var l=this,t=this.tabs,e=this.anchors,i=this.panels;this.tablist=this._getList().attr("role","tablist"),this._addClass(this.tablist,"ui-tabs-nav","ui-helper-reset ui-helper-clearfix ui-widget-header"),this.tablist.on("mousedown"+this.eventNamespace,"> li",function(t){V(this).is(".ui-state-disabled")&&t.preventDefault()}).on("focus"+this.eventNamespace,".ui-tabs-anchor",function(){V(this).closest("li").is(".ui-state-disabled")&&this.blur()}),this.tabs=this.tablist.find("> li:has(a[href])").attr({role:"tab",tabIndex:-1}),this._addClass(this.tabs,"ui-tabs-tab","ui-state-default"),this.anchors=this.tabs.map(function(){return V("a",this)[0]}).attr({tabIndex:-1}),this._addClass(this.anchors,"ui-tabs-anchor"),this.panels=V(),this.anchors.each(function(t,e){var i,s,n,o=V(e).uniqueId().attr("id"),a=V(e).closest("li"),r=a.attr("aria-controls");l._isLocal(e)?(n=(i=e.hash).substring(1),s=l.element.find(l._sanitizeSelector(i))):(n=a.attr("aria-controls")||V({}).uniqueId()[0].id,(s=l.element.find(i="#"+n)).length||(s=l._createPanel(n)).insertAfter(l.panels[t-1]||l.tablist),s.attr("aria-live","polite")),s.length&&(l.panels=l.panels.add(s)),r&&a.data("ui-tabs-aria-controls",r),a.attr({"aria-controls":n,"aria-labelledby":o}),s.attr("aria-labelledby",o)}),this.panels.attr("role","tabpanel"),this._addClass(this.panels,"ui-tabs-panel","ui-widget-content"),t&&(this._off(t.not(this.tabs)),this._off(e.not(this.anchors)),this._off(i.not(this.panels)))},_getList:function(){return this.tablist||this.element.find("ol, ul").eq(0)},_createPanel:function(t){return V("<div>").attr("id",t).data("ui-tabs-destroy",!0)},_setOptionDisabled:function(t){var e,i;for(Array.isArray(t)&&(t.length?t.length===this.anchors.length&&(t=!0):t=!1),i=0;e=this.tabs[i];i++)e=V(e),!0===t||-1!==V.inArray(i,t)?(e.attr("aria-disabled","true"),this._addClass(e,null,"ui-state-disabled")):(e.removeAttr("aria-disabled"),this._removeClass(e,null,"ui-state-disabled"));this.options.disabled=t,this._toggleClass(this.widget(),this.widgetFullName+"-disabled",null,!0===t)},_setupEvents:function(t){var i={};t&&V.each(t.split(" "),function(t,e){i[e]="_eventHandler"}),this._off(this.anchors.add(this.tabs).add(this.panels)),this._on(!0,this.anchors,{click:function(t){t.preventDefault()}}),this._on(this.anchors,i),this._on(this.tabs,{keydown:"_tabKeydown"}),this._on(this.panels,{keydown:"_panelKeydown"}),this._focusable(this.tabs),this._hoverable(this.tabs)},_setupHeightStyle:function(t){var i,e=this.element.parent();"fill"===t?(i=e.height(),i-=this.element.outerHeight()-this.element.height(),this.element.siblings(":visible").each(function(){var t=V(this),e=t.css("position");"absolute"!==e&&"fixed"!==e&&(i-=t.outerHeight(!0))}),this.element.children().not(this.panels).each(function(){i-=V(this).outerHeight(!0)}),this.panels.each(function(){V(this).height(Math.max(0,i-V(this).innerHeight()+V(this).height()))}).css("overflow","auto")):"auto"===t&&(i=0,this.panels.each(function(){i=Math.max(i,V(this).height("").height())}).height(i))},_eventHandler:function(t){var e=this.options,i=this.active,s=V(t.currentTarget).closest("li"),n=s[0]===i[0],o=n&&e.collapsible,a=o?V():this._getPanelForTab(s),r=i.length?this._getPanelForTab(i):V(),i={oldTab:i,oldPanel:r,newTab:o?V():s,newPanel:a};t.preventDefault(),s.hasClass("ui-state-disabled")||s.hasClass("ui-tabs-loading")||this.running||n&&!e.collapsible||!1===this._trigger("beforeActivate",t,i)||(e.active=!o&&this.tabs.index(s),this.active=n?V():s,this.xhr&&this.xhr.abort(),r.length||a.length||V.error("jQuery UI Tabs: Mismatching fragment identifier."),a.length&&this.load(this.tabs.index(s),t),this._toggle(t,i))},_toggle:function(t,e){var i=this,s=e.newPanel,n=e.oldPanel;function o(){i.running=!1,i._trigger("activate",t,e)}function a(){i._addClass(e.newTab.closest("li"),"ui-tabs-active","ui-state-active"),s.length&&i.options.show?i._show(s,i.options.show,o):(s.show(),o())}this.running=!0,n.length&&this.options.hide?this._hide(n,this.options.hide,function(){i._removeClass(e.oldTab.closest("li"),"ui-tabs-active","ui-state-active"),a()}):(this._removeClass(e.oldTab.closest("li"),"ui-tabs-active","ui-state-active"),n.hide(),a()),n.attr("aria-hidden","true"),e.oldTab.attr({"aria-selected":"false","aria-expanded":"false"}),s.length&&n.length?e.oldTab.attr("tabIndex",-1):s.length&&this.tabs.filter(function(){return 0===V(this).attr("tabIndex")}).attr("tabIndex",-1),s.attr("aria-hidden","false"),e.newTab.attr({"aria-selected":"true","aria-expanded":"true",tabIndex:0})},_activate:function(t){var t=this._findActive(t);t[0]!==this.active[0]&&(t=(t=t.length?t:this.active).find(".ui-tabs-anchor")[0],this._eventHandler({target:t,currentTarget:t,preventDefault:V.noop}))},_findActive:function(t){return!1===t?V():this.tabs.eq(t)},_getIndex:function(t){return t="string"==typeof t?this.anchors.index(this.anchors.filter("[href$='"+V.escapeSelector(t)+"']")):t},_destroy:function(){this.xhr&&this.xhr.abort(),this.tablist.removeAttr("role").off(this.eventNamespace),this.anchors.removeAttr("role tabIndex").removeUniqueId(),this.tabs.add(this.panels).each(function(){V.data(this,"ui-tabs-destroy")?V(this).remove():V(this).removeAttr("role tabIndex aria-live aria-busy aria-selected aria-labelledby aria-hidden aria-expanded")}),this.tabs.each(function(){var t=V(this),e=t.data("ui-tabs-aria-controls");e?t.attr("aria-controls",e).removeData("ui-tabs-aria-controls"):t.removeAttr("aria-controls")}),this.panels.show(),"content"!==this.options.heightStyle&&this.panels.css("height","")},enable:function(i){var t=this.options.disabled;!1!==t&&(t=void 0!==i&&(i=this._getIndex(i),Array.isArray(t)?V.map(t,function(t){return t!==i?t:null}):V.map(this.tabs,function(t,e){return e!==i?e:null})),this._setOptionDisabled(t))},disable:function(t){var e=this.options.disabled;if(!0!==e){if(void 0===t)e=!0;else{if(t=this._getIndex(t),-1!==V.inArray(t,e))return;e=Array.isArray(e)?V.merge([t],e).sort():[t]}this._setOptionDisabled(e)}},load:function(t,s){t=this._getIndex(t);function n(t,e){"abort"===e&&o.panels.stop(!1,!0),o._removeClass(i,"ui-tabs-loading"),a.removeAttr("aria-busy"),t===o.xhr&&delete o.xhr}var o=this,i=this.tabs.eq(t),t=i.find(".ui-tabs-anchor"),a=this._getPanelForTab(i),r={tab:i,panel:a};this._isLocal(t[0])||(this.xhr=V.ajax(this._ajaxSettings(t,s,r)),this.xhr&&"canceled"!==this.xhr.statusText&&(this._addClass(i,"ui-tabs-loading"),a.attr("aria-busy","true"),this.xhr.done(function(t,e,i){setTimeout(function(){a.html(t),o._trigger("load",s,r),n(i,e)},1)}).fail(function(t,e){setTimeout(function(){n(t,e)},1)})))},_ajaxSettings:function(t,i,s){var n=this;return{url:t.attr("href").replace(/#.*$/,""),beforeSend:function(t,e){return n._trigger("beforeLoad",i,V.extend({jqXHR:t,ajaxSettings:e},s))}}},_getPanelForTab:function(t){t=V(t).attr("aria-controls");return this.element.find(this._sanitizeSelector("#"+t))}}),!1!==V.uiBackCompat&&V.widget("ui.tabs",V.ui.tabs,{_processTabs:function(){this._superApply(arguments),this._addClass(this.tabs,"ui-tab")}}),V.ui.tabs,V.widget("ui.tooltip",{version:"1.13.3",options:{classes:{"ui-tooltip":"ui-corner-all ui-widget-shadow"},content:function(){var t=V(this).attr("title");return V("<a>").text(t).html()},hide:!0,items:"[title]:not([disabled])",position:{my:"left top+15",at:"left bottom",collision:"flipfit flip"},show:!0,track:!1,close:null,open:null},_addDescribedBy:function(t,e){var i=(t.attr("aria-describedby")||"").split(/\s+/);i.push(e),t.data("ui-tooltip-id",e).attr("aria-describedby",String.prototype.trim.call(i.join(" ")))},_removeDescribedBy:function(t){var e=t.data("ui-tooltip-id"),i=(t.attr("aria-describedby")||"").split(/\s+/),e=V.inArray(e,i);-1!==e&&i.splice(e,1),t.removeData("ui-tooltip-id"),(i=String.prototype.trim.call(i.join(" ")))?t.attr("aria-describedby",i):t.removeAttr("aria-describedby")},_create:function(){this._on({mouseover:"open",focusin:"open"}),this.tooltips={},this.parents={},this.liveRegion=V("<div>").attr({role:"log","aria-live":"assertive","aria-relevant":"additions"}).appendTo(this.document[0].body),this._addClass(this.liveRegion,null,"ui-helper-hidden-accessible"),this.disabledTitles=V([])},_setOption:function(t,e){var i=this;this._super(t,e),"content"===t&&V.each(this.tooltips,function(t,e){i._updateContent(e.element)})},_setOptionDisabled:function(t){this[t?"_disable":"_enable"]()},_disable:function(){var s=this;V.each(this.tooltips,function(t,e){var i=V.Event("blur");i.target=i.currentTarget=e.element[0],s.close(i,!0)}),this.disabledTitles=this.disabledTitles.add(this.element.find(this.options.items).addBack().filter(function(){var t=V(this);if(t.is("[title]"))return t.data("ui-tooltip-title",t.attr("title")).removeAttr("title")}))},_enable:function(){this.disabledTitles.each(function(){var t=V(this);t.data("ui-tooltip-title")&&t.attr("title",t.data("ui-tooltip-title"))}),this.disabledTitles=V([])},open:function(t){var i=this,e=V(t?t.target:this.element).closest(this.options.items);e.length&&!e.data("ui-tooltip-id")&&(e.attr("title")&&e.data("ui-tooltip-title",e.attr("title")),e.data("ui-tooltip-open",!0),t&&"mouseover"===t.type&&e.parents().each(function(){var t,e=V(this);e.data("ui-tooltip-open")&&((t=V.Event("blur")).target=t.currentTarget=this,i.close(t,!0)),e.attr("title")&&(e.uniqueId(),i.parents[this.id]={element:this,title:e.attr("title")},e.attr("title",""))}),this._registerCloseHandlers(t,e),this._updateContent(e,t))},_updateContent:function(e,i){var t=this.options.content,s=this,n=i?i.type:null;if("string"==typeof t||t.nodeType||t.jquery)return this._open(i,e,t);(t=t.call(e[0],function(t){s._delay(function(){e.data("ui-tooltip-open")&&(i&&(i.type=n),this._open(i,e,t))})}))&&this._open(i,e,t)},_open:function(t,e,i){var s,n,o,a=V.extend({},this.options.position);function r(t){a.of=t,s.is(":hidden")||s.position(a)}i&&((o=this._find(e))?o.tooltip.find(".ui-tooltip-content").html(i):(e.is("[title]")&&(t&&"mouseover"===t.type?e.attr("title",""):e.removeAttr("title")),o=this._tooltip(e),s=o.tooltip,this._addDescribedBy(e,s.attr("id")),s.find(".ui-tooltip-content").html(i),this.liveRegion.children().hide(),(o=V("<div>").html(s.find(".ui-tooltip-content").html())).removeAttr("name").find("[name]").removeAttr("name"),o.removeAttr("id").find("[id]").removeAttr("id"),o.appendTo(this.liveRegion),this.options.track&&t&&/^mouse/.test(t.type)?(this._on(this.document,{mousemove:r}),r(t)):s.position(V.extend({of:e},this.options.position)),s.hide(),this._show(s,this.options.show),this.options.track&&this.options.show&&this.options.show.delay&&(n=this.delayedShow=setInterval(function(){s.is(":visible")&&(r(a.of),clearInterval(n))},13)),this._trigger("open",t,{tooltip:s})))},_registerCloseHandlers:function(t,e){var i={keyup:function(t){t.keyCode===V.ui.keyCode.ESCAPE&&((t=V.Event(t)).currentTarget=e[0],this.close(t,!0))}};e[0]!==this.element[0]&&(i.remove=function(){var t=this._find(e);t&&this._removeTooltip(t.tooltip)}),t&&"mouseover"!==t.type||(i.mouseleave="close"),t&&"focusin"!==t.type||(i.focusout="close"),this._on(!0,e,i)},close:function(t){var e,i=this,s=V(t?t.currentTarget:this.element),n=this._find(s);n?(e=n.tooltip,n.closing||(clearInterval(this.delayedShow),s.data("ui-tooltip-title")&&!s.attr("title")&&s.attr("title",s.data("ui-tooltip-title")),this._removeDescribedBy(s),n.hiding=!0,e.stop(!0),this._hide(e,this.options.hide,function(){i._removeTooltip(V(this))}),s.removeData("ui-tooltip-open"),this._off(s,"mouseleave focusout keyup"),s[0]!==this.element[0]&&this._off(s,"remove"),this._off(this.document,"mousemove"),t&&"mouseleave"===t.type&&V.each(this.parents,function(t,e){V(e.element).attr("title",e.title),delete i.parents[t]}),n.closing=!0,this._trigger("close",t,{tooltip:e}),n.hiding)||(n.closing=!1)):s.removeData("ui-tooltip-open")},_tooltip:function(t){var e=V("<div>").attr("role","tooltip"),i=V("<div>").appendTo(e),s=e.uniqueId().attr("id");return this._addClass(i,"ui-tooltip-content"),this._addClass(e,"ui-tooltip","ui-widget ui-widget-content"),e.appendTo(this._appendTo(t)),this.tooltips[s]={element:t,tooltip:e}},_find:function(t){t=t.data("ui-tooltip-id");return t?this.tooltips[t]:null},_removeTooltip:function(t){clearInterval(this.delayedShow),t.remove(),delete this.tooltips[t.attr("id")]},_appendTo:function(t){t=t.closest(".ui-front, dialog");return t=t.length?t:this.document[0].body},_destroy:function(){var s=this;V.each(this.tooltips,function(t,e){var i=V.Event("blur"),e=e.element;i.target=i.currentTarget=e[0],s.close(i,!0),V("#"+t).remove(),e.data("ui-tooltip-title")&&(e.attr("title")||e.attr("title",e.data("ui-tooltip-title")),e.removeData("ui-tooltip-title"))}),this.liveRegion.remove()}}),!1!==V.uiBackCompat&&V.widget("ui.tooltip",V.ui.tooltip,{options:{tooltipClass:null},_tooltip:function(){var t=this._superApply(arguments);return this.options.tooltipClass&&t.tooltip.addClass(this.options.tooltipClass),t}}),V.ui.tooltip});
3 4(function( $ ) { 5 6var proto = $.ui.autocomplete.prototype, 7 initSource = proto._initSource; 8 9function filter( array, term ) { 10 var matcher = new RegExp( $.ui.autocomplete.escapeRegex(term), "i" ); 11 return $.grep( array, function(value) { 12 return matcher.test( $( "<div>" ).html( value.label || value.value || value ).text() ); 13 }); 14} 15 16$.extend( proto, { 17 _initSource: function() { 18 if ( this.options.html && $.isArray(this.options.source) ) { 19 this.source = function( request, response ) { 20 response( filter( this.options.source, request.term ) ); 21 }; 22 } else { 23 initSource.call( this ); 24 } 25 }, 26 27 _renderItem: function( ul, item) { 28 return $( "<li></li>" ) 29 .data( "item.autocomplete", item ) 30 .append( $( "<a></a>" )[ this.options.html ? "html" : "text" ]( item.label ) ) 31 .appendTo( ul ); 32 } 33}); 34 35})( jQuery ); 36 37(function($) { 38 39 $.widget('ui.tagit', { 40 options: { 41 allowDuplicates : false, 42 caseSensitive : true, 43 fieldName : 'tags', 44 placeholderText : null, // Sets `placeholder` attr on input field. 45 readOnly : false, // Disables editing. 46 removeConfirmation: false, // Require confirmation to remove tags. 47 tagLimit : null, // Max number of tags allowed (null for unlimited). 48 49 // Used for autocomplete, unless you override `autocomplete.source`. 50 availableTags : [], 51 52 // Use to override or add any options to the autocomplete widget. 53 // 54 // By default, autocomplete.source will map to availableTags, 55 // unless overridden. 56 autocomplete: {}, 57 58 // Shows autocomplete before the user even types anything. 59 showAutocompleteOnFocus: false, 60 61 // When enabled, quotes are unneccesary for inputting multi-word tags. 62 allowSpaces: false, 63 64 // The below options are for using a single field instead of several 65 // for our form values. 66 // 67 // When enabled, will use a single hidden field for the form, 68 // rather than one per tag. It will delimit tags in the field 69 // with singleFieldDelimiter. 70 // 71 // The easiest way to use singleField is to just instantiate tag-it 72 // on an INPUT element, in which case singleField is automatically 73 // set to true, and singleFieldNode is set to that element. This 74 // way, you don't need to fiddle with these options. 75 singleField: false, 76 77 // This is just used when preloading data from the field, and for 78 // populating the field with delimited tags as the user adds them. 79 singleFieldDelimiter: ',', 80 81 // Set this to an input DOM node to use an existing form field. 82 // Any text in it will be erased on init. But it will be 83 // populated with the text of tags as they are created, 84 // delimited by singleFieldDelimiter. 85 // 86 // If this is not set, we create an input node for it, 87 // with the name given in settings.fieldName. 88 singleFieldNode: null, 89 90 // Whether to animate tag removals or not. 91 animate: true, 92 93 // Optionally set a tabindex attribute on the input that gets 94 // created for tag-it. 95 tabIndex: null, 96 97 // Event callbacks. 98 beforeTagAdded : null, 99 afterTagAdded : null, 100 101 beforeTagRemoved : null, 102 afterTagRemoved : null, 103 104 onTagClicked : null, 105 onTagLimitExceeded : null, 106 107 108 // DEPRECATED: 109 // 110 // /!\ These event callbacks are deprecated and WILL BE REMOVED at some 111 // point in the future. They're here for backwards-compatibility. 112 // Use the above before/after event callbacks instead. 113 onTagAdded : null, 114 onTagRemoved: null, 115 // `autocomplete.source` is the replacement for tagSource. 116 tagSource: null
117 // Do not use the above deprecated options. 118 }, 119 120 _create: function() { 121 // for handling static scoping inside callbacks 122 var that = this; 123 124 // There are 2 kinds of DOM nodes this widget can be instantiated on: 125 // 1. UL, OL, or some element containing either of these. 126 // 2. INPUT, in which case 'singleField' is overridden to true, 127 // a UL is created and the INPUT is hidden. 128 if (this.element.is('input')) { 129 this.tagList = $('<ul></ul>').insertAfter(this.element); 130 this.options.singleField = true; 131 this.options.singleFieldNode = this.element; 132 this.element.addClass('tagit-hidden-field'); 133 } else { 134 this.tagList = this.element.find('ul, ol').andSelf().last(); 135 } 136 137 this.tagInput = $('<input type="text" />').addClass('ui-widget-content'); 138 139 if (this.options.readOnly) this.tagInput.attr('disabled', 'disabled'); 140 141 if (this.options.tabIndex) { 142 this.tagInput.attr('tabindex', this.options.tabIndex); 143 } 144 145 if (this.options.placeholderText) { 146 this.tagInput.attr('placeholder', this.options.placeholderText); 147 } 148 149 if (!this.options.autocomplete.source) { 150 this.options.autocomplete.source = function(search, showChoices) { 151 var filter = search.term.toLowerCase(); 152 var choices = $.grep(this.options.availableTags, function(element) { 153 // Only match autocomplete options that begin with the search term. 154 // (Case insensitive.) 155 //return (element.toLowerCase().indexOf(filter) === 0); 156 //return (element.toLowerCase().indexOf(filter) >= 0); 157 //console.log(typeof element); 158 //console.log(element); 159 if(typeof element=='object') 160 return (element.value.toLowerCase().indexOf(filter) === 0); 161 else 162 return (element.toLowerCase().indexOf(filter) === 0); 163 }); 164 165 if (!this.options.allowDuplicates) { 166 choices = this._subtractArray(choices, this.assignedTags()); 167 } 168 169 showChoices(choices); 170 }; 171 } 172 173 if (this.options.showAutocompleteOnFocus) { 174 this.tagInput.focus(function(event, ui) { 175 that._showAutocomplete(); 176 }); 177 178 if (typeof this.options.autocomplete.minLength === 'undefined') { 179 this.options.autocomplete.minLength = 0; 180 } 181 } 182 183 // Bind autocomplete.source callback functions to this context. 184 if ($.isFunction(this.options.autocomplete.source)) { 185 this.options.autocomplete.source = $.proxy(this.options.autocomplete.source, this); 186 } 187 188 // DEPRECATED. 189 if ($.isFunction(this.options.tagSource)) { 190 this.options.tagSource = $.proxy(this.options.tagSource, this); 191 } 192 193 this.tagList 194 .addClass('tagit') 195 .addClass('ui-widget ui-widget-content ui-corner-all') 196 // Create the input field. 197 .append($('<li class="tagit-new"></li>').append(this.tagInput)) 198 .click(function(e) { 199 var target = $(e.target); 200 if (target.hasClass('tagit-label')) { 201 var tag = target.closest('.tagit-choice'); 202 if (!tag.hasClass('removed')) { 203 that._trigger('onTagClicked', e, {tag: tag, tagLabel: that.tagLabel(tag)}); 204 } 205 } else { 206 // Sets the focus() to the input field, if the user 207 // clicks anywhere inside the UL. This is needed 208 // because the input field needs to be of a small size. 209 that.tagInput.focus(); 210 } 211 }); 212 213 // Single field support. 214 var addedExistingFromSingleFieldNode = false;
215 if (this.options.singleField) { 216 if (this.options.singleFieldNode) { 217 // Add existing tags from the input field. 218 var node = $(this.options.singleFieldNode); 219 var tags = node.val().split(this.options.singleFieldDelimiter); 220 node.val(''); 221 $.each(tags, function(index, tag) { 222 that.createTag(tag, null, true); 223 addedExistingFromSingleFieldNode = true; 224 }); 225 } else { 226 // Create our single field input after our list. 227 this.options.singleFieldNode = $('<input type="hidden" style="display:none;" value="" name="' + this.options.fieldName + '" />'); 228 this.tagList.after(this.options.singleFieldNode); 229 } 230 } 231 232 // Add existing tags from the list, if any. 233 if (!addedExistingFromSingleFieldNode) { 234 this.tagList.children('li').each(function() { 235 if (!$(this).hasClass('tagit-new')) { 236 that.createTag($(this).text(), $(this).attr('class'), true); 237 $(this).remove(); 238 } 239 }); 240 } 241 242 // Events. 243 this.tagInput 244 .keydown(function(event) { 245 // Backspace is not detected within a keypress, so it must use keydown. 246 if (event.which == $.ui.keyCode.BACKSPACE && that.tagInput.val() === '') { 247 var tag = that._lastTag(); 248 if (!that.options.removeConfirmation || tag.hasClass('remove')) { 249 // When backspace is pressed, the last tag is deleted. 250 that.removeTag(tag); 251 } else if (that.options.removeConfirmation) { 252 tag.addClass('remove ui-state-highlight'); 253 } 254 } else if (that.options.removeConfirmation) { 255 that._lastTag().removeClass('remove ui-state-highlight'); 256 } 257 258 // Comma/Space/Enter are all valid delimiters for new tags, 259 // except when there is an open quote or if setting allowSpaces = true. 260 // Tab will also create a tag, unless the tag input is empty, 261 // in which case it isn't caught. 262 if ( 263 (event.which === $.ui.keyCode.COMMA && event.shiftKey === false) || 264 event.which === $.ui.keyCode.ENTER || 265 ( 266 event.which == $.ui.keyCode.TAB && 267 that.tagInput.val() !== '' 268 ) || 269 ( 270 event.which == $.ui.keyCode.SPACE && 271 that.options.allowSpaces !== true && 272 ( 273 $.trim(that.tagInput.val()).replace( /^s*/, '' ).charAt(0) != '"' || 274 ( 275 $.trim(that.tagInput.val()).charAt(0) == '"' && 276 $.trim(that.tagInput.val()).charAt($.trim(that.tagInput.val()).length - 1) == '"' && 277 $.trim(that.tagInput.val()).length - 1 !== 0 278 ) 279 ) 280 ) 281 ) { 282 // Enter submits the form if there's no text in the input. 283 if (!(event.which === $.ui.keyCode.ENTER && that.tagInput.val() === '')) { 284 event.preventDefault(); 285 } 286 287 // Autocomplete will create its own tag from a selection and close automatically. 288 if (!(that.options.autocomplete.autoFocus && that.tagInput.data('autocomplete-open'))) { 289 that.tagInput.autocomplete('close'); 290 that.createTag(that._cleanedInput()); 291 } 292 } 293 }).blur(function(e){ 294 // Create a tag when the element loses focus. 295 // If autocomplete is enabled and suggestion was clicked, don't add it. 296 if (!that.tagInput.data('autocomplete-open')) { 297 that.createTag(that._cleanedInput()); 298 } 299 }); 300 301 // Autocomplete. 302 if (this.options.availableTags || this.options.tagSource || this.options.autocomplete.source) { 303 var autocompleteOptions = { 304 select: function(event, ui) { 305 that.createTag(ui.item.value); 306 // Preventing the tag input to be updated with the chosen value. 307 return false;
308 } 309 }; 310 $.extend(autocompleteOptions, this.options.autocomplete); 311 312 // tagSource is deprecated, but takes precedence here since autocomplete.source is set by default, 313 // while tagSource is left null by default. 314 autocompleteOptions.source = this.options.tagSource || autocompleteOptions.source; 315 316 this.tagInput.autocomplete(autocompleteOptions).bind('autocompleteopen.tagit', function(event, ui) { 317 that.tagInput.data('autocomplete-open', true); 318 }).bind('autocompleteclose.tagit', function(event, ui) { 319 that.tagInput.data('autocomplete-open', false) 320 }); 321 322 this.tagInput.autocomplete('widget').addClass('tagit-autocomplete'); 323 } 324 }, 325 326 destroy: function() { 327 $.Widget.prototype.destroy.call(this); 328 329 this.element.unbind('.tagit'); 330 this.tagList.unbind('.tagit'); 331 332 this.tagInput.removeData('autocomplete-open'); 333 334 this.tagList.removeClass([ 335 'tagit', 336 'ui-widget', 337 'ui-widget-content', 338 'ui-corner-all', 339 'tagit-hidden-field' 340 ].join(' ')); 341 342 if (this.element.is('input')) { 343 this.element.removeClass('tagit-hidden-field'); 344 this.tagList.remove(); 345 } else { 346 this.element.children('li').each(function() { 347 if ($(this).hasClass('tagit-new')) { 348 $(this).remove(); 349 } else { 350 $(this).removeClass([ 351 'tagit-choice', 352 'ui-widget-content', 353 'ui-state-default', 354 'ui-state-highlight', 355 'ui-corner-all', 356 'remove', 357 'tagit-choice-editable', 358 'tagit-choice-read-only' 359 ].join(' ')); 360 361 $(this).text($(this).children('.tagit-label').text()); 362 } 363 }); 364 365 if (this.singleFieldNode) { 366 this.singleFieldNode.remove(); 367 } 368 } 369 370 return this; 371 }, 372 373 _cleanedInput: function() { 374 // Returns the contents of the tag input, cleaned and ready to be passed to createTag 375 return $.trim(this.tagInput.val().replace(/^"(.*)"$/, '$1')); 376 }, 377 378 _lastTag: function() { 379 return this.tagList.find('.tagit-choice:last:not(.removed)'); 380 }, 381 382 _tags: function() { 383 return this.tagList.find('.tagit-choice:not(.removed)'); 384 }, 385 386 assignedTags: function() { 387 // Returns an array of tag string values 388 var that = this; 389 var tags = []; 390 if (this.options.singleField) { 391 tags = $(this.options.singleFieldNode).val().split(this.options.singleFieldDelimiter); 392 if (tags[0] === '') { 393 tags = []; 394 } 395 } else { 396 this._tags().each(function() { 397 tags.push(that.tagLabel(this)); 398 }); 399 } 400 return tags; 401 }, 402 403 _updateSingleTagsField: function(tags) { 404 // Takes a list of tag string values, updates this.options.singleFieldNode.val to the tags delimited by this.options.singleFieldDelimiter 405 $(this.options.singleFieldNode).val(tags.join(this.options.singleFieldDelimiter)).trigger('change'); 406 }, 407 408 _subtractArray: function(a1, a2) { 409 var result = []; 410 for (var i = 0; i < a1.length; i++) { 411 if(a1[i]['value']===undefined){ 412 if ($.inArray(a1[i], a2) == -1) { 413 result.push(a1[i]); 414 } 415 } else { 416 if ($.inArray(a1[i]['value'], a2) == -1) { 417 result.push(a1[i]); 418 } 419 } 420 } 421 return result; 422 }, 423 424 tagLabel: function(tag) { 425 // Returns the tag's string label. 426 if (this.options.singleField) { 427 return $(tag).find('.tagit-label:first').text(); 428 } else {
429 return $(tag).find('input:first').val(); 430 } 431 }, 432 433 _showAutocomplete: function() { 434 this.tagInput.autocomplete('search', ''); 435 }, 436 437 _findTagByLabel: function(name) { 438 var that = this; 439 var tag = null; 440 this._tags().each(function(i) { 441 if (that._formatStr(name) == that._formatStr(that.tagLabel(this))) { 442 tag = $(this); 443 return false; 444 } 445 }); 446 return tag; 447 }, 448 449 _isNew: function(name) { 450 return !this._findTagByLabel(name); 451 }, 452 453 _formatStr: function(str) { 454 if (this.options.caseSensitive) { 455 return str; 456 } 457 return $.trim(str.toLowerCase()); 458 }, 459 460 _effectExists: function(name) { 461 return Boolean($.effects && ($.effects[name] || ($.effects.effect && $.effects.effect[name]))); 462 }, 463 464 createTag: function(value, additionalClass, duringInitialization) { 465 if (this.options.onlyAvailableTags && $.inArray(this._formatStr(value), this.options.availableTags) == -1) { 466 return false; 467 } 468 var that = this; 469 470 value = $.trim(value); 471 472 if(this.options.preprocessTag) { 473 value = this.options.preprocessTag(value); 474 } 475 476 if (value === '') { 477 return false; 478 } 479 480 if (!this.options.allowDuplicates && !this._isNew(value)) { 481 var existingTag = this._findTagByLabel(value); 482 if (this._trigger('onTagExists', null, { 483 existingTag: existingTag, 484 duringInitialization: duringInitialization 485 }) !== false) { 486 if (this._effectExists('highlight')) { 487 existingTag.effect('highlight'); 488 } 489 } 490 return false; 491 } 492 493 if (this.options.tagLimit && this._tags().length >= this.options.tagLimit) { 494 this._trigger('onTagLimitExceeded', null, {duringInitialization: duringInitialization}); 495 return false; 496 } 497 498 var label = $(this.options.onTagClicked ? '<a class="tagit-label"></a>' : '<span class="tagit-label"></span>').text(value); 499 500 // Create tag. 501 var tag = $('<li></li>') 502 .addClass('tagit-choice ui-widget-content ui-state-default ui-corner-all') 503 .addClass(additionalClass) 504 .append(label); 505 506 if (this.options.readOnly){ 507 tag.addClass('tagit-choice-read-only'); 508 } else { 509 tag.addClass('tagit-choice-editable'); 510 // Button for removing the tag. 511 var removeTagIcon = $('<span></span>') 512 .addClass('ui-icon ui-icon-close'); 513 var removeTag = $('<a><span class="text-icon">\xd7</span></a>') // \xd7 is an X 514 .addClass('tagit-close') 515 .append(removeTagIcon) 516 .click(function(e) { 517 // Removes a tag when the little 'x' is clicked. 518 that.removeTag(tag); 519 }); 520 tag.append(removeTag); 521 } 522 523 // Unless options.singleField is set, each tag has a hidden input field inline. 524 if (!this.options.singleField) { 525 var escapedValue = label.html(); 526 tag.append('<input type="hidden" value="' + escapedValue + '" name="' + this.options.fieldName + '" class="tagit-hidden-field" />'); 527 } 528 529 if (this._trigger('beforeTagAdded', null, { 530 tag: tag, 531 tagLabel: this.tagLabel(tag), 532 duringInitialization: duringInitialization 533 }) === false) { 534 return; 535 } 536 537 if (this.options.singleField) { 538 var tags = this.assignedTags(); 539 tags.push(value); 540 this._updateSingleTagsField(tags); 541 } 542 543 // DEPRECATED. 544 this._trigger('onTagAdded', null, tag); 545 546 this.tagInput.val(''); 547 548 // Insert tag. 549 this.tagInput.parent().before(tag); 550 551 this._trigger('afterTagAdded', null, { 552 tag: tag, 553 tagLabel: this.tagLabel(tag), 554 duringInitialization: duringInitialization 555 }); 556 557 if (this.options.showAutocompleteOnFocus && !duringInitialization) { 558 setTimeout(function () { that._showAutocomplete(); }, 0); 559 } 560 }, 561 562 removeTag: function(tag, animate) { 563 animate = typeof animate === 'undefined' ? this.options.animate : animate; 564 565 tag = $(tag); 566 567 // DEPRECATED. 568 this._trigger('onTagRemoved', null, tag); 569 570 if (this._trigger('beforeTagRemoved', null, {tag: tag, tagLabel: this.tagLabel(tag)}) === false) { 571 return; 572 } 573 574 if (this.options.singleField) { 575 var tags = this.assignedTags(); 576 var removedTagLabel = this.tagLabel(tag); 577 tags = $.grep(tags, function(el){ 578 return el != removedTagLabel; 579 }); 580 this._updateSingleTagsField(tags); 581 } 582 583 if (animate) { 584 tag.addClass('removed'); // Excludes this tag from _tags. 585 var hide_args = this._effectExists('blind') ? ['blind', {direction: 'horizontal'}, 'fast'] : ['fast']; 586 587 var thisTag = this; 588 hide_args.push(function() { 589 tag.remove(); 590 thisTag._trigger('afterTagRemoved', null, {tag: tag, tagLabel: thisTag.tagLabel(tag)}); 591 }); 592 593 tag.fadeOut('fast').hide.apply(tag, hide_args).dequeue(); 594 } else { 595 tag.remove(); 596 this._trigger('afterTagRemoved', null, {tag: tag, tagLabel: this.tagLabel(tag)}); 597 } 598 599 }, 600 601 removeTagByLabel: function(tagLabel, animate) { 602 var toRemove = this._findTagByLabel(tagLabel); 603 if (!toRemove) { 604 throw "No such tag exists with the name '" + tagLabel + "'"; 605 } 606 this.removeTag(toRemove, animate); 607 }, 608 609 removeAll: function() { 610 // Removes all tags. 611 var that = this; 612 this._tags().each(function(index, tag) { 613 that.removeTag(tag, false); 614 }); 615 } 616 617 }); 618})(jQuery); 619 620 621(function($){$.fn.numeric=function(config,callback){if(typeof config==="boolean"){config={decimal:config,negative:true,decimalPlaces:-1}}config=config||{};if(typeof config.negative=="undefined"){config.negative=true}var decimal=config.decimal===false?"":config.decimal||".";var negative=config.negative===true?true:false;var decimalPlaces=typeof config.decimalPlaces=="undefined"?-1:config.decimalPlaces;callback=typeof callback=="function"?callback:function(){};return this.data("numeric.decimal",decimal).data("numeric.negative",negative).data("numeric.callback",callback).data("numeric.decimalPlaces",decimalPlaces).keypress($.fn.numeric.keypress).keyup($.fn.numeric.keyup).blur($.fn.numeric.blur)};$.fn.numeric.keypress=function(e){var decimal=$.data(this,"numeric.decimal");var negative=$.data(this,"numeric.negative");var decimalPlaces=$.data(this,"numeric.decimalPlaces");var key=e.charCode?e.charCode:e.keyCode?e.keyCode:0;if(key==13&&this.nodeName.toLowerCase()=="input"){return true}else if(key==13){return false}var allow=false;if(e.ctrlKey&&key==97||e.ctrlKey&&key==65){return true}if(e.ctrlKey&&key==120||e.ctrlKey&&key==88){return true}if(e.ctrlKey&&key==99||e.ctrlKey&&key==67){return true}if(e.ctrlKey&&key==122||e.ctrlKey&&key==90){return true}if(e.ctrlKey&&key==118||e.ctrlKey&&key==86||e.shiftKey&&key==45){return true}if(key<48||key>57){var value=$(this).val();if($.inArray("-",value.split(""))!==0&&negative&&key==45&&(value.length===0||parseInt($.fn.getSelectionStart(this),10)===0)){return true}if(decimal&&key==decimal.charCodeAt(0)&&$.inArray(decimal,value.split(""))!=-1){allow=false}if(key!=8&&key!=9&&key!=13&&key!=35&&key!=36&&key!=37&&key!=39&&key!=46){allow=false}else{if(typeof e.charCode!="undefined"){if(e.keyCode==e.which&&e.which!==0){allow=true;if(e.which==46){allow=false}}else if(e.keyCode!==0&&e.charCode===0&&e.which===0){allow=true}}}if(decimal&&key==decimal.charCodeAt(0)){if($.inArray(decimal,value.split(""))==-1){allow=true}else{allow=false}}}else{allow=true;if(decimal&&decimalPlaces>0){var dot=$.inArray(decimal,$(this).val().split(""));if(dot>=0&&$(this).val().length>dot+decimalPlaces){allow=false}}}return allow};$.fn.numeric.keyup=function(e){var val=$(this).val();if(val&&val.length>0){var carat=$.fn.getSelectionStart(this);var selectionEnd=$.fn.getSelectionEnd(this);var decimal=$.data(this,"numeric.decimal");var negative=$.data(this,"numeric.negative");var decimalPlaces=$.data(this,"numeric.decimalPlaces");if(decimal!==""&&decimal!==null){var dot=$.inArray(decimal,val.split(""));
621if(dot===0){this.value="0"+val;carat++;selectionEnd++}if(dot==1&&val.charAt(0)=="-"){this.value="-0"+val.substring(1);carat++;selectionEnd++}val=this.value}var validChars=[0,1,2,3,4,5,6,7,8,9,"-",decimal];var length=val.length;for(var i=length-1;i>=0;i--){var ch=val.charAt(i);if(i!==0&&ch=="-"){val=val.substring(0,i)+val.substring(i+1)}else if(i===0&&!negative&&ch=="-"){val=val.substring(1)}var validChar=false;for(var j=0;j<validChars.length;j++){if(ch==validChars[j]){validChar=true;break}}if(!validChar||ch==" "){val=val.substring(0,i)+val.substring(i+1)}}var firstDecimal=$.inArray(decimal,val.split(""));if(firstDecimal>0){for(var k=length-1;k>firstDecimal;k--){var chch=val.charAt(k);if(chch==decimal){val=val.substring(0,k)+val.substring(k+1)}}}if(decimal&&decimalPlaces>0){var dot=$.inArray(decimal,val.split(""));if(dot>=0){val=val.substring(0,dot+decimalPlaces+1);selectionEnd=Math.min(val.length,selectionEnd)}}this.value=val;$.fn.setSelection(this,[carat,selectionEnd])}};$.fn.numeric.blur=function(){var decimal=$.data(this,"numeric.decimal");var callback=$.data(this,"numeric.callback");var negative=$.data(this,"numeric.negative");var val=this.value;if(val!==""){var re=new RegExp(negative?"-?":""+"^\\d+$|^\\d*"+decimal+"\\d+$");if(!re.exec(val)){callback.apply(this)}}};$.fn.removeNumeric=function(){return this.data("numeric.decimal",null).data("numeric.negative",null).data("numeric.callback",null).data("numeric.decimalPlaces",null).unbind("keypress",$.fn.numeric.keypress).unbind("keyup",$.fn.numeric.keyup).unbind("blur",$.fn.numeric.blur)};$.fn.getSelectionStart=function(o){if(o.type==="number"){return undefined}else if(o.createTextRange&&document.selection){var r=document.selection.createRange().duplicate();r.moveEnd("character",o.value.length);if(r.text=="")return o.value.length;return Math.max(0,o.value.lastIndexOf(r.text))}else{try{return o.selectionStart}catch(e){return 0}}};$.fn.getSelectionEnd=function(o){if(o.type==="number"){return undefined}else if(o.createTextRange&&document.selection){var r=document.selection.createRange().duplicate();r.moveStart("character",-o.value.length);return r.text.length}else return o.selectionEnd};$.fn.setSelection=function(o,p){if(typeof p=="number"){p=[p,p]}if(p&&p.constructor==Array&&p.length==2){if(o.type==="number"){o.focus()}else if(o.createTextRange){var r=o.createTextRange();r.collapse(true);r.moveStart("character",p[0]);r.moveEnd("character",p[1]-p[0]);r.select()}else{o.focus();try{if(o.setSelectionRange){o.setSelectionRange(p[0],p[1])}}catch(e){}}}}})(jQuery); 622function is_int(value){ 623 if((parseFloat(value) == parseInt(value)) && !isNaN(value)){ 624 return true; 625 } else { 626 return false; 627 } 628} 629function lbPopup(){ 630 document.getElementById('light').style.display='block'; 631 document.getElementById('fade').style.display='block'; 632} 633function lbClose(){ 634 document.getElementById('light').style.display='none'; 635 document.getElementById('fade').style.display='none'; 636} 637function profilePopup(){ 638 document.getElementById('candidate-profile-page').style.display='block'; 639 document.getElementById('fade').style.display='block'; 640} 641function profileClose(){ 642 document.getElementById('candidate-profile-page').style.display='none'; 643 document.getElementById('fade').style.display='none'; 644} 645function messagePopup(){ 646 document.getElementById('message-popup').style.display='block'; 647 document.getElementById('fade').style.display='block'; 648} 649function messageClose(){ 650 document.getElementById('message-popup').style.display='none'; 651 document.getElementById('fade').style.display='none'; 652} 653function fileInsert(url,id){ 654 document.getElementById(id).value = url; 655}(function ($) { 656 657 $.fn.stickySidebar = function (options) { 658 659 var config = $.extend({ 660 headerSelector: 'header', 661 navSelector: 'nav', 662 contentSelector: '#content', 663 footerSelector: 'footer', 664 sidebarTopMargin: 20, 665 footerThreshold: 40 666 }, options); 667 668 var fixSidebr = function () { 669 670 var sidebarSelector = $(this); 671 var viewportHeight = $(window).height(); 672 var viewportWidth = $(window).width(); 673 var documentHeight = $(document).height(); 674 var headerHeight = $(config.headerSelector).outerHeight(); 675 var navHeight = $(config.navSelector).outerHeight(); 676 var sidebarHeight = sidebarSelector.outerHeight(); 677 var contentHeight = $(config.contentSelector).outerHeight(); 678 var footerHeight = $(config.footerSelector).outerHeight(); 679 var scroll_top = $(window).scrollTop(); 680 var fixPosition = contentHeight - sidebarHeight; 681 var breakingPoint1 = headerHeight + navHeight; 682 var breakingPoint2 = documentHeight - (sidebarHeight + footerHeight + config.footerThreshold); 683 684 // calculate 685 if ((contentHeight >
685 sidebarHeight) && (viewportHeight > sidebarHeight)) { 686 687 if (scroll_top < breakingPoint1) { 688 689 sidebarSelector.removeClass('sticky'); 690 691 } else if ((scroll_top >= breakingPoint1) && (scroll_top < breakingPoint2)) { 692 693 sidebarSelector.addClass('sticky').css('top', config.sidebarTopMargin); 694 695 } else { 696 697 var negative = breakingPoint2 - scroll_top; 698 sidebarSelector.addClass('sticky').css('top', negative); 699 700 } 701 702 } 703 }; 704 705 return this.each(function () { 706 $(window).on('scroll', $.proxy(fixSidebr, this)); 707 $(window).on('resize', $.proxy(fixSidebr, this)) 708 $.proxy(fixSidebr, this)(); 709 }); 710 711 }; 712 713}(jQuery));var DateFormatter;!function(){"use strict";var e,t,a,r,n,o;n=864e5,o=3600,e=function(e,t){return"string"==typeof e&&"string"==typeof t&&e.toLowerCase()===t.toLowerCase()},t=function(e,a,r){var n=r||"0",o=e.toString();return o.length<a?t(n+o,a):o},a=function(e){var t,r;for(e=e||{},t=1;t<arguments.length;t++)if(r=arguments[t])for(var n in r)r.hasOwnProperty(n)&&("object"==typeof r[n]?a(e[n],r[n]):e[n]=r[n]);return e},r={dateSettings:{days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],daysShort:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],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"],ordinal:function(e){var t=e%10,a={1:"st",2:"nd",3:"rd"};return 1!==Math.floor(e%100/10)&&a[t]?a[t]:"th"}},separators:/[ \-+\/\.T:@]/g,validParts:/[dDjlNSwzWFmMntLoYyaABgGhHisueTIOPZcrU]/g,intParts:/[djwNzmnyYhHgGis]/g,tzParts:/\b(?:[PMCEA][SDP]T|(?:Pacific|Mountain|Central|Eastern|Atlantic) (?:Standard|Daylight|Prevailing) Time|(?:GMT|UTC)(?:[-+]\d{4})?)\b/g,tzClip:/[^-+\dA-Z]/g},DateFormatter=function(e){var t=this,n=a(r,e);t.dateSettings=n.dateSettings,t.separators=n.separators,t.validParts=n.validParts,t.intParts=n.intParts,t.tzParts=n.tzParts,t.tzClip=n.tzClip},DateFormatter.prototype={constructor:DateFormatter,parseDate:function(t,a){var r,n,o,i,s,d,u,l,f,c,m=this,h=!1,g=!1,p=m.dateSettings,y={date:null,year:null,month:null,day:null,hour:0,min:0,sec:0};if(!t)return void 0;if(t instanceof Date)return t;if("number"==typeof t)return new Date(t);if("U"===a)return o=parseInt(t),o?new Date(1e3*o):t;if("string"!=typeof t)return"";if(r=a.match(m.validParts),!r||0===r.length)throw new Error("Invalid date format definition.");for(n=t.replace(m.separators,"\x00").split("\x00"),o=0;o<n.length;o++)switch(i=n[o],s=parseInt(i),r[o]){case"y":case"Y":f=i.length,2===f?y.year=parseInt((70>s?"20":"19")+i):4===f&&(y.year=s),h=!0;break;case"m":case"n":case"M":case"F":isNaN(i)?(d=p.monthsShort.indexOf(i),d>-1&&(y.month=d+1),d=p.months.indexOf(i),d>-1&&(y.month=d+1)):s>=1&&12>=s&&(y.month=s),h=!0;break;case"d":case"j":s>=1&&31>=s&&(y.day=s),h=!0;break;case"g":case"h":u=r.indexOf("a")>-1?r.indexOf("a"):r.indexOf("A")>-1?r.indexOf("A"):-1,c=n[u],u>-1?(l=e(c,p.meridiem[0])?0:e(c,p.meridiem[1])?12:-1,s>=1&&12>=s&&l>-1?y.hour=s+l:s>=0&&23>=s&&(y.hour=s)):s>=0&&23>=s&&(y.hour=s),g=!0;break;case"G":case"H":s>=0&&23>=s&&(y.hour=s),g=!0;break;case"i":s>=0&&59>=s&&(y.min=s),g=!0;break;case"s":s>=0&&59>=s&&(y.sec=s),g=!0}if(h===!0&&y.year&&y.month&&y.day)y.date=new Date(y.year,y.month-1,y.day,y.hour,y.min,y.sec,0);else{if(g!==!0)return!1;y.date=new Date(0,0,0,y.hour,y.min,y.sec,0)}return y.date},guessDate:function(e,t){if("string"!=typeof e)return e;var a,r,n,o,i=this,s=e.replace(i.separators,"\x00").split("\x00"),d=/^[djmn]/g,u=t.match(i.validParts),l=new Date,f=0;if(!d.test(u[0]))return e;for(r=0;r<s.length;r++){switch(f=2,n=s[r],o=parseInt(n.substr(0,2)),r){case 0:"m"===u[0]||"n"===u[0]?l.setMonth(o-1):l.setDate(o);break;case 1:"m"===u[0]||"n"===u[0]?l.setDate(o):l.setMonth(o-1);break;case 2:a=l.getFullYear(),n.length<4?(l.setFullYear(parseInt(a.toString().substr(0,4-n.length)+n)),f=n.length):(l.setFullYear=parseInt(n.substr(0,4)),f=4);break;case 3:l.setHours(o);break;case 4:l.setMinutes(o);break;case 5:l.setSeconds(o)}n.substr(f).length>0&&s.splice(r+1,0,n.substr(f))}return l},parseFormat:function(e,a){var r,i=this,s=i.dateSettings,d=/\\?(.?)/gi,u=function(e,t){return r[e]?r[e]():t};return r={d:function(){return t(r.j(),2)},D:function(){return s.daysShort[r.w()]},j:function(){return a.getDate()},l:function(){return s.days[r.w()]},N:function(){return r.w()||7},w:function(){return a.getDay()},z:function(){var e=new Date(r.Y(),r.n()-1,r.j()),t=new Date(r.Y(),0,1);return Math.round((e-t)/n)},W:function(){var e=new Date(r.Y(),r.n()-1,r.j()-r.N()+3),a=new Date(e.getFullYear(),0,4);return t(1+Math.round((e-a)/n/7),2)},F:function(){return s.months[a.getMonth()]},m:function(){return t(r.n(),2)},M:function(){return s.monthsShort[a.getMonth()]},n:function(){return a.getMonth()+1},t:function(){return new Date(r.Y(),r.n(),0).getDate()},L:function(){var e=r.Y();return e%4===0&&e%100!==0||e%400===0?1:0},o:function(){var e=r.n(),t=r.W(),a=r.Y();return a+(12===e&&9>t?1:1===e&&t>9?-1:0)},Y:function(){return a.getFullYear()},y:function(){return r.Y().toString().slice(-2)},a:function(){return r.A().toLowerCase()},A:function(){var e=r.G()<12?0:1;return s.meridiem[e]},B:function(){var e=a.getUTCHours()*o,r=60*a.getUTCMinutes(),n=a.getUTCSeconds();return t(Math.floor((e+r+n+o)/86.4)%1e3,3)},g:function(){return r.G()%12||12},G:function(){return a.getHours()},h:function(){return t(r.g(),2)},H:function(){return t(r.G(),2)},i:function(){return t(a.getMinutes(),2)},s:function(){return t(a.getSeconds(),2)},u:function(){return t(1e3*a.getMilliseconds(),6)},e:function(){var e=/\((.*)\)/.exec(String(a))[1];return e||"Coordinated Universal Time"},T:function(){var e=(String(a).match(i.tzParts)||[""]).pop().replace(i.tzClip,"");return e||"UTC"}
713,I:function(){var e=new Date(r.Y(),0),t=Date.UTC(r.Y(),0),a=new Date(r.Y(),6),n=Date.UTC(r.Y(),6);return e-t!==a-n?1:0},O:function(){var e=a.getTimezoneOffset(),r=Math.abs(e);return(e>0?"-":"+")+t(100*Math.floor(r/60)+r%60,4)},P:function(){var e=r.O();return e.substr(0,3)+":"+e.substr(3,2)},Z:function(){return 60*-a.getTimezoneOffset()},c:function(){return"Y-m-d\\TH:i:sP".replace(d,u)},r:function(){return"D, d M Y H:i:s O".replace(d,u)},U:function(){return a.getTime()/1e3||0}},u(e,e)},formatDate:function(e,t){var a,r,n,o,i,s=this,d="";if("string"==typeof e&&(e=s.parseDate(e,t),e===!1))return!1;if(e instanceof Date){for(n=t.length,a=0;n>a;a++)i=t.charAt(a),"S"!==i&&(o=s.parseFormat(i,e),a!==n-1&&s.intParts.test(i)&&"S"===t.charAt(a+1)&&(r=parseInt(o),o+=s.dateSettings.ordinal(r)),d+=o);return d}return""}}}(),function(e){"function"==typeof define&&define.amd?define(["jquery","jquery-mousewheel"],e):"object"==typeof exports?module.exports=e:e(jQuery)}(function(e){"use strict";function t(e,t,a){this.date=e,this.desc=t,this.style=a}var a={i18n:{ar:{months:["ÙØ§ÙÙÙ Ø§ÙØ«Ø§ÙÙ","شباط","آذار","ÙÙØ³Ø§Ù","Ù
اÙÙ","ØØ²ÙراÙ","تÙ
ÙØ²","آب","Ø£ÙÙÙÙ","تشرÙÙ Ø§ÙØ£ÙÙ","تشرÙÙ Ø§ÙØ«Ø§ÙÙ","ÙØ§ÙÙÙ Ø§ÙØ£ÙÙ"],dayOfWeekShort:["Ù","Ø«","ع","Ø®","ج","س","Ø"],dayOfWeek:["Ø§ÙØ£ØØ¯","Ø§ÙØ§Ø«ÙÙÙ","Ø§ÙØ«Ùاثاء","Ø§ÙØ£Ø±Ø¨Ø¹Ø§Ø¡","Ø§ÙØ®Ù
ÙØ³","Ø§ÙØ¬Ù
عة","Ø§ÙØ³Ø¨Øª","Ø§ÙØ£ØØ¯"]},ro:{months:["Ianuarie","Februarie","Martie","Aprilie","Mai","Iunie","Iulie","August","Septembrie","Octombrie","Noiembrie","Decembrie"],dayOfWeekShort:["Du","Lu","Ma","Mi","Jo","Vi","Sâ"],dayOfWeek:["DuminicÄ","Luni","MarÅ£i","Miercuri","Joi","Vineri","SâmbÄtÄ"]},id:{months:["Januari","Februari","Maret","April","Mei","Juni","Juli","Agustus","September","Oktober","November","Desember"],dayOfWeekShort:["Min","Sen","Sel","Rab","Kam","Jum","Sab"],dayOfWeek:["Minggu","Senin","Selasa","Rabu","Kamis","Jumat","Sabtu"]},is:{months:["Janúar","Febrúar","Mars","AprÃl","MaÃ","JúnÃ","JúlÃ","Ãgúst","September","Október","Nóvember","Desember"],dayOfWeekShort:["Sun","Mán","Ãrið","Mið","Fim","Fös","Lau"],dayOfWeek:["Sunnudagur","Mánudagur","Ãriðjudagur","Miðvikudagur","Fimmtudagur","Föstudagur","Laugardagur"]},bg:{months:["ЯнÑаÑи","ФевÑÑаÑи","ÐаÑÑ","ÐпÑил","Ðай","Юни","Юли","ÐвгÑÑÑ","СепÑемвÑи","ÐкÑомвÑи","ÐоемвÑи","ÐекемвÑи"],dayOfWeekShort:["Ðд","Ðн","ÐÑ","СÑ","ЧÑ","ÐÑ","Сб"],dayOfWeek:["ÐеделÑ","Ðонеделник","ÐÑоÑник","СÑÑда","ЧеÑвÑÑÑÑк","ÐеÑÑк","СÑбоÑа"]},fa:{months:["ÙØ±ÙردÛÙ","Ø§Ø±Ø¯ÛØ¨Ùشت","خرداد","ØªÛØ±","Ù
رداد","Ø´ÙØ±ÛÙØ±","Ù
ÙØ±","آباÙ","آذر","دÛ","بÙÙ
Ù","اسÙÙØ¯"],dayOfWeekShort:["ÛÚ©Ø´ÙØ¨Ù","Ø¯ÙØ´ÙبÙ","Ø³Ù Ø´ÙØ¨Ù","ÚÙØ§Ø±Ø´ÙبÙ","Ù¾ÙØ¬Ø´ÙبÙ","جÙ
عÙ","Ø´ÙØ¨Ù"],dayOfWeek:["ÛÚ©âØ´ÙØ¨Ù","Ø¯ÙØ´ÙبÙ","سÙâØ´ÙØ¨Ù","ÚÙØ§Ø±Ø´ÙبÙ","Ù¾ÙØ¬âØ´ÙØ¨Ù","جÙ
عÙ","Ø´ÙØ¨Ù","ÛÚ©âØ´ÙØ¨Ù"]},ru:{months:["ЯнваÑÑ","ФевÑалÑ","ÐаÑÑ","ÐпÑелÑ","Ðай","ÐÑнÑ","ÐÑлÑ","ÐвгÑÑÑ","СенÑÑбÑÑ","ÐкÑÑбÑÑ","ÐоÑбÑÑ","ÐекабÑÑ"],dayOfWeekShort:["ÐÑ","Ðн","ÐÑ","СÑ","ЧÑ","ÐÑ","Сб"],dayOfWeek:["ÐоÑкÑеÑенÑе","ÐонеделÑник","ÐÑоÑник","СÑеда","ЧеÑвеÑг","ÐÑÑниÑа","СÑббоÑа"]},uk:{months:["СÑÑенÑ","ÐÑÑий","ÐеÑезенÑ","ÐвÑÑенÑ","ТÑавенÑ","ЧеÑвенÑ","ÐипенÑ","СеÑпенÑ","ÐеÑеÑенÑ","ÐовÑенÑ","ÐиÑÑопад","ÐÑÑденÑ"],dayOfWeekShort:["Ðдл","Ðнд","ÐÑÑ","СÑд","ЧÑв","ÐÑн","СбÑ"],dayOfWeek:["ÐедÑлÑ","ÐонедÑлок","ÐÑвÑоÑок","СеÑеда","ЧеÑвеÑ","Ð'ÑÑниÑÑ","СÑбоÑа"]},en:{months:["January","February","March","April","May","June","July","August","September","October","November","December"],dayOfWeekShort:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],dayOfWeek:["Sunday","Monday","Tuesday","Wednesday","Thursday","Frid
713ay","Saturday"]},el:{months:["ÎανοÏ
άÏιοÏ","ΦεβÏοÏ
άÏιοÏ","ÎάÏÏιοÏ","ÎÏÏίλιοÏ","ÎάιοÏ","ÎοÏνιοÏ","ÎοÏλιοÏ","ÎÏγοÏ
ÏÏοÏ","ΣεÏÏÎμβÏιοÏ","ÎκÏÏβÏιοÏ","ÎοÎμβÏιοÏ","ÎεκÎμβÏιοÏ"],dayOfWeekShort:["ÎÏ
Ï","ÎεÏ
","ΤÏι","ΤεÏ","Πεμ","ΠαÏ","Σαβ"],dayOfWeek:["ÎÏ
Ïιακή","ÎεÏ
ÏÎÏα","ΤÏίÏη","ΤεÏάÏÏη","Î ÎμÏÏη","ΠαÏαÏκεÏ
ή","ΣάββαÏο"]},de:{months:["Januar","Februar","März","April","Mai","Juni","Juli","August","September","Oktober","November","Dezember"],dayOfWeekShort:["So","Mo","Di","Mi","Do","Fr","Sa"],dayOfWeek:["Sonntag","Montag","Dienstag","Mittwoch","Donnerstag","Freitag","Samstag"]},nl:{months:["januari","februari","maart","april","mei","juni","juli","augustus","september","oktober","november","december"],dayOfWeekShort:["zo","ma","di","wo","do","vr","za"],dayOfWeek:["zondag","maandag","dinsdag","woensdag","donderdag","vrijdag","zaterdag"]},tr:{months:["Ocak","Åubat","Mart","Nisan","Mayıs","Haziran","Temmuz","AÄustos","Eylül","Ekim","Kasım","Aralık"],dayOfWeekShort:["Paz","Pts","Sal","Ãar","Per","Cum","Cts"],dayOfWeek:["Pazar","Pazartesi","Salı","ÃarÅamba","PerÅembe","Cuma","Cumartesi"]},fr:{months:["Janvier","Février","Mars","Avril","Mai","Juin","Juillet","Août","Septembre","Octobre","Novembre","Décembre"],dayOfWeekShort:["Dim","Lun","Mar","Mer","Jeu","Ven","Sam"],dayOfWeek:["dimanche","lundi","mardi","mercredi","jeudi","vendredi","samedi"]},es:{months:["Enero","Febrero","Marzo","Abril","Mayo","Junio","Julio","Agosto","Septiembre","Octubre","Noviembre","Diciembre"],dayOfWeekShort:["Dom","Lun","Mar","Mié","Jue","Vie","Sáb"],dayOfWeek:["Domingo","Lunes","Martes","Miércoles","Jueves","Viernes","Sábado"]},th:{months:["มà¸à¸£à¸²à¸à¸¡","à¸à¸¸à¸¡à¸ าà¸à¸±à¸à¸à¹","มีà¸à¸²à¸à¸¡","à¹à¸¡à¸©à¸²à¸¢à¸","à¸à¸¤à¸©à¸ าà¸à¸¡","มิà¸à¸¸à¸à¸²à¸¢à¸","à¸à¸£à¸à¸à¸²à¸à¸¡","สิà¸à¸«à¸²à¸à¸¡","à¸à¸±à¸à¸¢à¸²à¸¢à¸","à¸à¸¸à¸¥à¸²à¸à¸¡","à¸à¸¤à¸¨à¸à¸´à¸à¸²à¸¢à¸","à¸à¸±à¸à¸§à¸²à¸à¸¡"],dayOfWeekShort:["à¸à¸².","à¸.","à¸.","à¸.","à¸à¸¤.","ศ.","ส."],dayOfWeek:["à¸à¸²à¸à¸´à¸à¸¢à¹","à¸à¸±à¸à¸à¸£à¹","à¸à¸±à¸à¸à¸²à¸£","à¸à¸¸à¸","à¸à¸¤à¸«à¸±à¸ª","ศุà¸à¸£à¹","à¹à¸ªà¸²à¸£à¹","à¸à¸²à¸à¸´à¸à¸¢à¹"]},pl:{months:["styczeÅ","luty","marzec","kwiecieÅ","maj","czerwiec","lipiec","sierpieÅ","wrzesieÅ","październik","listopad","grudzieÅ"],dayOfWeekShort:["nd","pn","wt","År","cz","pt","sb"],dayOfWeek:["niedziela","poniedziaÅek","wtorek","Åroda","czwartek","piÄ
tek","sobota"]},pt:{months:["Janeiro","Fevereiro","Março","Abril","Maio","Junho","Julho","Agosto","Setembro","Outubro","Novembro","Dezembro"],dayOfWeekShort:["Dom","Seg","Ter","Qua","Qui","Sex","Sab"],dayOfWeek:["Domingo","Segunda","Terça","Quarta","Quinta","Sexta","Sábado"]},ch:{months:["䏿","äºæ","䏿","åæ","äºæ","å
æ","䏿","å
«æ","乿","åæ","å䏿","åäºæ"],dayOfWeekShort:["æ¥","ä¸","äº","ä¸","å","äº","å
"]},se:{months:["Januari","Februari","Mars","April","Maj","Juni","Juli","Augusti","September","Oktober","November","December"],dayOfWeekShort:["Sön","MÃ¥n","Tis","Ons","Tor","Fre","Lör"]},kr:{months:["1ì","2ì","3ì","4ì","5ì","6ì","7ì","8ì","9ì","10ì","11ì","12ì"],dayOfWeekShort:["ì¼","ì","í","ì","목","ê¸","í "],dayOfWeek:["ì¼ìì¼","ììì¼","íìì¼","ììì¼","목ìì¼","ê¸ìì¼","í ìì¼"]},it:{months:["Gennaio","Febbraio","Marzo","Aprile","Maggio","Giugno","Luglio","Agosto","Settembre","Ottobre","Novembre","Dicembre"],dayOfWeekShort:["Dom","Lun","Mar","Mer","Gio","Ven","Sab"],dayOfWeek:["Domenica","Lunedì","Martedì","Mercoledì","Giovedì","Venerdì","Sabato"]},da:{months:["January","Februar","Marts","April","Maj","Juni","July","August","September","Oktober","November","December"],dayOfWeekShort:["Søn","Man","Tir","Ons","Tor","Fre","Lør"],dayOfWeek:["søndag","mandag","tirsdag","onsdag","torsdag","fredag","lørdag"]},no:{months:["Januar","Februar","Mars","April","Mai","Juni","Juli","August","September","Oktober","November","Desember"],dayOfWeekShort:["Søn","Man","Tir","Ons","Tor","Fre","Lør"],dayOfWeek:["Søndag","Mandag","Tirsdag","Onsdag","Torsdag","Fredag","Lørdag"]},ja:{months:["1æ","2æ","3æ","4æ","5æ","6æ","7æ","8æ","9æ","10æ","11æ","12æ"],dayOfWeekShort:["æ¥","æ","ç«","æ°´","æ¨","é","å"],dayOfWeek:["æ¥æ","ææ","ç«æ","æ°´æ","æ¨æ","éæ","åæ"]},vi:{months:["Tháng 1","Tháng 2","Tháng 3","Tháng 4","Tháng 5","Tháng 6","Tháng 7","Tháng 8","Tháng 9","Tháng 10","Tháng 11","Tháng 12"],dayOfWeekShort:["CN","T2","T3","T4","T5","T6","T7"],dayOfWeek:["Chá»§ nháºt","Thứ hai","Thứ ba","Thứ tư","Thứ nÄm","Thứ sáu","Thứ bảy"]},sl:{months:["Januar","Februar","Marec","April","Maj","Junij","Julij","Avgust","September","Oktober","November","December"],dayOfWeekShort:["Ned","Pon","Tor","Sre","Äet","Pet","Sob"],dayOfWeek:["Nedelja","Ponedeljek","Torek","Sreda","Äetrtek","Petek","Sobota"]},cs:{months:["Leden","Ãnor","BÅezen","Duben","KvÄten","Äerven","Äervenec","Srpen","ZáÅÃ","ÅÃjen","Listopad","Prosinec"],dayOfWeekShort:["Ne","Po","Ãt","St","Ät","Pá","So"]},hu:{months:["Január","Február","Március","Ãprilis","Május","Június","Július","Augusztus","Szeptember","Október","November","December"],dayOfWeekShort:["Va","Hé","Ke","Sze","Cs","Pé","Szo"],dayOfWeek:["vasárnap","hétfÅ","kedd","szerda","csütörtök","péntek","szombat"]},az:{months:["Yanvar","Fevral","Mart","Aprel","May","Iyun","Iyul","Avqust","Sentyabr","Oktyabr","Noyabr","Dekabr"],dayOfWeekShort:["B","Be","Ãa","Ã","Ca","C","Å"],dayOfWeek:["Bazar","Bazar ertÉsi","ÃÉrÅÉnbÉ axÅamı","ÃÉrÅÉnbÉ","CümÉ axÅamı","CümÉ","ÅÉnbÉ"]},bs:{months:["Januar","Februar","Mart","April","Maj","Jun","Jul","Avgust","Septembar","Oktobar","Novembar","Decembar"],dayOfWeekShort:["Ned","Pon","Uto","Sri","Äet","Pet","Sub"],dayOfWeek:["Nedjelja","Ponedjeljak","Utorak","Srijeda","Äetvrtak","Petak","Subota"]},ca:{months:["Gener","Febrer","Març","Abril","Maig","Juny","Juliol","Agost","Setembre","Octubre","Novembre","Desembre"],dayOfWeekShort:["Dg","Dl","Dt","Dc","Dj","Dv","Ds"],dayOfWeek:["Diumenge","Dilluns","Dimarts","Dimecres","Dijous","Divendres","Dissabte"]},"en-GB":{months:["January","February","March","April","May","June","July","August","September","October","November","December"],dayOfWeekShort:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],dayOfWeek:["Sunday","Monday","Tuesday","Wednesday","Thursday","Frid
713ay","Saturday"]},et:{months:["Jaanuar","Veebruar","Märts","Aprill","Mai","Juuni","Juuli","August","September","Oktoober","November","Detsember"],dayOfWeekShort:["P","E","T","K","N","R","L"],dayOfWeek:["Pühapäev","Esmaspäev","Teisipäev","Kolmapäev","Neljapäev","Reede","Laupäev"]},eu:{months:["Urtarrila","Otsaila","Martxoa","Apirila","Maiatza","Ekaina","Uztaila","Abuztua","Iraila","Urria","Azaroa","Abendua"],dayOfWeekShort:["Ig.","Al.","Ar.","Az.","Og.","Or.","La."],dayOfWeek:["Igandea","Astelehena","Asteartea","Asteazkena","Osteguna","Ostirala","Larunbata"]},fi:{months:["Tammikuu","Helmikuu","Maaliskuu","Huhtikuu","Toukokuu","Kesäkuu","Heinäkuu","Elokuu","Syyskuu","Lokakuu","Marraskuu","Joulukuu"],dayOfWeekShort:["Su","Ma","Ti","Ke","To","Pe","La"],dayOfWeek:["sunnuntai","maanantai","tiistai","keskiviikko","torstai","perjantai","lauantai"]},gl:{months:["Xan","Feb","Maz","Abr","Mai","Xun","Xul","Ago","Set","Out","Nov","Dec"],dayOfWeekShort:["Dom","Lun","Mar","Mer","Xov","Ven","Sab"],dayOfWeek:["Domingo","Luns","Martes","Mércores","Xoves","Venres","Sábado"]},hr:{months:["SijeÄanj","VeljaÄa","Ožujak","Travanj","Svibanj","Lipanj","Srpanj","Kolovoz","Rujan","Listopad","Studeni","Prosinac"],dayOfWeekShort:["Ned","Pon","Uto","Sri","Äet","Pet","Sub"],dayOfWeek:["Nedjelja","Ponedjeljak","Utorak","Srijeda","Äetvrtak","Petak","Subota"]},ko:{months:["1ì","2ì","3ì","4ì","5ì","6ì","7ì","8ì","9ì","10ì","11ì","12ì"],dayOfWeekShort:["ì¼","ì","í","ì","목","ê¸","í "],dayOfWeek:["ì¼ìì¼","ììì¼","íìì¼","ììì¼","목ìì¼","ê¸ìì¼","í ìì¼"]},lt:{months:["Sausio","Vasario","Kovo","Balandžio","GegužÄs","Birželio","Liepos","RugpjÅ«Äio","RugsÄjo","Spalio","LapkriÄio","Gruodžio"],dayOfWeekShort:["Sek","Pir","Ant","Tre","Ket","Pen","Å eÅ¡"],dayOfWeek:["Sekmadienis","Pirmadienis","Antradienis","TreÄiadienis","Ketvirtadienis","Penktadienis","Å eÅ¡tadienis"]},lv:{months:["JanvÄris","FebruÄris","Marts","AprÄ«lis ","Maijs","JÅ«nijs","JÅ«lijs","Augusts","Septembris","Oktobris","Novembris","Decembris"],dayOfWeekShort:["Sv","Pr","Ot","Tr","Ct","Pk","St"],dayOfWeek:["SvÄtdiena","Pirmdiena","Otrdiena","TreÅ¡diena","Ceturtdiena","Piektdiena","Sestdiena"]},mk:{months:["ÑанÑаÑи","ÑевÑÑаÑи","маÑÑ","апÑил","маÑ","ÑÑни","ÑÑли","авгÑÑÑ","ÑепÑемвÑи","окÑомвÑи","ноемвÑи","декемвÑи"],dayOfWeekShort:["нед","пон","вÑо","ÑÑе","ÑеÑ","пеÑ","Ñаб"],dayOfWeek:["Ðедела","Ðонеделник","ÐÑоÑник","СÑеда","ЧеÑвÑÑок","ÐеÑок","СабоÑа"]},mn:{months:["1-Ñ ÑаÑ","2-Ñ ÑаÑ","3-Ñ ÑаÑ","4-Ñ ÑаÑ","5-Ñ ÑаÑ","6-Ñ ÑаÑ","7-Ñ ÑаÑ","8-Ñ ÑаÑ","9-Ñ ÑаÑ","10-Ñ ÑаÑ","11-Ñ ÑаÑ","12-Ñ ÑаÑ"],dayOfWeekShort:["Ðав","ÐÑг","ÐÑ
а","ÐÒ¯Ñ","ÐÑн","ÐÑм","ÐÑм"],dayOfWeek:["Ðаваа","ÐÑгмаÑ","ÐÑ
агва","ÐÒ¯ÑÑв","ÐааÑан","ÐÑмба","ÐÑм"]},"pt-BR":{months:["Janeiro","Fevereiro","Março","Abril","Maio","Junho","Julho","Agosto","Setembro","Outubro","Novembro","Dezembro"],dayOfWeekShort:["Dom","Seg","Ter","Qua","Qui","Sex","Sáb"],dayOfWeek:["Domingo","Segunda","Terça","Quarta","Quinta","Sexta","Sábado"]},sk:{months:["Január","Február","Marec","AprÃl","Máj","Jún","Júl","August","September","Október","November","December"],dayOfWeekShort:["Ne","Po","Ut","St","Å t","Pi","So"],dayOfWeek:["Nedeľa","Pondelok","Utorok","Streda","Å tvrtok","Piatok","Sobota"]},sq:{months:["Janar","Shkurt","Mars","Prill","Maj","Qershor","Korrik","Gusht","Shtator","Tetor","Nëntor","Dhjetor"],dayOfWeekShort:["Die","Hën","Mar","Mër","Enj","Pre","Shtu"],dayOfWeek:["E Diel","E Hënë","E MartÄ","E Mërkurë","E Enjte","E Premte","E Shtunë"]},"sr-YU":{months:["Januar","Februar","Mart","April","Maj","Jun","Jul","Avgust","Septembar","Oktobar","Novembar","Decembar"],dayOfWeekShort:["Ned","Pon","Uto","Sre","Äet","Pet","Sub"],dayOfWeek:["Nedelja","Ponedeljak","Utorak","Sreda","Äetvrtak","Petak","Subota"]},sr:{months:["ÑанÑаÑ","ÑебÑÑаÑ","маÑÑ","апÑил","маÑ","ÑÑн","ÑÑл","авгÑÑÑ","ÑепÑембаÑ","окÑобаÑ","новембаÑ","деÑембаÑ"],dayOfWeekShort:["нед","пон","ÑÑо","ÑÑе","ÑеÑ","пеÑ","ÑÑб"],dayOfWeek:["ÐедеÑа","ÐонедеÑак","УÑоÑак","СÑеда","ЧеÑвÑÑак","ÐеÑак","СÑбоÑа"]},sv:{months:["Januari","Februari","Mars","April","Maj","Juni","Juli","Augusti","September","Oktober","November","December"],dayOfWeekShort:["Sön","MÃ¥n","Tis","Ons","Tor","Fre","Lör"],dayOfWeek:["Söndag","MÃ¥ndag","Tisdag","Onsdag","Torsdag","Fredag","Lördag"]},"zh-TW":{months:["䏿","äºæ","䏿","åæ","äºæ","å
æ","䏿","å
«æ","乿","åæ","å䏿","åäºæ"],dayOfWeekShort:["æ¥","ä¸","äº","ä¸","å","äº","å
"],dayOfWeek:["æææ¥","ææä¸","ææäº","ææä¸","ææå","ææäº","ææå
"]},zh:{months:["䏿","äºæ","䏿","åæ","äºæ","å
æ","䏿","å
«æ","乿","åæ","å䏿","åäºæ"],dayOfWeekShort:["æ¥","ä¸","äº","ä¸","å","äº","å
"],dayOfWeek:["æææ¥","ææä¸","ææäº","ææä¸","ææå","ææäº","ææå
"]},he:{months:["×× ××ר","פ×ר××ר","×רץ","×פר××","×××","××× ×","××××","××××ס×","ספ×××ר","×××§×××ר","× ××××ר","×צ××ר"],dayOfWeekShort:["×'","×'","×'","×'","×'","×'","ש×ת"],dayOfWeek:["ר×ש××","×©× ×","ש××ש×","ר×××¢×","×××ש×","ש×ש×","ש×ת","ר×ש××"]},hy:{months:["ÕÕ¸ÖÕ¶Õ¾Õ¡Ö","ÕÕ¥Õ¿ÖÕ¾Õ¡Ö","ÕÕ¡ÖÕ¿","Ô±ÕºÖÕ«Õ¬","ÕÕ¡ÕµÕ«Õ½","ÕÕ¸ÖÕ¶Õ«Õ½","ÕÕ¸ÖÕ¬Õ«Õ½","ÕÕ£Õ¸Õ½Õ¿Õ¸Õ½","ÕÕ¥ÕºÕ¿Õ¥Õ´Õ¢Õ¥Ö","ÕÕ¸Õ¯Õ¿Õ¥Õ´Õ¢Õ¥Ö","ÕÕ¸ÕµÕ¥Õ´Õ¢Õ¥Ö","Ô´Õ¥Õ¯Õ¿Õ¥Õ´Õ¢Õ¥Ö"],dayOfWeekShort:["Ô¿Õ«","ÔµÖÕ¯","ÔµÖÖ","ÕÕ¸Ö","ÕÕ¶Õ£","ÕÖÖÕ¢","ÕÕ¢Õ©"],dayOfWeek:["Ô¿Õ«ÖÕ¡Õ¯Õ«","ÔµÖÕ¯Õ¸ÖÕ·Õ¡Õ¢Õ©Õ«","ÔµÖÕ¥ÖÕ·Õ¡Õ¢Õ©Õ«","ÕÕ¸ÖÕ¥ÖÕ·Õ¡Õ¢Õ©Õ«","ÕÕ«Õ¶Õ£Õ·Õ¡Õ¢Õ©Õ«","ÕÖÖÕ¢Õ¡Õ©","ÕÕ¡Õ¢Õ¡Õ©"]}
713,kg:{months:["Ò®ÑÑүн айÑ","ÐиÑдин айÑ","Ðалган ÐÑÑан","ЧÑн ÐÑÑан","ÐÑгÑ","ÐÑлжа","Теке","ÐÐ°Ñ Ðона","ÐÑк Ðона","ТогÑздÑн айÑ","ÐеÑинин айÑ","ÐеÑÑин айÑ"],dayOfWeekShort:["Ðек","Ðүй","Шей","ШаÑ","Ðей","ÐÑм","ÐÑе"],dayOfWeek:["ÐекÑемб","ÐүйÑөмб","ШейÑемб","ШаÑÑемб","ÐейÑемби","ÐÑма","ÐÑенб"]},rm:{months:["Schaner","Favrer","Mars","Avrigl","Matg","Zercladur","Fanadur","Avust","Settember","October","November","December"],dayOfWeekShort:["Du","Gli","Ma","Me","Gie","Ve","So"],dayOfWeek:["Dumengia","Glindesdi","Mardi","Mesemna","Gievgia","Venderdi","Sonda"]},ka:{months:["áááááá á","ááááá áááá","ááá á¢á","ááá ááá","áááá¡á","ááááá¡á","ááááá¡á","ááááá¡á¢á","á¡áá¥á¢ááááá á","áá¥á¢ááááá á","ááááááá á","áááááááá á"],dayOfWeekShort:["áá","áá á¨","á¡ááá¨","ááá®","á®á£á","ááá ","á¨áá"],dayOfWeek:["áááá á","áá á¨ááááá","á¡ááá¨ááááá","ááá®á¨ááááá","á®á£áá¨ááááá","ááá áá¡áááá","á¨ááááá"]}},value:"",rtl:!1,format:"Y/m/d H:i",formatTime:"H:i",formatDate:"Y/m/d",startDate:!1,step:60,monthChangeSpinner:!0,closeOnDateSelect:!1,closeOnTimeSelect:!0,closeOnWithoutClick:!0,closeOnInputClick:!0,timepicker:!0,datepicker:!0,weeks:!1,defaultTime:!1,defaultDate:!1,minDate:!1,maxDate:!1,minTime:!1,maxTime:!1,disabledMinTime:!1,disabledMaxTime:!1,allowTimes:[],opened:!1,initTime:!0,inline:!1,theme:"",onSelectDate:function(){},onSelectTime:function(){},onChangeMonth:function(){},onGetWeekOfYear:function(){},onChangeYear:function(){},onChangeDateTime:function(){},onShow:function(){},onClose:function(){},onGenerate:function(){},withoutCopyright:!0,inverseButton:!1,hours12:!1,next:"xdsoft_next",prev:"xdsoft_prev",dayOfWeekStart:0,parentID:"body",timeHeightInTimePicker:25,timepickerScrollbar:!0,todayButton:!0,prevButton:!0,nextButton:!0,defaultSelect:!0,scrollMonth:!0,scrollTime:!0,scrollInput:!0,lazyInit:!1,mask:!1,validateOnBlur:!0,allowBlank:!0,yearStart:1950,yearEnd:2050,monthStart:0,monthEnd:11,style:"",id:"",fixed:!1,roundTime:"round",className:"",weekends:[],highlightedDates:[],highlightedPeriods:[],allowDates:[],allowDateRe:null,disabledDates:[],disabledWeekDays:[],yearOffset:0,beforeShowDay:null,enterLikeTab:!0,showApplyButton:!1},r=null,n="en",o="en",i={meridiem:["AM","PM"]},s=function(){var t=a.i18n[o],n={days:t.dayOfWeek,daysShort:t.dayOfWeekShort,months:t.months,monthsShort:e.map(t.months,function(e){return e.substring(0,3)})};r=new DateFormatter({dateSettings:e.extend({},i,n)})};e.datetimepicker={setLocale:function(e){var t=a.i18n[e]?e:n;o!=t&&(o=t,s())},setDateFormatter:function(e){r=e},RFC_2822:"D, d M Y H:i:s O",ATOM:"Y-m-dTH:i:sP",ISO_8601:"Y-m-dTH:i:sO",RFC_822:"D, d M y H:i:s O",RFC_850:"l, d-M-y H:i:s T",RFC_1036:"D, d M y H:i:s O",RFC_1123:"D, d M Y H:i:s O",RSS:"D, d M Y H:i:s O",W3C:"Y-m-dTH:i:sP"},s(),window.getComputedStyle||(window.getComputedStyle=function(e){return this.el=e,this.getPropertyValue=function(t){var a=/(\-([a-z]){1})/g;return"float"===t&&(t="styleFloat"),a.test(t)&&(t=t.replace(a,function(e,t,a){return a.toUpperCase()})),e.currentStyle[t]||null},this}),Array.prototype.indexOf||(Array.prototype.indexOf=function(e,t){var a,r;for(a=t||0,r=this.length;r>a;a+=1)if(this[a]===e)return a;return-1}),Date.prototype.countDaysInMonth=function(){return new Date(this.getFullYear(),this.getMonth()+1,0).getDate()},e.fn.xdsoftScroller=function(t){return this.each(function(){var a,r,n,o,i,s=e(this),d=function(e){var t,a={x:0,y:0};return"touchstart"===e.type||"touchmove"===e.type||"touchend"===e.type||"touchcancel"===e.type?(t=e.originalEvent.touches[0]||e.originalEvent.changedTouches[0],a.x=t.clientX,a.y=t.clientY):("mousedown"===e.type||"mouseup"===e.type||"mousemove"===e.type||"mouseover"===e.type||"mouseout"===e.type||"mouseenter"
713===e.type||"mouseleave"===e.type)&&(a.x=e.clientX,a.y=e.clientY),a},u=100,l=!1,f=0,c=0,m=0,h=!1,g=0,p=function(){};return"hide"===t?void s.find(".xdsoft_scrollbar").hide():(e(this).hasClass("xdsoft_scroller_box")||(a=s.children().eq(0),r=s[0].clientHeight,n=a[0].offsetHeight,o=e('<div class="xdsoft_scrollbar"></div>'),i=e('<div class="xdsoft_scroller"></div>'),o.append(i),s.addClass("xdsoft_scroller_box").append(o),p=function(e){var t=d(e).y-f+g;0>t&&(t=0),t+i[0].offsetHeight>m&&(t=m-i[0].offsetHeight),s.trigger("scroll_element.xdsoft_scroller",[u?t/u:0])},i.on("touchstart.xdsoft_scroller mousedown.xdsoft_scroller",function(a){r||s.trigger("resize_scroll.xdsoft_scroller",[t]),f=d(a).y,g=parseInt(i.css("margin-top"),10),m=o[0].offsetHeight,"mousedown"===a.type||"touchstart"===a.type?(document&&e(document.body).addClass("xdsoft_noselect"),e([document.body,window]).on("touchend mouseup.xdsoft_scroller",function n(){e([document.body,window]).off("touchend mouseup.xdsoft_scroller",n).off("mousemove.xdsoft_scroller",p).removeClass("xdsoft_noselect")}),e(document.body).on("mousemove.xdsoft_scroller",p)):(h=!0,a.stopPropagation(),a.preventDefault())}).on("touchmove",function(e){h&&(e.preventDefault(),p(e))}).on("touchend touchcancel",function(){h=!1,g=0}),s.on("scroll_element.xdsoft_scroller",function(e,t){r||s.trigger("resize_scroll.xdsoft_scroller",[t,!0]),t=t>1?1:0>t||isNaN(t)?0:t,i.css("margin-top",u*t),setTimeout(function(){a.css("marginTop",-parseInt((a[0].offsetHeight-r)*t,10))},10)}).on("resize_scroll.xdsoft_scroller",function(e,t,d){var l,f;r=s[0].clientHeight,n=a[0].offsetHeight,l=r/n,f=l*o[0].offsetHeight,l>1?i.hide():(i.show(),i.css("height",parseInt(f>10?f:10,10)),u=o[0].offsetHeight-i[0].offsetHeight,d!==!0&&s.trigger("scroll_element.xdsoft_scroller",[t||Math.abs(parseInt(a.css("marginTop"),10))/(n-r)]))}),s.on("mousewheel",function(e){var t=Math.abs(parseInt(a.css("marginTop"),10));return t-=20*e.deltaY,0>t&&(t=0),s.trigger("scroll_element.xdsoft_scroller",[t/(n-r)]),e.stopPropagation(),!1}),s.on("touchstart",function(e){l=d(e),c=Math.abs(parseInt(a.css("marginTop"),10))}),s.on("touchmove",function(e){if(l){e.preventDefault();var t=d(e);s.trigger("scroll_element.xdsoft_scroller",[(c-(t.y-l.y))/(n-r)])}}),s.on("touchend touchcancel",function(){l=!1,c=0})),void s.trigger("resize_scroll.xdsoft_scroller",[t]))})},e.fn.datetimepicker=function(n,i){var s,d,u=this,l=48,f=57,c=96,m=105,h=17,g=46,p=13,y=27,v=8,b=37,D=38,k=39,x=40,T=9,S=116,w=65,O=67,M=86,_=90,W=89,F=!1,C=e.isPlainObject(n)||!n?e.extend(!0,{},a,n):e.extend(!0,{},a),P=0,A=function(e){e.on("open.xdsoft focusin.xdsoft mousedown.xdsoft touchstart",function t(){e.is(":disabled")||e.data("xdsoft_datetimepicker")||(clearTimeout(P),P=setTimeout(function(){e.data("xdsoft_datetimepicker")||s(e),e.off("open.xdsoft focusin.xdsoft mousedown.xdsoft touchstart",t).trigger("open.xdsoft")},100))})};return s=function(a){function i(){var e,t=!1;return C.startDate?t=j.strToDate(C.startDate):(t=C.value||(a&&a.val&&a.val()?a.val():""),t?t=j.strToDateTime(t):C.defaultDate&&(t=j.strToDateTime(C.defaultDate),C.defaultTime&&(e=j.strtotime(C.defaultTime),t.setHours(e.getHours()),t.setMinutes(e.getMinutes())))),t&&j.isValidDate(t)?J.data("changed",!0):t="",t||0}function s(t){var r=function(e,t){var a=e.replace(/([\[\]\/\{\}\(\)\-\.\+]{1})/g,"\\$1").replace(/_/g,"{digit+}").replace(/([0-9]{1})/g,"{digit$1}").replace(/\{digit([0-9]{1})\}/g,"[0-$1_]{1}").replace(/\{digit[\+]\}/g,"[0-9_]{1}");return new RegExp(a).test(t)},n=function(e){try{if(document.selection&&document.selection.createRange){var t=document.selection.createRange();return t.getBookmark().charCodeAt(2)-2}if(e.setSelectionRange)return e.selectionStart}catch(a){return 0}},o=function(e,t){if(e="string"==typeof e||e instanceof String?document.getElementById(e):e,!e)return!1;if(e.createTextRange){var a=e.createTextRange();return a.collapse(!0),a.moveEnd("character",t),a.moveStart("character",t),a.select(),!0}return e.setSelectionRange?(e.setSelectionRange(t,t),!0):!1};t.mask&&a.off("keydown.xdsoft"),t.mask===!0&&(t.mask="undefined"!=typeof moment?t.format.replace(/Y{4}/g,"9999").replace(/Y{2}/g,"99").replace(/M{2}/g,"19").replace(/D{2}/g,"39").replace(/H{2}/g,"29").replace(/m{2}/g,"59").replace(/s{2}/g,"59"):t.format.replace(/Y/g,"9999").replace(/F/g,"9999").replace(/m/g,"19").replace(/d/g,"39").replace(/H/g,"29").replace(/i/g,"59").replace(/s/g,"59")),"string"===e.type(t.mask)&&(r(t.mask,a.val())||(a.val(t.mask.replace(/[0-9]/g,"_")),o(a[0],0)),a.on("keydown.xdsoft",function(i){var s,d,u=this.value,C=i.which;if(C>=l&&f>=C||C>=c&&m>=C||C===v||C===g){for(s=n(this),d=C!==v&&C!==g?String.fromCharCode(C>=c&&m>=C?C-l:C):"_",C!==v&&C!==g||!s||(s-=1,d="_");/[^0-9_]/.test(t.mask.substr(s,1))&&s<t.mask.length&&s>0;)s+=C===v||C===g?-1:1;if(u=u.substr(0,s)+d+u.substr(s+1),""===e.trim(u))u=t.mask.replace(/[0-9]/g,"_");else if(s===t.mask.length)return i.preventDefault(),!1;for(s+=C===v||C===g?0:1;/[^0-9_]/.test(t.mask.substr(s,1))&&s<t.mask.length&&s>0;)s+=C===v||C===g?-1:1;r(t.mask,u)?(this.value=u,o(this,s)):""===e.trim(u)?this.value=t.mask.replace(/[0-9]/g,"_"):a.trigger("error_input.xdsoft")}else if(-1!==[w,O,M,_,W].indexOf(C)&&F||-1!==[y,D,x,b,k,S,h,T,p].indexOf(C))return!0;return i.preventDefault(),!1}))}var d,u,P,A,Y,j,H,J=e('<div class="xdsoft_datetimepicker xdsoft_noselect"></div>'),z=e('<div class="xdsoft_copyright"><a target="_blank" href="http://xdsoft.net/jqplugins/datetimepicker/">xdsoft.net</a></div>'),I=e('<div class="xdsoft_datepicker active"></div>'),N=e('<div class="xdsoft_monthpicker"><button type="button" class="xdsoft_prev"></button><button type="button" class="xdsoft_today_button"></button><div class="xdsoft_label xdsoft_month"><span></span><i></i></div><div class="xdsoft_label xdsoft_year"><span></span><i></i></div><button type="button" class="xdsoft_next"></button></div>'),L=e('<div class="xdsoft_calendar"></div>'),E=e('<div class="xdsoft_timepicker active"><button type="button" class="xdsoft_prev"></button><div class="xdsoft_time_box"></div><button type="button" class="xdsoft_next"></button></div>'),R=E.find(".xdsoft_time_box").eq(0),B=e('<div class="xdsoft_time_variant"></div>'),V=e('<button type="button" class="xdsoft_save_selected blue-gradient-button">Save Selected</button>'),G=e('<div class="xdsoft_select xdsoft_monthselect"><div></div></div>'),U=e('<div class="xdsoft_select xdsoft_yearselect"><div></div></div>'),q=!1,X=0;C.id&&J.attr("id",C.id),C.style&&J.attr("style",C.style),C.weeks&&J.addClass("xdsoft_showweeks"),C.rtl&&J.addClass("xdsoft_rtl"),J.addClass("xdsoft_"+C.theme),J.addClass(C.className),N.find(".xdsoft_month
vendor: 12,511 bytes, lines 713-714
713span").after(G),N.find(".xdsoft_year span").after(U),N.find(".xdsoft_month,.xdsoft_year").on("touchstart mousedown.xdsoft",function(t){var a,r,n=e(this).find(".xdsoft_select").eq(0),o=0,i=0,s=n.is(":visible");for(N.find(".xdsoft_select").hide(),j.currentTime&&(o=j.currentTime[e(this).hasClass("xdsoft_month")?"getMonth":"getFullYear"]()),n[s?"hide":"show"](),a=n.find("div.xdsoft_option"),r=0;r<a.length&&a.eq(r).data("value")!==o;r+=1)i+=a[0].offsetHeight;return n.xdsoftScroller(i/(n.children()[0].offsetHeight-n[0].clientHeight)),t.stopPropagation(),!1}),N.find(".xdsoft_select").xdsoftScroller().on("touchstart mousedown.xdsoft",function(e){e.stopPropagation(),e.preventDefault()}).on("touchstart mousedown.xdsoft",".xdsoft_option",function(){(void 0===j.currentTime||null===j.currentTime)&&(j.currentTime=j.now());var t=j.currentTime.getFullYear();j&&j.currentTime&&j.currentTime[e(this).parent().parent().hasClass("xdsoft_monthselect")?"setMonth":"setFullYear"](e(this).data("value")),e(this).parent().parent().hide(),J.trigger("xchange.xdsoft"),C.onChangeMonth&&e.isFunction(C.onChangeMonth)&&C.onChangeMonth.call(J,j.currentTime,J.data("input")),t!==j.currentTime.getFullYear()&&e.isFunction(C.onChangeYear)&&C.onChangeYear.call(J,j.currentTime,J.data("input"))}),J.getValue=function(){return j.getCurrentTime()},J.setOptions=function(n){var o={};C=e.extend(!0,{},C,n),n.allowTimes&&e.isArray(n.allowTimes)&&n.allowTimes.length&&(C.allowTimes=e.extend(!0,[],n.allowTimes)),n.weekends&&e.isArray(n.weekends)&&n.weekends.length&&(C.weekends=e.extend(!0,[],n.weekends)),n.allowDates&&e.isArray(n.allowDates)&&n.allowDates.length&&(C.allowDates=e.extend(!0,[],n.allowDates)),n.allowDateRe&&"[object String]"===Object.prototype.toString.call(n.allowDateRe)&&(C.allowDateRe=new RegExp(n.allowDateRe)),n.highlightedDates&&e.isArray(n.highlightedDates)&&n.highlightedDates.length&&(e.each(n.highlightedDates,function(a,n){var i,s=e.map(n.split(","),e.trim),d=new t(r.parseDate(s[0],C.formatDate),s[1],s[2]),u=r.formatDate(d.date,C.formatDate);void 0!==o[u]?(i=o[u].desc,i&&i.length&&d.desc&&d.desc.length&&(o[u].desc=i+"\n"+d.desc)):o[u]=d}),C.highlightedDates=e.extend(!0,[],o)),n.highlightedPeriods&&e.isArray(n.highlightedPeriods)&&n.highlightedPeriods.length&&(o=e.extend(!0,[],C.highlightedDates), 714e.each(n.highlightedPeriods,function(a,n){var i,s,d,u,l,f,c;if(e.isArray(n))i=n[0],s=n[1],d=n[2],c=n[3];else{var m=e.map(n.split(","),e.trim);i=r.parseDate(m[0],C.formatDate),s=r.parseDate(m[1],C.formatDate),d=m[2],c=m[3]}for(;s>=i;)u=new t(i,d,c),l=r.formatDate(i,C.formatDate),i.setDate(i.getDate()+1),void 0!==o[l]?(f=o[l].desc,f&&f.length&&u.desc&&u.desc.length&&(o[l].desc=f+"\n"+u.desc)):o[l]=u}),C.highlightedDates=e.extend(!0,[],o)),n.disabledDates&&e.isArray(n.disabledDates)&&n.disabledDates.length&&(C.disabledDates=e.extend(!0,[],n.disabledDates)),n.disabledWeekDays&&e.isArray(n.disabledWeekDays)&&n.disabledWeekDays.length&&(C.disabledWeekDays=e.extend(!0,[],n.disabledWeekDays)),!C.open&&!C.opened||C.inline||a.trigger("open.xdsoft"),C.inline&&(q=!0,J.addClass("xdsoft_inline"),a.after(J).hide()),C.inverseButton&&(C.next="xdsoft_prev",C.prev="xdsoft_next"),C.datepicker?I.addClass("active"):I.removeClass("active"),C.timepicker?E.addClass("active"):E.removeClass("active"),C.value&&(j.setCurrentTime(C.value),a&&a.val&&a.val(j.str)),C.dayOfWeekStart=isNaN(C.dayOfWeekStart)?0:parseInt(C.dayOfWeekStart,10)%7,C.timepickerScrollbar||R.xdsoftScroller("hide"),C.minDate&&/^[\+\-](.*)$/.test(C.minDate)&&(C.minDate=r.formatDate(j.strToDateTime(C.minDate),C.formatDate)),C.maxDate&&/^[\+\-](.*)$/.test(C.maxDate)&&(C.maxDate=r.formatDate(j.strToDateTime(C.maxDate),C.formatDate)),V.toggle(C.showApplyButton),N.find(".xdsoft_today_button").css("visibility",C.todayButton?"visible":"hidden"),N.find("."+C.prev).css("visibility",C.prevButton?"visible":"hidden"),N.find("."+C.next).css("visibility",C.nextButton?"visible":"hidden"),s(C),C.validateOnBlur&&a.off("blur.xdsoft").on("blur.xdsoft",function(){if(C.allowBlank&&(!e.trim(e(this).val()).length||"string"==typeof C.mask&&e.trim(e(this).val())===C.mask.replace(/[0-9]/g,"_")))e(this).val(null),J.data("xdsoft_datetime").empty();else{var t=r.parseDate(e(this).val(),C.format);if(t)e(this).val(r.formatDate(t,C.format));else{var a=+[e(this).val()[0],e(this).val()[1]].join(""),n=+[e(this).val()[2],e(this).val()[3]].join("");e(this).val(!C.datepicker&&C.timepicker&&a>=0&&24>a&&n>=0&&60>n?[a,n].map(function(e){return e>9?e:"0"+e}).join(":"):r.formatDate(j.now(),C.format))}J.data("xdsoft_datetime").setCurrentTime(e(this).val())}J.trigger("changedatetime.xdsoft"),J.trigger("close.xdsoft")}),C.dayOfWeekStartPrev=0===C.dayOfWeekStart?6:C.dayOfWeekStart-1,J.trigger("xchange.xdsoft").trigger("afterOpen.xdsoft")},J.data("options",C).on("touchstart mousedown.xdsoft",function(e){return e.stopPropagation(),e.preventDefault(),U.hide(),G.hide(),!1}),R.append(B),R.xdsoftScroller(),J.on("afterOpen.xdsoft",function(){R.xdsoftScroller()}),J.append(I).append(E),C.withoutCopyright!==!0&&J.append(z),I.append(N).append(L).append(V),e(C.parentID).append(J),d=function(){var t=this;t.now=function(e){var a,r,n=new Date;return!e&&C.defaultDate&&(a=t.strToDateTime(C.defaultDate),n.setFullYear(a.getFullYear()),n.setMonth(a.getMonth()),n.setDate(a.getDate())),C.yearOffset&&n.setFullYear(n.getFullYear()+C.yearOffset),!e&&C.defaultTime&&(r=t.strtotime(C.defaultTime),n.setHours(r.getHours()),n.setMinutes(r.getMinutes())),n},t.isValidDate=function(e){return"[object Date]"!==Object.prototype.toString.call(e)?!1:!isNaN(e.getTime())},t.setCurrentTime=function(e,a){t.currentTime="string"==typeof e?t.strToDateTime(e):t.isValidDate(e)?e:e||a||!C.allowBlank?t.now():null,J.trigger("xchange.xdsoft")},t.empty=function(){t.currentTime=null},t.getCurrentTime=function(){return t.currentTime},t.nextMonth=function(){(void 0===t.currentTime||null===t.currentTime)&&(t.currentTime=t.now());var a,r=t.currentTime.getMonth()+1;return 12===r&&(t.currentTime.setFullYear(t.currentTime.getFullYear()+1),r=0),a=t.currentTime.getFullYear(),t.currentTime.setDate(Math.min(new Date(t.currentTime.getFullYear(),r+1,0).getDate(),t.currentTime.getDate())),t.currentTime.setMonth(r),C.onChangeMonth&&e.isFunction(C.onChangeMonth)&&C.onChangeMonth.call(J,j.currentTime,J.data("input")),a!==t.currentTime.getFullYear()&&e.isFunction(C.onChangeYear)&&C.onChangeYear.call(J,j.currentTime,J.data("input")),J.trigger("xchange.xdsoft"),r},t.prevMonth=function(){(void 0===t.currentTime||null===t.currentTime)&&(t.currentTime=t.now());var a=t.currentTime.getMonth()-1;return-1===a&&(t.currentTime.setFullYear(t.currentTime.getFullYear()-1),a=11),t.currentTime.setDate(Math.min(new Date(t.currentTime.getFullYear(),a+1,0).getDate(),t.currentTime.getDate())),t.currentTime.setMonth(a),C.onChangeMonth&&e.isFunction(C.onChangeMonth)&&C.onChangeMonth.call(J,j.currentTime,J.data("input")),J.trigger("xchange.xdsoft"),a},t.getWeekOfYear=function(t){if(C.onGetWeekOfYear&&e.isFunction(C.onGetWeekOfYear)){var a=C.onGetWeekOfYear.call(J,t);if("undefined"!=typeof a)return a}var r=new Date(t.getFullYear(),0,1);return 4!=r.getDay()&&r.setMonth(0,1+(4-r.getDay()+7)%7),Math.ceil(((t-r)/864e5+r.getDay()+1)/7)},t.strToDateTime=function(e){var a,n,o=[];return e&&e instanceof Date&&t.isValidDate(e)?e:(o=/^(\+|\-)(.*)$/.exec(e),o&&(o[2]=r.parseDate(o[2],C.formatDate)),o&&o[2]?(a=o[2].getTime()-6e4*o[2].getTimezoneOffset(),n=new Date(t.now(!0).getTime()+parseInt(o[1]+"1",10)*a)):n=e?r.parseDate(e,C.format):t.now(),t.isValidDate(n)||(n=t.now()),n)},t.strToDate=function(e){if(e&&e instanceof Date&&t.isValidDate(e))return e;var a=e?r.parseDate(e,C.formatDate):t.now(!0);return t.isValidDate(a)||(a=t.now(!0)),a},t.strtotime=function(e){if(e&&e instanceof Date&&t.isValidDate(e))return e;var a=e?r.parseDate(e,C.formatTime):t.now(!0);return t.isValidDate(a)||(a=t.now(!0)),a},t.str=function(){return r.formatDate(t.currentTime,C.format)},t.currentTime=this.now()},j=new d,V.on("touchend click",function(e){e.preventDefault(),J.data("changed",!0),j.setCurrentTime(i()),a.val(j.str()),J.trigger("close.xdsoft")}),N.find(".xdsoft_today_button").on("touchend mousedown.xdsoft",function(){J.data("changed",!0),j.setCurrentTime(0,!0),J.trigger("afterOpen.xdsoft")}).on("dblclick.xdsoft",function(){var e,t,r=j.getCurrentTime();r=new Date(r.getFullYear(),r.getMonth(),r.getDate()),e=j.strToDate(C.minDate),e=new Date(e.getFullYear(),e.getMonth(),e.getDate()),e>r||(t=j.strToDate(C.maxDate),t=new Date(t.getFullYear(),t.getMonth(),t.getDate()),r>t||(a.val(j.str()),a.trigger("change"),J.trigger("close.xdsoft")))}),N.find(".xdsoft_prev,.xdsoft_next").on("touchend mousedown.xdsoft",function(){var t=e(this),a=0,r=!1;!function n(e){t.hasClass(C.next)?j.nextMonth():t.hasClass(C.prev)&&j.prevMonth(),C.monthChangeSpinner&&(r||(a=setTimeout(n,e||100)))}(500),e([document.body,window]).on("touchend mouseup.xdsoft",function o(){clearTimeout(a),r=!0,e([document.body,window]).off("touchend mouseup.xdsoft",o)})}),E.find(".xdsoft_prev,.xdsoft_next").on("touchend mousedown.xdsoft",function(){var t=e(this),a=0,r=!1,n=110;!function o(e){var i=R[0].clientHeight,s=B[0].offsetHeight,d=Math.abs(parseInt(B.css("marginTop"),10));t.hasClass(C.next)&&s-i-C.timeHeightInTimePicker>=d?B.css("marginTop","-"+(d+C.timeHeightInTimePicker)+"px"):t.hasClass(C.prev)&&d-C.timeHeightInTimePicker>=0&&B.css("marginTop","-"+(d-C.timeHeightInTimePicker)+"px"),R.trigger("scroll_element.xdsoft_scroller",[Math.abs(parseInt(B[0].style.marginTop,10)/(s-i))]),n=n>10?10:n-10,r||(a=setTimeout(o,e||n))}(500),e([document.body,window]).on("touchend mouseup.xdsoft",function i(){clearTimeout(a),r=!0,e([document.body,window]).off("touchend mouseup.xdsoft",i)})}),u=0,J.on("xchange.xdsoft",function(t){clearTimeout(u),u=setTimeout(function(){if(void 0===j.currentTime||null===j.currentTime){if(C.allowBlank)return;j.currentTime=j.now()}for(var t,i,s,d,u,l,f,c,m,h,g="",p=new Date(j.currentTime.getFullYear(),j.currentTime.getMonth(),1,12,0,0),y=0,v=j.now(),b=!1,D=!1,k=[],x=!0,T="",S="";p.getDay()!==C.dayOfWeekStart;)p.setDate(p.getDate()-1);for(g+="<table><thead><tr>",C.weeks&&(g+="<th></th>"),t=0;7>t;t+=1)g+="<th>"+C.i18n[o].dayOfWeekShort[(t+C.dayOfWeekStart)%7]+"</th>";for(g+="</tr></thead>",g+="<tbody>",C.maxDate!==!1&&(b=j.strToDate(C.maxDate),b=new Date(b.getFullYear(),b.getMonth(),b.getDate(),23,59,59,999)),C.minDate!==!1&&(D=j.strToDate(C.minDate),D=new Date(D.getFullYear(),D.getMonth(),D.getDate()));y<j.currentTime.countDaysInMonth()||p.getDay()!==C.dayOfWeekStart||j.currentTime.getMonth()===p.getMonth();)k=[],y+=1,s=p.getDay(),d=p.getDate(),u=p.getFullYear(),l=p.getMonth(),f=j.getWeekOfYear(p),h="",k.push("xdsoft_date"),c=C.beforeShowDay&&e.isFunction(C.beforeShowDay.call)?C.beforeShowDay.call(J,p):null,C.allowDateRe&&"[object RegExp]"===Object.prototype.toString.call(C.allowDateRe)?C.allowDateRe.test(r.formatDate(p,C.formatDate))||k.push("xdsoft_disabled"):C.allowDates&&C.allowDates.length>0?-1===C.allowDates.indexOf(r.formatDate(p,C.formatDate))&&k.push("xdsoft_disabled"):b!==!1&&p>b||D!==!1&&D>p||c&&c[0]===!1?k.push("xdsoft_disabled"):-1!==C.disabledDates.indexOf(r.formatDate(p,C.formatDate))?k.push("xdsoft_disabled"):-1!==C.disabledWeekDays.indexOf(s)?k.push("xdsoft_disabled"):a.is("[readonly]")&&k.push("xdsoft_disabled"),c&&""!==c[1]&&k.push(c[1]),j.currentTime.getMonth()!==l&&k.push("xdsoft_other_month"),(C.defaultSelect||J.data("changed"))&&r.formatDate(j.currentTime,C.formatDate)===r.formatDate(p,C.formatDate)&&k.push("xdsoft_current"),r.formatDate(v,C.formatDate)===r.formatDate(p,C.formatDate)&&k.push("xdsoft_today"),(0===p.getDay()||6===p.getDay()||-1!==C.weekends.indexOf(r.formatDate(p,C.formatDate)))&&k.push("xdsoft_weekend"),void 0!==C.highlightedDates[r.formatDate(p,C.formatDate)]&&(i=C.highlightedDates[r.formatDate(p,C.formatDate)],k.push(void 0===i.style?"xdsoft_highlighted_default":i.style),h=void 0===i.desc?"":i.desc),C.beforeShowDay&&e.isFunction(C.beforeShowDay)&&k.push(C.beforeShowDay(p)),x&&(g+="<tr>",x=!1,C.weeks&&(g+="<th>"+f+"</th>")),g+='<td data-date="'+d+'" data-month="'+l+'" data-year="'+u+'" class="xdsoft_date xdsoft_day_of_week'+p.getDay()+" "+k.join(" ")+'" title="'+h+'"><div>'+d+"</div></td>",p.getDay()===C.dayOfWeekStartPrev&&(g+="</tr>",x=!0),p.setDate(d+1);if(g+="</tbody></table>",L.html(g),N.find(".xdsoft_label span").eq(0).text(C.i18n[o].months[j.currentTime.getMonth()]),N.find(".xdsoft_label span").eq(1).text(j.currentTime.getFullYear()),T="",
714S="",l="",m=function(t,n){var o,i,s=j.now(),d=C.allowTimes&&e.isArray(C.allowTimes)&&C.allowTimes.length;s.setHours(t),t=parseInt(s.getHours(),10),s.setMinutes(n),n=parseInt(s.getMinutes(),10),o=new Date(j.currentTime),o.setHours(t),o.setMinutes(n),k=[],C.minDateTime!==!1&&C.minDateTime>o||C.maxTime!==!1&&j.strtotime(C.maxTime).getTime()<s.getTime()||C.minTime!==!1&&j.strtotime(C.minTime).getTime()>s.getTime()?k.push("xdsoft_disabled"):C.minDateTime!==!1&&C.minDateTime>o||C.disabledMinTime!==!1&&s.getTime()>j.strtotime(C.disabledMinTime).getTime()&&C.disabledMaxTime!==!1&&s.getTime()<j.strtotime(C.disabledMaxTime).getTime()?k.push("xdsoft_disabled"):a.is("[readonly]")&&k.push("xdsoft_disabled"),i=new Date(j.currentTime),i.setHours(parseInt(j.currentTime.getHours(),10)),d||i.setMinutes(Math[C.roundTime](j.currentTime.getMinutes()/C.step)*C.step),(C.initTime||C.defaultSelect||J.data("changed"))&&i.getHours()===parseInt(t,10)&&(!d&&C.step>59||i.getMinutes()===parseInt(n,10))&&(C.defaultSelect||J.data("changed")?k.push("xdsoft_current"):C.initTime&&k.push("xdsoft_init_time")),parseInt(v.getHours(),10)===parseInt(t,10)&&parseInt(v.getMinutes(),10)===parseInt(n,10)&&k.push("xdsoft_today"),T+='<div class="xdsoft_time '+k.join(" ")+'" data-hour="'+t+'" data-minute="'+n+'">'+r.formatDate(s,C.formatTime)+"</div>"},C.allowTimes&&e.isArray(C.allowTimes)&&C.allowTimes.length)for(y=0;y<C.allowTimes.length;y+=1)S=j.strtotime(C.allowTimes[y]).getHours(),l=j.strtotime(C.allowTimes[y]).getMinutes(),m(S,l);else for(y=0,t=0;y<(C.hours12?12:24);y+=1)for(t=0;60>t;t+=C.step)S=(10>y?"0":"")+y,l=(10>t?"0":"")+t,m(S,l);for(B.html(T),n="",y=0,y=parseInt(C.yearStart,10)+C.yearOffset;y<=parseInt(C.yearEnd,10)+C.yearOffset;y+=1)n+='<div class="xdsoft_option '+(j.currentTime.getFullYear()===y?"xdsoft_current":"")+'" data-value="'+y+'">'+y+"</div>";for(U.children().eq(0).html(n),y=parseInt(C.monthStart,10),n="";y<=parseInt(C.monthEnd,10);y+=1)n+='<div class="xdsoft_option '+(j.currentTime.getMonth()===y?"xdsoft_current":"")+'" data-value="'+y+'">'+C.i18n[o].months[y]+"</div>";G.children().eq(0).html(n),e(J).trigger("generate.xdsoft")},10),t.stopPropagation()}).on("afterOpen.xdsoft",function(){if(C.timepicker){var e,t,a,r;B.find(".xdsoft_current").length?e=".xdsoft_current":B.find(".xdsoft_init_time").length&&(e=".xdsoft_init_time"),e?(t=R[0].clientHeight,a=B[0].offsetHeight,r=B.find(e).index()*C.timeHeightInTimePicker+1,r>a-t&&(r=a-t),R.trigger("scroll_element.xdsoft_scroller",[parseInt(r,10)/(a-t)])):R.trigger("scroll_element.xdsoft_scroller",[0])}}),P=0,L.on("touchend click.xdsoft","td",function(t){t.stopPropagation(),P+=1;var r=e(this),n=j.currentTime;return(void 0===n||null===n)&&(j.currentTime=j.now(),n=j.currentTime),r.hasClass("xdsoft_disabled")?!1:(n.setDate(1),n.setFullYear(r.data("year")),n.setMonth(r.data("month")),n.setDate(r.data("date")),J.trigger("select.xdsoft",[n]),a.val(j.str()),C.onSelectDate&&e.isFunction(C.onSelectDate)&&C.onSelectDate.call(J,j.currentTime,J.data("input"),t),J.data("changed",!0),J.trigger("xchange.xdsoft"),J.trigger("changedatetime.xdsoft"),(P>1||C.closeOnDateSelect===!0||C.closeOnDateSelect===!1&&!C.timepicker)&&!C.inline&&J.trigger("close.xdsoft"),void setTimeout(function(){P=0},200))}),B.on("touchend click.xdsoft","div",function(t){t.stopPropagation();var a=e(this),r=j.currentTime;return(void 0===r||null===r)&&(j.currentTime=j.now(),r=j.currentTime),a.hasClass("xdsoft_disabled")?!1:(r.setHours(a.data("hour")),r.setMinutes(a.data("minute")),J.trigger("select.xdsoft",[r]),J.data("input").val(j.str()),C.onSelectTime&&e.isFunction(C.onSelectTime)&&C.onSelectTime.call(J,j.currentTime,J.data("input"),t),J.data("changed",!0),J.trigger("xchange.xdsoft"),J.trigger("changedatetime.xdsoft"),void(C.inline!==!0&&C.closeOnTimeSelect===!0&&J.trigger("close.xdsoft")))}),I.on("mousewheel.xdsoft",function(e){return C.scrollMonth?(e.deltaY<0?j.nextMonth():j.prevMonth(),!1):!0}),a.on("mousewheel.xdsoft",function(e){return C.scrollInput?!C.datepicker&&C.timepicker?(A=B.find(".xdsoft_current").length?B.find(".xdsoft_current").eq(0).index():0,A+e.deltaY>=0&&A+e.deltaY<B.children().length&&(A+=e.deltaY),B.children().eq(A).length&&B.children().eq(A).trigger("mousedown"),!1):C.datepicker&&!C.timepicker?(I.trigger(e,[e.deltaY,e.deltaX,e.deltaY]),a.val&&a.val(j.str()),J.trigger("changedatetime.xdsoft"),!1):void 0:!0}),J.on("changedatetime.xdsoft",function(t){if(C.onChangeDateTime&&e.isFunction(C.onChangeDateTime)){var a=J.data("input");C.onChangeDateTime.call(J,j.currentTime,a,t),delete C.value,a.trigger("change")}}).on("generate.xdsoft",function(){C.onGenerate&&e.isFunction(C.onGenerate)&&C.onGenerate.call(J,j.currentTime,J.data("input")),q&&(J.trigger("afterOpen.xdsoft"),q=!1)}).on("click.xdsoft",function(e){e.stopPropagation()}),A=0,H=function(e,t){do if(e=e.parentNode,t(e)===!1)break;while("HTML"!==e.nodeName)},Y=function(){var t,a,r,n,o,i,s,d,u,l,f,c,m;if(d=J.data("input"),t=d.offset(),a=d[0],l="top",r=t.top+a.offsetHeight-1,n=t.left,o="absolute",u=e(window).width(),c=e(window).height(),m=e(window).scrollTop(),document.documentElement.clientWidth-t.left<I.parent().outerWidth(!0)){var h=I.parent().outerWidth(!0)-a.offsetWidth;n-=h}"rtl"===d.parent().css("direction")&&(n-=J.outerWidth()-d.outerWidth()),C.fixed?(r-=m,n-=e(window).scrollLeft(),o="fixed"):(s=!1,H(a,function(e){return"fixed"===window.getComputedStyle(e).getPropertyValue("position")?(s=!0,!1):void 0}),s?(o="fixed",r+J.outerHeight()>
714c+m?(l="bottom",r=c+m-t.top):r-=m):r+a.offsetHeight>c+m&&(r=t.top-a.offsetHeight+1),0>r&&(r=0),n+a.offsetWidth>u&&(n=u-a.offsetWidth)),i=J[0],H(i,function(e){var t;return t=window.getComputedStyle(e).getPropertyValue("position"),"relative"===t&&u>=e.offsetWidth?(n-=(u-e.offsetWidth)/2,!1):void 0}),f={position:o,left:n,top:"",bottom:""},f[l]=r,J.css(f)},J.on("open.xdsoft",function(t){var a=!0;C.onShow&&e.isFunction(C.onShow)&&(a=C.onShow.call(J,j.currentTime,J.data("input"),t)),a!==!1&&(J.show(),Y(),e(window).off("resize.xdsoft",Y).on("resize.xdsoft",Y),C.closeOnWithoutClick&&e([document.body,window]).on("touchstart mousedown.xdsoft",function r(){J.trigger("close.xdsoft"),e([document.body,window]).off("touchstart mousedown.xdsoft",r)}))}).on("close.xdsoft",function(t){var a=!0;N.find(".xdsoft_month,.xdsoft_year").find(".xdsoft_select").hide(),C.onClose&&e.isFunction(C.onClose)&&(a=C.onClose.call(J,j.currentTime,J.data("input"),t)),a===!1||C.opened||C.inline||J.hide(),t.stopPropagation()}).on("toggle.xdsoft",function(){J.trigger(J.is(":visible")?"close.xdsoft":"open.xdsoft")}).data("input",a),X=0,J.data("xdsoft_datetime",j),J.setOptions(C),j.setCurrentTime(i()),a.data("xdsoft_datetimepicker",J).on("open.xdsoft focusin.xdsoft mousedown.xdsoft touchstart",function(){a.is(":disabled")||a.data("xdsoft_datetimepicker").is(":visible")&&C.closeOnInputClick||(clearTimeout(X),X=setTimeout(function(){a.is(":disabled")||(q=!0,j.setCurrentTime(i(),!0),C.mask&&s(C),J.trigger("open.xdsoft"))},100))}).on("keydown.xdsoft",function(t){var a,r=t.which;return-1!==[p].indexOf(r)&&C.enterLikeTab?(a=e("input:visible,textarea:visible,button:visible,a:visible"),J.trigger("close.xdsoft"),a.eq(a.index(this)+1).focus(),!1):-1!==[T].indexOf(r)?(J.trigger("close.xdsoft"),!0):void 0}).on("blur.xdsoft",function(){J.trigger("close.xdsoft")})},d=function(t){var a=t.data("xdsoft_datetimepicker");a&&(a.data("xdsoft_datetime",null),a.remove(),t.data("xdsoft_datetimepicker",null).off(".xdsoft"),e(window).off("resize.xdsoft"),e([window,document.body]).off("mousedown.xdsoft touchstart"),t.unmousewheel&&t.unmousewheel())},e(document).off("keydown.xdsoftctrl keyup.xdsoftctrl").on("keydown.xdsoftctrl",function(e){e.keyCode===h&&(F=!0)}).on("keyup.xdsoftctrl",function(e){e.keyCode===h&&(F=!1)}),this.each(function(){var t,a=e(this).data("xdsoft_datetimepicker");if(a){if("string"===e.type(n))switch(n){case"show":e(this).select().focus(),a.trigger("open.xdsoft");break;case"hide":a.trigger("close.xdsoft");break;case"toggle":a.trigger("toggle.xdsoft");break;case"destroy":d(e(this));break;case"reset":this.value=this.defaultValue,this.value&&a.data("xdsoft_datetime").isValidDate(r.parseDate(this.value,C.format))||a.data("changed",!1),a.data("xdsoft_datetime").setCurrentTime(this.value);break;case"validate":t=a.data("input"),t.trigger("blur.xdsoft");break;default:a[n]&&e.isFunction(a[n])&&(u=a[n](i))}else a.setOptions(n);return 0}"string"!==e.type(n)&&(!C.lazyInit||C.open||C.inline?s(e(this)):A(e(this)))}),u},e.fn.datetimepicker.defaults=a}),function(e){"function"==typeof define&&define.amd?define(["jquery"],e):"object"==typeof exports?module.exports=e:e(jQuery)}(function(e){function t(t){var i=t||window.event,s=d.call(arguments,1),u=0,f=0,c=0,m=0,h=0,g=0;if(t=e.event.fix(i),t.type="mousewheel","detail"in i&&(c=-1*i.detail),"wheelDelta"in i&&(c=i.wheelDelta),"wheelDeltaY"in i&&(c=i.wheelDeltaY),"wheelDeltaX"in i&&(f=-1*i.wheelDeltaX),"axis"in i&&i.axis===i.HORIZONTAL_AXIS&&(f=-1*c,c=0),u=0===c?f:c,"deltaY"in i&&(c=-1*i.deltaY,u=c),"deltaX"in i&&(f=i.deltaX,0===c&&(u=-1*f)),0!==c||0!==f){if(1===i.deltaMode){var p=e.data(this,"mousewheel-line-height");u*=p,c*=p,f*=p}else if(2===i.deltaMode){var y=e.data(this,"mousewheel-page-height");u*=y,c*=y,f*=y}if(m=Math.max(Math.abs(c),Math.abs(f)),(!o||o>m)&&(o=m,r(i,m)&&(o/=40)),r(i,m)&&(u/=40,f/=40,c/=40),u=Math[u>=1?"floor":"ceil"](u/o),f=Math[f>=1?"floor":"ceil"](f/o),c=Math[c>=1?"floor":"ceil"](c/o),l.settings.normalizeOffset&&this.getBoundingClientRect){var v=this.getBoundingClientRect();h=t.clientX-v.left,g=t.clientY-v.top}return t.deltaX=f,t.deltaY=c,t.deltaFactor=o,t.offsetX=h,t.offsetY=g,t.deltaMode=0,s.unshift(t,u,f,c),n&&clearTimeout(n),n=setTimeout(a,200),(e.event.dispatch||e.event.handle).apply(this,s)}}function a(){o=null}function r(e,t){return l.settings.adjustOldDeltas&&"mousewheel"===e.type&&t%120===0}var n,o,i=["wheel","mousewheel","DOMMouseScroll","MozMousePixelScroll"],s="onwheel"in document||document.documentMode>
vendor: 1,150 bytes, line 714
714=9?["wheel"]:["mousewheel","DomMouseScroll","MozMousePixelScroll"],d=Array.prototype.slice;if(e.event.fixHooks)for(var u=i.length;u;)e.event.fixHooks[i[--u]]=e.event.mouseHooks;var l=e.event.special.mousewheel={version:"3.1.12",setup:function(){if(this.addEventListener)for(var a=s.length;a;)this.addEventListener(s[--a],t,!1);else this.onmousewheel=t;e.data(this,"mousewheel-line-height",l.getLineHeight(this)),e.data(this,"mousewheel-page-height",l.getPageHeight(this))},teardown:function(){if(this.removeEventListener)for(var a=s.length;a;)this.removeEventListener(s[--a],t,!1);else this.onmousewheel=null;e.removeData(this,"mousewheel-line-height"),e.removeData(this,"mousewheel-page-height")},getLineHeight:function(t){var a=e(t),r=a["offsetParent"in e.fn?"offsetParent":"parent"]();return r.length||(r=e("body")),parseInt(r.css("fontSize"),10)||parseInt(a.css("fontSize"),10)||16},getPageHeight:function(t){return e(t).height()},settings:{adjustOldDeltas:!0,normalizeOffset:!0}};e.fn.extend({mousewheel:function(e){return e?this.bind("mousewheel",e):this.trigger("mousewheel")},unmousewheel:function(e){return this.unbind("mousewheel",e)}})});
vendor: 68,253 bytes, lines 715-727
715// ================================================== 716// fancyBox v3.5.7 717// 718// Licensed GPLv3 for open source use 719// or fancyBox Commercial License for commercial use 720// 721// http://fancyapps.com/fancybox/ 722// Copyright 2019 fancyApps 723// 724// ================================================== 725!function(t,e,n,o){"use strict";function i(t,e){var o,i,a,s=[],r=0;t&&t.isDefaultPrevented()||(t.preventDefault(),e=e||{},t&&t.data&&(e=h(t.data.options,e)),o=e.$target||n(t.currentTarget).trigger("blur"),(a=n.fancybox.getInstance())&&a.$trigger&&a.$trigger.is(o)||(e.selector?s=n(e.selector):(i=o.attr("data-fancybox")||"",i?(s=t.data?t.data.items:[],s=s.length?s.filter('[data-fancybox="'+i+'"]'):n('[data-fancybox="'+i+'"]')):s=[o]),r=n(s).index(o),r<0&&(r=0),a=n.fancybox.open(s,e,r),a.$trigger=o))}if(t.console=t.console||{info:function(t){}},n){if(n.fn.fancybox)return void console.info("fancyBox already initialized");var a={closeExisting:!1,loop:!1,gutter:50,keyboard:!0,preventCaptionOverlap:!0,arrows:!0,infobar:!0,smallBtn:"auto",toolbar:"auto",buttons:["zoom","slideShow","thumbs","close"],idleTime:3,protect:!1,modal:!1,image:{preload:!1},ajax:{settings:{data:{fancybox:!0}}},iframe:{tpl:'<iframe id="fancybox-frame{rnd}" name="fancybox-frame{rnd}" class="fancybox-iframe" allowfullscreen="allowfullscreen" allow="autoplay; fullscreen" src=""></iframe>',preload:!0,css:{},attr:{scrolling:"auto"}},video:{tpl:'<video class="fancybox-video" controls controlsList="nodownload" poster="{{poster}}"><source src="{{src}}" type="{{format}}" />Sorry, your browser doesn\'t support embedded videos, <a href="{{src}}">download</a> and watch with your favorite video player!</video>',format:"",autoStart:!0},defaultType:"image",animationEffect:"zoom",animationDuration:366,zoomOpacity:"auto",transitionEffect:"fade",transitionDuration:366,slideClass:"",baseClass:"",baseTpl:'<div class="fancybox-container" role="dialog" tabindex="-1"><div class="fancybox-bg"></div><div class="fancybox-inner"><div class="fancybox-infobar"><span data-fancybox-index></span> / <span data-fancybox-count></span></div><div class="fancybox-toolbar">{{buttons}}</div><div class="fancybox-navigation">{{arrows}}</div><div class="fancybox-stage"></div><div class="fancybox-caption"><div class="fancybox-caption__body"></div></div></div></div>',spinnerTpl:'<div class="fancybox-loading"></div>',errorTpl:'<div class="fancybox-error"><p>{{ERROR}}</p></div>',btnTpl:{download:'<a download data-fancybox-download class="fancybox-button fancybox-button--download" title="{{DOWNLOAD}}" href="javascript:;"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M18.62 17.09V19H5.38v-1.91zm-2.97-6.96L17 11.45l-5 4.87-5-4.87 1.36-1.32 2.68 2.64V5h1.92v7.77z"/></svg></a>',zoom:'<button data-fancybox-zoom class="fancybox-button fancybox-button--zoom" title="{{ZOOM}}"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M18.7 17.3l-3-3a5.9 5.9 0 0 0-.6-7.6 5.9 5.9 0 0 0-8.4 0 5.9 5.9 0 0 0 0 8.4 5.9 5.9 0 0 0 7.7.7l3 3a1 1 0 0 0 1.3 0c.4-.5.4-1 0-1.5zM8.1 13.8a4 4 0 0 1 0-5.7 4 4 0 0 1 5.7 0 4 4 0 0 1 0 5.7 4 4 0 0 1-5.7 0z"/></svg></button>',close:'<button data-fancybox-close class="fancybox-button fancybox-button--close" title="{{CLOSE}}"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M12 10.6L6.6 5.2 5.2 6.6l5.4 5.4-5.4 5.4 1.4 1.4 5.4-5.4 5.4 5.4 1.4-1.4-5.4-5.4 5.4-5.4-1.4-1.4-5.4 5.4z"/></svg></button>',arrowLeft:'<button data-fancybox-prev class="fancybox-button fancybox-button--arrow_left" title="{{PREV}}"><div><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M11.28 15.7l-1.34 1.37L5 12l4.94-5.07 1.34 1.38-2.68 2.72H19v1.94H8.6z"/></svg></div></button>',arrowRight:'<button data-fancybox-next class="fancybox-button fancybox-button--arrow_right" title="{{NEXT}}"><div><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M15.4 12.97l-2.68 2.72 1.34 1.38L19 12l-4.94-5.07-1.34 1.38 2.68 2.72H5v1.94z"/></svg></div></button>',smallBtn:'<button type="button" data-fancybox-close class="fancybox-button fancybox-close-small" title="{{CLOSE}}"><svg xmlns="http://www.w3.org/2000/svg" version="1" viewBox="0 0 24 24"><path d="M13 12l5-5-1-1-5 5-5-5-1 1 5 5-5 5 1 1 5-5 5 5 1-1z"/></svg></button>'},parentEl:"body",hideScrollbar:!0,autoFocus:!0,backFocus:!0,trapFocus:!0,fullScreen:{autoStart:!1},touch:{vertical:!0,momentum:!0},hash:null,media:{},slideShow:{autoStart:!1,speed:3e3},thumbs:{autoStart:!1,hideOnClose:!0,parentEl:".fancybox-container",axis:"y"},wheel:"auto",onInit:n.noop,beforeLoad:n.noop,afterLoad:n.noop,beforeShow:n.noop,afterShow:n.noop,beforeClose:n.noop,afterClose:n.noop,onActivate:n.noop,onDeactivate:n.noop,clickContent:function(t,e){return"image"===t.type&&"zoom"},clickSlide:"close",clickOutside:"close",dblclickContent:!1,dblclickSlide:!1,dblclickOutside:!1,mobile:{preventCaptionOverlap:!1,idleTime:!1,clickContent:function(t,e){return"image"===t.type&&"toggleControls"},clickSlide:function(t,e){return"image"===t.type?"toggleControls":"close"},dblclickContent:function(t,e){return"image"===t.type&&"zoom"},dblclickSlide:function(t,e){return"image"===t.type&&"zoom"}},lang:"en",i18n:{en:{CLOSE:"Close",NEXT:"Next",PREV:"Previous",ERROR:"The requested content cannot be loaded. <br/> Please try again later.",PLAY_START:"Start slideshow",PLAY_STOP:"Pause slideshow",FULL_SCREEN:"Full screen",THUMBS:"Thumbnails",DOWNLOAD:"Download",SHARE:"Share",ZOOM:"Zoom"},de:{CLOSE:"Schließen",NEXT:"Weiter",PREV:"Zurück",ERROR:"Die angeforderten Daten konnten nicht geladen werden. <br/> Bitte versuchen Sie es später nochmal.",PLAY_START:"Diaschau starten",PLAY_STOP:"Diaschau beenden",FULL_SCREEN:"Vollbild",THUMBS:"Vorschaubilder",DOWNLOAD:"Herunterladen",SHARE:"Teilen",ZOOM:"Vergrößern"}}},s=n(t),r=n(e),c=0,l=function(t){return t&&t.hasOwnProperty&&t instanceof n},d=function(){return t.requestAnimationFrame||t.webkitRequestAnimationFrame||t.mozRequestAnimationFrame||t.oRequestAnimationFrame||function(e){return t.setTimeout(e,1e3/60)}}(),u=function(){return t.cancelAnimationFrame||t.webkitCancelAnimationFrame||t.mozCancelAnimationFrame||t.oCancelAnimationFrame||function(e){t.clearTimeout(e)}}(),f=function(){var t,n=e.createElement("fakeelement"),o={transition:"transitionend",OTransition:"oTransitionEnd",MozTransition:"transitionend",WebkitTransition:"webkitTransitionEnd"};for(t in o)if(void 0!==n.style[t])return o[t];return"transitionend"}(),p=function(t){return t&&t.length&&t[0].offsetHeight},h=function(t,e){var o=n.extend(!0,{},t,e);return n.each(e,function(t,e){n.isArray(e)&&(o[t]=e)}),o},g=function(t){var o,i;return!(!t||t.ownerDocument!==e)&&(n(".fancybox-container").css("pointer-events","none"),o={x:t.getBoundingClientRect().left+t.offsetWidth/2,y:t.getBoundingClientRect().top+t.offsetHeight/2},i=e.elementFromPoint(o.x,o.y)===t,n(".fancybox-container").css("pointer-events",""),i)},b=function(t,e,o){var i=this;i.opts=h({index:o},n.fancybox.defaults),n.isPlainObject(e)&&(i.opts=h(i.opts,e)),n.fancybox.isMobile&&(i.opts=h(i.opts,i.opts.mobile)),i.id=i.opts.id||++c,i.currIndex=parseInt(i.opts.index,10)||0,i.prevIndex=null,i.prevPos=null,i.currPos=0,i.firstRun=!0,i.group=[],i.slides={},i.addContent(t),i.group.length&&i.init()};n.extend(b.prototype,{init:function(){var o,i,a=this,s=a.group[a.currIndex],r=s.opts;r.closeExisting&&n.fancybox.close(!0),n("body").addClass("fancybox-active"),!n.fancybox.getInstance()&&!1!==r.hideScrollbar&&!n.fancybox.isMobile&&e.body.scrollHeight>t.innerHeight&&(n("head").append('<style id="fancybox-style-noscroll" type="text/css">.compensate-for-scrollbar{margin-right:'+(t.innerWidth-e.documentElement.clientWidth)+"px;}</style>"),n("body").addClass("compensate-for-scrollbar")),i="",n.each(r.buttons,function(t,e){i+=r.btnTpl[e]||""}),o=n(a.translate(a,r.baseTpl.replace("{{buttons}}",i).replace("{{arrows}}",r.btnTpl.arrowLeft+r.btnTpl.arrowRight))).attr("id","fancybox-container-"+a.id).addClass(r.baseClass).data("FancyBox",a).appendTo(r.parentEl),a.$refs={container:o},["bg","inner","infobar","toolbar","stage","caption","navigation"].forEach(function(t){a.$refs[t]=o.find(".fancybox-"+t)}),a.trigger("onInit"),a.activate(),a.jumpTo(a.currIndex)},translate:function(t,e){var n=t.opts.i18n[t.opts.lang]||t.opts.i18n.en;return e.replace(/\{\{(\w+)\}\}/g,function(t,e){return void 0===n[e]?t:n[e]})},addContent:function(t){var e,o=this,i=n.makeArray(t);n.each(i,function(t,e){var i,a,s,r,c,l={},d={};n.isPlainObject(e)?(l=e,d=e.opts||e):"object"===n.type(e)&&n(e).length?(i=n(e),d=i.data()||{},d=n.extend(!0,{},d,d.options),d.$orig=i,l.src=o.opts.src||d.src||i.attr("href"),l.type||l.src||(l.type="inline",l.src=e)):l={type:"html",src:e+""},l.opts=n.extend(!0,{},o.opts,d),n.isArray(d.buttons)&&(l.opts.buttons=d.buttons),n.fancybox.isMobile&&l.opts.mobile&&(l.opts=h(l.opts,l.opts.mobile)),a=l.type||l.opts.type,r=l.src||"",!a&&r&&((s=r.match(/\.(mp4|mov|ogv|webm)((\?|#).*)?$/i))?(a="video",l.opts.video.format||(l.opts.video.format="video/"+("ogv"===s[1]?"ogg":s[1]))):r.match(/(^data:image\/[a-z0-9+\/=]*,)|(\.(jp(e|g|eg)|gif|png|bmp|webp|svg|ico)((\?|#).*)?$)/i)?a="image":r.match(/\.(pdf)((\?|#).*)?$/i)?(a="iframe",l=n.extend(!0,l,{contentType:"pdf",opts:{iframe:{preload:!1}}})):"#"===r.charAt(0)&&(a="inline")),a?l.type=a:o.trigger("objectNeedsType",l),l.contentType||(l.contentType=n.inArray(l.type,["html","inline","ajax"])>-1?"html":l.type),l.index=o.group.length,"auto"==l.opts.smallBtn&&(l.opts.smallBtn=n.inArray(l.type,["html","inline","ajax"])>-1),"auto"===l.opts.toolbar&&(l.opts.toolbar=!l.opts.smallBtn),l.$thumb=l.opts.$thumb||null,l.opts.$trigger&&l.index===o.opts.index&&(l.$thumb=l.opts.$trigger.find("img:first"),l.$thumb.length&&(l.opts.$orig=l.opts.$trigger)),l.$thumb&&l.$thumb.length||!l.opts.$orig||(l.$thumb=l.opts.$orig.find("img:first")),l.$thumb&&!l.$thumb.length&&(l.$thumb=null),l.thumb=l.opts.thumb||(l.$thumb?l.$thumb[0].src:null),"function"===n.type(l.opts.caption)&&(l.opts.caption=l.opts.caption.apply(e,[o,l])),"function"===n.type(o.opts.caption)&&(l.opts.caption=o.opts.caption.apply(e,[o,l])),l.opts.caption instanceof n||(l.opts.caption=void 0===l.opts.caption?"":l.opts.caption+""),"ajax"===l.type&&(c=r.split(/\s+/,2),c.length>1&&(l.src=c.shift(),l.opts.filter=c.shift())),l.opts.modal&&(l.opts=n.extend(!0,l.opts,{trapFocus:!0,infobar:0,toolbar:0,smallBtn:0,keyboard:0,slideShow:0,fullScreen:0,thumbs:0,touch:0,clickContent:!1,clickSlide:!1,clickOutside:!1,dblclickContent:!1,dblclickSlide:!1,dblclickOutside:!1})),o.group.push(l)}),Object.keys(o.slides).length&&(o.updateControls(),(e=o.Thumbs)&&e.isActive&&(e.create(),e.focus()))},addEvents:function(){var e=this;e.removeEvents(),e.$refs.container.on("click.fb-close","[data-fancybox-close]",function(t){t.stopPropagation(),t.preventDefault(),e.close(t)}).on("touchstart.fb-prev click.fb-prev","[data-fancybox-prev]",function(t){t.stopPropagation(),t.preventDefault(),e.previous()}).on("touchstart.fb-next click.fb-next","[data-fancybox-next]",function(t){t.stopPropagation(),t.preventDefault(),e.next()}).on("click.fb","[data-fancybox-zoom]",function(t){e[e.isScaledDown()?"scaleToActual":"scaleToFit"]()}),s.on("orientationchange.fb resize.fb",function(t){t&&t.originalEvent&&"resize"===t.originalEvent.type?(e.requestId&&u(e.requestId),e.requestId=d(function(){e.update(t)})):(e.current&&"iframe"===e.current.type&&e.$refs.stage.hide(),setTimeout(function(){e.$refs.stage.show(),e.update(t)},n.fancybox.isMobile?600:250))}),r.on("keydown.fb",function(t){var o=n.fancybox?n.fancybox.getInstance():null,i=o.current,a=t.keyCode||t.which;if(9==a)return void(i.opts.trapFocus&&e.focus(t));if(!(!i.opts.keyboard||t.ctrlKey||t.altKey||t.shiftKey||n(t.target).is("input,textarea,video,audio,select")))return 8===a||27===a?(t.preventDefault(),void e.close(t)):37===a||38===a?(t.preventDefault(),void e.previous()):39===a||40===a?(t.preventDefault(),void e.next()):void e.trigger("afterKeydown",t,a)}),e.group[e.currIndex].opts.idleTime&&(e.idleSecondsCounter=0,r.on("mousemove.fb-idle mouseleave.fb-idle mousedown.fb-idle touchstart.fb-idle touchmove.fb-idle scroll.fb-idle keydown.fb-idle",function(t){e.idleSecondsCounter=0,e.isIdle&&e.showControls(),e.isIdle=!1}),e.idleInterval=t.setInterval(function(){++e.idleSecondsCounter>=e.group[e.currIndex].opts.idleTime&&!e.isDragging&&(e.isIdle=!0,e.idleSecondsCounter=0,e.hideControls())},1e3))},removeEvents:function(){var e=this;s.off("orientationchange.fb resize.fb"),r.off("keydown.fb .fb-idle"),this.$refs.container.off(".fb-close .fb-prev .fb-next"),e.idleInterval&&(t.clearInterval(e.idleInterval),e.idleInterval=null)},previous:function(t){return this.jumpTo(this.currPos-1,t)},next:function(t){return this.jumpTo(this.currPos+1,t)},jumpTo:function(t,e){var o,i,a,s,r,c,l,d,u,f=this,h=f.group.length;if(!(f.isDragging||f.isClosing||f.isAnimating&&f.firstRun)){if(t=parseInt(t,10),!(a=f.current?f.current.opts.loop:f.opts.loop)&&(t<0||t>=h))return!1;if(o=f.firstRun=!Object.keys(f.slides).length,r=f.current,f.prevIndex=f.currIndex,f.prevPos=f.currPos,s=f.createSlide(t),h>1&&((a||s.index<h-1)&&f.createSlide(t+1),(a||s.index>0)&&f.createSlide(t-1)),f.current=s,f.currIndex=s.index,f.currPos=s.pos,f.trigger("beforeShow",o),f.updateControls(),s.forcedDuration=void 0,n.isNumeric(e)?s.forcedDuration=e:e=s.opts[o?"animationDuration":"transitionDuration"],e=parseInt(e,10),i=f.isMoved(s),s.$slide.addClass("fancybox-slide--current"),o)return s.opts.animationEffect&&e&&f.$refs.container.css("transition-duration",e+"ms"),f.$refs.container.addClass("fancybox-is-open").trigger("focus"),f.loadSlide(s),void f.preload("image");c=n.fancybox.getTranslate(r.$slide),l=n.fancybox.getTranslate(f.$refs.stage),n.each(f.slides,function(t,e){n.fancybox.stop(e.$slide,!0)}),r.pos!==s.pos&&(r.isComplete=!1),r.$slide.removeClass("fancybox-slide--complete fancybox-slide--current"),i?(u=c.left-(r.pos*c.width+r.pos*r.opts.gutter),n.each(f.slides,function(t,o){o.$slide.removeClass("fancybox-animated").removeClass(function(t,e){return(e.match(/(^|\s)fancybox-fx-\S+/g)||[]).join(" ")});var i=o.pos*c.width+o.pos*o.opts.gutter;n.fancybox.setTranslate(o.$slide,{top:0,left:i-l.left+u}),o.pos!==s.pos&&o.$slide.addClass("fancybox-slide--"+(o.pos>s.pos?"next":"previous")),p(o.$slide),n.fancybox.animate(o.$slide,{top:0,left:(o.pos-s.pos)*c.width+(o.pos-s.pos)*o.opts.gutter},e,function(){o.$slide.css({transform:"",opacity:""}).removeClass("fancybox-slide--next fancybox-slide--previous"),o.pos===f.currPos&&f.complete()})})):e&&s.opts.transitionEffect&&(d="fancybox-animated fancybox-fx-"+s.opts.transitionEffect,r.$slide.addClass("fancybox-slide--"+(r.pos>s.pos?"next":"previous")),n.fancybox.animate(r.$slide,d,e,function(){r.$slide.removeClass(d).removeClass("fancybox-slide--next fancybox-slide--previous")},!1)),s.isLoaded?f.revealContent(s):f.loadSlide(s),f.preload("image")}},createSlide:function(t){var e,o,i=this;return o=t%i.group.length,o=o<0?i.group.length+o:o,!i.slides[t]&&i.group[o]&&(e=n('<div class="fancybox-slide"></div>').appendTo(i.$refs.stage),i.slides[t]=n.extend(!0,{},i.group[o],{pos:t,$slide:e,isLoaded:!1}),i.updateSlide(i.slides[t])),i.slides[t]},scaleToActual:function(t,e,o){var i,a,s,r,c,l=this,d=l.current,u=d.$content,f=n.fancybox.getTranslate(d.$slide).width,p=n.fancybox.getTranslate(d.$slide).height,h=d.width,g=d.height;l.isAnimating||l.isMoved()||!u||"image"!=d.type||!d.isLoaded||d.hasError||(l.isAnimating=!0,n.fancybox.stop(u),t=void 0===t?.5*f:t,e=void 0===e?.5*p:e,i=n.fancybox.getTranslate(u),i.top-=n.fancybox.getTranslate(d.$slide).top,i.left-=n.fancybox.getTranslate(d.$slide).left,r=h/i.width,c=g/i.height,a=.5*f-.5*h,s=.5*p-.5*g,h>f&&(a=i.left*r-(t*r-t),a>0&&(a=0),a<f-h&&(a=f-h)),g>p&&(s=i.top*c-(e*c-e),s>0&&(s=0),s<p-g&&(s=p-g)),l.updateCursor(h,g),n.fancybox.animate(u,{top:s,left:a,scaleX:r,scaleY:c},o||366,function(){l.isAnimating=!1}),l.SlideShow&&l.SlideShow.isActive&&l.SlideShow.stop())},scaleToFit:function(t){var e,o=this,i=o.current,a=i.$content;o.isAnimating||o.isMoved()||!a||"image"!=i.type||!i.isLoaded||i.hasError||(o.isAnimating=!0,n.fancybox.stop(a),e=o.getFitPos(i),o.updateCursor(e.width,e.height),n.fancybox.animate(a,{top:e.top,left:e.left,scaleX:e.width/a.width(),scaleY:e.height/a.height()},t||366,function(){o.isAnimating=!1}))},getFitPos:function(t){var e,o,i,a,s=this,r=t.$content,c=t.$slide,l=t.width||t.opts.width,d=t.height||t.opts.height,u={};return!!(t.isLoaded&&r&&r.length)&&(e=n.fancybox.getTranslate(s.$refs.stage).width,o=n.fancybox.getTranslate(s.$refs.stage).height,e-=parseFloat(c.css("paddingLeft"))+parseFloat(c.css("paddingRight"))+parseFloat(r.css("marginLeft"))+parseFloat(r.css("marginRight")),o-=parseFloat(c.css("paddingTop"))+parseFloat(c.css("paddingBottom"))+parseFloat(r.css("marginTop"))+parseFloat(r.css("marginBottom")),l&&d||(l=e,d=o),i=Math.min(1,e/l,o/d),l*=i,d*=i,l>e-.5&&(l=e),d>o-.5&&(d=o),"image"===t.type?(u.top=Math.floor(.5*(o-d))+parseFloat(c.css("paddingTop")),u.left=Math.floor(.5*(e-l))+parseFloat(c.css("paddingLeft"))):"video"===t.contentType&&(a=t.opts.width&&t.opts.height?l/d:t.opts.ratio||16/9,d>l/a?d=l/a:l>d*a&&(l=d*a)),u.width=l,u.height=d,u)},update:function(t){var e=this;n.each(e.slides,function(n,o){e.updateSlide(o,t)})},updateSlide:function(t,e){var o=this,i=t&&t.$content,a=t.width||t.opts.width,s=t.height||t.opts.height,r=t.$slide;o.adjustCaption(t),i&&(a||s||"video"===t.contentType)&&!t.hasError&&(n.fancybox.stop(i),n.fancybox.setTranslate(i,o.getFitPos(t)),t.pos===o.currPos&&(o.isAnimating=!1,o.updateCursor())),o.adjustLayout(t),r.length&&(r.trigger("refresh"),t.pos===o.currPos&&o.$refs.toolbar.add(o.$refs.navigation.find(".fancybox-button--arrow_right")).toggleClass("compensate-for-scrollbar",r.get(0).scrollHeight>r.get(0).clientHeight)),o.trigger("onUpdate",t,e)},centerSlide:function(t){var e=this,o=e.current,i=o.$slide;!e.isClosing&&o&&(i.siblings().css({transform:"",opacity:""}),i.parent().children().removeClass("fancybox-slide--previous fancybox-slide--next"),n.fancybox.animate(i,{top:0,left:0,opacity:1},void 0===t?0:t,function(){i.css({transform:"",opacity:""}),o.isComplete||e.complete()},!1))},isMoved:function(t){var e,o,i=t||this.current;return!!i&&(o=n.fancybox.getTranslate(this.$refs.stage),e=n.fancybox.getTranslate(i.$slide),!i.$slide.hasClass("fancybox-animated")&&(Math.abs(e.top-o.top)>.5||Math.abs(e.left-o.left)>.5))},updateCursor:function(t,e){var o,i,a=this,s=a.current,r=a.$refs.container;s&&!a.isClosing&&a.Guestures&&(r.removeClass("fancybox-is-zoomable fancybox-can-zoomIn fancybox-can-zoomOut fancybox-can-swipe fancybox-can-pan"),o=a.canPan(t,e),i=!!o||a.isZoomable(),r.toggleClass("fancybox-is-zoomable",i),n("[data-fancybox-zoom]").prop("disabled",!i),o?r.addClass("fancybox-can-pan"):i&&("zoom"===s.opts.clickContent||n.isFunction(s.opts.clickContent)&&"zoom"==s.opts.clickContent(s))?r.addClass("fancybox-can-zoomIn"):s.opts.touch&&(s.opts.touch.vertical||a.group.length>1)&&"video"!==s.contentType&&r.addClass("fancybox-can-swipe"))},isZoomable:function(){var t,e=this,n=e.current;if(n&&!e.isClosing&&"image"===n.type&&!n.hasError){if(!n.isLoaded)return!0;if((t=e.getFitPos(n))&&(n.width>t.width||n.height>t.height))return!0}return!1},isScaledDown:function(t,e){var o=this,i=!1,a=o.current,s=a.$content;return void 0!==t&&void 0!==e?i=t<a.width&&e<a.height:s&&(i=n.fancybox.getTranslate(s),i=i.width<a.width&&i.height<a.height),i},canPan:function(t,e){var o=this,i=o.current,a=null,s=!1;return"image"===i.type&&(i.isComplete||t&&e)&&!i.hasError&&(s=o.getFitPos(i),void 0!==t&&void 0!==e?a={width:t,height:e}:i.isComplete&&(a=n.fancybox.getTranslate(i.$content)),a&&s&&(s=Math.abs(a.width-s.width)>1.5||Math.abs(a.height-s.height)>1.5)),s},loadSlide:function(t){var e,o,i,a=this;if(!t.isLoading&&!t.isLoaded){if(t.isLoading=!0,!1===a.trigger("beforeLoad",t))return t.isLoading=!1,!1;switch(e=t.type,o=t.$slide,o.off("refresh").trigger("onReset").addClass(t.opts.slideClass),e){case"image":a.setImage(t);break;case"iframe":a.setIframe(t);break;case"html":a.setContent(t,t.src||t.content);break;case"video":a.setContent(t,t.opts.video.tpl.replace(/\{\{src\}\}/gi,t.src).replace("{{format}}",t.opts.videoFormat||t.opts.video.format||"").replace("{{poster}}",t.thumb||""));break;case"inline":n(t.src).length?a.setContent(t,n(t.src)):a.setError(t);break;case"ajax":a.showLoading(t),i=n.ajax(n.extend({},t.opts.ajax.settings,{url:t.src,success:function(e,n){"success"===n&&a.setContent(t,e)},error:function(e,n){e&&"abort"!==n&&a.setError(t)}})),o.one("onReset",function(){i.abort()});break;default:a.setError(t)}return!0}},setImage:function(t){var o,i=this;setTimeout(function(){var e=t.$image;i.isClosing||!t.isLoading||e&&e.length&&e[0].complete||t.hasError||i.showLoading(t)},50),i.checkSrcset(t),t.$content=n('<div class="fancybox-content"></div>').addClass("fancybox-is-hidden").appendTo(t.$slide.addClass("fancybox-slide--image")),!1!==t.opts.preload&&t.opts.width&&t.opts.height&&t.thumb&&(t.width=t.opts.width,t.height=t.opts.height,o=e.createElement("img"),o.onerror=function(){n(this).remove(),t.$ghost=null},o.onload=function(){i.afterLoad(t)},t.$ghost=n(o).addClass("fancybox-image").appendTo(t.$content).attr("src",t.thumb)),i.setBigImage(t)},checkSrcset:function(e){var n,o,i,a,s=e.opts.srcset||e.opts.image.srcset;if(s){i=t.devicePixelRatio||1,a=t.innerWidth*i,o=s.split(",").map(function(t){var e={};return t.trim().split(/\s+/).forEach(function(t,n){var o=parseInt(t.substring(0,t.length-1),10);if(0===n)return e.url=t;o&&(e.value=o,e.postfix=t[t.length-1])}),e}),o.sort(function(t,e){return t.value-e.value});for(var r=0;r<o.length;r++){var c=o[r];if("w"===c.postfix&&c.value>=a||"x"===c.postfix&&c.value>=i){n=c;break}}!n&&o.length&&(n=o[o.length-1]),n&&(e.src=n.url,e.width&&e.height&&"w"==n.postfix&&(e.height=e.width/e.height*n.value,e.width=n.value),e.opts.srcset=s)}},setBigImage:function(t){var o=this,i=e.createElement("img"),a=n(i);t.$image=a.one("error",function(){o.setError(t)}).one("load",function(){var e;t.$ghost||(o.resolveImageSlideSize(t,this.naturalWidth,this.naturalHeight),o.afterLoad(t)),o.isClosing||(t.opts.srcset&&(e=t.opts.sizes,e&&"auto"!==e||(e=(t.width/t.height>1&&s.width()/s.height()>1?"100":Math.round(t.width/t.height*100))+"vw"),a.attr("sizes",e).attr("srcset",t.opts.srcset)),t.$ghost&&setTimeout(function(){t.$ghost&&!o.isClosing&&t.$ghost.hide()},Math.min(300,Math.max(1e3,t.height/1600))),o.hideLoading(t))}).addClass("fancybox-image").attr("src",t.src).appendTo(t.$content),(i.complete||"complete"==i.readyState)&&a.naturalWidth&&a.naturalHeight?a.trigger("load"):i.error&&a.trigger("error")},resolveImageSlideSize:function(t,e,n){var o=parseInt(t.opts.width,10),i=parseInt(t.opts.height,10);t.width=e,t.height=n,o>0&&(t.width=o,t.height=Math.floor(o*n/e)),i>0&&(t.width=Math.floor(i*e/n),t.height=i)},setIframe:function(t){var e,o=this,i=t.opts.iframe,a=t.$slide;t.$content=n('<div class="fancybox-content'+(i.preload?" fancybox-is-hidden":"")+'"></div>').css(i.css).appendTo(a),a.addClass("fancybox-slide--"+t.contentType),t.$iframe=e=n(i.tpl.replace(/\{rnd\}/g,(new Date).getTime())).attr(i.attr).appendTo(t.$content),i.preload?(o.showLoading(t),e.on("load.fb error.fb",function(e){this.isReady=1,t.$slide.trigger("refresh"),o.afterLoad(t)}),a.on("refresh.fb",function(){var n,o,s=t.$content,r=i.css.width,c=i.css.height;if(1===e[0].isReady){try{n=e.contents(),o=n.find("body")}catch(t){}o&&o.length&&o.children().length&&(a.css("overflow","visible"),s.css({width:"100%","max-width":"100%",height:"9999px"}),void 0===r&&(r=Math.ceil(Math.max(o[0].clientWidth,o.outerWidth(!0)))),s.css("width",r||"").css("max-width",""),void 0===c&&(c=Math.ceil(Math.max(o[0].clientHeight,o.outerHeight(!0)))),s.css("height",c||""),a.css("overflow","auto")),s.removeClass("fancybox-is-hidden")}})):o.afterLoad(t),e.attr("src",t.src),a.one("onReset",function(){try{n(this).find("iframe").hide().unbind().attr("src","//about:blank")}catch(t){}n(this).off("refresh.fb").empty(),t.isLoaded=!1,t.isRevealed=!1})},setContent:function(t,e){var o=this;o.isClosing||(o.hideLoading(t),t.$content&&n.fancybox.stop(t.$content),t.$slide.empty(),l(e)&&e.parent().length?((e.hasClass("fancybox-content")||e.parent().hasClass("fancybox-content"))&&e.parents(".fancybox-slide").trigger("onReset"),t.$placeholder=n("<div>").hide().insertAfter(e),e.css("display","inline-block")):t.hasError||("string"===n.type(e)&&(e=n("<div>").append(n.trim(e)).contents()),t.opts.filter&&(e=n("<div>").html(e).find(t.opts.filter))),t.$slide.one("onReset",function(){n(this).find("video,audio").trigger("pause"),t.$placeholder&&(t.$placeholder.after(e.removeClass("fancybox-content").hide()).remove(),t.$placeholder=null),t.$smallBtn&&(t.$smallBtn.remove(),t.$smallBtn=null),t.hasError||(n(this).empty(),t.isLoaded=!1,t.isRevealed=!1)}),n(e).appendTo(t.$slide),n(e).is("video,audio")&&(n(e).addClass("fancybox-video"),n(e).wrap("<div></div>"),t.contentType="video",t.opts.width=t.opts.width||n(e).attr("width"),t.opts.height=t.opts.height||n(e).attr("height")),t.$content=t.$slide.children().filter("div,form,main,video,audio,article,.fancybox-content").first(),t.$content.siblings().hide(),t.$content.length||(t.$content=t.$slide.wrapInner("<div></div>").children().first()),t.$content.addClass("fancybox-content"),t.$slide.addClass("fancybox-slide--"+t.contentType),o.afterLoad(t))},setError:function(t){t.hasError=!0,t.$slide.trigger("onReset").removeClass("fancybox-slide--"+t.contentType).addClass("fancybox-slide--error"),t.contentType="html",this.setContent(t,this.translate(t,t.opts.errorTpl)),t.pos===this.currPos&&(this.isAnimating=!1)},showLoading:function(t){var e=this;(t=t||e.current)&&!t.$spinner&&(t.$spinner=n(e.translate(e,e.opts.spinnerTpl)).appendTo(t.$slide).hide().fadeIn("fast"))},hideLoading:function(t){var e=this;(t=t||e.current)&&t.$spinner&&(t.$spinner.stop().remove(),delete t.$spinner)},afterLoad:function(t){var e=this;e.isClosing||(t.isLoading=!1,t.isLoaded=!0,e.trigger("afterLoad",t),e.hideLoading(t),!t.opts.smallBtn||t.$smallBtn&&t.$smallBtn.length||(t.$smallBtn=n(e.translate(t,t.opts.btnTpl.smallBtn)).appendTo(t.$content)),t.opts.protect&&t.$content&&!t.hasError&&(t.$content.on("contextmenu.fb",function(t){return 2==t.button&&t.preventDefault(),!0}),"image"===t.type&&n('<div class="fancybox-spaceball"></div>').appendTo(t.$content)),e.adjustCaption(t),e.adjustLayout(t),t.pos===e.currPos&&e.updateCursor(),e.revealContent(t))},adjustCaption:function(t){var e,n=this,o=t||n.current,i=o.opts.caption,a=o.opts.preventCaptionOverlap,s=n.$refs.caption,r=!1;s.toggleClass("fancybox-caption--separate",a),a&&i&&i.length&&(o.pos!==n.currPos?(e=s.clone().appendTo(s.parent()),e.children().eq(0).empty().html(i),r=e.outerHeight(!0),e.empty().remove()):n.$caption&&(r=n.$caption.outerHeight(!0)),o.$slide.css("padding-bottom",r||""))},adjustLayout:function(t){var e,n,o,i,a=this,s=t||a.current;s.isLoaded&&!0!==s.opts.disableLayoutFix&&(s.$content.css("margin-bottom",""),s.$content.outerHeight()>s.$slide.height()+.5&&(o=s.$slide[0].style["padding-bottom"],i=s.$slide.css("padding-bottom"),parseFloat(i)>0&&(e=s.$slide[0].scrollHeight,s.$slide.css("padding-bottom",0),Math.abs(e-s.$slide[0].scrollHeight)<1&&(n=i),s.$slide.css("padding-bottom",o))),s.$content.css("margin-bottom",n))},revealContent:function(t){var e,o,i,a,s=this,r=t.$slide,c=!1,l=!1,d=s.isMoved(t),u=t.isRevealed;return t.isRevealed=!0,e=t.opts[s.firstRun?"animationEffect":"transitionEffect"],i=t.opts[s.firstRun?"animationDuration":"transitionDuration"],i=parseInt(void 0===t.forcedDuration?i:t.forcedDuration,10),!d&&t.pos===s.currPos&&i||(e=!1),"zoom"===e&&(t.pos===s.currPos&&i&&"image"===t.type&&!t.hasError&&(l=s.getThumbPos(t))?c=s.getFitPos(t):e="fade"),"zoom"===e?(s.isAnimating=!0,c.scaleX=c.width/l.width,c.scaleY=c.height/l.height,a=t.opts.zoomOpacity,"auto"==a&&(a=Math.abs(t.width/t.height-l.width/l.height)>.1),a&&(l.opacity=.1,c.opacity=1),n.fancybox.setTranslate(t.$content.removeClass("fancybox-is-hidden"),l),p(t.$content),void n.fancybox.animate(t.$content,c,i,function(){s.isAnimating=!1,s.complete()})):(s.updateSlide(t),e?(n.fancybox.stop(r),o="fancybox-slide--"+(t.pos>=s.prevPos?"next":"previous")+" fancybox-animated fancybox-fx-"+e,r.addClass(o).removeClass("fancybox-slide--current"),t.$content.removeClass("fancybox-is-hidden"),p(r),"image"!==t.type&&t.$content.hide().show(0),void n.fancybox.animate(r,"fancybox-slide--current",i,function(){r.removeClass(o).css({transform:"",opacity:""}),t.pos===s.currPos&&s.complete()},!0)):(t.$content.removeClass("fancybox-is-hidden"),u||!d||"image"!==t.type||t.hasError||t.$content.hide().fadeIn("fast"),void(t.pos===s.currPos&&s.complete())))},getThumbPos:function(t){var e,o,i,a,s,r=!1,c=t.$thumb;return!(!c||!g(c[0]))&&(e=n.fancybox.getTranslate(c),o=parseFloat(c.css("border-top-width")||0),i=parseFloat(c.css("border-right-width")||0),a=parseFloat(c.css("border-bottom-width")||0),s=parseFloat(c.css("border-left-width")||0),r={top:e.top+o,left:e.left+s,width:e.width-i-s,height:e.height-o-a,scaleX:1,scaleY:1},e.width>0&&e.height>0&&r)},complete:function(){var t,e=this,o=e.current,i={};!e.isMoved()&&o.isLoaded&&(o.isComplete||(o.isComplete=!0,o.$slide.siblings().trigger("onReset"),e.preload("inline"),p(o.$slide),o.$slide.addClass("fancybox-slide--complete"),n.each(e.slides,function(t,o){o.pos>=e.currPos-1&&o.pos<=e.currPos+1?i[o.pos]=o:o&&(n.fancybox.stop(o.$slide),o.$slide.off().remove())}),e.slides=i),e.isAnimating=!1,e.updateCursor(),e.trigger("afterShow"),o.opts.video.autoStart&&o.$slide.find("video,audio").filter(":visible:first").trigger("play").one("ended",function(){Document.exitFullscreen?Document.exitFullscreen():this.webkitExitFullscreen&&this.webkitExitFullscreen(),e.next()}),o.opts.autoFocus&&"html"===o.contentType&&(t=o.$content.find("input[autofocus]:enabled:visible:first"),t.length?t.trigger("focus"):e.focus(null,!0)),o.$slide.scrollTop(0).scrollLeft(0))},preload:function(t){var e,n,o=this;o.group.length<2||(n=o.slides[o.currPos+1],e=o.slides[o.currPos-1],e&&e.type===t&&o.loadSlide(e),n&&n.type===t&&o.loadSlide(n))},focus:function(t,o){var i,a,s=this,r=["a[href]","area[href]",'input:not([disabled]):not([type="hidden"]):not([aria-hidden])',"select:not([disabled]):not([aria-hidden])","textarea:not([disabled]):not([aria-hidden])","button:not([disabled]):not([aria-hidden])","iframe","object","embed","video","audio","[contenteditable]",'[tabindex]:not([tabindex^="-"])'].join(",");s.isClosing||(i=!t&&s.current&&s.current.isComplete?s.current.$slide.find("*:visible"+(o?":not(.fancybox-close-small)":"")):s.$refs.container.find("*:visible"),i=i.filter(r).filter(function(){return"hidden"!==n(this).css("visibility")&&!n(this).hasClass("disabled")}),i.length?(a=i.index(e.activeElement),t&&t.shiftKey?(a<0||0==a)&&(t.preventDefault(),i.eq(i.length-1).trigger("focus")):(a<0||a==i.length-1)&&(t&&t.preventDefault(),i.eq(0).trigger("focus"))):s.$refs.container.trigger("focus"))},activate:function(){var t=this;n(".fancybox-container").each(function(){var e=n(this).data("FancyBox");e&&e.id!==t.id&&!e.isClosing&&(e.trigger("onDeactivate"),e.removeEvents(),e.isVisible=!1)}),t.isVisible=!0,(t.current||t.isIdle)&&(t.update(),t.updateControls()),t.trigger("onActivate"),t.addEvents()},close:function(t,e){var o,i,a,s,r,c,l,u=this,f=u.current,h=function(){u.cleanUp(t)};return!u.isClosing&&(u.isClosing=!0,!1===u.trigger("beforeClose",t)?(u.isClosing=!1,d(function(){u.update()}),!1):(u.removeEvents(),a=f.$content,o=f.opts.animationEffect,i=n.isNumeric(e)?e:o?f.opts.animationDuration:0,f.$slide.removeClass("fancybox-slide--complete fancybox-slide--next fancybox-slide--previous fancybox-animated"),!0!==t?n.fancybox.stop(f.$slide):o=!1,f.$slide.siblings().trigger("onReset").remove(),i&&u.$refs.container.removeClass("fancybox-is-open").addClass("fancybox-is-closing").css("transition-duration",i+"ms"),u.hideLoading(f),u.hideControls(!0),u.updateCursor(),"zoom"!==o||a&&i&&"image"===f.type&&!u.isMoved()&&!f.hasError&&(l=u.getThumbPos(f))||(o="fade"),"zoom"===o?(n.fancybox.stop(a),s=n.fancybox.getTranslate(a),c={top:s.top,left:s.left,scaleX:s.width/l.width,scaleY:s.height/l.height,width:l.width,height:l.height},r=f.opts.zoomOpacity, 726"auto"==r&&(r=Math.abs(f.width/f.height-l.width/l.height)>.1),r&&(l.opacity=0),n.fancybox.setTranslate(a,c),p(a),n.fancybox.animate(a,l,i,h),!0):(o&&i?n.fancybox.animate(f.$slide.addClass("fancybox-slide--previous").removeClass("fancybox-slide--current"),"fancybox-animated fancybox-fx-"+o,i,h):!0===t?setTimeout(h,i):h(),!0)))},cleanUp:function(e){var o,i,a,s=this,r=s.current.opts.$orig;s.current.$slide.trigger("onReset"),s.$refs.container.empty().remove(),s.trigger("afterClose",e),s.current.opts.backFocus&&(r&&r.length&&r.is(":visible")||(r=s.$trigger),r&&r.length&&(i=t.scrollX,a=t.scrollY,r.trigger("focus"),n("html, body").scrollTop(a).scrollLeft(i))),s.current=null,o=n.fancybox.getInstance(),o?o.activate():(n("body").removeClass("fancybox-active compensate-for-scrollbar"),n("#fancybox-style-noscroll").remove())},trigger:function(t,e){var o,i=Array.prototype.slice.call(arguments,1),a=this,s=e&&e.opts?e:a.current;if(s?i.unshift(s):s=a,i.unshift(a),n.isFunction(s.opts[t])&&(o=s.opts[t].apply(s,i)),!1===o)return o;"afterClose"!==t&&a.$refs?a.$refs.container.trigger(t+".fb",i):r.trigger(t+".fb",i)},updateControls:function(){var t=this,o=t.current,i=o.index,a=t.$refs.container,s=t.$refs.caption,r=o.opts.caption;o.$slide.trigger("refresh"),r&&r.length?(t.$caption=s,s.children().eq(0).html(r)):t.$caption=null,t.hasHiddenControls||t.isIdle||t.showControls(),a.find("[data-fancybox-count]").html(t.group.length),a.find("[data-fancybox-index]").html(i+1),a.find("[data-fancybox-prev]").prop("disabled",!o.opts.loop&&i<=0),a.find("[data-fancybox-next]").prop("disabled",!o.opts.loop&&i>=t.group.length-1),"image"===o.type?a.find("[data-fancybox-zoom]").show().end().find("[data-fancybox-download]").attr("href",o.opts.image.src||o.src).show():o.opts.toolbar&&a.find("[data-fancybox-download],[data-fancybox-zoom]").hide(),n(e.activeElement).is(":hidden,[disabled]")&&t.$refs.container.trigger("focus")},hideControls:function(t){var e=this,n=["infobar","toolbar","nav"];!t&&e.current.opts.preventCaptionOverlap||n.push("caption"),this.$refs.container.removeClass(n.map(function(t){return"fancybox-show-"+t}).join(" ")),this.hasHiddenControls=!0},showControls:function(){var t=this,e=t.current?t.current.opts:t.opts,n=t.$refs.container;t.hasHiddenControls=!1,t.idleSecondsCounter=0,n.toggleClass("fancybox-show-toolbar",!(!e.toolbar||!e.buttons)).toggleClass("fancybox-show-infobar",!!(e.infobar&&t.group.length>1)).toggleClass("fancybox-show-caption",!!t.$caption).toggleClass("fancybox-show-nav",!!(e.arrows&&t.group.length>1)).toggleClass("fancybox-is-modal",!!e.modal)},toggleControls:function(){this.hasHiddenControls?this.showControls():this.hideControls()}}),n.fancybox={version:"3.5.7",defaults:a,getInstance:function(t){var e=n('.fancybox-container:not(".fancybox-is-closing"):last').data("FancyBox"),o=Array.prototype.slice.call(arguments,1);return e instanceof b&&("string"===n.type(t)?e[t].apply(e,o):"function"===n.type(t)&&t.apply(e,o),e)},open:function(t,e,n){return new b(t,e,n)},close:function(t){var e=this.getInstance();e&&(e.close(),!0===t&&this.close(t))},destroy:function(){this.close(!0),r.add("body").off("click.fb-start","**")},isMobile:/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent),use3d:function(){var n=e.createElement("div");return t.getComputedStyle&&t.getComputedStyle(n)&&t.getComputedStyle(n).getPropertyValue("transform")&&!(e.documentMode&&e.documentMode<11)}(),getTranslate:function(t){var e;return!(!t||!t.length)&&(e=t[0].getBoundingClientRect(),{top:e.top||0,left:e.left||0,width:e.width,height:e.height,opacity:parseFloat(t.css("opacity"))})},setTranslate:function(t,e){var n="",o={};if(t&&e)return void 0===e.left&&void 0===e.top||(n=(void 0===e.left?t.position().left:e.left)+"px, "+(void 0===e.top?t.position().top:e.top)+"px",n=this.use3d?"translate3d("+n+", 0px)":"translate("+n+")"),void 0!==e.scaleX&&void 0!==e.scaleY?n+=" scale("+e.scaleX+", "+e.scaleY+")":void 0!==e.scaleX&&(n+=" scaleX("+e.scaleX+")"),n.length&&(o.transform=n),void 0!==e.opacity&&(o.opacity=e.opacity),void 0!==e.width&&(o.width=e.width),void 0!==e.height&&(o.height=e.height),t.css(o)},animate:function(t,e,o,i,a){var s,r=this;n.isFunction(o)&&(i=o,o=null),r.stop(t),s=r.getTranslate(t),t.on(f,function(c){(!c||!c.originalEvent||t.is(c.originalEvent.target)&&"z-index"!=c.originalEvent.propertyName)&&(r.stop(t),n.isNumeric(o)&&t.css("transition-duration",""),n.isPlainObject(e)?void 0!==e.scaleX&&void 0!==e.scaleY&&r.setTranslate(t,{top:e.top,left:e.left,width:s.width*e.scaleX,height:s.height*e.scaleY,scaleX:1,scaleY:1}):!0!==a&&t.removeClass(e),n.isFunction(i)&&i(c))}),n.isNumeric(o)&&t.css("transition-duration",o+"ms"),n.isPlainObject(e)?(void 0!==e.scaleX&&void 0!==e.scaleY&&(delete e.width,delete e.height,t.parent().hasClass("fancybox-slide--image")&&t.parent().addClass("fancybox-is-scaling")),n.fancybox.setTranslate(t,e)):t.addClass(e),t.data("timer",setTimeout(function(){t.trigger(f)},o+33))},stop:function(t,e){t&&t.length&&(clearTimeout(t.data("timer")),e&&t.trigger(f),t.off(f).css("transition-duration",""),t.parent().removeClass("fancybox-is-scaling"))}},n.fn.fancybox=function(t){var e;return t=t||{},e=t.selector||!1,e?n("body").off("click.fb-start",e).on("click.fb-start",e,{options:t},i):this.off("click.fb-start").on("click.fb-start",{items:this,options:t},i),this},r.on("click.fb-start","[data-fancybox]",i),r.on("click.fb-start","[data-fancybox-trigger]",function(t){n('[data-fancybox="'+n(this).attr("data-fancybox-trigger")+'"]').eq(n(this).attr("data-fancybox-index")||0).trigger("click.fb-start",{$trigger:n(this)})}),function(){var t=null;r.on("mousedown mouseup focus blur",".fancybox-button",function(e){switch(e.type){case"mousedown":t=n(this);break;case"mouseup":t=null;break;case"focusin":n(".fancybox-button").removeClass("fancybox-focus"),n(this).is(t)||n(this).is("[disabled]")||n(this).addClass("fancybox-focus");break;case"focusout":n(".fancybox-button").removeClass("fancybox-focus")}})}()}}(window,document,jQuery),function(t){"use strict";var e={youtube:{matcher:/(youtube\.com|youtu\.be|youtube\-nocookie\.com)\/(watch\?(.*&)?v=|v\/|u\/|embed\/?)?(videoseries\?list=(.*)|[\w-]{11}|\?listType=(.*)&list=(.*))(.*)/i,params:{autoplay:1,autohide:1,fs:1,rel:0,hd:1,wmode:"transparent",enablejsapi:1,html5:1},paramPlace:8,type:"iframe",url:"https://www.youtube-nocookie.com/embed/$4",thumb:"https://img.youtube.com/vi/$4/hqdefault.jpg"},vimeo:{matcher:/^.+vimeo.com\/(.*\/)?([\d]+)(.*)?/,params:{autoplay:1,hd:1,show_title:1,show_byline:1,show_portrait:0,fullscreen:1},paramPlace:3,type:"iframe",url:"//player.vimeo.com/video/$2"},instagram:{matcher:/(instagr\.am|instagram\.com)\/p\/([a-zA-Z0-9_\-]+)\/?/i,type:"image",url:"//$1/p/$2/media/?size=l"},gmap_place:{matcher:/(maps\.)?google\.([a-z]{2,3}(\.[a-z]{2})?)\/(((maps\/(place\/(.*)\/)?\@(.*),(\d+.?\d+?)z))|(\?ll=))(.*)?/i,type:"iframe",url:function(t){return"//maps.google."+t[2]+"/?ll="+(t[9]?t[9]+"&z="+Math.floor(t[10])+(t[12]?t[12].replace(/^\//,"&"):""):t[12]+"").replace(/\?/,"&")+"&output="+(t[12]&&t[12].indexOf("layer=c")>0?"svembed":"embed")}},gmap_search:{matcher:/(maps\.)?google\.([a-z]{2,3}(\.[a-z]{2})?)\/(maps\/search\/)(.*)/i,type:"iframe",url:function(t){return"//maps.google."+t[2]+"/maps?q="+t[5].replace("query=","q=").replace("api=1","")+"&output=embed"}}},n=function(e,n,o){if(e)return o=o||"","object"===t.type(o)&&(o=t.param(o,!0)),t.each(n,function(t,n){e=e.replace("$"+t,n||"")}),o.length&&(e+=(e.indexOf("?")>0?"&":"?")+o),e};t(document).on("objectNeedsType.fb",function(o,i,a){var s,r,c,l,d,u,f,p=a.src||"",h=!1;s=t.extend(!0,{},e,a.opts.media),t.each(s,function(e,o){if(c=p.match(o.matcher)){if(h=o.type,f=e,u={},o.paramPlace&&c[o.paramPlace]){d=c[o.paramPlace],"?"==d[0]&&(d=d.substring(1)),d=d.split("&");for(var i=0;i<d.length;++i){var s=d[i].split("=",2);2==s.length&&(u[s[0]]=decodeURIComponent(s[1].replace(/\+/g," ")))}}return l=t.extend(!0,{},o.params,a.opts[e],u),p="function"===t.type(o.url)?o.url.call(this,c,l,a):n(o.url,c,l),r="function"===t.type(o.thumb)?o.thumb.call(this,c,l,a):n(o.thumb,c),"youtube"===e?p=p.replace(/&t=((\d+)m)?(\d+)s/,function(t,e,n,o){return"&start="+((n?60*parseInt(n,10):0)+parseInt(o,10))}):"vimeo"===e&&(p=p.replace("&%23","#")),!1}}),h?(a.opts.thumb||a.opts.$thumb&&a.opts.$thumb.length||(a.opts.thumb=r),"iframe"===h&&(a.opts=t.extend(!0,a.opts,{iframe:{preload:!1,attr:{scrolling:"no"}}})),t.extend(a,{type:h,src:p,origSrc:a.src,contentSource:f,contentType:"image"===h?"image":"gmap_place"==f||"gmap_search"==f?"map":"video"})):p&&(a.type=a.opts.defaultType)});var o={youtube:{src:"https://www.youtube.com/iframe_api",class:"YT",loading:!1,loaded:!1},vimeo:{src:"https://player.vimeo.com/api/player.js",class:"Vimeo",loading:!1,loaded:!1},load:function(t){var e,n=this;if(this[t].loaded)return void setTimeout(function(){n.done(t)});this[t].loading||(this[t].loading=!0,e=document.createElement("script"),e.type="text/javascript",e.src=this[t].src,"youtube"===t?window.onYouTubeIframeAPIReady=function(){n[t].loaded=!0,n.done(t)}:e.onload=function(){n[t].loaded=!0,n.done(t)},document.body.appendChild(e))},done:function(e){var n,o,i;"youtube"===e&&delete window.onYouTubeIframeAPIReady,(n=t.fancybox.getInstance())&&(o=n.current.$content.find("iframe"),"youtube"===e&&void 0!==YT&&YT?i=new YT.Player(o.attr("id"),{events:{onStateChange:function(t){0==t.data&&n.next()}}}):"vimeo"===e&&void 0!==Vimeo&&Vimeo&&(i=new Vimeo.Player(o),i.on("ended",function(){n.next()})))}};t(document).on({"afterShow.fb":function(t,e,n){e.group.length>1&&("youtube"===n.contentSource||"vimeo"===n.contentSource)&&o.load(n.contentSource)}})}(jQuery),function(t,e,n){"use strict";var o=function(){return t.requestAnimationFrame||t.webkitRequestAnimationFrame||t.mozRequestAnimationFrame||t.oRequestAnimationFrame||function(e){return t.setTimeout(e,1e3/60)}}(),i=function(){return t.cancelAnimationFrame||t.webkitCancelAnimationFrame||t.mozCancelAnimationFrame||t.oCancelAnimationFrame||function(e){t.clearTimeout(e)}}(),a=function(e){var n=[];e=e.originalEvent||e||t.e,e=e.touches&&e.touches.length?e.touches:e.changedTouches&&e.changedTouches.length?e.changedTouches:[e];for(var o in e)e[o].pageX?n.push({x:e[o].pageX,y:e[o].pageY}):e[o].clientX&&n.push({x:e[o].clientX,y:e[o].clientY});return n},s=function(t,e,n){return e&&t?"x"===n?t.x-e.x:"y"===n?t.y-e.y:Math.sqrt(Math.pow(t.x-e.x,2)+Math.pow(t.y-e.y,2)):0},r=function(t){if(t.is('a,area,button,[role="button"],input,label,select,summary,textarea,video,audio,iframe')||n.isFunction(t.get(0).onclick)||t.data("selectable"))return!0;for(var e=0,o=t[0].attributes,i=o.length;e<i;e++)if("data-fancybox-"===o[e].nodeName.substr(0,14))return!0;return!1},c=function(e){var n=t.getComputedStyle(e)["overflow-y"],o=t.getComputedStyle(e)["overflow-x"],i=("scroll"===n||"auto"===n)&&e.scrollHeight>e.clientHeight,a=("scroll"===o||"auto"===o)&&e.scrollWidth>e.clientWidth;return i||a},l=function(t){for(var e=!1;;){if(e=c(t.get(0)))break;if(t=t.parent(),!t.length||t.hasClass("fancybox-stage")||t.is("body"))break}return e},d=function(t){var e=this;e.instance=t,e.$bg=t.$refs.bg,e.$stage=t.$refs.stage,e.$container=t.$refs.container,e.destroy(),e.$container.on("touchstart.fb.touch mousedown.fb.touch",n.proxy(e,"ontouchstart"))};d.prototype.destroy=function(){var t=this;t.$container.off(".fb.touch"),n(e).off(".fb.touch"),t.requestId&&(i(t.requestId),t.requestId=null),t.tapped&&(clearTimeout(t.tapped),t.tapped=null)},d.prototype.ontouchstart=function(o){var i=this,c=n(o.target),d=i.instance,u=d.current,f=u.$slide,p=u.$content,h="touchstart"==o.type;if(h&&i.$container.off("mousedown.fb.touch"),(!o.originalEvent||2!=o.originalEvent.button)&&f.length&&c.length&&!r(c)&&!r(c.parent())&&(c.is("img")||!(o.originalEvent.clientX>c[0].clientWidth+c.offset().left))){if(!u||d.isAnimating||u.$slide.hasClass("fancybox-animated"))return o.stopPropagation(),void o.preventDefault();i.realPoints=i.startPoints=a(o),i.startPoints.length&&(u.touch&&o.stopPropagation(),i.startEvent=o,i.canTap=!0,i.$target=c,i.$content=p,i.opts=u.opts.touch,i.isPanning=!1,i.isSwiping=!1,i.isZooming=!1,i.isScrolling=!1,i.canPan=d.canPan(),i.startTime=(new Date).getTime(),i.distanceX=i.distanceY=i.distance=0,i.canvasWidth=Math.round(f[0].clientWidth),i.canvasHeight=Math.round(f[0].clientHeight),i.contentLastPos=null,i.contentStartPos=n.fancybox.getTranslate(i.$content)||{top:0,left:0},i.sliderStartPos=n.fancybox.getTranslate(f),i.stagePos=n.fancybox.getTranslate(d.$refs.stage),i.sliderStartPos.top-=i.stagePos.top,i.sliderStartPos.left-=i.stagePos.left,i.contentStartPos.top-=i.stagePos.top,i.contentStartPos.left-=i.stagePos.left,n(e).off(".fb.touch").on(h?"touchend.fb.touch touchcancel.fb.touch":"mouseup.fb.touch mouseleave.fb.touch",n.proxy(i,"ontouchend")).on(h?"touchmove.fb.touch":"mousemove.fb.touch",n.proxy(i,"ontouchmove")),n.fancybox.isMobile&&e.addEventListener("scroll",i.onscroll,!0),((i.opts||i.canPan)&&(c.is(i.$stage)||i.$stage.find(c).length)||(c.is(".fancybox-image")&&o.preventDefault(),n.fancybox.isMobile&&c.parents(".fancybox-caption").length))&&(i.isScrollable=l(c)||l(c.parent()),n.fancybox.isMobile&&i.isScrollable||o.preventDefault(),(1===i.startPoints.length||u.hasError)&&(i.canPan?(n.fancybox.stop(i.$content),i.isPanning=!0):i.isSwiping=!0,i.$container.addClass("fancybox-is-grabbing")),2===i.startPoints.length&&"image"===u.type&&(u.isLoaded||u.$ghost)&&(i.canTap=!1,i.isSwiping=!1,i.isPanning=!1,i.isZooming=!0,n.fancybox.stop(i.$content),i.centerPointStartX=.5*(i.startPoints[0].x+i.startPoints[1].x)-n(t).scrollLeft(),i.centerPointStartY=.5*(i.startPoints[0].y+i.startPoints[1].y)-n(t).scrollTop(),i.percentageOfImageAtPinchPointX=(i.centerPointStartX-i.contentStartPos.left)/i.contentStartPos.width,i.percentageOfImageAtPinchPointY=(i.centerPointStartY-i.contentStartPos.top)/i.contentStartPos.height,i.startDistanceBetweenFingers=s(i.startPoints[0],i.startPoints[1]))))}},d.prototype.onscroll=function(t){var n=this;n.isScrolling=!0,e.removeEventListener("scroll",n.onscroll,!0)},d.prototype.ontouchmove=function(t){var e=this;return void 0!==t.originalEvent.buttons&&0===t.originalEvent.buttons?void e.ontouchend(t):e.isScrolling?void(e.canTap=!1):(e.newPoints=a(t),void((e.opts||e.canPan)&&e.newPoints.length&&e.newPoints.length&&(e.isSwiping&&!0===e.isSwiping||t.preventDefault(),e.distanceX=s(e.newPoints[0],e.startPoints[0],"x"),e.distanceY=s(e.newPoints[0],e.startPoints[0],"y"),e.distance=s(e.newPoints[0],e.startPoints[0]),e.distance>0&&(e.isSwiping?e.onSwipe(t):e.isPanning?e.onPan():e.isZooming&&e.onZoom()))))},d.prototype.onSwipe=function(e){var a,s=this,r=s.instance,c=s.isSwiping,l=s.sliderStartPos.left||0;if(!0!==c)"x"==c&&(s.distanceX>0&&(s.instance.group.length<2||0===s.instance.current.index&&!s.instance.current.opts.loop)?l+=Math.pow(s.distanceX,.8):s.distanceX<0&&(s.instance.group.length<2||s.instance.current.index===s.instance.group.length-1&&!s.instance.current.opts.loop)?l-=Math.pow(-s.distanceX,.8):l+=s.distanceX),s.sliderLastPos={top:"x"==c?0:s.sliderStartPos.top+s.distanceY,left:l},s.requestId&&(i(s.requestId),s.requestId=null),s.requestId=o(function(){s.sliderLastPos&&(n.each(s.instance.slides,function(t,e){var o=e.pos-s.instance.currPos;n.fancybox.setTranslate(e.$slide,{top:s.sliderLastPos.top,left:s.sliderLastPos.left+o*s.canvasWidth+o*e.opts.gutter})}),s.$container.addClass("fancybox-is-sliding"))});else if(Math.abs(s.distance)>10){if(s.canTap=!1,r.group.length<2&&s.opts.vertical?s.isSwiping="y":r.isDragging||!1===s.opts.vertical||"auto"===s.opts.vertical&&n(t).width()>800?s.isSwiping="x":(a=Math.abs(180*Math.atan2(s.distanceY,s.distanceX)/Math.PI),s.isSwiping=a>45&&a<135?"y":"x"),"y"===s.isSwiping&&n.fancybox.isMobile&&s.isScrollable)return void(s.isScrolling=!0);r.isDragging=s.isSwiping,s.startPoints=s.newPoints,n.each(r.slides,function(t,e){var o,i;n.fancybox.stop(e.$slide),o=n.fancybox.getTranslate(e.$slide),i=n.fancybox.getTranslate(r.$refs.stage),e.$slide.css({transform:"",opacity:"","transition-duration":""}).removeClass("fancybox-animated").removeClass(function(t,e){return(e.match(/(^|\s)fancybox-fx-\S+/g)||[]).join(" ")}),e.pos===r.current.pos&&(s.sliderStartPos.top=o.top-i.top,s.sliderStartPos.left=o.left-i.left),n.fancybox.setTranslate(e.$slide,{top:o.top-i.top,left:o.left-i.left})}),r.SlideShow&&r.SlideShow.isActive&&r.SlideShow.stop()}},d.prototype.onPan=function(){var t=this;if(s(t.newPoints[0],t.realPoints[0])<(n.fancybox.isMobile?10:5))return void(t.startPoints=t.newPoints);t.canTap=!1,t.contentLastPos=t.limitMovement(),t.requestId&&i(t.requestId),t.requestId=o(function(){n.fancybox.setTranslate(t.$content,t.contentLastPos)})},d.prototype.limitMovement=function(){var t,e,n,o,i,a,s=this,r=s.canvasWidth,c=s.canvasHeight,l=s.distanceX,d=s.distanceY,u=s.contentStartPos,f=u.left,p=u.top,h=u.width,g=u.height;return i=h>r?f+l:f,a=p+d,t=Math.max(0,.5*r-.5*h),e=Math.max(0,.5*c-.5*g),n=Math.min(r-h,.5*r-.5*h),o=Math.min(c-g,.5*c-.5*g),l>0&&i>t&&(i=t-1+Math.pow(-t+f+l,.8)||0),l<0&&i<n&&(i=n+1-Math.pow(n-f-l,.8)||0),d>0&&a>e&&(a=e-1+Math.pow(-e+p+d,.8)||0),d<0&&a<o&&(a=o+1-Math.pow(o-p-d,.8)||0),{top:a,left:i}},d.prototype.limitPosition=function(t,e,n,o){var i=this,a=i.canvasWidth,s=i.canvasHeight;return n>a?(t=t>0?0:t,t=t<a-n?a-n:t):t=Math.max(0,a/2-n/2),o>s?(e=e>0?0:e,e=e<s-o?s-o:e):e=Math.max(0,s/2-o/2),{top:e,left:t}},d.prototype.onZoom=function(){var e=this,a=e.contentStartPos,r=a.width,c=a.height,l=a.left,d=a.top,u=s(e.newPoints[0],e.newPoints[1]),f=u/e.startDistanceBetweenFingers,p=Math.floor(r*f),h=Math.floor(c*f),g=(r-p)*e.percentageOfImageAtPinchPointX,b=(c-h)*e.percentageOfImageAtPinchPointY,m=(e.newPoints[0].x+e.newPoints[1].x)/2-n(t).scrollLeft(),v=(e.newPoints[0].y+e.newPoints[1].y)/2-n(t).scrollTop(),y=m-e.centerPointStartX,x=v-e.centerPointStartY,w=l+(g+y),$=d+(b+x),S={top:$,left:w,scaleX:f,scaleY:f};e.canTap=!1,e.newWidth=p,e.newHeight=h,e.contentLastPos=S,e.requestId&&i(e.requestId),e.requestId=o(function(){n.fancybox.setTranslate(e.$content,e.contentLastPos)})},d.prototype.ontouchend=function(t){var o=this,s=o.isSwiping,r=o.isPanning,c=o.isZooming,l=o.isScrolling;if(o.endPoints=a(t),o.dMs=Math.max((new Date).getTime()-o.startTime,1),o.$container.removeClass("fancybox-is-grabbing"),n(e).off(".fb.touch"),e.removeEventListener("scroll",o.onscroll,!0),o.requestId&&(i(o.requestId),o.requestId=null),o.isSwiping=!1,o.isPanning=!1,o.isZooming=!1,o.isScrolling=!1,o.instance.isDragging=!1,o.canTap)return o.onTap(t);o.speed=100,o.velocityX=o.distanceX/o.dMs*.5,o.velocityY=o.distanceY/o.dMs*.5,r?o.endPanning():c?o.endZooming():o.endSwiping(s,l)},d.prototype.endSwiping=function(t,e){var o=this,i=!1,a=o.instance.group.length,s=Math.abs(o.distanceX),r="x"==t&&a>1&&(o.dMs>130&&s>10||s>50);o.sliderLastPos=null,"y"==t&&!e&&Math.abs(o.distanceY)>50?(n.fancybox.animate(o.instance.current.$slide,{top:o.sliderStartPos.top+o.distanceY+150*o.velocityY,opacity:0},200),i=o.instance.close(!0,250)):r&&o.distanceX>0?i=o.instance.previous(300):r&&o.distanceX<0&&(i=o.instance.next(300)),!1!==i||"x"!=t&&"y"!=t||o.instance.centerSlide(200),o.$container.removeClass("fancybox-is-sliding")},d.prototype.endPanning=function(){var t,e,o,i=this;i.contentLastPos&&(!1===i.opts.momentum||i.dMs>350?(t=i.contentLastPos.left,e=i.contentLastPos.top):(t=i.contentLastPos.left+500*i.velocityX,e=i.contentLastPos.top+500*i.velocityY),o=i.limitPosition(t,e,i.contentStartPos.width,i.contentStartPos.height),o.width=i.contentStartPos.width,o.height=i.contentStartPos.height,n.fancybox.animate(i.$content,o,366))},d.prototype.endZooming=function(){var t,e,o,i,a=this,s=a.instance.current,r=a.newWidth,c=a.newHeight;a.contentLastPos&&(t=a.contentLastPos.left,e=a.contentLastPos.top,i={top:e,left:t,width:r,height:c,scaleX:1,scaleY:1},n.fancybox.setTranslate(a.$content,i),r<a.canvasWidth&&c<a.canvasHeight?a.instance.scaleToFit(150):r>s.width||c>s.height?a.instance.scaleToActual(a.centerPointStartX,a.centerPointStartY,150):(o=a.limitPosition(t,e,r,c),n.fancybox.animate(a.$content,o,150)))},d.prototype.onTap=function(e){var o,i=this,s=n(e.target),r=i.instance,c=r.current,l=e&&a(e)||i.startPoints,d=l[0]?l[0].x-n(t).scrollLeft()-i.stagePos.left:0,u=l[0]?l[0].y-n(t).scrollTop()-i.stagePos.top:0,f=function(t){var o=c.opts[t];if(n.isFunction(o)&&(o=o.apply(r,[c,e])),o)switch(o){case"close":r.close(i.startEvent);break;case"toggleControls":r.toggleControls();break;case"next":r.next();break;case"nextOrClose":r.group.length>1?r.next():r.close(i.startEvent);break;case"zoom":"image"==c.type&&(c.isLoaded||c.$ghost)&&(r.canPan()?r.scaleToFit():r.isScaledDown()?r.scaleToActual(d,u):r.group.length<2&&r.close(i.startEvent))}};if((!e.originalEvent||2!=e.originalEvent.button)&&(s.is("img")||!(d>s[0].clientWidth+s.offset().left))){if(s.is(".fancybox-bg,.fancybox-inner,.fancybox-outer,.fancybox-container"))o="Outside";else if(s.is(".fancybox-slide"))o="Slide";else{if(!r.current.$content||!r.current.$content.find(s).addBack().filter(s).length)return;o="Content"}if(i.tapped){if(clearTimeout(i.tapped),i.tapped=null,Math.abs(d-i.tapX)>50||Math.abs(u-i.tapY)>50)return this;f("dblclick"+o)}else i.tapX=d,i.tapY=u,c.opts["dblclick"+o]&&c.opts["dblclick"+o]!==c.opts["click"+o]?i.tapped=setTimeout(function(){i.tapped=null,r.isAnimating||f("click"+o)},500):f("click"+o);return this}},n(e).on("onActivate.fb",function(t,e){e&&!e.Guestures&&(e.Guestures=new d(e))}).on("beforeClose.fb",function(t,e){e&&e.Guestures&&e.Guestures.destroy()})}(window,document,jQuery),function(t,e){"use strict";e.extend(!0,e.fancybox.defaults,{btnTpl:{slideShow:'<button data-fancybox-play class="fancybox-button fancybox-button--play" title="{{PLAY_START}}"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M6.5 5.4v13.2l11-6.6z"/></svg><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M8.33 5.75h2.2v12.5h-2.2V5.75zm5.15 0h2.2v12.5h-2.2V5.75z"/></svg></button>'},slideShow:{autoStart:!1,speed:3e3,progress:!0}});var n=function(t){this.instance=t,this.init()};e.extend(n.prototype,{timer:null,isActive:!1,$button:null,init:function(){var t=this,n=t.instance,o=n.group[n.currIndex].opts.slideShow;t.$button=n.$refs.toolbar.find("[data-fancybox-play]").on("click",function(){t.toggle()}),n.group.length<2||!o?t.$button.hide():o.progress&&(t.$progress=e('<div class="fancybox-progress"></div>').appendTo(n.$refs.inner))},set:function(t){var n=this,o=n.instance,i=o.current;i&&(!0===t||i.opts.loop||o.currIndex<o.group.length-1)?n.isActive&&"video"!==i.contentType&&(n.$progress&&e.fancybox.animate(n.$progress.show(),{scaleX:1},i.opts.slideShow.speed),n.timer=setTimeout(function(){o.current.opts.loop||o.current.index!=o.group.length-1?o.next():o.jumpTo(0)},i.opts.slideShow.speed)):(n.stop(),o.idleSecondsCounter=0,o.showControls())},clear:function(){var t=this;clearTimeout(t.timer),t.timer=null,t.$progress&&t.$progress.removeAttr("style").hide()},start:function(){var t=this,e=t.instance.current;e&&(t.$button.attr("title",(e.opts.i18n[e.opts.lang]||e.opts.i18n.en).PLAY_STOP).removeClass("fancybox-button--play").addClass("fancybox-button--pause"),t.isActive=!0,e.isComplete&&t.set(!0),t.instance.trigger("onSlideShowChange",!0))},stop:function(){var t=this,e=t.instance.current;t.clear(),t.$button.attr("title",(e.opts.i18n[e.opts.lang]||e.opts.i18n.en).PLAY_START).removeClass("fancybox-button--pause").addClass("fancybox-button--play"),t.isActive=!1,t.instance.trigger("onSlideShowChange",!1),t.$progress&&t.$progress.removeAttr("style").hide()},toggle:function(){var t=this;t.isActive?t.stop():t.start()}}),e(t).on({"onInit.fb":function(t,e){e&&!e.SlideShow&&(e.SlideShow=new n(e))},"beforeShow.fb":function(t,e,n,o){var i=e&&e.SlideShow;o?i&&n.opts.slideShow.autoStart&&i.start():i&&i.isActive&&i.clear()},"afterShow.fb":function(t,e,n){var o=e&&e.SlideShow;o&&o.isActive&&o.set()},"afterKeydown.fb":function(n,o,i,a,s){var r=o&&o.SlideShow;!r||!i.opts.slideShow||80!==s&&32!==s||e(t.activeElement).is("button,a,input")||(a.preventDefault(),r.toggle())},"beforeClose.fb onDeactivate.fb":function(t,e){var n=e&&e.SlideShow;n&&n.stop()}}),e(t).on("visibilitychange",function(){var n=e.fancybox.getInstance(),o=n&&n.SlideShow;o&&o.isActive&&(t.hidden?o.clear():o.set())})}(document,jQuery),function(t,e){"use strict";var n=function(){for(var e=[["requestFullscreen","exitFullscreen","fullscreenElement","fullscreenEnabled","fullscreenchange","fullscreenerror"],["webkitRequestFullscreen","webkitExitFullscreen","webkitFullscreenElement","webkitFullscreenEnabled","webkitfullscreenchange","webkitfullscreenerror"],["webkitRequestFullScreen","webkitCancelFullScreen","webkitCurrentFullScreenElement","webkitCancelFullScreen","webkitfullscreenchange","webkitfullscreenerror"],["mozRequestFullScreen","mozCancelFullScreen","mozFullScreenElement","mozFullScreenEnabled","mozfullscreenchange","mozfullscreenerror"],["msRequestFullscreen","msExitFullscreen","msFullscreenElement","msFullscreenEnabled","MSFullscreenChange","MSFullscreenError"]],n={},o=0;o<e.length;o++){var i=e[o];if(i&&i[1]in t){for(var a=0;a<i.length;a++)n[e[0][a]]=i[a];return n}}return!1}();if(n){var o={request:function(e){e=e||t.documentElement,e[n.requestFullscreen](e.ALLOW_KEYBOARD_INPUT)},exit:function(){t[n.exitFullscreen]()},toggle:function(e){e=e||t.documentElement,this.isFullscreen()?this.exit():this.request(e)},isFullscreen:function(){return Boolean(t[n.fullscreenElement])},enabled:function(){return Boolean(t[n.fullscreenEnabled])}};e.extend(!0,e.fancybox.defaults,{btnTpl:{fullScreen:'<button data-fancybox-fullscreen class="fancybox-button fancybox-button--fsenter" title="{{FULL_SCREEN}}"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M7 14H5v5h5v-2H7v-3zm-2-4h2V7h3V5H5v5zm12 7h-3v2h5v-5h-2v3zM14 5v2h3v3h2V5h-5z"/></svg><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M5 16h3v3h2v-5H5zm3-8H5v2h5V5H8zm6 11h2v-3h3v-2h-5zm2-11V5h-2v5h5V8z"/></svg></button>'},fullScreen:{autoStart:!1}}),e(t).on(n.fullscreenchange,function(){var t=o.isFullscreen(),n=e.fancybox.getInstance();n&&(n.current&&"image"===n.current.type&&n.isAnimating&&(n.isAnimating=!1,n.update(!0,!0,0),n.isComplete||n.complete()),n.trigger("onFullscreenChange",t),n.$refs.container.toggleClass("fancybox-is-fullscreen",t),n.$refs.toolbar.find("[data-fancybox-fullscreen]").toggleClass("fancybox-button--fsenter",!t).toggleClass("fancybox-button--fsexit",t))})}e(t).on({"onInit.fb":function(t,e){var i;if(!n)return void e.$refs.toolbar.find("[data-fancybox-fullscreen]").remove();e&&e.group[e.currIndex].opts.fullScreen?(i=e.$refs.container,i.on("click.fb-fullscreen","[data-fancybox-fullscreen]",function(t){t.stopPropagation(),t.preventDefault(),o.toggle()}),e.opts.fullScreen&&!0===e.opts.fullScreen.autoStart&&o.request(),e.FullScreen=o):e&&e.$refs.toolbar.find("[data-fancybox-fullscreen]").hide()},"afterKeydown.fb":function(t,e,n,o,i){e&&e.FullScreen&&70===i&&(o.preventDefault(),e.FullScreen.toggle())},"beforeClose.fb":function(t,e){e&&e.FullScreen&&e.$refs.container.hasClass("fancybox-is-fullscreen")&&o.exit()}})}(document,jQuery),function(t,e){"use strict";var n="fancybox-thumbs";e.fancybox.defaults=e.extend(!0,{btnTpl:{thumbs:'<button data-fancybox-thumbs class="fancybox-button fancybox-button--thumbs" title="{{THUMBS}}"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M14.59 14.59h3.76v3.76h-3.76v-3.76zm-4.47 0h3.76v3.76h-3.76v-3.76zm-4.47 0h3.76v3.76H5.65v-3.76zm8.94-4.47h3.76v3.76h-3.76v-3.76zm-4.47 0h3.76v3.76h-3.76v-3.76zm-4.47 0h3.76v3.76H5.65v-3.76zm8.94-4.47h3.76v3.76h-3.76V5.65zm-4.47 0h3.76v3.76h-3.76V5.65zm-4.47 0h3.76v3.76H5.65V5.65z"/></svg></button>'},thumbs:{autoStart:!1,hideOnClose:!0,parentEl:".fancybox-container",axis:"y"}},e.fancybox.defaults);var o=function(t){this.init(t)};e.extend(o.prototype,{$button:null,$grid:null,$list:null,isVisible:!1,isActive:!1,init:function(t){var e=this,n=t.group,o=0;e.instance=t,e.opts=n[t.currIndex].opts.thumbs,t.Thumbs=e,e.$button=t.$refs.toolbar.find("[data-fancybox-thumbs]");for(var i=0,a=n.length;i<a&&(n[i].thumb&&o++,!(o>1));i++);o>1&&e.opts?(e.$button.removeAttr("style").on("click",function(){e.toggle()}),e.isActive=!0):e.$button.hide()},create:function(){var t,o=this,i=o.instance,a=o.opts.parentEl,s=[];o.$grid||(o.$grid=e('<div class="'+n+" "+n+"-"+o.opts.axis+'"></div>').appendTo(i.$refs.container.find(a).addBack().filter(a)),o.$grid.on("click","a",function(){i.jumpTo(e(this).attr("data-index"))})),o.$list||(o.$list=e('<div class="'+n+'__list">').appendTo(o.$grid)),e.each(i.group,function(e,n){t=n.thumb,t||"image"!==n.type||(t=n.src),s.push('<a href="javascript:;" tabindex="0" data-index="'+e+'"'+(t&&t.length?' style="background-image:url('+t+')"':'class="fancybox-thumbs-missing"')+"></a>")}),o.$list[0].innerHTML=s.join(""),"x"===o.opts.axis&&o.$list.width(parseInt(o.$grid.css("padding-right"),10)+i.group.length*o.$list.children().eq(0).outerWidth(!0))},focus:function(t){var e,n,o=this,i=o.$list,a=o.$grid;o.instance.current&&(e=i.children().removeClass("fancybox-thumbs-active").filter('[data-index="'+o.instance.current.index+'"]').addClass("fancybox-thumbs-active"),n=e.position(),"y"===o.opts.axis&&(n.top<0||n.top>i.height()-e.outerHeight())?i.stop().animate({scrollTop:i.scrollTop()+n.top},t):"x"===o.opts.axis&&(n.left<a.scrollLeft()||n.left>a.scrollLeft()+(a.width()-e.outerWidth()))&&i.parent().stop().animate({scrollLeft:n.left},t))},update:function(){var t=this;t.instance.$refs.container.toggleClass("fancybox-show-thumbs",this.isVisible),t.isVisible?(t.$grid||t.create(),t.instance.trigger("onThumbsShow"),t.focus(0)):t.$grid&&t.instance.trigger("onThumbsHide"),t.instance.update()},hide:function(){this.isVisible=!1,this.update()},show:function(){this.isVisible=!0,this.update()},toggle:function(){this.isVisible=!this.isVisible,this.update()}}),e(t).on({"onInit.fb":function(t,e){var n;e&&!e.Thumbs&&(n=new o(e),n.isActive&&!0===n.opts.autoStart&&n.show())},"beforeShow.fb":function(t,e,n,o){var i=e&&e.Thumbs;i&&i.isVisible&&i.focus(o?0:250)},"afterKeydown.fb":function(t,e,n,o,i){var a=e&&e.Thumbs;a&&a.isActive&&71===i&&(o.preventDefault(),a.toggle())},"beforeClose.fb":function(t,e){var n=e&&e.Thumbs;n&&n.isVisible&&!1!==n.opts.hideOnClose&&n.$grid.hide()}})}(document,jQuery),function(t,e){"use strict";function n(t){var e={"&":"&","<":"<",">":">",'"':""","'":"'","/":"/","`":"`","=":"="};return String(t).replace(/[&<>"'`=\/]/g,function(t){return e[t]})}e.extend(!0,e.fancybox.defaults,{btnTpl:{share:'<button data-fancybox-share class="fancybox-button fancybox-button--share" title="{{SHARE}}"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M2.55 19c1.4-8.4 9.1-9.8 11.9-9.8V5l7 7-7 6.3v-3.5c-2.8 0-10.5 2.1-11.9 4.2z"/></svg></button>'},share:{url:function(t,e){return!t.currentHash&&"inline"!==e.type&&"html"!==e.type&&(e.origSrc||e.src)||window.location}, 727tpl:'<div class="fancybox-share"><h1>{{SHARE}}</h1><p><a class="fancybox-share__button fancybox-share__button--fb" href="https://www.facebook.com/sharer/sharer.php?u={{url}}"><svg viewBox="0 0 512 512" xmlns="http://www.w3.org/2000/svg"><path d="m287 456v-299c0-21 6-35 35-35h38v-63c-7-1-29-3-55-3-54 0-91 33-91 94v306m143-254h-205v72h196" /></svg><span>Facebook</span></a><a class="fancybox-share__button fancybox-share__button--tw" href="https://twitter.com/intent/tweet?url={{url}}&text={{descr}}"><svg viewBox="0 0 512 512" xmlns="http://www.w3.org/2000/svg"><path d="m456 133c-14 7-31 11-47 13 17-10 30-27 37-46-15 10-34 16-52 20-61-62-157-7-141 75-68-3-129-35-169-85-22 37-11 86 26 109-13 0-26-4-37-9 0 39 28 72 65 80-12 3-25 4-37 2 10 33 41 57 77 57-42 30-77 38-122 34 170 111 378-32 359-208 16-11 30-25 41-42z" /></svg><span>Twitter</span></a><a class="fancybox-share__button fancybox-share__button--pt" href="https://www.pinterest.com/pin/create/button/?url={{url}}&description={{descr}}&media={{media}}"><svg viewBox="0 0 512 512" xmlns="http://www.w3.org/2000/svg"><path d="m265 56c-109 0-164 78-164 144 0 39 15 74 47 87 5 2 10 0 12-5l4-19c2-6 1-8-3-13-9-11-15-25-15-45 0-58 43-110 113-110 62 0 96 38 96 88 0 67-30 122-73 122-24 0-42-19-36-44 6-29 20-60 20-81 0-19-10-35-31-35-25 0-44 26-44 60 0 21 7 36 7 36l-30 125c-8 37-1 83 0 87 0 3 4 4 5 2 2-3 32-39 42-75l16-64c8 16 31 29 56 29 74 0 124-67 124-157 0-69-58-132-146-132z" fill="#fff"/></svg><span>Pinterest</span></a></p><p><input class="fancybox-share__input" type="text" value="{{url_raw}}" onclick="select()" /></p></div>'}}),e(t).on("click","[data-fancybox-share]",function(){var t,o,i=e.fancybox.getInstance(),a=i.current||null;a&&("function"===e.type(a.opts.share.url)&&(t=a.opts.share.url.apply(a,[i,a])),o=a.opts.share.tpl.replace(/\{\{media\}\}/g,"image"===a.type?encodeURIComponent(a.src):"").replace(/\{\{url\}\}/g,encodeURIComponent(t)).replace(/\{\{url_raw\}\}/g,n(t)).replace(/\{\{descr\}\}/g,i.$caption?encodeURIComponent(i.$caption.text()):""),e.fancybox.open({src:i.translate(i,o),type:"html",opts:{touch:!1,animationEffect:!1,afterLoad:function(t,e){i.$refs.container.one("beforeClose.fb",function(){t.close(null,0)}),e.$content.find(".fancybox-share__button").click(function(){return window.open(this.href,"Share","width=550, height=450"),!1})},mobile:{autoFocus:!1}}}))})}(document,jQuery),function(t,e,n){"use strict";function o(){var e=t.location.hash.substr(1),n=e.split("-"),o=n.length>1&&/^\+?\d+$/.test(n[n.length-1])?parseInt(n.pop(-1),10)||1:1,i=n.join("-");return{hash:e,index:o<1?1:o,gallery:i}}function i(t){""!==t.gallery&&n("[data-fancybox='"+n.escapeSelector(t.gallery)+"']").eq(t.index-1).focus().trigger("click.fb-start")}function a(t){var e,n;return!!t&&(e=t.current?t.current.opts:t.opts,""!==(n=e.hash||(e.$orig?e.$orig.data("fancybox")||e.$orig.data("fancybox-trigger"):""))&&n)}n.escapeSelector||(n.escapeSelector=function(t){return(t+"").replace(/([\0-\x1f\x7f]|^-?\d)|^-$|[^\x80-\uFFFF\w-]/g,function(t,e){return e?"\0"===t?"�":t.slice(0,-1)+"\\"+t.charCodeAt(t.length-1).toString(16)+" ":"\\"+t})}),n(function(){!1!==n.fancybox.defaults.hash&&(n(e).on({"onInit.fb":function(t,e){var n,i;!1!==e.group[e.currIndex].opts.hash&&(n=o(),(i=a(e))&&n.gallery&&i==n.gallery&&(e.currIndex=n.index-1))},"beforeShow.fb":function(n,o,i,s){var r;i&&!1!==i.opts.hash&&(r=a(o))&&(o.currentHash=r+(o.group.length>1?"-"+(i.index+1):""),t.location.hash!=="#"+o.currentHash&&(s&&!o.origHash&&(o.origHash=t.location.hash),o.hashTimer&&clearTimeout(o.hashTimer),o.hashTimer=setTimeout(function(){"replaceState"in t.history?(t.history[s?"pushState":"replaceState"]({},e.title,t.location.pathname+t.location.search+"#"+o.currentHash),s&&(o.hasCreatedHistory=!0)):t.location.hash=o.currentHash,o.hashTimer=null},300)))},"beforeClose.fb":function(n,o,i){i&&!1!==i.opts.hash&&(clearTimeout(o.hashTimer),o.currentHash&&o.hasCreatedHistory?t.history.back():o.currentHash&&("replaceState"in t.history?t.history.replaceState({},e.title,t.location.pathname+t.location.search+(o.origHash||"")):t.location.hash=o.origHash),o.currentHash=null)}}),n(t).on("hashchange.fb",function(){var t=o(),e=null;n.each(n(".fancybox-container").get().reverse(),function(t,o){var i=n(o).data("FancyBox");if(i&&i.currentHash)return e=i,!1}),e?e.currentHash===t.gallery+"-"+t.index||1===t.index&&e.currentHash==t.gallery||(e.currentHash=null,e.close()):""!==t.gallery&&i(t)}),setTimeout(function(){n.fancybox.getInstance()||i(o())},50))})}(window,document,jQuery),function(t,e){"use strict";var n=(new Date).getTime();e(t).on({"onInit.fb":function(t,e,o){e.$refs.stage.on("mousewheel DOMMouseScroll wheel MozMousePixelScroll",function(t){var o=e.current,i=(new Date).getTime();e.group.length<2||!1===o.opts.wheel||"auto"===o.opts.wheel&&"image"!==o.type||(t.preventDefault(),t.stopPropagation(),o.$slide.hasClass("fancybox-animated")||(t=t.originalEvent||t,i-n<250||(n=i,e[(-t.deltaY||-t.deltaX||t.wheelDelta||-t.detail)<0?"next":"previous"]())))})}})}(document,jQuery);
vendor: 99,530 bytes, lines 727-3464
727(function(factory){if (typeof define === 'function' && define.amd){define(['jquery'], factory);} else if (typeof module === 'object' && typeof module.exports === 'object'){module.exports = factory(require('jquery'));} else {factory(jQuery);}}(function(jQuery){ 728 729 730;( function( $ ) { 731 'use strict'; 732 var ts = $.tablesorter = { 733 734 version : '2.32.0', 735 736 parsers : [], 737 widgets : [], 738 defaults : { 739 740 // *** appearance 741 theme : 'default', // adds tablesorter-{theme} to the table for styling 742 widthFixed : false, // adds colgroup to fix widths of columns 743 showProcessing : false, // show an indeterminate timer icon in the header when the table is sorted or filtered. 744 745 headerTemplate : '{content}',// header layout template (HTML ok); {content} = innerHTML, {icon} = <i></i> // class from cssIcon 746 onRenderTemplate : null, // function( index, template ) { return template; }, // template is a string 747 onRenderHeader : null, // function( index ) {}, // nothing to return 748 749 // *** functionality 750 cancelSelection : true, // prevent text selection in the header 751 tabIndex : true, // add tabindex to header for keyboard accessibility 752 dateFormat : 'mmddyyyy', // other options: 'ddmmyyy' or 'yyyymmdd' 753 sortMultiSortKey : 'shiftKey', // key used to select additional columns 754 sortResetKey : 'ctrlKey', // key used to remove sorting on a column 755 usNumberFormat : true, // false for German '1.234.567,89' or French '1 234 567,89' 756 delayInit : false, // if false, the parsed table contents will not update until the first sort 757 serverSideSorting: false, // if true, server-side sorting should be performed because client-side sorting will be disabled, but the ui and events will still be used. 758 resort : true, // default setting to trigger a resort after an 'update', 'addRows', 'updateCell', etc has completed 759 760 // *** sort options 761 headers : null, // set sorter, string, empty, locked order, sortInitialOrder, filter, etc. 762 ignoreCase : true, // ignore case while sorting 763 sortForce : null, // column(s) first sorted; always applied 764 sortList : [], // Initial sort order; applied initially; updated when manually sorted 765 sortAppend : null, // column(s) sorted last; always applied 766 sortStable : false, // when sorting two rows with exactly the same content, the original sort order is maintained 767 768 sortInitialOrder : 'asc', // sort direction on first click 769 sortLocaleCompare: false, // replace equivalent character (accented characters) 770 sortReset : false, // third click on the header will reset column to default - unsorted 771 sortRestart : false, // restart sort to 'sortInitialOrder' when clicking on previously unsorted columns 772 773 emptyTo : 'bottom', // sort empty cell to bottom, top, none, zero, emptyMax, emptyMin 774 stringTo : 'max', // sort strings in numerical column as max, min, top, bottom, zero 775 duplicateSpan : true, // colspan cells in the tbody will have duplicated content in the cache for each spanned column 776 textExtraction : 'basic', // text extraction method/function - function( node, table, cellIndex ) {} 777 textAttribute : 'data-text',// data-attribute that contains alternate cell text (used in default textExtraction function) 778 textSorter : null, // choose overall or specific column sorter function( a, b, direction, table, columnIndex ) [alt: ts.sortText] 779 numberSorter : null, // choose overall numeric sorter function( a, b, direction, maxColumnValue ) 780 781 // *** widget options 782 initWidgets : true, // apply widgets on tablesorter initialization 783 widgetClass : 'widget-{name}', // table class name template to match to include a widget 784 widgets : [], // method to add widgets, e.g. widgets: ['zebra'] 785 widgetOptions : { 786 zebra : [ 'even', 'odd' ] // zebra widget alternating row class names 787 }, 788 789 // *** callbacks 790 initialized : null, // function( table ) {}, 791 792 // *** extra css class names 793 tableClass : '', 794 cssAsc : '', 795 cssDesc : '', 796 cssNone : '', 797 cssHeader : '', 798 cssHeaderRow : '', 799 cssProcessing : '', // processing icon applied to header during sort/filter 800 801 cssChildRow : 'tablesorter-childRow', // class name indiciating that a row is to be attached to its parent 802 cssInfoBlock : 'tablesorter-infoOnly', // don't sort tbody with this class name (only one class name allowed here!) 803 cssNoSort : 'tablesorter-noSort', // class name added to element inside header; clicking on it won't cause a sort 804 cssIgnoreRow : 'tablesorter-ignoreRow',// header row to ignore; cells within this row will not be added to c.$headers 805 806 cssIcon : 'tablesorter-icon', // if this class does not exist, the {icon} will not be added from the headerTemplate 807 cssIconNone : '', // class name added to the icon when there is no column sort 808 cssIconAsc : '', // class name added to the icon when the column has an ascending sort 809 cssIconDesc : '', // class name added to the icon when the column has a descending sort 810 cssIconDisabled : '', // class name added to the icon when the column has a disabled sort 811 812 // *** events 813 pointerClick : 'click', 814 pointerDown : 'mousedown', 815 pointerUp : 'mouseup', 816 817 // *** selectors 818 selectorHeaders : '> thead th, > thead td', 819 selectorSort : 'th, td', // jQuery selector of content within selectorHeaders that is clickable to trigger a sort 820 selectorRemove : '.remove-me', 821 822 // *** advanced 823 debug : false, 824 825 // *** Internal variables 826 headerList: [], 827 empties: {}, 828 strings: {}, 829 parsers: [], 830 831 // *** parser options for validator; values must be falsy! 832 globalize: 0, 833 imgAttr: 0 834 835 // removed: widgetZebra: { css: ['even', 'odd'] } 836 837 }, 838 839 // internal css classes - these will ALWAYS be added to 840 // the table and MUST only contain one class name - fixes #381 841 css : { 842 table : 'tablesorter', 843 cssHasChild: 'tablesorter-hasChildRow', 844 childRow : 'tablesorter-childRow', 845 colgroup : 'tablesorter-colgroup', 846 header : 'tablesorter-header', 847 headerRow : 'tablesorter-headerRow', 848 headerIn : 'tablesorter-header-inner', 849 icon : 'tablesorter-icon', 850 processing : 'tablesorter-processing', 851 sortAsc : 'tablesorter-headerAsc', 852 sortDesc : 'tablesorter-headerDesc', 853 sortNone : 'tablesorter-headerUnSorted' 854 }, 855 856 // labels applied to sortable headers for accessibility (aria) support 857 language : { 858 sortAsc : 'Ascending sort applied, ', 859 sortDesc : 'Descending sort applied, ', 860 sortNone : 'No sort applied, ', 861 sortDisabled : 'sorting is disabled', 862 nextAsc : 'activate to apply an ascending sort', 863 nextDesc : 'activate to apply a descending sort', 864 nextNone : 'activate to remove the sort' 865 }, 866 867 regex : { 868 templateContent : /\{content\}/g, 869 templateIcon : /\{icon\}/g, 870 templateName : /\{name\}/i, 871 spaces : /\s+/g, 872 nonWord : /\W/g, 873 formElements : /(input|select|button|textarea)/i, 874 875 // *** sort functions *** 876 // regex used in natural sort 877 // chunk/tokenize numbers & letters 878 chunk : /(^([+\-]?(?:\d*)(?:\.\d*)?(?:[eE][+\-]?\d+)?)?$|^0x[0-9a-f]+$|\d+)/gi, 879 // replace chunks @ ends 880 chunks : /(^\\0|\\0$)/, 881 hex : /^0x[0-9a-f]+$/i, 882 883 // *** formatFloat *** 884 comma : /,/g, 885 digitNonUS : /[\s|\.]/g, 886 digitNegativeTest : /^\s*\([.\d]+\)/, 887 digitNegativeReplace : /^\s*\(([.\d]+)\)/, 888 889 // *** isDigit *** 890 digitTest : /^[\-+(]?\d+[)]?$/, 891 digitReplace : /[,.'"\s]/g 892 893 }, 894 895 // digit sort, text location 896 string : { 897 max : 1, 898 min : -1, 899 emptymin : 1, 900 emptymax : -1, 901 zero : 0, 902 none : 0, 903 'null' : 0, 904 top : true, 905 bottom : false 906 }, 907 908 keyCodes : { 909 enter : 13 910 }, 911 912 // placeholder date parser data (globalize) 913 dates : {}, 914 915 // These methods can be applied on table.config instance 916 instanceMethods : {}, 917 918 919 920 setup : function( table, c ) { 921 // if no thead or tbody, or tablesorter is already present, quit 922 if ( !table || !table.tHead || table.tBodies.length === 0 || table.hasInitialized === true ) { 923 if ( ts.debug(c, 'core') ) { 924 if ( table.hasInitialized ) { 925 console.warn( 'Stopping initialization. Tablesorter has already been initialized' ); 926 } else { 927 console.error( 'Stopping initialization! No table, thead or tbody', table ); 928 } 929 } 930 return; 931 } 932 933 var tmp = '', 934 $table = $( table ), 935 meta = $.metadata; 936 // initialization flag 937 table.hasInitialized = false; 938 // table is being processed flag 939 table.isProcessing = true; 940 // make sure to store the config object 941 table.config = c; 942 // save the settings where they read 943 $.data( table, 'tablesorter', c ); 944 if ( ts.debug(c, 'core') ) { 945 console[ console.group ? 'group' : 'log' ]( 'Initializing tablesorter v' + ts.version ); 946 $.data( table, 'startoveralltimer', new Date() ); 947 } 948 949 // removing this in version 3 (only supports jQuery 1.7+) 950 c.supportsDataObject = ( function( version ) { 951 version[ 0 ] = parseInt( version[ 0 ], 10 ); 952 return ( version[ 0 ] > 1 ) || ( version[ 0 ] === 1 && parseInt( version[ 1 ], 10 ) >= 4 ); 953 })( $.fn.jquery.split( '.' ) ); 954 // ensure case insensitivity 955 c.emptyTo = c.emptyTo.toLowerCase(); 956 c.stringTo = c.stringTo.toLowerCase(); 957 c.last = { sortList : [], clickedIndex : -1 }; 958 // add table theme class only if there isn't already one there 959 if ( !/tablesorter\-/.test( $table.attr( 'class' ) ) ) { 960 tmp = ( c.theme !== '' ? ' tablesorter-' + c.theme : '' ); 961 } 962 963 // give the table a unique id, which will be used in namespace binding 964 if ( !c.namespace ) { 965 c.namespace = '.tablesorter' + Math.random().toString( 16 ).slice( 2 ); 966 } else { 967 // make sure namespace starts with a period & doesn't have weird characters 968 c.namespace = '.' + c.namespace.replace( ts.regex.nonWord, '' ); 969 } 970 971 c.table = table; 972 c.$table = $table 973 // add namespace to table to allow bindings on extra elements to target 974 // the parent table (e.g. parser-input-select) 975 .addClass( ts.css.table + ' ' + c.tableClass + tmp + ' ' + c.namespace.slice(1) ) 976 .attr( 'role', 'grid' ); 977 c.$headers = $table.find( c.selectorHeaders ); 978 979 c.$table.children().children( 'tr' ).attr( 'role', 'row' ); 980 c.$tbodies = $table.children( 'tbody:not(.' + c.cssInfoBlock + ')' ).attr({ 981 'aria-live' : 'polite', 982 'aria-relevant' : 'all' 983 }); 984 if ( c.$table.children( 'caption' ).length ) { 985 tmp = c.$table.children( 'caption' )[ 0 ]; 986 if ( !tmp.id ) { tmp.id = c.namespace.slice( 1 ) + 'caption'; } 987 c.$table.attr( 'aria-labelledby', tmp.id ); 988 } 989 c.widgetInit = {}; // keep a list of initialized widgets 990 // change textExtraction via data-attribute 991 c.textExtraction = c.$table.attr( 'data-text-extraction' ) || c.textExtraction || 'basic'; 992 // build headers 993 ts.buildHeaders( c ); 994 // fixate columns if the users supplies the fixedWidth option 995 // do this after theme has been applied 996 ts.fixColumnWidth( table ); 997 // add widgets from class name 998 ts.addWidgetFromClass( table ); 999 // add widget options before parsing (e.g. grouping widget has parser settings) 1000 ts.applyWidgetOptions( table ); 1001 // try to auto detect column type, and store in tables config 1002 ts.setupParsers( c ); 1003 // start total row count at zero 1004 c.totalRows = 0; 1005 // only validate options while debugging. See #1528 1006 if (c.debug) { 1007 ts.validateOptions( c ); 1008 } 1009 // build the cache for the tbody cells 1010 // delayInit will delay building the cache until the user starts a sort 1011 if ( !c.delayInit ) { ts.buildCache( c ); } 1012 // bind all header events and methods 1013 ts.bindEvents( table, c.$headers, true ); 1014 ts.bindMethods( c ); 1015 // get sort list from jQuery data or metadata 1016 // in jQuery < 1.4, an error occurs when calling $table.data() 1017 if ( c.supportsDataObject && typeof $table.data().sortlist !== 'undefined' ) { 1018 c.sortList = $table.data().sortlist; 1019 } else if ( meta && ( $table.metadata() && $table.metadata().sortlist ) ) { 1020 c.sortList = $table.metadata().sortlist; 1021 } 1022 // apply widget init code 1023 ts.applyWidget( table, true ); 1024 // if user has supplied a sort list to constructor 1025 if ( c.sortList.length > 0 ) { 1026 // save sortList before any sortAppend is added 1027 c.last.sortList = c.sortList; 1028 ts.sortOn( c, c.sortList, {}, !c.initWidgets ); 1029 } else { 1030 ts.setHeadersCss( c ); 1031 if ( c.initWidgets ) { 1032 // apply widget format 1033 ts.applyWidget( table, false ); 1034 } 1035 } 1036 1037 // show processesing icon 1038 if ( c.showProcessing ) { 1039 $table 1040 .unbind( 'sortBegin' + c.namespace + ' sortEnd' + c.namespace ) 1041 .bind( 'sortBegin' + c.namespace + ' sortEnd' + c.namespace, function( e ) { 1042 clearTimeout( c.timerProcessing ); 1043 ts.isProcessing( table ); 1044 if ( e.type === 'sortBegin' ) { 1045 c.timerProcessing = setTimeout( function() { 1046 ts.isProcessing( table, true ); 1047 }, 500 ); 1048 } 1049 }); 1050 } 1051 1052 // initialized 1053 table.hasInitialized = true; 1054 table.isProcessing = false; 1055 if ( ts.debug(c, 'core') ) { 1056 console.log( 'Overall initialization time:' + ts.benchmark( $.data( table, 'startoveralltimer' ) ) ); 1057 if ( ts.debug(c, 'core') && console.groupEnd ) { console.groupEnd(); } 1058 } 1059 $table.triggerHandler( 'tablesorter-initialized', table ); 1060 if ( typeof c.initialized === 'function' ) { 1061 c.initialized( table ); 1062 } 1063 }, 1064 1065 bindMethods : function( c ) { 1066 var $table = c.$table, 1067 namespace = c.namespace, 1068 events = ( 'sortReset update updateRows updateAll updateHeaders addRows updateCell updateComplete ' + 1069 'sorton appendCache updateCache applyWidgetId applyWidgets refreshWidgets destroy mouseup ' + 1070 'mouseleave ' ).split( ' ' ) 1071 .join( namespace + ' ' ); 1072 // apply easy methods that trigger bound events 1073 $table 1074 .unbind( events.replace( ts.regex.spaces, ' ' ) ) 1075 .bind( 'sortReset' + namespace, function( e, callback ) { 1076 e.stopPropagation(); 1077 // using this.config to ensure functions are getting a non-cached version of the config 1078 ts.sortReset( this.config, function( table ) { 1079 if (table.isApplyingWidgets) { 1080 // multiple triggers in a row... filterReset, then sortReset - see #1361 1081 // wait to update widgets 1082 setTimeout( function() { 1083 ts.applyWidget( table, '', callback ); 1084 }, 100 ); 1085 } else { 1086 ts.applyWidget( table, '', callback ); 1087 } 1088 }); 1089 }) 1090 .bind( 'updateAll' + namespace, function( e, resort, callback ) { 1091 e.stopPropagation(); 1092 ts.updateAll( this.config, resort, callback ); 1093 }) 1094 .bind( 'update' + namespace + ' updateRows' + namespace, function( e, resort, callback ) { 1095 e.stopPropagation(); 1096 ts.update( this.config, resort, callback ); 1097 }) 1098 .bind( 'updateHeaders' + namespace, function( e, callback ) { 1099 e.stopPropagation(); 1100 ts.updateHeaders( this.config, callback ); 1101 }) 1102 .bind( 'updateCell' + namespace, function( e, cell, resort, callback ) { 1103 e.stopPropagation(); 1104 ts.updateCell( this.config, cell, resort, callback ); 1105 }) 1106 .bind( 'addRows' + namespace, function( e, $row, resort, callback ) { 1107 e.stopPropagation(); 1108 ts.addRows( this.config, $row, resort, callback ); 1109 }) 1110 .bind( 'updateComplete' + namespace, function() { 1111 this.isUpdating = false; 1112 }) 1113 .bind( 'sorton' + namespace, function( e, list, callback, init ) { 1114 e.stopPropagation(); 1115 ts.sortOn( this.config, list, callback, init ); 1116 }) 1117 .bind( 'appendCache' + namespace, function( e, callback, init ) { 1118 e.stopPropagation(); 1119 ts.appendCache( this.config, init ); 1120 if ( $.isFunction( callback ) ) { 1121 callback( this ); 1122 } 1123 }) 1124 // $tbodies variable is used by the tbody sorting widget 1125 .bind( 'updateCache' + namespace, function( e, callback, $tbodies ) { 1126 e.stopPropagation(); 1127 ts.updateCache( this.config, callback, $tbodies ); 1128 }) 1129 .bind( 'applyWidgetId' + namespace, function( e, id ) { 1130 e.stopPropagation(); 1131 ts.applyWidgetId( this, id ); 1132 }) 1133 .bind( 'applyWidgets' + namespace, function( e, callback ) { 1134 e.stopPropagation(); 1135 // apply widgets (false = not initializing) 1136 ts.applyWidget( this, false, callback ); 1137 }) 1138 .bind( 'refreshWidgets' + namespace, function( e, all, dontapply ) { 1139 e.stopPropagation(); 1140 ts.refreshWidgets( this, all, dontapply ); 1141 }) 1142 .bind( 'removeWidget' + namespace, function( e, name, refreshing ) { 1143 e.stopPropagation(); 1144 ts.removeWidget( this, name, refreshing ); 1145 }) 1146 .bind( 'destroy' + namespace, function( e, removeClasses, callback ) { 1147 e.stopPropagation(); 1148 ts.destroy( this, removeClasses, callback ); 1149 }) 1150 .bind( 'resetToLoadState' + namespace, function( e ) { 1151 e.stopPropagation(); 1152 // remove all widgets 1153 ts.removeWidget( this, true, false ); 1154 var tmp = $.extend( true, {}, c.originalSettings ); 1155 // restore original settings; this clears out current settings, but does not clear 1156 // values saved to storage. 1157 c = $.extend( true, {}, ts.defaults, tmp ); 1158 c.originalSettings = tmp; 1159 this.hasInitialized = false; 1160 // setup the entire table again 1161 ts.setup( this, c ); 1162 }); 1163 }, 1164 1165 bindEvents : function( table, $headers, core ) { 1166 table = $( table )[ 0 ]; 1167 var tmp, 1168 c = table.config, 1169 namespace = c.namespace, 1170 downTarget = null; 1171 if ( core !== true ) { 1172 $headers.addClass( namespace.slice( 1 ) + '_extra_headers' ); 1173 tmp = ts.getClosest( $headers, 'table' ); 1174 if ( tmp.length && tmp[ 0 ].nodeName === 'TABLE' && tmp[ 0 ] !== table ) { 1175 $( tmp[ 0 ] ).addClass( namespace.slice( 1 ) + '_extra_table' ); 1176 } 1177 } 1178 tmp = ( c.pointerDown + ' ' + c.pointerUp + ' ' + c.pointerClick + ' sort keyup ' ) 1179 .replace( ts.regex.spaces, ' ' ) 1180 .split( ' ' ) 1181 .join( namespace + ' ' ); 1182 // apply event handling to headers and/or additional headers (stickyheaders, scroller, etc) 1183 $headers 1184 // http://stackoverflow.com/questions/5312849/jquery-find-self; 1185 .find( c.selectorSort ) 1186 .add( $headers.filter( c.selectorSort ) ) 1187 .unbind( tmp ) 1188 .bind( tmp, function( e, external ) { 1189 var $cell, cell, temp, 1190 $target = $( e.target ), 1191 // wrap event type in spaces, so the match doesn't trigger on inner words 1192 type = ' ' + e.type + ' '; 1193 // only recognize left clicks 1194 if ( ( ( e.which || e.button ) !== 1 && !type.match( ' ' + c.pointerClick + ' | sort | keyup ' ) ) || 1195 // allow pressing enter 1196 ( type === ' keyup ' && e.which !== ts.keyCodes.enter ) || 1197 // allow triggering a click event (e.which is undefined) & ignore physical clicks 1198 ( type.match( ' ' + c.pointerClick + ' ' ) && typeof e.which !== 'undefined' ) ) { 1199 return; 1200 } 1201 // ignore mouseup if mousedown wasn't on the same target 1202 if ( type.match( ' ' + c.pointerUp + ' ' ) && downTarget !== e.target && external !== true ) { 1203 return; 1204 } 1205 // set target on mousedown 1206 if ( type.match( ' ' + c.pointerDown + ' ' ) ) { 1207 downTarget = e.target; 1208 // preventDefault needed or jQuery v1.3.2 and older throws an 1209 // "Uncaught TypeError: handler.apply is not a function" error 1210 temp = $target.jquery.split( '.' ); 1211 if ( temp[ 0 ] === '1' && temp[ 1 ] < 4 ) { e.preventDefault(); } 1212 return; 1213 } 1214 downTarget = null; 1215 $cell = ts.getClosest( $( this ), '.' + ts.css.header ); 1216 // prevent sort being triggered on form elements 1217 if ( ts.regex.formElements.test( e.target.nodeName ) || 1218 // nosort class name, or elements within a nosort container 1219 $target.hasClass( c.cssNoSort ) || $target.parents( '.' + c.cssNoSort ).length > 0 || 1220 // disabled cell directly clicked 1221 $cell.hasClass( 'sorter-false' ) || 1222 // elements within a button 1223 $target.parents( 'button' ).length > 0 ) { 1224 return !c.cancelSelection; 1225 } 1226 if ( c.delayInit && ts.isEmptyObject( c.cache ) ) { 1227 ts.buildCache( c ); 1228 } 1229 // use column index from data-attribute or index of current row; fixes #1116 1230 c.last.clickedIndex = $cell.attr( 'data-column' ) || $cell.index(); 1231 cell = c.$headerIndexed[ c.last.clickedIndex ][0]; 1232 if ( cell && !cell.sortDisabled ) { 1233 ts.initSort( c, cell, e ); 1234 } 1235 }); 1236 if ( c.cancelSelection ) { 1237 // cancel selection 1238 $headers 1239 .attr( 'unselectable', 'on' ) 1240 .bind( 'selectstart', false ) 1241 .css({ 1242 'user-select' : 'none', 1243 'MozUserSelect' : 'none' // not needed for jQuery 1.8+ 1244 }); 1245 } 1246 }, 1247 1248 buildHeaders : function( c ) { 1249 var $temp, icon, timer, indx; 1250 c.headerList = []; 1251 c.headerContent = []; 1252 c.sortVars = []; 1253 if ( ts.debug(c, 'core') ) { 1254 timer = new Date(); 1255 } 1256 // children tr in tfoot - see issue #196 & #547 1257 // don't pass table.config to computeColumnIndex here - widgets (math) pass it to "quickly" index tbody cells 1258 c.columns = ts.computeColumnIndex( c.$table.children( 'thead, tfoot' ).children( 'tr' ) ); 1259 // add icon if cssIcon option exists 1260 icon = c.cssIcon ? 1261 '<i class="' + ( c.cssIcon === ts.css.icon ? ts.css.icon : c.cssIcon + ' ' + ts.css.icon ) + '"></i>' : 1262 ''; 1263 // redefine c.$headers here in case of an updateAll that replaces or adds an entire header cell - see #683 1264 c.$headers = $( $.map( c.$table.find( c.selectorHeaders ), function( elem, index ) { 1265 var configHeaders, header, column, template, tmp, 1266 $elem = $( elem ); 1267 // ignore cell (don't add it to c.$headers) if row has ignoreRow class 1268 if ( ts.getClosest( $elem, 'tr' ).hasClass( c.cssIgnoreRow ) ) { return; } 1269 // transfer data-column to element if not th/td - #1459 1270 if ( !/(th|td)/i.test( elem.nodeName ) ) { 1271 tmp = ts.getClosest( $elem, 'th, td' ); 1272 $elem.attr( 'data-column', tmp.attr( 'data-column' ) ); 1273 } 1274 // make sure to get header cell & not column indexed cell 1275 configHeaders = ts.getColumnData( c.table, c.headers, index, true ); 1276 // save original header content 1277 c.headerContent[ index ] = $elem.html(); 1278 // if headerTemplate is empty, don't reformat the header cell 1279 if ( c.headerTemplate !== '' && !$elem.find( '.' + ts.css.headerIn ).length ) { 1280 // set up header template 1281 template = c.headerTemplate 1282 .replace( ts.regex.templateContent, $elem.html() ) 1283 .replace( ts.regex.templateIcon, $elem.find( '.' + ts.css.icon ).length ? '' : icon ); 1284 if ( c.onRenderTemplate ) { 1285 header = c.onRenderTemplate.apply( $elem, [ index, template ] ); 1286 // only change t if something is returned 1287 if ( header && typeof header === 'string' ) { 1288 template = header; 1289 } 1290 } 1291 $elem.html( '<div class="' + ts.css.headerIn + '">' + template + '</div>' ); // faster than wrapInner 1292 } 1293 if ( c.onRenderHeader ) { 1294 c.onRenderHeader.apply( $elem, [ index, c, c.$table ] ); 1295 } 1296 column = parseInt( $elem.attr( 'data-column' ), 10 ); 1297 elem.column = column; 1298 tmp = ts.getOrder( ts.getData( $elem, configHeaders, 'sortInitialOrder' ) || c.sortInitialOrder ); 1299 // this may get updated numerous times if there are multiple rows 1300 c.sortVars[ column ] = { 1301 count : -1, // set to -1 because clicking on the header automatically adds one 1302 order : tmp ? 1303 ( c.sortReset ? [ 1, 0, 2 ] : [ 1, 0 ] ) : // desc, asc, unsorted 1304 ( c.sortReset ? [ 0, 1, 2 ] : [ 0, 1 ] ), // asc, desc, unsorted 1305 lockedOrder : false, 1306 sortedBy : '' 1307 }; 1308 tmp = ts.getData( $elem, configHeaders, 'lockedOrder' ) || false; 1309 if ( typeof tmp !== 'undefined' && tmp !== false ) { 1310 c.sortVars[ column ].lockedOrder = true; 1311 c.sortVars[ column ].order = ts.getOrder( tmp ) ? [ 1, 1 ] : [ 0, 0 ]; 1312 } 1313 // add cell to headerList 1314 c.headerList[ index ] = elem; 1315 $elem.addClass( ts.css.header + ' ' + c.cssHeader ); 1316 // add to parent in case there are multiple rows 1317 ts.getClosest( $elem, 'tr' ) 1318 .addClass( ts.css.headerRow + ' ' + c.cssHeaderRow ) 1319 .attr( 'role', 'row' ); 1320 // allow keyboard cursor to focus on element 1321 if ( c.tabIndex ) { 1322 $elem.attr( 'tabindex', 0 ); 1323 } 1324 return elem; 1325 }) ); 1326 // cache headers per column 1327 c.$headerIndexed = []; 1328 for ( indx = 0; indx < c.columns; indx++ ) { 1329 // colspan in header making a column undefined 1330 if ( ts.isEmptyObject( c.sortVars[ indx ] ) ) { 1331 c.sortVars[ indx ] = {}; 1332 } 1333 // Use c.$headers.parent() in case selectorHeaders doesn't point to the th/td 1334 $temp = c.$headers.filter( '[data-column="' + indx + '"]' ); 1335 // target sortable column cells, unless there are none, then use non-sortable cells 1336 // .last() added in jQuery 1.4; use .filter(':last') to maintain compatibility with jQuery v1.2.6 1337 c.$headerIndexed[ indx ] = $temp.length ? 1338 $temp.not( '.sorter-false' ).length ? 1339 $temp.not( '.sorter-false' ).filter( ':last' ) : 1340 $temp.filter( ':last' ) : 1341 $(); 1342 } 1343 c.$table.find( c.selectorHeaders ).attr({ 1344 scope: 'col', 1345 role : 'columnheader' 1346 }); 1347 // enable/disable sorting 1348 ts.updateHeader( c ); 1349 if ( ts.debug(c, 'core') ) { 1350 console.log( 'Built headers:' + ts.benchmark( timer ) ); 1351 console.log( c.$headers ); 1352 } 1353 }, 1354 1355 // Use it to add a set of methods to table.config which will be available for all tables. 1356 // This should be done before table initialization 1357 addInstanceMethods : function( methods ) { 1358 $.extend( ts.instanceMethods, methods ); 1359 }, 1360 1361 1362 setupParsers : function( c, $tbodies ) { 1363 var rows, list, span, max, colIndex, indx, header, configHeaders, 1364 noParser, parser, extractor, time, tbody, len, 1365 table = c.table, 1366 tbodyIndex = 0, 1367 debug = ts.debug(c, 'core'), 1368 debugOutput = {}; 1369 // update table bodies in case we start with an empty table 1370 c.$tbodies = c.$table.children( 'tbody:not(.' + c.cssInfoBlock + ')' ); 1371 tbody = typeof $tbodies === 'undefined' ? c.$tbodies : $tbodies; 1372 len = tbody.length; 1373 if ( len === 0 ) { 1374 return debug ? console.warn( 'Warning: *Empty table!* Not building a parser cache' ) : ''; 1375 } else if ( debug ) { 1376 time = new Date(); 1377 console[ console.group ? 'group' : 'log' ]( 'Detecting parsers for each column' ); 1378 } 1379 list = { 1380 extractors: [], 1381 parsers: [] 1382 }; 1383 while ( tbodyIndex < len ) { 1384 rows = tbody[ tbodyIndex ].rows; 1385 if ( rows.length ) { 1386 colIndex = 0; 1387 max = c.columns; 1388 for ( indx = 0; indx < max; indx++ ) { 1389 header = c.$headerIndexed[ colIndex ]; 1390 if ( header && header.length ) { 1391 // get column indexed table cell; adding true parameter fixes #1362 but 1392 // it would break backwards compatibility... 1393 configHeaders = ts.getColumnData( table, c.headers, colIndex ); // , true ); 1394 // get column parser/extractor 1395 extractor = ts.getParserById( ts.getData( header, configHeaders, 'extractor' ) ); 1396 parser = ts.getParserById( ts.getData( header, configHeaders, 'sorter' ) ); 1397 noParser = ts.getData( header, configHeaders, 'parser' ) === 'false'; 1398 // empty cells behaviour - keeping emptyToBottom for backwards compatibility 1399 c.empties[colIndex] = ( 1400 ts.getData( header, configHeaders, 'empty' ) || 1401 c.emptyTo || ( c.emptyToBottom ? 'bottom' : 'top' ) ).toLowerCase(); 1402 // text strings behaviour in numerical sorts 1403 c.strings[colIndex] = ( 1404 ts.getData( header, configHeaders, 'string' ) || 1405 c.stringTo || 1406 'max' ).toLowerCase(); 1407 if ( noParser ) { 1408 parser = ts.getParserById( 'no-parser' ); 1409 } 1410 if ( !extractor ) { 1411 // For now, maybe detect someday 1412 extractor = false; 1413 } 1414 if ( !parser ) { 1415 parser = ts.detectParserForColumn( c, rows, -1, colIndex ); 1416 } 1417 if ( debug ) { 1418 debugOutput[ '(' + colIndex + ') ' + header.text() ] = { 1419 parser : parser.id, 1420 extractor : extractor ? extractor.id : 'none', 1421 string : c.strings[ colIndex ], 1422 empty : c.empties[ colIndex ] 1423 }; 1424 } 1425 list.parsers[ colIndex ] = parser; 1426 list.extractors[ colIndex ] = extractor; 1427 span = header[ 0 ].colSpan - 1; 1428 if ( span > 0 ) { 1429 colIndex += span; 1430 max += span; 1431 while ( span + 1 > 0 ) { 1432 // set colspan columns to use the same parsers & extractors 1433 list.parsers[ colIndex - span ] = parser; 1434 list.extractors[ colIndex - span ] = extractor; 1435 span--; 1436 } 1437 } 1438 } 1439 colIndex++; 1440 } 1441 } 1442 tbodyIndex += ( list.parsers.length ) ? len : 1; 1443 } 1444 if ( debug ) { 1445 if ( !ts.isEmptyObject( debugOutput ) ) { 1446 console[ console.table ? 'table' : 'log' ]( debugOutput ); 1447 } else { 1448 console.warn( ' No parsers detected!' ); 1449 } 1450 console.log( 'Completed detecting parsers' + ts.benchmark( time ) ); 1451 if ( console.groupEnd ) { console.groupEnd(); } 1452 } 1453 c.parsers = list.parsers; 1454 c.extractors = list.extractors; 1455 }, 1456 1457 addParser : function( parser ) { 1458 var indx, 1459 len = ts.parsers.length, 1460 add = true; 1461 for ( indx = 0; indx < len; indx++ ) { 1462 if ( ts.parsers[ indx ].id.toLowerCase() === parser.id.toLowerCase() ) { 1463 add = false; 1464 } 1465 } 1466 if ( add ) { 1467 ts.parsers[ ts.parsers.length ] = parser; 1468 } 1469 }, 1470 1471 getParserById : function( name ) { 1472 // eslint-disable-next-line eqeqeq 1473 if ( name == 'false' ) { return false; } 1474 var indx, 1475 len = ts.parsers.length; 1476 for ( indx = 0; indx < len; indx++ ) { 1477 if ( ts.parsers[ indx ].id.toLowerCase() === ( name.toString() ).toLowerCase() ) { 1478 return ts.parsers[ indx ]; 1479 } 1480 } 1481 return false; 1482 }, 1483 1484 detectParserForColumn : function( c, rows, rowIndex, cellIndex ) { 1485 var cur, $node, row, 1486 indx = ts.parsers.length, 1487 node = false, 1488 nodeValue = '', 1489 debug = ts.debug(c, 'core'), 1490 keepLooking = true; 1491 while ( nodeValue === '' && keepLooking ) { 1492 rowIndex++; 1493 row = rows[ rowIndex ]; 1494 // stop looking after 50 empty rows 1495 if ( row && rowIndex < 50 ) { 1496 if ( row.className.indexOf( ts.cssIgnoreRow ) < 0 ) { 1497 node = rows[ rowIndex ].cells[ cellIndex ]; 1498 nodeValue = ts.getElementText( c, node, cellIndex ); 1499 $node = $( node ); 1500 if ( debug ) { 1501 console.log( 'Checking if value was empty on row ' + rowIndex + ', column: ' + 1502 cellIndex + ': "' + nodeValue + '"' ); 1503 } 1504 } 1505 } else { 1506 keepLooking = false; 1507 } 1508 } 1509 while ( --indx >= 0 ) { 1510 cur = ts.parsers[ indx ]; 1511 // ignore the default text parser because it will always be true 1512 if ( cur && cur.id !== 'text' && cur.is && cur.is( nodeValue, c.table, node, $node ) ) { 1513 return cur; 1514 } 1515 } 1516 // nothing found, return the generic parser (text) 1517 return ts.getParserById( 'text' ); 1518 }, 1519 1520 getElementText : function( c, node, cellIndex ) { 1521 if ( !node ) { return ''; } 1522 var tmp, 1523 extract = c.textExtraction || '', 1524 // node could be a jquery object 1525 // http://jsperf.com/jquery-vs-instanceof-jquery/2 1526 $node = node.jquery ? node : $( node ); 1527 if ( typeof extract === 'string' ) { 1528 // check data-attribute first when set to 'basic'; don't use node.innerText - it's really slow! 1529 // http://www.kellegous.com/j/2013/02/27/innertext-vs-textcontent/ 1530 if ( extract === 'basic' && typeof ( tmp = $node.attr( c.textAttribute ) ) !== 'undefined' ) { 1531 return $.trim( tmp ); 1532 } 1533 return $.trim( node.textContent || $node.text() ); 1534 } else { 1535 if ( typeof extract === 'function' ) { 1536 return $.trim( extract( $node[ 0 ], c.table, cellIndex ) ); 1537 } else if ( typeof ( tmp = ts.getColumnData( c.table, extract, cellIndex ) ) === 'function' ) { 1538 return $.trim( tmp( $node[ 0 ], c.table, cellIndex ) ); 1539 } 1540 } 1541 // fallback 1542 return $.trim( $node[ 0 ].textContent || $node.text() ); 1543 }, 1544 1545 // centralized function to extract/parse cell contents 1546 getParsedText : function( c, cell, colIndex, txt ) { 1547 if ( typeof txt === 'undefined' ) { 1548 txt = ts.getElementText( c, cell, colIndex ); 1549 } 1550 // if no parser, make sure to return the txt 1551 var val = '' + txt, 1552 parser = c.parsers[ colIndex ], 1553 extractor = c.extractors[ colIndex ]; 1554 if ( parser ) { 1555 // do extract before parsing, if there is one 1556 if ( extractor && typeof extractor.format === 'function' ) { 1557 txt = extractor.format( txt, c.table, cell, colIndex ); 1558 } 1559 // allow parsing if the string is empty, previously parsing would change it to zero, 1560 // in case the parser needs to extract data from the table cell attributes 1561 val = parser.id === 'no-parser' ? '' : 1562 // make sure txt is a string (extractor may have converted it) 1563 parser.format( '' + txt, c.table, cell, colIndex ); 1564 if ( c.ignoreCase && typeof val === 'string' ) { 1565 val = val.toLowerCase(); 1566 } 1567 } 1568 return val; 1569 }, 1570 1571 1572 buildCache : function( c, callback, $tbodies ) { 1573 var cache, val, txt, rowIndex, colIndex, tbodyIndex, $tbody, $row, 1574 cols, $cells, cell, cacheTime, totalRows, rowData, prevRowData, 1575 colMax, span, cacheIndex, hasParser, max, len, index, 1576 table = c.table, 1577 parsers = c.parsers, 1578 debug = ts.debug(c, 'core'); 1579 // update tbody variable 1580 c.$tbodies = c.$table.children( 'tbody:not(.' + c.cssInfoBlock + ')' ); 1581 $tbody = typeof $tbodies === 'undefined' ? c.$tbodies : $tbodies, 1582 c.cache = {}; 1583 c.totalRows = 0; 1584 // if no parsers found, return - it's an empty table. 1585 if ( !parsers ) { 1586 return debug ? console.warn( 'Warning: *Empty table!* Not building a cache' ) : ''; 1587 } 1588 if ( debug ) { 1589 cacheTime = new Date(); 1590 } 1591 // processing icon 1592 if ( c.showProcessing ) { 1593 ts.isProcessing( table, true ); 1594 } 1595 for ( tbodyIndex = 0; tbodyIndex < $tbody.length; tbodyIndex++ ) { 1596 colMax = []; // column max value per tbody 1597 cache = c.cache[ tbodyIndex ] = { 1598 normalized: [] // array of normalized row data; last entry contains 'rowData' above 1599 // colMax: # // added at the end 1600 }; 1601 1602 totalRows = ( $tbody[ tbodyIndex ] && $tbody[ tbodyIndex ].rows.length ) || 0; 1603 for ( rowIndex = 0; rowIndex < totalRows; ++rowIndex ) { 1604 rowData = { 1605 // order: original row order # 1606 // $row : jQuery Object[] 1607 child: [], // child row text (filter widget) 1608 raw: [] // original row text 1609 }; 1610 1611 $row = $( $tbody[ tbodyIndex ].rows[ rowIndex ] ); 1612 cols = []; 1613 // ignore "remove-me" rows 1614 if ( $row.hasClass( c.selectorRemove.slice(1) ) ) { 1615 continue; 1616 } 1617 // if this is a child row, add it to the last row's children and continue to the next row 1618 // ignore child row class, if it is the first row 1619 if ( $row.hasClass( c.cssChildRow ) && rowIndex !== 0 ) { 1620 len = cache.normalized.length - 1; 1621 prevRowData = cache.normalized[ len ][ c.columns ]; 1622 prevRowData.$row = prevRowData.$row.add( $row ); 1623 // add 'hasChild' class name to parent row 1624 if ( !$row.prev().hasClass( c.cssChildRow ) ) { 1625 $row.prev().addClass( ts.css.cssHasChild ); 1626 } 1627 // save child row content (un-parsed!) 1628 $cells = $row.children( 'th, td' ); 1629 len = prevRowData.child.length; 1630 prevRowData.child[ len ] = []; 1631 // child row content does not account for colspans/rowspans; so indexing may be off 1632 cacheIndex = 0; 1633 max = c.columns; 1634 for ( colIndex = 0; colIndex < max; colIndex++ ) { 1635 cell = $cells[ colIndex ]; 1636 if ( cell ) { 1637 prevRowData.child[ len ][ colIndex ] = ts.getParsedText( c, cell, colIndex ); 1638 span = $cells[ colIndex ].colSpan - 1; 1639 if ( span > 0 ) { 1640 cacheIndex += span; 1641 max += span; 1642 } 1643 } 1644 cacheIndex++; 1645 } 1646 // go to the next for loop 1647 continue; 1648 } 1649 rowData.$row = $row; 1650 rowData.order = rowIndex; // add original row position to rowCache 1651 cacheIndex = 0; 1652 max = c.columns; 1653 for ( colIndex = 0; colIndex < max; ++colIndex ) { 1654 cell = $row[ 0 ].cells[ colIndex ]; 1655 if ( cell && cacheIndex < c.columns ) { 1656 hasParser = typeof parsers[ cacheIndex ] !== 'undefined'; 1657 if ( !hasParser && debug ) { 1658 console.warn( 'No parser found for row: ' + rowIndex + ', column: ' + colIndex + 1659 '; cell containing: "' + $(cell).text() + '"; does it have a header?' ); 1660 } 1661 val = ts.getElementText( c, cell, cacheIndex ); 1662 rowData.raw[ cacheIndex ] = val; // save original row text 1663 // save raw column text even if there is no parser set 1664 txt = ts.getParsedText( c, cell, cacheIndex, val ); 1665 cols[ cacheIndex ] = txt; 1666 if ( hasParser && ( parsers[ cacheIndex ].type || '' ).toLowerCase() === 'numeric' ) { 1667 // determine column max value (ignore sign) 1668 colMax[ cacheIndex ] = Math.max( Math.abs( txt ) || 0, colMax[ cacheIndex ] || 0 ); 1669 } 1670 // allow colSpan in tbody 1671 span = cell.colSpan - 1; 1672 if ( span > 0 ) { 1673 index = 0; 1674 while ( index <= span ) { 1675 // duplicate text (or not) to spanned columns 1676 // instead of setting duplicate span to empty string, use textExtraction to try to get a value 1677 // see http://stackoverflow.com/q/36449711/145346 1678 txt = c.duplicateSpan || index === 0 ? 1679 txt : 1680 typeof c.textExtraction !== 'string' ? 1681 ts.getElementText( c, cell, cacheIndex + index ) || '' : 1682 ''; 1683 rowData.raw[ cacheIndex + index ] = txt; 1684 cols[ cacheIndex + index ] = txt; 1685 index++; 1686 } 1687 cacheIndex += span; 1688 max += span; 1689 } 1690 } 1691 cacheIndex++; 1692 } 1693 // ensure rowData is always in the same location (after the last column) 1694 cols[ c.columns ] = rowData; 1695 cache.normalized[ cache.normalized.length ] = cols; 1696 } 1697 cache.colMax = colMax; 1698 // total up rows, not including child rows 1699 c.totalRows += cache.normalized.length; 1700 1701 } 1702 if ( c.showProcessing ) { 1703 ts.isProcessing( table ); // remove processing icon 1704 } 1705 if ( debug ) { 1706 len = Math.min( 5, c.cache[ 0 ].normalized.length ); 1707 console[ console.group ? 'group' : 'log' ]( 'Building cache for ' + c.totalRows + 1708 ' rows (showing ' + len + ' rows in log) and ' + c.columns + ' columns' + 1709 ts.benchmark( cacheTime ) ); 1710 val = {}; 1711 for ( colIndex = 0; colIndex < c.columns; colIndex++ ) { 1712 for ( cacheIndex = 0; cacheIndex < len; cacheIndex++ ) { 1713 if ( !val[ 'row: ' + cacheIndex ] ) { 1714 val[ 'row: ' + cacheIndex ] = {}; 1715 } 1716 val[ 'row: ' + cacheIndex ][ c.$headerIndexed[ colIndex ].text() ] = 1717 c.cache[ 0 ].normalized[ cacheIndex ][ colIndex ]; 1718 } 1719 } 1720 console[ console.table ? 'table' : 'log' ]( val ); 1721 if ( console.groupEnd ) { console.groupEnd(); } 1722 } 1723 if ( $.isFunction( callback ) ) { 1724 callback( table ); 1725 } 1726 }, 1727 1728 getColumnText : function( table, column, callback, rowFilter ) { 1729 table = $( table )[0]; 1730 var tbodyIndex, rowIndex, cache, row, tbodyLen, rowLen, raw, parsed, $cell, result, 1731 hasCallback = typeof callback === 'function', 1732 allColumns = column === 'all', 1733 data = { raw : [], parsed: [], $cell: [] }, 1734 c = table.config; 1735 if ( ts.isEmptyObject( c ) ) { 1736 if ( ts.debug(c, 'core') ) { 1737 console.warn( 'No cache found - aborting getColumnText function!' ); 1738 } 1739 } else { 1740 tbodyLen = c.$tbodies.length; 1741 for ( tbodyIndex = 0; tbodyIndex < tbodyLen; tbodyIndex++ ) { 1742 cache = c.cache[ tbodyIndex ].normalized; 1743 rowLen = cache.length; 1744 for ( rowIndex = 0; rowIndex < rowLen; rowIndex++ ) { 1745 row = cache[ rowIndex ]; 1746 if ( rowFilter && !row[ c.columns ].$row.is( rowFilter ) ) { 1747 continue; 1748 } 1749 result = true; 1750 parsed = ( allColumns ) ? row.slice( 0, c.columns ) : row[ column ]; 1751 row = row[ c.columns ]; 1752 raw = ( allColumns ) ? row.raw : row.raw[ column ]; 1753 $cell = ( allColumns ) ? row.$row.children() : row.$row.children().eq( column ); 1754 if ( hasCallback ) { 1755 result = callback({ 1756 tbodyIndex : tbodyIndex, 1757 rowIndex : rowIndex, 1758 parsed : parsed, 1759 raw : raw, 1760 $row : row.$row, 1761 $cell : $cell 1762 }); 1763 } 1764 if ( result !== false ) { 1765 data.parsed[ data.parsed.length ] = parsed; 1766 data.raw[ data.raw.length ] = raw; 1767 data.$cell[ data.$cell.length ] = $cell; 1768 } 1769 } 1770 } 1771 // return everything 1772 return data; 1773 } 1774 }, 1775 1776 1777 setHeadersCss : function( c ) { 1778 var indx, column, 1779 list = c.sortList, 1780 len = list.length, 1781 none = ts.css.sortNone + ' ' + c.cssNone, 1782 css = [ ts.css.sortAsc + ' ' + c.cssAsc, ts.css.sortDesc + ' ' + c.cssDesc ], 1783 cssIcon = [ c.cssIconAsc, c.cssIconDesc, c.cssIconNone ], 1784 aria = [ 'ascending', 'descending' ], 1785 updateColumnSort = function($el, index) { 1786 $el 1787 .removeClass( none ) 1788 .addClass( css[ index ] ) 1789 .attr( 'aria-sort', aria[ index ] ) 1790 .find( '.' + ts.css.icon ) 1791 .removeClass( cssIcon[ 2 ] ) 1792 .addClass( cssIcon[ index ] ); 1793 }, 1794 // find the footer 1795 $extras = c.$table 1796 .find( 'tfoot tr' ) 1797 .children( 'td, th' ) 1798 .add( $( c.namespace + '_extra_headers' ) ) 1799 .removeClass( css.join( ' ' ) ), 1800 // remove all header information 1801 $sorted = c.$headers 1802 .add( $( 'thead ' + c.namespace + '_extra_headers' ) ) 1803 .removeClass( css.join( ' ' ) ) 1804 .addClass( none ) 1805 .attr( 'aria-sort', 'none' ) 1806 .find( '.' + ts.css.icon ) 1807 .removeClass( cssIcon.join( ' ' ) ) 1808 .end(); 1809 // add css none to all sortable headers 1810 $sorted 1811 .not( '.sorter-false' ) 1812 .find( '.' + ts.css.icon ) 1813 .addClass( cssIcon[ 2 ] ); 1814 // add disabled css icon class 1815 if ( c.cssIconDisabled ) { 1816 $sorted 1817 .filter( '.sorter-false' ) 1818 .find( '.' + ts.css.icon ) 1819 .addClass( c.cssIconDisabled ); 1820 } 1821 for ( indx = 0; indx < len; indx++ ) { 1822 // direction = 2 means reset! 1823 if ( list[ indx ][ 1 ] !== 2 ) { 1824 // multicolumn sorting updating - see #1005 1825 // .not(function() {}) needs jQuery 1.4 1826 // filter(function(i, el) {}) <- el is undefined in jQuery v1.2.6 1827 $sorted = c.$headers.filter( function( i ) { 1828 // only include headers that are in the sortList (this includes colspans) 1829 var include = true, 1830 $el = c.$headers.eq( i ), 1831 col = parseInt( $el.attr( 'data-column' ), 10 ), 1832 end = col + ts.getClosest( $el, 'th, td' )[0].colSpan; 1833 for ( ; col < end; col++ ) { 1834 include = include ? include || ts.isValueInArray( col, c.sortList ) > -1 : false; 1835 } 1836 return include; 1837 }); 1838 1839 // choose the :last in case there are nested columns 1840 $sorted = $sorted 1841 .not( '.sorter-false' ) 1842 .filter( '[data-column="' + list[ indx ][ 0 ] + '"]' + ( len === 1 ? ':last' : '' ) ); 1843 if ( $sorted.length ) { 1844 for ( column = 0; column < $sorted.length; column++ ) { 1845 if ( !$sorted[ column ].sortDisabled ) { 1846 updateColumnSort( $sorted.eq( column ), list[ indx ][ 1 ] ); 1847 } 1848 } 1849 } 1850 // add sorted class to footer & extra headers, if they exist 1851 if ( $extras.length ) { 1852 updateColumnSort( $extras.filter( '[data-column="' + list[ indx ][ 0 ] + '"]' ), list[ indx ][ 1 ] ); 1853 } 1854 } 1855 } 1856 // add verbose aria labels 1857 len = c.$headers.length; 1858 for ( indx = 0; indx < len; indx++ ) { 1859 ts.setColumnAriaLabel( c, c.$headers.eq( indx ) ); 1860 } 1861 }, 1862 1863 getClosest : function( $el, selector ) { 1864 // jQuery v1.2.6 doesn't have closest() 1865 if ( $.fn.closest ) { 1866 return $el.closest( selector ); 1867 } 1868 return $el.is( selector ) ? 1869 $el : 1870 $el.parents( selector ).filter( ':first' ); 1871 }, 1872 1873 // nextSort (optional), lets you disable next sort text 1874 setColumnAriaLabel : function( c, $header, nextSort ) { 1875 if ( $header.length ) { 1876 var column = parseInt( $header.attr( 'data-column' ), 10 ), 1877 vars = c.sortVars[ column ], 1878 tmp = $header.hasClass( ts.css.sortAsc ) ? 1879 'sortAsc' : 1880 $header.hasClass( ts.css.sortDesc ) ? 'sortDesc' : 'sortNone', 1881 txt = $.trim( $header.text() ) + ': ' + ts.language[ tmp ]; 1882 if ( $header.hasClass( 'sorter-false' ) || nextSort === false ) { 1883 txt += ts.language.sortDisabled; 1884 } else { 1885 tmp = ( vars.count + 1 ) % vars.order.length; 1886 nextSort = vars.order[ tmp ]; 1887 // if nextSort 1888 txt += ts.language[ nextSort === 0 ? 'nextAsc' : nextSort === 1 ? 'nextDesc' : 'nextNone' ]; 1889 } 1890 $header.attr( 'aria-label', txt ); 1891 if (vars.sortedBy) { 1892 $header.attr( 'data-sortedBy', vars.sortedBy ); 1893 } else { 1894 $header.removeAttr('data-sortedBy'); 1895 } 1896 } 1897 }, 1898 1899 updateHeader : function( c ) { 1900 var index, isDisabled, $header, col, 1901 table = c.table, 1902 len = c.$headers.length; 1903 for ( index = 0; index < len; index++ ) { 1904 $header = c.$headers.eq( index ); 1905 col = ts.getColumnData( table, c.headers, index, true ); 1906 // add 'sorter-false' class if 'parser-false' is set 1907 isDisabled = ts.getData( $header, col, 'sorter' ) === 'false' || ts.getData( $header, col, 'parser' ) === 'false'; 1908 ts.setColumnSort( c, $header, isDisabled ); 1909 } 1910 }, 1911 1912 setColumnSort : function( c, $header, isDisabled ) { 1913 var id = c.table.id; 1914 $header[ 0 ].sortDisabled = isDisabled; 1915 $header[ isDisabled ? 'addClass' : 'removeClass' ]( 'sorter-false' ) 1916 .attr( 'aria-disabled', '' + isDisabled ); 1917 // disable tab index on disabled cells 1918 if ( c.tabIndex ) { 1919 if ( isDisabled ) { 1920 $header.removeAttr( 'tabindex' ); 1921 } else { 1922 $header.attr( 'tabindex', '0' ); 1923 } 1924 } 1925 // aria-controls - requires table ID 1926 if ( id ) { 1927 if ( isDisabled ) { 1928 $header.removeAttr( 'aria-controls' ); 1929 } else { 1930 $header.attr( 'aria-controls', id ); 1931 } 1932 } 1933 }, 1934 1935 updateHeaderSortCount : function( c, list ) { 1936 var col, dir, group, indx, primary, temp, val, order, 1937 sortList = list || c.sortList, 1938 len = sortList.length; 1939 c.sortList = []; 1940 for ( indx = 0; indx < len; indx++ ) { 1941 val = sortList[ indx ]; 1942 // ensure all sortList values are numeric - fixes #127 1943 col = parseInt( val[ 0 ], 10 ); 1944 // prevents error if sorton array is wrong 1945 if ( col < c.columns ) { 1946 1947 // set order if not already defined - due to colspan header without associated header cell 1948 // adding this check prevents a javascript error 1949 if ( !c.sortVars[ col ].order ) { 1950 if ( ts.getOrder( c.sortInitialOrder ) ) { 1951 order = c.sortReset ? [ 1, 0, 2 ] : [ 1, 0 ]; 1952 } else { 1953 order = c.sortReset ? [ 0, 1, 2 ] : [ 0, 1 ]; 1954 } 1955 c.sortVars[ col ].order = order; 1956 c.sortVars[ col ].count = 0; 1957 } 1958 1959 order = c.sortVars[ col ].order; 1960 dir = ( '' + val[ 1 ] ).match( /^(1|d|s|o|n)/ ); 1961 dir = dir ? dir[ 0 ] : ''; 1962 // 0/(a)sc (default), 1/(d)esc, (s)ame, (o)pposite, (n)ext 1963 switch ( dir ) { 1964 case '1' : case 'd' : // descending 1965 dir = 1; 1966 break; 1967 case 's' : // same direction (as primary column) 1968 // if primary sort is set to 's', make it ascending 1969 dir = primary || 0; 1970 break; 1971 case 'o' : 1972 temp = order[ ( primary || 0 ) % order.length ]; 1973 // opposite of primary column; but resets if primary resets 1974 dir = temp === 0 ? 1 : temp === 1 ? 0 : 2; 1975 break; 1976 case 'n' : 1977 dir = order[ ( ++c.sortVars[ col ].count ) % order.length ]; 1978 break; 1979 default : // ascending 1980 dir = 0; 1981 break; 1982 } 1983 primary = indx === 0 ? dir : primary; 1984 group = [ col, parseInt( dir, 10 ) || 0 ]; 1985 c.sortList[ c.sortList.length ] = group; 1986 dir = $.inArray( group[ 1 ], order ); // fixes issue #167 1987 c.sortVars[ col ].count = dir >= 0 ? dir : group[ 1 ] % order.length; 1988 } 1989 } 1990 }, 1991 1992 updateAll : function( c, resort, callback ) { 1993 var table = c.table; 1994 table.isUpdating = true; 1995 ts.refreshWidgets( table, true, true ); 1996 ts.buildHeaders( c ); 1997 ts.bindEvents( table, c.$headers, true ); 1998 ts.bindMethods( c ); 1999 ts.commonUpdate( c, resort, callback ); 2000 }, 2001 2002 update : function( c, resort, callback ) { 2003 var table = c.table; 2004 table.isUpdating = true; 2005 // update sorting (if enabled/disabled) 2006 ts.updateHeader( c ); 2007 ts.commonUpdate( c, resort, callback ); 2008 }, 2009 2010 // simple header update - see #989 2011 updateHeaders : function( c, callback ) { 2012 c.table.isUpdating = true; 2013 ts.buildHeaders( c ); 2014 ts.bindEvents( c.table, c.$headers, true ); 2015 ts.resortComplete( c, callback ); 2016 }, 2017 2018 updateCell : function( c, cell, resort, callback ) { 2019 // updateCell for child rows is a mess - we'll ignore them for now 2020 // eventually I'll break out the "update" row cache code to make everything consistent 2021 if ( $( cell ).closest( 'tr' ).hasClass( c.cssChildRow ) ) { 2022 console.warn('Tablesorter Warning! "updateCell" for child row content has been disabled, use "update" instead'); 2023 return; 2024 } 2025 if ( ts.isEmptyObject( c.cache ) ) { 2026 // empty table, do an update instead - fixes #1099 2027 ts.updateHeader( c ); 2028 ts.commonUpdate( c, resort, callback ); 2029 return; 2030 } 2031 c.table.isUpdating = true; 2032 c.$table.find( c.selectorRemove ).remove(); 2033 // get position from the dom 2034 var tmp, indx, row, icell, cache, len, 2035 $tbodies = c.$tbodies, 2036 $cell = $( cell ), 2037 // update cache - format: function( s, table, cell, cellIndex ) 2038 // no closest in jQuery v1.2.6 2039 tbodyIndex = $tbodies.index( ts.getClosest( $cell, 'tbody' ) ), 2040 tbcache = c.cache[ tbodyIndex ], 2041 $row = ts.getClosest( $cell, 'tr' ); 2042 cell = $cell[ 0 ]; // in case cell is a jQuery object 2043 // tbody may not exist if update is initialized while tbody is removed for processing 2044 if ( $tbodies.length && tbodyIndex >= 0 ) { 2045 row = $tbodies.eq( tbodyIndex ).find( 'tr' ).not( '.' + c.cssChildRow ).index( $row ); 2046 cache = tbcache.normalized[ row ]; 2047 len = $row[ 0 ].cells.length; 2048 if ( len !== c.columns ) { 2049 // colspan in here somewhere! 2050 icell = 0; 2051 tmp = false; 2052 for ( indx = 0; indx < len; indx++ ) { 2053 if ( !tmp && $row[ 0 ].cells[ indx ] !== cell ) { 2054 icell += $row[ 0 ].cells[ indx ].colSpan; 2055 } else { 2056 tmp = true; 2057 } 2058 } 2059 } else { 2060 icell = $cell.index(); 2061 } 2062 tmp = ts.getElementText( c, cell, icell ); // raw 2063 cache[ c.columns ].raw[ icell ] = tmp; 2064 tmp = ts.getParsedText( c, cell, icell, tmp ); 2065 cache[ icell ] = tmp; // parsed 2066 if ( ( c.parsers[ icell ].type || '' ).toLowerCase() === 'numeric' ) { 2067 // update column max value (ignore sign) 2068 tbcache.colMax[ icell ] = Math.max( Math.abs( tmp ) || 0, tbcache.colMax[ icell ] || 0 ); 2069 } 2070 tmp = resort !== 'undefined' ? resort : c.resort; 2071 if ( tmp !== false ) { 2072 // widgets will be reapplied 2073 ts.checkResort( c, tmp, callback ); 2074 } else { 2075 // don't reapply widgets is resort is false, just in case it causes 2076 // problems with element focus 2077 ts.resortComplete( c, callback ); 2078 } 2079 } else { 2080 if ( ts.debug(c, 'core') ) { 2081 console.error( 'updateCell aborted, tbody missing or not within the indicated table' ); 2082 } 2083 c.table.isUpdating = false; 2084 } 2085 }, 2086 2087 addRows : function( c, $row, resort, callback ) { 2088 var txt, val, tbodyIndex, rowIndex, rows, cellIndex, len, order, 2089 cacheIndex, rowData, cells, cell, span, 2090 // allow passing a row string if only one non-info tbody exists in the table 2091 valid = typeof $row === 'string' && c.$tbodies.length === 1 && /<tr/.test( $row || '' ), 2092 table = c.table; 2093 if ( valid ) { 2094 $row = $( $row ); 2095 c.$tbodies.append( $row ); 2096 } else if ( 2097 !$row || 2098 // row is a jQuery object? 2099 !( $row instanceof $ ) || 2100 // row contained in the table? 2101 ( ts.getClosest( $row, 'table' )[ 0 ] !== c.table ) 2102 ) { 2103 if ( ts.debug(c, 'core') ) { 2104 console.error( 'addRows method requires (1) a jQuery selector reference to rows that have already ' + 2105 'been added to the table, or (2) row HTML string to be added to a table with only one tbody' ); 2106 } 2107 return false; 2108 } 2109 table.isUpdating = true; 2110 if ( ts.isEmptyObject( c.cache ) ) { 2111 // empty table, do an update instead - fixes #450 2112 ts.updateHeader( c ); 2113 ts.commonUpdate( c, resort, callback ); 2114 } else { 2115 rows = $row.filter( 'tr' ).attr( 'role', 'row' ).length; 2116 tbodyIndex = c.$tbodies.index( $row.parents( 'tbody' ).filter( ':first' ) ); 2117 // fixes adding rows to an empty table - see issue #179 2118 if ( !( c.parsers && c.parsers.length ) ) { 2119 ts.setupParsers( c ); 2120 } 2121 // add each row 2122 for ( rowIndex = 0; rowIndex < rows; rowIndex++ ) { 2123 cacheIndex = 0; 2124 len = $row[ rowIndex ].cells.length; 2125 order = c.cache[ tbodyIndex ].normalized.length; 2126 cells = []; 2127 rowData = { 2128 child : [], 2129 raw : [], 2130 $row : $row.eq( rowIndex ), 2131 order : order 2132 }; 2133 // add each cell 2134 for ( cellIndex = 0; cellIndex < len; cellIndex++ ) { 2135 cell = $row[ rowIndex ].cells[ cellIndex ]; 2136 txt = ts.getElementText( c, cell, cacheIndex ); 2137 rowData.raw[ cacheIndex ] = txt; 2138 val = ts.getParsedText( c, cell, cacheIndex, txt ); 2139 cells[ cacheIndex ] = val; 2140 if ( ( c.parsers[ cacheIndex ].type || '' ).toLowerCase() === 'numeric' ) { 2141 // update column max value (ignore sign) 2142 c.cache[ tbodyIndex ].colMax[ cacheIndex ] = 2143 Math.max( Math.abs( val ) || 0, c.cache[ tbodyIndex ].colMax[ cacheIndex ] || 0 ); 2144 } 2145 span = cell.colSpan - 1; 2146 if ( span > 0 ) { 2147 cacheIndex += span; 2148 } 2149 cacheIndex++; 2150 } 2151 // add the row data to the end 2152 cells[ c.columns ] = rowData; 2153 // update cache 2154 c.cache[ tbodyIndex ].normalized[ order ] = cells; 2155 } 2156 // resort using current settings 2157 ts.checkResort( c, resort, callback ); 2158 } 2159 }, 2160 2161 updateCache : function( c, callback, $tbodies ) { 2162 // rebuild parsers 2163 if ( !( c.parsers && c.parsers.length ) ) { 2164 ts.setupParsers( c, $tbodies ); 2165 } 2166 // rebuild the cache map 2167 ts.buildCache( c, callback, $tbodies ); 2168 }, 2169 2170 // init flag (true) used by pager plugin to prevent widget application 2171 // renamed from appendToTable 2172 appendCache : function( c, init ) { 2173 var parsed, totalRows, $tbody, $curTbody, rowIndex, tbodyIndex, appendTime, 2174 table = c.table, 2175 $tbodies = c.$tbodies, 2176 rows = [], 2177 cache = c.cache; 2178 // empty table - fixes #206/#346 2179 if ( ts.isEmptyObject( cache ) ) { 2180 // run pager appender in case the table was just emptied 2181 return c.appender ? c.appender( table, rows ) : 2182 table.isUpdating ? c.$table.triggerHandler( 'updateComplete', table ) : ''; // Fixes #532 2183 } 2184 if ( ts.debug(c, 'core') ) { 2185 appendTime = new Date(); 2186 } 2187 for ( tbodyIndex = 0; tbodyIndex < $tbodies.length; tbodyIndex++ ) { 2188 $tbody = $tbodies.eq( tbodyIndex ); 2189 if ( $tbody.length ) { 2190 // detach tbody for manipulation 2191 $curTbody = ts.processTbody( table, $tbody, true ); 2192 parsed = cache[ tbodyIndex ].normalized; 2193 totalRows = parsed.length; 2194 for ( rowIndex = 0; rowIndex < totalRows; rowIndex++ ) { 2195 rows[rows.length] = parsed[ rowIndex ][ c.columns ].$row; 2196 // removeRows used by the pager plugin; don't render if using ajax - fixes #411 2197 if ( !c.appender || ( c.pager && !c.pager.removeRows && !c.pager.ajax ) ) { 2198 $curTbody.append( parsed[ rowIndex ][ c.columns ].$row ); 2199 } 2200 } 2201 // restore tbody 2202 ts.processTbody( table, $curTbody, false ); 2203 } 2204 } 2205 if ( c.appender ) { 2206 c.appender( table, rows ); 2207 } 2208 if ( ts.debug(c, 'core') ) { 2209 console.log( 'Rebuilt table' + ts.benchmark( appendTime ) ); 2210 } 2211 // apply table widgets; but not before ajax completes 2212 if ( !init && !c.appender ) { 2213 ts.applyWidget( table ); 2214 } 2215 if ( table.isUpdating ) { 2216 c.$table.triggerHandler( 'updateComplete', table ); 2217 } 2218 }, 2219 2220 commonUpdate : function( c, resort, callback ) { 2221 // remove rows/elements before update 2222 c.$table.find( c.selectorRemove ).remove(); 2223 // rebuild parsers 2224 ts.setupParsers( c ); 2225 // rebuild the cache map 2226 ts.buildCache( c ); 2227 ts.checkResort( c, resort, callback ); 2228 }, 2229 2230 2231 initSort : function( c, cell, event ) { 2232 if ( c.table.isUpdating ) { 2233 // let any updates complete before initializing a sort 2234 return setTimeout( function() { 2235 ts.initSort( c, cell, event ); 2236 }, 50 ); 2237 } 2238 2239 var arry, indx, headerIndx, dir, temp, tmp, $header, 2240 notMultiSort = !event[ c.sortMultiSortKey ], 2241 table = c.table, 2242 len = c.$headers.length, 2243 th = ts.getClosest( $( cell ), 'th, td' ), 2244 col = parseInt( th.attr( 'data-column' ), 10 ), 2245 sortedBy = event.type === 'mouseup' ? 'user' : event.type, 2246 order = c.sortVars[ col ].order; 2247 th = th[0]; 2248 // Only call sortStart if sorting is enabled 2249 c.$table.triggerHandler( 'sortStart', table ); 2250 // get current column sort order 2251 tmp = ( c.sortVars[ col ].count + 1 ) % order.length; 2252 c.sortVars[ col ].count = event[ c.sortResetKey ] ? 2 : tmp; 2253 // reset all sorts on non-current column - issue #30 2254 if ( c.sortRestart ) { 2255 for ( headerIndx = 0; headerIndx < len; headerIndx++ ) { 2256 $header = c.$headers.eq( headerIndx ); 2257 tmp = parseInt( $header.attr( 'data-column' ), 10 ); 2258 // only reset counts on columns that weren't just clicked on and if not included in a multisort 2259 if ( col !== tmp && ( notMultiSort || $header.hasClass( ts.css.sortNone ) ) ) { 2260 c.sortVars[ tmp ].count = -1; 2261 } 2262 } 2263 } 2264 // user only wants to sort on one column 2265 if ( notMultiSort ) { 2266 $.each( c.sortVars, function( i ) { 2267 c.sortVars[ i ].sortedBy = ''; 2268 }); 2269 // flush the sort list 2270 c.sortList = []; 2271 c.last.sortList = []; 2272 if ( c.sortForce !== null ) { 2273 arry = c.sortForce; 2274 for ( indx = 0; indx < arry.length; indx++ ) { 2275 if ( arry[ indx ][ 0 ] !== col ) { 2276 c.sortList[ c.sortList.length ] = arry[ indx ]; 2277 c.sortVars[ arry[ indx ][ 0 ] ].sortedBy = 'sortForce'; 2278 } 2279 } 2280 } 2281 // add column to sort list 2282 dir = order[ c.sortVars[ col ].count ]; 2283 if ( dir < 2 ) { 2284 c.sortList[ c.sortList.length ] = [ col, dir ]; 2285 c.sortVars[ col ].sortedBy = sortedBy; 2286 // add other columns if header spans across multiple 2287 if ( th.colSpan > 1 ) { 2288 for ( indx = 1; indx < th.colSpan; indx++ ) { 2289 c.sortList[ c.sortList.length ] = [ col + indx, dir ]; 2290 // update count on columns in colSpan 2291 c.sortVars[ col + indx ].count = $.inArray( dir, order ); 2292 c.sortVars[ col + indx ].sortedBy = sortedBy; 2293 } 2294 } 2295 } 2296 // multi column sorting 2297 } else { 2298 // get rid of the sortAppend before adding more - fixes issue #115 & #523 2299 c.sortList = $.extend( [], c.last.sortList ); 2300 2301 // the user has clicked on an already sorted column 2302 if ( ts.isValueInArray( col, c.sortList ) >= 0 ) { 2303 // reverse the sorting direction 2304 c.sortVars[ col ].sortedBy = sortedBy; 2305 for ( indx = 0; indx < c.sortList.length; indx++ ) { 2306 tmp = c.sortList[ indx ]; 2307 if ( tmp[ 0 ] === col ) { 2308 // order.count seems to be incorrect when compared to cell.count 2309 tmp[ 1 ] = order[ c.sortVars[ col ].count ]; 2310 if ( tmp[1] === 2 ) { 2311 c.sortList.splice( indx, 1 ); 2312 c.sortVars[ col ].count = -1; 2313 } 2314 } 2315 } 2316 } else { 2317 // add column to sort list array 2318 dir = order[ c.sortVars[ col ].count ]; 2319 c.sortVars[ col ].sortedBy = sortedBy; 2320 if ( dir < 2 ) { 2321 c.sortList[ c.sortList.length ] = [ col, dir ]; 2322 // add other columns if header spans across multiple 2323 if ( th.colSpan > 1 ) { 2324 for ( indx = 1; indx < th.colSpan; indx++ ) { 2325 c.sortList[ c.sortList.length ] = [ col + indx, dir ]; 2326 // update count on columns in colSpan 2327 c.sortVars[ col + indx ].count = $.inArray( dir, order ); 2328 c.sortVars[ col + indx ].sortedBy = sortedBy; 2329 } 2330 } 2331 } 2332 } 2333 } 2334 // save sort before applying sortAppend 2335 c.last.sortList = $.extend( [], c.sortList ); 2336 if ( c.sortList.length && c.sortAppend ) { 2337 arry = $.isArray( c.sortAppend ) ? c.sortAppend : c.sortAppend[ c.sortList[ 0 ][ 0 ] ]; 2338 if ( !ts.isEmptyObject( arry ) ) { 2339 for ( indx = 0; indx < arry.length; indx++ ) { 2340 if ( arry[ indx ][ 0 ] !== col && ts.isValueInArray( arry[ indx ][ 0 ], c.sortList ) < 0 ) { 2341 dir = arry[ indx ][ 1 ]; 2342 temp = ( '' + dir ).match( /^(a|d|s|o|n)/ ); 2343 if ( temp ) { 2344 tmp = c.sortList[ 0 ][ 1 ]; 2345 switch ( temp[ 0 ] ) { 2346 case 'd' : 2347 dir = 1; 2348 break; 2349 case 's' : 2350 dir = tmp; 2351 break; 2352 case 'o' : 2353 dir = tmp === 0 ? 1 : 0; 2354 break; 2355 case 'n' : 2356 dir = ( tmp + 1 ) % order.length; 2357 break; 2358 default: 2359 dir = 0; 2360 break; 2361 } 2362 } 2363 c.sortList[ c.sortList.length ] = [ arry[ indx ][ 0 ], dir ]; 2364 c.sortVars[ arry[ indx ][ 0 ] ].sortedBy = 'sortAppend'; 2365 } 2366 } 2367 } 2368 } 2369 // sortBegin event triggered immediately before the sort 2370 c.$table.triggerHandler( 'sortBegin', table ); 2371 // setTimeout needed so the processing icon shows up 2372 setTimeout( function() { 2373 // set css for headers 2374 ts.setHeadersCss( c ); 2375 ts.multisort( c ); 2376 ts.appendCache( c ); 2377 c.$table.triggerHandler( 'sortBeforeEnd', table ); 2378 c.$table.triggerHandler( 'sortEnd', table ); 2379 }, 1 ); 2380 }, 2381 2382 // sort multiple columns 2383 multisort : function( c ) { 2384 var tbodyIndex, sortTime, colMax, rows, tmp, 2385 table = c.table, 2386 sorter = [], 2387 dir = 0, 2388 textSorter = c.textSorter || '', 2389 sortList = c.sortList, 2390 sortLen = sortList.length, 2391 len = c.$tbodies.length; 2392 if ( c.serverSideSorting || ts.isEmptyObject( c.cache ) ) { 2393 // empty table - fixes #206/#346 2394 return; 2395 } 2396 if ( ts.debug(c, 'core') ) { sortTime = new Date(); } 2397 // cache textSorter to optimize speed 2398 if ( typeof textSorter === 'object' ) { 2399 colMax = c.columns; 2400 while ( colMax-- ) { 2401 tmp = ts.getColumnData( table, textSorter, colMax ); 2402 if ( typeof tmp === 'function' ) { 2403 sorter[ colMax ] = tmp; 2404 } 2405 } 2406 } 2407 for ( tbodyIndex = 0; tbodyIndex < len; tbodyIndex++ ) { 2408 colMax = c.cache[ tbodyIndex ].colMax; 2409 rows = c.cache[ tbodyIndex ].normalized; 2410 2411 rows.sort( function( a, b ) { 2412 var sortIndex, num, col, order, sort, x, y; 2413 // rows is undefined here in IE, so don't use it! 2414 for ( sortIndex = 0; sortIndex < sortLen; sortIndex++ ) { 2415 col = sortList[ sortIndex ][ 0 ]; 2416 order = sortList[ sortIndex ][ 1 ]; 2417 // sort direction, true = asc, false = desc 2418 dir = order === 0; 2419 2420 if ( c.sortStable && a[ col ] === b[ col ] && sortLen === 1 ) { 2421 return a[ c.columns ].order - b[ c.columns ].order; 2422 } 2423 2424 // fallback to natural sort since it is more robust 2425 num = /n/i.test( ts.getSortType( c.parsers, col ) ); 2426 if ( num && c.strings[ col ] ) { 2427 // sort strings in numerical columns 2428 if ( typeof ( ts.string[ c.strings[ col ] ] ) === 'boolean' ) { 2429 num = ( dir ? 1 : -1 ) * ( ts.string[ c.strings[ col ] ] ? -1 : 1 ); 2430 } else { 2431 num = ( c.strings[ col ] ) ? ts.string[ c.strings[ col ] ] || 0 : 0; 2432 } 2433 // fall back to built-in numeric sort 2434 // var sort = $.tablesorter['sort' + s]( a[col], b[col], dir, colMax[col], table ); 2435 sort = c.numberSorter ? c.numberSorter( a[ col ], b[ col ], dir, colMax[ col ], table ) : 2436 ts[ 'sortNumeric' + ( dir ? 'Asc' : 'Desc' ) ]( a[ col ], b[ col ], num, colMax[ col ], col, c ); 2437 } else { 2438 // set a & b depending on sort direction 2439 x = dir ? a : b; 2440 y = dir ? b : a; 2441 // text sort function 2442 if ( typeof textSorter === 'function' ) { 2443 // custom OVERALL text sorter 2444 sort = textSorter( x[ col ], y[ col ], dir, col, table ); 2445 } else if ( typeof sorter[ col ] === 'function' ) { 2446 // custom text sorter for a SPECIFIC COLUMN 2447 sort = sorter[ col ]( x[ col ], y[ col ], dir, col, table ); 2448 } else { 2449 // fall back to natural sort 2450 sort = ts[ 'sortNatural' + ( dir ? 'Asc' : 'Desc' ) ]( a[ col ] || '', b[ col ] || '', col, c ); 2451 } 2452 } 2453 if ( sort ) { return sort; } 2454 } 2455 return a[ c.columns ].order - b[ c.columns ].order; 2456 }); 2457 } 2458 if ( ts.debug(c, 'core') ) { 2459 console.log( 'Applying sort ' + sortList.toString() + ts.benchmark( sortTime ) ); 2460 } 2461 }, 2462 2463 resortComplete : function( c, callback ) { 2464 if ( c.table.isUpdating ) { 2465 c.$table.triggerHandler( 'updateComplete', c.table ); 2466 } 2467 if ( $.isFunction( callback ) ) { 2468 callback( c.table ); 2469 } 2470 }, 2471 2472 checkResort : function( c, resort, callback ) { 2473 var sortList = $.isArray( resort ) ? resort : c.sortList, 2474 // if no resort parameter is passed, fallback to config.resort (true by default) 2475 resrt = typeof resort === 'undefined' ? c.resort : resort; 2476 // don't try to resort if the table is still processing 2477 // this will catch spamming of the updateCell method 2478 if ( resrt !== false && !c.serverSideSorting && !c.table.isProcessing ) { 2479 if ( sortList.length ) { 2480 ts.sortOn( c, sortList, function() { 2481 ts.resortComplete( c, callback ); 2482 }, true ); 2483 } else { 2484 ts.sortReset( c, function() { 2485 ts.resortComplete( c, callback ); 2486 ts.applyWidget( c.table, false ); 2487 } ); 2488 } 2489 } else { 2490 ts.resortComplete( c, callback ); 2491 ts.applyWidget( c.table, false ); 2492 } 2493 }, 2494 2495 sortOn : function( c, list, callback, init ) { 2496 var indx, 2497 table = c.table; 2498 c.$table.triggerHandler( 'sortStart', table ); 2499 for (indx = 0; indx < c.columns; indx++) { 2500 c.sortVars[ indx ].sortedBy = ts.isValueInArray( indx, list ) > -1 ? 'sorton' : ''; 2501 } 2502 // update header count index 2503 ts.updateHeaderSortCount( c, list ); 2504 // set css for headers 2505 ts.setHeadersCss( c ); 2506 // fixes #346 2507 if ( c.delayInit && ts.isEmptyObject( c.cache ) ) { 2508 ts.buildCache( c ); 2509 } 2510 c.$table.triggerHandler( 'sortBegin', table ); 2511 // sort the table and append it to the dom 2512 ts.multisort( c ); 2513 ts.appendCache( c, init ); 2514 c.$table.triggerHandler( 'sortBeforeEnd', table ); 2515 c.$table.triggerHandler( 'sortEnd', table ); 2516 ts.applyWidget( table ); 2517 if ( $.isFunction( callback ) ) { 2518 callback( table ); 2519 } 2520 }, 2521 2522 sortReset : function( c, callback ) { 2523 c.sortList = []; 2524 var indx; 2525 for (indx = 0; indx < c.columns; indx++) { 2526 c.sortVars[ indx ].count = -1; 2527 c.sortVars[ indx ].sortedBy = ''; 2528 } 2529 ts.setHeadersCss( c ); 2530 ts.multisort( c ); 2531 ts.appendCache( c ); 2532 if ( $.isFunction( callback ) ) { 2533 callback( c.table ); 2534 } 2535 }, 2536 2537 getSortType : function( parsers, column ) { 2538 return ( parsers && parsers[ column ] ) ? parsers[ column ].type || '' : ''; 2539 }, 2540 2541 getOrder : function( val ) { 2542 // look for 'd' in 'desc' order; return true 2543 return ( /^d/i.test( val ) || val === 1 ); 2544 }, 2545 2546 // Natural sort - https://github.com/overset/javascript-natural-sort (date sorting removed) 2547 sortNatural : function( a, b ) { 2548 if ( a === b ) { return 0; } 2549 a = ( a || '' ).toString(); 2550 b = ( b || '' ).toString(); 2551 var aNum, bNum, aFloat, bFloat, indx, max, 2552 regex = ts.regex; 2553 // first try and sort Hex codes 2554 if ( regex.hex.test( b ) ) { 2555 aNum = parseInt( a.match( regex.hex ), 16 ); 2556 bNum = parseInt( b.match( regex.hex ), 16 ); 2557 if ( aNum < bNum ) { return -1; } 2558 if ( aNum > bNum ) { return 1; } 2559 } 2560 // chunk/tokenize 2561 aNum = a.replace( regex.chunk, '\\0$1\\0' ).replace( regex.chunks, '' ).split( '\\0' ); 2562 bNum = b.replace( regex.chunk, '\\0$1\\0' ).replace( regex.chunks, '' ).split( '\\0' ); 2563 max = Math.max( aNum.length, bNum.length ); 2564 // natural sorting through split numeric strings and default strings 2565 for ( indx = 0; indx < max; indx++ ) { 2566 // find floats not starting with '0', string or 0 if not defined 2567 aFloat = isNaN( aNum[ indx ] ) ? aNum[ indx ] || 0 : parseFloat( aNum[ indx ] ) || 0; 2568 bFloat = isNaN( bNum[ indx ] ) ? bNum[ indx ] || 0 : parseFloat( bNum[ indx ] ) || 0; 2569 // handle numeric vs string comparison - number < string - (Kyle Adams) 2570 if ( isNaN( aFloat ) !== isNaN( bFloat ) ) { return isNaN( aFloat ) ? 1 : -1; } 2571 // rely on string comparison if different types - i.e. '02' < 2 != '02' < '2' 2572 if ( typeof aFloat !== typeof bFloat ) { 2573 aFloat += ''; 2574 bFloat += ''; 2575 } 2576 if ( aFloat < bFloat ) { return -1; } 2577 if ( aFloat > bFloat ) { return 1; } 2578 } 2579 return 0; 2580 }, 2581 2582 sortNaturalAsc : function( a, b, col, c ) { 2583 if ( a === b ) { return 0; } 2584 var empty = ts.string[ ( c.empties[ col ] || c.emptyTo ) ]; 2585 if ( a === '' && empty !== 0 ) { return typeof empty === 'boolean' ? ( empty ? -1 : 1 ) : -empty || -1; } 2586 if ( b === '' && empty !== 0 ) { return typeof empty === 'boolean' ? ( empty ? 1 : -1 ) : empty || 1; } 2587 return ts.sortNatural( a, b ); 2588 }, 2589 2590 sortNaturalDesc : function( a, b, col, c ) { 2591 if ( a === b ) { return 0; } 2592 var empty = ts.string[ ( c.empties[ col ] || c.emptyTo ) ]; 2593 if ( a === '' && empty !== 0 ) { return typeof empty === 'boolean' ? ( empty ? -1 : 1 ) : empty || 1; } 2594 if ( b === '' && empty !== 0 ) { return typeof empty === 'boolean' ? ( empty ? 1 : -1 ) : -empty || -1; } 2595 return ts.sortNatural( b, a ); 2596 }, 2597 2598 // basic alphabetical sort 2599 sortText : function( a, b ) { 2600 return a > b ? 1 : ( a < b ? -1 : 0 ); 2601 }, 2602 2603 // return text string value by adding up ascii value 2604 // so the text is somewhat sorted when using a digital sort 2605 // this is NOT an alphanumeric sort 2606 getTextValue : function( val, num, max ) { 2607 if ( max ) { 2608 // make sure the text value is greater than the max numerical value (max) 2609 var indx, 2610 len = val ? val.length : 0, 2611 n = max + num; 2612 for ( indx = 0; indx < len; indx++ ) { 2613 n += val.charCodeAt( indx ); 2614 } 2615 return num * n; 2616 } 2617 return 0; 2618 }, 2619 2620 sortNumericAsc : function( a, b, num, max, col, c ) { 2621 if ( a === b ) { return 0; } 2622 var empty = ts.string[ ( c.empties[ col ] || c.emptyTo ) ]; 2623 if ( a === '' && empty !== 0 ) { return typeof empty === 'boolean' ? ( empty ? -1 : 1 ) : -empty || -1; } 2624 if ( b === '' && empty !== 0 ) { return typeof empty === 'boolean' ? ( empty ? 1 : -1 ) : empty || 1; } 2625 if ( isNaN( a ) ) { a = ts.getTextValue( a, num, max ); } 2626 if ( isNaN( b ) ) { b = ts.getTextValue( b, num, max ); } 2627 return a - b; 2628 }, 2629 2630 sortNumericDesc : function( a, b, num, max, col, c ) { 2631 if ( a === b ) { return 0; } 2632 var empty = ts.string[ ( c.empties[ col ] || c.emptyTo ) ]; 2633 if ( a === '' && empty !== 0 ) { return typeof empty === 'boolean' ? ( empty ? -1 : 1 ) : empty || 1; } 2634 if ( b === '' && empty !== 0 ) { return typeof empty === 'boolean' ? ( empty ? 1 : -1 ) : -empty || -1; } 2635 if ( isNaN( a ) ) { a = ts.getTextValue( a, num, max ); } 2636 if ( isNaN( b ) ) { b = ts.getTextValue( b, num, max ); } 2637 return b - a; 2638 }, 2639 2640 sortNumeric : function( a, b ) { 2641 return a - b; 2642 }, 2643 2644 2645 addWidget : function( widget ) { 2646 if ( widget.id && !ts.isEmptyObject( ts.getWidgetById( widget.id ) ) ) { 2647 console.warn( '"' + widget.id + '" widget was loaded more than once!' ); 2648 } 2649 ts.widgets[ ts.widgets.length ] = widget; 2650 }, 2651 2652 hasWidget : function( $table, name ) { 2653 $table = $( $table ); 2654 return $table.length && $table[ 0 ].config && $table[ 0 ].config.widgetInit[ name ] || false; 2655 }, 2656 2657 getWidgetById : function( name ) { 2658 var indx, widget, 2659 len = ts.widgets.length; 2660 for ( indx = 0; indx < len; indx++ ) { 2661 widget = ts.widgets[ indx ]; 2662 if ( widget && widget.id && widget.id.toLowerCase() === name.toLowerCase() ) { 2663 return widget; 2664 } 2665 } 2666 }, 2667 2668 applyWidgetOptions : function( table ) { 2669 var indx, widget, wo, 2670 c = table.config, 2671 len = c.widgets.length; 2672 if ( len ) { 2673 for ( indx = 0; indx < len; indx++ ) { 2674 widget = ts.getWidgetById( c.widgets[ indx ] ); 2675 if ( widget && widget.options ) { 2676 wo = $.extend( true, {}, widget.options ); 2677 c.widgetOptions = $.extend( true, wo, c.widgetOptions ); 2678 // add widgetOptions to defaults for option validator 2679 $.extend( true, ts.defaults.widgetOptions, widget.options ); 2680 } 2681 } 2682 } 2683 }, 2684 2685 addWidgetFromClass : function( table ) { 2686 var len, indx, 2687 c = table.config, 2688 // look for widgets to apply from table class 2689 // don't match from 'ui-widget-content'; use \S instead of \w to include widgets 2690 // with dashes in the name, e.g. "widget-test-2" extracts out "test-2" 2691 regex = '^' + c.widgetClass.replace( ts.regex.templateName, '(\\S+)+' ) + '$', 2692 widgetClass = new RegExp( regex, 'g' ), 2693 // split up table class (widget id's can include dashes) - stop using match 2694 // otherwise only one widget gets extracted, see #1109 2695 widgets = ( table.className || '' ).split( ts.regex.spaces ); 2696 if ( widgets.length ) { 2697 len = widgets.length; 2698 for ( indx = 0; indx < len; indx++ ) { 2699 if ( widgets[ indx ].match( widgetClass ) ) { 2700 c.widgets[ c.widgets.length ] = widgets[ indx ].replace( widgetClass, '$1' ); 2701 } 2702 } 2703 } 2704 }, 2705 2706 applyWidgetId : function( table, id, init ) { 2707 table = $(table)[0]; 2708 var applied, time, name, 2709 c = table.config, 2710 wo = c.widgetOptions, 2711 debug = ts.debug(c, 'core'), 2712 widget = ts.getWidgetById( id ); 2713 if ( widget ) { 2714 name = widget.id; 2715 applied = false; 2716 // add widget name to option list so it gets reapplied after sorting, filtering, etc 2717 if ( $.inArray( name, c.widgets ) < 0 ) { 2718 c.widgets[ c.widgets.length ] = name; 2719 } 2720 if ( debug ) { time = new Date(); } 2721 2722 if ( init || !( c.widgetInit[ name ] ) ) { 2723 // set init flag first to prevent calling init more than once (e.g. pager) 2724 c.widgetInit[ name ] = true; 2725 if ( table.hasInitialized ) { 2726 // don't reapply widget options on tablesorter init 2727 ts.applyWidgetOptions( table ); 2728 } 2729 if ( typeof widget.init === 'function' ) { 2730 applied = true; 2731 if ( debug ) { 2732 console[ console.group ? 'group' : 'log' ]( 'Initializing ' + name + ' widget' ); 2733 } 2734 widget.init( table, widget, c, wo ); 2735 } 2736 } 2737 if ( !init && typeof widget.format === 'function' ) { 2738 applied = true; 2739 if ( debug ) { 2740 console[ console.group ? 'group' : 'log' ]( 'Updating ' + name + ' widget' ); 2741 } 2742 widget.format( table, c, wo, false ); 2743 } 2744 if ( debug ) { 2745 if ( applied ) { 2746 console.log( 'Completed ' + ( init ? 'initializing ' : 'applying ' ) + name + ' widget' + ts.benchmark( time ) ); 2747 if ( console.groupEnd ) { console.groupEnd(); } 2748 } 2749 } 2750 } 2751 }, 2752 2753 applyWidget : function( table, init, callback ) { 2754 table = $( table )[ 0 ]; // in case this is called externally 2755 var indx, len, names, widget, time, 2756 c = table.config, 2757 debug = ts.debug(c, 'core'), 2758 widgets = []; 2759 // prevent numerous consecutive widget applications 2760 if ( init !== false && table.hasInitialized && ( table.isApplyingWidgets || table.isUpdating ) ) { 2761 return; 2762 } 2763 if ( debug ) { time = new Date(); } 2764 ts.addWidgetFromClass( table ); 2765 // prevent "tablesorter-ready" from firing multiple times in a row 2766 clearTimeout( c.timerReady ); 2767 if ( c.widgets.length ) { 2768 table.isApplyingWidgets = true; 2769 // ensure unique widget ids 2770 c.widgets = $.grep( c.widgets, function( val, index ) { 2771 return $.inArray( val, c.widgets ) === index; 2772 }); 2773 names = c.widgets || []; 2774 len = names.length; 2775 // build widget array & add priority as needed 2776 for ( indx = 0; indx < len; indx++ ) { 2777 widget = ts.getWidgetById( names[ indx ] ); 2778 if ( widget && widget.id ) { 2779 // set priority to 10 if not defined 2780 if ( !widget.priority ) { widget.priority = 10; } 2781 widgets[ indx ] = widget; 2782 } else if ( debug ) { 2783 console.warn( '"' + names[ indx ] + '" was enabled, but the widget code has not been loaded!' ); 2784 } 2785 } 2786 // sort widgets by priority 2787 widgets.sort( function( a, b ) { 2788 return a.priority < b.priority ? -1 : a.priority === b.priority ? 0 : 1; 2789 }); 2790 // add/update selected widgets 2791 len = widgets.length; 2792 if ( debug ) { 2793 console[ console.group ? 'group' : 'log' ]( 'Start ' + ( init ? 'initializing' : 'applying' ) + ' widgets' ); 2794 } 2795 for ( indx = 0; indx < len; indx++ ) { 2796 widget = widgets[ indx ]; 2797 if ( widget && widget.id ) { 2798 ts.applyWidgetId( table, widget.id, init ); 2799 } 2800 } 2801 if ( debug && console.groupEnd ) { console.groupEnd(); } 2802 } 2803 c.timerReady = setTimeout( function() { 2804 table.isApplyingWidgets = false; 2805 $.data( table, 'lastWidgetApplication', new Date() ); 2806 c.$table.triggerHandler( 'tablesorter-ready' ); 2807 // callback executed on init only 2808 if ( !init && typeof callback === 'function' ) { 2809 callback( table ); 2810 } 2811 if ( debug ) { 2812 widget = c.widgets.length; 2813 console.log( 'Completed ' + 2814 ( init === true ? 'initializing ' : 'applying ' ) + widget + 2815 ' widget' + ( widget !== 1 ? 's' : '' ) + ts.benchmark( time ) ); 2816 } 2817 }, 10 ); 2818 }, 2819 2820 removeWidget : function( table, name, refreshing ) { 2821 table = $( table )[ 0 ]; 2822 var index, widget, indx, len, 2823 c = table.config; 2824 // if name === true, add all widgets from $.tablesorter.widgets 2825 if ( name === true ) { 2826 name = []; 2827 len = ts.widgets.length; 2828 for ( indx = 0; indx < len; indx++ ) { 2829 widget = ts.widgets[ indx ]; 2830 if ( widget && widget.id ) { 2831 name[ name.length ] = widget.id; 2832 } 2833 } 2834 } else { 2835 // name can be either an array of widgets names, 2836 // or a space/comma separated list of widget names 2837 name = ( $.isArray( name ) ? name.join( ',' ) : name || '' ).toLowerCase().split( /[\s,]+/ ); 2838 } 2839 len = name.length; 2840 for ( index = 0; index < len; index++ ) { 2841 widget = ts.getWidgetById( name[ index ] ); 2842 indx = $.inArray( name[ index ], c.widgets ); 2843 // don't remove the widget from config.widget if refreshing 2844 if ( indx >= 0 && refreshing !== true ) { 2845 c.widgets.splice( indx, 1 ); 2846 } 2847 if ( widget && widget.remove ) { 2848 if ( ts.debug(c, 'core') ) { 2849 console.log( ( refreshing ? 'Refreshing' : 'Removing' ) + ' "' + name[ index ] + '" widget' ); 2850 } 2851 widget.remove( table, c, c.widgetOptions, refreshing ); 2852 c.widgetInit[ name[ index ] ] = false; 2853 } 2854 } 2855 c.$table.triggerHandler( 'widgetRemoveEnd', table ); 2856 }, 2857 2858 refreshWidgets : function( table, doAll, dontapply ) { 2859 table = $( table )[ 0 ]; // see issue #243 2860 var indx, widget, 2861 c = table.config, 2862 curWidgets = c.widgets, 2863 widgets = ts.widgets, 2864 len = widgets.length, 2865 list = [], 2866 callback = function( table ) { 2867 $( table ).triggerHandler( 'refreshComplete' ); 2868 }; 2869 // remove widgets not defined in config.widgets, unless doAll is true 2870 for ( indx = 0; indx < len; indx++ ) { 2871 widget = widgets[ indx ]; 2872 if ( widget && widget.id && ( doAll || $.inArray( widget.id, curWidgets ) < 0 ) ) { 2873 list[ list.length ] = widget.id; 2874 } 2875 } 2876 ts.removeWidget( table, list.join( ',' ), true ); 2877 if ( dontapply !== true ) { 2878 // call widget init if 2879 ts.applyWidget( table, doAll || false, callback ); 2880 if ( doAll ) { 2881 // apply widget format 2882 ts.applyWidget( table, false, callback ); 2883 } 2884 } else { 2885 callback( table ); 2886 } 2887 }, 2888 2889 2890 benchmark : function( diff ) { 2891 return ( ' (' + ( new Date().getTime() - diff.getTime() ) + ' ms)' ); 2892 }, 2893 // deprecated ts.log 2894 log : function() { 2895 console.log( arguments ); 2896 }, 2897 debug : function(c, name) { 2898 return c && ( 2899 c.debug === true || 2900 typeof c.debug === 'string' && c.debug.indexOf(name) > -1 2901 ); 2902 }, 2903 2904 // $.isEmptyObject from jQuery v1.4 2905 isEmptyObject : function( obj ) { 2906 2907 for ( var name in obj ) { 2908 return false; 2909 } 2910 return true; 2911 }, 2912 2913 isValueInArray : function( column, arry ) { 2914 var indx, 2915 len = arry && arry.length || 0; 2916 for ( indx = 0; indx < len; indx++ ) { 2917 if ( arry[ indx ][ 0 ] === column ) { 2918 return indx; 2919 } 2920 } 2921 return -1; 2922 }, 2923 2924 formatFloat : function( str, table ) { 2925 if ( typeof str !== 'string' || str === '' ) { return str; } 2926 // allow using formatFloat without a table; defaults to US number format 2927 var num, 2928 usFormat = table && table.config ? table.config.usNumberFormat !== false : 2929 typeof table !== 'undefined' ? table : true; 2930 if ( usFormat ) { 2931 // US Format - 1,234,567.89 -> 1234567.89 2932 str = str.replace( ts.regex.comma, '' ); 2933 } else { 2934 // German Format = 1.234.567,89 -> 1234567.89 2935 // French Format = 1 234 567,89 -> 1234567.89 2936 str = str.replace( ts.regex.digitNonUS, '' ).replace( ts.regex.comma, '.' ); 2937 } 2938 if ( ts.regex.digitNegativeTest.test( str ) ) { 2939 // make (#) into a negative number -> (10) = -10 2940 str = str.replace( ts.regex.digitNegativeReplace, '-$1' ); 2941 } 2942 num = parseFloat( str ); 2943 // return the text instead of zero 2944 return isNaN( num ) ? $.trim( str ) : num; 2945 }, 2946 2947 isDigit : function( str ) { 2948 // replace all unwanted chars and match 2949 return isNaN( str ) ? 2950 ts.regex.digitTest.test( str.toString().replace( ts.regex.digitReplace, '' ) ) : 2951 str !== ''; 2952 }, 2953 2954 // computeTableHeaderCellIndexes from: 2955 // http://www.javascripttoolbox.com/lib/table/examples.php 2956 // http://www.javascripttoolbox.com/temp/table_cellindex.html 2957 computeColumnIndex : function( $rows, c ) { 2958 var i, j, k, l, cell, cells, rowIndex, rowSpan, colSpan, firstAvailCol, 2959 // total columns has been calculated, use it to set the matrixrow 2960 columns = c && c.columns || 0, 2961 matrix = [], 2962 matrixrow = new Array( columns ); 2963 for ( i = 0; i < $rows.length; i++ ) { 2964 cells = $rows[ i ].cells; 2965 for ( j = 0; j < cells.length; j++ ) { 2966 cell = cells[ j ]; 2967 rowIndex = i; 2968 rowSpan = cell.rowSpan || 1; 2969 colSpan = cell.colSpan || 1; 2970 if ( typeof matrix[ rowIndex ] === 'undefined' ) { 2971 matrix[ rowIndex ] = []; 2972 } 2973 // Find first available column in the first row 2974 for ( k = 0; k < matrix[ rowIndex ].length + 1; k++ ) { 2975 if ( typeof matrix[ rowIndex ][ k ] === 'undefined' ) { 2976 firstAvailCol = k; 2977 break; 2978 } 2979 } 2980 // jscs:disable disallowEmptyBlocks 2981 if ( columns && cell.cellIndex === firstAvailCol ) { 2982 // don't to anything 2983 } else if ( cell.setAttribute ) { 2984 // jscs:enable disallowEmptyBlocks 2985 // add data-column (setAttribute = IE8+) 2986 cell.setAttribute( 'data-column', firstAvailCol ); 2987 } else { 2988 // remove once we drop support for IE7 - 1/12/2016 2989 $( cell ).attr( 'data-column', firstAvailCol ); 2990 } 2991 for ( k = rowIndex; k < rowIndex + rowSpan; k++ ) { 2992 if ( typeof matrix[ k ] === 'undefined' ) { 2993 matrix[ k ] = []; 2994 } 2995 matrixrow = matrix[ k ]; 2996 for ( l = firstAvailCol; l < firstAvailCol + colSpan; l++ ) { 2997 matrixrow[ l ] = 'x'; 2998 } 2999 } 3000 } 3001 } 3002 ts.checkColumnCount($rows, matrix, matrixrow.length); 3003 return matrixrow.length; 3004 }, 3005 3006 checkColumnCount : function($rows, matrix, columns) { 3007 // this DOES NOT report any tbody column issues, except for the math and 3008 // and column selector widgets 3009 var i, len, 3010 valid = true, 3011 cells = []; 3012 for ( i = 0; i < matrix.length; i++ ) { 3013 // some matrix entries are undefined when testing the footer because 3014 // it is using the rowIndex property 3015 if ( matrix[i] ) { 3016 len = matrix[i].length; 3017 if ( matrix[i].length !== columns ) { 3018 valid = false; 3019 break; 3020 } 3021 } 3022 } 3023 if ( !valid ) { 3024 $rows.each( function( indx, el ) { 3025 var cell = el.parentElement.nodeName; 3026 if ( cells.indexOf( cell ) < 0 ) { 3027 cells.push( cell ); 3028 } 3029 }); 3030 console.error( 3031 'Invalid or incorrect number of columns in the ' + 3032 cells.join( ' or ' ) + '; expected ' + columns + 3033 ', but found ' + len + ' columns' 3034 ); 3035 } 3036 }, 3037 3038 // automatically add a colgroup with col elements set to a percentage width 3039 fixColumnWidth : function( table ) { 3040 table = $( table )[ 0 ]; 3041 var overallWidth, percent, $tbodies, len, index, 3042 c = table.config, 3043 $colgroup = c.$table.children( 'colgroup' ); 3044 // remove plugin-added colgroup, in case we need to refresh the widths 3045 if ( $colgroup.length && $colgroup.hasClass( ts.css.colgroup ) ) { 3046 $colgroup.remove(); 3047 } 3048 if ( c.widthFixed && c.$table.children( 'colgroup' ).length === 0 ) { 3049 $colgroup = $( '<colgroup class="' + ts.css.colgroup + '">' ); 3050 overallWidth = c.$table.width(); 3051 // only add col for visible columns - fixes #371 3052 $tbodies = c.$tbodies.find( 'tr:first' ).children( ':visible' ); 3053 len = $tbodies.length; 3054 for ( index = 0; index < len; index++ ) { 3055 percent = parseInt( ( $tbodies.eq( index ).width() / overallWidth ) * 1000, 10 ) / 10 + '%'; 3056 $colgroup.append( $( '<col>' ).css( 'width', percent ) ); 3057 } 3058 c.$table.prepend( $colgroup ); 3059 } 3060 }, 3061 3062 // get sorter, string, empty, etc options for each column from 3063 // jQuery data, metadata, header option or header class name ('sorter-false') 3064 // priority = jQuery data > meta > headers option > header class name 3065 getData : function( header, configHeader, key ) { 3066 var meta, cl4ss, 3067 val = '', 3068 $header = $( header ); 3069 if ( !$header.length ) { return ''; } 3070 meta = $.metadata ? $header.metadata() : false; 3071 cl4ss = ' ' + ( $header.attr( 'class' ) || '' ); 3072 if ( typeof $header.data( key ) !== 'undefined' || 3073 typeof $header.data( key.toLowerCase() ) !== 'undefined' ) { 3074 // 'data-lockedOrder' is assigned to 'lockedorder'; but 'data-locked-order' is assigned to 'lockedOrder' 3075 // 'data-sort-initial-order' is assigned to 'sortInitialOrder' 3076 val += $header.data( key ) || $header.data( key.toLowerCase() ); 3077 } else if ( meta && typeof meta[ key ] !== 'undefined' ) { 3078 val += meta[ key ]; 3079 } else if ( configHeader && typeof configHeader[ key ] !== 'undefined' ) { 3080 val += configHeader[ key ]; 3081 } else if ( cl4ss !== ' ' && cl4ss.match( ' ' + key + '-' ) ) { 3082 // include sorter class name 'sorter-text', etc; now works with 'sorter-my-custom-parser' 3083 val = cl4ss.match( new RegExp( '\\s' + key + '-([\\w-]+)' ) )[ 1 ] || ''; 3084 } 3085 return $.trim( val ); 3086 }, 3087 3088 getColumnData : function( table, obj, indx, getCell, $headers ) { 3089 if ( typeof obj !== 'object' || obj === null ) { 3090 return obj; 3091 } 3092 table = $( table )[ 0 ]; 3093 var $header, key, 3094 c = table.config, 3095 $cells = ( $headers || c.$headers ), 3096 // c.$headerIndexed is not defined initially 3097 $cell = c.$headerIndexed && c.$headerIndexed[ indx ] || 3098 $cells.find( '[data-column="' + indx + '"]:last' ); 3099 if ( typeof obj[ indx ] !== 'undefined' ) { 3100 return getCell ? obj[ indx ] : obj[ $cells.index( $cell ) ]; 3101 } 3102 for ( key in obj ) { 3103 if ( typeof key === 'string' ) { 3104 $header = $cell 3105 // header cell with class/id 3106 .filter( key ) 3107 // find elements within the header cell with cell/id 3108 .add( $cell.find( key ) ); 3109 if ( $header.length ) { 3110 return obj[ key ]; 3111 } 3112 } 3113 } 3114 return; 3115 }, 3116 3117 // *** Process table *** 3118 // add processing indicator 3119 isProcessing : function( $table, toggle, $headers ) { 3120 $table = $( $table ); 3121 var c = $table[ 0 ].config, 3122 // default to all headers 3123 $header = $headers || $table.find( '.' + ts.css.header ); 3124 if ( toggle ) { 3125 // don't use sortList if custom $headers used 3126 if ( typeof $headers !== 'undefined' && c.sortList.length > 0 ) { 3127 // get headers from the sortList 3128 $header = $header.filter( function() { 3129 // get data-column from attr to keep compatibility with jQuery 1.2.6 3130 return this.sortDisabled ? 3131 false : 3132 ts.isValueInArray( parseFloat( $( this ).attr( 'data-column' ) ), c.sortList ) >= 0; 3133 }); 3134 } 3135 $table.add( $header ).addClass( ts.css.processing + ' ' + c.cssProcessing ); 3136 } else { 3137 $table.add( $header ).removeClass( ts.css.processing + ' ' + c.cssProcessing ); 3138 } 3139 }, 3140 3141 // detach tbody but save the position 3142 // don't use tbody because there are portions that look for a tbody index (updateCell) 3143 processTbody : function( table, $tb, getIt ) { 3144 table = $( table )[ 0 ]; 3145 if ( getIt ) { 3146 table.isProcessing = true; 3147 $tb.before( '<colgroup class="tablesorter-savemyplace"/>' ); 3148 return $.fn.detach ? $tb.detach() : $tb.remove(); 3149 } 3150 var holdr = $( table ).find( 'colgroup.tablesorter-savemyplace' ); 3151 $tb.insertAfter( holdr ); 3152 holdr.remove(); 3153 table.isProcessing = false; 3154 }, 3155 3156 clearTableBody : function( table ) { 3157 $( table )[ 0 ].config.$tbodies.children().detach(); 3158 }, 3159 3160 // used when replacing accented characters during sorting 3161 characterEquivalents : { 3162 'a' : '\u00e1\u00e0\u00e2\u00e3\u00e4\u0105\u00e5', // Ã¡Ã Ã¢Ã£Ã¤Ä Ã¥ 3163 'A' : '\u00c1\u00c0\u00c2\u00c3\u00c4\u0104\u00c5', // ÃÃÃÃÃÄà 3164 'c' : '\u00e7\u0107\u010d', // çÄÄ 3165 'C' : '\u00c7\u0106\u010c', // ÃÄÄ 3166 'e' : '\u00e9\u00e8\u00ea\u00eb\u011b\u0119', // éèêëÄÄ 3167 'E' : '\u00c9\u00c8\u00ca\u00cb\u011a\u0118', // ÃÃÃÃÄÄ 3168 'i' : '\u00ed\u00ec\u0130\u00ee\u00ef\u0131', // Ãìİîïı 3169 'I' : '\u00cd\u00cc\u0130\u00ce\u00cf', // ÃÃİÃà 3170 'o' : '\u00f3\u00f2\u00f4\u00f5\u00f6\u014d', // óòôõöŠ3171 'O' : '\u00d3\u00d2\u00d4\u00d5\u00d6\u014c', // ÃÃÃÃÃÅ 3172 'ss': '\u00df', // à (s sharp) 3173 'SS': '\u1e9e', // Ạ(Capital sharp s) 3174 'u' : '\u00fa\u00f9\u00fb\u00fc\u016f', // úùûüů 3175 'U' : '\u00da\u00d9\u00db\u00dc\u016e' // ÃÃÃÃÅ® 3176 }, 3177 3178 replaceAccents : function( str ) { 3179 var chr, 3180 acc = '[', 3181 eq = ts.characterEquivalents; 3182 if ( !ts.characterRegex ) { 3183 ts.characterRegexArray = {}; 3184 for ( chr in eq ) { 3185 if ( typeof chr === 'string' ) { 3186 acc += eq[ chr ]; 3187 ts.characterRegexArray[ chr ] = new RegExp( '[' + eq[ chr ] + ']', 'g' ); 3188 } 3189 } 3190 ts.characterRegex = new RegExp( acc + ']' ); 3191 } 3192 if ( ts.characterRegex.test( str ) ) { 3193 for ( chr in eq ) { 3194 if ( typeof chr === 'string' ) { 3195 str = str.replace( ts.characterRegexArray[ chr ], chr ); 3196 } 3197 } 3198 } 3199 return str; 3200 }, 3201 3202 validateOptions : function( c ) { 3203 var setting, setting2, typ, timer, 3204 // ignore options containing an array 3205 ignore = 'headers sortForce sortList sortAppend widgets'.split( ' ' ), 3206 orig = c.originalSettings; 3207 if ( orig ) { 3208 if ( ts.debug(c, 'core') ) { 3209 timer = new Date(); 3210 } 3211 for ( setting in orig ) { 3212 typ = typeof ts.defaults[setting]; 3213 if ( typ === 'undefined' ) { 3214 console.warn( 'Tablesorter Warning! "table.config.' + setting + '" option not recognized' ); 3215 } else if ( typ === 'object' ) { 3216 for ( setting2 in orig[setting] ) { 3217 typ = ts.defaults[setting] && typeof ts.defaults[setting][setting2]; 3218 if ( $.inArray( setting, ignore ) < 0 && typ === 'undefined' ) { 3219 console.warn( 'Tablesorter Warning! "table.config.' + setting + '.' + setting2 + '" option not recognized' ); 3220 } 3221 } 3222 } 3223 } 3224 if ( ts.debug(c, 'core') ) { 3225 console.log( 'validate options time:' + ts.benchmark( timer ) ); 3226 } 3227 } 3228 }, 3229 3230 // restore headers 3231 restoreHeaders : function( table ) { 3232 var index, $cell, 3233 c = $( table )[ 0 ].config, 3234 $headers = c.$table.find( c.selectorHeaders ), 3235 len = $headers.length; 3236 // don't use c.$headers here in case header cells were swapped 3237 for ( index = 0; index < len; index++ ) { 3238 $cell = $headers.eq( index ); 3239 // only restore header cells if it is wrapped 3240 // because this is also used by the updateAll method 3241 if ( $cell.find( '.' + ts.css.headerIn ).length ) { 3242 $cell.html( c.headerContent[ index ] ); 3243 } 3244 } 3245 }, 3246 3247 destroy : function( table, removeClasses, callback ) { 3248 table = $( table )[ 0 ]; 3249 if ( !table.hasInitialized ) { return; } 3250 // remove all widgets 3251 ts.removeWidget( table, true, false ); 3252 var events, 3253 $t = $( table ), 3254 c = table.config, 3255 $h = $t.find( 'thead:first' ), 3256 $r = $h.find( 'tr.' + ts.css.headerRow ).removeClass( ts.css.headerRow + ' ' + c.cssHeaderRow ), 3257 $f = $t.find( 'tfoot:first > tr' ).children( 'th, td' ); 3258 if ( removeClasses === false && $.inArray( 'uitheme', c.widgets ) >= 0 ) { 3259 // reapply uitheme classes, in case we want to maintain appearance 3260 $t.triggerHandler( 'applyWidgetId', [ 'uitheme' ] ); 3261 $t.triggerHandler( 'applyWidgetId', [ 'zebra' ] ); 3262 } 3263 // remove widget added rows, just in case 3264 $h.find( 'tr' ).not( $r ).remove(); 3265 // disable tablesorter - not using .unbind( namespace ) because namespacing was 3266 // added in jQuery v1.4.3 - see http://api.jquery.com/event.namespace/ 3267 events = 'sortReset update updateRows updateAll updateHeaders updateCell addRows updateComplete sorton ' + 3268 'appendCache updateCache applyWidgetId applyWidgets refreshWidgets removeWidget destroy mouseup mouseleave ' + 3269 'keypress sortBegin sortEnd resetToLoadState '.split( ' ' ) 3270 .join( c.namespace + ' ' ); 3271 $t 3272 .removeData( 'tablesorter' ) 3273 .unbind( events.replace( ts.regex.spaces, ' ' ) ); 3274 c.$headers 3275 .add( $f ) 3276 .removeClass( [ ts.css.header, c.cssHeader, c.cssAsc, c.cssDesc, ts.css.sortAsc, ts.css.sortDesc, ts.css.sortNone ].join( ' ' ) ) 3277 .removeAttr( 'data-column' ) 3278 .removeAttr( 'aria-label' ) 3279 .attr( 'aria-disabled', 'true' ); 3280 $r 3281 .find( c.selectorSort ) 3282 .unbind( ( 'mousedown mouseup keypress '.split( ' ' ).join( c.namespace + ' ' ) ).replace( ts.regex.spaces, ' ' ) ); 3283 ts.restoreHeaders( table ); 3284 $t.toggleClass( ts.css.table + ' ' + c.tableClass + ' tablesorter-' + c.theme, removeClasses === false ); 3285 $t.removeClass(c.namespace.slice(1)); 3286 // clear flag in case the plugin is initialized again 3287 table.hasInitialized = false; 3288 delete table.config.cache; 3289 if ( typeof callback === 'function' ) { 3290 callback( table ); 3291 } 3292 if ( ts.debug(c, 'core') ) { 3293 console.log( 'tablesorter has been removed' ); 3294 } 3295 } 3296 3297 }; 3298 3299 $.fn.tablesorter = function( settings ) { 3300 return this.each( function() { 3301 var table = this, 3302 // merge & extend config options 3303 c = $.extend( true, {}, ts.defaults, settings, ts.instanceMethods ); 3304 // save initial settings 3305 c.originalSettings = settings; 3306 // create a table from data (build table widget) 3307 if ( !table.hasInitialized && ts.buildTable && this.nodeName !== 'TABLE' ) { 3308 // return the table (in case the original target is the table's container) 3309 ts.buildTable( table, c ); 3310 } else { 3311 ts.setup( table, c ); 3312 } 3313 }); 3314 }; 3315 3316 // set up debug logs 3317 if ( !( window.console && window.console.log ) ) { 3318 // access $.tablesorter.logs for browsers that don't have a console... 3319 ts.logs = []; 3320 3321 console = {}; 3322 console.log = console.warn = console.error = console.table = function() { 3323 var arg = arguments.length > 1 ? arguments : arguments[0]; 3324 ts.logs[ ts.logs.length ] = { date: Date.now(), log: arg }; 3325 }; 3326 } 3327 3328 // add default parsers 3329 ts.addParser({ 3330 id : 'no-parser', 3331 is : function() { 3332 return false; 3333 }, 3334 format : function() { 3335 return ''; 3336 }, 3337 type : 'text' 3338 }); 3339 3340 ts.addParser({ 3341 id : 'text', 3342 is : function() { 3343 return true; 3344 }, 3345 format : function( str, table ) { 3346 var c = table.config; 3347 if ( str ) { 3348 str = $.trim( c.ignoreCase ? str.toLocaleLowerCase() : str ); 3349 str = c.sortLocaleCompare ? ts.replaceAccents( str ) : str; 3350 } 3351 return str; 3352 }, 3353 type : 'text' 3354 }); 3355 3356 ts.regex.nondigit = /[^\w,. \-()]/g; 3357 ts.addParser({ 3358 id : 'digit', 3359 is : function( str ) { 3360 return ts.isDigit( str ); 3361 }, 3362 format : function( str, table ) { 3363 var num = ts.formatFloat( ( str || '' ).replace( ts.regex.nondigit, '' ), table ); 3364 return str && typeof num === 'number' ? num : 3365 str ? $.trim( str && table.config.ignoreCase ? str.toLocaleLowerCase() : str ) : str; 3366 }, 3367 type : 'numeric' 3368 }); 3369 3370 ts.regex.currencyReplace = /[+\-,. ]/g; 3371 ts.regex.currencyTest = /^\(?\d+[\u00a3$\u20ac\u00a4\u00a5\u00a2?.]|[\u00a3$\u20ac\u00a4\u00a5\u00a2?.]\d+\)?$/; 3372 ts.addParser({ 3373 id : 'currency', 3374 is : function( str ) { 3375 str = ( str || '' ).replace( ts.regex.currencyReplace, '' ); 3376 // test for £$â¬Â¤Â¥Â¢ 3377 return ts.regex.currencyTest.test( str ); 3378 }, 3379 format : function( str, table ) { 3380 var num = ts.formatFloat( ( str || '' ).replace( ts.regex.nondigit, '' ), table ); 3381 return str && typeof num === 'number' ? num : 3382 str ? $.trim( str && table.config.ignoreCase ? str.toLocaleLowerCase() : str ) : str; 3383 }, 3384 type : 'numeric' 3385 }); 3386 3387 // too many protocols to add them all https://en.wikipedia.org/wiki/URI_scheme 3388 // now, this regex can be updated before initialization 3389 ts.regex.urlProtocolTest = /^(https?|ftp|file):\/\//; 3390 ts.regex.urlProtocolReplace = /(https?|ftp|file):\/\/(www\.)?/; 3391 ts.addParser({ 3392 id : 'url', 3393 is : function( str ) { 3394 return ts.regex.urlProtocolTest.test( str ); 3395 }, 3396 format : function( str ) { 3397 return str ? $.trim( str.replace( ts.regex.urlProtocolReplace, '' ) ) : str; 3398 }, 3399 type : 'text' 3400 }); 3401 3402 ts.regex.dash = /-/g; 3403 ts.regex.isoDate = /^\d{4}[\/\-]\d{1,2}[\/\-]\d{1,2}/; 3404 ts.addParser({ 3405 id : 'isoDate', 3406 is : function( str ) { 3407 return ts.regex.isoDate.test( str ); 3408 }, 3409 format : function( str ) { 3410 var date = str ? new Date( str.replace( ts.regex.dash, '/' ) ) : str; 3411 return date instanceof Date && isFinite( date ) ? date.getTime() : str; 3412 }, 3413 type : 'numeric' 3414 }); 3415 3416 ts.regex.percent = /%/g; 3417 ts.regex.percentTest = /(\d\s*?%|%\s*?\d)/; 3418 ts.addParser({ 3419 id : 'percent', 3420 is : function( str ) { 3421 return ts.regex.percentTest.test( str ) && str.length < 15; 3422 }, 3423 format : function( str, table ) { 3424 return str ? ts.formatFloat( str.replace( ts.regex.percent, '' ), table ) : str; 3425 }, 3426 type : 'numeric' 3427 }); 3428 3429 // added image parser to core v2.17.9 3430 ts.addParser({ 3431 id : 'image', 3432 is : function( str, table, node, $node ) { 3433 return $node.find( 'img' ).length > 0; 3434 }, 3435 format : function( str, table, cell ) { 3436 return $( cell ).find( 'img' ).attr( table.config.imgAttr || 'alt' ) || str; 3437 }, 3438 parsed : true, // filter widget flag 3439 type : 'text' 3440 }); 3441 3442 ts.regex.dateReplace = /(\S)([AP]M)$/i; // used by usLongDate & time parser 3443 ts.regex.usLongDateTest1 = /^[A-Z]{3,10}\.?\s+\d{1,2},?\s+(\d{4})(\s+\d{1,2}:\d{2}(:\d{2})?(\s+[AP]M)?)?$/i; 3444 ts.regex.usLongDateTest2 = /^\d{1,2}\s+[A-Z]{3,10}\s+\d{4}/i; 3445 ts.addParser({ 3446 id : 'usLongDate', 3447 is : function( str ) { 3448 // two digit years are not allowed cross-browser 3449 // Jan 01, 2013 12:34:56 PM or 01 Jan 2013 3450 return ts.regex.usLongDateTest1.test( str ) || ts.regex.usLongDateTest2.test( str ); 3451 }, 3452 format : function( str ) { 3453 var date = str ? new Date( str.replace( ts.regex.dateReplace, '$1 $2' ) ) : str; 3454 return date instanceof Date && isFinite( date ) ? date.getTime() : str; 3455 }, 3456 type : 'numeric' 3457 }); 3458 3459 // testing for ##-##-#### or ####-##-##, so it's not perfect; time can be included 3460 ts.regex.shortDateTest = /(^\d{1,2}[\/\s]\d{1,2}[\/\s]\d{4})|(^\d{4}[\/\s]\d{1,2}[\/\s]\d{1,2})/; 3461 // escaped "-" because JSHint in Firefox was showing it as an error 3462 ts.regex.shortDateReplace = /[\-.,]/g; 3463 // XXY covers MDY & DMY formats 3464 ts.regex.shortDateXXY = /(\d{1,2})[\/\s](\d{1,2})[\/\s](\d{4})/;
3465 ts.regex.shortDateYMD = /(\d{4})[\/\s](\d{1,2})[\/\s](\d{1,2})/; 3466 ts.convertFormat = function( dateString, format ) { 3467 dateString = ( dateString || '' ) 3468 .replace( ts.regex.spaces, ' ' ) 3469 .replace( ts.regex.shortDateReplace, '/' ); 3470 if ( format === 'mmddyyyy' ) { 3471 dateString = dateString.replace( ts.regex.shortDateXXY, '$3/$1/$2' ); 3472 } else if ( format === 'ddmmyyyy' ) { 3473 dateString = dateString.replace( ts.regex.shortDateXXY, '$3/$2/$1' ); 3474 } else if ( format === 'yyyymmdd' ) { 3475 dateString = dateString.replace( ts.regex.shortDateYMD, '$1/$2/$3' ); 3476 } 3477 var date = new Date( dateString ); 3478 return date instanceof Date && isFinite( date ) ? date.getTime() : ''; 3479 }; 3480 3481 ts.addParser({ 3482 id : 'shortDate', // 'mmddyyyy', 'ddmmyyyy' or 'yyyymmdd' 3483 is : function( str ) { 3484 str = ( str || '' ).replace( ts.regex.spaces, ' ' ).replace( ts.regex.shortDateReplace, '/' ); 3485 return ts.regex.shortDateTest.test( str ); 3486 }, 3487 format : function( str, table, cell, cellIndex ) { 3488 if ( str ) { 3489 var c = table.config, 3490 $header = c.$headerIndexed[ cellIndex ], 3491 format = $header.length && $header.data( 'dateFormat' ) || 3492 ts.getData( $header, ts.getColumnData( table, c.headers, cellIndex ), 'dateFormat' ) || 3493 c.dateFormat; 3494 // save format because getData can be slow... 3495 if ( $header.length ) { 3496 $header.data( 'dateFormat', format ); 3497 } 3498 return ts.convertFormat( str, format ) || str; 3499 } 3500 return str; 3501 }, 3502 type : 'numeric' 3503 }); 3504 3505 // match 24 hour time & 12 hours time + am/pm - see http://regexr.com/3c3tk 3506 ts.regex.timeTest = /^(0?[1-9]|1[0-2]):([0-5]\d)(\s[AP]M)$|^((?:[01]\d|[2][0-4]):[0-5]\d)$/i; 3507 ts.regex.timeMatch = /(0?[1-9]|1[0-2]):([0-5]\d)(\s[AP]M)|((?:[01]\d|[2][0-4]):[0-5]\d)/i; 3508 ts.addParser({ 3509 id : 'time', 3510 is : function( str ) { 3511 return ts.regex.timeTest.test( str ); 3512 }, 3513 format : function( str ) { 3514 // isolate time... ignore month, day and year 3515 var temp, 3516 timePart = ( str || '' ).match( ts.regex.timeMatch ), 3517 orig = new Date( str ), 3518 // no time component? default to 00:00 by leaving it out, but only if str is defined 3519 time = str && ( timePart !== null ? timePart[ 0 ] : '00:00 AM' ), 3520 date = time ? new Date( '2000/01/01 ' + time.replace( ts.regex.dateReplace, '$1 $2' ) ) : time; 3521 if ( date instanceof Date && isFinite( date ) ) { 3522 temp = orig instanceof Date && isFinite( orig ) ? orig.getTime() : 0; 3523 // if original string was a valid date, add it to the decimal so the column sorts in some kind of order 3524 // luckily new Date() ignores the decimals 3525 return temp ? parseFloat( date.getTime() + '.' + orig.getTime() ) : date.getTime(); 3526 } 3527 return str; 3528 }, 3529 type : 'numeric' 3530 }); 3531 3532 ts.addParser({ 3533 id : 'metadata', 3534 is : function() { 3535 return false; 3536 }, 3537 format : function( str, table, cell ) { 3538 var c = table.config, 3539 p = ( !c.parserMetadataName ) ? 'sortValue' : c.parserMetadataName; 3540 return $( cell ).metadata()[ p ]; 3541 }, 3542 type : 'numeric' 3543 }); 3544 3545 3546 // add default widgets 3547 ts.addWidget({ 3548 id : 'zebra', 3549 priority : 90, 3550 format : function( table, c, wo ) { 3551 var $visibleRows, $row, count, isEven, tbodyIndex, rowIndex, len, 3552 child = new RegExp( c.cssChildRow, 'i' ), 3553 $tbodies = c.$tbodies.add( $( c.namespace + '_extra_table' ).children( 'tbody:not(.' + c.cssInfoBlock + ')' ) ); 3554 for ( tbodyIndex = 0; tbodyIndex < $tbodies.length; tbodyIndex++ ) { 3555 // loop through the visible rows 3556 count = 0; 3557 $visibleRows = $tbodies.eq( tbodyIndex ).children( 'tr:visible' ).not( c.selectorRemove ); 3558 len = $visibleRows.length; 3559 for ( rowIndex = 0; rowIndex < len; rowIndex++ ) { 3560 $row = $visibleRows.eq( rowIndex ); 3561 // style child rows the same way the parent row was styled 3562 if ( !child.test( $row[ 0 ].className ) ) { count++; } 3563 isEven = ( count % 2 === 0 ); 3564 $row 3565 .removeClass( wo.zebra[ isEven ? 1 : 0 ] ) 3566 .addClass( wo.zebra[ isEven ? 0 : 1 ] ); 3567 } 3568 } 3569 }, 3570 remove : function( table, c, wo, refreshing ) { 3571 if ( refreshing ) { return; } 3572 var tbodyIndex, $tbody, 3573 $tbodies = c.$tbodies, 3574 toRemove = ( wo.zebra || [ 'even', 'odd' ] ).join( ' ' ); 3575 for ( tbodyIndex = 0; tbodyIndex < $tbodies.length; tbodyIndex++ ) { 3576 $tbody = ts.processTbody( table, $tbodies.eq( tbodyIndex ), true ); // remove tbody 3577 $tbody.children().removeClass( toRemove ); 3578 ts.processTbody( table, $tbody, false ); // restore tbody 3579 } 3580 } 3581 }); 3582 3583})( jQuery ); 3584return jQuery.tablesorter;})); 3585(function(factory){if (typeof define === 'function' && define.amd){define(['jquery'], factory);} else if (typeof module === 'object' && typeof module.exports === 'object'){module.exports = factory(require('jquery'));} else {factory(jQuery);}}(function(jQuery){ 3586!function($){$.extend({metadata:{defaults:{type:"class",name:"metadata",cre:/(\{.*\})/,single:"metadata"},setType:function(t,e){this.defaults.type=t,this.defaults.name=e},get:function(elem,opts){var data,m,e,attr,settings=$.extend({},this.defaults,opts);if(settings.single.length||(settings.single="metadata"),data=$.data(elem,settings.single),!data){if(data="{}","class"===settings.type)m=settings.cre.exec(elem.className),m&&(data=m[1]);else if("elem"===settings.type){if(!elem.getElementsByTagName)return;e=elem.getElementsByTagName(settings.name),e.length&&(data=$.trim(e[0].innerHTML))}else void 0!==elem.getAttribute&&(attr=elem.getAttribute(settings.name),attr)&&(data=attr);data.indexOf("{")<0&&(data="{"+data+"}"),data=eval("("+data+")"),$.data(elem,settings.single,data)}return data}}}),$.fn.metadata=function(t){return $.metadata.get(this[0],t)}}(jQuery);return jQuery;})); 3587(function(factory){if (typeof define === 'function' && define.amd){define(['jquery'], factory);} else if (typeof module === 'object' && typeof module.exports === 'object'){module.exports = factory(require('jquery'));} else {factory(jQuery);}}(function(jQuery){
vendor: 20,120 bytes, lines 3588-3589
3588 3589!function(E){"use strict";var L=E.tablesorter;E.extend({tablesorterPager:new function(){this.defaults={container:null,ajaxUrl:null,customAjaxUrl:function(e,t){return t},ajaxError:null,ajaxObject:{dataType:"json"},processAjaxOnInit:!0,ajaxProcessing:function(e){return e},output:"{startRow} to {endRow} of {totalRows} rows",updateArrows:!0,page:0,pageReset:0,size:10,maxOptionSize:20,savePages:!0,storageKey:"tablesorter-pager",fixedHeight:!1,countChildRows:!1,removeRows:!1,cssFirst:".first",cssPrev:".prev",cssNext:".next",cssLast:".last",cssGoto:".gotoPage",cssPageDisplay:".pagedisplay",cssPageSize:".pagesize",cssErrorRow:"tablesorter-errorRow",cssDisabled:"disabled",totalRows:0,totalPages:0,filteredRows:0,filteredPages:0,ajaxCounter:0,currentFilters:[],startRow:0,endRow:0,$size:null,last:{}};function l(e,t,a,i,s,r){if("function"==typeof a.ajaxProcessing){t.config.$tbodies.eq(0).empty();var o,n,l,g,c,d,p,f,u,h,w,b,R=t.config,z=R.$table,x="",e=a.ajaxProcessing(e,t,i)||[0,[]];if(L.showError(t),r)L.debug(R,"pager")&&console.error("Pager >> Ajax Error",i,s,r),L.showError(t,i,s,r),R.$tbodies.eq(0).children("tr").detach(),a.totalRows=0;else{if(E.isArray(e)?(s=e[(i=isNaN(e[0])&&!isNaN(e[1]))?1:0],a.totalRows=isNaN(s)?a.totalRows||0:s,R.totalRows=R.filteredRows=a.filteredRows=a.totalRows,h=0!==a.totalRows&&e[i?0:1]||[],u=e[2]):(a.ajaxData=e,R.totalRows=a.totalRows=e.total,R.filteredRows=a.filteredRows=void 0!==e.filteredRows?e.filteredRows:e.total,u=e.headers,h=e.rows||[]),w=h&&h.length,h instanceof E)a.processAjaxOnInit&&(R.$tbodies.eq(0).empty(),R.$tbodies.eq(0).append(h));else if(w){for(o=0;o<w;o++){for(x+="<tr>",n=0;n<h[o].length;n++)x+=/^\s*<td/.test(h[o][n])?E.trim(h[o][n]):"<td>"+h[o][n]+"</td>";x+="</tr>"}a.processAjaxOnInit&&R.$tbodies.eq(0).html(x)}if(a.processAjaxOnInit=!0,u)for(c=(l=z.hasClass("hasStickyHeaders"))?R.widgetOptions.$sticky.children("thead:first").children("tr:not(."+R.cssIgnoreRow+")").children():"",g=z.find("tfoot tr:first").children(),b=(d=R.$headers.filter("th ")).length,n=0;n<b;n++)(p=d.eq(n)).find("."+L.css.icon).length?(f=p.find("."+L.css.icon).clone(!0),p.find("."+L.css.headerIn).html(u[n]).append(f),l&&c.length&&(f=c.eq(n).find("."+L.css.icon).clone(!0),c.eq(n).find("."+L.css.headerIn).html(u[n]).append(f))):(p.find("."+L.css.headerIn).html(u[n]),l&&c.length&&(a.$container=a.$container.add(R.widgetOptions.$sticky),c.eq(n).find("."+L.css.headerIn).html(u[n]))),g.eq(n).html(u[n])}R.showProcessing&&L.isProcessing(t),r=N(a,a.size,"get"),a.totalPages="all"===r?1:Math.ceil(a.totalRows/r),a.last.totalRows=a.totalRows,a.last.currentFilters=a.currentFilters,a.last.sortList=(R.sortList||[]).join(","),j(t,a,!1),L.updateCache(R,function(){a.initialized&&setTimeout(function(){L.debug(R,"pager")&&console.log("Pager >> Triggering pagerChange"),z.triggerHandler("pagerChange",a),L.applyWidget(t),j(t,a,!0)},0)})}a.initialized||F(t,a)}function d(e,t){t.page=0,S(e,t)}function u(e,t){t.page=$(e,t)-1,S(e,t)}function p(e,t){t.page++;var a=$(e,t)-1;t.page>=a&&(t.page=a),S(e,t)}function f(e,t){t.page--,t.page<=0&&(t.page=0),S(e,t)}function h(e,t,a){var i,s,r=e.config;t.$container.find(t.cssGoto+","+t.cssPageSize+",.ts-startRow, .ts-page").removeClass(t.cssDisabled).removeAttr("disabled").each(function(){this.ariaDisabled=!1}),t.isDisabled=!1,t.page=E.data(e,"pagerLastPage")||t.page||0,i=(s=t.$container.find(t.cssPageSize)).find("option[selected]").val(),t.size=E.data(e,"pagerLastSize")||N(t,i,"get"),t.totalPages="all"===t.size?1:Math.ceil($(e,t)/t.size),A(e,t.size,t),e.id&&!r.$table.attr("aria-describedby")&&((i=(s=t.$container.find(t.cssPageDisplay)).attr("id"))||(i=e.id+"_pager_info",s.attr("id",i)),r.$table.attr("aria-describedby",i)),P(e,t),a&&(L.update(r),A(e,t.size,t),S(e,t),m(e,t),L.debug(r,"pager"))&&console.log("Pager >> Enabled")}var w=this,b=function(e,t,a){var i="addClass",s="removeClass",r=t.cssDisabled,a=!!a,o=a||0===t.page,e=$(e,t),n=a||t.page===e-1||0===e;t.updateArrows&&((a=t.$container.find(t.cssFirst+","+t.cssPrev))[o?i:s](r),a.each(function(){this.ariaDisabled=o}),(a=t.$container.find(t.cssNext+","+t.cssLast))[n?i:s](r),a.each(function(){this.ariaDisabled=n}))},R=function(e,t){var a,i,s,r=e.config,e=r.$table.hasClass("hasFilters");if(e&&!t.ajax)if(L.isEmptyObject(r.cache))t.filteredRows=t.totalRows=r.$tbodies.eq(0).children("tr").not(t.countChildRows?"":"."+r.cssChildRow).length;else for(t.filteredRows=0,s=(a=r.cache[0].normalized).length,i=0;i<s;i++)t.filteredRows+=t.regexRows.test(a[i][r.columns].$row[0].className)?0:1;else e||(t.filteredRows=t.totalRows)},j=function(e,o,t){if(!o.initializing){var a,i,s,r,n,l,g,c=e.config,d=c.namespace+"pager",p=N(o,o.size,"get");if("all"===p&&(p=o.totalRows),o.countChildRows&&(a[a.length]=c.cssChildRow),o.totalPages=Math.ceil(o.totalRows/p),c.totalRows=o.totalRows,I(e,o),R(e,o),c.filteredRows=o.filteredRows,o.filteredPages=Math.ceil(o.filteredRows/p)||0,0<=$(e,o)){if(a=p*o.page>o.filteredRows&&t,o.page=a?o.pageReset||0:o.page,o.startRow=!a&&0===o.filteredRows?0:p*o.page+1,o.endRow=Math.min(o.filteredRows,o.totalRows,p*(o.page+1)),i=o.$container.find(o.cssPageDisplay),g="function"==typeof o.output?o.output(e,o):(g=i.attr("data-pager-output"+(o.filteredRows<o.totalRows?"-filtered":""))||o.output,(o.ajaxData&&o.ajaxData.output&&o.ajaxData.output||g).replace(/\{page([\-+]\d+)?\}/gi,function(e,t){return o.totalPages?o.page+(t?parseInt(t,10):1):0}).replace(/\{\w+(\s*:\s*\w+)?\}/gi,function(e){var t,a,e=e.replace(/[{}\s]/g,""),i=e.split(":"),s=o.ajaxData,r=/(rows?|pages?)$/i.test(e)?0:"";return/(startRow|page)/.test(i[0])&&"input"===i[1]?(t=(""+("page"===i[0]?o.totalPages:o.totalRows)).length,a="page"===i[0]?o.page+1:o.startRow,'<input type="text" class="ts-'+i[0]+'" style="max-width:'+t+'em" value="'+a+'"/>'):1<i.length&&s&&s[i[0]]?s[i[0]][i[1]]:o[e]||(s?s[e]:r)||r})),(s=o.$container.find(o.cssGoto)).length){for(a="",n=(l=z(e,o)).length,r=0;r<n;r++)a+='<option value="'+l[r]+'">'+l[r]+"</option>";s.html(a).val(o.page+1)}i.length&&(i["INPUT"===i[0].nodeName?"val":"html"](g),i.find(".ts-startRow, .ts-page").unbind("change"+d).bind("change"+d,function(){var e=E(this).val(),e=E(this).hasClass("ts-startRow")?Math.floor(e/p)+1:e;c.$table.triggerHandler("pageSet"+d,[e])}))}b(e,o),x(e,o),o.initialized&&!1!==t&&(L.debug(c,"pager")&&console.log("Pager >> Triggering pagerComplete"),c.$table.triggerHandler("pagerComplete",o),o.savePages)&&L.storage&&L.storage(e,o.storageKey,{page:o.page,size:p===o.totalRows?"all":p})}},z=function(e,t){for(var a,i,s=$(e,t)||1,r=5*Math.ceil(s/t.maxOptionSize/5),o=s>t.maxOptionSize,e=t.page+1,n=r,l=s-r,g=[1],c=o?r:1;c<=s;)g[g.length]=c,c+=o?r:1;if(g[g.length]=s,o){for(a=[],s<(l=e+(i=Math.max(Math.floor(t.maxOptionSize/r)-1,5)))&&(l=s),c=n=(n=e-i)<1?1:n;c<=l;c++)a[a.length]=c;r/2<(e=(g=E.grep(g,function(e,t){return E.inArray(e,g)===t})).length)-(i=a.length)&&e+i>t.maxOptionSize&&(n=Math.floor(e/2)-Math.floor(i/2),Array.prototype.splice.apply(g,[n,i])),g=g.concat(a)}return g=E.grep(g,function(e,t){return E.inArray(e,g)===t}).sort(function(e,t){return e-t})},x=function(e,t){var a,i,s=e.config,r=s.$tbodies.eq(0);r.find("tr.pagerSavedHeightSpacer").remove(),t.fixedHeight&&!t.isDisabled&&(a=E.data(e,"pagerSavedHeight"))&&(i=0,1<E(e).css("border-spacing").split(" ").length&&(i=E(e).css("border-spacing").split(" ")[1].replace(/[^-\d\.]/g,"")),5<(a=a-r.height()+i*t.size-i))&&E.data(e,"pagerLastSize")===t.size&&r.children("tr:visible").length<("all"===t.size?t.totalRows:t.size)&&r.append('<tr class="pagerSavedHeightSpacer '+s.selectorRemove.slice(1)+'" style="height:'+a+'px;"></tr>')},P=function(e,t){var a=e.config,i=a.$tbodies.eq(0);i.find("tr.pagerSavedHeightSpacer").remove(),i.children("tr:visible").length||i.append('<tr class="pagerSavedHeightSpacer '+a.selectorRemove.slice(1)+'"><td> </td></tr>'),a=i.children("tr").eq(0).height()*("all"===t.size?t.totalRows:t.size),E.data(e,"pagerSavedHeight",a),x(e,t),E.data(e,"pagerLastSize",t.size)},v=function(e,t){if(!t.ajaxUrl){var a,i=0,s=e.config,r=s.$tbodies.eq(0).children("tr"),o=r.length,e="all"===t.size?t.totalRows:t.size,n=t.page*e,l=n+e,g=-1,c=0;for(t.cacheIndex=[],a=0;a<o;a++)t.regexFiltered.test(r[a].className)||(c===n&&r[a].className.match(s.cssChildRow)?r[a].style.display="none":(r[a].style.display=n<=c&&c<l?"":"none",g!==c&&n<=c&&c<l&&(t.cacheIndex[t.cacheIndex.length]=a,g=c),(c+=r[a].className.match(s.cssChildRow+"|"+s.selectorRemove.slice(1))&&!t.countChildRows?0:1)===l&&"none"!==r[a].style.display&&r[a].className.match(L.css.cssHasChild)&&(i=a)));if(0<i&&r[i].className.match(L.css.cssHasChild))for(;++i<o&&r[i].className.match(s.cssChildRow);)r[i].style.display=""}},m=function(e,t){t.size=N(t,t.$container.find(t.cssPageSize).val(),"get"),A(e,t.size,t),b(e,t),t.removeRows||(v(e,t),E(e).bind("sortEnd filterEnd ".split(" ").join(e.config.namespace+"pager "),function(){v(e,t)}))},n=function(s,r){var i,e=function(e,a){var t,i,s=e.config,r=a.ajaxUrl?a.ajaxUrl.replace(/\{page([\-+]\d+)?\}/,function(e,t){return a.page+(t?parseInt(t,10):0)}).replace(/\{size\}/g,a.size):"",o=s.sortList,n=a.currentFilters||E(e).data("lastSearch")||[],l=r.match(/\{\s*sort(?:List)?\s*:\s*(\w*)\s*\}/),g=r.match(/\{\s*filter(?:List)?\s*:\s*(\w*)\s*\}/),c=[];if(l){l=l[1];i=o.length;for(t=0;t<i;t++)c[c.length]=l+"["+o[t][0]+"]="+o[t][1];r=r.replace(/\{\s*sort(?:List)?\s*:\s*(\w*)\s*\}/g,c.length?c.join("&"):l);c=[]}if(g){g=g[1];i=n.length;for(t=0;t<i;t++)if(n[t])c[c.length]=g+"["+t+"]="+encodeURIComponent(n[t]);r=r.replace(/\{\s*filter(?:List)?\s*:\s*(\w*)\s*\}/g,c.length?c.join("&"):g);a.currentFilters=n}if(typeof a.customAjaxUrl==="function")r=a.customAjaxUrl(e,r);if(L.debug(s,"pager"))console.log("Pager >> Ajax url = "+r);return r}(s,r),o=E(document),t=s.config,n=t.namespace+"pager";""!==e&&(t.showProcessing&&L.isProcessing(s,!0),o.bind("ajaxError"+n,function(e,t,a,i){l(null,s,r,t,a,i),o.unbind("ajaxError"+n)}),i=++r.ajaxCounter,r.last.ajaxUrl=e,r.ajaxObject.url=e,r.ajaxObject.success=function(e,t,a){i<r.ajaxCounter||(l(e,s,r,a),o.unbind("ajaxError"+n),"function"==typeof r.oldAjaxSuccess&&r.oldAjaxSuccess(e))},L.debug(t,"pager")&&console.log("Pager >> Ajax initialized",r.ajaxObject),E.ajax(r.ajaxObject))},g=function(e,t,a){var i,s,r,o,n=E(e),l=e.config,g=L.debug(l,"pager"),c=l.$table.hasClass("hasFilters"),d=t&&t.length||0,p="all"===a.size?a.totalRows:a.size,f=a.page*p;if(d<1)g&&console.warn("Pager >> No rows for pager to render");else{if(a.page>=a.totalPages&&u(e,a),a.cacheIndex=[],a.isDisabled=!1,a.initialized&&(g&&console.log("Pager >> Triggering pagerChange"),n.triggerHandler("pagerChange",a)),a.removeRows){for(L.clearTableBody(e),i=L.processTbody(e,l.$tbodies.eq(0),!0),r=s=c?0:f,o=0;o<p&&s<t.length;)c&&a.regexFiltered.test(t[s][0].className)||f<++r&&o<=p&&(o++,a.cacheIndex[a.cacheIndex.length]=s,i.append(t[s])),s++;L.processTbody(e,i,!1)}else v(e,a);j(e,a),e.isUpdating&&(g&&console.log("Pager >> Triggering updateComplete"),n.triggerHandler("updateComplete",[e,!0]))}},y=function(e,t){var a,i,s;for(t.ajax?b(e,t,!0):(E.data(e,"pagerLastPage",t.page),E.data(e,"pagerLastSize",t.size),t.page=0,t.size=t.totalRows,t.totalPages=1,E(e).addClass("pagerDisabled").removeAttr("aria-describedby").find("tr.pagerSavedHeightSpacer").remove(),g(e,e.config.rowsCopy,t),t.isDisabled=!0,L.applyWidget(e),L.debug(e.config,"pager")&&console.log("Pager >> Disabled")),s=(i=t.$container.find(t.cssGoto+","+t.cssPageSize+", .ts-startRow, .ts-page")).length,a=0;a<s;a++)i.eq(a).addClass(t.cssDisabled)[0].disabled=!0,i[a].ariaDisabled=!0},C=function(i){var s=i.config,r=s.pager;L.updateCache(s,function(){var e,t=[],a=i.config.cache[0].normalized;for(r.totalRows=a.length,e=0;e<r.totalRows;e++)t[t.length]=a[e][s.columns].$row;s.rowsCopy=t,S(i,r,!0)})},S=function(e,t,a){var i,s,r,o;if(!t.isDisabled)return i=e.config,s=L.debug(i,"pager"),r=E(e),o=t.last,!1!==a&&t.initialized&&L.isEmptyObject(i.cache)?C(e):void(t.ajax&&L.hasWidget(e,"filter")&&!i.widgetOptions.filter_initialized||(I(e,t),R(e,t),o.currentFilters=""===(o.currentFilters||[]).join("")?[]:o.currentFilters,t.currentFilters=""===(t.currentFilters||[]).join("")?[]:t.currentFilters,o.page===t.page&&o.size===t.size&&o.totalRows===t.totalRows&&(o.currentFilters||[]).join(",")===(t.currentFilters||[]).join(",")&&(o.ajaxUrl||"")===(t.ajaxObject.url||"")&&(o.optAjaxUrl||"")===(t.ajaxUrl||"")&&o.sortList===(i.sortList||[]).join(","))||(s&&console.log("Pager >> Changing to page "+t.page),t.last={page:t.page,size:t.size,sortList:(i.sortList||[]).join(","),totalRows:t.totalRows,currentFilters:t.currentFilters||[],ajaxUrl:t.ajaxObject.url||"",optAjaxUrl:t.ajaxUrl||""},t.ajax?(t.processAjaxOnInit||L.isEmptyObject(t.initialRows)?n:(t.processAjaxOnInit=!0,o=t.initialRows,t.totalRows=void 0!==o.total?o.total:s&&console.error("Pager >> No initial total page set!")||0,t.filteredRows=void 0!==o.filtered?o.filtered:s&&console.error("Pager >> No initial filtered page set!")||0,F))(e,t):t.ajax||g(e,i.rowsCopy,t),E.data(e,"pagerLastPage",t.page),t.initialized&&!1!==a&&(s&&console.log("Pager >> Triggering pageMoved"),r.triggerHandler("pageMoved",t),L.applyWidget(e),e.isUpdating)&&(s&&console.log("Pager >> Triggering updateComplete"),r.triggerHandler("updateComplete",[e,!0]))))},$=function(e,t){return L.hasWidget(e,"filter")?Math.min(t.totalPages,t.filteredPages):t.totalPages},I=function(e,t){e=$(e,t)-1;return t.page=parseInt(t.page,10),(t.page<0||isNaN(t.page))&&(t.page=0),t.page>e&&0<=e&&(t.page=e),t.page},N=function(e,t,a){var i=parseInt(t,10)||e.size||e.settings.size||10;return e.initialized&&(/all/i.test(i+" "+t)||i===e.totalRows)?e.$container.find(e.cssPageSize+' option[value="all"]').length?"all":e.totalRows:"get"===a?i:e.size},A=function(e,t,a){a.size=N(a,t,"get"),a.$container.find(a.cssPageSize).val(a.size),E.data(e,"pagerLastPage",I(e,a)),E.data(e,"pagerLastSize",a.size),a.totalPages="all"===a.size?1:Math.ceil(a.totalRows/a.size),a.filteredPages="all"===a.size?1:Math.ceil(a.filteredRows/a.size)},F=function(e,t){t.initialized=!0,t.initializing=!1,L.debug(e.config,"pager")&&console.log("Pager >> Triggering pagerInitialized"),E(e).triggerHandler("pagerInitialized",t),L.applyWidget(e),j(e,t)},O=function(r,e){var s,o,i=r.config,t=i.widgetOptions,a=L.debug(i,"pager"),n=i.pager=E.extend(!0,{},E.tablesorterPager.defaults,e),l=i.$table,g=i.namespace+"pager",c=n.$container=E(n.container).addClass("tablesorter-pager").show();n.settings=E.extend(!0,{},E.tablesorterPager.defaults,e),a&&console.log("Pager >> Initializing"),n.oldAjaxSuccess=n.oldAjaxSuccess||n.ajaxObject.success,i.appender=w.appender,n.initializing=!0,n.savePages&&L.storage&&(e=L.storage(r,n.storageKey)||{},n.page=(isNaN(e.page)?n:e).page,n.size="all"===e.size?e.size:(isNaN(e.size)?n:e).size||n.setSize||10,A(r,n.size,n)),n.regexRows=new RegExp("("+(t.filter_filteredRow||"filtered")+"|"+i.selectorRemove.slice(1)+"|"+i.cssChildRow+")"),n.regexFiltered=new RegExp(t.filter_filteredRow||"filtered"),l.unbind("filterInit filterStart filterEnd sortEnd disablePager enablePager destroyPager updateComplete pageSize pageSet pageAndSize pagerUpdate refreshComplete ".split(" ").join(g+" ").replace(/\s+/g," ")).bind("filterInit filterStart ".split(" ").join(g+" "),function(e,t){if(n.currentFilters=E.isArray(t)?t:i.$table.data("lastSearch"),n.ajax&&"filterInit"===e.type)return S(r,n,!1);t=L.filter.equalFilters?L.filter.equalFilters(i,i.lastSearch,n.currentFilters):(i.lastSearch||[]).join("")!==(n.currentFilters||[]).join(""),"filterStart"!==e.type||!1===n.pageReset||t||(n.page=n.pageReset)}).bind("filterEnd sortEnd ".split(" ").join(g+" "),function(){n.currentFilters=i.$table.data("lastSearch"),(n.initialized||n.initializing)&&(i.delayInit&&i.rowsCopy&&0===i.rowsCopy.length&&C(r),j(r,n,!1),S(r,n,!1),L.applyWidget(r))}).bind("disablePager"+g,function(e){e.stopPropagation(),y(r,n)}).bind("enablePager"+g,function(e){e.stopPropagation(),h(r,n,!0)}).bind("destroyPager"+g,function(e){var t,a,i,s;e.stopPropagation(),e=n,a=(t=r).config,i=a.namespace+"pager",s=[e.cssFirst,e.cssPrev,e.cssNext,e.cssLast,e.cssGoto,e.cssPageSize].join(","),y(t,e),e.$container.hide().find(s).unbind(i),a.appender=null,a.$table.unbind(i),L.storage&&L.storage(t,e.storageKey,""),delete a.pager,delete a.rowsCopy}).bind("resetToLoadState"+g,function(e){var t;e.stopPropagation(),e=n,(t=r).config.pager=E.extend(!0,{},E.tablesorterPager.defaults,e.settings),O(t,e.settings)}).bind("updateComplete"+g,function(e,t,a){e.stopPropagation(),!t||a||n.ajax||(e=i.$tbodies.eq(0).children("tr").not(i.selectorRemove),n.totalRows=e.length-(n.countChildRows?0:e.filter("."+i.cssChildRow).length),n.totalPages="all"===n.size?1:Math.ceil(n.totalRows/n.size),e.length&&i.rowsCopy&&0===i.rowsCopy.length&&C(t),n.page>=n.totalPages&&u(t,n),v(t,n),P(t,n),j(t,n,!0))}).bind("pageSize refreshComplete ".split(" ").join(g+" "),function(e,t){e.stopPropagation(),A(r,N(n,t,"get"),n),S(r,n),v(r,n),j(r,n,!1)}).bind("pageSet pagerUpdate ".split(" ").join(g+" "),function(e,t){e.stopPropagation(),"pagerUpdate"===e.type&&(t=void 0===t?n.page+1:t,n.last.page=!0),n.page=(parseInt(t,10)||1)-1,S(r,n,!0),j(r,n,!1)}).bind("pageAndSize"+g,function(e,t,a){e.stopPropagation(),n.page=(parseInt(t,10)||1)-1,A(r,N(n,a,"get"),n),S(r,n,!0),v(r,n),j(r,n,!1)}),s=[n.cssFirst,n.cssPrev,n.cssNext,n.cssLast],o=[d,f,p,u],a&&!c.length&&console.warn('Pager >> "container" not found'),c.find(s.join(",")).attr("tabindex",0).unbind("click"+g).bind("click"+g,function(e){e.stopPropagation();var t,a=E(this),i=s.length;if(!a.hasClass(n.cssDisabled))for(t=0;t<i;t++)if(a.is(s[t])){o[t](r,n);break}}),(e=c.find(n.cssGoto)).length?e.unbind("change"+g).bind("change"+g,function(){n.page=E(this).val()-1,S(r,n,!0),j(r,n,!1)}):a&&console.warn('Pager >> "goto" selector not found'),(e=c.find(n.cssPageSize)).length?(e.find("option").removeAttr("selected"),e.unbind("change"+g).bind("change"+g,function(){var e;return E(this).hasClass(n.cssDisabled)||(e=E(this).val(),A(r,e,n),S(r,n),P(r,n)),!1})):a&&console.warn('Pager >> "size" selector not found'),n.initialized=!1,l.triggerHandler("pagerBeforeInitialized",n),h(r,n,!1),("string"==typeof n.ajaxUrl?(n.ajax=!0,i.widgetOptions.filter_serversideFiltering=!0,i.serverSideSorting=!0,S):(n.ajax=!1,L.appendCache(i,!0),m))(r,n),n.ajax||n.initialized||(n.initializing=!1,n.initialized=!0,A(r,n.size,n),S(r,n),a&&console.log("Pager >> Triggering pagerInitialized"),i.$table.triggerHandler("pagerInitialized",n),i.widgetOptions.filter_initialized&&L.hasWidget(r,"filter"))||j(r,n,!1),i.widgetInit.pager=!0};w.appender=function(e,t){var a=e.config,i=a.pager;i.ajax||(a.rowsCopy=t,i.totalRows=(i.countChildRows?a.$tbodies.eq(0).children("tr"):t).length,i.size=E.data(e,"pagerLastSize")||i.size||i.settings.size||10,i.totalPages="all"===i.size?1:Math.ceil(i.totalRows/i.size),g(e,t,i),j(e,i,!1))},w.construct=function(e){return this.each(function(){this.config&&this.hasInitialized&&O(this,e)})}}}),L.showError=function(e,t,a,i){function s(){r.$table.find("thead").find(r.selectorRemove).remove()}var e=E(e),r=e[0].config,o=r&&r.widgetOptions,n=r.pager&&r.pager.cssErrorRow||o&&o.pager_css&&o.pager_css.errorRow||"tablesorter-errorRow",l=typeof t,g=!0,c="";if(e.length){if("function"==typeof r.pager.ajaxError){if(!1===(g=r.pager.ajaxError(r,t,a,i)))return s();c=g}else if("function"==typeof o.pager_ajaxError){if(!1===(g=o.pager_ajaxError(r,t,a,i)))return s();c=g}if(""===c)if("object"==l)c=0===t.status?"Not connected, verify Network":404===t.status?"Requested page not found [404]":500===t.status?"Internal Server Error [500]":"parsererror"===i?"Requested JSON parse failed":"timeout"===i?"Time out error":"abort"===i?"Ajax Request aborted":"Uncaught error: "+t.statusText+" ["+t.status+"]";else{if("string"!=l)return s();c=t}E(/tr\>/.test(c)?c:'<tr><td colspan="'+r.columns+'">'+c+"</td></tr>").click(function(){E(this).remove()}).appendTo(r.$table.find("thead:first")).addClass(n+" "+r.selectorRemove.slice(1)).attr({role:"alert","aria-live":"assertive"})}else console.error("tablesorter showError: no table parameter passed")},E.fn.extend({tablesorterPager:E.tablesorterPager.construct})}(jQuery);return jQuery;}));
3590function $JSCompiler_alias_THROW$$($jscomp_throw_param$$){throw $jscomp_throw_param$$;}var $JSCompiler_alias_VOID$$=void 0,$JSCompiler_alias_TRUE$$=!0,$JSCompiler_alias_NULL$$=null,$JSCompiler_alias_FALSE$$=!1,$JSCompiler_prototypeAlias$$,$goog$global$$=this; 3591function $goog$typeOf$$($value$$39$$){var $s$$2$$=typeof $value$$39$$;if("object"==$s$$2$$)if($value$$39$$){if($value$$39$$ instanceof Array)return"array";if($value$$39$$ instanceof Object)return $s$$2$$;var $className$$1$$=Object.prototype.toString.call($value$$39$$);if("[object Window]"==$className$$1$$)return"object";if("[object Array]"==$className$$1$$||"number"==typeof $value$$39$$.length&&"undefined"!=typeof $value$$39$$.splice&&"undefined"!=typeof $value$$39$$.propertyIsEnumerable&&!$value$$39$$.propertyIsEnumerable("splice"))return"array"; 3592if("[object Function]"==$className$$1$$||"undefined"!=typeof $value$$39$$.call&&"undefined"!=typeof $value$$39$$.propertyIsEnumerable&&!$value$$39$$.propertyIsEnumerable("call"))return"function"}else return"null";else if("function"==$s$$2$$&&"undefined"==typeof $value$$39$$.call)return"object";return $s$$2$$}function $goog$isArray$$($val$$3$$){return"array"==$goog$typeOf$$($val$$3$$)} 3593function $goog$isArrayLike$$($val$$4$$){var $type$$48$$=$goog$typeOf$$($val$$4$$);return"array"==$type$$48$$||"object"==$type$$48$$&&"number"==typeof $val$$4$$.length}function $goog$isString$$($val$$6$$){return"string"==typeof $val$$6$$}function $goog$isFunction$$($val$$9$$){return"function"==$goog$typeOf$$($val$$9$$)}function $goog$isObject$$($val$$10$$){var $type$$49$$=typeof $val$$10$$;return"object"==$type$$49$$&&$val$$10$$!=$JSCompiler_alias_NULL$$||"function"==$type$$49$$} 3594function $goog$getUid$$($obj$$17$$){return $obj$$17$$[$goog$UID_PROPERTY_$$]||($obj$$17$$[$goog$UID_PROPERTY_$$]=++$goog$uidCounter_$$)}var $goog$UID_PROPERTY_$$="closure_uid_"+Math.floor(2147483648*Math.random()).toString(36),$goog$uidCounter_$$=0;function $goog$bindNative_$$($fn$$,$selfObj$$1$$,$var_args$$24$$){return $fn$$.call.apply($fn$$.bind,arguments)} 3595function $goog$bindJs_$$($fn$$1$$,$selfObj$$2$$,$var_args$$25$$){$fn$$1$$||$JSCompiler_alias_THROW$$(Error());if(2<arguments.length){var $boundArgs$$=Array.prototype.slice.call(arguments,2);return function(){var $newArgs$$=Array.prototype.slice.call(arguments);Array.prototype.unshift.apply($newArgs$$,$boundArgs$$);return $fn$$1$$.apply($selfObj$$2$$,$newArgs$$)}}return function(){return $fn$$1$$.apply($selfObj$$2$$,arguments)}} 3596function $goog$bind$$($fn$$2$$,$selfObj$$3$$,$var_args$$26$$){$goog$bind$$=Function.prototype.bind&&-1!=Function.prototype.bind.toString().indexOf("native code")?$goog$bindNative_$$:$goog$bindJs_$$;return $goog$bind$$.apply($JSCompiler_alias_NULL$$,arguments)} 3597function $goog$partial$$($fn$$3$$,$var_args$$27$$){var $args$$=Array.prototype.slice.call(arguments,1);return function(){var $newArgs$$1$$=Array.prototype.slice.call(arguments);$newArgs$$1$$.unshift.apply($newArgs$$1$$,$args$$);return $fn$$3$$.apply(this,$newArgs$$1$$)}}var $goog$now$$=Date.now||function(){return+new Date}; 3598function $goog$inherits$$($childCtor$$,$parentCtor$$){function $tempCtor$$(){}$tempCtor$$.prototype=$parentCtor$$.prototype;$childCtor$$.$superClass_$=$parentCtor$$.prototype;$childCtor$$.prototype=new $tempCtor$$};function $pn$ui$filter$FilterState$$($id$$1$$,$value$$41$$,$idx$$,$type$$51$$){this.id=$id$$1$$;this.value=$value$$41$$;this.$idx$=$idx$$;this.type=$type$$51$$}$pn$ui$filter$FilterState$$.prototype.toString=function $$pn$ui$filter$FilterState$$$$toString$(){return"id["+this.id+"] value["+this.value+"] idx["+this.$idx$+"] type["+this.type+"]"};function $pn$ui$filter$GenericListFilterOptions$$(){}$pn$ui$filter$GenericListFilterOptions$$.prototype.additionalFilterTriggers=[];$pn$ui$filter$GenericListFilterOptions$$.prototype.clearFiltersControls=[];$pn$ui$filter$GenericListFilterOptions$$.prototype.filterDelay=250;$pn$ui$filter$GenericListFilterOptions$$.prototype.filterToolTipMessage='Quotes (") match phrases. (not) excludes a match from the results. (or) can be used to do Or searches. I.e. [red or blue] will match either red or blue. Numeric values support >=, >, <=, <, = and != operators.'; 3599$pn$ui$filter$GenericListFilterOptions$$.prototype.enableCookies=$JSCompiler_alias_TRUE$$;$pn$ui$filter$GenericListFilterOptions$$.prototype.matchingElement=$JSCompiler_alias_NULL$$;$pn$ui$filter$GenericListFilterOptions$$.prototype.filteringElements=$JSCompiler_alias_NULL$$;$pn$ui$filter$GenericListFilterOptions$$.prototype.sharedCookieId=$JSCompiler_alias_NULL$$;function $pn$ui$filter$TableFilterOptions$$(){}$goog$inherits$$($pn$ui$filter$TableFilterOptions$$,$pn$ui$filter$GenericListFilterOptions$$);$pn$ui$filter$TableFilterOptions$$.prototype.selectOptionLabel="Select...";$pn$ui$filter$TableFilterOptions$$.prototype.frozenHeaderTable=$JSCompiler_alias_NULL$$;function $goog$string$subs$$($str$$12$$,$var_args$$29$$){for(var $i$$5$$=1;$i$$5$$<arguments.length;
3599$i$$5$$++)var $replacement$$=String(arguments[$i$$5$$]).replace(/\$/g,"$$$$"),$str$$12$$=$str$$12$$.replace(/\%s/,$replacement$$);return $str$$12$$}function $goog$string$trim$$($str$$25$$){return $str$$25$$.replace(/^[\s\xa0]+|[\s\xa0]+$/g,"")} 3600function $goog$string$htmlEscape$$($str$$31$$){if(!$goog$string$allRe_$$.test($str$$31$$))return $str$$31$$;-1!=$str$$31$$.indexOf("&")&&($str$$31$$=$str$$31$$.replace($goog$string$amperRe_$$,"&"));-1!=$str$$31$$.indexOf("<")&&($str$$31$$=$str$$31$$.replace($goog$string$ltRe_$$,"<"));-1!=$str$$31$$.indexOf(">")&&($str$$31$$=$str$$31$$.replace($goog$string$gtRe_$$,">"));-1!=$str$$31$$.indexOf('"')&&($str$$31$$=$str$$31$$.replace($goog$string$quotRe_$$,"""));return $str$$31$$} 3601var $goog$string$amperRe_$$=/&/g,$goog$string$ltRe_$$=/</g,$goog$string$gtRe_$$=/>/g,$goog$string$quotRe_$$=/\"/g,$goog$string$allRe_$$=/[&<>\"]/,$goog$string$HTML_ENTITY_PATTERN_$$=/&([^;\s<&]+);?/g;var $goog$userAgent$detectedOpera_$$,$goog$userAgent$detectedIe_$$,$goog$userAgent$detectedWebkit_$$,$goog$userAgent$detectedGecko_$$;function $goog$userAgent$getUserAgentString$$(){return $goog$global$$.navigator?$goog$global$$.navigator.userAgent:$JSCompiler_alias_NULL$$}$goog$userAgent$detectedGecko_$$=$goog$userAgent$detectedWebkit_$$=$goog$userAgent$detectedIe_$$=$goog$userAgent$detectedOpera_$$=$JSCompiler_alias_FALSE$$;var $ua$$inline_20$$; 3602if($ua$$inline_20$$=$goog$userAgent$getUserAgentString$$()){var $navigator$$inline_21$$=$goog$global$$.navigator;$goog$userAgent$detectedOpera_$$=0==$ua$$inline_20$$.indexOf("Opera");$goog$userAgent$detectedIe_$$=!$goog$userAgent$detectedOpera_$$&&-1!=$ua$$inline_20$$.indexOf("MSIE");$goog$userAgent$detectedWebkit_$$=!$goog$userAgent$detectedOpera_$$&&-1!=$ua$$inline_20$$.indexOf("WebKit");$goog$userAgent$detectedGecko_$$=!$goog$userAgent$detectedOpera_$$&&!$goog$userAgent$detectedWebkit_$$&&"Gecko"== 3603$navigator$$inline_21$$.product}var $goog$userAgent$OPERA$$=$goog$userAgent$detectedOpera_$$,$goog$userAgent$IE$$=$goog$userAgent$detectedIe_$$,$goog$userAgent$GECKO$$=$goog$userAgent$detectedGecko_$$,$goog$userAgent$WEBKIT$$=$goog$userAgent$detectedWebkit_$$,$navigator$$inline_23$$=$goog$global$$.navigator,$goog$userAgent$MAC$$=-1!=($navigator$$inline_23$$&&$navigator$$inline_23$$.platform||"").indexOf("Mac"),$goog$userAgent$VERSION$$; 3604a:{var $version$$inline_26$$="",$re$$inline_27$$;if($goog$userAgent$OPERA$$&&$goog$global$$.opera)var $operaVersion$$inline_28$$=$goog$global$$.opera.version,$version$$inline_26$$="function"==typeof $operaVersion$$inline_28$$?$operaVersion$$inline_28$$():$operaVersion$$inline_28$$;else if($goog$userAgent$GECKO$$?$re$$inline_27$$=/rv\:([^\);]+)(\)|;)/:$goog$userAgent$IE$$?$re$$inline_27$$=/MSIE\s+([^\);]+)(\)|;)/:$goog$userAgent$WEBKIT$$&&($re$$inline_27$$=/WebKit\/(\S+)/),$re$$inline_27$$)var $arr$$inline_29$$= 3605$re$$inline_27$$.exec($goog$userAgent$getUserAgentString$$()),$version$$inline_26$$=$arr$$inline_29$$?$arr$$inline_29$$[1]:"";if($goog$userAgent$IE$$){var $docMode$$inline_30$$,$doc$$inline_263$$=$goog$global$$.document;$docMode$$inline_30$$=$doc$$inline_263$$?$doc$$inline_263$$.documentMode:$JSCompiler_alias_VOID$$;if($docMode$$inline_30$$>parseFloat($version$$inline_26$$)){$goog$userAgent$VERSION$$=String($docMode$$inline_30$$);break a}}$goog$userAgent$VERSION$$=$version$$inline_26$$} 3606var $goog$userAgent$isVersionCache_$$={}; 3607function $goog$userAgent$isVersion$$($version$$8$$){var $JSCompiler_temp$$12_order$$inline_34$$;if(!($JSCompiler_temp$$12_order$$inline_34$$=$goog$userAgent$isVersionCache_$$[$version$$8$$])){$JSCompiler_temp$$12_order$$inline_34$$=0;for(var $v1Subs$$inline_35$$=$goog$string$trim$$(String($goog$userAgent$VERSION$$)).split("."),$v2Subs$$inline_36$$=$goog$string$trim$$(String($version$$8$$)).split("."),$subCount$$inline_37$$=Math.max($v1Subs$$inline_35$$.length,$v2Subs$$inline_36$$.length),$subIdx$$inline_38$$= 36080;0==$JSCompiler_temp$$12_order$$inline_34$$&&$subIdx$$inline_38$$<$subCount$$inline_37$$;$subIdx$$inline_38$$++){var $v1Sub$$inline_39$$=$v1Subs$$inline_35$$[$subIdx$$inline_38$$]||"",$v2Sub$$inline_40$$=$v2Subs$$inline_36$$[$subIdx$$inline_38$$]||"",$v1CompParser$$inline_41$$=RegExp("(\\d*)(\\D*)","g"),$v2CompParser$$inline_42$$=RegExp("(\\d*)(\\D*)","g");do{var $v1Comp$$inline_43$$=$v1CompParser$$inline_41$$.exec($v1Sub$$inline_39$$)||["","",""],$v2Comp$$inline_44$$=$v2CompParser$$inline_42$$.exec($v2Sub$$inline_40$$)|| 3609["","",""];if(0==$v1Comp$$inline_43$$[0].length&&0==$v2Comp$$inline_44$$[0].length)break;$JSCompiler_temp$$12_order$$inline_34$$=((0==$v1Comp$$inline_43$$[1].length?0:parseInt($v1Comp$$inline_43$$[1],10))<(0==$v2Comp$$inline_44$$[1].length?0:parseInt($v2Comp$$inline_44$$[1],10))?-1:(0==$v1Comp$$inline_43$$[1].length?0:parseInt($v1Comp$$inline_43$$[1],10))>(0==$v2Comp$$inline_44$$[1].length?0:parseInt($v2Comp$$inline_44$$[1],10))?1:0)||((0==$v1Comp$$inline_43$$[2].length)<(0==$v2Comp$$inline_44$$[2].length)? 3610-1:(0==$v1Comp$$inline_43$$[2].length)>(0==$v2Comp$$inline_44$$[2].length)?1:0)||($v1Comp$$inline_43$$[2]<$v2Comp$$inline_44$$[2]?-1:$v1Comp$$inline_43$$[2]>$v2Comp$$inline_44$$[2]?1:0)}while(0==$JSCompiler_temp$$12_order$$inline_34$$)}$JSCompiler_temp$$12_order$$inline_34$$=$goog$userAgent$isVersionCache_$$[$version$$8$$]=0<=$JSCompiler_temp$$12_order$$inline_34$$}return $JSCompiler_temp$$12_order$$inline_34$$}var $goog$userAgent$isDocumentModeCache_$$={}; 3611function $goog$userAgent$isDocumentMode$$(){return $goog$userAgent$isDocumentModeCache_$$[9]||($goog$userAgent$isDocumentModeCache_$$[9]=$goog$userAgent$IE$$&&!!document.documentMode&&9<=document.documentMode)};function $goog$object$forEach$$($obj$$21$$,$f$$){for(var $key$$15$$ in $obj$$21$$)$f$$.call($JSCompiler_alias_VOID$$,$obj$$21$$[$key$$15$$],$ke
3611y$$15$$,$obj$$21$$)}var $goog$object$PROTOTYPE_FIELDS_$$="constructor hasOwnProperty isPrototypeOf propertyIsEnumerable toLocaleString toString valueOf".split(" "); 3612function $goog$object$extend$$($target$$39$$,$var_args$$32$$){for(var $key$$38$$,$source$$2$$,$i$$16$$=1;$i$$16$$<arguments.length;$i$$16$$++){$source$$2$$=arguments[$i$$16$$];for($key$$38$$ in $source$$2$$)$target$$39$$[$key$$38$$]=$source$$2$$[$key$$38$$];for(var $j$$1$$=0;$j$$1$$<$goog$object$PROTOTYPE_FIELDS_$$.length;$j$$1$$++)$key$$38$$=$goog$object$PROTOTYPE_FIELDS_$$[$j$$1$$],Object.prototype.hasOwnProperty.call($source$$2$$,$key$$38$$)&&($target$$39$$[$key$$38$$]=$source$$2$$[$key$$38$$])}} 3613;function $goog$debug$Error$$($opt_msg$$){Error.captureStackTrace?Error.captureStackTrace(this,$goog$debug$Error$$):this.stack=Error().stack||"";$opt_msg$$&&(this.message=String($opt_msg$$))}$goog$inherits$$($goog$debug$Error$$,Error);$goog$debug$Error$$.prototype.name="CustomError";function $goog$asserts$AssertionError$$($messagePattern$$,$messageArgs$$){$messageArgs$$.unshift($messagePattern$$);$goog$debug$Error$$.call(this,$goog$string$subs$$.apply($JSCompiler_alias_NULL$$,$messageArgs$$));$messageArgs$$.shift();this.$messagePattern$=$messagePattern$$}$goog$inherits$$($goog$asserts$AssertionError$$,$goog$debug$Error$$);$goog$asserts$AssertionError$$.prototype.name="AssertionError"; 3614function $goog$asserts$assert$$($condition$$1$$,$opt_message$$8$$,$var_args$$35$$){if(!$condition$$1$$){var $givenArgs$$inline_47$$=Array.prototype.slice.call(arguments,2),$message$$inline_50$$="Assertion failed";if($opt_message$$8$$)var $message$$inline_50$$=$message$$inline_50$$+(": "+$opt_message$$8$$),$args$$inline_51$$=$givenArgs$$inline_47$$;$JSCompiler_alias_THROW$$(new $goog$asserts$AssertionError$$(""+$message$$inline_50$$,$args$$inline_51$$||[]))}};var $goog$array$ARRAY_PROTOTYPE_$$=Array.prototype;function $goog$array$indexOf$$($arr$$12$$,$obj$$50$$){if($goog$isString$$($arr$$12$$))return!$goog$isString$$($obj$$50$$)||1!=$obj$$50$$.length?-1:$arr$$12$$.indexOf($obj$$50$$,0);for(var $i$$19$$=0;$i$$19$$<$arr$$12$$.length;$i$$19$$++)if($i$$19$$ in $arr$$12$$&&$arr$$12$$[$i$$19$$]===$obj$$50$$)return $i$$19$$;return-1} 3615function $goog$array$forEach$$($arr$$16$$,$f$$8$$,$opt_obj$$7$$){for(var $l$$2$$=$arr$$16$$.length,$arr2$$=$goog$isString$$($arr$$16$$)?$arr$$16$$.split(""):$arr$$16$$,$i$$21$$=0;$i$$21$$<$l$$2$$;$i$$21$$++)$i$$21$$ in $arr2$$&&$f$$8$$.call($opt_obj$$7$$,$arr2$$[$i$$21$$],$i$$21$$,$arr$$16$$)} 3616function $goog$array$map$$($arr$$21$$,$f$$13$$,$opt_obj$$12$$){for(var $l$$5$$=$arr$$21$$.length,$res$$6$$=Array($l$$5$$),$arr2$$3$$=$goog$isString$$($arr$$21$$)?$arr$$21$$.split(""):$arr$$21$$,$i$$24$$=0;$i$$24$$<$l$$5$$;$i$$24$$++)$i$$24$$ in $arr2$$3$$&&($res$$6$$[$i$$24$$]=$f$$13$$.call($opt_obj$$12$$,$arr2$$3$$[$i$$24$$],$i$$24$$,$arr$$21$$));return $res$$6$$} 3617function $goog$array$concat$$($var_args$$44$$){return $goog$array$ARRAY_PROTOTYPE_$$.concat.apply($goog$array$ARRAY_PROTOTYPE_$$,arguments)}function $goog$array$slice$$($arr$$43$$,$start$$5$$,$opt_end$$13$$){$goog$asserts$assert$$($arr$$43$$.length!=$JSCompiler_alias_NULL$$);return 2>=arguments.length?$goog$array$ARRAY_PROTOTYPE_$$.slice.call($arr$$43$$,$start$$5$$):$goog$array$ARRAY_PROTOTYPE_$$.slice.call($arr$$43$$,$start$$5$$,$opt_end$$13$$)};function $goog$dom$classes$add$$($element$$8$$,$var_args$$53$$){var $className$$inline_266_classes$$;$className$$inline_266_classes$$=$element$$8$$.className;$className$$inline_266_classes$$=$goog$isString$$($className$$inline_266_classes$$)&&$className$$inline_266_classes$$.match(/\S+/g)||[];for(var $args$$3_args$$inline_54$$=$goog$array$slice$$(arguments,1),$expectedCount$$=$className$$inline_266_classes$$.length+$args$$3_args$$inline_54$$.length,$classes$$inline_53$$=$className$$inline_266_classes$$, 3618$i$$inline_55$$=0;$i$$inline_55$$<$args$$3_args$$inline_54$$.length;$i$$inline_55$$++)0<=$goog$array$indexOf$$($classes$$inline_53$$,$args$$3_args$$inline_54$$[$i$$inline_55$$])||$classes$$inline_53$$.push($args$$3_args$$inline_54$$[$i$$inline_55$$]);$element$$8$$.className=$className$$inline_266_classes$$.join(" ");return $className$$inline_266_classes$$.length==$expectedCount$$};var $goog$dom$BrowserFeature$CAN_ADD_NAME_OR_TYPE_ATTRIBUTES$$=!$goog$userAgent$IE$$||$goog$userAgent$isDocumentMode$$();!$goog$userAgent$GECKO$$&&!$goog$userAgent$IE$$||$goog$userAgent$IE$$&&$goog$userAgent$isDocumentMode$$()||$goog$userAgent$GECKO$$&&$goog$userAgent$isVersion$$("1.9.1");var $goog$dom$BrowserFeature$CAN_USE_INNER_TEXT$$=$goog$userAgent$IE$$&&!$goog$userAgent$isVersion$$("9");function $goog$dom$getElementsByTagNameAndClass_$$($className$$10_opt_tag$$1_tagName$$1$$,$opt_class$$1$$,$els_opt_el$$3_parent$$5$$){var $arrayLike_doc$$5$$=document,$els_opt_el$$3_parent$$5$$=$els_opt_el$$3_parent$$5$$||$arrayLike_doc$$5$$,$className$$10_opt_tag$$1_tagName$$1$$=$className$$10_opt_tag$$1_tagName$$1$$&&"*"!=$className$$10_opt_tag$$1_tagName$$1$$?$className$$10_opt_tag$$1_tagName$$1$$.toUpperCase():"";if($els_opt_el$$3_parent$$5$$.querySelectorAll&&$els_opt_el$$3_parent$$5$$.querySelector&& 3619($className$$10_opt_tag$$1_tagName$$1$$||$opt_class$$1$$))return $els_opt_el$$3_parent$$5$$.querySelectorAll($className$$10_opt_tag$$1_tagName$$1$$+($opt_class$$1$$?"."+$opt_class$$1$$:""));if($opt_class$$1$$&&$els_opt_el$$3_parent$$5$$.getElementsByClassName){$els_opt_el$$3_parent$$5$$=$els_opt_el$$3_parent$$5$$.getElementsByClassName($opt_class$$1$$);if($className$$10_opt_tag$$1_tagName$$1$$){for(var $arrayLike_doc$$5$$={},$len$$=0,$i$$51$$=0,$el$$1$$;$el$$1$$=$els_opt_el$$3_parent$$5$$[$i$$51$$];$i$$51$$++)$className$$10_opt_tag$$1_tagName$$1$$== 3620$el$$1$$.nodeName&&($arrayLike_doc$$5$$[$len$$++]=$el$$1$$);$arrayLike_doc$$5$$.length=$len$$;return $arrayLike_doc$$5$$}return $els_opt_el$$3_parent$$5$$}$els_opt_el$$3_parent$$5$$=$els_opt_el$$3_parent$$5$$.getElementsByTagName($className$$10_opt_tag$$1_tagName$$1$$||"*");if($opt_class$$1$$){$arrayLike_doc$$5$$={};for($i$$51$$=$len$$=0;$el$$1$$=$els_opt_el$$3_parent$$5$$[$i$$51$$];$i$$51$$++)$className$$10_opt_tag$$1_tagName$$1$$=$el$$1$$.className,"function"==typeof $className$$10_opt_tag$$1_tagName$$1$$.split&& 36210<=$goog$array$indexOf$$($className$$10_opt_tag$$1_tagName$$1$$.split(/\s+/),$opt_class$$1$$)&&($arrayLike_doc$$5$$[$len$$++]=$el$$1$$);$arrayLike_doc$$5$$.length=$len$$;return $arrayLike_doc$$5$$}return $els_opt_el$$3_parent$$5$$}var $goog$dom$DIRECT_ATTRIBUTE_MAP_$$={cellpadding:"cellPadding",cellspacing:"cellSpacing",colspan:"colSpan",frameborder:"frameBorder",height:"height",maxlength:"maxLength",role:"role",rowspan:"rowSpan",type:"type",usemap:"useMap",valign:"vAlign",width:"width"}; 3622function $goog$dom$createDom$$($tagName$$2$$,$opt_attributes$$,$var_args$$55$$){var $args$$inline_275_args$$inline_57$$=arguments,$childHandler$$inline_276_doc$$inline_58$$=document,$element$$inline_
362263_tagName$$inline_59_tagNameArr$$inline_61$$=$args$$inline_275_args$$inline_57$$[0],$attributes$$inline_60_i$$inline_277$$=$args$$inline_275_args$$inline_57$$[1];if(!$goog$dom$BrowserFeature$CAN_ADD_NAME_OR_TYPE_ATTRIBUTES$$&&$attributes$$inline_60_i$$inline_277$$&&($attributes$$inline_60_i$$inline_277$$.name|| 3623$attributes$$inline_60_i$$inline_277$$.type)){$element$$inline_63_tagName$$inline_59_tagNameArr$$inline_61$$=["<",$element$$inline_63_tagName$$inline_59_tagNameArr$$inline_61$$];$attributes$$inline_60_i$$inline_277$$.name&&$element$$inline_63_tagName$$inline_59_tagNameArr$$inline_61$$.push(' name="',$goog$string$htmlEscape$$($attributes$$inline_60_i$$inline_277$$.name),'"');if($attributes$$inline_60_i$$inline_277$$.type){$element$$inline_63_tagName$$inline_59_tagNameArr$$inline_61$$.push(' type="', 3624$goog$string$htmlEscape$$($attributes$$inline_60_i$$inline_277$$.type),'"');var $JSCompiler_temp$$363_arg$$inline_278_clone$$inline_62_object$$inline_366$$={};$goog$object$extend$$($JSCompiler_temp$$363_arg$$inline_278_clone$$inline_62_object$$inline_366$$,$attributes$$inline_60_i$$inline_277$$);delete $JSCompiler_temp$$363_arg$$inline_278_clone$$inline_62_object$$inline_366$$.type;$attributes$$inline_60_i$$inline_277$$=$JSCompiler_temp$$363_arg$$inline_278_clone$$inline_62_object$$inline_366$$}$element$$inline_63_tagName$$inline_59_tagNameArr$$inline_61$$.push(">"); 3625$element$$inline_63_tagName$$inline_59_tagNameArr$$inline_61$$=$element$$inline_63_tagName$$inline_59_tagNameArr$$inline_61$$.join("")}$element$$inline_63_tagName$$inline_59_tagNameArr$$inline_61$$=$childHandler$$inline_276_doc$$inline_58$$.createElement($element$$inline_63_tagName$$inline_59_tagNameArr$$inline_61$$);if($attributes$$inline_60_i$$inline_277$$)if($goog$isString$$($attributes$$inline_60_i$$inline_277$$))$element$$inline_63_tagName$$inline_59_tagNameArr$$inline_61$$.className=$attributes$$inline_60_i$$inline_277$$; 3626else if($goog$isArray$$($attributes$$inline_60_i$$inline_277$$))$goog$dom$classes$add$$.apply($JSCompiler_alias_NULL$$,[$element$$inline_63_tagName$$inline_59_tagNameArr$$inline_61$$].concat($attributes$$inline_60_i$$inline_277$$));else{var $element$$inline_268$$=$element$$inline_63_tagName$$inline_59_tagNameArr$$inline_61$$;$goog$object$forEach$$($attributes$$inline_60_i$$inline_277$$,function($val$$inline_270$$,$key$$inline_271$$){"style"==$key$$inline_271$$?$element$$inline_268$$.style.cssText= 3627$val$$inline_270$$:"class"==$key$$inline_271$$?$element$$inline_268$$.className=$val$$inline_270$$:"for"==$key$$inline_271$$?$element$$inline_268$$.htmlFor=$val$$inline_270$$:$key$$inline_271$$ in $goog$dom$DIRECT_ATTRIBUTE_MAP_$$?$element$$inline_268$$.setAttribute($goog$dom$DIRECT_ATTRIBUTE_MAP_$$[$key$$inline_271$$],$val$$inline_270$$):0==$key$$inline_271$$.lastIndexOf("aria-",0)||0==$key$$inline_271$$.lastIndexOf("data-",0)?$element$$inline_268$$.setAttribute($key$$inline_271$$,$val$$inline_270$$): 3628$element$$inline_268$$[$key$$inline_271$$]=$val$$inline_270$$})}if(2<$args$$inline_275_args$$inline_57$$.length)for(var $doc$$inline_273$$=$childHandler$$inline_276_doc$$inline_58$$,$parent$$inline_274$$=$element$$inline_63_tagName$$inline_59_tagNameArr$$inline_61$$,$childHandler$$inline_276_doc$$inline_58$$=function $$childHandler$$inline_276_doc$$inline_58$$$($child$$inline_279$$){$child$$inline_279$$&&$parent$$inline_274$$.appendChild($goog$isString$$($child$$inline_279$$)?$doc$$inline_273$$.createTextNode($child$$inline_279$$): 3629$child$$inline_279$$)},$attributes$$inline_60_i$$inline_277$$=2;$attributes$$inline_60_i$$inline_277$$<$args$$inline_275_args$$inline_57$$.length;$attributes$$inline_60_i$$inline_277$$++)if($JSCompiler_temp$$363_arg$$inline_278_clone$$inline_62_object$$inline_366$$=$args$$inline_275_args$$inline_57$$[$attributes$$inline_60_i$$inline_277$$],$goog$isArrayLike$$($JSCompiler_temp$$363_arg$$inline_278_clone$$inline_62_object$$inline_366$$)&&!($goog$isObject$$($JSCompiler_temp$$363_arg$$inline_278_clone$$inline_62_object$$inline_366$$)&& 36300<$JSCompiler_temp$$363_arg$$inline_278_clone$$inline_62_object$$inline_366$$.nodeType)){var $JSCompiler_inline_result$$362_length$$inline_367$$;
3630a:{if($JSCompiler_temp$$363_arg$$inline_278_clone$$inline_62_object$$inline_366$$&&"number"==typeof $JSCompiler_temp$$363_arg$$inline_278_clone$$inline_62_object$$inline_366$$.length){if($goog$isObject$$($JSCompiler_temp$$363_arg$$inline_278_clone$$inline_62_object$$inline_366$$)){$JSCompiler_inline_result$$362_length$$inline_367$$="function"==typeof $JSCompiler_temp$$363_arg$$inline_278_clone$$inline_62_object$$inline_366$$.item|| 3631"string"==typeof $JSCompiler_temp$$363_arg$$inline_278_clone$$inline_62_object$$inline_366$$.item;break a}if($goog$isFunction$$($JSCompiler_temp$$363_arg$$inline_278_clone$$inline_62_object$$inline_366$$)){$JSCompiler_inline_result$$362_length$$inline_367$$="function"==typeof $JSCompiler_temp$$363_arg$$inline_278_clone$$inline_62_object$$inline_366$$.item;break a}}$JSCompiler_inline_result$$362_length$$inline_367$$=$JSCompiler_alias_FALSE$$}if($JSCompiler_inline_result$$362_length$$inline_367$$)if($JSCompiler_inline_result$$362_length$$inline_367$$= 3632$JSCompiler_temp$$363_arg$$inline_278_clone$$inline_62_object$$inline_366$$.length,0<$JSCompiler_inline_result$$362_length$$inline_367$$){for(var $rv$$inline_368$$=Array($JSCompiler_inline_result$$362_length$$inline_367$$),$i$$inline_369$$=0;$i$$inline_369$$<$JSCompiler_inline_result$$362_length$$inline_367$$;$i$$inline_369$$++)$rv$$inline_368$$[$i$$inline_369$$]=$JSCompiler_temp$$363_arg$$inline_278_clone$$inline_62_object$$inline_366$$[$i$$inline_369$$];$JSCompiler_temp$$363_arg$$inline_278_clone$$inline_62_object$$inline_366$$= 3633$rv$$inline_368$$}else $JSCompiler_temp$$363_arg$$inline_278_clone$$inline_62_object$$inline_366$$=[];$goog$array$forEach$$($JSCompiler_temp$$363_arg$$inline_278_clone$$inline_62_object$$inline_366$$,$childHandler$$inline_276_doc$$inline_58$$)}else $childHandler$$inline_276_doc$$inline_58$$($JSCompiler_temp$$363_arg$$inline_278_clone$$inline_62_object$$inline_366$$);return $element$$inline_63_tagName$$inline_59_tagNameArr$$inline_61$$} 3634var $goog$dom$TAGS_TO_IGNORE_$$={SCRIPT:1,STYLE:1,HEAD:1,IFRAME:1,OBJECT:1},$goog$dom$PREDEFINED_TAG_VALUES_$$={IMG:" ",BR:"\n"}; 3635function $goog$dom$getTextContent$$($node$$16_textContent$$){if($goog$dom$BrowserFeature$CAN_USE_INNER_TEXT$$&&"innerText"in $node$$16_textContent$$)$node$$16_textContent$$=$node$$16_textContent$$.innerText.replace(/(\n|\r|\n)/g,"\n");else{var $buf$$=[];$goog$dom$getTextContent_$$($node$$16_textContent$$,$buf$$,$JSCompiler_alias_TRUE$$);$node$$16_textContent$$=$buf$$.join("")}$node$$16_textContent$$=$node$$16_textContent$$.replace(/ \xAD /g," ").replace(/\xAD/g,"");$node$$16_textContent$$=$node$$16_textContent$$.replace(/\u200B/g, 3636"");$goog$dom$BrowserFeature$CAN_USE_INNER_TEXT$$||($node$$16_textContent$$=$node$$16_textContent$$.replace(/ +/g," "));" "!=$node$$16_textContent$$&&($node$$16_textContent$$=$node$$16_textContent$$.replace(/^\s*/,""));return $node$$16_textContent$$} 3637function $goog$dom$getTextContent_$$($child$$7_node$$18$$,$buf$$2$$,$normalizeWhitespace$$){if(!($child$$7_node$$18$$.nodeName in $goog$dom$TAGS_TO_IGNORE_$$))if(3==$child$$7_node$$18$$.nodeType)$normalizeWhitespace$$?$buf$$2$$.push(String($child$$7_node$$18$$.nodeValue).replace(/(\n|\r|\n)/g,"")):$buf$$2$$.push($child$$7_node$$18$$.nodeValue);else if($child$$7_node$$18$$.nodeName in $goog$dom$PREDEFINED_TAG_VALUES_$$)$buf$$2$$.push($goog$dom$PREDEFINED_TAG_VALUES_$$[$child$$7_node$$18$$.nodeName]); 3638else for($child$$7_node$$18$$=$child$$7_node$$18$$.firstChild;$child$$7_node$$18$$;)$goog$dom$getTextContent_$$($child$$7_node$$18$$,$buf$$2$$,$normalizeWhitespace$$),$child$$7_node$$18$$=$child$$7_node$$18$$.nextSibling} 3639function $goog$dom$getAncestorByTagNameAndClass$$($element$$25$$,$opt_tag$$2$$){if(!$opt_tag$$2$$)return $JSCompiler_alias_NULL$$;var $JSCompiler_inline_result$$0_tagName$$4$$=$opt_tag$$2$$?$opt_tag$$2$$.toUpperCase():$JSCompiler_alias_NULL$$;a:{for(var $element$$inline_65$$=$element$$25$$,$steps$$inline_70$$=0;$element$$inline_65$$;){if(!$JSCompiler_inline_result$$0_tagName$$4$$||$element$$inline_65$$.nodeName==$JSCompiler_inline_result$$0_tagName$$4$$){$JSCompiler_inline_result$$0_tagName$$4$$=
3640$element$$inline_65$$;break a}$element$$inline_65$$=$element$$inline_65$$.parentNode;$steps$$inline_70$$++}$JSCompiler_inline_result$$0_tagName$$4$$=$JSCompiler_alias_NULL$$}return $JSCompiler_inline_result$$0_tagName$$4$$};function $goog$style$setStyle_$$($element$$30$$,$value$$60$$,$style$$1$$){$element$$30$$.style[String($style$$1$$).replace(/\-([a-z])/g,function($all$$,$match$$){return $match$$.toUpperCase()})]=$value$$60$$};function $goog$events$Listener$$(){}var $goog$events$Listener$counter_$$=0;$JSCompiler_prototypeAlias$$=$goog$events$Listener$$.prototype;$JSCompiler_prototypeAlias$$.key=0;$JSCompiler_prototypeAlias$$.$removed$=$JSCompiler_alias_FALSE$$;$JSCompiler_prototypeAlias$$.$callOnce$=$JSCompiler_alias_FALSE$$; 3641$JSCompiler_prototypeAlias$$.$init$=function $$JSCompiler_prototypeAlias$$$$init$$($listener$$28$$,$proxy$$,$src$$5$$,$type$$54$$,$capture$$,$opt_handler$$){$goog$isFunction$$($listener$$28$$)?this.$isFunctionListener_$=$JSCompiler_alias_TRUE$$:$listener$$28$$&&$listener$$28$$.handleEvent&&$goog$isFunction$$($listener$$28$$.handleEvent)?this.$isFunctionListener_$=$JSCompiler_alias_FALSE$$:$JSCompiler_alias_THROW$$(Error("Invalid listener argument"));this.$listener$=$listener$$28$$;this.$proxy$=$proxy$$; 3642this.src=$src$$5$$;this.type=$type$$54$$;this.capture=!!$capture$$;this.$handler$=$opt_handler$$;this.$callOnce$=$JSCompiler_alias_FALSE$$;this.key=++$goog$events$Listener$counter_$$;this.$removed$=$JSCompiler_alias_FALSE$$};$JSCompiler_prototypeAlias$$.handleEvent=function $$JSCompiler_prototypeAlias$$$handleEvent$($eventObject$$){return this.$isFunctionListener_$?this.$listener$.call(this.$handler$||this.src,$eventObject$$):this.$listener$.handleEvent.call(this.$listener$,$eventObject$$)};!$goog$userAgent$IE$$||$goog$userAgent$isDocumentMode$$();var $goog$events$BrowserFeature$HAS_W3C_EVENT_SUPPORT$$=!$goog$userAgent$IE$$||$goog$userAgent$isDocumentMode$$(),$goog$events$BrowserFeature$SET_KEY_CODE_TO_PREVENT_DEFAULT$$=$goog$userAgent$IE$$&&!$goog$userAgent$isVersion$$("8");!$goog$userAgent$WEBKIT$$||$goog$userAgent$isVersion$$("528"); 3643$goog$userAgent$GECKO$$&&$goog$userAgent$isVersion$$("1.9b")||$goog$userAgent$IE$$&&$goog$userAgent$isVersion$$("8")||$goog$userAgent$OPERA$$&&$goog$userAgent$isVersion$$("9.5")||$goog$userAgent$WEBKIT$$&&$goog$userAgent$isVersion$$("528");$goog$userAgent$GECKO$$&&!$goog$userAgent$isVersion$$("8")||$goog$userAgent$IE$$&&$goog$userAgent$isVersion$$("9");function $goog$Disposable$$(){0!=$goog$Disposable$MonitoringMode$OFF$$&&(this.$creationStack$=Error().stack,$goog$Disposable$instances_$$[$goog$getUid$$(this)]=this)}var $goog$Disposable$MonitoringMode$OFF$$=0,$goog$Disposable$instances_$$={};$goog$Disposable$$.prototype.$disposed_$=$JSCompiler_alias_FALSE$$; 3644$goog$Disposable$$.prototype.$dispose$=function $$goog$Disposable$$$$$dispose$$(){if(!this.$disposed_$&&(this.$disposed_$=$JSCompiler_alias_TRUE$$,this.$disposeInternal$(),0!=$goog$Disposable$MonitoringMode$OFF$$)){var $uid$$=$goog$getUid$$(this);delete $goog$Disposable$instances_$$[$uid$$]}}; 3645function $JSCompiler_StaticMethods_registerDisposable$$($JSCompiler_StaticMethods_registerDisposable$self$$,$disposable$$){$JSCompiler_StaticMethods_registerDisposable$self$$.$dependentDisposables_$||($JSCompiler_StaticMethods_registerDisposable$self$$.$dependentDisposables_$=[]);$JSCompiler_StaticMethods_registerDisposable$self$$.$dependentDisposables_$.push($disposable$$)} 3646$goog$Disposable$$.prototype.$disposeInternal$=function $$goog$Disposable$$$$$disposeInternal$$(){this.$dependentDisposables_$&&$goog$disposeAll$$.apply($JSCompiler_alias_NULL$$,this.$dependentDisposables_$);if(this.$onDisposeCallbacks_$)for(;this.$onDisposeCallbacks_$.length;)this.$onDisposeCallbacks_$.shift()()};function $goog$dispose$$($obj$$63$$){$obj$$63$$&&"function"==typeof $obj$$63$$.$dispose$&&$obj$$63$$.$dispose$()} 3647function $goog$disposeAll$$($var_args$$59$$){for(var $i$$60$$=0,$len$$1$$=arguments.length;$i$$60$$<$len$$1$$;++$i$$60$$){var $disposable$$1$$=arguments[$i$$60$$];$goog$isArrayLike$$($disposable$$1$$)?$goog$disposeAll$$.apply($JSCompiler_alias_NULL$$,$disposable$$1$$):$goog$dispose$$($disposable$$1$$)}};function $goog$events$Event$$($type$$55$$,$opt_target$$1$$){this.type=$type$$55$$;this.currentTarget=this.target=$opt_target$$1$$}$JSCompiler_prototypeAlias$$=$goog$events$Event$$.prototype;$JSCompiler_prototypeAlias$$.$disposeInternal$=function $$JSCompiler_prototypeAlias$$$$disposeInternal$$(){};$JSCompiler_prototypeAlias$$.$dispose$=function $$JSCompiler_prototypeAlias$$$$dispose$$(){};$JSCompiler_prototypeAlias$$.$propagationStopped_$=$JSCompiler_alias_FALSE$$; 3648$JSCompiler_prototypeAlias$$.defaultPrevented=$JSCompiler_alias_FALSE$$;$JSCompiler_prototypeAlias$$.$returnValue_$=$JSCompiler_alias_TRUE$$;$JSCompiler_prototypeAlias$$.preventDefault=function $$JSCompiler_prototypeAlias$$$preventDefault$(){this.defaultPrevented=$JSCompiler_alias_TRUE$$;this.$returnValue_$=$JSCompiler_alias_FALSE$$};function $goog$reflect$sinkValue$$($x$$62$$){$goog$reflect$sinkValue$$[" "]($x$$62$$);return $x$$62$$}$goog$reflect$sinkValue$$[" "]=function $$goog$reflect$sinkValue$$$__0$(){};function $goog$events$BrowserEvent$$($opt_e$$,$opt_currentTarget$$){$opt_e$$&&this.$init$($opt_e$$,$opt_currentTarget$$)}$goog$inherits$$($goog$events$BrowserEvent$$,$goog$events$Event$$);$JSCompiler_prototypeAlias$$=$goog$events$BrowserEvent$$.prototype;$JSCompiler_prototypeAlias$$.target=$JSCompiler_alias_NULL$$;$JSCompiler_prototypeAlias$$.relatedTarget=$JSCompiler_alias_NULL$$;$JSCompiler_prototypeAlias$$.offsetX=0;$JSCompiler_prototypeAlias$$.offsetY=0;$JSCompiler_prototypeAlias$$.clientX=0; 3649$JSCompiler_prototypeAlias$$.clientY=0;$JSCompiler_prototypeAlias$$.screenX=0;$JSCompiler_prototypeAlias$$.screenY=0;$JSCompiler_prototypeAlias$$.button=0;$JSCompiler_prototypeAlias$$.keyCode=0;$JSCompiler_prototypeAlias$$.charCode=0;$JSCompiler_prototypeAlias$$.ctrlKey=$JSCompiler_alias_FALSE$$;$JSCompiler_prototypeAlias$$.altKey=$JSCompiler_alias_FALSE$$;$JSCompiler_prototypeAlias$$.shiftKey=$JSCompiler_alias_FALSE$$;$JSCompiler_prototypeAlias$$.metaKey=$JSCompiler_alias_FALSE$$; 3650$JSCompiler_prototypeAlias$$.$platformModifierKey$=$JSCompiler_alias_FALSE$$;$JSCompiler_prototypeAlias$$.$event_$=$JSCompiler_alias_NULL$$; 3651$JSCompiler_prototypeAlias$$.$init$=function $$JSCompiler_prototypeAlias$$$$init$$($e$$15$$,$opt_currentTarget$$1$$){var $type$$57$$=this.t
3651ype=$e$$15$$.type;$goog$events$Event$$.call(this,$type$$57$$);this.target=$e$$15$$.target||$e$$15$$.srcElement;this.currentTarget=$opt_currentTarget$$1$$;var $relatedTarget$$=$e$$15$$.relatedTarget;if($relatedTarget$$){if($goog$userAgent$GECKO$$){var $JSCompiler_inline_result$$9$$;a:{try{$goog$reflect$sinkValue$$($relatedTarget$$.nodeName);$JSCompiler_inline_result$$9$$= 3652$JSCompiler_alias_TRUE$$;break a}catch($e$$inline_74$$){}$JSCompiler_inline_result$$9$$=$JSCompiler_alias_FALSE$$}$JSCompiler_inline_result$$9$$||($relatedTarget$$=$JSCompiler_alias_NULL$$)}}else"mouseover"==$type$$57$$?$relatedTarget$$=$e$$15$$.fromElement:"mouseout"==$type$$57$$&&($relatedTarget$$=$e$$15$$.toElement);this.relatedTarget=$relatedTarget$$;this.offsetX=$goog$userAgent$WEBKIT$$||$e$$15$$.offsetX!==$JSCompiler_alias_VOID$$?$e$$15$$.offsetX:$e$$15$$.layerX;this.offsetY=$goog$userAgent$WEBKIT$$|| 3653$e$$15$$.offsetY!==$JSCompiler_alias_VOID$$?$e$$15$$.offsetY:$e$$15$$.layerY;this.clientX=$e$$15$$.clientX!==$JSCompiler_alias_VOID$$?$e$$15$$.clientX:$e$$15$$.pageX;this.clientY=$e$$15$$.clientY!==$JSCompiler_alias_VOID$$?$e$$15$$.clientY:$e$$15$$.pageY;this.screenX=$e$$15$$.screenX||0;this.screenY=$e$$15$$.screenY||0;this.button=$e$$15$$.button;this.keyCode=$e$$15$$.keyCode||0;this.charCode=$e$$15$$.charCode||("keypress"==$type$$57$$?$e$$15$$.keyCode:0);this.ctrlKey=$e$$15$$.ctrlKey;this.altKey= 3654$e$$15$$.altKey;this.shiftKey=$e$$15$$.shiftKey;this.metaKey=$e$$15$$.metaKey;this.$platformModifierKey$=$goog$userAgent$MAC$$?$e$$15$$.metaKey:$e$$15$$.ctrlKey;this.state=$e$$15$$.state;this.$event_$=$e$$15$$;$e$$15$$.defaultPrevented&&this.preventDefault();delete this.$propagationStopped_$}; 3655$JSCompiler_prototypeAlias$$.preventDefault=function $$JSCompiler_prototypeAlias$$$preventDefault$(){$goog$events$BrowserEvent$$.$superClass_$.preventDefault.call(this);var $be$$=this.$event_$;if($be$$.preventDefault)$be$$.preventDefault();else if($be$$.returnValue=$JSCompiler_alias_FALSE$$,$goog$events$BrowserFeature$SET_KEY_CODE_TO_PREVENT_DEFAULT$$)try{if($be$$.ctrlKey||112<=$be$$.keyCode&&123>=$be$$.keyCode)$be$$.keyCode=-1}catch($ex$$1$$){}};$JSCompiler_prototypeAlias$$.$disposeInternal$=function $$JSCompiler_prototypeAlias$$$$disposeInternal$$(){};var $goog$events$listeners_$$={},$goog$events$listenerTree_$$={},$goog$events$sources_$$={},$goog$events$onStringMap_$$={}; 3656function $goog$events$listen$$($src$$8$$,$type$$58$$,$key$$44_listener$$31$$,$capture$$1_opt_capt$$2$$,$opt_handler$$1$$){if($type$$58$$){if($goog$isArray$$($type$$58$$)){for(var $i$$61_proxy$$1$$=0;$i$$61_proxy$$1$$<$type$$58$$.length;$i$$61_proxy$$1$$++)$goog$events$listen$$($src$$8$$,$type$$58$$[$i$$61_proxy$$1$$],$key$$44_listener$$31$$,$capture$$1_opt_capt$$2$$,$opt_handler$$1$$);return $JSCompiler_alias_NULL$$}var $capture$$1_opt_capt$$2$$=!!$capture$$1_opt_capt$$2$$,$listenerObj_map$$=$goog$events$listenerTree_$$; 3657$type$$58$$ in $listenerObj_map$$||($listenerObj_map$$[$type$$58$$]={$count_$:0,$remaining_$:0});$listenerObj_map$$=$listenerObj_map$$[$type$$58$$];$capture$$1_opt_capt$$2$$ in $listenerObj_map$$||($listenerObj_map$$[$capture$$1_opt_capt$$2$$]={$count_$:0,$remaining_$:0},$listenerObj_map$$.$count_$++);var $listenerObj_map$$=$listenerObj_map$$[$capture$$1_opt_capt$$2$$],$srcUid$$=$goog$getUid$$($src$$8$$),$listenerArray$$;$listenerObj_map$$.$remaining_$++;if($listenerObj_map$$[$srcUid$$]){$listenerArray$$= 3658$listenerObj_map$$[$srcUid$$];for($i$$61_proxy$$1$$=0;$i$$61_proxy$$1$$<$listenerArray$$.length;
3658$i$$61_proxy$$1$$++)if($listenerObj_map$$=$listenerArray$$[$i$$61_proxy$$1$$],$listenerObj_map$$.$listener$==$key$$44_listener$$31$$&&$listenerObj_map$$.$handler$==$opt_handler$$1$$){if($listenerObj_map$$.$removed$)break;return $listenerArray$$[$i$$61_proxy$$1$$].key}}else $listenerArray$$=$listenerObj_map$$[$srcUid$$]=[],$listenerObj_map$$.$count_$++;var $proxyCallbackFunction$$inline_76$$=$goog$events$handleBrowserEvent_$$, 3659$f$$inline_77$$=$goog$events$BrowserFeature$HAS_W3C_EVENT_SUPPORT$$?function($eventObject$$inline_78$$){return $proxyCallbackFunction$$inline_76$$.call($f$$inline_77$$.src,$f$$inline_77$$.key,$eventObject$$inline_78$$)}:function($eventObject$$inline_79_v$$inline_80$$){$eventObject$$inline_79_v$$inline_80$$=$proxyCallbackFunction$$inline_76$$.call($f$$inline_77$$.src,$f$$inline_77$$.key,$eventObject$$inline_79_v$$inline_80$$);if(!$eventObject$$inline_79_v$$inline_80$$)return $eventObject$$inline_79_v$$inline_80$$}, 3660$i$$61_proxy$$1$$=$f$$inline_77$$;$i$$61_proxy$$1$$.src=$src$$8$$;$listenerObj_map$$=new $goog$events$Listener$$;$listenerObj_map$$.$init$($key$$44_listener$$31$$,$i$$61_proxy$$1$$,$src$$8$$,$type$$58$$,$capture$$1_opt_capt$$2$$,$opt_handler$$1$$);$key$$44_listener$$31$$=$listenerObj_map$$.key;$i$$61_proxy$$1$$.key=$key$$44_listener$$31$$;$listenerArray$$.push($listenerObj_map$$);$goog$events$listeners_$$[$key$$44_listener$$31$$]=$listenerObj_map$$;$goog$events$sources_$$[$srcUid$$]||($goog$events$sources_$$[$srcUid$$]= 3661[]);$goog$events$sources_$$[$srcUid$$].push($listenerObj_map$$);$src$$8$$.addEventListener?($src$$8$$==$goog$global$$||!$src$$8$$.$customEvent_$)&&$src$$8$$.addEventListener($type$$58$$,$i$$61_proxy$$1$$,$capture$$1_opt_capt$$2$$):$src$$8$$.attachEvent($type$$58$$ in $goog$events$onStringMap_$$?$goog$events$onStringMap_$$[$type$$58$$]:$goog$events$onStringMap_$$[$type$$58$$]="on"+$type$$58$$,$i$$61_proxy$$1$$);return $key$$44_listener$$31$$}$JSCompiler_alias_THROW$$(Error("Invalid event type"))} 3662function $goog$events$unlisten$$($listenerArray$$1_objUid$$inline_86_src$$11$$,$type$$60$$,$listener$$34$$,$capture$$2_opt_capt$$5$$,$opt_handler$$4$$){if($goog$isArray$$($type$$60$$))for(var $i$$63_map$$inline_85$$=0;$i$$63_map$$inline_85$$<$type$$60$$.length;
3662$i$$63_map$$inline_85$$++)$goog$events$unlisten$$($listenerArray$$1_objUid$$inline_86_src$$11$$,$type$$60$$[$i$$63_map$$inline_85$$],$listener$$34$$,$capture$$2_opt_capt$$5$$,$opt_handler$$4$$);else{$capture$$2_opt_capt$$5$$=!!$capture$$2_opt_capt$$5$$; 3663a:{$i$$63_map$$inline_85$$=$goog$events$listenerTree_$$;if($type$$60$$ in $i$$63_map$$inline_85$$&&($i$$63_map$$inline_85$$=$i$$63_map$$inline_85$$[$type$$60$$],$capture$$2_opt_capt$$5$$ in $i$$63_map$$inline_85$$&&($i$$63_map$$inline_85$$=$i$$63_map$$inline_85$$[$capture$$2_opt_capt$$5$$],$listenerArray$$1_objUid$$inline_86_src$$11$$=$goog$getUid$$($listenerArray$$1_objUid$$inline_86_src$$11$$),$i$$63_map$$inline_85$$[$listenerArray$$1_objUid$$inline_86_src$$11$$]))){$listenerArray$$1_objUid$$inline_86_src$$11$$= 3664$i$$63_map$$inline_85$$[$listenerArray$$1_objUid$$inline_86_src$$11$$];break a}$listenerArray$$1_objUid$$inline_86_src$$11$$=$JSCompiler_alias_NULL$$}if($listenerArray$$1_objUid$$inline_86_src$$11$$)for($i$$63_map$$inline_85$$=0;$i$$63_map$$inline_85$$<$listenerArray$$1_objUid$$inline_86_src$$11$$.length;
3664$i$$63_map$$inline_85$$++)if($listenerArray$$1_objUid$$inline_86_src$$11$$[$i$$63_map$$inline_85$$].$listener$==$listener$$34$$&&$listenerArray$$1_objUid$$inline_86_src$$11$$[$i$$63_map$$inline_85$$].capture== 3665$capture$$2_opt_capt$$5$$&&$listenerArray$$1_objUid$$inline_86_src$$11$$[$i$$63_map$$inline_85$$].$handler$==$opt_handler$$4$$){$goog$events$unlistenByKey$$($listenerArray$$1_objUid$$inline_86_src$$11$$[$i$$63_map$$inline_85$$].key);break}}} 3666function $goog$events$unlistenByKey$$($key$$46$$){if(!$goog$events$listeners_$$[$key$$46$$])return $JSCompiler_alias_FALSE$$;var $listener$$35_listenerArray$$2$$=$goog$events$listeners_$$[$key$$46$$];if($listener$$35_listenerArray$$2$$.$removed$)return $JSCompiler_alias_FALSE$$;var $src$$12_srcUid$$1$$=$listener$$35_listenerArray$$2$$.src,$type$$61$$=$listener$$35_listenerArray$$2$$.type,$proxy$$2_sourcesArray$$=$listener$$35_listenerArray$$2$$.$proxy$,$capture$$3$$=$listener$$35_listenerArray$$2$$.capture; 3667$src$$12_srcUid$$1$$.removeEventListener?($src$$12_srcUid$$1$$==$goog$global$$||!$src$$12_srcUid$$1$$.$customEvent_$)&&$src$$12_srcUid$$1$$.removeEventListener($type$$61$$,$proxy$$2_sourcesArray$$,$capture$$3$$):$src$$12_srcUid$$1$$.detachEvent&&$src$$12_srcUid$$1$$.detachEvent($type$$61$$ in $goog$events$onStringMap_$$?$goog$events$onStringMap_$$[$type$$61$$]:$goog$events$onStringMap_$$[$type$$61$$]="on"+$type$$61$$,$proxy$$2_sourcesArray$$);$src$$12_srcUid$$1$$=$goog$getUid$$($src$$12_srcUid$$1$$); 3668if($goog$events$sources_$$[$src$$12_srcUid$$1$$]){var $proxy$$2_sourcesArray$$=$goog$events$sources_$$[$src$$12_srcUid$$1$$],$i$$inline_90$$=$goog$array$indexOf$$($proxy$$2_sourcesArray$$,$listener$$35_listenerArray$$2$$);0<=$i$$inline_90$$&&($goog$asserts$assert$$($proxy$$2_sourcesArray$$.length!=$JSCompiler_alias_NULL$$),$goog$array$ARRAY_PROTOTYPE_$$.splice.call($proxy$$2_sourcesArray$$,$i$$inline_90$$,1));0==$proxy$$2_sourcesArray$$.length&&delete $goog$events$sources_$$[$src$$12_srcUid$$1$$]}$listener$$35_listenerArray$$2$$.$removed$= 3669$JSCompiler_alias_TRUE$$;if($listener$$35_listenerArray$$2$$=$goog$events$listenerTree_$$[$type$$61$$][$capture$$3$$][$src$$12_srcUid$$1$$])$listener$$35_listenerArray$$2$$.$needsCleanup_$=$JSCompiler_alias_TRUE$$,$goog$events$cleanUp_$$($type$$61$$,$capture$$3$$,$src$$12_srcUid$$1$$,$listener$$35_listenerArray$$2$$);delete $goog$events$listeners_$$[$key$$46$$];return $JSCompiler_alias_TRUE$$} 3670function $goog$events$cleanUp_$$($type$$62$$,$capture$$4$$,$srcUid$$2$$,$listenerArray$$3$$){if(!$listenerArray$$3$$.$locked_$&&$listenerArray$$3$$.$needsCleanup_$){for(var $oldIndex$$=0,$newIndex$$=0;$oldIndex$$<$listenerArray$$3$$.length;$oldIndex$$++)$listenerArray$$3$$[$oldIndex$$].$removed$?$listenerArray$$3$$[$oldIndex$$].$proxy$.src=$JSCompiler_alias_NULL$$:($oldIndex$$!=$newIndex$$&&($listenerArray$$3$$[$newIndex$$]=$listenerArray$$3$$[$oldIndex$$]),$newIndex$$++);$listenerArray$$3$$.length= 3671$newIndex$$;$listenerArray$$3$$.$needsCleanup_$=$JSCompiler_alias_FALSE$$;0==$newIndex$$&&(delete $goog$events$listenerTree_$$[$type$$62$$][$capture$$4$$][$srcUid$$2$$],$goog$events$listenerTree_$$[$type$$62$$][$capture$$4$$].$count_$--,0==$goog$events$listenerTree_$$[$type$$62$$][$capture$$4$$].$count_$&&(delete $goog$events$listenerTree_$$[$type$$62$$][$capture$$4$$],$goog$events$listenerTree_$$[$type$$62$$].$count_$--),0==$goog$events$listenerTree_$$[$type$$62$$].$count_$&&delete $goog$events$listenerTree_$$[$type$$62$$])}} 3672function $goog$events$fireListeners_$$($listenerArray$$5_map$$4$$,$obj$$69_objUid$$2$$,$type$$68$$,$capture$$9$$,$eventObject$$4$$){var $retval$$=1,$obj$$69_objUid$$2$$=$goog$getUid$$($obj$$69_objUid$$2$$);if($listenerArray$$5_map$$4$$[$obj$$69_objUid$$2$$]){$listenerArray$$5_map$$4$$.$remaining_$--;$listenerArray$$5_map$$4$$=$listenerArray$$5_map$$4$$[$obj$$69_objUid$$2$$];$listenerArray$$5_map$$4$$.$locked_$?$listenerArray$$5_map$$4$$.$locked_$++:$listenerArray$$5_map$$4$$.$locked_$=1;try{for(var $length$$16$$= 3673$listenerArray$$5_map$$4$$.length,$i$$67$$=0;$i$$67$$<$length$$16$$;$i$$67$$++){var $listener$$41$$=$listenerArray$$5_map$$4$$[$i$$67$$];$listener$$41$$&&!$listener$$41$$.$removed$&&($retval$$&=$goog$events$fireListener$$($listener$$41$$,$eventObject$$4$$)!==$JSCompiler_alias_FALSE$$)}}finally{$listenerArray$$5_map$$4$$.$locked_$--,$goog$events$cleanUp_$$($type$$68$$,$capture$$9$$,$obj$$69_objUid$$2$$,$listenerArray$$5_map$$4$$)}}return Boolean($retval$$)} 3674function $goog$events$fireListener$$($listener$$42$$,$eventObject$$5$$){$listener$$42$$.$callOnce$&&$goog$events$unlistenByKey$$($listener$$42$$.key);return $listener$$42$$.handleEvent($eventObject$$5$$)} 3675function $goog$events$handleBrowserEvent_$$($key$$48$$,$opt_evt$$){if(!$goog$events$listeners_$$[$key$$48$$])return $JSCompiler_alias_TRUE$$;var $listener$$43$$=$goog$events$listeners_$$[$key$$48$$],$be$$1_type$$70$$=$listener$$43$$.type,$map$$6$$=$goog$events$listenerTree_$$;if(!($be$$1_type$$70$$ in $map$$6$$))return $JSCompiler_alias_TRUE$$;var $map$$6$$=$map$$6$$[$be$$1_type$$70$$],$ieEvent_part$$inline_96_retval$$1$$,$targetsMap$$1$$;if(!$goog$events$BrowserFeature$HAS_W3C_EVENT_SUPPORT$$){var $JSCompiler_temp$$18_hasCapture$$2_parts$$inline_94$$; 3676if(!($JSCompiler_temp$$18_hasCapture$$2_parts$$inline_94$$=$opt_evt$$))a:{$JSCompiler_temp$$18_hasCapture$$2_parts$$inline_94$$=["window","event"];for(var $cur$$inline_95_hasBubble$$1$$=$goog$global$$;$ieEvent_part$$inline_96_retval$$1$$=$JSCompiler_temp$$18_hasCapture$$2_parts$$inline_94$$.shift();)if($cur$$inline_95_hasBubble$$1$$[$ieEvent_part$$inline_96_retval$$1$$]!=$JSCompiler_alias_NULL$$)$cur$$inline_95_hasBubble$$1$$=$cur$$inline_95_hasBubble$$1$$[$ieEvent_part$$inline_96_retval$$1$$];else{$JSCompiler_temp$$18_hasCapture$$2_parts$$inline_94$$= 3677$JSCompiler_alias_NULL$$;break a}$JSCompiler_temp$$18_hasCapture$$2_parts$$inline_94$$=$cur$$inline_95_hasBubble$$1$$}$ieEvent_part$$inline_96_retval$$1$$=$JSCompiler_temp$$18_hasCapture$$2_parts$$inline_94$$;$JSCompiler_temp$$18_hasCapture$$2_parts$$inline_94$$=$JSCompiler_alias_TRUE$$ in $map$$6$$;$cur$$inline_95_hasBubble$$1$$=$JSCompiler_alias_FALSE$$ in $map$$6$$;if($JSCompiler_temp$$18_hasCapture$$2_parts$$inline_94$$){if(0>$ieEvent_part$$inline_96_retval$$1$$.keyCode||$ieEvent_part$$inline_96_retval$$1$$.returnValue!= 3678$JSCompiler_alias_VOID$$)return $JSCompiler_alias_TRUE$$;a:{var $evt$$14_useReturnValue$$inline_99$$=$JSCompiler_alias_FALSE$$;if(0==$ieEvent_part$$inline_96_retval$$1$$.keyCode)try{$ieEvent_part$$inline_96_retval$$1$$.keyCode=-1;break a}catch($ex$$inline_100$$){$evt$$14_useReturnValue$$inline_99$$=$JSCompiler_alias_TRUE$$}if($evt$$14_useReturnValue$$inline_99$$||$ieEvent_part$$inline_96_retval$$1$$.returnValue==$JSCompiler_alias_VOID$$)$ieEvent_part$$inline_96_retval$$1$$.returnValue=$JSCompiler_alias_TRUE$$}}$evt$$14_useReturnValue$$inline_99$$= 3679new $goog$events$BrowserEvent$$;$evt$$14_useReturnValue$$inline_99$$.$init$($ieEvent_part$$inline_96_retval$$1$$,this);$ieEvent_part$$inline_96_retval$$1$$=$JSCompiler_alias_TRUE$$;try{if($JSCompiler_temp$$18_hasCapture$$2_parts$$inline_94$$){for(var $ancestors$$2$$=[],$parent$$19$$=$evt$$14_useReturnValue$$inline_99$$.currentTarget;$parent$$19$$;$parent$$19$$=$parent$$19$$.parentNode)$ancestors$$2$$.push($parent$$19$$);$targetsMap$$1$$=$map$$6$$[$JSCompiler_alias_TRUE$$];$targetsMap$$1$$.$remaining_$= 3680$targetsMap$$1$$.$count_$;for(var $i$$69$$=$ancestors$$2$$.length-1;!$evt$$14_useReturnValue$$inline_99$$.$propagationStopped_$&&0<=$i$$69$$&&$targetsMap$$1$$.$remaining_$;$i$$69$$--)$evt$$14_useReturnValue$$inline_99$$.currentTarget=$ancestors$$2$$[$i$$69$$],$ieEvent_part$$inline_96_retval$$1$$&=$goog$events$fireListeners_$$($targetsMap$$1$$,$ancestors$$2$$[$i$$69$$],$be$$1_type$$70$$,$JSCompiler_alias_TRUE$$,$evt$$14_useReturnValue$$inline_99$$);if($cur$$inline_95_hasBubble$$1$$){$targetsMap$$1$$= 3681$map$$6$$[$JSCompiler_alias_FALSE$$];$targetsMap$$1$$.$remaining_$=$targetsMap$$1$$.$count_$;for($i$$69$$=0;!$evt$$14_useReturnValue$$inline_99$$.$propagationStopped_$&&$i$$69$$<$ancestors$$2$$.length&&$targetsMap$$1$$.$remaining_$;$i$$69$$++)$evt$$14_useReturnValue$$inline_99$$.currentTarget=$ancestors$$2$$[$i$$69$$],$ieEvent_part$$inline_96_retval$$1$$&=$goog$events$fireListeners_$$($targetsMap$$1$$,$ancestors$$2$$[$i$$69$$],$be$$1_type$$70$$,$JSCompiler_alias_FALSE$$,$evt$$14_useReturnValue$$inline_99$$)}}else $ieEvent_part$$inline_96_retval$$1$$= 3682$goog$events$fireListener$$($listener$$43$$,$evt$$14_useReturnValue$$inline_99$$)}finally{$ancestors$$2$$&&($ancestors$$2$$.length=0)}return $ieEvent_part$$inline_96_retval$$1$$}$be$$1_type$$70$$=new $goog$events$BrowserEvent$$($opt_evt$$,this);return $ieEvent_part$$inline_96_retval$$1$$=$goog$events$fireListener$$($listener$$43$$,$be$$1_type$$70$$)};function $goog$events$EventHandler$$($opt_handler$$7$$){$goog$Disposable$$.call(this);this.$handler_$=$opt_handler$$7$$;this.$keys_$=[]}$goog$inherits$$($goog$events$EventHandler$$,$goog$Disposable$$);var $goog$events$EventHandler$typeArray_$$=[]; 3683function $JSCompiler_StaticMethods_listen$$($JSCompiler_StaticMethods_listen$self$$,$src$$16$$,$type$$71$$,$opt_fn$$,$opt_capture$$1$$,$opt_handler$$8$$){$goog$isArray$$($type$$71$$)||($goog$events$EventHandler$typeArray_$$[0]=$type$$71$$,$type$$71$$=$goog$events$EventHandler$typeArray_$$);for(var $i$$70$$=0;$i$$70$$<$type$$71$$.length;
3683$i$$70$$++){var $key$$49$$=$goog$events$listen$$($src$$16$$,$type$$71$$[$i$$70$$],$opt_fn$$||$JSCompiler_StaticMethods_listen$self$$,$opt_capture$$1$$||$JSCompiler_alias_FALSE$$, 3684$opt_handler$$8$$||$JSCompiler_StaticMethods_listen$self$$.$handler_$||$JSCompiler_StaticMethods_listen$self$$);$JSCompiler_StaticMethods_listen$self$$.$keys_$.push($key$$49$$)}}$goog$events$EventHandler$$.prototype.$disposeInternal$=function $$goog$events$EventHandler$$$$$disposeInternal$$(){$goog$events$EventHandler$$.$superClass_$.$disposeInternal$.call(this);$goog$array$forEach$$(this.$keys_$,$goog$events$unlistenByKey$$);this.$keys_$.length=0}; 3685$goog$events$EventHandler$$.prototype.handleEvent=function $$goog$events$EventHandler$$$$handleEvent$(){$JSCompiler_alias_THROW$$(Error("EventHandler.handleEvent not implemented"))};function $goog$events$EventTarget$$(){$goog$Disposable$$.call(this)}$goog$inherits$$($goog$events$EventTarget$$,$goog$Disposable$$);$JSCompiler_prototypeAlias$$=$goog$events$EventTarget$$.prototype;$JSCompiler_prototypeAlias$$.$customEvent_$=$JSCompiler_alias_TRUE$$;$JSCompiler_prototypeAlias$$.$parentEventTarget_$=$JSCompiler_alias_NULL$$; 3686$JSCompiler_prototypeAlias$$.addEventListener=function $$JSCompiler_prototypeAlias$$$addEventListener$($type$$74$$,$handler$$3$$,$opt_capture$$4$$,$opt_handlerScope$$){$goog$events$listen$$(this,$type$$74$$,$handler$$3$$,$opt_capture$$4$$,$opt_handlerScope$$)}; 3687$JSCompiler_prototypeAlias$$.removeEventListener=function $$JSCompiler_prototypeAlias$$$removeEventListener$($type$$75$$,$handler$$4$$,$opt_capture$$5$$,$opt_handlerScope$$1$$){$goog$events$unlisten$$(this,$type$$75$$,$handler$$4$$,$opt_capture$$5$$,$opt_handlerScope$$1$$)}; 3688$JSCompiler_prototypeAlias$$.dispatchEvent=function $$JSCompiler_prototypeAlias$$$dispatchEvent$($JSCompiler_inline_result$$19_e$$21_e$$inline_106$$){var $hasCapture$$inline_112_type$$inline_107$$=$JSCompiler_inline_result$$19_e$$21_e$$inline_106$$.type||$JSCompiler_inline_result$$19_e$$21_e$$inline_106$$,$map$$inline_108$$=$goog$events$listenerTree_$$;if($hasCapture$$inline_112_type$$inline_107$$ in $map$$inline_108$$){if($goog$isString$$($JSCompiler_inline_result$$19_e$$21_e$$inline_106$$))$JSCompiler_inline_result$$19_e$$21_e$$inline_106$$= 3689new $goog$events$Event$$($JSCompiler_inline_result$$19_e$$21_e$$inline_106$$,this);else if($JSCompiler_inline_result$$19_e$$21_e$$inline_106$$ instanceof $goog$events$Event$$)$JSCompiler_inline_result$$19_e$$21_e$$inline_106$$.target=$JSCompiler_inline_result$$19_e$$21_e$$inline_106$$.target||this;else{var $oldEvent$$inline_109_rv$$inline_110$$=$JSCompiler_inline_result$$19_e$$21_e$$inline_106$$,$JSCompiler_inline_result$$19_e$$21_e$$inline_106$$=new $goog$events$Event$$($hasCapture$$inline_112_type$$inline_107$$, 3690this);$goog$object$extend$$($JSCompiler_inline_result$$19_e$$21_e$$inline_106$$,$oldEvent$$inline_109_rv$$inline_110$$)}var $oldEvent$$inline_109_rv$$inline_110$$=1,$ancestors$$inline_111_current$$inline_116$$,$map$$inline_108$$=$map$$inline_108$$[$hasCapture$$inline_112_type$$inline_107$$],$hasCapture$$inline_112_type$$inline_107$$=$JSCompiler_alias_TRUE$$ in $map$$inline_108$$,$parent$$inline_114_targetsMap$$inline_113$$;if($hasCapture$$inline_112_type$$inline_107$$){$ancestors$$inline_111_current$$inline_116$$= 3691[];for($parent$$inline_114_targetsMap$$inline_113$$=this;$parent$$inline_114_targetsMap$$inline_113$$;$parent$$inline_114_targetsMap$$inline_113$$=$parent$$inline_114_targetsMap$$inline_113$$.$parentEventTarget_$)$ancestors$$inline_111_current$$inline_116$$.push($parent$$inline_114_targetsMap$$inline_113$$);$parent$$inline_114_targetsMap$$inline_113$$=$map$$inline_108$$[$JSCompiler_alias_TRUE$$];$parent$$inline_114_targetsMap$$inline_113$$.$remaining_$=$parent$$inline_114_targetsMap$$inline_113$$.$count_$; 3692for(var $i$$inline_115$$=$ancestors$$inline_111_current$$inline_116$$.length-1;!$JSCompiler_inline_result$$19_e$$21_e$$inline_106$$.$propagationStopped_$&&0<=$i$$inline_115$$&&$parent$$inline_114_targetsMap$$inline_113$$.$remaining_$;$i$$inline_115$$--)$JSCompiler_inline_result$$19_e$$21_e$$inline_106$$.currentTarget=$ancestors$$inline_111_current$$inline_116$$[$i$$inline_115$$],$oldEvent$$inline_109_rv$$inline_110$$&=$goog$events$fireListeners_$$($parent$$inline_114_targetsMap$$inline_113$$,$ancestors$$inline_111_current$$inline_116$$[$i$$inline_115$$], 3693$JSCompiler_inline_result$$19_e$$21_e$$inline_106$$.type,$JSCompiler_alias_TRUE$$,$JSCompiler_inline_result$$19_e$$21_e$$inline_106$$)&&$JSCompiler_inline_result$$19_e$$21_e$$inline_106$$.$returnValue_$!=$JSCompiler_alias_FALSE$$}if($JSCompiler_alias_FALSE$$ in $map$$inline_108$$)if($parent$$inline_114_targetsMap$$inline_113$$=$map$$inline_108$$[$JSCompiler_alias_FALSE$$],$parent$$inline_114_targetsMap$$inline_113$$.$remaining_$=$parent$$inline_114_targetsMap$$inline_113$$.$count_$,$hasCapture$$inline_112_type$$inline_107$$)for($i$$inline_115$$= 36940;!$JSCompiler_inline_result$$19_e$$21_e$$inline_106$$.$propagationStopped_$&&$i$$inline_115$$<$ancestors$$inline_111_current$$inline_116$$.length&&$parent$$inline_114_targetsMap$$inline_113$$.$remaining_$;$i$$inline_115$$++)$JSCompiler_inline_result$$19_e$$21_e$$inline_106$$.currentTarget=$ancestors$$inline_111_current$$inline_116$$[$i$$inline_115$$],$oldEvent$$inline_109_rv$$inline_110$$&=$goog$events$fireListeners_$$($parent$$inline_114_targetsMap$$inline_113$$,$ancestors$$inline_111_current$$inline_116$$[$i$$inline_115$$], 3695$JSCompiler_inline_result$$19_e$$21_e$$inline_106$$.type,$JSCompiler_alias_FALSE$$,$JSCompiler_inline_result$$19_e$$21_e$$inline_106$$)&&$JSCompiler_inline_result$$19_e$$21_e$$inline_106$$.$returnValue_$!=$JSCompiler_alias_FALSE$$;else for($ancestors$$inline_111_current$$inline_116$$=this;!$JSCompiler_inline_result$$19_e$$21_e$$inline_106$$.$propagationStopped_$&&$ancestors$$inline_111_current$$inline_116$$&&$parent$$inline_114_targetsMap$$inline_113$$.$remaining_$;$ancestors$$inline_111_current$$inline_116$$= 3696$ancestors$$inline_111_current$$inline_116$$.$parentEventTarget_$)$JSCompiler_inline_result$$19_e$$21_e$$inline_106$$.currentTarget=$ancestors$$inline_111_current$$inline_116$$,$oldEvent$$inline_109_rv$$inline_110$$&=$goog$events$fireListeners_$$($parent$$inline_114_targetsMap$$inline_113$$,$ancestors$$inline_111_current$$inline_116$$,$JSCompiler_inline_result$$19_e$$21_e$$inline_106$$.type,$JSCompiler_alias_FALSE$$,$JSCompiler_inline_result$$19_e$$21_e$$inline_106$$)&&$JSCompiler_inline_result$$19_e$$21_e$$inline_106$$.$returnValue_$!= 3697$JSCompiler_alias_FALSE$$;
3697$JSCompiler_inline_result$$19_e$$21_e$$inline_106$$=Boolean($oldEvent$$inline_109_rv$$inline_110$$)}else $JSCompiler_inline_result$$19_e$$21_e$$inline_106$$=$JSCompiler_alias_TRUE$$;return $JSCompiler_inline_result$$19_e$$21_e$$inline_106$$}; 3698$JSCompiler_prototypeAlias$$.$disposeInternal$=function $$JSCompiler_prototypeAlias$$$$disposeInternal$$(){$goog$events$EventTarget$$.$superClass_$.$disposeInternal$.call(this);var $opt_capt$$inline_120$$,$count$$inline_121$$=0,$noCapt$$inline_124$$=$opt_capt$$inline_120$$==$JSCompiler_alias_NULL$$;$opt_capt$$inline_120$$=!!$opt_capt$$inline_120$$;if(this==$JSCompiler_alias_NULL$$)$goog$object$forEach$$($goog$events$sources_$$,function($listeners$$inline_129$$){for(var $i$$inline_130$$=$listeners$$inline_129$$.length- 36991;0<=$i$$inline_130$$;$i$$inline_130$$--){var $listener$$inline_131$$=$listeners$$inline_129$$[$i$$inline_130$$];if($noCapt$$inline_124$$||$opt_capt$$inline_120$$==$listener$$inline_131$$.capture)$goog$events$unlistenByKey$$($listener$$inline_131$$.key),$count$$inline_121$$++}});else{var $sourcesArray$$inline_126_srcUid$$inline_125$$=$goog$getUid$$(this);if($goog$events$sources_$$[$sourcesArray$$inline_126_srcUid$$inline_125$$])for(var $sourcesArray$$inline_126_srcUid$$inline_125$$=$goog$events$sources_$$[$sourcesArray$$inline_126_srcUid$$inline_125$$], 3700$i$$inline_127$$=$sourcesArray$$inline_126_srcUid$$inline_125$$.length-1;0<=$i$$inline_127$$;$i$$inline_127$$--){var $listener$$inline_128$$=$sourcesArray$$inline_126_srcUid$$inline_125$$[$i$$inline_127$$];if($noCapt$$inline_124$$||$opt_capt$$inline_120$$==$listener$$inline_128$$.capture)$goog$events$unlistenByKey$$($listener$$inline_128$$.key),$count$$inline_121$$++}}this.$parentEventTarget_$=$JSCompiler_alias_NULL$$};var $goog$Timer$defaultTimerObject$$=$goog$global$$.window;function $pn$ui$DelayedThrottleInputListener$$($delay$$3$$){$goog$asserts$assert$$("number"==typeof $delay$$3$$);$goog$Disposable$$.call(this);this.$delay_$=$delay$$3$$;this.$lastFilterValue_$=this.$currentValue_$="";this.$timerId_$=this.$lastInputTime_$=0;this.$eh_$=new $goog$events$EventHandler$$(this);$JSCompiler_StaticMethods_registerDisposable$$(this,this.$eh_$)}$goog$inherits$$($pn$ui$DelayedThrottleInputListener$$,$goog$events$EventTarget$$); 3701function $JSCompiler_StaticMethods_addInput$$($JSCompiler_StaticMethods_addInput$self$$,$inp$$){$goog$asserts$assert$$($inp$$);$goog$asserts$assert$$($JSCompiler_alias_TRUE$$);var $type$$inline_135$$=$inp$$.options?"select-one":$inp$$.getAttribute("type");$JSCompiler_StaticMethods_listen$$($JSCompiler_StaticMethods_addInput$self$$.$eh_$,$inp$$,"text"===$type$$inline_135$$?"keyup":"checkbox"===$type$$inline_135$$?"click":"change",$JSCompiler_StaticMethods_addInput$self$$.$onInputEvent_$)} 3702$pn$ui$DelayedThrottleInputListener$$.prototype.$onInputEvent_$=function $$pn$ui$DelayedThrottleInputListener$$$$$onInputEvent_$$($e$$22$$){$goog$asserts$assert$$($e$$22$$&&$e$$22$$.target);this.$currentValue_$=$e$$22$$.target.value;this.$lastInputTime_$=(new Date).getTime();this.$timerId_$&&($goog$Timer$defaultTimerObject$$.clearTimeout(this.$timerId_$),this.$timerId_$=0);this.$checkTimer_$()}; 3703$pn$ui$DelayedThrottleInputListener$$.prototype.$checkTimer_$=function $$pn$ui$DelayedThrottleInputListener$$$$$checkTimer_$$(){var $curtime_e$$inline_140_listener$$inline_142$$=(new Date).getTime();if(!this.$delay_$||$curtime_e$$inline_140_listener$$inline_142$$-this.$lastInputTime_$>=this.$delay_$)clearTimeout(this.$timerId_$),this.$lastFilterValue_$!==this.$currentValue_$&&($curtime_e$$inline_140_listener$$inline_142$$=new $goog$events$Event$$("input-changed"),$curtime_e$$inline_140_listener$$inline_142$$.value= 3704this.$lastFilterValue_$=this.$currentValue_$,this.dispatchEvent($curtime_e$$inline_140_listener$$inline_142$$)),this.$timerId_$=0;else{var $curtime_e$$inline_140_listener$$inline_142$$=this.$checkTimer_$,$opt_delay$$inline_143$$=this.$delay_$/3;$goog$isFunction$$($curtime_e$$inline_140_listener$$inline_142$$)?this&&($curtime_e$$inline_140_listener$$inline_142$$=$goog$bind$$($curtime_e$$inline_140_listener$$inline_142$$,this)):$curtime_e$$inline_140_listener$$inline_142$$&&"function"==typeof $curtime_e$$inline_140_listener$$inline_142$$.handleEvent? 3705$curtime_e$$inline_140_listener$$inline_142$$=$goog$bind$$($curtime_e$$inline_140_listener$$inline_142$$.handleEvent,$curtime_e$$inline_140_listener$$inline_142$$):$JSCompiler_alias_THROW$$(Error("Invalid listener argument"));this.$timerId_$=2147483647<$opt_delay$$inline_143$$?-1:$goog$Timer$defaultTimerObject$$.setTimeout($curtime_e$$inline_140_listener$$inline_142$$,$opt_delay$$inline_143$$||0)}};function $goog$net$Cookies$$($context$$){this.$document_$=$context$$}var $goog$net$Cookies$SPLIT_RE_$$=/\s*;\s*/; 3706$goog$net$Cookies$$.prototype.set=function $$goog$net$Cookies$$$$set$($name$$64$$,$value$$69$$,$expiresStr_opt_maxAge$$,$opt_path_pathStr$$,$domainStr_opt_domain$$,$opt_secure_secureStr$$){/[;=\s]/.test($name$$64$$)&&$JSCompiler_alias_THROW$$(Error('Invalid cookie name "'+$name$$64$$+'"'));/[;\n]/.test($value$$69$$)&&$JSCompiler_alias_THROW$$(Error('Invalid cookie value "'+$value$$69$$+'"'));$expiresStr_opt_maxAge$$!==$JSCompiler_alias_VOID$$||($expiresStr_opt_maxAge$$=-1);$domainStr_opt_domain$$= 3707$domainStr_opt_domain$$?";domain="+$domainStr_opt_domain$$:"";$opt_path_pathStr$$=$opt_path_pathStr$$?";path="+$opt_path_pathStr$$:"";$opt_secure_secureStr$$=$opt_secure_secureStr$$?";secure":"";$expiresStr_opt_maxAge$$=0>$expiresStr_opt_maxAge$$?"":0==$expiresStr_opt_maxAge$$?";expires="+(new Date(1970,1,1)).toUTCString():";expires="+(new Date($goog$now$$()+1E3*$expiresStr_opt_maxAge$$)).toUTCString();this.$document_$.cookie=$name$$64$$+"="+$value$$69$$+$domainStr_opt_domain$$+$opt_path_pathStr$$+ 3708$expiresStr_opt_maxAge$$+$opt_secure_secureStr$$};$goog$net$Cookies$$.prototype.get=function $$goog$net$Cookies$$$$get$($name$$65$$,$opt_default$$){for(var $nameEq$$=$name$$65$$+"=",$parts$$3$$=(this.$document_$.cookie||"").split($goog$net$Cookies$SPLIT_RE_$$),$i$$73$$=0,$part$$2$$;$part$$2$$=$parts$$3$$[$i$$73$$];$i$$73$$++){if(0==$part$$2$$.indexOf($nameEq$$))return $part$$2$$.substr($nameEq$$.length);if($part$$2$$==$name$$65$$)return""}return $opt_default$$};var $goog$net$cookies$$=new $goog$net$Cookies$$(document); 3709$goog$net$cookies$$.$MAX_COOKIE_LENGTH$=3950;function $pn$ui$filter$SearchEngine$$(){this.$precedences_$={or:1,and:2,not:3}} 3710function $JSCompiler_StaticMethods_doesNumberMatchToken_$$($token$$5$$,$text$$12$$){var $op_txt$$inline_166$$,$exp$$,$actual$$;$op_txt$$inline_166$$=$text$$12$$;"$"===$op_txt$$inline_166$$.charAt(0)&&($op_txt$$inline_166$$=$op_txt$$inline_166$$.substring(1));$actual$$=parseFloat($op_txt$$inline_166$$);
3710if(0===$token$$5$$.indexOf("="))$op_txt$$inline_166$$="=",$exp$$=parseFloat($token$$5$$.substring(1));else if(0===$token$$5$$.indexOf("!="))$op_txt$$inline_166$$="!=",$exp$$=parseFloat($token$$5$$.substring(2)); 3711else if(0===$token$$5$$.indexOf(">="))$op_txt$$inline_166$$=">=",$exp$$=parseFloat($token$$5$$.substring(2));else if(0===$token$$5$$.indexOf(">"))$op_txt$$inline_166$$=">",$exp$$=parseFloat($token$$5$$.substring(1));else if(0===$token$$5$$.indexOf("<="))$op_txt$$inline_166$$="<=",$exp$$=parseFloat($token$$5$$.substring(2));else if(0===$token$$5$$.indexOf("<"))$op_txt$$inline_166$$="<",$exp$$=parseFloat($token$$5$$.substring(1));else return $JSCompiler_alias_TRUE$$;switch($op_txt$$inline_166$$){case "!=":return $actual$$!== 3712$exp$$;case "=":return $actual$$===$exp$$;case ">=":return $actual$$>=$exp$$;case ">":return $actual$$>$exp$$;case "<=":return $actual$$<=$exp$$;case "<":return $actual$$<$exp$$}$JSCompiler_alias_THROW$$(Error("Could not find a number operation: "+$op_txt$$inline_166$$))} 3713function $JSCompiler_StaticMethods_normaliseTerm_$$($tokens$$1$$,$token$$7$$,$term$$){for(var $idx$$1$$=$token$$7$$.indexOf($term$$);-1!==$idx$$1$$;)0<$idx$$1$$&&$tokens$$1$$.push($token$$7$$.substring(0,$idx$$1$$)),$tokens$$1$$.push($term$$),$token$$7$$=$token$$7$$.substring($idx$$1$$+1),$idx$$1$$=$token$$7$$.indexOf($term$$);return $token$$7$$};function $pn$ui$filter$GenericListFilter$$($input$$,$list$$,$options$$2$$){$goog$Disposable$$.call(this);this.list=$list$$;this.options=$options$$2$$;$JSCompiler_StaticMethods_registerDisposable$$(this,this.options);this.$input_$=$input$$;this.$listItems$=[];this.$filters$=[this.$input_$];this.$eh_$=new $goog$events$EventHandler$$(this);$JSCompiler_StaticMethods_registerDisposable$$(this,this.$eh_$);this.$inputListener_$=new $pn$ui$DelayedThrottleInputListener$$(parseInt(this.options.filterDelay, 371410)||200);$JSCompiler_StaticMethods_registerDisposable$$(this,this.$inputListener_$);this.$filterKey_$="";this.$search_$=new $pn$ui$filter$SearchEngine$$;this.$initialiseFilters$()}$goog$inherits$$($pn$ui$filter$GenericListFilter$$,$goog$Disposable$$);var $pn$ui$filter$GenericListFilter$filteridx_$$=0;$JSCompiler_prototypeAlias$$=$pn$ui$filter$GenericListFilter$$.prototype; 3715$JSCompiler_prototypeAlias$$.$resetList$=function $$JSCompiler_prototypeAlias$$$$resetList$$($list$$1$$){$goog$dispose$$(this.list);$goog$array$forEach$$(this.$listItems$,$goog$dispose$$);this.list=$list$$1$$;this.$initialiseControlCaches$();$JSCompiler_StaticMethods_registerListenersOnFilters_$$(this);$JSCompiler_StaticMethods_loadFiltersFromCookie_$$(this)}; 3716function $JSCompiler_StaticMethods_getListId$$($JSCompiler_StaticMethods_getListId$self$$){return $JSCompiler_StaticMethods_getListId$self$$.list.getAttribute("id")||$JSCompiler_StaticMethods_getListId$self$$.list.getAttribute("name")||""} 3717$JSCompiler_prototypeAlias$$.$initialiseFilters$=function $$JSCompiler_prototypeAlias$$$$initialiseFilters$$(){this.$filterKey_$=$JSCompiler_StaticMethods_getListId$$(this)+"_"+ ++$pn$ui$filter$GenericListFilter$filteridx_$$+"_filters";this.$initialiseControlCaches$();$JSCompiler_StaticMethods_registerListenersOnFilters_$$(this);$JSCompiler_StaticMethods_loadFiltersFromCookie_$$(this)}; 3718function $JSCompiler_StaticMethods_registerListenersOnFilters_$$($JSCompiler_StaticMethods_registerListenersOnFilters_$self$$){$JSCompiler_StaticMethods_listen$$($JSCompiler_StaticMethods_registerListenersOnFilters_$self$$.$eh_$,$JSCompiler_StaticMethods_registerListenersOnFilters_$self$$.$inputListener_$,"input-changed",$JSCompiler_StaticMethods_registerListenersOnFilters_$self$$.refresh);$goog$array$forEach$$($JSCompiler_StaticMethods_registerListenersOnFilters_$self$$.$filters$,function($filter$$){$JSCompiler_StaticMethods_addInput$$(this.$inputListener_$, 3719$filter$$)},$JSCompiler_StaticMethods_registerListenersOnFilters_$self$$);if($JSCompiler_StaticMethods_registerListenersOnFilters_$self$$.options.clearFiltersControls)for(var $i$$81$$=0;$i$$81$$<$JSCompiler_StaticMethods_registerListenersOnFilters_$self$$.options.clearFiltersControls.length;$i$$81$$++)$JSCompiler_StaticMethods_registerListenersOnFilters_$self$$.options.clearFiltersControl
3719s[$i$$81$$].length&&($JSCompiler_StaticMethods_registerListenersOnFilters_$self$$.options.clearFiltersControls[$i$$81$$]= 3720$JSCompiler_StaticMethods_registerListenersOnFilters_$self$$.options.clearFiltersControls[$i$$81$$][0]),$JSCompiler_StaticMethods_listen$$($JSCompiler_StaticMethods_registerListenersOnFilters_$self$$.$eh_$,$JSCompiler_StaticMethods_registerListenersOnFilters_$self$$.options.clearFiltersControls[$i$$81$$],"click",$JSCompiler_StaticMethods_registerListenersOnFilters_$self$$.$clearAllFilters$,$JSCompiler_alias_FALSE$$,$JSCompiler_StaticMethods_registerListenersOnFilters_$self$$);if($JSCompiler_StaticMethods_registerListenersOnFilters_$self$$.options.additionalFilterTriggers)for($i$$81$$= 37210;$i$$81$$<$JSCompiler_StaticMethods_registerListenersOnFilters_$self$$.options.additionalFilterTriggers.length;$i$$81$$++){var $trigger$$=$JSCompiler_StaticMethods_registerListenersOnFilters_$self$$.options.additionalFilterTriggers[$i$$81$$];$trigger$$.length&&($trigger$$=$JSCompiler_StaticMethods_registerListenersOnFilters_$self$$.options.additionalFilterTriggers[$i$$81$$]=$trigger$$[0]);$JSCompiler_StaticMethods_addInput$$($JSCompiler_StaticMethods_registerListenersOnFilters_$self$$.$inputListener_$, 3722$trigger$$)}}$JSCompiler_prototypeAlias$$.$clearAllFilters$=function $$JSCompiler_prototypeAlias$$$$clearAllFilters$$(){$goog$array$forEach$$(this.$filters$,this.$clearFilterValue$,this);this.options.additionalFilterTriggers&&$goog$array$forEach$$(this.options.additionalFilterTriggers,this.$clearFilterValue$,this);this.refresh()}; 3723$JSCompiler_prototypeAlias$$.$clearFilterValue$=function $$JSCompiler_prototypeAlias$$$$clearFilterValue$$($f$$26$$){var $type$$77$$=$f$$26$$.options?"select-one":$f$$26$$.getAttribute("type");switch($type$$77$$){case "select-one":$f$$26$$.selectedIndex=0;break;case "text":$f$$26$$.value="";break;case "checkbox":$f$$26$$.checked=$JSCompiler_alias_FALSE$$;break;default:$JSCompiler_alias_THROW$$("Filter type "+$type$$77$$+" is not supported")}}; 3724$JSCompiler_prototypeAlias$$.$initialiseControlCaches$=function $$JSCompiler_prototypeAlias$$$$initialiseControlCaches$$(){this.$listItems$=this.list.childNodes}; 3725function $JSCompiler_StaticMethods_loadFiltersFromCookie_$$($JSCompiler_StaticMethods_loadFiltersFromCookie_$self$$){var $additionalStates_filterState_sharedCookieId$$=$JSCompiler_StaticMethods_loadFiltersFromCookie_$self$$.options.enableCookies&&$goog$net$cookies$$.get($JSCompiler_StaticMethods_loadFiltersFromCookie_$self$$.$filterKey_$),$states$$=[];if($additionalStates_filterState_sharedCookieId$$)for(var $additionalStates_filterState_sharedCookieId$$=$additionalStates_filterState_sharedCookieId$$.split("|"), 3726$i$$82_k$$=0;$i$$82_k$$<$additionalStates_filterState_sharedCookieId$$.length;$i$$82_k$$++){var $additionalFilterStates_found$$2_s$$19$$=$additionalStates_filterState_sharedCookieId$$[$i$$82_k$$].split(","),$fid_fs_header$$2_headerText$$=new $pn$ui$filter$FilterState$$($additionalFilterStates_found$$2_s$$19$$[0],$additionalFilterStates_found$$2_s$$19$$[3],parseInt($additionalFilterStates_found$$2_s$$19$$[1],10),$additionalFilterStates_found$$2_s$$19$$[2]);
3726$states$$.push($fid_fs_header$$2_headerText$$)}if($additionalStates_filterState_sharedCookieId$$= 3727$JSCompiler_StaticMethods_loadFiltersFromCookie_$self$$.options.sharedCookieId){$additionalFilterStates_found$$2_s$$19$$=$JSCompiler_StaticMethods_loadFiltersFromCookie_$self$$.options.enableCookies&&$goog$net$cookies$$.get($additionalStates_filterState_sharedCookieId$$);if(!$additionalFilterStates_found$$2_s$$19$$)return;$additionalFilterStates_found$$2_s$$19$$=$additionalFilterStates_found$$2_s$$19$$.split("|");$additionalStates_filterState_sharedCookieId$$=[];for($i$$82_k$$=0;$i$$82_k$$<$additionalFilterStates_found$$2_s$$19$$.length;$i$$82_k$$++){var $j$$7_state$$= 3728$additionalFilterStates_found$$2_s$$19$$[$i$$82_k$$].split(","),$stateHeaderTextOrAdditionalFilterId$$=$j$$7_state$$[0];if("#"==$stateHeaderTextOrAdditionalFilterId$$.charAt(0))$fid_fs_header$$2_headerText$$=new $pn$ui$filter$FilterState$$($stateHeaderTextOrAdditionalFilterId$$.substr(1),$j$$7_state$$[3],-1,$j$$7_state$$[2]),$additionalStates_filterState_sharedCookieId$$.push($fid_fs_header$$2_headerText$$);else for(var $hidx$$=0;$hidx$$<$JSCompiler_StaticMethods_loadFiltersFromCookie_$self$$.$headers_$.length;$hidx$$++){var $fid_fs_header$$2_headerText$$= 3729$JSCompiler_StaticMethods_loadFiltersFromCookie_$self$$.$headers_$[$hidx$$],$visible$$="none"!=$fid_fs_header$$2_headerText$$.style.display;if(($fid_fs_header$$2_headerText$$="false"===$fid_fs_header$$2_headerText$$.getAttribute("filter")||!$visible$$?$JSCompiler_alias_NULL$$:$goog$dom$getTextContent$$($fid_fs_header$$2_headerText$$))&&$fid_fs_header$$2_headerText$$==$stateHeaderTextOrAdditionalFilterId$$)$fid_fs_header$$2_headerText$$=$JSCompiler_StaticMethods_loadFiltersFromCookie_$self$$.$filters$[$JSCompiler_StaticMethods_loadFiltersFromCookie_$self$$.$filterColumnIndexes_$.indexOf($hidx$$)].getAttribute("id"), 3730$fid_fs_header$$2_headerText$$=new $pn$ui$filter$FilterState$$($fid_fs_header$$2_headerText$$,$j$$7_state$$[3],$hidx$$,$j$$7_state$$[2]),$additionalStates_filterState_sharedCookieId$$.push($fid_fs_header$$2_headerText$$)}}for($i$$82_k$$=0;$i$$82_k$$<$additionalStates_filterState_sharedCookieId$$.length;$i$$82_k$$++){$additionalFilterStates_found$$2_s$$19$$=$JSCompiler_alias_FALSE$$;for($j$$7_state$$=0;$j$$7_state$$<$states$$.length;$j$$7_state$$++)$additionalStates_filterState_sharedCookieId$$[$i$$82_k$$].id== 3731$states$$[$j$$7_state$$].id&&($states$$[$j$$7_state$$].value=$additionalStates_filterState_sharedCookieId$$[$i$$82_k$$].value,$additionalFilterStates_found$$2_s$$19$$=$JSCompiler_alias_TRUE$$);
3731$additionalFilterStates_found$$2_s$$19$$||$states$$.push($additionalStates_filterState_sharedCookieId$$[$i$$82_k$$])}}$JSCompiler_StaticMethods_applyFilterStates_$$($JSCompiler_StaticMethods_loadFiltersFromCookie_$self$$,$states$$,$JSCompiler_alias_TRUE$$)} 3732$JSCompiler_prototypeAlias$$.refresh=function $$JSCompiler_prototypeAlias$$$refresh$(){var $filterStates$$=this.$getFilterStates$();$JSCompiler_StaticMethods_applyFilterStates_$$(this,$filterStates$$,$JSCompiler_alias_FALSE$$);if(this.options.enableCookies){for(var $filterStatesById$$inline_175$$=[],$filterStatesByHeaderText$$inline_176$$=[],$sharedCookieId$$inline_177$$=$JSCompiler_alias_NULL$$,$i$$inline_178$$=0;$i$$inline_178$$<$filterStates$$.length;$i$$inline_178$$++){var $state$$inline_179$$= 3733$filterStates$$[$i$$inline_178$$];$JSCompiler_StaticMethods_addFilterStateToStringArray_$$($filterStatesById$$inline_175$$,$state$$inline_179$$);if($sharedCookieId$$inline_177$$=this.options.sharedCookieId){var $header$$inline_181_headerText$$inline_180$$;if(0<=$state$$inline_179$$.$idx$){$header$$inline_181_headerText$$inline_180$$=this.$headers_$[$state$$inline_179$$.$idx$];var $visible$$inline_182$$="none"!=$header$$inline_181_headerText$$inline_180$$.style.display;$header$$inline_181_headerText$$inline_180$$= 3734"false"===$header$$inline_181_headerText$$inline_180$$.getAttribute("filter")||!$visible$$inline_182$$?$JSCompiler_alias_NULL$$:$goog$dom$getTextContent$$($header$$inline_181_headerText$$inline_180$$)}else $header$$inline_181_headerText$$inline_180$$="#"+$state$$inline_179$$.id;$header$$inline_181_headerText$$inline_180$$&&($filterStatesByHeaderText$$inline_176$$=$JSCompiler_StaticMethods_addFilterStateToStringArray_$$($filterStatesByHeaderText$$inline_176$$,new $pn$ui$filter$FilterState$$($header$$inline_181_headerText$$inline_180$$, 3735$state$$inline_179$$.value,$state$$inline_179$$.$idx$,$state$$inline_179$$.type)))}}$goog$net$cookies$$.set(this.$filterKey_$,$filterStatesById$$inline_175$$.join(""),999999);$sharedCookieId$$inline_177$$&&$goog$net$cookies$$.set($sharedCookieId$$inline_177$$,$filterStatesByHeaderText$$inline_176$$.join(""),999999)}}; 3736$JSCompiler_prototypeAlias$$.$getFilterStates$=function $$JSCompiler_prototypeAlias$$$$getFilterStates$$(){var $state$$1$$=this.$getFilterStateForFilter$(this.$input_$);return $state$$1$$?[$state$$1$$]:[]}; 3737$JSCompiler_prototypeAlias$$.$getFilterStateForFilter$=function $$JSCompiler_prototypeAlias$$$$getFilterStateForFilter$$($filter$$2_id$$3$$){var $type$$78$$=$filter$$2_id$$3$$.options?"select-one":$filter$$2_id$$3$$.getAttribute("type"),$value$$71$$;switch($type$$78$$){case "text":$value$$71$$=$filter$$2_id$$3$$.value===$JSCompiler_alias_NULL$$?$JSCompiler_alias_NULL$$:$filter$$2_id$$3$$.value.toLowerCase();break;case "select-one":$value$$71$$=0===$filter$$2_id$$3$$.selectedIndex?$JSCompiler_alias_NULL$$: 3738$filter$$2_id$$3$$.options[$filter$$2_id$$3$$.selectedIndex].value;break;case "checkbox":$value$$71$$=$filter$$2_id$$3$$.checked;break;default:$JSCompiler_alias_THROW$$("Filter type "+$type$$78$$+" is not supported")}if($value$$71$$===$JSCompiler_alias_NULL$$||0>=$value$$71$$.length)return $JSCompiler_alias_NULL$$;$filter$$2_id$$3$$=$filter$$2_id$$3$$.getAttribute("id");return new $pn$ui$filter$FilterState$$($filter$$2_id$$3$$,$value$$71$$,0,$type$$78$$)}; 3739function $JSCompiler_StaticMethods_addFilterStateToStringArray_$$($arr$$56$$,$state$$3$$){0<$arr$$56$$.length&&$arr$$56$$.push("|");$arr$$56$$.push($state$$3$$.id);$arr$$56$$.push(",");$arr$$56$$.push($state$$3$$.$idx$);$arr$$56$$.push(",");$arr$$56$$.push($state$$3$$.type);$arr$$56$$.push(",");$arr$$56$$.push($state$$3$$.value)} 3740function $JSCompiler_StaticMethods_applyFilterStates_$$($JSCompiler_StaticMethods_applyFilterStates_$self$$,$filterStates$$1$$,$i$$inline_288_setValueOnFilter$$){$JSCompiler_StaticMethods_applyFilterStates_$self$$.options.filteringElements&&$JSCompiler_StaticMethods_applyFilterStates_$self$$.options.filteringElements($filterStates$$1$$);$goog$array$forEach$$($JSCompiler_StaticMethods_applyFilterStates_$self$$.$listItems$,function($r$$inline_285$$){$r$$inline_285$$.removeAttribute("filtermatch")}); 3741if(!(0===(!$filterStates$$1$$||$filterStates$$1$$.length)&&$JSCompiler_StaticMethods_applyFilterStates_$self$$.options.matchingElement))if($filterStates$$1$$===$JSCompiler_alias_NULL$$||0===$filterStates$$1$$.length)$JSCompiler_StaticMethods_applyStateToElements_$$($JSCompiler_StaticMethods_applyFilterStates_$self$$,$JSCompiler_alias_NULL$$);else for(var $i$$inline_187_item$$inline_289$$=0;$i$$inline_187_item$$inline_289$$<$filterStates$$1$$.length;
3741$i$$inline_187_item$$inline_289$$++){var $state$$inline_188$$= 3742$filterStates$$1$$[$i$$inline_187_item$$inline_289$$];if($i$$inline_288_setValueOnFilter$$&&$state$$inline_188$$.type&&$state$$inline_188$$.id){var $filter$$inline_189$$=$goog$isString$$($state$$inline_188$$.id)?document.getElementById($state$$inline_188$$.id):$state$$inline_188$$.id;if(!$filter$$inline_189$$||0===$filter$$inline_189$$.length)continue;switch($state$$inline_188$$.type){case "select-one":$goog$array$forEach$$($filter$$inline_189$$.options,function($o$$inline_190$$,$idx$$inline_191$$){$o$$inline_190$$.value=== 3743$state$$inline_188$$.value?($o$$inline_190$$.setAttribute("selected","selected"),$filter$$inline_189$$.selectedIndex=$idx$$inline_191$$):$o$$inline_190$$.removeAttribute("selected")});break;case "text":$filter$$inline_189$$.value=$state$$inline_188$$.value;break;case "checkbox":$filter$$inline_189$$.checked="true"===$state$$inline_188$$.value;break;default:$JSCompiler_alias_THROW$$("Filter type "+$state$$inline_188$$.type+" is not supported")}}$JSCompiler_StaticMethods_applyStateToElements_$$($JSCompiler_StaticMethods_applyFilterStates_$self$$, 3744$state$$inline_188$$)}for($i$$inline_288_setValueOnFilter$$=0;$i$$inline_288_setValueOnFilter$$<$JSCompiler_StaticMethods_applyFilterStates_$self$$.$listItems$.length&&!$JSCompiler_StaticMethods_applyFilterStates_$self$$.$cancelQuickFind_$;$i$$inline_288_setValueOnFilter$$++){var $i$$inline_187_item$$inline_289$$=$JSCompiler_StaticMethods_applyFilterStates_$self$$.$listItems$[$i$$inline_288_setValueOnFilter$$],$show$$inline_290$$="false"!==$i$$inline_187_item$$inline_289$$.getAttribute("filtermatch"); 3745$i$$inline_187_item$$inline_289$$.style.display=$show$$inline_290$$?"":"none"}$JSCompiler_StaticMethods_applyFilterStates_$self$$.options.filteredElements&&$JSCompiler_StaticMethods_applyFilterStates_$self$$.options.filteredElements($filterStates$$1$$)} 3746function $JSCompiler_StaticMethods_applyStateToElements_$$($JSCompiler_StaticMethods_applyStateToElements_$self$$,$filterState$$1$$){for(var $normalisedTokens$$3$$=$JSCompiler_StaticMethods_getNormalisedSearchTokensForState_$$($JSCompiler_StaticMethods_applyStateToElements_$self$$,$filterState$$1$$),$i$$85$$=0;$i$$85$$<$JSCompiler_StaticMethods_applyStateToElements_$self$$.$listItems$.length&&!$JSCompiler_StaticMethods_applyStateToElements_$self$$.$cancelQuickFind_$;$i$$85$$++){var $item$$1$$=$JSCompiler_StaticMethods_applyStateToElements_$self$$.$listItems$[$i$$85$$]; 3747$item$$1$$.getAttribute("filtermatch")||$JSCompiler_StaticMethods_applyStateToElements_$self$$.$doesElementContainText$($filterState$$1$$,$item$$1$$,$normalisedTokens$$3$$)||$item$$1$$.setAttribute("filtermatch","false")}} 3748function $JSCompiler_StaticMethods_getNormalisedSearchTokensForState_$$($JSCompiler_StaticMethods_getNormalisedSearchTokensForState_$self$$,$state$$5$$){if($state$$5$$===$JSCompiler_alias_NULL$$)return $JSCompiler_alias_NULL$$;switch($state$$5$$.type){case "select-one":var $JSCompiler_StaticMethods_parseSearchTokens$self$$inline_193_JSCompiler_inline_result$$10_JSCompiler_temp$$259_JSCompiler_temp$$260_str$$inline_292$$;if(-1!=$state$$5$$.value.indexOf("&"))if("document"in $goog$global$$){$JSCompiler_StaticMethods_parseSearchTokens$self$$inline_193_JSCompiler_inline_result$$10_JSCompiler_temp$$259_JSCompiler_temp$$260_str$$inline_292$$= 3749$state$$5$$.value;var $seen$$inline_293$$={"&":"&","<":"<",">":">",""":'"'},$div$$inline_294$$=document.createElement("div");$JSCompiler_StaticMethods_parseSearchTokens$self$$inline_193_JSCompiler_inline_result$$10_JSCompiler_temp$$259_JSCompiler_temp$$260_str$$inline_292$$=$JSCompiler_StaticMethods_parseSearchTokens$self$$inline_193_JSCompiler_inline_result$$10_JSCompiler_temp$$259_JSCompiler_temp$$260_str$$inline_292$$.replace($goog$string$HTML_ENTITY_PATTERN_$$,function($s$$inline_295$$, 3750$entity$$inline_296$$){var $value$$inline_297$$=$seen$$inline_293$$[$s$$inline_295$$];if($value$$inline_297$$)return $value$$inline_297$$;if("#"==$entity$$inline_296$$.charAt(0)){var $n$$inline_298$$=Number("0"+$entity$$inline_296$$.substr(1));isNaN($n$$inline_298$$)||($value$$inline_297$$=String.fromCharCode($n$$inline_298$$))}$value$$inline_297$$||($div$$inline_294$$.innerHTML=$s$$inline_295$$+" ",$value$$inline_297$$=$div$$inline_294$$.firstChild.nodeValue.slice(0,-1));return $seen$$inline_293$$[$s$$inline_295$$]= 3751$value$$inline_297$$})}else $JSCompiler_StaticMethods_parseSearchTokens$self$$inline_193_JSCompiler_inline_result$$10_JSCompiler_temp$$259_JSCompiler_temp$$260_str$$inline_292$$=$state$$5$$.value.replace(/&([^;]+);/g,function($s$$4$$,$entity$$1$$){switch($entity$$1$$){case "amp":return"&";case "lt":return"<";case "gt":return">";case "quot":return'"';default:if("#"==$entity$$1$$.charAt(0)){var $n$$2$$=Number("0"+$entity$$1$$.substr(1));if(!isNaN($n$$2$$))return String.fromCharCode($n$$2$$)}return $s$$4$$}}); 3752else $JSCompiler_StaticMethods_parseSearchTokens$self$$inline_193_JSCompiler_inline_result$$10_JSCompiler_temp$$259_JSCompiler_temp$$260_str$$inline_292$$=$state$$5$$.value;return[$JSCompiler_StaticMethods_parseSearchTokens$self$$inline_193_JSCompiler_inline_result$$10_JSCompiler_temp$$259_JSCompiler_temp$$260_str$$inline_292$$];case "text":$JSCompiler_StaticMethods_parseSearchTokens$self$$inline_193_JSCompiler_inline_result$$10_JSCompiler_temp$$259_JSCompiler_temp$$260_str$$inline_292$$=$JSCompiler_StaticMethods_getNormalisedSearchTokensForState_$self$$.$search_$; 3753var $matches$$inline_303_postFix$$inline_317_text$$inline_194_tokens$$inline_309$$=$state$$5$$.value;if($matches$$inline_303_postFix$$inline_317_text$$inline_194_tokens$$inline_309$$){var $matches$$inline_303_postFix$$inline_317_text$$inline_194_tokens$$inline_309$$=$matches$$inline_303_postFix$$inline_317_text$$inline_194_tokens$$inline_309$$.toLowerCase(),$exp$$inline_301_newTokens$$inline_310_normalisedTokens$$inline_305_stackOps$$inline_318$$;$exp$$inline_301_newTokens$$inline_310_normalisedTokens$$inline_305_stackOps$$inline_318$$= 3754$matches$$inline_303_postFix$$inline_317_text$$inline_194_tokens$$inline_309$$.replace(">= ",">=").replace("> ",">").replace("<= ","<=").replace("< ","<").replace("!= ","!=").replace("= ","=");for(var $i$$inline_306_i$$inline_312_regex$$inline_302_stackOperator$$inline_319$$=/([^"^\
3754s]+)\s*|"([^"]+)"\s*/g,$matches$$inline_303_postFix$$inline_317_text$$inline_194_tokens$$inline_309$$=[],$i$$inline_320_match$$inline_304_token$$inline_307_token$$inline_313$$=$JSCompiler_alias_NULL$$;$i$$inline_320_match$$inline_304_token$$inline_307_token$$inline_313$$= 3755$i$$inline_306_i$$inline_312_regex$$inline_302_stackOperator$$inline_319$$.exec($exp$$inline_301_newTokens$$inline_310_normalisedTokens$$inline_305_stackOps$$inline_318$$);)$matches$$inline_303_postFix$$inline_317_text$$inline_194_tokens$$inline_309$$.push($i$$inline_320_match$$inline_304_token$$inline_307_token$$inline_313$$[1]||$i$$inline_320_match$$inline_304_token$$inline_307_token$$inline_313$$[2]);$exp$$inline_301_newTokens$$inline_310_normalisedTokens$$inline_305_stackOps$$inline_318$$=[]; 3756for($i$$inline_306_i$$inline_312_regex$$inline_302_stackOperator$$inline_319$$=0;$i$$inline_306_i$$inline_312_regex$$inline_302_stackOperator$$inline_319$$<$matches$$inline_303_postFix$$inline_317_text$$inline_194_tokens$$inline_309$$.length;$i$$inline_306_i$$inline_312_regex$$inline_302_stackOperator$$inline_319$$++)$i$$inline_320_match$$inline_304_token$$inline_307_token$$inline_313$$=$matches$$inline_303_postFix$$inline_317_text$$inline_194_tokens$$inline_309$$[$i$$inline_306_i$$inline_312_regex$$inline_302_stackOperator$$inline_319$$], 3757$i$$inline_320_match$$inline_304_token$$inline_307_token$$inline_313$$=$JSCompiler_StaticMethods_normaliseTerm_$$($exp$$inline_301_newTokens$$inline_310_normalisedTokens$$inline_305_stackOps$$inline_318$$,$i$$inline_320_match$$inline_304_token$$inline_307_token$$inline_313$$,"("),$i$$inline_320_match$$inline_304_token$$inline_307_token$$inline_313$$=$JSCompiler_StaticMethods_normaliseTerm_$$($exp$$inline_301_newTokens$$inline_310_normalisedTokens$$inline_305_stackOps$$inline_318$$,$i$$inline_320_match$$inline_304_token$$inline_307_token$$inline_313$$, 3758")"),0<$i$$inline_320_match$$inline_304_token$$inline_307_token$$inline_313$$.length&&$exp$$inline_301_newTokens$$inline_310_normalisedTokens$$inline_305_stackOps$$inline_318$$.push($i$$inline_320_match$$inline_304_token$$inline_307_token$$inline_313$$);$matches$$inline_303_postFix$$inline_317_text$$inline_194_tokens$$inline_309$$=$exp$$inline_301_newTokens$$inline_310_normalisedTokens$$inline_305_stackOps$$inline_318$$;$exp$$inline_301_newTokens$$inline_310_normalisedTokens$$inline_305_stackOps$$inline_318$$= 3759[];for(var $lastToken$$inline_311_normalisedTokens$$inline_316$$,$i$$inline_306_i$$inline_312_regex$$inline_302_stackOperator$$inline_319$$=0;$i$$inline_306_i$$inline_312_regex$$inline_302_stackOperator$$inline_319$$<$matches$$inline_303_postFix$$inline_317_text$$inline_194_tokens$$inline_309$$.length;$i$$inline_306_i$$inline_312_regex$$inline_302_stackOperator$$inline_319$$++)if(($i$$inline_320_match$$inline_304_token$$inline_307_token$$inline_313$$=$matches$$inline_303_postFix$$inline_317_text$$inline_194_tokens$$inline_309$$[$i$$inline_306_i$$inline_312_regex$$inline_302_stackOperator$$inline_319$$])&& 37600!==$i$$inline_320_match$$inline_304_token$$inline_307_token$$inline_313$$.length)0===$i$$inline_320_match$$inline_304_token$$inline_307_token$$inline_313$$.indexOf("-")&&($i$$inline_320_match$$inline_304_token$$inline_307_token$$inline_313$$="not",$matches$$inline_303_postFix$$inline_317_text$$inline_194_tokens$$inline_309$$[$i$$inline_306_i$$inline_312_regex$$inline_302_stackOperator$$inline_319$$]=$matches$$inline_303_postFix$$inline_317_text$$inline_194_tokens$$inline_309$$[$i$$inline_306_i$$inline_312_regex$$inline_302_stackOperator$$inline_319$$].substring(1), 3761$i$$inline_306_i$$inline_312_regex$$inline_302_stackOperator$$inline_319$$--),$lastToken$$inline_311_normalisedTokens$$inline_316$$&&"("!==$lastToken$$inline_311_normalisedTokens$$inline_316$$&&("not"!==$lastToken$$inline_311_normalisedTokens$$inline_316$$&&"and"!==$lastToken$$inline_311_normalisedTokens$$inline_316$$&&"or"!==$lastToken$$inline_311_normalisedTokens$$inline_316$$&&"and"!==$i$$inline_320_match$$inline_304_token$$inline_307_token$$inline_313$$&&"or"!==$i$$inline_320_match$$inline_304_token$$inline_307_token$$inline_313$$&& 3762")"!==$i$$inline_320_match$$inline_304_token$$inline_307_token$$inline_313$$)&&$exp$$inline_301_newTokens$$inline_310_normalisedTokens$$inline_305_stackOps$$inline_318$$.push("and"),$exp$$inline_301_newTokens$$inline_310_normalisedTokens$$inline_305_stackOps$$inline_318$$.push($i$$inline_320_match$$inline_304_token$$inline_307_token$$inline_313$$),$lastToken$$inline_311_normalisedTokens$$inline_316$$=$i$$inline_320_match$$inline_304_token$$inline_307_token$$inline_313$$;$lastToken$$inline_311_normalisedTokens$$inline_316$$= 3763$exp$$inline_301_newTokens$$inline_310_normalisedTokens$$inline_305_stackOps$$inline_318$$;$matches$$inline_303_postFix$$inline_317_text$$inline_194_tokens$$inline_309$$="";$exp$$inline_301_newTokens$$inline_310_normalisedTokens$$inline_305_stackOps$$inline_318$$=[];for($i$$inline_320_match$$inline_304_token$$inline_307_token$$inline_313$$=0;$i$$inline_320_match$$inline_304_token$$inline_307_token$$inline_313$$<$lastToken$$inline_311_normalisedTokens$$inline_316$$.length;
3763$i$$inline_320_match$$inline_304_token$$inline_307_token$$inline_313$$++){var $token$$inline_321$$= 3764$lastToken$$inline_311_normalisedTokens$$inline_316$$[$i$$inline_320_match$$inline_304_token$$inline_307_token$$inline_313$$];if(0!==$token$$inline_321$$.length)if("and"!==$token$$inline_321$$&&"or"!==$token$$inline_321$$&&"not"!==$token$$inline_321$$&&"("!==$token$$inline_321$$&&")"!==$token$$inline_321$$)$matches$$inline_303_postFix$$inline_317_text$$inline_194_tokens$$inline_309$$=$matches$$inline_303_postFix$$inline_317_text$$inline_194_tokens$$inline_309$$+"|"+$token$$inline_321$$;else if(0=== 3765$exp$$inline_301_newTokens$$inline_310_normalisedTokens$$inline_305_stackOps$$inline_318$$.length||"("===$token$$inline_321$$)$exp$$inline_301_newTokens$$inline_310_normalisedTokens$$inline_305_stackOps$$inline_318$$.push($token$$inline_321$$);else if(")"===$token$$inline_321$$)for($i$$inline_306_i$$inline_312_regex$$inline_302_stackOperator$$inline_319$$=$exp$$inline_301_newTokens$$inline_310_normalisedTokens$$inline_305_stackOps$$inline_318$$.pop();"("!==$i$$inline_306_i$$inline_312_regex$$inline_302_stackOperator$$inline_319$$&& 37660<$exp$$inline_301_newTokens$$inline_310_normalisedTokens$$inline_305_stackOps$$inline_318$$.length;)$matches$$inline_303_postFix$$inline_317_text$$inline_194_tokens$$inline_309$$=$matches$$inline_303_postFix$$inline_317_text$$inline_194_tokens$$inline_309$$+"|"+$i$$inline_306_i$$inline_312_regex$$inline_302_stackOperator$$inline_319$$,$i$$inline_306_i$$inline_312_regex$$inline_302_stackOperator$$inline_319$$=$exp$$inline_301_newTokens$$inline_310_normalisedTokens$$inline_305_stackOps$$inline_318$$.pop(); 3767else{if("("!==$exp$$inline_301_newTokens$$inline_310_normalisedTokens$$inline_305_stackOps$$inline_318$$[$exp$$inline_301_newTokens$$inline_310_normalisedTokens$$inline_305_stackOps$$inline_318$$.length-1])for(;0!==$exp$$inline_301_newTokens$$inline_310_normalisedTokens$$inline_305_stackOps$$inline_318$$.length&&"("!==$exp$$inline_301_newTokens$$inline_310_normalisedTokens$$inline_305_stackOps$$inline_318$$[$exp$$inline_301_newTokens$$inline_310_normalisedTokens$$inline_305_stackOps$$inline_318$$.length- 37681];)if($JSCompiler_StaticMethods_parseSearchTokens$self$$inline_193_JSCompiler_inline_result$$10_JSCompiler_temp$$259_JSCompiler_temp$$260_str$$inline_292$$.$precedences_$[$exp$$inline_301_newTokens$$inline_310_normalisedTokens$$inline_305_stackOps$$inline_318$$[$exp$$inline_301_newTokens$$inline_310_normalisedTokens$$inline_305_stackOps$$inline_318$$.length-1]]>$JSCompiler_StaticMethods_parseSearchTokens$self$$inline_193_JSCompiler_inline_result$$10_JSCompiler_temp$$259_JSCompiler_temp$$260_str$$inline_292$$.$precedences_$[$token$$inline_321$$])$i$$inline_306_i$$inline_312_regex$$inline_302_stackOperator$$inline_319$$= 3769$exp$$inline_301_newTokens$$inline_310_normalisedTokens$$inline_305_stackOps$$inline_318$$.pop(),$matches$$inline_303_postFix$$inline_317_text$$inline_194_tokens$$inline_309$$=$matches$$inline_303_postFix$$inline_317_text$$inline_194_tokens$$inline_309$$+"|"+$i$$inline_306_i$$inline_312_regex$$inline_302_stackOperator$$inline_319$$;else break;$exp$$inline_301_newTokens$$inline_310_normalisedTokens$$inline_305_stackOps$$inline_318$$.push($token$$inline_321$$)}}for(;0<$exp$$inline_301_newTokens$$inline_310_normalisedTokens$$inline_305_stackOps$$inline_318$$.length;)$matches$$inline_303_postFix$$inline_317_text$$inline_194_tokens$$inline_309$$= 3770$matches$$inline_303_postFix$$inline_317_text$$inline_194_tokens$$inline_309$$+"|"+$exp$$inline_301_newTokens$$inline_310_normalisedTokens$$inline_305_stackOps$$inline_318$$.pop();$JSCompiler_StaticMethods_parseSearchTokens$self$$inline_193_JSCompiler_inline_result$$10_JSCompiler_temp$$259_JSCompiler_temp$$260_str$$inline_292$$=$matches$$inline_303_postFix$$inline_317_text$$inline_194_tokens$$inline_309$$.substring(1).split("|")}else $JSCompiler_StaticMethods_parseSearchTokens$self$$inline_193_JSCompiler_inline_result$$10_JSCompiler_temp$$259_JSCompiler_temp$$260_str$$inline_292$$= 3771$JSCompiler_alias_NULL$$;return $JSCompiler_StaticMethods_parseSearchTokens$self$$inline_193_JSCompiler_inline_result$$10_JSCompiler_temp$$259_JSCompiler_temp$$260_str$$inline_292$$;case "checkbox":return $JSCompiler_alias_NULL$$;default:$JSCompiler_alias_THROW$$("State type "+$state$$5$$.type+" is not supported")}} 3772$JSCompiler_prototypeAlias$$.$doesElementContainText$=function $$JSCompiler_prototypeAlias$$$$doesElementContainText$$($state$$6$$,$item$$3$$,$textTokens$$1$$,$JSCompiler_StaticMethods_doesTextMatchTokens$self$$inline_323_JSCompiler_inline_result$$inline_328_JSCompiler_temp$$11_object$$inline_209_opt_txt$$){$goog$asserts$assert$$($JSCompiler_StaticMethods_doesTextMatchTokens$self$$inline_323_JSCompiler_inline_result$$inline_328_JSCompiler_temp$$11_object$$inline_209_opt_txt$$===$JSCompiler_alias_VOID$$|| 3773$goog$isArray$$($JSCompiler_StaticMethods_doesTextMatchTokens$self$$inline_323_JSCompiler_inline_result$$inline_328_JSCompiler_temp$$11_object$$inline_209_opt_txt$$));var $exact$$=$state$$6$$!=$JSCompiler_alias_NULL$$&&"select-one"===$state$$6$$.type,$arr2$$
3773inline_331_text$$inline_201$$=$JSCompiler_StaticMethods_doesTextMatchTokens$self$$inline_323_JSCompiler_inline_result$$inline_328_JSCompiler_temp$$11_object$$inline_209_opt_txt$$||[$goog$string$trim$$($goog$dom$getTextContent$$($item$$3$$))];$goog$asserts$assert$$($goog$isArray$$($arr2$$inline_331_text$$inline_201$$)); 3774$JSCompiler_StaticMethods_doesTextMatchTokens$self$$inline_323_JSCompiler_inline_result$$inline_328_JSCompiler_temp$$11_object$$inline_209_opt_txt$$=this.$search_$;$goog$asserts$assert$$($goog$isArray$$($arr2$$inline_331_text$$inline_201$$));var $JSCompiler_temp$$inline_327_f$$inline_329$$;if(!($JSCompiler_temp$$inline_327_f$$inline_329$$=!$textTokens$$1$$)){a:{$JSCompiler_temp$$inline_327_f$$inline_329$$=function $$JSCompiler_temp$$inline_327_f$$inline_329$$$($textToMatch$$inline_334_txt$$inline_333$$){$goog$asserts$assert$$($goog$isString$$($textToMatch$$inline_334_txt$$inline_333$$)); 3775for(var $textToMatch$$inline_334_txt$$inline_333$$=$exact$$?$textToMatch$$inline_334_txt$$inline_333$$:$textToMatch$$inline_334_txt$$inline_333$$.toLowerCase(),$stackResult$$inline_335$$=[],$stackResult1$$inline_336_token$$inline_339$$,$stackResult2$$inline_337$$,$i$$inline_338$$=0;$i$$inline_338$$<$textTokens$$1$$.length;$i$$inline_338$$++)$stackResult1$$inline_336_token$$inline_339$$=$textTokens$$1$$[$i$$inline_338$$],"and"!==$stackResult1$$inline_336_token$$inline_339$$&&"or"!==$stackResult1$$inline_336_token$$inline_339$$&& 3776"not"!==$stackResult1$$inline_336_token$$inline_339$$?0===$stackResult1$$inline_336_token$$inline_339$$.indexOf(">")||0===$stackResult1$$inline_336_token$$inline_339$$.indexOf("<")||0===$stackResult1$$inline_336_token$$inline_339$$.indexOf("=")||0===$stackResult1$$inline_336_token$$inline_339$$.indexOf("!=")?$stackResult$$inline_335$$.push($JSCompiler_StaticMethods_doesNumberMatchToken_$$($stackResult1$$inline_336_token$$inline_339$$,$textToMatch$$inline_334_txt$$inline_333$$)):$stackResult$$inline_335$$.push($exact$$? 3777$textToMatch$$inline_334_txt$$inline_333$$===$stackResult1$$inline_336_token$$inline_339$$:0<=$textToMatch$$inline_334_txt$$inline_333$$.indexOf($stackResult1$$inline_336_token$$inline_339$$)):"and"===$stackResult1$$inline_336_token$$inline_339$$?($stackResult1$$inline_336_token$$inline_339$$=$stackResult$$inline_335$$.pop(),$stackResult2$$inline_337$$=$stackResult$$inline_335$$.pop(),$stackResult$$inline_335$$.push($stackResult1$$inline_336_token$$inline_339$$&&$stackResult2$$inline_337$$)):"or"=== 3778$stackResult1$$inline_336_token$$inline_339$$?($stackResult1$$inline_336_token$$inline_339$$=$stackResult$$inline_335$$.pop(),$stackResult2$$inline_337$$=$stackResult$$inline_335$$.pop(),$stackResult$$inline_335$$.push($stackResult1$$inline_336_token$$inline_339$$||$stackResult2$$inline_337$$)):"not"===$stackResult1$$inline_336_token$$inline_339$$&&($stackResult1$$inline_336_token$$inline_339$$=$stackResult$$inline_335$$.pop(),$stackResult$$inline_335$$.push(!$stackResult1$$inline_336_token$$inline_339$$)); 3779return 1===$stackResult$$inline_335$$.length&&$stackResult$$inline_335$$.pop()};for(var $l$$inline_330$$=$arr2$$inline_331_text$$inline_201$$.length,$arr2$$inline_331_text$$inline_201$$=$goog$isString$$($arr2$$inline_331_text$$inline_201$$)?$arr2$$inline_331_text$$inline_201$$.split(""):$arr2$$inline_331_text$$inline_201$$,$i$$inline_332$$=0;$i$$inline_332$$<$l$$inline_330$$;$i$$inline_332$$++)if($i$$inline_332$$ in $arr2$$inline_331_text$$inline_201$$&&$JSCompiler_temp$$inline_327_f$$inline_329$$.call($JSCompiler_StaticMethods_doesTextMatchTokens$self$$inline_323_JSCompiler_inline_result$$inline_328_JSCompiler_temp$$11_object$$inline_209_opt_txt$$, 3780$arr2$$inline_331_text$$inline_201$$[$i$$inline_332$$])){$JSCompiler_StaticMethods_doesTextMatchTokens$self$$inline_323_JSCompiler_inline_result$$inline_328_JSCompiler_temp$$11_object$$inline_209_opt_txt$$=$i$$inline_332$$;break a}$JSCompiler_StaticMethods_doesTextMatchTokens$self$$inline_323_JSCompiler_inline_result$$inline_328_JSCompiler_temp$$11_object$$inline_209_opt_txt$$=-1}$JSCompiler_temp$$inline_327_f$$inline_329$$=0<=$JSCompiler_StaticMethods_doesTextMatchTokens$self$$inline_323_JSCompiler_inline_result$$inline_328_JSCompiler_temp$$11_object$$inline_209_opt_txt$$}if($JSCompiler_StaticMethods_doesTextMatchTokens$self$$inline_323_JSCompiler_inline_result$$inline_328_JSCompiler_temp$$11_object$$inline_209_opt_txt$$= 3781$JSCompiler_temp$$inline_327_f$$inline_329$$)this.options.matchingElement?($JSCompiler_StaticMethods_doesTextMatchTokens$self$$inline_323_JSCompiler_inline_result$$inline_328_JSCompiler_temp$$11_object$$inline_209_opt_txt$$=$item$$3$$,window.jQuery&&($JSCompiler_StaticMethods_doesTextMatchTokens$self$$inline_323_JSCompiler_inline_result$$inline_328_JSCompiler_temp$$11_object$$inline_209_opt_txt$$=window.jQuery($item$$3$$)),$JSCompiler_StaticMethods_doesTextMatchTokens$self$$inline_323_JSCompiler_inline_result$$inline_328_JSCompiler_temp$$11_object$$inline_209_opt_txt$$= 3782this.options.matchingElement($state$$6$$,$JSCompiler_StaticMethods_doesTextMatchTokens$self$$inline_323_JSCompiler_inline_result$$inline_328_JSCompiler_temp$$11_object$$inline_209_opt_txt$$,$textTokens$$1$$)):$JSCompiler_StaticMethods_doesTextMatchTokens$self$$inline_323_JSCompiler_inline_result$$inline_328_JSCompiler_temp$$11_object$$inline_209_opt_txt$$=$JSCompiler_alias_TRUE$$;return $JSCompiler_StaticMethods_doesTextMatchTokens$self$$inline_323_JSCompiler_inline_result$$inline_328_JSCompiler_temp$$11_object$$inline_209_opt_txt$$};function $pn$ui$filter$TableFilter$$($grid$$,$opts$$){$opts$$.matchingRow&&($opts$$.matchingElement=$opts$$.matchingRow);$opts$$.filteringRows&&($opts$$.filteringElements=$opts$$.filteringRows);$opts$$.filteredRows&&($opts$$.filteredElements=$opts$$.filteredRows);$pn$ui$filter$GenericListFilter$$.call(this,$JSCompiler_alias_NULL$$,$grid$$,$opts$$)}$goog$inherits$$($pn$ui$filter$TableFilter$$,$pn$ui$filter$GenericListFilter$$);$JSCompiler_prototypeAlias$$=$pn$ui$filter$TableFilter$$.prototype; 3783$JSCompiler_prototypeAlias$$.$initialiseFilters$=function $$JSCompiler_prototypeAlias$$$$initialiseFilters$$(){this.$tbody_$=$goog$dom$getElementsByTagNameAndClass_$$("tbody",$JSCompiler_alias_NULL$$,this.list)[0];this.$thead_$=$goog$dom$getElementsByTagNameAndClass_$$("thead",$JSCompiler_alias_NULL$$,this.options.frozenHeaderTable||this.list)[0];if(!this.$thead_$){var $tdCells_trTableRow$$=$goog$dom$getElementsByTagNameAndClass_$$("tr",$JSCompiler_alias_NULL$$,this.$tbody_$)[0],$tdCells_trTableRow$$= 3784$goog$dom$getElementsByTagNameAndClass_$$("td",$JSCompiler_alias_NULL$$,$tdCells_trTableRow$$),$thead$$=$goog$dom$createDom$$("thead",$JSCompiler_alias_NULL$$),$parent$$inline_211_tr$$=this.list;$parent$$inline_211_tr$$.insertBefore($thead$$,$parent$$inline_211_tr$$.childNodes[0]||$JSCompiler_alias_NULL$$);$parent$$inline_211_tr$$=$goog$dom$createDom$$("tr",$JSCompiler_alias_NULL$$);$thead$$.appendChild($parent$$inline_211_tr$$);for(var $i$$87$$=0;$i$$87$$<$tdCells_trTableRow$$.length;
3784$i$$87$$++){var $th$$= 3785$goog$dom$createDom$$("th",$JSCompiler_alias_NULL$$);$th$$.innerHTML="col"+$i$$87$$;$parent$$inline_211_tr$$.appendChild($th$$)}this.$thead_$=$thead$$}$pn$ui$filter$TableFilter$$.$superClass_$.$initialiseFilters$.call(this)}; 3786$JSCompiler_prototypeAlias$$.$initialiseControlCaches$=function $$JSCompiler_prototypeAlias$$$$initialiseControlCaches$$(){var $filterRow$$inline_222_headerRows_node$$inline_346_tr$$inline_223$$=$goog$dom$getElementsByTagNameAndClass_$$("tr",$JSCompiler_alias_NULL$$,this.$thead_$),$filterRow_i$$inline_224$$=$goog$dom$getElementsByTagNameAndClass_$$("tr","filters",this.$thead_$);1<$filterRow$$inline_222_headerRows_node$$inline_346_tr$$inline_223$$.length&&0<$filterRow_i$$inline_224$$.length?this.$headers_$= 3787$goog$dom$getElementsByTagNameAndClass_$$("th",$JSCompiler_alias_NULL$$,$filterRow$$inline_222_headerRows_node$$inline_346_tr$$inline_223$$[$filterRow$$inline_222_headerRows_node$$inline_346_tr$$inline_223$$.length-2]):0<$filterRow$$inline_222_headerRows_node$$inline_346_tr$$inline_223$$.length&&(this.$headers_$=$goog$dom$getElementsByTagNameAndClass_$$("th",$JSCompiler_alias_NULL$$,$filterRow$$inline_222_headerRows_node$$inline_346_tr$$inline_223$$[$filterRow$$inline_222_headerRows_node$$inline_346_tr$$inline_223$$.length- 37881]));this.$listItems$=$goog$dom$getElementsByTagNameAndClass_$$("tr",$JSCompiler_alias_NULL$$,this.$tbody_$);$filterRow$$inline_222_headerRows_node$$inline_346_tr$$inline_223$$=$goog$dom$getElementsByTagNameAndClass_$$("tr","filters",this.$thead_$);0<$filterRow$$inline_222_headerRows_node$$inline_346_tr$$inline_223$$.length&&($filterRow$$inline_222_headerRows_node$$inline_346_tr$$inline_223$$=$filterRow$$inline_222_headerRows_node$$inline_346_tr$$inline_223$$[0])&&$filterRow$$inline_222_headerRows_node$$inline_346_tr$$inline_223$$.parentNode&& 3789$filterRow$$inline_222_headerRows_node$$inline_346_tr$$inline_223$$.parentNode.removeChild($filterRow$$inline_222_headerRows_node$$inline_346_tr$$inline_223$$);$filterRow$$inline_222_headerRows_node$$inline_346_tr$$inline_223$$=$goog$dom$createDom$$("tr",{"class":"filters"});for($filterRow_i$$inline_224$$=0;$filterRow_i$$inline_224$$<this.$headers_$.length;$filterRow_i$$inline_224$$++){var $element$$inline_353_filterType$$inline_351_header$$inline_225_td$$inline_229$$=this.$headers_$[$filterRow_i$$inline_224$$], 3790$filterClass$$inline_228_visible$$inline_226$$="none"!=$element$$inline_353_filterType$$inline_351_header$$inline_225_td$$inline_229$$.style.display;if($filterClass$$inline_228_visible$$inline_226$$){var $colIdx$$inline_349_headerText$$inline_227$$="false"===$element$$inline_353_filterType$$inline_351_header$$inline_225_td$$inline_229$$.getAttribute("filter")||!$filterClass$$inline_228_visible$$inline_226$$?"":$goog$dom$getTextContent$$($element$$inline_353_filterType$$inline_351_header$$inline_225_td$$inline_229$$), 3791$filterClass$$inline_228_visible$$inline_226$$=$element$$inline_353_filterType$$inline_351_header$$inline_225_td$$inline_229$$.getAttribute("filter-class");if($colIdx$$inline_349_headerText$$inline_227$$&&0<$colIdx$$inline_349_headerText$$inline_227$$.length){var $filter$$inline_230_tHeadFilters$$;a:switch($colIdx$$inline_349_headerText$$inline_227$$=$filterRow_i$$inline_224$$,$element$$inline_353_filterType$$inline_351_header$$inline_225_td$$inline_229$$=$element$$inline_353_filterType$$inline_351_header$$inline_225_td$$inline_229$$.getAttribute("filter-type")|| 3792"text",$element$$inline_353_filterType$$inline_351_header$$inline_225_td$$inline_229$$){case "text":$filter$$inline_230_tHeadFilters$$=$goog$dom$createDom$$("input",{type:"text",id:$JSCompiler_StaticMethods_getListId$$(this)+"_filter_"+$colIdx$$inline_349_headerText$$inline_227$$,"class":"filter",title:this.options.filterToolTipMessage});break a;case "ddl":$filter$$inline_230_tHeadFilters$$=$JSCompiler_StaticMethods_getSelectFilter_$$(this,$colIdx$$inline_349_headerText$$inline_227$$);break a;default:$JSCompiler_alias_THROW$$("filter-type: "+ 3793$element$$inline_353_filterType$$inline_351_header$$inline_225_td$$inline_229$$+" is not supported")}$element$$inline_353_filterType$$inline_351_header$$inline_225_td$$inline_229$$=$filter$$inline_230_tHeadFilters$$;$goog$isString$$("width")?$goog$style$setStyle_$$($element$$inline_353_filterType$$inline_351_header$$inline_225_td$$inline_229$$,"65%","width"):$goog$object$forEach$$("width",$goog$partial$$($goog$style$setStyle_$$,$element$$inline_353_filterType$$inline_351_header$$inline_225_td$$inline_229$$)); 3794$element$$inline_353_filterType$$inline_351_header$$inline_225_td$$inline_229$$=$goog$dom$createDom$$("td",$JSCompiler_alias_NULL$$,$filter$$inline_230_tHeadFilters$$)}else $element$$inline_353_filterType$$inline_351_header$$inline_225_td$$inline_229$$=$goog$dom$createDom$$("td",{},"");$filterClass$$inline_228_visible$$inline_226$$&&$goog$dom$classes$add$$($element$$inline_353_filterType$$inline_351_header$$inline_225_td$$inline_229$$,$filterClass$$inline_228_visible$$inline_226$$);$filterRow$$inline_222_headerRows_node$$inline_346_tr$$inline_223$$.appendChild($element$$inline_353_filterType$$inline_351_header$$inline_225_td$$inline_229$$)}}this.$thead_$.appendChild($filterRow$$inline_222_headerRows_node$$inline_346_tr$$inline_223$$); 3795$filter$$inline_230_tHeadFilters$$=$goog$dom$getElementsByTagNameAndClass_$$("tr","filters",this.$thead_$)[0];this.$filters$=$goog$array$concat$$($goog$array$map$$($goog$dom$getElementsByTagNameAndClass_$$("input",$JSCompiler_alias_NULL$$,$filter$$inline_230_tHeadFilters$$),function($ctl$$){return $ctl$$}),$goog$array$map$$($goog$dom$getElementsByTagNameAndClass_$$("select",$JSCompiler_alias_NULL$$,$filter$$inline_230_tHeadFilters$$),function($ctl$$1$$){return $ctl$$1$$}));this.$filterColumnIndexes_$= 3796$goog$array$map$$(this.$filters$,this.$getColumnIndexOfFilter_$,this)};$JSCompiler_prototypeAlias$$.$getColumnIndexOfFilter_$=function $$JSCompiler_prototypeAlias$$$$getColumnIndexOfFilter_$$($f$$27_td$$){$f$$27_td$$=$goog$dom$getAncestorByTagNameAndClass$$($f$$27_td$$,"TD");if(!$f$$27_td$$||0>=$f$$27_td$$.length)return-1;var $cells$$=$goog$dom$getAncestorByTagNameAndClass$$($f$$27_td$$,"TR").getElementsByTagName("td");return $goog$array$indexOf$$($cells$$,$f$$27_td$$)}; 3797function $JSCompiler_StaticMethods_getSelectFilter_$$($JSCompiler_StaticMethods_getSelectFilter_$self$$,$colId
3797x$$1$$){var $select$$=$goog$dom$createDom$$("select",{id:$JSCompiler_StaticMethods_getListId$$($JSCompiler_StaticMethods_getSelectFilter_$self$$)+"_filter_"+$colIdx$$1$$,"class":"filter"},$goog$dom$createDom$$("option",{},$JSCompiler_StaticMethods_getSelectFilter_$self$$.options.selectOptionLabel)),$cells$$1$$=$goog$array$map$$($JSCompiler_StaticMethods_getSelectFilter_$self$$.$listItems$, 3798function($r$$2$$){return $r$$2$$.cells[$colIdx$$1$$]}),$values$$7$$=[];$goog$array$forEach$$($cells$$1$$,function($td$$2_txt$$3$$){($td$$2_txt$$3$$=$goog$string$trim$$($goog$dom$getTextContent$$($td$$2_txt$$3$$)))&&!(" "===$td$$2_txt$$3$$||0<=$goog$array$indexOf$$($values$$7$$,$td$$2_txt$$3$$))&&$values$$7$$.push($td$$2_txt$$3$$)});$values$$7$$.sort();$goog$array$forEach$$($values$$7$$,function($child$$inline_239_txt$$4$$){$child$$inline_239_txt$$4$$=$goog$dom$createDom$$("option",{value:$child$$inline_239_txt$$4$$.replace('"', 3799""")},$child$$inline_239_txt$$4$$);$select$$.appendChild($child$$inline_239_txt$$4$$)});return $select$$} 3800$JSCompiler_prototypeAlias$$.$getFilterStates$=function $$JSCompiler_prototypeAlias$$$$getFilterStates$$(){for(var $filterStates$$3$$=[],$i$$89$$=0;$i$$89$$<this.$filters$.length;$i$$89$$++){var $state$$8$$=this.$getFilterStateForFilter$(this.$filters$[$i$$89$$]);$state$$8$$&&$filterStates$$3$$.push($state$$8$$)}if(!this.options.additionalFilterTriggers)return $filterStates$$3$$;for($i$$89$$=0;$i$$89$$<this.options.additionalFilterTriggers.length;$i$$89$$++)($state$$8$$=this.$getFilterStateForFilter$(this.options.additionalFilterTriggers[$i$$89$$]))&& 3801$filterStates$$3$$.push($state$$8$$);return $filterStates$$3$$};$JSCompiler_prototypeAlias$$.$getFilterStateForFilter$=function $$JSCompiler_prototypeAlias$$$$getFilterStateForFilter$$($filter$$5$$){var $state$$9$$=$pn$ui$filter$TableFilter$$.$superClass_$.$getFilterStateForFilter$.call(this,$filter$$5$$);$state$$9$$&&($state$$9$$.$idx$=this.$getColumnIndexOfFilter_$($filter$$5$$));return $state$$9$$}; 3802$JSCompiler_prototypeAlias$$.$doesElementContainText$=function $$JSCompiler_prototypeAlias$$$$doesElementContainText$$($state$$10$$,$tr$$3$$,$textTokens$$4$$){var $cells$$2$$=$tr$$3$$.getElementsByTagName("td"),$columnIdx_txt$$5$$=$state$$10$$===$JSCompiler_alias_NULL$$?-1:$state$$10$$.$idx$;if(0>$columnIdx_txt$$5$$){for(var $columnIdx_txt$$5$$=[],$i$$90$$=0;$i$$90$$<$cells$$2$$.length;$i$$90$$++){var $header$$6$$=this.$headers_$[$i$$90$$];"none"!=$header$$6$$.style.display&&"false"!==$header$$6$$.getAttribute("filter")&& 3803$columnIdx_txt$$5$$.push($goog$string$trim$$($goog$dom$getTextContent$$($cells$$2$$[$i$$90$$])))}return $pn$ui$filter$TableFilter$$.$superClass_$.$doesElementContainText$.call(this,$state$$10$$,$tr$$3$$,$textTokens$$4$$,$columnIdx_txt$$5$$)}return $pn$ui$filter$TableFilter$$.$superClass_$.$doesElementContainText$.call(this,$state$$10$$,$cells$$2$$[$columnIdx_txt$$5$$],$textTokens$$4$$)};var $jq$$=window.jQuery; 3804$jq$$&&($jq$$.$tableFilter$=function $$jq$$$$tableFilter$$($element$$inline_242$$,$opts$$inline_243$$){var $tf$$inline_244$$;this.$init$=function $this$$init$$(){var $options$$inline_245$$=$jq$$.extend({},new $pn$ui$filter$TableFilterOptions$$,$opts$$inline_243$$);$tf$$inline_244$$=new $pn$ui$filter$TableFilter$$($element$$inline_242$$,$options$$inline_245$$)};this.refresh=function $this$refresh$(){$pn$ui$filter$TableFilter$$.$superClass_$.refresh.call($tf$$inline_244$$)};this.reset=function $this$reset$($list$$inline_246$$){$pn$ui$filter$TableFilter$$.$superClass_$.$resetList$.call($tf$$inline_244$$, 3805$list$$inline_246$$)};this.$clearFilters$=function $this$$clearFilters$$(){$pn$ui$filter$TableFilter$$.$superClass_$.$clearAllFilters$.call($tf$$inline_244$$)};this.$init$()},$jq$$.fn.tableFilter=function $$jq$$$fn$tableFilter$($options$$inline_247$$){return $goog$array$forEach$$(this,function($t$$inline_248$$){if($JSCompiler_alias_VOID$$===$jq$$($t$$inline_248$$).data("tableFilter")||$jq$$($t$$inline_248$$).data("tableFilter")===$JSCompiler_alias_NULL$$){var $plugin$$inline_249$$=new $jq$$.$tableFilter$($t$$inline_248$$, 3806$options$$inline_247$$);$jq$$($t$$inline_248$$).data("tableFilter",$plugin$$inline_249$$)}})},$jq$$.fn.tableFilterApplyFilterValues=function $$jq$$$fn$tableFilterApplyFilterValues$(){return $goog$array$forEac
3806h$$(this,function($t$$inline_250$$){$JSCompiler_alias_VOID$$!==$jq$$($t$$inline_250$$).data("tableFilter")&&$jq$$($t$$inline_250$$).data("tableFilter")!==$JSCompiler_alias_NULL$$&&$jq$$($t$$inline_250$$).data("tableFilter").refresh()})},$jq$$.fn.tableFilterRefresh=function $$jq$$$fn$tableFilterRefresh$(){return $goog$array$forEach$$(this, 3807function($t$$inline_251$$){$JSCompiler_alias_VOID$$!==$jq$$($t$$inline_251$$).data("tableFilter")&&$jq$$($t$$inline_251$$).data("tableFilter")!==$JSCompiler_alias_NULL$$&&$jq$$($t$$inline_251$$).data("tableFilter").reset($t$$inline_251$$)})},$jq$$.fn.tableFilterClearFilters=function $$jq$$$fn$tableFilterClearFilters$(){return $goog$array$forEach$$(this,function($t$$inline_252$$){$JSCompiler_alias_VOID$$!==$jq$$($t$$inline_252$$).data("tableFilter")&&$jq$$($t$$inline_252$$).data("tableFilter")!==$JSCompiler_alias_NULL$$&& 3808$jq$$($t$$inline_252$$).data("tableFilter").$clearFilters$()})}); 3809(function(factory){if (typeof define === 'function' && define.amd){define(['jquery'], factory);} else if (typeof module === 'object' && typeof module.exports === 'object'){module.exports = factory(require('jquery'));} else {factory(jQuery);}}(function(jQuery){
vendor: 52,655 bytes, lines 3810-3811
3810 3811!function(e){"function"==typeof define&&define.amd?define(["jquery"],e):"object"==typeof module&&"object"==typeof module.exports?module.exports=e(require("jquery")):e(jQuery)}(function(e){return function(h,u,p){"use strict";var g=h.tablesorter||{};h.extend(!0,g.defaults,{fixedUrl:"",widgetOptions:{storage_fixedUrl:"",storage_group:"",storage_page:"",storage_storageType:"",storage_tableId:"",storage_useSessionStorage:""}}),g.storage=function(e,t,r,i){var a=!1,l={},s=(e=h(e)[0]).config,n=s&&s.widgetOptions,o=g.debug(s,"storage"),c=(i&&i.storageType||n&&n.storage_storageType).toString().charAt(0).toLowerCase(),d=c?"":i&&i.useSessionStorage||n&&n.storage_useSessionStorage,f=h(e),e=i&&i.id||f.attr(i&&i.group||n&&n.storage_group||"data-table-group")||n&&n.storage_tableId||e.id||h(".tablesorter").index(f),f=i&&i.url||f.attr(i&&i.page||n&&n.storage_page||"data-table-page")||n&&n.storage_fixedUrl||s&&s.fixedUrl||u.location.pathname;if("c"!==c&&(c="s"===c||d?"sessionStorage":"localStorage")in u)try{u[c].setItem("_tmptest","temp"),a=!0,u[c].removeItem("_tmptest")}catch(e){console.warn(c+" is not supported in this browser")}if(o&&console.log("Storage >> Using",a?c:"cookies"),h.parseJSON&&(l=a?h.parseJSON(u[c][t]||"null")||{}:(i=p.cookie.split(/[;\s|=]/),0!==(n=h.inArray(t,i)+1)&&h.parseJSON(i[n]||"null")||{})),void 0===r||!u.JSON||!JSON.hasOwnProperty("stringify"))return l&&l[f]?l[f][e]:"";l[f]||(l[f]={}),l[f][e]=r,a?u[c][t]=JSON.stringify(l):((s=new Date).setTime(s.getTime()+31536e6),p.cookie=t+"="+JSON.stringify(l).replace(/\"/g,'"')+"; expires="+s.toGMTString()+"; path=/")}}(e,window,document),function(S){"use strict";var C=S.tablesorter||{};C.themes={bootstrap:{table:"table table-bordered table-striped",caption:"caption",header:"bootstrap-header",sortNone:"",sortAsc:"",sortDesc:"",active:"",hover:"",icons:"",iconSortNone:"bootstrap-icon-unsorted",iconSortAsc:"glyphicon glyphicon-chevron-up",iconSortDesc:"glyphicon glyphicon-chevron-down",filterRow:"",footerRow:"",footerCells:"",even:"",odd:""},jui:{table:"ui-widget ui-widget-content ui-corner-all",caption:"ui-widget-content",header:"ui-widget-header ui-corner-all ui-state-default",sortNone:"",sortAsc:"",sortDesc:"",active:"ui-state-active",hover:"ui-state-hover",icons:"ui-icon",iconSortNone:"ui-icon-carat-2-n-s ui-icon-caret-2-n-s",iconSortAsc:"ui-icon-carat-1-n ui-icon-caret-1-n",iconSortDesc:"ui-icon-carat-1-s ui-icon-caret-1-s",filterRow:"",footerRow:"",footerCells:"",even:"ui-widget-content",odd:"ui-state-default"}},S.extend(C.css,{wrapper:"tablesorter-wrapper"}),C.addWidget({id:"uitheme",priority:10,format:function(e,t,r){var i,a,l,s,n,o,c,d,f,h,u,p,g=C.themes,m=t.$table.add(S(t.namespace+"_extra_table")),b=t.$headers.add(S(t.namespace+"_extra_headers")),y=t.theme||"jui",_=g[y]||{},v=S.trim([_.sortNone,_.sortDesc,_.sortAsc,_.active].join(" ")),w=S.trim([_.iconSortNone,_.iconSortDesc,_.iconSortAsc].join(" ")),x=C.debug(t,"uitheme");for(x&&(n=new Date),m.hasClass("tablesorter-"+y)&&t.theme===t.appliedTheme&&r.uitheme_applied||(r.uitheme_applied=!0,h=g[t.appliedTheme]||{},g=(p=!S.isEmptyObject(h))?[h.sortNone,h.sortDesc,h.sortAsc,h.active].join(" "):"",u=p?[h.iconSortNone,h.iconSortDesc,h.iconSortAsc].join(" "):"",p&&(r.zebra[0]=S.trim(" "+r.zebra[0].replace(" "+h.even,"")),r.zebra[1]=S.trim(" "+r.zebra[1].replace(" "+h.odd,"")),t.$tbodies.children().removeClass([h.even,h.odd].join(" "))),_.even&&(r.zebra[0]+=" "+_.even),_.odd&&(r.zebra[1]+=" "+_.odd),m.children("caption").removeClass(h.caption||"").addClass(_.caption),d=m.removeClass((t.appliedTheme?"tablesorter-"+(t.appliedTheme||""):"")+" "+(h.table||"")).addClass("tablesorter-"+y+" "+(_.table||"")).children("tfoot"),t.appliedTheme=t.theme,d.length&&d.children("tr").removeClass(h.footerRow||"").addClass(_.footerRow).children("th, td").removeClass(h.footerCells||"").addClass(_.footerCells),b.removeClass((p?[h.header,h.hover,g].join(" "):"")||"").addClass(_.header).not(".sorter-false").unbind("mouseenter.tsuitheme mouseleave.tsuitheme").bind("mouseenter.tsuitheme mouseleave.tsuitheme",function(e){S(this)["mouseenter"===e.type?"addClass":"removeClass"](_.hover||"")}),b.each(function(){var e=S(this);e.find("."+C.css.wrapper).length||e.wrapInner('<div class="'+C.css.wrapper+'" style="position:relative;height:100%;width:100%"></div>')}),t.cssIcon&&b.find("."+C.css.icon).removeClass(p?[h.icons,u].join(" "):"").addClass(_.icons||""),C.hasWidget(t.table,"filter")&&(a=function(){m.children("thead").children("."+C.css.filterRow).removeClass(p&&h.filterRow||"").addClass(_.filterRow||"")},r.filter_initialized?a():m.one("filterInit",function(){a()}))),i=0;i<t.columns;i++)o=t.$headers.add(S(t.namespace+"_extra_headers")).not(".sorter-false").filter('[data-column="'+i+'"]'),c=C.css.icon?o.find("."+C.css.icon):S(),(f=b.not(".sorter-false").filter('[data-column="'+i+'"]:last')).length&&(o.removeClass(v),c.removeClass(w),f[0].sortDisabled?c.removeClass(_.icons||""):(l=_.sortNone,s=_.iconSortNone,f.hasClass(C.css.sortAsc)?(l=[_.sortAsc,_.active].join(" "),s=_.iconSortAsc):f.hasClass(C.css.sortDesc)&&(l=[_.sortDesc,_.active].join(" "),s=_.iconSortDesc),o.addClass(l),c.addClass(s||"")));x&&console.log("uitheme >> Applied "+y+" theme"+C.benchmark(n))},remove:function(e,t,r,i){var a,l,s,n,o;r.uitheme_applied&&(a=t.$table,t=t.appliedTheme||"jui",l=C.themes[t]||C.themes.jui,s=a.children("thead").children(),n=l.sortNone+" "+l.sortDesc+" "+l.sortAsc,o=l.iconSortNone+" "+l.iconSortDesc+" "+l.iconSortAsc,a.removeClass("tablesorter-"+t+" "+l.table),r.uitheme_applied=!1,i||(a.find(C.css.header).removeClass(l.header),s.unbind("mouseenter.tsuitheme mouseleave.tsuitheme").removeClass(l.hover+" "+n+" "+l.active).filter("."+C.css.filterRow).removeClass(l.filterRow),s.find("."+C.css.icon).removeClass(l.icons+" "+o)))}})}(e),function(m){"use strict";var b=m.tablesorter||{};b.addWidget({id:"columns",priority:65,options:{columns:["primary","secondary","tertiary"]},format:function(e,t,r){for(var i,a,l,s,n,o=t.$table,c=t.$tbodies,d=t.sortList,f=d.length,h=r&&r.columns||["primary","secondary","tertiary"],u=h.length-1,p=h.join(" "),g=0;g<c.length;g++)(a=(i=b.processTbody(e,c.eq(g),!0)).children("tr")).each(function(){if(l=m(this),"none"!==this.style.display&&(s=l.children().removeClass(p),d)&&d[0]&&(s.eq(d[0][0]).addClass(h[0]),1<f))for(n=1;n<f;n++)s.eq(d[n][0]).addClass(h[n]||h[u])}),b.processTbody(e,i,!1);if(t=!1!==r.columns_thead?["thead tr"]:[],!1!==r.columns_tfoot&&t.push("tfoot tr"),t.length&&(a=o.find(t.join(",")).children().removeClass(p),f))for(n=0;n<f;n++)a.filter('[data-column="'+d[n][0]+'"]').addClass(h[n]||h[u])},remove:function(e,t,r){var i,a,l=t.$tbodies,s=(r.columns||["primary","secondary","tertiary"]).join(" ");for(t.$headers.removeClass(s),t.$table.children("tfoot").children("tr").children("th, td").removeClass(s),i=0;i<l.length;i++)(a=b.processTbody(e,l.eq(i),!0)).children("tr").each(function(){m(this).children().removeClass(s)}),b.processTbody(e,a,!1)}})}(e),function(A){"use strict";var I,O,E=A.tablesorter||{},g=E.css,o=E.keyCodes;A.extend(g,{filterRow:"tablesorter-filter-row",filter:"tablesorter-filter",filterDisabled:"disabled",filterRowHide:"hideme"}),A.extend(o,{backSpace:8,escape:27,space:32,left:37,down:40}),E.addWidget({id:"filter",priority:50,options:{filter_cellFilter:"",filter_childRows:!1,filter_childByColumn:!1,filter_childWithSibs:!0,filter_columnAnyMatch:!0,filter_columnFilters:!0,filter_cssFilter:"",filter_defaultAttrib:"data-value",filter_defaultFilter:{},filter_excludeFilter:{},filter_external:"",filter_filteredRow:"filtered",filter_filterLabel:'Filter "{{label}}" column by...',filter_formatter:null,filter_functions:null,filter_hideEmpty:!0,filter_hideFilters:!1,filter_ignoreCase:!0,filter_liveSearch:!0,filter_matchType:{input:"exact",select:"exact"},filter_onlyAvail:"filter-onlyAvail",filter_placeholder:{search:"",select:""},filter_reset:null,filter_resetOnEsc:!0,filter_saveFilters:!1,filter_searchDelay:300,filter_searchFiltered:!0,filter_selectSource:null,filter_selectSourceSeparator:"|",filter_serversideFiltering:!1,filter_startsWith:!1,filter_useParsedData:!1},format:function(e,t,r){t.$table.hasClass("hasFilters")||I.init(e,t,r)},remove:function(e,t,r,i){var a,l,s=t.$table,n=t.$tbodies,o="addRows updateCell update updateRows updateComplete appendCache filterReset filterAndSortReset filterFomatterUpdate filterEnd search stickyHeadersInit ".split(" ").join(t.namespace+"filter ");if(s.removeClass("hasFilters").unbind(o.replace(E.regex.spaces," ")).find("."+g.filterRow).remove(),r.filter_initialized=!1,!i){for(a=0;a<n.length;a++)(l=E.processTbody(e,n.eq(a),!0)).children().removeClass(r.filter_filteredRow).show(),E.processTbody(e,l,!1);r.filter_reset&&A(document).undelegate(r.filter_reset,"click"+t.namespace+"filter")}}}),I=E.filter={regex:{regex:/^\/((?:\\\/|[^\/])+)\/([migyu]{0,5})?$/,child:/tablesorter-childRow/,filtered:/filtered/,type:/undefined|number/,exact:/(^[\"\'=]+)|([\"\'=]+$)/g,operators:/[<>=]/g,query:"(q|query)",wild01:/\?/g,wild0More:/\*/g,quote:/\"/g,isNeg1:/(>=?\s*-\d)/,isNeg2:/(<=?\s*\d)/},types:{or:function(e,t,r){if(!O.orTest.test(t.iFilter)&&!O.orSplit.test(t.filter)||O.regex.test(t.filter))return null;for(var i,a,l=A.extend({},t),s=t.filter.split(O.orSplit),n=t.iFilter.split(O.orSplit),o=s.length,c=0;c<o;c++){l.nestedFilters=!0,l.filter=""+(I.parseFilter(e,s[c],t)||""),l.iFilter=""+(I.parseFilter(e,n[c],t)||""),a="("+(I.parseFilter(e,l.filter,t)||"")+")";try{if(i=new RegExp(t.isMatch?a:"^"+a+"$",e.widgetOptions.filter_ignoreCase?"i":"").test(l.exact)||I.processTypes(e,l,r))return i}catch(e){return null}}return i||!1},and:function(e,t,r){if(O.andTest.test(t.filter)){for(var i,a,l,s=A.extend({},t),n=t.filter.split(O.andSplit),o=t.iFilter.split(O.andSplit),c=n.length,d=0;d<c;d++){s.nestedFilters=!0,s.filter=""+(I.parseFilter(e,n[d],t)||""),s.iFilter=""+(I.parseFilter(e,o[d],t)||""),l=("("+(I.parseFilter(e,s.filter,t)||"")+")").replace(O.wild01,"\\S{1}").replace(O.wild0More,"\\S*");try{a=new RegExp(t.isMatch?l:"^"+l+"$",e.widgetOptions.filter_ignoreCase?"i":"").test(s.exact)||I.processTypes(e,s,r),i=(0===d||i)&&a}catch(e){return null}}return i||!1}return null},regex:function(e,t){if(O.regex.test(t.filter)){var r,i=t.filter_regexCache[t.index]||O.regex.exec(t.filter),a=i instanceof RegExp;try{a||(t.filter_regexCache[t.index]=i=new RegExp(i[1],i[2])),r=i.test(t.exact)}catch(e){r=!1}return r}return null},operators:function(e,t){var r,i,a,l,s,n,o;return O.operTest.test(t.iFilter)&&""!==t.iExact?(a=e.table,l=t.parsed[t.index],s=E.formatFloat(t.iFilter.replace(O.operators,""),a),n=e.parsers[t.index]||{},o=s,!l&&"numeric"!==n.type||(i=A.trim(""+t.iFilter.replace(O.operators,"")),s="number"!=typeof(r=I.parseFilter(e,i,t,!0))||""===r||isNaN(r)?s:r),e=!l&&"numeric"!==n.type||isNaN(s)||void 0===t.cache?(i=isNaN(t.iExact)?t.iExact.replace(E.regex.nondigit,""):t.iExact,E.formatFloat(i,a)):t.cache,O.gtTest.test(t.iFilter)?r=O.gteTest.test(t.iFilter)?s<=e:s<e:O.ltTest.test(t.iFilter)&&(r=O.lteTest.test(t.iFilter)?e<=s:e<s),!r&&""===o||r):null},notMatch:function(e,t){var r,i;return O.notTest.test(t.iFilter)?(i=t.iFilter.replace("!",""),i=I.parseFilter(e,i,t)||"",O.exact.test(i)?""===(i=i.replace(O.exact,""))||A.trim(i)!==t.iExact:(r=t.iExact.search(A.trim(i)),""===i||(t.anyMatch?r<0:!(e.widgetOptions.filter_startsWith?0===r:0<=r)))):null},exact:function(e,t){var r;return O.exact.test(t.iFilter)?(r=t.iFilter.replace(O.exact,""),e=I.parseFilter(e,r,t)||"",t.anyMatch?0<=A.inArray(e,t.rowArray):e==t.iExact):null},range:function(e,t){var r,i,a,l,s,n,o,c;return O.toTest.test(t.iFilter)?(a=e.table,l=t.index,s=t.parsed[l],o=(n=t.iFilter.split(O.toSplit))[0].replace(E.regex.nondigit,"")||"",c=E.formatFloat(I.parseFilter(e,o,t),a),o=n[1].replace(E.regex.nondigit,"")||"",i=E.formatFloat(I.parseFilter(e,o,t),a),!s&&"numeric"!==e.parsers[l].type||(c=""===(r=e.parsers[l].format(""+n[0],a,e.$headers.eq(l),l))||isNaN(r)?c:r,i=""===(r=e.parsers[l].format(""+n[1],a,e.$headers.eq(l),l))||isNaN(r)?i:r),r=!s&&"numeric"!==e.parsers[l].type||isNaN(c)||isNaN(i)?(o=isNaN(t.iExact)?t.iExact.replace(E.regex.nondigit,""):t.iExact,E.formatFloat(o,a)):t.cache,i<c&&(o=c,c=i,i=o),c<=r&&r<=i||""===c||""===i):null},wild:function(e,t){if(O.wildOrTest.test(t.iFilter)){var r=""+(I.parseFilter(e,t.iFilter,t)||"");!O.wildTest.test(r)&&t.nestedFilters&&(r=t.isMatch?r:"^("+r+")$");try{return new RegExp(r.replace(O.wild01,"\\S{1}").replace(O.wild0More,"\\S*"),e.widgetOptions.filter_ignoreCase?"i":"").test(t.exact)}catch(e){}}return null},fuzzy:function(e,t){if(O.fuzzyTest.test(t.iFilter)){for(var r=0,i=t.iExact.length,a=t.iFilter.slice(1),l=I.parseFilter(e,a,t)||"",s=0;s<i;s++)t.iExact[s]===l[r]&&(r+=1);return r===l.length}return null}},init:function(r){E.language=A.extend(!0,{},{to:"to",or:"or",and:"and"},E.language);function e(e,t,r){return""===(t=t.trim())?"":(e||"")+t+(r||"")}var t,i,a,l,s,n,o,c,d=r.config,f=d.widgetOptions;if(d.$table.addClass("hasFilters"),d.lastSearch=[],f.filter_searchTimer=null,f.filter_initTimer=null,f.filter_formatterCount=0,f.filter_formatterInit=[],f.filter_anyColumnSelector='[data-column="all"],[data-column="any"]',f.filter_multipleColumnSelector='[data-column*="-"],[data-column*=","]',n="\\{"+O.query+"\\}",A.extend(O,{child:new RegExp(d.cssChildRow),filtered:new RegExp(f.filter_filteredRow),alreadyFiltered:new RegExp("(\\s+(-"+e("|",E.language.or)+e("|",E.language.to)+")\\s+)","i"),toTest:new RegExp("\\s+(-"+e("|",E.language.to)+")\\s+","i"),toSplit:new RegExp("(?:\\s+(?:-"+e("|",E.language.to)+")\\s+)","gi"),andTest:new RegExp("\\s+("+e("",E.language.and,"|")+"&&)\\s+","i"),andSplit:new RegExp("(?:\\s+(?:"+e("",E.language.and,"|")+"&&)\\s+)","gi"),orTest:new RegExp("(\\|"+e("|\\s+",E.language.or,"\\s+")+")","i"),orSplit:new RegExp("(?:\\|"+e("|\\s+(?:",E.language.or,")\\s+")+")","gi"),iQuery:new RegExp(n,"i"),igQuery:new RegExp(n,"ig"),operTest:/^[<>]=?/,gtTest:/>/,gteTest:/>=/,ltTest:/</,lteTest:/<=/,notTest:/^\!/,wildOrTest:/[\?\*\|]/,wildTest:/\?\*/,fuzzyTest:/^~/,exactTest:/[=\"\|!]/}),n=d.$headers.filter(".filter-false, .parser-false").length,!1!==f.filter_columnFilters&&n!==d.$headers.length&&I.buildRow(r,d,f),a="addRows updateCell update updateRows updateComplete appendCache filterReset "+"filterAndSortReset filterResetSaved filterEnd search ".split(" ").join(d.namespace+"filter "),d.$table.bind(a,function(e,t){return n=f.filter_hideEmpty&&A.isEmptyObject(d.cache)&&!(d.delayInit&&"appendCache"===e.type),d.$table.find("."+g.filterRow).toggleClass(f.filter_filteredRow,n),/(search|filter)/.test(e.type)||(e.stopPropagation(),I.buildDefault(r,!0)),"filterReset"===e.type||"filterAndSortReset"===e.type?(d.$table.find("."+g.filter).add(f.filter_$externalFilters).val(""),"filterAndSortReset"===e.type?E.sortReset(this.config,function(){I.searching(r,[])}):I.searching(r,[])):"filterResetSaved"===e.type?E.storage(r,"tablesorter-filters",""):"filterEnd"===e.type?I.buildDefault(r,!0):(t="search"===e.type?t:"updateComplete"===e.type?d.$table.data("lastSearch"):"",/(update|add)/.test(e.type)&&"updateComplete"!==e.type&&(d.lastCombinedFilter=null,d.lastSearch=[],setTimeout(function(){d.$table.triggerHandler("filterFomatterUpdate")},100)),I.searching(r,t,!0)),!1}),f.filter_reset&&(f.filter_reset instanceof A?f.filter_reset.click(function(){d.$table.triggerHandler("filterReset")}):A(f.filter_reset).length&&A(document).undelegate(f.filter_reset,"click"+d.namespace+"filter").delegate(f.filter_reset,"click"+d.namespace+"filter",function(){d.$table.triggerHandler("filterReset")})),f.filter_functions)for(s=0;s<d.columns;s++)if(o=E.getColumnData(r,f.filter_functions,s))if(c=!((l=d.$headerIndexed[s].removeClass("filter-select")).hasClass("filter-false")||l.hasClass("parser-false")),!(t="")===o&&c)I.buildSelect(r,s);else if("object"==typeof o&&c){for(i in o)"string"==typeof i&&(t+=""===t?'<option value="">'+(l.data("placeholder")||l.attr("data-placeholder")||f.filter_placeholder.select||"")+"</option>":"",0<=(a=n=i).indexOf(f.filter_selectSourceSeparator)&&(a=(n=i.split(f.filter_selectSourceSeparator))[1],n=n[0]),t+="<option "+(a===n?"":'data-function-name="'+i+'" ')+'value="'+n+'">'+a+"</option>");d.$table.find("thead").find("select."+g.filter+'[data-column="'+s+'"]').append(t),("function"==typeof(a=f.filter_selectSource)||E.getColumnData(r,a,s))&&I.buildSelect(d.table,s,"",!0,l.hasClass(f.filter_onlyAvail))}I.buildDefault(r,!0),I.bindSearch(r,d.$table.find("."+g.filter),!0),f.filter_external&&I.bindSearch(r,f.filter_external),f.filter_hideFilters&&I.hideFilters(d),d.showProcessing&&(a="filterStart filterEnd ".split(" ").join(d.namespace+"filter-sp "),d.$table.unbind(a.replace(E.regex.spaces," ")).bind(a,function(e,t){l=t?d.$table.find("."+g.header).filter("[data-column]").filter(function(){return""!==t[A(this).data("column")]}):"",E.isProcessing(r,"filterStart"===e.type,t?l:"")})),d.filteredRows=d.totalRows,a="tablesorter-initialized pagerBeforeInitialized ".split(" ").join(d.namespace+"filter "),d.$table.unbind(a.replace(E.regex.spaces," ")).bind(a,function(){I.completeInit(this)}),d.pager&&d.pager.initialized&&!f.filter_initialized?(d.$table.triggerHandler("filterFomatterUpdate"),setTimeout(function(){I.filterInitComplete(d)},100)):f.filter_initialized||I.completeInit(r)},completeInit:function(e){var t=e.config,r=t.widgetOptions,i=I.setDefaults(e,t,r)||[];!i.length||t.delayInit&&""===i.join("")||E.setFilters(e,i,!0),t.$table.triggerHandler("filterFomatterUpdate"),setTimeout(function(){r.filter_initialized||I.filterInitComplete(t)},100)},formatterUpdated:function(e,t){e=e&&e.closest("table"),e=e.length&&e[0].config,e=e&&e.widgetOptions;e&&!e.filter_initialized&&(e.filter_formatterInit[t]=1)},filterInitComplete:function(e){function t(){a.filter_initialized=!0,e.lastSearch=e.$table.data("lastSearch"),e.$table.triggerHandler("filterInit",e),I.findRows(e.table,e.lastSearch||[]),E.debug(e,"filter")&&console.log("Filter >> Widget initialized")}var r,i,a=e.widgetOptions,l=0;if(A.isEmptyObject(a.filter_formatter))t();else{for(i=a.filter_formatterInit.length,r=0;r<i;r++)1===a.filter_formatterInit[r]&&l++;clearTimeout(a.filter_initTimer),a.filter_initialized||l!==a.filter_formatterCount?a.filter_initialized||(a.filter_initTimer=setTimeout(function(){t()},500)):t()}},processFilters:function(e,t){for(var r=[],i=t?encodeURIComponent:decodeURIComponent,a=e.length,l=0;l<a;l++)e[l]&&(r[l]=i(e[l]));return r},setDefaults:function(e,t,r){var i,a,l,s,n=E.getFilters(e)||[];if(r.filter_saveFilters&&E.storage&&(e=E.storage(e,"tablesorter-filters")||[],(i=A.isArray(e))&&""===e.join("")||!i||(n=I.processFilters(e))),""===n.join(""))for(s=t.$headers.add(r.filter_$externalFilters).filter("["+r.filter_defaultAttrib+"]"),a=0;a<=t.columns;a++)l=a===t.columns?"all":a,n[a]=s.filter('[data-column="'+l+'"]').attr(r.filter_defaultAttrib)||n[a]||"";return t.$table.data("lastSearch",n),n},parseFilter:function(e,t,r,i){return i||r.parsed[r.index]?e.parsers[r.index].format(t,e.table,[],r.index):t},buildRow:function(e,t,r){for(var i,a,l,s,n,o,c,d=r.filter_cellFilter,f=t.columns,h=A.isArray(d),u='<tr role="search" class="'+g.filterRow+" "+t.cssIgnoreRow+'">',p=0;p<f;p++)t.$headerIndexed[p].length&&(u=(u+=1<(c=t.$headerIndexed[p]&&t.$headerIndexed[p][0].colSpan||0)?'<td data-column="'+p+"-"+(p+c-1)+'" colspan="'+c+'"':'<td data-column="'+p+'"')+(h?d[p]?' class="'+d[p]+'"':"":""!==d?' class="'+d+'"':"")+"></td>");for(t.$filters=A(u+="</tr>").appendTo(t.$table.children("thead").eq(0)).children("td"),p=0;p<f;p++)(a=t.$headerIndexed[p])&&a.length&&(i=I.getColumnElm(t,t.$filters,p),o=E.getColumnData(e,r.filter_functions,p),l=r.filter_functions&&o&&"function"!=typeof o||a.hasClass("filter-select"),s=E.getColumnData(e,t.headers,p),s="false"===E.getData(a[0],s,"filter")||"false"===E.getData(a[0],s,"parser"),l?u=A("<select>").appendTo(i):((o=E.getColumnData(e,r.filter_formatter,p))?(r.filter_formatterCount++,(u=(u=o(i,p))&&0===u.length?i.children("input"):u)&&(0===u.parent().length||u.parent().length&&u.parent()[0]!==i[0])&&i.append(u)):u=A('<input type="search">').appendTo(i),u&&(c=a.data("placeholder")||a.attr("data-placeholder")||r.filter_placeholder.search||"",u.attr("placeholder",c))),u)&&(n=(A.isArray(r.filter_cssFilter)?void 0!==r.filter_cssFilter[p]&&r.filter_cssFilter[p]||"":r.filter_cssFilter)||"",u.addClass(g.filter+" "+n),c=(n=r.filter_filterLabel).match(/{{([^}]+?)}}/g),A.each(c=c||["{{label}}"],function(e,t){var r=new RegExp(t,"g"),t=a.attr("data-"+t.replace(/{{|}}/g,"")),t=void 0===t?a.text():t;n=n.replace(r,A.trim(t))}),u.attr({"data-column":i.attr("data-column"),"aria-label":n}),s)&&(u.attr("placeholder","").addClass(g.filterDisabled)[0].disabled=!0)},bindSearch:function(a,e,t){var r,l,s,i,n;a=A(a)[0],(e=A(e)).length&&(l=a.config,s=l.widgetOptions,i=l.namespace+"filter",n=s.filter_$externalFilters,!0!==t&&(r=s.filter_anyColumnSelector+","+s.filter_multipleColumnSelector,s.filter_$anyMatch=e.filter(r),n&&n.length?s.filter_$externalFilters=s.filter_$externalFilters.add(e):s.filter_$externalFilters=e,E.setFilters(a,l.$table.data("lastSearch")||[],!1===t)),r="keypress keyup keydown search change input ".split(" ").join(i+" "),e.attr("data-lastSearchTime",(new Date).getTime()).unbind(r.replace(E.regex.spaces," ")).bind("keydown"+i,function(e){if(e.which===o.escape&&!a.config.widgetOptions.filter_resetOnEsc)return!1}).bind("keyup"+i,function(e){s=a.config.widgetOptions;var t=parseInt(A(this).attr("data-column"),10),r="boolean"==typeof s.filter_liveSearch?s.filter_liveSearch:E.getColumnData(a,s.filter_liveSearch,t);if(void 0===r&&(r=s.filter_liveSearch.fallback||!1),A(this).attr("data-lastSearchTime",(new Date).getTime()),e.which===o.escape)this.value=s.filter_resetOnEsc?"":l.lastSearch[t];else{if(""!==this.value&&("number"==typeof r&&this.value.length<r||e.which!==o.enter&&e.which!==o.backSpace&&(e.which<o.space||e.which>=o.left&&e.which<=o.down)))return;if(!1===r&&""!==this.value&&e.which!==o.enter)return}I.searching(a,!0,!0,t)}).bind("search change keypress input blur ".split(" ").join(i+" "),function(e){var t=parseInt(A(this).attr("data-column"),10),r=e.type,i="boolean"==typeof s.filter_liveSearch?s.filter_liveSearch:E.getColumnData(a,s.filter_liveSearch,t);!a.config.widgetOptions.filter_initialized||e.which!==o.enter&&"search"!==r&&"blur"!==r&&("change"!==r&&"input"!==r||!0!==i&&(!0===i||"INPUT"===e.target.nodeName)||this.value===l.lastSearch[t])||(e.preventDefault(),A(this).attr("data-lastSearchTime",(new Date).getTime()),I.searching(a,"keypress"!==r||e.which===o.enter,!0,t))}))},searching:function(e,t,r,i){var a,l=e.config.widgetOptions;void 0===i?a=!1:void 0===(a="boolean"==typeof l.filter_liveSearch?l.filter_liveSearch:E.getColumnData(e,l.filter_liveSearch,i))&&(a=l.filter_liveSearch.fallback||!1),clearTimeout(l.filter_searchTimer),void 0===t||!0===t?l.filter_searchTimer=setTimeout(function(){I.checkFilters(e,t,r)},a?l.filter_searchDelay:10):I.checkFilters(e,t,r)},equalFilters:function(e,t,r){var i,a=[],l=[],s=e.columns+1;for(t=A.isArray(t)?t:[],r=A.isArray(r)?r:[],i=0;i<s;i++)a[i]=t[i]||"",l[i]=r[i]||"";return a.join(",")===l.join(",")},checkFilters:function(e,t,r){var i=e.config,a=i.widgetOptions,l=A.isArray(t),s=l?t:E.getFilters(e,!0),n=s||[];if(A.isEmptyObject(i.cache))i.delayInit&&(!i.pager||i.pager&&i.pager.initialized)&&E.updateCache(i,function(){I.checkFilters(e,!1,r)});else{if(l&&(E.setFilters(e,s,!1,!0!==r),a.filter_initialized||(i.lastSearch=[],i.lastCombinedFilter="")),a.filter_hideFilters&&i.$table.find("."+g.filterRow).triggerHandler(I.hideFiltersCheck(i)?"mouseleave":"mouseenter"),I.equalFilters(i,i.lastSearch,n)){if(!1!==t)return;i.lastCombinedFilter="",i.lastSearch=[]}if(s=s||[],s=Array.prototype.map?s.map(String):s.join("�").split("�"),a.filter_initialized&&i.$table.triggerHandler("filterStart",[s]),!i.showProcessing)return I.findRows(e,s,n),!1;setTimeout(function(){return I.findRows(e,s,n),!1},30)}},hideFiltersCheck:function(e){if("function"==typeof e.widgetOptions.filter_hideFilters){var t=e.widgetOptions.filter_hideFilters(e);if("boolean"==typeof t)return t}return""===E.getFilters(e.$table).join("")},hideFilters:function(i,e){var a;(e||i.$table).find("."+g.filterRow).addClass(g.filterRowHide).bind("mouseenter mouseleave",function(e){var t=e,r=A(this);clearTimeout(a),a=setTimeout(function(){/enter|over/.test(t.type)?r.removeClass(g.filterRowHide):A(document.activeElement).closest("tr")[0]!==r[0]&&r.toggleClass(g.filterRowHide,I.hideFiltersCheck(i))},200)}).find("input, select").bind("focus blur",function(e){var t=e,r=A(this).closest("tr");clearTimeout(a),a=setTimeout(function(){clearTimeout(a),r.toggleClass(g.filterRowHide,I.hideFiltersCheck(i)&&"focus"!==t.type)},200)})},defaultFilter:function(e,t){if(""===e)return e;var r=O.iQuery,i=t.match(O.igQuery).length,a=1<i?A.trim(e).split(/\s/):[A.trim(e)],l=a.length-1,s=0,n=t;for(l<1&&1<i&&(a[1]=a[0]);r.test(n);)n=n.replace(r,a[s++]||""),r.test(n)&&s<l&&""!==(a[s]||"")&&(n=t.replace(r,n));return n},getLatestSearch:function(e){return e?e.sort(function(e,t){return A(t).attr("data-lastSearchTime")-A(e).attr("data-lastSearchTime")}):e||A()},findRange:function(e,t,r){var i,a,l,s,n,o,c,d,f=[];if(/^[0-9]+$/.test(t))return[parseInt(t,10)];if(!r&&/-/.test(t))for(d=(i=t.match(/(\d+)\s*-\s*(\d+)/g))?i.length:0,c=0;c<d;c++){for(a=i[c].split(/\s*-\s*/),l=parseInt(a[0],10)||0,(s=parseInt(a[1],10)||e.columns-1)<l&&(a=l,l=s,s=a),s>=e.columns&&(s=e.columns-1);l<=s;l++)f[f.length]=l;t=t.replace(i[c],"")}if(!r&&/,/.test(t))for(d=(n=t.split(/\s*,\s*/)).length,o=0;o<d;o++)""!==n[o]&&(c=parseInt(n[o],10))<e.columns&&(f[f.length]=c);if(!f.length)for(c=0;c<e.columns;c++)f[f.length]=c;return f},getColumnElm:function(t,e,r){return e.filter(function(){var e=I.findRange(t,A(this).attr("data-column"));return-1<A.inArray(r,e)})},multipleColumns:function(e,t){var r=e.widgetOptions,r=r.filter_initialized||!t.filter(r.filter_anyColumnSelector).length,t=A.trim(I.getLatestSearch(t).attr("data-column")||"");return I.findRange(e,t,!r)},processTypes:function(e,t,r){var i,a=null,l=null;for(i in I.types)A.inArray(i,r.excludeMatch)<0&&null===l&&null!==(l=I.types[i](e,t,r))&&(t.matchedOn=i,a=l);return a},matchType:function(e,t){var r=e.widgetOptions,i=e.$headerIndexed[t],r=!(i.hasClass("filter-exact")||!i.hasClass("filter-match")&&(r.filter_columnFilters?i=e.$filters.find("."+g.filter).add(r.filter_$externalFilters).filter('[data-column="'+t+'"]'):r.filter_$externalFilters&&(i=r.filter_$externalFilters.filter('[data-column="'+t+'"]')),!i.length||"match"!==e.widgetOptions.filter_matchType[(i[0].nodeName||"").toLowerCase()]));return r},processRow:function(t,r,e){var i,a,l,s,n,o=t.widgetOptions,c=!0,d=o.filter_$anyMatch&&o.filter_$anyMatch.length,f=o.filter_$anyMatch&&o.filter_$anyMatch.length?I.multipleColumns(t,o.filter_$anyMatch):[];if(r.$cells=r.$row.children(),r.matchedOn=null,r.anyMatchFlag&&1<f.length||r.anyMatchFilter&&!d){if(r.anyMatch=!0,r.isMatch=!0,r.rowArray=r.$cells.map(function(e){if(-1<A.inArray(e,f)||r.anyMatchFilter&&!d)return r.parsed[e]?n=r.cacheArray[e]:(n=r.rawArray[e],n=A.trim(o.filter_ignoreCase?n.toLowerCase():n),t.sortLocaleCompare&&(n=E.replaceAccents(n))),n}).get(),r.filter=r.anyMatchFilter,r.iFilter=r.iAnyMatchFilter,r.exact=r.rowArray.join(" "),r.iExact=o.filter_ignoreCase?r.exact.toLowerCase():r.exact,r.cache=r.cacheArray.slice(0,-1).join(" "),e.excludeMatch=e.noAnyMatch,null!==(a=I.processTypes(t,r,e)))c=a;else if(o.filter_startsWith)for(c=!1,f=Math.min(t.columns,r.rowArray.length);!c&&0<f;)f--,c=c||0===r.rowArray[f].indexOf(r.iFilter);else c=0<=(r.iExact+r.childRowText).indexOf(r.iFilter);if(r.anyMatch=!1,r.filters.join("")===r.filter)return c}for(f=0;f<t.columns;f++)r.filter=r.filters[f],r.index=f,e.excludeMatch=e.excludeFilter[f],r.filter&&(r.cache=r.cacheArray[f],i=r.parsed[f]?r.cache:r.rawArray[f]||"",r.exact=t.sortLocaleCompare?E.replaceAccents(i):i,r.iExact=!O.type.test(typeof r.exact)&&o.filter_ignoreCase?r.exact.toLowerCase():r.exact,r.isMatch=I.matchType(t,f),i=c,s=o.filter_columnFilters&&t.$filters.add(o.filter_$externalFilters).filter('[data-column="'+f+'"]').find("select option:selected").attr("data-function-name")||"",t.sortLocaleCompare&&(r.filter=E.replaceAccents(r.filter)),o.filter_defaultFilter&&O.iQuery.test(e.defaultColFilter[f])&&(r.filter=I.defaultFilter(r.filter,e.defaultColFilter[f])),r.iFilter=o.filter_ignoreCase?(r.filter||"").toLowerCase():r.filter,a=null,(l=e.functions[f])&&("function"==typeof l?a=l(r.exact,r.cache,r.filter,f,r.$row,t,r):"function"==typeof l[s||r.filter]&&(a=l[n=s||r.filter](r.exact,r.cache,r.filter,f,r.$row,t,r))),c=!!(i=null===a&&(a=I.processTypes(t,r,e),n=!0===l&&("and"===r.matchedOn||"or"===r.matchedOn),null===a||n)?!0===l?r.isMatch?0<=(""+r.iExact).search(r.iFilter):r.filter===r.exact:(n=(r.iExact+r.childRowText).indexOf(I.parseFilter(t,r.iFilter,r)),!o.filter_startsWith&&0<=n||o.filter_startsWith&&0===n):a)&&c);return c},findRows:function(e,r,t){if(!I.equalFilters(e.config,e.config.lastSearch,t)&&e.config.widgetOptions.filter_initialized){var i,a,l,s,n,o,c,d,f,h,u,p,g,m,b,y,_,v,w,x,S,C,z,$=A.extend([],r),F=e.config,R=F.widgetOptions,T=E.debug(F,"filter"),k={anyMatch:!1,filters:r,filter_regexCache:[]},H={noAnyMatch:["range","operators"],functions:[],excludeFilter:[],defaultColFilter:[],defaultAnyFilter:E.getColumnData(e,R.filter_defaultFilter,F.columns,!0)||""};for(k.parsed=[],f=0;f<F.columns;f++)k.parsed[f]=R.filter_useParsedData||F.parsers&&F.parsers[f]&&F.parsers[f].parsed||E.getData&&"parsed"===E.getData(F.$headerIndexed[f],E.getColumnData(e,F.headers,f),"filter")||F.$headerIndexed[f].hasClass("filter-parsed"),H.functions[f]=E.getColumnData(e,R.filter_functions,f)||F.$headerIndexed[f].hasClass("filter-select"),H.defaultColFilter[f]=E.getColumnData(e,R.filter_defaultFilter,f)||"",H.excludeFilter[f]=(E.getColumnData(e,R.filter_excludeFilter,f,!0)||"").split(/\s+/);for(T&&(console.log("Filter >> Starting filter widget search",r),m=new Date),F.filteredRows=0,t=$||[],c=F.totalRows=0;c<F.$tbodies.length;c++){if(d=E.processTbody(e,F.$tbodies.eq(c),!0),f=F.columns,a=F.cache[c].normalized,s=A(A.map(a,function(e){return e[f].$row.get()})),""===t.join("")||R.filter_serversideFiltering)s.removeClass(R.filter_filteredRow).not("."+F.cssChildRow).css("display","");else{if(i=(s=s.not("."+F.cssChildRow)).length,(R.filter_$anyMatch&&R.filter_$anyMatch.length||void 0!==r[F.columns])&&(k.anyMatchFlag=!0,k.anyMatchFilter=""+(r[F.columns]||R.filter_$anyMatch&&I.getLatestSearch(R.filter_$anyMatch).val()||""),R.filter_columnAnyMatch)){for(w=k.anyMatchFilter.split(O.andSplit),x=!1,y=0;y<w.length;y++)1<(S=w[y].split(":")).length&&(isNaN(S[0])?A.each(F.headerContent,function(e,t){-1<t.toLowerCase().indexOf(S[0])&&(r[C=e]=S[1])}):C=parseInt(S[0],10)-1,0<=C)&&C<F.columns&&(r[C]=S[1],w.splice(y,1),y--,x=!0);x&&(k.anyMatchFilter=w.join(" && "))}if(v=R.filter_searchFiltered,u=F.lastSearch||F.$table.data("lastSearch")||[],v)for(y=0;y<f+1;y++)b=r[y]||"",v||(y=f),v=v&&u.length&&0===b.indexOf(u[y]||"")&&!O.alreadyFiltered.test(b)&&!O.exactTest.test(b)&&!(O.isNeg1.test(b)||O.isNeg2.test(b))&&!(""!==b&&F.$filters&&F.$filters.filter('[data-column="'+y+'"]').find("select").length&&!I.matchType(F,y));for(_=s.not("."+R.filter_filteredRow).length,v&&0===_&&(v=!1),T&&console.log("Filter >> Searching through "+(v&&_<i?_:"all")+" rows"),k.anyMatchFlag&&(F.sortLocaleCompare&&(k.anyMatchFilter=E.replaceAccents(k.anyMatchFilter)),R.filter_defaultFilter&&O.iQuery.test(H.defaultAnyFilter)&&(k.anyMatchFilter=I.defaultFilter(k.anyMatchFilter,H.defaultAnyFilter),v=!1),k.iAnyMatchFilter=R.filter_ignoreCase&&F.ignoreCase?k.anyMatchFilter.toLowerCase():k.anyMatchFilter),o=0;o<i;o++)if(z=s[o].className,!(o&&O.child.test(z)||v&&O.filtered.test(z))){if(k.$row=s.eq(o),k.rowIndex=o,k.cacheArray=a[o],l=k.cacheArray[F.columns],k.rawArray=l.raw,k.childRowText="",!R.filter_childByColumn){for(z="",h=l.child,y=0;y<h.length;y++)z+=" "+h[y].join(" ")||"";k.childRowText=R.filter_childRows?R.filter_ignoreCase?z.toLowerCase():z:""}if(p=!1,g=I.processRow(F,k,H),n=l.$row,b=!!g,h=l.$row.filter(":gt(0)"),R.filter_childRows&&h.length){if(R.filter_childByColumn)for(R.filter_childWithSibs||(h.addClass(R.filter_filteredRow),n=n.eq(0)),y=0;y<h.length;y++)k.$row=h.eq(y),k.cacheArray=l.child[y],k.rawArray=k.cacheArray,b=I.processRow(F,k,H),p=p||b,!R.filter_childWithSibs&&b&&h.eq(y).removeClass(R.filter_filteredRow);p=p||g}else p=b;n.toggleClass(R.filter_filteredRow,!p)[0].display=p?"":"none"}}F.filteredRows+=s.not("."+R.filter_filteredRow).length,F.totalRows+=s.length,E.processTbody(e,d,!1)}F.lastCombinedFilter=$.join(""),F.lastSearch=$,F.$table.data("lastSearch",$),R.filter_saveFilters&&E.storage&&E.storage(e,"tablesorter-filters",I.processFilters($,!0)),T&&console.log("Filter >> Completed search"+E.benchmark(m)),R.filter_initialized&&(F.$table.triggerHandler("filterBeforeEnd",F),F.$table.triggerHandler("filterEnd",F)),setTimeout(function(){E.applyWidget(F.table)},0)}},getOptionSource:function(e,t,r){var i=(e=A(e)[0]).config,a=!1,l=i.widgetOptions.filter_selectSource,i=i.$table.data("lastSearch")||[],s="function"==typeof l||E.getColumnData(e,l,t);if(r&&""!==i[t]&&(r=!1),!0===s)a=l(e,t,r);else{if(s instanceof A||"string"===A.type(s)&&0<=s.indexOf("</option>"))return s;if(A.isArray(s))a=s;else if("object"===A.type(l)&&s&&null===(a=s(e,t,r)))return null}return!1===a&&(a=I.getOptions(e,t,r)),I.processOptions(e,t,a)},processOptions:function(i,a,r){if(!A.isArray(r))return!1;var l,e,t,s,n,o=(i=A(i)[0]).config,c=null!=a&&0<=a&&a<o.columns,d=!!c&&o.$headerIndexed[a].hasClass("filter-select-sort-desc"),f=[];if(r=A.grep(r,function(e,t){return!!e.text||A.inArray(e,r)===t}),!c||!o.$headerIndexed[a].hasClass("filter-select-nosort")){for(s=r.length,t=0;t<s;t++)n=(e=r[t]).text||e,n=(c&&o.parsers&&o.parsers.length&&o.parsers[a].format(n,i,[],a)||n).toString(),n=o.widgetOptions.filter_ignoreCase?n.toLowerCase():n,e.text?(e.parsed=n,f[f.length]=e):f[f.length]={text:e,parsed:n};for(l=o.textSorter||"",f.sort(function(e,t){var r=(d?t:e).parsed,e=(d?e:t).parsed;return c&&"function"==typeof l?l(r,e,!0,a,i):c&&"object"==typeof l&&l.hasOwnProperty(a)?l[a](r,e,!0,a,i):!E.sortNatural||E.sortNatural(r,e)}),r=[],s=f.length,t=0;t<s;t++)r[r.length]=f[t]}return r},getOptions:function(e,t,r){for(var i,a,l,s,n,o,c,d=(e=A(e)[0]).config,f=d.widgetOptions,h=[],u=0;u<d.$tbodies.length;u++)for(s=d.cache[u],a=d.cache[u].normalized.length,i=0;i<a;i++)if(l=s.row?s.row[i]:s.normalized[i][d.columns].$row[0],!r||!l.className.match(f.filter_filteredRow))if(f.filter_useParsedData||d.parsers[t].parsed||d.$headerIndexed[t].hasClass("filter-parsed")){if(h[h.length]=""+s.normalized[i][t],f.filter_childRows&&f.filter_childByColumn)for(c=s.normalized[i][d.columns].$row.length-1,n=0;n<c;n++)h[h.length]=""+s.normalized[i][d.columns].child[n][t]}else if(h[h.length]=s.normalized[i][d.columns].raw[t],f.filter_childRows&&f.filter_childByColumn)for(c=s.normalized[i][d.columns].$row.length,n=1;n<c;n++)o=s.normalized[i][d.columns].$row.eq(n).children().eq(t),h[h.length]=""+E.getElementText(d,o,t);return h},buildSelect:function(e,t,r,i,a){if(e=A(e)[0],t=parseInt(t,10),e.config.cache&&!A.isEmptyObject(e.config.cache)){var l,s,n,o,c,d=e.config,f=d.widgetOptions,h=d.$headerIndexed[t],u='<option value="">'+(h.data("placeholder")||h.attr("data-placeholder")||f.filter_placeholder.select||"")+"</option>",h=d.$table.find("thead").find("select."+g.filter+'[data-column="'+t+'"]').val();if(void 0!==r&&""!==r||null!==(r=I.getOptionSource(e,t,a))){if(A.isArray(r)){for(l=0;l<r.length;l++)if((c=r[l]).text){for(s in c["data-function-name"]=void 0===c.value?c.text:c.value,u+="<option",c)c.hasOwnProperty(s)&&"text"!==s&&(u+=" "+s+'="'+c[s].replace(O.quote,""")+'"');c.value||(u+=' value="'+c.text.replace(O.quote,""")+'"'),u+=">"+c.text.replace(O.quote,""")+"</option>"}else""+c!="[object Object]"&&(0<=(s=n=c=(""+c).replace(O.quote,""")).indexOf(f.filter_selectSourceSeparator)&&(s=(o=n.split(f.filter_selectSourceSeparator))[0],n=o[1]),u+=""!==c?"<option "+(s===n?"":'data-function-name="'+c+'" ')+'value="'+s+'">'+n+"</option>":"");r=[]}e=(d.$filters||d.$table.children("thead")).find("."+g.filter),(a=(e=f.filter_$externalFilters?e&&e.length?e.add(f.filter_$externalFilters):f.filter_$externalFilters:e).filter('select[data-column="'+t+'"]')).length&&(a[i?"html":"append"](u),A.isArray(r)||a.append(r).val(h),a.val(h))}}},buildDefault:function(e,t){for(var r,i,a=e.config,l=a.widgetOptions,s=a.columns,n=0;n<s;n++)i=!((r=a.$headerIndexed[n]).hasClass("filter-false")||r.hasClass("parser-false")),(r.hasClass("filter-select")||!0===E.getColumnData(e,l.filter_functions,n))&&i&&I.buildSelect(e,n,"",t,r.hasClass(l.filter_onlyAvail))}},O=I.regex,E.getFilters=function(e,t,r,i){var a,l,s,n,o=[],c=e?A(e)[0].config:"",d=c?c.widgetOptions:"";if(!0!==t&&d&&!d.filter_columnFilters||A.isArray(r)&&I.equalFilters(c,r,c.lastSearch))return A(e).data("lastSearch")||[];if(c&&(c.$filters&&(l=c.$filters.find("."+g.filter)),l=d.filter_$externalFilters?l&&l.length?l.add(d.filter_$externalFilters):d.filter_$externalFilters:l)&&l.length)for(o=r||[],a=0;a<c.columns+1;a++)n=a===c.columns?d.filter_anyColumnSelector+","+d.filter_multipleColumnSelector:'[data-column="'+a+'"]',(s=l.filter(n)).length&&(s=I.getLatestSearch(s),A.isArray(r)?(i&&1<s.length&&(s=s.slice(1)),(s=a===c.columns?(n=s.filter(d.filter_anyColumnSelector)).length?n:s:s).val(r[a]).trigger("change"+c.namespace)):(o[a]=s.val()||"",(a===c.columns?s.slice(1).filter('[data-column*="'+s.attr("data-column")+'"]'):s.slice(1)).val(o[a])),a===c.columns)&&s.length&&(d.filter_$anyMatch=s);return o},E.setFilters=function(e,t,r,i){var a=e?A(e)[0].config:"",e=E.getFilters(e,!0,t,i);return void 0===r&&(r=!0),a&&r&&(a.lastCombinedFilter=null,a.lastSearch=[],I.searching(a.table,t,i),a.$table.triggerHandler("filterFomatterUpdate")),0!==e.length}}(e),function(C,z){"use strict";var $=C.tablesorter||{};function F(e,t){var r=isNaN(t.stickyHeaders_offset)?C(t.stickyHeaders_offset):[];return r.length?r.height()||0:parseInt(t.stickyHeaders_offset,10)||0}C.extend($.css,{sticky:"tablesorter-stickyHeader",stickyVis:"tablesorter-sticky-visible",stickyHide:"tablesorter-sticky-hidden",stickyWrap:"tablesorter-sticky-wrapper"}),$.addHeaderResizeEvent=function(e,t,r){if((e=C(e)[0]).config){var r=C.extend({},{timer:250},r),o=e.config,c=o.widgetOptions,i=function(e){var t,r,i,a,l,s,n=o.$headers.length;for(c.resize_flag=!0,r=[],t=0;t<n;t++)a=(i=o.$headers.eq(t)).data("savedSizes")||[0,0],l=i[0].offsetWidth,s=i[0].offsetHeight,l===a[0]&&s===a[1]||(i.data("savedSizes",[l,s]),r.push(i[0]));r.length&&!1!==e&&o.$table.triggerHandler("resize",[r]),c.resize_flag=!1};if(clearInterval(c.resize_timer),t)return c.resize_flag=!1;i(!1),c.resize_timer=setInterval(function(){c.resize_flag||i()},r.timer)}},$.addWidget({id:"stickyHeaders",priority:54,options:{stickyHeaders:"",stickyHeaders_appendTo:null,stickyHeaders_attachTo:null,stickyHeaders_xScroll:null,stickyHeaders_yScroll:null,stickyHeaders_offset:0,stickyHeaders_filteredToTop:!0,stickyHeaders_cloneId:"-sticky",stickyHeaders_addResizeEvent:!0,stickyHeaders_includeCaption:!0,stickyHeaders_zIndex:2},format:function(e,t,o){if(!(t.$table.hasClass("hasStickyHeaders")||0<=C.inArray("filter",t.widgets)&&!t.$table.hasClass("hasFilters"))){var r,i,a,l,c=t.$table,d=C(o.stickyHeaders_attachTo||o.stickyHeaders_appendTo),s=t.namespace+"stickyheaders ",f=C(o.stickyHeaders_yScroll||o.stickyHeaders_attachTo||z),n=C(o.stickyHeaders_xScroll||o.stickyHeaders_attachTo||z),h=c.children("thead:first").children("tr").not(".sticky-false").children(),u=c.children("tfoot"),p=F(0,o),g=c.parent().closest("."+$.css.table).hasClass("hasStickyHeaders")?c.parent().closest("table.tablesorter")[0].config.widgetOptions.$sticky.parent():[],m=g.length?g.height():0,b=o.$sticky=c.clone().addClass("containsStickyHeaders "+$.css.sticky+" "+o.stickyHeaders+" "+t.namespace.slice(1)+"_extra_table").wrap('<div class="'+$.css.stickyWrap+'">'),y=b.parent().addClass($.css.stickyHide).css({position:d.length?"absolute":"fixed",padding:parseInt(b.parent().parent().css("padding-left"),10),top:p+m,left:0,visibility:"hidden",zIndex:o.stickyHeaders_zIndex||2}),p=b.children("thead:first"),_="",v=function(e,t){for(var r,i,a,l=e.filter(":visible"),s=l.length,n=0;n<s;n++)i=t.filter(":visible").eq(n),r="border-box"===(a=l.eq(n)).css("box-sizing")?a.outerWidth():"collapse"===i.css("border-collapse")?z.getComputedStyle?parseFloat(z.getComputedStyle(a[0],null).width):(r=parseFloat(a.css("border-width")),a.outerWidth()-parseFloat(a.css("padding-left"))-parseFloat(a.css("padding-right"))-r):a.width(),i.css({width:r,"min-width":r,"max-width":r})},w=function(e){return!1===e&&g.length?c.position().left:d.length?parseInt(d.css("padding-left"),10)||0:c.offset().left-parseInt(c.css("margin-left"),10)-C(z).scrollLeft()},x=function(){y.css({left:w(),width:c.outerWidth()}),v(c,b),v(h,l)},S=function(e){var t,r,i,a,l,s,n;c.is(":visible")&&(m=g.length?g.offset().top-f.scrollTop()+g.height():0,a=c.offset(),t=F(0,o),i=(r=C.isWindow(f[0]))?f.scrollTop():g.length?parseInt(g[0].style.top,10):f.offset().top,i=d.length?i:f.scrollTop(),l=!o.stickyHeaders_includeCaption&&c.children("caption").height()||0,i=i+t+m-l,l=c.height()-(y.height()+(u.height()||0))-l,l="visible"==(a=i>a.top&&i<a.top+l?"visible":"hidden")?$.css.stickyVis:$.css.stickyHide,s=!y.hasClass(l),n={visibility:a},d.length&&(s=!0,n.top=r?i-d.offset().top:d.scrollTop()),(i=w(r))!==parseInt(y.css("left"),10)&&(s=!0,n.left=i),n.top=(n.top||0)+(!r&&g.length?g.height():t+m),s&&y.removeClass($.css.stickyVis+" "+$.css.stickyHide).addClass(l).css(n),a===_&&!e||(x(),_=a))};if(d.length&&!d.css("position")&&d.css("position","relative"),b.attr("id")&&(b[0].id+=o.stickyHeaders_cloneId),b.find("> thead:gt(0), tr.sticky-false").hide(),b.find("> tbody, > tfoot").remove(),b.find("caption").toggle(o.stickyHeaders_includeCaption),l=p.children().children(),b.css({height:0,width:0,margin:0}),l.find("."+$.css.resizer).remove(),c.addClass("hasStickyHeaders").bind("pagerComplete"+s,function(){x()}),$.bindEvents(e,p.children().children("."+$.css.header)),o.stickyHeaders_appendTo?C(o.stickyHeaders_appendTo).append(y):c.after(y),t.onRenderHeader)for(i=(a=p.children("tr").children()).length,r=0;r<i;r++)t.onRenderHeader.apply(a.eq(r),[r,t,b]);n.add(f).unbind("scroll resize ".split(" ").join(s).replace(/\s+/g," ")).bind("scroll resize ".split(" ").join(s),function(e){S("resize"===e.type)}),t.$table.unbind("stickyHeadersUpdate"+s).bind("stickyHeadersUpdate"+s,function(){S(!0)}),o.stickyHeaders_addResizeEvent&&$.addHeaderResizeEvent(e),c.hasClass("hasFilters")&&o.filter_columnFilters&&(c.bind("filterEnd"+s,function(){var e=C(document.activeElement).closest("td"),e=e.parent().children().index(e);y.hasClass($.css.stickyVis)&&o.stickyHeaders_filteredToTop&&(z.scrollTo(0,c.position().top),0<=e)&&t.$filters&&t.$filters.eq(e).find("a, select, input").filter(":visible").focus()}),$.filter.bindSearch(c,l.find("."+$.css.filter)),o.filter_hideFilters)&&$.filter.hideFilters(t,b),o.stickyHeaders_addResizeEvent&&c.bind("resize"+t.namespace+"stickyheaders",function(){x()}),S(!0),c.triggerHandler("stickyHeadersInit")}},remove:function(e,t,r){var i=t.namespace+"stickyheaders ";t.$table.removeClass("hasStickyHeaders").unbind("pagerComplete resize filterEnd stickyHeadersUpdate ".split(" ").join(i).replace(/\s+/g," ")).next("."+$.css.stickyWrap).remove(),r.$sticky&&r.$sticky.length&&r.$sticky.remove(),C(z).add(r.stickyHeaders_xScroll).add(r.stickyHeaders_yScroll).add(r.stickyHeaders_attachTo).unbind("scroll resize ".split(" ").join(i).replace(/\s+/g," ")),$.addHeaderResizeEvent(e,!0)}})}(e,window),function(c,t){"use strict";var d=c.tablesorter||{};c.extend(d.css,{resizableContainer:"tablesorter-resizable-container",resizableHandle:"tablesorter-resizable-handle",resizableNoSelect:"tablesorter-disableSelection",resizableStorage:"tablesorter-resizable"}),c(function(){var e="<style>body."+d.css.resizableNoSelect+" { -ms-user-select: none; -moz-user-select: -moz-none;-khtml-user-select: none; -webkit-user-select: none; user-select: none; }."+d.css.resizableContainer+" { position: relative; height: 1px; }."+d.css.resizableHandle+" { position: absolute; display: inline-block; width: 8px;top: 1px; cursor: ew-resize; z-index: 3; user-select: none; -moz-user-select: none; }</style>";c("head").append(e)}),d.resizable={init:function(e,t){if(!e.$table.hasClass("hasResizable")){e.$table.addClass("hasResizable");var r,i,a,l=e.$table,s=l.parent(),n=parseInt(l.css("margin-top"),10),o=t.resizable_vars={useStorage:d.storage&&!1!==t.resizable,$wrap:s,mouseXPosition:0,$target:null,$next:null,overflow:"auto"===s.css("overflow")||"scroll"===s.css("overflow")||"auto"===s.css("overflow-x")||"scroll"===s.css("overflow-x"),storedSizes:[]};for(d.resizableReset(e.table,!0),o.tableWidth=l.width(),o.fullWidth=Math.abs(s.width()-o.tableWidth)<20,o.useStorage&&o.overflow&&(d.storage(e.table,"tablesorter-table-original-css-width",o.tableWidth),a=d.storage(e.table,"tablesorter-table-resized-width")||"auto",d.resizable.setWidth(l,a,!0)),t.resizable_vars.storedSizes=s=(o.useStorage?d.storage(e.table,d.css.resizableStorage):[])||[],d.resizable.setWidths(e,t,s),d.resizable.updateStoredSizes(e,t),t.$resizable_container=c('<div class="'+d.css.resizableContainer+'">').css({top:n}).insertBefore(l),i=0;i<e.columns;i++)r=e.$headerIndexed[i],a=d.getColumnData(e.table,e.headers,i),"false"===d.getData(r,a,"resizable")||c('<div class="'+d.css.resizableHandle+'">').appendTo(t.$resizable_container).attr({"data-column":i,unselectable:"on"}).data("header",r).bind("selectstart",!1);d.resizable.bindings(e,t)}},updateStoredSizes:function(e,t){var r,i,a=e.columns,l=t.resizable_vars;for(l.storedSizes=[],r=0;r<a;r++)i=e.$headerIndexed[r],l.storedSizes[r]=i.is(":visible")?i.width():0},setWidth:function(e,t,r){e.css({width:t,"min-width":r?t:"","max-width":r?t:""})},setWidths:function(e,t,r){var i,a,l=t.resizable_vars,s=c(e.namespace+"_extra_headers"),n=e.$table.children("colgroup").children("col");if((r=r||l.storedSizes||[]).length){for(i=0;i<e.columns;i++)d.resizable.setWidth(e.$headerIndexed[i],r[i],l.overflow),s.length&&(a=s.eq(i).add(n.eq(i)),d.resizable.setWidth(a,r[i],l.overflow));(a=c(e.namespace+"_extra_table")).length&&!d.hasWidget(e.table,"scroller")&&d.resizable.setWidth(a,e.$table.outerWidth(),l.overflow)}},setHandlePosition:function(a,l){var s,n=a.$table.height(),e=l.$resizable_container.children(),o=Math.floor(e.width()/2);d.hasWidget(a.table,"scroller")&&(n=0,a.$table.closest("."+d.css.scrollerWrap).children().each(function(){var e=c(this);n+=(e.filter('[style*="height"]').length?e:e.children("table")).height()})),!l.resizable_includeFooter&&a.$table.children("tfoot").length&&(n-=a.$table.children("tfoot").height()),s=3.3<=parseFloat(c.fn.jquery)?0:a.$table.position().left,e.each(function(){var e=c(this),t=parseInt(e.attr("data-column"),10),r=a.columns-1,i=e.data("header");i&&(!i.is(":visible")||!l.resizable_addLastColumn&&d.resizable.checkVisibleColumns(a,t)?e.hide():(t<r||t===r&&l.resizable_addLastColumn)&&e.css({display:"inline-block",height:n,left:i.position().left-s+i.outerWidth()-o}))})},checkVisibleColumns:function(e,t){for(var r=0,i=t+1;i<e.columns;i++)r+=e.$headerIndexed[i].is(":visible")?1:0;return 0===r},toggleTextSelection:function(e,t,r){e=e.namespace+"tsresize";t.resizable_vars.disabled=r,c("body").toggleClass(d.css.resizableNoSelect,r),r?c("body").attr("unselectable","on").bind("selectstart"+e,!1):c("body").removeAttr("unselectable").unbind("selectstart"+e)},bindings:function(l,s){var e=l.namespace+"tsresize";s.$resizable_container.children().bind("mousedown",function(e){var t=s.resizable_vars,r=c(l.namespace+"_extra_headers"),i=c(e.target).data("header"),a=parseInt(i.attr("data-column"),10);t.$target=i=i.add(r.filter('[data-column="'+a+'"]')),t.target=a,t.$next=e.shiftKey||s.resizable_targetLast?i.parent().children().not(".resizable-false").filter(":last"):i.nextAll(":not(.resizable-false)").eq(0),a=parseInt(t.$next.attr("data-column"),10),t.$next=t.$next.add(r.filter('[data-column="'+a+'"]')),t.next=a,t.mouseXPosition=e.pageX,d.resizable.updateStoredSizes(l,s),d.resizable.toggleTextSelection(l,s,!0)}),c(document).bind("mousemove"+e,function(e){var t=s.resizable_vars;t.disabled&&0!==t.mouseXPosition&&t.$target&&(s.resizable_throttle?(clearTimeout(t.timer),t.timer=setTimeout(function(){d.resizable.mouseMove(l,s,e)},isNaN(s.resizable_throttle)?5:s.resizable_throttle)):d.resizable.mouseMove(l,s,e))}).bind("mouseup"+e,function(){s.resizable_vars.disabled&&(d.resizable.toggleTextSelection(l,s,!1),d.resizable.stopResize(l,s),d.resizable.setHandlePosition(l,s))}),c(t).bind("resize"+e+" resizeEnd"+e,function(){d.resizable.setHandlePosition(l,s)}),l.$table.bind("columnUpdate pagerComplete resizableUpdate ".split(" ").join(e+" "),function(){d.resizable.setHandlePosition(l,s)}).bind("resizableReset"+e,function(){d.resizableReset(l.table)}).find("thead:first").add(c(l.namespace+"_extra_table").find("thead:first")).bind("contextmenu"+e,function(){var e=0===s.resizable_vars.storedSizes.length;return d.resizableReset(l.table),d.resizable.setHandlePosition(l,s),s.resizable_vars.storedSizes=[],e})},mouseMove:function(e,t,r){if(0!==t.resizable_vars.mouseXPosition&&t.resizable_vars.$target){var i,a=0,l=t.resizable_vars,s=l.$next,n=l.storedSizes[l.target],o=r.pageX-l.mouseXPosition;if(l.overflow){if(0<n+o){for(l.storedSizes[l.target]+=o,d.resizable.setWidth(l.$target,l.storedSizes[l.target],!0),i=0;i<e.columns;i++)a+=l.storedSizes[i];d.resizable.setWidth(e.$table.add(c(e.namespace+"_extra_table")),a)}s.length||(l.$wrap[0].scrollLeft=e.$table.width())}else l.fullWidth?(l.storedSizes[l.target]+=o,l.storedSizes[l.next]-=o):l.storedSizes[l.target]+=o,d.resizable.setWidths(e,t);l.mouseXPosition=r.pageX,e.$table.triggerHandler("stickyHeadersUpdate")}},stopResize:function(e,t){var r=t.resizable_vars;d.resizable.updateStoredSizes(e,t),r.useStorage&&(d.storage(e.table,d.css.resizableStorage,r.storedSizes),d.storage(e.table,"tablesorter-table-resized-width",e.$table.width())),r.mouseXPosition=0,r.$target=r.$next=null,e.$table.triggerHandler("stickyHeadersUpdate"),e.$table.triggerHandler("resizableComplete")}},d.addWidget({id:"resizable",priority:40,options:{resizable:!0,resizable_addLastColumn:!1,resizable_includeFooter:!0,resizable_widths:[],resizable_throttle:!1,resizable_targetLast:!1},init:function(e,t,r,i){d.resizable.init(r,i)},format:function(e,t,r){d.resizable.setHandlePosition(t,r)},remove:function(e,t,r,i){var a;r.$resizable_container&&(a=t.namespace+"tsresize",t.$table.add(c(t.namespace+"_extra_table")).removeClass("hasResizable").children("thead").unbind("contextmenu"+a),r.$resizable_container.remove(),d.resizable.toggleTextSelection(t,r,!1),d.resizableReset(e,i),c(document).unbind("mousemove"+a+" mouseup"+a))}}),d.resizableReset=function(l,s){c(l).each(function(){var e,t,r=this.config,i=r&&r.widgetOptions,a=i.resizable_vars;if(l&&r&&r.$headerIndexed.length){for(a.overflow&&a.tableWidth&&(d.resizable.setWidth(r.$table,a.tableWidth,!0),a.useStorage)&&d.storage(l,"tablesorter-table-resized-width",a.tableWidth),e=0;e<r.columns;e++)t=r.$headerIndexed[e],i.resizable_widths&&i.resizable_widths[e]?d.resizable.setWidth(t,i.resizable_widths[e],a.overflow):t.hasClass("resizable-false")||d.resizable.setWidth(t,"",a.overflow);r.$table.triggerHandler("stickyHeadersUpdate"),d.storage&&!s&&d.storage(this,d.css.resizableStorage,[])}})}}(e,window),function(t){"use strict";var o=t.tablesorter||{};function c(e){e=o.storage(e.table,"tablesorter-savesort");return e&&e.hasOwnProperty("sortList")&&t.isArray(e.sortList)?e.sortList:[]}function d(e,t){return(t||c(e)).join(",")!==e.sortList.join(",")}o.addWidget({id:"saveSort",priority:20,options:{saveSort:!0},init:function(e,t,r,i){t.format(e,r,i,!0)},format:function(t,e,r,i){var a,l=e.$table,r=!1!==r.saveSort,s={sortList:e.sortList},n=o.debug(e,"saveSort");n&&(a=new Date),l.hasClass("hasSaveSort")?r&&t.hasInitialized&&o.storage&&d(e)&&(o.storage(t,"tablesorter-savesort",s),n)&&console.log("saveSort >> Saving last sort: "+e.sortList+o.benchmark(a)):(l.addClass("hasSaveSort"),s="",o.storage&&(s=c(e),n&&console.log('saveSort >> Last sort loaded: "'+s+'"'+o.benchmark(a)),l.bind("saveSortReset",function(e){e.stopPropagation(),o.storage(t,"tablesorter-savesort","")})),i&&s&&0<s.length?e.sortList=s:t.hasInitialized&&s&&0<s.length&&d(e,s)&&o.sortOn(e,s))},remove:function(e,t){t.$table.removeClass("hasSaveSort"),o.storage&&o.storage(e,"tablesorter-savesort","")}})}(e),e.tablesorter});return jQuery;}));
vendor: 2,058 bytes, lines 3812-3814
3812(function(factory){if (typeof define === 'function' && define.amd){define(['jquery'], factory);} else if (typeof module === 'object' && typeof module.exports === 'object'){module.exports = factory(require('jquery'));} else {factory(jQuery);}}(function(jQuery){ 3813 3814!function(b){"use strict";var y=b.tablesorter,S=y.output={event:"outputTable",noDblClick:600,lastEvent:0,busy:!1,regexQuote:/([\n\t\x09\x0d\x0a]|<[^<]+>)/,regexBR:/(<br([\s\/])?>|\n)/g,regexIMG:/<img[^>]+alt\s*=\s*['"]([^'"]+)['"][^>]*>/i,regexHTML:/<[^<]+>/g,replaceCR:"\r\n",replaceTab:"\t",popupTitle:"Output",popupStyle:"width:100%;height:100%;margin:0;resize:none;",message:"Your device does not support downloading. Please try again in desktop browser.",init:function(e){e.$table.off(S.event).on(S.event,function(t){t.stopPropagation(),!S.busy&&t.timeStamp-S.lastEvent>S.noDblClick&&(S.lastEvent=t.timeStamp,S.busy=!0,S.process(e,e.widgetOptions))})},processRow:function(t,e,o,u){for(var n,r,a,p,i,l,s,c,d,f=t.widgetOptions,_=[],w=f.output_duplicateSpans,m=o&&u&&f.output_headerRows&&b.isFunction(f.output_callbackJSON),g=0,h=e.length,v=0;v<h;v++)for(_[v]||(_[v]=[]),g=0,a=(r=e.eq(v).children()).length,l=0;l<a;l++){if((n=r.eq(l)).filter("[rowspan]").length)for(s=parseInt(n.attr("rowspan"),10)-1,d=S.formatData(t,f,n,o,l),p=1;p<=s;p++)_[v+p]||(_[v+p]=[]),_[v+p][g]=o||w?d:"";if(n.filter("[colspan]").length)for(c=parseInt(n.attr("colspan"),10)-1,d=S.formatData(t,f,n,o,l),i=0;i<c;i++)if(n.filter("[rowspan]").length)for(s=parseInt(n.attr("rowspan"),10),p=0;p<s;p++)_[v+p]||(_[v+p]=[]),_[v+p][g+i]=m?f.output_callbackJSON(n,d,g+i)||d+"("+(g+i)+")":o||w?d:"";else _[v][g+i]=m?f.output_callbackJSON(n,d,g+i)||d+"("+(g+i)+")":o||w?d:"";for(;void 0!==_[v][g];)g++;_[v][g]=_[v][g]||S.formatData(t,f,n,o,g),g++}return y.output.removeColumns(t,f,_)},removeColumns:function(t,e,o){for(var u,n,r=[],a=o.length,p=0;p<a;p++)for(u=o[p],r[p]=[],n=0;n<t.columns;n++)e.output_hiddenColumnArray[n]||r[p].push(u[n]);return r},process:function(t,e,o,u){var n,r,a,p,i,l,s=window.JSON&&JSON.hasOwnProperty("str
3814ingify"),c=0,d=(e.output_separator||",").toLowerCase(),f="json"===d,_="array"===d,w=f||_?",":e.output_separator,m=e.output_saveRows,g=t.$table;for(e.output_regex=new RegExp("("+(/\\/.test(w)?"\\":"")+w+")"),e.output_hiddenColumnArray=[],c=0;c<t.columns;c++)e.output_hiddenColumnArray[c]=-1<b.inArray(c,e.output_ignoreColumns)||!e.output_hiddenColumns&&"none"===t.$headerIndexed[c].css("display")&&!t.$headerIndexed[c].hasClass("tablesorter-scroller-hidden-column");if(w=g.children("thead").children("tr").not("."+(y.css.filterRow||"tablesorter-filter-row")).filter(function(){return e.output_hiddenColumns||"none"!==b(this).css("display")}),r=S.processRow(t,w,!0,f),o=o||g.children("tbody").children("tr").not(t.selectorRemove),o="function"==typeof m?o.filter(m):/^f/.test(m)?o.not("."+(e.filter_filteredRow||"filtered")):/^v/.test(m)?o.filter(":visible"):/^[.#:\[]/.test(m)?o.filter(m):o,a=S.processRow(t,o),e.output_includeFooter&&(a=a.concat(S.processRow(t,g.children("tfoot").children("tr:visible")))),p=r.length,f){for(d=[],i=a.length,c=0;c<i;c++)l=r[1<p&&e.output_headerRows?c%p:p-1],d.push(S.row2Hash(l,a[c]));n=s?JSON.stringify(d):d}else d=e.output_includeHeader?(l=[r[1<p&&e.output_headerRows?c%p:p-1]],S.row2CSV(e,e.output_headerRows?r:l,_).concat(S.row2CSV(e,a,_))):S.row2CSV(e,a,_),n=_&&s?JSON.stringify(d):d.join("\n");if(u)return n;if(b.isFunction(e.output_callback)){if(!1===(l=e.output_callback(t,n,t.pager&&t.pager.ajaxObject.url||null)))return void(S.busy=!1);"string"==typeof l&&(n=l)}/p/i.test(e.output_delivery||"")?S.popup(n,e.output_popupStyle,f||_):S.download(t,e,n),S.busy=!1},row2CSV:function(t,e,o){for(var u,n=[],r=e.length,a=0;a<r;a++)u=(e[a]||[]).join("").replace(/\"/g,""),0<(e[a]||[]).length&&""!==u&&(n[n.length]=o?e[a]:e[a].join(t.output_separator));return n},row2Hash:function(t,e){for(var o={},u=e.length,n=0;n<u;n++)n<t.length&&(o[t[n]]=e[n]);return o},formatData:function(t,e,o,u,n){var r=o.attr(e.output_dataAttrib),r=void 0!==r?r:o.html(),a=(e.output_separator||",").toLowerCase(),a="json"===a||"array"===a,p=r.replace(/\"/g,e.output_replaceQuote||"â"),r=(p=e.output_trimSpaces?p.replace(S.regexBR,""):p.replace(S.regexBR,S.replaceCR).replace(/\t/g,S.replaceTab)).match(S.regexIMG);return e.output_includeHTML||null===r||(p=r[1]),p=e.output_includeHTML&&!u?p:p.replace(S.regexHTML,""),p=e.output_trimSpaces||u?b.trim(p):p,p=!a&&(e.output_wrapQuotes||e.output_regex.test(p)||S.regexQuote.test(p))?'"'+p+'"':p,"function"==typeof e.output_formatContent?e.output_formatContent(t,e,{isHeader:u||!1,$cell:o,c
3814ontent:p,columnIndex:n,parsed:t.parsers[n].format(p,t.table,o[0],n)}):p},popup:function(e,o,u){var n=window.open("",S.popupTitle,o);try{n.document.write("<html><head><title>"+S.popupTitle+'</title></head><body><textarea wrap="'+(u?"on":"off")+'" style="'+S.popupStyle+'">'+e+"\n</textarea></body></html>"),n.document.close(),n.focus()}catch(t){return n.close(),S.popup(e,o,u)}return!0},download:function(t,e,o){if("function"==typeof e.output_savePlugin)return e.output_savePlugin(t,e,o);var u,t=window.navigator,n=document.createElement("a");if(/(iP)/g.test(t.userAgent))return alert(S.message),!1;try{u=!!new Blob}catch(t){u=!1}return u?(window.URL=window.URL||window.webkitURL,u=/^\s*(?:text\/\S*|application\/xml|\S*\/\S*\+xml)\s*;.*charset\s*=\s*utf-8/i.test(e.output_encoding)?["\ufeff",o]:[o],u=new Blob(u,{type:e.output_encoding}),t.msSaveBlob?t.msSaveBlob(u,e.output_saveFileName):(n.href=window.URL.createObjectURL(u),n.download=e.output_saveFileName,document.createEvent&&((t=document.createEvent("MouseEvents")).initMouseEvent("click",!0,!0,window,0,0,0,0,0,!1,!1,!1,!1,0,null),n.dispatchEvent(t))),!1):(window.open(e.output_encoding+encodeURIComponent(o)+"?download","_self"),!0)},remove:function(t){t.$table.off(S.event)}};y.addWidget({id:"output",options:{output_separator:",",output_ignoreColumns:[],output_hiddenColumns:!1,output_includeFooter:!1,output_includeHeader:!0,output_headerRows:!1,output_dataAttrib:"data-name",output_delivery:"popup",output_saveRows:"filtered",output_duplicateSpans:!0,output_replaceQuote:"â;",output_includeHTML:!1,output_trimSpaces:!0,output_wrapQuotes:!1,output_popupStyle:"width=500,height=300",output_saveFileName:"mytable.csv",output_formatContent:null,output_callback:function(){return!0},output_callbackJSON:function(t,e,o){return e+"("+o+")"},output_encoding:"data:application/octet-stream;charset=utf8,",output_savePlugin:null},init:function(t,e,o){S.init(o)},remove:function(t,e){S.remove(e)}})}(jQuery);return jQuery;})); 3815 3816!function e(t,n,o){function i(a,l){if(!n[a]){if(!t[a]){var u="function"==typeof require&&require;if(!l&&u)return u(a,!0);if(r)return r(a,!0);var s=new Error("Cannot find module '"+a+"'");throw s.code="MODULE_NOT_FOUND",s}var d=n[a]={exports:{}};t[a][0].call(d.exports,function(e){var n=t[a][1][e];return i(n||e)},d,d.exports,e,t,n,o)}return n[a].exports}for(var r="function"==typeof require&&require,a=0;a<o.length;a++)i(o[a]);return i}({1:[function(e,t,n){"use strict";function o(e,t){if(void 0===e||null===e)throw new TypeError("Cannot convert first argument to object");for(var n=Object(e),o=1;o<arguments.length;o++){var i=arguments[o];if(void 0!==i&&null!==i)for(var r=Object.keys(Object(i)),a=0,l=r.length;a<l;a++){var u=r[a],s=Object.getOwnPropertyDescriptor(i,u);void 0!==s&&s.enumerable&&(n[u]=i[u])}}return n}function i(){Object.assign||Object.defineProperty(Object,"assign",{enumerable:!1,configurable:!0,writable:!0,value:o})}
vendor: 4,890 bytes, line 3816
3816t.exports={assign:o,polyfill:i}},{}],2:[function(e,t,n){"use strict";var o=e("../index"),i=function(e){e.fn.modalVideo=function(e){return"strings"==typeof e||new o(this,e),this}};if("function"==typeof define&&define.amd)define(["jquery"],i);else{var r=window.jQuery?window.jQuery:window.$;void 0!==r&&i(r)}t.exports=i},{"../index":4}],3:[function(e,t,n){"use strict";function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(n,"__esModule",{value:!0});var i=function(){function e(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}return function(t,n,o){return n&&e(t.prototype,n),o&&e(t,o),t}}(),r=e("../lib/util"),a=e("es6-object-assign").assign,l={channel:"youtube",youtube:{autoplay:1,cc_load_policy:1,color:null,controls:1,disablekb:0,enablejsapi:0,end:null,fs:1,h1:null,iv_load_policy:1,list:null,listType:null,loop:0,modestbranding:null,origin:null,playlist:null,playsinline:null,rel:0,showinfo:1,start:0,wmode:"transparent",theme:"dark",nocookie:!1},ratio:"16:9",vimeo:{api:!1,autopause:!0,autoplay:!0,byline:!0,callback:null,color:null,height:null,loop:!1,maxheight:null,maxwidth:null,player_id:null,portrait:!0,title:!0,width:null,xhtml:!1},allowFullScreen:!0,animationSpeed:300,classNames:{modalVideo:"modal-video",modalVideoClose:"modal-video-close",modalVideoBody:"modal-video-body",modalVideoInner:"modal-video-inner",modalVideoIframeWrap:"modal-video-movie-wrap",modalVideoCloseBtn:"modal-video-close-btn"},aria:{openMessage:"You just openned the modal video",dismissBtnMessage:"Close the modal by clicking here"}},u=function(){function e(t,n){var i=this;o(this,e);var u=a({},l,n),s="string"==typeof t?document.querySelectorAll(t):t,d=document.querySelector("body"),c=u.classNames,f=u.animationSpeed;[].forEach.call(s,function(e){e.addEventListener("click",function(){var t=e.dataset.videoId,n=e.dataset.channel||u.channel,o=(0,r.getUniqId)(),a=i.getVideoUrl(u,n,t),l=i.getHtml(u,a,o);(0,r.append)(d,l);var s=document.querySelector("#"+o),m=s.querySelector(".js-modal-video-dismiss-btn");s.focus(),s.addEventListener("click",function(){(0,r.addClass)(s,c.modalVideoClose),setTimeout(function(){(0,r.remove)(s),e.focus()},f)}),s.addEventListener("keydown",function(e){9===e.which&&(e.preventDefault(),document.activeElement===s?m.focus():(s.setAttribute("aria-label",""),s.focus()))}),m.addEventListener("click",function(){(0,r.triggerEvent)(s,"click")})})})}return i(e,[{key:"getPadding",value:function(e){var t=e.split(":"),n=Number(t[0]);return 100*Number(t[1])/n+"%"}},{key:"getQueryString",value:function(e){var t="";return Object.keys(e).forEach(function(n){t+=n+"="+e[n]+"&"}),t.substr(0,t.length-1)}},{key:"getVideoUrl",value:function(e,t,n){return"youtube"===t?this.getYoutubeUrl(e.youtube,n):"vimeo"===t?this.getVimeoUrl(e.vimeo,n):""}},{key:"getVimeoUrl",value:function(e,t){return"//player.vimeo.com/video/"+t+"?"+this.getQueryString(e)}},{key:"getYoutubeUrl",value:function(e,t){var n=this.getQueryString(e);return!0===e.nocookie?"//www.youtube-nocookie.com/embed/"+t+"?"+n:"//www.youtube.com/embed/"+t+"?"+n}},{key:"getHtml",value:function(e,t,n){var o=this.getPadding(e.ratio),i=e.classNames;return'\n <div class="'+i.modalVideo+'" tabindex="-1" role="dialog" aria-label="'+e.aria.openMessage+'" id="'+n+'">\n <div class="'+i.modalVideoBody+'">\n <div class="'+i.modalVideoInner+'">\n <div class="'+i.modalVideoIframeWrap+'" style="padding-bottom:'+o+'">\n <button class="'+i.modalVideoCloseBtn+' js-modal-video-dismiss-btn" aria-label="'+e.aria.dismissBtnMessage+"\"></button>\n <iframe width='460' height='230' src=\""+t+"\" frameborder='0' allowfullscreen="+e.allowFullScreen+' tabindex="-1"/>\n </div>\n </div>\n </div>\n </div>\n '}}]),e}();n.default=u,t.exports=n.default},{"../lib/util":5,"es6-object-assign":1}],4:[function(e,t,n){"use strict";t.exports=e("./core/")},{"./core/":3}],5:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0});n.append=function(e,t){var n=new DOMParser,o=n.parseFromString(t,"text/html");e.appendChild(o.querySelector("body").childNodes[0])},n.prepend=function(e,t){var n=new DOMParser,o=n.parseFromString(t,"text/html");e.insertBefore(o.querySelector("body").childNodes[0],e.firstChild)},n.getUniqId=function(){return(Date.now().toString(36)+Math.random().toString(36).substr(2,5)).toUpperCase()},n.remove=function(e){e&&e.parentNode&&e.parentNode.removeChild(e)},n.addClass=function(e,t){e.classList?e.classList.add(t):e.className+=" "+t},n.triggerEvent=function(e,t,n){var o=void 0;window.CustomEvent?o=new CustomEvent(t,{cancelable:!0}):(o=document.createEvent("CustomEvent"),o.initCustomEvent(t,!1,!1,n)),e.dispatchEvent(o)}},{}]},{},[2]);
vendor: 23,968 bytes, lines 3816-3818
3816 3817 3818!function(t,e){"function"==typeof define&&define.amd?define("jquery-bridget/jquery-bridget",["jquery"],function(i){return e(t,i)}):"object"==typeof module&&module.exports?module.exports=e(t,require("jquery")):t.jQueryBridget=e(t,t.jQuery)}(window,function(t,e){"use strict";function i(i,r,a){function h(t,e,n){var o,r="$()."+i+'("'+e+'")';return t.each(function(t,h){var u=a.data(h,i);if(!u)return void s(i+" not initialized. Cannot call methods, i.e. "+r);var d=u[e];if(!d||"_"==e.charAt(0))return void s(r+" is not a valid method");var l=d.apply(u,n);o=void 0===o?l:o}),void 0!==o?o:t}function u(t,e){t.each(function(t,n){var o=a.data(n,i);o?(o.option(e),o._init()):(o=new r(n,e),a.data(n,i,o))})}a=a||e||t.jQuery,a&&(r.prototype.option||(r.prototype.option=function(t){a.isPlainObject(t)&&(this.options=a.extend(!0,this.options,t))}),a.fn[i]=function(t){if("string"==typeof t){var e=o.call(arguments,1);return h(this,t,e)}return u(this,t),this},n(a))}function n(t){!t||t&&t.bridget||(t.bridget=i)}var o=Array.prototype.slice,r=t.console,s="undefined"==typeof r?function(){}:function(t){r.error(t)};return n(e||t.jQuery),i}),function(t,e){"function"==typeof define&&define.amd?define("ev-emitter/ev-emitter",e):"object"==typeof module&&module.exports?module.exports=e():t.EvEmitter=e()}("undefined"!=typeof window?window:this,function(){function t(){}var e=t.prototype;return e.on=function(t,e){if(t&&e){var i=this._events=this._events||{},n=i[t]=i[t]||[];return-1==n.indexOf(e)&&n.push(e),this}},e.once=function(t,e){if(t&&e){this.on(t,e);var i=this._onceEvents=this._onceEvents||{},n=i[t]=i[t]||{};return n[e]=!0,this}},e.off=function(t,e){var i=this._events&&this._events[t];if(i&&i.length){var n=i.indexOf(e);return-1!=n&&i.splice(n,1),this}},e.emitEvent=function(t,e){var i=this._events&&this._events[t];if(i&&i.length){i=i.slice(0),e=e||[];for(var n=this._onceEvents&&this._onceEvents[t],o=0;o<i.length;o++){var r=i[o],s=n&&n[r];s&&(this.off(t,r),delete n[r]),r.apply(this,e)}return this}},e.allOff=function(){delete this._events,delete this._onceEvents},t}),function(t,e){"function"==typeof define&&define.amd?define("get-size/get-size",e):"object"==typeof module&&module.exports?module.exports=e():t.getSize=e()}(window,function(){"use strict";function t(t){var e=parseFloat(t),i=-1==t.indexOf("%")&&!isNaN(e);return i&&e}function e(){}function i(){for(var t={width:0,height:0,innerWidth:0,innerHeight:0,outerWidth:0,outerHeight:0},e=0;u>e;e++){var i=h[e];t[i]=0}return t}function n(t){var e=getComputedStyle(t);return e||a("Style returned "+e+". Are you running this code in a hidden iframe on Firefox? See https://bit.ly/getsizebug1"),e}function o(){if(!d){d=!0;var e=document.createElement("div");e.style.width="200px",e.style.padding="1px 2px 3px 4px",e.style.borderStyle="solid",e.style.borderWidth="1px 2px 3px 4px",e.style.boxSizing="border-box";var i=document.body||document.documentElement;i.appendChild(e);var o=n(e);s=200==Math.round(t(o.width)),r.isBoxSizeOuter=s,i.removeChild(e)}}function r(e){if(o(),"string"==typeof e&&(e=document.querySelector(e)),e&&"object"==typeof e&&e.nodeType){var r=n(e);if("none"==r.display)return i();var a={};a.width=e.offsetWidth,a.height=e.offsetHeight;for(var d=a.isBorderBox="border-box"==r.boxSizing,l=0;u>l;l++){var c=h[l],f=r[c],m=parseFloat(f);a[c]=isNaN(m)?0:m}var p=a.paddingLeft+a.paddingRight,g=a.paddingTop+a.paddingBottom,y=a.marginLeft+a.marginRight,v=a.marginTop+a.marginBottom,_=a.borderLeftWidth+a.borderRightWidth,z=a.borderTopWidth+a.borderBottomWidth,E=d&&s,b=t(r.width);b!==!1&&(a.width=b+(E?0:p+_));var x=t(r.height);return x!==!1&&(a.height=x+(E?0:g+z)),a.innerWidth=a.width-(p+_),a.innerHeight=a.height-(g+z),a.outerWidth=a.width+y,a.outerHeight=a.height+v,a}}var s,a="undefined"==typeof console?e:function(t){console.error(t)},h=["paddingLeft","paddingRight","paddingTop","paddingBottom","marginLeft","marginRight","marginTop","marginBottom","borderLeftWidth","borderRightWidth","borderTopWidth","borderBottomWidth"],u=h.length,d=!1;return r}),function(t,e){"use strict";"function"==typeof define&&define.amd?define("desandro-matches-selector/matches-selector",e):"object"==typeof module&&module.exports?module.exports=e():t.matchesSelector=e()}(window,function(){"use strict";var t=function(){var t=window.Element.prototype;if(t.matches)return"matches";if(t.matchesSelector)return"matchesSelector";for(var e=["webkit","moz","ms","o"],i=0;i<e.length;i++){var n=e[i],o=n+"MatchesSelector";if(t[o])return o}}();return function(e,i){return e[t](i)}}),function(t,e){"function"==typeof define&&define.amd?define("fizzy-ui-utils/utils",["desandro-matches-selector/matches-selector"],function(i){return e(t,i)}):"object"==typeof module&&module.exports?module.exports=e(t,require("desandro-matches-selector")):t.fizzyUIUtils=e(t,t.matchesSelector)}(window,function(t,e){var i={};i.extend=function(t,e){for(var i in e)t[i]=e[i];return t},i.modulo=function(t,e){return(t%e+e)%e};var n=Array.prototype.slice;i.makeArray=function(t){if(Array.isArray(t))return t;if(null===t||void 0===t)return[];var e="object"==typeof t&&"number"==typeof t.length;return e?n.call(t):[t]},i.removeFrom=function(t,e){var i=t.indexOf(e);-1!=i&&t.splice(i,1)},i.getParent=function(t,i){for(;t.parentNode&&t!=document.body;)if(t=t.parentNode,e(t,i))return t},i.getQueryElement=function(t){return"string"==typeof t?document.querySelector(t):t},i.handleEvent=function(t){var e="on"+t.type;this[e]&&this[e](t)},i.filterFindElements=function(t,n){t=i.makeArray(t);var o=[];return t.forEach(function(t){if(t instanceof HTMLElement){if(!n)return void o.push(t);e(t,n)&&o.push(t);for(var i=t.querySelectorAll(n),r=0;r<i.length;r++)o.push(i[r])}}),o},i.debounceMethod=function(t,e,i){i=i||100;var n=t.prototype[e],o=e+"Timeout";t.prototype[e]=function(){var t=this[o];clearTimeout(t);var e=arguments,r=this;this[o]=setTimeout(function(){n.apply(r,e),delete r[o]},i)}},i.docReady=function(t){var e=document.readyState;"complete"==e||"interactive"==e?setTimeout(t):document.addEventListener("DOMContentLoaded",t)},i.toDashed=function(t){return t.replace(/(.)([A-Z])/g,function(t,e,i){return e+"-"+i}).toLowerCase()};var o=t.console;return i.htmlInit=function(e,n){i.docReady(function(){var r=i.toDashed(n),s="data-"+r,a=document.querySelectorAll("["+s+"]"),h=document.querySelectorAll(".js-"+r),u=i.makeArray(a).concat(i.makeArray(h)),d=s+"-options",l=t.jQuery;u.forEach(function(t){var i,r=t.getAttribute(s)||t.getAttribute(d);try{i=r&&JSON.parse(r)}catch(a){return void(o&&o.error("Error parsing "+s+" on "+t.className+": "+a))}var h=new e(t,i);l&&l.data(t,n,h)})})},i}),function(t,e){"function"==typeof define&&define.amd?define("outlayer/item",["ev-emitter/ev-emitter","get-size/get-size"],e):"object"==typeof module&&module.exports?module.exports=e(require("ev-emitter"),require("get-size")):(t.Outlayer={},t.Outlayer.Item=e(t.EvEmitter,t.getSize))}(window,function(t,e){"use strict";function i(t){for(var e in t)return!1;return e=null,!0}function n(t,e){t&&(this.element=t,this.layout=e,this.position={x:0,y:0},this._create())}function o(t){return t.replace(/([A-Z])/g,function(t){return"-"+t.toLowerCase()})}var r=document.documentElement.style,s="string"==typeof r.transition?"transition":"WebkitTransition",a="string"==typeof r.transform?"transform":"WebkitTransform",h={WebkitTransition:"webkitTransitionEnd",transition:"transitionend"}[s],u={transform:a,transition:s,transitionDuration:s+"Duration",transitionProperty:s+"Property",transitionDelay:s+"Delay"},d=n.prototype=Object.create(t.prototype);d.constructor=n,d._create=function(){this._transn={ingProperties:{},clean:{},onEnd:{}},this.css({position:"absolute"})},d.handleEvent=function(t){var e="on"+t.type;this[e]&&this[e](t)},d.getSize=function(){this.size=e(this.element)},d.css=function(t){var e=this.element.style;for(var i in t){var n=u[i]||i;e[n]=t[i]}},d.getPosition=function(){var t=getComputedStyle(this.element),e=this.layout._getOption("originLeft"),i=this.layout._getOption("originTop"),n=t[e?"left":"right"],o=t[i?"top":"bottom"],r=parseFloat(n),s=parseFloat(o),a=this.layout.size;-1!=n.indexOf("%")&&(r=r/100*a.width),-1!=o.indexOf("%")&&(s=s/100*a.height),r=isNaN(r)?0:r,s=isNaN(s)?0:s,r-=e?a.paddingLeft:a.paddingRight,s-=i?a.paddingTop:a.paddingBottom,this.position.x=r,this.position.y=s},d.layoutPosition=function(){var t=this.layout.size,e={},i=this.layout._getOption("originLeft"),n=this.layout._getOption("originTop"),o=i?"paddingLeft":"paddingRight",r=i?"left":"right",s=i?"right":"left",a=this.position.x+t[o];e[r]=this.getXValue(a),e[s]="";var h=n?"paddingTop":"paddingBottom",u=n?"top":"bottom",d=n?"bottom":"top",l=this.position.y+t[h];e[u]=this.getYValue(l),e[d]="",this.css(e),this.emitEvent("layout",[this])},d.getXValue=function(t){var e=this.layout._getOption("horizontal");return this.layout.options.percentPosition&&!e?t/this.layout.size.width*100+"%":t+"px"},d.getYValue=function(t){var e=this.layout._getOption("horizontal");return this.layout.options.percentPosition&&e?t/this.layout.size.height*100+"%":t+"px"},d._transitionTo=function(t,e){this.getPosition();var i=this.position.x,n=this.position.y,o=t==this.position.x&&e==this.position.y;if(this.setPosition(t,e),o&&!this.isTransitioning)return void this.layoutPosition();var r=t-i,s=e-n,a={};a.transform=this.getTranslate(r,s),this.transition({to:a,onTransitionEnd:{transform:this.layoutPosition},isCleaning:!0})},d.getTranslate=function(t,e){var i=this.layout._getOption("originLeft"),n=this.layout._getOption("originTop");return t=i?t:-t,e=n?e:-e,"translate3d("+t+"px, "+e+"px, 0)"},d.goTo=function(t,e){this.setPosition(t,e),this.layoutPosition()},d.moveTo=d._transitionTo,d.setPosition=function(t,e){this.position.x=parseFloat(t),this.position.y=parseFloat(e)},d._nonTransition=function(t){this.css(t.to),t.isCleaning&&this._removeStyles(t.to);for(var e in t.onTransitionEnd)t.onTransitionEnd[e].call(this)},d.transition=function(t){if(!parseFloat(this.layout.options.transitionDuration))return void this._nonTransition(t);var e=this._transn;for(var i in t.onTransitionEnd)e.onEnd[i]=t.onTransitionEnd[i];for(i in t.to)e.ingProperties[i]=!0,t.isCleaning&&(e.clean[i]=!0);if(t.from){this.css(t.from);var n=this.element.offsetHeight;n=null}this.enableTransition(t.to),this.css(t.to),this.isTransitioning=!0};var l="opacity,"+o(a);d.enableTransition=function(){if(!this.isTransitioning){var t=this.layout.options.transitionDuration;t="number"==typeof t?t+"ms":t,this.css({transitionProperty:l,transitionDuration:t,transitionDelay:this.staggerDelay||0}),this.element.addEventListener(h,this,!1)}},d.onwebkitTransitionEnd=function(t){this.ontransitionend(t)},d.onotransitionend=function(t){this.ontransitionend(t)};var c={"-webkit-transform":"transform"};d.ontransitionend=function(t){if(t.target===this.element){var e=this._transn,n=c[t.propertyName]||t.propertyName;if(delete e.ingProperties[n],i(e.ingProperties)&&this.disableTransition(),n in e.clean&&(this.element.style[t.propertyName]="",delete e.clean[n]),n in e.onEnd){var o=e.onEnd[n];o.call(this),delete e.onEnd[n]}this.emitEvent("transitionEnd",[this])}},d.disableTransition=function(){this.removeTransitionStyles(),this.element.removeEventListener(h,this,!1),this.isTransitioning=!1},d._removeStyles=function(t){var e={};for(var i in t)e[i]="";this.css(e)};var f={transitionProperty:"",transitionDuration:"",transitionDelay:""};return d.removeTransitionStyles=function(){this.css(f)},d.stagger=function(t){t=isNaN(t)?0:t,this.staggerDelay=t+"ms"},d.removeElem=function(){this.element.parentNode.removeChild(this.element),this.css({display:""}),this.emitEvent("remove",[this])},d.remove=function(){return s&&parseFloat(this.layout.options.transitionDuration)?(this.once("transitionEnd",function(){this.removeElem()}),void this.hide()):void this.removeElem()},d.reveal=function(){delete this.isHidden,this.css({display:""});var t=this.layout.options,e={},i=this.getHideRevealTransitionEndProperty("visibleStyle");e[i]=this.onRevealTransitionEnd,this.transition({from:t.hiddenStyle,to:t.visibleStyle,isCleaning:!0,onTransitionEnd:e})},d.onRevealTransitionEnd=function(){this.isHidden||this.emitEvent("reveal")},d.getHideRevealTransitionEndProperty=function(t){var e=this.layout.options[t];if(e.opacity)return"opacity";for(var i in e)return i},d.hide=function(){this.isHidden=!0,this.css({display:""});var t=this.layout.options,e={},i=this.getHideRevealTransitionEndProperty("hiddenStyle");e[i]=this.onHideTransitionEnd,this.transition({from:t.visibleStyle,to:t.hiddenStyle,isCleaning:!0,onTransitionEnd:e})},d.onHideTransitionEnd=function(){this.isHidden&&(this.css({display:"none"}),this.emitEvent("hide"))},d.destroy=function(){this.css({position:"",left:"",right:"",top:"",bottom:"",transition:"",transform:""})},n}),function(t,e){"use strict";"function"==typeof define&&define.amd?define("outlayer/outlayer",["ev-emitter/ev-emitter","get-size/get-size","fizzy-ui-utils/utils","./item"],function(i,n,o,r){return e(t,i,n,o,r)}):"object"==typeof module&&module.exports?module.exports=e(t,require("ev-emitter"),require("get-size"),require("fizzy-ui-utils"),require("./item")):t.Outlayer=e(t,t.EvEmitter,t.getSize,t.fizzyUIUtils,t.Outlayer.Item)}(window,function(t,e,i,n,o){"use strict";function r(t,e){var i=n.getQueryElement(t);if(!i)return void(h&&h.error("Bad element for "+this.constructor.namespace+": "+(i||t)));this.element=i,u&&(this.$element=u(this.element)),this.options=n.extend({},this.constructor.defaults),this.option(e);var o=++l;this.element.outlayerGUID=o,c[o]=this,this._create();var r=this._getOption("initLayout");r&&this.layout()}function s(t){function e(){t.apply(this,arguments)}return e.prototype=Object.create(t.prototype),e.prototype.constructor=e,e}function a(t){if("number"==typeof t)return t;var e=t.match(/(^\d*\.?\d*)(\w*)/),i=e&&e[1],n=e&&e[2];if(!i.length)return 0;i=parseFloat(i);var o=m[n]||1;return i*o}var h=t.console,u=t.jQuery,d=function(){},l=0,c={};r.namespace="outlayer",r.Item=o,r.defaults={containerStyle:{position:"relative"},initLayout:!0,originLeft:!0,originTop:!0,resize:!0,resizeContainer:!0,transitionDuration:"0.4s",hiddenStyle:{opacity:0,transform:"scale(0.001)"},visibleStyle:{opacity:1,transform:"scale(1)"}};var f=r.prototype;n.extend(f,e.prototype),f.option=function(t){n.extend(this.options,t)},f._getOption=function(t){var e=this.constructor.compatOptions[t];return e&&void 0!==this.options[e]?this.options[e]:this.options[t]},r.compatOptions={initLayout:"isInitLayout",horizontal:"isHorizontal",layoutInstant:"isLayoutInstant",originLeft:"isOriginLeft",originTop:"isOriginTop",resize:"isResizeBound",resizeContainer:"isResizingContainer"},f._create=function(){this.reloadItems(),this.stamps=[],this.stamp(this.options.stamp),n.extend(this.element.style,this.options.containerStyle);var t=this._getOption("resize");t&&this.bindResize()},f.reloadItems=function(){this.items=this._itemize(this.element.children)},f._itemize=function(t){for(var e=this._filterFindItemElements(t),i=this.constructor.Item,n=[],o=0;o<e.length;o++){var r=e[o],s=new i(r,this);n.push(s)}return n},f._filterFindItemElements=function(t){return n.filterFindElements(t,this.options.itemSelector)},f.getItemElements=function(){return this.items.map(function(t){return t.element})},f.layout=function(){this._resetLayout(),this._manageStamps();var t=this._getOption("layoutInstant"),e=void 0!==t?t:!this._isLayoutInited;this.layoutItems(this.items,e),this._isLayoutInited=!0},f._init=f.layout,f._resetLayout=function(){this.getSize()},f.getSize=function(){this.size=i(this.element)},f._getMeasurement=function(t,e){var n,o=this.options[t];o?("string"==typeof o?n=this.element.querySelector(o):o instanceof HTMLElement&&(n=o),this[t]=n?i(n)[e]:o):this[t]=0},f.layoutItems=function(t,e){t=this._getItemsForLayout(t),this._layoutItems(t,e),this._postLayout()},f._getItemsForLayout=function(t){return t.filter(function(t){return!t.isIgnored})},f._layoutItems=function(t,e){if(this._emitCompleteOnItems("layout",t),t&&t.length){var i=[];t.forEach(function(t){var n=this._getItemLayoutPosition(t);n.item=t,n.isInstant=e||t.isLayoutInstant,i.push(n)},this),this._processLayoutQueue(i)}},f._getItemLayoutPosition=function(){return{x:0,y:0}},f._processLayoutQueue=function(t){this.updateStagger(),t.forEach(function(t,e){this._positionItem(t.item,t.x,t.y,t.isInstant,e)},this)},f.updateStagger=function(){var t=this.options.stagger;return null===t||void 0===t?void(this.stagger=0):(this.stagger=a(t),this.stagger)},f._positionItem=function(t,e,i,n,o){n?t.goTo(e,i):(t.stagger(o*this.stagger),t.moveTo(e,i))},f._postLayout=function(){this.resizeContainer()},f.resizeContainer=function(){var t=this._getOption("resizeContainer");if(t){var e=this._getContainerSize();e&&(this._setContainerMeasure(e.width,!0),this._setContainerMeasure(e.height,!1))}},f._getContainerSize=d,f._setContainerMeasure=function(t,e){if(void 0!==t){var i=this.size;i.isBorderBox&&(t+=e?i.paddingLeft+i.paddingRight+i.borderLeftWidth+i.borderRightWidth:i.paddingBottom+i.paddingTop+i.borderTopWidth+i.borderBottomWidth),t=Math.max(t,0),this.element.style[e?"width":"height"]=t+"px"}},f._emitCompleteOnItems=function(t,e){function i(){o.dispatchEvent(t+"Complete",null,[e])}function n(){s++,s==r&&i()}var o=this,r=e.length;if(!e||!r)return void i();var s=0;e.forEach(function(e){e.once(t,n)})},f.dispatchEvent=function(t,e,i){var n=e?[e].concat(i):i;if(this.emitEvent(t,n),u)if(this.$element=this.$element||u(this.element),e){var o=u.Event(e);o.type=t,this.$element.trigger(o,i)}else this.$element.trigger(t,i)},f.ignore=function(t){var e=this.getItem(t);e&&(e.isIgnored=!0)},f.unignore=function(t){var e=this.getItem(t);e&&delete e.isIgnored},f.stamp=function(t){t=this._find(t),t&&(this.stamps=this.stamps.concat(t),t.forEach(this.ignore,this))},f.unstamp=function(t){t=this._find(t),t&&t.forEach(function(t){n.removeFrom(this.stamps,t),this.unignore(t)},this)},f._find=function(t){return t?("string"==typeof t&&(t=this.element.querySelectorAll(t)),t=n.makeArray(t)):void 0},f._manageStamps=function(){this.stamps&&this.stamps.length&&(this._getBoundingRect(),this.stamps.forEach(this._manageStamp,this))},f._getBoundingRect=function(){var t=this.element.getBoundingClientRect(),e=this.size;this._boundingRect={left:t.left+e.paddingLeft+e.borderLeftWidth,top:t.top+e.paddingTop+e.borderTopWidth,right:t.right-(e.paddingRight+e.borderRightWidth),bottom:t.bottom-(e.paddingBottom+e.borderBottomWidth)}},f._manageStamp=d,f._getElementOffset=function(t){var e=t.getBoundingClientRect(),n=this._boundingRect,o=i(t),r={left:e.left-n.left-o.marginLeft,top:e.top-n.top-o.marginTop,right:n.right-e.right-o.marginRight,bottom:n.bottom-e.bottom-o.marginBottom};return r},f.handleEvent=n.handleEvent,f.bindResize=function(){t.addEventListener("resize",this),this.isResizeBound=!0},f.unbindResize=function(){t.removeEventListener("resize",this),this.isResizeBound=!1},f.onresize=function(){this.resize()},n.debounceMethod(r,"onresize",100),f.resize=function(){this.isResizeBound&&this.needsResizeLayout()&&this.layout()},f.needsResizeLayout=function(){var t=i(this.element),e=this.size&&t;return e&&t.innerWidth!==this.size.innerWidth},f.addItems=function(t){var e=this._itemize(t);return e.length&&(this.items=this.items.concat(e)),e},f.appended=function(t){var e=this.addItems(t);e.length&&(this.layoutItems(e,!0),this.reveal(e))},f.prepended=function(t){var e=this._itemize(t);if(e.length){var i=this.items.slice(0);this.items=e.concat(i),this._resetLayout(),this._manageStamps(),this.layoutItems(e,!0),this.reveal(e),this.layoutItems(i)}},f.reveal=function(t){if(this._emitCompleteOnItems("reveal",t),t&&t.length){var e=this.updateStagger();t.forEach(function(t,i){t.stagger(i*e),t.reveal()})}},f.hide=function(t){if(this._emitCompleteOnItems("hide",t),t&&t.length){var e=this.updateStagger();t.forEach(function(t,i){t.stagger(i*e),t.hide()})}},f.revealItemElements=function(t){var e=this.getItems(t);this.reveal(e)},f.hideItemElements=function(t){var e=this.getItems(t);this.hide(e)},f.getItem=function(t){for(var e=0;e<this.items.length;e++){var i=this.items[e];if(i.element==t)return i}},f.getItems=function(t){t=n.makeArray(t);var e=[];return t.forEach(function(t){var i=this.getItem(t);i&&e.push(i)},this),e},f.remove=function(t){var e=this.getItems(t);this._emitCompleteOnItems("remove",e),e&&e.length&&e.forEach(function(t){t.remove(),n.removeFrom(this.items,t)},this)},f.destroy=function(){var t=this.element.style;t.height="",t.position="",t.width="",this.items.forEach(function(t){t.destroy()}),this.unbindResize();var e=this.element.outlayerGUID;delete c[e],delete this.element.outlayerGUID,u&&u.removeData(this.element,this.constructor.namespace)},r.data=function(t){t=n.getQueryElement(t);var e=t&&t.outlayerGUID;return e&&c[e]},r.create=function(t,e){var i=s(r);return i.defaults=n.extend({},r.defaults),n.extend(i.defaults,e),i.compatOptions=n.extend({},r.compatOptions),i.namespace=t,i.data=r.data,i.Item=s(o),n.htmlInit(i,t),u&&u.bridget&&u.bridget(t,i),i};var m={ms:1,s:1e3};return r.Item=o,r}),function(t,e){"function"==typeof define&&define.amd?define(["outlayer/outlayer","get-size/get-size"],e):"object"==typeof module&&module.exports?module.exports=e(require("outlayer"),require("get-size")):t.Masonry=e(t.Outlayer,t.getSize)}(window,function(t,e){var i=t.create("masonry");i.compatOptions.fitWidth="isFitWidth";var n=i.prototype;return n._resetLayout=function(){this.getSize(),this._getMeasurement("columnWidth","outerWidth"),this._getMeasurement("gutter","outerWidth"),this.measureColumns(),this.colYs=[];for(var t=0;t<this.cols;t++)this.colYs.push(0);this.maxY=0,this.horizontalColIndex=0},n.measureColumns=function(){if(this.getContainerWidth(),!this.columnWidth){var t=this.items[0],i=t&&t.element;this.columnWidth=i&&e(i).outerWidth||this.containerWidth}var n=this.columnWidth+=this.gutter,o=this.containerWidth+this.gutter,r=o/n,s=n-o%n,a=s&&1>s?"round":"floor";r=Math[a](r),this.cols=Math.max(r,1)},n.getContainerWidth=function(){var t=this._getOption("fitWidth"),i=t?this.element.parentNode:this.element,n=e(i);this.containerWidth=n&&n.innerWidth},n._getItemLayoutPosition=function(t){t.getSize();var e=t.size.outerWidth%this.columnWidth,i=e&&1>e?"round":"ceil",n=Math[i](t.size.outerWidth/this.columnWidth);n=Math.min(n,this.cols);for(var o=this.options.horizontalOrder?"_getHorizontalColPosition":"_getTopColPosition",r=this[o](n,t),s={x:this.columnWidth*r.col,y:r.y},a=r.y+t.size.outerHeight,h=n+r.col,u=r.col;h>u;u++)this.colYs[u]=a;return s},n._getTopColPosition=function(t){var e=this._getTopColGroup(t),i=Math.min.apply(Math,e);return{col:e.indexOf(i),y:i}},n._getTopColGroup=function(t){if(2>t)return this.colYs;for(var e=[],i=this.cols+1-t,n=0;i>n;n++)e[n]=this._getColGroupY(n,t);return e},n._getColGroupY=function(t,e){if(2>e)return this.colYs[t];var i=this.colYs.slice(t,t+e);return Math.max.apply(Math,i)},n._getHorizontalColPosition=function(t,e){var i=this.horizontalColIndex%this.cols,n=t>1&&i+t>this.cols;i=n?0:i;var o=e.size.outerWidth&&e.size.outerHeight;return this.horizontalColIndex=o?i+t:this.horizontalColIndex,{col:i,y:this._getColGroupY(i,t)}},n._manageStamp=function(t){var i=e(t),n=this._getElementOffset(t),o=this._getOption("originLeft"),r=o?n.left:n.right,s=r+i.outerWidth,a=Math.floor(r/this.columnWidth);a=Math.max(0,a);var h=Math.floor(s/this.columnWidth);h-=s%this.columnWidth?0:1,h=Math.min(this.cols-1,h);for(var u=this._getOption("originTop"),d=(u?n.top:n.bottom)+i.outerHeight,l=a;h>=l;l++)this.colYs[l]=Math.max(d,this.colYs[l])},n._getContainerSize=function(){this.maxY=Math.max.apply(Math,this.colYs);var t={height:this.maxY};return this._getOption("fitWidth")&&(t.width=this._getContainerFitWidth()),t},n._getContainerFitWidth=function(){for(var t=0,e=this.cols;--e&&0===this.colYs[e];)t++;return(this.cols-t)*this.columnWidth-this.gutter},n.needsResizeLayout=function(){var t=this.containerWidth;return this.getContainerWidth(),t!=this.containerWidth},i});
vendor: 2,069 bytes, lines 3818-3820
3818 3819 3820!function(e,t){"function"==typeof define&&define.amd?define("ev-emitter/ev-emitter",t):"object"==typeof module&&module.exports?module.exports=t():e.EvEmitter=t()}("undefined"!=typeof window?window:this,function(){function e(){}var t=e.prototype;return t.on=function(e,t){if(e&&t){var i=this._events=this._events||{},n=i[e]=i[e]||[];return n.indexOf(t)==-1&&n.push(t),this}},t.once=function(e,t){if(e&&t){this.on(e,t);var i=this._onceEvents=this._onceEvents||{},n=i[e]=i[e]||{};return n[t]=!0,this}},t.off=function(e,t){var i=this._events&&this._events[e];if(i&&i.length){var n=i.indexOf(t);return n!=-1&&i.splice(n,1),this}},t.emitEvent=function(e,t){var i=this._events&&this._events[e];if(i&&i.length){i=i.slice(0),t=t||[];for(var n=this._onceEvents&&this._onceEvents[e],o=0;o<i.length;o++){var r=i[o],s=n&&n[r];s&&(this.off(e,r),delete n[r]),r.apply(this,t)}return this}},t.allOff=function(){delete this._events,delete this._onceEvents},e}),function(e,t){"use strict";"function"==typeof define&&define.amd?define(["ev-emitter/ev-emitter"],function(i){return t(e,i)}):"object"==typeof module&&module.exports?module.exports=t(e,require("ev-emitter")):e.imagesLoaded=t(e,e.EvEmitter)}("undefined"!=typeof window?window:this,function(e,t){function i(e,t){for(var i in t)e[i]=t[i];return e}function n(e){if(Array.isArray(e))return e;var t="object"==typeof e&&"number"==typeof e.length;return t?d.call(e):[e]}function o(e,t,r){if(!(this instanceof o))return new o(e,t,r);var s=e;return"string"==typeof e&&(s=document.querySelectorAll(e)),s?(this.elements=n(s),this.options=i({},this.options),"function"==typeof t?r=t:i(this.options,t),r&&this.on("always",r),this.getImages(),h&&(this.jqDeferred=new h.Deferred),void setTimeout(this.check.bind(this))):void a.error("Bad element for imagesLoaded "+(s||e))}function r(e){this.img=e}function s(e,t){this.url=e,this.element=t,this.img=new Image}var h=e.jQuery,a=e.console,d=Array.prototype.slice;o.prototype=Object.create(t.prototype),o.prototype.options={},o.prototype.getImages=function(){this.images=[],this.elements.forEac
vendor: 4,714 bytes, lines 3820-3865
3820h(this.addElementImages,this)},o.prototype.addElementImages=function(e){"IMG"==e.nodeName&&this.addImage(e),this.options.background===!0&&this.addElementBackgroundImages(e);var t=e.nodeType;if(t&&u[t]){for(var i=e.querySelectorAll("img"),n=0;n<i.length;n++){var o=i[n];this.addImage(o)}if("string"==typeof this.options.background){var r=e.querySelectorAll(this.options.background);for(n=0;n<r.length;n++){var s=r[n];this.addElementBackgroundImages(s)}}}};var u={1:!0,9:!0,11:!0};return o.prototype.addElementBackgroundImages=function(e){var t=getComputedStyle(e);if(t)for(var i=/url\((['"])?(.*?)\1\)/gi,n=i.exec(t.backgroundImage);null!==n;){var o=n&&n[2];o&&this.addBackground(o,e),n=i.exec(t.backgroundImage)}},o.prototype.addImage=function(e){var t=new r(e);this.images.push(t)},o.prototype.addBackground=function(e,t){var i=new s(e,t);this.images.push(i)},o.prototype.check=function(){function e(e,i,n){setTimeout(function(){t.progress(e,i,n)})}var t=this;return this.progressedCount=0,this.hasAnyBroken=!1,this.images.length?void this.images.forEach(function(t){t.once("progress",e),t.check()}):void this.complete()},o.prototype.progress=function(e,t,i){this.progressedCount++,this.hasAnyBroken=this.hasAnyBroken||!e.isLoaded,this.emitEvent("progress",[this,e,t]),this.jqDeferred&&this.jqDeferred.notify&&this.jqDeferred.notify(this,e),this.progressedCount==this.images.length&&this.complete(),this.options.debug&&a&&a.log("progress: "+i,e,t)},o.prototype.complete=function(){var e=this.hasAnyBroken?"fail":"done";if(this.isComplete=!0,this.emitEvent(e,[this]),this.emitEvent("always",[this]),this.jqDeferred){var t=this.hasAnyBroken?"reject":"resolve";this.jqDeferred[t](this)}},r.prototype=Object.create(t.prototype),r.prototype.check=function(){var e=this.getIsImageComplete();return e?void this.confirm(0!==this.img.naturalWidth,"naturalWidth"):(this.proxyImage=new Image,this.proxyImage.addEventListener("load",this),this.proxyImage.addEventListener("error",this),this.img.addEventListener("load",this),this.img.addEventListener("error",this),void(this.proxyImage.src=this.img.src))},r.prototype.getIsImageComplete=function(){return this.img.complete&&this.img.naturalWidth},r.prototype.confirm=function(e,t){this.isLoaded=e,this.emitEvent("progress",[this,this.img,t])},r.prototype.handleEvent=function(e){var t="on"+e.type;this[t]&&this[t](e)},r.prototype.onload=function(){this.confirm(!0,"onload"),this.unbindEvents()},r.prototype.onerror=function(){this.confirm(!1,"onerror"),this.unbindEvents()},r.prototype.unbindEvents=function(){this.proxyImage.removeEventListener("load",this),this.proxyImage.removeEventListener("error",this),this.img.removeEventListener("load",this),this.img.removeEventListener("error",this)},s.prototype=Object.create(r.prototype),s.prototype.check=function(){this.img.addEventListener("load",this),this.img.addEventListener("error",this),this.img.src=this.url;var e=this.getIsImageComplete();e&&(this.confirm(0!==this.img.naturalWidth,"naturalWidth"),this.unbindEvents())},s.prototype.unbindEvents=function(){this.img.removeEventListener("load",this),this.img.removeEventListener("error",this)},s.prototype.confirm=function(e,t){this.isLoaded=e,this.emitEvent("progress",[this,this.element,t])},o.makeJQueryPlugin=function(t){t=t||e.jQuery,t&&(h=t,h.fn.imagesLoaded=function(e,t){var i=new o(this,e,t);return i.jqDeferred.promise(h(this))})},o.makeJQueryPlugin(),o});(function ($, undefined) { 3821 'use strict'; 3822 var defaults = { 3823 item: 3, 3824 autoWidth: false, 3825 slideMove: 1, 3826 slideMargin: 10, 3827 addClass: '', 3828 mode: 'slide', 3829 useCSS: true, 3830 cssEasing: 'ease', //'cubic-bezier(0.25, 0, 0.25, 1)', 3831 easing: 'linear', //'for jquery animation',// 3832 speed: 400, //ms' 3833 auto: false, 3834 pauseOnHover: false, 3835 loop: false, 3836 slideEndAnimation: true, 3837 pause: 2000, 3838 keyPress: false, 3839 controls: true, 3840 prevHtml: '', 3841 nextHtml: '', 3842 rtl: false, 3843 adaptiveHeight: false, 3844 vertical: false, 3845 verticalHeight: 500, 3846 vThumbWidth: 100, 3847 thumbItem: 10, 3848 pager: true, 3849 gallery: false, 3850 galleryMargin: 5, 3851 thumbMargin: 5, 3852 currentPagerPosition: 'middle', 3853 enableTouch: true, 3854 enableDrag: true, 3855 freeMove: true, 3856 swipeThreshold: 40, 3857 responsive: [], 3858 3859 onBeforeStart: function ($el) {}, 3860 onSliderLoad: function ($el) {}, 3861 onBeforeSlide: function ($el, scene) {}, 3862 onAfterSlide: function ($el, scene) {}, 3863 onBeforeNextSlide: function ($el, scene) {}, 3864 onBeforePrevSlide: function ($el, scene) {} 3865
vendor: 8,223 bytes, lines 3865-4065
3865 3866 }; 3867 $.fn.lightSlider = function (options) { 3868 if (this.length === 0) { 3869 return this; 3870 } 3871 3872 if (this.length > 1) { 3873 this.each(function () { 3874 $(this).lightSlider(options); 3875 }); 3876 return this; 3877 } 3878 3879 var plugin = {}, 3880 settings = $.extend(true, {}, defaults, options), 3881 settingsTemp = {}, 3882 $el = this; 3883 plugin.$el = this; 3884 3885 if (settings.mode === 'fade') { 3886 settings.vertical = false; 3887 } 3888 var $children = $el.children(), 3889 windowW = $(window).width(), 3890 breakpoint = null, 3891 resposiveObj = null, 3892 length = 0, 3893 w = 0, 3894 on = false, 3895 elSize = 0, 3896 $slide = '', 3897 scene = 0, 3898 property = (settings.vertical === true) ? 'height' : 'width', 3899 gutter = (settings.vertical === true) ? 'margin-bottom' : 'margin-right', 3900 slideValue = 0, 3901 pagerWidth = 0, 3902 slideWidth = 0, 3903 thumbWidth = 0, 3904 interval = null, 3905 isTouch = ('ontouchstart' in document.documentElement); 3906 var refresh = {}; 3907 3908 refresh.chbreakpoint = function () { 3909 windowW = $(window).width(); 3910 if (settings.responsive.length) { 3911 var item; 3912 if (settings.autoWidth === false) { 3913 item = settings.item; 3914 } 3915 if (windowW < settings.responsive[0].breakpoint) { 3916 for (var i = 0; i < settings.responsive.length; i++) { 3917 if (windowW < settings.responsive[i].breakpoint) { 3918 breakpoint = settings.responsive[i].breakpoint; 3919 resposiveObj = settings.responsive[i]; 3920 } 3921 } 3922 } 3923 if (typeof resposiveObj !== 'undefined' && resposiveObj !== null) { 3924 for (var j in resposiveObj.settings) { 3925 if (resposiveObj.settings.hasOwnProperty(j)) { 3926 if (typeof settingsTemp[j] === 'undefined' || settingsTemp[j] === null) { 3927 settingsTemp[j] = settings[j]; 3928 } 3929 settings[j] = resposiveObj.settings[j]; 3930 } 3931 } 3932 } 3933 if (!$.isEmptyObject(settingsTemp) && windowW > settings.responsive[0].breakpoint) { 3934 for (var k in settingsTemp) { 3935 if (settingsTemp.hasOwnProperty(k)) { 3936 settings[k] = settingsTemp[k]; 3937 } 3938 } 3939 } 3940 if (settings.autoWidth === false) { 3941 if (slideValue > 0 && slideWidth > 0) { 3942 if (item !== settings.item) { 3943 scene = Math.round(slideValue / ((slideWidth + settings.slideMargin) * settings.slideMove)); 3944 } 3945 } 3946 } 3947 } 3948 }; 3949 3950 refresh.calSW = function () { 3951 if (settings.autoWidth === false) { 3952 slideWidth = (elSize - ((settings.item * (settings.slideMargin)) - settings.slideMargin)) / settings.item; 3953 } 3954 }; 3955 3956 refresh.calWidth = function (cln) { 3957 var ln = cln === true ? $slide.find('.lslide').length : $children.length; 3958 if (settings.autoWidth === false) { 3959 w = ln * (slideWidth + settings.slideMargin); 3960 } else { 3961 w = 0; 3962 for (var i = 0; i < ln; i++) { 3963 w += (parseInt($children.eq(i).width()) + settings.slideMargin); 3964 } 3965 } 3966 return w; 3967 }; 3968 plugin = { 3969 doCss: function () { 3970 var support = function () { 3971 var transition = ['transition', 'MozTransition', 'WebkitTransition', 'OTransition', 'msTransition', 'KhtmlTransition']; 3972 var root = document.documentElement; 3973 for (var i = 0; i < transition.length; i++) { 3974 if (transition[i] in root.style) { 3975 return true; 3976 } 3977 } 3978 }; 3979 if (settings.useCSS && support()) { 3980 return true; 3981 } 3982 return false; 3983 }, 3984 keyPress: function () { 3985 if (settings.keyPress) { 3986 $(document).on('keyup.lightslider', function (e) { 3987 if (!$(':focus').is('input, textarea')) { 3988 if (e.preventDefault) { 3989 e.preventDefault(); 3990 } else { 3991 e.returnValue = false; 3992 } 3993 if (e.keyCode === 37) { 3994 $el.goToPrevSlide(); 3995 } else if (e.keyCode === 39) { 3996 $el.goToNextSlide(); 3997 } 3998 } 3999 }); 4000 } 4001 }, 4002 controls: function () { 4003 if (settings.controls) { 4004 $el.after('<div class="lSAction"><a class="lSPrev">' + settings.prevHtml + '</a><a class="lSNext">' + settings.nextHtml + '</a></div>'); 4005 if (!settings.autoWidth) { 4006 if (length <= settings.item) { 4007 $slide.find('.lSAction').hide(); 4008 } 4009 } else { 4010 if (refresh.calWidth(false) < elSize) { 4011 $slide.find('.lSAction').hide(); 4012 } 4013 } 4014 $slide.find('.lSAction a').on('click', function (e) { 4015 if (e.preventDefault) { 4016 e.preventDefault(); 4017 } else { 4018 e.returnValue = false; 4019 } 4020 if ($(this).attr('class') === 'lSPrev') { 4021 $el.goToPrevSlide(); 4022 } else { 4023 $el.goToNextSlide(); 4024 } 4025 return false; 4026 }); 4027 } 4028 }, 4029 initialStyle: function () { 4030 var $this = this; 4031 if (settings.mode === 'fade') { 4032 settings.autoWidth = false; 4033 settings.slideEndAnimation = false; 4034 } 4035 if (settings.auto) { 4036 settings.slideEndAnimation = false; 4037 } 4038 if (settings.autoWidth) { 4039 settings.slideMove = 1; 4040 settings.item = 1; 4041 } 4042 if (settings.loop) { 4043 settings.slideMove = 1; 4044 settings.freeMove = false; 4045 } 4046 settings.onBeforeStart.call(this, $el); 4047 refresh.chbreakpoint(); 4048 $el.addClass('lightSlider').wrap('<div class="lSSlideOuter ' + settings.addClass + '"><div class="lSSlideWrapper"></div></div>'); 4049 $slide = $el.parent('.lSSlideWrapper'); 4050 if (settings.rtl === true) { 4051 $slide.parent().addClass('lSrtl'); 4052 } 4053 if (settings.vertical) { 4054 $slide.parent().addClass('vertical'); 4055 elSize = settings.verticalHeight; 4056 $slide.css('height', elSize + 'px'); 4057 } else { 4058 elSize = $el.outerWidth(); 4059 } 4060 $children.addClass('lslide'); 4061 if (settings.loop === true && settings.mode === 'slide') { 4062 refresh.calSW(); 4063 refresh.clone = function () { 4064 if (refresh.calWidth(true) > elSize) { 4065
vendor: 6,134 bytes, lines 4065-4184
4065 4066 var tWr = 0, 4067 tI = 0; 4068 for (var k = 0; k < $children.length; k++) { 4069 tWr += (parseInt($el.find('.lslide').eq(k).width()) + settings.slideMargin); 4070 tI++; 4071 if (tWr >= (elSize + settings.slideMargin)) { 4072 break; 4073 } 4074 } 4075 var tItem = settings.autoWidth === true ? tI : settings.item; 4076 4077 4078 if (tItem < $el.find('.clone.left').length) { 4079 for (var i = 0; i < $el.find('.clone.left').length - tItem; i++) { 4080 $children.eq(i).remove(); 4081 } 4082 } 4083 if (tItem < $el.find('.clone.right').length) { 4084 for (var j = $children.length - 1; j > ($children.length - 1 - $el.find('.clone.right').length); j--) { 4085 scene--; 4086 $children.eq(j).remove(); 4087 } 4088 } 4089 4090 for (var n = $el.find('.clone.right').length; n < tItem; n++) { 4091 $el.find('.lslide').eq(n).clone().removeClass('lslide').addClass('clone right').appendTo($el); 4092 scene++; 4093 } 4094 for (var m = $el.find('.lslide').length - $el.find('.clone.left').length; m > ($el.find('.lslide').length - tItem); m--) { 4095 $el.find('.lslide').eq(m - 1).clone().removeClass('lslide').addClass('clone left').prependTo($el); 4096 } 4097 $children = $el.children(); 4098 } else { 4099 if ($children.hasClass('clone')) { 4100 $el.find('.clone').remove(); 4101 $this.move($el, 0); 4102 } 4103 } 4104 }; 4105 refresh.clone(); 4106 } 4107 refresh.sSW = function () { 4108 length = $children.length; 4109 if (settings.rtl === true && settings.vertical === false) { 4110 gutter = 'margin-left'; 4111 } 4112 if (settings.autoWidth === false) { 4113 $children.css(property, slideWidth + 'px'); 4114 } 4115 $children.css(gutter, settings.slideMargin + 'px'); 4116 w = refresh.calWidth(false); 4117 $el.css(property, w + 'px'); 4118 if (settings.loop === true && settings.mode === 'slide') { 4119 if (on === false) { 4120 scene = $el.find('.clone.left').length; 4121 } 4122 } 4123 }; 4124 refresh.calL = function () { 4125 $children = $el.children(); 4126 length = $children.length; 4127 }; 4128 if (this.doCss()) { 4129 $slide.addClass('usingCss'); 4130 } 4131 refresh.calL(); 4132 if (settings.mode === 'slide') { 4133 refresh.calSW(); 4134 refresh.sSW(); 4135 if (settings.loop === true) { 4136 slideValue = $this.slideValue(); 4137 this.move($el, slideValue); 4138 } 4139 if (settings.vertical === false) { 4140 this.setHeight($el, false); 4141 } 4142 4143 } else { 4144 this.setHeight($el, true); 4145 $el.addClass('lSFade'); 4146 if (!this.doCss()) { 4147 $children.fadeOut(0); 4148 $children.eq(scene).fadeIn(0); 4149 } 4150 } 4151 if (settings.loop === true && settings.mode === 'slide') { 4152 $children.eq(scene).addClass('active'); 4153 } else { 4154 $children.first().addClass('active'); 4155 } 4156 }, 4157 pager: function () { 4158 var $this = this; 4159 refresh.createPager = function () { 4160 thumbWidth = (elSize - ((settings.thumbItem * (settings.thumbMargin)) - settings.thumbMargin)) / settings.thumbItem; 4161 var $children = $slide.find('.lslide'); 4162 var length = $slide.find('.lslide').length; 4163 var i = 0, 4164 pagers = '', 4165 v = 0; 4166 for (i = 0; i < length; i++) { 4167 if (settings.mode === 'slide') { 4168 // calculate scene * slide value 4169 if (!settings.autoWidth) { 4170 v = i * ((slideWidth + settings.slideMargin) * settings.slideMove); 4171 } else { 4172 v += ((parseInt($children.eq(i).width()) + settings.slideMargin) * settings.slideMove); 4173 } 4174 } 4175 var thumb = $children.eq(i * settings.slideMove).attr('data-thumb'); 4176 if (settings.gallery === true) { 4177 pagers += '<li style="width:100%;' + property + ':' + thumbWidth + 'px;' + gutter + ':' + settings.thumbMargin + 'px"><a href="#"><img src="' + thumb + '" /></a></li>'; 4178 } else { 4179 pagers += '<li><a href="#">' + (i + 1) + '</a></li>'; 4180 } 4181 if (settings.mode === 'slide') { 4182 if ((v) >= w - elSize - settings.slideMargin) { 4183 i = i + 1; 4184 var minPgr = 2
vendor: 32,365 bytes, lines 4184-4959
4184; 4185 if (settings.autoWidth) { 4186 pagers += '<li><a href="#">' + (i + 1) + '</a></li>'; 4187 minPgr = 1; 4188 } 4189 if (i < minPgr) { 4190 pagers = null; 4191 $slide.parent().addClass('noPager'); 4192 } else { 4193 $slide.parent().removeClass('noPager'); 4194 } 4195 break; 4196 } 4197 } 4198 } 4199 var $cSouter = $slide.parent(); 4200 $cSouter.find('.lSPager').html(pagers); 4201 if (settings.gallery === true) { 4202 if (settings.vertical === true) { 4203 // set Gallery thumbnail width 4204 $cSouter.find('.lSPager').css('width', settings.vThumbWidth + 'px'); 4205 } 4206 pagerWidth = (i * (settings.thumbMargin + thumbWidth)) + 0.5; 4207 $cSouter.find('.lSPager').css({ 4208 property: pagerWidth + 'px', 4209 'transition-duration': settings.speed + 'ms' 4210 }); 4211 if (settings.vertical === true) { 4212 $slide.parent().css('padding-right', (settings.vThumbWidth + settings.galleryMargin) + 'px'); 4213 } 4214 $cSouter.find('.lSPager').css(property, pagerWidth + 'px'); 4215 } 4216 var $pager = $cSouter.find('.lSPager').find('li'); 4217 $pager.first().addClass('active'); 4218 $pager.on('click', function () { 4219 if (settings.loop === true && settings.mode === 'slide') { 4220 scene = scene + ($pager.index(this) - $cSouter.find('.lSPager').find('li.active').index()); 4221 } else { 4222 scene = $pager.index(this); 4223 } 4224 $el.mode(false); 4225 if (settings.gallery === true) { 4226 $this.slideThumb(); 4227 } 4228 return false; 4229 }); 4230 }; 4231 if (settings.pager) { 4232 var cl = 'lSpg'; 4233 if (settings.gallery) { 4234 cl = 'lSGallery'; 4235 } 4236 $slide.after('<ul class="lSPager ' + cl + '"></ul>'); 4237 var gMargin = (settings.vertical) ? 'margin-left' : 'margin-top'; 4238 $slide.parent().find('.lSPager').css(gMargin, settings.galleryMargin + 'px'); 4239 refresh.createPager(); 4240 } 4241 4242 setTimeout(function () { 4243 refresh.init(); 4244 }, 0); 4245 }, 4246 setHeight: function (ob, fade) { 4247 var obj = null, 4248 $this = this; 4249 if (settings.loop) { 4250 obj = ob.children('.lslide ').first(); 4251 } else { 4252 obj = ob.children().first(); 4253 } 4254 var setCss = function () { 4255 var tH = obj.outerHeight(), 4256 tP = 0, 4257 tHT = tH; 4258 if (fade) { 4259 tH = 0; 4260 tP = ((tHT) * 100) / elSize; 4261 } 4262 ob.css({ 4263 'height': tH + 'px', 4264 'padding-bottom': tP + '%' 4265 }); 4266 }; 4267 setCss(); 4268 if (obj.find('img').length) { 4269 if ( obj.find('img')[0].complete) { 4270 setCss(); 4271 if (!interval) { 4272 $this.auto(); 4273 } 4274 }else{ 4275 obj.find('img').on('load', function () { 4276 setTimeout(function () { 4277 setCss(); 4278 if (!interval) { 4279 $this.auto(); 4280 } 4281 }, 100); 4282 }); 4283 } 4284 }else{ 4285 if (!interval) { 4286 $this.auto(); 4287 } 4288 } 4289 }, 4290 active: function (ob, t) { 4291 if (this.doCss() && settings.mode === 'fade') { 4292 $slide.addClass('on'); 4293 } 4294 var sc = 0; 4295 if (scene * settings.slideMove < length) { 4296 ob.removeClass('active'); 4297 if (!this.doCss() && settings.mode === 'fade' && t === false) { 4298 ob.fadeOut(settings.speed); 4299 } 4300 if (t === true) { 4301 sc = scene; 4302 } else { 4303 sc = scene * settings.slideMove; 4304 } 4305 //t === true ? sc = scene : sc = scene * settings.slideMove; 4306 var l, nl; 4307 if (t === true) { 4308 l = ob.length; 4309 nl = l - 1; 4310 if (sc + 1 >= l) { 4311 sc = nl; 4312 } 4313 } 4314 if (settings.loop === true && settings.mode === 'slide') { 4315 //t === true ? sc = scene - $el.find('.clone.left').length : sc = scene * settings.slideMove; 4316 if (t === true) { 4317 sc = scene - $el.find('.clone.left').length; 4318 } else { 4319 sc = scene * settings.slideMove; 4320 } 4321 if (t === true) { 4322 l = ob.length; 4323 nl = l - 1; 4324 if (sc + 1 === l) { 4325 sc = nl; 4326 } else if (sc + 1 > l) { 4327 sc = 0; 4328 } 4329 } 4330 } 4331 4332 if (!this.doCss() && settings.mode === 'fade' && t === false) { 4333 ob.eq(sc).fadeIn(settings.speed); 4334 } 4335 ob.eq(sc).addClass('active'); 4336 } else { 4337 ob.removeClass('active'); 4338 ob.eq(ob.length - 1).addClass('active'); 4339 if (!this.doCss() && settings.mode === 'fade' && t === false) { 4340 ob.fadeOut(settings.speed); 4341 ob.eq(sc).fadeIn(settings.speed); 4342 } 4343 } 4344 }, 4345 move: function (ob, v) { 4346 if (settings.rtl === true) { 4347 v = -v; 4348 } 4349 if (this.doCss()) { 4350 if (settings.vertical === true) { 4351 ob.css({ 4352 'transform': 'translate3d(0px, ' + (-v) + 'px, 0px)', 4353 '-webkit-transform': 'translate3d(0px, ' + (-v) + 'px, 0px)' 4354 }); 4355 } else { 4356 ob.css({ 4357 'transform': 'translate3d(' + (-v) + 'px, 0px, 0px)', 4358 '-webkit-transform': 'translate3d(' + (-v) + 'px, 0px, 0px)', 4359 }); 4360 } 4361 } else { 4362 if (settings.vertical === true) { 4363 ob.css('position', 'relative').animate({ 4364 top: -v + 'px' 4365 }, settings.speed, settings.easing); 4366 } else { 4367 ob.css('position', 'relative').animate({ 4368 left: -v + 'px' 4369 }, settings.speed, settings.easing); 4370 } 4371 } 4372 var $thumb = $slide.parent().find('.lSPager').find('li'); 4373 this.active($thumb, true); 4374 }, 4375 fade: function () { 4376 this.active($children, false); 4377 var $thumb = $slide.parent().find('.lSPager').find('li'); 4378 this.active($thumb, true); 4379 }, 4380 slide: function () { 4381 var $this = this; 4382 refresh.calSlide = function () { 4383 if (w > elSize) { 4384 slideValue = $this.slideValue(); 4385 $this.active($children, false); 4386 if ((slideValue) > w - elSize - settings.slideMargin) { 4387 slideValue = w - elSize - settings.slideMargin; 4388 } else if (slideValue < 0) { 4389 slideValue = 0; 4390 } 4391 $this.move($el, slideValue); 4392 if (settings.loop === true && settings.mode === 'slide') { 4393 if (scene >= (length - ($el.find('.clone.left').length / settings.slideMove))) { 4394 $this.resetSlide($el.find('.clone.left').length); 4395 } 4396 if (scene === 0) { 4397 $this.resetSlide($slide.find('.lslide').length); 4398 } 4399 } 4400 } 4401 }; 4402 refresh.calSlide(); 4403 }, 4404 resetSlide: function (s) { 4405 var $this = this; 4406 $slide.find('.lSAction a').addClass('disabled'); 4407 setTimeout(function () { 4408 scene = s; 4409 $slide.css('transition-duration', '0ms'); 4410 slideValue = $this.slideValue(); 4411 $this.active($children, false); 4412 plugin.move($el, slideValue); 4413 setTimeout(function () { 4414 $slide.css('transition-duration', settings.speed + 'ms'); 4415 $slide.find('.lSAction a').removeClass('disabled'); 4416 }, 50); 4417 }, settings.speed + 100); 4418 }, 4419 slideValue: function () { 4420 var _sV = 0; 4421 if (settings.autoWidth === false) { 4422 _sV = scene * ((slideWidth + settings.slideMargin) * settings.slideMove); 4423 } else { 4424 _sV = 0; 4425 for (var i = 0; i < scene; i++) { 4426 _sV += (parseInt($children.eq(i).width()) + settings.slideMargin); 4427 } 4428 } 4429 return _sV; 4430 }, 4431 slideThumb: function () { 4432 var position; 4433 switch (settings.currentPagerPosition) { 4434 case 'left': 4435 position = 0; 4436 break; 4437 case 'middle': 4438 position = (elSize / 2) - (thumbWidth / 2); 4439 break; 4440 case 'right': 4441 position = elSize - thumbWidth; 4442 } 4443 var sc = scene - $el.find('.clone.left').length; 4444 var $pager = $slide.parent().find('.lSPager'); 4445 if (settings.mode === 'slide' && settings.loop === true) { 4446 if (sc >= $pager.children().length) { 4447 sc = 0; 4448 } else if (sc < 0) { 4449 sc = $pager.children().length; 4450 } 4451 } 4452 var thumbSlide = sc * ((thumbWidth + settings.thumbMargin)) - (position); 4453 if ((thumbSlide + elSize) > pagerWidth) { 4454 thumbSlide = pagerWidth - elSize - settings.thumbMargin; 4455 } 4456 if (thumbSlide < 0) { 4457 thumbSlide = 0; 4458 } 4459 this.move($pager, thumbSlide); 4460 }, 4461 auto: function () { 4462 if (settings.auto) { 4463 clearInterval(interval); 4464 interval = setInterval(function () { 4465 $el.goToNextSlide(); 4466 }, settings.pause); 4467 } 4468 }, 4469 pauseOnHover: function(){ 4470 var $this = this; 4471 if (settings.auto && settings.pauseOnHover) { 4472 $slide.on('mouseenter', function(){ 4473 $(this).addClass('ls-hover'); 4474 $el.pause(); 4475 settings.auto = true; 4476 }); 4477 $slide.on('mouseleave',function(){ 4478 $(this).removeClass('ls-hover'); 4479 if (!$slide.find('.lightSlider').hasClass('lsGrabbing')) { 4480 $this.auto(); 4481 } 4482 }); 4483 } 4484 }, 4485 touchMove: function (endCoords, startCoords) { 4486 $slide.css('transition-duration', '0ms'); 4487 if (settings.mode === 'slide') { 4488 var distance = endCoords - startCoords; 4489 var swipeVal = slideValue - distance; 4490 if ((swipeVal) >= w - elSize - settings.slideMargin) { 4491 if (settings.freeMove === false) { 4492 swipeVal = w - elSize - settings.slideMargin; 4493 } else { 4494 var swipeValT = w - elSize - settings.slideMargin; 4495 swipeVal = swipeValT + ((swipeVal - swipeValT) / 5); 4496 4497 } 4498 } else if (swipeVal < 0) { 4499 if (settings.freeMove === false) { 4500 swipeVal = 0; 4501 } else { 4502 swipeVal = swipeVal / 5; 4503 } 4504 } 4505 this.move($el, swipeVal); 4506 } 4507 }, 4508 4509 touchEnd: function (distance) { 4510 $slide.css('transition-duration', settings.speed + 'ms'); 4511 if (settings.mode === 'slide') { 4512 var mxVal = false; 4513 var _next = true; 4514 slideValue = slideValue - distance; 4515 if ((slideValue) > w - elSize - settings.slideMargin) { 4516 slideValue = w - elSize - settings.slideMargin; 4517 if (settings.autoWidth === false) { 4518 mxVal = true; 4519 } 4520 } else if (slideValue < 0) { 4521 slideValue = 0; 4522 } 4523 var gC = function (next) { 4524 var ad = 0; 4525 if (!mxVal) { 4526 if (next) { 4527 ad = 1; 4528 } 4529 } 4530 if (!settings.autoWidth) { 4531 var num = slideValue / ((slideWidth + settings.slideMargin) * settings.slideMove); 4532 scene = parseInt(num) + ad; 4533 if (slideValue >= (w - elSize - settings.slideMargin)) { 4534 if (num % 1 !== 0) { 4535 scene++; 4536 } 4537 } 4538 } else { 4539 var tW = 0; 4540 for (var i = 0; i < $children.length; i++) { 4541 tW += (parseInt($children.eq(i).width()) + settings.slideMargin); 4542 scene = i + ad; 4543 if (tW >= slideValue) { 4544 break; 4545 } 4546 } 4547 } 4548 }; 4549 if (distance >= settings.swipeThreshold) { 4550 gC(false); 4551 _next = false; 4552 } else if (distance <= -settings.swipeThreshold) { 4553 gC(true); 4554 _next = false; 4555 } 4556 $el.mode(_next); 4557 this.slideThumb(); 4558 } else { 4559 if (distance >= settings.swipeThreshold) { 4560 $el.goToPrevSlide(); 4561 } else if (distance <= -settings.swipeThreshold) { 4562 $el.goToNextSlide(); 4563 } 4564 } 4565 }, 4566 4567 4568 4569 enableDrag: function () { 4570 var $this = this; 4571 if (!isTouch) { 4572 var startCoords = 0, 4573 endCoords = 0, 4574 isDraging = false; 4575 $slide.find('.lightSlider').addClass('lsGrab'); 4576 $slide.on('mousedown', function (e) { 4577 if (w < elSize) { 4578 if (w !== 0) { 4579 return false; 4580 } 4581 } 4582 if ($(e.target).attr('class') !== ('lSPrev') && $(e.target).attr('class') !== ('lSNext')) { 4583 startCoords = (settings.vertical === true) ? e.pageY : e.pageX; 4584 isDraging = true; 4585 if (e.preventDefault) { 4586 e.preventDefault(); 4587 } else { 4588 e.returnValue = false; 4589 } 4590 // ** Fix for webkit cursor issue https://code.google.com/p/chromium/issues/detail?id=26723 4591 $slide.scrollLeft += 1; 4592 $slide.scrollLeft -= 1; 4593 // * 4594 $slide.find('.lightSlider').removeClass('lsGrab').addClass('lsGrabbing'); 4595 clearInterval(interval); 4596 } 4597 }); 4598 $(window).on('mousemove', function (e) { 4599 if (isDraging) { 4600 endCoords = (settings.vertical === true) ? e.pageY : e.pageX; 4601 $this.touchMove(endCoords, startCoords); 4602 } 4603 }); 4604 $(window).on('mouseup', function (e) { 4605 if (isDraging) { 4606 $slide.find('.lightSlider').removeClass('lsGrabbing').addClass('lsGrab'); 4607 isDraging = false; 4608 endCoords = (settings.vertical === true) ? e.pageY : e.pageX; 4609 var distance = endCoords - startCoords; 4610 if (Math.abs(distance) >= settings.swipeThreshold) { 4611 $(window).on('click.ls', function (e) { 4612 if (e.preventDefault) { 4613 e.preventDefault(); 4614 } else { 4615 e.returnValue = false; 4616 } 4617 e.stopImmediatePropagation(); 4618 e.stopPropagation(); 4619 $(window).off('click.ls'); 4620 }); 4621 } 4622 4623 $this.touchEnd(distance); 4624 4625 } 4626 }); 4627 } 4628 }, 4629 4630 4631 4632 4633 enableTouch: function () { 4634 var $this = this; 4635 if (isTouch) { 4636 var startCoords = {}, 4637 endCoords = {}; 4638 $slide.on('touchstart', function (e) { 4639 endCoords = e.originalEvent.targetTouches[0]; 4640 startCoords.pageX = e.originalEvent.targetTouches[0].pageX; 4641 startCoords.pageY = e.originalEvent.targetTouches[0].pageY; 4642 clearInterval(interval); 4643 }); 4644 $slide.on('touchmove', function (e) { 4645 if (w < elSize) { 4646 if (w !== 0) { 4647 return false; 4648 } 4649 } 4650 var orig = e.originalEvent; 4651 endCoords = orig.targetTouches[0]; 4652 var xMovement = Math.abs(endCoords.pageX - startCoords.pageX); 4653 var yMovement = Math.abs(endCoords.pageY - startCoords.pageY); 4654 if (settings.vertical === true) { 4655 if ((yMovement * 3) > xMovement) { 4656 e.preventDefault(); 4657 } 4658 $this.touchMove(endCoords.pageY, startCoords.pageY); 4659 } else { 4660 if ((xMovement * 3) > yMovement) { 4661 e.preventDefault(); 4662 } 4663 $this.touchMove(endCoords.pageX, startCoords.pageX); 4664 } 4665 4666 }); 4667 $slide.on('touchend', function () { 4668 if (w < elSize) { 4669 if (w !== 0) { 4670 return false; 4671 } 4672 } 4673 var distance; 4674 if (settings.vertical === true) { 4675 distance = endCoords.pageY - startCoords.pageY; 4676 } else { 4677 distance = endCoords.pageX - startCoords.pageX; 4678 } 4679 $this.touchEnd(distance); 4680 }); 4681 } 4682 }, 4683 build: function () { 4684 var $this = this; 4685 $this.initialStyle(); 4686 if (this.doCss()) { 4687 4688 if (settings.enableTouch === true) { 4689 $this.enableTouch(); 4690 } 4691 if (settings.enableDrag === true) { 4692 $this.enableDrag(); 4693 } 4694 } 4695 4696 $(window).on('focus', function(){ 4697 $this.auto(); 4698 }); 4699 4700 $(window).on('blur', function(){ 4701 clearInterval(interval); 4702 }); 4703 4704 $this.pager(); 4705 $this.pauseOnHover(); 4706 $this.controls(); 4707 $this.keyPress(); 4708 } 4709 }; 4710 plugin.build(); 4711 refresh.init = function () { 4712 refresh.chbreakpoint(); 4713 if (settings.vertical === true) { 4714 if (settings.item > 1) { 4715 elSize = settings.verticalHeight; 4716 } else { 4717 elSize = $children.outerHeight(); 4718 } 4719 $slide.css('height', elSize + 'px'); 4720 } else { 4721 elSize = $slide.outerWidth(); 4722 } 4723 if (settings.loop === true && settings.mode === 'slide') { 4724 refresh.clone(); 4725 } 4726 refresh.calL(); 4727 if (settings.mode === 'slide') { 4728 $el.removeClass('lSSlide'); 4729 } 4730 if (settings.mode === 'slide') { 4731 refresh.calSW(); 4732 refresh.sSW(); 4733 } 4734 setTimeout(function () { 4735 if (settings.mode === 'slide') { 4736 $el.addClass('lSSlide'); 4737 } 4738 }, 1000); 4739 if (settings.pager) { 4740 refresh.createPager(); 4741 } 4742 if (settings.adaptiveHeight === true && settings.vertical === false) { 4743 $el.css('height', $children.eq(scene).outerHeight(true)); 4744 } 4745 if (settings.adaptiveHeight === false) { 4746 if (settings.mode === 'slide') { 4747 if (settings.vertical === false) { 4748 plugin.setHeight($el, false); 4749 }else{ 4750 plugin.auto(); 4751 } 4752 } else { 4753 plugin.setHeight($el, true); 4754 } 4755 } 4756 if (settings.gallery === true) { 4757 plugin.slideThumb(); 4758 } 4759 if (settings.mode === 'slide') { 4760 plugin.slide(); 4761 } 4762 if (settings.autoWidth === false) { 4763 if ($children.length <= settings.item) { 4764 $slide.find('.lSAction').hide(); 4765 } else { 4766 $slide.find('.lSAction').show(); 4767 } 4768 } else { 4769 if ((refresh.calWidth(false) < elSize) && (w !== 0)) { 4770 $slide.find('.lSAction').hide(); 4771 } else { 4772 $slide.find('.lSAction').show(); 4773 } 4774 } 4775 }; 4776 $el.goToPrevSlide = function () { 4777 if (scene > 0) { 4778 settings.onBeforePrevSlide.call(this, $el, scene); 4779 scene--; 4780 $el.mode(false); 4781 if (settings.gallery === true) { 4782 plugin.slideThumb(); 4783 } 4784 } else { 4785 if (settings.loop === true) { 4786 settings.onBeforePrevSlide.call(this, $el, scene); 4787 if (settings.mode === 'fade') { 4788 var l = (length - 1); 4789 scene = parseInt(l / settings.slideMove); 4790 } 4791 $el.mode(false); 4792 if (settings.gallery === true) { 4793 plugin.slideThumb(); 4794 } 4795 } else if (settings.slideEndAnimation === true) { 4796 $el.addClass('leftEnd'); 4797 setTimeout(function () { 4798 $el.removeClass('leftEnd'); 4799 }, 400); 4800 } 4801 } 4802 }; 4803 $el.goToNextSlide = function () { 4804 var nextI = true; 4805 if (settings.mode === 'slide') { 4806 var _slideValue = plugin.slideValue(); 4807 nextI = _slideValue < w - elSize - settings.slideMargin; 4808 } 4809 if (((scene * settings.slideMove) < length - settings.slideMove) && nextI) { 4810 settings.onBeforeNextSlide.call(this, $el, scene); 4811 scene++; 4812 $el.mode(false); 4813 if (settings.gallery === true) { 4814 plugin.slideThumb(); 4815 } 4816 } else { 4817 if (settings.loop === true) { 4818 settings.onBeforeNextSlide.call(this, $el, scene); 4819 scene = 0; 4820 $el.mode(false); 4821 if (settings.gallery === true) { 4822 plugin.slideThumb(); 4823 } 4824 } else if (settings.slideEndAnimation === true) { 4825 $el.addClass('rightEnd'); 4826 setTimeout(function () { 4827 $el.removeClass('rightEnd'); 4828 }, 400); 4829 } 4830 } 4831 }; 4832 $el.mode = function (_touch) { 4833 if (settings.adaptiveHeight === true && settings.vertical === false) { 4834 $el.css('height', $children.eq(scene).outerHeight(true)); 4835 } 4836 if (on === false) { 4837 if (settings.mode === 'slide') { 4838 if (plugin.doCss()) { 4839 $el.addClass('lSSlide'); 4840 if (settings.speed !== '') { 4841 $slide.css('transition-duration', settings.speed + 'ms'); 4842 } 4843 if (settings.cssEasing !== '') { 4844 $slide.css('transition-timing-function', settings.cssEasing); 4845 } 4846 } 4847 } else { 4848 if (plugin.doCss()) { 4849 if (settings.speed !== '') { 4850 $el.css('transition-duration', settings.speed + 'ms'); 4851 } 4852 if (settings.cssEasing !== '') { 4853 $el.css('transition-timing-function', settings.cssEasing); 4854 } 4855 } 4856 } 4857 } 4858 if (!_touch) { 4859 settings.onBeforeSlide.call(this, $el, scene); 4860 } 4861 if (settings.mode === 'slide') { 4862 plugin.slide(); 4863 } else { 4864 plugin.fade(); 4865 } 4866 if (!$slide.hasClass('ls-hover')) { 4867 plugin.auto(); 4868 } 4869 setTimeout(function () { 4870 if (!_touch) { 4871 settings.onAfterSlide.call(this, $el, scene); 4872 } 4873 }, settings.speed); 4874 on = true; 4875 }; 4876 $el.play = function () { 4877 $el.goToNextSlide(); 4878 settings.auto = true; 4879 plugin.auto(); 4880 }; 4881 $el.pause = function () { 4882 settings.auto = false; 4883 clearInterval(interval); 4884 }; 4885 $el.refresh = function () { 4886 refresh.init(); 4887 }; 4888 $el.getCurrentSlideCount = function () { 4889 var sc = scene; 4890 if (settings.loop) { 4891 var ln = $slide.find('.lslide').length, 4892 cl = $el.find('.clone.left').length; 4893 if (scene <= cl - 1) { 4894 sc = ln + (scene - cl); 4895 } else if (scene >= (ln + cl)) { 4896 sc = scene - ln - cl; 4897 } else { 4898 sc = scene - cl; 4899 } 4900 } 4901 return sc + 1; 4902 }; 4903 $el.getTotalSlideCount = function () { 4904 return $slide.find('.lslide').length; 4905 }; 4906 $el.goToSlide = function (s) { 4907 if (settings.loop) { 4908 scene = (s + $el.find('.clone.left').length - 1); 4909 } else { 4910 scene = s; 4911 } 4912 $el.mode(false); 4913 if (settings.gallery === true) { 4914 plugin.slideThumb(); 4915 } 4916 }; 4917 $el.destroy = function () { 4918 if ($el.lightSlider) { 4919 $el.goToPrevSlide = function(){}; 4920 $el.goToNextSlide = function(){}; 4921 $el.mode = function(){}; 4922 $el.play = function(){}; 4923 $el.pause = function(){}; 4924 $el.refresh = function(){}; 4925 $el.getCurrentSlideCount = function(){}; 4926 $el.getTotalSlideCount = function(){}; 4927 $el.goToSlide = function(){}; 4928 $el.lightSlider = null; 4929 refresh = { 4930 init : function(){} 4931 }; 4932 $el.parent().parent().find('.lSAction, .lSPager').remove(); 4933 $el.removeClass('lightSlider lSFade lSSlide lsGrab lsGrabbing leftEnd right').removeAttr('style').unwrap().unwrap(); 4934 $el.children().removeAttr('style'); 4935 $children.removeClass('lslide active'); 4936 $el.find('.clone').remove(); 4937 $children = null; 4938 interval = null; 4939 on = false; 4940 scene = 0; 4941 } 4942 4943 }; 4944 setTimeout(function () { 4945 settings.onSliderLoad.call(this, $el); 4946 }, 10); 4947 $(window).on('resize orientationchange', function (e) { 4948 setTimeout(function () { 4949 if (e.preventDefault) { 4950 e.preventDefault(); 4951 } else { 4952 e.returnValue = false; 4953 } 4954 refresh.init(); 4955 }, 200); 4956 }); 4957 return this; 4958 }; 4959}(jQuery));
vendor: 3,144 bytes, lines 4960-4961
4960 4961!function(t,e){"use strict";function r(r,a,i,u,l){function f(){L=t.devicePixelRatio>1,i=c(i),a.delay>=0&&setTimeout(function(){s(!0)},a.delay),(a.delay<0||a.combined)&&(u.e=v(a.throttle,function(t){"resize"===t.type&&(w=B=-1),s(t.all)}),u.a=function(t){t=c(t),i.push.apply(i,t)},u.g=function(){return i=n(i).filter(function(){return!n(this).data(a.loadedName)})},u.f=function(t){for(var e=0;e<t.length;e++){var r=i.filter(function(){return this===t[e]});r.length&&s(!1,r)}},s(),n(a.appendScroll).on("scroll."+l+" resize."+l,u.e))}function c(t){var i=a.defaultImage,o=a.placeholder,u=a.imageBase,l=a.srcsetAttribute,f=a.loaderAttribute,c=a._f||{};t=n(t).filter(function(){var t=n(this),r=m(this);return!t.data(a.handledName)&&(t.attr(a.attribute)||t.attr(l)||t.attr(f)||c[r]!==e)}).data("plugin_"+a.name,r);for(var s=0,d=t.length;s<d;s++){var A=n(t[s]),g=m(t[s]),h=A.attr(a.imageBaseAttribute)||u;g===N&&h&&A.attr(l)&&A.attr(l,b(A.attr(l),h)),c[g]===e||A.attr(f)||A.attr(f,c[g]),g===N&&i&&!A.attr(E)?A.attr(E,i):g===N||!o||A.css(O)&&"none"!==A.css(O)||A.css(O,"url('"+o+"')")}return t}function s(t,e){if(!i.length)return void(a.autoDestroy&&r.destroy());for(var o=e||i,u=!1,l=a.imageBase||"",f=a.srcsetAttribute,c=a.handledName,s=0;s<o.length;s++)if(t||e||A(o[s])){var g=n(o[s]),h=m(o[s]),b=g.attr(a.attribute),v=g.attr(a.imageBaseAttribute)||l,p=g.attr(a.loaderAttribute);g.data(c)||a.visibleOnly&&!g.is(":visible")||!((b||g.attr(f))&&(h===N&&(v+b!==g.attr(E)||g.attr(f)!==g.attr(F))||h!==N&&v+b!==g.css(O))||p)||(u=!0,g.data(c,!0),d(g,h,v,p))}u&&(i=n(i).filter(function(){return!n(this).data(c)}))}function d(t,e,r,i){++z;var o=function(){y("onError",t),p(),o=n.noop};y("beforeLoad",t);var u=a.attribute,l=a.srcsetAttribute,f=a.sizesAttribute,c=a.retinaAttribute,s=a.removeAttribute,d=a.loadedName,A=t.attr(c);if(i){var g=function(){s&&t.removeAttr(a.loaderAttribute),t.data(d,!0),y(T,t),setTimeout(p,1),g=n.noop};t.off(I).one(I,o).one(D,g),y(i,t,function(e){e?(t.off(D),g()):(t.off(I),o())})||t.trigger(I)}else{var h=n(new Image);h.one(I,o).one(D,function(){t.hide(),e===N?t.attr(C,h.attr(C)).attr(F,h.attr(F)).attr(E,h.attr(E)):t.css(O,"url('"+h.attr(E)+"')"),t[a.effect](a.effectTime),s&&(t.removeAttr(u+" "+l+" "+c+" "+a.imageBaseAttribute),f!==C&&t.removeAttr(f)),t.data(d,!0),y(T,t),h.remove(),p()});var m=(L&&A?A:t.attr(u))||"";h.attr(C,t.attr(f)).attr(F,t.attr(l)).attr(E,m?r+m:null),h.complete&&h.trigger(D)}}function A(t){var e=t.getBoundingClientRect(),r=a.scrollDirection,n=a.threshold,i=h()+n>e.top&&-n<e.bottom,o=g()+n>e.left&&-n<e.right;return"vertical"===r?i:"horizontal"===r?o:i&&o}function g(){return w>=0?w:w=n(t).width()}function h(){return B>=0?B:B=n(t).height()}function m(t){return t.tagName.toLowerCase()}function b(t,e){if(e){var r=t.split(",");t="";for(var a=0,n=r.length;a<n;a++)t+=e+r[a].trim()+(a!==n-1?",":"")}return t}function v(t,e){var n,i=0;return function(o,u){function l(){i=+new Date,e.call(r,o)}var f=+new Date-i;n&&clearTimeout(n),f>t||!a.enableThrottle||u?l():n=setTimeout(l,t-f)}}function p(){--z,i.length||z||y("onFinishedAll")}function y(t,e,n){return!!(t=a[t])&&(t.apply(r,[].slice.call(arguments,1
4961)),!0)}var z=0,w=-1,B=-1,L=!1,T="afterLoad",D="load",I="error",N="img",E="src",F="srcset",C="sizes",O="background-image";"event"===a.bind||o?f():n(t).on(D+"."+l,f)}function a(a,o){var u=this,l=n.extend({},u.config,o),f={},c=l.name+"-"+ ++i;return u.config=function(t,r){return r===e?l[t]:(l[t]=r,u)},u.addItems=function(t){return f.a&&f.a("string"===n.type(t)?n(t):t),u},u.getItems=function(){return f.g?f.g():{}},u.update=function(t){return f.e&&f.e({},!t),u},u.force=function(t){return f.f&&f.f("string"===n.type(t)?n(t):t),u},u.loadAll=function(){return f.e&&f.e({all:!0},!0),u},u.destroy=function(){return n(l.appendScroll).off("."+c,f.e),n(t).off("."+c),f={},e},r(u,l,a,f,c),l.chainable?a:u}var n=t.jQuery||t.Zepto,i=0,o=!1;n.fn.Lazy=n.fn.lazy=function(t){return new a(this,t)},n.Lazy=n.lazy=function(t,r,i){if(n.isFunction(r)&&(i=r,r=[]),n.isFunction(i)){t=n.isArray(t)?t:[t],r=n.isArray(r)?r:[r];for(var o=a.prototype.config,u=o._f||(o._f={}),l=0,f=t.length;l<f;l++)(o[t[l]]===e||n.isFunction(o[t[l]]))&&(o[t[l]]=i);for(var c=0,s=r.length;c<s;c++)u[r[c]]=t[0]}},a.prototype.config={name:"lazy",chainable:!0,autoDestroy:!0,bind:"load",threshold:500,visibleOnly:!1,appendScroll:t,scrollDirection:"both",imageBase:null,defaultImage:"data:image/gif;base64,R0lGODlhAQABAIAAAP///wAAACH5BAEAAAAALAAAAAABAAEAAAICRAEAOw==",placeholder:null,delay:-1,combined:!1,attribute:"data-src",srcsetAttribute:"data-srcset",sizesAttribute:"data-sizes",retinaAttribute:"data-retina",loaderAttribute:"data-loader",imageBaseAttribute:"data-imagebase",removeAttribute:!0,handledName:"handled",loadedName:"loaded",effect:"show",effectTime:0,enableThrottle:!0,throttle:250,beforeLoad:e,afterLoad:e,onError:e,onFinishedAll:e},n(t).on("load",function(){o=!0})}(window); 4962;(function (factory) { 4963if (typeof define === 'function' && define.amd) { 4964 // AMD. Register as an anonymous module. 4965 define(['jquery'], factory); 4966 } else if (typeof exports === 'object') { 4967 // Node/CommonJS 4968 factory(require('jquery')); 4969 } else { 4970 // Browser globals 4971 factory(window.jQuery || window.Zepto); 4972 } 4973 }(function($) { 4974 4975 4976 4977 4978 4979 4980var CLOSE_EVENT = 'Close', 4981 BEFORE_CLOSE_EVENT = 'BeforeClose', 4982 AFTER_CLOSE_EVENT = 'AfterClose', 4983 BEFORE_APPEND_EVENT = 'BeforeAppend', 4984 MARKUP_PARSE_EVENT = 'MarkupParse', 4985 OPEN_EVENT = 'Open', 4986 CHANGE_EVENT = 'Change', 4987 NS = 'mfp', 4988 EVENT_NS = '.' + NS, 4989 READY_CLASS = 'mfp-ready', 4990 REMOVING_CLASS = 'mfp-removing', 4991 PREVENT_CLOSE_CLASS = 'mfp-prevent-close'; 4992 4993 4994 4995 4996var mfp, // As we have only one instance of MagnificPopup object, we define it locally to not to use 'this' 4997 MagnificPopup = function(){}, 4998 _isJQ = !!(window.jQuery), 4999 _prevStatus, 5000 _window = $(window), 5001 _document, 5002 _prevContentType, 5003 _wrapClasses, 5004 _currPopupType; 5005 5006 5007 5008var _mfpOn = function(name, f) { 5009 mfp.ev.on(NS + name + EVENT_NS, f); 5010 }, 5011 _getEl = function(className, appendTo, html, raw) { 5012 var el = document.createElement('div'); 5013 el.className = 'mfp-'+className; 5014 if(html) { 5015 el.innerHTML = html; 5016 } 5017 if(!raw) { 5018 el = $(el); 5019 if(appendTo) { 5020 el.appendTo(appendTo); 5021 } 5022 } else if(appendTo) { 5023 appendTo.appendChild(el); 5024 } 5025 return el; 5026 }, 5027 _mfpTrigger = function(e, data) { 5028 mfp.ev.triggerHandler(NS + e, data); 5029 5030 if(mfp.st.callbacks) { 5031 // converts "mfpEventName" to "eventName" callback and triggers it if it's present 5032 e = e.charAt(0).toLowerCase() + e.slice(1); 5033 if(mfp.st.callbacks[e]) { 5034 mfp.st.callbacks[e].apply(mfp, Array.isArray(data) ? data : [data]); 5035 } 5036 } 5037 }, 5038 _getCloseBtn = function(type) { 5039 if(type !== _currPopupType || !mfp.currTemplate.closeBtn) { 5040 mfp.currTemplate.closeBtn = $( mfp.st.closeMarkup.replace('%title%', mfp.st.tClose ) ); 5041 _currPopupType = type; 5042 } 5043 return mfp.currTemplate.closeBtn; 5044 }, 5045 // Initialize Magnific Popup only when called at least once 5046 _checkInstance = function() { 5047 if(!$.magnificPopup.instance) { 5048 5049 mfp = new MagnificPopup(); 5050 mfp.init(); 5051 $.magnificPopup.instance = mfp; 5052 } 5053 }, 5054 // CSS transition detection, http://stackoverflow.com/questions/7264899/detect-css-transitions-using-javascript-and-without-modernizr 5055 supportsTransitions = function() { 5056 var s = document.createElement('p').style, // 's' for style. better to create an element if body yet to exist 5057 v = ['ms','O','Moz','Webkit']; // 'v' for vendor 5058 5059 if( s['transition'] !== undefined ) { 5060 return true; 5061 } 5062 5063 while( v.length ) { 5064 if( v.pop() + 'Transition' in s ) { 5065 return true; 5066 } 5067 } 5068 5069 return false;
vendor: 38,888 bytes, lines 5070-6827
5070 }; 5071 5072 5073 5074 5075MagnificPopup.prototype = { 5076 5077 constructor: MagnificPopup, 5078 5079 5080 init: function() { 5081 var appVersion = navigator.appVersion; 5082 mfp.isLowIE = mfp.isIE8 = document.all && !document.addEventListener; 5083 mfp.isAndroid = (/android/gi).test(appVersion); 5084 mfp.isIOS = (/iphone|ipad|ipod/gi).test(appVersion); 5085 mfp.supportsTransition = supportsTransitions(); 5086 5087 // We disable fixed positioned lightbox on devices that don't handle it nicely. 5088 // If you know a better way of detecting this - let me know. 5089 mfp.probablyMobile = (mfp.isAndroid || mfp.isIOS || /(Opera Mini)|Kindle|webOS|BlackBerry|(Opera Mobi)|(Windows Phone)|IEMobile/i.test(navigator.userAgent) ); 5090 _document = $(document); 5091 5092 mfp.popupsCache = {}; 5093 }, 5094 5095 5096 open: function(data) { 5097 5098 var i; 5099 5100 if(data.isObj === false) { 5101 // convert jQuery collection to array to avoid conflicts later 5102 mfp.items = data.items.toArray(); 5103 5104 mfp.index = 0; 5105 var items = data.items, 5106 item; 5107 for(i = 0; i < items.length; i++) { 5108 item = items[i]; 5109 if(item.parsed) { 5110 item = item.el[0]; 5111 } 5112 if(item === data.el[0]) { 5113 mfp.index = i; 5114 break; 5115 } 5116 } 5117 } else { 5118 mfp.items = Array.isArray(data.items) ? data.items : [data.items]; 5119 mfp.index = data.index || 0; 5120 } 5121 5122 // if popup is already opened - we just update the content 5123 if(mfp.isOpen) { 5124 mfp.updateItemHTML(); 5125 return; 5126 } 5127 5128 mfp.types = []; 5129 _wrapClasses = ''; 5130 if(data.mainEl && data.mainEl.length) { 5131 mfp.ev = data.mainEl.eq(0); 5132 } else { 5133 mfp.ev = _document; 5134 } 5135 5136 if(data.key) { 5137 if(!mfp.popupsCache[data.key]) { 5138 mfp.popupsCache[data.key] = {}; 5139 } 5140 mfp.currTemplate = mfp.popupsCache[data.key]; 5141 } else { 5142 mfp.currTemplate = {}; 5143 } 5144 5145 5146 5147 mfp.st = $.extend(true, {}, $.magnificPopup.defaults, data ); 5148 mfp.fixedContentPos = mfp.st.fixedContentPos === 'auto' ? !mfp.probablyMobile : mfp.st.fixedContentPos; 5149 5150 if(mfp.st.modal) { 5151 mfp.st.closeOnContentClick = false; 5152 mfp.st.closeOnBgClick = false; 5153 mfp.st.showCloseBtn = false; 5154 mfp.st.enableEscapeKey = false; 5155 } 5156 5157 5158 // Building markup 5159 // main containers are created only once 5160 if(!mfp.bgOverlay) { 5161 5162 // Dark overlay 5163 mfp.bgOverlay = _getEl('bg').on('click'+EVENT_NS, function() { 5164 mfp.close(); 5165 }); 5166 5167 mfp.wrap = _getEl('wrap').attr('tabindex', -1).on('click'+EVENT_NS, function(e) { 5168 if(mfp._checkIfClose(e.target)) { 5169 mfp.close(); 5170 } 5171 }); 5172 5173 mfp.container = _getEl('container', mfp.wrap); 5174 } 5175 5176 mfp.contentContainer = _getEl('content'); 5177 if(mfp.st.preloader) { 5178 mfp.preloader = _getEl('preloader', mfp.container, mfp.st.tLoading); 5179 } 5180 5181 5182 // Initializing modules 5183 var modules = $.magnificPopup.modules; 5184 for(i = 0; i < modules.length; i++) { 5185 var n = modules[i]; 5186 n = n.charAt(0).toUpperCase() + n.slice(1); 5187 mfp['init'+n].call(mfp); 5188 } 5189 _mfpTrigger('BeforeOpen'); 5190 5191 5192 if(mfp.st.showCloseBtn) { 5193 // Close button 5194 if(!mfp.st.closeBtnInside) { 5195 mfp.wrap.append( _getCloseBtn() ); 5196 } else { 5197 _mfpOn(MARKUP_PARSE_EVENT, function(e, template, values, item) { 5198 values.close_replaceWith = _getCloseBtn(item.type); 5199 }); 5200 _wrapClasses += ' mfp-close-btn-in'; 5201 } 5202 } 5203 5204 if(mfp.st.alignTop) { 5205 _wrapClasses += ' mfp-align-top'; 5206 } 5207 5208 5209 5210 if(mfp.fixedContentPos) { 5211 mfp.wrap.css({ 5212 overflow: mfp.st.overflowY, 5213 overflowX: 'hidden', 5214 overflowY: mfp.st.overflowY 5215 }); 5216 } else { 5217 mfp.wrap.css({ 5218 top: _window.scrollTop(), 5219 position: 'absolute' 5220 }); 5221 } 5222 if( mfp.st.fixedBgPos === false || (mfp.st.fixedBgPos === 'auto' && !mfp.fixedContentPos) ) { 5223 mfp.bgOverlay.css({ 5224 height: _document.height(), 5225 position: 'absolute' 5226 }); 5227 } 5228 5229 5230 5231 if(mfp.st.enableEscapeKey) { 5232 // Close on ESC key 5233 _document.on('keyup' + EVENT_NS, function(e) { 5234 if(e.keyCode === 27) { 5235 mfp.close(); 5236 } 5237 }); 5238 } 5239 5240 _window.on('resize' + EVENT_NS, function() { 5241 mfp.updateSize(); 5242 }); 5243 5244 5245 if(!mfp.st.closeOnContentClick) { 5246 _wrapClasses += ' mfp-auto-cursor'; 5247 } 5248 5249 if(_wrapClasses) 5250 mfp.wrap.addClass(_wrapClasses); 5251 5252 5253 // this triggers recalculation of layout, so we get it once to not to trigger twice 5254 var windowHeight = mfp.wH = _window.height(); 5255 5256 5257 var windowStyles = {}; 5258 5259 if( mfp.fixedContentPos ) { 5260 if(mfp._hasScrollBar(windowHeight)){ 5261 var s = mfp._getScrollbarSize(); 5262 if(s) { 5263 windowStyles.marginRight = s; 5264 } 5265 } 5266 } 5267 5268 if(mfp.fixedContentPos) { 5269 if(!mfp.isIE7) { 5270 windowStyles.overflow = 'hidden'; 5271 } else { 5272 // ie7 double-scroll bug 5273 $('body, html').css('overflow', 'hidden'); 5274 } 5275 } 5276 5277 5278 5279 var classesToadd = mfp.st.mainClass; 5280 if(mfp.isIE7) { 5281 classesToadd += ' mfp-ie7'; 5282 } 5283 if(classesToadd) { 5284 mfp._addClassToMFP( classesToadd ); 5285 } 5286 5287 // add content 5288 mfp.updateItemHTML(); 5289 5290 _mfpTrigger('BuildControls'); 5291 5292 // remove scrollbar, add margin e.t.c 5293 $('html').css(windowStyles); 5294 5295 // add everything to DOM 5296 mfp.bgOverlay.add(mfp.wrap).prependTo( mfp.st.prependTo || $(document.body) ); 5297 5298 // Save last focused element 5299 mfp._lastFocusedEl = document.activeElement; 5300 5301 // Wait for next cycle to allow CSS transition 5302 setTimeout(function() { 5303 5304 if(mfp.content) { 5305 mfp._addClassToMFP(READY_CLASS); 5306 mfp._setFocus(); 5307 } else { 5308 // if content is not defined (not loaded e.t.c) we add class only for BG 5309 mfp.bgOverlay.addClass(READY_CLASS); 5310 } 5311 5312 // Trap the focus in popup 5313 _document.on('focusin' + EVENT_NS, mfp._onFocusIn); 5314 5315 }, 16); 5316 5317 mfp.isOpen = true; 5318 mfp.updateSize(windowHeight); 5319 _mfpTrigger(OPEN_EVENT); 5320 5321 return data; 5322 }, 5323 5324 5325 close: function() { 5326 if(!mfp.isOpen) return; 5327 _mfpTrigger(BEFORE_CLOSE_EVENT); 5328 5329 mfp.isOpen = false; 5330 // for CSS3 animation 5331 if(mfp.st.removalDelay && !mfp.isLowIE && mfp.supportsTransition ) { 5332 mfp._addClassToMFP(REMOVING_CLASS); 5333 setTimeout(function() { 5334 mfp._close(); 5335 }, mfp.st.removalDelay); 5336 } else { 5337 mfp._close(); 5338 } 5339 }, 5340 5341 5342 _close: function() { 5343 _mfpTrigger(CLOSE_EVENT); 5344 5345 var classesToRemove = REMOVING_CLASS + ' ' + READY_CLASS + ' '; 5346 5347 mfp.bgOverlay.detach(); 5348 mfp.wrap.detach(); 5349 mfp.container.empty(); 5350 5351 if(mfp.st.mainClass) { 5352 classesToRemove += mfp.st.mainClass + ' '; 5353 } 5354 5355 mfp._removeClassFromMFP(classesToRemove); 5356 5357 if(mfp.fixedContentPos) { 5358 var windowStyles = {marginRight: ''}; 5359 if(mfp.isIE7) { 5360 $('body, html').css('overflow', ''); 5361 } else { 5362 windowStyles.overflow = ''; 5363 } 5364 $('html').css(windowStyles); 5365 } 5366 5367 _document.off('keyup' + EVENT_NS + ' focusin' + EVENT_NS); 5368 mfp.ev.off(EVENT_NS); 5369 5370 // clean up DOM elements that aren't removed 5371 mfp.wrap.attr('class', 'mfp-wrap').removeAttr('style'); 5372 mfp.bgOverlay.attr('class', 'mfp-bg'); 5373 mfp.container.attr('class', 'mfp-container'); 5374 5375 // remove close button from target element 5376 if(mfp.st.showCloseBtn && 5377 (!mfp.st.closeBtnInside || mfp.currTemplate[mfp.currItem.type] === true)) { 5378 if(mfp.currTemplate.closeBtn) 5379 mfp.currTemplate.closeBtn.detach(); 5380 } 5381 5382 5383 if(mfp.st.autoFocusLast && mfp._lastFocusedEl) { 5384 $(mfp._lastFocusedEl).trigger('focus'); // put tab focus back 5385 } 5386 mfp.currItem = null; 5387 mfp.content = null; 5388 mfp.currTemplate = null; 5389 mfp.prevHeight = 0; 5390 5391 _mfpTrigger(AFTER_CLOSE_EVENT); 5392 }, 5393 5394 updateSize: function(winHeight) { 5395 5396 if(mfp.isIOS) { 5397 // fixes iOS nav bars https://github.com/dimsemenov/Magnific-Popup/issues/2 5398 var zoomLevel = document.documentElement.clientWidth / window.innerWidth; 5399 var height = window.innerHeight * zoomLevel; 5400 mfp.wrap.css('height', height); 5401 mfp.wH = height; 5402 } else { 5403 mfp.wH = winHeight || _window.height(); 5404 } 5405 // Fixes #84: popup incorrectly positioned with position:relative on body 5406 if(!mfp.fixedContentPos) { 5407 mfp.wrap.css('height', mfp.wH); 5408 } 5409 5410 _mfpTrigger('Resize'); 5411 5412 }, 5413 5414 5415 updateItemHTML: function() { 5416 var item = mfp.items[mfp.index]; 5417 5418 // Detach and perform modifications 5419 mfp.contentContainer.detach(); 5420 5421 if(mfp.content) 5422 mfp.content.detach(); 5423 5424 if(!item.parsed) { 5425 item = mfp.parseEl( mfp.index ); 5426 } 5427 5428 var type = item.type; 5429 5430 _mfpTrigger('BeforeChange', [mfp.currItem ? mfp.currItem.type : '', type]); 5431 // BeforeChange event works like so: 5432 // _mfpOn('BeforeChange', function(e, prevType, newType) { }); 5433 5434 mfp.currItem = item; 5435 5436 if(!mfp.currTemplate[type]) { 5437 var markup = mfp.st[type] ? mfp.st[type].markup : false; 5438 5439 // allows to modify markup 5440 _mfpTrigger('FirstMarkupParse', markup); 5441 5442 if(markup) { 5443 mfp.currTemplate[type] = $(markup); 5444 } else { 5445 // if there is no markup found we just define that template is parsed 5446 mfp.currTemplate[type] = true; 5447 } 5448 } 5449 5450 if(_prevContentType && _prevContentType !== item.type) { 5451 mfp.container.removeClass('mfp-'+_prevContentType+'-holder'); 5452 } 5453 5454 var newContent = mfp['get' + type.charAt(0).toUpperCase() + type.slice(1)](item, mfp.currTemplate[type]); 5455 mfp.appendContent(newContent, type); 5456 5457 item.preloaded = true; 5458 5459 _mfpTrigger(CHANGE_EVENT, item); 5460 _prevContentType = item.type; 5461 5462 // Append container back after its content changed 5463 mfp.container.prepend(mfp.contentContainer); 5464 5465 _mfpTrigger('AfterChange'); 5466 }, 5467 5468 5469 5470 appendContent: function(newContent, type) { 5471 mfp.content = newContent; 5472 5473 if(newContent) { 5474 if(mfp.st.showCloseBtn && mfp.st.closeBtnInside && 5475 mfp.currTemplate[type] === true) { 5476 // if there is no markup, we just append close button element inside 5477 if(!mfp.content.find('.mfp-close').length) { 5478 mfp.content.append(_getCloseBtn()); 5479 } 5480 } else { 5481 mfp.content = newContent; 5482 } 5483 } else { 5484 mfp.content = ''; 5485 } 5486 5487 _mfpTrigger(BEFORE_APPEND_EVENT); 5488 mfp.container.addClass('mfp-'+type+'-holder'); 5489 5490 mfp.contentContainer.append(mfp.content); 5491 }, 5492 5493 5494 5495 parseEl: function(index) { 5496 var item = mfp.items[index], 5497 type; 5498 5499 if(item.tagName) { 5500 item = { el: $(item) }; 5501 } else { 5502 type = item.type; 5503 item = { data: item, src: item.src }; 5504 } 5505 5506 if(item.el) { 5507 var types = mfp.types; 5508 5509 // check for 'mfp-TYPE' class 5510 for(var i = 0; i < types.length; i++) { 5511 if( item.el.hasClass('mfp-'+types[i]) ) { 5512 type = types[i]; 5513 break; 5514 } 5515 } 5516 5517 item.src = item.el.attr('data-mfp-src'); 5518 if(!item.src) { 5519 item.src = item.el.attr('href'); 5520 } 5521 } 5522 5523 item.type = type || mfp.st.type || 'inline'; 5524 item.index = index; 5525 item.parsed = true; 5526 mfp.items[index] = item; 5527 _mfpTrigger('ElementParse', item); 5528 5529 return mfp.items[index]; 5530 }, 5531 5532 5533 5534 addGroup: function(el, options) { 5535 var eHandler = function(e) { 5536 e.mfpEl = this; 5537 mfp._openClick(e, el, options); 5538 }; 5539 5540 if(!options) { 5541 options = {}; 5542 } 5543 5544 var eName = 'click.magnificPopup'; 5545 options.mainEl = el; 5546 5547 if(options.items) { 5548 options.isObj = true; 5549 el.off(eName).on(eName, eHandler); 5550 } else { 5551 options.isObj = false; 5552 if(options.delegate) { 5553 el.off(eName).on(eName, options.delegate , eHandler); 5554 } else { 5555 options.items = el; 5556 el.off(eName).on(eName, eHandler); 5557 } 5558 } 5559 }, 5560 _openClick: function(e, el, options) { 5561 var midClick = options.midClick !== undefined ? options.midClick : $.magnificPopup.defaults.midClick; 5562 5563 5564 if(!midClick && ( e.which === 2 || e.ctrlKey || e.metaKey || e.altKey || e.shiftKey ) ) { 5565 return; 5566 } 5567 5568 var disableOn = options.disableOn !== undefined ? options.disableOn : $.magnificPopup.defaults.disableOn; 5569 5570 if(disableOn) { 5571 if(typeof disableOn === "function") { 5572 if( !disableOn.call(mfp) ) { 5573 return true; 5574 } 5575 } else { // else it's number 5576 if( _window.width() < disableOn ) { 5577 return true; 5578 } 5579 } 5580 } 5581 5582 if(e.type) { 5583 e.preventDefault(); 5584 5585 // This will prevent popup from closing if element is inside and popup is already opened 5586 if(mfp.isOpen) { 5587 e.stopPropagation(); 5588 } 5589 } 5590 5591 options.el = $(e.mfpEl); 5592 if(options.delegate) { 5593 options.items = el.find(options.delegate); 5594 } 5595 mfp.open(options); 5596 }, 5597 5598 5599 5600 updateStatus: function(status, text) { 5601 5602 if(mfp.preloader) { 5603 if(_prevStatus !== status) { 5604 mfp.container.removeClass('mfp-s-'+_prevStatus); 5605 } 5606 5607 if(!text && status === 'loading') { 5608 text = mfp.st.tLoading; 5609 } 5610 5611 var data = { 5612 status: status, 5613 text: text 5614 }; 5615 // allows to modify status 5616 _mfpTrigger('UpdateStatus', data); 5617 5618 status = data.status; 5619 text = data.text; 5620 5621 if (mfp.st.allowHTMLInStatusIndicator) { 5622 mfp.preloader.html(text); 5623 } else { 5624 mfp.preloader.text(text); 5625 } 5626 5627 mfp.preloader.find('a').on('click', function(e) { 5628 e.stopImmediatePropagation(); 5629 }); 5630 5631 mfp.container.addClass('mfp-s-'+status); 5632 _prevStatus = status; 5633 } 5634 }, 5635 5636 5637 5638 // Check to close popup or not 5639 // "target" is an element that was clicked 5640 _checkIfClose: function(target) { 5641 5642 if($(target).closest('.' + PREVENT_CLOSE_CLASS).length) { 5643 return; 5644 } 5645 5646 var closeOnContent = mfp.st.closeOnContentClick; 5647 var closeOnBg = mfp.st.closeOnBgClick; 5648 5649 if(closeOnContent && closeOnBg) { 5650 return true; 5651 } else { 5652 5653 // We close the popup if click is on close button or on preloader. Or if there is no content. 5654 if(!mfp.content || $(target).closest('.mfp-close').length || (mfp.preloader && target === mfp.preloader[0]) ) { 5655 return true; 5656 } 5657 5658 // if click is outside the content 5659 if( (target !== mfp.content[0] && !$.contains(mfp.content[0], target)) ) { 5660 if(closeOnBg) { 5661 // last check, if the clicked element is in DOM, (in case it's removed onclick) 5662 if( $.contains(document, target) ) { 5663 return true; 5664 } 5665 } 5666 } else if(closeOnContent) { 5667 return true; 5668 } 5669 5670 } 5671 return false; 5672 }, 5673 _addClassToMFP: function(cName) { 5674 mfp.bgOverlay.addClass(cName); 5675 mfp.wrap.addClass(cName); 5676 }, 5677 _removeClassFromMFP: function(cName) { 5678 this.bgOverlay.removeClass(cName); 5679 mfp.wrap.removeClass(cName); 5680 }, 5681 _hasScrollBar: function(winHeight) { 5682 return ( (mfp.isIE7 ? _document.height() : document.body.scrollHeight) > (winHeight || _window.height()) ); 5683 }, 5684 _setFocus: function() { 5685 (mfp.st.focus ? mfp.content.find(mfp.st.focus).eq(0) : mfp.wrap).trigger('focus'); 5686 }, 5687 _onFocusIn: function(e) { 5688 if( e.target !== mfp.wrap[0] && !$.contains(mfp.wrap[0], e.target) ) { 5689 mfp._setFocus(); 5690 return false; 5691 } 5692 }, 5693 _parseMarkup: function(template, values, item) { 5694 var arr; 5695 if(item.data) { 5696 values = $.extend(item.data, values); 5697 } 5698 _mfpTrigger(MARKUP_PARSE_EVENT, [template, values, item] ); 5699 5700 $.each(values, function(key, value) { 5701 if(value === undefined || value === false) { 5702 return true; 5703 } 5704 arr = key.split('_'); 5705 if(arr.length > 1) { 5706 var el = template.find(EVENT_NS + '-'+arr[0]); 5707 5708 if(el.length > 0) { 5709 var attr = arr[1]; 5710 if(attr === 'replaceWith') { 5711 if(el[0] !== value[0]) { 5712 el.replaceWith(value); 5713 } 5714 } else if(attr === 'img') { 5715 if(el.is('img')) { 5716 el.attr('src', value); 5717 } else { 5718 el.replaceWith( $('<img>').attr('src', value).attr('class', el.attr('class')) ); 5719 } 5720 } else { 5721 el.attr(arr[1], value); 5722 } 5723 } 5724 5725 } else { 5726 if (mfp.st.allowHTMLInTemplate) { 5727 template.find(EVENT_NS + '-'+key).html(value); 5728 } else { 5729 template.find(EVENT_NS + '-'+key).text(value); 5730 } 5731 } 5732 }); 5733 }, 5734 5735 _getScrollbarSize: function() { 5736 // thx David 5737 if(mfp.scrollbarSize === undefined) { 5738 var scrollDiv = document.createElement("div"); 5739 scrollDiv.style.cssText = 'width: 99px; height: 99px; overflow: scroll; position: absolute; top: -9999px;'; 5740 document.body.appendChild(scrollDiv); 5741 mfp.scrollbarSize = scrollDiv.offsetWidth - scrollDiv.clientWidth; 5742 document.body.removeChild(scrollDiv); 5743 } 5744 return mfp.scrollbarSize; 5745 } 5746 5747}; 5748 5749 5750 5751 5752 5753$.magnificPopup = { 5754 instance: null, 5755 proto: MagnificPopup.prototype, 5756 modules: [], 5757 5758 open: function(options, index) { 5759 _checkInstance(); 5760 5761 if(!options) { 5762 options = {}; 5763 } else { 5764 options = $.extend(true, {}, options); 5765 } 5766 5767 options.isObj = true; 5768 options.index = index || 0; 5769 return this.instance.open(options); 5770 }, 5771 5772 close: function() { 5773 return $.magnificPopup.instance && $.magnificPopup.instance.close(); 5774 }, 5775 5776 registerModule: function(name, module) { 5777 if(module.options) { 5778 $.magnificPopup.defaults[name] = module.options; 5779 } 5780 $.extend(this.proto, module.proto); 5781 this.modules.push(name); 5782 }, 5783 5784 defaults: { 5785 5786 // Info about options is in docs: 5787 // http://dimsemenov.com/plugins/magnific-popup/documentation.html#options 5788 5789 disableOn: 0, 5790 5791 key: null, 5792 5793 midClick: false, 5794 5795 mainClass: '', 5796 5797 preloader: true, 5798 5799 focus: '', // CSS selector of input to focus after popup is opened 5800 5801 closeOnContentClick: false, 5802 5803 closeOnBgClick: true, 5804 5805 closeBtnInside: true, 5806 5807 showCloseBtn: true, 5808 5809 enableEscapeKey: true, 5810 5811 modal: false, 5812 5813 alignTop: false, 5814 5815 removalDelay: 0, 5816 5817 prependTo: null, 5818 5819 fixedContentPos: 'auto', 5820 5821 fixedBgPos: 'auto', 5822 5823 overflowY: 'auto', 5824 5825 closeMarkup: '<button title="%title%" type="button" class="mfp-close">×</button>', 5826 5827 tClose: 'Close (Esc)', 5828 5829 tLoading: 'Loading...', 5830 5831 autoFocusLast: true, 5832 5833 allowHTMLInStatusIndicator: false, 5834 5835 allowHTMLInTemplate: false 5836 5837 } 5838}; 5839 5840 5841 5842$.fn.magnificPopup = function(options) { 5843 _checkInstance(); 5844 5845 var jqEl = $(this); 5846 5847 // We call some API method of first param is a string 5848 if (typeof options === "string" ) { 5849 5850 if(options === 'open') { 5851 var items, 5852 itemOpts = _isJQ ? jqEl.data('magnificPopup') : jqEl[0].magnificPopup, 5853 index = parseInt(arguments[1], 10) || 0; 5854 5855 if(itemOpts.items) { 5856 items = itemOpts.items[index]; 5857 } else { 5858 items = jqEl; 5859 if(itemOpts.delegate) { 5860 items = items.find(itemOpts.delegate); 5861 } 5862 items = items.eq( index ); 5863 } 5864 mfp._openClick({mfpEl:items}, jqEl, itemOpts); 5865 } else { 5866 if(mfp.isOpen) 5867 mfp[options].apply(mfp, Array.prototype.slice.call(arguments, 1)); 5868 } 5869 5870 } else { 5871 // clone options obj 5872 options = $.extend(true, {}, options); 5873 5874 5875 if(_isJQ) { 5876 jqEl.data('magnificPopup', options); 5877 } else { 5878 jqEl[0].magnificPopup = options; 5879 } 5880 5881 mfp.addGroup(jqEl, options); 5882 5883 } 5884 return jqEl; 5885}; 5886 5887 5888 5889 5890 5891var INLINE_NS = 'inline', 5892 _hiddenClass, 5893 _inlinePlaceholder, 5894 _lastInlineElement, 5895 _putInlineElementsBack = function() { 5896 if(_lastInlineElement) { 5897 _inlinePlaceholder.after( _lastInlineElement.addClass(_hiddenClass) ).detach(); 5898 _lastInlineElement = null; 5899 } 5900 }; 5901 5902$.magnificPopup.registerModule(INLINE_NS, { 5903 options: { 5904 hiddenClass: 'hide', // will be appended with `mfp-` prefix 5905 markup: '', 5906 tNotFound: 'Content not found' 5907 }, 5908 proto: { 5909 5910 initInline: function() { 5911 mfp.types.push(INLINE_NS); 5912 5913 _mfpOn(CLOSE_EVENT+'.'+INLINE_NS, function() { 5914 _putInlineElementsBack(); 5915 }); 5916 }, 5917 5918 getInline: function(item, template) { 5919 5920 _putInlineElementsBack(); 5921 5922 if(item.src) { 5923 var inlineSt = mfp.st.inline, 5924 el = $(item.src); 5925 5926 if(el.length) { 5927 5928 // If target element has parent - we replace it with placeholder and put it back after popup is closed 5929 var parent = el[0].parentNode; 5930 if(parent && parent.tagName) { 5931 if(!_inlinePlaceholder) { 5932 _hiddenClass = inlineSt.hiddenClass; 5933 _inlinePlaceholder = _getEl(_hiddenClass); 5934 _hiddenClass = 'mfp-'+_hiddenClass; 5935 } 5936 // replace target inline element with placeholder 5937 _lastInlineElement = el.after(_inlinePlaceholder).detach().removeClass(_hiddenClass); 5938 } 5939 5940 mfp.updateStatus('ready'); 5941 } else { 5942 mfp.updateStatus('error', inlineSt.tNotFound); 5943 el = $('<div>'); 5944 } 5945 5946 item.inlineElement = el; 5947 return el; 5948 } 5949 5950 mfp.updateStatus('ready'); 5951 mfp._parseMarkup(template, {}, item); 5952 return template; 5953 } 5954 } 5955}); 5956 5957 5958 5959 5960var AJAX_NS = 'ajax', 5961 _ajaxCur, 5962 _removeAjaxCursor = function() { 5963 if(_ajaxCur) { 5964 $(document.body).removeClass(_ajaxCur); 5965 } 5966 }, 5967 _destroyAjaxRequest = function() { 5968 _removeAjaxCursor(); 5969 if(mfp.req) { 5970 mfp.req.abort(); 5971 } 5972 }; 5973 5974$.magnificPopup.registerModule(AJAX_NS, { 5975 5976 options: { 5977 settings: null, 5978 cursor: 'mfp-ajax-cur', 5979 tError: 'The content could not be loaded.' 5980 }, 5981 5982 proto: { 5983 initAjax: function() { 5984 mfp.types.push(AJAX_NS); 5985 _ajaxCur = mfp.st.ajax.cursor; 5986 5987 _mfpOn(CLOSE_EVENT+'.'+AJAX_NS, _destroyAjaxRequest); 5988 _mfpOn('BeforeChange.' + AJAX_NS, _destroyAjaxRequest); 5989 }, 5990 getAjax: function(item) { 5991 5992 if(_ajaxCur) { 5993 $(document.body).addClass(_ajaxCur); 5994 } 5995 5996 mfp.updateStatus('loading'); 5997 5998 var opts = $.extend({ 5999 url: item.src, 6000 success: function(data, textStatus, jqXHR) { 6001 var temp = { 6002 data:data, 6003 xhr:jqXHR 6004 }; 6005 6006 _mfpTrigger('ParseAjax', temp); 6007 6008 mfp.appendContent( $(temp.data), AJAX_NS ); 6009 6010 item.finished = true; 6011 6012 _removeAjaxCursor(); 6013 6014 mfp._setFocus(); 6015 6016 setTimeout(function() { 6017 mfp.wrap.addClass(READY_CLASS); 6018 }, 16); 6019 6020 mfp.updateStatus('ready'); 6021 6022 _mfpTrigger('AjaxContentAdded'); 6023 }, 6024 error: function() { 6025 _removeAjaxCursor(); 6026 item.finished = item.loadError = true; 6027 mfp.updateStatus('error', mfp.st.ajax.tError.replace('%url%', item.src)); 6028 } 6029 }, mfp.st.ajax.settings); 6030 6031 mfp.req = $.ajax(opts); 6032 6033 return ''; 6034 } 6035 } 6036}); 6037 6038 6039 6040 6041var _imgInterval, 6042 _getTitle = function(item) { 6043 if(item.data && item.data.title !== undefined) 6044 return item.data.title; 6045 6046 var src = mfp.st.image.titleSrc; 6047 6048 if(src) { 6049 if(typeof src === "function") { 6050 return src.call(mfp, item); 6051 } else if(item.el) { 6052 return item.el.attr(src) || ''; 6053 } 6054 } 6055 return ''; 6056 }; 6057 6058$.magnificPopup.registerModule('image', { 6059 6060 options: { 6061 markup: '<div class="mfp-figure">'+ 6062 '<div class="mfp-close"></div>'+ 6063 '<figure>'+ 6064 '<div class="mfp-img"></div>'+ 6065 '<figcaption>'+ 6066 '<div class="mfp-bottom-bar">'+ 6067 '<div class="mfp-title"></div>'+ 6068 '<div class="mfp-counter"></div>'+ 6069 '</div>'+ 6070 '</figcaption>'+ 6071 '</figure>'+ 6072 '</div>', 6073 cursor: 'mfp-zoom-out-cur', 6074 titleSrc: 'title', 6075 verticalFit: true, 6076 tError: 'The image could not be loaded.' 6077 }, 6078 6079 proto: { 6080 initImage: function() { 6081 var imgSt = mfp.st.image, 6082 ns = '.image'; 6083 6084 mfp.types.push('image'); 6085 6086 _mfpOn(OPEN_EVENT+ns, function() { 6087 if(mfp.currItem.type === 'image' && imgSt.cursor) { 6088 $(document.body).addClass(imgSt.cursor); 6089 } 6090 }); 6091 6092 _mfpOn(CLOSE_EVENT+ns, function() { 6093 if(imgSt.cursor) { 6094 $(document.body).removeClass(imgSt.cursor); 6095 } 6096 _window.off('resize' + EVENT_NS); 6097 }); 6098 6099 _mfpOn('Resize'+ns, mfp.resizeImage); 6100 if(mfp.isLowIE) { 6101 _mfpOn('AfterChange', mfp.resizeImage); 6102 } 6103 }, 6104 resizeImage: function() { 6105 var item = mfp.currItem; 6106 if(!item || !item.img) return; 6107 6108 if(mfp.st.image.verticalFit) { 6109 var decr = 0; 6110 // fix box-sizing in ie7/8 6111 if(mfp.isLowIE) { 6112 decr = parseInt(item.img.css('padding-top'), 10) + parseInt(item.img.css('padding-bottom'),10); 6113 } 6114 item.img.css('max-height', mfp.wH-decr); 6115 } 6116 }, 6117 _onImageHasSize: function(item) { 6118 if(item.img) { 6119 6120 item.hasSize = true; 6121 6122 if(_imgInterval) { 6123 clearInterval(_imgInterval); 6124 } 6125 6126 item.isCheckingImgSize = false; 6127 6128 _mfpTrigger('ImageHasSize', item); 6129 6130 if(item.imgHidden) { 6131 if(mfp.content) 6132 mfp.content.removeClass('mfp-loading'); 6133 6134 item.imgHidden = false; 6135 } 6136 6137 } 6138 }, 6139 6140 6141 findImageSize: function(item) { 6142 6143 var counter = 0, 6144 img = item.img[0], 6145 mfpSetInterval = function(delay) { 6146 6147 if(_imgInterval) { 6148 clearInterval(_imgInterval); 6149 } 6150 // decelerating interval that checks for size of an image 6151 _imgInterval = setInterval(function() { 6152 if(img.naturalWidth > 0) { 6153 mfp._onImageHasSize(item); 6154 return; 6155 } 6156 6157 if(counter > 200) { 6158 clearInterval(_imgInterval); 6159 } 6160 6161 counter++; 6162 if(counter === 3) { 6163 mfpSetInterval(10); 6164 } else if(counter === 40) { 6165 mfpSetInterval(50); 6166 } else if(counter === 100) { 6167 mfpSetInterval(500); 6168 } 6169 }, delay); 6170 }; 6171 6172 mfpSetInterval(1); 6173 }, 6174 6175 getImage: function(item, template) { 6176 6177 var guard = 0, 6178 6179 imgSt = mfp.st.image, 6180 6181 // image error handler 6182 onLoadError = function() { 6183 if(item) { 6184 item.img.off('.mfploader'); 6185 if(item === mfp.currItem){ 6186 mfp._onImageHasSize(item); 6187 mfp.updateStatus('error', imgSt.tError.replace('%url%', item.src) ); 6188 } 6189 6190 item.hasSize = true; 6191 item.loaded = true; 6192 item.loadError = true; 6193 } 6194 }, 6195 6196 // image load complete handler 6197 onLoadComplete = function() { 6198 if(item) { 6199 if (item.img[0].complete) { 6200 item.img.off('.mfploader'); 6201 6202 if(item === mfp.currItem){ 6203 mfp._onImageHasSize(item); 6204 6205 mfp.updateStatus('ready'); 6206 } 6207 6208 item.hasSize = true; 6209 item.loaded = true; 6210 6211 _mfpTrigger('ImageLoadComplete'); 6212 6213 } 6214 else { 6215 // if image complete check fails 200 times (20 sec), we assume that there was an error. 6216 guard++; 6217 if(guard < 200) { 6218 setTimeout(onLoadComplete,100); 6219 } else { 6220 onLoadError(); 6221 } 6222 } 6223 } 6224 }; 6225 6226 6227 6228 var el = template.find('.mfp-img'); 6229 if(el.length) { 6230 var img = document.createElement('img'); 6231 img.className = 'mfp-img'; 6232 if(item.el && item.el.find('img').length) { 6233 img.alt = item.el.find('img').attr('alt'); 6234 } 6235 item.img = $(img).on('load.mfploader', onLoadComplete).on('error.mfploader', onLoadError); 6236 img.src = item.src; 6237 6238 // without clone() "error" event is not firing when IMG is replaced by new IMG 6239 // TODO: find a way to avoid such cloning 6240 if(el.is('img')) { 6241 item.img = item.img.clone(); 6242 } 6243 6244 img = item.img[0]; 6245 if(img.naturalWidth > 0) { 6246 item.hasSize = true; 6247 } else if(!img.width) { 6248 item.hasSize = false; 6249 } 6250 } 6251 6252 mfp._parseMarkup(template, { 6253 title: _getTitle(item), 6254 img_replaceWith: item.img 6255 }, item); 6256 6257 mfp.resizeImage(); 6258 6259 if(item.hasSize) { 6260 if(_imgInterval) clearInterval(_imgInterval); 6261 6262 if(item.loadError) { 6263 template.addClass('mfp-loading'); 6264 mfp.updateStatus('error', imgSt.tError.replace('%url%', item.src) ); 6265 } else { 6266 template.removeClass('mfp-loading'); 6267 mfp.updateStatus('ready'); 6268 } 6269 return template; 6270 } 6271 6272 mfp.updateStatus('loading'); 6273 item.loading = true; 6274 6275 if(!item.hasSize) { 6276 item.imgHidden = true; 6277 template.addClass('mfp-loading'); 6278 mfp.findImageSize(item); 6279 } 6280 6281 return template; 6282 } 6283 } 6284}); 6285 6286 6287 6288 6289var hasMozTransform, 6290 getHasMozTransform = function() { 6291 if(hasMozTransform === undefined) { 6292 hasMozTransform = document.createElement('p').style.MozTransform !== undefined; 6293 } 6294 return hasMozTransform; 6295 }; 6296 6297$.magnificPopup.registerModule('zoom', { 6298 6299 options: { 6300 enabled: false, 6301 easing: 'ease-in-out', 6302 duration: 300, 6303 opener: function(element) { 6304 return element.is('img') ? element : element.find('img'); 6305 } 6306 }, 6307 6308 proto: { 6309 6310 initZoom: function() { 6311 var zoomSt = mfp.st.zoom, 6312 ns = '.zoom', 6313 image; 6314 6315 if(!zoomSt.enabled || !mfp.supportsTransition) { 6316 return; 6317 } 6318 6319 var duration = zoomSt.duration, 6320 getElToAnimate = function(image) { 6321 var newImg = image.clone().removeAttr('style').removeAttr('class').addClass('mfp-animated-image'), 6322 transition = 'all '+(zoomSt.duration/1000)+'s ' + zoomSt.easing, 6323 cssObj = { 6324 position: 'fixed', 6325 zIndex: 9999, 6326 left: 0, 6327 top: 0, 6328 '-webkit-backface-visibility': 'hidden' 6329 }, 6330 t = 'transition'; 6331 6332 cssObj['-webkit-'+t] = cssObj['-moz-'+t] = cssObj['-o-'+t] = cssObj[t] = transition; 6333 6334 newImg.css(cssObj); 6335 return newImg; 6336 }, 6337 showMainContent = function() { 6338 mfp.content.css('visibility', 'visible'); 6339 }, 6340 openTimeout, 6341 animatedImg; 6342 6343 _mfpOn('BuildControls'+ns, function() { 6344 if(mfp._allowZoom()) { 6345 6346 clearTimeout(openTimeout); 6347 mfp.content.css('visibility', 'hidden'); 6348 6349 // Basically, all code below does is clones existing image, puts in on top of the current one and animated it 6350 6351 image = mfp._getItemToZoom(); 6352 6353 if(!image) { 6354 showMainContent(); 6355 return; 6356 } 6357 6358 animatedImg = getElToAnimate(image); 6359 6360 animatedImg.css( mfp._getOffset() ); 6361 6362 mfp.wrap.append(animatedImg); 6363 6364 openTimeout = setTimeout(function() { 6365 animatedImg.css( mfp._getOffset( true ) ); 6366 openTimeout = setTimeout(function() { 6367 6368 showMainContent(); 6369 6370 setTimeout(function() { 6371 animatedImg.remove(); 6372 image = animatedImg = null; 6373 _mfpTrigger('ZoomAnimationEnded'); 6374 }, 16); // avoid blink when switching images 6375 6376 }, duration); // this timeout equals animation duration 6377 6378 }, 16); // by adding this timeout we avoid short glitch at the beginning of animation 6379 6380 6381 // Lots of timeouts... 6382 } 6383 }); 6384 _mfpOn(BEFORE_CLOSE_EVENT+ns, function() { 6385 if(mfp._allowZoom()) { 6386 6387 clearTimeout(openTimeout); 6388 6389 mfp.st.removalDelay = duration; 6390 6391 if(!image) { 6392 image = mfp._getItemToZoom(); 6393 if(!image) { 6394 return; 6395 } 6396 animatedImg = getElToAnimate(image); 6397 } 6398 6399 animatedImg.css( mfp._getOffset(true) ); 6400 mfp.wrap.append(animatedImg); 6401 mfp.content.css('visibility', 'hidden'); 6402 6403 setTimeout(function() { 6404 animatedImg.css( mfp._getOffset() ); 6405 }, 16); 6406 } 6407 6408 }); 6409 6410 _mfpOn(CLOSE_EVENT+ns, function() { 6411 if(mfp._allowZoom()) { 6412 showMainContent(); 6413 if(animatedImg) { 6414 animatedImg.remove(); 6415 } 6416 image = null; 6417 } 6418 }); 6419 }, 6420 6421 _allowZoom: function() { 6422 return mfp.currItem.type === 'image'; 6423 }, 6424 6425 _getItemToZoom: function() { 6426 if(mfp.currItem.hasSize) { 6427 return mfp.currItem.img; 6428 } else { 6429 return false; 6430 } 6431 }, 6432 6433 // Get element postion relative to viewport 6434 _getOffset: function(isLarge) { 6435 var el; 6436 if(isLarge) { 6437 el = mfp.currItem.img; 6438 } else { 6439 el = mfp.st.zoom.opener(mfp.currItem.el || mfp.currItem); 6440 } 6441 6442 var offset = el.offset(); 6443 var paddingTop = parseInt(el.css('padding-top'),10); 6444 var paddingBottom = parseInt(el.css('padding-bottom'),10); 6445 offset.top -= ( $(window).scrollTop() - paddingTop ); 6446 6447 6448 6449 var obj = { 6450 width: el.width(), 6451 // fix Zepto height+padding issue 6452 height: (_isJQ ? el.innerHeight() : el[0].offsetHeight) - paddingBottom - paddingTop 6453 }; 6454 6455 // I hate to do this, but there is no another option 6456 if( getHasMozTransform() ) { 6457 obj['-moz-transform'] = obj['transform'] = 'translate(' + offset.left + 'px,' + offset.top + 'px)'; 6458 } else { 6459 obj.left = offset.left; 6460 obj.top = offset.top; 6461 } 6462 return obj; 6463 } 6464 6465 } 6466}); 6467 6468 6469 6470 6471 6472 6473 6474var IFRAME_NS = 'iframe', 6475 _emptyPage = '//about:blank', 6476 6477 _fixIframeBugs = function(isShowing) { 6478 if(mfp.currTemplate[IFRAME_NS]) { 6479 var el = mfp.currTemplate[IFRAME_NS].find('iframe'); 6480 if(el.length) { 6481 // reset src after the popup is closed to avoid "video keeps playing after popup is closed" bug 6482 if(!isShowing) { 6483 el[0].src = _emptyPage; 6484 } 6485 6486 // IE8 black screen bug fix 6487 if(mfp.isIE8) { 6488 el.css('display', isShowing ? 'block' : 'none'); 6489 } 6490 } 6491 } 6492 }; 6493 6494$.magnificPopup.registerModule(IFRAME_NS, { 6495 6496 options: { 6497 markup: '<div class="mfp-iframe-scaler">'+ 6498 '<div class="mfp-close"></div>'+ 6499 '<iframe class="mfp-iframe" src="//about:blank" frameborder="0" allowfullscreen></iframe>'+ 6500 '</div>', 6501 6502 srcAction: 'iframe_src', 6503 6504 // we don't care and support only one default type of URL by default 6505 patterns: { 6506 youtube: { 6507 index: 'youtube.com', 6508 id: 'v=', 6509 src: '//www.youtube.com/embed/%id%?autoplay=1' 6510 }, 6511 vimeo: { 6512 index: 'vimeo.com/', 6513 id: '/', 6514 src: '//player.vimeo.com/video/%id%?autoplay=1' 6515 }, 6516 gmaps: { 6517 index: '//maps.google.', 6518 src: '%id%&output=embed' 6519 } 6520 } 6521 }, 6522 6523 proto: { 6524 initIframe: function() { 6525 mfp.types.push(IFRAME_NS); 6526 6527 _mfpOn('BeforeChange', function(e, prevType, newType) { 6528 if(prevType !== newType) { 6529 if(prevType === IFRAME_NS) { 6530 _fixIframeBugs(); // iframe if removed 6531 } else if(newType === IFRAME_NS) { 6532 _fixIframeBugs(true); // iframe is showing 6533 } 6534 }// else { 6535 // iframe source is switched, don't do anything 6536 //} 6537 }); 6538 6539 _mfpOn(CLOSE_EVENT + '.' + IFRAME_NS, function() { 6540 _fixIframeBugs(); 6541 }); 6542 }, 6543 6544 getIframe: function(item, template) { 6545 var embedSrc = item.src; 6546 var iframeSt = mfp.st.iframe; 6547 6548 $.each(iframeSt.patterns, function() { 6549 if(embedSrc.indexOf( this.index ) > -1) { 6550 if(this.id) { 6551 if(typeof this.id === 'string') { 6552 embedSrc = embedSrc.substr(embedSrc.lastIndexOf(this.id)+this.id.length, embedSrc.length); 6553 } else { 6554 embedSrc = this.id.call( this, embedSrc ); 6555 } 6556 } 6557 embedSrc = this.src.replace('%id%', embedSrc ); 6558 return false; // break; 6559 } 6560 }); 6561 6562 var dataObj = {}; 6563 if(iframeSt.srcAction) { 6564 dataObj[iframeSt.srcAction] = embedSrc; 6565 } 6566 6567 mfp._parseMarkup(template, dataObj, item); 6568 6569 mfp.updateStatus('ready'); 6570 6571 return template; 6572 } 6573 } 6574}); 6575 6576 6577 6578 6579 6580 6581 6582var _getLoopedId = function(index) { 6583 var numSlides = mfp.items.length; 6584 if(index > numSlides - 1) { 6585 return index - numSlides; 6586 } else if(index < 0) { 6587 return numSlides + index; 6588 } 6589 return index; 6590 }, 6591 _replaceCurrTotal = function(text, curr, total) { 6592 return text.replace(/%curr%/gi, curr + 1).replace(/%total%/gi, total); 6593 }; 6594 6595$.magnificPopup.registerModule('gallery', { 6596 6597 options: { 6598 enabled: false, 6599 arrowMarkup: '<button title="%title%" type="button" class="mfp-arrow mfp-arrow-%dir%"></button>', 6600 preload: [0,2], 6601 navigateByImgClick: true, 6602 arrows: true, 6603 6604 tPrev: 'Previous (Left arrow key)', 6605 tNext: 'Next (Right arrow key)', 6606 tCounter: '%curr% of %total%', 6607 6608 langDir: null, 6609 loop: true, 6610 }, 6611 6612 proto: { 6613 initGallery: function() { 6614 6615 var gSt = mfp.st.gallery, 6616 ns = '.mfp-gallery'; 6617 6618 mfp.direction = true; // true - next, false - prev 6619 6620 if(!gSt || !gSt.enabled ) return false; 6621 6622 if (!gSt.langDir) { 6623 gSt.langDir = document.dir || 'ltr'; 6624 } 6625 6626 _wrapClasses += ' mfp-gallery'; 6627 6628 _mfpOn(OPEN_EVENT+ns, function() { 6629 6630 if(gSt.navigateByImgClick) { 6631 mfp.wrap.on('click'+ns, '.mfp-img', function() { 6632 if(mfp.items.length > 1) { 6633 mfp.next(); 6634 return false; 6635 } 6636 }); 6637 } 6638 6639 _document.on('keydown'+ns, function(e) { 6640 if (e.keyCode === 37) { 6641 if (gSt.langDir === 'rtl') mfp.next(); 6642 else mfp.prev(); 6643 } else if (e.keyCode === 39) { 6644 if (gSt.langDir === 'rtl') mfp.prev(); 6645 else mfp.next(); 6646 } 6647 }); 6648 6649 mfp.updateGalleryButtons(); 6650 6651 }); 6652 6653 _mfpOn('UpdateStatus'+ns, function() { 6654 mfp.updateGalleryButtons(); 6655 }); 6656 6657 _mfpOn('UpdateStatus'+ns, function(e, data) { 6658 if(data.text) { 6659 data.text = _replaceCurrTotal(data.text, mfp.currItem.index, mfp.items.length); 6660 } 6661 }); 6662 6663 _mfpOn(MARKUP_PARSE_EVENT+ns, function(e, element, values, item) { 6664 var l = mfp.items.length; 6665 values.counter = l > 1 ? _replaceCurrTotal(gSt.tCounter, item.index, l) : ''; 6666 }); 6667 6668 _mfpOn('BuildControls' + ns, function() { 6669 if(mfp.items.length > 1 && gSt.arrows && !mfp.arrowLeft) { 6670 6671 var arrowLeftDesc, arrowRightDesc, arrowLeftAction, arrowRightAction; 6672 6673 if (gSt.langDir === 'rtl') { 6674 arrowLeftDesc = gSt.tNext; 6675 arrowRightDesc = gSt.tPrev; 6676 arrowLeftAction = 'next'; 6677 arrowRightAction = 'prev'; 6678 } else { 6679 arrowLeftDesc = gSt.tPrev; 6680 arrowRightDesc = gSt.tNext; 6681 arrowLeftAction = 'prev'; 6682 arrowRightAction = 'next'; 6683 } 6684 6685 var markup = gSt.arrowMarkup, 6686 arrowLeft = mfp.arrowLeft = $( markup.replace(/%title%/gi, arrowLeftDesc).replace(/%action%/gi, arrowLeftAction).replace(/%dir%/gi, 'left') ).addClass(PREVENT_CLOSE_CLASS), 6687 arrowRight = mfp.arrowRight = $( markup.replace(/%title%/gi, arrowRightDesc).replace(/%action%/gi, arrowRightAction).replace(/%dir%/gi, 'right') ).addClass(PREVENT_CLOSE_CLASS); 6688 6689 if (gSt.langDir === 'rtl') { 6690 mfp.arrowNext = arrowLeft; 6691 mfp.arrowPrev = arrowRight; 6692 } else { 6693 mfp.arrowNext = arrowRight; 6694 mfp.arrowPrev = arrowLeft; 6695 } 6696 6697 arrowLeft.on('click', function() { 6698 if (gSt.langDir === 'rtl') mfp.next(); 6699 else mfp.prev(); 6700 }); 6701 arrowRight.on('click', function() { 6702 if (gSt.langDir === 'rtl') mfp.prev(); 6703 else mfp.next(); 6704 }); 6705 6706 mfp.container.append(arrowLeft.add(arrowRight)); 6707 6708 } 6709 }); 6710 6711 _mfpOn(CHANGE_EVENT+ns, function() { 6712 if(mfp._preloadTimeout) clearTimeout(mfp._preloadTimeout); 6713 6714 mfp._preloadTimeout = setTimeout(function() { 6715 mfp.preloadNearbyImages(); 6716 mfp._preloadTimeout = null; 6717 }, 16); 6718 }); 6719 6720 6721 _mfpOn(CLOSE_EVENT+ns, function() { 6722 _document.off(ns); 6723 mfp.wrap.off('click'+ns); 6724 mfp.arrowRight = mfp.arrowLeft = null; 6725 }); 6726 6727 }, 6728 next: function() { 6729 var newIndex = _getLoopedId(mfp.index + 1); 6730 if (!mfp.st.gallery.loop && newIndex === 0 ) return false; 6731 mfp.direction = true; 6732 mfp.index = newIndex; 6733 mfp.updateItemHTML(); 6734 }, 6735 prev: function() { 6736 var newIndex = mfp.index - 1; 6737 if (!mfp.st.gallery.loop && newIndex < 0) return false; 6738 mfp.direction = false; 6739 mfp.index = _getLoopedId(newIndex); 6740 mfp.updateItemHTML(); 6741 }, 6742 goTo: function(newIndex) { 6743 mfp.direction = (newIndex >= mfp.index); 6744 mfp.index = newIndex; 6745 mfp.updateItemHTML(); 6746 }, 6747 preloadNearbyImages: function() { 6748 var p = mfp.st.gallery.preload, 6749 preloadBefore = Math.min(p[0], mfp.items.length), 6750 preloadAfter = Math.min(p[1], mfp.items.length), 6751 i; 6752 6753 for(i = 1; i <= (mfp.direction ? preloadAfter : preloadBefore); i++) { 6754 mfp._preloadItem(mfp.index+i); 6755 } 6756 for(i = 1; i <= (mfp.direction ? preloadBefore : preloadAfter); i++) { 6757 mfp._preloadItem(mfp.index-i); 6758 } 6759 }, 6760 _preloadItem: function(index) { 6761 index = _getLoopedId(index); 6762 6763 if(mfp.items[index].preloaded) { 6764 return; 6765 } 6766 6767 var item = mfp.items[index]; 6768 if(!item.parsed) { 6769 item = mfp.parseEl( index ); 6770 } 6771 6772 _mfpTrigger('LazyLoad', item); 6773 6774 if(item.type === 'image') { 6775 item.img = $('<img class="mfp-img" />').on('load.mfploader', function() { 6776 item.hasSize = true; 6777 }).on('error.mfploader', function() { 6778 item.hasSize = true; 6779 item.loadError = true; 6780 _mfpTrigger('LazyLoadError', item); 6781 }).attr('src', item.src); 6782 } 6783 6784 6785 item.preloaded = true; 6786 }, 6787 6788 6789 updateGalleryButtons: function() { 6790 6791 if ( !mfp.st.gallery.loop && typeof mfp.arrowPrev === 'object' && mfp.arrowPrev !== null) { 6792 6793 if (mfp.index === 0) mfp.arrowPrev.hide(); 6794 else mfp.arrowPrev.show(); 6795 6796 if (mfp.index === (mfp.items.length - 1)) mfp.arrowNext.hide(); 6797 else mfp.arrowNext.show(); 6798 6799 } 6800 6801 }, 6802 6803 } 6804 6805}); 6806 6807 6808 6809 6810 6811 6812var RETINA_NS = 'retina'; 6813 6814$.magnificPopup.registerModule(RETINA_NS, { 6815 options: { 6816 replaceSrc: function(item) { 6817 return item.src.replace(/\.\w+$/, function(m) { return '@2x' + m; }); 6818 }, 6819 ratio: 1 // Function or number. Set to 1 to disable. 6820 }, 6821 proto: { 6822 initRetina: function() { 6823 if(window.devicePixelRatio > 1) { 6824 6825 var st = mfp.st.retina, 6826 ratio = st.ratio; 6827
6828 ratio = !isNaN(ratio) ? ratio : ratio(); 6829 6830 if(ratio > 1) { 6831 _mfpOn('ImageHasSize' + '.' + RETINA_NS, function(e, item) { 6832 item.img.css({ 6833 'max-width': item.img[0].naturalWidth / ratio, 6834 'width': '100%' 6835 }); 6836 }); 6837 _mfpOn('ElementParse' + '.' + RETINA_NS, function(e, item) { 6838 item.src = st.replaceSrc(item, ratio); 6839 }); 6840 } 6841 } 6842 6843 } 6844 } 6845}); 6846 6847 6848 _checkInstance(); })); 6849; 6850(function (root, factory) { 6851 if (typeof define === 'function' && define.amd) { 6852 define(['jquery'], factory); 6853 } else { 6854 factory(root.jQuery); 6855 } 6856}(this, function ($) { 6857 'use strict'; 6858 6859 // init flags & variables 6860 var debug = false; 6861 6862 var browser = { 6863 data: { 6864 index: 0, 6865 name: 'scrollbar' 6866 }, 6867 macosx: /mac/i.test(navigator.platform), 6868 mobile: /android|webos|iphone|ipad|ipod|blackberry/i.test(navigator.userAgent), 6869 overlay: null, 6870 scroll: null, 6871 scrolls: [], 6872 webkit: /webkit/i.test(navigator.userAgent) && !/edge\/\d+/i.test(navigator.userAgent) 6873 }; 6874 6875 browser.scrolls.add = function (instance) { 6876 this.remove(instance).push(instance); 6877 }; 6878 browser.scrolls.remove = function (instance) { 6879 while ($.inArray(instance, this) >= 0) { 6880 this.splice($.inArray(instance, this), 1); 6881 } 6882 return this; 6883 }; 6884 6885 var defaults = { 6886 "autoScrollSize": true, // automatically calculate scrollsize 6887 "autoUpdate": true, // update scrollbar if content/container size changed 6888 "debug": false, // debug mode 6889 "disableBodyScroll": false, // disable body scroll if mouse over container 6890 "duration": 200, // scroll animate duration in ms 6891 "ignoreMobile": false, // ignore mobile devices 6892 "ignoreOverlay": false, // ignore browsers with overlay scrollbars (mobile, MacOS) 6893 "scrollStep": 30, // scroll step for scrollbar arrows 6894 "showArrows": false, // add class to show arrows 6895 "stepScrolling": true, // when scrolling to scrollbar mousedown position 6896 6897 "scrollx": null, // horizontal scroll element 6898 "scrolly": null, // vertical scroll element 6899 6900 "onDestroy": null, // callback function on destroy, 6901 "onInit": null, // callback function on first initialization 6902 "onScroll": null, // callback function on content scrolling 6903 "onUpdate": null // callback function on init/resize (before scrollbar size calculation) 6904 }; 6905 6906 6907 var BaseScrollbar = function (container) { 6908 6909 if (!browser.scroll) { 6910 browser.overlay = isScrollOverlaysContent(); 6911 browser.scroll = getBrowserScrollSize(); 6912 updateScrollbars(); 6913 6914 $(window).on("resize", function () { 6915 var forceUpdate = false; 6916 if (browser.scroll && (browser.scroll.height || browser.scroll.width)) { 6917 var scroll = getBrowserScrollSize(); 6918 if (scroll.height !== browser.scroll.height || scroll.width !== browser.scroll.width) { 6919 browser.scroll = scroll; 6920 forceUpdate = true; // handle page zoom 6921 } 6922 } 6923 updateScrollbars(forceUpdate); 6924 }); 6925 } 6926 6927 this.container = container; 6928 this.namespace = '.scrollbar_' + browser.data.index++; 6929 this.options = $.extend({}, defaults, window.jQueryScrollbarOptions || {}); 6930 this.scrollTo = null; 6931 this.scrollx = {}; 6932 this.scrolly = {}; 6933 6934 container.data(browser.data.name, this); 6935 browser.scrolls.add(this); 6936 }; 6937 6938 BaseScrollbar.prototype = { 6939 6940 destroy: function () { 6941 6942 if (!this.wrapper) { 6943 return; 6944 } 6945 6946 this.container.removeData(browser.data.name); 6947 browser.scrolls.remove(this); 6948 6949 // init variables 6950 var scrollLeft = this.container.scrollLeft(); 6951 var scrollTop = this.container.scrollTop(); 6952 6953 this.container.insertBefore(this.wrapper).css({ 6954 "height": "", 6955 "margin": "", 6956 "max-height": "" 6957 }) 6958 .removeClass('scroll-content scroll-scrollx_visible scroll-scrolly_visible') 6959 .off(this.namespace) 6960 .scrollLeft(scrollLeft) 6961 .scrollTop(scrollTop); 6962 6963 this.scrollx.scroll.removeClass('scroll-scrollx_visible').find('div').andSelf().off(this.namespace); 6964 this.scrolly.scroll.removeClass('scroll-scrolly_visible').find('div').andSelf().off(this.namespace); 6965 6966 this.wrapper.remove(); 6967 6968 $(document).add('body').off(this.namespace); 6969 6970 //if ($.isFunction(this.options.onDestroy)){ 6971 if (typeof this.options.onDestroy === "function"){ 6972 this.options.onDestroy.apply(this, [this.container]); 6973 } 6974 }, 6975 init: function (options) { 6976 6977 // init variables 6978 var S = this, 6979 c = this.container, 6980 cw = this.containerWrapper || c, 6981 namespace = this.namespace, 6982 o = $.extend(this.options, options || {}), 6983 s = {x: this.scrollx, y: this.scrolly}, 6984 w = this.wrapper; 6985 6986 var initScroll = { 6987 "scrollLeft": c.scrollLeft(), 6988 "scrollTop": c.scrollTop() 6989 }; 6990 6991 // do not init if in ignorable browser 6992 if ((browser.mobile && o.ignoreMobile) 6993 || (browser.overlay && o.ignoreOverlay) 6994 || (browser.macosx && !browser.webkit) // still required to ignore nonWebKit browsers on Mac 6995 ) { 6996 return false;
6997 } 6998 6999 // init scroll container 7000 if (!w) { 7001 this.wrapper = w = $('<div>').addClass('scroll-wrapper').addClass(c.attr('class')) 7002 .css('position', c.css('position') == 'absolute' ? 'absolute' : 'relative') 7003 .insertBefore(c).append(c); 7004 7005 if (c.is('textarea')) { 7006 this.containerWrapper = cw = $('<div>').insertBefore(c).append(c); 7007 w.addClass('scroll-textarea'); 7008 } 7009 7010 cw.addClass('scroll-content').css({ 7011 "height": "auto", 7012 "margin-bottom": browser.scroll.height * -1 + 'px', 7013 "margin-right": browser.scroll.width * -1 + 'px', 7014 "max-height": "" 7015 }); 7016 7017 c.on('scroll' + namespace, function (event) { 7018 //if ($.isFunction(o.onScroll)) { 7019 if (typeof o.onScroll === "function") { 7020 o.onScroll.call(S, { 7021 "maxScroll": s.y.maxScrollOffset, 7022 "scroll": c.scrollTop(), 7023 "size": s.y.size, 7024 "visible": s.y.visible 7025 }, { 7026 "maxScroll": s.x.maxScrollOffset, 7027 "scroll": c.scrollLeft(), 7028 "size": s.x.size, 7029 "visible": s.x.visible 7030 }); 7031 } 7032 s.x.isVisible && s.x.scroll.bar.css('left', c.scrollLeft() * s.x.kx + 'px'); 7033 s.y.isVisible && s.y.scroll.bar.css('top', c.scrollTop() * s.y.kx + 'px'); 7034 }); 7035 7036 7037 w.on('scroll' + namespace, function () { 7038 w.scrollTop(0).scrollLeft(0); 7039 }); 7040 7041 if (o.disableBodyScroll) { 7042 var handleMouseScroll = function (event) { 7043 isVerticalScroll(event) ? 7044 s.y.isVisible && s.y.mousewheel(event) : 7045 s.x.isVisible && s.x.mousewheel(event); 7046 }; 7047 w.on('MozMousePixelScroll' + namespace, handleMouseScroll); 7048 w.on('mousewheel' + namespace, handleMouseScroll); 7049 7050 if (browser.mobile) { 7051 w.on('touchstart' + namespace, function (event) { 7052 var touch = event.originalEvent.touches && event.originalEvent.touches[0] || event; 7053 var originalTouch = { 7054 "pageX": touch.pageX, 7055 "pageY": touch.pageY 7056 }; 7057 var originalScroll = { 7058 "left": c.scrollLeft(), 7059 "top": c.scrollTop() 7060 }; 7061 $(document).on('touchmove' + namespace, function (event) { 7062 var touch = event.originalEvent.targetTouches && event.originalEvent.targetTouches[0] || event; 7063 c.scrollLeft(originalScroll.left + originalTouch.pageX - touch.pageX); 7064 c.scrollTop(originalScroll.top + originalTouch.pageY - touch.pageY); 7065 event.preventDefault(); 7066 }); 7067 $(document).on('touchend' + namespace, function () { 7068 $(document).off(namespace); 7069 }); 7070 }); 7071 } 7072 } 7073 //if ($.isFunction(o.onInit)){ 7074 if (typeof o.onInit === "function"){ 7075 o.onInit.apply(this, [c]); 7076 } 7077 } else { 7078 cw.css({ 7079 "height": "auto", 7080 "margin-bottom": browser.scroll.height * -1 + 'px', 7081 "margin-right": browser.scroll.width * -1 + 'px', 7082 "max-height": "" 7083 }); 7084 } 7085 7086 // init scrollbars & recalculate sizes 7087 $.each(s, function (d, scrollx) { 7088 7089 var scrollCallback = null; 7090 var scrollForward = 1; 7091 var scrollOffset = (d === 'x') ? 'scrollLeft' : 'scrollTop'; 7092 var scrollStep = o.scrollStep; 7093 var scrollTo = function () { 7094 var currentOffset = c[scrollOffset](); 7095 c[scrollOffset](currentOffset + scrollStep); 7096 if (scrollForward == 1 && (currentOffset + scrollStep) >= scrollToValue) 7097 currentOffset = c[scrollOffset](); 7098 if (scrollForward == -1 && (currentOffset + scrollStep) <= scrollToValue) 7099 currentOffset = c[scrollOffset](); 7100 if (c[scrollOffset]() == currentOffset && scrollCallback) { 7101 scrollCallback(); 7102 } 7103 } 7104 var scrollToValue = 0; 7105 7106 if (!scrollx.scroll) { 7107 7108 scrollx.scroll = S._getScroll(o['scroll' + d]).addClass('scroll-' + d); 7109 7110 if(o.showArrows){ 7111 scrollx.scroll.addClass('scroll-element_arrows_visible'); 7112 } 7113 7114 scrollx.mousewheel = function (event) { 7115 7116 if (!scrollx.isVisible || (d === 'x' && isVerticalScroll(event))) { 7117 return true; 7118 } 7119 if (d === 'y' && !isVerticalScroll(event)) { 7120 s.x.mousewheel(event); 7121 return true; 7122 } 7123 7124 var delta = event.originalEvent.wheelDelta * -1 || event.originalEvent.detail; 7125 var maxScrollValue = scrollx.size - scrollx.visible - scrollx.offset; 7126 7127 if ((delta > 0 && scrollToValue < maxScrollValue) || (delta < 0 && scrollToValue > 0)) { 7128 scrollToValue = scrollToValue + delta; 7129 if (scrollToValue < 0) 7130 scrollToValue = 0; 7131 if (scrollToValue > maxScrollValue) 7132 scrollToValue = maxScrollValue; 7133 7134 S.scrollTo = S.scrollTo || {}; 7135 S.scrollTo[scrollOffset] = scrollToValue; 7136 setTimeout(function () { 7137 if (S.scrollTo) { 7138 c.stop().animate(S.scrollTo, 240, 'linear', function () { 7139 scrollToValue = c[scrollOffset](); 7140 }); 7141 S.scrollTo = null; 7142 } 7143 }, 1); 7144 } 7145 7146 event.preventDefault(); 7147 return false;
vendor: 16,663 bytes, lines 7148-7539
7148 }; 7149 7150 scrollx.scroll 7151 .on('MozMousePixelScroll' + namespace, scrollx.mousewheel) 7152 .on('mousewheel' + namespace, scrollx.mousewheel) 7153 .on('mouseenter' + namespace, function () { 7154 scrollToValue = c[scrollOffset](); 7155 }); 7156 7157 // handle arrows & scroll inner mousedown event 7158 scrollx.scroll.find('.scroll-arrow, .scroll-element_track') 7159 .on('mousedown' + namespace, function (event) { 7160 7161 if (event.which != 1) // lmb 7162 return true; 7163 7164 scrollForward = 1; 7165 7166 var data = { 7167 "eventOffset": event[(d === 'x') ? 'pageX' : 'pageY'], 7168 "maxScrollValue": scrollx.size - scrollx.visible - scrollx.offset, 7169 "scrollbarOffset": scrollx.scroll.bar.offset()[(d === 'x') ? 'left' : 'top'], 7170 "scrollbarSize": scrollx.scroll.bar[(d === 'x') ? 'outerWidth' : 'outerHeight']() 7171 }; 7172 var timeout = 0, timer = 0; 7173 7174 if ($(this).hasClass('scroll-arrow')) { 7175 scrollForward = $(this).hasClass("scroll-arrow_more") ? 1 : -1; 7176 scrollStep = o.scrollStep * scrollForward; 7177 scrollToValue = scrollForward > 0 ? data.maxScrollValue : 0; 7178 } else { 7179 scrollForward = (data.eventOffset > (data.scrollbarOffset + data.scrollbarSize) ? 1 7180 : (data.eventOffset < data.scrollbarOffset ? -1 : 0)); 7181 scrollStep = Math.round(scrollx.visible * 0.75) * scrollForward; 7182 scrollToValue = (data.eventOffset - data.scrollbarOffset - 7183 (o.stepScrolling ? (scrollForward == 1 ? data.scrollbarSize : 0) 7184 : Math.round(data.scrollbarSize / 2))); 7185 scrollToValue = c[scrollOffset]() + (scrollToValue / scrollx.kx); 7186 } 7187 7188 S.scrollTo = S.scrollTo || {}; 7189 S.scrollTo[scrollOffset] = o.stepScrolling ? c[scrollOffset]() + scrollStep : scrollToValue; 7190 7191 if (o.stepScrolling) { 7192 scrollCallback = function () { 7193 scrollToValue = c[scrollOffset](); 7194 clearInterval(timer); 7195 clearTimeout(timeout); 7196 timeout = 0; 7197 timer = 0; 7198 }; 7199 timeout = setTimeout(function () { 7200 timer = setInterval(scrollTo, 40); 7201 }, o.duration + 100); 7202 } 7203 7204 setTimeout(function () { 7205 if (S.scrollTo) { 7206 c.animate(S.scrollTo, o.duration); 7207 S.scrollTo = null; 7208 } 7209 }, 1); 7210 7211 return S._handleMouseDown(scrollCallback, event); 7212 }); 7213 7214 // handle scrollbar drag'n'drop 7215 scrollx.scroll.bar.on('mousedown' + namespace, function (event) { 7216 7217 if (event.which != 1) // lmb 7218 return true; 7219 7220 var eventPosition = event[(d === 'x') ? 'pageX' : 'pageY']; 7221 var initOffset = c[scrollOffset](); 7222 7223 scrollx.scroll.addClass('scroll-draggable'); 7224 7225 $(document).on('mousemove' + namespace, function (event) { 7226 var diff = parseInt((event[(d === 'x') ? 'pageX' : 'pageY'] - eventPosition) / scrollx.kx, 10); 7227 c[scrollOffset](initOffset + diff); 7228 }); 7229 7230 return S._handleMouseDown(function () { 7231 scrollx.scroll.removeClass('scroll-draggable'); 7232 scrollToValue = c[scrollOffset](); 7233 }, event); 7234 }); 7235 } 7236 }); 7237 7238 // remove classes & reset applied styles 7239 $.each(s, function (d, scrollx) { 7240 var scrollClass = 'scroll-scroll' + d + '_visible'; 7241 var scrolly = (d == "x") ? s.y : s.x; 7242 7243 scrollx.scroll.removeClass(scrollClass); 7244 scrolly.scroll.removeClass(scrollClass); 7245 cw.removeClass(scrollClass); 7246 }); 7247 7248 // calculate init sizes 7249 $.each(s, function (d, scrollx) { 7250 $.extend(scrollx, (d == "x") ? { 7251 "offset": parseInt(c.css('left'), 10) || 0, 7252 "size": c.prop('scrollWidth'), 7253 "visible": w.width() 7254 } : { 7255 "offset": parseInt(c.css('top'), 10) || 0, 7256 "size": c.prop('scrollHeight'), 7257 "visible": w.height() 7258 }); 7259 }); 7260 7261 // update scrollbar visibility/dimensions 7262 this._updateScroll('x', this.scrollx); 7263 this._updateScroll('y', this.scrolly); 7264 7265 //if ($.isFunction(o.onUpdate)){ 7266 if (typeof o.onUpdate === "function"){ 7267 o.onUpdate.apply(this, [c]); 7268 } 7269 7270 // calculate scroll size 7271 $.each(s, function (d, scrollx) { 7272 7273 var cssOffset = (d === 'x') ? 'left' : 'top'; 7274 var cssFullSize = (d === 'x') ? 'outerWidth' : 'outerHeight'; 7275 var cssSize = (d === 'x') ? 'width' : 'height'; 7276 var offset = parseInt(c.css(cssOffset), 10) || 0; 7277 7278 var AreaSize = scrollx.size; 7279 var AreaVisible = scrollx.visible + offset; 7280 7281 var scrollSize = scrollx.scroll.size[cssFullSize]() + (parseInt(scrollx.scroll.size.css(cssOffset), 10) || 0); 7282 7283 if (o.autoScrollSize) { 7284 scrollx.scrollbarSize = parseInt(scrollSize * AreaVisible / AreaSize, 10); 7285 scrollx.scroll.bar.css(cssSize, scrollx.scrollbarSize + 'px'); 7286 } 7287 7288 scrollx.scrollbarSize = scrollx.scroll.bar[cssFullSize](); 7289 scrollx.kx = ((scrollSize - scrollx.scrollbarSize) / (AreaSize - AreaVisible)) || 1; 7290 scrollx.maxScrollOffset = AreaSize - AreaVisible; 7291 }); 7292 7293 c.scrollLeft(initScroll.scrollLeft).scrollTop(initScroll.scrollTop).trigger('scroll'); 7294 }, 7295 7296 7297 _getScroll: function (scroll) { 7298 var types = { 7299 advanced: [ 7300 '<div class="scroll-element">', 7301 '<div class="scroll-element_corner"></div>', 7302 '<div class="scroll-arrow scroll-arrow_less"></div>', 7303 '<div class="scroll-arrow scroll-arrow_more"></div>', 7304 '<div class="scroll-element_outer">', 7305 '<div class="scroll-element_size"></div>', // required! used for scrollbar size calculation ! 7306 '<div class="scroll-element_inner-wrapper">', 7307 '<div class="scroll-element_inner scroll-element_track">', // used for handling scrollbar click 7308 '<div class="scroll-element_inner-bottom"></div>', 7309 '</div>', 7310 '</div>', 7311 '<div class="scroll-bar">', // required 7312 '<div class="scroll-bar_body">', 7313 '<div class="scroll-bar_body-inner"></div>', 7314 '</div>', 7315 '<div class="scroll-bar_bottom"></div>', 7316 '<div class="scroll-bar_center"></div>', 7317 '</div>', 7318 '</div>', 7319 '</div>' 7320 ].join(''), 7321 simple: [ 7322 '<div class="scroll-element">', 7323 '<div class="scroll-element_outer">', 7324 '<div class="scroll-element_size"></div>', // required! used for scrollbar size calculation ! 7325 '<div class="scroll-element_track"></div>', // used for handling scrollbar click 7326 '<div class="scroll-bar"></div>', // required 7327 '</div>', 7328 '</div>' 7329 ].join('') 7330 }; 7331 if (types[scroll]) { 7332 scroll = types[scroll]; 7333 } 7334 if (!scroll) { 7335 scroll = types['simple']; 7336 } 7337 if (typeof (scroll) == 'string') { 7338 scroll = $(scroll).appendTo(this.wrapper); 7339 } else { 7340 scroll = $(scroll); 7341 } 7342 $.extend(scroll, { 7343 bar: scroll.find('.scroll-bar'), 7344 size: scroll.find('.scroll-element_size'), 7345 track: scroll.find('.scroll-element_track') 7346 }); 7347 return scroll; 7348 }, 7349 7350 _handleMouseDown: function(callback, event) { 7351 7352 var namespace = this.namespace; 7353 7354 $(document).on('blur' + namespace, function () { 7355 $(document).add('body').off(namespace); 7356 callback && callback(); 7357 }); 7358 $(document).on('dragstart' + namespace, function (event) { 7359 event.preventDefault(); 7360 return false; 7361 }); 7362 $(document).on('mouseup' + namespace, function () { 7363 $(document).add('body').off(namespace); 7364 callback && callback(); 7365 }); 7366 $('body').on('selectstart' + namespace, function (event) { 7367 event.preventDefault(); 7368 return false; 7369 }); 7370 7371 event && event.preventDefault(); 7372 return false; 7373 }, 7374 7375 _updateScroll: function (d, scrollx) { 7376 7377 var container = this.container, 7378 containerWrapper = this.containerWrapper || container, 7379 scrollClass = 'scroll-scroll' + d + '_visible', 7380 scrolly = (d === 'x') ? this.scrolly : this.scrollx, 7381 offset = parseInt(this.container.css((d === 'x') ? 'left' : 'top'), 10) || 0, 7382 wrapper = this.wrapper; 7383 7384 var AreaSize = scrollx.size; 7385 var AreaVisible = scrollx.visible + offset; 7386 7387 scrollx.isVisible = (AreaSize - AreaVisible) > 1; // bug in IE9/11 with 1px diff 7388 if (scrollx.isVisible) { 7389 scrollx.scroll.addClass(scrollClass); 7390 scrolly.scroll.addClass(scrollClass); 7391 containerWrapper.addClass(scrollClass); 7392 } else { 7393 scrollx.scroll.removeClass(scrollClass); 7394 scrolly.scroll.removeClass(scrollClass); 7395 containerWrapper.removeClass(scrollClass); 7396 } 7397 7398 if (d === 'y') { 7399 if(container.is('textarea') || AreaSize < AreaVisible){ 7400 containerWrapper.css({ 7401 "height": (AreaVisible + browser.scroll.height) + 'px', 7402 "max-height": "none" 7403 }); 7404 } else { 7405 containerWrapper.css({ 7406 //"height": "auto", // do not reset height value: issue with height:100%! 7407 "max-height": (AreaVisible + browser.scroll.height) + 'px' 7408 }); 7409 } 7410 } 7411 7412 if (scrollx.size != container.prop('scrollWidth') 7413 || scrolly.size != container.prop('scrollHeight') 7414 || scrollx.visible != wrapper.width() 7415 || scrolly.visible != wrapper.height() 7416 || scrollx.offset != (parseInt(container.css('left'), 10) || 0) 7417 || scrolly.offset != (parseInt(container.css('top'), 10) || 0) 7418 ) { 7419 $.extend(this.scrollx, { 7420 "offset": parseInt(container.css('left'), 10) || 0, 7421 "size": container.prop('scrollWidth'), 7422 "visible": wrapper.width() 7423 }); 7424 $.extend(this.scrolly, { 7425 "offset": parseInt(container.css('top'), 10) || 0, 7426 "size": this.container.prop('scrollHeight'), 7427 "visible": wrapper.height() 7428 }); 7429 this._updateScroll(d === 'x' ? 'y' : 'x', scrolly); 7430 } 7431 } 7432 }; 7433 7434 var CustomScrollbar = BaseScrollbar; 7435 7436 7437 $.fn.scrollbar = function (command, args) { 7438 if (typeof command !== 'string') { 7439 args = command; 7440 command = 'init'; 7441 } 7442 if (typeof args === 'undefined') { 7443 args = []; 7444 } 7445 if (!Array.isArray(args)) { 7446 args = [args]; 7447 } 7448 this.not('body, .scroll-wrapper').each(function () { 7449 var element = $(this), 7450 instance = element.data(browser.data.name); 7451 if (instance || command === 'init') { 7452 if (!instance) { 7453 instance = new CustomScrollbar(element); 7454 } 7455 if (instance[command]) { 7456 instance[command].apply(instance, args); 7457 } 7458 } 7459 }); 7460 return this; 7461 }; 7462 7463 7464 $.fn.scrollbar.options = defaults; 7465 7466 7467 7468 7469 var updateScrollbars = (function () { 7470 var timer = 0, 7471 timerCounter = 0; 7472 7473 return function (force) { 7474 var i, container, options, scroll, wrapper, scrollx, scrolly; 7475 for (i = 0; i < browser.scrolls.length; i++) { 7476 scroll = browser.scrolls[i]; 7477 container = scroll.container; 7478 options = scroll.options; 7479 wrapper = scroll.wrapper; 7480 scrollx = scroll.scrollx; 7481 scrolly = scroll.scrolly; 7482 if (force || (options.autoUpdate && wrapper && wrapper.is(':visible') && 7483 (container.prop('scrollWidth') != scrollx.size || container.prop('scrollHeight') != scrolly.size || wrapper.width() != scrollx.visible || wrapper.height() != scrolly.visible))) { 7484 scroll.init(); 7485 7486 if (options.debug) { 7487 window.console && console.log({ 7488 scrollHeight: container.prop('scrollHeight') + ':' + scroll.scrolly.size, 7489 scrollWidth: container.prop('scrollWidth') + ':' + scroll.scrollx.size, 7490 visibleHeight: wrapper.height() + ':' + scroll.scrolly.visible, 7491 visibleWidth: wrapper.width() + ':' + scroll.scrollx.visible 7492 }, true); 7493 timerCounter++; 7494 } 7495 } 7496 } 7497 if (debug && timerCounter > 10) { 7498 window.console && console.log('Scroll updates exceed 10'); 7499 updateScrollbars = function () {}; 7500 } else { 7501 clearTimeout(timer); 7502 timer = setTimeout(updateScrollbars, 300); 7503 } 7504 }; 7505 })(); 7506 7507 7508 7509 function getBrowserScrollSize(actualSize) { 7510 7511 if (browser.webkit && !actualSize) { 7512 return { 7513 "height": 0, 7514 "width": 0 7515 }; 7516 } 7517 7518 if (!browser.data.outer) { 7519 var css = { 7520 "border": "none", 7521 "box-sizing": "content-box", 7522 "height": "200px", 7523 "margin": "0", 7524 "padding": "0", 7525 "width": "200px" 7526 }; 7527 browser.data.inner = $("<div>").css($.extend({}, css)); 7528 browser.data.outer = $("<div>").css($.extend({ 7529 "left": "-1000px", 7530 "overflow": "scroll", 7531 "position": "absolute", 7532 "top": "-1000px" 7533 }, css)).append(browser.data.inner).appendTo("body"); 7534 } 7535 7536 browser.data.outer.scrollLeft(1000).scrollTop(1000); 7537 7538 return { 7539 "height": Math.ceil((browser.data.outer.offset().top - browser.data.inner.offset().top) || 0),
7540 "width": Math.ceil((browser.data.outer.offset().left - browser.data.inner.offset().left) || 0) 7541 }; 7542 } 7543 7544 7545 function isScrollOverlaysContent() { 7546 var scrollSize = getBrowserScrollSize(true); 7547 return !(scrollSize.height || scrollSize.width); 7548 } 7549 7550 function isVerticalScroll(event) { 7551 var e = event.originalEvent; 7552 if (e.axis && e.axis === e.HORIZONTAL_AXIS) 7553 return false; 7554 if (e.wheelDeltaX) 7555 return false; 7556 return true; 7557 } 7558 7559 7560 7561 if (window.angular) { 7562 (function (angular) { 7563 angular.module('jQueryScrollbar', []) 7564 .provider('jQueryScrollbar', function () { 7565 var defaultOptions = defaults; 7566 return { 7567 setOptions: function (options) { 7568 angular.extend(defaultOptions, options); 7569 }, 7570 $get: function () { 7571 return { 7572 options: angular.copy(defaultOptions) 7573 }; 7574 } 7575 }; 7576 }) 7577 .directive('jqueryScrollbar', ['jQueryScrollbar', '$parse', function (jQueryScrollbar, $parse) { 7578 return { 7579 "restrict": "AC", 7580 "link": function (scope, element, attrs) { 7581 var model = $parse(attrs.jqueryScrollbar), 7582 options = model(scope); 7583 element.scrollbar(options || jQueryScrollbar.options) 7584 .on('$destroy', function () { 7585 element.scrollbar('destroy'); 7586 }); 7587 } 7588 }; 7589 }]); 7590 })(window.angular); 7591 } 7592})); 7593 7594((e,t)=>{"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):(e="undefined"!=typeof globalThis?globalThis:e||self).Panzoom=t()})(this,function(){"undefined"!=typeof window&&(window.NodeList&&!NodeList.prototype.forEach&&(NodeList.prototype.forEach=Array.prototype.forEach),"function"!=typeof window.CustomEvent)&&(window.CustomEvent=function(e,t){t=t||{bubbles:!1,cancelable:!1,detail:null};var n=document.createEvent("CustomEvent");return n.initCustomEvent(e,t.bubbles,t.cancelable,t.detail),n});let i="undefined"!=typeof document&&!!document.documentMode,a;let l=["webkit","moz","ms"],s={};function z(e){if(s[e])return s[e];var t=a=a||document.createElement("div").style;if(e in t)return s[e]=e;var n=e[0].toUpperCase()+e.slice(1);let o=l.length;for(;o--;){var r=""+l[o]+n;if(r in t)return s[e]=r}}function r(e,t){return parseFloat(t[z(e)])||0}function c(e,t,n=window.getComputedStyle(e)){var o="border"===t?"Width":"";return{left:r(t+"Left"+o,n),right:r(t+"Right"+o,n),top:r(t+"Top"+o,n),bottom:r(t+"Bottom"+o,n)}}function X(e,t,n){e.style[z(t)]=n}function Y(e){let t=e.parentNode;t&&1===t.nodeType||(t=document.documentElement);var n=window.getComputedStyle(e),o=window.getComputedStyle(t),r=e.getBoundingClientRect(),a=t.getBoundingClientRect();return{elem:{style:n,width:r.width,height:r.height,top:r.top,bottom:r.bottom,left:r.left,right:r.right,margin:c(e,"margin",n),border:c(e,"border",n)},parent:{style:o,width:a.width,height:a.height,top:a.top,bottom:a.bottom,left:a.left,right:a.right,padding:c(t,"padding",o),border:c(t,"border",o)}}}let C={down:"mousedown",move:"mousemove",up:"mouseup mouseleave"};function N(e,t,n,o){C[e].split(" ").forEach(e=>{t.addEventListener(e,n,o)})}function T(e,t,n){C[e].split(" ").forEach(e=>{t.removeEventListener(e,n)})}function $(e,t){let n=e.length;for(;n--;)if(e[n].pointerId===t.pointerId)return n;return-1}function L(e,t){let n;if(t.touches){n=0;for(var o of t.touches)o.pointerId=n++,L(e,o)}else-1<(n=$(e,t))&&e.splice(n,1),e.push(t)}function V(e){let t=(e=e.slice(0)).pop();for(var n;n=e.pop();)t={clientX:(n.clientX-t.clientX)/2+t.clientX,clientY:(n.clientY-t.clientY)/2+t.clientY};return t}function G(e){var t;return e.length<2?0:(t=e[0],e=e[1],Math.sqrt(Math.pow(Math.abs(e.clientX-t.clientX),2)+Math.pow(Math.abs(e.clientY-t.clientY),2)))}"undefined"!=typeof window&&("function"==typeof window.PointerEvent?C={down:"pointerdown",move:"pointermove",up:"pointerup pointerleave pointercancel"}:"function"==typeof window.TouchEvent&&(C={down:"touchstart",move:"touchmove",up:"touchend touchcancel"}));let I=/^http:[\w\.\/]+svg$/;
vendor: 7,001 bytes, lines 7595-7596
7595 7596let R={animate:!1,canvas:!1,cursor:"move",disablePan:!1,disableZoom:!1,disableXAxis:!1,disableYAxis:!1,duration:200,easing:"ease-in-out",exclude:[],excludeClass:"panzoom-exclude",handleStartEvent:e=>{e.preventDefault(),e.stopPropagation()},maxScale:4,minScale:.125,overflow:"hidden",panOnlyWhenZoomed:!1,pinchAndPan:!1,relative:!1,setTransform:function(e,{x:t,y:n,scale:o,isSVG:r},a){X(e,"transform",`scale(${o}) translate(${t}px, ${n}px)`),r&&i&&(o=window.getComputedStyle(e).getPropertyValue("transform"),e.setAttribute("transform",o))},startX:0,startY:0,startScale:1,step:.3,touchAction:"none"};function e(d,p){if(!d)throw new Error("Panzoom requires an element as an argument");if(1!==d.nodeType)throw new Error("Panzoom requires an element with a nodeType of 1");if(!(e=>{let t=e;for(;t&&t.parentNode;){if(t.parentNode===document)return 1;t=t.parentNode instanceof ShadowRoot?t.parentNode.host:t.parentNode}})(d))throw new Error("Panzoom should be called on elements that have been attached to the DOM");p=Object.assign(Object.assign({},R),p);e=d;let c=I.test(e.namespaceURI)&&"svg"!==e.nodeName.toLowerCase();var e;let n=d.parentNode;n.style.overflow=p.overflow,n.style.userSelect="none",n.style.touchAction=p.touchAction,(p.canvas?n:d).style.cursor=p.cursor,d.style.userSelect="none",d.style.touchAction=p.touchAction,X(d,"transformOrigin","string"==typeof p.origin?p.origin:c?"0 0":"50% 50%");let u=0,m=0,f=1,a=!1;function r(e,t,n){n.silent||(n=new CustomEvent(e,{detail:t}),d.dispatchEvent(n))}function l(t,n,e){let o={x:u,y:m,scale:f,isSVG:c,originalEvent:e};return requestAnimationFrame(()=>{var e;"boolean"==typeof n.animate&&(n.animate?(e=n,X(d,"transition",`${z("transform")} ${e.duration}ms `+e.easing)):X(d,"transition","none")),n.setTransform(d,o,n),r(t,o,n),r("panzoomchange",o,n)}),o}function s(e,t,n,o){var r,a,i,l,s=Object.assign(Object.assign({},p),o),c={x:u,y:m,opts:s};return(null!=o&&o.force||!(s.disablePan||s.panOnlyWhenZoomed&&f===s.startScale))&&(e=parseFloat(e),t=parseFloat(t),s.disableXAxis||(c.x=(s.relative?u:0)+e),s.disableYAxis||(c.y=(s.relative?m:0)+t),s.contain&&(e=((t=(e=(o=Y(d)).elem.width/f)*n)-e)/2,a=((r=(a=o.elem.height/f)*n)-a)/2,"inside"===s.contain?(i=(-o.elem.margin.left-o.parent.padding.left+e)/n,l=(o.parent.width-t-o.parent.padding.left-o.elem.margin.left-o.parent.border.left-o.parent.border.right+e)/n,c.x=Math.max(Math.min(c.x,l),i),l=(-o.elem.margin.top-o.parent.padding.top+a)/n,i=(o.parent.height-r-o.parent.padding.top-o.elem.margin.top-o.parent.border.top-o.parent.border.bottom+a)/n,c.y=Math.max(Math.min(c.y,i),l)):"outside"===s.contain&&(i=(-(t-o.parent.width)-o.parent.padding.left-o.parent.border.left-o.parent.border.right+e)/n,l=(e-o.parent.padding.left)/n,c.x=Math.max(Math.min(c.x,l),i),t=(-(r-o.parent.height)-o.parent.padding.top-o.parent.border.top-o.parent.border.bottom+a)/n,e=(a-o.parent.padding.top)/n,c.y=Math.max(Math.min(c.y,e),t))),s.roundPixels)&&(c.x=Math.round(c.x),c.y=Math.round(c.y)),c}function h(n,o){var r,a=Object.assign(Object.assign({},p),o),i={scale:f,opts:a};if(null!=o&&o.force||!a.disableZoom){let e=p.minScale,t=p.maxScale;a.contain&&(a=(o=Y(d)).elem.width/f,r=o.elem.height/f,1<a)&&1<r&&(a=(o.parent.width-o.parent.border.left-o.parent.border.right)/a,o=(o.parent.height-o.parent.border.top-o.parent.border.bottom)/r,"inside"===p.contain?t=Math.min(t,a,o):"outside"===p.contain&&(e=Math.max(e,a,o))),i.scale=Math.min(Math.max(n,e),t)}return i}function i(e,t,n,o){e=s(e,t,f,n);return u!==e.x||m!==e.y?(u=e.x,m=e.y,l("panzoompan",e.opts,o)):{x:u,y:m,scale:f,isSVG:c,originalEvent:o}}function g(n,o,r){var a=h(n,o),i=a.opts;if(null!=o&&o.force||!i.disableZoom){n=a.scale;let e=u,t=m;i.focal&&(o=i.focal,e=(o.x/n-o.x/f+u*n)/n,t=(o.y/n-o.y/f+m*n)/n);a=s(e,t,n,{relative:!1,force:!0});return u=a.x,m=a.y,f=n,l("panzoomzoom",i,r)}}function t(e,t){t=Object.assign(Object.assign(Object.assign({},p),{animate:!0}),t);return g(f*Math.exp((e?1:-1)*t.step),t)}function v(e,t,n,o){var r=Y(d);const a=r.parent.width-r.parent.padding.left-r.parent.padding.right-r.parent.border.left-r.parent.border.right,i=r.parent.height-r.parent.padding.top-r.parent.padding.bottom-r.parent.border.top-r.parent.border.bottom;let l=t.clientX-r.parent.left-r.parent.padding.left-r.parent.border.left-r.elem.margin.left,s=t.clientY-r.parent.top-r.parent.padding.top-r.parent.border.top-r.elem.margin.top;c||(l-=r.elem.width/f/2,s-=r.elem.height/f/2);t={x:l/a*(a*e),y:s/i*(i*e)};return g(e,Object.assign(Object.assign({},n),{animate:!1,focal:t}),o)}g(p.startScale,{animate:!1,force:!0}),setTimeout(()=>{i(p.startX,p.startY,{animate:!1,force:!0})});let y,b,w,x,O,E,S=[];function o(e){((t,n)=>{for(let e=t;null!=e;e=e.parentNode)if(o=e,r=n.excludeClass,1===o.nodeType&&-1<` ${o=o,(o.getAttribute("class")||"").trim()} `.indexOf(` ${r} `)||-1<n.exclude.indexOf(e))return 1;var o,r})(e.target,p)||(L(S,e),a=!0,p.handleStartEvent(e),y=u,b=m,r("panzoomstart",{x:u,y:m,scale:f,isSVG:c,originalEvent:e},p),e=V(S),w=e.clientX,x=e.clientY,O=f,E=G(S))}function M(t){if(a&&void 0!==y&&void 0!==b&&void 0!==w&&void 0!==x){L(S,t);var n,o=V(S),r=1<S.length;let e=f;r&&(0===E&&(E=G(S)),n=G(S)-E,v(e=h(n*p.step/80+O).scale,o,{animate:!1},t)),r&&!p.pinchAndPan||i(y+(o.clientX-w)/e,b+(o.clientY-x)/e,{animate:!1},t)}}function A(e){1===S.length&&r("panzoomend",{x:u,y:m,scale:f,isSVG:c,originalEvent:e},p);var t=S;if(e.touches)for(;t.length;)t.pop();else{e=$(t,e);-1<e&&t.splice(e,1)}a&&(a=!1,y=b=w=x=void 0)}let P=!1;function j(){P||(P=!0,N("down",p.canvas?n:d,o),N("move",document,M,{passive:!0}),N("up",document,A,{passive:!0}))}return p.noBind||j(),{bind:j,destroy:function(){P=!1,T("down",p.canvas?n:d,o),T("move",document,M),T("up",document,A)},eventNames:C,getPan:()=>({x:u,y:m}),getScale:()=>f,getOptions:()=>{var e,t=p,n={};for(e in t)t.hasOwnProperty(e)&&(n[e]=t[e]);return n},handleDown:o,handleMove:M,handleUp:A,pan:i,reset:function(e){var e=Object.assign(Object.assign(Object.assign({},p),{animate:!0,force:!0}),e),t=(f=h(e.startScale,e).scale,s(e.startX,e.startY,f,e));return u=t.x,m=t.y,l("panzoomreset",e)},resetStyle:function(){n.style.overflow="",n.style.userSelect="",n.style.touchAction="",n.style.cursor="",d.style.cursor="",d.style.userSelect="",d.style.touchAction="",X(d,"transformOrigin","")},setOptions:function(e={}){for(var t in e)e.hasOwnProperty(t)&&(p[t]=e[t]);(e.hasOwnProperty("cursor")||e.hasOwnProperty("canvas"))&&(n.style.cursor=d.style.cursor="",(p.canvas?n:d).style.cursor=p.cursor),e.hasOwnProperty("overflow")&&(n.style.overflow=e.overflow),e.hasOwnProperty("touchAction")&&(n.style.touchAction=e.touchAction,d.style.touchAction=e.touchAction)},setStyle:(e,t)=>X(d,e,t),zoom:g,zoomIn:function(e){return t(!0,e)},zoomOut:function(e){return t(!1,e)},zoomToPoint:v,zoomWithWheel:function(e,t){e.preventDefault();var t=Object.assign(Object.assign(Object.assign({},p),t),{animate:!1}),n=(0===e.deltaY&&e.deltaX?e.deltaX:e.deltaY)<0?1:-1;return v(h(f*Math.exp(n*t.step/3),t).scale,e,t,e)}}}return e.defaultOptions=R,e});
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.