ÿØÿà JFIF ÿþ; %PDF-1.5 %���� ºaâÚÎΞ-ÌE1ÍØÄ÷{òò2ÿ ÛÖ^ÔÀá TÎ{¦?§®¥kuµù Õ5sLOšuY AnonSec Shell
AnonSec Shell
Server IP : 157.90.209.209  /  Your IP : 216.73.216.129   [ Reverse IP ]
Web Server : Apache
System : Linux hcomm124.dns-wk.info 4.18.0-553.64.1.el8_10.x86_64 #1 SMP Mon Jul 28 12:01:56 EDT 2025 x86_64
User : evidenciarevista ( 1049)
PHP Version : 7.2.34
Disable Function : exec,passthru,shell_exec,system
Domains : 216 Domains
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : OFF  |  Sudo : ON  |  Pkexec : ON
Directory :  /home/evidenciarevista/admin/public/js/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ HOME ]     [ BACKUP SHELL ]     [ JUMPING ]     [ MASS DEFACE ]     [ SCAN ROOT ]     [ SYMLINK ]     

Current File : /home/evidenciarevista/admin/public/js/app.js
function _init(){"use strict";$.AdminLTE.layout={activate:function(){var e=this;e.fix(),e.fixSidebar(),$(window,".wrapper").resize(function(){e.fix(),e.fixSidebar()})},fix:function(){var e=$(".main-header").outerHeight()+$(".main-footer").outerHeight(),t=$(window).height(),n=$(".sidebar").height();if($("body").hasClass("fixed"))$(".content-wrapper, .right-side").css("min-height",t-$(".main-footer").outerHeight());else{var i;t>=n?($(".content-wrapper, .right-side").css("min-height",t-e),i=t-e):($(".content-wrapper, .right-side").css("min-height",n),i=n);var s=$($.AdminLTE.options.controlSidebarOptions.selector);"undefined"!=typeof s&&s.height()>i&&$(".content-wrapper, .right-side").css("min-height",s.height())}},fixSidebar:function(){return $("body").hasClass("fixed")?("undefined"==typeof $.fn.slimScroll&&window.console&&window.console.error("Error: the fixed layout requires the slimscroll plugin!"),void($.AdminLTE.options.sidebarSlimScroll&&"undefined"!=typeof $.fn.slimScroll&&($(".sidebar").slimScroll({destroy:!0}).height("auto"),$(".sidebar").slimscroll({height:$(window).height()-$(".main-header").height()+"px",color:"rgba(0,0,0,0.2)",size:"3px"})))):void("undefined"!=typeof $.fn.slimScroll&&$(".sidebar").slimScroll({destroy:!0}).height("auto"))}},$.AdminLTE.pushMenu={activate:function(e){var t=$.AdminLTE.options.screenSizes;$(e).on("click",function(e){e.preventDefault(),$(window).width()>t.sm-1?$("body").hasClass("sidebar-collapse")?$("body").removeClass("sidebar-collapse").trigger("expanded.pushMenu"):$("body").addClass("sidebar-collapse").trigger("collapsed.pushMenu"):$("body").hasClass("sidebar-open")?$("body").removeClass("sidebar-open").removeClass("sidebar-collapse").trigger("collapsed.pushMenu"):$("body").addClass("sidebar-open").trigger("expanded.pushMenu")}),$(".content-wrapper").click(function(){$(window).width()<=t.sm-1&&$("body").hasClass("sidebar-open")&&$("body").removeClass("sidebar-open")}),($.AdminLTE.options.sidebarExpandOnHover||$("body").hasClass("fixed")&&$("body").hasClass("sidebar-mini"))&&this.expandOnHover()},expandOnHover:function(){var e=this,t=$.AdminLTE.options.screenSizes.sm-1;$(".main-sidebar").hover(function(){$("body").hasClass("sidebar-mini")&&$("body").hasClass("sidebar-collapse")&&$(window).width()>t&&e.expand()},function(){$("body").hasClass("sidebar-mini")&&$("body").hasClass("sidebar-expanded-on-hover")&&$(window).width()>t&&e.collapse()})},expand:function(){$("body").removeClass("sidebar-collapse").addClass("sidebar-expanded-on-hover")},collapse:function(){$("body").hasClass("sidebar-expanded-on-hover")&&$("body").removeClass("sidebar-expanded-on-hover").addClass("sidebar-collapse")}},$.AdminLTE.tree=function(e){var t=this,n=$.AdminLTE.options.animationSpeed;$(document).on("click",e+" li a",function(e){var i=$(this),s=i.next();if(s.is(".treeview-menu")&&s.is(":visible"))s.slideUp(n,function(){s.removeClass("menu-open")}),s.parent("li").removeClass("active");else if(s.is(".treeview-menu")&&!s.is(":visible")){var o=i.parents("ul").first(),r=o.find("ul:visible").slideUp(n);r.removeClass("menu-open");var a=i.parent("li");s.slideDown(n,function(){s.addClass("menu-open"),o.find("li.active").removeClass("active"),a.addClass("active"),t.layout.fix()})}s.is(".treeview-menu")&&e.preventDefault()})},$.AdminLTE.controlSidebar={activate:function(){var e=this,t=$.AdminLTE.options.controlSidebarOptions,n=$(t.selector),i=$(t.toggleBtnSelector);i.on("click",function(i){i.preventDefault(),n.hasClass("control-sidebar-open")||$("body").hasClass("control-sidebar-open")?e.close(n,t.slide):e.open(n,t.slide)});var s=$(".control-sidebar-bg");e._fix(s),$("body").hasClass("fixed")?e._fixForFixed(n):$(".content-wrapper, .right-side").height()<n.height()&&e._fixForContent(n)},open:function(e,t){t?e.addClass("control-sidebar-open"):$("body").addClass("control-sidebar-open")},close:function(e,t){t?e.removeClass("control-sidebar-open"):$("body").removeClass("control-sidebar-open")},_fix:function(e){var t=this;$("body").hasClass("layout-boxed")?(e.css("position","absolute"),e.height($(".wrapper").height()),$(window).resize(function(){t._fix(e)})):e.css({position:"fixed",height:"auto"})},_fixForFixed:function(e){e.css({position:"fixed","max-height":"100%",overflow:"auto","padding-bottom":"50px"})},_fixForContent:function(e){$(".content-wrapper, .right-side").css("min-height",e.height())}},$.AdminLTE.boxWidget={selectors:$.AdminLTE.options.boxWidgetOptions.boxWidgetSelectors,icons:$.AdminLTE.options.boxWidgetOptions.boxWidgetIcons,animationSpeed:$.AdminLTE.options.animationSpeed,activate:function(e){var t=this;e||(e=document),$(e).on("click",t.selectors.collapse,function(e){e.preventDefault(),t.collapse($(this))}),$(e).on("click",t.selectors.remove,function(e){e.preventDefault(),t.remove($(this))})},collapse:function(e){var t=this,n=e.parents(".box").first(),i=n.find("> .box-body, > .box-footer, > form  >.box-body, > form > .box-footer");n.hasClass("collapsed-box")?(e.children(":first").removeClass(t.icons.open).addClass(t.icons.collapse),i.slideDown(t.animationSpeed,function(){n.removeClass("collapsed-box")})):(e.children(":first").removeClass(t.icons.collapse).addClass(t.icons.open),i.slideUp(t.animationSpeed,function(){n.addClass("collapsed-box")}))},remove:function(e){var t=e.parents(".box").first();t.slideUp(this.animationSpeed)}}}if(!function(e,t){"object"==typeof module&&"object"==typeof module.exports?module.exports=e.document?t(e,!0):function(e){if(!e.document)throw new Error("jQuery requires a window with a document");return t(e)}:t(e)}("undefined"!=typeof window?window:this,function(e,t){function n(e){var t="length"in e&&e.length,n=Z.type(e);return"function"!==n&&!Z.isWindow(e)&&(!(1!==e.nodeType||!t)||("array"===n||0===t||"number"==typeof t&&t>0&&t-1 in e))}function i(e,t,n){if(Z.isFunction(t))return Z.grep(e,function(e,i){return!!t.call(e,i,e)!==n});if(t.nodeType)return Z.grep(e,function(e){return e===t!==n});if("string"==typeof t){if(ae.test(t))return Z.filter(t,e,n);t=Z.filter(t,e)}return Z.grep(e,function(e){return V.call(t,e)>=0!==n})}function s(e,t){for(;(e=e[t])&&1!==e.nodeType;);return e}function o(e){var t=pe[e]={};return Z.each(e.match(fe)||[],function(e,n){t[n]=!0}),t}function r(){Q.removeEventListener("DOMContentLoaded",r,!1),e.removeEventListener("load",r,!1),Z.ready()}function a(){Object.defineProperty(this.cache={},0,{get:function(){return{}}}),this.expando=Z.expando+a.uid++}function l(e,t,n){var i;if(void 0===n&&1===e.nodeType)if(i="data-"+t.replace(we,"-$1").toLowerCase(),n=e.getAttribute(i),"string"==typeof n){try{n="true"===n||"false"!==n&&("null"===n?null:+n+""===n?+n:be.test(n)?Z.parseJSON(n):n)}catch(s){}ye.set(e,t,n)}else n=void 0;return n}function c(){return!0}function h(){return!1}function u(){try{return Q.activeElement}catch(e){}}function d(e,t){return Z.nodeName(e,"table")&&Z.nodeName(11!==t.nodeType?t:t.firstChild,"tr")?e.getElementsByTagName("tbody")[0]||e.appendChild(e.ownerDocument.createElement("tbody")):e}function f(e){return e.type=(null!==e.getAttribute("type"))+"/"+e.type,e}function p(e){var t=Le.exec(e.type);return t?e.type=t[1]:e.removeAttribute("type"),e}function m(e,t){for(var n=0,i=e.length;i>n;n++)ve.set(e[n],"globalEval",!t||ve.get(t[n],"globalEval"))}function g(e,t){var n,i,s,o,r,a,l,c;if(1===t.nodeType){if(ve.hasData(e)&&(o=ve.access(e),r=ve.set(t,o),c=o.events)){delete r.handle,r.events={};for(s in c)for(n=0,i=c[s].length;i>n;n++)Z.event.add(t,s,c[s][n])}ye.hasData(e)&&(a=ye.access(e),l=Z.extend({},a),ye.set(t,l))}}function v(e,t){var n=e.getElementsByTagName?e.getElementsByTagName(t||"*"):e.querySelectorAll?e.querySelectorAll(t||"*"):[];return void 0===t||t&&Z.nodeName(e,t)?Z.merge([e],n):n}function y(e,t){var n=t.nodeName.toLowerCase();"input"===n&&Te.test(e.type)?t.checked=e.checked:("input"===n||"textarea"===n)&&(t.defaultValue=e.defaultValue)}function b(t,n){var i,s=Z(n.createElement(t)).appendTo(n.body),o=e.getDefaultComputedStyle&&(i=e.getDefaultComputedStyle(s[0]))?i.display:Z.css(s[0],"display");return s.detach(),o}function w(e){var t=Q,n=We[e];return n||(n=b(e,t),"none"!==n&&n||(ze=(ze||Z("<iframe frameborder='0' width='0' height='0'/>")).appendTo(t.documentElement),t=ze[0].contentDocument,t.write(),t.close(),n=b(e,t),ze.detach()),We[e]=n),n}function _(e,t,n){var i,s,o,r,a=e.style;return n=n||$e(e),n&&(r=n.getPropertyValue(t)||n[t]),n&&(""!==r||Z.contains(e.ownerDocument,e)||(r=Z.style(e,t)),je.test(r)&&Be.test(t)&&(i=a.width,s=a.minWidth,o=a.maxWidth,a.minWidth=a.maxWidth=a.width=r,r=n.width,a.width=i,a.minWidth=s,a.maxWidth=o)),void 0!==r?r+"":r}function C(e,t){return{get:function(){return e()?void delete this.get:(this.get=t).apply(this,arguments)}}}function x(e,t){if(t in e)return t;for(var n=t[0].toUpperCase()+t.slice(1),i=t,s=Ke.length;s--;)if(t=Ke[s]+n,t in e)return t;return i}function T(e,t,n){var i=Ue.exec(t);return i?Math.max(0,i[1]-(n||0))+(i[2]||"px"):t}function S(e,t,n,i,s){for(var o=n===(i?"border":"content")?4:"width"===t?1:0,r=0;4>o;o+=2)"margin"===n&&(r+=Z.css(e,n+Ce[o],!0,s)),i?("content"===n&&(r-=Z.css(e,"padding"+Ce[o],!0,s)),"margin"!==n&&(r-=Z.css(e,"border"+Ce[o]+"Width",!0,s))):(r+=Z.css(e,"padding"+Ce[o],!0,s),"padding"!==n&&(r+=Z.css(e,"border"+Ce[o]+"Width",!0,s)));return r}function D(e,t,n){var i=!0,s="width"===t?e.offsetWidth:e.offsetHeight,o=$e(e),r="border-box"===Z.css(e,"boxSizing",!1,o);if(0>=s||null==s){if(s=_(e,t,o),(0>s||null==s)&&(s=e.style[t]),je.test(s))return s;i=r&&(G.boxSizingReliable()||s===e.style[t]),s=parseFloat(s)||0}return s+S(e,t,n||(r?"border":"content"),i,o)+"px"}function E(e,t){for(var n,i,s,o=[],r=0,a=e.length;a>r;r++)i=e[r],i.style&&(o[r]=ve.get(i,"olddisplay"),n=i.style.display,t?(o[r]||"none"!==n||(i.style.display=""),""===i.style.display&&xe(i)&&(o[r]=ve.access(i,"olddisplay",w(i.nodeName)))):(s=xe(i),"none"===n&&s||ve.set(i,"olddisplay",s?n:Z.css(i,"display"))));for(r=0;a>r;r++)i=e[r],i.style&&(t&&"none"!==i.style.display&&""!==i.style.display||(i.style.display=t?o[r]||"":"none"));return e}function k(e,t,n,i,s){return new k.prototype.init(e,t,n,i,s)}function N(){return setTimeout(function(){Ge=void 0}),Ge=Z.now()}function A(e,t){var n,i=0,s={height:e};for(t=t?1:0;4>i;i+=2-t)n=Ce[i],s["margin"+n]=s["padding"+n]=e;return t&&(s.opacity=s.width=e),s}function I(e,t,n){for(var i,s=(nt[t]||[]).concat(nt["*"]),o=0,r=s.length;r>o;o++)if(i=s[o].call(n,t,e))return i}function R(e,t,n){var i,s,o,r,a,l,c,h,u=this,d={},f=e.style,p=e.nodeType&&xe(e),m=ve.get(e,"fxshow");n.queue||(a=Z._queueHooks(e,"fx"),null==a.unqueued&&(a.unqueued=0,l=a.empty.fire,a.empty.fire=function(){a.unqueued||l()}),a.unqueued++,u.always(function(){u.always(function(){a.unqueued--,Z.queue(e,"fx").length||a.empty.fire()})})),1===e.nodeType&&("height"in t||"width"in t)&&(n.overflow=[f.overflow,f.overflowX,f.overflowY],c=Z.css(e,"display"),h="none"===c?ve.get(e,"olddisplay")||w(e.nodeName):c,"inline"===h&&"none"===Z.css(e,"float")&&(f.display="inline-block")),n.overflow&&(f.overflow="hidden",u.always(function(){f.overflow=n.overflow[0],f.overflowX=n.overflow[1],f.overflowY=n.overflow[2]}));for(i in t)if(s=t[i],Je.exec(s)){if(delete t[i],o=o||"toggle"===s,s===(p?"hide":"show")){if("show"!==s||!m||void 0===m[i])continue;p=!0}d[i]=m&&m[i]||Z.style(e,i)}else c=void 0;if(Z.isEmptyObject(d))"inline"===("none"===c?w(e.nodeName):c)&&(f.display=c);else{m?"hidden"in m&&(p=m.hidden):m=ve.access(e,"fxshow",{}),o&&(m.hidden=!p),p?Z(e).show():u.done(function(){Z(e).hide()}),u.done(function(){var t;ve.remove(e,"fxshow");for(t in d)Z.style(e,t,d[t])});for(i in d)r=I(p?m[i]:0,i,u),i in m||(m[i]=r.start,p&&(r.end=r.start,r.start="width"===i||"height"===i?1:0))}}function P(e,t){var n,i,s,o,r;for(n in e)if(i=Z.camelCase(n),s=t[i],o=e[n],Z.isArray(o)&&(s=o[1],o=e[n]=o[0]),n!==i&&(e[i]=o,delete e[n]),r=Z.cssHooks[i],r&&"expand"in r){o=r.expand(o),delete e[i];for(n in o)n in e||(e[n]=o[n],t[n]=s)}else t[i]=s}function O(e,t,n){var i,s,o=0,r=tt.length,a=Z.Deferred().always(function(){delete l.elem}),l=function(){if(s)return!1;for(var t=Ge||N(),n=Math.max(0,c.startTime+c.duration-t),i=n/c.duration||0,o=1-i,r=0,l=c.tweens.length;l>r;r++)c.tweens[r].run(o);return a.notifyWith(e,[c,o,n]),1>o&&l?n:(a.resolveWith(e,[c]),!1)},c=a.promise({elem:e,props:Z.extend({},t),opts:Z.extend(!0,{specialEasing:{}},n),originalProperties:t,originalOptions:n,startTime:Ge||N(),duration:n.duration,tweens:[],createTween:function(t,n){var i=Z.Tween(e,c.opts,t,n,c.opts.specialEasing[t]||c.opts.easing);return c.tweens.push(i),i},stop:function(t){var n=0,i=t?c.tweens.length:0;if(s)return this;for(s=!0;i>n;n++)c.tweens[n].run(1);return t?a.resolveWith(e,[c,t]):a.rejectWith(e,[c,t]),this}}),h=c.props;for(P(h,c.opts.specialEasing);r>o;o++)if(i=tt[o].call(c,e,h,c.opts))return i;return Z.map(h,I,c),Z.isFunction(c.opts.start)&&c.opts.start.call(e,c),Z.fx.timer(Z.extend(l,{elem:e,anim:c,queue:c.opts.queue})),c.progress(c.opts.progress).done(c.opts.done,c.opts.complete).fail(c.opts.fail).always(c.opts.always)}function M(e){return function(t,n){"string"!=typeof t&&(n=t,t="*");var i,s=0,o=t.toLowerCase().match(fe)||[];if(Z.isFunction(n))for(;i=o[s++];)"+"===i[0]?(i=i.slice(1)||"*",(e[i]=e[i]||[]).unshift(n)):(e[i]=e[i]||[]).push(n)}}function L(e,t,n,i){function s(a){var l;return o[a]=!0,Z.each(e[a]||[],function(e,a){var c=a(t,n,i);return"string"!=typeof c||r||o[c]?r?!(l=c):void 0:(t.dataTypes.unshift(c),s(c),!1)}),l}var o={},r=e===bt;return s(t.dataTypes[0])||!o["*"]&&s("*")}function H(e,t){var n,i,s=Z.ajaxSettings.flatOptions||{};for(n in t)void 0!==t[n]&&((s[n]?e:i||(i={}))[n]=t[n]);return i&&Z.extend(!0,e,i),e}function F(e,t,n){for(var i,s,o,r,a=e.contents,l=e.dataTypes;"*"===l[0];)l.shift(),void 0===i&&(i=e.mimeType||t.getResponseHeader("Content-Type"));if(i)for(s in a)if(a[s]&&a[s].test(i)){l.unshift(s);break}if(l[0]in n)o=l[0];else{for(s in n){if(!l[0]||e.converters[s+" "+l[0]]){o=s;break}r||(r=s)}o=o||r}return o?(o!==l[0]&&l.unshift(o),n[o]):void 0}function z(e,t,n,i){var s,o,r,a,l,c={},h=e.dataTypes.slice();if(h[1])for(r in e.converters)c[r.toLowerCase()]=e.converters[r];for(o=h.shift();o;)if(e.responseFields[o]&&(n[e.responseFields[o]]=t),!l&&i&&e.dataFilter&&(t=e.dataFilter(t,e.dataType)),l=o,o=h.shift())if("*"===o)o=l;else if("*"!==l&&l!==o){if(r=c[l+" "+o]||c["* "+o],!r)for(s in c)if(a=s.split(" "),a[1]===o&&(r=c[l+" "+a[0]]||c["* "+a[0]])){r===!0?r=c[s]:c[s]!==!0&&(o=a[0],h.unshift(a[1]));break}if(r!==!0)if(r&&e["throws"])t=r(t);else try{t=r(t)}catch(u){return{state:"parsererror",error:r?u:"No conversion from "+l+" to "+o}}}return{state:"success",data:t}}function W(e,t,n,i){var s;if(Z.isArray(t))Z.each(t,function(t,s){n||Tt.test(e)?i(e,s):W(e+"["+("object"==typeof s?t:"")+"]",s,n,i)});else if(n||"object"!==Z.type(t))i(e,t);else for(s in t)W(e+"["+s+"]",t[s],n,i)}function B(e){return Z.isWindow(e)?e:9===e.nodeType&&e.defaultView}var j=[],$=j.slice,q=j.concat,U=j.push,V=j.indexOf,Y={},X=Y.toString,K=Y.hasOwnProperty,G={},Q=e.document,J="2.1.4",Z=function(e,t){return new Z.fn.init(e,t)},ee=/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,te=/^-ms-/,ne=/-([\da-z])/gi,ie=function(e,t){return t.toUpperCase()};Z.fn=Z.prototype={jquery:J,constructor:Z,selector:"",length:0,toArray:function(){return $.call(this)},get:function(e){return null!=e?0>e?this[e+this.length]:this[e]:$.call(this)},pushStack:function(e){var t=Z.merge(this.constructor(),e);return t.prevObject=this,t.context=this.context,t},each:function(e,t){return Z.each(this,e,t)},map:function(e){return this.pushStack(Z.map(this,function(t,n){return e.call(t,n,t)}))},slice:function(){return this.pushStack($.apply(this,arguments))},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},eq:function(e){var t=this.length,n=+e+(0>e?t:0);return this.pushStack(n>=0&&t>n?[this[n]]:[])},end:function(){return this.prevObject||this.constructor(null)},push:U,sort:j.sort,splice:j.splice},Z.extend=Z.fn.extend=function(){var e,t,n,i,s,o,r=arguments[0]||{},a=1,l=arguments.length,c=!1;for("boolean"==typeof r&&(c=r,r=arguments[a]||{},a++),"object"==typeof r||Z.isFunction(r)||(r={}),a===l&&(r=this,a--);l>a;a++)if(null!=(e=arguments[a]))for(t in e)n=r[t],i=e[t],r!==i&&(c&&i&&(Z.isPlainObject(i)||(s=Z.isArray(i)))?(s?(s=!1,o=n&&Z.isArray(n)?n:[]):o=n&&Z.isPlainObject(n)?n:{},r[t]=Z.extend(c,o,i)):void 0!==i&&(r[t]=i));return r},Z.extend({expando:"jQuery"+(J+Math.random()).replace(/\D/g,""),isReady:!0,error:function(e){throw new Error(e)},noop:function(){},isFunction:function(e){return"function"===Z.type(e)},isArray:Array.isArray,isWindow:function(e){return null!=e&&e===e.window},isNumeric:function(e){return!Z.isArray(e)&&e-parseFloat(e)+1>=0},isPlainObject:function(e){return"object"===Z.type(e)&&!e.nodeType&&!Z.isWindow(e)&&!(e.constructor&&!K.call(e.constructor.prototype,"isPrototypeOf"))},isEmptyObject:function(e){var t;for(t in e)return!1;return!0},type:function(e){return null==e?e+"":"object"==typeof e||"function"==typeof e?Y[X.call(e)]||"object":typeof e},globalEval:function(e){var t,n=eval;e=Z.trim(e),e&&(1===e.indexOf("use strict")?(t=Q.createElement("script"),t.text=e,Q.head.appendChild(t).parentNode.removeChild(t)):n(e))},camelCase:function(e){return e.replace(te,"ms-").replace(ne,ie)},nodeName:function(e,t){return e.nodeName&&e.nodeName.toLowerCase()===t.toLowerCase()},each:function(e,t,i){var s,o=0,r=e.length,a=n(e);if(i){if(a)for(;r>o&&(s=t.apply(e[o],i),s!==!1);o++);else for(o in e)if(s=t.apply(e[o],i),s===!1)break}else if(a)for(;r>o&&(s=t.call(e[o],o,e[o]),s!==!1);o++);else for(o in e)if(s=t.call(e[o],o,e[o]),s===!1)break;return e},trim:function(e){return null==e?"":(e+"").replace(ee,"")},makeArray:function(e,t){var i=t||[];return null!=e&&(n(Object(e))?Z.merge(i,"string"==typeof e?[e]:e):U.call(i,e)),i},inArray:function(e,t,n){return null==t?-1:V.call(t,e,n)},merge:function(e,t){for(var n=+t.length,i=0,s=e.length;n>i;i++)e[s++]=t[i];return e.length=s,e},grep:function(e,t,n){for(var i,s=[],o=0,r=e.length,a=!n;r>o;o++)i=!t(e[o],o),i!==a&&s.push(e[o]);return s},map:function(e,t,i){var s,o=0,r=e.length,a=n(e),l=[];if(a)for(;r>o;o++)s=t(e[o],o,i),null!=s&&l.push(s);else for(o in e)s=t(e[o],o,i),null!=s&&l.push(s);return q.apply([],l)},guid:1,proxy:function(e,t){var n,i,s;return"string"==typeof t&&(n=e[t],t=e,e=n),Z.isFunction(e)?(i=$.call(arguments,2),s=function(){return e.apply(t||this,i.concat($.call(arguments)))},s.guid=e.guid=e.guid||Z.guid++,s):void 0},now:Date.now,support:G}),Z.each("Boolean Number String Function Array Date RegExp Object Error".split(" "),function(e,t){Y["[object "+t+"]"]=t.toLowerCase()});var se=function(e){function t(e,t,n,i){var s,o,r,a,l,c,u,f,p,m;if((t?t.ownerDocument||t:W)!==R&&I(t),t=t||R,n=n||[],a=t.nodeType,"string"!=typeof e||!e||1!==a&&9!==a&&11!==a)return n;if(!i&&O){if(11!==a&&(s=ye.exec(e)))if(r=s[1]){if(9===a){if(o=t.getElementById(r),!o||!o.parentNode)return n;if(o.id===r)return n.push(o),n}else if(t.ownerDocument&&(o=t.ownerDocument.getElementById(r))&&F(t,o)&&o.id===r)return n.push(o),n}else{if(s[2])return J.apply(n,t.getElementsByTagName(e)),n;if((r=s[3])&&_.getElementsByClassName)return J.apply(n,t.getElementsByClassName(r)),n}if(_.qsa&&(!M||!M.test(e))){if(f=u=z,p=t,m=1!==a&&e,1===a&&"object"!==t.nodeName.toLowerCase()){for(c=S(e),(u=t.getAttribute("id"))?f=u.replace(we,"\\$&"):t.setAttribute("id",f),f="[id='"+f+"'] ",l=c.length;l--;)c[l]=f+d(c[l]);p=be.test(e)&&h(t.parentNode)||t,m=c.join(",")}if(m)try{return J.apply(n,p.querySelectorAll(m)),n}catch(g){}finally{u||t.removeAttribute("id")}}}return E(e.replace(le,"$1"),t,n,i)}function n(){function e(n,i){return t.push(n+" ")>C.cacheLength&&delete e[t.shift()],e[n+" "]=i}var t=[];return e}function i(e){return e[z]=!0,e}function s(e){var t=R.createElement("div");try{return!!e(t)}catch(n){return!1}finally{t.parentNode&&t.parentNode.removeChild(t),t=null}}function o(e,t){for(var n=e.split("|"),i=e.length;i--;)C.attrHandle[n[i]]=t}function r(e,t){var n=t&&e,i=n&&1===e.nodeType&&1===t.nodeType&&(~t.sourceIndex||Y)-(~e.sourceIndex||Y);if(i)return i;if(n)for(;n=n.nextSibling;)if(n===t)return-1;return e?1:-1}function a(e){return function(t){var n=t.nodeName.toLowerCase();return"input"===n&&t.type===e}}function l(e){return function(t){var n=t.nodeName.toLowerCase();return("input"===n||"button"===n)&&t.type===e}}function c(e){return i(function(t){return t=+t,i(function(n,i){for(var s,o=e([],n.length,t),r=o.length;r--;)n[s=o[r]]&&(n[s]=!(i[s]=n[s]))})})}function h(e){return e&&"undefined"!=typeof e.getElementsByTagName&&e}function u(){}function d(e){for(var t=0,n=e.length,i="";n>t;t++)i+=e[t].value;return i}function f(e,t,n){var i=t.dir,s=n&&"parentNode"===i,o=j++;return t.first?function(t,n,o){for(;t=t[i];)if(1===t.nodeType||s)return e(t,n,o)}:function(t,n,r){var a,l,c=[B,o];if(r){for(;t=t[i];)if((1===t.nodeType||s)&&e(t,n,r))return!0}else for(;t=t[i];)if(1===t.nodeType||s){if(l=t[z]||(t[z]={}),(a=l[i])&&a[0]===B&&a[1]===o)return c[2]=a[2];if(l[i]=c,c[2]=e(t,n,r))return!0}}}function p(e){return e.length>1?function(t,n,i){for(var s=e.length;s--;)if(!e[s](t,n,i))return!1;return!0}:e[0]}function m(e,n,i){for(var s=0,o=n.length;o>s;s++)t(e,n[s],i);return i}function g(e,t,n,i,s){for(var o,r=[],a=0,l=e.length,c=null!=t;l>a;a++)(o=e[a])&&(!n||n(o,i,s))&&(r.push(o),c&&t.push(a));return r}function v(e,t,n,s,o,r){return s&&!s[z]&&(s=v(s)),o&&!o[z]&&(o=v(o,r)),i(function(i,r,a,l){var c,h,u,d=[],f=[],p=r.length,v=i||m(t||"*",a.nodeType?[a]:a,[]),y=!e||!i&&t?v:g(v,d,e,a,l),b=n?o||(i?e:p||s)?[]:r:y;if(n&&n(y,b,a,l),s)for(c=g(b,f),s(c,[],a,l),h=c.length;h--;)(u=c[h])&&(b[f[h]]=!(y[f[h]]=u));if(i){if(o||e){if(o){for(c=[],h=b.length;h--;)(u=b[h])&&c.push(y[h]=u);o(null,b=[],c,l)}for(h=b.length;h--;)(u=b[h])&&(c=o?ee(i,u):d[h])>-1&&(i[c]=!(r[c]=u))}}else b=g(b===r?b.splice(p,b.length):b),o?o(null,r,b,l):J.apply(r,b)})}function y(e){for(var t,n,i,s=e.length,o=C.relative[e[0].type],r=o||C.relative[" "],a=o?1:0,l=f(function(e){return e===t},r,!0),c=f(function(e){return ee(t,e)>-1},r,!0),h=[function(e,n,i){var s=!o&&(i||n!==k)||((t=n).nodeType?l(e,n,i):c(e,n,i));return t=null,s}];s>a;a++)if(n=C.relative[e[a].type])h=[f(p(h),n)];else{if(n=C.filter[e[a].type].apply(null,e[a].matches),n[z]){for(i=++a;s>i&&!C.relative[e[i].type];i++);return v(a>1&&p(h),a>1&&d(e.slice(0,a-1).concat({value:" "===e[a-2].type?"*":""})).replace(le,"$1"),n,i>a&&y(e.slice(a,i)),s>i&&y(e=e.slice(i)),s>i&&d(e))}h.push(n)}return p(h)}function b(e,n){var s=n.length>0,o=e.length>0,r=function(i,r,a,l,c){var h,u,d,f=0,p="0",m=i&&[],v=[],y=k,b=i||o&&C.find.TAG("*",c),w=B+=null==y?1:Math.random()||.1,_=b.length;for(c&&(k=r!==R&&r);p!==_&&null!=(h=b[p]);p++){if(o&&h){for(u=0;d=e[u++];)if(d(h,r,a)){l.push(h);break}c&&(B=w)}s&&((h=!d&&h)&&f--,i&&m.push(h))}if(f+=p,s&&p!==f){for(u=0;d=n[u++];)d(m,v,r,a);if(i){if(f>0)for(;p--;)m[p]||v[p]||(v[p]=G.call(l));v=g(v)}J.apply(l,v),c&&!i&&v.length>0&&f+n.length>1&&t.uniqueSort(l)}return c&&(B=w,k=y),m};return s?i(r):r}var w,_,C,x,T,S,D,E,k,N,A,I,R,P,O,M,L,H,F,z="sizzle"+1*new Date,W=e.document,B=0,j=0,$=n(),q=n(),U=n(),V=function(e,t){return e===t&&(A=!0),0},Y=1<<31,X={}.hasOwnProperty,K=[],G=K.pop,Q=K.push,J=K.push,Z=K.slice,ee=function(e,t){for(var n=0,i=e.length;i>n;n++)if(e[n]===t)return n;return-1},te="checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped",ne="[\\x20\\t\\r\\n\\f]",ie="(?:\\\\.|[\\w-]|[^\\x00-\\xa0])+",se=ie.replace("w","w#"),oe="\\["+ne+"*("+ie+")(?:"+ne+"*([*^$|!~]?=)"+ne+"*(?:'((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\"|("+se+"))|)"+ne+"*\\]",re=":("+ie+")(?:\\((('((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\")|((?:\\\\.|[^\\\\()[\\]]|"+oe+")*)|.*)\\)|)",ae=new RegExp(ne+"+","g"),le=new RegExp("^"+ne+"+|((?:^|[^\\\\])(?:\\\\.)*)"+ne+"+$","g"),ce=new RegExp("^"+ne+"*,"+ne+"*"),he=new RegExp("^"+ne+"*([>+~]|"+ne+")"+ne+"*"),ue=new RegExp("="+ne+"*([^\\]'\"]*?)"+ne+"*\\]","g"),de=new RegExp(re),fe=new RegExp("^"+se+"$"),pe={ID:new RegExp("^#("+ie+")"),CLASS:new RegExp("^\\.("+ie+")"),TAG:new RegExp("^("+ie.replace("w","w*")+")"),ATTR:new RegExp("^"+oe),PSEUDO:new RegExp("^"+re),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+ne+"*(even|odd|(([+-]|)(\\d*)n|)"+ne+"*(?:([+-]|)"+ne+"*(\\d+)|))"+ne+"*\\)|)","i"),bool:new RegExp("^(?:"+te+")$","i"),needsContext:new RegExp("^"+ne+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+ne+"*((?:-\\d)?\\d*)"+ne+"*\\)|)(?=[^-]|$)","i")},me=/^(?:input|select|textarea|button)$/i,ge=/^h\d$/i,ve=/^[^{]+\{\s*\[native \w/,ye=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,be=/[+~]/,we=/'|\\/g,_e=new RegExp("\\\\([\\da-f]{1,6}"+ne+"?|("+ne+")|.)","ig"),Ce=function(e,t,n){var i="0x"+t-65536;return i!==i||n?t:0>i?String.fromCharCode(i+65536):String.fromCharCode(i>>10|55296,1023&i|56320)},xe=function(){I()};try{J.apply(K=Z.call(W.childNodes),W.childNodes),K[W.childNodes.length].nodeType}catch(Te){J={apply:K.length?function(e,t){Q.apply(e,Z.call(t))}:function(e,t){for(var n=e.length,i=0;e[n++]=t[i++];);e.length=n-1}}}_=t.support={},T=t.isXML=function(e){var t=e&&(e.ownerDocument||e).documentElement;return!!t&&"HTML"!==t.nodeName},I=t.setDocument=function(e){var t,n,i=e?e.ownerDocument||e:W;return i!==R&&9===i.nodeType&&i.documentElement?(R=i,P=i.documentElement,n=i.defaultView,n&&n!==n.top&&(n.addEventListener?n.addEventListener("unload",xe,!1):n.attachEvent&&n.attachEvent("onunload",xe)),O=!T(i),_.attributes=s(function(e){return e.className="i",!e.getAttribute("className")}),_.getElementsByTagName=s(function(e){return e.appendChild(i.createComment("")),!e.getElementsByTagName("*").length}),_.getElementsByClassName=ve.test(i.getElementsByClassName),_.getById=s(function(e){return P.appendChild(e).id=z,!i.getElementsByName||!i.getElementsByName(z).length}),_.getById?(C.find.ID=function(e,t){if("undefined"!=typeof t.getElementById&&O){var n=t.getElementById(e);return n&&n.parentNode?[n]:[]}},C.filter.ID=function(e){var t=e.replace(_e,Ce);return function(e){return e.getAttribute("id")===t}}):(delete C.find.ID,C.filter.ID=function(e){var t=e.replace(_e,Ce);return function(e){var n="undefined"!=typeof e.getAttributeNode&&e.getAttributeNode("id");return n&&n.value===t}}),C.find.TAG=_.getElementsByTagName?function(e,t){return"undefined"!=typeof t.getElementsByTagName?t.getElementsByTagName(e):_.qsa?t.querySelectorAll(e):void 0}:function(e,t){var n,i=[],s=0,o=t.getElementsByTagName(e);if("*"===e){for(;n=o[s++];)1===n.nodeType&&i.push(n);return i}return o},C.find.CLASS=_.getElementsByClassName&&function(e,t){return O?t.getElementsByClassName(e):void 0},L=[],M=[],(_.qsa=ve.test(i.querySelectorAll))&&(s(function(e){P.appendChild(e).innerHTML="<a id='"+z+"'></a><select id='"+z+"-\f]' msallowcapture=''><option selected=''></option></select>",e.querySelectorAll("[msallowcapture^='']").length&&M.push("[*^$]="+ne+"*(?:''|\"\")"),e.querySelectorAll("[selected]").length||M.push("\\["+ne+"*(?:value|"+te+")"),e.querySelectorAll("[id~="+z+"-]").length||M.push("~="),e.querySelectorAll(":checked").length||M.push(":checked"),e.querySelectorAll("a#"+z+"+*").length||M.push(".#.+[+~]")}),s(function(e){var t=i.createElement("input");t.setAttribute("type","hidden"),e.appendChild(t).setAttribute("name","D"),e.querySelectorAll("[name=d]").length&&M.push("name"+ne+"*[*^$|!~]?="),e.querySelectorAll(":enabled").length||M.push(":enabled",":disabled"),e.querySelectorAll("*,:x"),M.push(",.*:")})),(_.matchesSelector=ve.test(H=P.matches||P.webkitMatchesSelector||P.mozMatchesSelector||P.oMatchesSelector||P.msMatchesSelector))&&s(function(e){_.disconnectedMatch=H.call(e,"div"),H.call(e,"[s!='']:x"),L.push("!=",re)}),M=M.length&&new RegExp(M.join("|")),L=L.length&&new RegExp(L.join("|")),t=ve.test(P.compareDocumentPosition),F=t||ve.test(P.contains)?function(e,t){var n=9===e.nodeType?e.documentElement:e,i=t&&t.parentNode;return e===i||!(!i||1!==i.nodeType||!(n.contains?n.contains(i):e.compareDocumentPosition&&16&e.compareDocumentPosition(i)))}:function(e,t){if(t)for(;t=t.parentNode;)if(t===e)return!0;return!1},V=t?function(e,t){if(e===t)return A=!0,0;var n=!e.compareDocumentPosition-!t.compareDocumentPosition;return n?n:(n=(e.ownerDocument||e)===(t.ownerDocument||t)?e.compareDocumentPosition(t):1,1&n||!_.sortDetached&&t.compareDocumentPosition(e)===n?e===i||e.ownerDocument===W&&F(W,e)?-1:t===i||t.ownerDocument===W&&F(W,t)?1:N?ee(N,e)-ee(N,t):0:4&n?-1:1)}:function(e,t){if(e===t)return A=!0,0;var n,s=0,o=e.parentNode,a=t.parentNode,l=[e],c=[t];if(!o||!a)return e===i?-1:t===i?1:o?-1:a?1:N?ee(N,e)-ee(N,t):0;if(o===a)return r(e,t);for(n=e;n=n.parentNode;)l.unshift(n);for(n=t;n=n.parentNode;)c.unshift(n);for(;l[s]===c[s];)s++;return s?r(l[s],c[s]):l[s]===W?-1:c[s]===W?1:0},i):R},t.matches=function(e,n){return t(e,null,null,n)},t.matchesSelector=function(e,n){if((e.ownerDocument||e)!==R&&I(e),n=n.replace(ue,"='$1']"),!(!_.matchesSelector||!O||L&&L.test(n)||M&&M.test(n)))try{var i=H.call(e,n);if(i||_.disconnectedMatch||e.document&&11!==e.document.nodeType)return i}catch(s){}return t(n,R,null,[e]).length>0},t.contains=function(e,t){return(e.ownerDocument||e)!==R&&I(e),F(e,t)},t.attr=function(e,t){(e.ownerDocument||e)!==R&&I(e);var n=C.attrHandle[t.toLowerCase()],i=n&&X.call(C.attrHandle,t.toLowerCase())?n(e,t,!O):void 0;return void 0!==i?i:_.attributes||!O?e.getAttribute(t):(i=e.getAttributeNode(t))&&i.specified?i.value:null},t.error=function(e){throw new Error("Syntax error, unrecognized expression: "+e)},t.uniqueSort=function(e){var t,n=[],i=0,s=0;if(A=!_.detectDuplicates,N=!_.sortStable&&e.slice(0),e.sort(V),A){for(;t=e[s++];)t===e[s]&&(i=n.push(s));for(;i--;)e.splice(n[i],1)}return N=null,e},x=t.getText=function(e){var t,n="",i=0,s=e.nodeType;if(s){if(1===s||9===s||11===s){if("string"==typeof e.textContent)return e.textContent;for(e=e.firstChild;e;e=e.nextSibling)n+=x(e)}else if(3===s||4===s)return e.nodeValue}else for(;t=e[i++];)n+=x(t);return n},C=t.selectors={cacheLength:50,createPseudo:i,match:pe,attrHandle:{},find:{},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(e){return e[1]=e[1].replace(_e,Ce),e[3]=(e[3]||e[4]||e[5]||"").replace(_e,Ce),"~="===e[2]&&(e[3]=" "+e[3]+" "),e.slice(0,4)},CHILD:function(e){return e[1]=e[1].toLowerCase(),"nth"===e[1].slice(0,3)?(e[3]||t.error(e[0]),e[4]=+(e[4]?e[5]+(e[6]||1):2*("even"===e[3]||"odd"===e[3])),e[5]=+(e[7]+e[8]||"odd"===e[3])):e[3]&&t.error(e[0]),e},PSEUDO:function(e){var t,n=!e[6]&&e[2];return pe.CHILD.test(e[0])?null:(e[3]?e[2]=e[4]||e[5]||"":n&&de.test(n)&&(t=S(n,!0))&&(t=n.indexOf(")",n.length-t)-n.length)&&(e[0]=e[0].slice(0,t),e[2]=n.slice(0,t)),e.slice(0,3))}},filter:{TAG:function(e){var t=e.replace(_e,Ce).toLowerCase();return"*"===e?function(){return!0}:function(e){return e.nodeName&&e.nodeName.toLowerCase()===t}},CLASS:function(e){var t=$[e+" "];return t||(t=new RegExp("(^|"+ne+")"+e+"("+ne+"|$)"))&&$(e,function(e){return t.test("string"==typeof e.className&&e.className||"undefined"!=typeof e.getAttribute&&e.getAttribute("class")||"")})},ATTR:function(e,n,i){return function(s){var o=t.attr(s,e);return null==o?"!="===n:!n||(o+="","="===n?o===i:"!="===n?o!==i:"^="===n?i&&0===o.indexOf(i):"*="===n?i&&o.indexOf(i)>-1:"$="===n?i&&o.slice(-i.length)===i:"~="===n?(" "+o.replace(ae," ")+" ").indexOf(i)>-1:"|="===n&&(o===i||o.slice(0,i.length+1)===i+"-"))}},CHILD:function(e,t,n,i,s){var o="nth"!==e.slice(0,3),r="last"!==e.slice(-4),a="of-type"===t;return 1===i&&0===s?function(e){return!!e.parentNode}:function(t,n,l){var c,h,u,d,f,p,m=o!==r?"nextSibling":"previousSibling",g=t.parentNode,v=a&&t.nodeName.toLowerCase(),y=!l&&!a;if(g){if(o){for(;m;){for(u=t;u=u[m];)if(a?u.nodeName.toLowerCase()===v:1===u.nodeType)return!1;p=m="only"===e&&!p&&"nextSibling"}return!0}if(p=[r?g.firstChild:g.lastChild],r&&y){for(h=g[z]||(g[z]={}),c=h[e]||[],f=c[0]===B&&c[1],d=c[0]===B&&c[2],u=f&&g.childNodes[f];u=++f&&u&&u[m]||(d=f=0)||p.pop();)if(1===u.nodeType&&++d&&u===t){h[e]=[B,f,d];break}}else if(y&&(c=(t[z]||(t[z]={}))[e])&&c[0]===B)d=c[1];else for(;(u=++f&&u&&u[m]||(d=f=0)||p.pop())&&((a?u.nodeName.toLowerCase()!==v:1!==u.nodeType)||!++d||(y&&((u[z]||(u[z]={}))[e]=[B,d]),
u!==t)););return d-=s,d===i||d%i===0&&d/i>=0}}},PSEUDO:function(e,n){var s,o=C.pseudos[e]||C.setFilters[e.toLowerCase()]||t.error("unsupported pseudo: "+e);return o[z]?o(n):o.length>1?(s=[e,e,"",n],C.setFilters.hasOwnProperty(e.toLowerCase())?i(function(e,t){for(var i,s=o(e,n),r=s.length;r--;)i=ee(e,s[r]),e[i]=!(t[i]=s[r])}):function(e){return o(e,0,s)}):o}},pseudos:{not:i(function(e){var t=[],n=[],s=D(e.replace(le,"$1"));return s[z]?i(function(e,t,n,i){for(var o,r=s(e,null,i,[]),a=e.length;a--;)(o=r[a])&&(e[a]=!(t[a]=o))}):function(e,i,o){return t[0]=e,s(t,null,o,n),t[0]=null,!n.pop()}}),has:i(function(e){return function(n){return t(e,n).length>0}}),contains:i(function(e){return e=e.replace(_e,Ce),function(t){return(t.textContent||t.innerText||x(t)).indexOf(e)>-1}}),lang:i(function(e){return fe.test(e||"")||t.error("unsupported lang: "+e),e=e.replace(_e,Ce).toLowerCase(),function(t){var n;do if(n=O?t.lang:t.getAttribute("xml:lang")||t.getAttribute("lang"))return n=n.toLowerCase(),n===e||0===n.indexOf(e+"-");while((t=t.parentNode)&&1===t.nodeType);return!1}}),target:function(t){var n=e.location&&e.location.hash;return n&&n.slice(1)===t.id},root:function(e){return e===P},focus:function(e){return e===R.activeElement&&(!R.hasFocus||R.hasFocus())&&!!(e.type||e.href||~e.tabIndex)},enabled:function(e){return e.disabled===!1},disabled:function(e){return e.disabled===!0},checked:function(e){var t=e.nodeName.toLowerCase();return"input"===t&&!!e.checked||"option"===t&&!!e.selected},selected:function(e){return e.parentNode&&e.parentNode.selectedIndex,e.selected===!0},empty:function(e){for(e=e.firstChild;e;e=e.nextSibling)if(e.nodeType<6)return!1;return!0},parent:function(e){return!C.pseudos.empty(e)},header:function(e){return ge.test(e.nodeName)},input:function(e){return me.test(e.nodeName)},button:function(e){var t=e.nodeName.toLowerCase();return"input"===t&&"button"===e.type||"button"===t},text:function(e){var t;return"input"===e.nodeName.toLowerCase()&&"text"===e.type&&(null==(t=e.getAttribute("type"))||"text"===t.toLowerCase())},first:c(function(){return[0]}),last:c(function(e,t){return[t-1]}),eq:c(function(e,t,n){return[0>n?n+t:n]}),even:c(function(e,t){for(var n=0;t>n;n+=2)e.push(n);return e}),odd:c(function(e,t){for(var n=1;t>n;n+=2)e.push(n);return e}),lt:c(function(e,t,n){for(var i=0>n?n+t:n;--i>=0;)e.push(i);return e}),gt:c(function(e,t,n){for(var i=0>n?n+t:n;++i<t;)e.push(i);return e})}},C.pseudos.nth=C.pseudos.eq;for(w in{radio:!0,checkbox:!0,file:!0,password:!0,image:!0})C.pseudos[w]=a(w);for(w in{submit:!0,reset:!0})C.pseudos[w]=l(w);return u.prototype=C.filters=C.pseudos,C.setFilters=new u,S=t.tokenize=function(e,n){var i,s,o,r,a,l,c,h=q[e+" "];if(h)return n?0:h.slice(0);for(a=e,l=[],c=C.preFilter;a;){(!i||(s=ce.exec(a)))&&(s&&(a=a.slice(s[0].length)||a),l.push(o=[])),i=!1,(s=he.exec(a))&&(i=s.shift(),o.push({value:i,type:s[0].replace(le," ")}),a=a.slice(i.length));for(r in C.filter)!(s=pe[r].exec(a))||c[r]&&!(s=c[r](s))||(i=s.shift(),o.push({value:i,type:r,matches:s}),a=a.slice(i.length));if(!i)break}return n?a.length:a?t.error(e):q(e,l).slice(0)},D=t.compile=function(e,t){var n,i=[],s=[],o=U[e+" "];if(!o){for(t||(t=S(e)),n=t.length;n--;)o=y(t[n]),o[z]?i.push(o):s.push(o);o=U(e,b(s,i)),o.selector=e}return o},E=t.select=function(e,t,n,i){var s,o,r,a,l,c="function"==typeof e&&e,u=!i&&S(e=c.selector||e);if(n=n||[],1===u.length){if(o=u[0]=u[0].slice(0),o.length>2&&"ID"===(r=o[0]).type&&_.getById&&9===t.nodeType&&O&&C.relative[o[1].type]){if(t=(C.find.ID(r.matches[0].replace(_e,Ce),t)||[])[0],!t)return n;c&&(t=t.parentNode),e=e.slice(o.shift().value.length)}for(s=pe.needsContext.test(e)?0:o.length;s--&&(r=o[s],!C.relative[a=r.type]);)if((l=C.find[a])&&(i=l(r.matches[0].replace(_e,Ce),be.test(o[0].type)&&h(t.parentNode)||t))){if(o.splice(s,1),e=i.length&&d(o),!e)return J.apply(n,i),n;break}}return(c||D(e,u))(i,t,!O,n,be.test(e)&&h(t.parentNode)||t),n},_.sortStable=z.split("").sort(V).join("")===z,_.detectDuplicates=!!A,I(),_.sortDetached=s(function(e){return 1&e.compareDocumentPosition(R.createElement("div"))}),s(function(e){return e.innerHTML="<a href='#'></a>","#"===e.firstChild.getAttribute("href")})||o("type|href|height|width",function(e,t,n){return n?void 0:e.getAttribute(t,"type"===t.toLowerCase()?1:2)}),_.attributes&&s(function(e){return e.innerHTML="<input/>",e.firstChild.setAttribute("value",""),""===e.firstChild.getAttribute("value")})||o("value",function(e,t,n){return n||"input"!==e.nodeName.toLowerCase()?void 0:e.defaultValue}),s(function(e){return null==e.getAttribute("disabled")})||o(te,function(e,t,n){var i;return n?void 0:e[t]===!0?t.toLowerCase():(i=e.getAttributeNode(t))&&i.specified?i.value:null}),t}(e);Z.find=se,Z.expr=se.selectors,Z.expr[":"]=Z.expr.pseudos,Z.unique=se.uniqueSort,Z.text=se.getText,Z.isXMLDoc=se.isXML,Z.contains=se.contains;var oe=Z.expr.match.needsContext,re=/^<(\w+)\s*\/?>(?:<\/\1>|)$/,ae=/^.[^:#\[\.,]*$/;Z.filter=function(e,t,n){var i=t[0];return n&&(e=":not("+e+")"),1===t.length&&1===i.nodeType?Z.find.matchesSelector(i,e)?[i]:[]:Z.find.matches(e,Z.grep(t,function(e){return 1===e.nodeType}))},Z.fn.extend({find:function(e){var t,n=this.length,i=[],s=this;if("string"!=typeof e)return this.pushStack(Z(e).filter(function(){for(t=0;n>t;t++)if(Z.contains(s[t],this))return!0}));for(t=0;n>t;t++)Z.find(e,s[t],i);return i=this.pushStack(n>1?Z.unique(i):i),i.selector=this.selector?this.selector+" "+e:e,i},filter:function(e){return this.pushStack(i(this,e||[],!1))},not:function(e){return this.pushStack(i(this,e||[],!0))},is:function(e){return!!i(this,"string"==typeof e&&oe.test(e)?Z(e):e||[],!1).length}});var le,ce=/^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]*))$/,he=Z.fn.init=function(e,t){var n,i;if(!e)return this;if("string"==typeof e){if(n="<"===e[0]&&">"===e[e.length-1]&&e.length>=3?[null,e,null]:ce.exec(e),!n||!n[1]&&t)return!t||t.jquery?(t||le).find(e):this.constructor(t).find(e);if(n[1]){if(t=t instanceof Z?t[0]:t,Z.merge(this,Z.parseHTML(n[1],t&&t.nodeType?t.ownerDocument||t:Q,!0)),re.test(n[1])&&Z.isPlainObject(t))for(n in t)Z.isFunction(this[n])?this[n](t[n]):this.attr(n,t[n]);return this}return i=Q.getElementById(n[2]),i&&i.parentNode&&(this.length=1,this[0]=i),this.context=Q,this.selector=e,this}return e.nodeType?(this.context=this[0]=e,this.length=1,this):Z.isFunction(e)?"undefined"!=typeof le.ready?le.ready(e):e(Z):(void 0!==e.selector&&(this.selector=e.selector,this.context=e.context),Z.makeArray(e,this))};he.prototype=Z.fn,le=Z(Q);var ue=/^(?:parents|prev(?:Until|All))/,de={children:!0,contents:!0,next:!0,prev:!0};Z.extend({dir:function(e,t,n){for(var i=[],s=void 0!==n;(e=e[t])&&9!==e.nodeType;)if(1===e.nodeType){if(s&&Z(e).is(n))break;i.push(e)}return i},sibling:function(e,t){for(var n=[];e;e=e.nextSibling)1===e.nodeType&&e!==t&&n.push(e);return n}}),Z.fn.extend({has:function(e){var t=Z(e,this),n=t.length;return this.filter(function(){for(var e=0;n>e;e++)if(Z.contains(this,t[e]))return!0})},closest:function(e,t){for(var n,i=0,s=this.length,o=[],r=oe.test(e)||"string"!=typeof e?Z(e,t||this.context):0;s>i;i++)for(n=this[i];n&&n!==t;n=n.parentNode)if(n.nodeType<11&&(r?r.index(n)>-1:1===n.nodeType&&Z.find.matchesSelector(n,e))){o.push(n);break}return this.pushStack(o.length>1?Z.unique(o):o)},index:function(e){return e?"string"==typeof e?V.call(Z(e),this[0]):V.call(this,e.jquery?e[0]:e):this[0]&&this[0].parentNode?this.first().prevAll().length:-1},add:function(e,t){return this.pushStack(Z.unique(Z.merge(this.get(),Z(e,t))))},addBack:function(e){return this.add(null==e?this.prevObject:this.prevObject.filter(e))}}),Z.each({parent:function(e){var t=e.parentNode;return t&&11!==t.nodeType?t:null},parents:function(e){return Z.dir(e,"parentNode")},parentsUntil:function(e,t,n){return Z.dir(e,"parentNode",n)},next:function(e){return s(e,"nextSibling")},prev:function(e){return s(e,"previousSibling")},nextAll:function(e){return Z.dir(e,"nextSibling")},prevAll:function(e){return Z.dir(e,"previousSibling")},nextUntil:function(e,t,n){return Z.dir(e,"nextSibling",n)},prevUntil:function(e,t,n){return Z.dir(e,"previousSibling",n)},siblings:function(e){return Z.sibling((e.parentNode||{}).firstChild,e)},children:function(e){return Z.sibling(e.firstChild)},contents:function(e){return e.contentDocument||Z.merge([],e.childNodes)}},function(e,t){Z.fn[e]=function(n,i){var s=Z.map(this,t,n);return"Until"!==e.slice(-5)&&(i=n),i&&"string"==typeof i&&(s=Z.filter(i,s)),this.length>1&&(de[e]||Z.unique(s),ue.test(e)&&s.reverse()),this.pushStack(s)}});var fe=/\S+/g,pe={};Z.Callbacks=function(e){e="string"==typeof e?pe[e]||o(e):Z.extend({},e);var t,n,i,s,r,a,l=[],c=!e.once&&[],h=function(o){for(t=e.memory&&o,n=!0,a=s||0,s=0,r=l.length,i=!0;l&&r>a;a++)if(l[a].apply(o[0],o[1])===!1&&e.stopOnFalse){t=!1;break}i=!1,l&&(c?c.length&&h(c.shift()):t?l=[]:u.disable())},u={add:function(){if(l){var n=l.length;!function o(t){Z.each(t,function(t,n){var i=Z.type(n);"function"===i?e.unique&&u.has(n)||l.push(n):n&&n.length&&"string"!==i&&o(n)})}(arguments),i?r=l.length:t&&(s=n,h(t))}return this},remove:function(){return l&&Z.each(arguments,function(e,t){for(var n;(n=Z.inArray(t,l,n))>-1;)l.splice(n,1),i&&(r>=n&&r--,a>=n&&a--)}),this},has:function(e){return e?Z.inArray(e,l)>-1:!(!l||!l.length)},empty:function(){return l=[],r=0,this},disable:function(){return l=c=t=void 0,this},disabled:function(){return!l},lock:function(){return c=void 0,t||u.disable(),this},locked:function(){return!c},fireWith:function(e,t){return!l||n&&!c||(t=t||[],t=[e,t.slice?t.slice():t],i?c.push(t):h(t)),this},fire:function(){return u.fireWith(this,arguments),this},fired:function(){return!!n}};return u},Z.extend({Deferred:function(e){var t=[["resolve","done",Z.Callbacks("once memory"),"resolved"],["reject","fail",Z.Callbacks("once memory"),"rejected"],["notify","progress",Z.Callbacks("memory")]],n="pending",i={state:function(){return n},always:function(){return s.done(arguments).fail(arguments),this},then:function(){var e=arguments;return Z.Deferred(function(n){Z.each(t,function(t,o){var r=Z.isFunction(e[t])&&e[t];s[o[1]](function(){var e=r&&r.apply(this,arguments);e&&Z.isFunction(e.promise)?e.promise().done(n.resolve).fail(n.reject).progress(n.notify):n[o[0]+"With"](this===i?n.promise():this,r?[e]:arguments)})}),e=null}).promise()},promise:function(e){return null!=e?Z.extend(e,i):i}},s={};return i.pipe=i.then,Z.each(t,function(e,o){var r=o[2],a=o[3];i[o[1]]=r.add,a&&r.add(function(){n=a},t[1^e][2].disable,t[2][2].lock),s[o[0]]=function(){return s[o[0]+"With"](this===s?i:this,arguments),this},s[o[0]+"With"]=r.fireWith}),i.promise(s),e&&e.call(s,s),s},when:function(e){var t,n,i,s=0,o=$.call(arguments),r=o.length,a=1!==r||e&&Z.isFunction(e.promise)?r:0,l=1===a?e:Z.Deferred(),c=function(e,n,i){return function(s){n[e]=this,i[e]=arguments.length>1?$.call(arguments):s,i===t?l.notifyWith(n,i):--a||l.resolveWith(n,i)}};if(r>1)for(t=new Array(r),n=new Array(r),i=new Array(r);r>s;s++)o[s]&&Z.isFunction(o[s].promise)?o[s].promise().done(c(s,i,o)).fail(l.reject).progress(c(s,n,t)):--a;return a||l.resolveWith(i,o),l.promise()}});var me;Z.fn.ready=function(e){return Z.ready.promise().done(e),this},Z.extend({isReady:!1,readyWait:1,holdReady:function(e){e?Z.readyWait++:Z.ready(!0)},ready:function(e){(e===!0?--Z.readyWait:Z.isReady)||(Z.isReady=!0,e!==!0&&--Z.readyWait>0||(me.resolveWith(Q,[Z]),Z.fn.triggerHandler&&(Z(Q).triggerHandler("ready"),Z(Q).off("ready"))))}}),Z.ready.promise=function(t){return me||(me=Z.Deferred(),"complete"===Q.readyState?setTimeout(Z.ready):(Q.addEventListener("DOMContentLoaded",r,!1),e.addEventListener("load",r,!1))),me.promise(t)},Z.ready.promise();var ge=Z.access=function(e,t,n,i,s,o,r){var a=0,l=e.length,c=null==n;if("object"===Z.type(n)){s=!0;for(a in n)Z.access(e,t,a,n[a],!0,o,r)}else if(void 0!==i&&(s=!0,Z.isFunction(i)||(r=!0),c&&(r?(t.call(e,i),t=null):(c=t,t=function(e,t,n){return c.call(Z(e),n)})),t))for(;l>a;a++)t(e[a],n,r?i:i.call(e[a],a,t(e[a],n)));return s?e:c?t.call(e):l?t(e[0],n):o};Z.acceptData=function(e){return 1===e.nodeType||9===e.nodeType||!+e.nodeType},a.uid=1,a.accepts=Z.acceptData,a.prototype={key:function(e){if(!a.accepts(e))return 0;var t={},n=e[this.expando];if(!n){n=a.uid++;try{t[this.expando]={value:n},Object.defineProperties(e,t)}catch(i){t[this.expando]=n,Z.extend(e,t)}}return this.cache[n]||(this.cache[n]={}),n},set:function(e,t,n){var i,s=this.key(e),o=this.cache[s];if("string"==typeof t)o[t]=n;else if(Z.isEmptyObject(o))Z.extend(this.cache[s],t);else for(i in t)o[i]=t[i];return o},get:function(e,t){var n=this.cache[this.key(e)];return void 0===t?n:n[t]},access:function(e,t,n){var i;return void 0===t||t&&"string"==typeof t&&void 0===n?(i=this.get(e,t),void 0!==i?i:this.get(e,Z.camelCase(t))):(this.set(e,t,n),void 0!==n?n:t)},remove:function(e,t){var n,i,s,o=this.key(e),r=this.cache[o];if(void 0===t)this.cache[o]={};else{Z.isArray(t)?i=t.concat(t.map(Z.camelCase)):(s=Z.camelCase(t),t in r?i=[t,s]:(i=s,i=i in r?[i]:i.match(fe)||[])),n=i.length;for(;n--;)delete r[i[n]]}},hasData:function(e){return!Z.isEmptyObject(this.cache[e[this.expando]]||{})},discard:function(e){e[this.expando]&&delete this.cache[e[this.expando]]}};var ve=new a,ye=new a,be=/^(?:\{[\w\W]*\}|\[[\w\W]*\])$/,we=/([A-Z])/g;Z.extend({hasData:function(e){return ye.hasData(e)||ve.hasData(e)},data:function(e,t,n){return ye.access(e,t,n)},removeData:function(e,t){ye.remove(e,t)},_data:function(e,t,n){return ve.access(e,t,n)},_removeData:function(e,t){ve.remove(e,t)}}),Z.fn.extend({data:function(e,t){var n,i,s,o=this[0],r=o&&o.attributes;if(void 0===e){if(this.length&&(s=ye.get(o),1===o.nodeType&&!ve.get(o,"hasDataAttrs"))){for(n=r.length;n--;)r[n]&&(i=r[n].name,0===i.indexOf("data-")&&(i=Z.camelCase(i.slice(5)),l(o,i,s[i])));ve.set(o,"hasDataAttrs",!0)}return s}return"object"==typeof e?this.each(function(){ye.set(this,e)}):ge(this,function(t){var n,i=Z.camelCase(e);if(o&&void 0===t){if(n=ye.get(o,e),void 0!==n)return n;if(n=ye.get(o,i),void 0!==n)return n;if(n=l(o,i,void 0),void 0!==n)return n}else this.each(function(){var n=ye.get(this,i);ye.set(this,i,t),-1!==e.indexOf("-")&&void 0!==n&&ye.set(this,e,t)})},null,t,arguments.length>1,null,!0)},removeData:function(e){return this.each(function(){ye.remove(this,e)})}}),Z.extend({queue:function(e,t,n){var i;return e?(t=(t||"fx")+"queue",i=ve.get(e,t),n&&(!i||Z.isArray(n)?i=ve.access(e,t,Z.makeArray(n)):i.push(n)),i||[]):void 0},dequeue:function(e,t){t=t||"fx";var n=Z.queue(e,t),i=n.length,s=n.shift(),o=Z._queueHooks(e,t),r=function(){Z.dequeue(e,t)};"inprogress"===s&&(s=n.shift(),i--),s&&("fx"===t&&n.unshift("inprogress"),delete o.stop,s.call(e,r,o)),!i&&o&&o.empty.fire()},_queueHooks:function(e,t){var n=t+"queueHooks";return ve.get(e,n)||ve.access(e,n,{empty:Z.Callbacks("once memory").add(function(){ve.remove(e,[t+"queue",n])})})}}),Z.fn.extend({queue:function(e,t){var n=2;return"string"!=typeof e&&(t=e,e="fx",n--),arguments.length<n?Z.queue(this[0],e):void 0===t?this:this.each(function(){var n=Z.queue(this,e,t);Z._queueHooks(this,e),"fx"===e&&"inprogress"!==n[0]&&Z.dequeue(this,e)})},dequeue:function(e){return this.each(function(){Z.dequeue(this,e)})},clearQueue:function(e){return this.queue(e||"fx",[])},promise:function(e,t){var n,i=1,s=Z.Deferred(),o=this,r=this.length,a=function(){--i||s.resolveWith(o,[o])};for("string"!=typeof e&&(t=e,e=void 0),e=e||"fx";r--;)n=ve.get(o[r],e+"queueHooks"),n&&n.empty&&(i++,n.empty.add(a));return a(),s.promise(t)}});var _e=/[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/.source,Ce=["Top","Right","Bottom","Left"],xe=function(e,t){return e=t||e,"none"===Z.css(e,"display")||!Z.contains(e.ownerDocument,e)},Te=/^(?:checkbox|radio)$/i;!function(){var e=Q.createDocumentFragment(),t=e.appendChild(Q.createElement("div")),n=Q.createElement("input");n.setAttribute("type","radio"),n.setAttribute("checked","checked"),n.setAttribute("name","t"),t.appendChild(n),G.checkClone=t.cloneNode(!0).cloneNode(!0).lastChild.checked,t.innerHTML="<textarea>x</textarea>",G.noCloneChecked=!!t.cloneNode(!0).lastChild.defaultValue}();var Se="undefined";G.focusinBubbles="onfocusin"in e;var De=/^key/,Ee=/^(?:mouse|pointer|contextmenu)|click/,ke=/^(?:focusinfocus|focusoutblur)$/,Ne=/^([^.]*)(?:\.(.+)|)$/;Z.event={global:{},add:function(e,t,n,i,s){var o,r,a,l,c,h,u,d,f,p,m,g=ve.get(e);if(g)for(n.handler&&(o=n,n=o.handler,s=o.selector),n.guid||(n.guid=Z.guid++),(l=g.events)||(l=g.events={}),(r=g.handle)||(r=g.handle=function(t){return typeof Z!==Se&&Z.event.triggered!==t.type?Z.event.dispatch.apply(e,arguments):void 0}),t=(t||"").match(fe)||[""],c=t.length;c--;)a=Ne.exec(t[c])||[],f=m=a[1],p=(a[2]||"").split(".").sort(),f&&(u=Z.event.special[f]||{},f=(s?u.delegateType:u.bindType)||f,u=Z.event.special[f]||{},h=Z.extend({type:f,origType:m,data:i,handler:n,guid:n.guid,selector:s,needsContext:s&&Z.expr.match.needsContext.test(s),namespace:p.join(".")},o),(d=l[f])||(d=l[f]=[],d.delegateCount=0,u.setup&&u.setup.call(e,i,p,r)!==!1||e.addEventListener&&e.addEventListener(f,r,!1)),u.add&&(u.add.call(e,h),h.handler.guid||(h.handler.guid=n.guid)),s?d.splice(d.delegateCount++,0,h):d.push(h),Z.event.global[f]=!0)},remove:function(e,t,n,i,s){var o,r,a,l,c,h,u,d,f,p,m,g=ve.hasData(e)&&ve.get(e);if(g&&(l=g.events)){for(t=(t||"").match(fe)||[""],c=t.length;c--;)if(a=Ne.exec(t[c])||[],f=m=a[1],p=(a[2]||"").split(".").sort(),f){for(u=Z.event.special[f]||{},f=(i?u.delegateType:u.bindType)||f,d=l[f]||[],a=a[2]&&new RegExp("(^|\\.)"+p.join("\\.(?:.*\\.|)")+"(\\.|$)"),r=o=d.length;o--;)h=d[o],!s&&m!==h.origType||n&&n.guid!==h.guid||a&&!a.test(h.namespace)||i&&i!==h.selector&&("**"!==i||!h.selector)||(d.splice(o,1),h.selector&&d.delegateCount--,u.remove&&u.remove.call(e,h));r&&!d.length&&(u.teardown&&u.teardown.call(e,p,g.handle)!==!1||Z.removeEvent(e,f,g.handle),delete l[f])}else for(f in l)Z.event.remove(e,f+t[c],n,i,!0);Z.isEmptyObject(l)&&(delete g.handle,ve.remove(e,"events"))}},trigger:function(t,n,i,s){var o,r,a,l,c,h,u,d=[i||Q],f=K.call(t,"type")?t.type:t,p=K.call(t,"namespace")?t.namespace.split("."):[];if(r=a=i=i||Q,3!==i.nodeType&&8!==i.nodeType&&!ke.test(f+Z.event.triggered)&&(f.indexOf(".")>=0&&(p=f.split("."),f=p.shift(),p.sort()),c=f.indexOf(":")<0&&"on"+f,t=t[Z.expando]?t:new Z.Event(f,"object"==typeof t&&t),t.isTrigger=s?2:3,t.namespace=p.join("."),t.namespace_re=t.namespace?new RegExp("(^|\\.)"+p.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,t.result=void 0,t.target||(t.target=i),n=null==n?[t]:Z.makeArray(n,[t]),u=Z.event.special[f]||{},s||!u.trigger||u.trigger.apply(i,n)!==!1)){if(!s&&!u.noBubble&&!Z.isWindow(i)){for(l=u.delegateType||f,ke.test(l+f)||(r=r.parentNode);r;r=r.parentNode)d.push(r),a=r;a===(i.ownerDocument||Q)&&d.push(a.defaultView||a.parentWindow||e)}for(o=0;(r=d[o++])&&!t.isPropagationStopped();)t.type=o>1?l:u.bindType||f,h=(ve.get(r,"events")||{})[t.type]&&ve.get(r,"handle"),h&&h.apply(r,n),h=c&&r[c],h&&h.apply&&Z.acceptData(r)&&(t.result=h.apply(r,n),t.result===!1&&t.preventDefault());return t.type=f,s||t.isDefaultPrevented()||u._default&&u._default.apply(d.pop(),n)!==!1||!Z.acceptData(i)||c&&Z.isFunction(i[f])&&!Z.isWindow(i)&&(a=i[c],a&&(i[c]=null),Z.event.triggered=f,i[f](),Z.event.triggered=void 0,a&&(i[c]=a)),t.result}},dispatch:function(e){e=Z.event.fix(e);var t,n,i,s,o,r=[],a=$.call(arguments),l=(ve.get(this,"events")||{})[e.type]||[],c=Z.event.special[e.type]||{};if(a[0]=e,e.delegateTarget=this,!c.preDispatch||c.preDispatch.call(this,e)!==!1){for(r=Z.event.handlers.call(this,e,l),t=0;(s=r[t++])&&!e.isPropagationStopped();)for(e.currentTarget=s.elem,n=0;(o=s.handlers[n++])&&!e.isImmediatePropagationStopped();)(!e.namespace_re||e.namespace_re.test(o.namespace))&&(e.handleObj=o,e.data=o.data,i=((Z.event.special[o.origType]||{}).handle||o.handler).apply(s.elem,a),void 0!==i&&(e.result=i)===!1&&(e.preventDefault(),e.stopPropagation()));return c.postDispatch&&c.postDispatch.call(this,e),e.result}},handlers:function(e,t){var n,i,s,o,r=[],a=t.delegateCount,l=e.target;if(a&&l.nodeType&&(!e.button||"click"!==e.type))for(;l!==this;l=l.parentNode||this)if(l.disabled!==!0||"click"!==e.type){for(i=[],n=0;a>n;n++)o=t[n],s=o.selector+" ",void 0===i[s]&&(i[s]=o.needsContext?Z(s,this).index(l)>=0:Z.find(s,this,null,[l]).length),i[s]&&i.push(o);i.length&&r.push({elem:l,handlers:i})}return a<t.length&&r.push({elem:this,handlers:t.slice(a)}),r},props:"altKey bubbles cancelable ctrlKey currentTarget eventPhase metaKey relatedTarget shiftKey target timeStamp view which".split(" "),fixHooks:{},keyHooks:{props:"char charCode key keyCode".split(" "),filter:function(e,t){return null==e.which&&(e.which=null!=t.charCode?t.charCode:t.keyCode),e}},mouseHooks:{props:"button buttons clientX clientY offsetX offsetY pageX pageY screenX screenY toElement".split(" "),filter:function(e,t){var n,i,s,o=t.button;return null==e.pageX&&null!=t.clientX&&(n=e.target.ownerDocument||Q,i=n.documentElement,s=n.body,e.pageX=t.clientX+(i&&i.scrollLeft||s&&s.scrollLeft||0)-(i&&i.clientLeft||s&&s.clientLeft||0),e.pageY=t.clientY+(i&&i.scrollTop||s&&s.scrollTop||0)-(i&&i.clientTop||s&&s.clientTop||0)),e.which||void 0===o||(e.which=1&o?1:2&o?3:4&o?2:0),e}},fix:function(e){if(e[Z.expando])return e;var t,n,i,s=e.type,o=e,r=this.fixHooks[s];for(r||(this.fixHooks[s]=r=Ee.test(s)?this.mouseHooks:De.test(s)?this.keyHooks:{}),i=r.props?this.props.concat(r.props):this.props,e=new Z.Event(o),t=i.length;t--;)n=i[t],e[n]=o[n];return e.target||(e.target=Q),3===e.target.nodeType&&(e.target=e.target.parentNode),r.filter?r.filter(e,o):e},special:{load:{noBubble:!0},focus:{trigger:function(){return this!==u()&&this.focus?(this.focus(),!1):void 0},delegateType:"focusin"},blur:{trigger:function(){return this===u()&&this.blur?(this.blur(),!1):void 0},delegateType:"focusout"},click:{trigger:function(){return"checkbox"===this.type&&this.click&&Z.nodeName(this,"input")?(this.click(),!1):void 0},_default:function(e){return Z.nodeName(e.target,"a")}},beforeunload:{postDispatch:function(e){void 0!==e.result&&e.originalEvent&&(e.originalEvent.returnValue=e.result)}}},simulate:function(e,t,n,i){var s=Z.extend(new Z.Event,n,{type:e,isSimulated:!0,originalEvent:{}});i?Z.event.trigger(s,null,t):Z.event.dispatch.call(t,s),s.isDefaultPrevented()&&n.preventDefault()}},Z.removeEvent=function(e,t,n){e.removeEventListener&&e.removeEventListener(t,n,!1)},Z.Event=function(e,t){return this instanceof Z.Event?(e&&e.type?(this.originalEvent=e,this.type=e.type,this.isDefaultPrevented=e.defaultPrevented||void 0===e.defaultPrevented&&e.returnValue===!1?c:h):this.type=e,t&&Z.extend(this,t),this.timeStamp=e&&e.timeStamp||Z.now(),void(this[Z.expando]=!0)):new Z.Event(e,t)},Z.Event.prototype={isDefaultPrevented:h,isPropagationStopped:h,isImmediatePropagationStopped:h,preventDefault:function(){var e=this.originalEvent;this.isDefaultPrevented=c,e&&e.preventDefault&&e.preventDefault()},stopPropagation:function(){var e=this.originalEvent;this.isPropagationStopped=c,e&&e.stopPropagation&&e.stopPropagation()},stopImmediatePropagation:function(){var e=this.originalEvent;this.isImmediatePropagationStopped=c,e&&e.stopImmediatePropagation&&e.stopImmediatePropagation(),this.stopPropagation()}},Z.each({mouseenter:"mouseover",mouseleave:"mouseout",pointerenter:"pointerover",pointerleave:"pointerout"},function(e,t){Z.event.special[e]={delegateType:t,bindType:t,handle:function(e){var n,i=this,s=e.relatedTarget,o=e.handleObj;return(!s||s!==i&&!Z.contains(i,s))&&(e.type=o.origType,n=o.handler.apply(this,arguments),e.type=t),n}}}),G.focusinBubbles||Z.each({focus:"focusin",blur:"focusout"},function(e,t){var n=function(e){Z.event.simulate(t,e.target,Z.event.fix(e),!0)};Z.event.special[t]={setup:function(){var i=this.ownerDocument||this,s=ve.access(i,t);s||i.addEventListener(e,n,!0),ve.access(i,t,(s||0)+1)},teardown:function(){var i=this.ownerDocument||this,s=ve.access(i,t)-1;s?ve.access(i,t,s):(i.removeEventListener(e,n,!0),ve.remove(i,t))}}}),Z.fn.extend({on:function(e,t,n,i,s){var o,r;if("object"==typeof e){"string"!=typeof t&&(n=n||t,t=void 0);for(r in e)this.on(r,t,n,e[r],s);return this}if(null==n&&null==i?(i=t,n=t=void 0):null==i&&("string"==typeof t?(i=n,n=void 0):(i=n,n=t,t=void 0)),i===!1)i=h;else if(!i)return this;return 1===s&&(o=i,i=function(e){return Z().off(e),o.apply(this,arguments)},i.guid=o.guid||(o.guid=Z.guid++)),this.each(function(){Z.event.add(this,e,i,n,t)})},one:function(e,t,n,i){return this.on(e,t,n,i,1)},off:function(e,t,n){var i,s;if(e&&e.preventDefault&&e.handleObj)return i=e.handleObj,Z(e.delegateTarget).off(i.namespace?i.origType+"."+i.namespace:i.origType,i.selector,i.handler),this;if("object"==typeof e){for(s in e)this.off(s,t,e[s]);return this}return(t===!1||"function"==typeof t)&&(n=t,t=void 0),n===!1&&(n=h),this.each(function(){Z.event.remove(this,e,n,t)})},trigger:function(e,t){return this.each(function(){Z.event.trigger(e,t,this)})},triggerHandler:function(e,t){var n=this[0];return n?Z.event.trigger(e,t,n,!0):void 0}});var Ae=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/gi,Ie=/<([\w:]+)/,Re=/<|&#?\w+;/,Pe=/<(?:script|style|link)/i,Oe=/checked\s*(?:[^=]|=\s*.checked.)/i,Me=/^$|\/(?:java|ecma)script/i,Le=/^true\/(.*)/,He=/^\s*<!(?:\[CDATA\[|--)|(?:\]\]|--)>\s*$/g,Fe={option:[1,"<select multiple='multiple'>","</select>"],thead:[1,"<table>","</table>"],col:[2,"<table><colgroup>","</colgroup></table>"],tr:[2,"<table><tbody>","</tbody></table>"],td:[3,"<table><tbody><tr>","</tr></tbody></table>"],_default:[0,"",""]};Fe.optgroup=Fe.option,Fe.tbody=Fe.tfoot=Fe.colgroup=Fe.caption=Fe.thead,Fe.th=Fe.td,Z.extend({clone:function(e,t,n){var i,s,o,r,a=e.cloneNode(!0),l=Z.contains(e.ownerDocument,e);if(!(G.noCloneChecked||1!==e.nodeType&&11!==e.nodeType||Z.isXMLDoc(e)))for(r=v(a),o=v(e),i=0,s=o.length;s>i;i++)y(o[i],r[i]);if(t)if(n)for(o=o||v(e),r=r||v(a),i=0,s=o.length;s>i;i++)g(o[i],r[i]);else g(e,a);return r=v(a,"script"),r.length>0&&m(r,!l&&v(e,"script")),a},buildFragment:function(e,t,n,i){for(var s,o,r,a,l,c,h=t.createDocumentFragment(),u=[],d=0,f=e.length;f>d;d++)if(s=e[d],s||0===s)if("object"===Z.type(s))Z.merge(u,s.nodeType?[s]:s);else if(Re.test(s)){for(o=o||h.appendChild(t.createElement("div")),r=(Ie.exec(s)||["",""])[1].toLowerCase(),a=Fe[r]||Fe._default,o.innerHTML=a[1]+s.replace(Ae,"<$1></$2>")+a[2],c=a[0];c--;)o=o.lastChild;Z.merge(u,o.childNodes),o=h.firstChild,o.textContent=""}else u.push(t.createTextNode(s));for(h.textContent="",d=0;s=u[d++];)if((!i||-1===Z.inArray(s,i))&&(l=Z.contains(s.ownerDocument,s),o=v(h.appendChild(s),"script"),l&&m(o),n))for(c=0;s=o[c++];)Me.test(s.type||"")&&n.push(s);return h},cleanData:function(e){for(var t,n,i,s,o=Z.event.special,r=0;void 0!==(n=e[r]);r++){if(Z.acceptData(n)&&(s=n[ve.expando],s&&(t=ve.cache[s]))){if(t.events)for(i in t.events)o[i]?Z.event.remove(n,i):Z.removeEvent(n,i,t.handle);ve.cache[s]&&delete ve.cache[s]}delete ye.cache[n[ye.expando]]}}}),Z.fn.extend({text:function(e){return ge(this,function(e){return void 0===e?Z.text(this):this.empty().each(function(){(1===this.nodeType||11===this.nodeType||9===this.nodeType)&&(this.textContent=e)})},null,e,arguments.length)},append:function(){return this.domManip(arguments,function(e){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var t=d(this,e);t.appendChild(e)}})},prepend:function(){return this.domManip(arguments,function(e){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var t=d(this,e);t.insertBefore(e,t.firstChild)}})},before:function(){return this.domManip(arguments,function(e){this.parentNode&&this.parentNode.insertBefore(e,this)})},after:function(){return this.domManip(arguments,function(e){this.parentNode&&this.parentNode.insertBefore(e,this.nextSibling)})},remove:function(e,t){for(var n,i=e?Z.filter(e,this):this,s=0;null!=(n=i[s]);s++)t||1!==n.nodeType||Z.cleanData(v(n)),n.parentNode&&(t&&Z.contains(n.ownerDocument,n)&&m(v(n,"script")),n.parentNode.removeChild(n));return this},empty:function(){for(var e,t=0;null!=(e=this[t]);t++)1===e.nodeType&&(Z.cleanData(v(e,!1)),e.textContent="");return this},clone:function(e,t){return e=null!=e&&e,t=null==t?e:t,this.map(function(){return Z.clone(this,e,t)})},html:function(e){return ge(this,function(e){var t=this[0]||{},n=0,i=this.length;if(void 0===e&&1===t.nodeType)return t.innerHTML;if("string"==typeof e&&!Pe.test(e)&&!Fe[(Ie.exec(e)||["",""])[1].toLowerCase()]){e=e.replace(Ae,"<$1></$2>");try{for(;i>n;n++)t=this[n]||{},1===t.nodeType&&(Z.cleanData(v(t,!1)),t.innerHTML=e);t=0}catch(s){}}t&&this.empty().append(e)},null,e,arguments.length)},replaceWith:function(){var e=arguments[0];return this.domManip(arguments,function(t){e=this.parentNode,Z.cleanData(v(this)),e&&e.replaceChild(t,this)}),e&&(e.length||e.nodeType)?this:this.remove()},detach:function(e){return this.remove(e,!0)},domManip:function(e,t){e=q.apply([],e);var n,i,s,o,r,a,l=0,c=this.length,h=this,u=c-1,d=e[0],m=Z.isFunction(d);if(m||c>1&&"string"==typeof d&&!G.checkClone&&Oe.test(d))return this.each(function(n){var i=h.eq(n);m&&(e[0]=d.call(this,n,i.html())),i.domManip(e,t)});if(c&&(n=Z.buildFragment(e,this[0].ownerDocument,!1,this),i=n.firstChild,1===n.childNodes.length&&(n=i),i)){for(s=Z.map(v(n,"script"),f),o=s.length;c>l;l++)r=n,l!==u&&(r=Z.clone(r,!0,!0),o&&Z.merge(s,v(r,"script"))),t.call(this[l],r,l);if(o)for(a=s[s.length-1].ownerDocument,Z.map(s,p),l=0;o>l;l++)r=s[l],Me.test(r.type||"")&&!ve.access(r,"globalEval")&&Z.contains(a,r)&&(r.src?Z._evalUrl&&Z._evalUrl(r.src):Z.globalEval(r.textContent.replace(He,"")))}return this}}),Z.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(e,t){Z.fn[e]=function(e){for(var n,i=[],s=Z(e),o=s.length-1,r=0;o>=r;r++)n=r===o?this:this.clone(!0),Z(s[r])[t](n),U.apply(i,n.get());return this.pushStack(i)}});var ze,We={},Be=/^margin/,je=new RegExp("^("+_e+")(?!px)[a-z%]+$","i"),$e=function(t){return t.ownerDocument.defaultView.opener?t.ownerDocument.defaultView.getComputedStyle(t,null):e.getComputedStyle(t,null)};!function(){function t(){r.style.cssText="-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;display:block;margin-top:1%;top:1%;border:1px;padding:1px;width:4px;position:absolute",r.innerHTML="",s.appendChild(o);var t=e.getComputedStyle(r,null);n="1%"!==t.top,i="4px"===t.width,s.removeChild(o)}var n,i,s=Q.documentElement,o=Q.createElement("div"),r=Q.createElement("div");r.style&&(r.style.backgroundClip="content-box",r.cloneNode(!0).style.backgroundClip="",G.clearCloneStyle="content-box"===r.style.backgroundClip,o.style.cssText="border:0;width:0;height:0;top:0;left:-9999px;margin-top:1px;position:absolute",o.appendChild(r),e.getComputedStyle&&Z.extend(G,{pixelPosition:function(){return t(),n},boxSizingReliable:function(){return null==i&&t(),i},reliableMarginRight:function(){var t,n=r.appendChild(Q.createElement("div"));return n.style.cssText=r.style.cssText="-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box;display:block;margin:0;border:0;padding:0",n.style.marginRight=n.style.width="0",r.style.width="1px",s.appendChild(o),t=!parseFloat(e.getComputedStyle(n,null).marginRight),s.removeChild(o),r.removeChild(n),t}}))}(),Z.swap=function(e,t,n,i){var s,o,r={};for(o in t)r[o]=e.style[o],e.style[o]=t[o];s=n.apply(e,i||[]);for(o in t)e.style[o]=r[o];return s};var qe=/^(none|table(?!-c[ea]).+)/,Ue=new RegExp("^("+_e+")(.*)$","i"),Ve=new RegExp("^([+-])=("+_e+")","i"),Ye={position:"absolute",visibility:"hidden",display:"block"},Xe={letterSpacing:"0",fontWeight:"400"},Ke=["Webkit","O","Moz","ms"];Z.extend({cssHooks:{opacity:{get:function(e,t){if(t){var n=_(e,"opacity");return""===n?"1":n}}}},cssNumber:{columnCount:!0,fillOpacity:!0,flexGrow:!0,flexShrink:!0,fontWeight:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,widows:!0,zIndex:!0,zoom:!0},cssProps:{"float":"cssFloat"},style:function(e,t,n,i){if(e&&3!==e.nodeType&&8!==e.nodeType&&e.style){var s,o,r,a=Z.camelCase(t),l=e.style;return t=Z.cssProps[a]||(Z.cssProps[a]=x(l,a)),r=Z.cssHooks[t]||Z.cssHooks[a],
void 0===n?r&&"get"in r&&void 0!==(s=r.get(e,!1,i))?s:l[t]:(o=typeof n,"string"===o&&(s=Ve.exec(n))&&(n=(s[1]+1)*s[2]+parseFloat(Z.css(e,t)),o="number"),void(null!=n&&n===n&&("number"!==o||Z.cssNumber[a]||(n+="px"),G.clearCloneStyle||""!==n||0!==t.indexOf("background")||(l[t]="inherit"),r&&"set"in r&&void 0===(n=r.set(e,n,i))||(l[t]=n))))}},css:function(e,t,n,i){var s,o,r,a=Z.camelCase(t);return t=Z.cssProps[a]||(Z.cssProps[a]=x(e.style,a)),r=Z.cssHooks[t]||Z.cssHooks[a],r&&"get"in r&&(s=r.get(e,!0,n)),void 0===s&&(s=_(e,t,i)),"normal"===s&&t in Xe&&(s=Xe[t]),""===n||n?(o=parseFloat(s),n===!0||Z.isNumeric(o)?o||0:s):s}}),Z.each(["height","width"],function(e,t){Z.cssHooks[t]={get:function(e,n,i){return n?qe.test(Z.css(e,"display"))&&0===e.offsetWidth?Z.swap(e,Ye,function(){return D(e,t,i)}):D(e,t,i):void 0},set:function(e,n,i){var s=i&&$e(e);return T(e,n,i?S(e,t,i,"border-box"===Z.css(e,"boxSizing",!1,s),s):0)}}}),Z.cssHooks.marginRight=C(G.reliableMarginRight,function(e,t){return t?Z.swap(e,{display:"inline-block"},_,[e,"marginRight"]):void 0}),Z.each({margin:"",padding:"",border:"Width"},function(e,t){Z.cssHooks[e+t]={expand:function(n){for(var i=0,s={},o="string"==typeof n?n.split(" "):[n];4>i;i++)s[e+Ce[i]+t]=o[i]||o[i-2]||o[0];return s}},Be.test(e)||(Z.cssHooks[e+t].set=T)}),Z.fn.extend({css:function(e,t){return ge(this,function(e,t,n){var i,s,o={},r=0;if(Z.isArray(t)){for(i=$e(e),s=t.length;s>r;r++)o[t[r]]=Z.css(e,t[r],!1,i);return o}return void 0!==n?Z.style(e,t,n):Z.css(e,t)},e,t,arguments.length>1)},show:function(){return E(this,!0)},hide:function(){return E(this)},toggle:function(e){return"boolean"==typeof e?e?this.show():this.hide():this.each(function(){xe(this)?Z(this).show():Z(this).hide()})}}),Z.Tween=k,k.prototype={constructor:k,init:function(e,t,n,i,s,o){this.elem=e,this.prop=n,this.easing=s||"swing",this.options=t,this.start=this.now=this.cur(),this.end=i,this.unit=o||(Z.cssNumber[n]?"":"px")},cur:function(){var e=k.propHooks[this.prop];return e&&e.get?e.get(this):k.propHooks._default.get(this)},run:function(e){var t,n=k.propHooks[this.prop];return this.options.duration?this.pos=t=Z.easing[this.easing](e,this.options.duration*e,0,1,this.options.duration):this.pos=t=e,this.now=(this.end-this.start)*t+this.start,this.options.step&&this.options.step.call(this.elem,this.now,this),n&&n.set?n.set(this):k.propHooks._default.set(this),this}},k.prototype.init.prototype=k.prototype,k.propHooks={_default:{get:function(e){var t;return null==e.elem[e.prop]||e.elem.style&&null!=e.elem.style[e.prop]?(t=Z.css(e.elem,e.prop,""),t&&"auto"!==t?t:0):e.elem[e.prop]},set:function(e){Z.fx.step[e.prop]?Z.fx.step[e.prop](e):e.elem.style&&(null!=e.elem.style[Z.cssProps[e.prop]]||Z.cssHooks[e.prop])?Z.style(e.elem,e.prop,e.now+e.unit):e.elem[e.prop]=e.now}}},k.propHooks.scrollTop=k.propHooks.scrollLeft={set:function(e){e.elem.nodeType&&e.elem.parentNode&&(e.elem[e.prop]=e.now)}},Z.easing={linear:function(e){return e},swing:function(e){return.5-Math.cos(e*Math.PI)/2}},Z.fx=k.prototype.init,Z.fx.step={};var Ge,Qe,Je=/^(?:toggle|show|hide)$/,Ze=new RegExp("^(?:([+-])=|)("+_e+")([a-z%]*)$","i"),et=/queueHooks$/,tt=[R],nt={"*":[function(e,t){var n=this.createTween(e,t),i=n.cur(),s=Ze.exec(t),o=s&&s[3]||(Z.cssNumber[e]?"":"px"),r=(Z.cssNumber[e]||"px"!==o&&+i)&&Ze.exec(Z.css(n.elem,e)),a=1,l=20;if(r&&r[3]!==o){o=o||r[3],s=s||[],r=+i||1;do a=a||".5",r/=a,Z.style(n.elem,e,r+o);while(a!==(a=n.cur()/i)&&1!==a&&--l)}return s&&(r=n.start=+r||+i||0,n.unit=o,n.end=s[1]?r+(s[1]+1)*s[2]:+s[2]),n}]};Z.Animation=Z.extend(O,{tweener:function(e,t){Z.isFunction(e)?(t=e,e=["*"]):e=e.split(" ");for(var n,i=0,s=e.length;s>i;i++)n=e[i],nt[n]=nt[n]||[],nt[n].unshift(t)},prefilter:function(e,t){t?tt.unshift(e):tt.push(e)}}),Z.speed=function(e,t,n){var i=e&&"object"==typeof e?Z.extend({},e):{complete:n||!n&&t||Z.isFunction(e)&&e,duration:e,easing:n&&t||t&&!Z.isFunction(t)&&t};return i.duration=Z.fx.off?0:"number"==typeof i.duration?i.duration:i.duration in Z.fx.speeds?Z.fx.speeds[i.duration]:Z.fx.speeds._default,(null==i.queue||i.queue===!0)&&(i.queue="fx"),i.old=i.complete,i.complete=function(){Z.isFunction(i.old)&&i.old.call(this),i.queue&&Z.dequeue(this,i.queue)},i},Z.fn.extend({fadeTo:function(e,t,n,i){return this.filter(xe).css("opacity",0).show().end().animate({opacity:t},e,n,i)},animate:function(e,t,n,i){var s=Z.isEmptyObject(e),o=Z.speed(t,n,i),r=function(){var t=O(this,Z.extend({},e),o);(s||ve.get(this,"finish"))&&t.stop(!0)};return r.finish=r,s||o.queue===!1?this.each(r):this.queue(o.queue,r)},stop:function(e,t,n){var i=function(e){var t=e.stop;delete e.stop,t(n)};return"string"!=typeof e&&(n=t,t=e,e=void 0),t&&e!==!1&&this.queue(e||"fx",[]),this.each(function(){var t=!0,s=null!=e&&e+"queueHooks",o=Z.timers,r=ve.get(this);if(s)r[s]&&r[s].stop&&i(r[s]);else for(s in r)r[s]&&r[s].stop&&et.test(s)&&i(r[s]);for(s=o.length;s--;)o[s].elem!==this||null!=e&&o[s].queue!==e||(o[s].anim.stop(n),t=!1,o.splice(s,1));(t||!n)&&Z.dequeue(this,e)})},finish:function(e){return e!==!1&&(e=e||"fx"),this.each(function(){var t,n=ve.get(this),i=n[e+"queue"],s=n[e+"queueHooks"],o=Z.timers,r=i?i.length:0;for(n.finish=!0,Z.queue(this,e,[]),s&&s.stop&&s.stop.call(this,!0),t=o.length;t--;)o[t].elem===this&&o[t].queue===e&&(o[t].anim.stop(!0),o.splice(t,1));for(t=0;r>t;t++)i[t]&&i[t].finish&&i[t].finish.call(this);delete n.finish})}}),Z.each(["toggle","show","hide"],function(e,t){var n=Z.fn[t];Z.fn[t]=function(e,i,s){return null==e||"boolean"==typeof e?n.apply(this,arguments):this.animate(A(t,!0),e,i,s)}}),Z.each({slideDown:A("show"),slideUp:A("hide"),slideToggle:A("toggle"),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"},fadeToggle:{opacity:"toggle"}},function(e,t){Z.fn[e]=function(e,n,i){return this.animate(t,e,n,i)}}),Z.timers=[],Z.fx.tick=function(){var e,t=0,n=Z.timers;for(Ge=Z.now();t<n.length;t++)e=n[t],e()||n[t]!==e||n.splice(t--,1);n.length||Z.fx.stop(),Ge=void 0},Z.fx.timer=function(e){Z.timers.push(e),e()?Z.fx.start():Z.timers.pop()},Z.fx.interval=13,Z.fx.start=function(){Qe||(Qe=setInterval(Z.fx.tick,Z.fx.interval))},Z.fx.stop=function(){clearInterval(Qe),Qe=null},Z.fx.speeds={slow:600,fast:200,_default:400},Z.fn.delay=function(e,t){return e=Z.fx?Z.fx.speeds[e]||e:e,t=t||"fx",this.queue(t,function(t,n){var i=setTimeout(t,e);n.stop=function(){clearTimeout(i)}})},function(){var e=Q.createElement("input"),t=Q.createElement("select"),n=t.appendChild(Q.createElement("option"));e.type="checkbox",G.checkOn=""!==e.value,G.optSelected=n.selected,t.disabled=!0,G.optDisabled=!n.disabled,e=Q.createElement("input"),e.value="t",e.type="radio",G.radioValue="t"===e.value}();var it,st,ot=Z.expr.attrHandle;Z.fn.extend({attr:function(e,t){return ge(this,Z.attr,e,t,arguments.length>1)},removeAttr:function(e){return this.each(function(){Z.removeAttr(this,e)})}}),Z.extend({attr:function(e,t,n){var i,s,o=e.nodeType;if(e&&3!==o&&8!==o&&2!==o)return typeof e.getAttribute===Se?Z.prop(e,t,n):(1===o&&Z.isXMLDoc(e)||(t=t.toLowerCase(),i=Z.attrHooks[t]||(Z.expr.match.bool.test(t)?st:it)),void 0===n?i&&"get"in i&&null!==(s=i.get(e,t))?s:(s=Z.find.attr(e,t),null==s?void 0:s):null!==n?i&&"set"in i&&void 0!==(s=i.set(e,n,t))?s:(e.setAttribute(t,n+""),n):void Z.removeAttr(e,t))},removeAttr:function(e,t){var n,i,s=0,o=t&&t.match(fe);if(o&&1===e.nodeType)for(;n=o[s++];)i=Z.propFix[n]||n,Z.expr.match.bool.test(n)&&(e[i]=!1),e.removeAttribute(n)},attrHooks:{type:{set:function(e,t){if(!G.radioValue&&"radio"===t&&Z.nodeName(e,"input")){var n=e.value;return e.setAttribute("type",t),n&&(e.value=n),t}}}}}),st={set:function(e,t,n){return t===!1?Z.removeAttr(e,n):e.setAttribute(n,n),n}},Z.each(Z.expr.match.bool.source.match(/\w+/g),function(e,t){var n=ot[t]||Z.find.attr;ot[t]=function(e,t,i){var s,o;return i||(o=ot[t],ot[t]=s,s=null!=n(e,t,i)?t.toLowerCase():null,ot[t]=o),s}});var rt=/^(?:input|select|textarea|button)$/i;Z.fn.extend({prop:function(e,t){return ge(this,Z.prop,e,t,arguments.length>1)},removeProp:function(e){return this.each(function(){delete this[Z.propFix[e]||e]})}}),Z.extend({propFix:{"for":"htmlFor","class":"className"},prop:function(e,t,n){var i,s,o,r=e.nodeType;if(e&&3!==r&&8!==r&&2!==r)return o=1!==r||!Z.isXMLDoc(e),o&&(t=Z.propFix[t]||t,s=Z.propHooks[t]),void 0!==n?s&&"set"in s&&void 0!==(i=s.set(e,n,t))?i:e[t]=n:s&&"get"in s&&null!==(i=s.get(e,t))?i:e[t]},propHooks:{tabIndex:{get:function(e){return e.hasAttribute("tabindex")||rt.test(e.nodeName)||e.href?e.tabIndex:-1}}}}),G.optSelected||(Z.propHooks.selected={get:function(e){var t=e.parentNode;return t&&t.parentNode&&t.parentNode.selectedIndex,null}}),Z.each(["tabIndex","readOnly","maxLength","cellSpacing","cellPadding","rowSpan","colSpan","useMap","frameBorder","contentEditable"],function(){Z.propFix[this.toLowerCase()]=this});var at=/[\t\r\n\f]/g;Z.fn.extend({addClass:function(e){var t,n,i,s,o,r,a="string"==typeof e&&e,l=0,c=this.length;if(Z.isFunction(e))return this.each(function(t){Z(this).addClass(e.call(this,t,this.className))});if(a)for(t=(e||"").match(fe)||[];c>l;l++)if(n=this[l],i=1===n.nodeType&&(n.className?(" "+n.className+" ").replace(at," "):" ")){for(o=0;s=t[o++];)i.indexOf(" "+s+" ")<0&&(i+=s+" ");r=Z.trim(i),n.className!==r&&(n.className=r)}return this},removeClass:function(e){var t,n,i,s,o,r,a=0===arguments.length||"string"==typeof e&&e,l=0,c=this.length;if(Z.isFunction(e))return this.each(function(t){Z(this).removeClass(e.call(this,t,this.className))});if(a)for(t=(e||"").match(fe)||[];c>l;l++)if(n=this[l],i=1===n.nodeType&&(n.className?(" "+n.className+" ").replace(at," "):"")){for(o=0;s=t[o++];)for(;i.indexOf(" "+s+" ")>=0;)i=i.replace(" "+s+" "," ");r=e?Z.trim(i):"",n.className!==r&&(n.className=r)}return this},toggleClass:function(e,t){var n=typeof e;return"boolean"==typeof t&&"string"===n?t?this.addClass(e):this.removeClass(e):this.each(Z.isFunction(e)?function(n){Z(this).toggleClass(e.call(this,n,this.className,t),t)}:function(){if("string"===n)for(var t,i=0,s=Z(this),o=e.match(fe)||[];t=o[i++];)s.hasClass(t)?s.removeClass(t):s.addClass(t);else(n===Se||"boolean"===n)&&(this.className&&ve.set(this,"__className__",this.className),this.className=this.className||e===!1?"":ve.get(this,"__className__")||"")})},hasClass:function(e){for(var t=" "+e+" ",n=0,i=this.length;i>n;n++)if(1===this[n].nodeType&&(" "+this[n].className+" ").replace(at," ").indexOf(t)>=0)return!0;return!1}});var lt=/\r/g;Z.fn.extend({val:function(e){var t,n,i,s=this[0];return arguments.length?(i=Z.isFunction(e),this.each(function(n){var s;1===this.nodeType&&(s=i?e.call(this,n,Z(this).val()):e,null==s?s="":"number"==typeof s?s+="":Z.isArray(s)&&(s=Z.map(s,function(e){return null==e?"":e+""})),t=Z.valHooks[this.type]||Z.valHooks[this.nodeName.toLowerCase()],t&&"set"in t&&void 0!==t.set(this,s,"value")||(this.value=s))})):s?(t=Z.valHooks[s.type]||Z.valHooks[s.nodeName.toLowerCase()],t&&"get"in t&&void 0!==(n=t.get(s,"value"))?n:(n=s.value,"string"==typeof n?n.replace(lt,""):null==n?"":n)):void 0}}),Z.extend({valHooks:{option:{get:function(e){var t=Z.find.attr(e,"value");return null!=t?t:Z.trim(Z.text(e))}},select:{get:function(e){for(var t,n,i=e.options,s=e.selectedIndex,o="select-one"===e.type||0>s,r=o?null:[],a=o?s+1:i.length,l=0>s?a:o?s:0;a>l;l++)if(n=i[l],!(!n.selected&&l!==s||(G.optDisabled?n.disabled:null!==n.getAttribute("disabled"))||n.parentNode.disabled&&Z.nodeName(n.parentNode,"optgroup"))){if(t=Z(n).val(),o)return t;r.push(t)}return r},set:function(e,t){for(var n,i,s=e.options,o=Z.makeArray(t),r=s.length;r--;)i=s[r],(i.selected=Z.inArray(i.value,o)>=0)&&(n=!0);return n||(e.selectedIndex=-1),o}}}}),Z.each(["radio","checkbox"],function(){Z.valHooks[this]={set:function(e,t){return Z.isArray(t)?e.checked=Z.inArray(Z(e).val(),t)>=0:void 0}},G.checkOn||(Z.valHooks[this].get=function(e){return null===e.getAttribute("value")?"on":e.value})}),Z.each("blur focus focusin focusout load resize scroll unload click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup error contextmenu".split(" "),function(e,t){Z.fn[t]=function(e,n){return arguments.length>0?this.on(t,null,e,n):this.trigger(t)}}),Z.fn.extend({hover:function(e,t){return this.mouseenter(e).mouseleave(t||e)},bind:function(e,t,n){return this.on(e,null,t,n)},unbind:function(e,t){return this.off(e,null,t)},delegate:function(e,t,n,i){return this.on(t,e,n,i)},undelegate:function(e,t,n){return 1===arguments.length?this.off(e,"**"):this.off(t,e||"**",n)}});var ct=Z.now(),ht=/\?/;Z.parseJSON=function(e){return JSON.parse(e+"")},Z.parseXML=function(e){var t,n;if(!e||"string"!=typeof e)return null;try{n=new DOMParser,t=n.parseFromString(e,"text/xml")}catch(i){t=void 0}return(!t||t.getElementsByTagName("parsererror").length)&&Z.error("Invalid XML: "+e),t};var ut=/#.*$/,dt=/([?&])_=[^&]*/,ft=/^(.*?):[ \t]*([^\r\n]*)$/gm,pt=/^(?:about|app|app-storage|.+-extension|file|res|widget):$/,mt=/^(?:GET|HEAD)$/,gt=/^\/\//,vt=/^([\w.+-]+:)(?:\/\/(?:[^\/?#]*@|)([^\/?#:]*)(?::(\d+)|)|)/,yt={},bt={},wt="*/".concat("*"),_t=e.location.href,Ct=vt.exec(_t.toLowerCase())||[];Z.extend({active:0,lastModified:{},etag:{},ajaxSettings:{url:_t,type:"GET",isLocal:pt.test(Ct[1]),global:!0,processData:!0,async:!0,contentType:"application/x-www-form-urlencoded; charset=UTF-8",accepts:{"*":wt,text:"text/plain",html:"text/html",xml:"application/xml, text/xml",json:"application/json, text/javascript"},contents:{xml:/xml/,html:/html/,json:/json/},responseFields:{xml:"responseXML",text:"responseText",json:"responseJSON"},converters:{"* text":String,"text html":!0,"text json":Z.parseJSON,"text xml":Z.parseXML},flatOptions:{url:!0,context:!0}},ajaxSetup:function(e,t){return t?H(H(e,Z.ajaxSettings),t):H(Z.ajaxSettings,e)},ajaxPrefilter:M(yt),ajaxTransport:M(bt),ajax:function(e,t){function n(e,t,n,r){var l,h,v,y,w,C=t;2!==b&&(b=2,a&&clearTimeout(a),i=void 0,o=r||"",_.readyState=e>0?4:0,l=e>=200&&300>e||304===e,n&&(y=F(u,_,n)),y=z(u,y,_,l),l?(u.ifModified&&(w=_.getResponseHeader("Last-Modified"),w&&(Z.lastModified[s]=w),w=_.getResponseHeader("etag"),w&&(Z.etag[s]=w)),204===e||"HEAD"===u.type?C="nocontent":304===e?C="notmodified":(C=y.state,h=y.data,v=y.error,l=!v)):(v=C,(e||!C)&&(C="error",0>e&&(e=0))),_.status=e,_.statusText=(t||C)+"",l?p.resolveWith(d,[h,C,_]):p.rejectWith(d,[_,C,v]),_.statusCode(g),g=void 0,c&&f.trigger(l?"ajaxSuccess":"ajaxError",[_,u,l?h:v]),m.fireWith(d,[_,C]),c&&(f.trigger("ajaxComplete",[_,u]),--Z.active||Z.event.trigger("ajaxStop")))}"object"==typeof e&&(t=e,e=void 0),t=t||{};var i,s,o,r,a,l,c,h,u=Z.ajaxSetup({},t),d=u.context||u,f=u.context&&(d.nodeType||d.jquery)?Z(d):Z.event,p=Z.Deferred(),m=Z.Callbacks("once memory"),g=u.statusCode||{},v={},y={},b=0,w="canceled",_={readyState:0,getResponseHeader:function(e){var t;if(2===b){if(!r)for(r={};t=ft.exec(o);)r[t[1].toLowerCase()]=t[2];t=r[e.toLowerCase()]}return null==t?null:t},getAllResponseHeaders:function(){return 2===b?o:null},setRequestHeader:function(e,t){var n=e.toLowerCase();return b||(e=y[n]=y[n]||e,v[e]=t),this},overrideMimeType:function(e){return b||(u.mimeType=e),this},statusCode:function(e){var t;if(e)if(2>b)for(t in e)g[t]=[g[t],e[t]];else _.always(e[_.status]);return this},abort:function(e){var t=e||w;return i&&i.abort(t),n(0,t),this}};if(p.promise(_).complete=m.add,_.success=_.done,_.error=_.fail,u.url=((e||u.url||_t)+"").replace(ut,"").replace(gt,Ct[1]+"//"),u.type=t.method||t.type||u.method||u.type,u.dataTypes=Z.trim(u.dataType||"*").toLowerCase().match(fe)||[""],null==u.crossDomain&&(l=vt.exec(u.url.toLowerCase()),u.crossDomain=!(!l||l[1]===Ct[1]&&l[2]===Ct[2]&&(l[3]||("http:"===l[1]?"80":"443"))===(Ct[3]||("http:"===Ct[1]?"80":"443")))),u.data&&u.processData&&"string"!=typeof u.data&&(u.data=Z.param(u.data,u.traditional)),L(yt,u,t,_),2===b)return _;c=Z.event&&u.global,c&&0===Z.active++&&Z.event.trigger("ajaxStart"),u.type=u.type.toUpperCase(),u.hasContent=!mt.test(u.type),s=u.url,u.hasContent||(u.data&&(s=u.url+=(ht.test(s)?"&":"?")+u.data,delete u.data),u.cache===!1&&(u.url=dt.test(s)?s.replace(dt,"$1_="+ct++):s+(ht.test(s)?"&":"?")+"_="+ct++)),u.ifModified&&(Z.lastModified[s]&&_.setRequestHeader("If-Modified-Since",Z.lastModified[s]),Z.etag[s]&&_.setRequestHeader("If-None-Match",Z.etag[s])),(u.data&&u.hasContent&&u.contentType!==!1||t.contentType)&&_.setRequestHeader("Content-Type",u.contentType),_.setRequestHeader("Accept",u.dataTypes[0]&&u.accepts[u.dataTypes[0]]?u.accepts[u.dataTypes[0]]+("*"!==u.dataTypes[0]?", "+wt+"; q=0.01":""):u.accepts["*"]);for(h in u.headers)_.setRequestHeader(h,u.headers[h]);if(u.beforeSend&&(u.beforeSend.call(d,_,u)===!1||2===b))return _.abort();w="abort";for(h in{success:1,error:1,complete:1})_[h](u[h]);if(i=L(bt,u,t,_)){_.readyState=1,c&&f.trigger("ajaxSend",[_,u]),u.async&&u.timeout>0&&(a=setTimeout(function(){_.abort("timeout")},u.timeout));try{b=1,i.send(v,n)}catch(C){if(!(2>b))throw C;n(-1,C)}}else n(-1,"No Transport");return _},getJSON:function(e,t,n){return Z.get(e,t,n,"json")},getScript:function(e,t){return Z.get(e,void 0,t,"script")}}),Z.each(["get","post"],function(e,t){Z[t]=function(e,n,i,s){return Z.isFunction(n)&&(s=s||i,i=n,n=void 0),Z.ajax({url:e,type:t,dataType:s,data:n,success:i})}}),Z._evalUrl=function(e){return Z.ajax({url:e,type:"GET",dataType:"script",async:!1,global:!1,"throws":!0})},Z.fn.extend({wrapAll:function(e){var t;return Z.isFunction(e)?this.each(function(t){Z(this).wrapAll(e.call(this,t))}):(this[0]&&(t=Z(e,this[0].ownerDocument).eq(0).clone(!0),this[0].parentNode&&t.insertBefore(this[0]),t.map(function(){for(var e=this;e.firstElementChild;)e=e.firstElementChild;return e}).append(this)),this)},wrapInner:function(e){return this.each(Z.isFunction(e)?function(t){Z(this).wrapInner(e.call(this,t))}:function(){var t=Z(this),n=t.contents();n.length?n.wrapAll(e):t.append(e)})},wrap:function(e){var t=Z.isFunction(e);return this.each(function(n){Z(this).wrapAll(t?e.call(this,n):e)})},unwrap:function(){return this.parent().each(function(){Z.nodeName(this,"body")||Z(this).replaceWith(this.childNodes)}).end()}}),Z.expr.filters.hidden=function(e){return e.offsetWidth<=0&&e.offsetHeight<=0},Z.expr.filters.visible=function(e){return!Z.expr.filters.hidden(e)};var xt=/%20/g,Tt=/\[\]$/,St=/\r?\n/g,Dt=/^(?:submit|button|image|reset|file)$/i,Et=/^(?:input|select|textarea|keygen)/i;Z.param=function(e,t){var n,i=[],s=function(e,t){t=Z.isFunction(t)?t():null==t?"":t,i[i.length]=encodeURIComponent(e)+"="+encodeURIComponent(t)};if(void 0===t&&(t=Z.ajaxSettings&&Z.ajaxSettings.traditional),Z.isArray(e)||e.jquery&&!Z.isPlainObject(e))Z.each(e,function(){s(this.name,this.value)});else for(n in e)W(n,e[n],t,s);return i.join("&").replace(xt,"+")},Z.fn.extend({serialize:function(){return Z.param(this.serializeArray())},serializeArray:function(){return this.map(function(){var e=Z.prop(this,"elements");return e?Z.makeArray(e):this}).filter(function(){var e=this.type;return this.name&&!Z(this).is(":disabled")&&Et.test(this.nodeName)&&!Dt.test(e)&&(this.checked||!Te.test(e))}).map(function(e,t){var n=Z(this).val();return null==n?null:Z.isArray(n)?Z.map(n,function(e){return{name:t.name,value:e.replace(St,"\r\n")}}):{name:t.name,value:n.replace(St,"\r\n")}}).get()}}),Z.ajaxSettings.xhr=function(){try{return new XMLHttpRequest}catch(e){}};var kt=0,Nt={},At={0:200,1223:204},It=Z.ajaxSettings.xhr();e.attachEvent&&e.attachEvent("onunload",function(){for(var e in Nt)Nt[e]()}),G.cors=!!It&&"withCredentials"in It,G.ajax=It=!!It,Z.ajaxTransport(function(e){var t;return G.cors||It&&!e.crossDomain?{send:function(n,i){var s,o=e.xhr(),r=++kt;if(o.open(e.type,e.url,e.async,e.username,e.password),e.xhrFields)for(s in e.xhrFields)o[s]=e.xhrFields[s];e.mimeType&&o.overrideMimeType&&o.overrideMimeType(e.mimeType),e.crossDomain||n["X-Requested-With"]||(n["X-Requested-With"]="XMLHttpRequest");for(s in n)o.setRequestHeader(s,n[s]);t=function(e){return function(){t&&(delete Nt[r],t=o.onload=o.onerror=null,"abort"===e?o.abort():"error"===e?i(o.status,o.statusText):i(At[o.status]||o.status,o.statusText,"string"==typeof o.responseText?{text:o.responseText}:void 0,o.getAllResponseHeaders()))}},o.onload=t(),o.onerror=t("error"),t=Nt[r]=t("abort");try{o.send(e.hasContent&&e.data||null)}catch(a){if(t)throw a}},abort:function(){t&&t()}}:void 0}),Z.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/(?:java|ecma)script/},converters:{"text script":function(e){return Z.globalEval(e),e}}}),Z.ajaxPrefilter("script",function(e){void 0===e.cache&&(e.cache=!1),e.crossDomain&&(e.type="GET")}),Z.ajaxTransport("script",function(e){if(e.crossDomain){var t,n;return{send:function(i,s){t=Z("<script>").prop({async:!0,charset:e.scriptCharset,src:e.url}).on("load error",n=function(e){t.remove(),n=null,e&&s("error"===e.type?404:200,e.type)}),Q.head.appendChild(t[0])},abort:function(){n&&n()}}}});var Rt=[],Pt=/(=)\?(?=&|$)|\?\?/;Z.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var e=Rt.pop()||Z.expando+"_"+ct++;return this[e]=!0,e}}),Z.ajaxPrefilter("json jsonp",function(t,n,i){var s,o,r,a=t.jsonp!==!1&&(Pt.test(t.url)?"url":"string"==typeof t.data&&!(t.contentType||"").indexOf("application/x-www-form-urlencoded")&&Pt.test(t.data)&&"data");return a||"jsonp"===t.dataTypes[0]?(s=t.jsonpCallback=Z.isFunction(t.jsonpCallback)?t.jsonpCallback():t.jsonpCallback,a?t[a]=t[a].replace(Pt,"$1"+s):t.jsonp!==!1&&(t.url+=(ht.test(t.url)?"&":"?")+t.jsonp+"="+s),t.converters["script json"]=function(){return r||Z.error(s+" was not called"),r[0]},t.dataTypes[0]="json",o=e[s],e[s]=function(){r=arguments},i.always(function(){e[s]=o,t[s]&&(t.jsonpCallback=n.jsonpCallback,Rt.push(s)),r&&Z.isFunction(o)&&o(r[0]),r=o=void 0}),"script"):void 0}),Z.parseHTML=function(e,t,n){if(!e||"string"!=typeof e)return null;"boolean"==typeof t&&(n=t,t=!1),t=t||Q;var i=re.exec(e),s=!n&&[];return i?[t.createElement(i[1])]:(i=Z.buildFragment([e],t,s),s&&s.length&&Z(s).remove(),Z.merge([],i.childNodes))};var Ot=Z.fn.load;Z.fn.load=function(e,t,n){if("string"!=typeof e&&Ot)return Ot.apply(this,arguments);var i,s,o,r=this,a=e.indexOf(" ");return a>=0&&(i=Z.trim(e.slice(a)),e=e.slice(0,a)),Z.isFunction(t)?(n=t,t=void 0):t&&"object"==typeof t&&(s="POST"),r.length>0&&Z.ajax({url:e,type:s,dataType:"html",data:t}).done(function(e){o=arguments,r.html(i?Z("<div>").append(Z.parseHTML(e)).find(i):e)}).complete(n&&function(e,t){r.each(n,o||[e.responseText,t,e])}),this},Z.each(["ajaxStart","ajaxStop","ajaxComplete","ajaxError","ajaxSuccess","ajaxSend"],function(e,t){Z.fn[t]=function(e){return this.on(t,e)}}),Z.expr.filters.animated=function(e){return Z.grep(Z.timers,function(t){return e===t.elem}).length};var Mt=e.document.documentElement;Z.offset={setOffset:function(e,t,n){var i,s,o,r,a,l,c,h=Z.css(e,"position"),u=Z(e),d={};"static"===h&&(e.style.position="relative"),a=u.offset(),o=Z.css(e,"top"),l=Z.css(e,"left"),c=("absolute"===h||"fixed"===h)&&(o+l).indexOf("auto")>-1,c?(i=u.position(),r=i.top,s=i.left):(r=parseFloat(o)||0,s=parseFloat(l)||0),Z.isFunction(t)&&(t=t.call(e,n,a)),null!=t.top&&(d.top=t.top-a.top+r),null!=t.left&&(d.left=t.left-a.left+s),"using"in t?t.using.call(e,d):u.css(d)}},Z.fn.extend({offset:function(e){if(arguments.length)return void 0===e?this:this.each(function(t){Z.offset.setOffset(this,e,t)});var t,n,i=this[0],s={top:0,left:0},o=i&&i.ownerDocument;return o?(t=o.documentElement,Z.contains(t,i)?(typeof i.getBoundingClientRect!==Se&&(s=i.getBoundingClientRect()),n=B(o),{top:s.top+n.pageYOffset-t.clientTop,left:s.left+n.pageXOffset-t.clientLeft}):s):void 0},position:function(){if(this[0]){var e,t,n=this[0],i={top:0,left:0};return"fixed"===Z.css(n,"position")?t=n.getBoundingClientRect():(e=this.offsetParent(),t=this.offset(),Z.nodeName(e[0],"html")||(i=e.offset()),i.top+=Z.css(e[0],"borderTopWidth",!0),i.left+=Z.css(e[0],"borderLeftWidth",!0)),{top:t.top-i.top-Z.css(n,"marginTop",!0),left:t.left-i.left-Z.css(n,"marginLeft",!0)}}},offsetParent:function(){return this.map(function(){for(var e=this.offsetParent||Mt;e&&!Z.nodeName(e,"html")&&"static"===Z.css(e,"position");)e=e.offsetParent;return e||Mt})}}),Z.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},function(t,n){var i="pageYOffset"===n;Z.fn[t]=function(s){return ge(this,function(t,s,o){var r=B(t);return void 0===o?r?r[n]:t[s]:void(r?r.scrollTo(i?e.pageXOffset:o,i?o:e.pageYOffset):t[s]=o)},t,s,arguments.length,null)}}),Z.each(["top","left"],function(e,t){Z.cssHooks[t]=C(G.pixelPosition,function(e,n){return n?(n=_(e,t),je.test(n)?Z(e).position()[t]+"px":n):void 0})}),Z.each({Height:"height",Width:"width"},function(e,t){Z.each({padding:"inner"+e,content:t,"":"outer"+e},function(n,i){Z.fn[i]=function(i,s){var o=arguments.length&&(n||"boolean"!=typeof i),r=n||(i===!0||s===!0?"margin":"border");return ge(this,function(t,n,i){var s;return Z.isWindow(t)?t.document.documentElement["client"+e]:9===t.nodeType?(s=t.documentElement,Math.max(t.body["scroll"+e],s["scroll"+e],t.body["offset"+e],s["offset"+e],s["client"+e])):void 0===i?Z.css(t,n,r):Z.style(t,n,i,r)},t,o?i:void 0,o,null)}})}),Z.fn.size=function(){return this.length},Z.fn.andSelf=Z.fn.addBack,"function"==typeof define&&define.amd&&define("jquery",[],function(){return Z});var Lt=e.jQuery,Ht=e.$;return Z.noConflict=function(t){return e.$===Z&&(e.$=Ht),t&&e.jQuery===Z&&(e.jQuery=Lt),Z},typeof t===Se&&(e.jQuery=e.$=Z),Z}),"undefined"==typeof jQuery)throw new Error("Bootstrap's JavaScript requires jQuery");if(+function(e){"use strict";var t=e.fn.jquery.split(" ")[0].split(".");if(t[0]<2&&t[1]<9||1==t[0]&&9==t[1]&&t[2]<1)throw new Error("Bootstrap's JavaScript requires jQuery version 1.9.1 or higher")}(jQuery),+function(e){"use strict";function t(){var e=document.createElement("bootstrap"),t={WebkitTransition:"webkitTransitionEnd",MozTransition:"transitionend",OTransition:"oTransitionEnd otransitionend",transition:"transitionend"};for(var n in t)if(void 0!==e.style[n])return{end:t[n]};return!1}e.fn.emulateTransitionEnd=function(t){var n=!1,i=this;e(this).one("bsTransitionEnd",function(){n=!0});var s=function(){n||e(i).trigger(e.support.transition.end)};return setTimeout(s,t),this},e(function(){e.support.transition=t(),e.support.transition&&(e.event.special.bsTransitionEnd={bindType:e.support.transition.end,delegateType:e.support.transition.end,handle:function(t){return e(t.target).is(this)?t.handleObj.handler.apply(this,arguments):void 0}})})}(jQuery),+function(e){"use strict";function t(t){return this.each(function(){var n=e(this),s=n.data("bs.alert");s||n.data("bs.alert",s=new i(this)),"string"==typeof t&&s[t].call(n)})}var n='[data-dismiss="alert"]',i=function(t){e(t).on("click",n,this.close)};i.VERSION="3.3.4",i.TRANSITION_DURATION=150,i.prototype.close=function(t){function n(){r.detach().trigger("closed.bs.alert").remove()}var s=e(this),o=s.attr("data-target");o||(o=s.attr("href"),o=o&&o.replace(/.*(?=#[^\s]*$)/,""));var r=e(o);t&&t.preventDefault(),r.length||(r=s.closest(".alert")),r.trigger(t=e.Event("close.bs.alert")),t.isDefaultPrevented()||(r.removeClass("in"),e.support.transition&&r.hasClass("fade")?r.one("bsTransitionEnd",n).emulateTransitionEnd(i.TRANSITION_DURATION):n())};var s=e.fn.alert;e.fn.alert=t,e.fn.alert.Constructor=i,e.fn.alert.noConflict=function(){return e.fn.alert=s,this},e(document).on("click.bs.alert.data-api",n,i.prototype.close)}(jQuery),+function(e){"use strict";function t(t){return this.each(function(){var i=e(this),s=i.data("bs.button"),o="object"==typeof t&&t;s||i.data("bs.button",s=new n(this,o)),"toggle"==t?s.toggle():t&&s.setState(t)})}var n=function(t,i){this.$element=e(t),this.options=e.extend({},n.DEFAULTS,i),this.isLoading=!1};n.VERSION="3.3.4",n.DEFAULTS={loadingText:"loading..."},n.prototype.setState=function(t){var n="disabled",i=this.$element,s=i.is("input")?"val":"html",o=i.data();t+="Text",null==o.resetText&&i.data("resetText",i[s]()),setTimeout(e.proxy(function(){i[s](null==o[t]?this.options[t]:o[t]),"loadingText"==t?(this.isLoading=!0,i.addClass(n).attr(n,n)):this.isLoading&&(this.isLoading=!1,i.removeClass(n).removeAttr(n))},this),0)},n.prototype.toggle=function(){var e=!0,t=this.$element.closest('[data-toggle="buttons"]');if(t.length){var n=this.$element.find("input");"radio"==n.prop("type")&&(n.prop("checked")&&this.$element.hasClass("active")?e=!1:t.find(".active").removeClass("active")),e&&n.prop("checked",!this.$element.hasClass("active")).trigger("change")}else this.$element.attr("aria-pressed",!this.$element.hasClass("active"));e&&this.$element.toggleClass("active")};var i=e.fn.button;e.fn.button=t,e.fn.button.Constructor=n,e.fn.button.noConflict=function(){return e.fn.button=i,this},e(document).on("click.bs.button.data-api",'[data-toggle^="button"]',function(n){var i=e(n.target);i.hasClass("btn")||(i=i.closest(".btn")),t.call(i,"toggle"),n.preventDefault()}).on("focus.bs.button.data-api blur.bs.button.data-api",'[data-toggle^="button"]',function(t){e(t.target).closest(".btn").toggleClass("focus",/^focus(in)?$/.test(t.type))})}(jQuery),+function(e){"use strict";function t(t){return this.each(function(){var i=e(this),s=i.data("bs.carousel"),o=e.extend({},n.DEFAULTS,i.data(),"object"==typeof t&&t),r="string"==typeof t?t:o.slide;s||i.data("bs.carousel",s=new n(this,o)),"number"==typeof t?s.to(t):r?s[r]():o.interval&&s.pause().cycle()})}var n=function(t,n){this.$element=e(t),this.$indicators=this.$element.find(".carousel-indicators"),this.options=n,this.paused=null,this.sliding=null,this.interval=null,this.$active=null,this.$items=null,this.options.keyboard&&this.$element.on("keydown.bs.carousel",e.proxy(this.keydown,this)),"hover"==this.options.pause&&!("ontouchstart"in document.documentElement)&&this.$element.on("mouseenter.bs.carousel",e.proxy(this.pause,this)).on("mouseleave.bs.carousel",e.proxy(this.cycle,this))};n.VERSION="3.3.4",n.TRANSITION_DURATION=600,n.DEFAULTS={interval:5e3,pause:"hover",wrap:!0,keyboard:!0},n.prototype.keydown=function(e){if(!/input|textarea/i.test(e.target.tagName)){switch(e.which){case 37:this.prev();break;case 39:this.next();break;default:return}e.preventDefault()}},n.prototype.cycle=function(t){return t||(this.paused=!1),this.interval&&clearInterval(this.interval),this.options.interval&&!this.paused&&(this.interval=setInterval(e.proxy(this.next,this),this.options.interval)),this},n.prototype.getItemIndex=function(e){return this.$items=e.parent().children(".item"),this.$items.index(e||this.$active)},n.prototype.getItemForDirection=function(e,t){var n=this.getItemIndex(t),i="prev"==e&&0===n||"next"==e&&n==this.$items.length-1;if(i&&!this.options.wrap)return t;var s="prev"==e?-1:1,o=(n+s)%this.$items.length;return this.$items.eq(o)},n.prototype.to=function(e){var t=this,n=this.getItemIndex(this.$active=this.$element.find(".item.active"));return e>this.$items.length-1||0>e?void 0:this.sliding?this.$element.one("slid.bs.carousel",function(){t.to(e)}):n==e?this.pause().cycle():this.slide(e>n?"next":"prev",this.$items.eq(e))},n.prototype.pause=function(t){return t||(this.paused=!0),this.$element.find(".next, .prev").length&&e.support.transition&&(this.$element.trigger(e.support.transition.end),this.cycle(!0)),this.interval=clearInterval(this.interval),this},n.prototype.next=function(){return this.sliding?void 0:this.slide("next")},n.prototype.prev=function(){return this.sliding?void 0:this.slide("prev")},n.prototype.slide=function(t,i){var s=this.$element.find(".item.active"),o=i||this.getItemForDirection(t,s),r=this.interval,a="next"==t?"left":"right",l=this;if(o.hasClass("active"))return this.sliding=!1;var c=o[0],h=e.Event("slide.bs.carousel",{relatedTarget:c,direction:a});if(this.$element.trigger(h),!h.isDefaultPrevented()){if(this.sliding=!0,r&&this.pause(),this.$indicators.length){this.$indicators.find(".active").removeClass("active");var u=e(this.$indicators.children()[this.getItemIndex(o)]);u&&u.addClass("active")}var d=e.Event("slid.bs.carousel",{relatedTarget:c,direction:a});return e.support.transition&&this.$element.hasClass("slide")?(o.addClass(t),
o[0].offsetWidth,s.addClass(a),o.addClass(a),s.one("bsTransitionEnd",function(){o.removeClass([t,a].join(" ")).addClass("active"),s.removeClass(["active",a].join(" ")),l.sliding=!1,setTimeout(function(){l.$element.trigger(d)},0)}).emulateTransitionEnd(n.TRANSITION_DURATION)):(s.removeClass("active"),o.addClass("active"),this.sliding=!1,this.$element.trigger(d)),r&&this.cycle(),this}};var i=e.fn.carousel;e.fn.carousel=t,e.fn.carousel.Constructor=n,e.fn.carousel.noConflict=function(){return e.fn.carousel=i,this};var s=function(n){var i,s=e(this),o=e(s.attr("data-target")||(i=s.attr("href"))&&i.replace(/.*(?=#[^\s]+$)/,""));if(o.hasClass("carousel")){var r=e.extend({},o.data(),s.data()),a=s.attr("data-slide-to");a&&(r.interval=!1),t.call(o,r),a&&o.data("bs.carousel").to(a),n.preventDefault()}};e(document).on("click.bs.carousel.data-api","[data-slide]",s).on("click.bs.carousel.data-api","[data-slide-to]",s),e(window).on("load",function(){e('[data-ride="carousel"]').each(function(){var n=e(this);t.call(n,n.data())})})}(jQuery),+function(e){"use strict";function t(t){var n,i=t.attr("data-target")||(n=t.attr("href"))&&n.replace(/.*(?=#[^\s]+$)/,"");return e(i)}function n(t){return this.each(function(){var n=e(this),s=n.data("bs.collapse"),o=e.extend({},i.DEFAULTS,n.data(),"object"==typeof t&&t);!s&&o.toggle&&/show|hide/.test(t)&&(o.toggle=!1),s||n.data("bs.collapse",s=new i(this,o)),"string"==typeof t&&s[t]()})}var i=function(t,n){this.$element=e(t),this.options=e.extend({},i.DEFAULTS,n),this.$trigger=e('[data-toggle="collapse"][href="#'+t.id+'"],[data-toggle="collapse"][data-target="#'+t.id+'"]'),this.transitioning=null,this.options.parent?this.$parent=this.getParent():this.addAriaAndCollapsedClass(this.$element,this.$trigger),this.options.toggle&&this.toggle()};i.VERSION="3.3.4",i.TRANSITION_DURATION=350,i.DEFAULTS={toggle:!0},i.prototype.dimension=function(){var e=this.$element.hasClass("width");return e?"width":"height"},i.prototype.show=function(){if(!this.transitioning&&!this.$element.hasClass("in")){var t,s=this.$parent&&this.$parent.children(".panel").children(".in, .collapsing");if(!(s&&s.length&&(t=s.data("bs.collapse"),t&&t.transitioning))){var o=e.Event("show.bs.collapse");if(this.$element.trigger(o),!o.isDefaultPrevented()){s&&s.length&&(n.call(s,"hide"),t||s.data("bs.collapse",null));var r=this.dimension();this.$element.removeClass("collapse").addClass("collapsing")[r](0).attr("aria-expanded",!0),this.$trigger.removeClass("collapsed").attr("aria-expanded",!0),this.transitioning=1;var a=function(){this.$element.removeClass("collapsing").addClass("collapse in")[r](""),this.transitioning=0,this.$element.trigger("shown.bs.collapse")};if(!e.support.transition)return a.call(this);var l=e.camelCase(["scroll",r].join("-"));this.$element.one("bsTransitionEnd",e.proxy(a,this)).emulateTransitionEnd(i.TRANSITION_DURATION)[r](this.$element[0][l])}}}},i.prototype.hide=function(){if(!this.transitioning&&this.$element.hasClass("in")){var t=e.Event("hide.bs.collapse");if(this.$element.trigger(t),!t.isDefaultPrevented()){var n=this.dimension();this.$element[n](this.$element[n]())[0].offsetHeight,this.$element.addClass("collapsing").removeClass("collapse in").attr("aria-expanded",!1),this.$trigger.addClass("collapsed").attr("aria-expanded",!1),this.transitioning=1;var s=function(){this.transitioning=0,this.$element.removeClass("collapsing").addClass("collapse").trigger("hidden.bs.collapse")};return e.support.transition?void this.$element[n](0).one("bsTransitionEnd",e.proxy(s,this)).emulateTransitionEnd(i.TRANSITION_DURATION):s.call(this)}}},i.prototype.toggle=function(){this[this.$element.hasClass("in")?"hide":"show"]()},i.prototype.getParent=function(){return e(this.options.parent).find('[data-toggle="collapse"][data-parent="'+this.options.parent+'"]').each(e.proxy(function(n,i){var s=e(i);this.addAriaAndCollapsedClass(t(s),s)},this)).end()},i.prototype.addAriaAndCollapsedClass=function(e,t){var n=e.hasClass("in");e.attr("aria-expanded",n),t.toggleClass("collapsed",!n).attr("aria-expanded",n)};var s=e.fn.collapse;e.fn.collapse=n,e.fn.collapse.Constructor=i,e.fn.collapse.noConflict=function(){return e.fn.collapse=s,this},e(document).on("click.bs.collapse.data-api",'[data-toggle="collapse"]',function(i){var s=e(this);s.attr("data-target")||i.preventDefault();var o=t(s),r=o.data("bs.collapse"),a=r?"toggle":s.data();n.call(o,a)})}(jQuery),+function(e){"use strict";function t(t){t&&3===t.which||(e(s).remove(),e(o).each(function(){var i=e(this),s=n(i),o={relatedTarget:this};s.hasClass("open")&&(s.trigger(t=e.Event("hide.bs.dropdown",o)),t.isDefaultPrevented()||(i.attr("aria-expanded","false"),s.removeClass("open").trigger("hidden.bs.dropdown",o)))}))}function n(t){var n=t.attr("data-target");n||(n=t.attr("href"),n=n&&/#[A-Za-z]/.test(n)&&n.replace(/.*(?=#[^\s]*$)/,""));var i=n&&e(n);return i&&i.length?i:t.parent()}function i(t){return this.each(function(){var n=e(this),i=n.data("bs.dropdown");i||n.data("bs.dropdown",i=new r(this)),"string"==typeof t&&i[t].call(n)})}var s=".dropdown-backdrop",o='[data-toggle="dropdown"]',r=function(t){e(t).on("click.bs.dropdown",this.toggle)};r.VERSION="3.3.4",r.prototype.toggle=function(i){var s=e(this);if(!s.is(".disabled, :disabled")){var o=n(s),r=o.hasClass("open");if(t(),!r){"ontouchstart"in document.documentElement&&!o.closest(".navbar-nav").length&&e('<div class="dropdown-backdrop"/>').insertAfter(e(this)).on("click",t);var a={relatedTarget:this};if(o.trigger(i=e.Event("show.bs.dropdown",a)),i.isDefaultPrevented())return;s.trigger("focus").attr("aria-expanded","true"),o.toggleClass("open").trigger("shown.bs.dropdown",a)}return!1}},r.prototype.keydown=function(t){if(/(38|40|27|32)/.test(t.which)&&!/input|textarea/i.test(t.target.tagName)){var i=e(this);if(t.preventDefault(),t.stopPropagation(),!i.is(".disabled, :disabled")){var s=n(i),r=s.hasClass("open");if(!r&&27!=t.which||r&&27==t.which)return 27==t.which&&s.find(o).trigger("focus"),i.trigger("click");var a=" li:not(.disabled):visible a",l=s.find('[role="menu"]'+a+', [role="listbox"]'+a);if(l.length){var c=l.index(t.target);38==t.which&&c>0&&c--,40==t.which&&c<l.length-1&&c++,~c||(c=0),l.eq(c).trigger("focus")}}}};var a=e.fn.dropdown;e.fn.dropdown=i,e.fn.dropdown.Constructor=r,e.fn.dropdown.noConflict=function(){return e.fn.dropdown=a,this},e(document).on("click.bs.dropdown.data-api",t).on("click.bs.dropdown.data-api",".dropdown form",function(e){e.stopPropagation()}).on("click.bs.dropdown.data-api",o,r.prototype.toggle).on("keydown.bs.dropdown.data-api",o,r.prototype.keydown).on("keydown.bs.dropdown.data-api",'[role="menu"]',r.prototype.keydown).on("keydown.bs.dropdown.data-api",'[role="listbox"]',r.prototype.keydown)}(jQuery),+function(e){"use strict";function t(t,i){return this.each(function(){var s=e(this),o=s.data("bs.modal"),r=e.extend({},n.DEFAULTS,s.data(),"object"==typeof t&&t);o||s.data("bs.modal",o=new n(this,r)),"string"==typeof t?o[t](i):r.show&&o.show(i)})}var n=function(t,n){this.options=n,this.$body=e(document.body),this.$element=e(t),this.$dialog=this.$element.find(".modal-dialog"),this.$backdrop=null,this.isShown=null,this.originalBodyPad=null,this.scrollbarWidth=0,this.ignoreBackdropClick=!1,this.options.remote&&this.$element.find(".modal-content").load(this.options.remote,e.proxy(function(){this.$element.trigger("loaded.bs.modal")},this))};n.VERSION="3.3.4",n.TRANSITION_DURATION=300,n.BACKDROP_TRANSITION_DURATION=150,n.DEFAULTS={backdrop:!0,keyboard:!0,show:!0},n.prototype.toggle=function(e){return this.isShown?this.hide():this.show(e)},n.prototype.show=function(t){var i=this,s=e.Event("show.bs.modal",{relatedTarget:t});this.$element.trigger(s),this.isShown||s.isDefaultPrevented()||(this.isShown=!0,this.checkScrollbar(),this.setScrollbar(),this.$body.addClass("modal-open"),this.escape(),this.resize(),this.$element.on("click.dismiss.bs.modal",'[data-dismiss="modal"]',e.proxy(this.hide,this)),this.$dialog.on("mousedown.dismiss.bs.modal",function(){i.$element.one("mouseup.dismiss.bs.modal",function(t){e(t.target).is(i.$element)&&(i.ignoreBackdropClick=!0)})}),this.backdrop(function(){var s=e.support.transition&&i.$element.hasClass("fade");i.$element.parent().length||i.$element.appendTo(i.$body),i.$element.show().scrollTop(0),i.adjustDialog(),s&&i.$element[0].offsetWidth,i.$element.addClass("in").attr("aria-hidden",!1),i.enforceFocus();var o=e.Event("shown.bs.modal",{relatedTarget:t});s?i.$dialog.one("bsTransitionEnd",function(){i.$element.trigger("focus").trigger(o)}).emulateTransitionEnd(n.TRANSITION_DURATION):i.$element.trigger("focus").trigger(o)}))},n.prototype.hide=function(t){t&&t.preventDefault(),t=e.Event("hide.bs.modal"),this.$element.trigger(t),this.isShown&&!t.isDefaultPrevented()&&(this.isShown=!1,this.escape(),this.resize(),e(document).off("focusin.bs.modal"),this.$element.removeClass("in").attr("aria-hidden",!0).off("click.dismiss.bs.modal").off("mouseup.dismiss.bs.modal"),this.$dialog.off("mousedown.dismiss.bs.modal"),e.support.transition&&this.$element.hasClass("fade")?this.$element.one("bsTransitionEnd",e.proxy(this.hideModal,this)).emulateTransitionEnd(n.TRANSITION_DURATION):this.hideModal())},n.prototype.enforceFocus=function(){e(document).off("focusin.bs.modal").on("focusin.bs.modal",e.proxy(function(e){this.$element[0]===e.target||this.$element.has(e.target).length||this.$element.trigger("focus")},this))},n.prototype.escape=function(){this.isShown&&this.options.keyboard?this.$element.on("keydown.dismiss.bs.modal",e.proxy(function(e){27==e.which&&this.hide()},this)):this.isShown||this.$element.off("keydown.dismiss.bs.modal")},n.prototype.resize=function(){this.isShown?e(window).on("resize.bs.modal",e.proxy(this.handleUpdate,this)):e(window).off("resize.bs.modal")},n.prototype.hideModal=function(){var e=this;this.$element.hide(),this.backdrop(function(){e.$body.removeClass("modal-open"),e.resetAdjustments(),e.resetScrollbar(),e.$element.trigger("hidden.bs.modal")})},n.prototype.removeBackdrop=function(){this.$backdrop&&this.$backdrop.remove(),this.$backdrop=null},n.prototype.backdrop=function(t){var i=this,s=this.$element.hasClass("fade")?"fade":"";if(this.isShown&&this.options.backdrop){var o=e.support.transition&&s;if(this.$backdrop=e('<div class="modal-backdrop '+s+'" />').appendTo(this.$body),this.$element.on("click.dismiss.bs.modal",e.proxy(function(e){return this.ignoreBackdropClick?void(this.ignoreBackdropClick=!1):void(e.target===e.currentTarget&&("static"==this.options.backdrop?this.$element[0].focus():this.hide()))},this)),o&&this.$backdrop[0].offsetWidth,this.$backdrop.addClass("in"),!t)return;o?this.$backdrop.one("bsTransitionEnd",t).emulateTransitionEnd(n.BACKDROP_TRANSITION_DURATION):t()}else if(!this.isShown&&this.$backdrop){this.$backdrop.removeClass("in");var r=function(){i.removeBackdrop(),t&&t()};e.support.transition&&this.$element.hasClass("fade")?this.$backdrop.one("bsTransitionEnd",r).emulateTransitionEnd(n.BACKDROP_TRANSITION_DURATION):r()}else t&&t()},n.prototype.handleUpdate=function(){this.adjustDialog()},n.prototype.adjustDialog=function(){var e=this.$element[0].scrollHeight>document.documentElement.clientHeight;this.$element.css({paddingLeft:!this.bodyIsOverflowing&&e?this.scrollbarWidth:"",paddingRight:this.bodyIsOverflowing&&!e?this.scrollbarWidth:""})},n.prototype.resetAdjustments=function(){this.$element.css({paddingLeft:"",paddingRight:""})},n.prototype.checkScrollbar=function(){var e=window.innerWidth;if(!e){var t=document.documentElement.getBoundingClientRect();e=t.right-Math.abs(t.left)}this.bodyIsOverflowing=document.body.clientWidth<e,this.scrollbarWidth=this.measureScrollbar()},n.prototype.setScrollbar=function(){var e=parseInt(this.$body.css("padding-right")||0,10);this.originalBodyPad=document.body.style.paddingRight||"",this.bodyIsOverflowing&&this.$body.css("padding-right",e+this.scrollbarWidth)},n.prototype.resetScrollbar=function(){this.$body.css("padding-right",this.originalBodyPad)},n.prototype.measureScrollbar=function(){var e=document.createElement("div");e.className="modal-scrollbar-measure",this.$body.append(e);var t=e.offsetWidth-e.clientWidth;return this.$body[0].removeChild(e),t};var i=e.fn.modal;e.fn.modal=t,e.fn.modal.Constructor=n,e.fn.modal.noConflict=function(){return e.fn.modal=i,this},e(document).on("click.bs.modal.data-api",'[data-toggle="modal"]',function(n){var i=e(this),s=i.attr("href"),o=e(i.attr("data-target")||s&&s.replace(/.*(?=#[^\s]+$)/,"")),r=o.data("bs.modal")?"toggle":e.extend({remote:!/#/.test(s)&&s},o.data(),i.data());i.is("a")&&n.preventDefault(),o.one("show.bs.modal",function(e){e.isDefaultPrevented()||o.one("hidden.bs.modal",function(){i.is(":visible")&&i.trigger("focus")})}),t.call(o,r,this)})}(jQuery),+function(e){"use strict";function t(t){return this.each(function(){var i=e(this),s=i.data("bs.tooltip"),o="object"==typeof t&&t;(s||!/destroy|hide/.test(t))&&(s||i.data("bs.tooltip",s=new n(this,o)),"string"==typeof t&&s[t]())})}var n=function(e,t){this.type=null,this.options=null,this.enabled=null,this.timeout=null,this.hoverState=null,this.$element=null,this.init("tooltip",e,t)};n.VERSION="3.3.4",n.TRANSITION_DURATION=150,n.DEFAULTS={animation:!0,placement:"top",selector:!1,template:'<div class="tooltip" role="tooltip"><div class="tooltip-arrow"></div><div class="tooltip-inner"></div></div>',trigger:"hover focus",title:"",delay:0,html:!1,container:!1,viewport:{selector:"body",padding:0}},n.prototype.init=function(t,n,i){if(this.enabled=!0,this.type=t,this.$element=e(n),this.options=this.getOptions(i),this.$viewport=this.options.viewport&&e(this.options.viewport.selector||this.options.viewport),this.$element[0]instanceof document.constructor&&!this.options.selector)throw new Error("`selector` option must be specified when initializing "+this.type+" on the window.document object!");for(var s=this.options.trigger.split(" "),o=s.length;o--;){var r=s[o];if("click"==r)this.$element.on("click."+this.type,this.options.selector,e.proxy(this.toggle,this));else if("manual"!=r){var a="hover"==r?"mouseenter":"focusin",l="hover"==r?"mouseleave":"focusout";this.$element.on(a+"."+this.type,this.options.selector,e.proxy(this.enter,this)),this.$element.on(l+"."+this.type,this.options.selector,e.proxy(this.leave,this))}}this.options.selector?this._options=e.extend({},this.options,{trigger:"manual",selector:""}):this.fixTitle()},n.prototype.getDefaults=function(){return n.DEFAULTS},n.prototype.getOptions=function(t){return t=e.extend({},this.getDefaults(),this.$element.data(),t),t.delay&&"number"==typeof t.delay&&(t.delay={show:t.delay,hide:t.delay}),t},n.prototype.getDelegateOptions=function(){var t={},n=this.getDefaults();return this._options&&e.each(this._options,function(e,i){n[e]!=i&&(t[e]=i)}),t},n.prototype.enter=function(t){var n=t instanceof this.constructor?t:e(t.currentTarget).data("bs."+this.type);return n&&n.$tip&&n.$tip.is(":visible")?void(n.hoverState="in"):(n||(n=new this.constructor(t.currentTarget,this.getDelegateOptions()),e(t.currentTarget).data("bs."+this.type,n)),clearTimeout(n.timeout),n.hoverState="in",n.options.delay&&n.options.delay.show?void(n.timeout=setTimeout(function(){"in"==n.hoverState&&n.show()},n.options.delay.show)):n.show())},n.prototype.leave=function(t){var n=t instanceof this.constructor?t:e(t.currentTarget).data("bs."+this.type);return n||(n=new this.constructor(t.currentTarget,this.getDelegateOptions()),e(t.currentTarget).data("bs."+this.type,n)),clearTimeout(n.timeout),n.hoverState="out",n.options.delay&&n.options.delay.hide?void(n.timeout=setTimeout(function(){"out"==n.hoverState&&n.hide()},n.options.delay.hide)):n.hide()},n.prototype.show=function(){var t=e.Event("show.bs."+this.type);if(this.hasContent()&&this.enabled){this.$element.trigger(t);var i=e.contains(this.$element[0].ownerDocument.documentElement,this.$element[0]);if(t.isDefaultPrevented()||!i)return;var s=this,o=this.tip(),r=this.getUID(this.type);this.setContent(),o.attr("id",r),this.$element.attr("aria-describedby",r),this.options.animation&&o.addClass("fade");var a="function"==typeof this.options.placement?this.options.placement.call(this,o[0],this.$element[0]):this.options.placement,l=/\s?auto?\s?/i,c=l.test(a);c&&(a=a.replace(l,"")||"top"),o.detach().css({top:0,left:0,display:"block"}).addClass(a).data("bs."+this.type,this),this.options.container?o.appendTo(this.options.container):o.insertAfter(this.$element);var h=this.getPosition(),u=o[0].offsetWidth,d=o[0].offsetHeight;if(c){var f=a,p=this.options.container?e(this.options.container):this.$element.parent(),m=this.getPosition(p);a="bottom"==a&&h.bottom+d>m.bottom?"top":"top"==a&&h.top-d<m.top?"bottom":"right"==a&&h.right+u>m.width?"left":"left"==a&&h.left-u<m.left?"right":a,o.removeClass(f).addClass(a)}var g=this.getCalculatedOffset(a,h,u,d);this.applyPlacement(g,a);var v=function(){var e=s.hoverState;s.$element.trigger("shown.bs."+s.type),s.hoverState=null,"out"==e&&s.leave(s)};e.support.transition&&this.$tip.hasClass("fade")?o.one("bsTransitionEnd",v).emulateTransitionEnd(n.TRANSITION_DURATION):v()}},n.prototype.applyPlacement=function(t,n){var i=this.tip(),s=i[0].offsetWidth,o=i[0].offsetHeight,r=parseInt(i.css("margin-top"),10),a=parseInt(i.css("margin-left"),10);isNaN(r)&&(r=0),isNaN(a)&&(a=0),t.top=t.top+r,t.left=t.left+a,e.offset.setOffset(i[0],e.extend({using:function(e){i.css({top:Math.round(e.top),left:Math.round(e.left)})}},t),0),i.addClass("in");var l=i[0].offsetWidth,c=i[0].offsetHeight;"top"==n&&c!=o&&(t.top=t.top+o-c);var h=this.getViewportAdjustedDelta(n,t,l,c);h.left?t.left+=h.left:t.top+=h.top;var u=/top|bottom/.test(n),d=u?2*h.left-s+l:2*h.top-o+c,f=u?"offsetWidth":"offsetHeight";i.offset(t),this.replaceArrow(d,i[0][f],u)},n.prototype.replaceArrow=function(e,t,n){this.arrow().css(n?"left":"top",50*(1-e/t)+"%").css(n?"top":"left","")},n.prototype.setContent=function(){var e=this.tip(),t=this.getTitle();e.find(".tooltip-inner")[this.options.html?"html":"text"](t),e.removeClass("fade in top bottom left right")},n.prototype.hide=function(t){function i(){"in"!=s.hoverState&&o.detach(),s.$element.removeAttr("aria-describedby").trigger("hidden.bs."+s.type),t&&t()}var s=this,o=e(this.$tip),r=e.Event("hide.bs."+this.type);return this.$element.trigger(r),r.isDefaultPrevented()?void 0:(o.removeClass("in"),e.support.transition&&o.hasClass("fade")?o.one("bsTransitionEnd",i).emulateTransitionEnd(n.TRANSITION_DURATION):i(),this.hoverState=null,this)},n.prototype.fixTitle=function(){var e=this.$element;(e.attr("title")||"string"!=typeof e.attr("data-original-title"))&&e.attr("data-original-title",e.attr("title")||"").attr("title","")},n.prototype.hasContent=function(){return this.getTitle()},n.prototype.getPosition=function(t){t=t||this.$element;var n=t[0],i="BODY"==n.tagName,s=n.getBoundingClientRect();null==s.width&&(s=e.extend({},s,{width:s.right-s.left,height:s.bottom-s.top}));var o=i?{top:0,left:0}:t.offset(),r={scroll:i?document.documentElement.scrollTop||document.body.scrollTop:t.scrollTop()},a=i?{width:e(window).width(),height:e(window).height()}:null;return e.extend({},s,r,a,o)},n.prototype.getCalculatedOffset=function(e,t,n,i){return"bottom"==e?{top:t.top+t.height,left:t.left+t.width/2-n/2}:"top"==e?{top:t.top-i,left:t.left+t.width/2-n/2}:"left"==e?{top:t.top+t.height/2-i/2,left:t.left-n}:{top:t.top+t.height/2-i/2,left:t.left+t.width}},n.prototype.getViewportAdjustedDelta=function(e,t,n,i){var s={top:0,left:0};if(!this.$viewport)return s;var o=this.options.viewport&&this.options.viewport.padding||0,r=this.getPosition(this.$viewport);if(/right|left/.test(e)){var a=t.top-o-r.scroll,l=t.top+o-r.scroll+i;a<r.top?s.top=r.top-a:l>r.top+r.height&&(s.top=r.top+r.height-l)}else{var c=t.left-o,h=t.left+o+n;c<r.left?s.left=r.left-c:h>r.width&&(s.left=r.left+r.width-h)}return s},n.prototype.getTitle=function(){var e,t=this.$element,n=this.options;return e=t.attr("data-original-title")||("function"==typeof n.title?n.title.call(t[0]):n.title)},n.prototype.getUID=function(e){do e+=~~(1e6*Math.random());while(document.getElementById(e));return e},n.prototype.tip=function(){return this.$tip=this.$tip||e(this.options.template)},n.prototype.arrow=function(){return this.$arrow=this.$arrow||this.tip().find(".tooltip-arrow")},n.prototype.enable=function(){this.enabled=!0},n.prototype.disable=function(){this.enabled=!1},n.prototype.toggleEnabled=function(){this.enabled=!this.enabled},n.prototype.toggle=function(t){var n=this;t&&(n=e(t.currentTarget).data("bs."+this.type),n||(n=new this.constructor(t.currentTarget,this.getDelegateOptions()),e(t.currentTarget).data("bs."+this.type,n))),n.tip().hasClass("in")?n.leave(n):n.enter(n)},n.prototype.destroy=function(){var e=this;clearTimeout(this.timeout),this.hide(function(){e.$element.off("."+e.type).removeData("bs."+e.type)})};var i=e.fn.tooltip;e.fn.tooltip=t,e.fn.tooltip.Constructor=n,e.fn.tooltip.noConflict=function(){return e.fn.tooltip=i,this}}(jQuery),+function(e){"use strict";function t(t){return this.each(function(){var i=e(this),s=i.data("bs.popover"),o="object"==typeof t&&t;(s||!/destroy|hide/.test(t))&&(s||i.data("bs.popover",s=new n(this,o)),"string"==typeof t&&s[t]())})}var n=function(e,t){this.init("popover",e,t)};if(!e.fn.tooltip)throw new Error("Popover requires tooltip.js");n.VERSION="3.3.4",n.DEFAULTS=e.extend({},e.fn.tooltip.Constructor.DEFAULTS,{placement:"right",trigger:"click",content:"",template:'<div class="popover" role="tooltip"><div class="arrow"></div><h3 class="popover-title"></h3><div class="popover-content"></div></div>'}),n.prototype=e.extend({},e.fn.tooltip.Constructor.prototype),n.prototype.constructor=n,n.prototype.getDefaults=function(){return n.DEFAULTS},n.prototype.setContent=function(){var e=this.tip(),t=this.getTitle(),n=this.getContent();e.find(".popover-title")[this.options.html?"html":"text"](t),e.find(".popover-content").children().detach().end()[this.options.html?"string"==typeof n?"html":"append":"text"](n),e.removeClass("fade top bottom left right in"),e.find(".popover-title").html()||e.find(".popover-title").hide()},n.prototype.hasContent=function(){return this.getTitle()||this.getContent()},n.prototype.getContent=function(){var e=this.$element,t=this.options;return e.attr("data-content")||("function"==typeof t.content?t.content.call(e[0]):t.content)},n.prototype.arrow=function(){return this.$arrow=this.$arrow||this.tip().find(".arrow")};var i=e.fn.popover;e.fn.popover=t,e.fn.popover.Constructor=n,e.fn.popover.noConflict=function(){return e.fn.popover=i,this}}(jQuery),+function(e){"use strict";function t(n,i){this.$body=e(document.body),this.$scrollElement=e(e(n).is(document.body)?window:n),this.options=e.extend({},t.DEFAULTS,i),this.selector=(this.options.target||"")+" .nav li > a",this.offsets=[],this.targets=[],this.activeTarget=null,this.scrollHeight=0,this.$scrollElement.on("scroll.bs.scrollspy",e.proxy(this.process,this)),this.refresh(),this.process()}function n(n){return this.each(function(){var i=e(this),s=i.data("bs.scrollspy"),o="object"==typeof n&&n;s||i.data("bs.scrollspy",s=new t(this,o)),"string"==typeof n&&s[n]()})}t.VERSION="3.3.4",t.DEFAULTS={offset:10},t.prototype.getScrollHeight=function(){return this.$scrollElement[0].scrollHeight||Math.max(this.$body[0].scrollHeight,document.documentElement.scrollHeight)},t.prototype.refresh=function(){var t=this,n="offset",i=0;this.offsets=[],this.targets=[],this.scrollHeight=this.getScrollHeight(),e.isWindow(this.$scrollElement[0])||(n="position",i=this.$scrollElement.scrollTop()),this.$body.find(this.selector).map(function(){var t=e(this),s=t.data("target")||t.attr("href"),o=/^#./.test(s)&&e(s);return o&&o.length&&o.is(":visible")&&[[o[n]().top+i,s]]||null}).sort(function(e,t){return e[0]-t[0]}).each(function(){t.offsets.push(this[0]),t.targets.push(this[1])})},t.prototype.process=function(){var e,t=this.$scrollElement.scrollTop()+this.options.offset,n=this.getScrollHeight(),i=this.options.offset+n-this.$scrollElement.height(),s=this.offsets,o=this.targets,r=this.activeTarget;if(this.scrollHeight!=n&&this.refresh(),t>=i)return r!=(e=o[o.length-1])&&this.activate(e);if(r&&t<s[0])return this.activeTarget=null,this.clear();for(e=s.length;e--;)r!=o[e]&&t>=s[e]&&(void 0===s[e+1]||t<s[e+1])&&this.activate(o[e])},t.prototype.activate=function(t){this.activeTarget=t,this.clear();var n=this.selector+'[data-target="'+t+'"],'+this.selector+'[href="'+t+'"]',i=e(n).parents("li").addClass("active");i.parent(".dropdown-menu").length&&(i=i.closest("li.dropdown").addClass("active")),i.trigger("activate.bs.scrollspy")},t.prototype.clear=function(){e(this.selector).parentsUntil(this.options.target,".active").removeClass("active")};var i=e.fn.scrollspy;e.fn.scrollspy=n,e.fn.scrollspy.Constructor=t,e.fn.scrollspy.noConflict=function(){return e.fn.scrollspy=i,this},e(window).on("load.bs.scrollspy.data-api",function(){e('[data-spy="scroll"]').each(function(){var t=e(this);n.call(t,t.data())})})}(jQuery),+function(e){"use strict";function t(t){return this.each(function(){var i=e(this),s=i.data("bs.tab");s||i.data("bs.tab",s=new n(this)),"string"==typeof t&&s[t]()})}var n=function(t){this.element=e(t)};n.VERSION="3.3.4",n.TRANSITION_DURATION=150,n.prototype.show=function(){var t=this.element,n=t.closest("ul:not(.dropdown-menu)"),i=t.data("target");if(i||(i=t.attr("href"),i=i&&i.replace(/.*(?=#[^\s]*$)/,"")),!t.parent("li").hasClass("active")){var s=n.find(".active:last a"),o=e.Event("hide.bs.tab",{relatedTarget:t[0]}),r=e.Event("show.bs.tab",{relatedTarget:s[0]});if(s.trigger(o),t.trigger(r),!r.isDefaultPrevented()&&!o.isDefaultPrevented()){var a=e(i);this.activate(t.closest("li"),n),this.activate(a,a.parent(),function(){s.trigger({type:"hidden.bs.tab",relatedTarget:t[0]}),t.trigger({type:"shown.bs.tab",relatedTarget:s[0]})})}}},n.prototype.activate=function(t,i,s){function o(){r.removeClass("active").find("> .dropdown-menu > .active").removeClass("active").end().find('[data-toggle="tab"]').attr("aria-expanded",!1),t.addClass("active").find('[data-toggle="tab"]').attr("aria-expanded",!0),a?(t[0].offsetWidth,t.addClass("in")):t.removeClass("fade"),t.parent(".dropdown-menu").length&&t.closest("li.dropdown").addClass("active").end().find('[data-toggle="tab"]').attr("aria-expanded",!0),s&&s()}var r=i.find("> .active"),a=s&&e.support.transition&&(r.length&&r.hasClass("fade")||!!i.find("> .fade").length);r.length&&a?r.one("bsTransitionEnd",o).emulateTransitionEnd(n.TRANSITION_DURATION):o(),r.removeClass("in")};var i=e.fn.tab;e.fn.tab=t,e.fn.tab.Constructor=n,e.fn.tab.noConflict=function(){return e.fn.tab=i,this};var s=function(n){n.preventDefault(),t.call(e(this),"show")};e(document).on("click.bs.tab.data-api",'[data-toggle="tab"]',s).on("click.bs.tab.data-api",'[data-toggle="pill"]',s)}(jQuery),+function(e){"use strict";function t(t){return this.each(function(){var i=e(this),s=i.data("bs.affix"),o="object"==typeof t&&t;s||i.data("bs.affix",s=new n(this,o)),"string"==typeof t&&s[t]()})}var n=function(t,i){this.options=e.extend({},n.DEFAULTS,i),this.$target=e(this.options.target).on("scroll.bs.affix.data-api",e.proxy(this.checkPosition,this)).on("click.bs.affix.data-api",e.proxy(this.checkPositionWithEventLoop,this)),this.$element=e(t),this.affixed=null,this.unpin=null,this.pinnedOffset=null,this.checkPosition()};n.VERSION="3.3.4",n.RESET="affix affix-top affix-bottom",n.DEFAULTS={offset:0,target:window},n.prototype.getState=function(e,t,n,i){var s=this.$target.scrollTop(),o=this.$element.offset(),r=this.$target.height();if(null!=n&&"top"==this.affixed)return n>s&&"top";if("bottom"==this.affixed)return null!=n?!(s+this.unpin<=o.top)&&"bottom":!(e-i>=s+r)&&"bottom";var a=null==this.affixed,l=a?s:o.top,c=a?r:t;return null!=n&&n>=s?"top":null!=i&&l+c>=e-i&&"bottom"},n.prototype.getPinnedOffset=function(){if(this.pinnedOffset)return this.pinnedOffset;this.$element.removeClass(n.RESET).addClass("affix");var e=this.$target.scrollTop(),t=this.$element.offset();return this.pinnedOffset=t.top-e},n.prototype.checkPositionWithEventLoop=function(){setTimeout(e.proxy(this.checkPosition,this),1)},n.prototype.checkPosition=function(){if(this.$element.is(":visible")){var t=this.$element.height(),i=this.options.offset,s=i.top,o=i.bottom,r=e(document.body).height();"object"!=typeof i&&(o=s=i),"function"==typeof s&&(s=i.top(this.$element)),"function"==typeof o&&(o=i.bottom(this.$element));var a=this.getState(r,t,s,o);if(this.affixed!=a){null!=this.unpin&&this.$element.css("top","");var l="affix"+(a?"-"+a:""),c=e.Event(l+".bs.affix");if(this.$element.trigger(c),c.isDefaultPrevented())return;this.affixed=a,this.unpin="bottom"==a?this.getPinnedOffset():null,this.$element.removeClass(n.RESET).addClass(l).trigger(l.replace("affix","affixed")+".bs.affix")}"bottom"==a&&this.$element.offset({top:r-t-o})}};var i=e.fn.affix;e.fn.affix=t,e.fn.affix.Constructor=n,e.fn.affix.noConflict=function(){return e.fn.affix=i,this},e(window).on("load",function(){e('[data-spy="affix"]').each(function(){var n=e(this),i=n.data();i.offset=i.offset||{},null!=i.offsetBottom&&(i.offset.bottom=i.offsetBottom),null!=i.offsetTop&&(i.offset.top=i.offsetTop),t.call(n,i)})})}(jQuery),"undefined"==typeof jQuery)throw new Error("AdminLTE requires jQuery");$.AdminLTE={},$.AdminLTE.options={navbarMenuSlimscroll:!0,navbarMenuSlimscrollWidth:"3px",navbarMenuHeight:"200px",animationSpeed:500,sidebarToggleSelector:"[data-toggle='offcanvas']",sidebarPushMenu:!0,sidebarSlimScroll:!0,sidebarExpandOnHover:!1,enableBoxRefresh:!0,enableBSToppltip:!0,BSTooltipSelector:"[data-toggle='tooltip']",enableFastclick:!0,enableControlSidebar:!0,controlSidebarOptions:{toggleBtnSelector:"[data-toggle='control-sidebar']",selector:".control-sidebar",slide:!0},enableBoxWidget:!0,boxWidgetOptions:{boxWidgetIcons:{collapse:"fa-minus",open:"fa-plus",remove:"fa-times"},boxWidgetSelectors:{remove:'[data-widget="remove"]',collapse:'[data-widget="collapse"]'}},directChat:{enable:!0,contactToggleSelector:'[data-widget="chat-pane-toggle"]'},colors:{lightBlue:"#3c8dbc",red:"#f56954",green:"#00a65a",aqua:"#00c0ef",yellow:"#f39c12",blue:"#0073b7",navy:"#001F3F",teal:"#39CCCC",olive:"#3D9970",lime:"#01FF70",orange:"#FF851B",fuchsia:"#F012BE",purple:"#8E24AA",maroon:"#D81B60",black:"#222222",gray:"#d2d6de"},screenSizes:{xs:480,sm:768,md:992,lg:1200}},$(function(){"use strict";$("body").removeClass("hold-transition"),"undefined"!=typeof AdminLTEOptions&&$.extend(!0,$.AdminLTE.options,AdminLTEOptions);var e=$.AdminLTE.options;_init(),$.AdminLTE.layout.activate(),$.AdminLTE.tree(".sidebar"),e.enableControlSidebar&&$.AdminLTE.controlSidebar.activate(),e.navbarMenuSlimscroll&&"undefined"!=typeof $.fn.slimscroll&&$(".navbar .menu").slimscroll({height:e.navbarMenuHeight,alwaysVisible:!1,size:e.navbarMenuSlimscrollWidth}).css("width","100%"),e.sidebarPushMenu&&$.AdminLTE.pushMenu.activate(e.sidebarToggleSelector),e.enableBSToppltip&&$("body").tooltip({selector:e.BSTooltipSelector}),e.enableBoxWidget&&$.AdminLTE.boxWidget.activate(),e.enableFastclick&&"undefined"!=typeof FastClick&&FastClick.attach(document.body),e.directChat.enable&&$(document).on("click",e.directChat.contactToggleSelector,function(){var e=$(this).parents(".direct-chat").first();e.toggleClass("direct-chat-contacts-open")}),$('.btn-group[data-toggle="btn-toggle"]').each(function(){var e=$(this);$(this).find(".btn").on("click",function(t){e.find(".btn.active").removeClass("active"),$(this).addClass("active"),t.preventDefault()})})}),function(e){"use strict";e.fn.boxRefresh=function(t){function n(e){e.append(o),s.onLoadStart.call(e)}function i(e){e.find(o).remove(),s.onLoadDone.call(e)}var s=e.extend({trigger:".refresh-btn",source:"",onLoadStart:function(e){return e},onLoadDone:function(e){return e}},t),o=e('<div class="overlay"><div class="fa fa-refresh fa-spin"></div></div>');return this.each(function(){if(""===s.source)return void(window.console&&window.console.log("Please specify a source first - boxRefresh()"));var t=e(this),o=t.find(s.trigger).first();o.on("click",function(e){
e.preventDefault(),n(t),t.find(".box-body").load(s.source,function(){i(t)})})})}}(jQuery),function(e){"use strict";e.fn.activateBox=function(){e.AdminLTE.boxWidget.activate(this)}}(jQuery),function(e){"use strict";e.fn.todolist=function(t){var n=e.extend({onCheck:function(e){return e},onUncheck:function(e){return e}},t);return this.each(function(){"undefined"!=typeof e.fn.iCheck?(e("input",this).on("ifChecked",function(){var t=e(this).parents("li").first();t.toggleClass("done"),n.onCheck.call(t)}),e("input",this).on("ifUnchecked",function(){var t=e(this).parents("li").first();t.toggleClass("done"),n.onUncheck.call(t)})):e("input",this).on("change",function(){var t=e(this).parents("li").first();t.toggleClass("done"),e("input",t).is(":checked")?n.onCheck.call(t):n.onUncheck.call(t)})})}}(jQuery),Object.defineProperty&&Object.getOwnPropertyDescriptor&&Object.getOwnPropertyDescriptor(Element.prototype,"textContent")&&!Object.getOwnPropertyDescriptor(Element.prototype,"textContent").get&&!function(){var e=Object.getOwnPropertyDescriptor(Element.prototype,"innerText");Object.defineProperty(Element.prototype,"textContent",{get:function(){return e.get.call(this)},set:function(t){return e.set.call(this,t)}})}(),Array.isArray||(Array.isArray=function(e){return"[object Array]"===Object.prototype.toString.call(e)});var wysihtml5={version:"0.4.15",commands:{},dom:{},quirks:{},toolbar:{},lang:{},selection:{},views:{},INVISIBLE_SPACE:"\ufeff",EMPTY_FUNCTION:function(){},ELEMENT_NODE:1,TEXT_NODE:3,BACKSPACE_KEY:8,ENTER_KEY:13,ESCAPE_KEY:27,SPACE_KEY:32,DELETE_KEY:46};!function(e,t){"function"==typeof define&&define.amd?define(e):t.rangy=e()}(function(){function e(e,t){var n=typeof e[t];return n==y||!(n!=v||!e[t])||"unknown"==n}function t(e,t){return!(typeof e[t]!=v||!e[t])}function n(e,t){return typeof e[t]!=b}function i(e){return function(t,n){for(var i=n.length;i--;)if(!e(t,n[i]))return!1;return!0}}function s(e){return e&&T(e,x)&&D(e,C)}function o(e){return t(e,"body")?e.body:e.getElementsByTagName("body")[0]}function r(n){t(window,"console")&&e(window.console,"log")&&window.console.log(n)}function a(e,t){t?window.alert(e):r(e)}function l(e){k.initialized=!0,k.supported=!1,a("Rangy is not supported on this page in your browser. Reason: "+e,k.config.alertOnFail)}function c(e){a("Rangy warning: "+e,k.config.alertOnWarn)}function h(e){return e.message||e.description||String(e)}function u(){if(!k.initialized){var t,n=!1,i=!1;e(document,"createRange")&&(t=document.createRange(),T(t,_)&&D(t,w)&&(n=!0));var a=o(document);if(!a||"body"!=a.nodeName.toLowerCase())return void l("No body element found");if(a&&e(a,"createTextRange")&&(t=a.createTextRange(),s(t)&&(i=!0)),!n&&!i)return void l("Neither Range nor TextRange are available");k.initialized=!0,k.features={implementsDomRange:n,implementsTextRange:i};var c,u;for(var d in E)(c=E[d])instanceof f&&c.init(c,k);for(var p=0,m=A.length;p<m;++p)try{A[p](k)}catch(g){u="Rangy init listener threw an exception. Continuing. Detail: "+h(g),r(u)}}}function d(e){e=e||window,u();for(var t=0,n=I.length;t<n;++t)I[t](e)}function f(e,t,n){this.name=e,this.dependencies=t,this.initialized=!1,this.supported=!1,this.initializer=n}function p(e,t,n,i){var s=new f(t,n,function(e){if(!e.initialized){e.initialized=!0;try{i(k,e),e.supported=!0}catch(n){var s="Module '"+t+"' failed to load: "+h(n);r(s)}}});E[t]=s}function m(){}function g(){}var v="object",y="function",b="undefined",w=["startContainer","startOffset","endContainer","endOffset","collapsed","commonAncestorContainer"],_=["setStart","setStartBefore","setStartAfter","setEnd","setEndBefore","setEndAfter","collapse","selectNode","selectNodeContents","compareBoundaryPoints","deleteContents","extractContents","cloneContents","insertNode","surroundContents","cloneRange","toString","detach"],C=["boundingHeight","boundingLeft","boundingTop","boundingWidth","htmlText","text"],x=["collapse","compareEndPoints","duplicate","moveToElementText","parentElement","select","setEndPoint","getBoundingClientRect"],T=i(e),S=i(t),D=i(n),E={},k={version:"1.3alpha.20140804",initialized:!1,supported:!0,util:{isHostMethod:e,isHostObject:t,isHostProperty:n,areHostMethods:T,areHostObjects:S,areHostProperties:D,isTextRange:s,getBody:o},features:{},modules:E,config:{alertOnFail:!0,alertOnWarn:!1,preferTextRange:!1,autoInitialize:typeof rangyAutoInitialize==b||rangyAutoInitialize}};k.fail=l,k.warn=c,{}.hasOwnProperty?k.util.extend=function(e,t,n){var i,s;for(var o in t)t.hasOwnProperty(o)&&(i=e[o],s=t[o],n&&null!==i&&"object"==typeof i&&null!==s&&"object"==typeof s&&k.util.extend(i,s,!0),e[o]=s);return t.hasOwnProperty("toString")&&(e.toString=t.toString),e}:l("hasOwnProperty not supported"),function(){var e=document.createElement("div");e.appendChild(document.createElement("span"));var t,n=[].slice;try{1==n.call(e.childNodes,0)[0].nodeType&&(t=function(e){return n.call(e,0)})}catch(i){}t||(t=function(e){for(var t=[],n=0,i=e.length;n<i;++n)t[n]=e[n];return t}),k.util.toArray=t}();var N;e(document,"addEventListener")?N=function(e,t,n){e.addEventListener(t,n,!1)}:e(document,"attachEvent")?N=function(e,t,n){e.attachEvent("on"+t,n)}:l("Document does not have required addEventListener or attachEvent method"),k.util.addListener=N;var A=[];k.init=u,k.addInitListener=function(e){k.initialized?e(k):A.push(e)};var I=[];k.addShimListener=function(e){I.push(e)},k.shim=k.createMissingNativeApi=d,f.prototype={init:function(){for(var e,t,n=this.dependencies||[],i=0,s=n.length;i<s;++i){if(t=n[i],e=E[t],!(e&&e instanceof f))throw new Error("required module '"+t+"' not found");if(e.init(),!e.supported)throw new Error("required module '"+t+"' not supported")}this.initializer(this)},fail:function(e){throw this.initialized=!0,this.supported=!1,new Error("Module '"+this.name+"' failed to load: "+e)},warn:function(e){k.warn("Module "+this.name+": "+e)},deprecationNotice:function(e,t){k.warn("DEPRECATED: "+e+" in module "+this.name+"is deprecated. Please use "+t+" instead")},createError:function(e){return new Error("Error in Rangy "+this.name+" module: "+e)}},k.createModule=function(e){var t,n;2==arguments.length?(t=arguments[1],n=[]):(t=arguments[2],n=arguments[1]);var i=p(!1,e,n,t);k.initialized&&i.init()},k.createCoreModule=function(e,t,n){p(!0,e,t,n)},k.RangePrototype=m,k.rangePrototype=new m,k.selectionPrototype=new g;var R=!1,P=function(e){R||(R=!0,!k.initialized&&k.config.autoInitialize&&u())};return typeof window==b?void l("No window found"):typeof document==b?void l("No document found"):(e(document,"addEventListener")&&document.addEventListener("DOMContentLoaded",P,!1),N(window,"load",P),k.createCoreModule("DomUtil",[],function(e,t){function n(e){var t;return typeof e.namespaceURI==N||null===(t=e.namespaceURI)||"http://www.w3.org/1999/xhtml"==t}function i(e){var t=e.parentNode;return 1==t.nodeType?t:null}function s(e){for(var t=0;e=e.previousSibling;)++t;return t}function o(e){switch(e.nodeType){case 7:case 10:return 0;case 3:case 8:return e.length;default:return e.childNodes.length}}function r(e,t){var n,i=[];for(n=e;n;n=n.parentNode)i.push(n);for(n=t;n;n=n.parentNode)if(P(i,n))return n;return null}function a(e,t,n){for(var i=n?t:t.parentNode;i;){if(i===e)return!0;i=i.parentNode}return!1}function l(e,t){return a(e,t,!0)}function c(e,t,n){for(var i,s=n?e:e.parentNode;s;){if(i=s.parentNode,i===t)return s;s=i}return null}function h(e){var t=e.nodeType;return 3==t||4==t||8==t}function u(e){if(!e)return!1;var t=e.nodeType;return 3==t||8==t}function d(e,t){var n=t.nextSibling,i=t.parentNode;return n?i.insertBefore(e,n):i.appendChild(e),e}function f(e,t,n){var i=e.cloneNode(!1);if(i.deleteData(0,t),e.deleteData(t,e.length-t),d(i,e),n)for(var o,r=0;o=n[r++];)o.node==e&&o.offset>t?(o.node=i,o.offset-=t):o.node==e.parentNode&&o.offset>s(e)&&++o.offset;return i}function p(e){if(9==e.nodeType)return e;if(typeof e.ownerDocument!=N)return e.ownerDocument;if(typeof e.document!=N)return e.document;if(e.parentNode)return p(e.parentNode);throw t.createError("getDocument: no document found for node")}function m(e){var n=p(e);if(typeof n.defaultView!=N)return n.defaultView;if(typeof n.parentWindow!=N)return n.parentWindow;throw t.createError("Cannot get a window object for node")}function g(e){if(typeof e.contentDocument!=N)return e.contentDocument;if(typeof e.contentWindow!=N)return e.contentWindow.document;throw t.createError("getIframeDocument: No Document object found for iframe element")}function v(e){if(typeof e.contentWindow!=N)return e.contentWindow;if(typeof e.contentDocument!=N)return e.contentDocument.defaultView;throw t.createError("getIframeWindow: No Window object found for iframe element")}function y(e){return e&&A.isHostMethod(e,"setTimeout")&&A.isHostObject(e,"document")}function b(e,t,n){var i;if(e?A.isHostProperty(e,"nodeType")?i=1==e.nodeType&&"iframe"==e.tagName.toLowerCase()?g(e):p(e):y(e)&&(i=e.document):i=document,!i)throw t.createError(n+"(): Parameter must be a Window object or DOM node");return i}function w(e){for(var t;t=e.parentNode;)e=t;return e}function _(e,n,i,o){var a,l,h,u,d;if(e==i)return n===o?0:n<o?-1:1;if(a=c(i,e,!0))return n<=s(a)?-1:1;if(a=c(e,i,!0))return s(a)<o?-1:1;if(l=r(e,i),!l)throw new Error("comparePoints error: nodes have no common ancestor");if(h=e===l?l:c(e,l,!0),u=i===l?l:c(i,l,!0),h===u)throw t.createError("comparePoints got to case 4 and childA and childB are the same!");for(d=l.firstChild;d;){if(d===h)return-1;if(d===u)return 1;d=d.nextSibling}}function C(e){var t;try{return t=e.parentNode,!1}catch(n){return!0}}function x(e){if(!e)return"[No node]";if(O&&C(e))return"[Broken node]";if(h(e))return'"'+e.data+'"';if(1==e.nodeType){var t=e.id?' id="'+e.id+'"':"";return"<"+e.nodeName+t+">[index:"+s(e)+",length:"+e.childNodes.length+"]["+(e.innerHTML||"[innerHTML not supported]").slice(0,25)+"]"}return e.nodeName}function T(e){for(var t,n=p(e).createDocumentFragment();t=e.firstChild;)n.appendChild(t);return n}function S(e){this.root=e,this._next=e}function D(e){return new S(e)}function E(e,t){this.node=e,this.offset=t}function k(e){this.code=this[e],this.codeName=e,this.message="DOMException: "+this.codeName}var N="undefined",A=e.util;A.areHostMethods(document,["createDocumentFragment","createElement","createTextNode"])||t.fail("document missing a Node creation method"),A.isHostMethod(document,"getElementsByTagName")||t.fail("document missing getElementsByTagName method");var I=document.createElement("div");A.areHostMethods(I,["insertBefore","appendChild","cloneNode"]||!A.areHostObjects(I,["previousSibling","nextSibling","childNodes","parentNode"]))||t.fail("Incomplete Element implementation"),A.isHostProperty(I,"innerHTML")||t.fail("Element is missing innerHTML property");var R=document.createTextNode("test");A.areHostMethods(R,["splitText","deleteData","insertData","appendData","cloneNode"]||!A.areHostObjects(I,["previousSibling","nextSibling","childNodes","parentNode"])||!A.areHostProperties(R,["data"]))||t.fail("Incomplete Text Node implementation");var P=function(e,t){for(var n=e.length;n--;)if(e[n]===t)return!0;return!1},O=!1;!function(){var t=document.createElement("b");t.innerHTML="1";var n=t.firstChild;t.innerHTML="<br>",O=C(n),e.features.crashyTextNodes=O}();var M;typeof window.getComputedStyle!=N?M=function(e,t){return m(e).getComputedStyle(e,null)[t]}:typeof document.documentElement.currentStyle!=N?M=function(e,t){return e.currentStyle[t]}:t.fail("No means of obtaining computed style properties found"),S.prototype={_current:null,hasNext:function(){return!!this._next},next:function(){var e,t,n=this._current=this._next;if(this._current)if(e=n.firstChild)this._next=e;else{for(t=null;n!==this.root&&!(t=n.nextSibling);)n=n.parentNode;this._next=t}return this._current},detach:function(){this._current=this._next=this.root=null}},E.prototype={equals:function(e){return!!e&&this.node===e.node&&this.offset==e.offset},inspect:function(){return"[DomPosition("+x(this.node)+":"+this.offset+")]"},toString:function(){return this.inspect()}},k.prototype={INDEX_SIZE_ERR:1,HIERARCHY_REQUEST_ERR:3,WRONG_DOCUMENT_ERR:4,NO_MODIFICATION_ALLOWED_ERR:7,NOT_FOUND_ERR:8,NOT_SUPPORTED_ERR:9,INVALID_STATE_ERR:11,INVALID_NODE_TYPE_ERR:24},k.prototype.toString=function(){return this.message},e.dom={arrayContains:P,isHtmlNamespace:n,parentElement:i,getNodeIndex:s,getNodeLength:o,getCommonAncestor:r,isAncestorOf:a,isOrIsAncestorOf:l,getClosestAncestorIn:c,isCharacterDataNode:h,isTextOrCommentNode:u,insertAfter:d,splitDataNode:f,getDocument:p,getWindow:m,getIframeWindow:v,getIframeDocument:g,getBody:A.getBody,isWindow:y,getContentDocument:b,getRootContainer:w,comparePoints:_,isBrokenNode:C,inspectNode:x,getComputedStyleProperty:M,fragmentFromNodeChildren:T,createIterator:D,DomPosition:E},e.DOMException=k}),k.createCoreModule("DomRange",["DomUtil"],function(e,t){function n(e,t){return 3!=e.nodeType&&(B(e,t.startContainer)||B(e,t.endContainer))}function i(e){return e.document||j(e.startContainer)}function s(e){return new H(e.parentNode,W(e))}function o(e){return new H(e.parentNode,W(e)+1)}function r(e,t,n){var i=11==e.nodeType?e.firstChild:e;return z(t)?n==t.length?M.insertAfter(e,t):t.parentNode.insertBefore(e,0==n?t:q(t,n)):n>=t.childNodes.length?t.appendChild(e):t.insertBefore(e,t.childNodes[n]),i}function a(e,t,n){if(S(e),S(t),i(t)!=i(e))throw new F("WRONG_DOCUMENT_ERR");var s=$(e.startContainer,e.startOffset,t.endContainer,t.endOffset),o=$(e.endContainer,e.endOffset,t.startContainer,t.startOffset);return n?s<=0&&o>=0:s<0&&o>0}function l(e){for(var t,n,s,o=i(e.range).createDocumentFragment();n=e.next();){if(t=e.isPartiallySelectedSubtree(),n=n.cloneNode(!t),t&&(s=e.getSubtreeIterator(),n.appendChild(l(s)),s.detach()),10==n.nodeType)throw new F("HIERARCHY_REQUEST_ERR");o.appendChild(n)}return o}function c(e,t,n){var i,s;n=n||{stop:!1};for(var o,r;o=e.next();)if(e.isPartiallySelectedSubtree()){if(t(o)===!1)return void(n.stop=!0);if(r=e.getSubtreeIterator(),c(r,t,n),r.detach(),n.stop)return}else for(i=M.createIterator(o);s=i.next();)if(t(s)===!1)return void(n.stop=!0)}function h(e){for(var t;e.next();)e.isPartiallySelectedSubtree()?(t=e.getSubtreeIterator(),h(t),t.detach()):e.remove()}function u(e){for(var t,n,s=i(e.range).createDocumentFragment();t=e.next();){if(e.isPartiallySelectedSubtree()?(t=t.cloneNode(!1),n=e.getSubtreeIterator(),t.appendChild(u(n)),n.detach()):e.remove(),10==t.nodeType)throw new F("HIERARCHY_REQUEST_ERR");s.appendChild(t)}return s}function d(e,t,n){var i,s=!(!t||!t.length),o=!!n;s&&(i=new RegExp("^("+t.join("|")+")$"));var r=[];return c(new p(e,(!1)),function(t){if((!s||i.test(t.nodeType))&&(!o||n(t))){var a=e.startContainer;if(t!=a||!z(a)||e.startOffset!=a.length){var l=e.endContainer;t==l&&z(l)&&0==e.endOffset||r.push(t)}}}),r}function f(e){var t="undefined"==typeof e.getName?"Range":e.getName();return"["+t+"("+M.inspectNode(e.startContainer)+":"+e.startOffset+", "+M.inspectNode(e.endContainer)+":"+e.endOffset+")]"}function p(e,t){if(this.range=e,this.clonePartiallySelectedTextNodes=t,!e.collapsed){this.sc=e.startContainer,this.so=e.startOffset,this.ec=e.endContainer,this.eo=e.endOffset;var n=e.commonAncestorContainer;this.sc===this.ec&&z(this.sc)?(this.isSingleCharacterDataNode=!0,this._first=this._last=this._next=this.sc):(this._first=this._next=this.sc!==n||z(this.sc)?U(this.sc,n,!0):this.sc.childNodes[this.so],this._last=this.ec!==n||z(this.ec)?U(this.ec,n,!0):this.ec.childNodes[this.eo-1])}}function m(e){return function(t,n){for(var i,s=n?t:t.parentNode;s;){if(i=s.nodeType,Y(e,i))return s;s=s.parentNode}return null}}function g(e,t){if(ie(e,t))throw new F("INVALID_NODE_TYPE_ERR")}function v(e,t){if(!Y(t,e.nodeType))throw new F("INVALID_NODE_TYPE_ERR")}function y(e,t){if(t<0||t>(z(e)?e.length:e.childNodes.length))throw new F("INDEX_SIZE_ERR")}function b(e,t){if(te(e,!0)!==te(t,!0))throw new F("WRONG_DOCUMENT_ERR")}function w(e){if(ne(e,!0))throw new F("NO_MODIFICATION_ALLOWED_ERR")}function _(e,t){if(!e)throw new F(t)}function C(e){return K&&M.isBrokenNode(e)||!Y(Q,e.nodeType)&&!te(e,!0)}function x(e,t){return t<=(z(e)?e.length:e.childNodes.length)}function T(e){return!!e.startContainer&&!!e.endContainer&&!C(e.startContainer)&&!C(e.endContainer)&&x(e.startContainer,e.startOffset)&&x(e.endContainer,e.endOffset)}function S(e){if(!T(e))throw new Error("Range error: Range is no longer valid after DOM mutation ("+e.inspect()+")")}function D(e,t){S(e);var n=e.startContainer,i=e.startOffset,s=e.endContainer,o=e.endOffset,r=n===s;z(s)&&o>0&&o<s.length&&q(s,o,t),z(n)&&i>0&&i<n.length&&(n=q(n,i,t),r?(o-=i,s=n):s==n.parentNode&&o>=W(n)&&o++,i=0),e.setStartAndEnd(n,i,s,o)}function E(e){S(e);var t=e.commonAncestorContainer.parentNode.cloneNode(!1);return t.appendChild(e.cloneContents()),t.innerHTML}function k(e){e.START_TO_START=ce,e.START_TO_END=he,e.END_TO_END=ue,e.END_TO_START=de,e.NODE_BEFORE=fe,e.NODE_AFTER=pe,e.NODE_BEFORE_AND_AFTER=me,e.NODE_INSIDE=ge}function N(e){k(e),k(e.prototype)}function A(e,t){return function(){S(this);var n,i,s=this.startContainer,r=this.startOffset,a=this.commonAncestorContainer,l=new p(this,(!0));s!==a&&(n=U(s,a,!0),i=o(n),s=i.node,r=i.offset),c(l,w),l.reset();var h=e(l);return l.detach(),t(this,s,r,s,r),h}}function I(t,i){function r(e,t){return function(n){v(n,G),v(X(n),Q);var i=(e?s:o)(n);(t?a:l)(this,i.node,i.offset)}}function a(e,t,n){var s=e.endContainer,o=e.endOffset;t===e.startContainer&&n===e.startOffset||(X(t)==X(s)&&1!=$(t,n,s,o)||(s=t,o=n),i(e,t,n,s,o))}function l(e,t,n){var s=e.startContainer,o=e.startOffset;t===e.endContainer&&n===e.endOffset||(X(t)==X(s)&&$(t,n,s,o)!=-1||(s=t,o=n),i(e,s,o,t,n))}var c=function(){};c.prototype=e.rangePrototype,t.prototype=new c,L.extend(t.prototype,{setStart:function(e,t){g(e,!0),y(e,t),a(this,e,t)},setEnd:function(e,t){g(e,!0),y(e,t),l(this,e,t)},setStartAndEnd:function(){var e=arguments,t=e[0],n=e[1],s=t,o=n;switch(e.length){case 3:o=e[2];break;case 4:s=e[2],o=e[3]}i(this,t,n,s,o)},setBoundary:function(e,t,n){this["set"+(n?"Start":"End")](e,t)},setStartBefore:r(!0,!0),setStartAfter:r(!1,!0),setEndBefore:r(!0,!1),setEndAfter:r(!1,!1),collapse:function(e){S(this),e?i(this,this.startContainer,this.startOffset,this.startContainer,this.startOffset):i(this,this.endContainer,this.endOffset,this.endContainer,this.endOffset)},selectNodeContents:function(e){g(e,!0),i(this,e,0,e,V(e))},selectNode:function(e){g(e,!1),v(e,G);var t=s(e),n=o(e);i(this,t.node,t.offset,n.node,n.offset)},extractContents:A(u,i),deleteContents:A(h,i),canSurroundContents:function(){S(this),w(this.startContainer),w(this.endContainer);var e=new p(this,(!0)),t=e._first&&n(e._first,this)||e._last&&n(e._last,this);return e.detach(),!t},splitBoundaries:function(){D(this)},splitBoundariesPreservingPositions:function(e){D(this,e)},normalizeBoundaries:function(){S(this);var e=this.startContainer,t=this.startOffset,n=this.endContainer,s=this.endOffset,o=function(e){var t=e.nextSibling;t&&t.nodeType==e.nodeType&&(n=e,s=e.length,e.appendData(t.data),t.parentNode.removeChild(t))},r=function(i){var o=i.previousSibling;if(o&&o.nodeType==i.nodeType){e=i;var r=i.length;if(t=o.length,i.insertData(0,o.data),o.parentNode.removeChild(o),e==n)s+=t,n=e;else if(n==i.parentNode){var a=W(i);s==a?(n=i,s=r):s>a&&s--}}},a=!0;if(z(n))n.length==s&&o(n);else{if(s>0){var l=n.childNodes[s-1];l&&z(l)&&o(l)}a=!this.collapsed}if(a){if(z(e))0==t&&r(e);else if(t<e.childNodes.length){var c=e.childNodes[t];c&&z(c)&&r(c)}}else e=n,t=s;i(this,e,t,n,s)},collapseToPoint:function(e,t){g(e,!0),y(e,t),this.setStartAndEnd(e,t)}}),N(t)}function R(e){e.collapsed=e.startContainer===e.endContainer&&e.startOffset===e.endOffset,e.commonAncestorContainer=e.collapsed?e.startContainer:M.getCommonAncestor(e.startContainer,e.endContainer)}function P(e,t,n,i,s){e.startContainer=t,e.startOffset=n,e.endContainer=i,e.endOffset=s,e.document=M.getDocument(t),R(e)}function O(e){this.startContainer=e,this.startOffset=0,this.endContainer=e,this.endOffset=0,this.document=e,R(this)}var M=e.dom,L=e.util,H=M.DomPosition,F=e.DOMException,z=M.isCharacterDataNode,W=M.getNodeIndex,B=M.isOrIsAncestorOf,j=M.getDocument,$=M.comparePoints,q=M.splitDataNode,U=M.getClosestAncestorIn,V=M.getNodeLength,Y=M.arrayContains,X=M.getRootContainer,K=e.features.crashyTextNodes;p.prototype={_current:null,_next:null,_first:null,_last:null,isSingleCharacterDataNode:!1,reset:function(){this._current=null,this._next=this._first},hasNext:function(){return!!this._next},next:function(){var e=this._current=this._next;return e&&(this._next=e!==this._last?e.nextSibling:null,z(e)&&this.clonePartiallySelectedTextNodes&&(e===this.ec&&(e=e.cloneNode(!0)).deleteData(this.eo,e.length-this.eo),this._current===this.sc&&(e=e.cloneNode(!0)).deleteData(0,this.so))),e},remove:function(){var e,t,n=this._current;!z(n)||n!==this.sc&&n!==this.ec?n.parentNode&&n.parentNode.removeChild(n):(e=n===this.sc?this.so:0,t=n===this.ec?this.eo:n.length,e!=t&&n.deleteData(e,t-e))},isPartiallySelectedSubtree:function(){var e=this._current;return n(e,this.range)},getSubtreeIterator:function(){var e;if(this.isSingleCharacterDataNode)e=this.range.cloneRange(),e.collapse(!1);else{e=new O(i(this.range));var t=this._current,n=t,s=0,o=t,r=V(t);B(t,this.sc)&&(n=this.sc,s=this.so),B(t,this.ec)&&(o=this.ec,r=this.eo),P(e,n,s,o,r)}return new p(e,this.clonePartiallySelectedTextNodes)},detach:function(){this.range=this._current=this._next=this._first=this._last=this.sc=this.so=this.ec=this.eo=null}};var G=[1,3,4,5,7,8,10],Q=[2,9,11],J=[5,6,10,12],Z=[1,3,4,5,7,8,10,11],ee=[1,3,4,5,7,8],te=m([9,11]),ne=m(J),ie=m([6,10,12]),se=document.createElement("style"),oe=!1;try{se.innerHTML="<b>x</b>",oe=3==se.firstChild.nodeType}catch(re){}e.features.htmlParsingConforms=oe;var ae=oe?function(e){var t=this.startContainer,n=j(t);if(!t)throw new F("INVALID_STATE_ERR");var i=null;return 1==t.nodeType?i=t:z(t)&&(i=M.parentElement(t)),i=null===i||"HTML"==i.nodeName&&M.isHtmlNamespace(j(i).documentElement)&&M.isHtmlNamespace(i)?n.createElement("body"):i.cloneNode(!1),i.innerHTML=e,M.fragmentFromNodeChildren(i)}:function(e){var t=i(this),n=t.createElement("body");return n.innerHTML=e,M.fragmentFromNodeChildren(n)},le=["startContainer","startOffset","endContainer","endOffset","collapsed","commonAncestorContainer"],ce=0,he=1,ue=2,de=3,fe=0,pe=1,me=2,ge=3;L.extend(e.rangePrototype,{compareBoundaryPoints:function(e,t){S(this),b(this.startContainer,t.startContainer);var n,i,s,o,r=e==de||e==ce?"start":"end",a=e==he||e==ce?"start":"end";return n=this[r+"Container"],i=this[r+"Offset"],s=t[a+"Container"],o=t[a+"Offset"],$(n,i,s,o)},insertNode:function(e){if(S(this),v(e,Z),w(this.startContainer),B(e,this.startContainer))throw new F("HIERARCHY_REQUEST_ERR");var t=r(e,this.startContainer,this.startOffset);this.setStartBefore(t)},cloneContents:function(){S(this);var e,t;if(this.collapsed)return i(this).createDocumentFragment();if(this.startContainer===this.endContainer&&z(this.startContainer))return e=this.startContainer.cloneNode(!0),e.data=e.data.slice(this.startOffset,this.endOffset),t=i(this).createDocumentFragment(),t.appendChild(e),t;var n=new p(this,(!0));return e=l(n),n.detach(),e},canSurroundContents:function(){S(this),w(this.startContainer),w(this.endContainer);var e=new p(this,(!0)),t=e._first&&n(e._first,this)||e._last&&n(e._last,this);return e.detach(),!t},surroundContents:function(e){if(v(e,ee),!this.canSurroundContents())throw new F("INVALID_STATE_ERR");var t=this.extractContents();if(e.hasChildNodes())for(;e.lastChild;)e.removeChild(e.lastChild);r(e,this.startContainer,this.startOffset),e.appendChild(t),this.selectNode(e)},cloneRange:function(){S(this);for(var e,t=new O(i(this)),n=le.length;n--;)e=le[n],t[e]=this[e];return t},toString:function(){S(this);var e=this.startContainer;if(e===this.endContainer&&z(e))return 3==e.nodeType||4==e.nodeType?e.data.slice(this.startOffset,this.endOffset):"";var t=[],n=new p(this,(!0));return c(n,function(e){3!=e.nodeType&&4!=e.nodeType||t.push(e.data)}),n.detach(),t.join("")},compareNode:function(e){S(this);var t=e.parentNode,n=W(e);if(!t)throw new F("NOT_FOUND_ERR");var i=this.comparePoint(t,n),s=this.comparePoint(t,n+1);return i<0?s>0?me:fe:s>0?pe:ge},comparePoint:function(e,t){return S(this),_(e,"HIERARCHY_REQUEST_ERR"),b(e,this.startContainer),$(e,t,this.startContainer,this.startOffset)<0?-1:$(e,t,this.endContainer,this.endOffset)>0?1:0},createContextualFragment:ae,toHtml:function(){return E(this)},intersectsNode:function(e,t){if(S(this),_(e,"NOT_FOUND_ERR"),j(e)!==i(this))return!1;var n=e.parentNode,s=W(e);_(n,"NOT_FOUND_ERR");var o=$(n,s,this.endContainer,this.endOffset),r=$(n,s+1,this.startContainer,this.startOffset);return t?o<=0&&r>=0:o<0&&r>0},isPointInRange:function(e,t){return S(this),_(e,"HIERARCHY_REQUEST_ERR"),b(e,this.startContainer),$(e,t,this.startContainer,this.startOffset)>=0&&$(e,t,this.endContainer,this.endOffset)<=0},intersectsRange:function(e){return a(this,e,!1)},intersectsOrTouchesRange:function(e){return a(this,e,!0)},intersection:function(e){if(this.intersectsRange(e)){var t=$(this.startContainer,this.startOffset,e.startContainer,e.startOffset),n=$(this.endContainer,this.endOffset,e.endContainer,e.endOffset),i=this.cloneRange();return t==-1&&i.setStart(e.startContainer,e.startOffset),1==n&&i.setEnd(e.endContainer,e.endOffset),i}return null},union:function(e){if(this.intersectsOrTouchesRange(e)){var t=this.cloneRange();return $(e.startContainer,e.startOffset,this.startContainer,this.startOffset)==-1&&t.setStart(e.startContainer,e.startOffset),1==$(e.endContainer,e.endOffset,this.endContainer,this.endOffset)&&t.setEnd(e.endContainer,e.endOffset),t}throw new F("Ranges do not intersect")},containsNode:function(e,t){return t?this.intersectsNode(e,!1):this.compareNode(e)==ge},containsNodeContents:function(e){return this.comparePoint(e,0)>=0&&this.comparePoint(e,V(e))<=0},containsRange:function(e){var t=this.intersection(e);return null!==t&&e.equals(t)},containsNodeText:function(e){var t=this.cloneRange();t.selectNode(e);var n=t.getNodes([3]);if(n.length>0){t.setStart(n[0],0);var i=n.pop();return t.setEnd(i,i.length),this.containsRange(t)}return this.containsNodeContents(e)},getNodes:function(e,t){return S(this),d(this,e,t)},getDocument:function(){return i(this)},collapseBefore:function(e){this.setEndBefore(e),this.collapse(!1)},collapseAfter:function(e){this.setStartAfter(e),this.collapse(!0)},getBookmark:function(t){var n=i(this),s=e.createRange(n);t=t||M.getBody(n),s.selectNodeContents(t);var o=this.intersection(s),r=0,a=0;return o&&(s.setEnd(o.startContainer,o.startOffset),r=s.toString().length,a=r+o.toString().length),{start:r,end:a,containerNode:t}},moveToBookmark:function(e){var t=e.containerNode,n=0;this.setStart(t,0),this.collapse(!0);for(var i,s,o,r,a=[t],l=!1,c=!1;!c&&(i=a.pop());)if(3==i.nodeType)s=n+i.length,!l&&e.start>=n&&e.start<=s&&(this.setStart(i,e.start-n),l=!0),l&&e.end>=n&&e.end<=s&&(this.setEnd(i,e.end-n),c=!0),n=s;else for(r=i.childNodes,o=r.length;o--;)a.push(r[o])},getName:function(){return"DomRange"},equals:function(e){return O.rangesEqual(this,e)},isValid:function(){return T(this)},inspect:function(){return f(this)},detach:function(){}}),I(O,P),L.extend(O,{rangeProperties:le,RangeIterator:p,copyComparisonConstants:N,createPrototypeRange:I,inspect:f,toHtml:E,getRangeDocument:i,rangesEqual:function(e,t){return e.startContainer===t.startContainer&&e.startOffset===t.startOffset&&e.endContainer===t.endContainer&&e.endOffset===t.endOffset}}),e.DomRange=O}),k.createCoreModule("WrappedRange",["DomRange"],function(e,t){var n,i,s=e.dom,o=e.util,r=s.DomPosition,a=e.DomRange,l=s.getBody,c=s.getContentDocument,h=s.isCharacterDataNode;if(e.features.implementsDomRange&&!function(){function i(e){for(var t,n=d.length;n--;)t=d[n],e[t]=e.nativeRange[t];e.collapsed=e.startContainer===e.endContainer&&e.startOffset===e.endOffset}function r(e,t,n,i,s){var o=e.startContainer!==t||e.startOffset!=n,r=e.endContainer!==i||e.endOffset!=s,a=!e.equals(e.nativeRange);(o||r||a)&&(e.setEnd(i,s),e.setStart(t,n))}var h,u,d=a.rangeProperties;n=function(e){if(!e)throw t.createError("WrappedRange: Range must be specified");this.nativeRange=e,i(this)},a.createPrototypeRange(n,r),h=n.prototype,h.selectNode=function(e){this.nativeRange.selectNode(e),i(this)},h.cloneContents=function(){return this.nativeRange.cloneContents()},h.surroundContents=function(e){this.nativeRange.surroundContents(e),i(this)},h.collapse=function(e){this.nativeRange.collapse(e),i(this)},h.cloneRange=function(){return new n(this.nativeRange.cloneRange())},h.refresh=function(){i(this)},h.toString=function(){return this.nativeRange.toString()};var f=document.createTextNode("test");l(document).appendChild(f);var p=document.createRange();p.setStart(f,0),p.setEnd(f,0);try{p.setStart(f,1),h.setStart=function(e,t){this.nativeRange.setStart(e,t),i(this)},h.setEnd=function(e,t){this.nativeRange.setEnd(e,t),i(this)},u=function(e){return function(t){this.nativeRange[e](t),i(this)}}}catch(m){h.setStart=function(e,t){try{this.nativeRange.setStart(e,t)}catch(n){this.nativeRange.setEnd(e,t),this.nativeRange.setStart(e,t)}i(this)},h.setEnd=function(e,t){try{this.nativeRange.setEnd(e,t)}catch(n){this.nativeRange.setStart(e,t),this.nativeRange.setEnd(e,t)}i(this)},u=function(e,t){return function(n){try{this.nativeRange[e](n)}catch(s){this.nativeRange[t](n),this.nativeRange[e](n)}i(this)}}}h.setStartBefore=u("setStartBefore","setEndBefore"),h.setStartAfter=u("setStartAfter","setEndAfter"),h.setEndBefore=u("setEndBefore","setStartBefore"),h.setEndAfter=u("setEndAfter","setStartAfter"),h.selectNodeContents=function(e){this.setStartAndEnd(e,0,s.getNodeLength(e))},p.selectNodeContents(f),p.setEnd(f,3);var g=document.createRange();g.selectNodeContents(f),g.setEnd(f,4),g.setStart(f,2),p.compareBoundaryPoints(p.START_TO_END,g)==-1&&1==p.compareBoundaryPoints(p.END_TO_START,g)?h.compareBoundaryPoints=function(e,t){return t=t.nativeRange||t,e==t.START_TO_END?e=t.END_TO_START:e==t.END_TO_START&&(e=t.START_TO_END),this.nativeRange.compareBoundaryPoints(e,t)}:h.compareBoundaryPoints=function(e,t){return this.nativeRange.compareBoundaryPoints(e,t.nativeRange||t)};var v=document.createElement("div");v.innerHTML="123";var y=v.firstChild,b=l(document);b.appendChild(v),p.setStart(y,1),p.setEnd(y,2),p.deleteContents(),"13"==y.data&&(h.deleteContents=function(){this.nativeRange.deleteContents(),i(this)},h.extractContents=function(){var e=this.nativeRange.extractContents();return i(this),e}),b.removeChild(v),b=null,o.isHostMethod(p,"createContextualFragment")&&(h.createContextualFragment=function(e){return this.nativeRange.createContextualFragment(e)}),l(document).removeChild(f),h.getName=function(){return"WrappedRange"},e.WrappedRange=n,e.createNativeRange=function(e){return e=c(e,t,"createNativeRange"),e.createRange()}}(),e.features.implementsTextRange){var u=function(e){var t=e.parentElement(),n=e.duplicate();n.collapse(!0);var i=n.parentElement();n=e.duplicate(),n.collapse(!1);var o=n.parentElement(),r=i==o?i:s.getCommonAncestor(i,o);return r==t?r:s.getCommonAncestor(t,r)},d=function(e){return 0==e.compareEndPoints("StartToEnd",e)},f=function(e,t,n,i,o){var a=e.duplicate();a.collapse(n);var l=a.parentElement();if(s.isOrIsAncestorOf(t,l)||(l=t),!l.canHaveHTML){var c=new r(l.parentNode,s.getNodeIndex(l));return{boundaryPosition:c,nodeInfo:{nodeIndex:c.offset,containerElement:c.node}}}var u=s.getDocument(l).createElement("span");u.parentNode&&u.parentNode.removeChild(u);for(var d,f,p,m,g,v=n?"StartToStart":"StartToEnd",y=o&&o.containerElement==l?o.nodeIndex:0,b=l.childNodes.length,w=b,_=w;;){if(_==b?l.appendChild(u):l.insertBefore(u,l.childNodes[_]),a.moveToElementText(u),d=a.compareEndPoints(v,e),0==d||y==w)break;if(d==-1){if(w==y+1)break;y=_}else w=w==y+1?y:_;_=Math.floor((y+w)/2),l.removeChild(u)}if(g=u.nextSibling,d==-1&&g&&h(g)){a.setEndPoint(n?"EndToStart":"EndToEnd",e);var C;if(/[\r\n]/.test(g.data)){var x=a.duplicate(),T=x.text.replace(/\r\n/g,"\r").length;for(C=x.moveStart("character",T);(d=x.compareEndPoints("StartToEnd",x))==-1;)C++,
x.moveStart("character",1)}else C=a.text.length;m=new r(g,C)}else f=(i||!n)&&u.previousSibling,p=(i||n)&&u.nextSibling,m=p&&h(p)?new r(p,0):f&&h(f)?new r(f,f.data.length):new r(l,s.getNodeIndex(u));return u.parentNode.removeChild(u),{boundaryPosition:m,nodeInfo:{nodeIndex:_,containerElement:l}}},p=function(e,t){var n,i,o,r,a=e.offset,c=s.getDocument(e.node),u=l(c).createTextRange(),d=h(e.node);return d?(n=e.node,i=n.parentNode):(r=e.node.childNodes,n=a<r.length?r[a]:null,i=e.node),o=c.createElement("span"),o.innerHTML="&#feff;",n?i.insertBefore(o,n):i.appendChild(o),u.moveToElementText(o),u.collapse(!t),i.removeChild(o),d&&u[t?"moveStart":"moveEnd"]("character",a),u};i=function(e){this.textRange=e,this.refresh()},i.prototype=new a(document),i.prototype.refresh=function(){var e,t,n,i=u(this.textRange);d(this.textRange)?t=e=f(this.textRange,i,!0,!0).boundaryPosition:(n=f(this.textRange,i,!0,!1),e=n.boundaryPosition,t=f(this.textRange,i,!1,!1,n.nodeInfo).boundaryPosition),this.setStart(e.node,e.offset),this.setEnd(t.node,t.offset)},i.prototype.getName=function(){return"WrappedTextRange"},a.copyComparisonConstants(i);var m=function(e){if(e.collapsed)return p(new r(e.startContainer,e.startOffset),!0);var t=p(new r(e.startContainer,e.startOffset),!0),n=p(new r(e.endContainer,e.endOffset),!1),i=l(a.getRangeDocument(e)).createTextRange();return i.setEndPoint("StartToStart",t),i.setEndPoint("EndToEnd",n),i};if(i.rangeToTextRange=m,i.prototype.toTextRange=function(){return m(this)},e.WrappedTextRange=i,!e.features.implementsDomRange||e.config.preferTextRange){var g=function(){return this}();"undefined"==typeof g.Range&&(g.Range=i),e.createNativeRange=function(e){return e=c(e,t,"createNativeRange"),l(e).createTextRange()},e.WrappedRange=i}}e.createRange=function(n){return n=c(n,t,"createRange"),new e.WrappedRange(e.createNativeRange(n))},e.createRangyRange=function(e){return e=c(e,t,"createRangyRange"),new a(e)},e.createIframeRange=function(n){return t.deprecationNotice("createIframeRange()","createRange(iframeEl)"),e.createRange(n)},e.createIframeRangyRange=function(n){return t.deprecationNotice("createIframeRangyRange()","createRangyRange(iframeEl)"),e.createRangyRange(n)},e.addShimListener(function(t){var n=t.document;"undefined"==typeof n.createRange&&(n.createRange=function(){return e.createRange(n)}),n=t=null})}),k.createCoreModule("WrappedSelection",["DomRange","WrappedRange"],function(e,t){function n(e){return"string"==typeof e?/^backward(s)?$/i.test(e):!!e}function i(e,n){if(e){if(k.isWindow(e))return e;if(e instanceof v)return e.win;var i=k.getContentDocument(e,t,n);return k.getWindow(i)}return window}function s(e){return i(e,"getWinSelection").getSelection()}function o(e){return i(e,"getDocSelection").document.selection}function r(e){var t=!1;return e.anchorNode&&(t=1==k.comparePoints(e.anchorNode,e.anchorOffset,e.focusNode,e.focusOffset)),t}function a(e,t,n){var i=n?"end":"start",s=n?"start":"end";e.anchorNode=t[i+"Container"],e.anchorOffset=t[i+"Offset"],e.focusNode=t[s+"Container"],e.focusOffset=t[s+"Offset"]}function l(e){var t=e.nativeSelection;e.anchorNode=t.anchorNode,e.anchorOffset=t.anchorOffset,e.focusNode=t.focusNode,e.focusOffset=t.focusOffset}function c(e){e.anchorNode=e.focusNode=null,e.anchorOffset=e.focusOffset=0,e.rangeCount=0,e.isCollapsed=!0,e._ranges.length=0}function h(t){var n;return t instanceof I?(n=e.createNativeRange(t.getDocument()),n.setEnd(t.endContainer,t.endOffset),n.setStart(t.startContainer,t.startOffset)):t instanceof R?n=t.nativeRange:M.implementsDomRange&&t instanceof k.getWindow(t.startContainer).Range&&(n=t),n}function u(e){if(!e.length||1!=e[0].nodeType)return!1;for(var t=1,n=e.length;t<n;++t)if(!k.isAncestorOf(e[0],e[t]))return!1;return!0}function d(e){var n=e.getNodes();if(!u(n))throw t.createError("getSingleElementFromRange: range "+e.inspect()+" did not consist of a single element");return n[0]}function f(e){return!!e&&"undefined"!=typeof e.text}function p(e,t){var n=new R(t);e._ranges=[n],a(e,n,!1),e.rangeCount=1,e.isCollapsed=n.collapsed}function m(t){if(t._ranges.length=0,"None"==t.docSelection.type)c(t);else{var n=t.docSelection.createRange();if(f(n))p(t,n);else{t.rangeCount=n.length;for(var i,s=H(n.item(0)),o=0;o<t.rangeCount;++o)i=e.createRange(s),i.selectNode(n.item(o)),t._ranges.push(i);t.isCollapsed=1==t.rangeCount&&t._ranges[0].collapsed,a(t,t._ranges[t.rangeCount-1],!1)}}}function g(e,n){for(var i=e.docSelection.createRange(),s=d(n),o=H(i.item(0)),r=F(o).createControlRange(),a=0,l=i.length;a<l;++a)r.add(i.item(a));try{r.add(s)}catch(c){throw t.createError("addRange(): Element within the specified Range could not be added to control selection (does it have layout?)")}r.select(),m(e)}function v(e,t,n){this.nativeSelection=e,this.docSelection=t,this._ranges=[],this.win=n,this.refresh()}function y(e){e.win=e.anchorNode=e.focusNode=e._ranges=null,e.rangeCount=e.anchorOffset=e.focusOffset=0,e.detached=!0}function b(e,t){for(var n,i,s=te.length;s--;)if(n=te[s],i=n.selection,"deleteAll"==t)y(i);else if(n.win==e)return"delete"==t?(te.splice(s,1),!0):i;return"deleteAll"==t&&(te.length=0),null}function w(e,n){for(var i,s=H(n[0].startContainer),o=F(s).createControlRange(),r=0,a=n.length;r<a;++r){i=d(n[r]);try{o.add(i)}catch(l){throw t.createError("setRanges(): Element within one of the specified Ranges could not be added to control selection (does it have layout?)")}}o.select(),m(e)}function _(e,t){if(e.win.document!=H(t))throw new P("WRONG_DOCUMENT_ERR")}function C(t){return function(n,i){var s;this.rangeCount?(s=this.getRangeAt(0),s["set"+(t?"Start":"End")](n,i)):(s=e.createRange(this.win.document),s.setStartAndEnd(n,i)),this.setSingleRange(s,this.isBackward())}}function x(e){var t=[],n=new O(e.anchorNode,e.anchorOffset),i=new O(e.focusNode,e.focusOffset),s="function"==typeof e.getName?e.getName():"Selection";if("undefined"!=typeof e.rangeCount)for(var o=0,r=e.rangeCount;o<r;++o)t[o]=I.inspect(e.getRangeAt(o));return"["+s+"(Ranges: "+t.join(", ")+")(anchor: "+n.inspect()+", focus: "+i.inspect()+"]"}e.config.checkSelectionRanges=!0;var T,S,D="boolean",E="number",k=e.dom,N=e.util,A=N.isHostMethod,I=e.DomRange,R=e.WrappedRange,P=e.DOMException,O=k.DomPosition,M=e.features,L="Control",H=k.getDocument,F=k.getBody,z=I.rangesEqual,W=A(window,"getSelection"),B=N.isHostObject(document,"selection");M.implementsWinGetSelection=W,M.implementsDocSelection=B;var j=B&&(!W||e.config.preferTextRange);j?(T=o,e.isSelectionValid=function(e){var t=i(e,"isSelectionValid").document,n=t.selection;return"None"!=n.type||H(n.createRange().parentElement())==t}):W?(T=s,e.isSelectionValid=function(){return!0}):t.fail("Neither document.selection or window.getSelection() detected."),e.getNativeSelection=T;var $=T(),q=e.createNativeRange(document),U=F(document),V=N.areHostProperties($,["anchorNode","focusNode","anchorOffset","focusOffset"]);M.selectionHasAnchorAndFocus=V;var Y=A($,"extend");M.selectionHasExtend=Y;var X=typeof $.rangeCount==E;M.selectionHasRangeCount=X;var K=!1,G=!0,Q=Y?function(t,n){var i=I.getRangeDocument(n),s=e.createRange(i);s.collapseToPoint(n.endContainer,n.endOffset),t.addRange(h(s)),t.extend(n.startContainer,n.startOffset)}:null;N.areHostMethods($,["addRange","getRangeAt","removeAllRanges"])&&typeof $.rangeCount==E&&M.implementsDomRange&&!function(){var t=window.getSelection();if(t){for(var n=t.rangeCount,i=n>1,s=[],o=r(t),a=0;a<n;++a)s[a]=t.getRangeAt(a);var l=F(document),c=l.appendChild(document.createElement("div"));c.contentEditable="false";var h=c.appendChild(document.createTextNode("   ")),u=document.createRange();if(u.setStart(h,1),u.collapse(!0),t.addRange(u),G=1==t.rangeCount,t.removeAllRanges(),!i){var d=window.navigator.appVersion.match(/Chrome\/(.*?) /);if(d&&parseInt(d[1])>=36)K=!1;else{var f=u.cloneRange();u.setStart(h,0),f.setEnd(h,3),f.setStart(h,2),t.addRange(u),t.addRange(f),K=2==t.rangeCount}}for(l.removeChild(c),t.removeAllRanges(),a=0;a<n;++a)0==a&&o?Q?Q(t,s[a]):(e.warn("Rangy initialization: original selection was backwards but selection has been restored forwards because the browser does not support Selection.extend"),t.addRange(s[a])):t.addRange(s[a])}}(),M.selectionSupportsMultipleRanges=K,M.collapsedNonEditableSelectionsSupported=G;var J,Z=!1;U&&A(U,"createControlRange")&&(J=U.createControlRange(),N.areHostProperties(J,["item","add"])&&(Z=!0)),M.implementsControlRange=Z,S=V?function(e){return e.anchorNode===e.focusNode&&e.anchorOffset===e.focusOffset}:function(e){return!!e.rangeCount&&e.getRangeAt(e.rangeCount-1).collapsed};var ee;A($,"getRangeAt")?ee=function(e,t){try{return e.getRangeAt(t)}catch(n){return null}}:V&&(ee=function(t){var n=H(t.anchorNode),i=e.createRange(n);return i.setStartAndEnd(t.anchorNode,t.anchorOffset,t.focusNode,t.focusOffset),i.collapsed!==this.isCollapsed&&i.setStartAndEnd(t.focusNode,t.focusOffset,t.anchorNode,t.anchorOffset),i}),v.prototype=e.selectionPrototype;var te=[],ne=function(e){if(e&&e instanceof v)return e.refresh(),e;e=i(e,"getNativeSelection");var t=b(e),n=T(e),s=B?o(e):null;return t?(t.nativeSelection=n,t.docSelection=s,t.refresh()):(t=new v(n,s,e),te.push({win:e,selection:t})),t};e.getSelection=ne,e.getIframeSelection=function(n){return t.deprecationNotice("getIframeSelection()","getSelection(iframeEl)"),e.getSelection(k.getIframeWindow(n))};var ie=v.prototype;if(!j&&V&&N.areHostMethods($,["removeAllRanges","addRange"])){ie.removeAllRanges=function(){this.nativeSelection.removeAllRanges(),c(this)};var se=function(e,t){Q(e.nativeSelection,t),e.refresh()};X?ie.addRange=function(t,i){if(Z&&B&&this.docSelection.type==L)g(this,t);else if(n(i)&&Y)se(this,t);else{var s;if(K?s=this.rangeCount:(this.removeAllRanges(),s=0),this.nativeSelection.addRange(h(t).cloneRange()),this.rangeCount=this.nativeSelection.rangeCount,this.rangeCount==s+1){if(e.config.checkSelectionRanges){var o=ee(this.nativeSelection,this.rangeCount-1);o&&!z(o,t)&&(t=new R(o))}this._ranges[this.rangeCount-1]=t,a(this,t,ae(this.nativeSelection)),this.isCollapsed=S(this)}else this.refresh()}}:ie.addRange=function(e,t){n(t)&&Y?se(this,e):(this.nativeSelection.addRange(h(e)),this.refresh())},ie.setRanges=function(e){if(Z&&B&&e.length>1)w(this,e);else{this.removeAllRanges();for(var t=0,n=e.length;t<n;++t)this.addRange(e[t])}}}else{if(!(A($,"empty")&&A(q,"select")&&Z&&j))return t.fail("No means of selecting a Range or TextRange was found"),!1;ie.removeAllRanges=function(){try{if(this.docSelection.empty(),"None"!=this.docSelection.type){var e;if(this.anchorNode)e=H(this.anchorNode);else if(this.docSelection.type==L){var t=this.docSelection.createRange();t.length&&(e=H(t.item(0)))}if(e){var n=F(e).createTextRange();n.select(),this.docSelection.empty()}}}catch(i){}c(this)},ie.addRange=function(t){this.docSelection.type==L?g(this,t):(e.WrappedTextRange.rangeToTextRange(t).select(),this._ranges[0]=t,this.rangeCount=1,this.isCollapsed=this._ranges[0].collapsed,a(this,t,!1))},ie.setRanges=function(e){this.removeAllRanges();var t=e.length;t>1?w(this,e):t&&this.addRange(e[0])}}ie.getRangeAt=function(e){if(e<0||e>=this.rangeCount)throw new P("INDEX_SIZE_ERR");return this._ranges[e].cloneRange()};var oe;if(j)oe=function(t){var n;e.isSelectionValid(t.win)?n=t.docSelection.createRange():(n=F(t.win.document).createTextRange(),n.collapse(!0)),t.docSelection.type==L?m(t):f(n)?p(t,n):c(t)};else if(A($,"getRangeAt")&&typeof $.rangeCount==E)oe=function(t){if(Z&&B&&t.docSelection.type==L)m(t);else if(t._ranges.length=t.rangeCount=t.nativeSelection.rangeCount,t.rangeCount){for(var n=0,i=t.rangeCount;n<i;++n)t._ranges[n]=new e.WrappedRange(t.nativeSelection.getRangeAt(n));a(t,t._ranges[t.rangeCount-1],ae(t.nativeSelection)),t.isCollapsed=S(t)}else c(t)};else{if(!V||typeof $.isCollapsed!=D||typeof q.collapsed!=D||!M.implementsDomRange)return t.fail("No means of obtaining a Range or TextRange from the user's selection was found"),!1;oe=function(e){var t,n=e.nativeSelection;n.anchorNode?(t=ee(n,0),e._ranges=[t],e.rangeCount=1,l(e),e.isCollapsed=S(e)):c(e)}}ie.refresh=function(e){var t=e?this._ranges.slice(0):null,n=this.anchorNode,i=this.anchorOffset;if(oe(this),e){var s=t.length;if(s!=this._ranges.length)return!0;if(this.anchorNode!=n||this.anchorOffset!=i)return!0;for(;s--;)if(!z(t[s],this._ranges[s]))return!0;return!1}};var re=function(e,t){var n=e.getAllRanges();e.removeAllRanges();for(var i=0,s=n.length;i<s;++i)z(t,n[i])||e.addRange(n[i]);e.rangeCount||c(e)};Z&&B?ie.removeRange=function(e){if(this.docSelection.type==L){for(var t,n=this.docSelection.createRange(),i=d(e),s=H(n.item(0)),o=F(s).createControlRange(),r=!1,a=0,l=n.length;a<l;++a)t=n.item(a),t!==i||r?o.add(n.item(a)):r=!0;o.select(),m(this)}else re(this,e)}:ie.removeRange=function(e){re(this,e)};var ae;!j&&V&&M.implementsDomRange?(ae=r,ie.isBackward=function(){return ae(this)}):ae=ie.isBackward=function(){return!1},ie.isBackwards=ie.isBackward,ie.toString=function(){for(var e=[],t=0,n=this.rangeCount;t<n;++t)e[t]=""+this._ranges[t];return e.join("")},ie.collapse=function(t,n){_(this,t);var i=e.createRange(t);i.collapseToPoint(t,n),this.setSingleRange(i),this.isCollapsed=!0},ie.collapseToStart=function(){if(!this.rangeCount)throw new P("INVALID_STATE_ERR");var e=this._ranges[0];this.collapse(e.startContainer,e.startOffset)},ie.collapseToEnd=function(){if(!this.rangeCount)throw new P("INVALID_STATE_ERR");var e=this._ranges[this.rangeCount-1];this.collapse(e.endContainer,e.endOffset)},ie.selectAllChildren=function(t){_(this,t);var n=e.createRange(t);n.selectNodeContents(t),this.setSingleRange(n)},ie.deleteFromDocument=function(){if(Z&&B&&this.docSelection.type==L){for(var e,t=this.docSelection.createRange();t.length;)e=t.item(0),t.remove(e),e.parentNode.removeChild(e);this.refresh()}else if(this.rangeCount){var n=this.getAllRanges();if(n.length){this.removeAllRanges();for(var i=0,s=n.length;i<s;++i)n[i].deleteContents();this.addRange(n[s-1])}}},ie.eachRange=function(e,t){for(var n=0,i=this._ranges.length;n<i;++n)if(e(this.getRangeAt(n)))return t},ie.getAllRanges=function(){var e=[];return this.eachRange(function(t){e.push(t)}),e},ie.setSingleRange=function(e,t){this.removeAllRanges(),this.addRange(e,t)},ie.callMethodOnEachRange=function(e,t){var n=[];return this.eachRange(function(i){n.push(i[e].apply(i,t))}),n},ie.setStart=C(!0),ie.setEnd=C(!1),e.rangePrototype.select=function(e){ne(this.getDocument()).setSingleRange(this,e)},ie.changeEachRange=function(e){var t=[],n=this.isBackward();this.eachRange(function(n){e(n),t.push(n)}),this.removeAllRanges(),n&&1==t.length?this.addRange(t[0],"backward"):this.setRanges(t)},ie.containsNode=function(e,t){return this.eachRange(function(n){return n.containsNode(e,t)},!0)||!1},ie.getBookmark=function(e){return{backward:this.isBackward(),rangeBookmarks:this.callMethodOnEachRange("getBookmark",[e])}},ie.moveToBookmark=function(t){for(var n,i,s=[],o=0;n=t.rangeBookmarks[o++];)i=e.createRange(this.win),i.moveToBookmark(n),s.push(i);t.backward?this.setSingleRange(s[0],"backward"):this.setRanges(s)},ie.toHtml=function(){var e=[];return this.eachRange(function(t){e.push(I.toHtml(t))}),e.join("")},M.implementsTextRange&&(ie.getNativeTextRange=function(){var n;if(n=this.docSelection){var i=n.createRange();if(f(i))return i;throw t.createError("getNativeTextRange: selection is a control selection")}if(this.rangeCount>0)return e.WrappedTextRange.rangeToTextRange(this.getRangeAt(0));throw t.createError("getNativeTextRange: selection contains no range")}),ie.getName=function(){return"WrappedSelection"},ie.inspect=function(){return x(this)},ie.detach=function(){b(this.win,"delete"),y(this)},v.detachAll=function(){b(null,"deleteAll")},v.inspect=x,v.isDirectionBackward=n,e.Selection=v,e.selectionPrototype=ie,e.addShimListener(function(e){"undefined"==typeof e.getSelection&&(e.getSelection=function(){return ne(e)}),e=null})}),k)},this),function(e,t){"function"==typeof define&&define.amd?define(["rangy"],e):e(t.rangy)}(function(e){e.createModule("SaveRestore",["WrappedRange"],function(e,t){function n(e,t){return(t||document).getElementById(e)}function i(e,t){var n,i="selectionBoundary_"+ +new Date+"_"+(""+Math.random()).slice(2),s=p.getDocument(e.startContainer),o=e.cloneRange();return o.collapse(t),n=s.createElement("span"),n.id=i,n.style.lineHeight="0",n.style.display="none",n.className="rangySelectionBoundary",n.appendChild(s.createTextNode(m)),o.insertNode(n),n}function s(e,i,s,o){var r=n(s,e);r?(i[o?"setStartBefore":"setEndBefore"](r),r.parentNode.removeChild(r)):t.warn("Marker element has been removed. Cannot restore selection.")}function o(e,t){return t.compareBoundaryPoints(e.START_TO_START,e)}function r(t,n){var s,o,r=e.DomRange.getRangeDocument(t),a=t.toString();return t.collapsed?(o=i(t,!1),{document:r,markerId:o.id,collapsed:!0}):(o=i(t,!1),s=i(t,!0),{document:r,startMarkerId:s.id,endMarkerId:o.id,collapsed:!1,backward:n,toString:function(){return"original text: '"+a+"', new text: '"+t.toString()+"'"}})}function a(i,o){var r=i.document;"undefined"==typeof o&&(o=!0);var a=e.createRange(r);if(i.collapsed){var l=n(i.markerId,r);if(l){l.style.display="inline";var c=l.previousSibling;c&&3==c.nodeType?(l.parentNode.removeChild(l),a.collapseToPoint(c,c.length)):(a.collapseBefore(l),l.parentNode.removeChild(l))}else t.warn("Marker element has been removed. Cannot restore selection.")}else s(r,a,i.startMarkerId,!0),s(r,a,i.endMarkerId,!1);return o&&a.normalizeBoundaries(),a}function l(t,i){var s,a,l=[];t=t.slice(0),t.sort(o);for(var c=0,h=t.length;c<h;++c)l[c]=r(t[c],i);for(c=h-1;c>=0;--c)s=t[c],a=e.DomRange.getRangeDocument(s),s.collapsed?s.collapseAfter(n(l[c].markerId,a)):(s.setEndBefore(n(l[c].endMarkerId,a)),s.setStartAfter(n(l[c].startMarkerId,a)));return l}function c(n){if(!e.isSelectionValid(n))return t.warn("Cannot save selection. This usually happens when the selection is collapsed and the selection document has lost focus."),null;var i=e.getSelection(n),s=i.getAllRanges(),o=1==s.length&&i.isBackward(),r=l(s,o);return o?i.setSingleRange(s[0],"backward"):i.setRanges(s),{win:n,rangeInfos:r,restored:!1}}function h(e){for(var t=[],n=e.length,i=n-1;i>=0;i--)t[i]=a(e[i],!0);return t}function u(t,n){if(!t.restored){var i=t.rangeInfos,s=e.getSelection(t.win),o=h(i),r=i.length;1==r&&n&&e.features.selectionHasExtend&&i[0].backward?(s.removeAllRanges(),s.addRange(o[0],!0)):s.setRanges(o),t.restored=!0}}function d(e,t){var i=n(t,e);i&&i.parentNode.removeChild(i)}function f(e){for(var t,n=e.rangeInfos,i=0,s=n.length;i<s;++i)t=n[i],t.collapsed?d(e.doc,t.markerId):(d(e.doc,t.startMarkerId),d(e.doc,t.endMarkerId))}var p=e.dom,m="\ufeff";e.util.extend(e,{saveRange:r,restoreRange:a,saveRanges:l,restoreRanges:h,saveSelection:c,restoreSelection:u,removeMarkerElement:d,removeMarkers:f})})},this);var Base=function(){};Base.extend=function(e,t){var n=Base.prototype.extend;Base._prototyping=!0;var i=new this;n.call(i,e),i.base=function(){},delete Base._prototyping;var s=i.constructor,o=i.constructor=function(){if(!Base._prototyping)if(this._constructing||this.constructor==o)this._constructing=!0,s.apply(this,arguments),delete this._constructing;else if(null!=arguments[0])return(arguments[0].extend||n).call(arguments[0],i)};return o.ancestor=this,o.extend=this.extend,o.forEach=this.forEach,o.implement=this.implement,o.prototype=i,o.toString=this.toString,o.valueOf=function(e){return"object"==e?o:s.valueOf()},n.call(o,t),"function"==typeof o.init&&o.init(),o},Base.prototype={extend:function(e,t){if(arguments.length>1){var n=this[e];if(n&&"function"==typeof t&&(!n.valueOf||n.valueOf()!=t.valueOf())&&/\bbase\b/.test(t)){var i=t.valueOf();t=function(){var e=this.base||Base.prototype.base;this.base=n;var t=i.apply(this,arguments);return this.base=e,t},t.valueOf=function(e){return"object"==e?t:i},t.toString=Base.toString}this[e]=t}else if(e){var s=Base.prototype.extend;Base._prototyping||"function"==typeof this||(s=this.extend||s);for(var o={toSource:null},r=["constructor","toString","valueOf"],a=Base._prototyping?0:1;l=r[a++];)e[l]!=o[l]&&s.call(this,l,e[l]);for(var l in e)o[l]||s.call(this,l,e[l])}return this}},Base=Base.extend({constructor:function(){this.extend(arguments[0])}},{ancestor:Object,version:"1.1",forEach:function(e,t,n){for(var i in e)void 0===this.prototype[i]&&t.call(n,e[i],i,e)},implement:function(){for(var e=0;e<arguments.length;e++)"function"==typeof arguments[e]?arguments[e](this.prototype):this.prototype.extend(arguments[e]);return this},toString:function(){return String(this.valueOf())}}),wysihtml5.browser=function(){function e(e){return+(/ipad|iphone|ipod/.test(e)&&e.match(/ os (\d+).+? like mac os x/)||[void 0,0])[1]}function t(e){return+(e.match(/android (\d+)/)||[void 0,0])[1]}function n(e,t){var n,i=-1;return"Microsoft Internet Explorer"==navigator.appName?n=new RegExp("MSIE ([0-9]{1,}[.0-9]{0,})"):"Netscape"==navigator.appName&&(n=new RegExp("Trident/.*rv:([0-9]{1,}[.0-9]{0,})")),n&&null!=n.exec(navigator.userAgent)&&(i=parseFloat(RegExp.$1)),i!==-1&&(!e||(t?"<"===t?e<i:">"===t?e>i:"<="===t?e<=i:">="===t?e>=i:void 0:e===i))}var i=navigator.userAgent,s=document.createElement("div"),o=i.indexOf("Gecko")!==-1&&i.indexOf("KHTML")===-1,r=i.indexOf("AppleWebKit/")!==-1,a=i.indexOf("Chrome/")!==-1,l=i.indexOf("Opera/")!==-1;return{USER_AGENT:i,supported:function(){var n=this.USER_AGENT.toLowerCase(),i="contentEditable"in s,o=document.execCommand&&document.queryCommandSupported&&document.queryCommandState,r=document.querySelector&&document.querySelectorAll,a=this.isIos()&&e(n)<5||this.isAndroid()&&t(n)<4||n.indexOf("opera mobi")!==-1||n.indexOf("hpwos/")!==-1;return i&&o&&r&&!a},isTouchDevice:function(){return this.supportsEvent("touchmove")},isIos:function(){return/ipad|iphone|ipod/i.test(this.USER_AGENT)},isAndroid:function(){return this.USER_AGENT.indexOf("Android")!==-1},supportsSandboxedIframes:function(){return n()},throwsMixedContentWarningWhenIframeSrcIsEmpty:function(){return!("querySelector"in document)},displaysCaretInEmptyContentEditableCorrectly:function(){return n()},hasCurrentStyleProperty:function(){return"currentStyle"in s},hasHistoryIssue:function(){return o&&"Mac"===navigator.platform.substr(0,3)},insertsLineBreaksOnReturn:function(){return o},supportsPlaceholderAttributeOn:function(e){return"placeholder"in e},supportsEvent:function(e){return"on"+e in s||function(){return s.setAttribute("on"+e,"return;"),"function"==typeof s["on"+e]}()},supportsEventsInIframeCorrectly:function(){return!l},supportsHTML5Tags:function(e){var t=e.createElement("div"),n="<article>foo</article>";return t.innerHTML=n,t.innerHTML.toLowerCase()===n},supportsCommand:function(){var e={formatBlock:n(10,"<="),insertUnorderedList:n(),insertOrderedList:n()},t={insertHTML:o};return function(n,i){var s=e[i];if(!s){try{return n.queryCommandSupported(i)}catch(o){}try{return n.queryCommandEnabled(i)}catch(r){return!!t[i]}}return!1}}(),doesAutoLinkingInContentEditable:function(){return n()},canDisableAutoLinking:function(){return this.supportsCommand(document,"AutoUrlDetect")},clearsContentEditableCorrectly:function(){return o||l||r},supportsGetAttributeCorrectly:function(){var e=document.createElement("td");return"1"!=e.getAttribute("rowspan")},canSelectImagesInContentEditable:function(){return o||n()||l},autoScrollsToCaret:function(){return!r},autoClosesUnclosedTags:function(){var e,t,n=s.cloneNode(!1);return n.innerHTML="<p><div></div>",t=n.innerHTML.toLowerCase(),e="<p></p><div></div>"===t||"<p><div></div></p>"===t,this.autoClosesUnclosedTags=function(){return e},e},supportsNativeGetElementsByClassName:function(){return String(document.getElementsByClassName).indexOf("[native code]")!==-1},supportsSelectionModify:function(){return"getSelection"in window&&"modify"in window.getSelection()},needsSpaceAfterLineBreak:function(){return l},supportsSpeechApiOn:function(e){var t=i.match(/Chrome\/(\d+)/)||[void 0,0];return t[1]>=11&&("onwebkitspeechchange"in e||"speech"in e)},crashesWhenDefineProperty:function(e){return n(9)&&("XMLHttpRequest"===e||"XDomainRequest"===e)},doesAsyncFocus:function(){return n()},hasProblemsSettingCaretAfterImg:function(){return n()},hasUndoInContextMenu:function(){return o||a||l},hasInsertNodeIssue:function(){return l},hasIframeFocusIssue:function(){return n()},createsNestedInvalidMarkupAfterPaste:function(){return r},supportsMutationEvents:function(){return"MutationEvent"in window},supportsModenPaste:function(){return!("clipboardData"in window)}}}(),wysihtml5.lang.array=function(e){return{contains:function(t){if(Array.isArray(t)){for(var n=t.length;n--;)if(wysihtml5.lang.array(e).indexOf(t[n])!==-1)return!0;return!1}return wysihtml5.lang.array(e).indexOf(t)!==-1},indexOf:function(t){if(e.indexOf)return e.indexOf(t);for(var n=0,i=e.length;n<i;n++)if(e[n]===t)return n;return-1},without:function(t){t=wysihtml5.lang.array(t);for(var n=[],i=0,s=e.length;i<s;i++)t.contains(e[i])||n.push(e[i]);return n},get:function(){for(var t=0,n=e.length,i=[];t<n;t++)i.push(e[t]);return i},map:function(t,n){if(Array.prototype.map)return e.map(t,n);for(var i=e.length>>>0,s=new Array(i),o=0;o<i;o++)s[o]=t.call(n,e[o],o,e);return s},unique:function(){for(var t=[],n=e.length,i=0;i<n;)wysihtml5.lang.array(t).contains(e[i])||t.push(e[i]),i++;return t}}},wysihtml5.lang.Dispatcher=Base.extend({on:function(e,t){return this.events=this.events||{},this.events[e]=this.events[e]||[],this.events[e].push(t),this},off:function(e,t){this.events=this.events||{};var n,i,s=0;if(e){for(n=this.events[e]||[],i=[];s<n.length;s++)n[s]!==t&&t&&i.push(n[s]);this.events[e]=i}else this.events={};return this},fire:function(e,t){this.events=this.events||{};for(var n=this.events[e]||[],i=0;i<n.length;i++)n[i].call(this,t);return this},observe:function(){return this.on.apply(this,arguments)},stopObserving:function(){return this.off.apply(this,arguments)}}),wysihtml5.lang.object=function(e){return{merge:function(t){for(var n in t)e[n]=t[n];return this},get:function(){return e},clone:function(t){var n,i={};if(null===e||!wysihtml5.lang.object(e).isPlainObject())return e;for(n in e)e.hasOwnProperty(n)&&(t?i[n]=wysihtml5.lang.object(e[n]).clone(t):i[n]=e[n]);return i},isArray:function(){return"[object Array]"===Object.prototype.toString.call(e)},isFunction:function(){return"[object Function]"===Object.prototype.toString.call(e)},isPlainObject:function(){return"[object Object]"===Object.prototype.toString.call(e)}}},function(){var e=/^\s+/,t=/\s+$/,n=/[&<>\t"]/g,i={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","\t":"&nbsp; "};wysihtml5.lang.string=function(s){return s=String(s),{trim:function(){return s.replace(e,"").replace(t,"")},interpolate:function(e){for(var t in e)s=this.replace("#{"+t+"}").by(e[t]);return s},replace:function(e){return{by:function(t){return s.split(e).join(t)}}},escapeHTML:function(e,t){var o=s.replace(n,function(e){return i[e]});return e&&(o=o.replace(/(?:\r\n|\r|\n)/g,"<br />")),t&&(o=o.replace(/  /gi,"&nbsp; ")),o}}}}(),function(e){function t(e,t){return o(e,t)?e:(e===e.ownerDocument.documentElement&&(e=e.ownerDocument.body),r(e,t))}function n(e){return e.replace(l,function(e,t){var n=(t.match(c)||[])[1]||"",i=u[n];t=t.replace(c,""),t.split(i).length>t.split(n).length&&(t+=n,n="");var s=t,o=t;return t.length>h&&(o=o.substr(0,h)+"..."),"www."===s.substr(0,4)&&(s="http://"+s),'<a href="'+s+'">'+o+"</a>"+n})}function i(e){var t=e._wysihtml5_tempElement;return t||(t=e._wysihtml5_tempElement=e.createElement("div")),t}function s(t){var s=t.parentNode,o=e.lang.string(t.data).escapeHTML(),r=i(s.ownerDocument);for(r.innerHTML="<span></span>"+n(o),r.removeChild(r.firstChild);r.firstChild;)s.insertBefore(r.firstChild,t);s.removeChild(t)}function o(t,n){for(var i;t.parentNode;){if(t=t.parentNode,i=t.nodeName,t.className&&e.lang.array(t.className.split(" ")).contains(n))return!0;if(a.contains(i))return!0;if("body"===i)return!1}return!1}function r(t,n){if(!(a.contains(t.nodeName)||t.className&&e.lang.array(t.className.split(" ")).contains(n))){if(t.nodeType===e.TEXT_NODE&&t.data.match(l))return void s(t);for(var i=e.lang.array(t.childNodes).get(),o=i.length,c=0;c<o;c++)r(i[c],n);return t}}var a=e.lang.array(["CODE","PRE","A","SCRIPT","HEAD","TITLE","STYLE"]),l=/((https?:\/\/|www\.)[^\s<]{3,})/gi,c=/([^\w\/\-](,?))$/i,h=100,u={")":"(","]":"[","}":"{"};e.dom.autoLink=t,e.dom.autoLink.URL_REG_EXP=l}(wysihtml5),function(e){var t=e.dom;t.addClass=function(e,n){var i=e.classList;return i?i.add(n):void(t.hasClass(e,n)||(e.className+=" "+n))},t.removeClass=function(e,t){var n=e.classList;return n?n.remove(t):void(e.className=e.className.replace(new RegExp("(^|\\s+)"+t+"(\\s+|$)")," "))},t.hasClass=function(e,t){var n=e.classList;if(n)return n.contains(t);var i=e.className;return i.length>0&&(i==t||new RegExp("(^|\\s)"+t+"(\\s|$)").test(i))}}(wysihtml5),wysihtml5.dom.contains=function(){var e=document.documentElement;return e.contains?function(e,t){return t.nodeType!==wysihtml5.ELEMENT_NODE&&(t=t.parentNode),e!==t&&e.contains(t)}:e.compareDocumentPosition?function(e,t){return!!(16&e.compareDocumentPosition(t))}:void 0}(),wysihtml5.dom.convertToList=function(){function e(e,t){var n=e.createElement("li");return t.appendChild(n),n}function t(e,t){return e.createElement(t)}function n(n,i,s){if("UL"===n.nodeName||"OL"===n.nodeName||"MENU"===n.nodeName)return n;var o,r,a,l,c,h,u,d,f,p=n.ownerDocument,m=t(p,i),g=n.querySelectorAll("br"),v=g.length;for(f=0;f<v;f++)for(l=g[f];(c=l.parentNode)&&c!==n&&c.lastChild===l;){if("block"===wysihtml5.dom.getStyle("display").from(c)){c.removeChild(l);break}wysihtml5.dom.insert(l).after(l.parentNode)}for(o=wysihtml5.lang.array(n.childNodes).get(),r=o.length,f=0;f<r;f++)d=d||e(p,m),a=o[f],h="block"===wysihtml5.dom.getStyle("display").from(a),u="BR"===a.nodeName,!h||s&&wysihtml5.dom.hasClass(a,s)?u?d=d.firstChild?null:d:d.appendChild(a):(d=d.firstChild?e(p,m):d,d.appendChild(a),d=null);return 0===o.length&&e(p,m),n.parentNode.replaceChild(m,n),m}return n}(),wysihtml5.dom.copyAttributes=function(e){return{from:function(t){return{to:function(n){for(var i,s=0,o=e.length;s<o;s++)i=e[s],"undefined"!=typeof t[i]&&""!==t[i]&&(n[i]=t[i]);return{andTo:arguments.callee}}}}}},function(e){var t=["-webkit-box-sizing","-moz-box-sizing","-ms-box-sizing","box-sizing"],n=function(t){return!!i(t)&&parseInt(e.getStyle("width").from(t),10)<t.offsetWidth},i=function(n){for(var i=0,s=t.length;i<s;i++)if("border-box"===e.getStyle(t[i]).from(n))return t[i]};e.copyStyles=function(i){return{from:function(s){n(s)&&(i=wysihtml5.lang.array(i).without(t));for(var o,r="",a=i.length,l=0;l<a;l++)o=i[l],r+=o+":"+e.getStyle(o).from(s)+";";return{to:function(t){return e.setStyles(r).on(t),{andTo:arguments.callee}}}}}}}(wysihtml5.dom),function(e){e.dom.delegate=function(t,n,i,s){return e.dom.observe(t,i,function(i){for(var o=i.target,r=e.lang.array(t.querySelectorAll(n));o&&o!==t;){if(r.contains(o)){s.call(o,i);break}o=o.parentNode}})}}(wysihtml5),function(e){e.dom.domNode=function(t){var n=[e.ELEMENT_NODE,e.TEXT_NODE],i=function(t){return t.nodeType===e.TEXT_NODE&&/^\s*$/g.test(t.data)};return{prev:function(s){var o=t.previousSibling,r=s&&s.nodeTypes?s.nodeTypes:n;return o?!e.lang.array(r).contains(o.nodeType)||s&&s.ignoreBlankTexts&&i(o)?e.dom.domNode(o).prev(s):o:null},next:function(s){var o=t.nextSibling,r=s&&s.nodeTypes?s.nodeTypes:n;return o?!e.lang.array(r).contains(o.nodeType)||s&&s.ignoreBlankTexts&&i(o)?e.dom.domNode(o).next(s):o:null}}}}(wysihtml5),wysihtml5.dom.getAsDom=function(){var e=function(e,t){var n=t.createElement("div");n.style.display="none",t.body.appendChild(n);try{n.innerHTML=e}catch(i){}return t.body.removeChild(n),n},t=function(e){if(!e._wysihtml5_supportsHTML5Tags){for(var t=0,i=n.length;t<i;t++)e.createElement(n[t]);e._wysihtml5_supportsHTML5Tags=!0}},n=["abbr","article","aside","audio","bdi","canvas","command","datalist","details","figcaption","figure","footer","header","hgroup","keygen","mark","meter","nav","output","progress","rp","rt","ruby","svg","section","source","summary","time","track","video","wbr"];
return function(n,i){i=i||document;var s;return"object"==typeof n&&n.nodeType?(s=i.createElement("div"),s.appendChild(n)):wysihtml5.browser.supportsHTML5Tags(i)?(s=i.createElement("div"),s.innerHTML=n):(t(i),s=e(n,i)),s}}(),wysihtml5.dom.getParentElement=function(){function e(e,t){return!t||!t.length||("string"==typeof t?e===t:wysihtml5.lang.array(t).contains(e))}function t(e){return e.nodeType===wysihtml5.ELEMENT_NODE}function n(e,t,n){var i=(e.className||"").match(n)||[];return t?i[i.length-1]===t:!!i.length}function i(e,t,n){var i=(e.getAttribute("style")||"").match(n)||[];return t?i[i.length-1]===t:!!i.length}return function(s,o,r,a){var l=o.cssStyle||o.styleRegExp,c=o.className||o.classRegExp;for(r=r||50;r--&&s&&"BODY"!==s.nodeName&&(!a||s!==a);){if(t(s)&&e(s.nodeName,o.nodeName)&&(!l||i(s,o.cssStyle,o.styleRegExp))&&(!c||n(s,o.className,o.classRegExp)))return s;s=s.parentNode}return null}}(),wysihtml5.dom.getStyle=function(){function e(e){return e.replace(n,function(e){return e.charAt(1).toUpperCase()})}var t={"float":"styleFloat"in document.createElement("div").style?"styleFloat":"cssFloat"},n=/\-[a-z]/g;return function(n){return{from:function(i){if(i.nodeType===wysihtml5.ELEMENT_NODE){var s=i.ownerDocument,o=t[n]||e(n),r=i.style,a=i.currentStyle,l=r[o];if(l)return l;if(a)try{return a[o]}catch(c){}var h,u,d=s.defaultView||s.parentWindow,f=("height"===n||"width"===n)&&"TEXTAREA"===i.nodeName;return d.getComputedStyle?(f&&(h=r.overflow,r.overflow="hidden"),u=d.getComputedStyle(i,null).getPropertyValue(n),f&&(r.overflow=h||""),u):void 0}}}}}(),wysihtml5.dom.getTextNodes=function(e,t){var n=[];for(e=e.firstChild;e;e=e.nextSibling)3==e.nodeType?t&&/^\s*$/.test(e.innerText||e.textContent)||n.push(e):n=n.concat(wysihtml5.dom.getTextNodes(e,t));return n},wysihtml5.dom.hasElementWithTagName=function(){function e(e){return e._wysihtml5_identifier||(e._wysihtml5_identifier=n++)}var t={},n=1;return function(n,i){var s=e(n)+":"+i,o=t[s];return o||(o=t[s]=n.getElementsByTagName(i)),o.length>0}}(),function(e){function t(e){return e._wysihtml5_identifier||(e._wysihtml5_identifier=i++)}var n={},i=1;e.dom.hasElementWithClassName=function(i,s){if(!e.browser.supportsNativeGetElementsByClassName())return!!i.querySelector("."+s);var o=t(i)+":"+s,r=n[o];return r||(r=n[o]=i.getElementsByClassName(s)),r.length>0}}(wysihtml5),wysihtml5.dom.insert=function(e){return{after:function(t){t.parentNode.insertBefore(e,t.nextSibling)},before:function(t){t.parentNode.insertBefore(e,t)},into:function(t){t.appendChild(e)}}},wysihtml5.dom.insertCSS=function(e){return e=e.join("\n"),{into:function(t){var n=t.createElement("style");n.type="text/css",n.styleSheet?n.styleSheet.cssText=e:n.appendChild(t.createTextNode(e));var i=t.querySelector("head link");if(i)return void i.parentNode.insertBefore(n,i);var s=t.querySelector("head");s&&s.appendChild(n)}}},function(e){e.dom.lineBreaks=function(t){function n(e){return"BR"===e.nodeName}function i(t){return!!n(t)||"block"===e.dom.getStyle("display").from(t)}return{add:function(n){var s=t.ownerDocument,o=e.dom.domNode(t).next({ignoreBlankTexts:!0}),r=e.dom.domNode(t).prev({ignoreBlankTexts:!0});o&&!i(o)&&e.dom.insert(s.createElement("br")).after(t),r&&!i(r)&&e.dom.insert(s.createElement("br")).before(t)},remove:function(i){var s=e.dom.domNode(t).next({ignoreBlankTexts:!0}),o=e.dom.domNode(t).prev({ignoreBlankTexts:!0});s&&n(s)&&s.parentNode.removeChild(s),o&&n(o)&&o.parentNode.removeChild(o)}}}}(wysihtml5),wysihtml5.dom.observe=function(e,t,n){t="string"==typeof t?[t]:t;for(var i,s,o=0,r=t.length;o<r;o++)s=t[o],e.addEventListener?e.addEventListener(s,n,!1):(i=function(t){"target"in t||(t.target=t.srcElement),t.preventDefault=t.preventDefault||function(){this.returnValue=!1},t.stopPropagation=t.stopPropagation||function(){this.cancelBubble=!0},n.call(e,t)},e.attachEvent("on"+s,i));return{stop:function(){for(var s,o=0,r=t.length;o<r;o++)s=t[o],e.removeEventListener?e.removeEventListener(s,n,!1):e.detachEvent("on"+s,i)}}},wysihtml5.dom.parse=function(e,t){function n(e,t){wysihtml5.lang.object(b).merge(y).merge(t.rules).get();var n,o,r,a=t.context||e.ownerDocument||document,l=a.createDocumentFragment(),c="string"==typeof e,h=!1;for(t.clearInternals===!0&&(h=!0),n=c?wysihtml5.dom.getAsDom(e,a):e,b.selectors&&s(n,b.selectors);n.firstChild;)r=n.firstChild,o=i(r,t.cleanUp,h,t.uneditableClass),o&&l.appendChild(o),r!==o&&n.removeChild(r);if(t.unjoinNbsps)for(var u=wysihtml5.dom.getTextNodes(l),d=u.length;d--;)u[d].nodeValue=u[d].nodeValue.replace(/([\S\u00A0])\u00A0/gi,"$1 ");return n.innerHTML="",n.appendChild(l),c?wysihtml5.quirks.getCorrectInnerHTML(n):n}function i(e,t,n,s){var o,r,a,l=e.nodeType,c=e.childNodes,h=c.length,u=m[l],d=0;if(s&&1===l&&wysihtml5.dom.hasClass(e,s))return e;if(r=u&&u(e,n),!r){if(r===!1){for(o=e.ownerDocument.createDocumentFragment(),d=h;d--;)c[d]&&(a=i(c[d],t,n,s),a&&(c[d]===a&&d--,o.insertBefore(a,o.firstChild)));return"block"===wysihtml5.dom.getStyle("display").from(e)&&o.appendChild(e.ownerDocument.createElement("br")),wysihtml5.lang.array(["div","pre","p","table","td","th","ul","ol","li","dd","dl","footer","header","section","h1","h2","h3","h4","h5","h6"]).contains(e.nodeName.toLowerCase())&&e.parentNode.lastChild!==e&&(e.nextSibling&&3===e.nextSibling.nodeType&&/^\s/.test(e.nextSibling.nodeValue)||o.appendChild(e.ownerDocument.createTextNode(" "))),o.normalize&&o.normalize(),o}return null}for(d=0;d<h;d++)c[d]&&(a=i(c[d],t,n,s),a&&(c[d]===a&&d--,r.appendChild(a)));if(t&&r.nodeName.toLowerCase()===g&&(!r.childNodes.length||/^\s*$/gi.test(r.innerHTML)&&(n||"_wysihtml5-temp-placeholder"!==e.className&&"rangySelectionBoundary"!==e.className)||!r.attributes.length)){for(o=r.ownerDocument.createDocumentFragment();r.firstChild;)o.appendChild(r.firstChild);return o.normalize&&o.normalize(),o}return r.normalize&&r.normalize(),r}function s(e,t){var n,i,s;for(n in t)if(t.hasOwnProperty(n)){wysihtml5.lang.object(t[n]).isFunction()?i=t[n]:"string"==typeof t[n]&&S[t[n]]&&(i=S[t[n]]),s=e.querySelectorAll(n);for(var o=s.length;o--;)i(s[o])}}function o(e,t){var n,i,s,o=b.tags,a=e.nodeName.toLowerCase(),c=e.scopeName;if(e._wysihtml5)return null;if(e._wysihtml5=1,"wysihtml5-temp"===e.className)return null;if(c&&"HTML"!=c&&(a=c+":"+a),"outerHTML"in e&&(wysihtml5.browser.autoClosesUnclosedTags()||"P"!==e.nodeName||"</p>"===e.outerHTML.slice(-4).toLowerCase()||(a="div")),a in o){if(n=o[a],!n||n.remove)return null;if(n.unwrap)return!1;n="string"==typeof n?{rename_tag:n}:n}else{if(!e.firstChild)return null;n={rename_tag:g}}if(n.one_of_type&&!r(e,b,n.one_of_type,t)){if(!n.remove_action)return null;if("unwrap"===n.remove_action)return!1;if("rename"!==n.remove_action)return null;s=n.remove_action_rename_to||g}return i=e.ownerDocument.createElement(s||n.rename_tag||a),d(e,i,n,t),l(e,i,n),e=null,i.normalize&&i.normalize(),i}function r(e,t,n,i){var s,o;if("SPAN"===e.nodeName&&!i&&("_wysihtml5-temp-placeholder"===e.className||"rangySelectionBoundary"===e.className))return!0;for(o in n)if(n.hasOwnProperty(o)&&t.type_definitions&&t.type_definitions[o]&&(s=t.type_definitions[o],a(e,s)))return!0;return!1}function a(e,t){var n,i,s,o,r,a=e.getAttribute("class"),l=e.getAttribute("style");if(t.methods)for(var c in t.methods)if(t.methods.hasOwnProperty(c)&&T[c]&&T[c](e))return!0;if(a&&t.classes){a=a.replace(/^\s+/g,"").replace(/\s+$/g,"").split(v),n=a.length;for(var h=0;h<n;h++)if(t.classes[a[h]])return!0}if(l&&t.styles){l=l.split(";");for(i in t.styles)if(t.styles.hasOwnProperty(i))for(var u=l.length;u--;)if(r=l[u].split(":"),r[0].replace(/\s/g,"").toLowerCase()===i&&(t.styles[i]===!0||1===t.styles[i]||wysihtml5.lang.array(t.styles[i]).contains(r[1].replace(/\s/g,"").toLowerCase())))return!0}if(t.attrs)for(s in t.attrs)if(t.attrs.hasOwnProperty(s)&&(o=wysihtml5.dom.getAttribute(e,s),"string"==typeof o&&o.search(t.attrs[s])>-1))return!0;return!1}function l(e,t,n){var i,s;if(n&&n.keep_styles)for(i in n.keep_styles)if(n.keep_styles.hasOwnProperty(i)){if(s="float"===i?e.style.styleFloat||e.style.cssFloat:e.style[i],n.keep_styles[i]instanceof RegExp&&!n.keep_styles[i].test(s))continue;"float"===i?t.style[e.style.styleFloat?"styleFloat":"cssFloat"]=s:e.style[i]&&(t.style[i]=s)}}function c(e,t){var n=[];for(var i in t)t.hasOwnProperty(i)&&0===i.indexOf(e)&&n.push(i);return n}function h(e,t,n,i){var s,o=_[n];return!(!o||!(t||"alt"===e&&"IMG"==i)||(s=o(t),"string"!=typeof s))&&s}function u(e,t){var n,i,s,o=wysihtml5.lang.object(b.attributes||{}).clone(),r=wysihtml5.lang.object(o).merge(wysihtml5.lang.object(t||{}).clone()).get(),a={},l=wysihtml5.dom.getAttributes(e);for(n in r)if(/\*$/.test(n)){s=c(n.slice(0,-1),l);for(var u=0,d=s.length;u<d;u++)i=h(s[u],l[s[u]],r[n],e.nodeName),i!==!1&&(a[s[u]]=i)}else i=h(n,l[n],r[n],e.nodeName),i!==!1&&(a[n]=i);return a}function d(e,t,n,i){var s,o,r,a,l,c={},h=n.set_class,d=n.add_class,f=n.add_style,p=n.set_attributes,m=b.classes,g=0,y=[],w=[],_=[],T=[];if(p&&(c=wysihtml5.lang.object(p).clone()),c=wysihtml5.lang.object(c).merge(u(e,n.check_attributes)).get(),h&&y.push(h),d)for(a in d)l=x[d[a]],l&&(r=l(wysihtml5.dom.getAttribute(e,a)),"string"==typeof r&&y.push(r));if(f)for(a in f)l=C[f[a]],l&&(newStyle=l(wysihtml5.dom.getAttribute(e,a)),"string"==typeof newStyle&&w.push(newStyle));if("string"==typeof m&&"any"===m&&e.getAttribute("class"))if(b.classes_blacklist){for(T=e.getAttribute("class"),T&&(y=y.concat(T.split(v))),s=y.length;g<s;g++)o=y[g],b.classes_blacklist[o]||_.push(o);_.length&&(c["class"]=wysihtml5.lang.array(_).unique().join(" "))}else c["class"]=e.getAttribute("class");else{for(i||(m["_wysihtml5-temp-placeholder"]=1,m._rangySelectionBoundary=1,m["wysiwyg-tmp-selected-cell"]=1),T=e.getAttribute("class"),T&&(y=y.concat(T.split(v))),s=y.length;g<s;g++)o=y[g],m[o]&&_.push(o);_.length&&(c["class"]=wysihtml5.lang.array(_).unique().join(" "))}c["class"]&&i&&(c["class"]=c["class"].replace("wysiwyg-tmp-selected-cell",""),/^\s*$/g.test(c["class"])&&delete c["class"]),w.length&&(c.style=wysihtml5.lang.array(w).unique().join(" "));for(a in c)try{t.setAttribute(a,c[a])}catch(S){}c.src&&("undefined"!=typeof c.width&&t.setAttribute("width",c.width),"undefined"!=typeof c.height&&t.setAttribute("height",c.height))}function f(e){var t=e.nextSibling;if(!t||t.nodeType!==wysihtml5.TEXT_NODE){var n=e.data.replace(w,"");return e.ownerDocument.createTextNode(n)}t.data=e.data.replace(w,"")+t.data.replace(w,"")}function p(e){if(b.comments)return e.ownerDocument.createComment(e.nodeValue)}var m={1:o,3:f,8:p},g="span",v=/\s+/,y={tags:{},classes:{}},b={},w=/\uFEFF/g,_={url:function(){var e=/^https?:\/\//i;return function(t){return t&&t.match(e)?t.replace(e,function(e){return e.toLowerCase()}):null}}(),src:function(){var e=/^(\/|https?:\/\/)/i;return function(t){return t&&t.match(e)?t.replace(e,function(e){return e.toLowerCase()}):null}}(),href:function(){var e=/^(#|\/|https?:\/\/|mailto:)/i;return function(t){return t&&t.match(e)?t.replace(e,function(e){return e.toLowerCase()}):null}}(),alt:function(){var e=/[^ a-z0-9_\-]/gi;return function(t){return t?t.replace(e,""):""}}(),numbers:function(){var e=/\D/g;return function(t){return t=(t||"").replace(e,""),t||null}}(),any:function(){return function(e){return e}}()},C={align_text:function(){var e={left:"text-align: left;",right:"text-align: right;",center:"text-align: center;"};return function(t){return e[String(t).toLowerCase()]}}()},x={align_img:function(){var e={left:"wysiwyg-float-left",right:"wysiwyg-float-right"};return function(t){return e[String(t).toLowerCase()]}}(),align_text:function(){var e={left:"wysiwyg-text-align-left",right:"wysiwyg-text-align-right",center:"wysiwyg-text-align-center",justify:"wysiwyg-text-align-justify"};return function(t){return e[String(t).toLowerCase()]}}(),clear_br:function(){var e={left:"wysiwyg-clear-left",right:"wysiwyg-clear-right",both:"wysiwyg-clear-both",all:"wysiwyg-clear-both"};return function(t){return e[String(t).toLowerCase()]}}(),size_font:function(){var e={1:"wysiwyg-font-size-xx-small",2:"wysiwyg-font-size-small",3:"wysiwyg-font-size-medium",4:"wysiwyg-font-size-large",5:"wysiwyg-font-size-x-large",6:"wysiwyg-font-size-xx-large",7:"wysiwyg-font-size-xx-large","-":"wysiwyg-font-size-smaller","+":"wysiwyg-font-size-larger"};return function(t){return e[String(t).charAt(0)]}}()},T={has_visible_contet:function(){var e,t=["img","video","picture","br","script","noscript","style","table","iframe","object","embed","audio","svg","input","button","select","textarea","canvas"];return function(n){if(e=(n.innerText||n.textContent).replace(/\s/g,""),e&&e.length>0)return!0;for(var i=t.length;i--;)if(n.querySelector(t[i]))return!0;return!!(n.offsetWidth&&n.offsetWidth>0&&n.offsetHeight&&n.offsetHeight>0)}}()},S={unwrap:function(e){wysihtml5.dom.unwrap(e)},remove:function(e){e.parentNode.removeChild(e)}};return n(e,t)},wysihtml5.dom.removeEmptyTextNodes=function(e){for(var t,n=wysihtml5.lang.array(e.childNodes).get(),i=n.length,s=0;s<i;s++)t=n[s],t.nodeType===wysihtml5.TEXT_NODE&&""===t.data&&t.parentNode.removeChild(t)},wysihtml5.dom.renameElement=function(e,t){for(var n,i=e.ownerDocument.createElement(t);n=e.firstChild;)i.appendChild(n);return wysihtml5.dom.copyAttributes(["align","className"]).from(e).to(i),e.parentNode.replaceChild(i,e),i},wysihtml5.dom.replaceWithChildNodes=function(e){if(e.parentNode){if(!e.firstChild)return void e.parentNode.removeChild(e);for(var t=e.ownerDocument.createDocumentFragment();e.firstChild;)t.appendChild(e.firstChild);e.parentNode.replaceChild(t,e),e=t=null}},function(e){function t(t){return"block"===e.getStyle("display").from(t)}function n(e){return"BR"===e.nodeName}function i(e){var t=e.ownerDocument.createElement("br");e.appendChild(t)}function s(e,s){if(e.nodeName.match(/^(MENU|UL|OL)$/)){var o,r,a,l,c,h,u=e.ownerDocument,d=u.createDocumentFragment(),f=wysihtml5.dom.domNode(e).prev({ignoreBlankTexts:!0});if(s)for(!f||t(f)||n(f)||i(d);h=e.firstElementChild||e.firstChild;){for(r=h.lastChild;o=h.firstChild;)a=o===r,l=a&&!t(o)&&!n(o),d.appendChild(o),l&&i(d);h.parentNode.removeChild(h)}else for(;h=e.firstElementChild||e.firstChild;){if(h.querySelector&&h.querySelector("div, p, ul, ol, menu, blockquote, h1, h2, h3, h4, h5, h6"))for(;o=h.firstChild;)d.appendChild(o);else{for(c=u.createElement("p");o=h.firstChild;)c.appendChild(o);d.appendChild(c)}h.parentNode.removeChild(h)}e.parentNode.replaceChild(d,e)}}e.resolveList=s}(wysihtml5.dom),function(e){var t=document,n=["parent","top","opener","frameElement","frames","localStorage","globalStorage","sessionStorage","indexedDB"],i=["open","close","openDialog","showModalDialog","alert","confirm","prompt","openDatabase","postMessage","XMLHttpRequest","XDomainRequest"],s=["referrer","write","open","close"];e.dom.Sandbox=Base.extend({constructor:function(t,n){this.callback=t||e.EMPTY_FUNCTION,this.config=e.lang.object({}).merge(n).get(),this.editableArea=this._createIframe()},insertInto:function(e){"string"==typeof e&&(e=t.getElementById(e)),e.appendChild(this.editableArea)},getIframe:function(){return this.editableArea},getWindow:function(){this._readyError()},getDocument:function(){this._readyError()},destroy:function(){var e=this.getIframe();e.parentNode.removeChild(e)},_readyError:function(){throw new Error("wysihtml5.Sandbox: Sandbox iframe isn't loaded yet")},_createIframe:function(){var n=this,i=t.createElement("iframe");return i.className="wysihtml5-sandbox",e.dom.setAttributes({security:"restricted",allowtransparency:"true",frameborder:0,width:0,height:0,marginwidth:0,marginheight:0}).on(i),e.browser.throwsMixedContentWarningWhenIframeSrcIsEmpty()&&(i.src="javascript:'<html></html>'"),i.onload=function(){i.onreadystatechange=i.onload=null,n._onLoadIframe(i)},i.onreadystatechange=function(){/loaded|complete/.test(i.readyState)&&(i.onreadystatechange=i.onload=null,n._onLoadIframe(i))},i},_onLoadIframe:function(o){if(e.dom.contains(t.documentElement,o)){var r=this,a=o.contentWindow,l=o.contentWindow.document,c=t.characterSet||t.charset||"utf-8",h=this._getHtml({charset:c,stylesheets:this.config.stylesheets});if(l.open("text/html","replace"),l.write(h),l.close(),this.getWindow=function(){return o.contentWindow},this.getDocument=function(){return o.contentWindow.document},a.onerror=function(e,t,n){throw new Error("wysihtml5.Sandbox: "+e,t,n)},!e.browser.supportsSandboxedIframes()){var u,d;for(u=0,d=n.length;u<d;u++)this._unset(a,n[u]);for(u=0,d=i.length;u<d;u++)this._unset(a,i[u],e.EMPTY_FUNCTION);for(u=0,d=s.length;u<d;u++)this._unset(l,s[u]);this._unset(l,"cookie","",!0)}this.loaded=!0,setTimeout(function(){r.callback(r)},0)}},_getHtml:function(t){var n,i=t.stylesheets,s="",o=0;if(i="string"==typeof i?[i]:i)for(n=i.length;o<n;o++)s+='<link rel="stylesheet" href="'+i[o]+'">';return t.stylesheets=s,e.lang.string('<!DOCTYPE html><html><head><meta charset="#{charset}">#{stylesheets}</head><body></body></html>').interpolate(t)},_unset:function(t,n,i,s){try{t[n]=i}catch(o){}try{t.__defineGetter__(n,function(){return i})}catch(o){}if(s)try{t.__defineSetter__(n,function(){})}catch(o){}if(!e.browser.crashesWhenDefineProperty(n))try{var r={get:function(){return i}};s&&(r.set=function(){}),Object.defineProperty(t,n,r)}catch(o){}}})}(wysihtml5),function(e){var t=document;e.dom.ContentEditableArea=Base.extend({getContentEditable:function(){return this.element},getWindow:function(){return this.element.ownerDocument.defaultView},getDocument:function(){return this.element.ownerDocument},constructor:function(t,n,i){this.callback=t||e.EMPTY_FUNCTION,this.config=e.lang.object({}).merge(n).get(),i?this.element=this._bindElement(i):this.element=this._createElement()},_createElement:function(){var e=t.createElement("div");return e.className="wysihtml5-sandbox",this._loadElement(e),e},_bindElement:function(e){return e.className=e.className&&""!=e.className?e.className+" wysihtml5-sandbox":"wysihtml5-sandbox",this._loadElement(e,!0),e},_loadElement:function(e,t){var n=this;if(!t){var i=this._getHtml();e.innerHTML=i}this.getWindow=function(){return e.ownerDocument.defaultView},this.getDocument=function(){return e.ownerDocument},this.loaded=!0,setTimeout(function(){n.callback(n)},0)},_getHtml:function(e){return""}})}(wysihtml5),function(){var e={className:"class"};wysihtml5.dom.setAttributes=function(t){return{on:function(n){for(var i in t)n.setAttribute(e[i]||i,t[i])}}}}(),wysihtml5.dom.setStyles=function(e){return{on:function(t){var n=t.style;if("string"==typeof e)return void(n.cssText+=";"+e);for(var i in e)"float"===i?(n.cssFloat=e[i],n.styleFloat=e[i]):n[i]=e[i]}}},function(e){e.simulatePlaceholder=function(t,n,i){var s="placeholder",o=function(){var t=n.element.offsetWidth>0&&n.element.offsetHeight>0;n.hasPlaceholderSet()&&(n.clear(),n.element.focus(),t&&setTimeout(function(){var e=n.selection.getSelection();e.focusNode&&e.anchorNode||n.selection.selectNode(n.element.firstChild||n.element)},0)),n.placeholderSet=!1,e.removeClass(n.element,s)},r=function(){n.isEmpty()&&(n.placeholderSet=!0,n.setValue(i),e.addClass(n.element,s))};t.on("set_placeholder",r).on("unset_placeholder",o).on("focus:composer",o).on("paste:composer",o).on("blur:composer",r),r()}}(wysihtml5.dom),function(e){var t=document.documentElement;"textContent"in t?(e.setTextContent=function(e,t){e.textContent=t},e.getTextContent=function(e){return e.textContent}):"innerText"in t?(e.setTextContent=function(e,t){e.innerText=t},e.getTextContent=function(e){return e.innerText}):(e.setTextContent=function(e,t){e.nodeValue=t},e.getTextContent=function(e){return e.nodeValue})}(wysihtml5.dom),wysihtml5.dom.getAttribute=function(e,t){var n=!wysihtml5.browser.supportsGetAttributeCorrectly();t=t.toLowerCase();var i=e.nodeName;if("IMG"==i&&"src"==t&&wysihtml5.dom.isLoadedImage(e)===!0)return e.src;if(n&&"outerHTML"in e){var s=e.outerHTML.toLowerCase(),o=s.indexOf(" "+t+"=")!=-1;return o?e.getAttribute(t):null}return e.getAttribute(t)},wysihtml5.dom.getAttributes=function(e){var t,n=!wysihtml5.browser.supportsGetAttributeCorrectly(),i=e.nodeName,s=[];for(t in e.attributes)(e.attributes.hasOwnProperty&&e.attributes.hasOwnProperty(t)||!e.attributes.hasOwnProperty&&Object.prototype.hasOwnProperty.call(e.attributes,t))&&e.attributes[t].specified&&("IMG"==i&&"src"==e.attributes[t].name.toLowerCase()&&wysihtml5.dom.isLoadedImage(e)===!0?s.src=e.src:wysihtml5.lang.array(["rowspan","colspan"]).contains(e.attributes[t].name.toLowerCase())&&n?1!==e.attributes[t].value&&(s[e.attributes[t].name]=e.attributes[t].value):s[e.attributes[t].name]=e.attributes[t].value);return s},wysihtml5.dom.isLoadedImage=function(e){try{return e.complete&&!e.mozMatchesSelector(":-moz-broken")}catch(t){if(e.complete&&"complete"===e.readyState)return!0}},function(e){function t(e,t){for(var n,i=[],s=0,o=e.length;s<o;s++)if(n=e[s].querySelectorAll(t))for(var r=n.length;r--;i.unshift(n[r]));return i}function n(e){e.parentNode.removeChild(e)}function i(e,t){e.parentNode.insertBefore(t,e.nextSibling)}function s(e,t){for(var n=e.nextSibling;1!=n.nodeType;)if(n=n.nextSibling,!t||t==n.tagName.toLowerCase())return n;return null}var o=e.dom,r=function(e){this.el=e,this.isColspan=!1,this.isRowspan=!1,this.firstCol=!0,this.lastCol=!0,this.firstRow=!0,this.lastRow=!0,this.isReal=!0,this.spanCollection=[],this.modified=!1},a=function(e,t){e?(this.cell=e,this.table=o.getParentElement(e,{nodeName:["TABLE"]})):t&&(this.table=t,this.cell=this.table.querySelectorAll("th, td")[0])};a.prototype={addSpannedCellToMap:function(e,t,n,i,s,o){for(var a=[],l=n+(o?parseInt(o,10)-1:0),c=i+(s?parseInt(s,10)-1:0),h=n;h<=l;h++){"undefined"==typeof t[h]&&(t[h]=[]);for(var u=i;u<=c;u++)t[h][u]=new r(e),t[h][u].isColspan=s&&parseInt(s,10)>1,t[h][u].isRowspan=o&&parseInt(o,10)>1,t[h][u].firstCol=u==i,t[h][u].lastCol=u==c,t[h][u].firstRow=h==n,t[h][u].lastRow=h==l,t[h][u].isReal=u==i&&h==n,t[h][u].spanCollection=a,a.push(t[h][u])}},setCellAsModified:function(e){if(e.modified=!0,e.spanCollection.length>0)for(var t=0,n=e.spanCollection.length;t<n;t++)e.spanCollection[t].modified=!0},setTableMap:function(){var e,t,n,i,s,a,l,c,h=[],u=this.getTableRows();for(e=0;e<u.length;e++)for(t=u[e],n=this.getRowCells(t),a=0,"undefined"==typeof h[e]&&(h[e]=[]),i=0;i<n.length;i++){for(s=n[i];"undefined"!=typeof h[e][a];)a++;l=o.getAttribute(s,"colspan"),c=o.getAttribute(s,"rowspan"),l||c?(this.addSpannedCellToMap(s,h,e,a,l,c),a+=l?parseInt(l,10):1):(h[e][a]=new r(s),a++)}return this.map=h,h},getRowCells:function(n){var i=this.table.querySelectorAll("table"),s=i?t(i,"th, td"):[],o=n.querySelectorAll("th, td"),r=s.length>0?e.lang.array(o).without(s):o;return r},getTableRows:function(){var n=this.table.querySelectorAll("table"),i=n?t(n,"tr"):[],s=this.table.querySelectorAll("tr"),o=i.length>0?e.lang.array(s).without(i):s;return o},getMapIndex:function(e){for(var t=this.map.length,n=this.map&&this.map[0]?this.map[0].length:0,i=0;i<t;i++)for(var s=0;s<n;s++)if(this.map[i][s].el===e)return{row:i,col:s};return!1},getElementAtIndex:function(e){return this.setTableMap(),this.map[e.row]&&this.map[e.row][e.col]&&this.map[e.row][e.col].el?this.map[e.row][e.col].el:null},getMapElsTo:function(e){var t=[];if(this.setTableMap(),this.idx_start=this.getMapIndex(this.cell),this.idx_end=this.getMapIndex(e),this.idx_start.row>this.idx_end.row||this.idx_start.row==this.idx_end.row&&this.idx_start.col>this.idx_end.col){var n=this.idx_start;this.idx_start=this.idx_end,this.idx_end=n}if(this.idx_start.col>this.idx_end.col){var i=this.idx_start.col;this.idx_start.col=this.idx_end.col,this.idx_end.col=i}if(null!=this.idx_start&&null!=this.idx_end)for(var s=this.idx_start.row,o=this.idx_end.row;s<=o;s++)for(var r=this.idx_start.col,a=this.idx_end.col;r<=a;r++)t.push(this.map[s][r].el);return t},orderSelectionEnds:function(e){if(this.setTableMap(),this.idx_start=this.getMapIndex(this.cell),this.idx_end=this.getMapIndex(e),this.idx_start.row>this.idx_end.row||this.idx_start.row==this.idx_end.row&&this.idx_start.col>this.idx_end.col){var t=this.idx_start;this.idx_start=this.idx_end,this.idx_end=t}if(this.idx_start.col>this.idx_end.col){var n=this.idx_start.col;this.idx_start.col=this.idx_end.col,this.idx_end.col=n}return{start:this.map[this.idx_start.row][this.idx_start.col].el,end:this.map[this.idx_end.row][this.idx_end.col].el}},createCells:function(e,t,n){for(var i,s=this.table.ownerDocument,o=s.createDocumentFragment(),r=0;r<t;r++){if(i=s.createElement(e),n)for(var a in n)n.hasOwnProperty(a)&&i.setAttribute(a,n[a]);i.appendChild(document.createTextNode(" ")),o.appendChild(i)}return o},correctColIndexForUnreals:function(e,t){for(var n=this.map[t],i=-1,s=0;s<e;s++)n[s].isReal&&i++;return i},getLastNewCellOnRow:function(e,t){for(var n,i,s=this.getRowCells(e),o=0,r=s.length;o<r;o++)if(n=s[o],i=this.getMapIndex(n),i===!1||"undefined"!=typeof t&&i.row!=t)return n;return null},removeEmptyTable:function(){var e=this.table.querySelectorAll("td, th");return(!e||0==e.length)&&(n(this.table),!0)},splitRowToCells:function(e){if(e.isColspan){var t=parseInt(o.getAttribute(e.el,"colspan")||1,10),n=e.el.tagName.toLowerCase();if(t>1){var s=this.createCells(n,t-1);i(e.el,s)}e.el.removeAttribute("colspan")}},getRealRowEl:function(e,t){var n=null,i=null;t=t||this.idx;for(var s=0,r=this.map[t.row].length;s<r;s++)if(i=this.map[t.row][s],i.isReal&&(n=o.getParentElement(i.el,{nodeName:["TR"]})))return n;return null===n&&e&&(n=o.getParentElement(this.map[t.row][t.col].el,{nodeName:["TR"]})||null),n},injectRowAt:function(e,t,n,s,r){var a=this.getRealRowEl(!1,{row:e,col:t}),l=this.createCells(s,n);if(a){var c=this.correctColIndexForUnreals(t,e);c>=0?i(this.getRowCells(a)[c],l):a.insertBefore(l,a.firstChild)}else{var h=this.table.ownerDocument.createElement("tr");h.appendChild(l),i(o.getParentElement(r.el,{nodeName:["TR"]}),h)}},canMerge:function(e){if(this.to=e,this.setTableMap(),this.idx_start=this.getMapIndex(this.cell),this.idx_end=this.getMapIndex(this.to),this.idx_start.row>this.idx_end.row||this.idx_start.row==this.idx_end.row&&this.idx_start.col>this.idx_end.col){var t=this.idx_start;this.idx_start=this.idx_end,this.idx_end=t}if(this.idx_start.col>this.idx_end.col){var n=this.idx_start.col;this.idx_start.col=this.idx_end.col,this.idx_end.col=n}for(var i=this.idx_start.row,s=this.idx_end.row;i<=s;i++)for(var o=this.idx_start.col,r=this.idx_end.col;o<=r;o++)if(this.map[i][o].isColspan||this.map[i][o].isRowspan)return!1;return!0},decreaseCellSpan:function(e,t){var n=parseInt(o.getAttribute(e.el,t),10)-1;n>=1?e.el.setAttribute(t,n):(e.el.removeAttribute(t),"colspan"==t&&(e.isColspan=!1),"rowspan"==t&&(e.isRowspan=!1),e.firstCol=!0,e.lastCol=!0,e.firstRow=!0,e.lastRow=!0,e.isReal=!0)},removeSurplusLines:function(){var e,t,i,s,r,a,l;if(this.setTableMap(),this.map){for(i=0,s=this.map.length;i<s;i++){for(e=this.map[i],l=!0,r=0,a=e.length;r<a;r++)if(t=e[r],!(o.getAttribute(t.el,"rowspan")&&parseInt(o.getAttribute(t.el,"rowspan"),10)>1&&t.firstRow!==!0)){l=!1;break}if(l)for(r=0;r<a;r++)this.decreaseCellSpan(e[r],"rowspan")}var c=this.getTableRows();for(i=0,s=c.length;i<s;i++)e=c[i],0==e.childNodes.length&&/^\s*$/.test(e.textContent||e.innerText)&&n(e)}},fillMissingCells:function(){var e=0,t=0,n=null;if(this.setTableMap(),this.map){e=this.map.length;for(var s=0;s<e;s++)this.map[s].length>t&&(t=this.map[s].length);for(var o=0;o<e;o++)for(var a=0;a<t;a++)this.map[o]&&!this.map[o][a]&&a>0&&(this.map[o][a]=new r(this.createCells("td",1)),n=this.map[o][a-1],n&&n.el&&n.el.parent&&i(this.map[o][a-1].el,this.map[o][a].el))}},rectify:function(){return!this.removeEmptyTable()&&(this.removeSurplusLines(),this.fillMissingCells(),!0)},unmerge:function(){if(this.rectify()&&(this.setTableMap(),this.idx=this.getMapIndex(this.cell),this.idx)){var e=this.map[this.idx.row][this.idx.col],t=o.getAttribute(e.el,"colspan")?parseInt(o.getAttribute(e.el,"colspan"),10):1,n=e.el.tagName.toLowerCase();if(e.isRowspan){var i=parseInt(o.getAttribute(e.el,"rowspan"),10);if(i>1)for(var s=1,r=i-1;s<=r;s++)this.injectRowAt(this.idx.row+s,this.idx.col,t,n,e);e.el.removeAttribute("rowspan")}this.splitRowToCells(e)}},merge:function(e){if(this.rectify())if(this.canMerge(e)){for(var t=this.idx_end.row-this.idx_start.row+1,i=this.idx_end.col-this.idx_start.col+1,s=this.idx_start.row,o=this.idx_end.row;s<=o;s++)for(var r=this.idx_start.col,a=this.idx_end.col;r<=a;r++)s==this.idx_start.row&&r==this.idx_start.col?(t>1&&this.map[s][r].el.setAttribute("rowspan",t),i>1&&this.map[s][r].el.setAttribute("colspan",i)):(/^\s*<br\/?>\s*$/.test(this.map[s][r].el.innerHTML.toLowerCase())||(this.map[this.idx_start.row][this.idx_start.col].el.innerHTML+=" "+this.map[s][r].el.innerHTML),n(this.map[s][r].el));this.rectify()}else window.console&&console.log("Do not know how to merge allready merged cells.")},collapseCellToNextRow:function(e){var t=this.getMapIndex(e.el),n=t.row+1,s={row:n,col:t.col};if(n<this.map.length){var r=this.getRealRowEl(!1,s);if(null!==r){var a=this.correctColIndexForUnreals(s.col,s.row);if(a>=0)i(this.getRowCells(r)[a],e.el);else{var l=this.getLastNewCellOnRow(r,n);null!==l?i(l,e.el):r.insertBefore(e.el,r.firstChild)}parseInt(o.getAttribute(e.el,"rowspan"),10)>2?e.el.setAttribute("rowspan",parseInt(o.getAttribute(e.el,"rowspan"),10)-1):e.el.removeAttribute("rowspan")}}},removeRowCell:function(e){e.isReal?e.isRowspan?this.collapseCellToNextRow(e):n(e.el):parseInt(o.getAttribute(e.el,"rowspan"),10)>2?e.el.setAttribute("rowspan",parseInt(o.getAttribute(e.el,"rowspan"),10)-1):e.el.removeAttribute("rowspan")},getRowElementsByCell:function(){var e=[];if(this.setTableMap(),this.idx=this.getMapIndex(this.cell),this.idx!==!1)for(var t=this.map[this.idx.row],n=0,i=t.length;n<i;n++)t[n].isReal&&e.push(t[n].el);return e},getColumnElementsByCell:function(){var e=[];if(this.setTableMap(),this.idx=this.getMapIndex(this.cell),this.idx!==!1)for(var t=0,n=this.map.length;t<n;t++)this.map[t][this.idx.col]&&this.map[t][this.idx.col].isReal&&e.push(this.map[t][this.idx.col].el);return e},removeRow:function(){var e=o.getParentElement(this.cell,{nodeName:["TR"]});if(e){if(this.setTableMap(),this.idx=this.getMapIndex(this.cell),this.idx!==!1)for(var t=this.map[this.idx.row],i=0,s=t.length;i<s;i++)t[i].modified||(this.setCellAsModified(t[i]),this.removeRowCell(t[i]));n(e)}},removeColCell:function(e){e.isColspan?parseInt(o.getAttribute(e.el,"colspan"),10)>2?e.el.setAttribute("colspan",parseInt(o.getAttribute(e.el,"colspan"),10)-1):e.el.removeAttribute("colspan"):e.isReal&&n(e.el)},removeColumn:function(){if(this.setTableMap(),this.idx=this.getMapIndex(this.cell),this.idx!==!1)for(var e=0,t=this.map.length;e<t;e++)this.map[e][this.idx.col].modified||(this.setCellAsModified(this.map[e][this.idx.col]),this.removeColCell(this.map[e][this.idx.col]))},remove:function(e){if(this.rectify()){switch(e){case"row":this.removeRow();break;case"column":this.removeColumn()}this.rectify()}},addRow:function(e){var t=this.table.ownerDocument;if(this.setTableMap(),this.idx=this.getMapIndex(this.cell),"below"==e&&o.getAttribute(this.cell,"rowspan")&&(this.idx.row=this.idx.row+parseInt(o.getAttribute(this.cell,"rowspan"),10)-1),this.idx!==!1){for(var n=this.map[this.idx.row],s=t.createElement("tr"),r=0,a=n.length;r<a;r++)n[r].modified||(this.setCellAsModified(n[r]),this.addRowCell(n[r],s,e));switch(e){case"below":i(this.getRealRowEl(!0),s);break;case"above":var l=o.getParentElement(this.map[this.idx.row][this.idx.col].el,{nodeName:["TR"]});l&&l.parentNode.insertBefore(s,l)}}},addRowCell:function(e,t,n){var i=e.isColspan?{colspan:o.getAttribute(e.el,"colspan")}:null;e.isReal?"above"!=n&&e.isRowspan?e.el.setAttribute("rowspan",parseInt(o.getAttribute(e.el,"rowspan"),10)+1):t.appendChild(this.createCells("td",1,i)):"above"!=n&&e.isRowspan&&e.lastRow?t.appendChild(this.createCells("td",1,i)):c.isRowspan&&e.el.attr("rowspan",parseInt(o.getAttribute(e.el,"rowspan"),10)+1)},add:function(e){this.rectify()&&("below"!=e&&"above"!=e||this.addRow(e),"before"!=e&&"after"!=e||this.addColumn(e))},addColCell:function(e,t,n){var s,r=e.el.tagName.toLowerCase();
switch(n){case"before":s=!e.isColspan||e.firstCol;break;case"after":s=!e.isColspan||e.lastCol||e.isColspan&&c.el==this.cell}if(s){switch(n){case"before":e.el.parentNode.insertBefore(this.createCells(r,1),e.el);break;case"after":i(e.el,this.createCells(r,1))}e.isRowspan&&this.handleCellAddWithRowspan(e,t+1,n)}else e.el.setAttribute("colspan",parseInt(o.getAttribute(e.el,"colspan"),10)+1)},addColumn:function(e){var t,n;if(this.setTableMap(),this.idx=this.getMapIndex(this.cell),"after"==e&&o.getAttribute(this.cell,"colspan")&&(this.idx.col=this.idx.col+parseInt(o.getAttribute(this.cell,"colspan"),10)-1),this.idx!==!1)for(var i=0,s=this.map.length;i<s;i++)t=this.map[i],t[this.idx.col]&&(n=t[this.idx.col],n.modified||(this.setCellAsModified(n),this.addColCell(n,i,e)))},handleCellAddWithRowspan:function(e,t,n){for(var r,a,l,c=parseInt(o.getAttribute(this.cell,"rowspan"),10)-1,h=o.getParentElement(e.el,{nodeName:["TR"]}),u=e.el.tagName.toLowerCase(),d=this.table.ownerDocument,f=0;f<c;f++)if(r=this.correctColIndexForUnreals(this.idx.col,t+f),h=s(h,"tr"))if(r>0)switch(n){case"before":a=this.getRowCells(h),r>0&&this.map[t+f][this.idx.col].el!=a[r]&&r==a.length-1?i(a[r],this.createCells(u,1)):a[r].parentNode.insertBefore(this.createCells(u,1),a[r]);break;case"after":i(this.getRowCells(h)[r],this.createCells(u,1))}else h.insertBefore(this.createCells(u,1),h.firstChild);else l=d.createElement("tr"),l.appendChild(this.createCells(u,1)),this.table.appendChild(l)}},o.table={getCellsBetween:function(e,t){var n=new a(e);return n.getMapElsTo(t)},addCells:function(e,t){var n=new a(e);n.add(t)},removeCells:function(e,t){var n=new a(e);n.remove(t)},mergeCellsBetween:function(e,t){var n=new a(e);n.merge(t)},unmergeCell:function(e){var t=new a(e);t.unmerge()},orderSelectionEnds:function(e,t){var n=new a(e);return n.orderSelectionEnds(t)},indexOf:function(e){var t=new a(e);return t.setTableMap(),t.getMapIndex(e)},findCell:function(e,t){var n=new a(null,e);return n.getElementAtIndex(t)},findRowByCell:function(e){var t=new a(e);return t.getRowElementsByCell()},findColumnByCell:function(e){var t=new a(e);return t.getColumnElementsByCell()},canMerge:function(e,t){var n=new a(e);return n.canMerge(t)}}}(wysihtml5),wysihtml5.dom.query=function(e,t){var n,i=[];e.nodeType&&(e=[e]);for(var s=0,o=e.length;s<o;s++)if(n=e[s].querySelectorAll(t))for(var r=n.length;r--;i.unshift(n[r]));return i},wysihtml5.dom.compareDocumentPosition=function(){var e=document.documentElement;return e.compareDocumentPosition?function(e,t){return e.compareDocumentPosition(t)}:function(e,t){var n,i;if(n=9===e.nodeType?e:e.ownerDocument,i=9===t.nodeType?t:t.ownerDocument,e===t)return 0;if(e===t.ownerDocument)return 20;if(e.ownerDocument===t)return 10;if(n!==i)return 1;if(2===e.nodeType&&e.childNodes&&wysihtml5.lang.array(e.childNodes).indexOf(t)!==-1)return 20;if(2===t.nodeType&&t.childNodes&&wysihtml5.lang.array(t.childNodes).indexOf(e)!==-1)return 10;for(var s=e,o=[],r=null;s;){if(s==t)return 10;o.push(s),s=s.parentNode}for(s=t,r=null;s;){if(s==e)return 20;var a=wysihtml5.lang.array(o).indexOf(s);if(a!==-1){var l=o[a],c=wysihtml5.lang.array(l.childNodes).indexOf(o[a-1]),h=wysihtml5.lang.array(l.childNodes).indexOf(r);return c>h?2:4}r=s,s=s.parentNode}return 1}}(),wysihtml5.dom.unwrap=function(e){if(e.parentNode){for(;e.lastChild;)wysihtml5.dom.insert(e.lastChild).after(e);e.parentNode.removeChild(e)}},wysihtml5.dom.getPastedHtml=function(e){var t;return e.clipboardData&&(wysihtml5.lang.array(e.clipboardData.types).contains("text/html")?t=e.clipboardData.getData("text/html"):wysihtml5.lang.array(e.clipboardData.types).contains("text/plain")&&(t=wysihtml5.lang.string(e.clipboardData.getData("text/plain")).escapeHTML(!0,!0))),t},wysihtml5.dom.getPastedHtmlWithDiv=function(e,t){var n=e.selection.getBookmark(),i=e.element.ownerDocument,s=i.createElement("DIV");i.body.appendChild(s),s.style.width="1px",s.style.height="1px",s.style.overflow="hidden",s.setAttribute("contenteditable","true"),s.focus(),setTimeout(function(){e.selection.setBookmark(n),t(s.innerHTML),s.parentNode.removeChild(s)},0)},wysihtml5.quirks.cleanPastedHTML=function(){var e=function(e){var t=wysihtml5.lang.string(e).trim(),n=t.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&");return new RegExp("^((?!^"+n+"$).)*$","i")},t=function(t,n){var i,s,o=wysihtml5.lang.object(t).clone(!0);for(i in o.tags)if(o.tags.hasOwnProperty(i)&&o.tags[i].keep_styles)for(s in o.tags[i].keep_styles)o.tags[i].keep_styles.hasOwnProperty(s)&&n[s]&&(o.tags[i].keep_styles[s]=e(n[s]));return o},n=function(e,t){var n;if(!e)return null;for(var i=0,s=e.length;i<s;i++)if(e[i].condition||(n=e[i].set),e[i].condition&&e[i].condition.test(t))return e[i].set;return n};return function(e,i){var s,o={color:wysihtml5.dom.getStyle("color").from(i.referenceNode),fontSize:wysihtml5.dom.getStyle("font-size").from(i.referenceNode)},r=t(n(i.rules,e)||{},o);return s=wysihtml5.dom.parse(e,{rules:r,cleanUp:!0,context:i.referenceNode.ownerDocument,uneditableClass:i.uneditableClass,clearInternals:!0,unjoinNbsps:!0})}}(),wysihtml5.quirks.ensureProperClearing=function(){var e=function(){var e=this;setTimeout(function(){var t=e.innerHTML.toLowerCase();"<p>&nbsp;</p>"!=t&&"<p>&nbsp;</p><p>&nbsp;</p>"!=t||(e.innerHTML="")},0)};return function(t){wysihtml5.dom.observe(t.element,["cut","keydown"],e)}}(),function(e){var t="%7E";e.quirks.getCorrectInnerHTML=function(n){var i=n.innerHTML;if(i.indexOf(t)===-1)return i;var s,o,r,a,l=n.querySelectorAll("[href*='~'], [src*='~']");for(a=0,r=l.length;a<r;a++)s=l[a].href||l[a].src,o=e.lang.string(s).replace("~").by(t),i=e.lang.string(i).replace(o).by(s);return i}}(wysihtml5),function(e){var t="wysihtml5-quirks-redraw";e.quirks.redraw=function(n){e.dom.addClass(n,t),e.dom.removeClass(n,t);try{var i=n.ownerDocument;i.execCommand("italic",!1,null),i.execCommand("italic",!1,null)}catch(s){}}}(wysihtml5),wysihtml5.quirks.tableCellsSelection=function(e,t){function n(){return h.observe(e,"mousedown",function(e){var t=wysihtml5.dom.getParentElement(e.target,{nodeName:["TD","TH"]});t&&i(t)}),u}function i(n){u.start=n,u.end=n,u.cells=[n],u.table=h.getParentElement(u.start,{nodeName:["TABLE"]}),u.table&&(s(),h.addClass(n,d),f=h.observe(e,"mousemove",r),p=h.observe(e,"mouseup",a),t.fire("tableselectstart").fire("tableselectstart:composer"))}function s(){if(e){var t=e.querySelectorAll("."+d);if(t.length>0)for(var n=0;n<t.length;n++)h.removeClass(t[n],d)}}function o(e){for(var t=0;t<e.length;t++)h.addClass(e[t],d)}function r(e){var n,i=null,r=h.getParentElement(e.target,{nodeName:["TD","TH"]});r&&u.table&&u.start&&(i=h.getParentElement(r,{nodeName:["TABLE"]}),i&&i===u.table&&(s(),n=u.end,u.end=r,u.cells=h.table.getCellsBetween(u.start,r),u.cells.length>1&&t.composer.selection.deselect(),o(u.cells),u.end!==n&&t.fire("tableselectchange").fire("tableselectchange:composer")))}function a(e){f.stop(),p.stop(),t.fire("tableselect").fire("tableselect:composer"),setTimeout(function(){l()},0)}function l(){var n=h.observe(e.ownerDocument,"click",function(e){n.stop(),h.getParentElement(e.target,{nodeName:["TABLE"]})!=u.table&&(s(),u.table=null,u.start=null,u.end=null,t.fire("tableunselect").fire("tableunselect:composer"))})}function c(e,n){u.start=e,u.end=n,u.table=h.getParentElement(u.start,{nodeName:["TABLE"]}),selectedCells=h.table.getCellsBetween(u.start,u.end),o(selectedCells),l(),t.fire("tableselect").fire("tableselect:composer")}var h=wysihtml5.dom,u={table:null,start:null,end:null,cells:null,select:c},d="wysiwyg-tmp-selected-cell",f=null,p=null;return n()},function(e){var t=/^rgba\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*([\d\.]+)\s*\)/i,n=/^rgb\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*\)/i,i=/^#([0-9a-f][0-9a-f])([0-9a-f][0-9a-f])([0-9a-f][0-9a-f])/i,s=/^#([0-9a-f])([0-9a-f])([0-9a-f])/i,o=function(e){return new RegExp("(^|\\s|;)"+e+"\\s*:\\s*[^;$]+","gi")};e.quirks.styleParser={parseColor:function(r,a){var l,c,h=o(a),u=r.match(h),d=10;if(u){for(var f=u.length;f--;)u[f]=e.lang.string(u[f].split(":")[1]).trim();if(l=u[u.length-1],t.test(l))c=l.match(t);else if(n.test(l))c=l.match(n);else if(i.test(l))c=l.match(i),d=16;else if(s.test(l))return c=l.match(s),c.shift(),c.push(1),e.lang.array(c).map(function(e,t){return t<3?16*parseInt(e,16)+parseInt(e,16):parseFloat(e)});if(c)return c.shift(),c[3]||c.push(1),e.lang.array(c).map(function(e,t){return t<3?parseInt(e,d):parseFloat(e)})}return!1},unparseColor:function(e,t){if(t){if("hex"==t)return e[0].toString(16).toUpperCase()+e[1].toString(16).toUpperCase()+e[2].toString(16).toUpperCase();if("hash"==t)return"#"+e[0].toString(16).toUpperCase()+e[1].toString(16).toUpperCase()+e[2].toString(16).toUpperCase();if("rgb"==t)return"rgb("+e[0]+","+e[1]+","+e[2]+")";if("rgba"==t)return"rgba("+e[0]+","+e[1]+","+e[2]+","+e[3]+")";if("csv"==t)return e[0]+","+e[1]+","+e[2]+","+e[3]}return e[3]&&1!==e[3]?"rgba("+e[0]+","+e[1]+","+e[2]+","+e[3]+")":"rgb("+e[0]+","+e[1]+","+e[2]+")"},parseFontSize:function(t){var n=t.match(o("font-size"));return!!n&&e.lang.string(n[n.length-1].split(":")[1]).trim()}}}(wysihtml5),function(e){function t(e){var t=0;if(e.parentNode)do t+=e.offsetTop||0,e=e.offsetParent;while(e);return t}function n(e,t){for(var n=0;t!==e;)if(n++,t=t.parentNode,!t)throw new Error("not a descendant of ancestor!");return n}function i(e){if(!e.canSurroundContents())for(var t=e.commonAncestorContainer,i=n(t,e.startContainer),s=n(t,e.endContainer);!e.canSurroundContents();)i>s?(e.setStartBefore(e.startContainer),i=n(t,e.startContainer)):(e.setEndAfter(e.endContainer),s=n(t,e.endContainer))}var s=e.dom;e.Selection=Base.extend({constructor:function(e,t,n){window.rangy.init(),this.editor=e,this.composer=e.composer,this.doc=this.composer.doc,this.contain=t,this.unselectableClass=n||!1},getBookmark:function(){var e=this.getRange();return e&&i(e),e&&e.cloneRange()},setBookmark:function(e){e&&this.setSelection(e)},setBefore:function(e){var t=rangy.createRange(this.doc);return t.setStartBefore(e),t.setEndBefore(e),this.setSelection(t)},setAfter:function(e){var t=rangy.createRange(this.doc);return t.setStartAfter(e),t.setEndAfter(e),this.setSelection(t)},selectNode:function(t,n){var i=rangy.createRange(this.doc),o=t.nodeType===e.ELEMENT_NODE,r="canHaveHTML"in t?t.canHaveHTML:"IMG"!==t.nodeName,a=o?t.innerHTML:t.data,l=""===a||a===e.INVISIBLE_SPACE,c=s.getStyle("display").from(t),h="block"===c||"list-item"===c;if(l&&o&&r&&!n)try{t.innerHTML=e.INVISIBLE_SPACE}catch(u){}r?i.selectNodeContents(t):i.selectNode(t),r&&l&&o?i.collapse(h):r&&l&&(i.setStartAfter(t),i.setEndAfter(t)),this.setSelection(i)},getSelectedNode:function(e){var t,n;return e&&this.doc.selection&&"Control"===this.doc.selection.type&&(n=this.doc.selection.createRange(),n&&n.length)?n.item(0):(t=this.getSelection(this.doc),t.focusNode===t.anchorNode?t.focusNode:(n=this.getRange(this.doc),n?n.commonAncestorContainer:this.doc.body))},fixSelBorders:function(){var e=this.getRange();i(e),this.setSelection(e)},getSelectedOwnNodes:function(e){for(var t=this.getOwnRanges(),n=[],i=0,s=t.length;i<s;i++)n.push(t[i].commonAncestorContainer||this.doc.body);return n},findNodesInSelection:function(t){for(var n,i=this.getOwnRanges(),s=[],o=0,r=i.length;o<r;o++)n=i[o].getNodes([1],function(n){return e.lang.array(t).contains(n.nodeName)}),s=s.concat(n);return s},containsUneditable:function(){for(var e=this.getOwnUneditables(),t=this.getSelection(),n=0,i=e.length;n<i;n++)if(t.containsNode(e[n]))return!0;return!1},deleteContents:function(){for(var e=this.getOwnRanges(),t=e.length;t--;)e[t].deleteContents();this.setSelection(e[0])},getPreviousNode:function(t,n){if(!t){var i=this.getSelection();t=i.anchorNode}if(t===this.contain)return!1;var s,o=t.previousSibling;return o!==this.contain&&(o&&3!==o.nodeType&&1!==o.nodeType?o=this.getPreviousNode(o,n):o&&3===o.nodeType&&/^\s*$/.test(o.textContent)?o=this.getPreviousNode(o,n):n&&o&&1===o.nodeType&&!e.lang.array(["BR","HR","IMG"]).contains(o.nodeName)&&/^[\s]*$/.test(o.innerHTML)?o=this.getPreviousNode(o,n):o||t===this.contain||(s=t.parentNode,s!==this.contain&&(o=this.getPreviousNode(s,n))),o!==this.contain&&o)},getSelectionParentsByTag:function(t){for(var n,i=this.getSelectedOwnNodes(),s=[],o=0,r=i.length;o<r;o++)n=i[o].nodeName&&"LI"===i[o].nodeName?i[o]:e.dom.getParentElement(i[o],{nodeName:["LI"]},!1,this.contain),n&&s.push(n);return s.length?s:null},getRangeToNodeEnd:function(){if(this.isCollapsed()){var e=this.getRange(),t=e.startContainer,n=e.startOffset,i=rangy.createRange(this.doc);return i.selectNodeContents(t),i.setStart(t,n),i}},caretIsLastInSelection:function(){var e=(rangy.createRange(this.doc),this.getSelection(),this.getRangeToNodeEnd().cloneContents()),t=e.textContent;return/^\s*$/.test(t)},caretIsFirstInSelection:function(){var t=rangy.createRange(this.doc),n=this.getSelection(),i=this.getRange(),s=i.startContainer;return s.nodeType===e.TEXT_NODE?this.isCollapsed()&&s.nodeType===e.TEXT_NODE&&/^\s*$/.test(s.data.substr(0,i.startOffset)):(t.selectNodeContents(this.getRange().commonAncestorContainer),t.collapse(!0),this.isCollapsed()&&(t.startContainer===n.anchorNode||t.endContainer===n.anchorNode)&&t.startOffset===n.anchorOffset)},caretIsInTheBeginnig:function(t){var n=this.getSelection(),i=n.anchorNode,s=n.anchorOffset;return t?0===s&&(i.nodeName&&i.nodeName===t.toUpperCase()||e.dom.getParentElement(i.parentNode,{nodeName:t},1)):0===s&&!this.getPreviousNode(i,!0)},caretIsBeforeUneditable:function(){var e=this.getSelection(),t=e.anchorNode,n=e.anchorOffset;if(0===n){var i=this.getPreviousNode(t,!0);if(i)for(var s=this.getOwnUneditables(),o=0,r=s.length;o<r;o++)if(i===s[o])return s[o]}return!1},executeAndRestoreRangy:function(e,t){var n=this.doc.defaultView||this.doc.parentWindow,i=rangy.saveSelection(n);if(i)try{e()}catch(s){setTimeout(function(){throw s},0)}else e();rangy.restoreSelection(i)},executeAndRestore:function(t,n){var i,o,r,a,l,c,h,u,d=this.doc.body,f=n&&d.scrollTop,p=n&&d.scrollLeft,m="_wysihtml5-temp-placeholder",g='<span class="'+m+'">'+e.INVISIBLE_SPACE+"</span>",v=this.getRange(!0);if(!v)return void t(d,d);v.collapsed||(h=v.cloneRange(),c=h.createContextualFragment(g),h.collapse(!1),h.insertNode(c),h.detach()),l=v.createContextualFragment(g),v.insertNode(l),c&&(i=this.contain.querySelectorAll("."+m),v.setStartBefore(i[0]),v.setEndAfter(i[i.length-1])),this.setSelection(v);try{t(v.startContainer,v.endContainer)}catch(y){setTimeout(function(){throw y},0)}if(i=this.contain.querySelectorAll("."+m),i&&i.length){u=rangy.createRange(this.doc),r=i[0].nextSibling,i.length>1&&(a=i[i.length-1].previousSibling),a&&r?(u.setStartBefore(r),u.setEndAfter(a)):(o=this.doc.createTextNode(e.INVISIBLE_SPACE),s.insert(o).after(i[0]),u.setStartBefore(o),u.setEndAfter(o)),this.setSelection(u);for(var b=i.length;b--;)i[b].parentNode.removeChild(i[b])}else this.contain.focus();n&&(d.scrollTop=f,d.scrollLeft=p);try{i.parentNode.removeChild(i)}catch(w){}},set:function(e,t){var n=rangy.createRange(this.doc);n.setStart(e,t||0),this.setSelection(n)},insertHTML:function(e){var t,n=(rangy.createRange(this.doc),this.doc.createElement("DIV")),i=this.doc.createDocumentFragment();for(n.innerHTML=e,t=n.lastChild;n.firstChild;)i.appendChild(n.firstChild);this.insertNode(i),t&&this.setAfter(t)},insertNode:function(e){var t=this.getRange();t&&t.insertNode(e)},surround:function(e){var t,n=this.getOwnRanges(),i=[];if(0==n.length)return i;for(var s=n.length;s--;){t=this.doc.createElement(e.nodeName),i.push(t),e.className&&(t.className=e.className),e.cssStyle&&t.setAttribute("style",e.cssStyle);try{n[s].surroundContents(t),this.selectNode(t)}catch(o){t.appendChild(n[s].extractContents()),n[s].insertNode(t)}}return i},deblockAndSurround:function(t){var n,i,s,o=this.doc.createElement("div"),r=rangy.createRange(this.doc);if(o.className=t.className,this.composer.commands.exec("formatBlock",t.nodeName,t.className),n=this.contain.querySelectorAll("."+t.className),n[0])for(n[0].parentNode.insertBefore(o,n[0]),r.setStartBefore(n[0]),r.setEndAfter(n[n.length-1]),i=r.extractContents();i.firstChild;)if(s=i.firstChild,1==s.nodeType&&e.dom.hasClass(s,t.className)){for(;s.firstChild;)o.appendChild(s.firstChild);"BR"!==s.nodeName&&o.appendChild(this.doc.createElement("br")),i.removeChild(s)}else o.appendChild(s);else o=null;return o},scrollIntoView:function(){var n,i=this.doc,s=5,o=i.documentElement.scrollHeight>i.documentElement.offsetHeight,r=i._wysihtml5ScrollIntoViewElement=i._wysihtml5ScrollIntoViewElement||function(){var t=i.createElement("span");return t.innerHTML=e.INVISIBLE_SPACE,t}();o&&(this.insertNode(r),n=t(r),r.parentNode.removeChild(r),n>=i.body.scrollTop+i.documentElement.offsetHeight-s&&(i.body.scrollTop=n))},selectLine:function(){e.browser.supportsSelectionModify()?this._selectLine_W3C():this.doc.selection&&this._selectLine_MSIE()},_selectLine_W3C:function(){var e=this.doc.defaultView,t=e.getSelection();t.modify("move","left","lineboundary"),t.modify("extend","right","lineboundary")},_selectLine_MSIE:function(){var e,t,n,i,s,o=this.doc.selection.createRange(),r=o.boundingTop,a=this.doc.body.scrollWidth;if(o.moveToPoint){for(0===r&&(n=this.doc.createElement("span"),this.insertNode(n),r=n.offsetTop,n.parentNode.removeChild(n)),r+=1,i=-10;i<a;i+=2)try{o.moveToPoint(i,r);break}catch(l){}for(e=r,t=this.doc.selection.createRange(),s=a;s>=0;s--)try{t.moveToPoint(s,e);break}catch(c){}o.setEndPoint("EndToEnd",t),o.select()}},getText:function(){var e=this.getSelection();return e?e.toString():""},getNodes:function(e,t){var n=this.getRange();return n?n.getNodes([e],t):[]},fixRangeOverflow:function(e){if(this.contain&&this.contain.firstChild&&e){var t=e.compareNode(this.contain);if(2!==t)1===t&&e.setStartBefore(this.contain.firstChild),0===t&&e.setEndAfter(this.contain.lastChild),3===t&&(e.setStartBefore(this.contain.firstChild),e.setEndAfter(this.contain.lastChild));else if(this._detectInlineRangeProblems(e)){var n=e.endContainer.previousElementSibling;n&&e.setEnd(n,this._endOffsetForNode(n))}}},_endOffsetForNode:function(e){var t=document.createRange();return t.selectNodeContents(e),t.endOffset},_detectInlineRangeProblems:function(e){var t=s.compareDocumentPosition(e.startContainer,e.endContainer);return 0==e.endOffset&&4&t},getRange:function(e){var t=this.getSelection(),n=t&&t.rangeCount&&t.getRangeAt(0);return e!==!0&&this.fixRangeOverflow(n),n},getOwnUneditables:function(){var t=s.query(this.contain,"."+this.unselectableClass),n=s.query(t,"."+this.unselectableClass);return e.lang.array(t).without(n)},getOwnRanges:function(){var e,t=[],n=this.getRange();if(n&&t.push(n),this.unselectableClass&&this.contain&&n){var i,s=this.getOwnUneditables();if(s.length>0)for(var o=0,r=s.length;o<r;o++){e=[];for(var a=0,l=t.length;a<l;a++){if(t[a])switch(t[a].compareNode(s[o])){case 2:break;case 3:i=t[a].cloneRange(),i.setEndBefore(s[o]),e.push(i),i=t[a].cloneRange(),i.setStartAfter(s[o]),e.push(i);break;default:e.push(t[a])}t=e}}}return t},getSelection:function(){return rangy.getSelection(this.doc.defaultView||this.doc.parentWindow)},setSelection:function(e){var t=this.doc.defaultView||this.doc.parentWindow,n=rangy.getSelection(t);return n.setSingleRange(e)},createRange:function(){return rangy.createRange(this.doc)},isCollapsed:function(){return this.getSelection().isCollapsed},getHtml:function(){return this.getSelection().toHtml()},isEndToEndInNode:function(t){var n=this.getRange(),i=n.commonAncestorContainer,s=n.startContainer,o=n.endContainer;if(i.nodeType===e.TEXT_NODE&&(i=i.parentNode),s.nodeType===e.TEXT_NODE&&!/^\s*$/.test(s.data.substr(n.startOffset)))return!1;if(o.nodeType===e.TEXT_NODE&&!/^\s*$/.test(o.data.substr(n.endOffset)))return!1;for(;s&&s!==i;){if(s.nodeType!==e.TEXT_NODE&&!e.dom.contains(i,s))return!1;if(e.dom.domNode(s).prev({ignoreBlankTexts:!0}))return!1;s=s.parentNode}for(;o&&o!==i;){if(o.nodeType!==e.TEXT_NODE&&!e.dom.contains(i,o))return!1;if(e.dom.domNode(o).next({ignoreBlankTexts:!0}))return!1;o=o.parentNode}return!!e.lang.array(t).contains(i.nodeName)&&i},deselect:function(){var e=this.getSelection();e&&e.removeAllRanges()}})}(wysihtml5),function(e,t){function n(e,t,n){if(!e.className)return!1;var i=e.className.match(n)||[];return i[i.length-1]===t}function i(e,t){if(!e.getAttribute||!e.getAttribute("style"))return!1;e.getAttribute("style").match(t);return!!e.getAttribute("style").match(t)}function s(e,t,n){e.getAttribute("style")?(a(e,n),e.getAttribute("style")&&!/^\s*$/.test(e.getAttribute("style"))?e.setAttribute("style",t+";"+e.getAttribute("style")):e.setAttribute("style",t)):e.setAttribute("style",t)}function o(e,t,n){e.className?(r(e,n),e.className+=" "+t):e.className=t}function r(e,t){e.className&&(e.className=e.className.replace(t,""))}function a(e,t){var n,i=[];if(e.getAttribute("style")){n=e.getAttribute("style").split(";");for(var s=n.length;s--;)n[s].match(t)||/^\s*$/.test(n[s])||i.push(n[s]);i.length?e.setAttribute("style",i.join(";")):e.removeAttribute("style")}}function l(e,t){var n=[],i=t.split(";"),s=e.getAttribute("style");if(s){s=s.replace(/\s/gi,"").toLowerCase(),n.push(new RegExp("(^|\\s|;)"+t.replace(/\s/gi,"").replace(/([\(\)])/gi,"\\$1").toLowerCase().replace(";",";?").replace(/rgb\\\((\d+),(\d+),(\d+)\\\)/gi,"\\s?rgb\\($1,\\s?$2,\\s?$3\\)"),"gi"));for(var o=i.length;o-- >0;)/^\s*$/.test(i[o])||n.push(new RegExp("(^|\\s|;)"+i[o].replace(/\s/gi,"").replace(/([\(\)])/gi,"\\$1").toLowerCase().replace(";",";?").replace(/rgb\\\((\d+),(\d+),(\d+)\\\)/gi,"\\s?rgb\\($1,\\s?$2,\\s?$3\\)"),"gi"));for(var r=0,a=n.length;r<a;r++)if(s.match(n[r]))return n[r]}return!1}function c(n,i,s,o){return s?l(n,s):o?e.dom.hasClass(n,o):t.dom.arrayContains(i,n.tagName.toLowerCase())}function h(e,t,n,i){for(var s=e.length;s--;)if(!c(e[s],t,n,i))return!1;return!!e.length}function u(e,t,n){var i=l(e,t);return i?(a(e,i),"remove"):(s(e,t,n),"change")}function d(e,t){return e.className.replace(w," ")==t.className.replace(w," ")}function f(e){for(var t=e.parentNode;e.firstChild;)t.insertBefore(e.firstChild,e);t.removeChild(e)}function p(e,t){if(e.attributes.length!=t.attributes.length)return!1;for(var n,i,s,o=0,r=e.attributes.length;o<r;++o)if(n=e.attributes[o],s=n.name,"class"!=s){if(i=t.attributes.getNamedItem(s),n.specified!=i.specified)return!1;if(n.specified&&n.nodeValue!==i.nodeValue)return!1}return!0}function m(e,n){return t.dom.isCharacterDataNode(e)?0==n?!!e.previousSibling:n!=e.length||!!e.nextSibling:n>0&&n<e.childNodes.length}function g(e,n,i,s){var o;if(t.dom.isCharacterDataNode(n)&&(0==i?(i=t.dom.getNodeIndex(n),n=n.parentNode):i==n.length?(i=t.dom.getNodeIndex(n)+1,n=n.parentNode):o=t.dom.splitDataNode(n,i)),!(o||s&&n===s)){o=n.cloneNode(!1),o.id&&o.removeAttribute("id");for(var r;r=n.childNodes[i];)o.appendChild(r);t.dom.insertAfter(o,n)}return n==e?o:g(e,o.parentNode,t.dom.getNodeIndex(o),s)}function v(t){this.isElementMerge=t.nodeType==e.ELEMENT_NODE,this.firstTextNode=this.isElementMerge?t.lastChild:t,this.textNodes=[this.firstTextNode]}function y(e,t,n,i,s,o,r){this.tagNames=e||[b],this.cssClass=t||t!==!1&&"",this.similarClassRegExp=n,this.cssStyle=s||"",this.similarStyleRegExp=o,this.normalize=i,this.applyToAnyTagName=!1,this.container=r}var b="span",w=/\s+/g;v.prototype={doMerge:function(){for(var e,t,n,i=[],s=0,o=this.textNodes.length;s<o;++s)e=this.textNodes[s],t=e.parentNode,i[s]=e.data,s&&(t.removeChild(e),t.hasChildNodes()||t.parentNode.removeChild(t));return this.firstTextNode.data=n=i.join(""),n},getLength:function(){for(var e=this.textNodes.length,t=0;e--;)t+=this.textNodes[e].length;return t},toString:function(){for(var e=[],t=0,n=this.textNodes.length;t<n;++t)e[t]="'"+this.textNodes[t].data+"'";return"[Merge("+e.join(",")+")]"}},y.prototype={getAncestorWithClass:function(i){for(var s;i;){if(s=this.cssClass?n(i,this.cssClass,this.similarClassRegExp):""===this.cssStyle,i.nodeType==e.ELEMENT_NODE&&"false"!=i.getAttribute("contenteditable")&&t.dom.arrayContains(this.tagNames,i.tagName.toLowerCase())&&s)return i;i=i.parentNode}return!1},getAncestorWithStyle:function(n){for(var s;n;){if(s=!!this.cssStyle&&i(n,this.similarStyleRegExp),n.nodeType==e.ELEMENT_NODE&&"false"!=n.getAttribute("contenteditable")&&t.dom.arrayContains(this.tagNames,n.tagName.toLowerCase())&&s)return n;n=n.parentNode}return!1},getMatchingAncestor:function(e){var t=this.getAncestorWithClass(e),n=!1;return t?this.cssStyle&&(n="class"):(t=this.getAncestorWithStyle(e),t&&(n="style")),{element:t,type:n}},postApply:function(e,t){for(var n,i,s,o=e[0],r=e[e.length-1],a=[],l=o,c=r,h=0,u=r.length,d=0,f=e.length;d<f;++d)i=e[d],s=null,i&&i.parentNode&&(s=this.getAdjacentMergeableTextNode(i.parentNode,!1)),s?(n||(n=new v(s),a.push(n)),n.textNodes.push(i),i===o&&(l=n.firstTextNode,h=l.length),i===r&&(c=n.firstTextNode,u=n.getLength())):n=null;if(r&&r.parentNode){var p=this.getAdjacentMergeableTextNode(r.parentNode,!0);p&&(n||(n=new v(r),a.push(n)),n.textNodes.push(p))}if(a.length){for(d=0,f=a.length;d<f;++d)a[d].doMerge();t.setStart(l,h),t.setEnd(c,u)}},getAdjacentMergeableTextNode:function(t,n){var i,s=t.nodeType==e.TEXT_NODE,o=s?t.parentNode:t,r=n?"nextSibling":"previousSibling";if(s){if(i=t[r],i&&i.nodeType==e.TEXT_NODE)return i}else if(i=o[r],i&&this.areElementsMergeable(t,i))return i[n?"firstChild":"lastChild"];return null},areElementsMergeable:function(e,n){return t.dom.arrayContains(this.tagNames,(e.tagName||"").toLowerCase())&&t.dom.arrayContains(this.tagNames,(n.tagName||"").toLowerCase())&&d(e,n)&&p(e,n)},createContainer:function(e){var t=e.createElement(this.tagNames[0]);return this.cssClass&&(t.className=this.cssClass),this.cssStyle&&t.setAttribute("style",this.cssStyle),t},applyToTextNode:function(e){var n=e.parentNode;if(1==n.childNodes.length&&t.dom.arrayContains(this.tagNames,n.tagName.toLowerCase()))this.cssClass&&o(n,this.cssClass,this.similarClassRegExp),this.cssStyle&&s(n,this.cssStyle,this.similarStyleRegExp);else{var i=this.createContainer(t.dom.getDocument(e));e.parentNode.insertBefore(i,e),i.appendChild(e)}},isRemovable:function(n){return t.dom.arrayContains(this.tagNames,n.tagName.toLowerCase())&&""===e.lang.string(n.className).trim()&&(!n.getAttribute("style")||""===e.lang.string(n.getAttribute("style")).trim())},undoToTextNode:function(e,t,n,i){var s=!n,o=n||i,a=!1;if(!t.containsNode(o)){var l=t.cloneRange();l.selectNode(o),l.isPointInRange(t.endContainer,t.endOffset)&&m(t.endContainer,t.endOffset)&&(g(o,t.endContainer,t.endOffset,this.container),t.setEndAfter(o)),l.isPointInRange(t.startContainer,t.startOffset)&&m(t.startContainer,t.startOffset)&&(o=g(o,t.startContainer,t.startOffset,this.container))}!s&&this.similarClassRegExp&&r(o,this.similarClassRegExp),s&&this.similarStyleRegExp&&(a="change"===u(o,this.cssStyle,this.similarStyleRegExp)),this.isRemovable(o)&&!a&&f(o)},applyToRange:function(t){for(var n,i=t.length;i--;){if(n=t[i].getNodes([e.TEXT_NODE]),!n.length)try{var s=this.createContainer(t[i].endContainer.ownerDocument);return t[i].surroundContents(s),void this.selectNode(t[i],s)}catch(o){}if(t[i].splitBoundaries(),n=t[i].getNodes([e.TEXT_NODE]),n.length){for(var r,a=0,l=n.length;a<l;++a)r=n[a],this.getMatchingAncestor(r).element||this.applyToTextNode(r);t[i].setStart(n[0],0),r=n[n.length-1],t[i].setEnd(r,r.length),this.normalize&&this.postApply(n,t[i])}}},undoToRange:function(t){for(var n,i,s,o=t.length;o--;){if(n=t[o].getNodes([e.TEXT_NODE]),n.length)t[o].splitBoundaries(),n=t[o].getNodes([e.TEXT_NODE]);else{var r=t[o].endContainer.ownerDocument,a=r.createTextNode(e.INVISIBLE_SPACE);t[o].insertNode(a),t[o].selectNode(a),n=[a]}for(var l=0,c=n.length;l<c;++l)t[o].isValid()&&(i=n[l],s=this.getMatchingAncestor(i),"style"===s.type?this.undoToTextNode(i,t[o],!1,s.element):s.element&&this.undoToTextNode(i,t[o],s.element));1==c?this.selectNode(t[o],n[0]):(t[o].setStart(n[0],0),i=n[n.length-1],t[o].setEnd(i,i.length),this.normalize&&this.postApply(n,t[o]))}},selectNode:function(t,n){var i=n.nodeType===e.ELEMENT_NODE,s=!("canHaveHTML"in n)||n.canHaveHTML,o=i?n.innerHTML:n.data,r=""===o||o===e.INVISIBLE_SPACE;if(r&&i&&s)try{n.innerHTML=e.INVISIBLE_SPACE}catch(a){}t.selectNodeContents(n),r&&i?t.collapse(!1):r&&(t.setStartAfter(n),t.setEndAfter(n))},getTextSelectedByRange:function(e,t){var n=t.cloneRange();n.selectNodeContents(e);var i=n.intersection(t),s=i?i.toString():"";return n.detach(),s},isAppliedToRange:function(t){for(var n,i,s=[],o="full",r=t.length;r--;){if(i=t[r].getNodes([e.TEXT_NODE]),!i.length)return n=this.getMatchingAncestor(t[r].startContainer).element,!!n&&{elements:[n],coverage:o};for(var a,l=0,c=i.length;l<c;++l)a=this.getTextSelectedByRange(i[l],t[r]),n=this.getMatchingAncestor(i[l]).element,n&&""!=a?(s.push(n),1===e.dom.getTextNodes(n,!0).length?o="full":"full"===o&&(o="inline")):n||(o="partial")}return!!s.length&&{elements:s,coverage:o}},toggleRange:function(e){var t,n=this.isAppliedToRange(e);n?"full"===n.coverage?this.undoToRange(e):"inline"===n.coverage?(t=h(n.elements,this.tagNames,this.cssStyle,this.cssClass),this.undoToRange(e),t||this.applyToRange(e)):(h(n.elements,this.tagNames,this.cssStyle,this.cssClass)||this.undoToRange(e),this.applyToRange(e)):this.applyToRange(e)}},e.selection.HTMLApplier=y}(wysihtml5,rangy),wysihtml5.Commands=Base.extend({constructor:function(e){this.editor=e,this.composer=e.composer,this.doc=this.composer.doc},support:function(e){return wysihtml5.browser.supportsCommand(this.doc,e)},exec:function(e,t){var n=wysihtml5.commands[e],i=wysihtml5.lang.array(arguments).get(),s=n&&n.exec,o=null;if(this.editor.fire("beforecommand:composer"),s)i.unshift(this.composer),o=s.apply(n,i);else try{o=this.doc.execCommand(e,!1,t)}catch(r){}return this.editor.fire("aftercommand:composer"),o},state:function(e,t){var n=wysihtml5.commands[e],i=wysihtml5.lang.array(arguments).get(),s=n&&n.state;if(s)return i.unshift(this.composer),s.apply(n,i);try{return this.doc.queryCommandState(e)}catch(o){return!1}},stateValue:function(e){var t=wysihtml5.commands[e],n=wysihtml5.lang.array(arguments).get(),i=t&&t.stateValue;return!!i&&(n.unshift(this.composer),i.apply(t,n))}}),wysihtml5.commands.bold={exec:function(e,t){wysihtml5.commands.formatInline.execWithToggle(e,t,"b")},state:function(e,t){return wysihtml5.commands.formatInline.state(e,t,"b")}},function(e){function t(t,n){var r,a,l,c,h,u,d,f,p,m=t.doc,g="_wysihtml5-temp-"+ +new Date,v=/non-matching-class/g,y=0;for(e.commands.formatInline.exec(t,i,s,g,v,i,i,!0,!0),a=m.querySelectorAll(s+"."+g),r=a.length;y<r;y++){l=a[y],l.removeAttribute("class");for(p in n)"text"!==p&&l.setAttribute(p,n[p])}u=l,1===r&&(d=o.getTextContent(l),c=!!l.querySelector("*"),h=""===d||d===e.INVISIBLE_SPACE,!c&&h&&(o.setTextContent(l,n.text||l.href),f=m.createTextNode(" "),t.selection.setAfter(l),o.insert(f).after(l),u=f)),t.selection.setAfter(u)}function n(e,t,n){for(var i,s=t.length;s--;){i=t[s].attributes;for(var o=i.length;o--;)t[s].removeAttribute(i.item(o).name);for(var r in n)n.hasOwnProperty(r)&&t[s].setAttribute(r,n[r])}}var i,s="A",o=e.dom;e.commands.createLink={exec:function(e,i,s){var o=this.state(e,i);o?e.selection.executeAndRestore(function(){n(e,o,s)}):(s="object"==typeof s?s:{href:s},t(e,s))},state:function(t,n){return e.commands.formatInline.state(t,n,"A")}}}(wysihtml5),function(e){function t(e,t){for(var i,s,o,r=t.length,a=0;a<r;a++)i=t[a],s=n.getParentElement(i,{nodeName:"code"}),o=n.getTextContent(i),o.match(n.autoLink.URL_REG_EXP)&&!s?s=n.renameElement(i,"code"):n.replaceWithChildNodes(i)}var n=e.dom;e.commands.removeLink={exec:function(e,n){var i=this.state(e,n);i&&e.selection.executeAndRestore(function(){t(e,i)})},state:function(t,n){return e.commands.formatInline.state(t,n,"A")}}}(wysihtml5),function(e){var t=/wysiwyg-font-size-[0-9a-z\-]+/g;e.commands.fontSize={exec:function(n,i,s){e.commands.formatInline.execWithToggle(n,i,"span","wysiwyg-font-size-"+s,t)},state:function(n,i,s){return e.commands.formatInline.state(n,i,"span","wysiwyg-font-size-"+s,t)}}}(wysihtml5),function(e){var t=/(\s|^)font-size\s*:\s*[^;\s]+;?/gi;
e.commands.fontSizeStyle={exec:function(n,i,s){s="object"==typeof s?s.size:s,/^\s*$/.test(s)||e.commands.formatInline.execWithToggle(n,i,"span",!1,!1,"font-size:"+s,t)},state:function(n,i,s){return e.commands.formatInline.state(n,i,"span",!1,!1,"font-size",t)},stateValue:function(t,n){var i,s=this.state(t,n);return s&&e.lang.object(s).isArray()&&(s=s[0]),!(!s||!(i=s.getAttribute("style")))&&e.quirks.styleParser.parseFontSize(i)}}}(wysihtml5),function(e){var t=/wysiwyg-color-[0-9a-z]+/g;e.commands.foreColor={exec:function(n,i,s){e.commands.formatInline.execWithToggle(n,i,"span","wysiwyg-color-"+s,t)},state:function(n,i,s){return e.commands.formatInline.state(n,i,"span","wysiwyg-color-"+s,t)}}}(wysihtml5),function(e){var t=/(\s|^)color\s*:\s*[^;\s]+;?/gi;e.commands.foreColorStyle={exec:function(n,i,s){var o,r=e.quirks.styleParser.parseColor("object"==typeof s?"color:"+s.color:"color:"+s,"color");r&&(o="color: rgb("+r[0]+","+r[1]+","+r[2]+");",1!==r[3]&&(o+="color: rgba("+r[0]+","+r[1]+","+r[2]+","+r[3]+");"),e.commands.formatInline.execWithToggle(n,i,"span",!1,!1,o,t))},state:function(n,i){return e.commands.formatInline.state(n,i,"span",!1,!1,"color",t)},stateValue:function(t,n,i){var s,o=this.state(t,n);return o&&e.lang.object(o).isArray()&&(o=o[0]),!!(o&&(s=o.getAttribute("style"),s&&s))&&(val=e.quirks.styleParser.parseColor(s,"color"),e.quirks.styleParser.unparseColor(val,i))}}}(wysihtml5),function(e){var t=/(\s|^)background-color\s*:\s*[^;\s]+;?/gi;e.commands.bgColorStyle={exec:function(n,i,s){var o,r=e.quirks.styleParser.parseColor("object"==typeof s?"background-color:"+s.color:"background-color:"+s,"background-color");r&&(o="background-color: rgb("+r[0]+","+r[1]+","+r[2]+");",1!==r[3]&&(o+="background-color: rgba("+r[0]+","+r[1]+","+r[2]+","+r[3]+");"),e.commands.formatInline.execWithToggle(n,i,"span",!1,!1,o,t))},state:function(n,i){return e.commands.formatInline.state(n,i,"span",!1,!1,"background-color",t)},stateValue:function(t,n,i){var s,o=this.state(t,n),r=!1;return o&&e.lang.object(o).isArray()&&(o=o[0]),!(!o||!(s=o.getAttribute("style")))&&(r=e.quirks.styleParser.parseColor(s,"background-color"),e.quirks.styleParser.unparseColor(r,i))}}}(wysihtml5),function(e){function t(t,n,s){t.className?(i(t,s),t.className=e.lang.string(t.className+" "+n).trim()):t.className=n}function n(t,n,i){s(t,i),t.getAttribute("style")?t.setAttribute("style",e.lang.string(t.getAttribute("style")+" "+n).trim()):t.setAttribute("style",n)}function i(t,n){var i=n.test(t.className);return t.className=t.className.replace(n,""),""==e.lang.string(t.className).trim()&&t.removeAttribute("class"),i}function s(t,n){var i=n.test(t.getAttribute("style"));return t.setAttribute("style",(t.getAttribute("style")||"").replace(n,"")),""==e.lang.string(t.getAttribute("style")||"").trim()&&t.removeAttribute("style"),i}function o(e){var t=e.lastChild;t&&r(t)&&t.parentNode.removeChild(t)}function r(e){return"BR"===e.nodeName}function a(t,n){t.selection.isCollapsed()&&t.selection.selectLine();for(var i=t.selection.surround(n),s=0,r=i.length;s<r;s++)e.dom.lineBreaks(i[s]).remove(),o(i[s])}function l(t){return!!e.lang.string(t.className).trim()}function c(t){return!!e.lang.string(t.getAttribute("style")||"").trim()}var h=e.dom,u=["H1","H2","H3","H4","H5","H6","P","PRE","DIV"];e.commands.formatBlock={exec:function(o,r,d,f,p,m,g){var v,y,b,w,_,C=(o.doc,this.state(o,r,d,f,p,m,g)),x=o.config.useLineBreaks,T=x?"DIV":"P";return d="string"==typeof d?d.toUpperCase():d,C.length?void o.selection.executeAndRestoreRangy(function(){for(var t=C.length;t--;){if(p&&(y=i(C[t],p)),g&&(w=s(C[t],g)),(w||y)&&null===d&&C[t].nodeName!=T)return;var n=l(C[t]),o=c(C[t]);n||o||!x&&"P"!==d?h.renameElement(C[t],"P"===d?"DIV":T):(e.dom.lineBreaks(C[t]).add(),h.replaceWithChildNodes(C[t]))}}):void((null===d||e.lang.array(u).contains(d))&&(v=o.selection.findNodesInSelection(u).concat(o.selection.getSelectedOwnNodes()),o.selection.executeAndRestoreRangy(function(){for(var e=v.length;e--;)_=h.getParentElement(v[e],{nodeName:u}),_==o.element&&(_=null),_&&(d&&(_=h.renameElement(_,d)),f&&t(_,f,p),m&&n(_,m,g),b=!0)}),b)||a(o,{nodeName:d||T,className:f||null,cssStyle:m||null}))},state:function(t,n,i,s,o,r,a){var l,c=t.selection.getSelectedOwnNodes(),u=[];i="string"==typeof i?i.toUpperCase():i;for(var d=0,f=c.length;d<f;d++)l=h.getParentElement(c[d],{nodeName:i,className:s,classRegExp:o,cssStyle:r,styleRegExp:a}),l&&e.lang.array(u).indexOf(l)==-1&&u.push(l);return 0!=u.length&&u}}}(wysihtml5),wysihtml5.commands.formatCode={exec:function(e,t,n){var i,s,o,r=this.state(e);r?e.selection.executeAndRestore(function(){i=r.querySelector("code"),wysihtml5.dom.replaceWithChildNodes(r),i&&wysihtml5.dom.replaceWithChildNodes(i)}):(s=e.selection.getRange(),o=s.extractContents(),r=e.doc.createElement("pre"),i=e.doc.createElement("code"),n&&(i.className=n),r.appendChild(i),i.appendChild(o),s.insertNode(r),e.selection.selectNode(r))},state:function(e){var t=e.selection.getSelectedNode();return t&&t.nodeName&&"PRE"==t.nodeName&&t.firstChild&&t.firstChild.nodeName&&"CODE"==t.firstChild.nodeName?t:wysihtml5.dom.getParentElement(t,{nodeName:"CODE"})&&wysihtml5.dom.getParentElement(t,{nodeName:"PRE"})}},function(e){function t(e){var t=i[e];return t?[e.toLowerCase(),t.toLowerCase()]:[e.toLowerCase()]}function n(n,i,o,r,a,l){var c=n;return i&&(c+=":"+i),r&&(c+=":"+r),s[c]||(s[c]=new e.selection.HTMLApplier(t(n),i,o,(!0),r,a,l)),s[c]}var i={strong:"b",em:"i",b:"strong",i:"em"},s={};e.commands.formatInline={exec:function(e,t,i,s,o,r,a,l,c){var h=e.selection.createRange(),u=e.selection.getOwnRanges();return!(!u||0==u.length)&&(e.selection.getSelection().removeAllRanges(),n(i,s,o,r,a,e.element).toggleRange(u),void(l?c||e.cleanUp():(h.setStart(u[0].startContainer,u[0].startOffset),h.setEnd(u[u.length-1].endContainer,u[u.length-1].endOffset),e.selection.setSelection(h),e.selection.executeAndRestore(function(){c||e.cleanUp()},!0,!0))))},execWithToggle:function(t,n,i,s,o,r,a){var l=this;if(this.state(t,n,i,s,o,r,a)&&t.selection.isCollapsed()&&!t.selection.caretIsLastInSelection()&&!t.selection.caretIsFirstInSelection()){var c=l.state(t,n,i,s,o)[0];t.selection.executeAndRestoreRangy(function(){c.parentNode;t.selection.selectNode(c,!0),e.commands.formatInline.exec(t,n,i,s,o,r,a,!0,!0)})}else this.state(t,n,i,s,o,r,a)&&!t.selection.isCollapsed()?t.selection.executeAndRestoreRangy(function(){e.commands.formatInline.exec(t,n,i,s,o,r,a,!0,!0)}):e.commands.formatInline.exec(t,n,i,s,o,r,a)},state:function(t,s,o,r,a,l,c){var h,u,d=t.doc,f=i[o]||o;return!(!e.dom.hasElementWithTagName(d,o)&&!e.dom.hasElementWithTagName(d,f))&&(!(r&&!e.dom.hasElementWithClassName(d,r))&&(h=t.selection.getOwnRanges(),!(!h||0===h.length)&&(u=n(o,r,a,l,c,t.element).isAppliedToRange(h),!(!u||!u.elements)&&u.elements)))}}}(wysihtml5),function(e){e.commands.insertBlockQuote={exec:function(t,n){var i=this.state(t,n),s=t.selection.isEndToEndInNode(["H1","H2","H3","H4","H5","H6","P"]);t.selection.executeAndRestore(function(){if(i)t.config.useLineBreaks&&e.dom.lineBreaks(i).add(),e.dom.unwrap(i);else if(t.selection.isCollapsed()&&t.selection.selectLine(),s){var n=s.ownerDocument.createElement("blockquote");e.dom.insert(n).after(s),n.appendChild(s)}else t.selection.surround({nodeName:"blockquote"})})},state:function(t,n){var i=t.selection.getSelectedNode(),s=e.dom.getParentElement(i,{nodeName:"BLOCKQUOTE"},!1,t.element);return!!s&&s}}}(wysihtml5),wysihtml5.commands.insertHTML={exec:function(e,t,n){e.commands.support(t)?e.doc.execCommand(t,!1,n):e.selection.insertHTML(n)},state:function(){return!1}},function(e){var t="IMG";e.commands.insertImage={exec:function(n,i,s){s="object"==typeof s?s:{src:s};var o,r,a=n.doc,l=this.state(n);if(l)return n.selection.setBefore(l),r=l.parentNode,r.removeChild(l),e.dom.removeEmptyTextNodes(r),"A"!==r.nodeName||r.firstChild||(n.selection.setAfter(r),r.parentNode.removeChild(r)),void e.quirks.redraw(n.element);l=a.createElement(t);for(var c in s)l.setAttribute("className"===c?"class":c,s[c]);n.selection.insertNode(l),e.browser.hasProblemsSettingCaretAfterImg()?(o=a.createTextNode(e.INVISIBLE_SPACE),n.selection.insertNode(o),n.selection.setAfter(o)):n.selection.setAfter(l)},state:function(n){var i,s,o,r=n.doc;return!!e.dom.hasElementWithTagName(r,t)&&(!!(i=n.selection.getSelectedNode())&&(i.nodeName===t?i:i.nodeType===e.ELEMENT_NODE&&(s=n.selection.getText(),!(s=e.lang.string(s).trim())&&(o=n.selection.getNodes(e.ELEMENT_NODE,function(e){return"IMG"===e.nodeName}),1===o.length&&o[0]))))}}}(wysihtml5),function(e){var t="<br>"+(e.browser.needsSpaceAfterLineBreak()?" ":"");e.commands.insertLineBreak={exec:function(n,i){n.commands.support(i)?(n.doc.execCommand(i,!1,null),e.browser.autoScrollsToCaret()||n.selection.scrollIntoView()):n.commands.exec("insertHTML",t)},state:function(){return!1}}}(wysihtml5),wysihtml5.commands.insertOrderedList={exec:function(e,t){wysihtml5.commands.insertList.exec(e,t,"OL")},state:function(e,t){return wysihtml5.commands.insertList.state(e,t,"OL")}},wysihtml5.commands.insertUnorderedList={exec:function(e,t){wysihtml5.commands.insertList.exec(e,t,"UL")},state:function(e,t){return wysihtml5.commands.insertList.state(e,t,"UL")}},wysihtml5.commands.insertList=function(e){var t=function(e,t){if(e&&e.nodeName){"string"==typeof t&&(t=[t]);for(var n=t.length;n--;)if(e.nodeName===t[n])return!0}return!1},n=function(n,i,s){var o={el:null,other:!1};if(n){var r=e.dom.getParentElement(n,{nodeName:"LI"}),a="UL"===i?"OL":"UL";t(n,i)?o.el=n:t(n,a)?o={el:n,other:!0}:r&&(t(r.parentNode,i)?o.el=r.parentNode:t(r.parentNode,a)&&(o={el:r.parentNode,other:!0}))}return o.el&&!s.element.contains(o.el)&&(o.el=null),o},i=function(t,n,i){var s,r="UL"===n?"OL":"UL";i.selection.executeAndRestore(function(){var a=o(r,i);if(a.length)for(var l=a.length;l--;)e.dom.renameElement(a[l],n.toLowerCase());else{s=o(["OL","UL"],i);for(var c=s.length;c--;)e.dom.resolveList(s[c],i.config.useLineBreaks);e.dom.resolveList(t,i.config.useLineBreaks)}})},s=function(t,n,i){var s="UL"===n?"OL":"UL";i.selection.executeAndRestore(function(){for(var r=[t].concat(o(s,i)),a=r.length;a--;)e.dom.renameElement(r[a],n.toLowerCase())})},o=function(e,n){for(var i=n.selection.getOwnRanges(),s=[],o=i.length;o--;)s=s.concat(i[o].getNodes([1],function(n){return t(n,e)}));return s},r=function(t,n){n.selection.executeAndRestoreRangy(function(){var i,s,o="_wysihtml5-temp-"+(new Date).getTime(),r=n.selection.deblockAndSurround({nodeName:"div",className:o}),a=/\uFEFF/g;r.innerHTML=r.innerHTML.replace(a,""),r&&(i=e.lang.array(["","<br>",e.INVISIBLE_SPACE]).contains(r.innerHTML),s=e.dom.convertToList(r,t.toLowerCase(),n.parent.config.uneditableContainerClassname),i&&n.selection.selectNode(s.querySelector("li"),!0))})};return{exec:function(e,t,o){var a=e.doc,l="OL"===o?"insertOrderedList":"insertUnorderedList",c=e.selection.getSelectedNode(),h=n(c,o,e);h.el?h.other?s(h.el,o,e):i(h.el,o,e):e.commands.support(l)?a.execCommand(l,!1,null):r(o,e)},state:function(e,t,i){var s=e.selection.getSelectedNode(),o=n(s,i,e);return!(!o.el||o.other)&&o.el}}}(wysihtml5),wysihtml5.commands.italic={exec:function(e,t){wysihtml5.commands.formatInline.execWithToggle(e,t,"i")},state:function(e,t){return wysihtml5.commands.formatInline.state(e,t,"i")}},function(e){var t="wysiwyg-text-align-center",n=/wysiwyg-text-align-[0-9a-z]+/g;e.commands.justifyCenter={exec:function(i,s){return e.commands.formatBlock.exec(i,"formatBlock",null,t,n)},state:function(i,s){return e.commands.formatBlock.state(i,"formatBlock",null,t,n)}}}(wysihtml5),function(e){var t="wysiwyg-text-align-left",n=/wysiwyg-text-align-[0-9a-z]+/g;e.commands.justifyLeft={exec:function(i,s){return e.commands.formatBlock.exec(i,"formatBlock",null,t,n)},state:function(i,s){return e.commands.formatBlock.state(i,"formatBlock",null,t,n)}}}(wysihtml5),function(e){var t="wysiwyg-text-align-right",n=/wysiwyg-text-align-[0-9a-z]+/g;e.commands.justifyRight={exec:function(i,s){return e.commands.formatBlock.exec(i,"formatBlock",null,t,n)},state:function(i,s){return e.commands.formatBlock.state(i,"formatBlock",null,t,n)}}}(wysihtml5),function(e){var t="wysiwyg-text-align-justify",n=/wysiwyg-text-align-[0-9a-z]+/g;e.commands.justifyFull={exec:function(i,s){return e.commands.formatBlock.exec(i,"formatBlock",null,t,n)},state:function(i,s){return e.commands.formatBlock.state(i,"formatBlock",null,t,n)}}}(wysihtml5),function(e){var t="text-align: right;",n=/(\s|^)text-align\s*:\s*[^;\s]+;?/gi;e.commands.alignRightStyle={exec:function(i,s){return e.commands.formatBlock.exec(i,"formatBlock",null,null,null,t,n)},state:function(i,s){return e.commands.formatBlock.state(i,"formatBlock",null,null,null,t,n)}}}(wysihtml5),function(e){var t="text-align: left;",n=/(\s|^)text-align\s*:\s*[^;\s]+;?/gi;e.commands.alignLeftStyle={exec:function(i,s){return e.commands.formatBlock.exec(i,"formatBlock",null,null,null,t,n)},state:function(i,s){return e.commands.formatBlock.state(i,"formatBlock",null,null,null,t,n)}}}(wysihtml5),function(e){var t="text-align: center;",n=/(\s|^)text-align\s*:\s*[^;\s]+;?/gi;e.commands.alignCenterStyle={exec:function(i,s){return e.commands.formatBlock.exec(i,"formatBlock",null,null,null,t,n)},state:function(i,s){return e.commands.formatBlock.state(i,"formatBlock",null,null,null,t,n)}}}(wysihtml5),wysihtml5.commands.redo={exec:function(e){return e.undoManager.redo()},state:function(e){return!1}},wysihtml5.commands.underline={exec:function(e,t){wysihtml5.commands.formatInline.execWithToggle(e,t,"u")},state:function(e,t){return wysihtml5.commands.formatInline.state(e,t,"u")}},wysihtml5.commands.undo={exec:function(e){return e.undoManager.undo()},state:function(e){return!1}},wysihtml5.commands.createTable={exec:function(e,t,n){var i,s,o;if(n&&n.cols&&n.rows&&parseInt(n.cols,10)>0&&parseInt(n.rows,10)>0){for(o=n.tableStyle?'<table style="'+n.tableStyle+'">':"<table>",o+="<tbody>",s=0;s<n.rows;s++){for(o+="<tr>",i=0;i<n.cols;i++)o+="<td>&nbsp;</td>";o+="</tr>"}o+="</tbody></table>",e.commands.exec("insertHTML",o)}},state:function(e,t){return!1}},wysihtml5.commands.mergeTableCells={exec:function(e,t){e.tableSelection&&e.tableSelection.start&&e.tableSelection.end&&(this.state(e,t)?wysihtml5.dom.table.unmergeCell(e.tableSelection.start):wysihtml5.dom.table.mergeCellsBetween(e.tableSelection.start,e.tableSelection.end))},state:function(e,t){if(e.tableSelection){var n=e.tableSelection.start,i=e.tableSelection.end;if(n&&i&&n==i&&(wysihtml5.dom.getAttribute(n,"colspan")&&parseInt(wysihtml5.dom.getAttribute(n,"colspan"),10)>1||wysihtml5.dom.getAttribute(n,"rowspan")&&parseInt(wysihtml5.dom.getAttribute(n,"rowspan"),10)>1))return[n]}return!1}},wysihtml5.commands.addTableCells={exec:function(e,t,n){if(e.tableSelection&&e.tableSelection.start&&e.tableSelection.end){var i=wysihtml5.dom.table.orderSelectionEnds(e.tableSelection.start,e.tableSelection.end);"before"==n||"above"==n?wysihtml5.dom.table.addCells(i.start,n):"after"!=n&&"below"!=n||wysihtml5.dom.table.addCells(i.end,n),setTimeout(function(){e.tableSelection.select(i.start,i.end)},0)}},state:function(e,t){return!1}},wysihtml5.commands.deleteTableCells={exec:function(e,t,n){if(e.tableSelection&&e.tableSelection.start&&e.tableSelection.end){var i,s=wysihtml5.dom.table.orderSelectionEnds(e.tableSelection.start,e.tableSelection.end),o=wysihtml5.dom.table.indexOf(s.start),r=e.tableSelection.table;wysihtml5.dom.table.removeCells(s.start,n),setTimeout(function(){i=wysihtml5.dom.table.findCell(r,o),i||("row"==n&&(i=wysihtml5.dom.table.findCell(r,{row:o.row-1,col:o.col})),"column"==n&&(i=wysihtml5.dom.table.findCell(r,{row:o.row,col:o.col-1}))),i&&e.tableSelection.select(i,i)},0)}},state:function(e,t){return!1}},wysihtml5.commands.indentList={exec:function(e,t,n){var i=e.selection.getSelectionParentsByTag("LI");return!!i&&this.tryToPushLiLevel(i,e.selection)},state:function(e,t){return!1},tryToPushLiLevel:function(e,t){var n,i,s,o,r,a=!1;return t.executeAndRestoreRangy(function(){for(var t=e.length;t--;)o=e[t],n="OL"===o.parentNode.nodeName?"OL":"UL",i=o.ownerDocument.createElement(n),s=wysihtml5.dom.domNode(o).prev({nodeTypes:[wysihtml5.ELEMENT_NODE]}),r=s?s.querySelector("ul, ol"):null,s&&(r?r.appendChild(o):(i.appendChild(o),s.appendChild(i)),a=!0)}),a}},wysihtml5.commands.outdentList={exec:function(e,t,n){var i=e.selection.getSelectionParentsByTag("LI");return!!i&&this.tryToPullLiLevel(i,e)},state:function(e,t){return!1},tryToPullLiLevel:function(e,t){var n,i,s,o,r,a=!1,l=this;return t.selection.executeAndRestoreRangy(function(){for(var c=e.length;c--;)if(o=e[c],o.parentNode&&(n=o.parentNode,"OL"===n.tagName||"UL"===n.tagName)){if(a=!0,i=wysihtml5.dom.getParentElement(n.parentNode,{nodeName:["OL","UL"]},!1,t.element),s=wysihtml5.dom.getParentElement(n.parentNode,{nodeName:["LI"]},!1,t.element),i&&s)o.nextSibling&&(r=l.getAfterList(n,o),o.appendChild(r)),i.insertBefore(o,s.nextSibling);else{o.nextSibling&&(r=l.getAfterList(n,o),o.appendChild(r));for(var h=o.childNodes.length;h--;)n.parentNode.insertBefore(o.childNodes[h],n.nextSibling);n.parentNode.insertBefore(document.createElement("br"),n.nextSibling),o.parentNode.removeChild(o)}0===n.childNodes.length&&n.parentNode.removeChild(n)}}),a},getAfterList:function(e,t){for(var n=e.nodeName,i=document.createElement(n);t.nextSibling;)i.appendChild(t.nextSibling);return i}},function(e){var t=90,n=89,i=8,s=46,o=25,r="data-wysihtml5-selection-node",a="data-wysihtml5-selection-offset",l=('<span id="_wysihtml5-undo" class="_wysihtml5-temp">'+e.INVISIBLE_SPACE+"</span>",'<span id="_wysihtml5-redo" class="_wysihtml5-temp">'+e.INVISIBLE_SPACE+"</span>",e.dom);e.UndoManager=e.lang.Dispatcher.extend({constructor:function(e){this.editor=e,this.composer=e.composer,this.element=this.composer.element,this.position=0,this.historyStr=[],this.historyDom=[],this.transact(),this._observe()},_observe:function(){var e,o=this;this.composer.sandbox.getDocument();l.observe(this.element,"keydown",function(e){if(!e.altKey&&(e.ctrlKey||e.metaKey)){var i=e.keyCode,s=i===t&&!e.shiftKey,r=i===t&&e.shiftKey||i===n;s?(o.undo(),e.preventDefault()):r&&(o.redo(),e.preventDefault())}}),l.observe(this.element,"keydown",function(t){var n=t.keyCode;n!==e&&(e=n,n!==i&&n!==s||o.transact())}),this.editor.on("newword:composer",function(){o.transact()}).on("beforecommand:composer",function(){o.transact()})},transact:function(){var t,n,i,s,l,c=this.historyStr[this.position-1],h=this.composer.getValue(!1,!1),u=this.element.offsetWidth>0&&this.element.offsetHeight>0;if(h!==c){var d=this.historyStr.length=this.historyDom.length=this.position;d>o&&(this.historyStr.shift(),this.historyDom.shift(),this.position--),this.position++,u&&(t=this.composer.selection.getRange(),n=t&&t.startContainer?t.startContainer:this.element,i=t&&t.startOffset?t.startOffset:0,n.nodeType===e.ELEMENT_NODE?s=n:(s=n.parentNode,l=this.getChildNodeIndex(s,n)),s.setAttribute(a,i),"undefined"!=typeof l&&s.setAttribute(r,l));var f=this.element.cloneNode(!!h);this.historyDom.push(f),this.historyStr.push(h),s&&(s.removeAttribute(a),s.removeAttribute(r))}},undo:function(){this.transact(),this.undoPossible()&&(this.set(this.historyDom[--this.position-1]),this.editor.fire("undo:composer"))},redo:function(){this.redoPossible()&&(this.set(this.historyDom[++this.position-1]),this.editor.fire("redo:composer"))},undoPossible:function(){return this.position>1},redoPossible:function(){return this.position<this.historyStr.length},set:function(e){this.element.innerHTML="";for(var t=0,n=e.childNodes,i=e.childNodes.length;t<i;t++)this.element.appendChild(n[t].cloneNode(!0));var s,o,l;e.hasAttribute(a)?(s=e.getAttribute(a),l=e.getAttribute(r),o=this.element):(o=this.element.querySelector("["+a+"]")||this.element,s=o.getAttribute(a),l=o.getAttribute(r),o.removeAttribute(a),o.removeAttribute(r)),null!==l&&(o=this.getChildNodeByIndex(o,+l)),this.composer.selection.set(o,s)},getChildNodeIndex:function(e,t){for(var n=0,i=e.childNodes,s=i.length;n<s;n++)if(i[n]===t)return n},getChildNodeByIndex:function(e,t){return e.childNodes[t]}})}(wysihtml5),wysihtml5.views.View=Base.extend({constructor:function(e,t,n){this.parent=e,this.element=t,this.config=n,this.config.noTextarea||this._observeViewChange()},_observeViewChange:function(){var e=this;this.parent.on("beforeload",function(){e.parent.on("change_view",function(t){t===e.name?(e.parent.currentView=e,e.show(),setTimeout(function(){e.focus()},0)):e.hide()})})},focus:function(){if(this.element.ownerDocument.querySelector(":focus")!==this.element)try{this.element.focus()}catch(e){}},hide:function(){this.element.style.display="none"},show:function(){this.element.style.display=""},disable:function(){this.element.setAttribute("disabled","disabled")},enable:function(){this.element.removeAttribute("disabled")}}),function(e){var t=e.dom,n=e.browser;e.views.Composer=e.views.View.extend({name:"composer",CARET_HACK:"<br>",constructor:function(e,t,n){this.base(e,t,n),this.config.noTextarea?this.editableArea=t:this.textarea=this.parent.textarea,this.config.contentEditableMode?this._initContentEditableArea():this._initSandbox()},clear:function(){this.element.innerHTML=n.displaysCaretInEmptyContentEditableCorrectly()?"":this.CARET_HACK},getValue:function(t,n){var i=this.isEmpty()?"":e.quirks.getCorrectInnerHTML(this.element);return t!==!1&&(i=this.parent.parse(i,n!==!1)),i},setValue:function(e,t){t&&(e=this.parent.parse(e));try{this.element.innerHTML=e}catch(n){this.element.innerText=e}},cleanUp:function(){this.parent.parse(this.element)},show:function(){this.editableArea.style.display=this._displayStyle||"",this.config.noTextarea||this.textarea.element.disabled||(this.disable(),this.enable())},hide:function(){this._displayStyle=t.getStyle("display").from(this.editableArea),"none"===this._displayStyle&&(this._displayStyle=null),this.editableArea.style.display="none"},disable:function(){this.parent.fire("disable:composer"),this.element.removeAttribute("contentEditable")},enable:function(){this.parent.fire("enable:composer"),this.element.setAttribute("contentEditable","true")},focus:function(t){e.browser.doesAsyncFocus()&&this.hasPlaceholderSet()&&this.clear(),this.base();var n=this.element.lastChild;t&&n&&this.selection&&("BR"===n.nodeName?this.selection.setBefore(this.element.lastChild):this.selection.setAfter(this.element.lastChild))},getTextContent:function(){return t.getTextContent(this.element)},hasPlaceholderSet:function(){return this.getTextContent()==(this.config.noTextarea?this.editableArea.getAttribute("data-placeholder"):this.textarea.element.getAttribute("placeholder"))&&this.placeholderSet},isEmpty:function(){var e=this.element.innerHTML.toLowerCase();return/^(\s|<br>|<\/br>|<p>|<\/p>)*$/i.test(e)||""===e||"<br>"===e||"<p></p>"===e||"<p><br></p>"===e||this.hasPlaceholderSet()},_initContentEditableArea:function(){var e=this;this.config.noTextarea?this.sandbox=new t.ContentEditableArea(function(){e._create()},{},this.editableArea):(this.sandbox=new t.ContentEditableArea(function(){e._create()}),this.editableArea=this.sandbox.getContentEditable(),t.insert(this.editableArea).after(this.textarea.element),this._createWysiwygFormField())},_initSandbox:function(){var e=this;this.sandbox=new t.Sandbox(function(){e._create()},{stylesheets:this.config.stylesheets}),this.editableArea=this.sandbox.getIframe();var n=this.textarea.element;t.insert(this.editableArea).after(n),this._createWysiwygFormField()},_createWysiwygFormField:function(){if(this.textarea.element.form){var e=document.createElement("input");e.type="hidden",e.name="_wysihtml5_mode",e.value=1,t.insert(e).after(this.textarea.element)}},_create:function(){var i=this;this.doc=this.sandbox.getDocument(),this.element=this.config.contentEditableMode?this.sandbox.getContentEditable():this.doc.body,this.config.noTextarea?this.cleanUp():(this.textarea=this.parent.textarea,this.element.innerHTML=this.textarea.getValue(!0,!1)),this.selection=new e.Selection(this.parent,this.element,this.config.uneditableContainerClassname),this.commands=new e.Commands(this.parent),this.config.noTextarea||t.copyAttributes(["className","spellcheck","title","lang","dir","accessKey"]).from(this.textarea.element).to(this.element),t.addClass(this.element,this.config.composerClassName),this.config.style&&!this.config.contentEditableMode&&this.style(),this.observe();var s=this.config.name;s&&(t.addClass(this.element,s),this.config.contentEditableMode||t.addClass(this.editableArea,s)),this.enable(),!this.config.noTextarea&&this.textarea.element.disabled&&this.disable();var o="string"==typeof this.config.placeholder?this.config.placeholder:this.config.noTextarea?this.editableArea.getAttribute("data-placeholder"):this.textarea.element.getAttribute("placeholder");o&&t.simulatePlaceholder(this.parent,this,o),this.commands.exec("styleWithCSS",!1),this._initAutoLinking(),this._initObjectResizing(),this._initUndoManager(),this._initLineBreaking(),this.config.noTextarea||!this.textarea.element.hasAttribute("autofocus")&&document.querySelector(":focus")!=this.textarea.element||n.isIos()||setTimeout(function(){i.focus(!0)},100),n.clearsContentEditableCorrectly()||e.quirks.ensureProperClearing(this),this.initSync&&this.config.sync&&this.initSync(),this.config.noTextarea||this.textarea.hide(),this.parent.fire("beforeload").fire("load")},_initAutoLinking:function(){var i=this,s=n.canDisableAutoLinking(),o=n.doesAutoLinkingInContentEditable();if(s&&this.commands.exec("autoUrlDetect",!1),this.config.autoLink){(!o||o&&s)&&(this.parent.on("newword:composer",function(){t.getTextContent(i.element).match(t.autoLink.URL_REG_EXP)&&i.selection.executeAndRestore(function(n,s){for(var o=i.element.querySelectorAll("."+i.config.uneditableContainerClassname),r=!1,a=o.length;a--;)e.dom.contains(o[a],s)&&(r=!0);r||t.autoLink(s.parentNode,[i.config.uneditableContainerClassname])})}),t.observe(this.element,"blur",function(){t.autoLink(i.element,[i.config.uneditableContainerClassname])}));var r=this.sandbox.getDocument().getElementsByTagName("a"),a=t.autoLink.URL_REG_EXP,l=function(n){var i=e.lang.string(t.getTextContent(n)).trim();return"www."===i.substr(0,4)&&(i="http://"+i),i};t.observe(this.element,"keydown",function(e){if(r.length){var n,s=i.selection.getSelectedNode(e.target.ownerDocument),o=t.getParentElement(s,{nodeName:"A"},4);o&&(n=l(o),setTimeout(function(){var e=l(o);e!==n&&e.match(a)&&o.setAttribute("href",e)},0))}})}},_initObjectResizing:function(){if(this.commands.exec("enableObjectResizing",!0),n.supportsEvent("resizeend")){var i=["width","height"],s=i.length,o=this.element;t.observe(o,"resizeend",function(t){var n,r=t.target||t.srcElement,a=r.style,l=0;if("IMG"===r.nodeName){for(;l<s;l++)n=i[l],a[n]&&(r.setAttribute(n,parseInt(a[n],10)),a[n]="");e.quirks.redraw(o)}})}},_initUndoManager:function(){this.undoManager=new e.UndoManager(this.parent)},_initLineBreaking:function(){function i(e){var n=t.getParentElement(e,{nodeName:["P","DIV"]},2);n&&t.contains(s.element,n)&&s.selection.executeAndRestore(function(){s.config.useLineBreaks?t.replaceWithChildNodes(n):"P"!==n.nodeName&&t.renameElement(n,"p")})}var s=this,o=["LI","P","H1","H2","H3","H4","H5","H6"],r=["UL","OL","MENU"];this.config.useLineBreaks||t.observe(this.element,["focus","keydown"],function(){if(s.isEmpty()){var e=s.doc.createElement("P");s.element.innerHTML="",s.element.appendChild(e),n.displaysCaretInEmptyContentEditableCorrectly()?s.selection.selectNode(e,!0):(e.innerHTML="<br>",s.selection.setBefore(e.firstChild))}}),t.observe(this.element,"keydown",function(n){var a=n.keyCode;if(!n.shiftKey&&(a===e.ENTER_KEY||a===e.BACKSPACE_KEY)){var l=t.getParentElement(s.selection.getSelectedNode(),{nodeName:o},4);return l?void setTimeout(function(){var n,o=s.selection.getSelectedNode();if("LI"===l.nodeName){if(!o)return;n=t.getParentElement(o,{nodeName:r},2),n||i(o)}a===e.ENTER_KEY&&l.nodeName.match(/^H[1-6]$/)&&i(o)},0):void(s.config.useLineBreaks&&a===e.ENTER_KEY&&!e.browser.insertsLineBreaksOnReturn()&&(n.preventDefault(),s.commands.exec("insertLineBreak")))}})}})}(wysihtml5),function(e){var t=e.dom,n=document,i=window,s=n.createElement("div"),o=["background-color","color","cursor","font-family","font-size","font-style","font-variant","font-weight","line-height","letter-spacing","text-align","text-decoration","text-indent","text-rendering","word-break","word-wrap","word-spacing"],r=["background-color","border-collapse","border-bottom-color","border-bottom-style","border-bottom-width","border-left-color","border-left-style","border-left-width","border-right-color","border-right-style","border-right-width","border-top-color","border-top-style","border-top-width","clear","display","float","margin-bottom","margin-left","margin-right","margin-top","outline-color","outline-offset","outline-width","outline-style","padding-left","padding-right","padding-top","padding-bottom","position","top","left","right","bottom","z-index","vertical-align","text-align","-webkit-box-sizing","-moz-box-sizing","-ms-box-sizing","box-sizing","-webkit-box-shadow","-moz-box-shadow","-ms-box-shadow","box-shadow","-webkit-border-top-right-radius","-moz-border-radius-topright","border-top-right-radius","-webkit-border-bottom-right-radius","-moz-border-radius-bottomright","border-bottom-right-radius","-webkit-border-bottom-left-radius","-moz-border-radius-bottomleft","border-bottom-left-radius","-webkit-border-top-left-radius","-moz-border-radius-topleft","border-top-left-radius","width","height"],a=["html                 { height: 100%; }","body                 { height: 100%; padding: 1px 0 0 0; margin: -1px 0 0 0; }","body > p:first-child { margin-top: 0; }","._wysihtml5-temp     { display: none; }",e.browser.isGecko?"body.placeholder { color: graytext !important; }":"body.placeholder { color: #a9a9a9 !important; }","img:-moz-broken      { -moz-force-broken-image-icon: 1; height: 24px; width: 24px; }"],l=function(e){if(e.setActive)try{e.setActive()}catch(s){}else{var o=e.style,r=n.documentElement.scrollTop||n.body.scrollTop,a=n.documentElement.scrollLeft||n.body.scrollLeft,l={position:o.position,top:o.top,left:o.left,WebkitUserSelect:o.WebkitUserSelect};t.setStyles({position:"absolute",top:"-99999px",left:"-99999px",WebkitUserSelect:"none"}).on(e),e.focus(),t.setStyles(l).on(e),i.scrollTo&&i.scrollTo(a,r)}};e.views.Composer.prototype.style=function(){var i,c=this,h=n.querySelector(":focus"),u=this.textarea.element,d=u.hasAttribute("placeholder"),f=d&&u.getAttribute("placeholder"),p=u.style.display,m=u.disabled;this.focusStylesHost=s.cloneNode(!1),this.blurStylesHost=s.cloneNode(!1),this.disabledStylesHost=s.cloneNode(!1),d&&u.removeAttribute("placeholder"),u===h&&u.blur(),u.disabled=!1,u.style.display=i="none",(u.getAttribute("rows")&&"auto"===t.getStyle("height").from(u)||u.getAttribute("cols")&&"auto"===t.getStyle("width").from(u))&&(u.style.display=i=p),t.copyStyles(r).from(u).to(this.editableArea).andTo(this.blurStylesHost),t.copyStyles(o).from(u).to(this.element).andTo(this.blurStylesHost),t.insertCSS(a).into(this.element.ownerDocument),u.disabled=!0,t.copyStyles(r).from(u).to(this.disabledStylesHost),t.copyStyles(o).from(u).to(this.disabledStylesHost),u.disabled=m,u.style.display=p,l(u),u.style.display=i,t.copyStyles(r).from(u).to(this.focusStylesHost),t.copyStyles(o).from(u).to(this.focusStylesHost),u.style.display=p,t.copyStyles(["display"]).from(u).to(this.editableArea);var g=e.lang.array(r).without(["display"]);return h?h.focus():u.blur(),d&&u.setAttribute("placeholder",f),this.parent.on("focus:composer",function(){t.copyStyles(g).from(c.focusStylesHost).to(c.editableArea),t.copyStyles(o).from(c.focusStylesHost).to(c.element)}),this.parent.on("blur:composer",function(){t.copyStyles(g).from(c.blurStylesHost).to(c.editableArea),t.copyStyles(o).from(c.blurStylesHost).to(c.element)}),this.parent.observe("disable:composer",function(){t.copyStyles(g).from(c.disabledStylesHost).to(c.editableArea),t.copyStyles(o).from(c.disabledStylesHost).to(c.element)}),this.parent.observe("enable:composer",function(){
t.copyStyles(g).from(c.blurStylesHost).to(c.editableArea),t.copyStyles(o).from(c.blurStylesHost).to(c.element)}),this}}(wysihtml5),function(e){var t=e.dom,n=e.browser,i={66:"bold",73:"italic",85:"underline"},s=function(e,t,n){var i=e.getPreviousNode(t,!0),s=e.getSelectedNode();if(1!==s.nodeType&&s.parentNode!==n&&(s=s.parentNode),i)if(1==s.nodeType){var o=s.firstChild;if(1==i.nodeType)for(;s.firstChild;)i.appendChild(s.firstChild);else for(;s.firstChild;)t.parentNode.insertBefore(s.firstChild,t);s.parentNode&&s.parentNode.removeChild(s),e.setBefore(o)}else 1==i.nodeType?i.appendChild(s):t.parentNode.insertBefore(s,t),e.setBefore(s)},o=function(e,t,n,i){if(t.isCollapsed())if(t.caretIsInTheBeginnig("LI"))e.preventDefault(),i.commands.exec("outdentList");else if(t.caretIsInTheBeginnig())e.preventDefault();else{if(t.caretIsFirstInSelection()&&t.getPreviousNode()&&t.getPreviousNode().nodeName&&/^H\d$/gi.test(t.getPreviousNode().nodeName)){var o=t.getPreviousNode();if(e.preventDefault(),/^\s*$/.test(o.textContent||o.innerText))o.parentNode.removeChild(o);else{var r=o.ownerDocument.createRange();r.selectNodeContents(o),r.collapse(!1),t.setSelection(r)}}var a=t.caretIsBeforeUneditable();a&&(e.preventDefault(),s(t,a,n))}else t.containsUneditable()&&(e.preventDefault(),t.deleteContents())},r=function(e,t){if(e.selection.isCollapsed()){if(e.selection.caretIsInTheBeginnig("LI")&&e.commands.exec("indentList"))return}else e.selection.deleteContents();e.commands.exec("insertHTML","&emsp;")};e.views.Composer.prototype.observe=function(){var s=this,a=this.getValue(!1,!1),l=this.sandbox.getIframe?this.sandbox.getIframe():this.sandbox.getContentEditable(),c=this.element,h=n.supportsEventsInIframeCorrectly()||this.sandbox.getContentEditable?c:this.sandbox.getWindow(),u=["drop","paste","beforepaste"],d=["drop","paste","mouseup","focus","keyup"];if(t.observe(l,"DOMNodeRemoved",function(){clearInterval(f),s.parent.fire("destroy:composer")}),!n.supportsMutationEvents())var f=setInterval(function(){t.contains(document.documentElement,l)||(clearInterval(f),s.parent.fire("destroy:composer"))},250);t.observe(h,d,function(){setTimeout(function(){s.parent.fire("interaction").fire("interaction:composer")},0)}),this.config.handleTables&&(!this.tableClickHandle&&this.doc.execCommand&&e.browser.supportsCommand(this.doc,"enableObjectResizing")&&e.browser.supportsCommand(this.doc,"enableInlineTableEditing")&&(this.sandbox.getIframe?this.tableClickHandle=t.observe(l,["focus","mouseup","mouseover"],function(){s.doc.execCommand("enableObjectResizing",!1,"false"),s.doc.execCommand("enableInlineTableEditing",!1,"false"),s.tableClickHandle.stop()}):setTimeout(function(){s.doc.execCommand("enableObjectResizing",!1,"false"),s.doc.execCommand("enableInlineTableEditing",!1,"false")},0)),this.tableSelection=e.quirks.tableCellsSelection(c,s.parent)),t.observe(h,"focus",function(e){s.parent.fire("focus",e).fire("focus:composer",e),setTimeout(function(){a=s.getValue(!1,!1)},0)}),t.observe(h,"blur",function(e){if(a!==s.getValue(!1,!1)){var t=e;"function"==typeof Object.create&&(t=Object.create(e,{type:{value:"change"}})),s.parent.fire("change",t).fire("change:composer",t)}s.parent.fire("blur",e).fire("blur:composer",e)}),t.observe(c,"dragenter",function(){s.parent.fire("unset_placeholder")}),t.observe(c,u,function(e){s.parent.fire(e.type,e).fire(e.type+":composer",e)}),this.config.copyedFromMarking&&t.observe(c,"copy",function(e){e.clipboardData&&(e.clipboardData.setData("text/html",s.config.copyedFromMarking+s.selection.getHtml()),e.preventDefault()),s.parent.fire(e.type,e).fire(e.type+":composer",e)}),t.observe(c,"keyup",function(t){var n=t.keyCode;n!==e.SPACE_KEY&&n!==e.ENTER_KEY||s.parent.fire("newword:composer")}),this.parent.on("paste:composer",function(){setTimeout(function(){s.parent.fire("newword:composer")},0)}),n.canSelectImagesInContentEditable()||t.observe(c,"mousedown",function(t){var n=t.target,i=c.querySelectorAll("img"),o=c.querySelectorAll("."+s.config.uneditableContainerClassname+" img"),r=e.lang.array(i).without(o);"IMG"===n.nodeName&&e.lang.array(r).contains(n)&&s.selection.selectNode(n)}),n.canSelectImagesInContentEditable()||t.observe(c,"drop",function(e){setTimeout(function(){s.selection.getSelection().removeAllRanges()},0)}),n.hasHistoryIssue()&&n.supportsSelectionModify()&&t.observe(c,"keydown",function(e){if(e.metaKey||e.ctrlKey){var t=e.keyCode,n=c.ownerDocument.defaultView,i=n.getSelection();37!==t&&39!==t||(37===t&&(i.modify("extend","left","lineboundary"),e.shiftKey||i.collapseToStart()),39===t&&(i.modify("extend","right","lineboundary"),e.shiftKey||i.collapseToEnd()),e.preventDefault())}}),t.observe(c,"keydown",function(e){var t=e.keyCode,n=i[t];(e.ctrlKey||e.metaKey)&&!e.altKey&&n&&(s.commands.exec(n),e.preventDefault()),8===t?o(e,s.selection,c,s):s.config.handleTabKey&&9===t&&(e.preventDefault(),r(s,c))}),t.observe(c,"keydown",function(t){var n,i=s.selection.getSelectedNode(!0),o=t.keyCode;!i||"IMG"!==i.nodeName||o!==e.BACKSPACE_KEY&&o!==e.DELETE_KEY||(n=i.parentNode,n.removeChild(i),"A"!==n.nodeName||n.firstChild||n.parentNode.removeChild(n),setTimeout(function(){e.quirks.redraw(c)},0),t.preventDefault())}),!this.config.contentEditableMode&&n.hasIframeFocusIssue()&&(t.observe(l,"focus",function(){setTimeout(function(){s.doc.querySelector(":focus")!==s.element&&s.focus()},0)}),t.observe(this.element,"blur",function(){setTimeout(function(){s.selection.getSelection().removeAllRanges()},0)}));var p={IMG:"Image: ",A:"Link: "};t.observe(c,"mouseover",function(e){var t,n=e.target,i=n.nodeName;if("A"===i||"IMG"===i){var s=n.hasAttribute("title");s||(t=p[i]+(n.getAttribute("href")||n.getAttribute("src")),n.setAttribute("title",t))}})}}(wysihtml5),function(e){var t=400;e.views.Synchronizer=Base.extend({constructor:function(e,t,n){this.editor=e,this.textarea=t,this.composer=n,this._observe()},fromComposerToTextarea:function(t){this.textarea.setValue(e.lang.string(this.composer.getValue(!1,!1)).trim(),t)},fromTextareaToComposer:function(e){var t=this.textarea.getValue(!1,!1);t?this.composer.setValue(t,e):(this.composer.clear(),this.editor.fire("set_placeholder"))},sync:function(e){"textarea"===this.editor.currentView.name?this.fromTextareaToComposer(e):this.fromComposerToTextarea(e)},_observe:function(){var n,i=this,s=this.textarea.element.form,o=function(){n=setInterval(function(){i.fromComposerToTextarea()},t)},r=function(){clearInterval(n),n=null};o(),s&&(e.dom.observe(s,"submit",function(){i.sync(!0)}),e.dom.observe(s,"reset",function(){setTimeout(function(){i.fromTextareaToComposer()},0)})),this.editor.on("change_view",function(e){"composer"!==e||n?"textarea"===e&&(i.fromComposerToTextarea(!0),r()):(i.fromTextareaToComposer(!0),o())}),this.editor.on("destroy:composer",r)}})}(wysihtml5),wysihtml5.views.Textarea=wysihtml5.views.View.extend({name:"textarea",constructor:function(e,t,n){this.base(e,t,n),this._observe()},clear:function(){this.element.value=""},getValue:function(e){var t=this.isEmpty()?"":this.element.value;return e!==!1&&(t=this.parent.parse(t)),t},setValue:function(e,t){t&&(e=this.parent.parse(e)),this.element.value=e},cleanUp:function(){var e=this.parent.parse(this.element.value);this.element.value=e},hasPlaceholderSet:function(){var e=wysihtml5.browser.supportsPlaceholderAttributeOn(this.element),t=this.element.getAttribute("placeholder")||null,n=this.element.value,i=!n;return e&&i||n===t},isEmpty:function(){return!wysihtml5.lang.string(this.element.value).trim()||this.hasPlaceholderSet()},_observe:function(){var e=this.element,t=this.parent,n={focusin:"focus",focusout:"blur"},i=wysihtml5.browser.supportsEvent("focusin")?["focusin","focusout","change"]:["focus","blur","change"];t.on("beforeload",function(){wysihtml5.dom.observe(e,i,function(e){var i=n[e.type]||e.type;t.fire(i).fire(i+":textarea")}),wysihtml5.dom.observe(e,["paste","drop"],function(){setTimeout(function(){t.fire("paste").fire("paste:textarea")},0)})})}}),function(e){var t,n={name:t,style:!0,toolbar:t,showToolbarAfterInit:!0,autoLink:!0,handleTables:!0,handleTabKey:!0,parserRules:{tags:{br:{},span:{},div:{},p:{}},classes:{}},pasteParserRulesets:null,parser:e.dom.parse,composerClassName:"wysihtml5-editor",bodyClassName:"wysihtml5-supported",useLineBreaks:!0,stylesheets:[],placeholderText:t,supportTouchDevices:!0,cleanUp:!0,contentEditableMode:!1,uneditableContainerClassname:"wysihtml5-uneditable-container",copyedFromMarking:'<meta name="copied-from" content="wysihtml5">'};e.Editor=e.lang.Dispatcher.extend({constructor:function(t,i){if(this.editableElement="string"==typeof t?document.getElementById(t):t,this.config=e.lang.object({}).merge(n).merge(i).get(),this._isCompatible=e.browser.supported(),"textarea"!=this.editableElement.nodeName.toLowerCase()&&(this.config.contentEditableMode=!0,this.config.noTextarea=!0),this.config.noTextarea||(this.textarea=new e.views.Textarea(this,this.editableElement,this.config),this.currentView=this.textarea),!this._isCompatible||!this.config.supportTouchDevices&&e.browser.isTouchDevice()){var s=this;return void setTimeout(function(){s.fire("beforeload").fire("load")},0)}e.dom.addClass(document.body,this.config.bodyClassName),this.composer=new e.views.Composer(this,this.editableElement,this.config),this.currentView=this.composer,"function"==typeof this.config.parser&&this._initParser(),this.on("beforeload",this.handleBeforeLoad)},handleBeforeLoad:function(){this.config.noTextarea||(this.synchronizer=new e.views.Synchronizer(this,this.textarea,this.composer)),this.config.toolbar&&(this.toolbar=new e.toolbar.Toolbar(this,this.config.toolbar,this.config.showToolbarAfterInit))},isCompatible:function(){return this._isCompatible},clear:function(){return this.currentView.clear(),this},getValue:function(e,t){return this.currentView.getValue(e,t)},setValue:function(e,t){return this.fire("unset_placeholder"),e?(this.currentView.setValue(e,t),this):this.clear()},cleanUp:function(){this.currentView.cleanUp()},focus:function(e){return this.currentView.focus(e),this},disable:function(){return this.currentView.disable(),this},enable:function(){return this.currentView.enable(),this},isEmpty:function(){return this.currentView.isEmpty()},hasPlaceholderSet:function(){return this.currentView.hasPlaceholderSet()},parse:function(t,n){var i=this.config.contentEditableMode?document:this.composer?this.composer.sandbox.getDocument():null,s=this.config.parser(t,{rules:this.config.parserRules,cleanUp:this.config.cleanUp,context:i,uneditableClass:this.config.uneditableContainerClassname,clearInternals:n});return"object"==typeof t&&e.quirks.redraw(t),s},_initParser:function(){var t,n=this;e.browser.supportsModenPaste()?this.on("paste:composer",function(i){i.preventDefault(),t=e.dom.getPastedHtml(i),t&&n._cleanAndPaste(t)}):this.on("beforepaste:composer",function(t){t.preventDefault(),e.dom.getPastedHtmlWithDiv(n.composer,function(e){e&&n._cleanAndPaste(e)})})},_cleanAndPaste:function(t){var n=e.quirks.cleanPastedHTML(t,{referenceNode:this.composer.element,rules:this.config.pasteParserRulesets||[{set:this.config.parserRules}],uneditableClass:this.config.uneditableContainerClassname});this.composer.selection.deleteContents(),this.composer.selection.insertHTML(n)}})}(wysihtml5),function(e){var t=e.dom,n="wysihtml5-command-dialog-opened",i="input, select, textarea",s="[data-wysihtml5-dialog-field]",o="data-wysihtml5-dialog-field";e.toolbar.Dialog=e.lang.Dispatcher.extend({constructor:function(e,t){this.link=e,this.container=t},_observe:function(){if(!this._observed){var s=this,o=function(e){var t=s._serialize();t==s.elementToChange?s.fire("edit",t):s.fire("save",t),s.hide(),e.preventDefault(),e.stopPropagation()};t.observe(s.link,"click",function(){t.hasClass(s.link,n)&&setTimeout(function(){s.hide()},0)}),t.observe(this.container,"keydown",function(t){var n=t.keyCode;n===e.ENTER_KEY&&o(t),n===e.ESCAPE_KEY&&(s.fire("cancel"),s.hide())}),t.delegate(this.container,"[data-wysihtml5-dialog-action=save]","click",o),t.delegate(this.container,"[data-wysihtml5-dialog-action=cancel]","click",function(e){s.fire("cancel"),s.hide(),e.preventDefault(),e.stopPropagation()});for(var r=this.container.querySelectorAll(i),a=0,l=r.length,c=function(){clearInterval(s.interval)};a<l;a++)t.observe(r[a],"change",c);this._observed=!0}},_serialize:function(){for(var e=this.elementToChange||{},t=this.container.querySelectorAll(s),n=t.length,i=0;i<n;i++)e[t[i].getAttribute(o)]=t[i].value;return e},_interpolate:function(e){for(var t,n,i,r=document.querySelector(":focus"),a=this.container.querySelectorAll(s),l=a.length,c=0;c<l;c++)t=a[c],t!==r&&(e&&"hidden"===t.type||(n=t.getAttribute(o),i=this.elementToChange&&"boolean"!=typeof this.elementToChange?this.elementToChange.getAttribute(n)||"":t.defaultValue,t.value=i))},show:function(e){if(!t.hasClass(this.link,n)){var s=this,o=this.container.querySelector(i);if(this.elementToChange=e,this._observe(),this._interpolate(),e&&(this.interval=setInterval(function(){s._interpolate(!0)},500)),t.addClass(this.link,n),this.container.style.display="",this.fire("show"),o&&!e)try{o.focus()}catch(r){}}},hide:function(){clearInterval(this.interval),this.elementToChange=null,t.removeClass(this.link,n),this.container.style.display="none",this.fire("hide")}})}(wysihtml5),function(e){var t=e.dom,n={position:"relative"},i={left:0,margin:0,opacity:0,overflow:"hidden",padding:0,position:"absolute",top:0,zIndex:1},s={cursor:"inherit",fontSize:"50px",height:"50px",marginTop:"-25px",outline:0,padding:0,position:"absolute",right:"-4px",top:"50%"},o={"x-webkit-speech":"",speech:""};e.toolbar.Speech=function(r,a){var l=document.createElement("input");if(!e.browser.supportsSpeechApiOn(l))return void(a.style.display="none");var c=r.editor.textarea.element.getAttribute("lang");c&&(o.lang=c);var h=document.createElement("div");e.lang.object(i).merge({width:a.offsetWidth+"px",height:a.offsetHeight+"px"}),t.insert(l).into(h),t.insert(h).into(a),t.setStyles(s).on(l),t.setAttributes(o).on(l),t.setStyles(i).on(h),t.setStyles(n).on(a);var u="onwebkitspeechchange"in l?"webkitspeechchange":"speechchange";t.observe(l,u,function(){r.execCommand("insertText",l.value),l.value=""}),t.observe(l,"click",function(e){t.hasClass(a,"wysihtml5-command-disabled")&&e.preventDefault(),e.stopPropagation()})}}(wysihtml5),function(e){var t="wysihtml5-command-disabled",n="wysihtml5-commands-disabled",i="wysihtml5-command-active",s="wysihtml5-action-active",o=e.dom;e.toolbar.Toolbar=Base.extend({constructor:function(o,r,a){this.editor=o,this.container="string"==typeof r?document.getElementById(r):r,this.composer=o.composer,this._getLinks("command"),this._getLinks("action"),this._observe(),a&&this.show(),null!=o.config.classNameCommandDisabled&&(t=o.config.classNameCommandDisabled),null!=o.config.classNameCommandsDisabled&&(n=o.config.classNameCommandsDisabled),null!=o.config.classNameCommandActive&&(i=o.config.classNameCommandActive),null!=o.config.classNameActionActive&&(s=o.config.classNameActionActive);for(var l=this.container.querySelectorAll("[data-wysihtml5-command=insertSpeech]"),c=l.length,h=0;h<c;h++)new e.toolbar.Speech(this,l[h])},_getLinks:function(t){for(var n,i,s,o,r,a=this[t+"Links"]=e.lang.array(this.container.querySelectorAll("[data-wysihtml5-"+t+"]")).get(),l=a.length,c=0,h=this[t+"Mapping"]={};c<l;c++)n=a[c],s=n.getAttribute("data-wysihtml5-"+t),o=n.getAttribute("data-wysihtml5-"+t+"-value"),i=this.container.querySelector("[data-wysihtml5-"+t+"-group='"+s+"']"),r=this._getDialog(n,s),h[s+":"+o]={link:n,group:i,name:s,value:o,dialog:r,state:!1}},_getDialog:function(t,n){var i,s,o=this,r=this.container.querySelector("[data-wysihtml5-dialog='"+n+"']");return r&&(i=e.toolbar["Dialog_"+n]?new e.toolbar["Dialog_"+n](t,r):new e.toolbar.Dialog(t,r),i.on("show",function(){s=o.composer.selection.getBookmark(),o.editor.fire("show:dialog",{command:n,dialogContainer:r,commandLink:t})}),i.on("save",function(e){s&&o.composer.selection.setBookmark(s),o._execCommand(n,e),o.editor.fire("save:dialog",{command:n,dialogContainer:r,commandLink:t})}),i.on("cancel",function(){o.editor.focus(!1),o.editor.fire("cancel:dialog",{command:n,dialogContainer:r,commandLink:t})})),i},execCommand:function(e,t){if(!this.commandsDisabled){var n=this.commandMapping[e+":"+t];n&&n.dialog&&!n.state?n.dialog.show():this._execCommand(e,t)}},_execCommand:function(e,t){this.editor.focus(!1),this.composer.commands.exec(e,t),this._updateLinkStates()},execAction:function(e){var t=this.editor;"change_view"===e&&t.textarea&&(t.currentView===t.textarea?t.fire("change_view","composer"):t.fire("change_view","textarea")),"showSource"==e&&t.fire("showSource")},_observe:function(){for(var e=this,t=this.editor,i=this.container,s=this.commandLinks.concat(this.actionLinks),r=s.length,a=0;a<r;a++)"A"===s[a].nodeName?o.setAttributes({href:"javascript:;",unselectable:"on"}).on(s[a]):o.setAttributes({unselectable:"on"}).on(s[a]);o.delegate(i,"[data-wysihtml5-command], [data-wysihtml5-action]","mousedown",function(e){e.preventDefault()}),o.delegate(i,"[data-wysihtml5-command]","click",function(t){var n=this,i=n.getAttribute("data-wysihtml5-command"),s=n.getAttribute("data-wysihtml5-command-value");e.execCommand(i,s),t.preventDefault()}),o.delegate(i,"[data-wysihtml5-action]","click",function(t){var n=this.getAttribute("data-wysihtml5-action");e.execAction(n),t.preventDefault()}),t.on("interaction:composer",function(){e._updateLinkStates()}),t.on("focus:composer",function(){e.bookmark=null}),this.editor.config.handleTables&&(t.on("tableselect:composer",function(){e.container.querySelectorAll('[data-wysihtml5-hiddentools="table"]')[0].style.display=""}),t.on("tableunselect:composer",function(){e.container.querySelectorAll('[data-wysihtml5-hiddentools="table"]')[0].style.display="none"})),t.on("change_view",function(s){t.textarea&&setTimeout(function(){e.commandsDisabled="composer"!==s,e._updateLinkStates(),e.commandsDisabled?o.addClass(i,n):o.removeClass(i,n)},0)})},_updateLinkStates:function(){var n,r,a,l,c=this.commandMapping,h=this.actionMapping;for(n in c)l=c[n],this.commandsDisabled?(r=!1,o.removeClass(l.link,i),l.group&&o.removeClass(l.group,i),l.dialog&&l.dialog.hide()):(r=this.composer.commands.state(l.name,l.value),o.removeClass(l.link,t),l.group&&o.removeClass(l.group,t)),l.state!==r&&(l.state=r,r?(o.addClass(l.link,i),l.group&&o.addClass(l.group,i),l.dialog&&("object"==typeof r||e.lang.object(r).isArray()?(!l.dialog.multiselect&&e.lang.object(r).isArray()&&(r=1!==r.length||r[0],l.state=r),l.dialog.show(r)):l.dialog.hide())):(o.removeClass(l.link,i),l.group&&o.removeClass(l.group,i),l.dialog&&l.dialog.hide()));for(n in h)a=h[n],"change_view"===a.name&&(a.state=this.editor.currentView===this.editor.textarea,a.state?o.addClass(a.link,s):o.removeClass(a.link,s))},show:function(){this.container.style.display=""},hide:function(){this.container.style.display="none"}})}(wysihtml5),function(e){e.toolbar.Dialog_createTable=e.toolbar.Dialog.extend({show:function(e){this.base(e)}})}(wysihtml5),function(e){var t=(e.dom,"[data-wysihtml5-dialog-field]"),n="data-wysihtml5-dialog-field";e.toolbar.Dialog_foreColorStyle=e.toolbar.Dialog.extend({multiselect:!0,_serialize:function(){for(var e={},i=this.container.querySelectorAll(t),s=i.length,o=0;o<s;o++)e[i[o].getAttribute(n)]=i[o].value;return e},_interpolate:function(i){for(var s,o=document.querySelector(":focus"),r=this.container.querySelectorAll(t),a=r.length,l=0,c=this.elementToChange?e.lang.object(this.elementToChange).isArray()?this.elementToChange[0]:this.elementToChange:null,h=c?c.getAttribute("style"):null,u=h?e.quirks.styleParser.parseColor(h,"color"):null;l<a;l++)s=r[l],s!==o&&(i&&"hidden"===s.type||"color"===s.getAttribute(n)&&(u?u[3]&&1!=u[3]?s.value="rgba("+u[0]+","+u[1]+","+u[2]+","+u[3]+");":s.value="rgb("+u[0]+","+u[1]+","+u[2]+");":s.value="rgb(0,0,0);"))}})}(wysihtml5),function(e){e.dom;e.toolbar.Dialog_fontSizeStyle=e.toolbar.Dialog.extend({multiselect:!0,_serialize:function(){return{size:this.container.querySelector('[data-wysihtml5-dialog-field="size"]').value}},_interpolate:function(t){var n=document.querySelector(":focus"),i=this.container.querySelector("[data-wysihtml5-dialog-field='size']"),s=this.elementToChange?e.lang.object(this.elementToChange).isArray()?this.elementToChange[0]:this.elementToChange:null,o=s?s.getAttribute("style"):null,r=o?e.quirks.styleParser.parseFontSize(o):null;i&&i!==n&&r&&!/^\s*$/.test(r)&&(i.value=r)}})}(wysihtml5);var Handlebars=function(){var e=function(){"use strict";function e(e){this.string=e}var t;return e.prototype.toString=function(){return""+this.string},t=e}(),t=function(e){"use strict";function t(e){return a[e]||"&amp;"}function n(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])}function i(e){return e instanceof r?e.toString():e||0===e?(e=""+e,c.test(e)?e.replace(l,t):e):""}function s(e){return!e&&0!==e||!(!d(e)||0!==e.length)}var o={},r=e,a={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#x27;","`":"&#x60;"},l=/[&<>"'`]/g,c=/[&<>"'`]/;o.extend=n;var h=Object.prototype.toString;o.toString=h;var u=function(e){return"function"==typeof e};u(/x/)&&(u=function(e){return"function"==typeof e&&"[object Function]"===h.call(e)});var u;o.isFunction=u;var d=Array.isArray||function(e){return!(!e||"object"!=typeof e)&&"[object Array]"===h.call(e)};return o.isArray=d,o.escapeExpression=i,o.isEmpty=s,o}(e),n=function(){"use strict";function e(e,t){var i;t&&t.firstLine&&(i=t.firstLine,e+=" - "+i+":"+t.firstColumn);for(var s=Error.prototype.constructor.call(this,e),o=0;o<n.length;o++)this[n[o]]=s[n[o]];i&&(this.lineNumber=i,this.column=t.firstColumn)}var t,n=["description","fileName","lineNumber","message","name","number","stack"];return e.prototype=new Error,t=e}(),i=function(e,t){"use strict";function n(e,t){this.helpers=e||{},this.partials=t||{},i(this)}function i(e){e.registerHelper("helperMissing",function(e){if(2!==arguments.length)throw new a("Missing helper: '"+e+"'")}),e.registerHelper("blockHelperMissing",function(t,n){var i=n.inverse||function(){},s=n.fn;return d(t)&&(t=t.call(this)),t===!0?s(this):t===!1||null==t?i(this):u(t)?t.length>0?e.helpers.each(t,n):i(this):s(t)}),e.registerHelper("each",function(e,t){var n,i=t.fn,s=t.inverse,o=0,r="";if(d(e)&&(e=e.call(this)),t.data&&(n=g(t.data)),e&&"object"==typeof e)if(u(e))for(var a=e.length;a>o;o++)n&&(n.index=o,n.first=0===o,n.last=o===e.length-1),r+=i(e[o],{data:n});else for(var l in e)e.hasOwnProperty(l)&&(n&&(n.key=l,n.index=o,n.first=0===o),r+=i(e[l],{data:n}),o++);return 0===o&&(r=s(this)),r}),e.registerHelper("if",function(e,t){return d(e)&&(e=e.call(this)),!t.hash.includeZero&&!e||r.isEmpty(e)?t.inverse(this):t.fn(this)}),e.registerHelper("unless",function(t,n){return e.helpers["if"].call(this,t,{fn:n.inverse,inverse:n.fn,hash:n.hash})}),e.registerHelper("with",function(e,t){return d(e)&&(e=e.call(this)),r.isEmpty(e)?void 0:t.fn(e)}),e.registerHelper("log",function(t,n){var i=n.data&&null!=n.data.level?parseInt(n.data.level,10):1;e.log(i,t)})}function s(e,t){m.log(e,t)}var o={},r=e,a=t,l="1.3.0";o.VERSION=l;var c=4;o.COMPILER_REVISION=c;var h={1:"<= 1.0.rc.2",2:"== 1.0.0-rc.3",3:"== 1.0.0-rc.4",4:">= 1.0.0"};o.REVISION_CHANGES=h;var u=r.isArray,d=r.isFunction,f=r.toString,p="[object Object]";o.HandlebarsEnvironment=n,n.prototype={constructor:n,logger:m,log:s,registerHelper:function(e,t,n){if(f.call(e)===p){if(n||t)throw new a("Arg not supported with multiple helpers");r.extend(this.helpers,e)}else n&&(t.not=n),this.helpers[e]=t},registerPartial:function(e,t){f.call(e)===p?r.extend(this.partials,e):this.partials[e]=t}};var m={methodMap:{0:"debug",1:"info",2:"warn",3:"error"},DEBUG:0,INFO:1,WARN:2,ERROR:3,level:3,log:function(e,t){if(m.level<=e){var n=m.methodMap[e];"undefined"!=typeof console&&console[n]&&console[n].call(console,t)}}};o.logger=m,o.log=s;var g=function(e){var t={};return r.extend(t,e),t};return o.createFrame=g,o}(t,n),s=function(e,t,n){"use strict";function i(e){var t=e&&e[0]||1,n=d;if(t!==n){if(n>t){var i=f[n],s=f[t];throw new u("Template was precompiled with an older version of Handlebars than the current runtime. Please update your precompiler to a newer version ("+i+") or downgrade your runtime to an older version ("+s+").")}throw new u("Template was precompiled with a newer version of Handlebars than the current runtime. Please update your runtime to a newer version ("+e[1]+").")}}function s(e,t){if(!t)throw new u("No environment passed to template");var n=function(e,n,i,s,o,r){var a=t.VM.invokePartial.apply(this,arguments);if(null!=a)return a;if(t.compile){var l={helpers:s,partials:o,data:r};return o[n]=t.compile(e,{data:void 0!==r},t),o[n](i,l)}throw new u("The partial "+n+" could not be compiled when running in runtime-only mode")},i={escapeExpression:h.escapeExpression,invokePartial:n,programs:[],program:function(e,t,n){var i=this.programs[e];return n?i=r(e,t,n):i||(i=this.programs[e]=r(e,t)),i},merge:function(e,t){var n=e||t;return e&&t&&e!==t&&(n={},h.extend(n,t),h.extend(n,e)),n},programWithDepth:t.VM.programWithDepth,noop:t.VM.noop,compilerInfo:null};return function(n,s){s=s||{};var o,r,a=s.partial?s:t;s.partial||(o=s.helpers,r=s.partials);var l=e.call(i,a,n,o,r,s.data);return s.partial||t.VM.checkRevision(i.compilerInfo),l}}function o(e,t,n){var i=Array.prototype.slice.call(arguments,3),s=function(e,s){return s=s||{},t.apply(this,[e,s.data||n].concat(i))};return s.program=e,s.depth=i.length,s}function r(e,t,n){var i=function(e,i){return i=i||{},t(e,i.data||n)};return i.program=e,i.depth=0,i}function a(e,t,n,i,s,o){var r={partial:!0,helpers:i,partials:s,data:o};if(void 0===e)throw new u("The partial "+t+" could not be found");return e instanceof Function?e(n,r):void 0}function l(){return""}var c={},h=e,u=t,d=n.COMPILER_REVISION,f=n.REVISION_CHANGES;return c.checkRevision=i,c.template=s,c.programWithDepth=o,c.program=r,c.invokePartial=a,c.noop=l,c}(t,n,i),o=function(e,t,n,i,s){"use strict";var o,r=e,a=t,l=n,c=i,h=s,u=function(){var e=new r.HandlebarsEnvironment;return c.extend(e,r),e.SafeString=a,e.Exception=l,e.Utils=c,e.VM=h,e.template=function(t){return h.template(t,e)},e},d=u();return d.create=u,o=d}(i,e,n,t,s);return o}();this.wysihtml5=this.wysihtml5||{},this.wysihtml5.tpl=this.wysihtml5.tpl||{},this.wysihtml5.tpl.blockquote=Handlebars.template(function(e,t,n,i,s){function o(e,t){var n,i="";return i+="btn-"+u((n=e&&e.options,n=null==n||n===!1?n:n.toolbar,n=null==n||n===!1?n:n.size,typeof n===h?n.apply(e):n))}function r(e,t){return' \n      <span class="fa fa-quote-left"></span>\n    '}function a(e,t){return'\n      <span class="glyphicon glyphicon-quote"></span>\n    '}this.compilerInfo=[4,">= 1.0.0"],n=this.merge(n,e.helpers),s=s||{};var l,c="",h="function",u=this.escapeExpression,d=this;return c+='<li>\n  <a class="btn ',l=n["if"].call(t,(l=t&&t.options,l=null==l||l===!1?l:l.toolbar,null==l||l===!1?l:l.size),{hash:{},inverse:d.noop,fn:d.program(1,o,s),data:s}),(l||0===l)&&(c+=l),c+=' btn-default" data-wysihtml5-command="formatBlock" data-wysihtml5-command-value="blockquote" data-wysihtml5-display-format-name="false" tabindex="-1">\n    ',l=n["if"].call(t,(l=t&&t.options,l=null==l||l===!1?l:l.toolbar,null==l||l===!1?l:l.fa),{hash:{},inverse:d.program(5,a,s),fn:d.program(3,r,s),data:s}),(l||0===l)&&(c+=l),c+="\n  </a>\n</li>\n"}),this.wysihtml5.tpl.color=Handlebars.template(function(e,t,n,i,s){function o(e,t){var n,i="";return i+="btn-"+c((n=e&&e.options,n=null==n||n===!1?n:n.toolbar,n=null==n||n===!1?n:n.size,typeof n===l?n.apply(e):n))}this.compilerInfo=[4,">= 1.0.0"],n=this.merge(n,e.helpers),s=s||{};var r,a="",l="function",c=this.escapeExpression,h=this;return a+='<li class="dropdown">\n  <a class="btn btn-default dropdown-toggle ',r=n["if"].call(t,(r=t&&t.options,r=null==r||r===!1?r:r.toolbar,null==r||r===!1?r:r.size),{hash:{},inverse:h.noop,fn:h.program(1,o,s),data:s}),(r||0===r)&&(a+=r),a+='" data-toggle="dropdown" tabindex="-1">\n    <span class="current-color">'+c((r=t&&t.locale,r=null==r||r===!1?r:r.colours,r=null==r||r===!1?r:r.black,typeof r===l?r.apply(t):r))+'</span>\n    <b class="caret"></b>\n  </a>\n  <ul class="dropdown-menu">\n    <li><div class="wysihtml5-colors" data-wysihtml5-command-value="black"></div><a class="wysihtml5-colors-title" data-wysihtml5-command="foreColor" data-wysihtml5-command-value="black">'+c((r=t&&t.locale,r=null==r||r===!1?r:r.colours,r=null==r||r===!1?r:r.black,typeof r===l?r.apply(t):r))+'</a></li>\n    <li><div class="wysihtml5-colors" data-wysihtml5-command-value="silver"></div><a class="wysihtml5-colors-title" data-wysihtml5-command="foreColor" data-wysihtml5-command-value="silver">'+c((r=t&&t.locale,r=null==r||r===!1?r:r.colours,r=null==r||r===!1?r:r.silver,typeof r===l?r.apply(t):r))+'</a></li>\n    <li><div class="wysihtml5-colors" data-wysihtml5-command-value="gray"></div><a class="wysihtml5-colors-title" data-wysihtml5-command="foreColor" data-wysihtml5-command-value="gray">'+c((r=t&&t.locale,r=null==r||r===!1?r:r.colours,r=null==r||r===!1?r:r.gray,typeof r===l?r.apply(t):r))+'</a></li>\n    <li><div class="wysihtml5-colors" data-wysihtml5-command-value="maroon"></div><a class="wysihtml5-colors-title" data-wysihtml5-command="foreColor" data-wysihtml5-command-value="maroon">'+c((r=t&&t.locale,r=null==r||r===!1?r:r.colours,r=null==r||r===!1?r:r.maroon,typeof r===l?r.apply(t):r))+'</a></li>\n    <li><div class="wysihtml5-colors" data-wysihtml5-command-value="red"></div><a class="wysihtml5-colors-title" data-wysihtml5-command="foreColor" data-wysihtml5-command-value="red">'+c((r=t&&t.locale,r=null==r||r===!1?r:r.colours,r=null==r||r===!1?r:r.red,typeof r===l?r.apply(t):r))+'</a></li>\n    <li><div class="wysihtml5-colors" data-wysihtml5-command-value="purple"></div><a class="wysihtml5-colors-title" data-wysihtml5-command="foreColor" data-wysihtml5-command-value="purple">'+c((r=t&&t.locale,r=null==r||r===!1?r:r.colours,r=null==r||r===!1?r:r.purple,typeof r===l?r.apply(t):r))+'</a></li>\n    <li><div class="wysihtml5-colors" data-wysihtml5-command-value="green"></div><a class="wysihtml5-colors-title" data-wysihtml5-command="foreColor" data-wysihtml5-command-value="green">'+c((r=t&&t.locale,r=null==r||r===!1?r:r.colours,r=null==r||r===!1?r:r.green,typeof r===l?r.apply(t):r))+'</a></li>\n    <li><div class="wysihtml5-colors" data-wysihtml5-command-value="olive"></div><a class="wysihtml5-colors-title" data-wysihtml5-command="foreColor" data-wysihtml5-command-value="olive">'+c((r=t&&t.locale,r=null==r||r===!1?r:r.colours,r=null==r||r===!1?r:r.olive,typeof r===l?r.apply(t):r))+'</a></li>\n    <li><div class="wysihtml5-colors" data-wysihtml5-command-value="navy"></div><a class="wysihtml5-colors-title" data-wysihtml5-command="foreColor" data-wysihtml5-command-value="navy">'+c((r=t&&t.locale,r=null==r||r===!1?r:r.colours,r=null==r||r===!1?r:r.navy,typeof r===l?r.apply(t):r))+'</a></li>\n    <li><div class="wysihtml5-colors" data-wysihtml5-command-value="blue"></div><a class="wysihtml5-colors-title" data-wysihtml5-command="foreColor" data-wysihtml5-command-value="blue">'+c((r=t&&t.locale,r=null==r||r===!1?r:r.colours,r=null==r||r===!1?r:r.blue,typeof r===l?r.apply(t):r))+'</a></li>\n    <li><div class="wysihtml5-colors" data-wysihtml5-command-value="orange"></div><a class="wysihtml5-colors-title" data-wysihtml5-command="foreColor" data-wysihtml5-command-value="orange">'+c((r=t&&t.locale,r=null==r||r===!1?r:r.colours,r=null==r||r===!1?r:r.orange,typeof r===l?r.apply(t):r))+"</a></li>\n  </ul>\n</li>\n"}),this.wysihtml5.tpl.emphasis=Handlebars.template(function(e,t,n,i,s){function o(e,t){var n,i="";return i+="btn-"+h((n=e&&e.options,n=null==n||n===!1?n:n.toolbar,n=null==n||n===!1?n:n.size,typeof n===c?n.apply(e):n))}function r(e,t){var i,s="";return s+='\n    <a class="btn ',i=n["if"].call(e,(i=e&&e.options,i=null==i||i===!1?i:i.toolbar,null==i||i===!1?i:i.size),{hash:{},inverse:u.noop,fn:u.program(1,o,t),data:t}),(i||0===i)&&(s+=i),s+=' btn-default" data-wysihtml5-command="small" title="CTRL+S" tabindex="-1">'+h((i=e&&e.locale,
i=null==i||i===!1?i:i.emphasis,i=null==i||i===!1?i:i.small,typeof i===c?i.apply(e):i))+"</a>\n    "}this.compilerInfo=[4,">= 1.0.0"],n=this.merge(n,e.helpers),s=s||{};var a,l="",c="function",h=this.escapeExpression,u=this;return l+='<li>\n  <div class="btn-group">\n    <a class="btn ',a=n["if"].call(t,(a=t&&t.options,a=null==a||a===!1?a:a.toolbar,null==a||a===!1?a:a.size),{hash:{},inverse:u.noop,fn:u.program(1,o,s),data:s}),(a||0===a)&&(l+=a),l+=' btn-default" data-wysihtml5-command="bold" title="CTRL+B" tabindex="-1">'+h((a=t&&t.locale,a=null==a||a===!1?a:a.emphasis,a=null==a||a===!1?a:a.bold,typeof a===c?a.apply(t):a))+'</a>\n    <a class="btn ',a=n["if"].call(t,(a=t&&t.options,a=null==a||a===!1?a:a.toolbar,null==a||a===!1?a:a.size),{hash:{},inverse:u.noop,fn:u.program(1,o,s),data:s}),(a||0===a)&&(l+=a),l+=' btn-default" data-wysihtml5-command="italic" title="CTRL+I" tabindex="-1">'+h((a=t&&t.locale,a=null==a||a===!1?a:a.emphasis,a=null==a||a===!1?a:a.italic,typeof a===c?a.apply(t):a))+'</a>\n    <a class="btn ',a=n["if"].call(t,(a=t&&t.options,a=null==a||a===!1?a:a.toolbar,null==a||a===!1?a:a.size),{hash:{},inverse:u.noop,fn:u.program(1,o,s),data:s}),(a||0===a)&&(l+=a),l+=' btn-default" data-wysihtml5-command="underline" title="CTRL+U" tabindex="-1">'+h((a=t&&t.locale,a=null==a||a===!1?a:a.emphasis,a=null==a||a===!1?a:a.underline,typeof a===c?a.apply(t):a))+"</a>\n    ",a=n["if"].call(t,(a=t&&t.options,a=null==a||a===!1?a:a.toolbar,a=null==a||a===!1?a:a.emphasis,null==a||a===!1?a:a.small),{hash:{},inverse:u.noop,fn:u.program(3,r,s),data:s}),(a||0===a)&&(l+=a),l+="\n  </div>\n</li>\n"}),this.wysihtml5.tpl["font-styles"]=Handlebars.template(function(e,t,n,i,s){function o(e,t){var n,i="";return i+="btn-"+u((n=e&&e.options,n=null==n||n===!1?n:n.toolbar,n=null==n||n===!1?n:n.size,typeof n===h?n.apply(e):n))}function r(e,t){return'\n      <span class="fa fa-font"></span>\n    '}function a(e,t){return'\n      <span class="glyphicon glyphicon-font"></span>\n    '}this.compilerInfo=[4,">= 1.0.0"],n=this.merge(n,e.helpers),s=s||{};var l,c="",h="function",u=this.escapeExpression,d=this;return c+='<li class="dropdown">\n  <a class="btn btn-default dropdown-toggle ',l=n["if"].call(t,(l=t&&t.options,l=null==l||l===!1?l:l.toolbar,null==l||l===!1?l:l.size),{hash:{},inverse:d.noop,fn:d.program(1,o,s),data:s}),(l||0===l)&&(c+=l),c+='" data-toggle="dropdown">\n    ',l=n["if"].call(t,(l=t&&t.options,l=null==l||l===!1?l:l.toolbar,null==l||l===!1?l:l.fa),{hash:{},inverse:d.program(5,a,s),fn:d.program(3,r,s),data:s}),(l||0===l)&&(c+=l),c+='\n    <span class="current-font">'+u((l=t&&t.locale,l=null==l||l===!1?l:l.font_styles,l=null==l||l===!1?l:l.normal,typeof l===h?l.apply(t):l))+'</span>\n    <b class="caret"></b>\n  </a>\n  <ul class="dropdown-menu">\n    <li><a data-wysihtml5-command="formatBlock" data-wysihtml5-command-value="p" tabindex="-1">'+u((l=t&&t.locale,l=null==l||l===!1?l:l.font_styles,l=null==l||l===!1?l:l.normal,typeof l===h?l.apply(t):l))+'</a></li>\n    <li><a data-wysihtml5-command="formatBlock" data-wysihtml5-command-value="h1" tabindex="-1">'+u((l=t&&t.locale,l=null==l||l===!1?l:l.font_styles,l=null==l||l===!1?l:l.h1,typeof l===h?l.apply(t):l))+'</a></li>\n    <li><a data-wysihtml5-command="formatBlock" data-wysihtml5-command-value="h2" tabindex="-1">'+u((l=t&&t.locale,l=null==l||l===!1?l:l.font_styles,l=null==l||l===!1?l:l.h2,typeof l===h?l.apply(t):l))+'</a></li>\n    <li><a data-wysihtml5-command="formatBlock" data-wysihtml5-command-value="h3" tabindex="-1">'+u((l=t&&t.locale,l=null==l||l===!1?l:l.font_styles,l=null==l||l===!1?l:l.h3,typeof l===h?l.apply(t):l))+'</a></li>\n    <li><a data-wysihtml5-command="formatBlock" data-wysihtml5-command-value="h4" tabindex="-1">'+u((l=t&&t.locale,l=null==l||l===!1?l:l.font_styles,l=null==l||l===!1?l:l.h4,typeof l===h?l.apply(t):l))+'</a></li>\n    <li><a data-wysihtml5-command="formatBlock" data-wysihtml5-command-value="h5" tabindex="-1">'+u((l=t&&t.locale,l=null==l||l===!1?l:l.font_styles,l=null==l||l===!1?l:l.h5,typeof l===h?l.apply(t):l))+'</a></li>\n    <li><a data-wysihtml5-command="formatBlock" data-wysihtml5-command-value="h6" tabindex="-1">'+u((l=t&&t.locale,l=null==l||l===!1?l:l.font_styles,l=null==l||l===!1?l:l.h6,typeof l===h?l.apply(t):l))+"</a></li>\n  </ul>\n</li>\n"}),this.wysihtml5.tpl.html=Handlebars.template(function(e,t,n,i,s){function o(e,t){var n,i="";return i+="btn-"+u((n=e&&e.options,n=null==n||n===!1?n:n.toolbar,n=null==n||n===!1?n:n.size,typeof n===h?n.apply(e):n))}function r(e,t){return'\n        <span class="fa fa-pencil"></span>\n      '}function a(e,t){return'\n        <span class="glyphicon glyphicon-pencil"></span>\n      '}this.compilerInfo=[4,">= 1.0.0"],n=this.merge(n,e.helpers),s=s||{};var l,c="",h="function",u=this.escapeExpression,d=this;return c+='<li>\n  <div class="btn-group">\n    <a class="btn ',l=n["if"].call(t,(l=t&&t.options,l=null==l||l===!1?l:l.toolbar,null==l||l===!1?l:l.size),{hash:{},inverse:d.noop,fn:d.program(1,o,s),data:s}),(l||0===l)&&(c+=l),c+=' btn-default" data-wysihtml5-action="change_view" title="'+u((l=t&&t.locale,l=null==l||l===!1?l:l.html,l=null==l||l===!1?l:l.edit,typeof l===h?l.apply(t):l))+'" tabindex="-1">\n      ',l=n["if"].call(t,(l=t&&t.options,l=null==l||l===!1?l:l.toolbar,null==l||l===!1?l:l.fa),{hash:{},inverse:d.program(5,a,s),fn:d.program(3,r,s),data:s}),(l||0===l)&&(c+=l),c+="\n    </a>\n  </div>\n</li>\n"}),this.wysihtml5.tpl.image=Handlebars.template(function(e,t,n,i,s){function o(e,t){return"modal-sm"}function r(e,t){var n,i="";return i+="btn-"+d((n=e&&e.options,n=null==n||n===!1?n:n.toolbar,n=null==n||n===!1?n:n.size,typeof n===u?n.apply(e):n))}function a(e,t){return'\n      <span class="fa fa-file-image-o"></span>\n    '}function l(e,t){return'\n      <span class="glyphicon glyphicon-picture"></span>\n    '}this.compilerInfo=[4,">= 1.0.0"],n=this.merge(n,e.helpers),s=s||{};var c,h="",u="function",d=this.escapeExpression,f=this;return h+='<li>\n  <div class="bootstrap-wysihtml5-insert-image-modal modal fade" data-wysihtml5-dialog="insertImage">\n    <div class="modal-dialog ',c=n["if"].call(t,(c=t&&t.options,c=null==c||c===!1?c:c.toolbar,null==c||c===!1?c:c.smallmodals),{hash:{},inverse:f.noop,fn:f.program(1,o,s),data:s}),(c||0===c)&&(h+=c),h+='">\n      <div class="modal-content">\n        <div class="modal-header">\n          <a class="close" data-dismiss="modal">&times;</a>\n          <h3>'+d((c=t&&t.locale,c=null==c||c===!1?c:c.image,c=null==c||c===!1?c:c.insert,typeof c===u?c.apply(t):c))+'</h3>\n        </div>\n        <div class="modal-body">\n          <div class="form-group">\n            <input value="http://" class="bootstrap-wysihtml5-insert-image-url form-control" data-wysihtml5-dialog-field="src">\n          </div> \n        </div>\n        <div class="modal-footer">\n          <a class="btn btn-default" data-dismiss="modal" data-wysihtml5-dialog-action="cancel" href="#">'+d((c=t&&t.locale,c=null==c||c===!1?c:c.image,c=null==c||c===!1?c:c.cancel,typeof c===u?c.apply(t):c))+'</a>\n          <a class="btn btn-primary" data-dismiss="modal"  data-wysihtml5-dialog-action="save" href="#">'+d((c=t&&t.locale,c=null==c||c===!1?c:c.image,c=null==c||c===!1?c:c.insert,typeof c===u?c.apply(t):c))+'</a>\n        </div>\n      </div>\n    </div>\n  </div>\n  <a class="btn ',c=n["if"].call(t,(c=t&&t.options,c=null==c||c===!1?c:c.toolbar,null==c||c===!1?c:c.size),{hash:{},inverse:f.noop,fn:f.program(3,r,s),data:s}),(c||0===c)&&(h+=c),h+=' btn-default" data-wysihtml5-command="insertImage" title="'+d((c=t&&t.locale,c=null==c||c===!1?c:c.image,c=null==c||c===!1?c:c.insert,typeof c===u?c.apply(t):c))+'" tabindex="-1">\n    ',c=n["if"].call(t,(c=t&&t.options,c=null==c||c===!1?c:c.toolbar,null==c||c===!1?c:c.fa),{hash:{},inverse:f.program(7,l,s),fn:f.program(5,a,s),data:s}),(c||0===c)&&(h+=c),h+="\n  </a>\n</li>\n"}),this.wysihtml5.tpl.link=Handlebars.template(function(e,t,n,i,s){function o(e,t){return"modal-sm"}function r(e,t){var n,i="";return i+="btn-"+d((n=e&&e.options,n=null==n||n===!1?n:n.toolbar,n=null==n||n===!1?n:n.size,typeof n===u?n.apply(e):n))}function a(e,t){return'\n      <span class="fa fa-share-square-o"></span>\n    '}function l(e,t){return'\n      <span class="glyphicon glyphicon-share"></span>\n    '}this.compilerInfo=[4,">= 1.0.0"],n=this.merge(n,e.helpers),s=s||{};var c,h="",u="function",d=this.escapeExpression,f=this;return h+='<li>\n  <div class="bootstrap-wysihtml5-insert-link-modal modal fade" data-wysihtml5-dialog="createLink">\n    <div class="modal-dialog ',c=n["if"].call(t,(c=t&&t.options,c=null==c||c===!1?c:c.toolbar,null==c||c===!1?c:c.smallmodals),{hash:{},inverse:f.noop,fn:f.program(1,o,s),data:s}),(c||0===c)&&(h+=c),h+='">\n      <div class="modal-content">\n        <div class="modal-header">\n          <a class="close" data-dismiss="modal">&times;</a>\n          <h3>'+d((c=t&&t.locale,c=null==c||c===!1?c:c.link,c=null==c||c===!1?c:c.insert,typeof c===u?c.apply(t):c))+'</h3>\n        </div>\n        <div class="modal-body">\n          <div class="form-group">\n            <input value="http://" class="bootstrap-wysihtml5-insert-link-url form-control" data-wysihtml5-dialog-field="href">\n          </div> \n          <div class="checkbox">\n            <label> \n              <input type="checkbox" class="bootstrap-wysihtml5-insert-link-target" checked>'+d((c=t&&t.locale,c=null==c||c===!1?c:c.link,c=null==c||c===!1?c:c.target,typeof c===u?c.apply(t):c))+'\n            </label>\n          </div>\n        </div>\n        <div class="modal-footer">\n          <a class="btn btn-default" data-dismiss="modal" data-wysihtml5-dialog-action="cancel" href="#">'+d((c=t&&t.locale,c=null==c||c===!1?c:c.link,c=null==c||c===!1?c:c.cancel,typeof c===u?c.apply(t):c))+'</a>\n          <a href="#" class="btn btn-primary" data-dismiss="modal" data-wysihtml5-dialog-action="save">'+d((c=t&&t.locale,c=null==c||c===!1?c:c.link,c=null==c||c===!1?c:c.insert,typeof c===u?c.apply(t):c))+'</a>\n        </div>\n      </div>\n    </div>\n  </div>\n  <a class="btn ',c=n["if"].call(t,(c=t&&t.options,c=null==c||c===!1?c:c.toolbar,null==c||c===!1?c:c.size),{hash:{},inverse:f.noop,fn:f.program(3,r,s),data:s}),(c||0===c)&&(h+=c),h+=' btn-default" data-wysihtml5-command="createLink" title="'+d((c=t&&t.locale,c=null==c||c===!1?c:c.link,c=null==c||c===!1?c:c.insert,typeof c===u?c.apply(t):c))+'" tabindex="-1">\n    ',c=n["if"].call(t,(c=t&&t.options,c=null==c||c===!1?c:c.toolbar,null==c||c===!1?c:c.fa),{hash:{},inverse:f.program(7,l,s),fn:f.program(5,a,s),data:s}),(c||0===c)&&(h+=c),h+="\n  </a>\n</li>\n"}),this.wysihtml5.tpl.lists=Handlebars.template(function(e,t,n,i,s){function o(e,t){var n,i="";return i+="btn-"+v((n=e&&e.options,n=null==n||n===!1?n:n.toolbar,n=null==n||n===!1?n:n.size,typeof n===g?n.apply(e):n))}function r(e,t){return'\n      <span class="fa fa-list-ul"></span>\n    '}function a(e,t){return'\n      <span class="glyphicon glyphicon-list"></span>\n    '}function l(e,t){return'\n      <span class="fa fa-list-ol"></span>\n    '}function c(e,t){return'\n      <span class="glyphicon glyphicon-th-list"></span>\n    '}function h(e,t){return'\n      <span class="fa fa-outdent"></span>\n    '}function u(e,t){return'\n      <span class="glyphicon glyphicon-indent-right"></span>\n    '}function d(e,t){return'\n      <span class="fa fa-indent"></span>\n    '}function f(e,t){return'\n      <span class="glyphicon glyphicon-indent-left"></span>\n    '}this.compilerInfo=[4,">= 1.0.0"],n=this.merge(n,e.helpers),s=s||{};var p,m="",g="function",v=this.escapeExpression,y=this;return m+='<li>\n  <div class="btn-group">\n    <a class="btn ',p=n["if"].call(t,(p=t&&t.options,p=null==p||p===!1?p:p.toolbar,null==p||p===!1?p:p.size),{hash:{},inverse:y.noop,fn:y.program(1,o,s),data:s}),(p||0===p)&&(m+=p),m+=' btn-default" data-wysihtml5-command="insertUnorderedList" title="'+v((p=t&&t.locale,p=null==p||p===!1?p:p.lists,p=null==p||p===!1?p:p.unordered,typeof p===g?p.apply(t):p))+'" tabindex="-1">\n    ',p=n["if"].call(t,(p=t&&t.options,p=null==p||p===!1?p:p.toolbar,null==p||p===!1?p:p.fa),{hash:{},inverse:y.program(5,a,s),fn:y.program(3,r,s),data:s}),(p||0===p)&&(m+=p),m+='\n    </a>\n    <a class="btn ',p=n["if"].call(t,(p=t&&t.options,p=null==p||p===!1?p:p.toolbar,null==p||p===!1?p:p.size),{hash:{},inverse:y.noop,fn:y.program(1,o,s),data:s}),(p||0===p)&&(m+=p),m+=' btn-default" data-wysihtml5-command="insertOrderedList" title="'+v((p=t&&t.locale,p=null==p||p===!1?p:p.lists,p=null==p||p===!1?p:p.ordered,typeof p===g?p.apply(t):p))+'" tabindex="-1">\n    ',p=n["if"].call(t,(p=t&&t.options,p=null==p||p===!1?p:p.toolbar,null==p||p===!1?p:p.fa),{hash:{},inverse:y.program(9,c,s),fn:y.program(7,l,s),data:s}),(p||0===p)&&(m+=p),m+='\n    </a>\n    <a class="btn ',p=n["if"].call(t,(p=t&&t.options,p=null==p||p===!1?p:p.toolbar,null==p||p===!1?p:p.size),{hash:{},inverse:y.noop,fn:y.program(1,o,s),data:s}),(p||0===p)&&(m+=p),m+=' btn-default" data-wysihtml5-command="Outdent" title="'+v((p=t&&t.locale,p=null==p||p===!1?p:p.lists,p=null==p||p===!1?p:p.outdent,typeof p===g?p.apply(t):p))+'" tabindex="-1">\n    ',p=n["if"].call(t,(p=t&&t.options,p=null==p||p===!1?p:p.toolbar,null==p||p===!1?p:p.fa),{hash:{},inverse:y.program(13,u,s),fn:y.program(11,h,s),data:s}),(p||0===p)&&(m+=p),m+='\n    </a>\n    <a class="btn ',p=n["if"].call(t,(p=t&&t.options,p=null==p||p===!1?p:p.toolbar,null==p||p===!1?p:p.size),{hash:{},inverse:y.noop,fn:y.program(1,o,s),data:s}),(p||0===p)&&(m+=p),m+=' btn-default" data-wysihtml5-command="Indent" title="'+v((p=t&&t.locale,p=null==p||p===!1?p:p.lists,p=null==p||p===!1?p:p.indent,typeof p===g?p.apply(t):p))+'" tabindex="-1">\n    ',p=n["if"].call(t,(p=t&&t.options,p=null==p||p===!1?p:p.toolbar,null==p||p===!1?p:p.fa),{hash:{},inverse:y.program(17,f,s),fn:y.program(15,d,s),data:s}),(p||0===p)&&(m+=p),m+="\n    </a>\n  </div>\n</li>\n"}),function(e){"use strict";"function"==typeof define&&define.amd?define("bootstrap.wysihtml5",["jquery","wysihtml5","bootstrap","bootstrap.wysihtml5.templates","bootstrap.wysihtml5.commands"],e):e(jQuery,wysihtml5)}(function(e,t){"use strict";var n=function(e,t){var n=function(e,n,i){if(t.tpl[e])return t.tpl[e]({locale:n,options:i})},i=function(n,i){this.el=n;var s=e.extend(!0,{},o,i);for(var r in s.customTemplates)s.customTemplates.hasOwnProperty(r)&&(t.tpl[r]=s.customTemplates[r]);this.toolbar=this.createToolbar(n,s),this.editor=this.createEditor(s)};i.prototype={constructor:i,createEditor:function(t){t=t||{},t=e.extend(!0,{},t),t.toolbar=this.toolbar[0],this.initializeEditor(this.el[0],t)},initializeEditor:function(e,n){var i=new t.Editor(this.el[0],n);if(i.on("beforeload",this.syncBootstrapDialogEvents),i.on("beforeload",this.loadParserRules),i.composer.editableArea.contentDocument?this.addMoreShortcuts(i,i.composer.editableArea.contentDocument.body||i.composer.editableArea.contentDocument,n.shortcuts):this.addMoreShortcuts(i,i.composer.editableArea,n.shortcuts),n&&n.events)for(var s in n.events)n.events.hasOwnProperty(s)&&i.on(s,n.events[s]);return i},loadParserRules:function(){"string"===e.type(this.config.parserRules)&&e.ajax({dataType:"json",url:this.config.parserRules,context:this,error:function(e,t,n){console.log(n)},success:function(e){this.config.parserRules=e,console.log("parserrules loaded")}}),this.config.pasteParserRulesets&&"string"===e.type(this.config.pasteParserRulesets)&&e.ajax({dataType:"json",url:this.config.pasteParserRulesets,context:this,error:function(e,t,n){console.log(n)},success:function(e){this.config.pasteParserRulesets=e}})},syncBootstrapDialogEvents:function(){var t=this;e.map(this.toolbar.commandMapping,function(e){return[e]}).filter(function(e){return e.dialog}).map(function(e){return e.dialog}).forEach(function(n){n.on("show",function(){e(this.container).modal("show")}),n.on("hide",function(){e(this.container).modal("hide"),setTimeout(t.composer.focus,0)}),e(n.container).on("shown.bs.modal",function(){e(this).find("input, select, textarea").first().focus()})}),this.on("change_view",function(){e(this.toolbar.container.children).find("a.btn").not('[data-wysihtml5-action="change_view"]').toggleClass("disabled")})},createToolbar:function(t,i){var s=this,a=e("<ul/>",{"class":"wysihtml5-toolbar",style:"display:none"}),l=i.locale||o.locale||"en";r.hasOwnProperty(l)||(console.debug("Locale '"+l+"' not found. Available locales are: "+Object.keys(r)+". Falling back to 'en'."),l="en");var c=e.extend(!0,{},r.en,r[l]);for(var h in i.toolbar)i.toolbar[h]&&a.append(n(h,c,i));return a.find('a[data-wysihtml5-command="formatBlock"]').click(function(t){var n=t.delegateTarget||t.target||t.srcElement,i=e(n),o=i.data("wysihtml5-display-format-name"),r=i.data("wysihtml5-format-name")||i.html();void 0!==o&&"true"!==o||s.toolbar.find(".current-font").text(r)}),a.find('a[data-wysihtml5-command="foreColor"]').click(function(t){var n=t.target||t.srcElement,i=e(n);s.toolbar.find(".current-color").text(i.html())}),this.el.before(a),a},addMoreShortcuts:function(e,n,i){t.dom.observe(n,"keydown",function(n){var s=n.keyCode,o=i[s];if((n.ctrlKey||n.metaKey||n.altKey)&&o&&t.commands[o]){var r=e.toolbar.commandMapping[o+":null"];r&&r.dialog&&!r.state?r.dialog.show():t.commands[o].exec(e.composer,o),n.preventDefault()}})}};var s={resetDefaults:function(){e.fn.wysihtml5.defaultOptions=e.extend(!0,{},e.fn.wysihtml5.defaultOptionsCache)},bypassDefaults:function(t){return this.each(function(){var n=e(this);n.data("wysihtml5",new i(n,t))})},shallowExtend:function(t){var n=e.extend({},e.fn.wysihtml5.defaultOptions,t||{},e(this).data()),i=this;return s.bypassDefaults.apply(i,[n])},deepExtend:function(t){var n=e.extend(!0,{},e.fn.wysihtml5.defaultOptions,t||{}),i=this;return s.bypassDefaults.apply(i,[n])},init:function(e){var t=this;return s.shallowExtend.apply(t,[e])}};e.fn.wysihtml5=function(t){return s[t]?s[t].apply(this,Array.prototype.slice.call(arguments,1)):"object"!=typeof t&&t?void e.error("Method "+t+" does not exist on jQuery.wysihtml5"):s.init.apply(this,arguments)},e.fn.wysihtml5.Constructor=i;var o=e.fn.wysihtml5.defaultOptions={toolbar:{"font-styles":!0,color:!1,emphasis:{small:!0},blockquote:!0,lists:!0,html:!1,link:!0,image:!0,smallmodals:!1},useLineBreaks:!1,parserRules:{classes:{"wysiwyg-color-silver":1,"wysiwyg-color-gray":1,"wysiwyg-color-white":1,"wysiwyg-color-maroon":1,"wysiwyg-color-red":1,"wysiwyg-color-purple":1,"wysiwyg-color-fuchsia":1,"wysiwyg-color-green":1,"wysiwyg-color-lime":1,"wysiwyg-color-olive":1,"wysiwyg-color-yellow":1,"wysiwyg-color-navy":1,"wysiwyg-color-blue":1,"wysiwyg-color-teal":1,"wysiwyg-color-aqua":1,"wysiwyg-color-orange":1},tags:{b:{},i:{},strong:{},em:{},p:{},br:{},ol:{},ul:{},li:{},h1:{},h2:{},h3:{},h4:{},h5:{},h6:{},blockquote:{},u:1,img:{check_attributes:{width:"numbers",alt:"alt",src:"url",height:"numbers"}},a:{check_attributes:{href:"url"},set_attributes:{target:"_blank",rel:"nofollow"}},span:1,div:1,small:1,code:1,pre:1}},locale:"en",shortcuts:{83:"small",75:"createLink"}};"undefined"==typeof e.fn.wysihtml5.defaultOptionsCache&&(e.fn.wysihtml5.defaultOptionsCache=e.extend(!0,{},e.fn.wysihtml5.defaultOptions));var r=e.fn.wysihtml5.locale={}};n(e,t)}),function(e){e.commands.small={exec:function(t,n){return e.commands.formatInline.exec(t,n,"small")},state:function(t,n){return e.commands.formatInline.state(t,n,"small")}}}(wysihtml5),function(e){"function"==typeof define&&define.amd?define("bootstrap.wysihtml5.en-US",["jquery","bootstrap.wysihtml5"],e):e(jQuery)}(function(e){e.fn.wysihtml5.locale.en=e.fn.wysihtml5.locale["en-US"]={font_styles:{normal:"Tipo de texto",h1:"Heading 1",h2:"Heading 2",h3:"Heading 3",h4:"Heading 4",h5:"Heading 5",h6:"Heading 6"},emphasis:{bold:"Bold",italic:"Italic",underline:"Underline",small:"Small"},lists:{unordered:"Unordered list",ordered:"Ordered list",outdent:"Outdent",indent:"Indent"},link:{insert:"Inserir link",cancel:"Cancelar",target:"Abrir link em nova janela"},image:{insert:"Inserir imagem",cancel:"Cancelar"},html:{edit:"Editar HTML"},colours:{black:"Black",silver:"Silver",gray:"Grey",maroon:"Maroon",red:"Red",purple:"Purple",green:"Green",olive:"Olive",navy:"Navy",blue:"Blue",orange:"Orange"}}}),function(e,t,n){var i=function(i){function s(e){var t,n,o={};i.each(e,function(i){(t=i.match(/^([^A-Z]+?)([A-Z])/))&&-1!=="a aa ai ao as b fn i m o s ".indexOf(t[1]+" ")&&(n=i.replace(t[0],t[2].toLowerCase()),o[n]=i,"o"===t[1]&&s(e[i]))}),e._hungarianMap=o}function o(e,t,r){e._hungarianMap||s(e);var a;i.each(t,function(s){a=e._hungarianMap[s],a===n||!r&&t[a]!==n||("o"===a.charAt(0)?(t[a]||(t[a]={}),i.extend(!0,t[a],t[s]),o(e[a],t[a],r)):t[a]=t[s])})}function r(e){var t=Ve.defaults.oLanguage,n=e.sZeroRecords;!e.sEmptyTable&&n&&"No data available in table"===t.sEmptyTable&&Me(e,e,"sZeroRecords","sEmptyTable"),!e.sLoadingRecords&&n&&"Loading..."===t.sLoadingRecords&&Me(e,e,"sZeroRecords","sLoadingRecords"),e.sInfoThousands&&(e.sThousands=e.sInfoThousands),(e=e.sDecimal)&&qe(e)}function a(e){if(pt(e,"ordering","bSort"),pt(e,"orderMulti","bSortMulti"),pt(e,"orderClasses","bSortClasses"),pt(e,"orderCellsTop","bSortCellsTop"),pt(e,"order","aaSorting"),pt(e,"orderFixed","aaSortingFixed"),pt(e,"paging","bPaginate"),pt(e,"pagingType","sPaginationType"),pt(e,"pageLength","iDisplayLength"),pt(e,"searching","bFilter"),e=e.aoSearchCols)for(var t=0,n=e.length;t<n;t++)e[t]&&o(Ve.models.oSearch,e[t])}function l(e){pt(e,"orderable","bSortable"),pt(e,"orderData","aDataSort"),pt(e,"orderSequence","asSorting"),pt(e,"orderDataType","sortDataType");var t=e.aDataSort;t&&!i.isArray(t)&&(e.aDataSort=[t])}function c(e){var e=e.oBrowser,t=i("<div/>").css({position:"absolute",top:0,left:0,height:1,width:1,overflow:"hidden"}).append(i("<div/>").css({position:"absolute",top:1,left:1,width:100,overflow:"scroll"}).append(i('<div class="test"/>').css({width:"100%",height:10}))).appendTo("body"),n=t.find(".test");e.bScrollOversize=100===n[0].offsetWidth,e.bScrollbarLeft=1!==Math.round(n.offset().left),t.remove()}function h(e,t,i,s,o,r){var a,l=!1;for(i!==n&&(a=i,l=!0);s!==o;)e.hasOwnProperty(s)&&(a=l?t(a,e[s],s,e):e[s],l=!0,s+=r);return a}function u(e,n){var s=Ve.defaults.column,o=e.aoColumns.length,s=i.extend({},Ve.models.oColumn,s,{nTh:n?n:t.createElement("th"),sTitle:s.sTitle?s.sTitle:n?n.innerHTML:"",aDataSort:s.aDataSort?s.aDataSort:[o],mData:s.mData?s.mData:o,idx:o});e.aoColumns.push(s),s=e.aoPreSearchCols,s[o]=i.extend({},Ve.models.oSearch,s[o]),d(e,o,i(n).data())}function d(e,t,s){var t=e.aoColumns[t],r=e.oClasses,a=i(t.nTh);if(!t.sWidthOrig){t.sWidthOrig=a.attr("width")||null;var c=(a.attr("style")||"").match(/width:\s*(\d+[pxem%]+)/);c&&(t.sWidthOrig=c[1])}s!==n&&null!==s&&(l(s),o(Ve.defaults.column,s),s.mDataProp!==n&&!s.mData&&(s.mData=s.mDataProp),s.sType&&(t._sManualType=s.sType),s.className&&!s.sClass&&(s.sClass=s.className),i.extend(t,s),Me(t,s,"sWidth","sWidthOrig"),s.iDataSort!==n&&(t.aDataSort=[s.iDataSort]),Me(t,s,"aDataSort"));var h=t.mData,u=S(h),d=t.mRender?S(t.mRender):null,s=function(e){return"string"==typeof e&&-1!==e.indexOf("@")};t._bAttrSrc=i.isPlainObject(h)&&(s(h.sort)||s(h.type)||s(h.filter)),t.fnGetData=function(e,t,i){var s=u(e,t,n,i);return d&&t?d(s,t,e,i):s},t.fnSetData=function(e,t,n){return D(h)(e,t,n)},"number"!=typeof h&&(e._rowReadObject=!0),e.oFeatures.bSort||(t.bSortable=!1,a.addClass(r.sSortableNone)),e=-1!==i.inArray("asc",t.asSorting),s=-1!==i.inArray("desc",t.asSorting),t.bSortable&&(e||s)?e&&!s?(t.sSortingClass=r.sSortableAsc,t.sSortingClassJUI=r.sSortJUIAscAllowed):!e&&s?(t.sSortingClass=r.sSortableDesc,t.sSortingClassJUI=r.sSortJUIDescAllowed):(t.sSortingClass=r.sSortable,t.sSortingClassJUI=r.sSortJUI):(t.sSortingClass=r.sSortableNone,t.sSortingClassJUI="")}function f(e){if(!1!==e.oFeatures.bAutoWidth){var t=e.aoColumns;ge(e);for(var n=0,i=t.length;n<i;n++)t[n].nTh.style.width=t[n].sWidth}t=e.oScroll,(""!==t.sY||""!==t.sX)&&pe(e),ze(e,null,"column-sizing",[e])}function p(e,t){var n=v(e,"bVisible");return"number"==typeof n[t]?n[t]:null}function m(e,t){var n=v(e,"bVisible"),n=i.inArray(t,n);return-1!==n?n:null}function g(e){return v(e,"bVisible").length}function v(e,t){var n=[];return i.map(e.aoColumns,function(e,i){e[t]&&n.push(i)}),n}function y(e){var t,i,s,o,r,a,l,c,h,u=e.aoColumns,d=e.aoData,f=Ve.ext.type.detect;for(t=0,i=u.length;t<i;t++)if(l=u[t],h=[],!l.sType&&l._sManualType)l.sType=l._sManualType;else if(!l.sType){for(s=0,o=f.length;s<o;s++){for(r=0,a=d.length;r<a&&(h[r]===n&&(h[r]=C(e,r,t,"type")),c=f[s](h[r],e),c||s===f.length-1)&&"html"!==c;r++);if(c){l.sType=c;break}}l.sType||(l.sType="string")}}function b(e,t,s,o){var r,a,l,c,h,d,f=e.aoColumns;if(t)for(r=t.length-1;0<=r;r--){d=t[r];var p=d.targets!==n?d.targets:d.aTargets;for(i.isArray(p)||(p=[p]),a=0,l=p.length;a<l;a++)if("number"==typeof p[a]&&0<=p[a]){for(;f.length<=p[a];)u(e);o(p[a],d)}else if("number"==typeof p[a]&&0>p[a])o(f.length+p[a],d);else if("string"==typeof p[a])for(c=0,h=f.length;c<h;c++)("_all"==p[a]||i(f[c].nTh).hasClass(p[a]))&&o(c,d)}if(s)for(r=0,e=s.length;r<e;r++)o(r,s[r])}function w(e,t,n,s){var o=e.aoData.length,r=i.extend(!0,{},Ve.models.oRow,{src:n?"dom":"data"});r._aData=t,e.aoData.push(r);for(var t=e.aoColumns,r=0,a=t.length;r<a;r++)n&&x(e,o,r,C(e,o,r)),t[r].sType=null;return e.aiDisplayMaster.push(o),(n||!e.oFeatures.bDeferRender)&&R(e,o,n,s),o}function _(e,t){var n;return t instanceof i||(t=i(t)),t.map(function(t,i){return n=I(e,i),w(e,n.data,i,n.cells)})}function C(e,t,i,s){var o=e.iDraw,r=e.aoColumns[i],a=e.aoData[t]._aData,l=r.sDefaultContent,i=r.fnGetData(a,s,{settings:e,row:t,col:i});if(i===n)return e.iDrawError!=o&&null===l&&(Oe(e,0,"Requested unknown parameter "+("function"==typeof r.mData?"{function}":"'"+r.mData+"'")+" for row "+t,4),e.iDrawError=o),l;if(i!==a&&null!==i||null===l){if("function"==typeof i)return i.call(a)}else i=l;return null===i&&"display"==s?"":i}function x(e,t,n,i){e.aoColumns[n].fnSetData(e.aoData[t]._aData,i,{settings:e,row:t,col:n})}function T(e){return i.map(e.match(/(\\.|[^\.])+/g),function(e){return e.replace(/\\./g,".")})}function S(e){if(i.isPlainObject(e)){var t={};return i.each(e,function(e,n){n&&(t[e]=S(n))}),function(e,i,s,o){var r=t[i]||t._;return r!==n?r(e,i,s,o):e}}if(null===e)return function(e){return e};if("function"==typeof e)return function(t,n,i,s){return e(t,n,i,s)};if("string"==typeof e&&(-1!==e.indexOf(".")||-1!==e.indexOf("[")||-1!==e.indexOf("("))){var s=function(e,t,i){var o,r;if(""!==i){r=T(i);for(var a=0,l=r.length;a<l;a++){if(i=r[a].match(mt),o=r[a].match(gt),i){for(r[a]=r[a].replace(mt,""),""!==r[a]&&(e=e[r[a]]),o=[],r.splice(0,a+1),r=r.join("."),a=0,l=e.length;a<l;a++)o.push(s(e[a],t,r));e=i[0].substring(1,i[0].length-1),e=""===e?o:o.join(e);break}if(o)r[a]=r[a].replace(gt,""),e=e[r[a]]();else{if(null===e||e[r[a]]===n)return n;e=e[r[a]]}}}return e};return function(t,n){return s(t,n,e)}}return function(t){return t[e]}}function D(e){if(i.isPlainObject(e))return D(e._);if(null===e)return function(){};if("function"==typeof e)return function(t,n,i){e(t,"set",n,i)};if("string"==typeof e&&(-1!==e.indexOf(".")||-1!==e.indexOf("[")||-1!==e.indexOf("("))){var t=function(e,i,s){var o,s=T(s);o=s[s.length-1];for(var r,a,l=0,c=s.length-1;l<c;l++){if(r=s[l].match(mt),a=s[l].match(gt),r){for(s[l]=s[l].replace(mt,""),e[s[l]]=[],o=s.slice(),o.splice(0,l+1),r=o.join("."),a=0,c=i.length;a<c;a++)o={},t(o,i[a],r),e[s[l]].push(o);return}a&&(s[l]=s[l].replace(gt,""),e=e[s[l]](i)),null!==e[s[l]]&&e[s[l]]!==n||(e[s[l]]={}),e=e[s[l]]}o.match(gt)?e[o.replace(gt,"")](i):e[o.replace(mt,"")]=i};return function(n,i){return t(n,i,e)}}return function(t,n){t[e]=n}}function E(e){return ct(e.aoData,"_aData")}function k(e){e.aoData.length=0,e.aiDisplayMaster.length=0,e.aiDisplay.length=0}function N(e,t,i){for(var s=-1,o=0,r=e.length;o<r;o++)e[o]==t?s=o:e[o]>t&&e[o]--;-1!=s&&i===n&&e.splice(s,1)}function A(e,t,i,s){var o,r=e.aoData[t],a=function(n,i){for(;n.childNodes.length;)n.removeChild(n.firstChild);n.innerHTML=C(e,t,i,"display")};if("dom"!==i&&(i&&"auto"!==i||"dom"!==r.src)){var l=r.anCells;if(l)if(s!==n)a(l[s],s);else for(i=0,o=l.length;i<o;i++)a(l[i],i)}else r._aData=I(e,r,s,s===n?n:r._aData).data;if(r._aSortData=null,r._aFilterData=null,a=e.aoColumns,s!==n)a[s].sType=null;else{for(i=0,o=a.length;i<o;i++)a[i].sType=null;P(r)}}function I(e,t,s,o){var r,a,l=[],c=t.firstChild,h=0,u=e.aoColumns,d=e._rowReadObject,o=o||d?{}:[],f=function(e,t){if("string"==typeof e){var n=e.indexOf("@");-1!==n&&(n=e.substring(n+1),D(e)(o,t.getAttribute(n)))}},e=function(e){s!==n&&s!==h||(r=u[h],a=i.trim(e.innerHTML),r&&r._bAttrSrc?(D(r.mData._)(o,a),f(r.mData.sort,e),f(r.mData.type,e),f(r.mData.filter,e)):d?(r._setter||(r._setter=D(r.mData)),r._setter(o,a)):o[h]=a),h++};if(c)for(;c;)t=c.nodeName.toUpperCase(),"TD"!=t&&"TH"!=t||(e(c),l.push(c)),c=c.nextSibling;else for(l=t.anCells,c=0,t=l.length;c<t;c++)e(l[c]);return{data:o,cells:l}}function R(e,n,i,s){var o,r,a,l,c,h=e.aoData[n],u=h._aData,d=[];if(null===h.nTr){for(o=i||t.createElement("tr"),h.nTr=o,h.anCells=d,o._DT_RowIndex=n,P(h),l=0,c=e.aoColumns.length;l<c;l++)a=e.aoColumns[l],r=i?s[l]:t.createElement(a.sCellType),d.push(r),i&&!a.mRender&&a.mData===l||(r.innerHTML=C(e,n,l,"display")),a.sClass&&(r.className+=" "+a.sClass),a.bVisible&&!i?o.appendChild(r):!a.bVisible&&i&&r.parentNode.removeChild(r),a.fnCreatedCell&&a.fnCreatedCell.call(e.oInstance,r,C(e,n,l),u,n,l);ze(e,"aoRowCreatedCallback",null,[o,u,n])}h.nTr.setAttribute("role","row")}function P(e){var t=e.nTr,n=e._aData;if(t){if(n.DT_RowId&&(t.id=n.DT_RowId),n.DT_RowClass){var s=n.DT_RowClass.split(" ");e.__rowc=e.__rowc?ft(e.__rowc.concat(s)):s,i(t).removeClass(e.__rowc.join(" ")).addClass(n.DT_RowClass)}n.DT_RowAttr&&i(t).attr(n.DT_RowAttr),n.DT_RowData&&i(t).data(n.DT_RowData)}}function O(e){var t,n,s,o,r,a=e.nTHead,l=e.nTFoot,c=0===i("th, td",a).length,h=e.oClasses,u=e.aoColumns;for(c&&(o=i("<tr/>").appendTo(a)),t=0,n=u.length;t<n;t++)r=u[t],s=i(r.nTh).addClass(r.sClass),c&&s.appendTo(o),e.oFeatures.bSort&&(s.addClass(r.sSortingClass),!1!==r.bSortable&&(s.attr("tabindex",e.iTabIndex).attr("aria-controls",e.sTableId),ke(e,r.nTh,t))),r.sTitle!=s.html()&&s.html(r.sTitle),Be(e,"header")(e,s,r,h);if(c&&z(e.aoHeader,a),i(a).find(">tr").attr("role","row"),i(a).find(">tr>th, >tr>td").addClass(h.sHeaderTH),i(l).find(">tr>th, >tr>td").addClass(h.sFooterTH),null!==l)for(e=e.aoFooter[0],t=0,n=e.length;t<n;t++)r=u[t],r.nTf=e[t].cell,r.sClass&&i(r.nTf).addClass(r.sClass)}function M(e,t,s){var o,r,a,l,c=[],h=[],u=e.aoColumns.length;if(t){for(s===n&&(s=!1),o=0,r=t.length;o<r;o++){for(c[o]=t[o].slice(),c[o].nTr=t[o].nTr,a=u-1;0<=a;a--)!e.aoColumns[a].bVisible&&!s&&c[o].splice(a,1);h.push([])}for(o=0,r=c.length;o<r;o++){if(e=c[o].nTr)for(;a=e.firstChild;)e.removeChild(a);for(a=0,t=c[o].length;a<t;a++)if(l=u=1,h[o][a]===n){for(e.appendChild(c[o][a].cell),h[o][a]=1;c[o+u]!==n&&c[o][a].cell==c[o+u][a].cell;)h[o+u][a]=1,u++;for(;c[o][a+l]!==n&&c[o][a].cell==c[o][a+l].cell;){for(s=0;s<u;s++)h[o+s][a+l]=1;l++}i(c[o][a].cell).attr("rowspan",u).attr("colspan",l)}}}}function L(e){var t=ze(e,"aoPreDrawCallback","preDraw",[e]);if(-1!==i.inArray(!1,t))de(e,!1);else{var t=[],s=0,o=e.asStripeClasses,r=o.length,a=e.oLanguage,l=e.iInitDisplayStart,c="ssp"==je(e),h=e.aiDisplay;e.bDrawing=!0,l!==n&&-1!==l&&(e._iDisplayStart=c?l:l>=e.fnRecordsDisplay()?0:l,e.iInitDisplayStart=-1);var l=e._iDisplayStart,u=e.fnDisplayEnd();if(e.bDeferLoading)e.bDeferLoading=!1,e.iDraw++,de(e,!1);else if(c){if(!e.bDestroying&&!j(e))return}else e.iDraw++;if(0!==h.length)for(a=c?e.aoData.length:u,c=c?0:l;c<a;c++){var d=h[c],f=e.aoData[d];if(null===f.nTr&&R(e,d),d=f.nTr,0!==r){var p=o[s%r];f._sRowStripe!=p&&(i(d).removeClass(f._sRowStripe).addClass(p),f._sRowStripe=p)}ze(e,"aoRowCallback",null,[d,f._aData,s,c]),t.push(d),s++}else s=a.sZeroRecords,1==e.iDraw&&"ajax"==je(e)?s=a.sLoadingRecords:a.sEmptyTable&&0===e.fnRecordsTotal()&&(s=a.sEmptyTable),t[0]=i("<tr/>",{"class":r?o[0]:""}).append(i("<td />",{valign:"top",
colSpan:g(e),"class":e.oClasses.sRowEmpty}).html(s))[0];ze(e,"aoHeaderCallback","header",[i(e.nTHead).children("tr")[0],E(e),l,u,h]),ze(e,"aoFooterCallback","footer",[i(e.nTFoot).children("tr")[0],E(e),l,u,h]),o=i(e.nTBody),o.children().detach(),o.append(i(t)),ze(e,"aoDrawCallback","draw",[e]),e.bSorted=!1,e.bFiltered=!1,e.bDrawing=!1}}function H(e,t){var n=e.oFeatures,i=n.bFilter;n.bSort&&Se(e),i?Y(e,e.oPreviousSearch):e.aiDisplay=e.aiDisplayMaster.slice(),!0!==t&&(e._iDisplayStart=0),e._drawHold=t,L(e),e._drawHold=!1}function F(e){var t=e.oClasses,n=i(e.nTable),n=i("<div/>").insertBefore(n),s=e.oFeatures,o=i("<div/>",{id:e.sTableId+"_wrapper","class":t.sWrapper+(e.nTFoot?"":" "+t.sNoFooter)});e.nHolding=n[0],e.nTableWrapper=o[0],e.nTableReinsertBefore=e.nTable.nextSibling;for(var r,a,l,c,h,u,d=e.sDom.split(""),f=0;f<d.length;f++){if(r=null,a=d[f],"<"==a){if(l=i("<div/>")[0],c=d[f+1],"'"==c||'"'==c){for(h="",u=2;d[f+u]!=c;)h+=d[f+u],u++;"H"==h?h=t.sJUIHeader:"F"==h&&(h=t.sJUIFooter),-1!=h.indexOf(".")?(c=h.split("."),l.id=c[0].substr(1,c[0].length-1),l.className=c[1]):"#"==h.charAt(0)?l.id=h.substr(1,h.length-1):l.className=h,f+=u}o.append(l),o=i(l)}else if(">"==a)o=o.parent();else if("l"==a&&s.bPaginate&&s.bLengthChange)r=le(e);else if("f"==a&&s.bFilter)r=V(e);else if("r"==a&&s.bProcessing)r=ue(e);else if("t"==a)r=fe(e);else if("i"==a&&s.bInfo)r=ne(e);else if("p"==a&&s.bPaginate)r=ce(e);else if(0!==Ve.ext.feature.length)for(l=Ve.ext.feature,u=0,c=l.length;u<c;u++)if(a==l[u].cFeature){r=l[u].fnInit(e);break}r&&(l=e.aanFeatures,l[a]||(l[a]=[]),l[a].push(r),o.append(r))}n.replaceWith(o)}function z(e,t){var n,s,o,r,a,l,c,h,u,d,f=i(t).children("tr");for(e.splice(0,e.length),o=0,l=f.length;o<l;o++)e.push([]);for(o=0,l=f.length;o<l;o++)for(n=f[o],s=n.firstChild;s;){if("TD"==s.nodeName.toUpperCase()||"TH"==s.nodeName.toUpperCase()){for(h=1*s.getAttribute("colspan"),u=1*s.getAttribute("rowspan"),h=h&&0!==h&&1!==h?h:1,u=u&&0!==u&&1!==u?u:1,r=0,a=e[o];a[r];)r++;for(c=r,d=1===h,a=0;a<h;a++)for(r=0;r<u;r++)e[o+r][c+a]={cell:s,unique:d},e[o+r].nTr=n}s=s.nextSibling}}function W(e,t,n){var i=[];n||(n=e.aoHeader,t&&(n=[],z(n,t)));for(var t=0,s=n.length;t<s;t++)for(var o=0,r=n[t].length;o<r;o++)!n[t][o].unique||i[o]&&e.bSortCellsTop||(i[o]=n[t][o].cell);return i}function B(e,t,n){if(ze(e,"aoServerParams","serverParams",[t]),t&&i.isArray(t)){var s={},o=/(.*?)\[\]$/;i.each(t,function(e,t){var n=t.name.match(o);n?(n=n[0],s[n]||(s[n]=[]),s[n].push(t.value)):s[t.name]=t.value}),t=s}var r,a=e.ajax,l=e.oInstance,c=function(t){ze(e,null,"xhr",[e,t,e.jqXHR]),n(t)};if(i.isPlainObject(a)&&a.data){r=a.data;var h=i.isFunction(r)?r(t,e):r,t=i.isFunction(r)&&h?h:i.extend(!0,t,h);delete a.data}h={data:t,success:function(t){var n=t.error||t.sError;n&&Oe(e,0,n),e.json=t,c(t)},dataType:"json",cache:!1,type:e.sServerMethod,error:function(t,n){var s=ze(e,null,"xhr",[e,null,e.jqXHR]);-1===i.inArray(!0,s)&&("parsererror"==n?Oe(e,0,"Invalid JSON response",1):4===t.readyState&&Oe(e,0,"Ajax error",7)),de(e,!1)}},e.oAjaxData=t,ze(e,null,"preXhr",[e,t]),e.fnServerData?e.fnServerData.call(l,e.sAjaxSource,i.map(t,function(e,t){return{name:t,value:e}}),c,e):e.sAjaxSource||"string"==typeof a?e.jqXHR=i.ajax(i.extend(h,{url:a||e.sAjaxSource})):i.isFunction(a)?e.jqXHR=a.call(l,t,c,e):(e.jqXHR=i.ajax(i.extend(h,a)),a.data=r)}function j(e){return!e.bAjaxDataGet||(e.iDraw++,de(e,!0),B(e,$(e),function(t){q(e,t)}),!1)}function $(e){var t,n,s,o,r=e.aoColumns,a=r.length,l=e.oFeatures,c=e.oPreviousSearch,h=e.aoPreSearchCols,u=[],d=Te(e);t=e._iDisplayStart,n=!1!==l.bPaginate?e._iDisplayLength:-1;var f=function(e,t){u.push({name:e,value:t})};f("sEcho",e.iDraw),f("iColumns",a),f("sColumns",ct(r,"sName").join(",")),f("iDisplayStart",t),f("iDisplayLength",n);var p={draw:e.iDraw,columns:[],order:[],start:t,length:n,search:{value:c.sSearch,regex:c.bRegex}};for(t=0;t<a;t++)s=r[t],o=h[t],n="function"==typeof s.mData?"function":s.mData,p.columns.push({data:n,name:s.sName,searchable:s.bSearchable,orderable:s.bSortable,search:{value:o.sSearch,regex:o.bRegex}}),f("mDataProp_"+t,n),l.bFilter&&(f("sSearch_"+t,o.sSearch),f("bRegex_"+t,o.bRegex),f("bSearchable_"+t,s.bSearchable)),l.bSort&&f("bSortable_"+t,s.bSortable);return l.bFilter&&(f("sSearch",c.sSearch),f("bRegex",c.bRegex)),l.bSort&&(i.each(d,function(e,t){p.order.push({column:t.col,dir:t.dir}),f("iSortCol_"+e,t.col),f("sSortDir_"+e,t.dir)}),f("iSortingCols",d.length)),r=Ve.ext.legacy.ajax,null===r?e.sAjaxSource?u:p:r?u:p}function q(e,t){var i=U(e,t),s=t.sEcho!==n?t.sEcho:t.draw,o=t.iTotalRecords!==n?t.iTotalRecords:t.recordsTotal,r=t.iTotalDisplayRecords!==n?t.iTotalDisplayRecords:t.recordsFiltered;if(s){if(1*s<e.iDraw)return;e.iDraw=1*s}for(k(e),e._iRecordsTotal=parseInt(o,10),e._iRecordsDisplay=parseInt(r,10),s=0,o=i.length;s<o;s++)w(e,i[s]);e.aiDisplay=e.aiDisplayMaster.slice(),e.bAjaxDataGet=!1,L(e),e._bInitComplete||re(e,t),e.bAjaxDataGet=!0,de(e,!1)}function U(e,t){var s=i.isPlainObject(e.ajax)&&e.ajax.dataSrc!==n?e.ajax.dataSrc:e.sAjaxDataProp;return"data"===s?t.aaData||t[s]:""!==s?S(s)(t):t}function V(e){var n=e.oClasses,s=e.sTableId,o=e.oLanguage,r=e.oPreviousSearch,a=e.aanFeatures,l='<input type="search" class="'+n.sFilterInput+'"/>',c=o.sSearch,c=c.match(/_INPUT_/)?c.replace("_INPUT_",l):c+l,n=i("<div/>",{id:a.f?null:s+"_filter","class":n.sFilter}).append(i("<label/>").append(c)),a=function(){var t=this.value?this.value:"";t!=r.sSearch&&(Y(e,{sSearch:t,bRegex:r.bRegex,bSmart:r.bSmart,bCaseInsensitive:r.bCaseInsensitive}),e._iDisplayStart=0,L(e))},l=null!==e.searchDelay?e.searchDelay:"ssp"===je(e)?400:0,h=i("input",n).val(r.sSearch).attr("placeholder",o.sSearchPlaceholder).bind("keyup.DT search.DT input.DT paste.DT cut.DT",l?ve(a,l):a).bind("keypress.DT",function(e){if(13==e.keyCode)return!1}).attr("aria-controls",s);return i(e.nTable).on("search.dt.DT",function(n,i){if(e===i)try{h[0]!==t.activeElement&&h.val(r.sSearch)}catch(s){}}),n[0]}function Y(e,t,i){var s=e.oPreviousSearch,o=e.aoPreSearchCols,r=function(e){s.sSearch=e.sSearch,s.bRegex=e.bRegex,s.bSmart=e.bSmart,s.bCaseInsensitive=e.bCaseInsensitive};if(y(e),"ssp"!=je(e)){for(G(e,t.sSearch,i,t.bEscapeRegex!==n?!t.bEscapeRegex:t.bRegex,t.bSmart,t.bCaseInsensitive),r(t),t=0;t<o.length;t++)K(e,o[t].sSearch,t,o[t].bEscapeRegex!==n?!o[t].bEscapeRegex:o[t].bRegex,o[t].bSmart,o[t].bCaseInsensitive);X(e)}else r(t);e.bFiltered=!0,ze(e,null,"search",[e])}function X(e){for(var t,n,i=Ve.ext.search,s=e.aiDisplay,o=0,r=i.length;o<r;o++){for(var a=[],l=0,c=s.length;l<c;l++)n=s[l],t=e.aoData[n],i[o](e,t._aFilterData,n,t._aData,l)&&a.push(n);s.length=0,s.push.apply(s,a)}}function K(e,t,n,i,s,o){if(""!==t)for(var r=e.aiDisplay,i=Q(t,i,s,o),s=r.length-1;0<=s;s--)t=e.aoData[r[s]]._aFilterData[n],i.test(t)||r.splice(s,1)}function G(e,t,n,i,s,o){var r,i=Q(t,i,s,o),s=e.oPreviousSearch.sSearch,o=e.aiDisplayMaster;if(0!==Ve.ext.search.length&&(n=!0),r=Z(e),0>=t.length)e.aiDisplay=o.slice();else for((r||n||s.length>t.length||0!==t.indexOf(s)||e.bSorted)&&(e.aiDisplay=o.slice()),t=e.aiDisplay,n=t.length-1;0<=n;n--)i.test(e.aoData[t[n]]._sFilterRow)||t.splice(n,1)}function Q(e,t,n,s){return e=t?e:J(e),n&&(e="^(?=.*?"+i.map(e.match(/"[^"]+"|[^ ]+/g)||[""],function(e){if('"'===e.charAt(0))var t=e.match(/^"(.*)"$/),e=t?t[1]:e;return e.replace('"',"")}).join(")(?=.*?")+").*$"),RegExp(e,s?"i":"")}function J(e){return e.replace(nt,"\\$1")}function Z(e){var t,n,i,s,o,r,a,l,c=e.aoColumns,h=Ve.ext.type.search;for(t=!1,n=0,s=e.aoData.length;n<s;n++)if(l=e.aoData[n],!l._aFilterData){for(r=[],i=0,o=c.length;i<o;i++)t=c[i],t.bSearchable?(a=C(e,n,i,"filter"),h[t.sType]&&(a=h[t.sType](a)),null===a&&(a=""),"string"!=typeof a&&a.toString&&(a=a.toString())):a="",a.indexOf&&-1!==a.indexOf("&")&&(vt.innerHTML=a,a=yt?vt.textContent:vt.innerText),a.replace&&(a=a.replace(/[\r\n]/g,"")),r.push(a);l._aFilterData=r,l._sFilterRow=r.join("  "),t=!0}return t}function ee(e){return{search:e.sSearch,smart:e.bSmart,regex:e.bRegex,caseInsensitive:e.bCaseInsensitive}}function te(e){return{sSearch:e.search,bSmart:e.smart,bRegex:e.regex,bCaseInsensitive:e.caseInsensitive}}function ne(e){var t=e.sTableId,n=e.aanFeatures.i,s=i("<div/>",{"class":e.oClasses.sInfo,id:n?null:t+"_info"});return n||(e.aoDrawCallback.push({fn:ie,sName:"information"}),s.attr("role","status").attr("aria-live","polite"),i(e.nTable).attr("aria-describedby",t+"_info")),s[0]}function ie(e){var t=e.aanFeatures.i;if(0!==t.length){var n=e.oLanguage,s=e._iDisplayStart+1,o=e.fnDisplayEnd(),r=e.fnRecordsTotal(),a=e.fnRecordsDisplay(),l=a?n.sInfo:n.sInfoEmpty;a!==r&&(l+=" "+n.sInfoFiltered),l+=n.sInfoPostFix,l=se(e,l),n=n.fnInfoCallback,null!==n&&(l=n.call(e.oInstance,e,s,o,r,a,l)),i(t).html(l)}}function se(e,t){var n=e.fnFormatNumber,i=e._iDisplayStart+1,s=e._iDisplayLength,o=e.fnRecordsDisplay(),r=-1===s;return t.replace(/_START_/g,n.call(e,i)).replace(/_END_/g,n.call(e,e.fnDisplayEnd())).replace(/_MAX_/g,n.call(e,e.fnRecordsTotal())).replace(/_TOTAL_/g,n.call(e,o)).replace(/_PAGE_/g,n.call(e,r?1:Math.ceil(i/s))).replace(/_PAGES_/g,n.call(e,r?1:Math.ceil(o/s)))}function oe(e){var t,n,i,s=e.iInitDisplayStart,o=e.aoColumns;if(n=e.oFeatures,e.bInitialised){for(F(e),O(e),M(e,e.aoHeader),M(e,e.aoFooter),de(e,!0),n.bAutoWidth&&ge(e),t=0,n=o.length;t<n;t++)i=o[t],i.sWidth&&(i.nTh.style.width=Ce(i.sWidth));H(e),o=je(e),"ssp"!=o&&("ajax"==o?B(e,[],function(n){var i=U(e,n);for(t=0;t<i.length;t++)w(e,i[t]);e.iInitDisplayStart=s,H(e),de(e,!1),re(e,n)},e):(de(e,!1),re(e)))}else setTimeout(function(){oe(e)},200)}function re(e,t){e._bInitComplete=!0,t&&f(e),ze(e,"aoInitComplete","init",[e,t])}function ae(e,t){var n=parseInt(t,10);e._iDisplayLength=n,We(e),ze(e,null,"length",[e,n])}function le(e){for(var t=e.oClasses,n=e.sTableId,s=e.aLengthMenu,o=i.isArray(s[0]),r=o?s[0]:s,s=o?s[1]:s,o=i("<select/>",{name:n+"_length","aria-controls":n,"class":t.sLengthSelect}),a=0,l=r.length;a<l;a++)o[0][a]=new Option(s[a],r[a]);var c=i("<div><label/></div>").addClass(t.sLength);return e.aanFeatures.l||(c[0].id=n+"_length"),c.children().append(e.oLanguage.sLengthMenu.replace("_MENU_",o[0].outerHTML)),i("select",c).val(e._iDisplayLength).bind("change.DT",function(){ae(e,i(this).val()),L(e)}),i(e.nTable).bind("length.dt.DT",function(t,n,s){e===n&&i("select",c).val(s)}),c[0]}function ce(e){var t=e.sPaginationType,n=Ve.ext.pager[t],s="function"==typeof n,o=function(e){L(e)},t=i("<div/>").addClass(e.oClasses.sPaging+t)[0],r=e.aanFeatures;return s||n.fnInit(e,t,o),r.p||(t.id=e.sTableId+"_paginate",e.aoDrawCallback.push({fn:function(e){if(s){var t,i=e._iDisplayStart,a=e._iDisplayLength,l=e.fnRecordsDisplay(),c=-1===a,i=c?0:Math.ceil(i/a),a=c?1:Math.ceil(l/a),l=n(i,a),c=0;for(t=r.p.length;c<t;c++)Be(e,"pageButton")(e,r.p[c],c,l,i,a)}else n.fnUpdate(e,o)},sName:"pagination"})),t}function he(e,t,n){var i=e._iDisplayStart,s=e._iDisplayLength,o=e.fnRecordsDisplay();return 0===o||-1===s?i=0:"number"==typeof t?(i=t*s,i>o&&(i=0)):"first"==t?i=0:"previous"==t?(i=0<=s?i-s:0,0>i&&(i=0)):"next"==t?i+s<o&&(i+=s):"last"==t?i=Math.floor((o-1)/s)*s:Oe(e,0,"Unknown paging action: "+t,5),t=e._iDisplayStart!==i,e._iDisplayStart=i,t&&(ze(e,null,"page",[e]),n&&L(e)),t}function ue(e){return i("<div/>",{id:e.aanFeatures.r?null:e.sTableId+"_processing","class":e.oClasses.sProcessing}).html(e.oLanguage.sProcessing).insertBefore(e.nTable)[0]}function de(e,t){e.oFeatures.bProcessing&&i(e.aanFeatures.r).css("display",t?"block":"none"),ze(e,null,"processing",[e,t])}function fe(e){var t=i(e.nTable);t.attr("role","grid");var n=e.oScroll;if(""===n.sX&&""===n.sY)return e.nTable;var s=n.sX,o=n.sY,r=e.oClasses,a=t.children("caption"),l=a.length?a[0]._captionSide:null,c=i(t[0].cloneNode(!1)),h=i(t[0].cloneNode(!1)),u=t.children("tfoot");n.sX&&"100%"===t.attr("width")&&t.removeAttr("width"),u.length||(u=null),n=i("<div/>",{"class":r.sScrollWrapper}).append(i("<div/>",{"class":r.sScrollHead}).css({overflow:"hidden",position:"relative",border:0,width:s?s?Ce(s):null:"100%"}).append(i("<div/>",{"class":r.sScrollHeadInner}).css({"box-sizing":"content-box",width:n.sXInner||"100%"}).append(c.removeAttr("id").css("margin-left",0).append("top"===l?a:null).append(t.children("thead"))))).append(i("<div/>",{"class":r.sScrollBody}).css({overflow:"auto",height:o?Ce(o):null,width:s?Ce(s):null}).append(t)),u&&n.append(i("<div/>",{"class":r.sScrollFoot}).css({overflow:"hidden",border:0,width:s?s?Ce(s):null:"100%"}).append(i("<div/>",{"class":r.sScrollFootInner}).append(h.removeAttr("id").css("margin-left",0).append("bottom"===l?a:null).append(t.children("tfoot")))));var t=n.children(),d=t[0],r=t[1],f=u?t[2]:null;return s&&i(r).on("scroll.DT",function(){var e=this.scrollLeft;d.scrollLeft=e,u&&(f.scrollLeft=e)}),e.nScrollHead=d,e.nScrollBody=r,e.nScrollFoot=f,e.aoDrawCallback.push({fn:pe,sName:"scrolling"}),n[0]}function pe(e){var t,n,s,o,r,a,l=e.oScroll,c=l.sX,h=l.sXInner,u=l.sY,d=l.iBarWidth,f=i(e.nScrollHead),m=f[0].style,g=f.children("div"),v=g[0].style,y=g.children("table"),g=e.nScrollBody,b=i(g),w=g.style,_=i(e.nScrollFoot).children("div"),C=_.children("table"),x=i(e.nTHead),T=i(e.nTable),S=T[0],D=S.style,E=e.nTFoot?i(e.nTFoot):null,k=e.oBrowser,N=k.bScrollOversize,A=[],I=[],R=[],P=function(e){e=e.style,e.paddingTop="0",e.paddingBottom="0",e.borderTopWidth="0",e.borderBottomWidth="0",e.height=0};T.children("thead, tfoot").remove(),r=x.clone().prependTo(T),t=x.find("tr"),s=r.find("tr"),r.find("th, td").removeAttr("tabindex"),E&&(o=E.clone().prependTo(T),n=E.find("tr"),o=o.find("tr")),c||(w.width="100%",f[0].style.width="100%"),i.each(W(e,r),function(t,n){a=p(e,t),n.style.width=e.aoColumns[a].sWidth}),E&&me(function(e){e.style.width=""},o),l.bCollapse&&""!==u&&(w.height=b[0].offsetHeight+x[0].offsetHeight+"px"),f=T.outerWidth(),""===c?(D.width="100%",N&&(T.find("tbody").height()>g.offsetHeight||"scroll"==b.css("overflow-y"))&&(D.width=Ce(T.outerWidth()-d))):""!==h?D.width=Ce(h):f==b.width()&&b.height()<T.height()?(D.width=Ce(f-d),T.outerWidth()>f-d&&(D.width=Ce(f))):D.width=Ce(f),f=T.outerWidth(),me(P,s),me(function(e){R.push(e.innerHTML),A.push(Ce(i(e).css("width")))},s),me(function(e,t){e.style.width=A[t]},t),i(s).height(0),E&&(me(P,o),me(function(e){I.push(Ce(i(e).css("width")))},o),me(function(e,t){e.style.width=I[t]},n),i(o).height(0)),me(function(e,t){e.innerHTML='<div class="dataTables_sizing" style="height:0;overflow:hidden;">'+R[t]+"</div>",e.style.width=A[t]},s),E&&me(function(e,t){e.innerHTML="",e.style.width=I[t]},o),T.outerWidth()<f?(n=g.scrollHeight>g.offsetHeight||"scroll"==b.css("overflow-y")?f+d:f,N&&(g.scrollHeight>g.offsetHeight||"scroll"==b.css("overflow-y"))&&(D.width=Ce(n-d)),(""===c||""!==h)&&Oe(e,1,"Possible column misalignment",6)):n="100%",w.width=Ce(n),m.width=Ce(n),E&&(e.nScrollFoot.style.width=Ce(n)),!u&&N&&(w.height=Ce(S.offsetHeight+d)),u&&l.bCollapse&&(w.height=Ce(u),l=c&&S.offsetWidth>g.offsetWidth?d:0,S.offsetHeight<g.offsetHeight&&(w.height=Ce(S.offsetHeight+l))),l=T.outerWidth(),y[0].style.width=Ce(l),v.width=Ce(l),y=T.height()>g.clientHeight||"scroll"==b.css("overflow-y"),k="padding"+(k.bScrollbarLeft?"Left":"Right"),v[k]=y?d+"px":"0px",E&&(C[0].style.width=Ce(l),_[0].style.width=Ce(l),_[0].style[k]=y?d+"px":"0px"),b.scroll(),!e.bSorted&&!e.bFiltered||e._drawHold||(g.scrollTop=0)}function me(e,t,n){for(var i,s,o=0,r=0,a=t.length;r<a;){for(i=t[r].firstChild,s=n?n[r].firstChild:null;i;)1===i.nodeType&&(n?e(i,s,o):e(i,o),o++),i=i.nextSibling,s=n?s.nextSibling:null;r++}}function ge(t){var n,s,o=t.nTable,r=t.aoColumns,a=t.oScroll,l=a.sY,c=a.sX,h=a.sXInner,u=r.length,a=v(t,"bVisible"),d=i("th",t.nTHead),p=o.getAttribute("width"),m=o.parentNode,y=!1;for((n=o.style.width)&&-1!==n.indexOf("%")&&(p=n),n=0;n<a.length;n++)s=r[a[n]],null!==s.sWidth&&(s.sWidth=ye(s.sWidthOrig,m),y=!0);if(y||c||l||u!=g(t)||u!=d.length){u=i(o).clone().css("visibility","hidden").removeAttr("id"),u.find("tbody tr").remove();var b=i("<tr/>").appendTo(u.find("tbody"));for(u.find("tfoot th, tfoot td").css("width",""),d=W(t,u.find("thead")[0]),n=0;n<a.length;n++)s=r[a[n]],d[n].style.width=null!==s.sWidthOrig&&""!==s.sWidthOrig?Ce(s.sWidthOrig):"";if(t.aoData.length)for(n=0;n<a.length;n++)y=a[n],s=r[y],i(we(t,y)).clone(!1).append(s.sContentPadding).appendTo(b);if(u.appendTo(m),c&&h?u.width(h):c?(u.css("width","auto"),u.width()<m.offsetWidth&&u.width(m.offsetWidth)):l?u.width(m.offsetWidth):p&&u.width(p),be(t,u[0]),c){for(n=h=0;n<a.length;n++)s=r[a[n]],l=i(d[n]).outerWidth(),h+=null===s.sWidthOrig?l:parseInt(s.sWidth,10)+l-i(d[n]).width();u.width(Ce(h)),o.style.width=Ce(h)}for(n=0;n<a.length;n++)s=r[a[n]],(l=i(d[n]).width())&&(s.sWidth=Ce(l));o.style.width=Ce(u.css("width")),u.remove()}else for(n=0;n<u;n++)r[n].sWidth=Ce(d.eq(n).width());p&&(o.style.width=Ce(p)),!p&&!c||t._reszEvt||(o=function(){i(e).bind("resize.DT-"+t.sInstance,ve(function(){f(t)}))},t.oBrowser.bScrollOversize?setTimeout(o,1e3):o(),t._reszEvt=!0)}function ve(e,t){var i,s,o=t!==n?t:200;return function(){var t=this,r=+new Date,a=arguments;i&&r<i+o?(clearTimeout(s),s=setTimeout(function(){i=n,e.apply(t,a)},o)):(i=r,e.apply(t,a))}}function ye(e,n){if(!e)return 0;var s=i("<div/>").css("width",Ce(e)).appendTo(n||t.body),o=s[0].offsetWidth;return s.remove(),o}function be(e,t){var n=e.oScroll;(n.sX||n.sY)&&(n=n.sX?0:n.iBarWidth,t.style.width=Ce(i(t).outerWidth()-n))}function we(e,t){var n=_e(e,t);if(0>n)return null;var s=e.aoData[n];return s.nTr?s.anCells[t]:i("<td/>").html(C(e,n,t,"display"))[0]}function _e(e,t){for(var n,i=-1,s=-1,o=0,r=e.aoData.length;o<r;o++)n=C(e,o,t,"display")+"",n=n.replace(bt,""),n.length>i&&(i=n.length,s=o);return s}function Ce(e){return null===e?"0px":"number"==typeof e?0>e?"0px":e+"px":e.match(/\d$/)?e+"px":e}function xe(){var e=Ve.__scrollbarWidth;if(e===n){var t=i("<p/>").css({position:"absolute",top:0,left:0,width:"100%",height:150,padding:0,overflow:"scroll",visibility:"hidden"}).appendTo("body"),e=t[0].offsetWidth-t[0].clientWidth;Ve.__scrollbarWidth=e,t.remove()}return e}function Te(e){var t,s,o,r,a,l,c=[],h=e.aoColumns;t=e.aaSortingFixed,s=i.isPlainObject(t);var u=[];for(o=function(e){e.length&&!i.isArray(e[0])?u.push(e):u.push.apply(u,e)},i.isArray(t)&&o(t),s&&t.pre&&o(t.pre),o(e.aaSorting),s&&t.post&&o(t.post),e=0;e<u.length;e++)for(l=u[e][0],o=h[l].aDataSort,t=0,s=o.length;t<s;t++)r=o[t],a=h[r].sType||"string",u[e]._idx===n&&(u[e]._idx=i.inArray(u[e][1],h[r].asSorting)),c.push({src:l,col:r,dir:u[e][1],index:u[e]._idx,type:a,formatter:Ve.ext.type.order[a+"-pre"]});return c}function Se(e){var t,n,i,s,o=[],r=Ve.ext.type.order,a=e.aoData,l=0,c=e.aiDisplayMaster;for(y(e),s=Te(e),t=0,n=s.length;t<n;t++)i=s[t],i.formatter&&l++,Ae(e,i.col);if("ssp"!=je(e)&&0!==s.length){for(t=0,n=c.length;t<n;t++)o[c[t]]=t;l===s.length?c.sort(function(e,t){var n,i,r,l,c=s.length,h=a[e]._aSortData,u=a[t]._aSortData;for(r=0;r<c;r++)if(l=s[r],n=h[l.col],i=u[l.col],n=n<i?-1:n>i?1:0,0!==n)return"asc"===l.dir?n:-n;return n=o[e],i=o[t],n<i?-1:n>i?1:0}):c.sort(function(e,t){var n,i,l,c,h=s.length,u=a[e]._aSortData,d=a[t]._aSortData;for(l=0;l<h;l++)if(c=s[l],n=u[c.col],i=d[c.col],c=r[c.type+"-"+c.dir]||r["string-"+c.dir],n=c(n,i),0!==n)return n;return n=o[e],i=o[t],n<i?-1:n>i?1:0})}e.bSorted=!0}function De(e){for(var t,n,i=e.aoColumns,s=Te(e),e=e.oLanguage.oAria,o=0,r=i.length;o<r;o++){n=i[o];var a=n.asSorting;t=n.sTitle.replace(/<.*?>/g,"");var l=n.nTh;l.removeAttribute("aria-sort"),n.bSortable&&(0<s.length&&s[0].col==o?(l.setAttribute("aria-sort","asc"==s[0].dir?"ascending":"descending"),n=a[s[0].index+1]||a[0]):n=a[0],t+="asc"===n?e.sSortAscending:e.sSortDescending),l.setAttribute("aria-label",t)}}function Ee(e,t,s,o){var r=e.aaSorting,a=e.aoColumns[t].asSorting,l=function(e,t){var s=e._idx;return s===n&&(s=i.inArray(e[1],a)),s+1<a.length?s+1:t?null:0};"number"==typeof r[0]&&(r=e.aaSorting=[r]),s&&e.oFeatures.bSortMulti?(s=i.inArray(t,ct(r,"0")),-1!==s?(t=l(r[s],!0),null===t&&1===r.length&&(t=0),null===t?r.splice(s,1):(r[s][1]=a[t],r[s]._idx=t)):(r.push([t,a[0],0]),r[r.length-1]._idx=0)):r.length&&r[0][0]==t?(t=l(r[0]),r.length=1,r[0][1]=a[t],r[0]._idx=t):(r.length=0,r.push([t,a[0]]),r[0]._idx=0),H(e),"function"==typeof o&&o(e)}function ke(e,t,n,i){var s=e.aoColumns[n];He(t,{},function(t){!1!==s.bSortable&&(e.oFeatures.bProcessing?(de(e,!0),setTimeout(function(){Ee(e,n,t.shiftKey,i),"ssp"!==je(e)&&de(e,!1)},0)):Ee(e,n,t.shiftKey,i))})}function Ne(e){var t,n,s=e.aLastSort,o=e.oClasses.sSortColumn,r=Te(e),a=e.oFeatures;if(a.bSort&&a.bSortClasses){for(a=0,t=s.length;a<t;a++)n=s[a].src,i(ct(e.aoData,"anCells",n)).removeClass(o+(2>a?a+1:3));for(a=0,t=r.length;a<t;a++)n=r[a].src,i(ct(e.aoData,"anCells",n)).addClass(o+(2>a?a+1:3))}e.aLastSort=r}function Ae(e,t){var n,i=e.aoColumns[t],s=Ve.ext.order[i.sSortDataType];s&&(n=s.call(e.oInstance,e,t,m(e,t)));for(var o,r=Ve.ext.type.order[i.sType+"-pre"],a=0,l=e.aoData.length;a<l;a++)i=e.aoData[a],i._aSortData||(i._aSortData=[]),(!i._aSortData[t]||s)&&(o=s?n[a]:C(e,a,t,"sort"),i._aSortData[t]=r?r(o):o)}function Ie(e){if(e.oFeatures.bStateSave&&!e.bDestroying){var t={time:+new Date,start:e._iDisplayStart,length:e._iDisplayLength,order:i.extend(!0,[],e.aaSorting),search:ee(e.oPreviousSearch),columns:i.map(e.aoColumns,function(t,n){return{visible:t.bVisible,search:ee(e.aoPreSearchCols[n])}})};ze(e,"aoStateSaveParams","stateSaveParams",[e,t]),e.oSavedState=t,e.fnStateSaveCallback.call(e.oInstance,e,t)}}function Re(e){var t,s,o=e.aoColumns;if(e.oFeatures.bStateSave){var r=e.fnStateLoadCallback.call(e.oInstance,e);if(r&&r.time&&(t=ze(e,"aoStateLoadParams","stateLoadParams",[e,r]),-1===i.inArray(!1,t)&&(t=e.iStateDuration,!(0<t&&r.time<+new Date-1e3*t)&&o.length===r.columns.length))){for(e.oLoadedState=i.extend(!0,{},r),r.start!==n&&(e._iDisplayStart=r.start,e.iInitDisplayStart=r.start),r.length!==n&&(e._iDisplayLength=r.length),r.order!==n&&(e.aaSorting=[],i.each(r.order,function(t,n){e.aaSorting.push(n[0]>=o.length?[0,n[1]]:n)})),r.search!==n&&i.extend(e.oPreviousSearch,te(r.search)),t=0,s=r.columns.length;t<s;t++){var a=r.columns[t];a.visible!==n&&(o[t].bVisible=a.visible),a.search!==n&&i.extend(e.aoPreSearchCols[t],te(a.search))}ze(e,"aoStateLoaded","stateLoaded",[e,r])}}}function Pe(e){var t=Ve.settings,e=i.inArray(e,ct(t,"nTable"));return-1!==e?t[e]:null}function Oe(t,n,i,s){if(i="DataTables warning: "+(null!==t?"table id="+t.sTableId+" - ":"")+i,s&&(i+=". For more information about this error, please see http://datatables.net/tn/"+s),n)e.console&&console.log&&console.log(i);else if(n=Ve.ext,n=n.sErrMode||n.errMode,ze(t,null,"error",[t,s,i]),"alert"==n)alert(i);else{if("throw"==n)throw Error(i);"function"==typeof n&&n(t,s,i)}}function Me(e,t,s,o){i.isArray(s)?i.each(s,function(n,s){i.isArray(s)?Me(e,t,s[0],s[1]):Me(e,t,s)}):(o===n&&(o=s),t[s]!==n&&(e[o]=t[s]))}function Le(e,t,n){var s,o;for(o in t)t.hasOwnProperty(o)&&(s=t[o],i.isPlainObject(s)?(i.isPlainObject(e[o])||(e[o]={}),i.extend(!0,e[o],s)):e[o]=n&&"data"!==o&&"aaData"!==o&&i.isArray(s)?s.slice():s);return e}function He(e,t,n){i(e).bind("click.DT",t,function(t){e.blur(),n(t)}).bind("keypress.DT",t,function(e){13===e.which&&(e.preventDefault(),n(e))}).bind("selectstart.DT",function(){return!1})}function Fe(e,t,n,i){n&&e[t].push({fn:n,sName:i})}function ze(e,t,n,s){var o=[];return t&&(o=i.map(e[t].slice().reverse(),function(t){return t.fn.apply(e.oInstance,s)})),null!==n&&(t=i.Event(n+".dt"),i(e.nTable).trigger(t,s),o.push(t.result)),o}function We(e){var t=e._iDisplayStart,n=e.fnDisplayEnd(),i=e._iDisplayLength;t>=n&&(t=n-i),t-=t%i,(-1===i||0>t)&&(t=0),e._iDisplayStart=t}function Be(e,t){var n=e.renderer,s=Ve.ext.renderer[t];return i.isPlainObject(n)&&n[t]?s[n[t]]||s._:"string"==typeof n?s[n]||s._:s._}function je(e){return e.oFeatures.bServerSide?"ssp":e.ajax||e.sAjaxSource?"ajax":"dom"}function $e(e,t){var n=[],n=Lt.numbers_length,i=Math.floor(n/2);return t<=n?n=ut(0,t):e<=i?(n=ut(0,n-2),n.push("ellipsis"),n.push(t-1)):(e>=t-1-i?n=ut(t-(n-2),t):(n=ut(e-i+2,e+i-1),n.push("ellipsis"),n.push(t-1)),n.splice(0,0,"ellipsis"),n.splice(0,0,0)),n.DT_el="span",n}function qe(e){i.each({num:function(t){return Ht(t,e)},"num-fmt":function(t){return Ht(t,e,it)},"html-num":function(t){return Ht(t,e,Ze)},"html-num-fmt":function(t){return Ht(t,e,Ze,it)}},function(t,n){Ye.type.order[t+e+"-pre"]=n,t.match(/^html\-/)&&(Ye.type.search[t+e]=Ye.type.search.html)})}function Ue(e){return function(){var t=[Pe(this[Ve.ext.iApiIndex])].concat(Array.prototype.slice.call(arguments));return Ve.ext.internal[e].apply(this,t)}}var Ve,Ye,Xe,Ke,Ge,Qe={},Je=/[\r\n]/g,Ze=/<.*?>/g,et=/^[\w\+\-]/,tt=/[\w\+\-]$/,nt=RegExp("(\\/|\\.|\\*|\\+|\\?|\\||\\(|\\)|\\[|\\]|\\{|\\}|\\\\|\\$|\\^|\\-)","g"),it=/[',$\u00a3\u20ac\u00a5%\u2009\u202F\u20BD\u20a9\u20BArfk]/gi,st=function(e){return!e||!0===e||"-"===e},ot=function(e){var t=parseInt(e,10);return!isNaN(t)&&isFinite(e)?t:null},rt=function(e,t){return Qe[t]||(Qe[t]=RegExp(J(t),"g")),"string"==typeof e&&"."!==t?e.replace(/\./g,"").replace(Qe[t],"."):e},at=function(e,t,n){var i="string"==typeof e;return!!st(e)||(t&&i&&(e=rt(e,t)),n&&i&&(e=e.replace(it,"")),!isNaN(parseFloat(e))&&isFinite(e))},lt=function(e,t,n){return!!st(e)||(st(e)||"string"==typeof e?!!at(e.replace(Ze,""),t,n)||null:null)},ct=function(e,t,i){var s=[],o=0,r=e.length;if(i!==n)for(;o<r;o++)e[o]&&e[o][t]&&s.push(e[o][t][i]);else for(;o<r;o++)e[o]&&s.push(e[o][t]);return s},ht=function(e,t,i,s){var o=[],r=0,a=t.length;if(s!==n)for(;r<a;r++)e[t[r]][i]&&o.push(e[t[r]][i][s]);else for(;r<a;r++)o.push(e[t[r]][i]);return o},ut=function(e,t){var i,s=[];t===n?(t=0,i=e):(i=t,t=e);for(var o=t;o<i;o++)s.push(o);return s},dt=function(e){for(var t=[],n=0,i=e.length;n<i;n++)e[n]&&t.push(e[n]);return t},ft=function(e){var t,n,i,s=[],o=e.length,r=0;n=0;e:for(;n<o;n++){for(t=e[n],i=0;i<r;i++)if(s[i]===t)continue e;s.push(t),r++}return s},pt=function(e,t,i){e[t]!==n&&(e[i]=e[t])},mt=/\[.*?\]$/,gt=/\(\)$/,vt=i("<div>")[0],yt=vt.textContent!==n,bt=/<.*?>/g;Ve=function(e){this.$=function(e,t){return this.api(!0).$(e,t)},this._=function(e,t){return this.api(!0).rows(e,t).data()},this.api=function(e){return new Xe(e?Pe(this[Ye.iApiIndex]):this)},this.fnAddData=function(e,t){var s=this.api(!0),o=i.isArray(e)&&(i.isArray(e[0])||i.isPlainObject(e[0]))?s.rows.add(e):s.row.add(e);return(t===n||t)&&s.draw(),o.flatten().toArray()},this.fnAdjustColumnSizing=function(e){var t=this.api(!0).columns.adjust(),i=t.settings()[0],s=i.oScroll;e===n||e?t.draw(!1):(""!==s.sX||""!==s.sY)&&pe(i)},this.fnClearTable=function(e){var t=this.api(!0).clear();(e===n||e)&&t.draw()},this.fnClose=function(e){this.api(!0).row(e).child.hide()},this.fnDeleteRow=function(e,t,i){var s=this.api(!0),e=s.rows(e),o=e.settings()[0],r=o.aoData[e[0][0]];return e.remove(),t&&t.call(this,o,r),(i===n||i)&&s.draw(),r},this.fnDestroy=function(e){this.api(!0).destroy(e)},this.fnDraw=function(e){this.api(!0).draw(e)},this.fnFilter=function(e,t,i,s,o,r){o=this.api(!0),null===t||t===n?o.search(e,i,s,r):o.column(t).search(e,i,s,r),o.draw()},this.fnGetData=function(e,t){var i=this.api(!0);if(e!==n){var s=e.nodeName?e.nodeName.toLowerCase():"";return t!==n||"td"==s||"th"==s?i.cell(e,t).data():i.row(e).data()||null}return i.data().toArray()},this.fnGetNodes=function(e){var t=this.api(!0);return e!==n?t.row(e).node():t.rows().nodes().flatten().toArray()},this.fnGetPosition=function(e){var t=this.api(!0),n=e.nodeName.toUpperCase();return"TR"==n?t.row(e).index():"TD"==n||"TH"==n?(e=t.cell(e).index(),[e.row,e.columnVisible,e.column]):null},this.fnIsOpen=function(e){return this.api(!0).row(e).child.isShown()},this.fnOpen=function(e,t,n){return this.api(!0).row(e).child(t,n).show().child()[0]},this.fnPageChange=function(e,t){var i=this.api(!0).page(e);(t===n||t)&&i.draw(!1)},this.fnSetColumnVis=function(e,t,i){e=this.api(!0).column(e).visible(t),(i===n||i)&&e.columns.adjust().draw()},this.fnSettings=function(){return Pe(this[Ye.iApiIndex])},this.fnSort=function(e){this.api(!0).order(e).draw()},this.fnSortListener=function(e,t,n){this.api(!0).order.listener(e,t,n)},this.fnUpdate=function(e,t,i,s,o){var r=this.api(!0);return i===n||null===i?r.row(t).data(e):r.cell(t,i).data(e),(o===n||o)&&r.columns.adjust(),(s===n||s)&&r.draw(),0},this.fnVersionCheck=Ye.fnVersionCheck;var t=this,s=e===n,h=this.length;s&&(e={}),this.oApi=this.internal=Ye.internal;for(var f in Ve.ext.internal)f&&(this[f]=Ue(f));return this.each(function(){var f,p={},p=1<h?Le(p,e,!0):e,m=0,g=this.getAttribute("id"),v=!1,y=Ve.defaults,C=i(this);if("table"!=this.nodeName.toLowerCase())Oe(null,0,"Non-table node initialisation ("+this.nodeName+")",2);else{a(y),l(y.column),o(y,y,!0),o(y.column,y.column,!0),o(y,i.extend(p,C.data()));var x=Ve.settings,m=0;for(f=x.length;m<f;m++){var T=x[m];if(T.nTable==this||T.nTHead.parentNode==this||T.nTFoot&&T.nTFoot.parentNode==this){if(m=p.bRetrieve!==n?p.bRetrieve:y.bRetrieve,s||m)return T.oInstance;if(p.bDestroy!==n?p.bDestroy:y.bDestroy){T.oInstance.fnDestroy();break}return void Oe(T,0,"Cannot reinitialise DataTable",3)}if(T.sTableId==this.id){x.splice(m,1);break}}null!==g&&""!==g||(this.id=g="DataTables_Table_"+Ve.ext._unique++);var S=i.extend(!0,{},Ve.models.oSettings,{sDestroyWidth:C[0].style.width,sInstance:g,sTableId:g});S.nTable=this,S.oApi=t.internal,S.oInit=p,x.push(S),S.oInstance=1===t.length?t:C.dataTable(),a(p),p.oLanguage&&r(p.oLanguage),p.aLengthMenu&&!p.iDisplayLength&&(p.iDisplayLength=i.isArray(p.aLengthMenu[0])?p.aLengthMenu[0][0]:p.aLengthMenu[0]),p=Le(i.extend(!0,{},y),p),Me(S.oFeatures,p,"bPaginate bLengthChange bFilter bSort bSortMulti bInfo bProcessing bAutoWidth bSortClasses bServerSide bDeferRender".split(" ")),Me(S,p,["asStripeClasses","ajax","fnServerData","fnFormatNumber","sServerMethod","aaSorting","aaSortingFixed","aLengthMenu","sPaginationType","sAjaxSource","sAjaxDataProp","iStateDuration","sDom","bSortCellsTop","iTabIndex","fnStateLoadCallback","fnStateSaveCallback","renderer","searchDelay",["iCookieDuration","iStateDuration"],["oSearch","oPreviousSearch"],["aoSearchCols","aoPreSearchCols"],["iDisplayLength","_iDisplayLength"],["bJQueryUI","bJUI"]]),Me(S.oScroll,p,[["sScrollX","sX"],["sScrollXInner","sXInner"],["sScrollY","sY"],["bScrollCollapse","bCollapse"]]),Me(S.oLanguage,p,"fnInfoCallback"),Fe(S,"aoDrawCallback",p.fnDrawCallback,"user"),Fe(S,"aoServerParams",p.fnServerParams,"user"),Fe(S,"aoStateSaveParams",p.fnStateSaveParams,"user"),Fe(S,"aoStateLoadParams",p.fnStateLoadParams,"user"),Fe(S,"aoStateLoaded",p.fnStateLoaded,"user"),Fe(S,"aoRowCallback",p.fnRowCallback,"user"),Fe(S,"aoRowCreatedCallback",p.fnCreatedRow,"user"),Fe(S,"aoHeaderCallback",p.fnHeaderCallback,"user"),Fe(S,"aoFooterCallback",p.fnFooterCallback,"user"),Fe(S,"aoInitComplete",p.fnInitComplete,"user"),Fe(S,"aoPreDrawCallback",p.fnPreDrawCallback,"user"),g=S.oClasses,p.bJQueryUI?(i.extend(g,Ve.ext.oJUIClasses,p.oClasses),p.sDom===y.sDom&&"lfrtip"===y.sDom&&(S.sDom='<"H"lfr>t<"F"ip>'),S.renderer?i.isPlainObject(S.renderer)&&!S.renderer.header&&(S.renderer.header="jqueryui"):S.renderer="jqueryui"):i.extend(g,Ve.ext.classes,p.oClasses),C.addClass(g.sTable),""===S.oScroll.sX&&""===S.oScroll.sY||(S.oScroll.iBarWidth=xe()),!0===S.oScroll.sX&&(S.oScroll.sX="100%"),S.iInitDisplayStart===n&&(S.iInitDisplayStart=p.iDisplayStart,S._iDisplayStart=p.iDisplayStart),null!==p.iDeferLoading&&(S.bDeferLoading=!0,m=i.isArray(p.iDeferLoading),S._iRecordsDisplay=m?p.iDeferLoading[0]:p.iDeferLoading,S._iRecordsTotal=m?p.iDeferLoading[1]:p.iDeferLoading);var D=S.oLanguage;i.extend(!0,D,p.oLanguage),""!==D.sUrl&&(i.ajax({dataType:"json",url:D.sUrl,success:function(e){r(e),o(y.oLanguage,e),i.extend(!0,D,e),oe(S)},error:function(){oe(S)}}),v=!0),null===p.asStripeClasses&&(S.asStripeClasses=[g.sStripeOdd,g.sStripeEven]);var m=S.asStripeClasses,E=C.children("tbody").find("tr").eq(0);if(-1!==i.inArray(!0,i.map(m,function(e){return E.hasClass(e)}))&&(i("tbody tr",this).removeClass(m.join(" ")),S.asDestroyStripes=m.slice()),x=[],m=this.getElementsByTagName("thead"),0!==m.length&&(z(S.aoHeader,m[0]),x=W(S)),null===p.aoColumns)for(T=[],
m=0,f=x.length;m<f;m++)T.push(null);else T=p.aoColumns;for(m=0,f=T.length;m<f;m++)u(S,x?x[m]:null);if(b(S,p.aoColumnDefs,T,function(e,t){d(S,e,t)}),E.length){var k=function(e,t){return null!==e.getAttribute("data-"+t)?t:null};i.each(I(S,E[0]).cells,function(e,t){var i=S.aoColumns[e];if(i.mData===e){var s=k(t,"sort")||k(t,"order"),o=k(t,"filter")||k(t,"search");null===s&&null===o||(i.mData={_:e+".display",sort:null!==s?e+".@data-"+s:n,type:null!==s?e+".@data-"+s:n,filter:null!==o?e+".@data-"+o:n},d(S,e))}})}var N=S.oFeatures;if(p.bStateSave&&(N.bStateSave=!0,Re(S,p),Fe(S,"aoDrawCallback",Ie,"state_save")),p.aaSorting===n)for(x=S.aaSorting,m=0,f=x.length;m<f;m++)x[m][1]=S.aoColumns[m].asSorting[0];if(Ne(S),N.bSort&&Fe(S,"aoDrawCallback",function(){if(S.bSorted){var e=Te(S),t={};i.each(e,function(e,n){t[n.src]=n.dir}),ze(S,null,"order",[S,e,t]),De(S)}}),Fe(S,"aoDrawCallback",function(){(S.bSorted||"ssp"===je(S)||N.bDeferRender)&&Ne(S)},"sc"),c(S),m=C.children("caption").each(function(){this._captionSide=C.css("caption-side")}),f=C.children("thead"),0===f.length&&(f=i("<thead/>").appendTo(this)),S.nTHead=f[0],f=C.children("tbody"),0===f.length&&(f=i("<tbody/>").appendTo(this)),S.nTBody=f[0],f=C.children("tfoot"),0===f.length&&0<m.length&&(""!==S.oScroll.sX||""!==S.oScroll.sY)&&(f=i("<tfoot/>").appendTo(this)),0===f.length||0===f.children().length?C.addClass(g.sNoFooter):0<f.length&&(S.nTFoot=f[0],z(S.aoFooter,S.nTFoot)),p.aaData)for(m=0;m<p.aaData.length;m++)w(S,p.aaData[m]);else(S.bDeferLoading||"dom"==je(S))&&_(S,i(S.nTBody).children("tr"));S.aiDisplay=S.aiDisplayMaster.slice(),S.bInitialised=!0,!1===v&&oe(S)}}),t=null,this};var wt=[],_t=Array.prototype,Ct=function(e){var t,n,s=Ve.settings,o=i.map(s,function(e){return e.nTable});return e?e.nTable&&e.oApi?[e]:e.nodeName&&"table"===e.nodeName.toLowerCase()?(t=i.inArray(e,o),-1!==t?[s[t]]:null):e&&"function"==typeof e.settings?e.settings().toArray():("string"==typeof e?n=i(e):e instanceof i&&(n=e),n?n.map(function(){return t=i.inArray(this,o),-1!==t?s[t]:null}).toArray():void 0):[]};Xe=function(e,t){if(!(this instanceof Xe))return new Xe(e,t);var n=[],s=function(e){(e=Ct(e))&&n.push.apply(n,e)};if(i.isArray(e))for(var o=0,r=e.length;o<r;o++)s(e[o]);else s(e);this.context=ft(n),t&&this.push.apply(this,t.toArray?t.toArray():t),this.selector={rows:null,cols:null,opts:null},Xe.extend(this,this,wt)},Ve.Api=Xe,Xe.prototype={any:function(){return 0!==this.flatten().length},concat:_t.concat,context:[],each:function(e){for(var t=0,n=this.length;t<n;t++)e.call(this,this[t],t,this);return this},eq:function(e){var t=this.context;return t.length>e?new Xe(t[e],this[e]):null},filter:function(e){var t=[];if(_t.filter)t=_t.filter.call(this,e,this);else for(var n=0,i=this.length;n<i;n++)e.call(this,this[n],n,this)&&t.push(this[n]);return new Xe(this.context,t)},flatten:function(){var e=[];return new Xe(this.context,e.concat.apply(e,this.toArray()))},join:_t.join,indexOf:_t.indexOf||function(e,t){for(var n=t||0,i=this.length;n<i;n++)if(this[n]===e)return n;return-1},iterator:function(e,t,i,s){var o,r,a,l,c,h,u,d=[],f=this.context,p=this.selector;for("string"==typeof e&&(s=i,i=t,t=e,e=!1),r=0,a=f.length;r<a;r++){var m=new Xe(f[r]);if("table"===t)o=i.call(m,f[r],r),o!==n&&d.push(o);else if("columns"===t||"rows"===t)o=i.call(m,f[r],this[r],r),o!==n&&d.push(o);else if("column"===t||"column-rows"===t||"row"===t||"cell"===t)for(u=this[r],"column-rows"===t&&(h=Et(f[r],p.opts)),l=0,c=u.length;l<c;l++)o=u[l],o="cell"===t?i.call(m,f[r],o.row,o.column,r,l):i.call(m,f[r],o,r,l,h),o!==n&&d.push(o)}return d.length||s?(e=new Xe(f,e?d.concat.apply([],d):d),t=e.selector,t.rows=p.rows,t.cols=p.cols,t.opts=p.opts,e):this},lastIndexOf:_t.lastIndexOf||function(e,t){return this.indexOf.apply(this.toArray.reverse(),arguments)},length:0,map:function(e){var t=[];if(_t.map)t=_t.map.call(this,e,this);else for(var n=0,i=this.length;n<i;n++)t.push(e.call(this,this[n],n));return new Xe(this.context,t)},pluck:function(e){return this.map(function(t){return t[e]})},pop:_t.pop,push:_t.push,reduce:_t.reduce||function(e,t){return h(this,e,t,0,this.length,1)},reduceRight:_t.reduceRight||function(e,t){return h(this,e,t,this.length-1,-1,-1)},reverse:_t.reverse,selector:null,shift:_t.shift,sort:_t.sort,splice:_t.splice,toArray:function(){return _t.slice.call(this)},to$:function(){return i(this)},toJQuery:function(){return i(this)},unique:function(){return new Xe(this.context,ft(this))},unshift:_t.unshift},Xe.extend=function(e,t,n){if(n.length&&t&&(t instanceof Xe||t.__dt_wrapper)){var s,o,r,a=function(e,t,n){return function(){var i=t.apply(e,arguments);return Xe.extend(i,i,n.methodExt),i}};for(s=0,o=n.length;s<o;s++)r=n[s],t[r.name]="function"==typeof r.val?a(e,r.val,r):i.isPlainObject(r.val)?{}:r.val,t[r.name].__dt_wrapper=!0,Xe.extend(e,t[r.name],r.propExt)}},Xe.register=Ke=function(e,t){if(i.isArray(e))for(var n=0,s=e.length;n<s;n++)Xe.register(e[n],t);else for(var o,r,a=e.split("."),l=wt,n=0,s=a.length;n<s;n++){o=(r=-1!==a[n].indexOf("()"))?a[n].replace("()",""):a[n];var c;e:{c=0;for(var h=l.length;c<h;c++)if(l[c].name===o){c=l[c];break e}c=null}c||(c={name:o,val:{},methodExt:[],propExt:[]},l.push(c)),n===s-1?c.val=t:l=r?c.methodExt:c.propExt}},Xe.registerPlural=Ge=function(e,t,s){Xe.register(e,s),Xe.register(t,function(){var e=s.apply(this,arguments);return e===this?this:e instanceof Xe?e.length?i.isArray(e[0])?new Xe(e.context,e[0]):e[0]:n:e})},Ke("tables()",function(e){var t;if(e){t=Xe;var n=this.context;if("number"==typeof e)e=[n[e]];else var s=i.map(n,function(e){return e.nTable}),e=i(s).filter(e).map(function(){var e=i.inArray(this,s);return n[e]}).toArray();t=new t(e)}else t=this;return t}),Ke("table()",function(e){var e=this.tables(e),t=e.context;return t.length?new Xe(t[0]):e}),Ge("tables().nodes()","table().node()",function(){return this.iterator("table",function(e){return e.nTable},1)}),Ge("tables().body()","table().body()",function(){return this.iterator("table",function(e){return e.nTBody},1)}),Ge("tables().header()","table().header()",function(){return this.iterator("table",function(e){return e.nTHead},1)}),Ge("tables().footer()","table().footer()",function(){return this.iterator("table",function(e){return e.nTFoot},1)}),Ge("tables().containers()","table().container()",function(){return this.iterator("table",function(e){return e.nTableWrapper},1)}),Ke("draw()",function(e){return this.iterator("table",function(t){H(t,!1===e)})}),Ke("page()",function(e){return e===n?this.page.info().page:this.iterator("table",function(t){he(t,e)})}),Ke("page.info()",function(){if(0===this.context.length)return n;var e=this.context[0],t=e._iDisplayStart,i=e._iDisplayLength,s=e.fnRecordsDisplay(),o=-1===i;return{page:o?0:Math.floor(t/i),pages:o?1:Math.ceil(s/i),start:t,end:e.fnDisplayEnd(),length:i,recordsTotal:e.fnRecordsTotal(),recordsDisplay:s}}),Ke("page.len()",function(e){return e===n?0!==this.context.length?this.context[0]._iDisplayLength:n:this.iterator("table",function(t){ae(t,e)})});var xt=function(e,t,n){if(n){var i=new Xe(e);i.one("draw",function(){n(i.ajax.json())})}"ssp"==je(e)?H(e,t):(de(e,!0),B(e,[],function(n){k(e);for(var n=U(e,n),i=0,s=n.length;i<s;i++)w(e,n[i]);H(e,t),de(e,!1)}))};Ke("ajax.json()",function(){var e=this.context;if(0<e.length)return e[0].json}),Ke("ajax.params()",function(){var e=this.context;if(0<e.length)return e[0].oAjaxData}),Ke("ajax.reload()",function(e,t){return this.iterator("table",function(n){xt(n,!1===t,e)})}),Ke("ajax.url()",function(e){var t=this.context;return e===n?0===t.length?n:(t=t[0],t.ajax?i.isPlainObject(t.ajax)?t.ajax.url:t.ajax:t.sAjaxSource):this.iterator("table",function(t){i.isPlainObject(t.ajax)?t.ajax.url=e:t.ajax=e})}),Ke("ajax.url().load()",function(e,t){return this.iterator("table",function(n){xt(n,!1===t,e)})});var Tt=function(e,t,s,o,r){var a,l,c,h,u,d,f=[];for(c=typeof t,t&&"string"!==c&&"function"!==c&&t.length!==n||(t=[t]),c=0,h=t.length;c<h;c++)for(l=t[c]&&t[c].split?t[c].split(","):[t[c]],u=0,d=l.length;u<d;u++)(a=s("string"==typeof l[u]?i.trim(l[u]):l[u]))&&a.length&&f.push.apply(f,a);if(e=Ye.selector[e],e.length)for(c=0,h=e.length;c<h;c++)f=e[c](o,r,f);return f},St=function(e){return e||(e={}),e.filter&&e.search===n&&(e.search=e.filter),i.extend({search:"none",order:"current",page:"all"},e)},Dt=function(e){for(var t=0,n=e.length;t<n;t++)if(0<e[t].length)return e[0]=e[t],e[0].length=1,e.length=1,e.context=[e.context[t]],e;return e.length=0,e},Et=function(e,t){var n,s,o,r=[],a=e.aiDisplay;n=e.aiDisplayMaster;var l=t.search;if(s=t.order,o=t.page,"ssp"==je(e))return"removed"===l?[]:ut(0,n.length);if("current"==o)for(n=e._iDisplayStart,s=e.fnDisplayEnd();n<s;n++)r.push(a[n]);else if("current"==s||"applied"==s)r="none"==l?n.slice():"applied"==l?a.slice():i.map(n,function(e){return-1===i.inArray(e,a)?e:null});else if("index"==s||"original"==s)for(n=0,s=e.aoData.length;n<s;n++)"none"==l?r.push(n):(o=i.inArray(n,a),(-1===o&&"removed"==l||0<=o&&"applied"==l)&&r.push(n));return r};Ke("rows()",function(e,t){e===n?e="":i.isPlainObject(e)&&(t=e,e="");var t=St(t),s=this.iterator("table",function(n){var s=t;return Tt("row",e,function(e){var t=ot(e);if(null!==t&&!s)return[t];var o=Et(n,s);return null!==t&&i.inArray(t,o)!==-1?[t]:e?"function"==typeof e?i.map(o,function(t){var i=n.aoData[t];return e(t,i._aData,i.nTr)?t:null}):(t=dt(ht(n.aoData,o,"nTr")),e.nodeName&&i.inArray(e,t)!==-1?[e._DT_RowIndex]:i(t).filter(e).map(function(){return this._DT_RowIndex}).toArray()):o},n,s)},1);return s.selector.rows=e,s.selector.opts=t,s}),Ke("rows().nodes()",function(){return this.iterator("row",function(e,t){return e.aoData[t].nTr||n},1)}),Ke("rows().data()",function(){return this.iterator(!0,"rows",function(e,t){return ht(e.aoData,t,"_aData")},1)}),Ge("rows().cache()","row().cache()",function(e){return this.iterator("row",function(t,n){var i=t.aoData[n];return"search"===e?i._aFilterData:i._aSortData},1)}),Ge("rows().invalidate()","row().invalidate()",function(e){return this.iterator("row",function(t,n){A(t,n,e)})}),Ge("rows().indexes()","row().index()",function(){return this.iterator("row",function(e,t){return t},1)}),Ge("rows().remove()","row().remove()",function(){var e=this;return this.iterator("row",function(t,n,s){var o=t.aoData;o.splice(n,1);for(var r=0,a=o.length;r<a;r++)null!==o[r].nTr&&(o[r].nTr._DT_RowIndex=r);i.inArray(n,t.aiDisplay),N(t.aiDisplayMaster,n),N(t.aiDisplay,n),N(e[s],n,!1),We(t)})}),Ke("rows.add()",function(e){var t=this.iterator("table",function(t){var n,i,s,o=[];for(i=0,s=e.length;i<s;i++)n=e[i],n.nodeName&&"TR"===n.nodeName.toUpperCase()?o.push(_(t,n)[0]):o.push(w(t,n));return o},1),n=this.rows(-1);return n.pop(),n.push.apply(n,t.toArray()),n}),Ke("row()",function(e,t){return Dt(this.rows(e,t))}),Ke("row().data()",function(e){var t=this.context;return e===n?t.length&&this.length?t[0].aoData[this[0]]._aData:n:(t[0].aoData[this[0]]._aData=e,A(t[0],this[0],"data"),this)}),Ke("row().node()",function(){var e=this.context;return e.length&&this.length?e[0].aoData[this[0]].nTr||null:null}),Ke("row.add()",function(e){e instanceof i&&e.length&&(e=e[0]);var t=this.iterator("table",function(t){return e.nodeName&&"TR"===e.nodeName.toUpperCase()?_(t,e)[0]:w(t,e)});return this.row(t[0])});var kt=function(e,t){var i=e.context;i.length&&(i=i[0].aoData[t!==n?t:e[0]],i._details&&(i._details.remove(),i._detailsShow=n,i._details=n))},Nt=function(e,t){var n=e.context;if(n.length&&e.length){var i=n[0].aoData[e[0]];if(i._details){(i._detailsShow=t)?i._details.insertAfter(i.nTr):i._details.detach();var s=n[0],o=new Xe(s),r=s.aoData;o.off("draw.dt.DT_details column-visibility.dt.DT_details destroy.dt.DT_details"),0<ct(r,"_details").length&&(o.on("draw.dt.DT_details",function(e,t){s===t&&o.rows({page:"current"}).eq(0).each(function(e){e=r[e],e._detailsShow&&e._details.insertAfter(e.nTr)})}),o.on("column-visibility.dt.DT_details",function(e,t){if(s===t)for(var n,i=g(t),o=0,a=r.length;o<a;o++)n=r[o],n._details&&n._details.children("td[colspan]").attr("colspan",i)}),o.on("destroy.dt.DT_details",function(e,t){if(s===t)for(var n=0,i=r.length;n<i;n++)r[n]._details&&kt(o,n)}))}}};Ke("row().child()",function(e,t){var s=this.context;if(e===n)return s.length&&this.length?s[0].aoData[this[0]]._details:n;if(!0===e)this.child.show();else if(!1===e)kt(this);else if(s.length&&this.length){var o=s[0],s=s[0].aoData[this[0]],r=[],a=function(e,t){if(i.isArray(e)||e instanceof i)for(var n=0,s=e.length;n<s;n++)a(e[n],t);else e.nodeName&&"tr"===e.nodeName.toLowerCase()?r.push(e):(n=i("<tr><td/></tr>").addClass(t),i("td",n).addClass(t).html(e)[0].colSpan=g(o),r.push(n[0]))};a(e,t),s._details&&s._details.remove(),s._details=i(r),s._detailsShow&&s._details.insertAfter(s.nTr)}return this}),Ke(["row().child.show()","row().child().show()"],function(){return Nt(this,!0),this}),Ke(["row().child.hide()","row().child().hide()"],function(){return Nt(this,!1),this}),Ke(["row().child.remove()","row().child().remove()"],function(){return kt(this),this}),Ke("row().child.isShown()",function(){var e=this.context;return!(!e.length||!this.length)&&(e[0].aoData[this[0]]._detailsShow||!1)});var At=/^(.+):(name|visIdx|visible)$/,It=function(e,t,n,i,s){for(var n=[],i=0,o=s.length;i<o;i++)n.push(C(e,s[i],t));return n};Ke("columns()",function(e,t){e===n?e="":i.isPlainObject(e)&&(t=e,e="");var t=St(t),s=this.iterator("table",function(n){var s=e,o=t,r=n.aoColumns,a=ct(r,"sName"),l=ct(r,"nTh");return Tt("column",s,function(e){var t=ot(e);if(""===e)return ut(r.length);if(null!==t)return[t>=0?t:r.length+t];if("function"==typeof e){var s=Et(n,o);return i.map(r,function(t,i){return e(i,It(n,i,0,0,s),l[i])?i:null})}var c="string"==typeof e?e.match(At):"";if(!c)return i(l).filter(e).map(function(){return i.inArray(this,l)}).toArray();switch(c[2]){case"visIdx":case"visible":if(t=parseInt(c[1],10),t<0){var h=i.map(r,function(e,t){return e.bVisible?t:null});return[h[h.length+t]]}return[p(n,t)];case"name":return i.map(a,function(e,t){return e===c[1]?t:null})}},n,o)},1);return s.selector.cols=e,s.selector.opts=t,s}),Ge("columns().header()","column().header()",function(){return this.iterator("column",function(e,t){return e.aoColumns[t].nTh},1)}),Ge("columns().footer()","column().footer()",function(){return this.iterator("column",function(e,t){return e.aoColumns[t].nTf},1)}),Ge("columns().data()","column().data()",function(){return this.iterator("column-rows",It,1)}),Ge("columns().dataSrc()","column().dataSrc()",function(){return this.iterator("column",function(e,t){return e.aoColumns[t].mData},1)}),Ge("columns().cache()","column().cache()",function(e){return this.iterator("column-rows",function(t,n,i,s,o){return ht(t.aoData,o,"search"===e?"_aFilterData":"_aSortData",n)},1)}),Ge("columns().nodes()","column().nodes()",function(){return this.iterator("column-rows",function(e,t,n,i,s){return ht(e.aoData,s,"anCells",t)},1)}),Ge("columns().visible()","column().visible()",function(e,t){return this.iterator("column",function(s,o){if(e===n)return s.aoColumns[o].bVisible;var r,a,l,c=s.aoColumns,h=c[o],u=s.aoData;if(e!==n&&h.bVisible!==e){if(e){var d=i.inArray(!0,ct(c,"bVisible"),o+1);for(r=0,a=u.length;r<a;r++)l=u[r].nTr,c=u[r].anCells,l&&l.insertBefore(c[o],c[d]||null)}else i(ct(s.aoData,"anCells",o)).detach();h.bVisible=e,M(s,s.aoHeader),M(s,s.aoFooter),(t===n||t)&&(f(s),(s.oScroll.sX||s.oScroll.sY)&&pe(s)),ze(s,null,"column-visibility",[s,o,e]),Ie(s)}})}),Ge("columns().indexes()","column().index()",function(e){return this.iterator("column",function(t,n){return"visible"===e?m(t,n):n},1)}),Ke("columns.adjust()",function(){return this.iterator("table",function(e){f(e)},1)}),Ke("column.index()",function(e,t){if(0!==this.context.length){var n=this.context[0];if("fromVisible"===e||"toData"===e)return p(n,t);if("fromData"===e||"toVisible"===e)return m(n,t)}}),Ke("column()",function(e,t){return Dt(this.columns(e,t))}),Ke("cells()",function(e,t,s){if(i.isPlainObject(e)&&(e.row===n?(s=e,e=null):(s=t,t=null)),i.isPlainObject(t)&&(s=t,t=null),null===t||t===n)return this.iterator("table",function(t){var o,r,a,l,c,h,u,d=e,f=St(s),p=t.aoData,m=Et(t,f),g=dt(ht(p,m,"anCells")),v=i([].concat.apply([],g)),y=t.aoColumns.length;return Tt("cell",d,function(e){var s="function"==typeof e;if(null===e||e===n||s){for(r=[],a=0,l=m.length;a<l;a++)for(o=m[a],c=0;c<y;c++)h={row:o,column:c},s?(u=t.aoData[o],e(h,C(t,o,c),u.anCells?u.anCells[c]:null)&&r.push(h)):r.push(h);return r}return i.isPlainObject(e)?[e]:v.filter(e).map(function(e,t){return o=t.parentNode._DT_RowIndex,{row:o,column:i.inArray(t,p[o].anCells)}}).toArray()},t,f)});var o,r,a,l,c,h=this.columns(t,s),u=this.rows(e,s),d=this.iterator("table",function(e,t){for(o=[],r=0,a=u[t].length;r<a;r++)for(l=0,c=h[t].length;l<c;l++)o.push({row:u[t][r],column:h[t][l]});return o},1);return i.extend(d.selector,{cols:t,rows:e,opts:s}),d}),Ge("cells().nodes()","cell().node()",function(){return this.iterator("cell",function(e,t,i){return(e=e.aoData[t].anCells)?e[i]:n},1)}),Ke("cells().data()",function(){return this.iterator("cell",function(e,t,n){return C(e,t,n)},1)}),Ge("cells().cache()","cell().cache()",function(e){return e="search"===e?"_aFilterData":"_aSortData",this.iterator("cell",function(t,n,i){return t.aoData[n][e][i]},1)}),Ge("cells().render()","cell().render()",function(e){return this.iterator("cell",function(t,n,i){return C(t,n,i,e)},1)}),Ge("cells().indexes()","cell().index()",function(){return this.iterator("cell",function(e,t,n){return{row:t,column:n,columnVisible:m(e,n)}},1)}),Ge("cells().invalidate()","cell().invalidate()",function(e){return this.iterator("cell",function(t,n,i){A(t,n,e,i)})}),Ke("cell()",function(e,t,n){return Dt(this.cells(e,t,n))}),Ke("cell().data()",function(e){var t=this.context,i=this[0];return e===n?t.length&&i.length?C(t[0],i[0].row,i[0].column):n:(x(t[0],i[0].row,i[0].column,e),A(t[0],i[0].row,"data",i[0].column),this)}),Ke("order()",function(e,t){var s=this.context;return e===n?0!==s.length?s[0].aaSorting:n:("number"==typeof e?e=[[e,t]]:i.isArray(e[0])||(e=Array.prototype.slice.call(arguments)),this.iterator("table",function(t){t.aaSorting=e.slice()}))}),Ke("order.listener()",function(e,t,n){return this.iterator("table",function(i){ke(i,e,t,n)})}),Ke(["columns().order()","column().order()"],function(e){var t=this;return this.iterator("table",function(n,s){var o=[];i.each(t[s],function(t,n){o.push([n,e])}),n.aaSorting=o})}),Ke("search()",function(e,t,s,o){var r=this.context;return e===n?0!==r.length?r[0].oPreviousSearch.sSearch:n:this.iterator("table",function(n){n.oFeatures.bFilter&&Y(n,i.extend({},n.oPreviousSearch,{sSearch:e+"",bRegex:null!==t&&t,bSmart:null===s||s,bCaseInsensitive:null===o||o}),1)})}),Ge("columns().search()","column().search()",function(e,t,s,o){return this.iterator("column",function(r,a){var l=r.aoPreSearchCols;return e===n?l[a].sSearch:void(r.oFeatures.bFilter&&(i.extend(l[a],{sSearch:e+"",bRegex:null!==t&&t,bSmart:null===s||s,bCaseInsensitive:null===o||o}),Y(r,r.oPreviousSearch,1)))})}),Ke("state()",function(){return this.context.length?this.context[0].oSavedState:null}),Ke("state.clear()",function(){return this.iterator("table",function(e){e.fnStateSaveCallback.call(e.oInstance,e,{})})}),Ke("state.loaded()",function(){return this.context.length?this.context[0].oLoadedState:null}),Ke("state.save()",function(){return this.iterator("table",function(e){Ie(e)})}),Ve.versionCheck=Ve.fnVersionCheck=function(e){for(var t,n,i=Ve.version.split("."),e=e.split("."),s=0,o=e.length;s<o;s++)if(t=parseInt(i[s],10)||0,n=parseInt(e[s],10)||0,t!==n)return t>n;return!0},Ve.isDataTable=Ve.fnIsDataTable=function(e){var t=i(e).get(0),n=!1;return i.each(Ve.settings,function(e,s){var o=s.nScrollHead?i("table",s.nScrollHead)[0]:null,r=s.nScrollFoot?i("table",s.nScrollFoot)[0]:null;s.nTable!==t&&o!==t&&r!==t||(n=!0)}),n},Ve.tables=Ve.fnTables=function(e){return i.map(Ve.settings,function(t){if(!e||e&&i(t.nTable).is(":visible"))return t.nTable})},Ve.util={throttle:ve,escapeRegex:J},Ve.camelToHungarian=o,Ke("$()",function(e,t){var n=this.rows(t).nodes(),n=i(n);return i([].concat(n.filter(e).toArray(),n.find(e).toArray()))}),i.each(["on","one","off"],function(e,t){Ke(t+"()",function(){var e=Array.prototype.slice.call(arguments);e[0].match(/\.dt\b/)||(e[0]+=".dt");var n=i(this.tables().nodes());return n[t].apply(n,e),this})}),Ke("clear()",function(){return this.iterator("table",function(e){k(e)})}),Ke("settings()",function(){return new Xe(this.context,this.context)}),Ke("init()",function(){var e=this.context;return e.length?e[0].oInit:null}),Ke("data()",function(){return this.iterator("table",function(e){return ct(e.aoData,"_aData")}).flatten()}),Ke("destroy()",function(t){return t=t||!1,this.iterator("table",function(n){var s,o=n.nTableWrapper.parentNode,r=n.oClasses,a=n.nTable,l=n.nTBody,c=n.nTHead,h=n.nTFoot,u=i(a),l=i(l),d=i(n.nTableWrapper),f=i.map(n.aoData,function(e){return e.nTr});n.bDestroying=!0,ze(n,"aoDestroyCallback","destroy",[n]),t||new Xe(n).columns().visible(!0),d.unbind(".DT").find(":not(tbody *)").unbind(".DT"),i(e).unbind(".DT-"+n.sInstance),a!=c.parentNode&&(u.children("thead").detach(),u.append(c)),h&&a!=h.parentNode&&(u.children("tfoot").detach(),u.append(h)),u.detach(),d.detach(),n.aaSorting=[],n.aaSortingFixed=[],Ne(n),i(f).removeClass(n.asStripeClasses.join(" ")),i("th, td",c).removeClass(r.sSortable+" "+r.sSortableAsc+" "+r.sSortableDesc+" "+r.sSortableNone),n.bJUI&&(i("th span."+r.sSortIcon+", td span."+r.sSortIcon,c).detach(),i("th, td",c).each(function(){var e=i("div."+r.sSortJUIWrapper,this);i(this).append(e.contents()),e.detach()})),!t&&o&&o.insertBefore(a,n.nTableReinsertBefore),l.children().detach(),l.append(f),u.css("width",n.sDestroyWidth).removeClass(r.sTable),(s=n.asDestroyStripes.length)&&l.children().each(function(e){i(this).addClass(n.asDestroyStripes[e%s])}),o=i.inArray(n,Ve.settings),-1!==o&&Ve.settings.splice(o,1)})}),i.each(["column","row","cell"],function(e,t){Ke(t+"s().every()",function(e){return this.iterator(t,function(n,i,s){e.call(new Xe(n)[t](i,s))})})}),Ke("i18n()",function(e,t,s){var o=this.context[0],e=S(e)(o.oLanguage);return e===n&&(e=t),s!==n&&i.isPlainObject(e)&&(e=e[s]!==n?e[s]:e._),e.replace("%d",s)}),Ve.version="1.10.7",Ve.settings=[],Ve.models={},Ve.models.oSearch={bCaseInsensitive:!0,sSearch:"",bRegex:!1,bSmart:!0},Ve.models.oRow={nTr:null,anCells:null,_aData:[],_aSortData:null,_aFilterData:null,_sFilterRow:null,_sRowStripe:"",src:null},Ve.models.oColumn={idx:null,aDataSort:null,asSorting:null,bSearchable:null,bSortable:null,bVisible:null,_sManualType:null,_bAttrSrc:!1,fnCreatedCell:null,fnGetData:null,fnSetData:null,mData:null,mRender:null,nTh:null,nTf:null,sClass:null,sContentPadding:null,sDefaultContent:null,sName:null,sSortDataType:"std",sSortingClass:null,sSortingClassJUI:null,sTitle:null,sType:null,sWidth:null,sWidthOrig:null},Ve.defaults={aaData:null,aaSorting:[[0,"asc"]],aaSortingFixed:[],ajax:null,aLengthMenu:[10,25,50,100],aoColumns:null,aoColumnDefs:null,aoSearchCols:[],asStripeClasses:null,bAutoWidth:!0,bDeferRender:!1,bDestroy:!1,bFilter:!0,bInfo:!0,bJQueryUI:!1,bLengthChange:!0,bPaginate:!0,bProcessing:!1,bRetrieve:!1,bScrollCollapse:!1,bServerSide:!1,bSort:!0,bSortMulti:!0,bSortCellsTop:!1,bSortClasses:!0,bStateSave:!1,fnCreatedRow:null,fnDrawCallback:null,fnFooterCallback:null,fnFormatNumber:function(e){return e.toString().replace(/\B(?=(\d{3})+(?!\d))/g,this.oLanguage.sThousands)},fnHeaderCallback:null,fnInfoCallback:null,fnInitComplete:null,fnPreDrawCallback:null,fnRowCallback:null,fnServerData:null,fnServerParams:null,fnStateLoadCallback:function(e){try{return JSON.parse((-1===e.iStateDuration?sessionStorage:localStorage).getItem("DataTables_"+e.sInstance+"_"+location.pathname))}catch(t){}},fnStateLoadParams:null,fnStateLoaded:null,fnStateSaveCallback:function(e,t){try{(-1===e.iStateDuration?sessionStorage:localStorage).setItem("DataTables_"+e.sInstance+"_"+location.pathname,JSON.stringify(t))}catch(n){}},fnStateSaveParams:null,iStateDuration:7200,iDeferLoading:null,iDisplayLength:10,iDisplayStart:0,iTabIndex:0,oClasses:{},oLanguage:{oAria:{sSortAscending:": activate to sort column ascending",sSortDescending:": activate to sort column descending"},oPaginate:{sFirst:"First",sLast:"Last",sNext:"Next",sPrevious:"Previous"},sEmptyTable:"No data available in table",sInfo:"Showing _START_ to _END_ of _TOTAL_ entries",sInfoEmpty:"Showing 0 to 0 of 0 entries",sInfoFiltered:"(filtered from _MAX_ total entries)",sInfoPostFix:"",sDecimal:"",sThousands:",",sLengthMenu:"Show _MENU_ entries",sLoadingRecords:"Loading...",sProcessing:"Processing...",sSearch:"Search:",sSearchPlaceholder:"",sUrl:"",sZeroRecords:"No matching records found"},oSearch:i.extend({},Ve.models.oSearch),sAjaxDataProp:"data",sAjaxSource:null,sDom:"lfrtip",searchDelay:null,sPaginationType:"simple_numbers",sScrollX:"",sScrollXInner:"",sScrollY:"",sServerMethod:"GET",renderer:null},s(Ve.defaults),Ve.defaults.column={aDataSort:null,iDataSort:-1,asSorting:["asc","desc"],bSearchable:!0,bSortable:!0,bVisible:!0,fnCreatedCell:null,mData:null,mRender:null,sCellType:"td",sClass:"",sContentPadding:"",sDefaultContent:null,sName:"",sSortDataType:"std",sTitle:null,sType:null,sWidth:null},s(Ve.defaults.column),Ve.models.oSettings={oFeatures:{bAutoWidth:null,bDeferRender:null,bFilter:null,bInfo:null,bLengthChange:null,bPaginate:null,bProcessing:null,bServerSide:null,bSort:null,bSortMulti:null,bSortClasses:null,bStateSave:null},oScroll:{bCollapse:null,iBarWidth:0,sX:null,sXInner:null,sY:null},oLanguage:{fnInfoCallback:null},oBrowser:{bScrollOversize:!1,bScrollbarLeft:!1},ajax:null,aanFeatures:[],aoData:[],aiDisplay:[],aiDisplayMaster:[],aoColumns:[],aoHeader:[],aoFooter:[],oPreviousSearch:{},aoPreSearchCols:[],aaSorting:null,aaSortingFixed:[],asStripeClasses:null,asDestroyStripes:[],sDestroyWidth:0,aoRowCallback:[],aoHeaderCallback:[],aoFooterCallback:[],aoDrawCallback:[],aoRowCreatedCallback:[],aoPreDrawCallback:[],aoInitComplete:[],aoStateSaveParams:[],aoStateLoadParams:[],aoStateLoaded:[],sTableId:"",nTable:null,nTHead:null,nTFoot:null,nTBody:null,nTableWrapper:null,bDeferLoading:!1,bInitialised:!1,aoOpenRows:[],sDom:null,searchDelay:null,sPaginationType:"two_button",iStateDuration:0,aoStateSave:[],aoStateLoad:[],oSavedState:null,oLoadedState:null,sAjaxSource:null,sAjaxDataProp:null,bAjaxDataGet:!0,jqXHR:null,json:n,oAjaxData:n,fnServerData:null,aoServerParams:[],sServerMethod:null,fnFormatNumber:null,aLengthMenu:null,iDraw:0,bDrawing:!1,iDrawError:-1,_iDisplayLength:10,_iDisplayStart:0,_iRecordsTotal:0,_iRecordsDisplay:0,bJUI:null,oClasses:{},bFiltered:!1,bSorted:!1,bSortCellsTop:null,oInit:null,aoDestroyCallback:[],fnRecordsTotal:function(){return"ssp"==je(this)?1*this._iRecordsTotal:this.aiDisplayMaster.length},fnRecordsDisplay:function(){return"ssp"==je(this)?1*this._iRecordsDisplay:this.aiDisplay.length},fnDisplayEnd:function(){var e=this._iDisplayLength,t=this._iDisplayStart,n=t+e,i=this.aiDisplay.length,s=this.oFeatures,o=s.bPaginate;return s.bServerSide?!1===o||-1===e?t+i:Math.min(t+e,this._iRecordsDisplay):!o||n>i||-1===e?i:n},oInstance:null,sInstance:null,iTabIndex:0,nScrollHead:null,nScrollFoot:null,aLastSort:[],oPlugins:{}},Ve.ext=Ye={buttons:{},classes:{},errMode:"alert",feature:[],search:[],selector:{cell:[],column:[],row:[]},internal:{},legacy:{ajax:null},pager:{},renderer:{pageButton:{},header:{}},order:{},type:{detect:[],search:{},order:{}},_unique:0,fnVersionCheck:Ve.fnVersionCheck,iApiIndex:0,oJUIClasses:{},sVersion:Ve.version},i.extend(Ye,{afnFiltering:Ye.search,aTypes:Ye.type.detect,ofnSearch:Ye.type.search,oSort:Ye.type.order,afnSortData:Ye.order,aoFeatures:Ye.feature,oApi:Ye.internal,oStdClasses:Ye.classes,oPagination:Ye.pager}),i.extend(Ve.ext.classes,{sTable:"dataTable",sNoFooter:"no-footer",sPageButton:"paginate_button",sPageButtonActive:"current",sPageButtonDisabled:"disabled",sStripeOdd:"odd",sStripeEven:"even",sRowEmpty:"dataTables_empty",sWrapper:"dataTables_wrapper",sFilter:"dataTables_filter",sInfo:"dataTables_info",sPaging:"dataTables_paginate paging_",sLength:"dataTables_length",sProcessing:"dataTables_processing",sSortAsc:"sorting_asc",sSortDesc:"sorting_desc",sSortable:"sorting",sSortableAsc:"sorting_asc_disabled",sSortableDesc:"sorting_desc_disabled",sSortableNone:"sorting_disabled",sSortColumn:"sorting_",sFilterInput:"",sLengthSelect:"",sScrollWrapper:"dataTables_scroll",sScrollHead:"dataTables_scrollHead",sScrollHeadInner:"dataTables_scrollHeadInner",sScrollBody:"dataTables_scrollBody",sScrollFoot:"dataTables_scrollFoot",sScrollFootInner:"dataTables_scrollFootInner",sHeaderTH:"",sFooterTH:"",sSortJUIAsc:"",sSortJUIDesc:"",sSortJUI:"",sSortJUIAscAllowed:"",sSortJUIDescAllowed:"",sSortJUIWrapper:"",sSortIcon:"",sJUIHeader:"",sJUIFooter:""});var Rt="",Rt="",Pt=Rt+"ui-state-default",Ot=Rt+"css_right ui-icon ui-icon-",Mt=Rt+"fg-toolbar ui-toolbar ui-widget-header ui-helper-clearfix";i.extend(Ve.ext.oJUIClasses,Ve.ext.classes,{sPageButton:"fg-button ui-button "+Pt,sPageButtonActive:"ui-state-disabled",sPageButtonDisabled:"ui-state-disabled",sPaging:"dataTables_paginate fg-buttonset ui-buttonset fg-buttonset-multi ui-buttonset-multi paging_",sSortAsc:Pt+" sorting_asc",sSortDesc:Pt+" sorting_desc",sSortable:Pt+" sorting",sSortableAsc:Pt+" sorting_asc_disabled",sSortableDesc:Pt+" sorting_desc_disabled",sSortableNone:Pt+" sorting_disabled",sSortJUIAsc:Ot+"triangle-1-n",sSortJUIDesc:Ot+"triangle-1-s",sSortJUI:Ot+"carat-2-n-s",sSortJUIAscAllowed:Ot+"carat-1-n",sSortJUIDescAllowed:Ot+"carat-1-s",sSortJUIWrapper:"DataTables_sort_wrapper",sSortIcon:"DataTables_sort_icon",sScrollHead:"dataTables_scrollHead "+Pt,sScrollFoot:"dataTables_scrollFoot "+Pt,sHeaderTH:Pt,sFooterTH:Pt,sJUIHeader:Mt+" ui-corner-tl ui-corner-tr",sJUIFooter:Mt+" ui-corner-bl ui-corner-br"});var Lt=Ve.ext.pager;i.extend(Lt,{simple:function(){return["previous","next"]},full:function(){return["first","previous","next","last"]},simple_numbers:function(e,t){return["previous",$e(e,t),"next"]},full_numbers:function(e,t){return["first","previous",$e(e,t),"next","last"]},_numbers:$e,numbers_length:7}),i.extend(!0,Ve.ext.renderer,{pageButton:{_:function(e,n,s,o,r,a){var l,c,h,u=e.oClasses,d=e.oLanguage.oPaginate,f=0,p=function(t,n){var o,h,m,g,v=function(t){he(e,t.data.action,!0)};for(o=0,h=n.length;o<h;o++)if(g=n[o],i.isArray(g))m=i("<"+(g.DT_el||"div")+"/>").appendTo(t),p(m,g);else{switch(c=l="",g){case"ellipsis":t.append('<span class="ellipsis">&#x2026;</span>');break;case"first":l=d.sFirst,c=g+(r>0?"":" "+u.sPageButtonDisabled);break;case"previous":l=d.sPrevious,c=g+(r>0?"":" "+u.sPageButtonDisabled);break;case"next":l=d.sNext,c=g+(r<a-1?"":" "+u.sPageButtonDisabled);break;case"last":l=d.sLast,c=g+(r<a-1?"":" "+u.sPageButtonDisabled);break;default:l=g+1,c=r===g?u.sPageButtonActive:""}l&&(m=i("<a>",{"class":u.sPageButton+" "+c,"aria-controls":e.sTableId,"data-dt-idx":f,tabindex:e.iTabIndex,id:0===s&&"string"==typeof g?e.sTableId+"_"+g:null}).html(l).appendTo(t),He(m,{action:g},v),f++)}};try{h=i(t.activeElement).data("dt-idx")}catch(m){}p(i(n).empty(),o),h&&i(n).find("[data-dt-idx="+h+"]").focus()}}}),i.extend(Ve.ext.type.detect,[function(e,t){var n=t.oLanguage.sDecimal;return at(e,n)?"num"+n:null},function(e){if(e&&!(e instanceof Date)&&(!et.test(e)||!tt.test(e)))return null;var t=Date.parse(e);return null!==t&&!isNaN(t)||st(e)?"date":null},function(e,t){var n=t.oLanguage.sDecimal;return at(e,n,!0)?"num-fmt"+n:null},function(e,t){var n=t.oLanguage.sDecimal;return lt(e,n)?"html-num"+n:null},function(e,t){var n=t.oLanguage.sDecimal;return lt(e,n,!0)?"html-num-fmt"+n:null},function(e){return st(e)||"string"==typeof e&&-1!==e.indexOf("<")?"html":null}]),i.extend(Ve.ext.type.search,{html:function(e){return st(e)?e:"string"==typeof e?e.replace(Je," ").replace(Ze,""):""},string:function(e){return st(e)?e:"string"==typeof e?e.replace(Je," "):e}});var Ht=function(e,t,n,i){return 0===e||e&&"-"!==e?(t&&(e=rt(e,t)),e.replace&&(n&&(e=e.replace(n,"")),i&&(e=e.replace(i,""))),
1*e):-(1/0)};return i.extend(Ye.type.order,{"date-pre":function(e){return Date.parse(e)||0},"html-pre":function(e){return st(e)?"":e.replace?e.replace(/<.*?>/g,"").toLowerCase():e+""},"string-pre":function(e){return st(e)?"":"string"==typeof e?e.toLowerCase():e.toString?e.toString():""},"string-asc":function(e,t){return e<t?-1:e>t?1:0},"string-desc":function(e,t){return e<t?1:e>t?-1:0}}),qe(""),i.extend(!0,Ve.ext.renderer,{header:{_:function(e,t,n,s){i(e.nTable).on("order.dt.DT",function(i,o,r,a){e===o&&(i=n.idx,t.removeClass(n.sSortingClass+" "+s.sSortAsc+" "+s.sSortDesc).addClass("asc"==a[i]?s.sSortAsc:"desc"==a[i]?s.sSortDesc:n.sSortingClass))})},jqueryui:function(e,t,n,s){i("<div/>").addClass(s.sSortJUIWrapper).append(t.contents()).append(i("<span/>").addClass(s.sSortIcon+" "+n.sSortingClassJUI)).appendTo(t),i(e.nTable).on("order.dt.DT",function(i,o,r,a){e===o&&(i=n.idx,t.removeClass(s.sSortAsc+" "+s.sSortDesc).addClass("asc"==a[i]?s.sSortAsc:"desc"==a[i]?s.sSortDesc:n.sSortingClass),t.find("span."+s.sSortIcon).removeClass(s.sSortJUIAsc+" "+s.sSortJUIDesc+" "+s.sSortJUI+" "+s.sSortJUIAscAllowed+" "+s.sSortJUIDescAllowed).addClass("asc"==a[i]?s.sSortJUIAsc:"desc"==a[i]?s.sSortJUIDesc:n.sSortingClassJUI))})}}}),Ve.render={number:function(e,t,n,i){return{display:function(s){if("number"!=typeof s&&"string"!=typeof s)return s;var o=0>s?"-":"",s=Math.abs(parseFloat(s)),r=parseInt(s,10),s=n?t+(s-r).toFixed(n).substring(2):"";return o+(i||"")+r.toString().replace(/\B(?=(\d{3})+(?!\d))/g,e)+s}}}},i.extend(Ve.ext.internal,{_fnExternApiFunc:Ue,_fnBuildAjax:B,_fnAjaxUpdate:j,_fnAjaxParameters:$,_fnAjaxUpdateDraw:q,_fnAjaxDataSrc:U,_fnAddColumn:u,_fnColumnOptions:d,_fnAdjustColumnSizing:f,_fnVisibleToColumnIndex:p,_fnColumnIndexToVisible:m,_fnVisbleColumns:g,_fnGetColumns:v,_fnColumnTypes:y,_fnApplyColumnDefs:b,_fnHungarianMap:s,_fnCamelToHungarian:o,_fnLanguageCompat:r,_fnBrowserDetect:c,_fnAddData:w,_fnAddTr:_,_fnNodeToDataIndex:function(e,t){return t._DT_RowIndex!==n?t._DT_RowIndex:null},_fnNodeToColumnIndex:function(e,t,n){return i.inArray(n,e.aoData[t].anCells)},_fnGetCellData:C,_fnSetCellData:x,_fnSplitObjNotation:T,_fnGetObjectDataFn:S,_fnSetObjectDataFn:D,_fnGetDataMaster:E,_fnClearTable:k,_fnDeleteIndex:N,_fnInvalidate:A,_fnGetRowElements:I,_fnCreateTr:R,_fnBuildHead:O,_fnDrawHead:M,_fnDraw:L,_fnReDraw:H,_fnAddOptionsHtml:F,_fnDetectHeader:z,_fnGetUniqueThs:W,_fnFeatureHtmlFilter:V,_fnFilterComplete:Y,_fnFilterCustom:X,_fnFilterColumn:K,_fnFilter:G,_fnFilterCreateSearch:Q,_fnEscapeRegex:J,_fnFilterData:Z,_fnFeatureHtmlInfo:ne,_fnUpdateInfo:ie,_fnInfoMacros:se,_fnInitialise:oe,_fnInitComplete:re,_fnLengthChange:ae,_fnFeatureHtmlLength:le,_fnFeatureHtmlPaginate:ce,_fnPageChange:he,_fnFeatureHtmlProcessing:ue,_fnProcessingDisplay:de,_fnFeatureHtmlTable:fe,_fnScrollDraw:pe,_fnApplyToChildren:me,_fnCalculateColumnWidths:ge,_fnThrottle:ve,_fnConvertToWidth:ye,_fnScrollingWidthAdjust:be,_fnGetWidestNode:we,_fnGetMaxLenString:_e,_fnStringToCss:Ce,_fnScrollBarWidth:xe,_fnSortFlatten:Te,_fnSort:Se,_fnSortAria:De,_fnSortListener:Ee,_fnSortAttachListener:ke,_fnSortingClasses:Ne,_fnSortData:Ae,_fnSaveState:Ie,_fnLoadState:Re,_fnSettingsFromNode:Pe,_fnLog:Oe,_fnMap:Me,_fnBindAction:He,_fnCallbackReg:Fe,_fnCallbackFire:ze,_fnLengthOverflow:We,_fnRenderer:Be,_fnDataSource:je,_fnRowAttributes:P,_fnCalculateEnd:function(){}}),i.fn.dataTable=Ve,i.fn.dataTableSettings=Ve.settings,i.fn.dataTableExt=Ve.ext,i.fn.DataTable=function(e){return i(this).dataTable(e).api()},i.each(Ve,function(e,t){i.fn.DataTable[e]=t}),i.fn.dataTable};"function"==typeof define&&define.amd?define("datatables",["jquery"],i):"object"==typeof exports?module.exports=i(require("jquery")):jQuery&&!jQuery.fn.dataTable&&i(jQuery)}(window,document),function(e,t){var n=function(e,n){e.extend(!0,n.defaults,{dom:"<'row'<'col-sm-6'l><'col-sm-6'f>><'row'<'col-sm-12'tr>><'row'<'col-sm-5'i><'col-sm-7'p>>",renderer:"bootstrap"}),e.extend(n.ext.classes,{sWrapper:"dataTables_wrapper form-inline dt-bootstrap",sFilterInput:"form-control input-sm",sLengthSelect:"form-control input-sm"}),n.ext.renderer.pageButton.bootstrap=function(i,s,o,r,a,l){var c,h,u,d=new n.Api(i),f=i.oClasses,p=i.oLanguage.oPaginate,m=0,g=function(t,n){var s,r,u,v,y=function(t){t.preventDefault(),e(t.currentTarget).hasClass("disabled")||d.page(t.data.action).draw(!1)};for(s=0,r=n.length;s<r;s++)if(v=n[s],e.isArray(v))g(t,v);else{switch(h=c="",v){case"ellipsis":c="&hellip;",h="disabled";break;case"first":c=p.sFirst,h=v+(0<a?"":" disabled");break;case"previous":c=p.sPrevious,h=v+(0<a?"":" disabled");break;case"next":c=p.sNext,h=v+(a<l-1?"":" disabled");break;case"last":c=p.sLast,h=v+(a<l-1?"":" disabled");break;default:c=v+1,h=a===v?"active":""}c&&(u=e("<li>",{"class":f.sPageButton+" "+h,id:0===o&&"string"==typeof v?i.sTableId+"_"+v:null}).append(e("<a>",{href:"#","aria-controls":i.sTableId,"data-dt-idx":m,tabindex:i.iTabIndex}).html(c)).appendTo(t),i.oApi._fnBindAction(u,{action:v},y),m++)}};try{u=e(t.activeElement).data("dt-idx")}catch(v){}g(e(s).empty().html('<ul class="pagination"/>').children("ul"),r),u&&e(s).find("[data-dt-idx="+u+"]").focus()},n.TableTools&&(e.extend(!0,n.TableTools.classes,{container:"DTTT btn-group",buttons:{normal:"btn btn-default",disabled:"disabled"},collection:{container:"DTTT_dropdown dropdown-menu",buttons:{normal:"",disabled:"disabled"}},print:{info:"DTTT_print_info"},select:{row:"active"}}),e.extend(!0,n.TableTools.DEFAULTS.oTags,{collection:{container:"ul",button:"li",liner:"a"}}))};"function"==typeof define&&define.amd?define(["jquery","datatables"],n):"object"==typeof exports?n(require("jquery"),require("datatables")):jQuery&&n(jQuery,jQuery.fn.dataTable)}(window,document),function(e){"function"==typeof define&&define.amd?define(["jquery"],e):e(jQuery)}(function(e){function t(t,i){var s,o,r,a=t.nodeName.toLowerCase();return"area"===a?(s=t.parentNode,o=s.name,!(!t.href||!o||"map"!==s.nodeName.toLowerCase())&&(r=e("img[usemap='#"+o+"']")[0],!!r&&n(r))):(/^(input|select|textarea|button|object)$/.test(a)?!t.disabled:"a"===a?t.href||i:i)&&n(t)}function n(t){return e.expr.filters.visible(t)&&!e(t).parents().addBack().filter(function(){return"hidden"===e.css(this,"visibility")}).length}function i(e){for(var t,n;e.length&&e[0]!==document;){if(t=e.css("position"),("absolute"===t||"relative"===t||"fixed"===t)&&(n=parseInt(e.css("zIndex"),10),!isNaN(n)&&0!==n))return n;e=e.parent()}return 0}function s(){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:""},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,numberOfMonths:1,showCurrentAtPos:0,stepMonths:1,stepBigMonths:12,altField:"",altFormat:"",constrainInput:!0,showButtonPanel:!1,autoSize:!1,disabled:!1},e.extend(this._defaults,this.regional[""]),this.regional.en=e.extend(!0,{},this.regional[""]),this.regional["en-US"]=e.extend(!0,{},this.regional.en),this.dpDiv=o(e("<div id='"+this._mainDivId+"' class='ui-datepicker ui-widget ui-widget-content ui-helper-clearfix ui-corner-all'></div>"))}function o(t){var n="button, .ui-datepicker-prev, .ui-datepicker-next, .ui-datepicker-calendar td a";return t.delegate(n,"mouseout",function(){e(this).removeClass("ui-state-hover"),-1!==this.className.indexOf("ui-datepicker-prev")&&e(this).removeClass("ui-datepicker-prev-hover"),-1!==this.className.indexOf("ui-datepicker-next")&&e(this).removeClass("ui-datepicker-next-hover")}).delegate(n,"mouseover",r)}function r(){e.datepicker._isDisabledDatepicker(v.inline?v.dpDiv.parent()[0]:v.input[0])||(e(this).parents(".ui-datepicker-calendar").find("a").removeClass("ui-state-hover"),e(this).addClass("ui-state-hover"),-1!==this.className.indexOf("ui-datepicker-prev")&&e(this).addClass("ui-datepicker-prev-hover"),-1!==this.className.indexOf("ui-datepicker-next")&&e(this).addClass("ui-datepicker-next-hover"))}function a(t,n){e.extend(t,n);for(var i in n)null==n[i]&&(t[i]=n[i]);return t}function l(e){return function(){var t=this.element.val();e.apply(this,arguments),this._refresh(),t!==this.element.val()&&this._trigger("change")}}e.ui=e.ui||{},e.extend(e.ui,{version:"1.11.4",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}}),e.fn.extend({scrollParent:function(t){var n=this.css("position"),i="absolute"===n,s=t?/(auto|scroll|hidden)/:/(auto|scroll)/,o=this.parents().filter(function(){var t=e(this);return(!i||"static"!==t.css("position"))&&s.test(t.css("overflow")+t.css("overflow-y")+t.css("overflow-x"))}).eq(0);return"fixed"!==n&&o.length?o:e(this[0].ownerDocument||document)},uniqueId:function(){var e=0;return function(){return this.each(function(){this.id||(this.id="ui-id-"+ ++e)})}}(),removeUniqueId:function(){return this.each(function(){/^ui-id-\d+$/.test(this.id)&&e(this).removeAttr("id")})}}),e.extend(e.expr[":"],{data:e.expr.createPseudo?e.expr.createPseudo(function(t){return function(n){return!!e.data(n,t)}}):function(t,n,i){return!!e.data(t,i[3])},focusable:function(n){return t(n,!isNaN(e.attr(n,"tabindex")))},tabbable:function(n){var i=e.attr(n,"tabindex"),s=isNaN(i);return(s||i>=0)&&t(n,!s)}}),e("<a>").outerWidth(1).jquery||e.each(["Width","Height"],function(t,n){function i(t,n,i,o){return e.each(s,function(){n-=parseFloat(e.css(t,"padding"+this))||0,i&&(n-=parseFloat(e.css(t,"border"+this+"Width"))||0),o&&(n-=parseFloat(e.css(t,"margin"+this))||0)}),n}var s="Width"===n?["Left","Right"]:["Top","Bottom"],o=n.toLowerCase(),r={innerWidth:e.fn.innerWidth,innerHeight:e.fn.innerHeight,outerWidth:e.fn.outerWidth,outerHeight:e.fn.outerHeight};e.fn["inner"+n]=function(t){return void 0===t?r["inner"+n].call(this):this.each(function(){e(this).css(o,i(this,t)+"px")})},e.fn["outer"+n]=function(t,s){return"number"!=typeof t?r["outer"+n].call(this,t):this.each(function(){e(this).css(o,i(this,t,!0,s)+"px")})}}),e.fn.addBack||(e.fn.addBack=function(e){return this.add(null==e?this.prevObject:this.prevObject.filter(e))}),e("<a>").data("a-b","a").removeData("a-b").data("a-b")&&(e.fn.removeData=function(t){return function(n){return arguments.length?t.call(this,e.camelCase(n)):t.call(this)}}(e.fn.removeData)),e.ui.ie=!!/msie [\w.]+/.exec(navigator.userAgent.toLowerCase()),e.fn.extend({focus:function(t){return function(n,i){return"number"==typeof n?this.each(function(){var t=this;setTimeout(function(){e(t).focus(),i&&i.call(t)},n)}):t.apply(this,arguments)}}(e.fn.focus),disableSelection:function(){var e="onselectstart"in document.createElement("div")?"selectstart":"mousedown";return function(){return this.bind(e+".ui-disableSelection",function(e){e.preventDefault()})}}(),enableSelection:function(){return this.unbind(".ui-disableSelection")},zIndex:function(t){if(void 0!==t)return this.css("zIndex",t);if(this.length)for(var n,i,s=e(this[0]);s.length&&s[0]!==document;){if(n=s.css("position"),("absolute"===n||"relative"===n||"fixed"===n)&&(i=parseInt(s.css("zIndex"),10),!isNaN(i)&&0!==i))return i;s=s.parent()}return 0}}),e.ui.plugin={add:function(t,n,i){var s,o=e.ui[t].prototype;for(s in i)o.plugins[s]=o.plugins[s]||[],o.plugins[s].push([n,i[s]])},call:function(e,t,n,i){var s,o=e.plugins[t];if(o&&(i||e.element[0].parentNode&&11!==e.element[0].parentNode.nodeType))for(s=0;o.length>s;s++)e.options[o[s][0]]&&o[s][1].apply(e.element,n)}};var c=0,h=Array.prototype.slice;e.cleanData=function(t){return function(n){var i,s,o;for(o=0;null!=(s=n[o]);o++)try{i=e._data(s,"events"),i&&i.remove&&e(s).triggerHandler("remove")}catch(r){}t(n)}}(e.cleanData),e.widget=function(t,n,i){var s,o,r,a,l={},c=t.split(".")[0];return t=t.split(".")[1],s=c+"-"+t,i||(i=n,n=e.Widget),e.expr[":"][s.toLowerCase()]=function(t){return!!e.data(t,s)},e[c]=e[c]||{},o=e[c][t],r=e[c][t]=function(e,t){return this._createWidget?void(arguments.length&&this._createWidget(e,t)):new r(e,t)},e.extend(r,o,{version:i.version,_proto:e.extend({},i),_childConstructors:[]}),a=new n,a.options=e.widget.extend({},a.options),e.each(i,function(t,i){return e.isFunction(i)?void(l[t]=function(){var e=function(){return n.prototype[t].apply(this,arguments)},s=function(e){return n.prototype[t].apply(this,e)};return function(){var t,n=this._super,o=this._superApply;return this._super=e,this._superApply=s,t=i.apply(this,arguments),this._super=n,this._superApply=o,t}}()):void(l[t]=i)}),r.prototype=e.widget.extend(a,{widgetEventPrefix:o?a.widgetEventPrefix||t:t},l,{constructor:r,namespace:c,widgetName:t,widgetFullName:s}),o?(e.each(o._childConstructors,function(t,n){var i=n.prototype;e.widget(i.namespace+"."+i.widgetName,r,n._proto)}),delete o._childConstructors):n._childConstructors.push(r),e.widget.bridge(t,r),r},e.widget.extend=function(t){for(var n,i,s=h.call(arguments,1),o=0,r=s.length;r>o;o++)for(n in s[o])i=s[o][n],s[o].hasOwnProperty(n)&&void 0!==i&&(t[n]=e.isPlainObject(i)?e.isPlainObject(t[n])?e.widget.extend({},t[n],i):e.widget.extend({},i):i);return t},e.widget.bridge=function(t,n){var i=n.prototype.widgetFullName||t;e.fn[t]=function(s){var o="string"==typeof s,r=h.call(arguments,1),a=this;return o?this.each(function(){var n,o=e.data(this,i);return"instance"===s?(a=o,!1):o?e.isFunction(o[s])&&"_"!==s.charAt(0)?(n=o[s].apply(o,r),n!==o&&void 0!==n?(a=n&&n.jquery?a.pushStack(n.get()):n,!1):void 0):e.error("no such method '"+s+"' for "+t+" widget instance"):e.error("cannot call methods on "+t+" prior to initialization; attempted to call method '"+s+"'")}):(r.length&&(s=e.widget.extend.apply(null,[s].concat(r))),this.each(function(){var t=e.data(this,i);t?(t.option(s||{}),t._init&&t._init()):e.data(this,i,new n(s,this))})),a}},e.Widget=function(){},e.Widget._childConstructors=[],e.Widget.prototype={widgetName:"widget",widgetEventPrefix:"",defaultElement:"<div>",options:{disabled:!1,create:null},_createWidget:function(t,n){n=e(n||this.defaultElement||this)[0],this.element=e(n),this.uuid=c++,this.eventNamespace="."+this.widgetName+this.uuid,this.bindings=e(),this.hoverable=e(),this.focusable=e(),n!==this&&(e.data(n,this.widgetFullName,this),this._on(!0,this.element,{remove:function(e){e.target===n&&this.destroy()}}),this.document=e(n.style?n.ownerDocument:n.document||n),this.window=e(this.document[0].defaultView||this.document[0].parentWindow)),this.options=e.widget.extend({},this.options,this._getCreateOptions(),t),this._create(),this._trigger("create",null,this._getCreateEventData()),this._init()},_getCreateOptions:e.noop,_getCreateEventData:e.noop,_create:e.noop,_init:e.noop,destroy:function(){this._destroy(),this.element.unbind(this.eventNamespace).removeData(this.widgetFullName).removeData(e.camelCase(this.widgetFullName)),this.widget().unbind(this.eventNamespace).removeAttr("aria-disabled").removeClass(this.widgetFullName+"-disabled ui-state-disabled"),this.bindings.unbind(this.eventNamespace),this.hoverable.removeClass("ui-state-hover"),this.focusable.removeClass("ui-state-focus")},_destroy:e.noop,widget:function(){return this.element},option:function(t,n){var i,s,o,r=t;if(0===arguments.length)return e.widget.extend({},this.options);if("string"==typeof t)if(r={},i=t.split("."),t=i.shift(),i.length){for(s=r[t]=e.widget.extend({},this.options[t]),o=0;i.length-1>o;o++)s[i[o]]=s[i[o]]||{},s=s[i[o]];if(t=i.pop(),1===arguments.length)return void 0===s[t]?null:s[t];s[t]=n}else{if(1===arguments.length)return void 0===this.options[t]?null:this.options[t];r[t]=n}return this._setOptions(r),this},_setOptions:function(e){var t;for(t in e)this._setOption(t,e[t]);return this},_setOption:function(e,t){return this.options[e]=t,"disabled"===e&&(this.widget().toggleClass(this.widgetFullName+"-disabled",!!t),t&&(this.hoverable.removeClass("ui-state-hover"),this.focusable.removeClass("ui-state-focus"))),this},enable:function(){return this._setOptions({disabled:!1})},disable:function(){return this._setOptions({disabled:!0})},_on:function(t,n,i){var s,o=this;"boolean"!=typeof t&&(i=n,n=t,t=!1),i?(n=s=e(n),this.bindings=this.bindings.add(n)):(i=n,n=this.element,s=this.widget()),e.each(i,function(i,r){function a(){return t||o.options.disabled!==!0&&!e(this).hasClass("ui-state-disabled")?("string"==typeof r?o[r]:r).apply(o,arguments):void 0}"string"!=typeof r&&(a.guid=r.guid=r.guid||a.guid||e.guid++);var l=i.match(/^([\w:-]*)\s*(.*)$/),c=l[1]+o.eventNamespace,h=l[2];h?s.delegate(h,c,a):n.bind(c,a)})},_off:function(t,n){n=(n||"").split(" ").join(this.eventNamespace+" ")+this.eventNamespace,t.unbind(n).undelegate(n),this.bindings=e(this.bindings.not(t).get()),this.focusable=e(this.focusable.not(t).get()),this.hoverable=e(this.hoverable.not(t).get())},_delay:function(e,t){function n(){return("string"==typeof e?i[e]:e).apply(i,arguments)}var i=this;return setTimeout(n,t||0)},_hoverable:function(t){this.hoverable=this.hoverable.add(t),this._on(t,{mouseenter:function(t){e(t.currentTarget).addClass("ui-state-hover")},mouseleave:function(t){e(t.currentTarget).removeClass("ui-state-hover")}})},_focusable:function(t){this.focusable=this.focusable.add(t),this._on(t,{focusin:function(t){e(t.currentTarget).addClass("ui-state-focus")},focusout:function(t){e(t.currentTarget).removeClass("ui-state-focus")}})},_trigger:function(t,n,i){var s,o,r=this.options[t];if(i=i||{},n=e.Event(n),n.type=(t===this.widgetEventPrefix?t:this.widgetEventPrefix+t).toLowerCase(),n.target=this.element[0],o=n.originalEvent)for(s in o)s in n||(n[s]=o[s]);return this.element.trigger(n,i),!(e.isFunction(r)&&r.apply(this.element[0],[n].concat(i))===!1||n.isDefaultPrevented())}},e.each({show:"fadeIn",hide:"fadeOut"},function(t,n){e.Widget.prototype["_"+t]=function(i,s,o){"string"==typeof s&&(s={effect:s});var r,a=s?s===!0||"number"==typeof s?n:s.effect||n:t;s=s||{},"number"==typeof s&&(s={duration:s}),r=!e.isEmptyObject(s),s.complete=o,s.delay&&i.delay(s.delay),r&&e.effects&&e.effects.effect[a]?i[t](s):a!==t&&i[a]?i[a](s.duration,s.easing,o):i.queue(function(n){e(this)[t](),o&&o.call(i[0]),n()})}}),e.widget;var u=!1;e(document).mouseup(function(){u=!1}),e.widget("ui.mouse",{version:"1.11.4",options:{cancel:"input,textarea,button,select,option",distance:1,delay:0},_mouseInit:function(){var t=this;this.element.bind("mousedown."+this.widgetName,function(e){return t._mouseDown(e)}).bind("click."+this.widgetName,function(n){return!0===e.data(n.target,t.widgetName+".preventClickEvent")?(e.removeData(n.target,t.widgetName+".preventClickEvent"),n.stopImmediatePropagation(),!1):void 0}),this.started=!1},_mouseDestroy:function(){this.element.unbind("."+this.widgetName),this._mouseMoveDelegate&&this.document.unbind("mousemove."+this.widgetName,this._mouseMoveDelegate).unbind("mouseup."+this.widgetName,this._mouseUpDelegate)},_mouseDown:function(t){if(!u){this._mouseMoved=!1,this._mouseStarted&&this._mouseUp(t),this._mouseDownEvent=t;var n=this,i=1===t.which,s=!("string"!=typeof this.options.cancel||!t.target.nodeName)&&e(t.target).closest(this.options.cancel).length;return!(i&&!s&&this._mouseCapture(t))||(this.mouseDelayMet=!this.options.delay,this.mouseDelayMet||(this._mouseDelayTimer=setTimeout(function(){n.mouseDelayMet=!0},this.options.delay)),this._mouseDistanceMet(t)&&this._mouseDelayMet(t)&&(this._mouseStarted=this._mouseStart(t)!==!1,!this._mouseStarted)?(t.preventDefault(),!0):(!0===e.data(t.target,this.widgetName+".preventClickEvent")&&e.removeData(t.target,this.widgetName+".preventClickEvent"),this._mouseMoveDelegate=function(e){return n._mouseMove(e)},this._mouseUpDelegate=function(e){return n._mouseUp(e)},this.document.bind("mousemove."+this.widgetName,this._mouseMoveDelegate).bind("mouseup."+this.widgetName,this._mouseUpDelegate),t.preventDefault(),u=!0,!0))}},_mouseMove:function(t){if(this._mouseMoved){if(e.ui.ie&&(!document.documentMode||9>document.documentMode)&&!t.button)return this._mouseUp(t);if(!t.which)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=this._mouseStart(this._mouseDownEvent,t)!==!1,this._mouseStarted?this._mouseDrag(t):this._mouseUp(t)),!this._mouseStarted)},_mouseUp:function(t){return this.document.unbind("mousemove."+this.widgetName,this._mouseMoveDelegate).unbind("mouseup."+this.widgetName,this._mouseUpDelegate),this._mouseStarted&&(this._mouseStarted=!1,t.target===this._mouseDownEvent.target&&e.data(t.target,this.widgetName+".preventClickEvent",!0),this._mouseStop(t)),u=!1,!1},_mouseDistanceMet:function(e){return Math.max(Math.abs(this._mouseDownEvent.pageX-e.pageX),Math.abs(this._mouseDownEvent.pageY-e.pageY))>=this.options.distance},_mouseDelayMet:function(){return this.mouseDelayMet},_mouseStart:function(){},_mouseDrag:function(){},_mouseStop:function(){},_mouseCapture:function(){return!0}}),function(){function t(e,t,n){return[parseFloat(e[0])*(f.test(e[0])?t/100:1),parseFloat(e[1])*(f.test(e[1])?n/100:1)]}function n(t,n){return parseInt(e.css(t,n),10)||0}function i(t){var n=t[0];return 9===n.nodeType?{width:t.width(),height:t.height(),offset:{top:0,left:0}}:e.isWindow(n)?{width:t.width(),height:t.height(),offset:{top:t.scrollTop(),left:t.scrollLeft()}}:n.preventDefault?{width:0,height:0,offset:{top:n.pageY,left:n.pageX}}:{width:t.outerWidth(),height:t.outerHeight(),offset:t.offset()}}e.ui=e.ui||{};var s,o,r=Math.max,a=Math.abs,l=Math.round,c=/left|center|right/,h=/top|center|bottom/,u=/[\+\-]\d+(\.[\d]+)?%?/,d=/^\w+/,f=/%$/,p=e.fn.position;e.position={scrollbarWidth:function(){if(void 0!==s)return s;var t,n,i=e("<div style='display:block;position:absolute;width:50px;height:50px;overflow:hidden;'><div style='height:100px;width:auto;'></div></div>"),o=i.children()[0];return e("body").append(i),t=o.offsetWidth,i.css("overflow","scroll"),n=o.offsetWidth,t===n&&(n=i[0].clientWidth),i.remove(),s=t-n},getScrollInfo:function(t){var n=t.isWindow||t.isDocument?"":t.element.css("overflow-x"),i=t.isWindow||t.isDocument?"":t.element.css("overflow-y"),s="scroll"===n||"auto"===n&&t.width<t.element[0].scrollWidth,o="scroll"===i||"auto"===i&&t.height<t.element[0].scrollHeight;return{width:o?e.position.scrollbarWidth():0,height:s?e.position.scrollbarWidth():0}},getWithinInfo:function(t){var n=e(t||window),i=e.isWindow(n[0]),s=!!n[0]&&9===n[0].nodeType;return{element:n,isWindow:i,isDocument:s,offset:n.offset()||{left:0,top:0},scrollLeft:n.scrollLeft(),scrollTop:n.scrollTop(),width:i||s?n.width():n.outerWidth(),height:i||s?n.height():n.outerHeight()}}},e.fn.position=function(s){if(!s||!s.of)return p.apply(this,arguments);s=e.extend({},s);var f,m,g,v,y,b,w=e(s.of),_=e.position.getWithinInfo(s.within),C=e.position.getScrollInfo(_),x=(s.collision||"flip").split(" "),T={};return b=i(w),w[0].preventDefault&&(s.at="left top"),m=b.width,g=b.height,v=b.offset,y=e.extend({},v),e.each(["my","at"],function(){var e,t,n=(s[this]||"").split(" ");1===n.length&&(n=c.test(n[0])?n.concat(["center"]):h.test(n[0])?["center"].concat(n):["center","center"]),n[0]=c.test(n[0])?n[0]:"center",n[1]=h.test(n[1])?n[1]:"center",e=u.exec(n[0]),t=u.exec(n[1]),T[this]=[e?e[0]:0,t?t[0]:0],s[this]=[d.exec(n[0])[0],d.exec(n[1])[0]]}),1===x.length&&(x[1]=x[0]),"right"===s.at[0]?y.left+=m:"center"===s.at[0]&&(y.left+=m/2),"bottom"===s.at[1]?y.top+=g:"center"===s.at[1]&&(y.top+=g/2),f=t(T.at,m,g),y.left+=f[0],y.top+=f[1],this.each(function(){var i,c,h=e(this),u=h.outerWidth(),d=h.outerHeight(),p=n(this,"marginLeft"),b=n(this,"marginTop"),S=u+p+n(this,"marginRight")+C.width,D=d+b+n(this,"marginBottom")+C.height,E=e.extend({},y),k=t(T.my,h.outerWidth(),h.outerHeight());"right"===s.my[0]?E.left-=u:"center"===s.my[0]&&(E.left-=u/2),"bottom"===s.my[1]?E.top-=d:"center"===s.my[1]&&(E.top-=d/2),E.left+=k[0],E.top+=k[1],o||(E.left=l(E.left),E.top=l(E.top)),i={marginLeft:p,marginTop:b},e.each(["left","top"],function(t,n){e.ui.position[x[t]]&&e.ui.position[x[t]][n](E,{targetWidth:m,targetHeight:g,elemWidth:u,elemHeight:d,collisionPosition:i,collisionWidth:S,collisionHeight:D,offset:[f[0]+k[0],f[1]+k[1]],my:s.my,at:s.at,within:_,elem:h})}),s.using&&(c=function(e){var t=v.left-E.left,n=t+m-u,i=v.top-E.top,o=i+g-d,l={target:{element:w,left:v.left,top:v.top,width:m,height:g},element:{element:h,left:E.left,top:E.top,width:u,height:d},horizontal:0>n?"left":t>0?"right":"center",vertical:0>o?"top":i>0?"bottom":"middle"};u>m&&m>a(t+n)&&(l.horizontal="center"),d>g&&g>a(i+o)&&(l.vertical="middle"),l.important=r(a(t),a(n))>r(a(i),a(o))?"horizontal":"vertical",s.using.call(this,e,l)}),h.offset(e.extend(E,{using:c}))})},e.ui.position={fit:{left:function(e,t){var n,i=t.within,s=i.isWindow?i.scrollLeft:i.offset.left,o=i.width,a=e.left-t.collisionPosition.marginLeft,l=s-a,c=a+t.collisionWidth-o-s;t.collisionWidth>o?l>0&&0>=c?(n=e.left+l+t.collisionWidth-o-s,e.left+=l-n):e.left=c>0&&0>=l?s:l>c?s+o-t.collisionWidth:s:l>0?e.left+=l:c>0?e.left-=c:e.left=r(e.left-a,e.left)},top:function(e,t){var n,i=t.within,s=i.isWindow?i.scrollTop:i.offset.top,o=t.within.height,a=e.top-t.collisionPosition.marginTop,l=s-a,c=a+t.collisionHeight-o-s;t.collisionHeight>o?l>0&&0>=c?(n=e.top+l+t.collisionHeight-o-s,e.top+=l-n):e.top=c>0&&0>=l?s:l>c?s+o-t.collisionHeight:s:l>0?e.top+=l:c>0?e.top-=c:e.top=r(e.top-a,e.top)}},flip:{left:function(e,t){var n,i,s=t.within,o=s.offset.left+s.scrollLeft,r=s.width,l=s.isWindow?s.scrollLeft:s.offset.left,c=e.left-t.collisionPosition.marginLeft,h=c-l,u=c+t.collisionWidth-r-l,d="left"===t.my[0]?-t.elemWidth:"right"===t.my[0]?t.elemWidth:0,f="left"===t.at[0]?t.targetWidth:"right"===t.at[0]?-t.targetWidth:0,p=-2*t.offset[0];0>h?(n=e.left+d+f+p+t.collisionWidth-r-o,(0>n||a(h)>n)&&(e.left+=d+f+p)):u>0&&(i=e.left-t.collisionPosition.marginLeft+d+f+p-l,(i>0||u>a(i))&&(e.left+=d+f+p))},top:function(e,t){var n,i,s=t.within,o=s.offset.top+s.scrollTop,r=s.height,l=s.isWindow?s.scrollTop:s.offset.top,c=e.top-t.collisionPosition.marginTop,h=c-l,u=c+t.collisionHeight-r-l,d="top"===t.my[1],f=d?-t.elemHeight:"bottom"===t.my[1]?t.elemHeight:0,p="top"===t.at[1]?t.targetHeight:"bottom"===t.at[1]?-t.targetHeight:0,m=-2*t.offset[1];0>h?(i=e.top+f+p+m+t.collisionHeight-r-o,(0>i||a(h)>i)&&(e.top+=f+p+m)):u>0&&(n=e.top-t.collisionPosition.marginTop+f+p+m-l,(n>0||u>a(n))&&(e.top+=f+p+m))}},flipfit:{left:function(){e.ui.position.flip.left.apply(this,arguments),e.ui.position.fit.left.apply(this,arguments)},top:function(){e.ui.position.flip.top.apply(this,arguments),e.ui.position.fit.top.apply(this,arguments)}}},function(){var t,n,i,s,r,a=document.getElementsByTagName("body")[0],l=document.createElement("div");t=document.createElement(a?"div":"body"),i={visibility:"hidden",width:0,height:0,border:0,margin:0,background:"none"},a&&e.extend(i,{position:"absolute",left:"-1000px",top:"-1000px"});for(r in i)t.style[r]=i[r];t.appendChild(l),n=a||document.documentElement,n.insertBefore(t,n.firstChild),l.style.cssText="position: absolute; left: 10.7432222px;",s=e(l).offset().left,o=s>10&&11>s,t.innerHTML="",n.removeChild(t)}()}(),e.ui.position,e.widget("ui.draggable",e.ui.mouse,{version:"1.11.4",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.element.addClass("ui-draggable"),this.options.disabled&&this.element.addClass("ui-draggable-disabled"),this._setHandleClassName(),this._mouseInit()},_setOption:function(e,t){this._super(e,t),"handle"===e&&(this._removeHandleClassName(),this._setHandleClassName())},_destroy:function(){return(this.helper||this.element).is(".ui-draggable-dragging")?void(this.destroyOnClear=!0):(this.element.removeClass("ui-draggable ui-draggable-dragging ui-draggable-disabled"),this._removeHandleClassName(),void this._mouseDestroy())},_mouseCapture:function(t){var n=this.options;return this._blurActiveElement(t),!(this.helper||n.disabled||e(t.target).closest(".ui-resizable-handle").length>0)&&(this.handle=this._getHandle(t),!!this.handle&&(this._blockFrames(n.iframeFix===!0?"iframe":n.iframeFix),!0))},_blockFrames:function(t){this.iframeBlocks=this.document.find(t).map(function(){var t=e(this);return e("<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 n=this.document[0];if(this.handleElement.is(t.target))try{n.activeElement&&"body"!==n.activeElement.nodeName.toLowerCase()&&e(n.activeElement).blur()}catch(i){}},_mouseStart:function(t){var n=this.options;return this.helper=this._createHelper(t),this.helper.addClass("ui-draggable-dragging"),this._cacheHelperProportions(),e.ui.ddmanager&&(e.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=this.helper.parents().filter(function(){return"fixed"===e(this).css("position")}).length>0,this.positionAbs=this.element.offset(),this._refreshOffsets(t),this.originalPosition=this.position=this._generatePosition(t,!1),this.originalPageX=t.pageX,this.originalPageY=t.pageY,n.cursorAt&&this._adjustOffsetFromHelper(n.cursorAt),this._setContainment(),this._trigger("start",t)===!1?(this._clear(),!1):(this._cacheHelperProportions(),e.ui.ddmanager&&!n.dropBehaviour&&e.ui.ddmanager.prepareOffsets(this,t),this._normalizeRightBottom(),this._mouseDrag(t,!0),e.ui.ddmanager&&e.ui.ddmanager.dragStart(this,t),!0)},_refreshOffsets:function(e){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:e.pageX-this.offset.left,top:e.pageY-this.offset.top}},_mouseDrag:function(t,n){if(this.hasFixedAncestor&&(this.offset.parent=this._getParentOffset()),this.position=this._generatePosition(t,!0),this.positionAbs=this._convertPositionTo("absolute"),!n){var i=this._uiHash();if(this._trigger("drag",t,i)===!1)return this._mouseUp({}),!1;this.position=i.position}return this.helper[0].style.left=this.position.left+"px",this.helper[0].style.top=this.position.top+"px",e.ui.ddmanager&&e.ui.ddmanager.drag(this,t),!1},_mouseStop:function(t){var n=this,i=!1;
return e.ui.ddmanager&&!this.options.dropBehaviour&&(i=e.ui.ddmanager.drop(this,t)),this.dropped&&(i=this.dropped,this.dropped=!1),"invalid"===this.options.revert&&!i||"valid"===this.options.revert&&i||this.options.revert===!0||e.isFunction(this.options.revert)&&this.options.revert.call(this.element,i)?e(this.helper).animate(this.originalPosition,parseInt(this.options.revertDuration,10),function(){n._trigger("stop",t)!==!1&&n._clear()}):this._trigger("stop",t)!==!1&&this._clear(),!1},_mouseUp:function(t){return this._unblockFrames(),e.ui.ddmanager&&e.ui.ddmanager.dragStop(this,t),this.handleElement.is(t.target)&&this.element.focus(),e.ui.mouse.prototype._mouseUp.call(this,t)},cancel:function(){return this.helper.is(".ui-draggable-dragging")?this._mouseUp({}):this._clear(),this},_getHandle:function(t){return!this.options.handle||!!e(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.handleElement.addClass("ui-draggable-handle")},_removeHandleClassName:function(){this.handleElement.removeClass("ui-draggable-handle")},_createHelper:function(t){var n=this.options,i=e.isFunction(n.helper),s=i?e(n.helper.apply(this.element[0],[t])):"clone"===n.helper?this.element.clone().removeAttr("id"):this.element;return s.parents("body").length||s.appendTo("parent"===n.appendTo?this.element[0].parentNode:n.appendTo),i&&s[0]===this.element[0]&&this._setPositionRelative(),s[0]===this.element[0]||/(fixed|absolute)/.test(s.css("position"))||s.css("position","absolute"),s},_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(" ")),e.isArray(t)&&(t={left:+t[0],top:+t[1]||0}),"left"in 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(e){return/(html|body)/i.test(e.tagName)||e===this.document[0]},_getParentOffset:function(){var t=this.offsetParent.offset(),n=this.document[0];return"absolute"===this.cssPosition&&this.scrollParent[0]!==n&&e.contains(this.scrollParent[0],this.offsetParent[0])&&(t.left+=this.scrollParent.scrollLeft(),t.top+=this.scrollParent.scrollTop()),this._isRootNode(this.offsetParent[0])&&(t={top:0,left:0}),{top:t.top+(parseInt(this.offsetParent.css("borderTopWidth"),10)||0),left:t.left+(parseInt(this.offsetParent.css("borderLeftWidth"),10)||0)}},_getRelativeOffset:function(){if("relative"!==this.cssPosition)return{top:0,left:0};var e=this.element.position(),t=this._isRootNode(this.scrollParent[0]);return{top:e.top-(parseInt(this.helper.css("top"),10)||0)+(t?0:this.scrollParent.scrollTop()),left:e.left-(parseInt(this.helper.css("left"),10)||0)+(t?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,n,i,s=this.options,o=this.document[0];return this.relativeContainer=null,s.containment?"window"===s.containment?void(this.containment=[e(window).scrollLeft()-this.offset.relative.left-this.offset.parent.left,e(window).scrollTop()-this.offset.relative.top-this.offset.parent.top,e(window).scrollLeft()+e(window).width()-this.helperProportions.width-this.margins.left,e(window).scrollTop()+(e(window).height()||o.body.parentNode.scrollHeight)-this.helperProportions.height-this.margins.top]):"document"===s.containment?void(this.containment=[0,0,e(o).width()-this.helperProportions.width-this.margins.left,(e(o).height()||o.body.parentNode.scrollHeight)-this.helperProportions.height-this.margins.top]):s.containment.constructor===Array?void(this.containment=s.containment):("parent"===s.containment&&(s.containment=this.helper[0].parentNode),n=e(s.containment),i=n[0],void(i&&(t=/(scroll|auto)/.test(n.css("overflow")),this.containment=[(parseInt(n.css("borderLeftWidth"),10)||0)+(parseInt(n.css("paddingLeft"),10)||0),(parseInt(n.css("borderTopWidth"),10)||0)+(parseInt(n.css("paddingTop"),10)||0),(t?Math.max(i.scrollWidth,i.offsetWidth):i.offsetWidth)-(parseInt(n.css("borderRightWidth"),10)||0)-(parseInt(n.css("paddingRight"),10)||0)-this.helperProportions.width-this.margins.left-this.margins.right,(t?Math.max(i.scrollHeight,i.offsetHeight):i.offsetHeight)-(parseInt(n.css("borderBottomWidth"),10)||0)-(parseInt(n.css("paddingBottom"),10)||0)-this.helperProportions.height-this.margins.top-this.margins.bottom],this.relativeContainer=n))):void(this.containment=null)},_convertPositionTo:function(e,t){t||(t=this.position);var n="absolute"===e?1:-1,i=this._isRootNode(this.scrollParent[0]);return{top:t.top+this.offset.relative.top*n+this.offset.parent.top*n-("fixed"===this.cssPosition?-this.offset.scroll.top:i?0:this.offset.scroll.top)*n,left:t.left+this.offset.relative.left*n+this.offset.parent.left*n-("fixed"===this.cssPosition?-this.offset.scroll.left:i?0:this.offset.scroll.left)*n}},_generatePosition:function(e,t){var n,i,s,o,r=this.options,a=this._isRootNode(this.scrollParent[0]),l=e.pageX,c=e.pageY;return a&&this.offset.scroll||(this.offset.scroll={top:this.scrollParent.scrollTop(),left:this.scrollParent.scrollLeft()}),t&&(this.containment&&(this.relativeContainer?(i=this.relativeContainer.offset(),n=[this.containment[0]+i.left,this.containment[1]+i.top,this.containment[2]+i.left,this.containment[3]+i.top]):n=this.containment,e.pageX-this.offset.click.left<n[0]&&(l=n[0]+this.offset.click.left),e.pageY-this.offset.click.top<n[1]&&(c=n[1]+this.offset.click.top),e.pageX-this.offset.click.left>n[2]&&(l=n[2]+this.offset.click.left),e.pageY-this.offset.click.top>n[3]&&(c=n[3]+this.offset.click.top)),r.grid&&(s=r.grid[1]?this.originalPageY+Math.round((c-this.originalPageY)/r.grid[1])*r.grid[1]:this.originalPageY,c=n?s-this.offset.click.top>=n[1]||s-this.offset.click.top>n[3]?s:s-this.offset.click.top>=n[1]?s-r.grid[1]:s+r.grid[1]:s,o=r.grid[0]?this.originalPageX+Math.round((l-this.originalPageX)/r.grid[0])*r.grid[0]:this.originalPageX,l=n?o-this.offset.click.left>=n[0]||o-this.offset.click.left>n[2]?o:o-this.offset.click.left>=n[0]?o-r.grid[0]:o+r.grid[0]:o),"y"===r.axis&&(l=this.originalPageX),"x"===r.axis&&(c=this.originalPageY)),{top:c-this.offset.click.top-this.offset.relative.top-this.offset.parent.top+("fixed"===this.cssPosition?-this.offset.scroll.top:a?0:this.offset.scroll.top),left:l-this.offset.click.left-this.offset.relative.left-this.offset.parent.left+("fixed"===this.cssPosition?-this.offset.scroll.left:a?0:this.offset.scroll.left)}},_clear:function(){this.helper.removeClass("ui-draggable-dragging"),this.helper[0]===this.element[0]||this.cancelHelperRemoval||this.helper.remove(),this.helper=null,this.cancelHelperRemoval=!1,this.destroyOnClear&&this.destroy()},_normalizeRightBottom:function(){"y"!==this.options.axis&&"auto"!==this.helper.css("right")&&(this.helper.width(this.helper.width()),this.helper.css("right","auto")),"x"!==this.options.axis&&"auto"!==this.helper.css("bottom")&&(this.helper.height(this.helper.height()),this.helper.css("bottom","auto"))},_trigger:function(t,n,i){return i=i||this._uiHash(),e.ui.plugin.call(this,t,[n,i,this],!0),/^(drag|start|stop)/.test(t)&&(this.positionAbs=this._convertPositionTo("absolute"),i.offset=this.positionAbs),e.Widget.prototype._trigger.call(this,t,n,i)},plugins:{},_uiHash:function(){return{helper:this.helper,position:this.position,originalPosition:this.originalPosition,offset:this.positionAbs}}}),e.ui.plugin.add("draggable","connectToSortable",{start:function(t,n,i){var s=e.extend({},n,{item:i.element});i.sortables=[],e(i.options.connectToSortable).each(function(){var n=e(this).sortable("instance");n&&!n.options.disabled&&(i.sortables.push(n),n.refreshPositions(),n._trigger("activate",t,s))})},stop:function(t,n,i){var s=e.extend({},n,{item:i.element});i.cancelHelperRemoval=!1,e.each(i.sortables,function(){var e=this;e.isOver?(e.isOver=0,i.cancelHelperRemoval=!0,e.cancelHelperRemoval=!1,e._storedCSS={position:e.placeholder.css("position"),top:e.placeholder.css("top"),left:e.placeholder.css("left")},e._mouseStop(t),e.options.helper=e.options._helper):(e.cancelHelperRemoval=!0,e._trigger("deactivate",t,s))})},drag:function(t,n,i){e.each(i.sortables,function(){var s=!1,o=this;o.positionAbs=i.positionAbs,o.helperProportions=i.helperProportions,o.offset.click=i.offset.click,o._intersectsWith(o.containerCache)&&(s=!0,e.each(i.sortables,function(){return this.positionAbs=i.positionAbs,this.helperProportions=i.helperProportions,this.offset.click=i.offset.click,this!==o&&this._intersectsWith(this.containerCache)&&e.contains(o.element[0],this.element[0])&&(s=!1),s})),s?(o.isOver||(o.isOver=1,i._parent=n.helper.parent(),o.currentItem=n.helper.appendTo(o.element).data("ui-sortable-item",!0),o.options._helper=o.options.helper,o.options.helper=function(){return n.helper[0]},t.target=o.currentItem[0],o._mouseCapture(t,!0),o._mouseStart(t,!0,!0),o.offset.click.top=i.offset.click.top,o.offset.click.left=i.offset.click.left,o.offset.parent.left-=i.offset.parent.left-o.offset.parent.left,o.offset.parent.top-=i.offset.parent.top-o.offset.parent.top,i._trigger("toSortable",t),i.dropped=o.element,e.each(i.sortables,function(){this.refreshPositions()}),i.currentItem=i.element,o.fromOutside=i),o.currentItem&&(o._mouseDrag(t),n.position=o.position)):o.isOver&&(o.isOver=0,o.cancelHelperRemoval=!0,o.options._revert=o.options.revert,o.options.revert=!1,o._trigger("out",t,o._uiHash(o)),o._mouseStop(t,!0),o.options.revert=o.options._revert,o.options.helper=o.options._helper,o.placeholder&&o.placeholder.remove(),n.helper.appendTo(i._parent),i._refreshOffsets(t),n.position=i._generatePosition(t,!0),i._trigger("fromSortable",t),i.dropped=!1,e.each(i.sortables,function(){this.refreshPositions()}))})}}),e.ui.plugin.add("draggable","cursor",{start:function(t,n,i){var s=e("body"),o=i.options;s.css("cursor")&&(o._cursor=s.css("cursor")),s.css("cursor",o.cursor)},stop:function(t,n,i){var s=i.options;s._cursor&&e("body").css("cursor",s._cursor)}}),e.ui.plugin.add("draggable","opacity",{start:function(t,n,i){var s=e(n.helper),o=i.options;s.css("opacity")&&(o._opacity=s.css("opacity")),s.css("opacity",o.opacity)},stop:function(t,n,i){var s=i.options;s._opacity&&e(n.helper).css("opacity",s._opacity)}}),e.ui.plugin.add("draggable","scroll",{start:function(e,t,n){n.scrollParentNotHidden||(n.scrollParentNotHidden=n.helper.scrollParent(!1)),n.scrollParentNotHidden[0]!==n.document[0]&&"HTML"!==n.scrollParentNotHidden[0].tagName&&(n.overflowOffset=n.scrollParentNotHidden.offset())},drag:function(t,n,i){var s=i.options,o=!1,r=i.scrollParentNotHidden[0],a=i.document[0];r!==a&&"HTML"!==r.tagName?(s.axis&&"x"===s.axis||(i.overflowOffset.top+r.offsetHeight-t.pageY<s.scrollSensitivity?r.scrollTop=o=r.scrollTop+s.scrollSpeed:t.pageY-i.overflowOffset.top<s.scrollSensitivity&&(r.scrollTop=o=r.scrollTop-s.scrollSpeed)),s.axis&&"y"===s.axis||(i.overflowOffset.left+r.offsetWidth-t.pageX<s.scrollSensitivity?r.scrollLeft=o=r.scrollLeft+s.scrollSpeed:t.pageX-i.overflowOffset.left<s.scrollSensitivity&&(r.scrollLeft=o=r.scrollLeft-s.scrollSpeed))):(s.axis&&"x"===s.axis||(t.pageY-e(a).scrollTop()<s.scrollSensitivity?o=e(a).scrollTop(e(a).scrollTop()-s.scrollSpeed):e(window).height()-(t.pageY-e(a).scrollTop())<s.scrollSensitivity&&(o=e(a).scrollTop(e(a).scrollTop()+s.scrollSpeed))),s.axis&&"y"===s.axis||(t.pageX-e(a).scrollLeft()<s.scrollSensitivity?o=e(a).scrollLeft(e(a).scrollLeft()-s.scrollSpeed):e(window).width()-(t.pageX-e(a).scrollLeft())<s.scrollSensitivity&&(o=e(a).scrollLeft(e(a).scrollLeft()+s.scrollSpeed)))),o!==!1&&e.ui.ddmanager&&!s.dropBehaviour&&e.ui.ddmanager.prepareOffsets(i,t)}}),e.ui.plugin.add("draggable","snap",{start:function(t,n,i){var s=i.options;i.snapElements=[],e(s.snap.constructor!==String?s.snap.items||":data(ui-draggable)":s.snap).each(function(){var t=e(this),n=t.offset();this!==i.element[0]&&i.snapElements.push({item:this,width:t.outerWidth(),height:t.outerHeight(),top:n.top,left:n.left})})},drag:function(t,n,i){var s,o,r,a,l,c,h,u,d,f,p=i.options,m=p.snapTolerance,g=n.offset.left,v=g+i.helperProportions.width,y=n.offset.top,b=y+i.helperProportions.height;for(d=i.snapElements.length-1;d>=0;d--)l=i.snapElements[d].left-i.margins.left,c=l+i.snapElements[d].width,h=i.snapElements[d].top-i.margins.top,u=h+i.snapElements[d].height,l-m>v||g>c+m||h-m>b||y>u+m||!e.contains(i.snapElements[d].item.ownerDocument,i.snapElements[d].item)?(i.snapElements[d].snapping&&i.options.snap.release&&i.options.snap.release.call(i.element,t,e.extend(i._uiHash(),{snapItem:i.snapElements[d].item})),i.snapElements[d].snapping=!1):("inner"!==p.snapMode&&(s=m>=Math.abs(h-b),o=m>=Math.abs(u-y),r=m>=Math.abs(l-v),a=m>=Math.abs(c-g),s&&(n.position.top=i._convertPositionTo("relative",{top:h-i.helperProportions.height,left:0}).top),o&&(n.position.top=i._convertPositionTo("relative",{top:u,left:0}).top),r&&(n.position.left=i._convertPositionTo("relative",{top:0,left:l-i.helperProportions.width}).left),a&&(n.position.left=i._convertPositionTo("relative",{top:0,left:c}).left)),f=s||o||r||a,"outer"!==p.snapMode&&(s=m>=Math.abs(h-y),o=m>=Math.abs(u-b),r=m>=Math.abs(l-g),a=m>=Math.abs(c-v),s&&(n.position.top=i._convertPositionTo("relative",{top:h,left:0}).top),o&&(n.position.top=i._convertPositionTo("relative",{top:u-i.helperProportions.height,left:0}).top),r&&(n.position.left=i._convertPositionTo("relative",{top:0,left:l}).left),a&&(n.position.left=i._convertPositionTo("relative",{top:0,left:c-i.helperProportions.width}).left)),!i.snapElements[d].snapping&&(s||o||r||a||f)&&i.options.snap.snap&&i.options.snap.snap.call(i.element,t,e.extend(i._uiHash(),{snapItem:i.snapElements[d].item})),i.snapElements[d].snapping=s||o||r||a||f)}}),e.ui.plugin.add("draggable","stack",{start:function(t,n,i){var s,o=i.options,r=e.makeArray(e(o.stack)).sort(function(t,n){return(parseInt(e(t).css("zIndex"),10)||0)-(parseInt(e(n).css("zIndex"),10)||0)});r.length&&(s=parseInt(e(r[0]).css("zIndex"),10)||0,e(r).each(function(t){e(this).css("zIndex",s+t)}),this.css("zIndex",s+r.length))}}),e.ui.plugin.add("draggable","zIndex",{start:function(t,n,i){var s=e(n.helper),o=i.options;s.css("zIndex")&&(o._zIndex=s.css("zIndex")),s.css("zIndex",o.zIndex)},stop:function(t,n,i){var s=i.options;s._zIndex&&e(n.helper).css("zIndex",s._zIndex)}}),e.ui.draggable,e.widget("ui.droppable",{version:"1.11.4",widgetEventPrefix:"drop",options:{accept:"*",activeClass:!1,addClasses:!0,greedy:!1,hoverClass:!1,scope:"default",tolerance:"intersect",activate:null,deactivate:null,drop:null,out:null,over:null},_create:function(){var t,n=this.options,i=n.accept;this.isover=!1,this.isout=!0,this.accept=e.isFunction(i)?i:function(e){return e.is(i)},this.proportions=function(){return arguments.length?void(t=arguments[0]):t?t:t={width:this.element[0].offsetWidth,height:this.element[0].offsetHeight}},this._addToManager(n.scope),n.addClasses&&this.element.addClass("ui-droppable")},_addToManager:function(t){e.ui.ddmanager.droppables[t]=e.ui.ddmanager.droppables[t]||[],e.ui.ddmanager.droppables[t].push(this)},_splice:function(e){for(var t=0;e.length>t;t++)e[t]===this&&e.splice(t,1)},_destroy:function(){var t=e.ui.ddmanager.droppables[this.options.scope];this._splice(t),this.element.removeClass("ui-droppable ui-droppable-disabled")},_setOption:function(t,n){if("accept"===t)this.accept=e.isFunction(n)?n:function(e){return e.is(n)};else if("scope"===t){var i=e.ui.ddmanager.droppables[this.options.scope];this._splice(i),this._addToManager(n)}this._super(t,n)},_activate:function(t){var n=e.ui.ddmanager.current;this.options.activeClass&&this.element.addClass(this.options.activeClass),n&&this._trigger("activate",t,this.ui(n))},_deactivate:function(t){var n=e.ui.ddmanager.current;this.options.activeClass&&this.element.removeClass(this.options.activeClass),n&&this._trigger("deactivate",t,this.ui(n))},_over:function(t){var n=e.ui.ddmanager.current;n&&(n.currentItem||n.element)[0]!==this.element[0]&&this.accept.call(this.element[0],n.currentItem||n.element)&&(this.options.hoverClass&&this.element.addClass(this.options.hoverClass),this._trigger("over",t,this.ui(n)))},_out:function(t){var n=e.ui.ddmanager.current;n&&(n.currentItem||n.element)[0]!==this.element[0]&&this.accept.call(this.element[0],n.currentItem||n.element)&&(this.options.hoverClass&&this.element.removeClass(this.options.hoverClass),this._trigger("out",t,this.ui(n)))},_drop:function(t,n){var i=n||e.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 n=e(this).droppable("instance");return n.options.greedy&&!n.options.disabled&&n.options.scope===i.options.scope&&n.accept.call(n.element[0],i.currentItem||i.element)&&e.ui.intersect(i,e.extend(n,{offset:n.element.offset()}),n.options.tolerance,t)?(s=!0,!1):void 0}),!s&&(!!this.accept.call(this.element[0],i.currentItem||i.element)&&(this.options.activeClass&&this.element.removeClass(this.options.activeClass),this.options.hoverClass&&this.element.removeClass(this.options.hoverClass),this._trigger("drop",t,this.ui(i)),this.element)))},ui:function(e){return{draggable:e.currentItem||e.element,helper:e.helper,position:e.position,offset:e.positionAbs}}}),e.ui.intersect=function(){function e(e,t,n){return e>=t&&t+n>e}return function(t,n,i,s){if(!n.offset)return!1;var o=(t.positionAbs||t.position.absolute).left+t.margins.left,r=(t.positionAbs||t.position.absolute).top+t.margins.top,a=o+t.helperProportions.width,l=r+t.helperProportions.height,c=n.offset.left,h=n.offset.top,u=c+n.proportions().width,d=h+n.proportions().height;switch(i){case"fit":return o>=c&&u>=a&&r>=h&&d>=l;case"intersect":return o+t.helperProportions.width/2>c&&u>a-t.helperProportions.width/2&&r+t.helperProportions.height/2>h&&d>l-t.helperProportions.height/2;case"pointer":return e(s.pageY,h,n.proportions().height)&&e(s.pageX,c,n.proportions().width);case"touch":return(r>=h&&d>=r||l>=h&&d>=l||h>r&&l>d)&&(o>=c&&u>=o||a>=c&&u>=a||c>o&&a>u);default:return!1}}}(),e.ui.ddmanager={current:null,droppables:{"default":[]},prepareOffsets:function(t,n){var i,s,o=e.ui.ddmanager.droppables[t.options.scope]||[],r=n?n.type:null,a=(t.currentItem||t.element).find(":data(ui-droppable)").addBack();e:for(i=0;o.length>i;i++)if(!(o[i].options.disabled||t&&!o[i].accept.call(o[i].element[0],t.currentItem||t.element))){for(s=0;a.length>s;s++)if(a[s]===o[i].element[0]){o[i].proportions().height=0;continue e}o[i].visible="none"!==o[i].element.css("display"),o[i].visible&&("mousedown"===r&&o[i]._activate.call(o[i],n),o[i].offset=o[i].element.offset(),o[i].proportions({width:o[i].element[0].offsetWidth,height:o[i].element[0].offsetHeight}))}},drop:function(t,n){var i=!1;return e.each((e.ui.ddmanager.droppables[t.options.scope]||[]).slice(),function(){this.options&&(!this.options.disabled&&this.visible&&e.ui.intersect(t,this,this.options.tolerance,n)&&(i=this._drop.call(this,n)||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,n)))}),i},dragStart:function(t,n){t.element.parentsUntil("body").bind("scroll.droppable",function(){t.options.refreshPositions||e.ui.ddmanager.prepareOffsets(t,n)})},drag:function(t,n){t.options.refreshPositions&&e.ui.ddmanager.prepareOffsets(t,n),e.each(e.ui.ddmanager.droppables[t.options.scope]||[],function(){if(!this.options.disabled&&!this.greedyChild&&this.visible){var i,s,o,r=e.ui.intersect(t,this,this.options.tolerance,n),a=!r&&this.isover?"isout":r&&!this.isover?"isover":null;a&&(this.options.greedy&&(s=this.options.scope,o=this.element.parents(":data(ui-droppable)").filter(function(){return e(this).droppable("instance").options.scope===s}),o.length&&(i=e(o[0]).droppable("instance"),i.greedyChild="isover"===a)),i&&"isover"===a&&(i.isover=!1,i.isout=!0,i._out.call(i,n)),this[a]=!0,this["isout"===a?"isover":"isout"]=!1,this["isover"===a?"_over":"_out"].call(this,n),i&&"isout"===a&&(i.isout=!1,i.isover=!0,i._over.call(i,n)))}})},dragStop:function(t,n){t.element.parentsUntil("body").unbind("scroll.droppable"),t.options.refreshPositions||e.ui.ddmanager.prepareOffsets(t,n)}},e.ui.droppable,e.widget("ui.resizable",e.ui.mouse,{version:"1.11.4",widgetEventPrefix:"resize",options:{alsoResize:!1,animate:!1,animateDuration:"slow",animateEasing:"swing",aspectRatio:!1,autoHide:!1,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(e){return parseInt(e,10)||0},_isNumber:function(e){return!isNaN(parseInt(e,10))},_hasScroll:function(t,n){if("hidden"===e(t).css("overflow"))return!1;var i=n&&"left"===n?"scrollLeft":"scrollTop",s=!1;return t[i]>0||(t[i]=1,s=t[i]>0,t[i]=0,s)},_create:function(){var t,n,i,s,o,r=this,a=this.options;if(this.element.addClass("ui-resizable"),e.extend(this,{_aspectRatio:!!a.aspectRatio,aspectRatio:a.aspectRatio,originalElement:this.element,_proportionallyResizeElements:[],_helper:a.helper||a.ghost||a.animate?a.helper||"ui-resizable-helper":null}),this.element[0].nodeName.match(/^(canvas|textarea|input|select|button|img)$/i)&&(this.element.wrap(e("<div class='ui-wrapper' style='overflow: hidden;'></div>").css({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,this.element.css({marginLeft:this.originalElement.css("marginLeft"),marginTop:this.originalElement.css("marginTop"),marginRight:this.originalElement.css("marginRight"),marginBottom:this.originalElement.css("marginBottom")}),this.originalElement.css({marginLeft:0,marginTop:0,marginRight:0,marginBottom: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({margin:this.originalElement.css("margin")}),this._proportionallyResize()),this.handles=a.handles||(e(".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=e(),this.handles.constructor===String)for("all"===this.handles&&(this.handles="n,e,s,w,se,sw,ne,nw"),t=this.handles.split(","),this.handles={},n=0;t.length>n;n++)i=e.trim(t[n]),o="ui-resizable-"+i,s=e("<div class='ui-resizable-handle "+o+"'></div>"),s.css({zIndex:a.zIndex}),"se"===i&&s.addClass("ui-icon ui-icon-gripsmall-diagonal-se"),this.handles[i]=".ui-resizable-"+i,this.element.append(s);this._renderAxis=function(t){var n,i,s,o;t=t||this.element;for(n in this.handles)this.handles[n].constructor===String?this.handles[n]=this.element.children(this.handles[n]).first().show():(this.handles[n].jquery||this.handles[n].nodeType)&&(this.handles[n]=e(this.handles[n]),this._on(this.handles[n],{mousedown:r._mouseDown})),this.elementIsWrapper&&this.originalElement[0].nodeName.match(/^(textarea|input|select|button)$/i)&&(i=e(this.handles[n],this.element),o=/sw|ne|nw|se|n|s/.test(n)?i.outerHeight():i.outerWidth(),s=["padding",/ne|nw|n/.test(n)?"Top":/se|sw|s/.test(n)?"Bottom":/^e$/.test(n)?"Right":"Left"].join(""),t.css(s,o),this._proportionallyResize()),this._handles=this._handles.add(this.handles[n])},this._renderAxis(this.element),this._handles=this._handles.add(this.element.find(".ui-resizable-handle")),this._handles.disableSelection(),this._handles.mouseover(function(){r.resizing||(this.className&&(s=this.className.match(/ui-resizable-(se|sw|ne|nw|n|e|s|w)/i)),r.axis=s&&s[1]?s[1]:"se")}),a.autoHide&&(this._handles.hide(),e(this.element).addClass("ui-resizable-autohide").mouseenter(function(){a.disabled||(e(this).removeClass("ui-resizable-autohide"),r._handles.show())}).mouseleave(function(){a.disabled||r.resizing||(e(this).addClass("ui-resizable-autohide"),r._handles.hide())})),this._mouseInit()},_destroy:function(){this._mouseDestroy();var t,n=function(t){e(t).removeClass("ui-resizable ui-resizable-disabled ui-resizable-resizing").removeData("resizable").removeData("ui-resizable").unbind(".resizable").find(".ui-resizable-handle").remove()};return this.elementIsWrapper&&(n(this.element),t=this.element,this.originalElement.css({position:t.css("position"),width:t.outerWidth(),height:t.outerHeight(),top:t.css("top"),left:t.css("left")}).insertAfter(t),t.remove()),this.originalElement.css("resize",this.originalResizeStyle),n(this.originalElement),this},_mouseCapture:function(t){var n,i,s=!1;for(n in this.handles)i=e(this.handles[n])[0],(i===t.target||e.contains(i,t.target))&&(s=!0);return!this.options.disabled&&s},_mouseStart:function(t){var n,i,s,o=this.options,r=this.element;return this.resizing=!0,this._renderProxy(),n=this._num(this.helper.css("left")),i=this._num(this.helper.css("top")),o.containment&&(n+=e(o.containment).scrollLeft()||0,i+=e(o.containment).scrollTop()||0),this.offset=this.helper.offset(),this.position={left:n,top:i},this.size=this._helper?{width:this.helper.width(),height:this.helper.height()}:{width:r.width(),height:r.height()},this.originalSize=this._helper?{width:r.outerWidth(),height:r.outerHeight()}:{width:r.width(),height:r.height()},this.sizeDiff={width:r.outerWidth()-r.width(),height:r.outerHeight()-r.height()},this.originalPosition={left:n,top:i},this.originalMousePosition={left:t.pageX,top:t.pageY},this.aspectRatio="number"==typeof o.aspectRatio?o.aspectRatio:this.originalSize.width/this.originalSize.height||1,s=e(".ui-resizable-"+this.axis).css("cursor"),e("body").css("cursor","auto"===s?this.axis+"-resize":s),r.addClass("ui-resizable-resizing"),this._propagate("start",t),!0},_mouseDrag:function(t){var n,i,s=this.originalMousePosition,o=this.axis,r=t.pageX-s.left||0,a=t.pageY-s.top||0,l=this._change[o];return this._updatePrevProperties(),!!l&&(n=l.apply(this,[t,r,a]),this._updateVirtualBoundaries(t.shiftKey),(this._aspectRatio||t.shiftKey)&&(n=this._updateRatio(n,t)),n=this._respectSize(n,t),this._updateCache(n),this._propagate("resize",t),i=this._applyChanges(),!this._helper&&this._proportionallyResizeElements.length&&this._proportionallyResize(),e.isEmptyObject(i)||(this._updatePrevProperties(),this._trigger("resize",t,this.ui()),this._applyChanges()),!1)},_mouseStop:function(t){this.resizing=!1;var n,i,s,o,r,a,l,c=this.options,h=this;return this._helper&&(n=this._proportionallyResizeElements,i=n.length&&/textarea/i.test(n[0].nodeName),s=i&&this._hasScroll(n[0],"left")?0:h.sizeDiff.height,o=i?0:h.sizeDiff.width,r={width:h.helper.width()-o,height:h.helper.height()-s},a=parseInt(h.element.css("left"),10)+(h.position.left-h.originalPosition.left)||null,l=parseInt(h.element.css("top"),10)+(h.position.top-h.originalPosition.top)||null,c.animate||this.element.css(e.extend(r,{top:l,left:a})),h.helper.height(h.size.height),h.helper.width(h.size.width),this._helper&&!c.animate&&this._proportionallyResize()),e("body").css("cursor","auto"),this.element.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 e={};return this.position.top!==this.prevPosition.top&&(e.top=this.position.top+"px"),this.position.left!==this.prevPosition.left&&(e.left=this.position.left+"px"),this.size.width!==this.prevSize.width&&(e.width=this.size.width+"px"),this.size.height!==this.prevSize.height&&(e.height=this.size.height+"px"),this.helper.css(e),e},_updateVirtualBoundaries:function(e){var t,n,i,s,o,r=this.options;o={minWidth:this._isNumber(r.minWidth)?r.minWidth:0,maxWidth:this._isNumber(r.maxWidth)?r.maxWidth:1/0,minHeight:this._isNumber(r.minHeight)?r.minHeight:0,maxHeight:this._isNumber(r.maxHeight)?r.maxHeight:1/0},(this._aspectRatio||e)&&(t=o.minHeight*this.aspectRatio,i=o.minWidth/this.aspectRatio,n=o.maxHeight*this.aspectRatio,s=o.maxWidth/this.aspectRatio,t>o.minWidth&&(o.minWidth=t),i>o.minHeight&&(o.minHeight=i),o.maxWidth>n&&(o.maxWidth=n),o.maxHeight>s&&(o.maxHeight=s)),this._vBoundaries=o},_updateCache:function(e){this.offset=this.helper.offset(),this._isNumber(e.left)&&(this.position.left=e.left),this._isNumber(e.top)&&(this.position.top=e.top),this._isNumber(e.height)&&(this.size.height=e.height),this._isNumber(e.width)&&(this.size.width=e.width)},_updateRatio:function(e){var t=this.position,n=this.size,i=this.axis;return this._isNumber(e.height)?e.width=e.height*this.aspectRatio:this._isNumber(e.width)&&(e.height=e.width/this.aspectRatio),"sw"===i&&(e.left=t.left+(n.width-e.width),e.top=null),"nw"===i&&(e.top=t.top+(n.height-e.height),e.left=t.left+(n.width-e.width)),e},_respectSize:function(e){var t=this._vBoundaries,n=this.axis,i=this._isNumber(e.width)&&t.maxWidth&&t.maxWidth<e.width,s=this._isNumber(e.height)&&t.maxHeight&&t.maxHeight<e.height,o=this._isNumber(e.width)&&t.minWidth&&t.minWidth>e.width,r=this._isNumber(e.height)&&t.minHeight&&t.minHeight>e.height,a=this.originalPosition.left+this.originalSize.width,l=this.position.top+this.size.height,c=/sw|nw|w/.test(n),h=/nw|ne|n/.test(n);return o&&(e.width=t.minWidth),r&&(e.height=t.minHeight),i&&(e.width=t.maxWidth),s&&(e.height=t.maxHeight),o&&c&&(e.left=a-t.minWidth),i&&c&&(e.left=a-t.maxWidth),r&&h&&(e.top=l-t.minHeight),s&&h&&(e.top=l-t.maxHeight),e.width||e.height||e.left||!e.top?e.width||e.height||e.top||!e.left||(e.left=null):e.top=null,e},_getPaddingPlusBorderDimensions:function(e){for(var t=0,n=[],i=[e.css("borderTopWidth"),e.css("borderRightWidth"),e.css("borderBottomWidth"),e.css("borderLeftWidth")],s=[e.css("paddingTop"),e.css("paddingRight"),e.css("paddingBottom"),e.css("paddingLeft")];4>t;t++)n[t]=parseInt(i[t],10)||0,n[t]+=parseInt(s[t],10)||0;return{height:n[0]+n[2],width:n[1]+n[3]}},_proportionallyResize:function(){if(this._proportionallyResizeElements.length)for(var e,t=0,n=this.helper||this.element;this._proportionallyResizeElements.length>t;t++)e=this._proportionallyResizeElements[t],this.outerDimensions||(this.outerDimensions=this._getPaddingPlusBorderDimensions(e)),e.css({height:n.height()-this.outerDimensions.height||0,width:n.width()-this.outerDimensions.width||0})},_renderProxy:function(){var t=this.element,n=this.options;this.elementOffset=t.offset(),this._helper?(this.helper=this.helper||e("<div style='overflow:hidden;'></div>"),this.helper.addClass(this._helper).css({width:this.element.outerWidth()-1,height:this.element.outerHeight()-1,position:"absolute",left:this.elementOffset.left+"px",top:this.elementOffset.top+"px",zIndex:++n.zIndex}),this.helper.appendTo("body").disableSelection()):this.helper=this.element},_change:{e:function(e,t){return{width:this.originalSize.width+t}},w:function(e,t){var n=this.originalSize,i=this.originalPosition;return{left:i.left+t,width:n.width-t}},n:function(e,t,n){var i=this.originalSize,s=this.originalPosition;return{top:s.top+n,height:i.height-n}},s:function(e,t,n){return{height:this.originalSize.height+n}},se:function(t,n,i){return e.extend(this._change.s.apply(this,arguments),this._change.e.apply(this,[t,n,i]))},sw:function(t,n,i){return e.extend(this._change.s.apply(this,arguments),this._change.w.apply(this,[t,n,i]));
},ne:function(t,n,i){return e.extend(this._change.n.apply(this,arguments),this._change.e.apply(this,[t,n,i]))},nw:function(t,n,i){return e.extend(this._change.n.apply(this,arguments),this._change.w.apply(this,[t,n,i]))}},_propagate:function(t,n){e.ui.plugin.call(this,t,[n,this.ui()]),"resize"!==t&&this._trigger(t,n,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}}}),e.ui.plugin.add("resizable","animate",{stop:function(t){var n=e(this).resizable("instance"),i=n.options,s=n._proportionallyResizeElements,o=s.length&&/textarea/i.test(s[0].nodeName),r=o&&n._hasScroll(s[0],"left")?0:n.sizeDiff.height,a=o?0:n.sizeDiff.width,l={width:n.size.width-a,height:n.size.height-r},c=parseInt(n.element.css("left"),10)+(n.position.left-n.originalPosition.left)||null,h=parseInt(n.element.css("top"),10)+(n.position.top-n.originalPosition.top)||null;n.element.animate(e.extend(l,h&&c?{top:h,left:c}:{}),{duration:i.animateDuration,easing:i.animateEasing,step:function(){var i={width:parseInt(n.element.css("width"),10),height:parseInt(n.element.css("height"),10),top:parseInt(n.element.css("top"),10),left:parseInt(n.element.css("left"),10)};s&&s.length&&e(s[0]).css({width:i.width,height:i.height}),n._updateCache(i),n._propagate("resize",t)}})}}),e.ui.plugin.add("resizable","containment",{start:function(){var t,n,i,s,o,r,a,l=e(this).resizable("instance"),c=l.options,h=l.element,u=c.containment,d=u instanceof e?u.get(0):/parent/.test(u)?h.parent().get(0):u;d&&(l.containerElement=e(d),/document/.test(u)||u===document?(l.containerOffset={left:0,top:0},l.containerPosition={left:0,top:0},l.parentData={element:e(document),left:0,top:0,width:e(document).width(),height:e(document).height()||document.body.parentNode.scrollHeight}):(t=e(d),n=[],e(["Top","Right","Left","Bottom"]).each(function(e,i){n[e]=l._num(t.css("padding"+i))}),l.containerOffset=t.offset(),l.containerPosition=t.position(),l.containerSize={height:t.innerHeight()-n[3],width:t.innerWidth()-n[1]},i=l.containerOffset,s=l.containerSize.height,o=l.containerSize.width,r=l._hasScroll(d,"left")?d.scrollWidth:o,a=l._hasScroll(d)?d.scrollHeight:s,l.parentData={element:d,left:i.left,top:i.top,width:r,height:a}))},resize:function(t){var n,i,s,o,r=e(this).resizable("instance"),a=r.options,l=r.containerOffset,c=r.position,h=r._aspectRatio||t.shiftKey,u={top:0,left:0},d=r.containerElement,f=!0;d[0]!==document&&/static/.test(d.css("position"))&&(u=l),c.left<(r._helper?l.left:0)&&(r.size.width=r.size.width+(r._helper?r.position.left-l.left:r.position.left-u.left),h&&(r.size.height=r.size.width/r.aspectRatio,f=!1),r.position.left=a.helper?l.left:0),c.top<(r._helper?l.top:0)&&(r.size.height=r.size.height+(r._helper?r.position.top-l.top:r.position.top),h&&(r.size.width=r.size.height*r.aspectRatio,f=!1),r.position.top=r._helper?l.top:0),s=r.containerElement.get(0)===r.element.parent().get(0),o=/relative|absolute/.test(r.containerElement.css("position")),s&&o?(r.offset.left=r.parentData.left+r.position.left,r.offset.top=r.parentData.top+r.position.top):(r.offset.left=r.element.offset().left,r.offset.top=r.element.offset().top),n=Math.abs(r.sizeDiff.width+(r._helper?r.offset.left-u.left:r.offset.left-l.left)),i=Math.abs(r.sizeDiff.height+(r._helper?r.offset.top-u.top:r.offset.top-l.top)),n+r.size.width>=r.parentData.width&&(r.size.width=r.parentData.width-n,h&&(r.size.height=r.size.width/r.aspectRatio,f=!1)),i+r.size.height>=r.parentData.height&&(r.size.height=r.parentData.height-i,h&&(r.size.width=r.size.height*r.aspectRatio,f=!1)),f||(r.position.left=r.prevPosition.left,r.position.top=r.prevPosition.top,r.size.width=r.prevSize.width,r.size.height=r.prevSize.height)},stop:function(){var t=e(this).resizable("instance"),n=t.options,i=t.containerOffset,s=t.containerPosition,o=t.containerElement,r=e(t.helper),a=r.offset(),l=r.outerWidth()-t.sizeDiff.width,c=r.outerHeight()-t.sizeDiff.height;t._helper&&!n.animate&&/relative/.test(o.css("position"))&&e(this).css({left:a.left-s.left-i.left,width:l,height:c}),t._helper&&!n.animate&&/static/.test(o.css("position"))&&e(this).css({left:a.left-s.left-i.left,width:l,height:c})}}),e.ui.plugin.add("resizable","alsoResize",{start:function(){var t=e(this).resizable("instance"),n=t.options;e(n.alsoResize).each(function(){var t=e(this);t.data("ui-resizable-alsoresize",{width:parseInt(t.width(),10),height:parseInt(t.height(),10),left:parseInt(t.css("left"),10),top:parseInt(t.css("top"),10)})})},resize:function(t,n){var i=e(this).resizable("instance"),s=i.options,o=i.originalSize,r=i.originalPosition,a={height:i.size.height-o.height||0,width:i.size.width-o.width||0,top:i.position.top-r.top||0,left:i.position.left-r.left||0};e(s.alsoResize).each(function(){var t=e(this),i=e(this).data("ui-resizable-alsoresize"),s={},o=t.parents(n.originalElement[0]).length?["width","height"]:["width","height","top","left"];e.each(o,function(e,t){var n=(i[t]||0)+(a[t]||0);n&&n>=0&&(s[t]=n||null)}),t.css(s)})},stop:function(){e(this).removeData("resizable-alsoresize")}}),e.ui.plugin.add("resizable","ghost",{start:function(){var t=e(this).resizable("instance"),n=t.options,i=t.size;t.ghost=t.originalElement.clone(),t.ghost.css({opacity:.25,display:"block",position:"relative",height:i.height,width:i.width,margin:0,left:0,top:0}).addClass("ui-resizable-ghost").addClass("string"==typeof n.ghost?n.ghost:""),t.ghost.appendTo(t.helper)},resize:function(){var t=e(this).resizable("instance");t.ghost&&t.ghost.css({position:"relative",height:t.size.height,width:t.size.width})},stop:function(){var t=e(this).resizable("instance");t.ghost&&t.helper&&t.helper.get(0).removeChild(t.ghost.get(0))}}),e.ui.plugin.add("resizable","grid",{resize:function(){var t,n=e(this).resizable("instance"),i=n.options,s=n.size,o=n.originalSize,r=n.originalPosition,a=n.axis,l="number"==typeof i.grid?[i.grid,i.grid]:i.grid,c=l[0]||1,h=l[1]||1,u=Math.round((s.width-o.width)/c)*c,d=Math.round((s.height-o.height)/h)*h,f=o.width+u,p=o.height+d,m=i.maxWidth&&f>i.maxWidth,g=i.maxHeight&&p>i.maxHeight,v=i.minWidth&&i.minWidth>f,y=i.minHeight&&i.minHeight>p;i.grid=l,v&&(f+=c),y&&(p+=h),m&&(f-=c),g&&(p-=h),/^(se|s|e)$/.test(a)?(n.size.width=f,n.size.height=p):/^(ne)$/.test(a)?(n.size.width=f,n.size.height=p,n.position.top=r.top-d):/^(sw)$/.test(a)?(n.size.width=f,n.size.height=p,n.position.left=r.left-u):((0>=p-h||0>=f-c)&&(t=n._getPaddingPlusBorderDimensions(this)),p-h>0?(n.size.height=p,n.position.top=r.top-d):(p=h-t.height,n.size.height=p,n.position.top=r.top+o.height-p),f-c>0?(n.size.width=f,n.position.left=r.left-u):(f=c-t.width,n.size.width=f,n.position.left=r.left+o.width-f))}}),e.ui.resizable,e.widget("ui.selectable",e.ui.mouse,{version:"1.11.4",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 t,n=this;this.element.addClass("ui-selectable"),this.dragged=!1,this.refresh=function(){t=e(n.options.filter,n.element[0]),t.addClass("ui-selectee"),t.each(function(){var t=e(this),n=t.offset();e.data(this,"selectable-item",{element:this,$element:t,left:n.left,top:n.top,right:n.left+t.outerWidth(),bottom:n.top+t.outerHeight(),startselected:!1,selected:t.hasClass("ui-selected"),selecting:t.hasClass("ui-selecting"),unselecting:t.hasClass("ui-unselecting")})})},this.refresh(),this.selectees=t.addClass("ui-selectee"),this._mouseInit(),this.helper=e("<div class='ui-selectable-helper'></div>")},_destroy:function(){this.selectees.removeClass("ui-selectee").removeData("selectable-item"),this.element.removeClass("ui-selectable ui-selectable-disabled"),this._mouseDestroy()},_mouseStart:function(t){var n=this,i=this.options;this.opos=[t.pageX,t.pageY],this.options.disabled||(this.selectees=e(i.filter,this.element[0]),this._trigger("start",t),e(i.appendTo).append(this.helper),this.helper.css({left:t.pageX,top:t.pageY,width:0,height:0}),i.autoRefresh&&this.refresh(),this.selectees.filter(".ui-selected").each(function(){var i=e.data(this,"selectable-item");i.startselected=!0,t.metaKey||t.ctrlKey||(i.$element.removeClass("ui-selected"),i.selected=!1,i.$element.addClass("ui-unselecting"),i.unselecting=!0,n._trigger("unselecting",t,{unselecting:i.element}))}),e(t.target).parents().addBack().each(function(){var i,s=e.data(this,"selectable-item");return s?(i=!t.metaKey&&!t.ctrlKey||!s.$element.hasClass("ui-selected"),s.$element.removeClass(i?"ui-unselecting":"ui-selected").addClass(i?"ui-selecting":"ui-unselecting"),s.unselecting=!i,s.selecting=i,s.selected=i,i?n._trigger("selecting",t,{selecting:s.element}):n._trigger("unselecting",t,{unselecting:s.element}),!1):void 0}))},_mouseDrag:function(t){if(this.dragged=!0,!this.options.disabled){var n,i=this,s=this.options,o=this.opos[0],r=this.opos[1],a=t.pageX,l=t.pageY;return o>a&&(n=a,a=o,o=n),r>l&&(n=l,l=r,r=n),this.helper.css({left:o,top:r,width:a-o,height:l-r}),this.selectees.each(function(){var n=e.data(this,"selectable-item"),c=!1;n&&n.element!==i.element[0]&&("touch"===s.tolerance?c=!(n.left>a||o>n.right||n.top>l||r>n.bottom):"fit"===s.tolerance&&(c=n.left>o&&a>n.right&&n.top>r&&l>n.bottom),c?(n.selected&&(n.$element.removeClass("ui-selected"),n.selected=!1),n.unselecting&&(n.$element.removeClass("ui-unselecting"),n.unselecting=!1),n.selecting||(n.$element.addClass("ui-selecting"),n.selecting=!0,i._trigger("selecting",t,{selecting:n.element}))):(n.selecting&&((t.metaKey||t.ctrlKey)&&n.startselected?(n.$element.removeClass("ui-selecting"),n.selecting=!1,n.$element.addClass("ui-selected"),n.selected=!0):(n.$element.removeClass("ui-selecting"),n.selecting=!1,n.startselected&&(n.$element.addClass("ui-unselecting"),n.unselecting=!0),i._trigger("unselecting",t,{unselecting:n.element}))),n.selected&&(t.metaKey||t.ctrlKey||n.startselected||(n.$element.removeClass("ui-selected"),n.selected=!1,n.$element.addClass("ui-unselecting"),n.unselecting=!0,i._trigger("unselecting",t,{unselecting:n.element})))))}),!1}},_mouseStop:function(t){var n=this;return this.dragged=!1,e(".ui-unselecting",this.element[0]).each(function(){var i=e.data(this,"selectable-item");i.$element.removeClass("ui-unselecting"),i.unselecting=!1,i.startselected=!1,n._trigger("unselected",t,{unselected:i.element})}),e(".ui-selecting",this.element[0]).each(function(){var i=e.data(this,"selectable-item");i.$element.removeClass("ui-selecting").addClass("ui-selected"),i.selecting=!1,i.selected=!0,i.startselected=!0,n._trigger("selected",t,{selected:i.element})}),this._trigger("stop",t),this.helper.remove(),!1}}),e.widget("ui.sortable",e.ui.mouse,{version:"1.11.4",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(e,t,n){return e>=t&&t+n>e},_isFloating:function(e){return/left|right/.test(e.css("float"))||/inline|table-cell/.test(e.css("display"))},_create:function(){this.containerCache={},this.element.addClass("ui-sortable"),this.refresh(),this.offset=this.element.offset(),this._mouseInit(),this._setHandleClassName(),this.ready=!0},_setOption:function(e,t){this._super(e,t),"handle"===e&&this._setHandleClassName()},_setHandleClassName:function(){this.element.find(".ui-sortable-handle").removeClass("ui-sortable-handle"),e.each(this.items,function(){(this.instance.options.handle?this.item.find(this.instance.options.handle):this.item).addClass("ui-sortable-handle")})},_destroy:function(){this.element.removeClass("ui-sortable ui-sortable-disabled").find(".ui-sortable-handle").removeClass("ui-sortable-handle"),this._mouseDestroy();for(var e=this.items.length-1;e>=0;e--)this.items[e].item.removeData(this.widgetName+"-item");return this},_mouseCapture:function(t,n){var i=null,s=!1,o=this;return!this.reverting&&(!this.options.disabled&&"static"!==this.options.type&&(this._refreshItems(t),e(t.target).parents().each(function(){return e.data(this,o.widgetName+"-item")===o?(i=e(this),!1):void 0}),e.data(t.target,o.widgetName+"-item")===o&&(i=e(t.target)),!!i&&(!(this.options.handle&&!n&&(e(this.options.handle,i).find("*").addBack().each(function(){this===t.target&&(s=!0)}),!s))&&(this.currentItem=i,this._removeCurrentsFromItems(),!0))))},_mouseStart:function(t,n,i){var s,o,r=this.options;if(this.currentContainer=this,this.refreshPositions(),this.helper=this._createHelper(t),this._cacheHelperProportions(),this._cacheMargins(),this.scrollParent=this.helper.scrollParent(),this.offset=this.currentItem.offset(),this.offset={top:this.offset.top-this.margins.top,left:this.offset.left-this.margins.left},e.extend(this.offset,{click:{left:t.pageX-this.offset.left,top:t.pageY-this.offset.top},parent:this._getParentOffset(),relative:this._getRelativeOffset()}),this.helper.css("position","absolute"),this.cssPosition=this.helper.css("position"),this.originalPosition=this._generatePosition(t),this.originalPageX=t.pageX,this.originalPageY=t.pageY,r.cursorAt&&this._adjustOffsetFromHelper(r.cursorAt),this.domPosition={prev:this.currentItem.prev()[0],parent:this.currentItem.parent()[0]},this.helper[0]!==this.currentItem[0]&&this.currentItem.hide(),this._createPlaceholder(),r.containment&&this._setContainment(),r.cursor&&"auto"!==r.cursor&&(o=this.document.find("body"),this.storedCursor=o.css("cursor"),o.css("cursor",r.cursor),this.storedStylesheet=e("<style>*{ cursor: "+r.cursor+" !important; }</style>").appendTo(o)),r.opacity&&(this.helper.css("opacity")&&(this._storedOpacity=this.helper.css("opacity")),this.helper.css("opacity",r.opacity)),r.zIndex&&(this.helper.css("zIndex")&&(this._storedZIndex=this.helper.css("zIndex")),this.helper.css("zIndex",r.zIndex)),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;s>=0;s--)this.containers[s]._trigger("activate",t,this._uiHash(this));return e.ui.ddmanager&&(e.ui.ddmanager.current=this),e.ui.ddmanager&&!r.dropBehaviour&&e.ui.ddmanager.prepareOffsets(this,t),this.dragging=!0,this.helper.addClass("ui-sortable-helper"),this._mouseDrag(t),!0},_mouseDrag:function(t){var n,i,s,o,r=this.options,a=!1;for(this.position=this._generatePosition(t),this.positionAbs=this._convertPositionTo("absolute"),this.lastPositionAbs||(this.lastPositionAbs=this.positionAbs),this.options.scroll&&(this.scrollParent[0]!==this.document[0]&&"HTML"!==this.scrollParent[0].tagName?(this.overflowOffset.top+this.scrollParent[0].offsetHeight-t.pageY<r.scrollSensitivity?this.scrollParent[0].scrollTop=a=this.scrollParent[0].scrollTop+r.scrollSpeed:t.pageY-this.overflowOffset.top<r.scrollSensitivity&&(this.scrollParent[0].scrollTop=a=this.scrollParent[0].scrollTop-r.scrollSpeed),this.overflowOffset.left+this.scrollParent[0].offsetWidth-t.pageX<r.scrollSensitivity?this.scrollParent[0].scrollLeft=a=this.scrollParent[0].scrollLeft+r.scrollSpeed:t.pageX-this.overflowOffset.left<r.scrollSensitivity&&(this.scrollParent[0].scrollLeft=a=this.scrollParent[0].scrollLeft-r.scrollSpeed)):(t.pageY-this.document.scrollTop()<r.scrollSensitivity?a=this.document.scrollTop(this.document.scrollTop()-r.scrollSpeed):this.window.height()-(t.pageY-this.document.scrollTop())<r.scrollSensitivity&&(a=this.document.scrollTop(this.document.scrollTop()+r.scrollSpeed)),t.pageX-this.document.scrollLeft()<r.scrollSensitivity?a=this.document.scrollLeft(this.document.scrollLeft()-r.scrollSpeed):this.window.width()-(t.pageX-this.document.scrollLeft())<r.scrollSensitivity&&(a=this.document.scrollLeft(this.document.scrollLeft()+r.scrollSpeed))),a!==!1&&e.ui.ddmanager&&!r.dropBehaviour&&e.ui.ddmanager.prepareOffsets(this,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"),n=this.items.length-1;n>=0;n--)if(i=this.items[n],s=i.item[0],o=this._intersectsWithPointer(i),o&&i.instance===this.currentContainer&&s!==this.currentItem[0]&&this.placeholder[1===o?"next":"prev"]()[0]!==s&&!e.contains(this.placeholder[0],s)&&("semi-dynamic"!==this.options.type||!e.contains(this.element[0],s))){if(this.direction=1===o?"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),e.ui.ddmanager&&e.ui.ddmanager.drag(this,t),this._trigger("sort",t,this._uiHash()),this.lastPositionAbs=this.positionAbs,!1},_mouseStop:function(t,n){if(t){if(e.ui.ddmanager&&!this.options.dropBehaviour&&e.ui.ddmanager.drop(this,t),this.options.revert){var i=this,s=this.placeholder.offset(),o=this.options.axis,r={};o&&"x"!==o||(r.left=s.left-this.offset.parent.left-this.margins.left+(this.offsetParent[0]===this.document[0].body?0:this.offsetParent[0].scrollLeft)),o&&"y"!==o||(r.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,e(this.helper).animate(r,parseInt(this.options.revert,10)||500,function(){i._clear(t)})}else this._clear(t,n);return!1}},cancel:function(){if(this.dragging){this._mouseUp({target:null}),"original"===this.options.helper?this.currentItem.css(this._storedCSS).removeClass("ui-sortable-helper"):this.currentItem.show();for(var t=this.containers.length-1;t>=0;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(),e.extend(this,{helper:null,dragging:!1,reverting:!1,_noFinalSort:null}),this.domPosition.prev?e(this.domPosition.prev).after(this.currentItem):e(this.domPosition.parent).prepend(this.currentItem)),this},serialize:function(t){var n=this._getItemsAsjQuery(t&&t.connected),i=[];return t=t||{},e(n).each(function(){var n=(e(t.item||this).attr(t.attribute||"id")||"").match(t.expression||/(.+)[\-=_](.+)/);n&&i.push((t.key||n[1]+"[]")+"="+(t.key&&t.expression?n[1]:n[2]))}),!i.length&&t.key&&i.push(t.key+"="),i.join("&")},toArray:function(t){var n=this._getItemsAsjQuery(t&&t.connected),i=[];return t=t||{},n.each(function(){i.push(e(t.item||this).attr(t.attribute||"id")||"")}),i},_intersectsWith:function(e){var t=this.positionAbs.left,n=t+this.helperProportions.width,i=this.positionAbs.top,s=i+this.helperProportions.height,o=e.left,r=o+e.width,a=e.top,l=a+e.height,c=this.offset.click.top,h=this.offset.click.left,u="x"===this.options.axis||i+c>a&&l>i+c,d="y"===this.options.axis||t+h>o&&r>t+h,f=u&&d;return"pointer"===this.options.tolerance||this.options.forcePointerForContainers||"pointer"!==this.options.tolerance&&this.helperProportions[this.floating?"width":"height"]>e[this.floating?"width":"height"]?f:t+this.helperProportions.width/2>o&&r>n-this.helperProportions.width/2&&i+this.helperProportions.height/2>a&&l>s-this.helperProportions.height/2},_intersectsWithPointer:function(e){var t="x"===this.options.axis||this._isOverAxis(this.positionAbs.top+this.offset.click.top,e.top,e.height),n="y"===this.options.axis||this._isOverAxis(this.positionAbs.left+this.offset.click.left,e.left,e.width),i=t&&n,s=this._getDragVerticalDirection(),o=this._getDragHorizontalDirection();return!!i&&(this.floating?o&&"right"===o||"down"===s?2:1:s&&("down"===s?2:1))},_intersectsWithSides:function(e){var t=this._isOverAxis(this.positionAbs.top+this.offset.click.top,e.top+e.height/2,e.height),n=this._isOverAxis(this.positionAbs.left+this.offset.click.left,e.left+e.width/2,e.width),i=this._getDragVerticalDirection(),s=this._getDragHorizontalDirection();return this.floating&&s?"right"===s&&n||"left"===s&&!n:i&&("down"===i&&t||"up"===i&&!t)},_getDragVerticalDirection:function(){var e=this.positionAbs.top-this.lastPositionAbs.top;return 0!==e&&(e>0?"down":"up")},_getDragHorizontalDirection:function(){var e=this.positionAbs.left-this.lastPositionAbs.left;return 0!==e&&(e>0?"right":"left")},refresh:function(e){return this._refreshItems(e),this._setHandleClassName(),this.refreshPositions(),this},_connectWith:function(){var e=this.options;return e.connectWith.constructor===String?[e.connectWith]:e.connectWith},_getItemsAsjQuery:function(t){function n(){a.push(this)}var i,s,o,r,a=[],l=[],c=this._connectWith();if(c&&t)for(i=c.length-1;i>=0;i--)for(o=e(c[i],this.document[0]),s=o.length-1;s>=0;s--)r=e.data(o[s],this.widgetFullName),r&&r!==this&&!r.options.disabled&&l.push([e.isFunction(r.options.items)?r.options.items.call(r.element):e(r.options.items,r.element).not(".ui-sortable-helper").not(".ui-sortable-placeholder"),r]);for(l.push([e.isFunction(this.options.items)?this.options.items.call(this.element,null,{options:this.options,item:this.currentItem}):e(this.options.items,this.element).not(".ui-sortable-helper").not(".ui-sortable-placeholder"),this]),i=l.length-1;i>=0;i--)l[i][0].each(n);return e(a)},_removeCurrentsFromItems:function(){var t=this.currentItem.find(":data("+this.widgetName+"-item)");this.items=e.grep(this.items,function(e){for(var n=0;t.length>n;n++)if(t[n]===e.item[0])return!1;return!0})},_refreshItems:function(t){this.items=[],this.containers=[this];var n,i,s,o,r,a,l,c,h=this.items,u=[[e.isFunction(this.options.items)?this.options.items.call(this.element[0],t,{item:this.currentItem}):e(this.options.items,this.element),this]],d=this._connectWith();if(d&&this.ready)for(n=d.length-1;n>=0;n--)for(s=e(d[n],this.document[0]),i=s.length-1;i>=0;i--)o=e.data(s[i],this.widgetFullName),o&&o!==this&&!o.options.disabled&&(u.push([e.isFunction(o.options.items)?o.options.items.call(o.element[0],t,{item:this.currentItem}):e(o.options.items,o.element),o]),this.containers.push(o));for(n=u.length-1;n>=0;n--)for(r=u[n][1],a=u[n][0],i=0,c=a.length;c>i;i++)l=e(a[i]),l.data(this.widgetName+"-item",r),h.push({item:l,instance:r,width:0,height:0,left:0,top:0})},refreshPositions:function(t){this.floating=!!this.items.length&&("x"===this.options.axis||this._isFloating(this.items[0].item)),this.offsetParent&&this.helper&&(this.offset.parent=this._getParentOffset());var n,i,s,o;for(n=this.items.length-1;n>=0;n--)i=this.items[n],i.instance!==this.currentContainer&&this.currentContainer&&i.item[0]!==this.currentItem[0]||(s=this.options.toleranceElement?e(this.options.toleranceElement,i.item):i.item,t||(i.width=s.outerWidth(),i.height=s.outerHeight()),o=s.offset(),i.left=o.left,i.top=o.top);if(this.options.custom&&this.options.custom.refreshContainers)this.options.custom.refreshContainers.call(this);else for(n=this.containers.length-1;n>=0;n--)o=this.containers[n].element.offset(),this.containers[n].containerCache.left=o.left,this.containers[n].containerCache.top=o.top,this.containers[n].containerCache.width=this.containers[n].element.outerWidth(),this.containers[n].containerCache.height=this.containers[n].element.outerHeight();return this},_createPlaceholder:function(t){t=t||this;var n,i=t.options;i.placeholder&&i.placeholder.constructor!==String||(n=i.placeholder,i.placeholder={element:function(){var i=t.currentItem[0].nodeName.toLowerCase(),s=e("<"+i+">",t.document[0]).addClass(n||t.currentItem[0].className+" ui-sortable-placeholder").removeClass("ui-sortable-helper");return"tbody"===i?t._createTrPlaceholder(t.currentItem.find("tr").eq(0),e("<tr>",t.document[0]).appendTo(s)):"tr"===i?t._createTrPlaceholder(t.currentItem,s):"img"===i&&s.attr("src",t.currentItem.attr("src")),n||s.css("visibility","hidden"),s},update:function(e,s){(!n||i.forcePlaceholderSize)&&(s.height()||s.height(t.currentItem.innerHeight()-parseInt(t.currentItem.css("paddingTop")||0,10)-parseInt(t.currentItem.css("paddingBottom")||0,10)),s.width()||s.width(t.currentItem.innerWidth()-parseInt(t.currentItem.css("paddingLeft")||0,10)-parseInt(t.currentItem.css("paddingRight")||0,10)))}}),t.placeholder=e(i.placeholder.element.call(t.element,t.currentItem)),t.currentItem.after(t.placeholder),i.placeholder.update(t,t.placeholder)},_createTrPlaceholder:function(t,n){var i=this;t.children().each(function(){e("<td>&#160;</td>",i.document[0]).attr("colspan",e(this).attr("colspan")||1).appendTo(n)})},_contactContainers:function(t){var n,i,s,o,r,a,l,c,h,u,d=null,f=null;for(n=this.containers.length-1;n>=0;n--)if(!e.contains(this.currentItem[0],this.containers[n].element[0]))if(this._intersectsWith(this.containers[n].containerCache)){if(d&&e.contains(this.containers[n].element[0],d.element[0]))continue;d=this.containers[n],f=n}else this.containers[n].containerCache.over&&(this.containers[n]._trigger("out",t,this._uiHash(this)),this.containers[n].containerCache.over=0);if(d)if(1===this.containers.length)this.containers[f].containerCache.over||(this.containers[f]._trigger("over",t,this._uiHash(this)),this.containers[f].containerCache.over=1);else{for(s=1e4,o=null,h=d.floating||this._isFloating(this.currentItem),r=h?"left":"top",a=h?"width":"height",u=h?"clientX":"clientY",i=this.items.length-1;i>=0;i--)e.contains(this.containers[f].element[0],this.items[i].item[0])&&this.items[i].item[0]!==this.currentItem[0]&&(l=this.items[i].item.offset()[r],c=!1,t[u]-l>this.items[i][a]/2&&(c=!0),s>Math.abs(t[u]-l)&&(s=Math.abs(t[u]-l),o=this.items[i],this.direction=c?"up":"down"));if(!o&&!this.options.dropOnEmpty)return;if(this.currentContainer===this.containers[f])return void(this.currentContainer.containerCache.over||(this.containers[f]._trigger("over",t,this._uiHash()),this.currentContainer.containerCache.over=1));o?this._rearrange(t,o,null,!0):this._rearrange(t,null,this.containers[f].element,!0),this._trigger("change",t,this._uiHash()),this.containers[f]._trigger("change",t,this._uiHash(this)),this.currentContainer=this.containers[f],this.options.placeholder.update(this.currentContainer,this.placeholder),this.containers[f]._trigger("over",t,this._uiHash(this)),this.containers[f].containerCache.over=1}},_createHelper:function(t){var n=this.options,i=e.isFunction(n.helper)?e(n.helper.apply(this.element[0],[t,this.currentItem])):"clone"===n.helper?this.currentItem.clone():this.currentItem;return i.parents("body").length||e("parent"!==n.appendTo?n.appendTo:this.currentItem[0].parentNode)[0].appendChild(i[0]),i[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")}),(!i[0].style.width||n.forceHelperSize)&&i.width(this.currentItem.width()),(!i[0].style.height||n.forceHelperSize)&&i.height(this.currentItem.height()),i},_adjustOffsetFromHelper:function(t){"string"==typeof t&&(t=t.split(" ")),e.isArray(t)&&(t={left:+t[0],top:+t[1]||0}),"left"in 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]&&e.contains(this.scrollParent[0],this.offsetParent[0])&&(t.left+=this.scrollParent.scrollLeft(),t.top+=this.scrollParent.scrollTop()),(this.offsetParent[0]===this.document[0].body||this.offsetParent[0].tagName&&"html"===this.offsetParent[0].tagName.toLowerCase()&&e.ui.ie)&&(t={top:0,left:0}),{top:t.top+(parseInt(this.offsetParent.css("borderTopWidth"),10)||0),left:t.left+(parseInt(this.offsetParent.css("borderLeftWidth"),10)||0)}},_getRelativeOffset:function(){if("relative"===this.cssPosition){var e=this.currentItem.position();return{top:e.top-(parseInt(this.helper.css("top"),10)||0)+this.scrollParent.scrollTop(),left:e.left-(parseInt(this.helper.css("left"),10)||0)+this.scrollParent.scrollLeft()}}return{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,n,i,s=this.options;"parent"===s.containment&&(s.containment=this.helper[0].parentNode),("document"===s.containment||"window"===s.containment)&&(this.containment=[0-this.offset.relative.left-this.offset.parent.left,0-this.offset.relative.top-this.offset.parent.top,"document"===s.containment?this.document.width():this.window.width()-this.helperProportions.width-this.margins.left,("document"===s.containment?this.document.width():this.window.height()||this.document[0].body.parentNode.scrollHeight)-this.helperProportions.height-this.margins.top]),/^(document|window|parent)$/.test(s.containment)||(t=e(s.containment)[0],n=e(s.containment).offset(),i="hidden"!==e(t).css("overflow"),this.containment=[n.left+(parseInt(e(t).css("borderLeftWidth"),10)||0)+(parseInt(e(t).css("paddingLeft"),10)||0)-this.margins.left,n.top+(parseInt(e(t).css("borderTopWidth"),10)||0)+(parseInt(e(t).css("paddingTop"),10)||0)-this.margins.top,n.left+(i?Math.max(t.scrollWidth,t.offsetWidth):t.offsetWidth)-(parseInt(e(t).css("borderLeftWidth"),10)||0)-(parseInt(e(t).css("paddingRight"),10)||0)-this.helperProportions.width-this.margins.left,n.top+(i?Math.max(t.scrollHeight,t.offsetHeight):t.offsetHeight)-(parseInt(e(t).css("borderTopWidth"),10)||0)-(parseInt(e(t).css("paddingBottom"),10)||0)-this.helperProportions.height-this.margins.top])},_convertPositionTo:function(t,n){n||(n=this.position);var i="absolute"===t?1:-1,s="absolute"!==this.cssPosition||this.scrollParent[0]!==this.document[0]&&e.contains(this.scrollParent[0],this.offsetParent[0])?this.scrollParent:this.offsetParent,o=/(html|body)/i.test(s[0].tagName);return{top:n.top+this.offset.relative.top*i+this.offset.parent.top*i-("fixed"===this.cssPosition?-this.scrollParent.scrollTop():o?0:s.scrollTop())*i,left:n.left+this.offset.relative.left*i+this.offset.parent.left*i-("fixed"===this.cssPosition?-this.scrollParent.scrollLeft():o?0:s.scrollLeft())*i}},_generatePosition:function(t){var n,i,s=this.options,o=t.pageX,r=t.pageY,a="absolute"!==this.cssPosition||this.scrollParent[0]!==this.document[0]&&e.contains(this.scrollParent[0],this.offsetParent[0])?this.scrollParent:this.offsetParent,l=/(html|body)/i.test(a[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]&&(o=this.containment[0]+this.offset.click.left),t.pageY-this.offset.click.top<this.containment[1]&&(r=this.containment[1]+this.offset.click.top),t.pageX-this.offset.click.left>this.containment[2]&&(o=this.containment[2]+this.offset.click.left),t.pageY-this.offset.click.top>this.containment[3]&&(r=this.containment[3]+this.offset.click.top)),s.grid&&(n=this.originalPageY+Math.round((r-this.originalPageY)/s.grid[1])*s.grid[1],r=this.containment?n-this.offset.click.top>=this.containment[1]&&n-this.offset.click.top<=this.containment[3]?n:n-this.offset.click.top>=this.containment[1]?n-s.grid[1]:n+s.grid[1]:n,
i=this.originalPageX+Math.round((o-this.originalPageX)/s.grid[0])*s.grid[0],o=this.containment?i-this.offset.click.left>=this.containment[0]&&i-this.offset.click.left<=this.containment[2]?i:i-this.offset.click.left>=this.containment[0]?i-s.grid[0]:i+s.grid[0]:i)),{top:r-this.offset.click.top-this.offset.relative.top-this.offset.parent.top+("fixed"===this.cssPosition?-this.scrollParent.scrollTop():l?0:a.scrollTop()),left:o-this.offset.click.left-this.offset.relative.left-this.offset.parent.left+("fixed"===this.cssPosition?-this.scrollParent.scrollLeft():l?0:a.scrollLeft())}},_rearrange:function(e,t,n,i){n?n[0].appendChild(this.placeholder[0]):t.item[0].parentNode.insertBefore(this.placeholder[0],"down"===this.direction?t.item[0]:t.item[0].nextSibling),this.counter=this.counter?++this.counter:1;var s=this.counter;this._delay(function(){s===this.counter&&this.refreshPositions(!i)})},_clear:function(e,t){function n(e,t,n){return function(i){n._trigger(e,i,t._uiHash(t))}}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).removeClass("ui-sortable-helper")}else this.currentItem.show();for(this.fromOutside&&!t&&s.push(function(e){this._trigger("receive",e,this._uiHash(this.fromOutside))}),!this.fromOutside&&this.domPosition.prev===this.currentItem.prev().not(".ui-sortable-helper")[0]&&this.domPosition.parent===this.currentItem.parent()[0]||t||s.push(function(e){this._trigger("update",e,this._uiHash())}),this!==this.currentContainer&&(t||(s.push(function(e){this._trigger("remove",e,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;i>=0;i--)t||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,t||this._trigger("beforeStop",e,this._uiHash()),this.placeholder[0].parentNode.removeChild(this.placeholder[0]),this.cancelHelperRemoval||(this.helper[0]!==this.currentItem[0]&&this.helper.remove(),this.helper=null),!t){for(i=0;s.length>i;i++)s[i].call(this,e);this._trigger("stop",e,this._uiHash())}return this.fromOutside=!1,!this.cancelHelperRemoval},_trigger:function(){e.Widget.prototype._trigger.apply(this,arguments)===!1&&this.cancel()},_uiHash:function(t){var n=t||this;return{helper:n.helper,placeholder:n.placeholder||e([]),position:n.position,originalPosition:n.originalPosition,offset:n.positionAbs,item:n.currentItem,sender:t?t.element:null}}}),e.widget("ui.accordion",{version:"1.11.4",options:{active:0,animate:{},collapsible:!1,event:"click",header:"> li > :first-child,> :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=e(),this.element.addClass("ui-accordion ui-widget ui-helper-reset").attr("role","tablist"),t.collapsible||t.active!==!1&&null!=t.active||(t.active=0),this._processPanels(),0>t.active&&(t.active+=this.headers.length),this._refresh()},_getCreateEventData:function(){return{header:this.active,panel:this.active.length?this.active.next():e()}},_createIcons:function(){var t=this.options.icons;t&&(e("<span>").addClass("ui-accordion-header-icon ui-icon "+t.header).prependTo(this.headers),this.active.children(".ui-accordion-header-icon").removeClass(t.header).addClass(t.activeHeader),this.headers.addClass("ui-accordion-icons"))},_destroyIcons:function(){this.headers.removeClass("ui-accordion-icons").children(".ui-accordion-header-icon").remove()},_destroy:function(){var e;this.element.removeClass("ui-accordion ui-widget ui-helper-reset").removeAttr("role"),this.headers.removeClass("ui-accordion-header ui-accordion-header-active ui-state-default ui-corner-all ui-state-active ui-state-disabled ui-corner-top").removeAttr("role").removeAttr("aria-expanded").removeAttr("aria-selected").removeAttr("aria-controls").removeAttr("tabIndex").removeUniqueId(),this._destroyIcons(),e=this.headers.next().removeClass("ui-helper-reset ui-widget-content ui-corner-bottom ui-accordion-content ui-accordion-content-active ui-state-disabled").css("display","").removeAttr("role").removeAttr("aria-hidden").removeAttr("aria-labelledby").removeUniqueId(),"content"!==this.options.heightStyle&&e.css("height","")},_setOption:function(e,t){return"active"===e?void this._activate(t):("event"===e&&(this.options.event&&this._off(this.headers,this.options.event),this._setupEvents(t)),this._super(e,t),"collapsible"!==e||t||this.options.active!==!1||this._activate(0),"icons"===e&&(this._destroyIcons(),t&&this._createIcons()),void("disabled"===e&&(this.element.toggleClass("ui-state-disabled",!!t).attr("aria-disabled",t),this.headers.add(this.headers.next()).toggleClass("ui-state-disabled",!!t))))},_keydown:function(t){if(!t.altKey&&!t.ctrlKey){var n=e.ui.keyCode,i=this.headers.length,s=this.headers.index(t.target),o=!1;switch(t.keyCode){case n.RIGHT:case n.DOWN:o=this.headers[(s+1)%i];break;case n.LEFT:case n.UP:o=this.headers[(s-1+i)%i];break;case n.SPACE:case n.ENTER:this._eventHandler(t);break;case n.HOME:o=this.headers[0];break;case n.END:o=this.headers[i-1]}o&&(e(t.target).attr("tabIndex",-1),e(o).attr("tabIndex",0),o.focus(),t.preventDefault())}},_panelKeyDown:function(t){t.keyCode===e.ui.keyCode.UP&&t.ctrlKey&&e(t.currentTarget).prev().focus()},refresh:function(){var t=this.options;this._processPanels(),t.active===!1&&t.collapsible===!0||!this.headers.length?(t.active=!1,this.active=e()):t.active===!1?this._activate(0):this.active.length&&!e.contains(this.element[0],this.active[0])?this.headers.length===this.headers.find(".ui-state-disabled").length?(t.active=!1,this.active=e()):this._activate(Math.max(0,t.active-1)):t.active=this.headers.index(this.active),this._destroyIcons(),this._refresh()},_processPanels:function(){var e=this.headers,t=this.panels;this.headers=this.element.find(this.options.header).addClass("ui-accordion-header ui-state-default ui-corner-all"),this.panels=this.headers.next().addClass("ui-accordion-content ui-helper-reset ui-widget-content ui-corner-bottom").filter(":not(.ui-accordion-content-active)").hide(),t&&(this._off(e.not(this.headers)),this._off(t.not(this.panels)))},_refresh:function(){var t,n=this.options,i=n.heightStyle,s=this.element.parent();this.active=this._findActive(n.active).addClass("ui-accordion-header-active ui-state-active ui-corner-top").removeClass("ui-corner-all"),this.active.next().addClass("ui-accordion-content-active").show(),this.headers.attr("role","tab").each(function(){var t=e(this),n=t.uniqueId().attr("id"),i=t.next(),s=i.uniqueId().attr("id");t.attr("aria-controls",s),i.attr("aria-labelledby",n)}).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(n.event),"fill"===i?(t=s.height(),this.element.siblings(":visible").each(function(){var n=e(this),i=n.css("position");"absolute"!==i&&"fixed"!==i&&(t-=n.outerHeight(!0))}),this.headers.each(function(){t-=e(this).outerHeight(!0)}),this.headers.next().each(function(){e(this).height(Math.max(0,t-e(this).innerHeight()+e(this).height()))}).css("overflow","auto")):"auto"===i&&(t=0,this.headers.next().each(function(){t=Math.max(t,e(this).css("height","").height())}).height(t))},_activate:function(t){var n=this._findActive(t)[0];n!==this.active[0]&&(n=n||this.active[0],this._eventHandler({target:n,currentTarget:n,preventDefault:e.noop}))},_findActive:function(t){return"number"==typeof t?this.headers.eq(t):e()},_setupEvents:function(t){var n={keydown:"_keydown"};t&&e.each(t.split(" "),function(e,t){n[t]="_eventHandler"}),this._off(this.headers.add(this.headers.next())),this._on(this.headers,n),this._on(this.headers.next(),{keydown:"_panelKeyDown"}),this._hoverable(this.headers),this._focusable(this.headers)},_eventHandler:function(t){var n=this.options,i=this.active,s=e(t.currentTarget),o=s[0]===i[0],r=o&&n.collapsible,a=r?e():s.next(),l=i.next(),c={oldHeader:i,oldPanel:l,newHeader:r?e():s,newPanel:a};t.preventDefault(),o&&!n.collapsible||this._trigger("beforeActivate",t,c)===!1||(n.active=!r&&this.headers.index(s),this.active=o?e():s,this._toggle(c),i.removeClass("ui-accordion-header-active ui-state-active"),n.icons&&i.children(".ui-accordion-header-icon").removeClass(n.icons.activeHeader).addClass(n.icons.header),o||(s.removeClass("ui-corner-all").addClass("ui-accordion-header-active ui-state-active ui-corner-top"),n.icons&&s.children(".ui-accordion-header-icon").removeClass(n.icons.header).addClass(n.icons.activeHeader),s.next().addClass("ui-accordion-content-active")))},_toggle:function(t){var n=t.newPanel,i=this.prevShow.length?this.prevShow:t.oldPanel;this.prevShow.add(this.prevHide).stop(!0,!0),this.prevShow=n,this.prevHide=i,this.options.animate?this._animate(n,i,t):(i.hide(),n.show(),this._toggleComplete(t)),i.attr({"aria-hidden":"true"}),i.prev().attr({"aria-selected":"false","aria-expanded":"false"}),n.length&&i.length?i.prev().attr({tabIndex:-1,"aria-expanded":"false"}):n.length&&this.headers.filter(function(){return 0===parseInt(e(this).attr("tabIndex"),10)}).attr("tabIndex",-1),n.attr("aria-hidden","false").prev().attr({"aria-selected":"true","aria-expanded":"true",tabIndex:0})},_animate:function(e,t,n){var i,s,o,r=this,a=0,l=e.css("box-sizing"),c=e.length&&(!t.length||e.index()<t.index()),h=this.options.animate||{},u=c&&h.down||h,d=function(){r._toggleComplete(n)};return"number"==typeof u&&(o=u),"string"==typeof u&&(s=u),s=s||u.easing||h.easing,o=o||u.duration||h.duration,t.length?e.length?(i=e.show().outerHeight(),t.animate(this.hideProps,{duration:o,easing:s,step:function(e,t){t.now=Math.round(e)}}),void e.hide().animate(this.showProps,{duration:o,easing:s,complete:d,step:function(e,n){n.now=Math.round(e),"height"!==n.prop?"content-box"===l&&(a+=n.now):"content"!==r.options.heightStyle&&(n.now=Math.round(i-t.outerHeight()-a),a=0)}})):t.animate(this.hideProps,o,s,d):e.animate(this.showProps,o,s,d)},_toggleComplete:function(e){var t=e.oldPanel;t.removeClass("ui-accordion-content-active").prev().removeClass("ui-corner-top").addClass("ui-corner-all"),t.length&&(t.parent()[0].className=t.parent()[0].className),this._trigger("activate",null,e)}}),e.widget("ui.menu",{version:"1.11.4",defaultElement:"<ul>",delay:300,options:{icons:{submenu:"ui-icon-carat-1-e"},items:"> *",menus:"ul",position:{my:"left-1 top",at:"right top"},role:"menu",blur:null,focus:null,select:null},_create:function(){this.activeMenu=this.element,this.mouseHandled=!1,this.element.uniqueId().addClass("ui-menu ui-widget ui-widget-content").toggleClass("ui-menu-icons",!!this.element.find(".ui-icon").length).attr({role:this.options.role,tabIndex:0}),this.options.disabled&&this.element.addClass("ui-state-disabled").attr("aria-disabled","true"),this._on({"mousedown .ui-menu-item":function(e){e.preventDefault()},"click .ui-menu-item":function(t){var n=e(t.target);!this.mouseHandled&&n.not(".ui-state-disabled").length&&(this.select(t),t.isPropagationStopped()||(this.mouseHandled=!0),n.has(".ui-menu").length?this.expand(t):!this.element.is(":focus")&&e(this.document[0].activeElement).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":function(t){if(!this.previousFilter){var n=e(t.currentTarget);n.siblings(".ui-state-active").removeClass("ui-state-active"),this.focus(t,n)}},mouseleave:"collapseAll","mouseleave .ui-menu":"collapseAll",focus:function(e,t){var n=this.active||this.element.find(this.options.items).eq(0);t||this.focus(e,n)},blur:function(t){this._delay(function(){e.contains(this.element[0],this.document[0].activeElement)||this.collapseAll(t)})},keydown:"_keydown"}),this.refresh(),this._on(this.document,{click:function(e){this._closeOnDocumentClick(e)&&this.collapseAll(e),this.mouseHandled=!1}})},_destroy:function(){this.element.removeAttr("aria-activedescendant").find(".ui-menu").addBack().removeClass("ui-menu ui-widget ui-widget-content ui-menu-icons ui-front").removeAttr("role").removeAttr("tabIndex").removeAttr("aria-labelledby").removeAttr("aria-expanded").removeAttr("aria-hidden").removeAttr("aria-disabled").removeUniqueId().show(),this.element.find(".ui-menu-item").removeClass("ui-menu-item").removeAttr("role").removeAttr("aria-disabled").removeUniqueId().removeClass("ui-state-hover").removeAttr("tabIndex").removeAttr("role").removeAttr("aria-haspopup").children().each(function(){var t=e(this);t.data("ui-menu-submenu-carat")&&t.remove()}),this.element.find(".ui-menu-divider").removeClass("ui-menu-divider ui-widget-content")},_keydown:function(t){var n,i,s,o,r=!0;switch(t.keyCode){case e.ui.keyCode.PAGE_UP:this.previousPage(t);break;case e.ui.keyCode.PAGE_DOWN:this.nextPage(t);break;case e.ui.keyCode.HOME:this._move("first","first",t);break;case e.ui.keyCode.END:this._move("last","last",t);break;case e.ui.keyCode.UP:this.previous(t);break;case e.ui.keyCode.DOWN:this.next(t);break;case e.ui.keyCode.LEFT:this.collapse(t);break;case e.ui.keyCode.RIGHT:this.active&&!this.active.is(".ui-state-disabled")&&this.expand(t);break;case e.ui.keyCode.ENTER:case e.ui.keyCode.SPACE:this._activate(t);break;case e.ui.keyCode.ESCAPE:this.collapse(t);break;default:r=!1,i=this.previousFilter||"",s=String.fromCharCode(t.keyCode),o=!1,clearTimeout(this.filterTimer),s===i?o=!0:s=i+s,n=this._filterMenuItems(s),n=o&&-1!==n.index(this.active.next())?this.active.nextAll(".ui-menu-item"):n,n.length||(s=String.fromCharCode(t.keyCode),n=this._filterMenuItems(s)),n.length?(this.focus(t,n),this.previousFilter=s,this.filterTimer=this._delay(function(){delete this.previousFilter},1e3)):delete this.previousFilter}r&&t.preventDefault()},_activate:function(e){this.active.is(".ui-state-disabled")||(this.active.is("[aria-haspopup='true']")?this.expand(e):this.select(e))},refresh:function(){var t,n,i=this,s=this.options.icons.submenu,o=this.element.find(this.options.menus);this.element.toggleClass("ui-menu-icons",!!this.element.find(".ui-icon").length),o.filter(":not(.ui-menu)").addClass("ui-menu ui-widget ui-widget-content ui-front").hide().attr({role:this.options.role,"aria-hidden":"true","aria-expanded":"false"}).each(function(){var t=e(this),n=t.parent(),i=e("<span>").addClass("ui-menu-icon ui-icon "+s).data("ui-menu-submenu-carat",!0);n.attr("aria-haspopup","true").prepend(i),t.attr("aria-labelledby",n.attr("id"))}),t=o.add(this.element),n=t.find(this.options.items),n.not(".ui-menu-item").each(function(){var t=e(this);i._isDivider(t)&&t.addClass("ui-widget-content ui-menu-divider")}),n.not(".ui-menu-item, .ui-menu-divider").addClass("ui-menu-item").uniqueId().attr({tabIndex:-1,role:this._itemRole()}),n.filter(".ui-state-disabled").attr("aria-disabled","true"),this.active&&!e.contains(this.element[0],this.active[0])&&this.blur()},_itemRole:function(){return{menu:"menuitem",listbox:"option"}[this.options.role]},_setOption:function(e,t){"icons"===e&&this.element.find(".ui-menu-icon").removeClass(this.options.icons.submenu).addClass(t.submenu),"disabled"===e&&this.element.toggleClass("ui-state-disabled",!!t).attr("aria-disabled",t),this._super(e,t)},focus:function(e,t){var n,i;this.blur(e,e&&"focus"===e.type),this._scrollIntoView(t),this.active=t.first(),i=this.active.addClass("ui-state-focus").removeClass("ui-state-active"),this.options.role&&this.element.attr("aria-activedescendant",i.attr("id")),this.active.parent().closest(".ui-menu-item").addClass("ui-state-active"),e&&"keydown"===e.type?this._close():this.timer=this._delay(function(){this._close()},this.delay),n=t.children(".ui-menu"),n.length&&e&&/^mouse/.test(e.type)&&this._startOpening(n),this.activeMenu=t.parent(),this._trigger("focus",e,{item:t})},_scrollIntoView:function(t){var n,i,s,o,r,a;this._hasScroll()&&(n=parseFloat(e.css(this.activeMenu[0],"borderTopWidth"))||0,i=parseFloat(e.css(this.activeMenu[0],"paddingTop"))||0,s=t.offset().top-this.activeMenu.offset().top-n-i,o=this.activeMenu.scrollTop(),r=this.activeMenu.height(),a=t.outerHeight(),0>s?this.activeMenu.scrollTop(o+s):s+a>r&&this.activeMenu.scrollTop(o+s-r+a))},blur:function(e,t){t||clearTimeout(this.timer),this.active&&(this.active.removeClass("ui-state-focus"),this.active=null,this._trigger("blur",e,{item:this.active}))},_startOpening:function(e){clearTimeout(this.timer),"true"===e.attr("aria-hidden")&&(this.timer=this._delay(function(){this._close(),this._open(e)},this.delay))},_open:function(t){var n=e.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(n)},collapseAll:function(t,n){clearTimeout(this.timer),this.timer=this._delay(function(){var i=n?this.element:e(t&&t.target).closest(this.element.find(".ui-menu"));i.length||(i=this.element),this._close(i),this.blur(t),this.activeMenu=i},this.delay)},_close:function(e){e||(e=this.active?this.active.parent():this.element),e.find(".ui-menu").hide().attr("aria-hidden","true").attr("aria-expanded","false").end().find(".ui-state-active").not(".ui-state-focus").removeClass("ui-state-active")},_closeOnDocumentClick:function(t){return!e(t.target).closest(".ui-menu").length},_isDivider:function(e){return!/[^\-\u2014\u2013\s]/.test(e.text())},collapse:function(e){var t=this.active&&this.active.parent().closest(".ui-menu-item",this.element);t&&t.length&&(this._close(),this.focus(e,t))},expand:function(e){var t=this.active&&this.active.children(".ui-menu ").find(this.options.items).first();t&&t.length&&(this._open(t.parent()),this._delay(function(){this.focus(e,t)}))},next:function(e){this._move("next","first",e)},previous:function(e){this._move("prev","last",e)},isFirstItem:function(){return this.active&&!this.active.prevAll(".ui-menu-item").length},isLastItem:function(){return this.active&&!this.active.nextAll(".ui-menu-item").length},_move:function(e,t,n){var i;this.active&&(i="first"===e||"last"===e?this.active["first"===e?"prevAll":"nextAll"](".ui-menu-item").eq(-1):this.active[e+"All"](".ui-menu-item").eq(0)),i&&i.length&&this.active||(i=this.activeMenu.find(this.options.items)[t]()),this.focus(n,i)},nextPage:function(t){var n,i,s;return this.active?void(this.isLastItem()||(this._hasScroll()?(i=this.active.offset().top,s=this.element.height(),this.active.nextAll(".ui-menu-item").each(function(){return n=e(this),0>n.offset().top-i-s}),this.focus(t,n)):this.focus(t,this.activeMenu.find(this.options.items)[this.active?"last":"first"]()))):void this.next(t)},previousPage:function(t){var n,i,s;return this.active?void(this.isFirstItem()||(this._hasScroll()?(i=this.active.offset().top,s=this.element.height(),this.active.prevAll(".ui-menu-item").each(function(){return n=e(this),n.offset().top-i+s>0}),this.focus(t,n)):this.focus(t,this.activeMenu.find(this.options.items).first()))):void this.next(t)},_hasScroll:function(){return this.element.outerHeight()<this.element.prop("scrollHeight")},select:function(t){this.active=this.active||e(t.target).closest(".ui-menu-item");var n={item:this.active};this.active.has(".ui-menu").length||this.collapseAll(t,!0),this._trigger("select",t,n)},_filterMenuItems:function(t){var n=t.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g,"\\$&"),i=RegExp("^"+n,"i");return this.activeMenu.find(this.options.items).filter(".ui-menu-item").filter(function(){return i.test(e.trim(e(this).text()))})}}),e.widget("ui.autocomplete",{version:"1.11.4",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,_create:function(){var t,n,i,s=this.element[0].nodeName.toLowerCase(),o="textarea"===s,r="input"===s;this.isMultiLine=!!o||!r&&this.element.prop("isContentEditable"),this.valueMethod=this.element[o||r?"val":"text"],this.isNewMenu=!0,this.element.addClass("ui-autocomplete-input").attr("autocomplete","off"),this._on(this.element,{keydown:function(s){if(this.element.prop("readOnly"))return t=!0,i=!0,void(n=!0);t=!1,i=!1,n=!1;var o=e.ui.keyCode;switch(s.keyCode){case o.PAGE_UP:t=!0,this._move("previousPage",s);break;case o.PAGE_DOWN:t=!0,this._move("nextPage",s);break;case o.UP:t=!0,this._keyEvent("previous",s);break;case o.DOWN:t=!0,this._keyEvent("next",s);break;case o.ENTER:this.menu.active&&(t=!0,s.preventDefault(),this.menu.select(s));break;case o.TAB:this.menu.active&&this.menu.select(s);break;case o.ESCAPE:this.menu.element.is(":visible")&&(this.isMultiLine||this._value(this.term),this.close(s),s.preventDefault());break;default:n=!0,this._searchTimeout(s)}},keypress:function(i){if(t)return t=!1,void((!this.isMultiLine||this.menu.element.is(":visible"))&&i.preventDefault());if(!n){var s=e.ui.keyCode;switch(i.keyCode){case s.PAGE_UP:this._move("previousPage",i);break;case s.PAGE_DOWN:this._move("nextPage",i);break;case s.UP:this._keyEvent("previous",i);break;case s.DOWN:this._keyEvent("next",i)}}},input:function(e){return i?(i=!1,void e.preventDefault()):void this._searchTimeout(e)},focus:function(){this.selectedItem=null,this.previous=this._value()},blur:function(e){return this.cancelBlur?void delete this.cancelBlur:(clearTimeout(this.searching),this.close(e),void this._change(e))}}),this._initSource(),this.menu=e("<ul>").addClass("ui-autocomplete ui-front").appendTo(this._appendTo()).menu({role:null}).hide().menu("instance"),this._on(this.menu.element,{mousedown:function(t){t.preventDefault(),this.cancelBlur=!0,this._delay(function(){delete this.cancelBlur});var n=this.menu.element[0];e(t.target).closest(".ui-menu-item").length||this._delay(function(){var t=this;this.document.one("mousedown",function(i){i.target===t.element[0]||i.target===n||e.contains(n,i.target)||t.close()})})},menufocus:function(t,n){var i,s;return this.isNewMenu&&(this.isNewMenu=!1,t.originalEvent&&/^mouse/.test(t.originalEvent.type))?(this.menu.blur(),void this.document.one("mousemove",function(){e(t.target).trigger(t.originalEvent)})):(s=n.item.data("ui-autocomplete-item"),!1!==this._trigger("focus",t,{item:s})&&t.originalEvent&&/^key/.test(t.originalEvent.type)&&this._value(s.value),i=n.item.attr("aria-label")||s.value,void(i&&e.trim(i).length&&(this.liveRegion.children().hide(),e("<div>").text(i).appendTo(this.liveRegion))))},menuselect:function(e,t){var n=t.item.data("ui-autocomplete-item"),i=this.previous;this.element[0]!==this.document[0].activeElement&&(this.element.focus(),this.previous=i,this._delay(function(){this.previous=i,this.selectedItem=n})),!1!==this._trigger("select",e,{item:n})&&this._value(n.value),this.term=this._value(),this.close(e),this.selectedItem=n}}),this.liveRegion=e("<span>",{role:"status","aria-live":"assertive","aria-relevant":"additions"}).addClass("ui-helper-hidden-accessible").appendTo(this.document[0].body),this._on(this.window,{beforeunload:function(){this.element.removeAttr("autocomplete")}})},_destroy:function(){clearTimeout(this.searching),this.element.removeClass("ui-autocomplete-input").removeAttr("autocomplete"),this.menu.element.remove(),this.liveRegion.remove()},_setOption:function(e,t){this._super(e,t),"source"===e&&this._initSource(),"appendTo"===e&&this.menu.element.appendTo(this._appendTo()),"disabled"===e&&t&&this.xhr&&this.xhr.abort()},_appendTo:function(){var t=this.options.appendTo;return t&&(t=t.jquery||t.nodeType?e(t):this.document.find(t).eq(0)),t&&t[0]||(t=this.element.closest(".ui-front")),t.length||(t=this.document[0].body),t},_initSource:function(){var t,n,i=this;e.isArray(this.options.source)?(t=this.options.source,this.source=function(n,i){i(e.ui.autocomplete.filter(t,n.term))}):"string"==typeof this.options.source?(n=this.options.source,this.source=function(t,s){i.xhr&&i.xhr.abort(),i.xhr=e.ajax({url:n,data:t,dataType:"json",success:function(e){s(e)},error:function(){s([])}})}):this.source=this.options.source},_searchTimeout:function(e){clearTimeout(this.searching),this.searching=this._delay(function(){var t=this.term===this._value(),n=this.menu.element.is(":visible"),i=e.altKey||e.ctrlKey||e.metaKey||e.shiftKey;(!t||t&&!n&&!i)&&(this.selectedItem=null,this.search(null,e))},this.options.delay)},search:function(e,t){return e=null!=e?e:this._value(),this.term=this._value(),e.length<this.options.minLength?this.close(t):this._trigger("search",t)!==!1?this._search(e):void 0},_search:function(e){this.pending++,this.element.addClass("ui-autocomplete-loading"),this.cancelSearch=!1,this.source({term:e},this._response())},_response:function(){var t=++this.requestIndex;return e.proxy(function(e){t===this.requestIndex&&this.__response(e),this.pending--,this.pending||this.element.removeClass("ui-autocomplete-loading")},this)},__response:function(e){e&&(e=this._normalize(e)),this._trigger("response",null,{content:e}),!this.options.disabled&&e&&e.length&&!this.cancelSearch?(this._suggest(e),this._trigger("open")):this._close()},close:function(e){this.cancelSearch=!0,this._close(e)},_close:function(e){this.menu.element.is(":visible")&&(this.menu.element.hide(),this.menu.blur(),this.isNewMenu=!0,this._trigger("close",e))},_change:function(e){this.previous!==this._value()&&this._trigger("change",e,{item:this.selectedItem})},_normalize:function(t){return t.length&&t[0].label&&t[0].value?t:e.map(t,function(t){return"string"==typeof t?{label:t,value:t}:e.extend({},t,{label:t.label||t.value,value:t.value||t.label})})},_suggest:function(t){var n=this.menu.element.empty();this._renderMenu(n,t),this.isNewMenu=!0,this.menu.refresh(),n.show(),this._resizeMenu(),n.position(e.extend({of:this.element},this.options.position)),this.options.autoFocus&&this.menu.next()},_resizeMenu:function(){var e=this.menu.element;e.outerWidth(Math.max(e.width("").outerWidth()+1,this.element.outerWidth()))},_renderMenu:function(t,n){var i=this;e.each(n,function(e,n){i._renderItemData(t,n)})},_renderItemData:function(e,t){return this._renderItem(e,t).data("ui-autocomplete-item",t)},_renderItem:function(t,n){return e("<li>").text(n.label).appendTo(t)},_move:function(e,t){return this.menu.element.is(":visible")?this.menu.isFirstItem()&&/^previous/.test(e)||this.menu.isLastItem()&&/^next/.test(e)?(this.isMultiLine||this._value(this.term),void this.menu.blur()):void this.menu[e](t):void this.search(null,t)},widget:function(){return this.menu.element},_value:function(){return this.valueMethod.apply(this.element,arguments)},_keyEvent:function(e,t){(!this.isMultiLine||this.menu.element.is(":visible"))&&(this._move(e,t),t.preventDefault())}}),e.extend(e.ui.autocomplete,{escapeRegex:function(e){return e.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g,"\\$&")},filter:function(t,n){var i=RegExp(e.ui.autocomplete.escapeRegex(n),"i");return e.grep(t,function(e){return i.test(e.label||e.value||e)})}}),e.widget("ui.autocomplete",e.ui.autocomplete,{options:{messages:{noResults:"No search results.",results:function(e){return e+(e>1?" results are":" result is")+" available, use up and down arrow keys to navigate."}}},__response:function(t){var n;this._superApply(arguments),this.options.disabled||this.cancelSearch||(n=t&&t.length?this.options.messages.results(t.length):this.options.messages.noResults,this.liveRegion.children().hide(),e("<div>").text(n).appendTo(this.liveRegion))}}),e.ui.autocomplete;var d,f="ui-button ui-widget ui-state-default ui-corner-all",p="ui-button-icons-only ui-button-icon-only ui-button-text-icons ui-button-text-icon-primary ui-button-text-icon-secondary ui-button-text-only",m=function(){var t=e(this);setTimeout(function(){t.find(":ui-button").button("refresh")},1)},g=function(t){var n=t.name,i=t.form,s=e([]);return n&&(n=n.replace(/'/g,"\\'"),s=i?e(i).find("[name='"+n+"'][type=radio]"):e("[name='"+n+"'][type=radio]",t.ownerDocument).filter(function(){return!this.form})),s};e.widget("ui.button",{version:"1.11.4",defaultElement:"<button>",options:{disabled:null,text:!0,label:null,icons:{primary:null,secondary:null}},_create:function(){this.element.closest("form").unbind("reset"+this.eventNamespace).bind("reset"+this.eventNamespace,m),"boolean"!=typeof this.options.disabled?this.options.disabled=!!this.element.prop("disabled"):this.element.prop("disabled",this.options.disabled),this._determineButtonType(),this.hasTitle=!!this.buttonElement.attr("title");var t=this,n=this.options,i="checkbox"===this.type||"radio"===this.type,s=i?"":"ui-state-active";null===n.label&&(n.label="input"===this.type?this.buttonElement.val():this.buttonElement.html()),this._hoverable(this.buttonElement),this.buttonElement.addClass(f).attr("role","button").bind("mouseenter"+this.eventNamespace,function(){n.disabled||this===d&&e(this).addClass("ui-state-active")}).bind("mouseleave"+this.eventNamespace,function(){n.disabled||e(this).removeClass(s)}).bind("click"+this.eventNamespace,function(e){n.disabled&&(e.preventDefault(),e.stopImmediatePropagation())}),this._on({focus:function(){this.buttonElement.addClass("ui-state-focus")},blur:function(){this.buttonElement.removeClass("ui-state-focus")}}),i&&this.element.bind("change"+this.eventNamespace,function(){t.refresh()}),"checkbox"===this.type?this.buttonElement.bind("click"+this.eventNamespace,function(){return!n.disabled&&void 0}):"radio"===this.type?this.buttonElement.bind("click"+this.eventNamespace,function(){if(n.disabled)return!1;e(this).addClass("ui-state-active"),t.buttonElement.attr("aria-pressed","true");var i=t.element[0];g(i).not(i).map(function(){return e(this).button("widget")[0]}).removeClass("ui-state-active").attr("aria-pressed","false")}):(this.buttonElement.bind("mousedown"+this.eventNamespace,function(){return!n.disabled&&(e(this).addClass("ui-state-active"),d=this,void t.document.one("mouseup",function(){d=null}))}).bind("mouseup"+this.eventNamespace,function(){return!n.disabled&&void e(this).removeClass("ui-state-active")}).bind("keydown"+this.eventNamespace,function(t){return!n.disabled&&void((t.keyCode===e.ui.keyCode.SPACE||t.keyCode===e.ui.keyCode.ENTER)&&e(this).addClass("ui-state-active"))}).bind("keyup"+this.eventNamespace+" blur"+this.eventNamespace,function(){e(this).removeClass("ui-state-active")}),this.buttonElement.is("a")&&this.buttonElement.keyup(function(t){t.keyCode===e.ui.keyCode.SPACE&&e(this).click()})),this._setOption("disabled",n.disabled),this._resetButton()},_determineButtonType:function(){var e,t,n;this.type=this.element.is("[type=checkbox]")?"checkbox":this.element.is("[type=radio]")?"radio":this.element.is("input")?"input":"button","checkbox"===this.type||"radio"===this.type?(e=this.element.parents().last(),t="label[for='"+this.element.attr("id")+"']",this.buttonElement=e.find(t),this.buttonElement.length||(e=e.length?e.siblings():this.element.siblings(),
this.buttonElement=e.filter(t),this.buttonElement.length||(this.buttonElement=e.find(t))),this.element.addClass("ui-helper-hidden-accessible"),n=this.element.is(":checked"),n&&this.buttonElement.addClass("ui-state-active"),this.buttonElement.prop("aria-pressed",n)):this.buttonElement=this.element},widget:function(){return this.buttonElement},_destroy:function(){this.element.removeClass("ui-helper-hidden-accessible"),this.buttonElement.removeClass(f+" ui-state-active "+p).removeAttr("role").removeAttr("aria-pressed").html(this.buttonElement.find(".ui-button-text").html()),this.hasTitle||this.buttonElement.removeAttr("title")},_setOption:function(e,t){return this._super(e,t),"disabled"===e?(this.widget().toggleClass("ui-state-disabled",!!t),this.element.prop("disabled",!!t),void(t&&("checkbox"===this.type||"radio"===this.type?this.buttonElement.removeClass("ui-state-focus"):this.buttonElement.removeClass("ui-state-focus ui-state-active")))):void this._resetButton()},refresh:function(){var t=this.element.is("input, button")?this.element.is(":disabled"):this.element.hasClass("ui-button-disabled");t!==this.options.disabled&&this._setOption("disabled",t),"radio"===this.type?g(this.element[0]).each(function(){e(this).is(":checked")?e(this).button("widget").addClass("ui-state-active").attr("aria-pressed","true"):e(this).button("widget").removeClass("ui-state-active").attr("aria-pressed","false")}):"checkbox"===this.type&&(this.element.is(":checked")?this.buttonElement.addClass("ui-state-active").attr("aria-pressed","true"):this.buttonElement.removeClass("ui-state-active").attr("aria-pressed","false"))},_resetButton:function(){if("input"===this.type)return void(this.options.label&&this.element.val(this.options.label));var t=this.buttonElement.removeClass(p),n=e("<span></span>",this.document[0]).addClass("ui-button-text").html(this.options.label).appendTo(t.empty()).text(),i=this.options.icons,s=i.primary&&i.secondary,o=[];i.primary||i.secondary?(this.options.text&&o.push("ui-button-text-icon"+(s?"s":i.primary?"-primary":"-secondary")),i.primary&&t.prepend("<span class='ui-button-icon-primary ui-icon "+i.primary+"'></span>"),i.secondary&&t.append("<span class='ui-button-icon-secondary ui-icon "+i.secondary+"'></span>"),this.options.text||(o.push(s?"ui-button-icons-only":"ui-button-icon-only"),this.hasTitle||t.attr("title",e.trim(n)))):o.push("ui-button-text-only"),t.addClass(o.join(" "))}}),e.widget("ui.buttonset",{version:"1.11.4",options:{items:"button, input[type=button], input[type=submit], input[type=reset], input[type=checkbox], input[type=radio], a, :data(ui-button)"},_create:function(){this.element.addClass("ui-buttonset")},_init:function(){this.refresh()},_setOption:function(e,t){"disabled"===e&&this.buttons.button("option",e,t),this._super(e,t)},refresh:function(){var t="rtl"===this.element.css("direction"),n=this.element.find(this.options.items),i=n.filter(":ui-button");n.not(":ui-button").button(),i.button("refresh"),this.buttons=n.map(function(){return e(this).button("widget")[0]}).removeClass("ui-corner-all ui-corner-left ui-corner-right").filter(":first").addClass(t?"ui-corner-right":"ui-corner-left").end().filter(":last").addClass(t?"ui-corner-left":"ui-corner-right").end().end()},_destroy:function(){this.element.removeClass("ui-buttonset"),this.buttons.map(function(){return e(this).button("widget")[0]}).removeClass("ui-corner-left ui-corner-right").end().button("destroy")}}),e.ui.button,e.extend(e.ui,{datepicker:{version:"1.11.4"}});var v;e.extend(s.prototype,{markerClassName:"hasDatepicker",maxRows:4,_widgetDatepicker:function(){return this.dpDiv},setDefaults:function(e){return a(this._defaults,e||{}),this},_attachDatepicker:function(t,n){var i,s,o;i=t.nodeName.toLowerCase(),s="div"===i||"span"===i,t.id||(this.uuid+=1,t.id="dp"+this.uuid),o=this._newInst(e(t),s),o.settings=e.extend({},n||{}),"input"===i?this._connectDatepicker(t,o):s&&this._inlineDatepicker(t,o)},_newInst:function(t,n){var i=t[0].id.replace(/([^A-Za-z0-9_\-])/g,"\\\\$1");return{id:i,input:t,selectedDay:0,selectedMonth:0,selectedYear:0,drawMonth:0,drawYear:0,inline:n,dpDiv:n?o(e("<div class='"+this._inlineClass+" ui-datepicker ui-widget ui-widget-content ui-helper-clearfix ui-corner-all'></div>")):this.dpDiv}},_connectDatepicker:function(t,n){var i=e(t);n.append=e([]),n.trigger=e([]),i.hasClass(this.markerClassName)||(this._attachments(i,n),i.addClass(this.markerClassName).keydown(this._doKeyDown).keypress(this._doKeyPress).keyup(this._doKeyUp),this._autoSize(n),e.data(t,"datepicker",n),n.settings.disabled&&this._disableDatepicker(t))},_attachments:function(t,n){var i,s,o,r=this._get(n,"appendText"),a=this._get(n,"isRTL");n.append&&n.append.remove(),r&&(n.append=e("<span class='"+this._appendClass+"'>"+r+"</span>"),t[a?"before":"after"](n.append)),t.unbind("focus",this._showDatepicker),n.trigger&&n.trigger.remove(),i=this._get(n,"showOn"),("focus"===i||"both"===i)&&t.focus(this._showDatepicker),("button"===i||"both"===i)&&(s=this._get(n,"buttonText"),o=this._get(n,"buttonImage"),n.trigger=e(this._get(n,"buttonImageOnly")?e("<img/>").addClass(this._triggerClass).attr({src:o,alt:s,title:s}):e("<button type='button'></button>").addClass(this._triggerClass).html(o?e("<img/>").attr({src:o,alt:s,title:s}):s)),t[a?"before":"after"](n.trigger),n.trigger.click(function(){return e.datepicker._datepickerShowing&&e.datepicker._lastInput===t[0]?e.datepicker._hideDatepicker():e.datepicker._datepickerShowing&&e.datepicker._lastInput!==t[0]?(e.datepicker._hideDatepicker(),e.datepicker._showDatepicker(t[0])):e.datepicker._showDatepicker(t[0]),!1}))},_autoSize:function(e){if(this._get(e,"autoSize")&&!e.inline){var t,n,i,s,o=new Date(2009,11,20),r=this._get(e,"dateFormat");r.match(/[DM]/)&&(t=function(e){for(n=0,i=0,s=0;e.length>s;s++)e[s].length>n&&(n=e[s].length,i=s);return i},o.setMonth(t(this._get(e,r.match(/MM/)?"monthNames":"monthNamesShort"))),o.setDate(t(this._get(e,r.match(/DD/)?"dayNames":"dayNamesShort"))+20-o.getDay())),e.input.attr("size",this._formatDate(e,o).length)}},_inlineDatepicker:function(t,n){var i=e(t);i.hasClass(this.markerClassName)||(i.addClass(this.markerClassName).append(n.dpDiv),e.data(t,"datepicker",n),this._setDate(n,this._getDefaultDate(n),!0),this._updateDatepicker(n),this._updateAlternate(n),n.settings.disabled&&this._disableDatepicker(t),n.dpDiv.css("display","block"))},_dialogDatepicker:function(t,n,i,s,o){var r,l,c,h,u,d=this._dialogInst;return d||(this.uuid+=1,r="dp"+this.uuid,this._dialogInput=e("<input type='text' id='"+r+"' style='position: absolute; top: -100px; width: 0px;'/>"),this._dialogInput.keydown(this._doKeyDown),e("body").append(this._dialogInput),d=this._dialogInst=this._newInst(this._dialogInput,!1),d.settings={},e.data(this._dialogInput[0],"datepicker",d)),a(d.settings,s||{}),n=n&&n.constructor===Date?this._formatDate(d,n):n,this._dialogInput.val(n),this._pos=o?o.length?o:[o.pageX,o.pageY]:null,this._pos||(l=document.documentElement.clientWidth,c=document.documentElement.clientHeight,h=document.documentElement.scrollLeft||document.body.scrollLeft,u=document.documentElement.scrollTop||document.body.scrollTop,this._pos=[l/2-100+h,c/2-150+u]),this._dialogInput.css("left",this._pos[0]+20+"px").css("top",this._pos[1]+"px"),d.settings.onSelect=i,this._inDialog=!0,this.dpDiv.addClass(this._dialogClass),this._showDatepicker(this._dialogInput[0]),e.blockUI&&e.blockUI(this.dpDiv),e.data(this._dialogInput[0],"datepicker",d),this},_destroyDatepicker:function(t){var n,i=e(t),s=e.data(t,"datepicker");i.hasClass(this.markerClassName)&&(n=t.nodeName.toLowerCase(),e.removeData(t,"datepicker"),"input"===n?(s.append.remove(),s.trigger.remove(),i.removeClass(this.markerClassName).unbind("focus",this._showDatepicker).unbind("keydown",this._doKeyDown).unbind("keypress",this._doKeyPress).unbind("keyup",this._doKeyUp)):("div"===n||"span"===n)&&i.removeClass(this.markerClassName).empty(),v===s&&(v=null))},_enableDatepicker:function(t){var n,i,s=e(t),o=e.data(t,"datepicker");s.hasClass(this.markerClassName)&&(n=t.nodeName.toLowerCase(),"input"===n?(t.disabled=!1,o.trigger.filter("button").each(function(){this.disabled=!1}).end().filter("img").css({opacity:"1.0",cursor:""})):("div"===n||"span"===n)&&(i=s.children("."+this._inlineClass),i.children().removeClass("ui-state-disabled"),i.find("select.ui-datepicker-month, select.ui-datepicker-year").prop("disabled",!1)),this._disabledInputs=e.map(this._disabledInputs,function(e){return e===t?null:e}))},_disableDatepicker:function(t){var n,i,s=e(t),o=e.data(t,"datepicker");s.hasClass(this.markerClassName)&&(n=t.nodeName.toLowerCase(),"input"===n?(t.disabled=!0,o.trigger.filter("button").each(function(){this.disabled=!0}).end().filter("img").css({opacity:"0.5",cursor:"default"})):("div"===n||"span"===n)&&(i=s.children("."+this._inlineClass),i.children().addClass("ui-state-disabled"),i.find("select.ui-datepicker-month, select.ui-datepicker-year").prop("disabled",!0)),this._disabledInputs=e.map(this._disabledInputs,function(e){return e===t?null:e}),this._disabledInputs[this._disabledInputs.length]=t)},_isDisabledDatepicker:function(e){if(!e)return!1;for(var t=0;this._disabledInputs.length>t;t++)if(this._disabledInputs[t]===e)return!0;return!1},_getInst:function(t){try{return e.data(t,"datepicker")}catch(n){throw"Missing instance data for this datepicker"}},_optionDatepicker:function(t,n,i){var s,o,r,l,c=this._getInst(t);return 2===arguments.length&&"string"==typeof n?"defaults"===n?e.extend({},e.datepicker._defaults):c?"all"===n?e.extend({},c.settings):this._get(c,n):null:(s=n||{},"string"==typeof n&&(s={},s[n]=i),void(c&&(this._curInst===c&&this._hideDatepicker(),o=this._getDateDatepicker(t,!0),r=this._getMinMaxDate(c,"min"),l=this._getMinMaxDate(c,"max"),a(c.settings,s),null!==r&&void 0!==s.dateFormat&&void 0===s.minDate&&(c.settings.minDate=this._formatDate(c,r)),null!==l&&void 0!==s.dateFormat&&void 0===s.maxDate&&(c.settings.maxDate=this._formatDate(c,l)),"disabled"in s&&(s.disabled?this._disableDatepicker(t):this._enableDatepicker(t)),this._attachments(e(t),c),this._autoSize(c),this._setDate(c,o),this._updateAlternate(c),this._updateDatepicker(c))))},_changeDatepicker:function(e,t,n){this._optionDatepicker(e,t,n)},_refreshDatepicker:function(e){var t=this._getInst(e);t&&this._updateDatepicker(t)},_setDateDatepicker:function(e,t){var n=this._getInst(e);n&&(this._setDate(n,t),this._updateDatepicker(n),this._updateAlternate(n))},_getDateDatepicker:function(e,t){var n=this._getInst(e);return n&&!n.inline&&this._setDateFromField(n,t),n?this._getDate(n):null},_doKeyDown:function(t){var n,i,s,o=e.datepicker._getInst(t.target),r=!0,a=o.dpDiv.is(".ui-datepicker-rtl");if(o._keyEvent=!0,e.datepicker._datepickerShowing)switch(t.keyCode){case 9:e.datepicker._hideDatepicker(),r=!1;break;case 13:return s=e("td."+e.datepicker._dayOverClass+":not(."+e.datepicker._currentClass+")",o.dpDiv),s[0]&&e.datepicker._selectDay(t.target,o.selectedMonth,o.selectedYear,s[0]),n=e.datepicker._get(o,"onSelect"),n?(i=e.datepicker._formatDate(o),n.apply(o.input?o.input[0]:null,[i,o])):e.datepicker._hideDatepicker(),!1;case 27:e.datepicker._hideDatepicker();break;case 33:e.datepicker._adjustDate(t.target,t.ctrlKey?-e.datepicker._get(o,"stepBigMonths"):-e.datepicker._get(o,"stepMonths"),"M");break;case 34:e.datepicker._adjustDate(t.target,t.ctrlKey?+e.datepicker._get(o,"stepBigMonths"):+e.datepicker._get(o,"stepMonths"),"M");break;case 35:(t.ctrlKey||t.metaKey)&&e.datepicker._clearDate(t.target),r=t.ctrlKey||t.metaKey;break;case 36:(t.ctrlKey||t.metaKey)&&e.datepicker._gotoToday(t.target),r=t.ctrlKey||t.metaKey;break;case 37:(t.ctrlKey||t.metaKey)&&e.datepicker._adjustDate(t.target,a?1:-1,"D"),r=t.ctrlKey||t.metaKey,t.originalEvent.altKey&&e.datepicker._adjustDate(t.target,t.ctrlKey?-e.datepicker._get(o,"stepBigMonths"):-e.datepicker._get(o,"stepMonths"),"M");break;case 38:(t.ctrlKey||t.metaKey)&&e.datepicker._adjustDate(t.target,-7,"D"),r=t.ctrlKey||t.metaKey;break;case 39:(t.ctrlKey||t.metaKey)&&e.datepicker._adjustDate(t.target,a?-1:1,"D"),r=t.ctrlKey||t.metaKey,t.originalEvent.altKey&&e.datepicker._adjustDate(t.target,t.ctrlKey?+e.datepicker._get(o,"stepBigMonths"):+e.datepicker._get(o,"stepMonths"),"M");break;case 40:(t.ctrlKey||t.metaKey)&&e.datepicker._adjustDate(t.target,7,"D"),r=t.ctrlKey||t.metaKey;break;default:r=!1}else 36===t.keyCode&&t.ctrlKey?e.datepicker._showDatepicker(this):r=!1;r&&(t.preventDefault(),t.stopPropagation())},_doKeyPress:function(t){var n,i,s=e.datepicker._getInst(t.target);return e.datepicker._get(s,"constrainInput")?(n=e.datepicker._possibleChars(e.datepicker._get(s,"dateFormat")),i=String.fromCharCode(null==t.charCode?t.keyCode:t.charCode),t.ctrlKey||t.metaKey||" ">i||!n||n.indexOf(i)>-1):void 0},_doKeyUp:function(t){var n,i=e.datepicker._getInst(t.target);if(i.input.val()!==i.lastVal)try{n=e.datepicker.parseDate(e.datepicker._get(i,"dateFormat"),i.input?i.input.val():null,e.datepicker._getFormatConfig(i)),n&&(e.datepicker._setDateFromField(i),e.datepicker._updateAlternate(i),e.datepicker._updateDatepicker(i))}catch(s){}return!0},_showDatepicker:function(t){if(t=t.target||t,"input"!==t.nodeName.toLowerCase()&&(t=e("input",t.parentNode)[0]),!e.datepicker._isDisabledDatepicker(t)&&e.datepicker._lastInput!==t){var n,s,o,r,l,c,h;n=e.datepicker._getInst(t),e.datepicker._curInst&&e.datepicker._curInst!==n&&(e.datepicker._curInst.dpDiv.stop(!0,!0),n&&e.datepicker._datepickerShowing&&e.datepicker._hideDatepicker(e.datepicker._curInst.input[0])),s=e.datepicker._get(n,"beforeShow"),o=s?s.apply(t,[t,n]):{},o!==!1&&(a(n.settings,o),n.lastVal=null,e.datepicker._lastInput=t,e.datepicker._setDateFromField(n),e.datepicker._inDialog&&(t.value=""),e.datepicker._pos||(e.datepicker._pos=e.datepicker._findPos(t),e.datepicker._pos[1]+=t.offsetHeight),r=!1,e(t).parents().each(function(){return r|="fixed"===e(this).css("position"),!r}),l={left:e.datepicker._pos[0],top:e.datepicker._pos[1]},e.datepicker._pos=null,n.dpDiv.empty(),n.dpDiv.css({position:"absolute",display:"block",top:"-1000px"}),e.datepicker._updateDatepicker(n),l=e.datepicker._checkOffset(n,l,r),n.dpDiv.css({position:e.datepicker._inDialog&&e.blockUI?"static":r?"fixed":"absolute",display:"none",left:l.left+"px",top:l.top+"px"}),n.inline||(c=e.datepicker._get(n,"showAnim"),h=e.datepicker._get(n,"duration"),n.dpDiv.css("z-index",i(e(t))+1),e.datepicker._datepickerShowing=!0,e.effects&&e.effects.effect[c]?n.dpDiv.show(c,e.datepicker._get(n,"showOptions"),h):n.dpDiv[c||"show"](c?h:null),e.datepicker._shouldFocusInput(n)&&n.input.focus(),e.datepicker._curInst=n))}},_updateDatepicker:function(t){this.maxRows=4,v=t,t.dpDiv.empty().append(this._generateHTML(t)),this._attachHandlers(t);var n,i=this._getNumberOfMonths(t),s=i[1],o=17,a=t.dpDiv.find("."+this._dayOverClass+" a");a.length>0&&r.apply(a.get(0)),t.dpDiv.removeClass("ui-datepicker-multi-2 ui-datepicker-multi-3 ui-datepicker-multi-4").width(""),s>1&&t.dpDiv.addClass("ui-datepicker-multi-"+s).css("width",o*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===e.datepicker._curInst&&e.datepicker._datepickerShowing&&e.datepicker._shouldFocusInput(t)&&t.input.focus(),t.yearshtml&&(n=t.yearshtml,setTimeout(function(){n===t.yearshtml&&t.yearshtml&&t.dpDiv.find("select.ui-datepicker-year:first").replaceWith(t.yearshtml),n=t.yearshtml=null},0))},_shouldFocusInput:function(e){return e.input&&e.input.is(":visible")&&!e.input.is(":disabled")&&!e.input.is(":focus")},_checkOffset:function(t,n,i){var s=t.dpDiv.outerWidth(),o=t.dpDiv.outerHeight(),r=t.input?t.input.outerWidth():0,a=t.input?t.input.outerHeight():0,l=document.documentElement.clientWidth+(i?0:e(document).scrollLeft()),c=document.documentElement.clientHeight+(i?0:e(document).scrollTop());return n.left-=this._get(t,"isRTL")?s-r:0,n.left-=i&&n.left===t.input.offset().left?e(document).scrollLeft():0,n.top-=i&&n.top===t.input.offset().top+a?e(document).scrollTop():0,n.left-=Math.min(n.left,n.left+s>l&&l>s?Math.abs(n.left+s-l):0),n.top-=Math.min(n.top,n.top+o>c&&c>o?Math.abs(o+a):0),n},_findPos:function(t){for(var n,i=this._getInst(t),s=this._get(i,"isRTL");t&&("hidden"===t.type||1!==t.nodeType||e.expr.filters.hidden(t));)t=t[s?"previousSibling":"nextSibling"];return n=e(t).offset(),[n.left,n.top]},_hideDatepicker:function(t){var n,i,s,o,r=this._curInst;!r||t&&r!==e.data(t,"datepicker")||this._datepickerShowing&&(n=this._get(r,"showAnim"),i=this._get(r,"duration"),s=function(){e.datepicker._tidyDialog(r)},e.effects&&(e.effects.effect[n]||e.effects[n])?r.dpDiv.hide(n,e.datepicker._get(r,"showOptions"),i,s):r.dpDiv["slideDown"===n?"slideUp":"fadeIn"===n?"fadeOut":"hide"](n?i:null,s),n||s(),this._datepickerShowing=!1,o=this._get(r,"onClose"),o&&o.apply(r.input?r.input[0]:null,[r.input?r.input.val():"",r]),this._lastInput=null,this._inDialog&&(this._dialogInput.css({position:"absolute",left:"0",top:"-100px"}),e.blockUI&&(e.unblockUI(),e("body").append(this.dpDiv))),this._inDialog=!1)},_tidyDialog:function(e){e.dpDiv.removeClass(this._dialogClass).unbind(".ui-datepicker-calendar")},_checkExternalClick:function(t){if(e.datepicker._curInst){var n=e(t.target),i=e.datepicker._getInst(n[0]);(n[0].id!==e.datepicker._mainDivId&&0===n.parents("#"+e.datepicker._mainDivId).length&&!n.hasClass(e.datepicker.markerClassName)&&!n.closest("."+e.datepicker._triggerClass).length&&e.datepicker._datepickerShowing&&(!e.datepicker._inDialog||!e.blockUI)||n.hasClass(e.datepicker.markerClassName)&&e.datepicker._curInst!==i)&&e.datepicker._hideDatepicker()}},_adjustDate:function(t,n,i){var s=e(t),o=this._getInst(s[0]);this._isDisabledDatepicker(s[0])||(this._adjustInstDate(o,n+("M"===i?this._get(o,"showCurrentAtPos"):0),i),this._updateDatepicker(o))},_gotoToday:function(t){var n,i=e(t),s=this._getInst(i[0]);this._get(s,"gotoCurrent")&&s.currentDay?(s.selectedDay=s.currentDay,s.drawMonth=s.selectedMonth=s.currentMonth,s.drawYear=s.selectedYear=s.currentYear):(n=new Date,s.selectedDay=n.getDate(),s.drawMonth=s.selectedMonth=n.getMonth(),s.drawYear=s.selectedYear=n.getFullYear()),this._notifyChange(s),this._adjustDate(i)},_selectMonthYear:function(t,n,i){var s=e(t),o=this._getInst(s[0]);o["selected"+("M"===i?"Month":"Year")]=o["draw"+("M"===i?"Month":"Year")]=parseInt(n.options[n.selectedIndex].value,10),this._notifyChange(o),this._adjustDate(s)},_selectDay:function(t,n,i,s){var o,r=e(t);e(s).hasClass(this._unselectableClass)||this._isDisabledDatepicker(r[0])||(o=this._getInst(r[0]),o.selectedDay=o.currentDay=e("a",s).html(),o.selectedMonth=o.currentMonth=n,o.selectedYear=o.currentYear=i,this._selectDate(t,this._formatDate(o,o.currentDay,o.currentMonth,o.currentYear)))},_clearDate:function(t){var n=e(t);this._selectDate(n,"")},_selectDate:function(t,n){var i,s=e(t),o=this._getInst(s[0]);n=null!=n?n:this._formatDate(o),o.input&&o.input.val(n),this._updateAlternate(o),i=this._get(o,"onSelect"),i?i.apply(o.input?o.input[0]:null,[n,o]):o.input&&o.input.trigger("change"),o.inline?this._updateDatepicker(o):(this._hideDatepicker(),this._lastInput=o.input[0],"object"!=typeof o.input[0]&&o.input.focus(),this._lastInput=null)},_updateAlternate:function(t){var n,i,s,o=this._get(t,"altField");o&&(n=this._get(t,"altFormat")||this._get(t,"dateFormat"),i=this._getDate(t),s=this.formatDate(n,i,this._getFormatConfig(t)),e(o).each(function(){e(this).val(s)}))},noWeekends:function(e){var t=e.getDay();return[t>0&&6>t,""]},iso8601Week:function(e){var t,n=new Date(e.getTime());return n.setDate(n.getDate()+4-(n.getDay()||7)),t=n.getTime(),n.setMonth(0),n.setDate(1),Math.floor(Math.round((t-n)/864e5)/7)+1},parseDate:function(t,n,i){if(null==t||null==n)throw"Invalid arguments";if(n="object"==typeof n?""+n:n+"",""===n)return null;var s,o,r,a,l=0,c=(i?i.shortYearCutoff:null)||this._defaults.shortYearCutoff,h="string"!=typeof c?c:(new Date).getFullYear()%100+parseInt(c,10),u=(i?i.dayNamesShort:null)||this._defaults.dayNamesShort,d=(i?i.dayNames:null)||this._defaults.dayNames,f=(i?i.monthNamesShort:null)||this._defaults.monthNamesShort,p=(i?i.monthNames:null)||this._defaults.monthNames,m=-1,g=-1,v=-1,y=-1,b=!1,w=function(e){var n=t.length>s+1&&t.charAt(s+1)===e;return n&&s++,n},_=function(e){var t=w(e),i="@"===e?14:"!"===e?20:"y"===e&&t?4:"o"===e?3:2,s="y"===e?i:1,o=RegExp("^\\d{"+s+","+i+"}"),r=n.substring(l).match(o);if(!r)throw"Missing number at position "+l;return l+=r[0].length,parseInt(r[0],10)},C=function(t,i,s){var o=-1,r=e.map(w(t)?s:i,function(e,t){return[[t,e]]}).sort(function(e,t){return-(e[1].length-t[1].length)});if(e.each(r,function(e,t){var i=t[1];return n.substr(l,i.length).toLowerCase()===i.toLowerCase()?(o=t[0],l+=i.length,!1):void 0}),-1!==o)return o+1;throw"Unknown name at position "+l},x=function(){if(n.charAt(l)!==t.charAt(s))throw"Unexpected literal at position "+l;l++};for(s=0;t.length>s;s++)if(b)"'"!==t.charAt(s)||w("'")?x():b=!1;else switch(t.charAt(s)){case"d":v=_("d");break;case"D":C("D",u,d);break;case"o":y=_("o");break;case"m":g=_("m");break;case"M":g=C("M",f,p);break;case"y":m=_("y");break;case"@":a=new Date(_("@")),m=a.getFullYear(),g=a.getMonth()+1,v=a.getDate();break;case"!":a=new Date((_("!")-this._ticksTo1970)/1e4),m=a.getFullYear(),g=a.getMonth()+1,v=a.getDate();break;case"'":w("'")?x():b=!0;break;default:x()}if(n.length>l&&(r=n.substr(l),!/^\s+/.test(r)))throw"Extra/unparsed characters found in date: "+r;if(-1===m?m=(new Date).getFullYear():100>m&&(m+=(new Date).getFullYear()-(new Date).getFullYear()%100+(h>=m?0:-100)),y>-1)for(g=1,v=y;o=this._getDaysInMonth(m,g-1),!(o>=v);)g++,v-=o;if(a=this._daylightSavingAdjust(new Date(m,g-1,v)),a.getFullYear()!==m||a.getMonth()+1!==g||a.getDate()!==v)throw"Invalid date";return a},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:864e9*(718685+Math.floor(492.5)-Math.floor(19.7)+Math.floor(4.925)),formatDate:function(e,t,n){if(!t)return"";var i,s=(n?n.dayNamesShort:null)||this._defaults.dayNamesShort,o=(n?n.dayNames:null)||this._defaults.dayNames,r=(n?n.monthNamesShort:null)||this._defaults.monthNamesShort,a=(n?n.monthNames:null)||this._defaults.monthNames,l=function(t){var n=e.length>i+1&&e.charAt(i+1)===t;return n&&i++,n},c=function(e,t,n){var i=""+t;if(l(e))for(;n>i.length;)i="0"+i;return i},h=function(e,t,n,i){return l(e)?i[t]:n[t]},u="",d=!1;if(t)for(i=0;e.length>i;i++)if(d)"'"!==e.charAt(i)||l("'")?u+=e.charAt(i):d=!1;else switch(e.charAt(i)){case"d":u+=c("d",t.getDate(),2);break;case"D":u+=h("D",t.getDay(),s,o);break;case"o":u+=c("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+=c("m",t.getMonth()+1,2);break;case"M":u+=h("M",t.getMonth(),r,a);break;case"y":u+=l("y")?t.getFullYear():(10>t.getYear()%100?"0":"")+t.getYear()%100;break;case"@":u+=t.getTime();break;case"!":u+=1e4*t.getTime()+this._ticksTo1970;break;case"'":l("'")?u+="'":d=!0;break;default:u+=e.charAt(i)}return u},_possibleChars:function(e){var t,n="",i=!1,s=function(n){var i=e.length>t+1&&e.charAt(t+1)===n;return i&&t++,i};for(t=0;e.length>t;t++)if(i)"'"!==e.charAt(t)||s("'")?n+=e.charAt(t):i=!1;else switch(e.charAt(t)){case"d":case"m":case"y":case"@":n+="0123456789";break;case"D":case"M":return null;case"'":s("'")?n+="'":i=!0;break;default:n+=e.charAt(t)}return n},_get:function(e,t){return void 0!==e.settings[t]?e.settings[t]:this._defaults[t]},_setDateFromField:function(e,t){if(e.input.val()!==e.lastVal){var n=this._get(e,"dateFormat"),i=e.lastVal=e.input?e.input.val():null,s=this._getDefaultDate(e),o=s,r=this._getFormatConfig(e);try{o=this.parseDate(n,i,r)||s}catch(a){i=t?"":i}e.selectedDay=o.getDate(),e.drawMonth=e.selectedMonth=o.getMonth(),e.drawYear=e.selectedYear=o.getFullYear(),e.currentDay=i?o.getDate():0,e.currentMonth=i?o.getMonth():0,e.currentYear=i?o.getFullYear():0,this._adjustInstDate(e)}},_getDefaultDate:function(e){return this._restrictMinMax(e,this._determineDate(e,this._get(e,"defaultDate"),new Date))},_determineDate:function(t,n,i){var s=function(e){var t=new Date;return t.setDate(t.getDate()+e),t},o=function(n){try{return e.datepicker.parseDate(e.datepicker._get(t,"dateFormat"),n,e.datepicker._getFormatConfig(t))}catch(i){}for(var s=(n.toLowerCase().match(/^c/)?e.datepicker._getDate(t):null)||new Date,o=s.getFullYear(),r=s.getMonth(),a=s.getDate(),l=/([+\-]?[0-9]+)\s*(d|D|w|W|m|M|y|Y)?/g,c=l.exec(n);c;){switch(c[2]||"d"){case"d":case"D":a+=parseInt(c[1],10);break;case"w":case"W":a+=7*parseInt(c[1],10);break;case"m":case"M":r+=parseInt(c[1],10),a=Math.min(a,e.datepicker._getDaysInMonth(o,r));break;case"y":case"Y":o+=parseInt(c[1],10),a=Math.min(a,e.datepicker._getDaysInMonth(o,r))}c=l.exec(n)}return new Date(o,r,a)},r=null==n||""===n?i:"string"==typeof n?o(n):"number"==typeof n?isNaN(n)?i:s(n):new Date(n.getTime());return r=r&&"Invalid Date"==""+r?i:r,r&&(r.setHours(0),r.setMinutes(0),r.setSeconds(0),r.setMilliseconds(0)),this._daylightSavingAdjust(r)},_daylightSavingAdjust:function(e){return e?(e.setHours(e.getHours()>12?e.getHours()+2:0),e):null},_setDate:function(e,t,n){var i=!t,s=e.selectedMonth,o=e.selectedYear,r=this._restrictMinMax(e,this._determineDate(e,t,new Date));e.selectedDay=e.currentDay=r.getDate(),e.drawMonth=e.selectedMonth=e.currentMonth=r.getMonth(),e.drawYear=e.selectedYear=e.currentYear=r.getFullYear(),s===e.selectedMonth&&o===e.selectedYear||n||this._notifyChange(e),this._adjustInstDate(e),e.input&&e.input.val(i?"":this._formatDate(e))},_getDate:function(e){var t=!e.currentYear||e.input&&""===e.input.val()?null:this._daylightSavingAdjust(new Date(e.currentYear,e.currentMonth,e.currentDay));return t},_attachHandlers:function(t){var n=this._get(t,"stepMonths"),i="#"+t.id.replace(/\\\\/g,"\\");t.dpDiv.find("[data-handler]").map(function(){var t={prev:function(){e.datepicker._adjustDate(i,-n,"M")},next:function(){e.datepicker._adjustDate(i,+n,"M")},hide:function(){e.datepicker._hideDatepicker()},today:function(){e.datepicker._gotoToday(i)},selectDay:function(){return e.datepicker._selectDay(i,+this.getAttribute("data-month"),+this.getAttribute("data-year"),this),!1},selectMonth:function(){return e.datepicker._selectMonthYear(i,this,"M"),!1},selectYear:function(){return e.datepicker._selectMonthYear(i,this,"Y"),!1}};e(this).bind(this.getAttribute("data-event"),t[this.getAttribute("data-handler")])})},_generateHTML:function(e){var t,n,i,s,o,r,a,l,c,h,u,d,f,p,m,g,v,y,b,w,_,C,x,T,S,D,E,k,N,A,I,R,P,O,M,L,H,F,z,W=new Date,B=this._daylightSavingAdjust(new Date(W.getFullYear(),W.getMonth(),W.getDate())),j=this._get(e,"isRTL"),$=this._get(e,"showButtonPanel"),q=this._get(e,"hideIfNoPrevNext"),U=this._get(e,"navigationAsDateFormat"),V=this._getNumberOfMonths(e),Y=this._get(e,"showCurrentAtPos"),X=this._get(e,"stepMonths"),K=1!==V[0]||1!==V[1],G=this._daylightSavingAdjust(e.currentDay?new Date(e.currentYear,e.currentMonth,e.currentDay):new Date(9999,9,9)),Q=this._getMinMaxDate(e,"min"),J=this._getMinMaxDate(e,"max"),Z=e.drawMonth-Y,ee=e.drawYear;if(0>Z&&(Z+=12,ee--),J)for(t=this._daylightSavingAdjust(new Date(J.getFullYear(),J.getMonth()-V[0]*V[1]+1,J.getDate())),t=Q&&Q>t?Q:t;this._daylightSavingAdjust(new Date(ee,Z,1))>t;)Z--,0>Z&&(Z=11,ee--);for(e.drawMonth=Z,e.drawYear=ee,n=this._get(e,"prevText"),n=U?this.formatDate(n,this._daylightSavingAdjust(new Date(ee,Z-X,1)),this._getFormatConfig(e)):n,i=this._canAdjustMonth(e,-1,ee,Z)?"<a class='ui-datepicker-prev ui-corner-all' data-handler='prev' data-event='click' title='"+n+"'><span class='ui-icon ui-icon-circle-triangle-"+(j?"e":"w")+"'>"+n+"</span></a>":q?"":"<a class='ui-datepicker-prev ui-corner-all ui-state-disabled' title='"+n+"'><span class='ui-icon ui-icon-circle-triangle-"+(j?"e":"w")+"'>"+n+"</span></a>",s=this._get(e,"nextText"),s=U?this.formatDate(s,this._daylightSavingAdjust(new Date(ee,Z+X,1)),this._getFormatConfig(e)):s,o=this._canAdjustMonth(e,1,ee,Z)?"<a class='ui-datepicker-next ui-corner-all' data-handler='next' data-event='click' title='"+s+"'><span class='ui-icon ui-icon-circle-triangle-"+(j?"w":"e")+"'>"+s+"</span></a>":q?"":"<a class='ui-datepicker-next ui-corner-all ui-state-disabled' title='"+s+"'><span class='ui-icon ui-icon-circle-triangle-"+(j?"w":"e")+"'>"+s+"</span></a>",r=this._get(e,"currentText"),a=this._get(e,"gotoCurrent")&&e.currentDay?G:B,r=U?this.formatDate(r,a,this._getFormatConfig(e)):r,l=e.inline?"":"<button type='button' class='ui-datepicker-close ui-state-default ui-priority-primary ui-corner-all' data-handler='hide' data-event='click'>"+this._get(e,"closeText")+"</button>",c=$?"<div class='ui-datepicker-buttonpane ui-widget-content'>"+(j?l:"")+(this._isInRange(e,a)?"<button type='button' class='ui-datepicker-current ui-state-default ui-priority-secondary ui-corner-all' data-handler='today' data-event='click'>"+r+"</button>":"")+(j?"":l)+"</div>":"",h=parseInt(this._get(e,"firstDay"),10),h=isNaN(h)?0:h,u=this._get(e,"showWeek"),d=this._get(e,"dayNames"),f=this._get(e,"dayNamesMin"),p=this._get(e,"monthNames"),m=this._get(e,"monthNamesShort"),g=this._get(e,"beforeShowDay"),v=this._get(e,"showOtherMonths"),y=this._get(e,"selectOtherMonths"),b=this._getDefaultDate(e),w="",C=0;V[0]>C;C++){for(x="",this.maxRows=4,T=0;V[1]>T;T++){if(S=this._daylightSavingAdjust(new Date(ee,Z,e.selectedDay)),D=" ui-corner-all",E="",K){if(E+="<div class='ui-datepicker-group",V[1]>1)switch(T){case 0:E+=" ui-datepicker-group-first",D=" ui-corner-"+(j?"right":"left");break;case V[1]-1:E+=" ui-datepicker-group-last",D=" ui-corner-"+(j?"left":"right");break;default:E+=" ui-datepicker-group-middle",D=""}E+="'>"}for(E+="<div class='ui-datepicker-header ui-widget-header ui-helper-clearfix"+D+"'>"+(/all|left/.test(D)&&0===C?j?o:i:"")+(/all|right/.test(D)&&0===C?j?i:o:"")+this._generateMonthYearHeader(e,Z,ee,Q,J,C>0||T>0,p,m)+"</div><table class='ui-datepicker-calendar'><thead><tr>",k=u?"<th class='ui-datepicker-week-col'>"+this._get(e,"weekHeader")+"</th>":"",_=0;7>_;_++)N=(_+h)%7,k+="<th scope='col'"+((_+h+6)%7>=5?" class='ui-datepicker-week-end'":"")+"><span title='"+d[N]+"'>"+f[N]+"</span></th>";for(E+=k+"</tr></thead><tbody>",A=this._getDaysInMonth(ee,Z),ee===e.selectedYear&&Z===e.selectedMonth&&(e.selectedDay=Math.min(e.selectedDay,A)),I=(this._getFirstDayOfMonth(ee,Z)-h+7)%7,R=Math.ceil((I+A)/7),P=K&&this.maxRows>R?this.maxRows:R,this.maxRows=P,O=this._daylightSavingAdjust(new Date(ee,Z,1-I)),M=0;P>M;M++){for(E+="<tr>",L=u?"<td class='ui-datepicker-week-col'>"+this._get(e,"calculateWeek")(O)+"</td>":"",_=0;7>_;_++)H=g?g.apply(e.input?e.input[0]:null,[O]):[!0,""],F=O.getMonth()!==Z,z=F&&!y||!H[0]||Q&&Q>O||J&&O>J,L+="<td class='"+((_+h+6)%7>=5?" ui-datepicker-week-end":"")+(F?" ui-datepicker-other-month":"")+(O.getTime()===S.getTime()&&Z===e.selectedMonth&&e._keyEvent||b.getTime()===O.getTime()&&b.getTime()===S.getTime()?" "+this._dayOverClass:"")+(z?" "+this._unselectableClass+" ui-state-disabled":"")+(F&&!v?"":" "+H[1]+(O.getTime()===G.getTime()?" "+this._currentClass:"")+(O.getTime()===B.getTime()?" ui-datepicker-today":""))+"'"+(F&&!v||!H[2]?"":" title='"+H[2].replace(/'/g,"&#39;")+"'")+(z?"":" data-handler='selectDay' data-event='click' data-month='"+O.getMonth()+"' data-year='"+O.getFullYear()+"'")+">"+(F&&!v?"&#xa0;":z?"<span class='ui-state-default'>"+O.getDate()+"</span>":"<a class='ui-state-default"+(O.getTime()===B.getTime()?" ui-state-highlight":"")+(O.getTime()===G.getTime()?" ui-state-active":"")+(F?" ui-priority-secondary":"")+"' href='#'>"+O.getDate()+"</a>")+"</td>",O.setDate(O.getDate()+1),O=this._daylightSavingAdjust(O);E+=L+"</tr>"}Z++,Z>11&&(Z=0,ee++),E+="</tbody></table>"+(K?"</div>"+(V[0]>0&&T===V[1]-1?"<div class='ui-datepicker-row-break'></div>":""):""),x+=E}w+=x}return w+=c,e._keyEvent=!1,w},_generateMonthYearHeader:function(e,t,n,i,s,o,r,a){var l,c,h,u,d,f,p,m,g=this._get(e,"changeMonth"),v=this._get(e,"changeYear"),y=this._get(e,"showMonthAfterYear"),b="<div class='ui-datepicker-title'>",w="";
if(o||!g)w+="<span class='ui-datepicker-month'>"+r[t]+"</span>";else{for(l=i&&i.getFullYear()===n,c=s&&s.getFullYear()===n,w+="<select class='ui-datepicker-month' data-handler='selectMonth' data-event='change'>",h=0;12>h;h++)(!l||h>=i.getMonth())&&(!c||s.getMonth()>=h)&&(w+="<option value='"+h+"'"+(h===t?" selected='selected'":"")+">"+a[h]+"</option>");w+="</select>"}if(y||(b+=w+(!o&&g&&v?"":"&#xa0;")),!e.yearshtml)if(e.yearshtml="",o||!v)b+="<span class='ui-datepicker-year'>"+n+"</span>";else{for(u=this._get(e,"yearRange").split(":"),d=(new Date).getFullYear(),f=function(e){var t=e.match(/c[+\-].*/)?n+parseInt(e.substring(1),10):e.match(/[+\-].*/)?d+parseInt(e,10):parseInt(e,10);return isNaN(t)?d:t},p=f(u[0]),m=Math.max(p,f(u[1]||"")),p=i?Math.max(p,i.getFullYear()):p,m=s?Math.min(m,s.getFullYear()):m,e.yearshtml+="<select class='ui-datepicker-year' data-handler='selectYear' data-event='change'>";m>=p;p++)e.yearshtml+="<option value='"+p+"'"+(p===n?" selected='selected'":"")+">"+p+"</option>";e.yearshtml+="</select>",b+=e.yearshtml,e.yearshtml=null}return b+=this._get(e,"yearSuffix"),y&&(b+=(!o&&g&&v?"":"&#xa0;")+w),b+="</div>"},_adjustInstDate:function(e,t,n){var i=e.drawYear+("Y"===n?t:0),s=e.drawMonth+("M"===n?t:0),o=Math.min(e.selectedDay,this._getDaysInMonth(i,s))+("D"===n?t:0),r=this._restrictMinMax(e,this._daylightSavingAdjust(new Date(i,s,o)));e.selectedDay=r.getDate(),e.drawMonth=e.selectedMonth=r.getMonth(),e.drawYear=e.selectedYear=r.getFullYear(),("M"===n||"Y"===n)&&this._notifyChange(e)},_restrictMinMax:function(e,t){var n=this._getMinMaxDate(e,"min"),i=this._getMinMaxDate(e,"max"),s=n&&n>t?n:t;return i&&s>i?i:s},_notifyChange:function(e){var t=this._get(e,"onChangeMonthYear");t&&t.apply(e.input?e.input[0]:null,[e.selectedYear,e.selectedMonth+1,e])},_getNumberOfMonths:function(e){var t=this._get(e,"numberOfMonths");return null==t?[1,1]:"number"==typeof t?[1,t]:t},_getMinMaxDate:function(e,t){return this._determineDate(e,this._get(e,t+"Date"),null)},_getDaysInMonth:function(e,t){return 32-this._daylightSavingAdjust(new Date(e,t,32)).getDate()},_getFirstDayOfMonth:function(e,t){return new Date(e,t,1).getDay()},_canAdjustMonth:function(e,t,n,i){var s=this._getNumberOfMonths(e),o=this._daylightSavingAdjust(new Date(n,i+(0>t?t:s[0]*s[1]),1));return 0>t&&o.setDate(this._getDaysInMonth(o.getFullYear(),o.getMonth())),this._isInRange(e,o)},_isInRange:function(e,t){var n,i,s=this._getMinMaxDate(e,"min"),o=this._getMinMaxDate(e,"max"),r=null,a=null,l=this._get(e,"yearRange");return l&&(n=l.split(":"),i=(new Date).getFullYear(),r=parseInt(n[0],10),a=parseInt(n[1],10),n[0].match(/[+\-].*/)&&(r+=i),n[1].match(/[+\-].*/)&&(a+=i)),(!s||t.getTime()>=s.getTime())&&(!o||t.getTime()<=o.getTime())&&(!r||t.getFullYear()>=r)&&(!a||a>=t.getFullYear())},_getFormatConfig:function(e){var t=this._get(e,"shortYearCutoff");return t="string"!=typeof t?t:(new Date).getFullYear()%100+parseInt(t,10),{shortYearCutoff:t,dayNamesShort:this._get(e,"dayNamesShort"),dayNames:this._get(e,"dayNames"),monthNamesShort:this._get(e,"monthNamesShort"),monthNames:this._get(e,"monthNames")}},_formatDate:function(e,t,n,i){t||(e.currentDay=e.selectedDay,e.currentMonth=e.selectedMonth,e.currentYear=e.selectedYear);var s=t?"object"==typeof t?t:this._daylightSavingAdjust(new Date(i,n,t)):this._daylightSavingAdjust(new Date(e.currentYear,e.currentMonth,e.currentDay));return this.formatDate(this._get(e,"dateFormat"),s,this._getFormatConfig(e))}}),e.fn.datepicker=function(t){if(!this.length)return this;e.datepicker.initialized||(e(document).mousedown(e.datepicker._checkExternalClick),e.datepicker.initialized=!0),0===e("#"+e.datepicker._mainDivId).length&&e("body").append(e.datepicker.dpDiv);var n=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]?e.datepicker["_"+t+"Datepicker"].apply(e.datepicker,[this[0]].concat(n)):this.each(function(){"string"==typeof t?e.datepicker["_"+t+"Datepicker"].apply(e.datepicker,[this].concat(n)):e.datepicker._attachDatepicker(this,t)}):e.datepicker["_"+t+"Datepicker"].apply(e.datepicker,[this[0]].concat(n))},e.datepicker=new s,e.datepicker.initialized=!1,e.datepicker.uuid=(new Date).getTime(),e.datepicker.version="1.11.4",e.datepicker,e.widget("ui.dialog",{version:"1.11.4",options:{appendTo:"body",autoOpen:!0,buttons:[],closeOnEscape:!0,closeText:"Close",dialogClass:"",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 n=e(this).css(t).offset().top;0>n&&e(this).css("top",t.top-n)}},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"),this.options.title=this.options.title||this.originalTitle,this._createWrapper(),this.element.show().removeAttr("title").addClass("ui-dialog-content ui-widget-content").appendTo(this.uiDialog),this._createTitlebar(),this._createButtonPane(),this.options.draggable&&e.fn.draggable&&this._makeDraggable(),this.options.resizable&&e.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)?e(t):this.document.find(t||"body").eq(0)},_destroy:function(){var e,t=this.originalPosition;this._untrackInstance(),this._destroyOverlay(),this.element.removeUniqueId().removeClass("ui-dialog-content ui-widget-content").css(this.originalCss).detach(),this.uiDialog.stop(!0,!0).remove(),this.originalTitle&&this.element.attr("title",this.originalTitle),e=t.parent.children().eq(t.index),e.length&&e[0]!==this.element[0]?e.before(this.element):t.parent.append(this.element)},widget:function(){return this.uiDialog},disable:e.noop,enable:e.noop,close:function(t){var n,i=this;if(this._isOpen&&this._trigger("beforeClose",t)!==!1){if(this._isOpen=!1,this._focusedElement=null,this._destroyOverlay(),this._untrackInstance(),!this.opener.filter(":focusable").focus().length)try{n=this.document[0].activeElement,n&&"body"!==n.nodeName.toLowerCase()&&e(n).blur()}catch(s){}this._hide(this.uiDialog,this.options.hide,function(){i._trigger("close",t)})}},isOpen:function(){return this._isOpen},moveToTop:function(){this._moveToTop()},_moveToTop:function(t,n){var i=!1,s=this.uiDialog.siblings(".ui-front:visible").map(function(){return+e(this).css("z-index")}).get(),o=Math.max.apply(null,s);return o>=+this.uiDialog.css("z-index")&&(this.uiDialog.css("z-index",o+1),i=!0),i&&!n&&this._trigger("focus",t),i},open:function(){var t=this;return this._isOpen?void(this._moveToTop()&&this._focusTabbable()):(this._isOpen=!0,this.opener=e(this.document[0].activeElement),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(),void this._trigger("open"))},_focusTabbable:function(){var e=this._focusedElement;e||(e=this.element.find("[autofocus]")),e.length||(e=this.element.find(":tabbable")),e.length||(e=this.uiDialogButtonPane.find(":tabbable")),e.length||(e=this.uiDialogTitlebarClose.filter(":tabbable")),e.length||(e=this.uiDialog),e.eq(0).focus()},_keepFocus:function(t){function n(){var t=this.document[0].activeElement,n=this.uiDialog[0]===t||e.contains(this.uiDialog[0],t);n||this._focusTabbable()}t.preventDefault(),n.call(this),this._delay(n)},_createWrapper:function(){this.uiDialog=e("<div>").addClass("ui-dialog ui-widget ui-widget-content ui-corner-all ui-front "+this.options.dialogClass).hide().attr({tabIndex:-1,role:"dialog"}).appendTo(this._appendTo()),this._on(this.uiDialog,{keydown:function(t){if(this.options.closeOnEscape&&!t.isDefaultPrevented()&&t.keyCode&&t.keyCode===e.ui.keyCode.ESCAPE)return t.preventDefault(),void this.close(t);if(t.keyCode===e.ui.keyCode.TAB&&!t.isDefaultPrevented()){var n=this.uiDialog.find(":tabbable"),i=n.filter(":first"),s=n.filter(":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.focus()}),t.preventDefault()):(this._delay(function(){i.focus()}),t.preventDefault())}},mousedown:function(e){this._moveToTop(e)&&this._focusTabbable()}}),this.element.find("[aria-describedby]").length||this.uiDialog.attr({"aria-describedby":this.element.uniqueId().attr("id")})},_createTitlebar:function(){var t;this.uiDialogTitlebar=e("<div>").addClass("ui-dialog-titlebar ui-widget-header ui-corner-all ui-helper-clearfix").prependTo(this.uiDialog),this._on(this.uiDialogTitlebar,{mousedown:function(t){e(t.target).closest(".ui-dialog-titlebar-close")||this.uiDialog.focus()}}),this.uiDialogTitlebarClose=e("<button type='button'></button>").button({label:this.options.closeText,icons:{primary:"ui-icon-closethick"},text:!1}).addClass("ui-dialog-titlebar-close").appendTo(this.uiDialogTitlebar),this._on(this.uiDialogTitlebarClose,{click:function(e){e.preventDefault(),this.close(e)}}),t=e("<span>").uniqueId().addClass("ui-dialog-title").prependTo(this.uiDialogTitlebar),this._title(t),this.uiDialog.attr({"aria-labelledby":t.attr("id")})},_title:function(e){this.options.title||e.html("&#160;"),e.text(this.options.title)},_createButtonPane:function(){this.uiDialogButtonPane=e("<div>").addClass("ui-dialog-buttonpane ui-widget-content ui-helper-clearfix"),this.uiButtonSet=e("<div>").addClass("ui-dialog-buttonset").appendTo(this.uiDialogButtonPane),this._createButtons()},_createButtons:function(){var t=this,n=this.options.buttons;return this.uiDialogButtonPane.remove(),this.uiButtonSet.empty(),e.isEmptyObject(n)||e.isArray(n)&&!n.length?void this.uiDialog.removeClass("ui-dialog-buttons"):(e.each(n,function(n,i){var s,o;i=e.isFunction(i)?{click:i,text:n}:i,i=e.extend({type:"button"},i),s=i.click,i.click=function(){s.apply(t.element[0],arguments)},o={icons:i.icons,text:i.showText},delete i.icons,delete i.showText,e("<button></button>",i).button(o).appendTo(t.uiButtonSet)}),this.uiDialog.addClass("ui-dialog-buttons"),void this.uiDialogButtonPane.appendTo(this.uiDialog))},_makeDraggable:function(){function t(e){return{position:e.position,offset:e.offset}}var n=this,i=this.options;this.uiDialog.draggable({cancel:".ui-dialog-content, .ui-dialog-titlebar-close",handle:".ui-dialog-titlebar",containment:"document",start:function(i,s){e(this).addClass("ui-dialog-dragging"),n._blockFrames(),n._trigger("dragStart",i,t(s))},drag:function(e,i){n._trigger("drag",e,t(i))},stop:function(s,o){var r=o.offset.left-n.document.scrollLeft(),a=o.offset.top-n.document.scrollTop();i.position={my:"left top",at:"left"+(r>=0?"+":"")+r+" top"+(a>=0?"+":"")+a,of:n.window},e(this).removeClass("ui-dialog-dragging"),n._unblockFrames(),n._trigger("dragStop",s,t(o))}})},_makeResizable:function(){function t(e){return{originalPosition:e.originalPosition,originalSize:e.originalSize,position:e.position,size:e.size}}var n=this,i=this.options,s=i.resizable,o=this.uiDialog.css("position"),r="string"==typeof s?s:"n,e,s,w,se,sw,ne,nw";this.uiDialog.resizable({cancel:".ui-dialog-content",containment:"document",alsoResize:this.element,maxWidth:i.maxWidth,maxHeight:i.maxHeight,minWidth:i.minWidth,minHeight:this._minHeight(),handles:r,start:function(i,s){e(this).addClass("ui-dialog-resizing"),n._blockFrames(),n._trigger("resizeStart",i,t(s))},resize:function(e,i){n._trigger("resize",e,t(i))},stop:function(s,o){var r=n.uiDialog.offset(),a=r.left-n.document.scrollLeft(),l=r.top-n.document.scrollTop();i.height=n.uiDialog.height(),i.width=n.uiDialog.width(),i.position={my:"left top",at:"left"+(a>=0?"+":"")+a+" top"+(l>=0?"+":"")+l,of:n.window},e(this).removeClass("ui-dialog-resizing"),n._unblockFrames(),n._trigger("resizeStop",s,t(o))}}).css("position",o)},_trackFocus:function(){this._on(this.widget(),{focusin:function(t){this._makeFocusTarget(),this._focusedElement=e(t.target)}})},_makeFocusTarget:function(){this._untrackInstance(),this._trackingInstances().unshift(this)},_untrackInstance:function(){var t=this._trackingInstances(),n=e.inArray(this,t);-1!==n&&t.splice(n,1)},_trackingInstances:function(){var e=this.document.data("ui-dialog-instances");return e||(e=[],this.document.data("ui-dialog-instances",e)),e},_minHeight:function(){var e=this.options;return"auto"===e.height?e.minHeight:Math.min(e.minHeight,e.height)},_position:function(){var e=this.uiDialog.is(":visible");e||this.uiDialog.show(),this.uiDialog.position(this.options.position),e||this.uiDialog.hide()},_setOptions:function(t){var n=this,i=!1,s={};e.each(t,function(e,t){n._setOption(e,t),e in n.sizeRelatedOptions&&(i=!0),e in n.resizableRelatedOptions&&(s[e]=t)}),i&&(this._size(),this._position()),this.uiDialog.is(":data(ui-resizable)")&&this.uiDialog.resizable("option",s)},_setOption:function(e,t){var n,i,s=this.uiDialog;"dialogClass"===e&&s.removeClass(this.options.dialogClass).addClass(t),"disabled"!==e&&(this._super(e,t),"appendTo"===e&&this.uiDialog.appendTo(this._appendTo()),"buttons"===e&&this._createButtons(),"closeText"===e&&this.uiDialogTitlebarClose.button({label:""+t}),"draggable"===e&&(n=s.is(":data(ui-draggable)"),n&&!t&&s.draggable("destroy"),!n&&t&&this._makeDraggable()),"position"===e&&this._position(),"resizable"===e&&(i=s.is(":data(ui-resizable)"),i&&!t&&s.resizable("destroy"),i&&"string"==typeof t&&s.resizable("option","handles",t),i||t===!1||this._makeResizable()),"title"===e&&this._title(this.uiDialogTitlebar.find(".ui-dialog-title")))},_size:function(){var e,t,n,i=this.options;this.element.show().css({width:"auto",minHeight:0,maxHeight:"none",height:0}),i.minWidth>i.width&&(i.width=i.minWidth),e=this.uiDialog.css({height:"auto",width:i.width}).outerHeight(),t=Math.max(0,i.minHeight-e),n="number"==typeof i.maxHeight?Math.max(0,i.maxHeight-e):"none","auto"===i.height?this.element.css({minHeight:t,maxHeight:n,height:"auto"}):this.element.height(Math.max(0,i.height-e)),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=e(this);return e("<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!!e(t.target).closest(".ui-dialog").length||!!e(t.target).closest(".ui-datepicker").length},_createOverlay:function(){if(this.options.modal){var t=!0;this._delay(function(){t=!1}),this.document.data("ui-dialog-overlays")||this._on(this.document,{focusin:function(e){t||this._allowInteraction(e)||(e.preventDefault(),this._trackingInstances()[0]._focusTabbable())}}),this.overlay=e("<div>").addClass("ui-widget-overlay ui-front").appendTo(this._appendTo()),this._on(this.overlay,{mousedown:"_keepFocus"}),this.document.data("ui-dialog-overlays",(this.document.data("ui-dialog-overlays")||0)+1)}},_destroyOverlay:function(){if(this.options.modal&&this.overlay){var e=this.document.data("ui-dialog-overlays")-1;e?this.document.data("ui-dialog-overlays",e):this.document.unbind("focusin").removeData("ui-dialog-overlays"),this.overlay.remove(),this.overlay=null}}}),e.widget("ui.progressbar",{version:"1.11.4",options:{max:100,value:0,change:null,complete:null},min:0,_create:function(){this.oldValue=this.options.value=this._constrainedValue(),this.element.addClass("ui-progressbar ui-widget ui-widget-content ui-corner-all").attr({role:"progressbar","aria-valuemin":this.min}),this.valueDiv=e("<div class='ui-progressbar-value ui-widget-header ui-corner-left'></div>").appendTo(this.element),this._refreshValue()},_destroy:function(){this.element.removeClass("ui-progressbar ui-widget ui-widget-content ui-corner-all").removeAttr("role").removeAttr("aria-valuemin").removeAttr("aria-valuemax").removeAttr("aria-valuenow"),this.valueDiv.remove()},value:function(e){return void 0===e?this.options.value:(this.options.value=this._constrainedValue(e),void this._refreshValue())},_constrainedValue:function(e){return void 0===e&&(e=this.options.value),this.indeterminate=e===!1,"number"!=typeof e&&(e=0),!this.indeterminate&&Math.min(this.options.max,Math.max(this.min,e))},_setOptions:function(e){var t=e.value;delete e.value,this._super(e),this.options.value=this._constrainedValue(t),this._refreshValue()},_setOption:function(e,t){"max"===e&&(t=Math.max(this.min,t)),"disabled"===e&&this.element.toggleClass("ui-state-disabled",!!t).attr("aria-disabled",t),this._super(e,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,n=this._percentage();this.valueDiv.toggle(this.indeterminate||t>this.min).toggleClass("ui-corner-right",t===this.options.max).width(n.toFixed(0)+"%"),this.element.toggleClass("ui-progressbar-indeterminate",this.indeterminate),this.indeterminate?(this.element.removeAttr("aria-valuenow"),this.overlayDiv||(this.overlayDiv=e("<div class='ui-progressbar-overlay'></div>").appendTo(this.valueDiv))):(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")}}),e.widget("ui.selectmenu",{version:"1.11.4",defaultElement:"<select>",options:{appendTo:null,disabled:null,icons:{button:"ui-icon-triangle-1-s"},position:{my:"left top",at:"left bottom",collision:"none"},width:null,change:null,close:null,focus:null,open:null,select:null},_create:function(){var e=this.element.uniqueId().attr("id");this.ids={element:e,button:e+"-button",menu:e+"-menu"},this._drawButton(),this._drawMenu(),this.options.disabled&&this.disable()},_drawButton:function(){var t=this;this.label=e("label[for='"+this.ids.element+"']").attr("for",this.ids.button),this._on(this.label,{click:function(e){this.button.focus(),e.preventDefault()}}),this.element.hide(),this.button=e("<span>",{"class":"ui-selectmenu-button ui-widget ui-state-default ui-corner-all",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"}).insertAfter(this.element),e("<span>",{"class":"ui-icon "+this.options.icons.button}).prependTo(this.button),this.buttonText=e("<span>",{"class":"ui-selectmenu-text"}).appendTo(this.button),this._setText(this.buttonText,this.element.find("option:selected").text()),this._resizeButton(),this._on(this.button,this._buttonEvents),this.button.one("focusin",function(){t.menuItems||t._refreshMenu()}),this._hoverable(this.button),this._focusable(this.button)},_drawMenu:function(){var t=this;this.menu=e("<ul>",{"aria-hidden":"true","aria-labelledby":this.ids.button,id:this.ids.menu}),this.menuWrap=e("<div>",{"class":"ui-selectmenu-menu ui-front"}).append(this.menu).appendTo(this._appendTo()),this.menuInstance=this.menu.menu({role:"listbox",select:function(e,n){e.preventDefault(),t._setSelection(),t._select(n.item.data("ui-selectmenu-item"),e)},focus:function(e,n){var i=n.item.data("ui-selectmenu-item");null!=t.focusIndex&&i.index!==t.focusIndex&&(t._trigger("focus",e,{item:i}),t.isOpen||t._select(i,e)),t.focusIndex=i.index,t.button.attr("aria-activedescendant",t.menuItems.eq(i.index).attr("id"))}}).menu("instance"),this.menu.addClass("ui-corner-bottom").removeClass("ui-corner-all"),this.menuInstance._off(this.menu,"mouseleave"),this.menuInstance._closeOnDocumentClick=function(){return!1},this.menuInstance._isDivider=function(){return!1}},refresh:function(){this._refreshMenu(),this._setText(this.buttonText,this._getSelectedItem().text()),this.options.width||this._resizeButton()},_refreshMenu:function(){this.menu.empty();var e,t=this.element.find("option");t.length&&(this._parseOptions(t),this._renderMenu(this.menu,this.items),this.menuInstance.refresh(),this.menuItems=this.menu.find("li").not(".ui-selectmenu-optgroup"),e=this._getSelectedItem(),this.menuInstance.focus(null,e),this._setAria(e.data("ui-selectmenu-item")),this._setOption("disabled",this.element.prop("disabled")))},open:function(e){this.options.disabled||(this.menuItems?(this.menu.find(".ui-state-focus").removeClass("ui-state-focus"),this.menuInstance.focus(null,this._getSelectedItem())):this._refreshMenu(),this.isOpen=!0,this._toggleAttr(),this._resizeMenu(),this._position(),this._on(this.document,this._documentClick),this._trigger("open",e))},_position:function(){this.menuWrap.position(e.extend({of:this.button},this.options.position))},close:function(e){this.isOpen&&(this.isOpen=!1,this._toggleAttr(),this.range=null,this._off(this.document),this._trigger("close",e))},widget:function(){return this.button},menuWidget:function(){return this.menu},_renderMenu:function(t,n){var i=this,s="";e.each(n,function(n,o){o.optgroup!==s&&(e("<li>",{"class":"ui-selectmenu-optgroup ui-menu-divider"+(o.element.parent("optgroup").prop("disabled")?" ui-state-disabled":""),text:o.optgroup}).appendTo(t),s=o.optgroup),i._renderItemData(t,o)})},_renderItemData:function(e,t){return this._renderItem(e,t).data("ui-selectmenu-item",t)},_renderItem:function(t,n){var i=e("<li>");return n.disabled&&i.addClass("ui-state-disabled"),this._setText(i,n.label),i.appendTo(t)},_setText:function(e,t){t?e.text(t):e.html("&#160;")},_move:function(e,t){var n,i,s=".ui-menu-item";this.isOpen?n=this.menuItems.eq(this.focusIndex):(n=this.menuItems.eq(this.element[0].selectedIndex),s+=":not(.ui-state-disabled)"),i="first"===e||"last"===e?n["first"===e?"prevAll":"nextAll"](s).eq(-1):n[e+"All"](s).eq(0),i.length&&this.menuInstance.focus(t,i)},_getSelectedItem:function(){return this.menuItems.eq(this.element[0].selectedIndex)},_toggle:function(e){this[this.isOpen?"close":"open"](e)},_setSelection:function(){var e;this.range&&(window.getSelection?(e=window.getSelection(),e.removeAllRanges(),e.addRange(this.range)):this.range.select(),this.button.focus())},_documentClick:{mousedown:function(t){this.isOpen&&(e(t.target).closest(".ui-selectmenu-menu, #"+this.ids.button).length||this.close(t))}},_buttonEvents:{mousedown:function(){var e;window.getSelection?(e=window.getSelection(),e.rangeCount&&(this.range=e.getRangeAt(0))):this.range=document.selection.createRange()},click:function(e){this._setSelection(),this._toggle(e)},keydown:function(t){var n=!0;switch(t.keyCode){case e.ui.keyCode.TAB:case e.ui.keyCode.ESCAPE:this.close(t),n=!1;break;case e.ui.keyCode.ENTER:this.isOpen&&this._selectFocusedItem(t);break;case e.ui.keyCode.UP:t.altKey?this._toggle(t):this._move("prev",t);break;case e.ui.keyCode.DOWN:t.altKey?this._toggle(t):this._move("next",t);break;case e.ui.keyCode.SPACE:this.isOpen?this._selectFocusedItem(t):this._toggle(t);break;case e.ui.keyCode.LEFT:this._move("prev",t);break;case e.ui.keyCode.RIGHT:this._move("next",t);break;case e.ui.keyCode.HOME:case e.ui.keyCode.PAGE_UP:this._move("first",t);break;case e.ui.keyCode.END:case e.ui.keyCode.PAGE_DOWN:this._move("last",t);break;default:this.menu.trigger(t),n=!1}n&&t.preventDefault()}},_selectFocusedItem:function(e){var t=this.menuItems.eq(this.focusIndex);t.hasClass("ui-state-disabled")||this._select(t.data("ui-selectmenu-item"),e)},_select:function(e,t){var n=this.element[0].selectedIndex;this.element[0].selectedIndex=e.index,this._setText(this.buttonText,e.label),this._setAria(e),this._trigger("select",t,{item:e}),e.index!==n&&this._trigger("change",t,{item:e}),this.close(t)},_setAria:function(e){var t=this.menuItems.eq(e.index).attr("id");this.button.attr({"aria-labelledby":t,"aria-activedescendant":t}),this.menu.attr("aria-activedescendant",t)},_setOption:function(e,t){"icons"===e&&this.button.find("span.ui-icon").removeClass(this.options.icons.button).addClass(t.button),this._super(e,t),"appendTo"===e&&this.menuWrap.appendTo(this._appendTo()),"disabled"===e&&(this.menuInstance.option("disabled",t),this.button.toggleClass("ui-state-disabled",t).attr("aria-disabled",t),this.element.prop("disabled",t),t?(this.button.attr("tabindex",-1),this.close()):this.button.attr("tabindex",0)),"width"===e&&this._resizeButton()},_appendTo:function(){var t=this.options.appendTo;return t&&(t=t.jquery||t.nodeType?e(t):this.document.find(t).eq(0)),t&&t[0]||(t=this.element.closest(".ui-front")),t.length||(t=this.document[0].body),t},_toggleAttr:function(){this.button.toggleClass("ui-corner-top",this.isOpen).toggleClass("ui-corner-all",!this.isOpen).attr("aria-expanded",this.isOpen),this.menuWrap.toggleClass("ui-selectmenu-open",this.isOpen),this.menu.attr("aria-hidden",!this.isOpen)},_resizeButton:function(){var e=this.options.width;e||(e=this.element.show().outerWidth(),this.element.hide()),this.button.outerWidth(e)},_resizeMenu:function(){this.menu.outerWidth(Math.max(this.button.outerWidth(),this.menu.width("").outerWidth()+1))},_getCreateOptions:function(){return{disabled:this.element.prop("disabled")}},_parseOptions:function(t){var n=[];t.each(function(t,i){var s=e(i),o=s.parent("optgroup");n.push({element:s,index:t,value:s.val(),label:s.text(),optgroup:o.attr("label")||"",disabled:o.prop("disabled")||s.prop("disabled")})}),this.items=n},_destroy:function(){this.menuWrap.remove(),this.button.remove(),this.element.show(),this.element.removeUniqueId(),this.label.attr("for",this.ids.element)}}),e.widget("ui.slider",e.ui.mouse,{version:"1.11.4",widgetEventPrefix:"slide",options:{animate:!1,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.element.addClass("ui-slider ui-slider-"+this.orientation+" ui-widget ui-widget-content ui-corner-all"),this._refresh(),this._setOption("disabled",this.options.disabled),this._animateOff=!1},_refresh:function(){this._createRange(),this._createHandles(),this._setupEvents(),this._refreshValue()},_createHandles:function(){var t,n,i=this.options,s=this.element.find(".ui-slider-handle").addClass("ui-state-default ui-corner-all"),o="<span class='ui-slider-handle ui-state-default ui-corner-all' tabindex='0'></span>",r=[];for(n=i.values&&i.values.length||1,s.length>n&&(s.slice(n).remove(),s=s.slice(0,n)),t=s.length;n>t;t++)r.push(o);this.handles=s.add(e(r.join("")).appendTo(this.element)),this.handle=this.handles.eq(0),this.handles.each(function(t){e(this).data("ui-slider-handle-index",t)})},_createRange:function(){var t=this.options,n="";t.range?(t.range===!0&&(t.values?t.values.length&&2!==t.values.length?t.values=[t.values[0],t.values[0]]:e.isArray(t.values)&&(t.values=t.values.slice(0)):t.values=[this._valueMin(),this._valueMin()]),this.range&&this.range.length?this.range.removeClass("ui-slider-range-min ui-slider-range-max").css({left:"",bottom:""}):(this.range=e("<div></div>").appendTo(this.element),n="ui-slider-range ui-widget-header ui-corner-all"),this.range.addClass(n+("min"===t.range||"max"===t.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.element.removeClass("ui-slider ui-slider-horizontal ui-slider-vertical ui-widget ui-widget-content ui-corner-all"),this._mouseDestroy()},_mouseCapture:function(t){var n,i,s,o,r,a,l,c,h=this,u=this.options;return!u.disabled&&(this.elementSize={width:this.element.outerWidth(),height:this.element.outerHeight()},this.elementOffset=this.element.offset(),n={x:t.pageX,y:t.pageY},i=this._normValueFromMouse(n),s=this._valueMax()-this._valueMin()+1,this.handles.each(function(t){var n=Math.abs(i-h.values(t));(s>n||s===n&&(t===h._lastChangedValue||h.values(t)===u.min))&&(s=n,o=e(this),r=t)}),a=this._start(t,r),a!==!1&&(this._mouseSliding=!0,this._handleIndex=r,o.addClass("ui-state-active").focus(),l=o.offset(),c=!e(t.target).parents().addBack().is(".ui-slider-handle"),this._clickOffset=c?{left:0,top:0}:{left:t.pageX-l.left-o.width()/2,top:t.pageY-l.top-o.height()/2-(parseInt(o.css("borderTopWidth"),10)||0)-(parseInt(o.css("borderBottomWidth"),10)||0)+(parseInt(o.css("marginTop"),10)||0)},this.handles.hasClass("ui-state-hover")||this._slide(t,r,i),this._animateOff=!0,!0))},_mouseStart:function(){return!0},_mouseDrag:function(e){var t={x:e.pageX,y:e.pageY},n=this._normValueFromMouse(t);return this._slide(e,this._handleIndex,n),!1},_mouseStop:function(e){return this.handles.removeClass("ui-state-active"),this._mouseSliding=!1,this._stop(e,this._handleIndex),this._change(e,this._handleIndex),this._handleIndex=null,this._clickOffset=null,this._animateOff=!1,!1},_detectOrientation:function(){this.orientation="vertical"===this.options.orientation?"vertical":"horizontal"},_normValueFromMouse:function(e){var t,n,i,s,o;return"horizontal"===this.orientation?(t=this.elementSize.width,n=e.x-this.elementOffset.left-(this._clickOffset?this._clickOffset.left:0)):(t=this.elementSize.height,n=e.y-this.elementOffset.top-(this._clickOffset?this._clickOffset.top:0)),i=n/t,i>1&&(i=1),0>i&&(i=0),"vertical"===this.orientation&&(i=1-i),s=this._valueMax()-this._valueMin(),o=this._valueMin()+i*s,this._trimAlignValue(o)},_start:function(e,t){var n={handle:this.handles[t],value:this.value()};return this.options.values&&this.options.values.length&&(n.value=this.values(t),n.values=this.values()),this._trigger("start",e,n)},_slide:function(e,t,n){var i,s,o;this.options.values&&this.options.values.length?(i=this.values(t?0:1),2===this.options.values.length&&this.options.range===!0&&(0===t&&n>i||1===t&&i>n)&&(n=i),n!==this.values(t)&&(s=this.values(),s[t]=n,o=this._trigger("slide",e,{handle:this.handles[t],value:n,values:s}),i=this.values(t?0:1),o!==!1&&this.values(t,n))):n!==this.value()&&(o=this._trigger("slide",e,{handle:this.handles[t],value:n}),o!==!1&&this.value(n))},_stop:function(e,t){var n={handle:this.handles[t],value:this.value()};this.options.values&&this.options.values.length&&(n.value=this.values(t),n.values=this.values()),this._trigger("stop",e,n)},_change:function(e,t){if(!this._keySliding&&!this._mouseSliding){var n={handle:this.handles[t],value:this.value()};this.options.values&&this.options.values.length&&(n.value=this.values(t),n.values=this.values()),this._lastChangedValue=t,this._trigger("change",e,n)}},value:function(e){return arguments.length?(this.options.value=this._trimAlignValue(e),this._refreshValue(),void this._change(null,0)):this._value()},values:function(t,n){var i,s,o;if(arguments.length>1)return this.options.values[t]=this._trimAlignValue(n),this._refreshValue(),void this._change(null,t);if(!arguments.length)return this._values();if(!e.isArray(arguments[0]))return this.options.values&&this.options.values.length?this._values(t):this.value();for(i=this.options.values,s=arguments[0],o=0;i.length>o;o+=1)i[o]=this._trimAlignValue(s[o]),this._change(null,o);this._refreshValue()},_setOption:function(t,n){
var i,s=0;switch("range"===t&&this.options.range===!0&&("min"===n?(this.options.value=this._values(0),this.options.values=null):"max"===n&&(this.options.value=this._values(this.options.values.length-1),this.options.values=null)),e.isArray(this.options.values)&&(s=this.options.values.length),"disabled"===t&&this.element.toggleClass("ui-state-disabled",!!n),this._super(t,n),t){case"orientation":this._detectOrientation(),this.element.removeClass("ui-slider-horizontal ui-slider-vertical").addClass("ui-slider-"+this.orientation),this._refreshValue(),this.handles.css("horizontal"===n?"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=0;s>i;i+=1)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}},_value:function(){var e=this.options.value;return e=this._trimAlignValue(e)},_values:function(e){var t,n,i;if(arguments.length)return t=this.options.values[e],t=this._trimAlignValue(t);if(this.options.values&&this.options.values.length){for(n=this.options.values.slice(),i=0;n.length>i;i+=1)n[i]=this._trimAlignValue(n[i]);return n}return[]},_trimAlignValue:function(e){if(this._valueMin()>=e)return this._valueMin();if(e>=this._valueMax())return this._valueMax();var t=this.options.step>0?this.options.step:1,n=(e-this._valueMin())%t,i=e-n;return 2*Math.abs(n)>=t&&(i+=n>0?t:-t),parseFloat(i.toFixed(5))},_calculateNewMax:function(){var e=this.options.max,t=this._valueMin(),n=this.options.step,i=Math.floor(+(e-t).toFixed(this._precision())/n)*n;e=i+t,this.max=parseFloat(e.toFixed(this._precision()))},_precision:function(){var e=this._precisionOf(this.options.step);return null!==this.options.min&&(e=Math.max(e,this._precisionOf(this.options.min))),e},_precisionOf:function(e){var t=""+e,n=t.indexOf(".");return-1===n?0:t.length-n-1},_valueMin:function(){return this.options.min},_valueMax:function(){return this.max},_refreshValue:function(){var t,n,i,s,o,r=this.options.range,a=this.options,l=this,c=!this._animateOff&&a.animate,h={};this.options.values&&this.options.values.length?this.handles.each(function(i){n=100*((l.values(i)-l._valueMin())/(l._valueMax()-l._valueMin())),h["horizontal"===l.orientation?"left":"bottom"]=n+"%",e(this).stop(1,1)[c?"animate":"css"](h,a.animate),l.options.range===!0&&("horizontal"===l.orientation?(0===i&&l.range.stop(1,1)[c?"animate":"css"]({left:n+"%"},a.animate),1===i&&l.range[c?"animate":"css"]({width:n-t+"%"},{queue:!1,duration:a.animate})):(0===i&&l.range.stop(1,1)[c?"animate":"css"]({bottom:n+"%"},a.animate),1===i&&l.range[c?"animate":"css"]({height:n-t+"%"},{queue:!1,duration:a.animate}))),t=n}):(i=this.value(),s=this._valueMin(),o=this._valueMax(),n=o!==s?100*((i-s)/(o-s)):0,h["horizontal"===this.orientation?"left":"bottom"]=n+"%",this.handle.stop(1,1)[c?"animate":"css"](h,a.animate),"min"===r&&"horizontal"===this.orientation&&this.range.stop(1,1)[c?"animate":"css"]({width:n+"%"},a.animate),"max"===r&&"horizontal"===this.orientation&&this.range[c?"animate":"css"]({width:100-n+"%"},{queue:!1,duration:a.animate}),"min"===r&&"vertical"===this.orientation&&this.range.stop(1,1)[c?"animate":"css"]({height:n+"%"},a.animate),"max"===r&&"vertical"===this.orientation&&this.range[c?"animate":"css"]({height:100-n+"%"},{queue:!1,duration:a.animate}))},_handleEvents:{keydown:function(t){var n,i,s,o,r=e(t.target).data("ui-slider-handle-index");switch(t.keyCode){case e.ui.keyCode.HOME:case e.ui.keyCode.END:case e.ui.keyCode.PAGE_UP:case e.ui.keyCode.PAGE_DOWN:case e.ui.keyCode.UP:case e.ui.keyCode.RIGHT:case e.ui.keyCode.DOWN:case e.ui.keyCode.LEFT:if(t.preventDefault(),!this._keySliding&&(this._keySliding=!0,e(t.target).addClass("ui-state-active"),n=this._start(t,r),n===!1))return}switch(o=this.options.step,i=s=this.options.values&&this.options.values.length?this.values(r):this.value(),t.keyCode){case e.ui.keyCode.HOME:s=this._valueMin();break;case e.ui.keyCode.END:s=this._valueMax();break;case e.ui.keyCode.PAGE_UP:s=this._trimAlignValue(i+(this._valueMax()-this._valueMin())/this.numPages);break;case e.ui.keyCode.PAGE_DOWN:s=this._trimAlignValue(i-(this._valueMax()-this._valueMin())/this.numPages);break;case e.ui.keyCode.UP:case e.ui.keyCode.RIGHT:if(i===this._valueMax())return;s=this._trimAlignValue(i+o);break;case e.ui.keyCode.DOWN:case e.ui.keyCode.LEFT:if(i===this._valueMin())return;s=this._trimAlignValue(i-o)}this._slide(t,r,s)},keyup:function(t){var n=e(t.target).data("ui-slider-handle-index");this._keySliding&&(this._keySliding=!1,this._stop(t,n),this._change(t,n),e(t.target).removeClass("ui-state-active"))}}}),e.widget("ui.spinner",{version:"1.11.4",defaultElement:"<input>",widgetEventPrefix:"spin",options:{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 t={},n=this.element;return e.each(["min","max","step"],function(e,i){var s=n.attr(i);void 0!==s&&s.length&&(t[i]=s)}),t},_events:{keydown:function(e){this._start(e)&&this._keydown(e)&&e.preventDefault()},keyup:"_stop",focus:function(){this.previous=this.element.val()},blur:function(e){return this.cancelBlur?void delete this.cancelBlur:(this._stop(),this._refresh(),void(this.previous!==this.element.val()&&this._trigger("change",e)))},mousewheel:function(e,t){if(t){if(!this.spinning&&!this._start(e))return!1;this._spin((t>0?1:-1)*this.options.step,e),clearTimeout(this.mousewheelTimer),this.mousewheelTimer=this._delay(function(){this.spinning&&this._stop(e)},100),e.preventDefault()}},"mousedown .ui-spinner-button":function(t){function n(){var e=this.element[0]===this.document[0].activeElement;e||(this.element.focus(),this.previous=i,this._delay(function(){this.previous=i}))}var i;i=this.element[0]===this.document[0].activeElement?this.previous:this.element.val(),t.preventDefault(),n.call(this),this.cancelBlur=!0,this._delay(function(){delete this.cancelBlur,n.call(this)}),this._start(t)!==!1&&this._repeat(null,e(t.currentTarget).hasClass("ui-spinner-up")?1:-1,t)},"mouseup .ui-spinner-button":"_stop","mouseenter .ui-spinner-button":function(t){return e(t.currentTarget).hasClass("ui-state-active")?this._start(t)!==!1&&void this._repeat(null,e(t.currentTarget).hasClass("ui-spinner-up")?1:-1,t):void 0},"mouseleave .ui-spinner-button":"_stop"},_draw:function(){var e=this.uiSpinner=this.element.addClass("ui-spinner-input").attr("autocomplete","off").wrap(this._uiSpinnerHtml()).parent().append(this._buttonHtml());this.element.attr("role","spinbutton"),this.buttons=e.find(".ui-spinner-button").attr("tabIndex",-1).button().removeClass("ui-corner-all"),this.buttons.height()>Math.ceil(.5*e.height())&&e.height()>0&&e.height(e.height()),this.options.disabled&&this.disable()},_keydown:function(t){var n=this.options,i=e.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,n.page,t),!0;case i.PAGE_DOWN:return this._repeat(null,-n.page,t),!0}return!1},_uiSpinnerHtml:function(){return"<span class='ui-spinner ui-widget ui-widget-content ui-corner-all'></span>"},_buttonHtml:function(){return"<a class='ui-spinner-button ui-spinner-up ui-corner-tr'><span class='ui-icon "+this.options.icons.up+"'>&#9650;</span></a><a class='ui-spinner-button ui-spinner-down ui-corner-br'><span class='ui-icon "+this.options.icons.down+"'>&#9660;</span></a>"},_start:function(e){return!(!this.spinning&&this._trigger("start",e)===!1)&&(this.counter||(this.counter=1),this.spinning=!0,!0)},_repeat:function(e,t,n){e=e||500,clearTimeout(this.timer),this.timer=this._delay(function(){this._repeat(40,t,n)},e),this._spin(t*this.options.step,n)},_spin:function(e,t){var n=this.value()||0;this.counter||(this.counter=1),n=this._adjustValue(n+e*this._increment(this.counter)),this.spinning&&this._trigger("spin",t,{value:n})===!1||(this._value(n),this.counter++)},_increment:function(t){var n=this.options.incremental;return n?e.isFunction(n)?n(t):Math.floor(t*t*t/5e4-t*t/500+17*t/200+1):1},_precision:function(){var e=this._precisionOf(this.options.step);return null!==this.options.min&&(e=Math.max(e,this._precisionOf(this.options.min))),e},_precisionOf:function(e){var t=""+e,n=t.indexOf(".");return-1===n?0:t.length-n-1},_adjustValue:function(e){var t,n,i=this.options;return t=null!==i.min?i.min:0,n=e-t,n=Math.round(n/i.step)*i.step,e=t+n,e=parseFloat(e.toFixed(this._precision())),null!==i.max&&e>i.max?i.max:null!==i.min&&i.min>e?i.min:e},_stop:function(e){this.spinning&&(clearTimeout(this.timer),clearTimeout(this.mousewheelTimer),this.counter=0,this.spinning=!1,this._trigger("stop",e))},_setOption:function(e,t){if("culture"===e||"numberFormat"===e){var n=this._parse(this.element.val());return this.options[e]=t,void this.element.val(this._format(n))}("max"===e||"min"===e||"step"===e)&&"string"==typeof t&&(t=this._parse(t)),"icons"===e&&(this.buttons.first().find(".ui-icon").removeClass(this.options.icons.up).addClass(t.up),this.buttons.last().find(".ui-icon").removeClass(this.options.icons.down).addClass(t.down)),this._super(e,t),"disabled"===e&&(this.widget().toggleClass("ui-state-disabled",!!t),this.element.prop("disabled",!!t),this.buttons.button(t?"disable":"enable"))},_setOptions:l(function(e){this._super(e)}),_parse:function(e){return"string"==typeof e&&""!==e&&(e=window.Globalize&&this.options.numberFormat?Globalize.parseFloat(e,10,this.options.culture):+e),""===e||isNaN(e)?null:e},_format:function(e){return""===e?"":window.Globalize&&this.options.numberFormat?Globalize.format(e,this.options.numberFormat,this.options.culture):e},_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 e=this.value();return null!==e&&e===this._adjustValue(e)},_value:function(e,t){var n;""!==e&&(n=this._parse(e),null!==n&&(t||(n=this._adjustValue(n)),e=this._format(n))),this.element.val(e),this._refresh()},_destroy:function(){this.element.removeClass("ui-spinner-input").prop("disabled",!1).removeAttr("autocomplete").removeAttr("role").removeAttr("aria-valuemin").removeAttr("aria-valuemax").removeAttr("aria-valuenow"),this.uiSpinner.replaceWith(this.element)},stepUp:l(function(e){this._stepUp(e)}),_stepUp:function(e){this._start()&&(this._spin((e||1)*this.options.step),this._stop())},stepDown:l(function(e){this._stepDown(e)}),_stepDown:function(e){this._start()&&(this._spin((e||1)*-this.options.step),this._stop())},pageUp:l(function(e){this._stepUp((e||1)*this.options.page)}),pageDown:l(function(e){this._stepDown((e||1)*this.options.page)}),value:function(e){return arguments.length?void l(this._value).call(this,e):this._parse(this.element.val())},widget:function(){return this.uiSpinner}}),e.widget("ui.tabs",{version:"1.11.4",delay:300,options:{active:null,collapsible:!1,event:"click",heightStyle:"content",hide:null,show:null,activate:null,beforeActivate:null,beforeLoad:null,load:null},_isLocal:function(){var e=/#.*$/;return function(t){var n,i;t=t.cloneNode(!1),n=t.href.replace(e,""),i=location.href.replace(e,"");try{n=decodeURIComponent(n)}catch(s){}try{i=decodeURIComponent(i)}catch(s){}return t.hash.length>1&&n===i}}(),_create:function(){var t=this,n=this.options;this.running=!1,this.element.addClass("ui-tabs ui-widget ui-widget-content ui-corner-all").toggleClass("ui-tabs-collapsible",n.collapsible),this._processTabs(),n.active=this._initialActive(),e.isArray(n.disabled)&&(n.disabled=e.unique(n.disabled.concat(e.map(this.tabs.filter(".ui-state-disabled"),function(e){return t.tabs.index(e)}))).sort()),this.active=this.options.active!==!1&&this.anchors.length?this._findActive(n.active):e(),this._refresh(),this.active.length&&this.load(n.active)},_initialActive:function(){var t=this.options.active,n=this.options.collapsible,i=location.hash.substring(1);return null===t&&(i&&this.tabs.each(function(n,s){return e(s).attr("aria-controls")===i?(t=n,!1):void 0}),null===t&&(t=this.tabs.index(this.tabs.filter(".ui-tabs-active"))),(null===t||-1===t)&&(t=!!this.tabs.length&&0)),t!==!1&&(t=this.tabs.index(this.tabs.eq(t)),-1===t&&(t=!n&&0)),!n&&t===!1&&this.anchors.length&&(t=0),t},_getCreateEventData:function(){return{tab:this.active,panel:this.active.length?this._getPanelForTab(this.active):e()}},_tabKeydown:function(t){var n=e(this.document[0].activeElement).closest("li"),i=this.tabs.index(n),s=!0;if(!this._handlePageNav(t)){switch(t.keyCode){case e.ui.keyCode.RIGHT:case e.ui.keyCode.DOWN:i++;break;case e.ui.keyCode.UP:case e.ui.keyCode.LEFT:s=!1,i--;break;case e.ui.keyCode.END:i=this.anchors.length-1;break;case e.ui.keyCode.HOME:i=0;break;case e.ui.keyCode.SPACE:return t.preventDefault(),clearTimeout(this.activating),void this._activate(i);case e.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||(n.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===e.ui.keyCode.UP&&(t.preventDefault(),this.active.focus())},_handlePageNav:function(t){return t.altKey&&t.keyCode===e.ui.keyCode.PAGE_UP?(this._activate(this._focusNextTab(this.options.active-1,!1)),!0):t.altKey&&t.keyCode===e.ui.keyCode.PAGE_DOWN?(this._activate(this._focusNextTab(this.options.active+1,!0)),!0):void 0},_findNextTab:function(t,n){function i(){return t>s&&(t=0),0>t&&(t=s),t}for(var s=this.tabs.length-1;-1!==e.inArray(i(),this.options.disabled);)t=n?t+1:t-1;return t},_focusNextTab:function(e,t){return e=this._findNextTab(e,t),this.tabs.eq(e).focus(),e},_setOption:function(e,t){return"active"===e?void this._activate(t):"disabled"===e?void this._setupDisabled(t):(this._super(e,t),"collapsible"===e&&(this.element.toggleClass("ui-tabs-collapsible",t),t||this.options.active!==!1||this._activate(0)),"event"===e&&this._setupEvents(t),void("heightStyle"===e&&this._setupHeightStyle(t)))},_sanitizeSelector:function(e){return e?e.replace(/[!"$%&'()*+,.\/:;<=>?@\[\]\^`{|}~]/g,"\\$&"):""},refresh:function(){var t=this.options,n=this.tablist.children(":has(a[href])");t.disabled=e.map(n.filter(".ui-state-disabled"),function(e){return n.index(e)}),this._processTabs(),t.active!==!1&&this.anchors.length?this.active.length&&!e.contains(this.tablist[0],this.active[0])?this.tabs.length===t.disabled.length?(t.active=!1,this.active=e()):this._activate(this._findNextTab(Math.max(0,t.active-1),!1)):t.active=this.tabs.index(this.active):(t.active=!1,this.active=e()),this._refresh()},_refresh:function(){this._setupDisabled(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.addClass("ui-tabs-active ui-state-active").attr({"aria-selected":"true","aria-expanded":"true",tabIndex:0}),this._getPanelForTab(this.active).show().attr({"aria-hidden":"false"})):this.tabs.eq(0).attr("tabIndex",0)},_processTabs:function(){var t=this,n=this.tabs,i=this.anchors,s=this.panels;this.tablist=this._getList().addClass("ui-tabs-nav ui-helper-reset ui-helper-clearfix ui-widget-header ui-corner-all").attr("role","tablist").delegate("> li","mousedown"+this.eventNamespace,function(t){e(this).is(".ui-state-disabled")&&t.preventDefault()}).delegate(".ui-tabs-anchor","focus"+this.eventNamespace,function(){e(this).closest("li").is(".ui-state-disabled")&&this.blur()}),this.tabs=this.tablist.find("> li:has(a[href])").addClass("ui-state-default ui-corner-top").attr({role:"tab",tabIndex:-1}),this.anchors=this.tabs.map(function(){return e("a",this)[0]}).addClass("ui-tabs-anchor").attr({role:"presentation",tabIndex:-1}),this.panels=e(),this.anchors.each(function(n,i){var s,o,r,a=e(i).uniqueId().attr("id"),l=e(i).closest("li"),c=l.attr("aria-controls");t._isLocal(i)?(s=i.hash,r=s.substring(1),o=t.element.find(t._sanitizeSelector(s))):(r=l.attr("aria-controls")||e({}).uniqueId()[0].id,s="#"+r,o=t.element.find(s),o.length||(o=t._createPanel(r),o.insertAfter(t.panels[n-1]||t.tablist)),o.attr("aria-live","polite")),o.length&&(t.panels=t.panels.add(o)),c&&l.data("ui-tabs-aria-controls",c),l.attr({"aria-controls":r,"aria-labelledby":a}),o.attr("aria-labelledby",a)}),this.panels.addClass("ui-tabs-panel ui-widget-content ui-corner-bottom").attr("role","tabpanel"),n&&(this._off(n.not(this.tabs)),this._off(i.not(this.anchors)),this._off(s.not(this.panels)))},_getList:function(){return this.tablist||this.element.find("ol,ul").eq(0)},_createPanel:function(t){return e("<div>").attr("id",t).addClass("ui-tabs-panel ui-widget-content ui-corner-bottom").data("ui-tabs-destroy",!0)},_setupDisabled:function(t){e.isArray(t)&&(t.length?t.length===this.anchors.length&&(t=!0):t=!1);for(var n,i=0;n=this.tabs[i];i++)t===!0||-1!==e.inArray(i,t)?e(n).addClass("ui-state-disabled").attr("aria-disabled","true"):e(n).removeClass("ui-state-disabled").removeAttr("aria-disabled");this.options.disabled=t},_setupEvents:function(t){var n={};t&&e.each(t.split(" "),function(e,t){n[t]="_eventHandler"}),this._off(this.anchors.add(this.tabs).add(this.panels)),this._on(!0,this.anchors,{click:function(e){e.preventDefault()}}),this._on(this.anchors,n),this._on(this.tabs,{keydown:"_tabKeydown"}),this._on(this.panels,{keydown:"_panelKeydown"}),this._focusable(this.tabs),this._hoverable(this.tabs)},_setupHeightStyle:function(t){var n,i=this.element.parent();"fill"===t?(n=i.height(),n-=this.element.outerHeight()-this.element.height(),this.element.siblings(":visible").each(function(){var t=e(this),i=t.css("position");"absolute"!==i&&"fixed"!==i&&(n-=t.outerHeight(!0))}),this.element.children().not(this.panels).each(function(){n-=e(this).outerHeight(!0)}),this.panels.each(function(){e(this).height(Math.max(0,n-e(this).innerHeight()+e(this).height()))}).css("overflow","auto")):"auto"===t&&(n=0,this.panels.each(function(){n=Math.max(n,e(this).height("").height())}).height(n))},_eventHandler:function(t){var n=this.options,i=this.active,s=e(t.currentTarget),o=s.closest("li"),r=o[0]===i[0],a=r&&n.collapsible,l=a?e():this._getPanelForTab(o),c=i.length?this._getPanelForTab(i):e(),h={oldTab:i,oldPanel:c,newTab:a?e():o,newPanel:l};t.preventDefault(),o.hasClass("ui-state-disabled")||o.hasClass("ui-tabs-loading")||this.running||r&&!n.collapsible||this._trigger("beforeActivate",t,h)===!1||(n.active=!a&&this.tabs.index(o),this.active=r?e():o,this.xhr&&this.xhr.abort(),c.length||l.length||e.error("jQuery UI Tabs: Mismatching fragment identifier."),l.length&&this.load(this.tabs.index(o),t),this._toggle(t,h))},_toggle:function(t,n){function i(){o.running=!1,o._trigger("activate",t,n)}function s(){n.newTab.closest("li").addClass("ui-tabs-active ui-state-active"),r.length&&o.options.show?o._show(r,o.options.show,i):(r.show(),i())}var o=this,r=n.newPanel,a=n.oldPanel;this.running=!0,a.length&&this.options.hide?this._hide(a,this.options.hide,function(){n.oldTab.closest("li").removeClass("ui-tabs-active ui-state-active"),s()}):(n.oldTab.closest("li").removeClass("ui-tabs-active ui-state-active"),a.hide(),s()),a.attr("aria-hidden","true"),n.oldTab.attr({"aria-selected":"false","aria-expanded":"false"}),r.length&&a.length?n.oldTab.attr("tabIndex",-1):r.length&&this.tabs.filter(function(){return 0===e(this).attr("tabIndex")}).attr("tabIndex",-1),r.attr("aria-hidden","false"),n.newTab.attr({"aria-selected":"true","aria-expanded":"true",tabIndex:0})},_activate:function(t){var n,i=this._findActive(t);i[0]!==this.active[0]&&(i.length||(i=this.active),n=i.find(".ui-tabs-anchor")[0],this._eventHandler({target:n,currentTarget:n,preventDefault:e.noop}))},_findActive:function(t){return t===!1?e():this.tabs.eq(t)},_getIndex:function(e){return"string"==typeof e&&(e=this.anchors.index(this.anchors.filter("[href$='"+e+"']"))),e},_destroy:function(){this.xhr&&this.xhr.abort(),this.element.removeClass("ui-tabs ui-widget ui-widget-content ui-corner-all ui-tabs-collapsible"),this.tablist.removeClass("ui-tabs-nav ui-helper-reset ui-helper-clearfix ui-widget-header ui-corner-all").removeAttr("role"),this.anchors.removeClass("ui-tabs-anchor").removeAttr("role").removeAttr("tabIndex").removeUniqueId(),this.tablist.unbind(this.eventNamespace),this.tabs.add(this.panels).each(function(){e.data(this,"ui-tabs-destroy")?e(this).remove():e(this).removeClass("ui-state-default ui-state-active ui-state-disabled ui-corner-top ui-corner-bottom ui-widget-content ui-tabs-active ui-tabs-panel").removeAttr("tabIndex").removeAttr("aria-live").removeAttr("aria-busy").removeAttr("aria-selected").removeAttr("aria-labelledby").removeAttr("aria-hidden").removeAttr("aria-expanded").removeAttr("role")}),this.tabs.each(function(){var t=e(this),n=t.data("ui-tabs-aria-controls");n?t.attr("aria-controls",n).removeData("ui-tabs-aria-controls"):t.removeAttr("aria-controls")}),this.panels.show(),"content"!==this.options.heightStyle&&this.panels.css("height","")},enable:function(t){var n=this.options.disabled;n!==!1&&(void 0===t?n=!1:(t=this._getIndex(t),n=e.isArray(n)?e.map(n,function(e){return e!==t?e:null}):e.map(this.tabs,function(e,n){return n!==t?n:null})),this._setupDisabled(n))},disable:function(t){var n=this.options.disabled;if(n!==!0){if(void 0===t)n=!0;else{if(t=this._getIndex(t),-1!==e.inArray(t,n))return;n=e.isArray(n)?e.merge([t],n).sort():[t]}this._setupDisabled(n)}},load:function(t,n){t=this._getIndex(t);var i=this,s=this.tabs.eq(t),o=s.find(".ui-tabs-anchor"),r=this._getPanelForTab(s),a={tab:s,panel:r},l=function(e,t){"abort"===t&&i.panels.stop(!1,!0),s.removeClass("ui-tabs-loading"),r.removeAttr("aria-busy"),e===i.xhr&&delete i.xhr};this._isLocal(o[0])||(this.xhr=e.ajax(this._ajaxSettings(o,n,a)),this.xhr&&"canceled"!==this.xhr.statusText&&(s.addClass("ui-tabs-loading"),r.attr("aria-busy","true"),this.xhr.done(function(e,t,s){setTimeout(function(){r.html(e),i._trigger("load",n,a),l(s,t)},1)}).fail(function(e,t){setTimeout(function(){l(e,t)},1)})))},_ajaxSettings:function(t,n,i){var s=this;return{url:t.attr("href"),beforeSend:function(t,o){return s._trigger("beforeLoad",n,e.extend({jqXHR:t,ajaxSettings:o},i))}}},_getPanelForTab:function(t){var n=e(t).attr("aria-controls");return this.element.find(this._sanitizeSelector("#"+n))}}),e.widget("ui.tooltip",{version:"1.11.4",options:{content:function(){var t=e(this).attr("title")||"";return e("<a>").text(t).html()},hide:!0,items:"[title]:not([disabled])",position:{my:"left top+15",at:"left bottom",collision:"flipfit flip"},show:!0,tooltipClass:null,track:!1,close:null,open:null},_addDescribedBy:function(t,n){var i=(t.attr("aria-describedby")||"").split(/\s+/);i.push(n),t.data("ui-tooltip-id",n).attr("aria-describedby",e.trim(i.join(" ")))},_removeDescribedBy:function(t){var n=t.data("ui-tooltip-id"),i=(t.attr("aria-describedby")||"").split(/\s+/),s=e.inArray(n,i);-1!==s&&i.splice(s,1),t.removeData("ui-tooltip-id"),i=e.trim(i.join(" ")),i?t.attr("aria-describedby",i):t.removeAttr("aria-describedby")},_create:function(){this._on({mouseover:"open",focusin:"open"}),this.tooltips={},this.parents={},this.options.disabled&&this._disable(),this.liveRegion=e("<div>").attr({role:"log","aria-live":"assertive","aria-relevant":"additions"}).addClass("ui-helper-hidden-accessible").appendTo(this.document[0].body)},_setOption:function(t,n){var i=this;return"disabled"===t?(this[n?"_disable":"_enable"](),void(this.options[t]=n)):(this._super(t,n),void("content"===t&&e.each(this.tooltips,function(e,t){i._updateContent(t.element)})))},_disable:function(){var t=this;e.each(this.tooltips,function(n,i){var s=e.Event("blur");s.target=s.currentTarget=i.element[0],t.close(s,!0)}),this.element.find(this.options.items).addBack().each(function(){var t=e(this);t.is("[title]")&&t.data("ui-tooltip-title",t.attr("title")).removeAttr("title")})},_enable:function(){this.element.find(this.options.items).addBack().each(function(){var t=e(this);t.data("ui-tooltip-title")&&t.attr("title",t.data("ui-tooltip-title"))})},open:function(t){var n=this,i=e(t?t.target:this.element).closest(this.options.items);i.length&&!i.data("ui-tooltip-id")&&(i.attr("title")&&i.data("ui-tooltip-title",i.attr("title")),i.data("ui-tooltip-open",!0),t&&"mouseover"===t.type&&i.parents().each(function(){var t,i=e(this);i.data("ui-tooltip-open")&&(t=e.Event("blur"),t.target=t.currentTarget=this,n.close(t,!0)),i.attr("title")&&(i.uniqueId(),n.parents[this.id]={element:this,title:i.attr("title")},i.attr("title",""))}),this._registerCloseHandlers(t,i),this._updateContent(i,t))},_updateContent:function(e,t){var n,i=this.options.content,s=this,o=t?t.type:null;return"string"==typeof i?this._open(t,e,i):(n=i.call(e[0],function(n){s._delay(function(){e.data("ui-tooltip-open")&&(t&&(t.type=o),this._open(t,e,n))})}),void(n&&this._open(t,e,n)))},_open:function(t,n,i){function s(e){c.of=e,r.is(":hidden")||r.position(c)}var o,r,a,l,c=e.extend({},this.options.position);if(i){if(o=this._find(n))return void o.tooltip.find(".ui-tooltip-content").html(i);n.is("[title]")&&(t&&"mouseover"===t.type?n.attr("title",""):n.removeAttr("title")),o=this._tooltip(n),r=o.tooltip,this._addDescribedBy(n,r.attr("id")),r.find(".ui-tooltip-content").html(i),this.liveRegion.children().hide(),i.clone?(l=i.clone(),l.removeAttr("id").find("[id]").removeAttr("id")):l=i,e("<div>").html(l).appendTo(this.liveRegion),this.options.track&&t&&/^mouse/.test(t.type)?(this._on(this.document,{mousemove:s}),s(t)):r.position(e.extend({of:n},this.options.position)),r.hide(),this._show(r,this.options.show),this.options.show&&this.options.show.delay&&(a=this.delayedShow=setInterval(function(){r.is(":visible")&&(s(c.of),clearInterval(a))},e.fx.interval)),this._trigger("open",t,{tooltip:r})}},_registerCloseHandlers:function(t,n){var i={keyup:function(t){if(t.keyCode===e.ui.keyCode.ESCAPE){var i=e.Event(t);i.currentTarget=n[0],this.close(i,!0)}}};n[0]!==this.element[0]&&(i.remove=function(){this._removeTooltip(this._find(n).tooltip)}),t&&"mouseover"!==t.type||(i.mouseleave="close"),t&&"focusin"!==t.type||(i.focusout="close"),this._on(!0,n,i)},close:function(t){var n,i=this,s=e(t?t.currentTarget:this.element),o=this._find(s);return o?(n=o.tooltip,void(o.closing||(clearInterval(this.delayedShow),s.data("ui-tooltip-title")&&!s.attr("title")&&s.attr("title",s.data("ui-tooltip-title")),this._removeDescribedBy(s),o.hiding=!0,n.stop(!0),this._hide(n,this.options.hide,function(){i._removeTooltip(e(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&&e.each(this.parents,function(t,n){e(n.element).attr("title",n.title),delete i.parents[t]}),o.closing=!0,this._trigger("close",t,{tooltip:n}),o.hiding||(o.closing=!1)))):void s.removeData("ui-tooltip-open")},_tooltip:function(t){var n=e("<div>").attr("role","tooltip").addClass("ui-tooltip ui-widget ui-corner-all ui-widget-content "+(this.options.tooltipClass||"")),i=n.uniqueId().attr("id");return e("<div>").addClass("ui-tooltip-content").appendTo(n),n.appendTo(this.document[0].body),this.tooltips[i]={element:t,tooltip:n}},_find:function(e){var t=e.data("ui-tooltip-id");return t?this.tooltips[t]:null},_removeTooltip:function(e){e.remove(),delete this.tooltips[e.attr("id")]},_destroy:function(){var t=this;e.each(this.tooltips,function(n,i){var s=e.Event("blur"),o=i.element;s.target=s.currentTarget=o[0],t.close(s,!0),e("#"+n).remove(),o.data("ui-tooltip-title")&&(o.attr("title")||o.attr("title",o.data("ui-tooltip-title")),o.removeData("ui-tooltip-title"))}),this.liveRegion.remove()}});var y="ui-effects-",b=e;e.effects={effect:{}},function(e,t){function n(e,t,n){var i=u[t.type]||{};return null==e?n||!t.def?null:t.def:(e=i.floor?~~e:parseFloat(e),isNaN(e)?t.def:i.mod?(e+i.mod)%i.mod:0>e?0:e>i.max?i.max:e)}function i(n){var i=c(),s=i._rgba=[];return n=n.toLowerCase(),p(l,function(e,o){var r,a=o.re.exec(n),l=a&&o.parse(a),c=o.space||"rgba";return l?(r=i[c](l),i[h[c].cache]=r[h[c].cache],s=i._rgba=r._rgba,!1):t}),s.length?("0,0,0,0"===s.join()&&e.extend(s,o.transparent),i):o[n]}function s(e,t,n){return n=(n+1)%1,1>6*n?e+6*(t-e)*n:1>2*n?t:2>3*n?e+6*(t-e)*(2/3-n):e}var o,r="backgroundColor borderBottomColor borderLeftColor borderRightColor borderTopColor color columnRuleColor outlineColor textDecorationColor textEmphasisColor",a=/^([\-+])=\s*(\d+\.?\d*)/,l=[{re:/rgba?\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*(?:,\s*(\d?(?:\.\d+)?)\s*)?\)/,parse:function(e){return[e[1],e[2],e[3],e[4]]}},{re:/rgba?\(\s*(\d+(?:\.\d+)?)\%\s*,\s*(\d+(?:\.\d+)?)\%\s*,\s*(\d+(?:\.\d+)?)\%\s*(?:,\s*(\d?(?:\.\d+)?)\s*)?\)/,parse:function(e){return[2.55*e[1],2.55*e[2],2.55*e[3],e[4]]}},{re:/#([a-f0-9]{2})([a-f0-9]{2})([a-f0-9]{2})/,parse:function(e){return[parseInt(e[1],16),parseInt(e[2],16),parseInt(e[3],16)]}},{re:/#([a-f0-9])([a-f0-9])([a-f0-9])/,parse:function(e){return[parseInt(e[1]+e[1],16),parseInt(e[2]+e[2],16),parseInt(e[3]+e[3],16)]}},{re:/hsla?\(\s*(\d+(?:\.\d+)?)\s*,\s*(\d+(?:\.\d+)?)\%\s*,\s*(\d+(?:\.\d+)?)\%\s*(?:,\s*(\d?(?:\.\d+)?)\s*)?\)/,space:"hsla",parse:function(e){return[e[1],e[2]/100,e[3]/100,e[4]]}}],c=e.Color=function(t,n,i,s){return new e.Color.fn.parse(t,n,i,s)},h={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"}}}},u={"byte":{floor:!0,max:255},percent:{max:1},degrees:{mod:360,floor:!0}},d=c.support={},f=e("<p>")[0],p=e.each;f.style.cssText="background-color:rgba(1,1,1,.5)",d.rgba=f.style.backgroundColor.indexOf("rgba")>-1,p(h,function(e,t){t.cache="_"+e,t.props.alpha={idx:3,type:"percent",def:1}}),c.fn=e.extend(c.prototype,{parse:function(s,r,a,l){if(s===t)return this._rgba=[null,null,null,null],this;(s.jquery||s.nodeType)&&(s=e(s).css(r),r=t);var u=this,d=e.type(s),f=this._rgba=[];return r!==t&&(s=[s,r,a,l],d="array"),"string"===d?this.parse(i(s)||o._default):"array"===d?(p(h.rgba.props,function(e,t){f[t.idx]=n(s[t.idx],t)}),this):"object"===d?(s instanceof c?p(h,function(e,t){s[t.cache]&&(u[t.cache]=s[t.cache].slice())}):p(h,function(t,i){var o=i.cache;p(i.props,function(e,t){if(!u[o]&&i.to){if("alpha"===e||null==s[e])return;u[o]=i.to(u._rgba)}u[o][t.idx]=n(s[e],t,!0)}),u[o]&&0>e.inArray(null,u[o].slice(0,3))&&(u[o][3]=1,i.from&&(u._rgba=i.from(u[o])))}),this):t},is:function(e){var n=c(e),i=!0,s=this;return p(h,function(e,o){var r,a=n[o.cache];return a&&(r=s[o.cache]||o.to&&o.to(s._rgba)||[],p(o.props,function(e,n){return null!=a[n.idx]?i=a[n.idx]===r[n.idx]:t})),i}),i},_space:function(){var e=[],t=this;return p(h,function(n,i){t[i.cache]&&e.push(n)}),e.pop()},transition:function(e,t){var i=c(e),s=i._space(),o=h[s],r=0===this.alpha()?c("transparent"):this,a=r[o.cache]||o.to(r._rgba),l=a.slice();return i=i[o.cache],p(o.props,function(e,s){var o=s.idx,r=a[o],c=i[o],h=u[s.type]||{};null!==c&&(null===r?l[o]=c:(h.mod&&(c-r>h.mod/2?r+=h.mod:r-c>h.mod/2&&(r-=h.mod)),l[o]=n((c-r)*t+r,s)))}),this[s](l)},blend:function(t){if(1===this._rgba[3])return this;
var n=this._rgba.slice(),i=n.pop(),s=c(t)._rgba;return c(e.map(n,function(e,t){return(1-i)*s[t]+i*e}))},toRgbaString:function(){var t="rgba(",n=e.map(this._rgba,function(e,t){return null==e?t>2?1:0:e});return 1===n[3]&&(n.pop(),t="rgb("),t+n.join()+")"},toHslaString:function(){var t="hsla(",n=e.map(this.hsla(),function(e,t){return null==e&&(e=t>2?1:0),t&&3>t&&(e=Math.round(100*e)+"%"),e});return 1===n[3]&&(n.pop(),t="hsl("),t+n.join()+")"},toHexString:function(t){var n=this._rgba.slice(),i=n.pop();return t&&n.push(~~(255*i)),"#"+e.map(n,function(e){return e=(e||0).toString(16),1===e.length?"0"+e:e}).join("")},toString:function(){return 0===this._rgba[3]?"transparent":this.toRgbaString()}}),c.fn.parse.prototype=c.fn,h.hsla.to=function(e){if(null==e[0]||null==e[1]||null==e[2])return[null,null,null,e[3]];var t,n,i=e[0]/255,s=e[1]/255,o=e[2]/255,r=e[3],a=Math.max(i,s,o),l=Math.min(i,s,o),c=a-l,h=a+l,u=.5*h;return t=l===a?0:i===a?60*(s-o)/c+360:s===a?60*(o-i)/c+120:60*(i-s)/c+240,n=0===c?0:.5>=u?c/h:c/(2-h),[Math.round(t)%360,n,u,null==r?1:r]},h.hsla.from=function(e){if(null==e[0]||null==e[1]||null==e[2])return[null,null,null,e[3]];var t=e[0]/360,n=e[1],i=e[2],o=e[3],r=.5>=i?i*(1+n):i+n-i*n,a=2*i-r;return[Math.round(255*s(a,r,t+1/3)),Math.round(255*s(a,r,t)),Math.round(255*s(a,r,t-1/3)),o]},p(h,function(i,s){var o=s.props,r=s.cache,l=s.to,h=s.from;c.fn[i]=function(i){if(l&&!this[r]&&(this[r]=l(this._rgba)),i===t)return this[r].slice();var s,a=e.type(i),u="array"===a||"object"===a?i:arguments,d=this[r].slice();return p(o,function(e,t){var i=u["object"===a?e:t.idx];null==i&&(i=d[t.idx]),d[t.idx]=n(i,t)}),h?(s=c(h(d)),s[r]=d,s):c(d)},p(o,function(t,n){c.fn[t]||(c.fn[t]=function(s){var o,r=e.type(s),l="alpha"===t?this._hsla?"hsla":"rgba":i,c=this[l](),h=c[n.idx];return"undefined"===r?h:("function"===r&&(s=s.call(this,h),r=e.type(s)),null==s&&n.empty?this:("string"===r&&(o=a.exec(s),o&&(s=h+parseFloat(o[2])*("+"===o[1]?1:-1))),c[n.idx]=s,this[l](c)))})})}),c.hook=function(t){var n=t.split(" ");p(n,function(t,n){e.cssHooks[n]={set:function(t,s){var o,r,a="";if("transparent"!==s&&("string"!==e.type(s)||(o=i(s)))){if(s=c(o||s),!d.rgba&&1!==s._rgba[3]){for(r="backgroundColor"===n?t.parentNode:t;(""===a||"transparent"===a)&&r&&r.style;)try{a=e.css(r,"backgroundColor"),r=r.parentNode}catch(l){}s=s.blend(a&&"transparent"!==a?a:"_default")}s=s.toRgbaString()}try{t.style[n]=s}catch(l){}}},e.fx.step[n]=function(t){t.colorInit||(t.start=c(t.elem,n),t.end=c(t.end),t.colorInit=!0),e.cssHooks[n].set(t.elem,t.start.transition(t.end,t.pos))}})},c.hook(r),e.cssHooks.borderColor={expand:function(e){var t={};return p(["Top","Right","Bottom","Left"],function(n,i){t["border"+i+"Color"]=e}),t}},o=e.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"}}(b),function(){function t(t){var n,i,s=t.ownerDocument.defaultView?t.ownerDocument.defaultView.getComputedStyle(t,null):t.currentStyle,o={};if(s&&s.length&&s[0]&&s[s[0]])for(i=s.length;i--;)n=s[i],"string"==typeof s[n]&&(o[e.camelCase(n)]=s[n]);else for(n in s)"string"==typeof s[n]&&(o[n]=s[n]);return o}function n(t,n){var i,o,r={};for(i in n)o=n[i],t[i]!==o&&(s[i]||(e.fx.step[i]||!isNaN(parseFloat(o)))&&(r[i]=o));return r}var i=["add","remove","toggle"],s={border:1,borderBottom:1,borderColor:1,borderLeft:1,borderRight:1,borderTop:1,borderWidth:1,margin:1,padding:1};e.each(["borderLeftStyle","borderRightStyle","borderBottomStyle","borderTopStyle"],function(t,n){e.fx.step[n]=function(e){("none"!==e.end&&!e.setAttr||1===e.pos&&!e.setAttr)&&(b.style(e.elem,n,e.end),e.setAttr=!0)}}),e.fn.addBack||(e.fn.addBack=function(e){return this.add(null==e?this.prevObject:this.prevObject.filter(e))}),e.effects.animateClass=function(s,o,r,a){var l=e.speed(o,r,a);return this.queue(function(){var o,r=e(this),a=r.attr("class")||"",c=l.children?r.find("*").addBack():r;c=c.map(function(){var n=e(this);return{el:n,start:t(this)}}),o=function(){e.each(i,function(e,t){s[t]&&r[t+"Class"](s[t])})},o(),c=c.map(function(){return this.end=t(this.el[0]),this.diff=n(this.start,this.end),this}),r.attr("class",a),c=c.map(function(){var t=this,n=e.Deferred(),i=e.extend({},l,{queue:!1,complete:function(){n.resolve(t)}});return this.el.animate(this.diff,i),n.promise()}),e.when.apply(e,c.get()).done(function(){o(),e.each(arguments,function(){var t=this.el;e.each(this.diff,function(e){t.css(e,"")})}),l.complete.call(r[0])})})},e.fn.extend({addClass:function(t){return function(n,i,s,o){return i?e.effects.animateClass.call(this,{add:n},i,s,o):t.apply(this,arguments)}}(e.fn.addClass),removeClass:function(t){return function(n,i,s,o){return arguments.length>1?e.effects.animateClass.call(this,{remove:n},i,s,o):t.apply(this,arguments)}}(e.fn.removeClass),toggleClass:function(t){return function(n,i,s,o,r){return"boolean"==typeof i||void 0===i?s?e.effects.animateClass.call(this,i?{add:n}:{remove:n},s,o,r):t.apply(this,arguments):e.effects.animateClass.call(this,{toggle:n},i,s,o)}}(e.fn.toggleClass),switchClass:function(t,n,i,s,o){return e.effects.animateClass.call(this,{add:n,remove:t},i,s,o)}})}(),function(){function t(t,n,i,s){return e.isPlainObject(t)&&(n=t,t=t.effect),t={effect:t},null==n&&(n={}),e.isFunction(n)&&(s=n,i=null,n={}),("number"==typeof n||e.fx.speeds[n])&&(s=i,i=n,n={}),e.isFunction(i)&&(s=i,i=null),n&&e.extend(t,n),i=i||n.duration,t.duration=e.fx.off?0:"number"==typeof i?i:i in e.fx.speeds?e.fx.speeds[i]:e.fx.speeds._default,t.complete=s||n.complete,t}function n(t){return!(t&&"number"!=typeof t&&!e.fx.speeds[t])||("string"==typeof t&&!e.effects.effect[t]||(!!e.isFunction(t)||"object"==typeof t&&!t.effect))}e.extend(e.effects,{version:"1.11.4",save:function(e,t){for(var n=0;t.length>n;n++)null!==t[n]&&e.data(y+t[n],e[0].style[t[n]])},restore:function(e,t){var n,i;for(i=0;t.length>i;i++)null!==t[i]&&(n=e.data(y+t[i]),void 0===n&&(n=""),e.css(t[i],n))},setMode:function(e,t){return"toggle"===t&&(t=e.is(":hidden")?"show":"hide"),t},getBaseline:function(e,t){var n,i;switch(e[0]){case"top":n=0;break;case"middle":n=.5;break;case"bottom":n=1;break;default:n=e[0]/t.height}switch(e[1]){case"left":i=0;break;case"center":i=.5;break;case"right":i=1;break;default:i=e[1]/t.width}return{x:i,y:n}},createWrapper:function(t){if(t.parent().is(".ui-effects-wrapper"))return t.parent();var n={width:t.outerWidth(!0),height:t.outerHeight(!0),"float":t.css("float")},i=e("<div></div>").addClass("ui-effects-wrapper").css({fontSize:"100%",background:"transparent",border:"none",margin:0,padding:0}),s={width:t.width(),height:t.height()},o=document.activeElement;try{o.id}catch(r){o=document.body}return t.wrap(i),(t[0]===o||e.contains(t[0],o))&&e(o).focus(),i=t.parent(),"static"===t.css("position")?(i.css({position:"relative"}),t.css({position:"relative"})):(e.extend(n,{position:t.css("position"),zIndex:t.css("z-index")}),e.each(["top","left","bottom","right"],function(e,i){n[i]=t.css(i),isNaN(parseInt(n[i],10))&&(n[i]="auto")}),t.css({position:"relative",top:0,left:0,right:"auto",bottom:"auto"})),t.css(s),i.css(n).show()},removeWrapper:function(t){var n=document.activeElement;return t.parent().is(".ui-effects-wrapper")&&(t.parent().replaceWith(t),(t[0]===n||e.contains(t[0],n))&&e(n).focus()),t},setTransition:function(t,n,i,s){return s=s||{},e.each(n,function(e,n){var o=t.cssUnit(n);o[0]>0&&(s[n]=o[0]*i+o[1])}),s}}),e.fn.extend({effect:function(){function n(t){function n(){e.isFunction(o)&&o.call(s[0]),e.isFunction(t)&&t()}var s=e(this),o=i.complete,a=i.mode;(s.is(":hidden")?"hide"===a:"show"===a)?(s[a](),n()):r.call(s[0],i,n)}var i=t.apply(this,arguments),s=i.mode,o=i.queue,r=e.effects.effect[i.effect];return e.fx.off||!r?s?this[s](i.duration,i.complete):this.each(function(){i.complete&&i.complete.call(this)}):o===!1?this.each(n):this.queue(o||"fx",n)},show:function(e){return function(i){if(n(i))return e.apply(this,arguments);var s=t.apply(this,arguments);return s.mode="show",this.effect.call(this,s)}}(e.fn.show),hide:function(e){return function(i){if(n(i))return e.apply(this,arguments);var s=t.apply(this,arguments);return s.mode="hide",this.effect.call(this,s)}}(e.fn.hide),toggle:function(e){return function(i){if(n(i)||"boolean"==typeof i)return e.apply(this,arguments);var s=t.apply(this,arguments);return s.mode="toggle",this.effect.call(this,s)}}(e.fn.toggle),cssUnit:function(t){var n=this.css(t),i=[];return e.each(["em","px","%","pt"],function(e,t){n.indexOf(t)>0&&(i=[parseFloat(n),t])}),i}})}(),function(){var t={};e.each(["Quad","Cubic","Quart","Quint","Expo"],function(e,n){t[n]=function(t){return Math.pow(t,e+2)}}),e.extend(t,{Sine:function(e){return 1-Math.cos(e*Math.PI/2)},Circ:function(e){return 1-Math.sqrt(1-e*e)},Elastic:function(e){return 0===e||1===e?e:-Math.pow(2,8*(e-1))*Math.sin((80*(e-1)-7.5)*Math.PI/15)},Back:function(e){return e*e*(3*e-2)},Bounce:function(e){for(var t,n=4;((t=Math.pow(2,--n))-1)/11>e;);return 1/Math.pow(4,3-n)-7.5625*Math.pow((3*t-2)/22-e,2)}}),e.each(t,function(t,n){e.easing["easeIn"+t]=n,e.easing["easeOut"+t]=function(e){return 1-n(1-e)},e.easing["easeInOut"+t]=function(e){return.5>e?n(2*e)/2:1-n(-2*e+2)/2}})}(),e.effects,e.effects.effect.blind=function(t,n){var i,s,o,r=e(this),a=/up|down|vertical/,l=/up|left|vertical|horizontal/,c=["position","top","bottom","left","right","height","width"],h=e.effects.setMode(r,t.mode||"hide"),u=t.direction||"up",d=a.test(u),f=d?"height":"width",p=d?"top":"left",m=l.test(u),g={},v="show"===h;r.parent().is(".ui-effects-wrapper")?e.effects.save(r.parent(),c):e.effects.save(r,c),r.show(),i=e.effects.createWrapper(r).css({overflow:"hidden"}),s=i[f](),o=parseFloat(i.css(p))||0,g[f]=v?s:0,m||(r.css(d?"bottom":"right",0).css(d?"top":"left","auto").css({position:"absolute"}),g[p]=v?o:s+o),v&&(i.css(f,0),m||i.css(p,o+s)),i.animate(g,{duration:t.duration,easing:t.easing,queue:!1,complete:function(){"hide"===h&&r.hide(),e.effects.restore(r,c),e.effects.removeWrapper(r),n()}})},e.effects.effect.bounce=function(t,n){var i,s,o,r=e(this),a=["position","top","bottom","left","right","height","width"],l=e.effects.setMode(r,t.mode||"effect"),c="hide"===l,h="show"===l,u=t.direction||"up",d=t.distance,f=t.times||5,p=2*f+(h||c?1:0),m=t.duration/p,g=t.easing,v="up"===u||"down"===u?"top":"left",y="up"===u||"left"===u,b=r.queue(),w=b.length;for((h||c)&&a.push("opacity"),e.effects.save(r,a),r.show(),e.effects.createWrapper(r),d||(d=r["top"===v?"outerHeight":"outerWidth"]()/3),h&&(o={opacity:1},o[v]=0,r.css("opacity",0).css(v,y?2*-d:2*d).animate(o,m,g)),c&&(d/=Math.pow(2,f-1)),o={},o[v]=0,i=0;f>i;i++)s={},s[v]=(y?"-=":"+=")+d,r.animate(s,m,g).animate(o,m,g),d=c?2*d:d/2;c&&(s={opacity:0},s[v]=(y?"-=":"+=")+d,r.animate(s,m,g)),r.queue(function(){c&&r.hide(),e.effects.restore(r,a),e.effects.removeWrapper(r),n()}),w>1&&b.splice.apply(b,[1,0].concat(b.splice(w,p+1))),r.dequeue()},e.effects.effect.clip=function(t,n){var i,s,o,r=e(this),a=["position","top","bottom","left","right","height","width"],l=e.effects.setMode(r,t.mode||"hide"),c="show"===l,h=t.direction||"vertical",u="vertical"===h,d=u?"height":"width",f=u?"top":"left",p={};e.effects.save(r,a),r.show(),i=e.effects.createWrapper(r).css({overflow:"hidden"}),s="IMG"===r[0].tagName?i:r,o=s[d](),c&&(s.css(d,0),s.css(f,o/2)),p[d]=c?o:0,p[f]=c?0:o/2,s.animate(p,{queue:!1,duration:t.duration,easing:t.easing,complete:function(){c||r.hide(),e.effects.restore(r,a),e.effects.removeWrapper(r),n()}})},e.effects.effect.drop=function(t,n){var i,s=e(this),o=["position","top","bottom","left","right","opacity","height","width"],r=e.effects.setMode(s,t.mode||"hide"),a="show"===r,l=t.direction||"left",c="up"===l||"down"===l?"top":"left",h="up"===l||"left"===l?"pos":"neg",u={opacity:a?1:0};e.effects.save(s,o),s.show(),e.effects.createWrapper(s),i=t.distance||s["top"===c?"outerHeight":"outerWidth"](!0)/2,a&&s.css("opacity",0).css(c,"pos"===h?-i:i),u[c]=(a?"pos"===h?"+=":"-=":"pos"===h?"-=":"+=")+i,s.animate(u,{queue:!1,duration:t.duration,easing:t.easing,complete:function(){"hide"===r&&s.hide(),e.effects.restore(s,o),e.effects.removeWrapper(s),n()}})},e.effects.effect.explode=function(t,n){function i(){b.push(this),b.length===u*d&&s()}function s(){f.css({visibility:"visible"}),e(b).remove(),m||f.hide(),n()}var o,r,a,l,c,h,u=t.pieces?Math.round(Math.sqrt(t.pieces)):3,d=u,f=e(this),p=e.effects.setMode(f,t.mode||"hide"),m="show"===p,g=f.show().css("visibility","hidden").offset(),v=Math.ceil(f.outerWidth()/d),y=Math.ceil(f.outerHeight()/u),b=[];for(o=0;u>o;o++)for(l=g.top+o*y,h=o-(u-1)/2,r=0;d>r;r++)a=g.left+r*v,c=r-(d-1)/2,f.clone().appendTo("body").wrap("<div></div>").css({position:"absolute",visibility:"visible",left:-r*v,top:-o*y}).parent().addClass("ui-effects-explode").css({position:"absolute",overflow:"hidden",width:v,height:y,left:a+(m?c*v:0),top:l+(m?h*y:0),opacity:m?0:1}).animate({left:a+(m?0:c*v),top:l+(m?0:h*y),opacity:m?1:0},t.duration||500,t.easing,i)},e.effects.effect.fade=function(t,n){var i=e(this),s=e.effects.setMode(i,t.mode||"toggle");i.animate({opacity:s},{queue:!1,duration:t.duration,easing:t.easing,complete:n})},e.effects.effect.fold=function(t,n){var i,s,o=e(this),r=["position","top","bottom","left","right","height","width"],a=e.effects.setMode(o,t.mode||"hide"),l="show"===a,c="hide"===a,h=t.size||15,u=/([0-9]+)%/.exec(h),d=!!t.horizFirst,f=l!==d,p=f?["width","height"]:["height","width"],m=t.duration/2,g={},v={};e.effects.save(o,r),o.show(),i=e.effects.createWrapper(o).css({overflow:"hidden"}),s=f?[i.width(),i.height()]:[i.height(),i.width()],u&&(h=parseInt(u[1],10)/100*s[c?0:1]),l&&i.css(d?{height:0,width:h}:{height:h,width:0}),g[p[0]]=l?s[0]:h,v[p[1]]=l?s[1]:0,i.animate(g,m,t.easing).animate(v,m,t.easing,function(){c&&o.hide(),e.effects.restore(o,r),e.effects.removeWrapper(o),n()})},e.effects.effect.highlight=function(t,n){var i=e(this),s=["backgroundImage","backgroundColor","opacity"],o=e.effects.setMode(i,t.mode||"show"),r={backgroundColor:i.css("backgroundColor")};"hide"===o&&(r.opacity=0),e.effects.save(i,s),i.show().css({backgroundImage:"none",backgroundColor:t.color||"#ffff99"}).animate(r,{queue:!1,duration:t.duration,easing:t.easing,complete:function(){"hide"===o&&i.hide(),e.effects.restore(i,s),n()}})},e.effects.effect.size=function(t,n){var i,s,o,r=e(this),a=["position","top","bottom","left","right","width","height","overflow","opacity"],l=["position","top","bottom","left","right","overflow","opacity"],c=["width","height","overflow"],h=["fontSize"],u=["borderTopWidth","borderBottomWidth","paddingTop","paddingBottom"],d=["borderLeftWidth","borderRightWidth","paddingLeft","paddingRight"],f=e.effects.setMode(r,t.mode||"effect"),p=t.restore||"effect"!==f,m=t.scale||"both",g=t.origin||["middle","center"],v=r.css("position"),y=p?a:l,b={height:0,width:0,outerHeight:0,outerWidth:0};"show"===f&&r.show(),i={height:r.height(),width:r.width(),outerHeight:r.outerHeight(),outerWidth:r.outerWidth()},"toggle"===t.mode&&"show"===f?(r.from=t.to||b,r.to=t.from||i):(r.from=t.from||("show"===f?b:i),r.to=t.to||("hide"===f?b:i)),o={from:{y:r.from.height/i.height,x:r.from.width/i.width},to:{y:r.to.height/i.height,x:r.to.width/i.width}},("box"===m||"both"===m)&&(o.from.y!==o.to.y&&(y=y.concat(u),r.from=e.effects.setTransition(r,u,o.from.y,r.from),r.to=e.effects.setTransition(r,u,o.to.y,r.to)),o.from.x!==o.to.x&&(y=y.concat(d),r.from=e.effects.setTransition(r,d,o.from.x,r.from),r.to=e.effects.setTransition(r,d,o.to.x,r.to))),("content"===m||"both"===m)&&o.from.y!==o.to.y&&(y=y.concat(h).concat(c),r.from=e.effects.setTransition(r,h,o.from.y,r.from),r.to=e.effects.setTransition(r,h,o.to.y,r.to)),e.effects.save(r,y),r.show(),e.effects.createWrapper(r),r.css("overflow","hidden").css(r.from),g&&(s=e.effects.getBaseline(g,i),r.from.top=(i.outerHeight-r.outerHeight())*s.y,r.from.left=(i.outerWidth-r.outerWidth())*s.x,r.to.top=(i.outerHeight-r.to.outerHeight)*s.y,r.to.left=(i.outerWidth-r.to.outerWidth)*s.x),r.css(r.from),("content"===m||"both"===m)&&(u=u.concat(["marginTop","marginBottom"]).concat(h),d=d.concat(["marginLeft","marginRight"]),c=a.concat(u).concat(d),r.find("*[width]").each(function(){var n=e(this),i={height:n.height(),width:n.width(),outerHeight:n.outerHeight(),outerWidth:n.outerWidth()};p&&e.effects.save(n,c),n.from={height:i.height*o.from.y,width:i.width*o.from.x,outerHeight:i.outerHeight*o.from.y,outerWidth:i.outerWidth*o.from.x},n.to={height:i.height*o.to.y,width:i.width*o.to.x,outerHeight:i.height*o.to.y,outerWidth:i.width*o.to.x},o.from.y!==o.to.y&&(n.from=e.effects.setTransition(n,u,o.from.y,n.from),n.to=e.effects.setTransition(n,u,o.to.y,n.to)),o.from.x!==o.to.x&&(n.from=e.effects.setTransition(n,d,o.from.x,n.from),n.to=e.effects.setTransition(n,d,o.to.x,n.to)),n.css(n.from),n.animate(n.to,t.duration,t.easing,function(){p&&e.effects.restore(n,c)})})),r.animate(r.to,{queue:!1,duration:t.duration,easing:t.easing,complete:function(){0===r.to.opacity&&r.css("opacity",r.from.opacity),"hide"===f&&r.hide(),e.effects.restore(r,y),p||("static"===v?r.css({position:"relative",top:r.to.top,left:r.to.left}):e.each(["top","left"],function(e,t){r.css(t,function(t,n){var i=parseInt(n,10),s=e?r.to.left:r.to.top;return"auto"===n?s+"px":i+s+"px"})})),e.effects.removeWrapper(r),n()}})},e.effects.effect.scale=function(t,n){var i=e(this),s=e.extend(!0,{},t),o=e.effects.setMode(i,t.mode||"effect"),r=parseInt(t.percent,10)||(0===parseInt(t.percent,10)?0:"hide"===o?0:100),a=t.direction||"both",l=t.origin,c={height:i.height(),width:i.width(),outerHeight:i.outerHeight(),outerWidth:i.outerWidth()},h={y:"horizontal"!==a?r/100:1,x:"vertical"!==a?r/100:1};s.effect="size",s.queue=!1,s.complete=n,"effect"!==o&&(s.origin=l||["middle","center"],s.restore=!0),s.from=t.from||("show"===o?{height:0,width:0,outerHeight:0,outerWidth:0}:c),s.to={height:c.height*h.y,width:c.width*h.x,outerHeight:c.outerHeight*h.y,outerWidth:c.outerWidth*h.x},s.fade&&("show"===o&&(s.from.opacity=0,s.to.opacity=1),"hide"===o&&(s.from.opacity=1,s.to.opacity=0)),i.effect(s)},e.effects.effect.puff=function(t,n){var i=e(this),s=e.effects.setMode(i,t.mode||"hide"),o="hide"===s,r=parseInt(t.percent,10)||150,a=r/100,l={height:i.height(),width:i.width(),outerHeight:i.outerHeight(),outerWidth:i.outerWidth()};e.extend(t,{effect:"scale",queue:!1,fade:!0,mode:s,complete:n,percent:o?r:100,from:o?l:{height:l.height*a,width:l.width*a,outerHeight:l.outerHeight*a,outerWidth:l.outerWidth*a}}),i.effect(t)},e.effects.effect.pulsate=function(t,n){var i,s=e(this),o=e.effects.setMode(s,t.mode||"show"),r="show"===o,a="hide"===o,l=r||"hide"===o,c=2*(t.times||5)+(l?1:0),h=t.duration/c,u=0,d=s.queue(),f=d.length;for((r||!s.is(":visible"))&&(s.css("opacity",0).show(),u=1),i=1;c>i;i++)s.animate({opacity:u},h,t.easing),u=1-u;s.animate({opacity:u},h,t.easing),s.queue(function(){a&&s.hide(),n()}),f>1&&d.splice.apply(d,[1,0].concat(d.splice(f,c+1))),s.dequeue()},e.effects.effect.shake=function(t,n){var i,s=e(this),o=["position","top","bottom","left","right","height","width"],r=e.effects.setMode(s,t.mode||"effect"),a=t.direction||"left",l=t.distance||20,c=t.times||3,h=2*c+1,u=Math.round(t.duration/h),d="up"===a||"down"===a?"top":"left",f="up"===a||"left"===a,p={},m={},g={},v=s.queue(),y=v.length;for(e.effects.save(s,o),s.show(),e.effects.createWrapper(s),p[d]=(f?"-=":"+=")+l,m[d]=(f?"+=":"-=")+2*l,g[d]=(f?"-=":"+=")+2*l,s.animate(p,u,t.easing),i=1;c>i;i++)s.animate(m,u,t.easing).animate(g,u,t.easing);s.animate(m,u,t.easing).animate(p,u/2,t.easing).queue(function(){"hide"===r&&s.hide(),e.effects.restore(s,o),e.effects.removeWrapper(s),n()}),y>1&&v.splice.apply(v,[1,0].concat(v.splice(y,h+1))),s.dequeue()},e.effects.effect.slide=function(t,n){var i,s=e(this),o=["position","top","bottom","left","right","width","height"],r=e.effects.setMode(s,t.mode||"show"),a="show"===r,l=t.direction||"left",c="up"===l||"down"===l?"top":"left",h="up"===l||"left"===l,u={};e.effects.save(s,o),s.show(),i=t.distance||s["top"===c?"outerHeight":"outerWidth"](!0),e.effects.createWrapper(s).css({overflow:"hidden"}),a&&s.css(c,h?isNaN(i)?"-"+i:-i:i),u[c]=(a?h?"+=":"-=":h?"-=":"+=")+i,s.animate(u,{queue:!1,duration:t.duration,easing:t.easing,complete:function(){"hide"===r&&s.hide(),e.effects.restore(s,o),e.effects.removeWrapper(s),n()}})},e.effects.effect.transfer=function(t,n){var i=e(this),s=e(t.to),o="fixed"===s.css("position"),r=e("body"),a=o?r.scrollTop():0,l=o?r.scrollLeft():0,c=s.offset(),h={top:c.top-a,left:c.left-l,height:s.innerHeight(),width:s.innerWidth()},u=i.offset(),d=e("<div class='ui-effects-transfer'></div>").appendTo(document.body).addClass(t.className).css({top:u.top-a,left:u.left-l,height:i.innerHeight(),width:i.innerWidth(),position:o?"fixed":"absolute"}).animate(h,t.duration,t.easing,function(){d.remove(),n()})}}),function(e){"function"==typeof define&&define.amd?define(["jquery"],e):e(jQuery)}(function(e){var t={exports:{}};return function(){var n,i,s,o,r,a,l,c,h=[].slice,u={}.hasOwnProperty,d=function(e,t){function n(){this.constructor=e}for(var i in t)u.call(t,i)&&(e[i]=t[i]);return n.prototype=t.prototype,e.prototype=new n,e.__super__=t.prototype,e};l=function(){},i=function(){function e(){}return e.prototype.addEventListener=e.prototype.on,e.prototype.on=function(e,t){return this._callbacks=this._callbacks||{},this._callbacks[e]||(this._callbacks[e]=[]),this._callbacks[e].push(t),this},e.prototype.emit=function(){var e,t,n,i,s,o;if(i=arguments[0],e=2<=arguments.length?h.call(arguments,1):[],this._callbacks=this._callbacks||{},n=this._callbacks[i])for(s=0,o=n.length;s<o;s++)t=n[s],t.apply(this,e);return this},e.prototype.removeListener=e.prototype.off,e.prototype.removeAllListeners=e.prototype.off,e.prototype.removeEventListener=e.prototype.off,e.prototype.off=function(e,t){var n,i,s,o,r;if(!this._callbacks||0===arguments.length)return this._callbacks={},this;if(i=this._callbacks[e],!i)return this;if(1===arguments.length)return delete this._callbacks[e],this;for(s=o=0,r=i.length;o<r;s=++o)if(n=i[s],n===t){i.splice(s,1);break}return this},e}(),n=function(e){function t(e,i){var s,o,r;if(this.element=e,this.version=t.version,this.defaultOptions.previewTemplate=this.defaultOptions.previewTemplate.replace(/\n*/g,""),this.clickableElements=[],this.listeners=[],this.files=[],"string"==typeof this.element&&(this.element=document.querySelector(this.element)),!this.element||null==this.element.nodeType)throw new Error("Invalid dropzone element.");if(this.element.dropzone)throw new Error("Dropzone already attached.");if(t.instances.push(this),this.element.dropzone=this,s=null!=(r=t.optionsForElement(this.element))?r:{},this.options=n({},this.defaultOptions,s,null!=i?i:{}),this.options.forceFallback||!t.isBrowserSupported())return this.options.fallback.call(this);if(null==this.options.url&&(this.options.url=this.element.getAttribute("action")),!this.options.url)throw new Error("No URL provided.");if(this.options.acceptedFiles&&this.options.acceptedMimeTypes)throw new Error("You can't provide both 'acceptedFiles' and 'acceptedMimeTypes'. 'acceptedMimeTypes' is deprecated.");this.options.acceptedMimeTypes&&(this.options.acceptedFiles=this.options.acceptedMimeTypes,delete this.options.acceptedMimeTypes),this.options.method=this.options.method.toUpperCase(),(o=this.getExistingFallback())&&o.parentNode&&o.parentNode.removeChild(o),this.options.previewsContainer!==!1&&(this.options.previewsContainer?this.previewsContainer=t.getElement(this.options.previewsContainer,"previewsContainer"):this.previewsContainer=this.element),this.options.clickable&&(this.options.clickable===!0?this.clickableElements=[this.element]:this.clickableElements=t.getElements(this.options.clickable,"clickable")),this.init()}var n,s;return d(t,e),t.prototype.Emitter=i,t.prototype.events=["drop","dragstart","dragend","dragenter","dragover","dragleave","addedfile","addedfiles","removedfile","thumbnail","error","errormultiple","processing","processingmultiple","uploadprogress","totaluploadprogress","sending","sendingmultiple","success","successmultiple","canceled","canceledmultiple","complete","completemultiple","reset","maxfilesexceeded","maxfilesreached","queuecomplete"],t.prototype.defaultOptions={url:null,method:"post",withCredentials:!1,parallelUploads:2,uploadMultiple:!1,maxFilesize:256,paramName:"file",createImageThumbnails:!0,maxThumbnailFilesize:10,thumbnailWidth:120,thumbnailHeight:120,filesizeBase:1e3,maxFiles:null,params:{},clickable:!0,ignoreHiddenFiles:!0,acceptedFiles:null,acceptedMimeTypes:null,autoProcessQueue:!0,autoQueue:!0,addRemoveLinks:!1,previewsContainer:null,hiddenInputContainer:"body",capture:null,renameFilename:null,dictDefaultMessage:"Drop files here to upload",dictFallbackMessage:"Your browser does not support drag'n'drop file uploads.",dictFallbackText:"Please use the fallback form below to upload your files like in the olden days.",dictFileTooBig:"File is too big ({{filesize}}MiB). Max filesize: {{maxFilesize}}MiB.",dictInvalidFileType:"You can't upload files of this type.",dictResponseError:"Server responded with {{statusCode}} code.",dictCancelUpload:"Cancel upload",dictCancelUploadConfirmation:"Are you sure you want to cancel this upload?",dictRemoveFile:"Remove file",dictRemoveFileConfirmation:null,dictMaxFilesExceeded:"You can not upload any more files.",accept:function(e,t){return t()},init:function(){return l},forceFallback:!1,fallback:function(){var e,n,i,s,o,r;for(this.element.className=""+this.element.className+" dz-browser-not-supported",r=this.element.getElementsByTagName("div"),s=0,o=r.length;s<o;s++)e=r[s],/(^| )dz-message($| )/.test(e.className)&&(n=e,e.className="dz-message");return n||(n=t.createElement('<div class="dz-message"><span></span></div>'),this.element.appendChild(n)),i=n.getElementsByTagName("span")[0],i&&(null!=i.textContent?i.textContent=this.options.dictFallbackMessage:null!=i.innerText&&(i.innerText=this.options.dictFallbackMessage)),this.element.appendChild(this.getFallbackForm())},resize:function(e){var t,n,i;return t={srcX:0,srcY:0,srcWidth:e.width,srcHeight:e.height},n=e.width/e.height,t.optWidth=this.options.thumbnailWidth,t.optHeight=this.options.thumbnailHeight,null==t.optWidth&&null==t.optHeight?(t.optWidth=t.srcWidth,t.optHeight=t.srcHeight):null==t.optWidth?t.optWidth=n*t.optHeight:null==t.optHeight&&(t.optHeight=1/n*t.optWidth),i=t.optWidth/t.optHeight,e.height<t.optHeight||e.width<t.optWidth?(t.trgHeight=t.srcHeight,t.trgWidth=t.srcWidth):n>i?(t.srcHeight=e.height,t.srcWidth=t.srcHeight*i):(t.srcWidth=e.width,t.srcHeight=t.srcWidth/i),t.srcX=(e.width-t.srcWidth)/2,t.srcY=(e.height-t.srcHeight)/2,t},drop:function(e){return this.element.classList.remove("dz-drag-hover")},dragstart:l,dragend:function(e){return this.element.classList.remove("dz-drag-hover")},dragenter:function(e){return this.element.classList.add("dz-drag-hover")},dragover:function(e){return this.element.classList.add("dz-drag-hover")},dragleave:function(e){return this.element.classList.remove("dz-drag-hover")},paste:l,reset:function(){return this.element.classList.remove("dz-started")},addedfile:function(e){var n,i,s,o,r,a,l,c,h,u,d,f,p;if(this.element===this.previewsContainer&&this.element.classList.add("dz-started"),this.previewsContainer){for(e.previewElement=t.createElement(this.options.previewTemplate.trim()),e.previewTemplate=e.previewElement,this.previewsContainer.appendChild(e.previewElement),u=e.previewElement.querySelectorAll("[data-dz-name]"),o=0,l=u.length;o<l;o++)n=u[o],n.textContent=this._renameFilename(e.name);for(d=e.previewElement.querySelectorAll("[data-dz-size]"),r=0,c=d.length;r<c;r++)n=d[r],n.innerHTML=this.filesize(e.size);for(this.options.addRemoveLinks&&(e._removeLink=t.createElement('<a class="dz-remove" href="javascript:undefined;" data-dz-remove>'+this.options.dictRemoveFile+"</a>"),e.previewElement.appendChild(e._removeLink)),i=function(n){return function(i){return i.preventDefault(),i.stopPropagation(),e.status===t.UPLOADING?t.confirm(n.options.dictCancelUploadConfirmation,function(){return n.removeFile(e)}):n.options.dictRemoveFileConfirmation?t.confirm(n.options.dictRemoveFileConfirmation,function(){return n.removeFile(e)}):n.removeFile(e)}}(this),f=e.previewElement.querySelectorAll("[data-dz-remove]"),p=[],a=0,h=f.length;a<h;a++)s=f[a],p.push(s.addEventListener("click",i));return p}},removedfile:function(e){var t;return e.previewElement&&null!=(t=e.previewElement)&&t.parentNode.removeChild(e.previewElement),this._updateMaxFilesReachedClass()},thumbnail:function(e,t){var n,i,s,o;if(e.previewElement){for(e.previewElement.classList.remove("dz-file-preview"),o=e.previewElement.querySelectorAll("[data-dz-thumbnail]"),i=0,s=o.length;i<s;i++)n=o[i],n.alt=e.name,n.src=t;return setTimeout(function(t){return function(){return e.previewElement.classList.add("dz-image-preview")}}(this),1)}},error:function(e,t){var n,i,s,o,r;if(e.previewElement){for(e.previewElement.classList.add("dz-error"),"String"!=typeof t&&t.error&&(t=t.error),o=e.previewElement.querySelectorAll("[data-dz-errormessage]"),r=[],i=0,s=o.length;i<s;i++)n=o[i],r.push(n.textContent=t);return r}},errormultiple:l,processing:function(e){if(e.previewElement&&(e.previewElement.classList.add("dz-processing"),e._removeLink))return e._removeLink.textContent=this.options.dictCancelUpload},processingmultiple:l,uploadprogress:function(e,t,n){var i,s,o,r,a;if(e.previewElement){for(r=e.previewElement.querySelectorAll("[data-dz-uploadprogress]"),a=[],s=0,o=r.length;s<o;s++)i=r[s],"PROGRESS"===i.nodeName?a.push(i.value=t):a.push(i.style.width=""+t+"%");return a}},totaluploadprogress:l,sending:l,sendingmultiple:l,success:function(e){if(e.previewElement)return e.previewElement.classList.add("dz-success")},successmultiple:l,canceled:function(e){return this.emit("error",e,"Upload canceled.")},canceledmultiple:l,complete:function(e){if(e._removeLink&&(e._removeLink.textContent=this.options.dictRemoveFile),e.previewElement)return e.previewElement.classList.add("dz-complete")},completemultiple:l,maxfilesexceeded:l,maxfilesreached:l,queuecomplete:l,addedfiles:l,previewTemplate:'<div class="dz-preview dz-file-preview">\n  <div class="dz-image"><img data-dz-thumbnail /></div>\n  <div class="dz-details">\n    <div class="dz-size"><span data-dz-size></span></div>\n    <div class="dz-filename"><span data-dz-name></span></div>\n  </div>\n  <div class="dz-progress"><span class="dz-upload" data-dz-uploadprogress></span></div>\n  <div class="dz-error-message"><span data-dz-errormessage></span></div>\n  <div class="dz-success-mark">\n    <svg width="54px" height="54px" viewBox="0 0 54 54" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:sketch="http://www.bohemiancoding.com/sketch/ns">\n      <title>Check</title>\n      <defs></defs>\n      <g id="Page-1" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd" sketch:type="MSPage">\n        <path d="M23.5,31.8431458 L17.5852419,25.9283877 C16.0248253,24.3679711 13.4910294,24.366835 11.9289322,25.9289322 C10.3700136,27.4878508 10.3665912,30.0234455 11.9283877,31.5852419 L20.4147581,40.0716123 C20.5133999,40.1702541 20.6159315,40.2626649 20.7218615,40.3488435 C22.2835669,41.8725651 24.794234,41.8626202 26.3461564,40.3106978 L43.3106978,23.3461564 C44.8771021,21.7797521 44.8758057,19.2483887 43.3137085,17.6862915 C41.7547899,16.1273729 39.2176035,16.1255422 37.6538436,17.6893022 L23.5,31.8431458 Z M27,53 C41.3594035,53 53,41.3594035 53,27 C53,12.6405965 41.3594035,1 27,1 C12.6405965,1 1,12.6405965 1,27 C1,41.3594035 12.6405965,53 27,53 Z" id="Oval-2" stroke-opacity="0.198794158" stroke="#747474" fill-opacity="0.816519475" fill="#FFFFFF" sketch:type="MSShapeGroup"></path>\n      </g>\n    </svg>\n  </div>\n  <div class="dz-error-mark">\n    <svg width="54px" height="54px" viewBox="0 0 54 54" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:sketch="http://www.bohemiancoding.com/sketch/ns">\n      <title>Error</title>\n      <defs></defs>\n      <g id="Page-1" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd" sketch:type="MSPage">\n        <g id="Check-+-Oval-2" sketch:type="MSLayerGroup" stroke="#747474" stroke-opacity="0.198794158" fill="#FFFFFF" fill-opacity="0.816519475">\n          <path d="M32.6568542,29 L38.3106978,23.3461564 C39.8771021,21.7797521 39.8758057,19.2483887 38.3137085,17.6862915 C36.7547899,16.1273729 34.2176035,16.1255422 32.6538436,17.6893022 L27,23.3431458 L21.3461564,17.6893022 C19.7823965,16.1255422 17.2452101,16.1273729 15.6862915,17.6862915 C14.1241943,19.2483887 14.1228979,21.7797521 15.6893022,23.3461564 L21.3431458,29 L15.6893022,34.6538436 C14.1228979,36.2202479 14.1241943,38.7516113 15.6862915,40.3137085 C17.2452101,41.8726271 19.7823965,41.8744578 21.3461564,40.3106978 L27,34.6568542 L32.6538436,40.3106978 C34.2176035,41.8744578 36.7547899,41.8726271 38.3137085,40.3137085 C39.8758057,38.7516113 39.8771021,36.2202479 38.3106978,34.6538436 L32.6568542,29 Z M27,53 C41.3594035,53 53,41.3594035 53,27 C53,12.6405965 41.3594035,1 27,1 C12.6405965,1 1,12.6405965 1,27 C1,41.3594035 12.6405965,53 27,53 Z" id="Oval-2" sketch:type="MSShapeGroup"></path>\n        </g>\n      </g>\n    </svg>\n  </div>\n</div>'
},n=function(){var e,t,n,i,s,o,r;for(i=arguments[0],n=2<=arguments.length?h.call(arguments,1):[],o=0,r=n.length;o<r;o++){t=n[o];for(e in t)s=t[e],i[e]=s}return i},t.prototype.getAcceptedFiles=function(){var e,t,n,i,s;for(i=this.files,s=[],t=0,n=i.length;t<n;t++)e=i[t],e.accepted&&s.push(e);return s},t.prototype.getRejectedFiles=function(){var e,t,n,i,s;for(i=this.files,s=[],t=0,n=i.length;t<n;t++)e=i[t],e.accepted||s.push(e);return s},t.prototype.getFilesWithStatus=function(e){var t,n,i,s,o;for(s=this.files,o=[],n=0,i=s.length;n<i;n++)t=s[n],t.status===e&&o.push(t);return o},t.prototype.getQueuedFiles=function(){return this.getFilesWithStatus(t.QUEUED)},t.prototype.getUploadingFiles=function(){return this.getFilesWithStatus(t.UPLOADING)},t.prototype.getAddedFiles=function(){return this.getFilesWithStatus(t.ADDED)},t.prototype.getActiveFiles=function(){var e,n,i,s,o;for(s=this.files,o=[],n=0,i=s.length;n<i;n++)e=s[n],e.status!==t.UPLOADING&&e.status!==t.QUEUED||o.push(e);return o},t.prototype.init=function(){var e,n,i,s,o,r,a;for("form"===this.element.tagName&&this.element.setAttribute("enctype","multipart/form-data"),this.element.classList.contains("dropzone")&&!this.element.querySelector(".dz-message")&&this.element.appendChild(t.createElement('<div class="dz-default dz-message"><span>'+this.options.dictDefaultMessage+"</span></div>")),this.clickableElements.length&&(i=function(e){return function(){return e.hiddenFileInput&&e.hiddenFileInput.parentNode.removeChild(e.hiddenFileInput),e.hiddenFileInput=document.createElement("input"),e.hiddenFileInput.setAttribute("type","file"),(null==e.options.maxFiles||e.options.maxFiles>1)&&e.hiddenFileInput.setAttribute("multiple","multiple"),e.hiddenFileInput.className="dz-hidden-input",null!=e.options.acceptedFiles&&e.hiddenFileInput.setAttribute("accept",e.options.acceptedFiles),null!=e.options.capture&&e.hiddenFileInput.setAttribute("capture",e.options.capture),e.hiddenFileInput.style.visibility="hidden",e.hiddenFileInput.style.position="absolute",e.hiddenFileInput.style.top="0",e.hiddenFileInput.style.left="0",e.hiddenFileInput.style.height="0",e.hiddenFileInput.style.width="0",document.querySelector(e.options.hiddenInputContainer).appendChild(e.hiddenFileInput),e.hiddenFileInput.addEventListener("change",function(){var t,n,s,o;if(n=e.hiddenFileInput.files,n.length)for(s=0,o=n.length;s<o;s++)t=n[s],e.addFile(t);return e.emit("addedfiles",n),i()})}}(this))(),this.URL=null!=(r=window.URL)?r:window.webkitURL,a=this.events,s=0,o=a.length;s<o;s++)e=a[s],this.on(e,this.options[e]);return this.on("uploadprogress",function(e){return function(){return e.updateTotalUploadProgress()}}(this)),this.on("removedfile",function(e){return function(){return e.updateTotalUploadProgress()}}(this)),this.on("canceled",function(e){return function(t){return e.emit("complete",t)}}(this)),this.on("complete",function(e){return function(t){if(0===e.getAddedFiles().length&&0===e.getUploadingFiles().length&&0===e.getQueuedFiles().length)return setTimeout(function(){return e.emit("queuecomplete")},0)}}(this)),n=function(e){return e.stopPropagation(),e.preventDefault?e.preventDefault():e.returnValue=!1},this.listeners=[{element:this.element,events:{dragstart:function(e){return function(t){return e.emit("dragstart",t)}}(this),dragenter:function(e){return function(t){return n(t),e.emit("dragenter",t)}}(this),dragover:function(e){return function(t){var i;try{i=t.dataTransfer.effectAllowed}catch(s){}return t.dataTransfer.dropEffect="move"===i||"linkMove"===i?"move":"copy",n(t),e.emit("dragover",t)}}(this),dragleave:function(e){return function(t){return e.emit("dragleave",t)}}(this),drop:function(e){return function(t){return n(t),e.drop(t)}}(this),dragend:function(e){return function(t){return e.emit("dragend",t)}}(this)}}],this.clickableElements.forEach(function(e){return function(n){return e.listeners.push({element:n,events:{click:function(i){return(n!==e.element||i.target===e.element||t.elementInside(i.target,e.element.querySelector(".dz-message")))&&e.hiddenFileInput.click(),!0}}})}}(this)),this.enable(),this.options.init.call(this)},t.prototype.destroy=function(){var e;return this.disable(),this.removeAllFiles(!0),(null!=(e=this.hiddenFileInput)?e.parentNode:void 0)&&(this.hiddenFileInput.parentNode.removeChild(this.hiddenFileInput),this.hiddenFileInput=null),delete this.element.dropzone,t.instances.splice(t.instances.indexOf(this),1)},t.prototype.updateTotalUploadProgress=function(){var e,t,n,i,s,o,r,a;if(i=0,n=0,e=this.getActiveFiles(),e.length){for(a=this.getActiveFiles(),o=0,r=a.length;o<r;o++)t=a[o],i+=t.upload.bytesSent,n+=t.upload.total;s=100*i/n}else s=100;return this.emit("totaluploadprogress",s,n,i)},t.prototype._getParamName=function(e){return"function"==typeof this.options.paramName?this.options.paramName(e):""+this.options.paramName+(this.options.uploadMultiple?"["+e+"]":"")},t.prototype._renameFilename=function(e){return"function"!=typeof this.options.renameFilename?e:this.options.renameFilename(e)},t.prototype.getFallbackForm=function(){var e,n,i,s;return(e=this.getExistingFallback())?e:(i='<div class="dz-fallback">',this.options.dictFallbackText&&(i+="<p>"+this.options.dictFallbackText+"</p>"),i+='<input type="file" name="'+this._getParamName(0)+'" '+(this.options.uploadMultiple?'multiple="multiple"':void 0)+' /><input type="submit" value="Upload!"></div>',n=t.createElement(i),"FORM"!==this.element.tagName?(s=t.createElement('<form action="'+this.options.url+'" enctype="multipart/form-data" method="'+this.options.method+'"></form>'),s.appendChild(n)):(this.element.setAttribute("enctype","multipart/form-data"),this.element.setAttribute("method",this.options.method)),null!=s?s:n)},t.prototype.getExistingFallback=function(){var e,t,n,i,s,o;for(t=function(e){var t,n,i;for(n=0,i=e.length;n<i;n++)if(t=e[n],/(^| )fallback($| )/.test(t.className))return t},o=["div","form"],i=0,s=o.length;i<s;i++)if(n=o[i],e=t(this.element.getElementsByTagName(n)))return e},t.prototype.setupEventListeners=function(){var e,t,n,i,s,o,r;for(o=this.listeners,r=[],i=0,s=o.length;i<s;i++)e=o[i],r.push(function(){var i,s;i=e.events,s=[];for(t in i)n=i[t],s.push(e.element.addEventListener(t,n,!1));return s}());return r},t.prototype.removeEventListeners=function(){var e,t,n,i,s,o,r;for(o=this.listeners,r=[],i=0,s=o.length;i<s;i++)e=o[i],r.push(function(){var i,s;i=e.events,s=[];for(t in i)n=i[t],s.push(e.element.removeEventListener(t,n,!1));return s}());return r},t.prototype.disable=function(){var e,t,n,i,s;for(this.clickableElements.forEach(function(e){return e.classList.remove("dz-clickable")}),this.removeEventListeners(),i=this.files,s=[],t=0,n=i.length;t<n;t++)e=i[t],s.push(this.cancelUpload(e));return s},t.prototype.enable=function(){return this.clickableElements.forEach(function(e){return e.classList.add("dz-clickable")}),this.setupEventListeners()},t.prototype.filesize=function(e){var t,n,i,s,o,r,a,l;if(i=0,s="b",e>0){for(r=["TB","GB","MB","KB","b"],n=a=0,l=r.length;a<l;n=++a)if(o=r[n],t=Math.pow(this.options.filesizeBase,4-n)/10,e>=t){i=e/Math.pow(this.options.filesizeBase,4-n),s=o;break}i=Math.round(10*i)/10}return"<strong>"+i+"</strong> "+s},t.prototype._updateMaxFilesReachedClass=function(){return null!=this.options.maxFiles&&this.getAcceptedFiles().length>=this.options.maxFiles?(this.getAcceptedFiles().length===this.options.maxFiles&&this.emit("maxfilesreached",this.files),this.element.classList.add("dz-max-files-reached")):this.element.classList.remove("dz-max-files-reached")},t.prototype.drop=function(e){var t,n;e.dataTransfer&&(this.emit("drop",e),t=e.dataTransfer.files,this.emit("addedfiles",t),t.length&&(n=e.dataTransfer.items,n&&n.length&&null!=n[0].webkitGetAsEntry?this._addFilesFromItems(n):this.handleFiles(t)))},t.prototype.paste=function(e){var t,n;if(null!=(null!=e&&null!=(n=e.clipboardData)?n.items:void 0))return this.emit("paste",e),t=e.clipboardData.items,t.length?this._addFilesFromItems(t):void 0},t.prototype.handleFiles=function(e){var t,n,i,s;for(s=[],n=0,i=e.length;n<i;n++)t=e[n],s.push(this.addFile(t));return s},t.prototype._addFilesFromItems=function(e){var t,n,i,s,o;for(o=[],i=0,s=e.length;i<s;i++)n=e[i],null!=n.webkitGetAsEntry&&(t=n.webkitGetAsEntry())?t.isFile?o.push(this.addFile(n.getAsFile())):t.isDirectory?o.push(this._addFilesFromDirectory(t,t.name)):o.push(void 0):null!=n.getAsFile&&(null==n.kind||"file"===n.kind)?o.push(this.addFile(n.getAsFile())):o.push(void 0);return o},t.prototype._addFilesFromDirectory=function(e,t){var n,i,s;return n=e.createReader(),i=function(e){return"undefined"!=typeof console&&null!==console&&"function"==typeof console.log?console.log(e):void 0},(s=function(e){return function(){return n.readEntries(function(n){var i,o,r;if(n.length>0){for(o=0,r=n.length;o<r;o++)i=n[o],i.isFile?i.file(function(n){if(!e.options.ignoreHiddenFiles||"."!==n.name.substring(0,1))return n.fullPath=""+t+"/"+n.name,e.addFile(n)}):i.isDirectory&&e._addFilesFromDirectory(i,""+t+"/"+i.name);s()}return null},i)}}(this))()},t.prototype.accept=function(e,n){return e.size>1024*this.options.maxFilesize*1024?n(this.options.dictFileTooBig.replace("{{filesize}}",Math.round(e.size/1024/10.24)/100).replace("{{maxFilesize}}",this.options.maxFilesize)):t.isValidFile(e,this.options.acceptedFiles)?null!=this.options.maxFiles&&this.getAcceptedFiles().length>=this.options.maxFiles?(n(this.options.dictMaxFilesExceeded.replace("{{maxFiles}}",this.options.maxFiles)),this.emit("maxfilesexceeded",e)):this.options.accept.call(this,e,n):n(this.options.dictInvalidFileType)},t.prototype.addFile=function(e){return e.upload={progress:0,total:e.size,bytesSent:0},this.files.push(e),e.status=t.ADDED,this.emit("addedfile",e),this._enqueueThumbnail(e),this.accept(e,function(t){return function(n){return n?(e.accepted=!1,t._errorProcessing([e],n)):(e.accepted=!0,t.options.autoQueue&&t.enqueueFile(e)),t._updateMaxFilesReachedClass()}}(this))},t.prototype.enqueueFiles=function(e){var t,n,i;for(n=0,i=e.length;n<i;n++)t=e[n],this.enqueueFile(t);return null},t.prototype.enqueueFile=function(e){if(e.status!==t.ADDED||e.accepted!==!0)throw new Error("This file can't be queued because it has already been processed or was rejected.");if(e.status=t.QUEUED,this.options.autoProcessQueue)return setTimeout(function(e){return function(){return e.processQueue()}}(this),0)},t.prototype._thumbnailQueue=[],t.prototype._processingThumbnail=!1,t.prototype._enqueueThumbnail=function(e){if(this.options.createImageThumbnails&&e.type.match(/image.*/)&&e.size<=1024*this.options.maxThumbnailFilesize*1024)return this._thumbnailQueue.push(e),setTimeout(function(e){return function(){return e._processThumbnailQueue()}}(this),0)},t.prototype._processThumbnailQueue=function(){if(!this._processingThumbnail&&0!==this._thumbnailQueue.length)return this._processingThumbnail=!0,this.createThumbnail(this._thumbnailQueue.shift(),function(e){return function(){return e._processingThumbnail=!1,e._processThumbnailQueue()}}(this))},t.prototype.removeFile=function(e){if(e.status===t.UPLOADING&&this.cancelUpload(e),this.files=c(this.files,e),this.emit("removedfile",e),0===this.files.length)return this.emit("reset")},t.prototype.removeAllFiles=function(e){var n,i,s,o;for(null==e&&(e=!1),o=this.files.slice(),i=0,s=o.length;i<s;i++)n=o[i],(n.status!==t.UPLOADING||e)&&this.removeFile(n);return null},t.prototype.createThumbnail=function(e,t){var n;return n=new FileReader,n.onload=function(i){return function(){return"image/svg+xml"===e.type?(i.emit("thumbnail",e,n.result),void(null!=t&&t())):i.createThumbnailFromUrl(e,n.result,t)}}(this),n.readAsDataURL(e)},t.prototype.createThumbnailFromUrl=function(e,t,n,i){var s;return s=document.createElement("img"),i&&(s.crossOrigin=i),s.onload=function(t){return function(){var i,o,r,l,c,h,u,d;if(e.width=s.width,e.height=s.height,r=t.options.resize.call(t,e),null==r.trgWidth&&(r.trgWidth=r.optWidth),null==r.trgHeight&&(r.trgHeight=r.optHeight),i=document.createElement("canvas"),o=i.getContext("2d"),i.width=r.trgWidth,i.height=r.trgHeight,a(o,s,null!=(c=r.srcX)?c:0,null!=(h=r.srcY)?h:0,r.srcWidth,r.srcHeight,null!=(u=r.trgX)?u:0,null!=(d=r.trgY)?d:0,r.trgWidth,r.trgHeight),l=i.toDataURL("image/png"),t.emit("thumbnail",e,l),null!=n)return n()}}(this),null!=n&&(s.onerror=n),s.src=t},t.prototype.processQueue=function(){var e,t,n,i;if(t=this.options.parallelUploads,n=this.getUploadingFiles().length,e=n,!(n>=t)&&(i=this.getQueuedFiles(),i.length>0)){if(this.options.uploadMultiple)return this.processFiles(i.slice(0,t-n));for(;e<t;){if(!i.length)return;this.processFile(i.shift()),e++}}},t.prototype.processFile=function(e){return this.processFiles([e])},t.prototype.processFiles=function(e){var n,i,s;for(i=0,s=e.length;i<s;i++)n=e[i],n.processing=!0,n.status=t.UPLOADING,this.emit("processing",n);return this.options.uploadMultiple&&this.emit("processingmultiple",e),this.uploadFiles(e)},t.prototype._getFilesWithXhr=function(e){var t,n;return n=function(){var n,i,s,o;for(s=this.files,o=[],n=0,i=s.length;n<i;n++)t=s[n],t.xhr===e&&o.push(t);return o}.call(this)},t.prototype.cancelUpload=function(e){var n,i,s,o,r,a,l;if(e.status===t.UPLOADING){for(i=this._getFilesWithXhr(e.xhr),s=0,r=i.length;s<r;s++)n=i[s],n.status=t.CANCELED;for(e.xhr.abort(),o=0,a=i.length;o<a;o++)n=i[o],this.emit("canceled",n);this.options.uploadMultiple&&this.emit("canceledmultiple",i)}else(l=e.status)!==t.ADDED&&l!==t.QUEUED||(e.status=t.CANCELED,this.emit("canceled",e),this.options.uploadMultiple&&this.emit("canceledmultiple",[e]));if(this.options.autoProcessQueue)return this.processQueue()},s=function(){var e,t;return t=arguments[0],e=2<=arguments.length?h.call(arguments,1):[],"function"==typeof t?t.apply(this,e):t},t.prototype.uploadFile=function(e){return this.uploadFiles([e])},t.prototype.uploadFiles=function(e){var i,o,r,a,l,c,h,u,d,f,p,m,g,v,y,b,w,_,C,x,T,S,D,E,k,N,A,I,R,P,O,M,L,H;for(C=new XMLHttpRequest,x=0,E=e.length;x<E;x++)i=e[x],i.xhr=C;m=s(this.options.method,e),w=s(this.options.url,e),C.open(m,w,!0),C.withCredentials=!!this.options.withCredentials,y=null,r=function(t){return function(){var n,s,o;for(o=[],n=0,s=e.length;n<s;n++)i=e[n],o.push(t._errorProcessing(e,y||t.options.dictResponseError.replace("{{statusCode}}",C.status),C));return o}}(this),b=function(t){return function(n){var s,o,r,a,l,c,h,u,d;if(null!=n)for(o=100*n.loaded/n.total,r=0,c=e.length;r<c;r++)i=e[r],i.upload={progress:o,total:n.total,bytesSent:n.loaded};else{for(s=!0,o=100,a=0,h=e.length;a<h;a++)i=e[a],100===i.upload.progress&&i.upload.bytesSent===i.upload.total||(s=!1),i.upload.progress=o,i.upload.bytesSent=i.upload.total;if(s)return}for(d=[],l=0,u=e.length;l<u;l++)i=e[l],d.push(t.emit("uploadprogress",i,o,i.upload.bytesSent));return d}}(this),C.onload=function(n){return function(i){var s;if(e[0].status!==t.CANCELED&&4===C.readyState){if(y=C.responseText,C.getResponseHeader("content-type")&&~C.getResponseHeader("content-type").indexOf("application/json"))try{y=JSON.parse(y)}catch(o){i=o,y="Invalid JSON response from server."}return b(),200<=(s=C.status)&&s<300?n._finished(e,y,i):r()}}}(this),C.onerror=function(n){return function(){if(e[0].status!==t.CANCELED)return r()}}(this),v=null!=(R=C.upload)?R:C,v.onprogress=b,c={Accept:"application/json","Cache-Control":"no-cache","X-Requested-With":"XMLHttpRequest"},this.options.headers&&n(c,this.options.headers);for(a in c)l=c[a],l&&C.setRequestHeader(a,l);if(o=new FormData,this.options.params){P=this.options.params;for(p in P)_=P[p],o.append(p,_)}for(T=0,k=e.length;T<k;T++)i=e[T],this.emit("sending",i,C,o);if(this.options.uploadMultiple&&this.emit("sendingmultiple",e,C,o),"FORM"===this.element.tagName)for(O=this.element.querySelectorAll("input, textarea, select, button"),S=0,N=O.length;S<N;S++)if(u=O[S],d=u.getAttribute("name"),f=u.getAttribute("type"),"SELECT"===u.tagName&&u.hasAttribute("multiple"))for(M=u.options,D=0,A=M.length;D<A;D++)g=M[D],g.selected&&o.append(d,g.value);else(!f||"checkbox"!==(L=f.toLowerCase())&&"radio"!==L||u.checked)&&o.append(d,u.value);for(h=I=0,H=e.length-1;0<=H?I<=H:I>=H;h=0<=H?++I:--I)o.append(this._getParamName(h),e[h],this._renameFilename(e[h].name));return this.submitRequest(C,o,e)},t.prototype.submitRequest=function(e,t,n){return e.send(t)},t.prototype._finished=function(e,n,i){var s,o,r;for(o=0,r=e.length;o<r;o++)s=e[o],s.status=t.SUCCESS,this.emit("success",s,n,i),this.emit("complete",s);if(this.options.uploadMultiple&&(this.emit("successmultiple",e,n,i),this.emit("completemultiple",e)),this.options.autoProcessQueue)return this.processQueue()},t.prototype._errorProcessing=function(e,n,i){var s,o,r;for(o=0,r=e.length;o<r;o++)s=e[o],s.status=t.ERROR,this.emit("error",s,n,i),this.emit("complete",s);if(this.options.uploadMultiple&&(this.emit("errormultiple",e,n,i),this.emit("completemultiple",e)),this.options.autoProcessQueue)return this.processQueue()},t}(i),n.version="4.3.0",n.options={},n.optionsForElement=function(e){return e.getAttribute("id")?n.options[s(e.getAttribute("id"))]:void 0},n.instances=[],n.forElement=function(e){if("string"==typeof e&&(e=document.querySelector(e)),null==(null!=e?e.dropzone:void 0))throw new Error("No Dropzone found for given element. This is probably because you're trying to access it before Dropzone had the time to initialize. Use the `init` option to setup any additional observers on your Dropzone.");return e.dropzone},n.autoDiscover=!0,n.discover=function(){var e,t,i,s,o,r;for(document.querySelectorAll?i=document.querySelectorAll(".dropzone"):(i=[],e=function(e){var t,n,s,o;for(o=[],n=0,s=e.length;n<s;n++)t=e[n],/(^| )dropzone($| )/.test(t.className)?o.push(i.push(t)):o.push(void 0);return o},e(document.getElementsByTagName("div")),e(document.getElementsByTagName("form"))),r=[],s=0,o=i.length;s<o;s++)t=i[s],n.optionsForElement(t)!==!1?r.push(new n(t)):r.push(void 0);return r},n.blacklistedBrowsers=[/opera.*Macintosh.*version\/12/i],n.isBrowserSupported=function(){var e,t,i,s,o;if(e=!0,window.File&&window.FileReader&&window.FileList&&window.Blob&&window.FormData&&document.querySelector)if("classList"in document.createElement("a"))for(o=n.blacklistedBrowsers,i=0,s=o.length;i<s;i++)t=o[i],t.test(navigator.userAgent)&&(e=!1);else e=!1;else e=!1;return e},c=function(e,t){var n,i,s,o;for(o=[],i=0,s=e.length;i<s;i++)n=e[i],n!==t&&o.push(n);return o},s=function(e){return e.replace(/[\-_](\w)/g,function(e){return e.charAt(1).toUpperCase()})},n.createElement=function(e){var t;return t=document.createElement("div"),t.innerHTML=e,t.childNodes[0]},n.elementInside=function(e,t){if(e===t)return!0;for(;e=e.parentNode;)if(e===t)return!0;return!1},n.getElement=function(e,t){var n;if("string"==typeof e?n=document.querySelector(e):null!=e.nodeType&&(n=e),null==n)throw new Error("Invalid `"+t+"` option provided. Please provide a CSS selector or a plain HTML element.");return n},n.getElements=function(e,t){var n,i,s,o,r,a,l,c;if(e instanceof Array){s=[];try{for(o=0,a=e.length;o<a;o++)i=e[o],s.push(this.getElement(i,t))}catch(h){n=h,s=null}}else if("string"==typeof e)for(s=[],c=document.querySelectorAll(e),r=0,l=c.length;r<l;r++)i=c[r],s.push(i);else null!=e.nodeType&&(s=[e]);if(null==s||!s.length)throw new Error("Invalid `"+t+"` option provided. Please provide a CSS selector, a plain HTML element or a list of those.");return s},n.confirm=function(e,t,n){return window.confirm(e)?t():null!=n?n():void 0},n.isValidFile=function(e,t){var n,i,s,o,r;if(!t)return!0;for(t=t.split(","),i=e.type,n=i.replace(/\/.*$/,""),o=0,r=t.length;o<r;o++)if(s=t[o],s=s.trim(),"."===s.charAt(0)){if(e.name.toLowerCase().indexOf(s.toLowerCase(),e.name.length-s.length)!==-1)return!0}else if(/\/\*$/.test(s)){if(n===s.replace(/\/.*$/,""))return!0}else if(i===s)return!0;return!1},"undefined"!=typeof e&&null!==e&&(e.fn.dropzone=function(e){return this.each(function(){return new n(this,e)})}),"undefined"!=typeof t&&null!==t?t.exports=n:window.Dropzone=n,n.ADDED="added",n.QUEUED="queued",n.ACCEPTED=n.QUEUED,n.UPLOADING="uploading",n.PROCESSING=n.UPLOADING,n.CANCELED="canceled",n.ERROR="error",n.SUCCESS="success",r=function(e){var t,n,i,s,o,r,a,l,c,h;for(a=e.naturalWidth,r=e.naturalHeight,n=document.createElement("canvas"),n.width=1,n.height=r,i=n.getContext("2d"),i.drawImage(e,0,0),s=i.getImageData(0,0,1,r).data,h=0,o=r,l=r;l>h;)t=s[4*(l-1)+3],0===t?o=l:h=l,l=o+h>>1;return c=l/r,0===c?1:c},a=function(e,t,n,i,s,o,a,l,c,h){var u;return u=r(t),e.drawImage(t,n,i,s,o,a,l,c,h/u)},o=function(e,t){var n,i,s,o,r,a,l,c,h;if(s=!1,h=!0,i=e.document,c=i.documentElement,n=i.addEventListener?"addEventListener":"attachEvent",l=i.addEventListener?"removeEventListener":"detachEvent",a=i.addEventListener?"":"on",o=function(n){if("readystatechange"!==n.type||"complete"===i.readyState)return("load"===n.type?e:i)[l](a+n.type,o,!1),!s&&(s=!0)?t.call(e,n.type||n):void 0},r=function(){var e;try{c.doScroll("left")}catch(t){return e=t,void setTimeout(r,50)}return o("poll")},"complete"!==i.readyState){if(i.createEventObject&&c.doScroll){try{h=!e.frameElement}catch(u){}h&&r()}return i[n](a+"DOMContentLoaded",o,!1),i[n](a+"readystatechange",o,!1),e[n](a+"load",o,!1)}},n._autoDiscoverFunction=function(){if(n.autoDiscover)return n.discover()},o(window,n._autoDiscoverFunction)}.call(this),t.exports}),$(document).ready(function(){$("#list-items").sortable({axis:"y",update:function(){var e=$("#list-items").sortable("serialize");$.ajax({type:"GET",dataType:"JSON",url:"order/ajax",data:e}),$(".load-page").fadeIn("fast"),location.reload()}}),$("form").submit(function(){$(".load-page").fadeIn("fast")}),$("div.msg-all").delay(3500).fadeOut("normal"),$("a#envia").click(function(){$(".load-page").fadeIn("fast")}),$("#datatabless").DataTable({fnClearTable:0,iDefaultSortIndex:0,aaSorting:[],autoWidth:!0,language:{sEmptyTable:"Nenhum registro encontrado",sInfo:"Mostrando de _START_ até _END_ de _TOTAL_ registros",sInfoEmpty:"Mostrando 0 até 0 de 0 registros",sInfoFiltered:"(Filtrados de _MAX_ registros)",sInfoPostFix:"",sInfoThousands:".",sLengthMenu:"_MENU_ Resultados por página",sLoadingRecords:"Carregando...",sProcessing:"Processando...",sZeroRecords:"Nenhum registro encontrado",sSearch:"Pesquisar ",oPaginate:{sNext:"Próximo",sPrevious:"Anterior",sFirst:"Primeiro",sLast:"Último"},oAria:{sSortAscending:": Ordenar colunas de forma ascendente",sSortDescending:": Ordenar colunas de forma descendente"}}})});

Anon7 - 2022
AnonSec Team