THIS IS A TEST INSTANCE ONLY! REPOSITORIES CAN BE DELETED AT ANY TIME!

Browse Source

perf: Minify and concat js files

tags/v1.0.0
Suwon Chae 3 years ago
parent
commit
638f32aa84
8 changed files with 495 additions and 29 deletions
  1. +2
    -24
      app/views/common/scripts.scala.html
  2. +1
    -5
      app/views/layout.scala.html
  3. +14
    -0
      minify-js.sh
  4. +6
    -0
      public/bootstrap/js/bootstrap.min.js
  5. BIN
      public/compiler.jar
  6. +218
    -0
      public/javascripts/yona-common.js
  7. +211
    -0
      public/javascripts/yona-layout.js
  8. +43
    -0
      public/javascripts/yona-lib.js

+ 2
- 24
app/views/common/scripts.scala.html View File

@@ -55,32 +55,10 @@
}

<script type="text/javascript" src="@routes.Application.jsMessages()"></script>
<script type="text/javascript" src="@routes.Assets.at("javascripts/lib/jquery/jquery.tmpl.js")"></script>
<script type="text/javascript" src="@routes.Assets.at("javascripts/lib/jquery/jquery.form.js")"></script>
<script type="text/javascript" src="@routes.Assets.at("javascripts/lib/jquery/jquery.validate.js")"></script>
<script type="text/javascript" src="@routes.Assets.at("javascripts/lib/jquery/jquery.zclip.min.js")"></script>
<script type="text/javascript" src="@routes.Assets.at("javascripts/lib/jquery/jquery.placeholder.min.js")"></script>
<script type="text/javascript" src="@routes.Assets.at("javascripts/lib/jquery/jquery.requestAs.js")"></script>
<script type="text/javascript" src="@routes.Assets.at("javascripts/lib/jquery/jquery.search.js")"></script>
<script type="text/javascript" src="@routes.Assets.at("bootstrap/js/bootstrap.js")"></script>
<script type="text/javascript" src="@routes.Assets.at("javascripts/yona-common.js")"></script>
<script type="text/javascript" src="@routes.Assets.at("bootstrap/js/bootstrap-better-typeahead.js")"></script>
<script type="text/javascript" src="@routes.Assets.at("bootstrap/js/bootstrap-switch.js")"></script>
<script type="text/javascript" src="@routes.Assets.at("javascripts/lib/rgbcolor.js")"></script>
<script type="text/javascript" src="@routes.Assets.at("javascripts/lib/humanize.js")"></script>
<script type="text/javascript" src="@routes.Assets.at("javascripts/lib/validate.js")"></script>
<script type="text/javascript" src="@routes.Assets.at("javascripts/lib/xss.js")"></script>
<script type="text/javascript" src="@routes.Assets.at("javascripts/common/yobi.Attachments.js")"></script>
<script type="text/javascript" src="@routes.Assets.at("javascripts/common/yobi.Files.js")"></script>
<script type="text/javascript" src="@routes.Assets.at("javascripts/common/yobi.Mention.js")"></script>
<script type="text/javascript" src="@routes.Assets.at("javascripts/common/yobi.Markdown.js")"></script>
<script type="text/javascript" src="@routes.Assets.at("javascripts/common/yobi.Pagination.js")"></script>
<script type="text/javascript" src="@routes.Assets.at("javascripts/common/yobi.ShortcutKey.js")"></script>
<script type="text/javascript" src="@routes.Assets.at("javascripts/common/yobi.ui.Dropdown.js")"></script>
<script type="text/javascript" src="@routes.Assets.at("javascripts/common/yobi.ui.Typeahead.js")"></script>
<script type="text/javascript" src="@routes.Assets.at("javascripts/common/yobi.ui.Dialog.js")"></script>
<script type="text/javascript" src="@routes.Assets.at("javascripts/common/yobi.ui.Toast.js")"></script>
<script type="text/javascript" src="@routes.Assets.at("javascripts/common/yobi.ui.Tabs.js")"></script>
<script type="text/javascript" src="@routes.Assets.at("javascripts/common/yobi.OriginalMessage.js")"></script>
<script type="text/javascript" src="@routes.Assets.at("javascripts/yona-lib.js")"></script>

<script type="text/javascript">
$yobi.setScriptPath("@getJSPath");


+ 1
- 5
app/views/layout.scala.html View File

@@ -35,14 +35,10 @@
<link rel="stylesheet" type="text/css" media="all" href="@routes.Assets.at("stylesheets/yobi.css")">
<link rel='stylesheet' href="@routes.Assets.at("javascripts/lib/nprogress/nprogress.css")"/>

<script type="text/javascript" src="@routes.Assets.at("javascripts/lib/nprogress/nprogress.js")"></script>
<script type="text/javascript" src="@routes.Assets.at("javascripts/yona-layout.js")"></script>
<script type="text/javascript">
NProgress.configure({ minimum: 0.6 });
</script>
<script type="text/javascript" src="@routes.Assets.at("javascripts/lib/jquery/jquery-1.9.0.js")"></script>
<script type="text/javascript" src="@routes.Assets.at("javascripts/lib/jquery/jquery.browser.js")"></script>
<script type="text/javascript" src="@routes.Assets.at("javascripts/lib/jquery/jquery.pjax.js")"></script>
<script type="text/javascript" src="@routes.Assets.at("javascripts/common/yobi.Common.js")"></script>
</head>

<body class="@theme">


+ 14
- 0
minify-js.sh View File

@@ -0,0 +1,14 @@
# yona-layout.js

CLOSURE_COMPILER="public/compiler.jar"
OUT_DIR="public/javascripts"
PUBLIC="public"
PUBLIC_JAVASCRIPTS="public/javascripts"

java -jar $CLOSURE_COMPILER --js $PUBLIC_JAVASCRIPTS/lib/nprogress/nprogress.js $PUBLIC_JAVASCRIPTS/lib/jquery/jquery-1.9.0.js $PUBLIC_JAVASCRIPTS/lib/jquery/jquery.browser.js $PUBLIC_JAVASCRIPTS/lib/jquery/jquery.pjax.js $PUBLIC_JAVASCRIPTS/common/yobi.Common.js --js_output_file $OUT_DIR/yona-layout.js

# yona-common.js
java -jar $CLOSURE_COMPILER --js $PUBLIC_JAVASCRIPTS/lib/jquery/jquery.tmpl.js $PUBLIC_JAVASCRIPTS/lib/jquery/jquery.form.js $PUBLIC_JAVASCRIPTS/lib/jquery/jquery.validate.js $PUBLIC_JAVASCRIPTS/lib/jquery/jquery.requestAs.js $PUBLIC_JAVASCRIPTS/lib/jquery/jquery.search.js $PUBLIC_JAVASCRIPTS/lib/jquery/jquery.zclip.min.js $PUBLIC_JAVASCRIPTS/lib/jquery/jquery.placeholder.min.js $PUBLIC/bootstrap/js/bootstrap.js $PUBLIC_JAVASCRIPTS/lib/rgbcolor.js $PUBLIC_JAVASCRIPTS/lib/humanize.js $PUBLIC_JAVASCRIPTS/lib/validate.js $PUBLIC_JAVASCRIPTS/lib/xss.js --js_output_file $OUT_DIR/yona-common.js

# yona-lib.js
java -jar $CLOSURE_COMPILER --js $PUBLIC_JAVASCRIPTS/common/yobi.Attachments.js $PUBLIC_JAVASCRIPTS/common/yobi.Files.js $PUBLIC_JAVASCRIPTS/common/yobi.Mention.js $PUBLIC_JAVASCRIPTS/common/yobi.Markdown.js $PUBLIC_JAVASCRIPTS/common/yobi.Pagination.js $PUBLIC_JAVASCRIPTS/common/yobi.ShortcutKey.js $PUBLIC_JAVASCRIPTS/common/yobi.ui.Dropdown.js $PUBLIC_JAVASCRIPTS/common/yobi.ui.Typeahead.js $PUBLIC_JAVASCRIPTS/common/yobi.ui.Dialog.js $PUBLIC_JAVASCRIPTS/common/yobi.ui.Toast.js $PUBLIC_JAVASCRIPTS/common/yobi.ui.Tabs.js $PUBLIC_JAVASCRIPTS/common/yobi.OriginalMessage.js --js_output_file $OUT_DIR/yona-lib.js

+ 6
- 0
public/bootstrap/js/bootstrap.min.js
File diff suppressed because it is too large
View File


BIN
public/compiler.jar View File


+ 218
- 0
public/javascripts/yona-common.js View File

@@ -0,0 +1,218 @@
(function(a,b){function d(c,b,g,d){d={data:d||0===d||!1===d?d:b?b.data:{},_wrap:b?b._wrap:null,tmpl:null,parent:b||null,nodes:[],calls:r,nest:p,wrap:q,html:n,update:m};c&&a.extend(d,c,{nodes:[],parent:b});g&&(d.tmpl=g,d._ctnt=d._ctnt||d.tmpl(a,d),d.key=++C,(D.length?w:v)[C]=d);return d}function c(b,d,g){var f;g=g?a.map(g,function(a){return"string"===typeof a?b.key?a.replace(/(<\w+)(?=[\s>])(?![^>]*_tmplitem)([^>]*)/g,'$1 _tmplitem="'+b.key+'" $2'):a:c(a,b,a._ctnt)}):b;if(d)return g;g=g.join("");g.replace(/^\s*([^<\s][^<]*)?(<[\w\W]+>)([^>]*[^>\s])?\s*$/,
function(c,b,d,g){f=a(d).get();h(f);b&&(f=e(b).concat(f));g&&(f=f.concat(e(g)))});return f?f:e(g)}function e(c){var b=document.createElement("div");b.innerHTML=c;return a.makeArray(b.childNodes)}function g(c){return new Function("jQuery","$item","var $=jQuery,call,__=[],$data=$item.data;with($data){__.push('"+a.trim(c).replace(/([\\'])/g,"\\$1").replace(/[\r\t\n]/g," ").replace(/\$\{([^\}]*)\}/g,"{{= $1}}").replace(/\{\{(\/?)(\w+|.)(?:\(((?:[^\}]|\}(?!\}))*?)?\))?(?:\s+(.*?)?)?(\(((?:[^\}]|\}(?!\}))*?)\))?\s*\}\}/g,
function(c,b,d,g,f,e,k){c=a.tmpl.tag[d];if(!c)throw"Unknown template tag: "+d;d=c._default||[];e&&!/\w$/.test(f)&&(f+=e,e="");f?(f=l(f),k=k?","+l(k)+")":e?")":"",k=e?-1<f.indexOf(".")?f+l(e):"("+f+").call($item"+k:f,e=e?k:"(typeof("+f+")==='function'?("+f+").call($item):("+f+"))"):e=k=d.$1||"null";g=l(g);return"');"+c[b?"close":"open"].split("$notnull_1").join(f?"typeof("+f+")!=='undefined' && ("+f+")!=null":"true").split("$1a").join(e).split("$1").join(k).split("$2").join(g||d.$2||"")+"__.push('"})+
"');}return __;")}function f(b,f){b._wrap=c(b,!0,a.isArray(f)?f:[u.test(f)?f:a(f).html()]).join("")}function l(a){return a?a.replace(/\\'/g,"'").replace(/\\\\/g,"\\"):null}function h(c){function b(c){function g(a){a+=f;h=l[a]=l[a]||d(h,v[h.parent.key+f]||h.parent)}var e,k=c,h,A;if(A=c.getAttribute("_tmplitem")){for(;k.parentNode&&1===(k=k.parentNode).nodeType&&!(e=k.getAttribute("_tmplitem")););e!==A&&(k=k.parentNode?11===k.nodeType?0:k.getAttribute("_tmplitem")||0:0,(h=v[A])||(h=w[A],h=d(h,v[k]||
w[k]),h.key=++C,v[C]=h),z&&g(A));c.removeAttribute("_tmplitem")}else z&&(h=a.data(c,"tmplItem"))&&(g(h.key),v[h.key]=h,k=(k=a.data(c.parentNode,"tmplItem"))?k.key:0);if(h){for(e=h;e&&e.key!=k;)e.nodes.push(c),e=e.parent;delete h._ctnt;delete h._wrap;a.data(c,"tmplItem",h)}}var f="_"+z,g,e,l={},k,h,m;k=0;for(h=c.length;k<h;k++)if(1===(g=c[k]).nodeType){e=g.getElementsByTagName("*");for(m=e.length-1;0<=m;m--)b(e[m]);b(g)}}function r(a,c,b,f){if(!a)return D.pop();D.push({_:a,tmpl:c,item:this,data:b,
options:f})}function p(c,b,f){return a.tmpl(a.template(c),b,f,this)}function q(c,b){var f=c.options||{};f.wrapped=b;return a.tmpl(a.template(c.tmpl),c.data,f,c.item)}function n(c,b){var f=this._wrap;return a.map(a(a.isArray(f)?f.join(""):f).filter(c||"*"),function(a){if(b)a=a.innerText||a.textContent;else{var c;(c=a.outerHTML)||(c=document.createElement("div"),c.appendChild(a.cloneNode(!0)),c=c.innerHTML);a=c}return a})}function m(){var c=this.nodes;a.tmpl(null,null,null,this).insertBefore(c[0]);
a(c).remove()}var k=a.fn.domManip,u=/^[^<]*(<[\w\W]+>)[^>]*$|\{\{\! /,v={},w={},y,H={key:0,data:{}},C=0,z=0,D=[];a.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(c,b){a.fn[c]=function(f){var g=[];f=a(f);var d,e,k;d=1===this.length&&this[0].parentNode;y=v||{};if(d&&11===d.nodeType&&1===d.childNodes.length&&1===f.length)f[b](this[0]),g=this;else{e=0;for(k=f.length;e<k;e++)z=e,d=(0<e?this.clone(!0):this).get(),a(f[e])[b](d),g=
g.concat(d);z=0;g=this.pushStack(g,c,f.selector)}f=y;y=null;a.tmpl.complete(f);return g}});a.fn.extend({tmpl:function(c,b,f){return a.tmpl(this[0],c,b,f)},tmplItem:function(){return a.tmplItem(this[0])},template:function(c){return a.template(c,this[0])},domManip:function(c,b,f,g){if(c[0]&&a.isArray(c[0])){for(var d=a.makeArray(arguments),e=c[0],l=e.length,h=0,m;h<l&&!(m=a.data(e[h++],"tmplItem")););m&&z&&(d[2]=function(c){a.tmpl.afterManip(this,c,f)});k.apply(this,d)}else k.apply(this,arguments);
z=0;y||a.tmpl.complete(v);return this}});a.extend({tmpl:function(b,g,e,k){var l=!k;if(l)k=H,b=a.template[b]||a.template(null,b),w={};else if(!b)return b=k.tmpl,v[k.key]=k,k.nodes=[],k.wrapped&&f(k,k.wrapped),a(c(k,null,k.tmpl(a,k)));if(!b)return[];"function"===typeof g&&(g=g.call(k||{}));e&&e.wrapped&&f(e,e.wrapped);g=a.isArray(g)?a.map(g,function(a){return a?d(e,k,b,a):null}):[d(e,k,b,g)];return l?a(c(k,null,g)):g},tmplItem:function(c){var b;for(c instanceof a&&(c=c[0]);c&&1===c.nodeType&&!(b=a.data(c,
"tmplItem"))&&(c=c.parentNode););return b||H},template:function(c,b){return b?("string"===typeof b?b=g(b):b instanceof a&&(b=b[0]||{}),b.nodeType&&(b=a.data(b,"tmpl")||a.data(b,"tmpl",g(b.innerHTML))),"string"===typeof c?a.template[c]=b:b):c?"string"!==typeof c?a.template(null,c):a.template[c]||a.template(null,u.test(c)?c:a(c)):null},encode:function(c){return(""+c).split("<").join("&lt;").split(">").join("&gt;").split('"').join("&#34;").split("'").join("&#39;")}});a.extend(a.tmpl,{tag:{tmpl:{_default:{$2:"null"},
open:"if($notnull_1){__=__.concat($item.nest($1,$2));}"},wrap:{_default:{$2:"null"},open:"$item.calls(__,$1,$2);__=[];",close:"call=$item.calls();__=call._.concat($item.wrap(call,__));"},each:{_default:{$2:"$index, $value"},open:"if($notnull_1){$.each($1a,function($2){with(this){",close:"}});}"},"if":{open:"if(($notnull_1) && $1a){",close:"}"},"else":{_default:{$1:"true"},open:"}else if(($notnull_1) && $1a){"},html:{open:"if($notnull_1){__.push($1a);}"},"=":{_default:{$1:"$data"},open:"if($notnull_1){__.push($.encode($1a));}"},
"!":{open:""}},complete:function(c){v={}},afterManip:function(c,b,f){var g=11===b.nodeType?a.makeArray(b.childNodes):1===b.nodeType?[b]:[];f.call(c,b);h(g);z++}})})(jQuery);!function(a){a(function(){var b=a.support,d;a:{d=document.createElement("bootstrap");var c={WebkitTransition:"webkitTransitionEnd",MozTransition:"transitionend",OTransition:"oTransitionEnd otransitionend",transition:"transitionend"},e;for(e in c)if(void 0!==d.style[e]){d=c[e];break a}d=void 0}b.transition=d&&{end:d}})}(window.jQuery);
!function(a){var b=function(c){a(c).on("click",'[data-dismiss="alert"]',this.close)};b.prototype.close=function(c){function b(){d.trigger("closed").remove()}var g=a(this),f=g.attr("data-target"),d;f||(f=(f=g.attr("href"))&&f.replace(/.*(?=#[^\s]*$)/,""));d=a(f);c&&c.preventDefault();d.length||(d=g.hasClass("alert")?g:g.parent());d.trigger(c=a.Event("close"));c.isDefaultPrevented()||(d.removeClass("in"),a.support.transition&&d.hasClass("fade")?d.on(a.support.transition.end,b):b())};var d=a.fn.alert;
a.fn.alert=function(c){return this.each(function(){var d=a(this),g=d.data("alert");g||d.data("alert",g=new b(this));"string"==typeof c&&g[c].call(d)})};a.fn.alert.Constructor=b;a.fn.alert.noConflict=function(){a.fn.alert=d;return this};a(document).on("click.alert.data-api",'[data-dismiss="alert"]',b.prototype.close)}(window.jQuery);
!function(a){var b=function(c,b){this.$element=a(c);this.options=a.extend({},a.fn.button.defaults,b)};b.prototype.setState=function(c){var a=this.$element,b=a.data(),f=a.is("input")?"val":"html";c+="Text";b.resetText||a.data("resetText",a[f]());a[f](b[c]||this.options[c]);setTimeout(function(){"loadingText"==c?a.addClass("disabled").attr("disabled","disabled"):a.removeClass("disabled").removeAttr("disabled")},0)};b.prototype.toggle=function(){var c=this.$element.closest('[data-toggle="buttons-radio"]');
c&&c.find(".active").removeClass("active");this.$element.toggleClass("active")};var d=a.fn.button;a.fn.button=function(c){return this.each(function(){var d=a(this),g=d.data("button"),f="object"==typeof c&&c;g||d.data("button",g=new b(this,f));"toggle"==c?g.toggle():c&&g.setState(c)})};a.fn.button.defaults={loadingText:"loading..."};a.fn.button.Constructor=b;a.fn.button.noConflict=function(){a.fn.button=d;return this};a(document).on("click.button.data-api","[data-toggle^=button]",function(c){c=a(c.target);
c.hasClass("btn")||(c=c.closest(".btn"));c.button("toggle")})}(window.jQuery);
!function(a){var b=function(c,b){this.$element=a(c);this.$indicators=this.$element.find(".carousel-indicators");this.options=b;"hover"==this.options.pause&&this.$element.on("mouseenter",a.proxy(this.pause,this)).on("mouseleave",a.proxy(this.cycle,this))};b.prototype={cycle:function(c){c||(this.paused=!1);this.interval&&clearInterval(this.interval);this.options.interval&&!this.paused&&(this.interval=setInterval(a.proxy(this.next,this),this.options.interval));return this},getActiveIndex:function(){this.$active=
this.$element.find(".item.active");this.$items=this.$active.parent().children();return this.$items.index(this.$active)},to:function(c){var b=this.getActiveIndex(),d=this;if(!(c>this.$items.length-1||0>c))return this.sliding?this.$element.one("slid",function(){d.to(c)}):b==c?this.pause().cycle():this.slide(c>b?"next":"prev",a(this.$items[c]))},pause:function(c){c||(this.paused=!0);this.$element.find(".next, .prev").length&&a.support.transition.end&&(this.$element.trigger(a.support.transition.end),
this.cycle(!0));clearInterval(this.interval);this.interval=null;return this},next:function(){if(!this.sliding)return this.slide("next")},prev:function(){if(!this.sliding)return this.slide("prev")},slide:function(c,b){var d=this.$element.find(".item.active"),f=b||d[c](),l=this.interval,h="next"==c?"left":"right",r="next"==c?"first":"last",p=this;this.sliding=!0;l&&this.pause();f=f.length?f:this.$element.find(".item")[r]();r=a.Event("slide",{relatedTarget:f[0],direction:h});if(!f.hasClass("active")){this.$indicators.length&&
(this.$indicators.find(".active").removeClass("active"),this.$element.one("slid",function(){var c=a(p.$indicators.children()[p.getActiveIndex()]);c&&c.addClass("active")}));if(a.support.transition&&this.$element.hasClass("slide")){this.$element.trigger(r);if(r.isDefaultPrevented())return;f.addClass(c);f[0].offsetWidth;d.addClass(h);f.addClass(h);this.$element.one(a.support.transition.end,function(){f.removeClass([c,h].join(" ")).addClass("active");d.removeClass(["active",h].join(" "));p.sliding=!1;
setTimeout(function(){p.$element.trigger("slid")},0)})}else{this.$element.trigger(r);if(r.isDefaultPrevented())return;d.removeClass("active");f.addClass("active");this.sliding=!1;this.$element.trigger("slid")}l&&this.cycle();return this}}};var d=a.fn.carousel;a.fn.carousel=function(c){return this.each(function(){var d=a(this),g=d.data("carousel"),f=a.extend({},a.fn.carousel.defaults,"object"==typeof c&&c),l="string"==typeof c?c:f.slide;g||d.data("carousel",g=new b(this,f));if("number"==typeof c)g.to(c);
else if(l)g[l]();else f.interval&&g.pause().cycle()})};a.fn.carousel.defaults={interval:5E3,pause:"hover"};a.fn.carousel.Constructor=b;a.fn.carousel.noConflict=function(){a.fn.carousel=d;return this};a(document).on("click.carousel.data-api","[data-slide], [data-slide-to]",function(c){var b=a(this),d,f=a(b.attr("data-target")||(d=b.attr("href"))&&d.replace(/.*(?=#[^\s]+$)/,""));d=a.extend({},f.data(),b.data());var l;f.carousel(d);(l=b.attr("data-slide-to"))&&f.data("carousel").pause().to(l).cycle();
c.preventDefault()})}(window.jQuery);
!function(a){var b=function(c,b){this.$element=a(c);this.options=a.extend({},a.fn.collapse.defaults,b);this.options.parent&&(this.$parent=a(this.options.parent));this.options.toggle&&this.toggle()};b.prototype={constructor:b,dimension:function(){return this.$element.hasClass("width")?"width":"height"},show:function(){var c,b,d,f;if(!this.transitioning&&!this.$element.hasClass("in")){c=this.dimension();b=a.camelCase(["scroll",c].join("-"));if((d=this.$parent&&this.$parent.find("> .accordion-group > .in"))&&d.length){if((f=
d.data("collapse"))&&f.transitioning)return;d.collapse("hide");f||d.data("collapse",null)}this.$element[c](0);this.transition("addClass",a.Event("show"),"shown");a.support.transition&&this.$element[c](this.$element[0][b])}},hide:function(){var c;!this.transitioning&&this.$element.hasClass("in")&&(c=this.dimension(),this.reset(this.$element[c]()),this.transition("removeClass",a.Event("hide"),"hidden"),this.$element[c](0))},reset:function(c){var a=this.dimension();this.$element.removeClass("collapse")[a](c||
"auto")[0].offsetWidth;this.$element[null!==c?"addClass":"removeClass"]("collapse");return this},transition:function(c,b,d){var f=this,l=function(){"show"==b.type&&f.reset();f.transitioning=0;f.$element.trigger(d)};this.$element.trigger(b);b.isDefaultPrevented()||(this.transitioning=1,this.$element[c]("in"),a.support.transition&&this.$element.hasClass("collapse")?this.$element.one(a.support.transition.end,l):l())},toggle:function(){this[this.$element.hasClass("in")?"hide":"show"]()}};var d=a.fn.collapse;
a.fn.collapse=function(c){return this.each(function(){var d=a(this),g=d.data("collapse"),f=a.extend({},a.fn.collapse.defaults,d.data(),"object"==typeof c&&c);g||d.data("collapse",g=new b(this,f));if("string"==typeof c)g[c]()})};a.fn.collapse.defaults={toggle:!0};a.fn.collapse.Constructor=b;a.fn.collapse.noConflict=function(){a.fn.collapse=d;return this};a(document).on("click.collapse.data-api","[data-toggle=collapse]",function(c){var b=a(this),d;c=b.attr("data-target")||c.preventDefault()||(d=b.attr("href"))&&
d.replace(/.*(?=#[^\s]+$)/,"");d=a(c).data("collapse")?"toggle":b.data();b[a(c).hasClass("in")?"addClass":"removeClass"]("collapsed");a(c).collapse(d)})}(window.jQuery);
!function(a){function b(){a("[data-toggle=dropdown]").each(function(){d(a(this)).removeClass("open")})}function d(c){var b=c.attr("data-target");b||(b=(b=c.attr("href"))&&/#/.test(b)&&b.replace(/.*(?=#[^\s]*$)/,""));(b=b&&a(b))&&b.length||(b=c.parent());return b}var c=function(c){var b=a(c).on("click.dropdown.data-api",this.toggle);a("html").on("click.dropdown.data-api",function(){b.parent().removeClass("open")})};c.prototype={constructor:c,toggle:function(c){c=a(this);var f,e;if(!c.is(".disabled, :disabled"))return f=
d(c),e=f.hasClass("open"),b(),e||f.toggleClass("open"),c.focus(),!1},keydown:function(c){var b,e,h;if(/(38|40|27)/.test(c.keyCode)&&(b=a(this),c.preventDefault(),c.stopPropagation(),!b.is(".disabled, :disabled"))){e=d(b);h=e.hasClass("open");if(!h||h&&27==c.keyCode)return 27==c.which&&e.find("[data-toggle=dropdown]").focus(),b.click();b=a("[role=menu] li:not(.divider):visible a",e);b.length&&(e=b.index(b.filter(":focus")),38==c.keyCode&&0<e&&e--,40==c.keyCode&&e<b.length-1&&e++,~e||(e=0),b.eq(e).focus())}}};
var e=a.fn.dropdown;a.fn.dropdown=function(b){return this.each(function(){var d=a(this),e=d.data("dropdown");e||d.data("dropdown",e=new c(this));"string"==typeof b&&e[b].call(d)})};a.fn.dropdown.Constructor=c;a.fn.dropdown.noConflict=function(){a.fn.dropdown=e;return this};a(document).on("click.dropdown.data-api",b).on("click.dropdown.data-api",".dropdown form",function(c){c.stopPropagation()}).on("click.dropdown-menu",function(c){c.stopPropagation()}).on("click.dropdown.data-api","[data-toggle=dropdown]",
c.prototype.toggle).on("keydown.dropdown.data-api","[data-toggle=dropdown], [role=menu]",c.prototype.keydown)}(window.jQuery);
!function(a){var b=function(c,b){this.options=b;this.$element=a(c).delegate('[data-dismiss="modal"]',"click.dismiss.modal",a.proxy(this.hide,this));this.options.remote&&this.$element.find(".modal-body").load(this.options.remote)};b.prototype={constructor:b,toggle:function(){return this[this.isShown?"hide":"show"]()},show:function(){var c=this,b=a.Event("show");this.$element.trigger(b);this.isShown||b.isDefaultPrevented()||(this.isShown=!0,this.escape(),this.backdrop(function(){var b=a.support.transition&&
c.$element.hasClass("fade");c.$element.parent().length||c.$element.appendTo(document.body);c.$element.show();b&&c.$element[0].offsetWidth;c.$element.addClass("in").attr("aria-hidden",!1);c.enforceFocus();b?c.$element.one(a.support.transition.end,function(){c.$element.focus().trigger("shown")}):c.$element.focus().trigger("shown")}))},hide:function(c){c&&c.preventDefault();c=a.Event("hide");this.$element.trigger(c);this.isShown&&!c.isDefaultPrevented()&&(this.isShown=!1,this.escape(),a(document).off("focusin.modal"),
this.$element.removeClass("in").attr("aria-hidden",!0),a.support.transition&&this.$element.hasClass("fade")?this.hideWithTransition():this.hideModal())},enforceFocus:function(){var c=this;a(document).on("focusin.modal",function(a){c.$element[0]===a.target||c.$element.has(a.target).length||c.$element.focus()})},escape:function(){var c=this;if(this.isShown&&this.options.keyboard)this.$element.on("keyup.dismiss.modal",function(a){27==a.which&&c.hide()});else this.isShown||this.$element.off("keyup.dismiss.modal")},
hideWithTransition:function(){var c=this,b=setTimeout(function(){c.$element.off(a.support.transition.end);c.hideModal()},500);this.$element.one(a.support.transition.end,function(){clearTimeout(b);c.hideModal()})},hideModal:function(){var c=this;this.$element.hide();this.backdrop(function(){c.removeBackdrop();c.$element.trigger("hidden")})},removeBackdrop:function(){this.$backdrop&&this.$backdrop.remove();this.$backdrop=null},backdrop:function(c){var b=this.$element.hasClass("fade")?"fade":"";if(this.isShown&&
this.options.backdrop){var d=a.support.transition&&b;this.$backdrop=a('<div class="modal-backdrop '+b+'" />').appendTo(document.body);this.$backdrop.click("static"==this.options.backdrop?a.proxy(this.$element[0].focus,this.$element[0]):a.proxy(this.hide,this));d&&this.$backdrop[0].offsetWidth;this.$backdrop.addClass("in");c&&(d?this.$backdrop.one(a.support.transition.end,c):c())}else!this.isShown&&this.$backdrop?(this.$backdrop.removeClass("in"),a.support.transition&&this.$element.hasClass("fade")?
this.$backdrop.one(a.support.transition.end,c):c()):c&&c()}};var d=a.fn.modal;a.fn.modal=function(c){return this.each(function(){var d=a(this),g=d.data("modal"),f=a.extend({},a.fn.modal.defaults,d.data(),"object"==typeof c&&c);g||d.data("modal",g=new b(this,f));if("string"==typeof c)g[c]();else f.show&&g.show()})};a.fn.modal.defaults={backdrop:!0,keyboard:!0,show:!0};a.fn.modal.Constructor=b;a.fn.modal.noConflict=function(){a.fn.modal=d;return this};a(document).on("click.modal.data-api",'[data-toggle="modal"]',
function(c){var b=a(this),d=b.attr("href"),f=a(b.attr("data-target")||d&&d.replace(/.*(?=#[^\s]+$)/,"")),d=f.data("modal")?"toggle":a.extend({remote:!/#/.test(d)&&d},f.data(),b.data());c.preventDefault();f.modal(d).one("hide",function(){b.focus()})})}(window.jQuery);
!function(a){var b=function(c,a){this.init("tooltip",c,a)};b.prototype={constructor:b,init:function(c,b,d){var f;this.type=c;this.$element=a(b);this.options=this.getOptions(d);this.enabled=!0;b=this.options.trigger.split(" ");for(d=b.length;d--;)if(f=b[d],"click"==f)this.$element.on("click."+this.type,this.options.selector,a.proxy(this.toggle,this));else"manual"!=f&&(c="hover"==f?"mouseenter":"focus",f="hover"==f?"mouseleave":"blur",this.$element.on(c+"."+this.type,this.options.selector,a.proxy(this.enter,
this)),this.$element.on(f+"."+this.type,this.options.selector,a.proxy(this.leave,this)));this.options.selector?this._options=a.extend({},this.options,{trigger:"manual",selector:""}):this.fixTitle()},getOptions:function(c){c=a.extend({},a.fn[this.type].defaults,this.$element.data(),c);c.delay&&"number"==typeof c.delay&&(c.delay={show:c.delay,hide:c.delay});return c},enter:function(c){var b=a.fn[this.type].defaults,d={},f;this._options&&a.each(this._options,function(c,a){b[c]!=a&&(d[c]=a)},this);f=
a(c.currentTarget)[this.type](d).data(this.type);if(!f.options.delay||!f.options.delay.show)return f.show();clearTimeout(this.timeout);f.hoverState="in";this.timeout=setTimeout(function(){"in"==f.hoverState&&f.show()},f.options.delay.show)},leave:function(c){var b=a(c.currentTarget)[this.type](this._options).data(this.type);this.timeout&&clearTimeout(this.timeout);if(!b.options.delay||!b.options.delay.hide)return b.hide();b.hoverState="out";this.timeout=setTimeout(function(){"out"==b.hoverState&&
b.hide()},b.options.delay.hide)},show:function(){var c,b,d,f,l;b=a.Event("show");if(this.hasContent()&&this.enabled&&(this.$element.trigger(b),!b.isDefaultPrevented())){c=this.tip();this.setContent();this.options.animation&&c.addClass("fade");f="function"==typeof this.options.placement?this.options.placement.call(this,c[0],this.$element[0]):this.options.placement;c.detach().css({top:0,left:0,display:"block"});this.options.container?c.appendTo(this.options.container):c.insertAfter(this.$element);b=
this.getPosition();d=c[0].offsetWidth;c=c[0].offsetHeight;switch(f){case "bottom":l={top:b.top+b.height,left:b.left+b.width/2-d/2};break;case "top":l={top:b.top-c,left:b.left+b.width/2-d/2};break;case "left":l={top:b.top+b.height/2-c/2,left:b.left-d};break;case "right":l={top:b.top+b.height/2-c/2,left:b.left+b.width}}this.applyPlacement(l,f);this.$element.trigger("shown")}},applyPlacement:function(c,a){var b=this.tip(),d=b[0].offsetWidth,l=b[0].offsetHeight,h,r,p;b.offset(c).addClass(a).addClass("in");
h=b[0].offsetWidth;r=b[0].offsetHeight;"top"==a&&r!=l&&(c.top=c.top+l-r,p=!0);"bottom"==a||"top"==a?(l=0,0>c.left&&(l=-2*c.left,c.left=0,b.offset(c),h=b[0].offsetWidth),this.replaceArrow(l-d+h,h,"left")):this.replaceArrow(r-l,r,"top");p&&b.offset(c)},replaceArrow:function(c,a,b){this.arrow().css(b,c?50*(1-c/a)+"%":"")},setContent:function(){var c=this.tip(),a=this.getTitle();c.find(".tooltip-inner")[this.options.html?"html":"text"](a);c.removeClass("fade in top bottom left right")},hide:function(){function c(){var c=
setTimeout(function(){b.off(a.support.transition.end).detach()},500);b.one(a.support.transition.end,function(){clearTimeout(c);b.detach()})}var b=this.tip(),d=a.Event("hide");this.$element.trigger(d);if(!d.isDefaultPrevented())return b.removeClass("in"),a.support.transition&&this.$tip.hasClass("fade")?c():b.detach(),this.$element.trigger("hidden"),this},fixTitle:function(){var c=this.$element;(c.attr("title")||"string"!=typeof c.attr("data-original-title"))&&c.attr("data-original-title",c.attr("title")||
"").attr("title","")},hasContent:function(){return this.getTitle()},getPosition:function(){var c=this.$element[0];return a.extend({},"function"==typeof c.getBoundingClientRect?c.getBoundingClientRect():{width:c.offsetWidth,height:c.offsetHeight},this.$element.offset())},getTitle:function(){var c=this.$element,a=this.options;return c.attr("data-original-title")||("function"==typeof a.title?a.title.call(c[0]):a.title)},tip:function(){return this.$tip=this.$tip||a(this.options.template)},arrow:function(){return this.$arrow=
this.$arrow||this.tip().find(".tooltip-arrow")},validate:function(){this.$element[0].parentNode||(this.hide(),this.options=this.$element=null)},enable:function(){this.enabled=!0},disable:function(){this.enabled=!1},toggleEnabled:function(){this.enabled=!this.enabled},toggle:function(c){c=c?a(c.currentTarget)[this.type](this._options).data(this.type):this;c.tip().hasClass("in")?c.hide():c.show()},destroy:function(){this.hide().$element.off("."+this.type).removeData(this.type)}};var d=a.fn.tooltip;
a.fn.tooltip=function(c){return this.each(function(){var d=a(this),g=d.data("tooltip"),f="object"==typeof c&&c;g||d.data("tooltip",g=new b(this,f));if("string"==typeof c)g[c]()})};a.fn.tooltip.Constructor=b;a.fn.tooltip.defaults={animation:!0,placement:"top",selector:!1,template:'<div class="tooltip"><div class="tooltip-arrow"></div><div class="tooltip-inner"></div></div>',trigger:"hover focus",title:"",delay:0,html:!1,container:!1};a.fn.tooltip.noConflict=function(){a.fn.tooltip=d;return this}}(window.jQuery);
!function(a){var b=function(c,a){this.init("popover",c,a)};b.prototype=a.extend({},a.fn.tooltip.Constructor.prototype,{constructor:b,setContent:function(){var c=this.tip(),a=this.getTitle(),b=this.getContent();c.find(".popover-title")[this.options.html?"html":"text"](a);c.find(".popover-content")[this.options.html?"html":"text"](b);c.removeClass("fade top bottom left right in")},hasContent:function(){return this.getTitle()||this.getContent()},getContent:function(){var c=this.$element,a=this.options;
return("function"==typeof a.content?a.content.call(c[0]):a.content)||c.attr("data-content")},tip:function(){this.$tip||(this.$tip=a(this.options.template));return this.$tip},destroy:function(){this.hide().$element.off("."+this.type).removeData(this.type)}});var d=a.fn.popover;a.fn.popover=function(c){return this.each(function(){var d=a(this),g=d.data("popover"),f="object"==typeof c&&c;g||d.data("popover",g=new b(this,f));if("string"==typeof c)g[c]()})};a.fn.popover.Constructor=b;a.fn.popover.defaults=
a.extend({},a.fn.tooltip.defaults,{placement:"right",trigger:"click",content:"",template:'<div class="popover"><div class="arrow"></div><h3 class="popover-title"></h3><div class="popover-content"></div></div>'});a.fn.popover.noConflict=function(){a.fn.popover=d;return this}}(window.jQuery);
!function(a){function b(c,b){var d=a.proxy(this.process,this),f=a(c).is("body")?a(window):a(c),l;this.options=a.extend({},a.fn.scrollspy.defaults,b);this.$scrollElement=f.on("scroll.scroll-spy.data-api",d);this.selector=(this.options.target||(l=a(c).attr("href"))&&l.replace(/.*(?=#[^\s]+$)/,"")||"")+" .nav li > a";this.$body=a("body");this.refresh();this.process()}b.prototype={constructor:b,refresh:function(){var c=this;this.offsets=a([]);this.targets=a([]);this.$body.find(this.selector).map(function(){var b=
a(this),b=b.data("target")||b.attr("href"),d=/^#\w/.test(b)&&a(b);return d&&d.length&&[[d.position().top+(!a.isWindow(c.$scrollElement.get(0))&&c.$scrollElement.scrollTop()),b]]||null}).sort(function(c,a){return c[0]-a[0]}).each(function(){c.offsets.push(this[0]);c.targets.push(this[1])})},process:function(){var c=this.$scrollElement.scrollTop()+this.options.offset,a=(this.$scrollElement[0].scrollHeight||this.$body[0].scrollHeight)-this.$scrollElement.height(),b=this.offsets,d=this.targets,l=this.activeTarget,
h;if(c>=a)return l!=(h=d.last()[0])&&this.activate(h);for(h=b.length;h--;)l!=d[h]&&c>=b[h]&&(!b[h+1]||c<=b[h+1])&&this.activate(d[h])},activate:function(c){this.activeTarget=c;a(this.selector).parent(".active").removeClass("active");c=a(this.selector+'[data-target="'+c+'"],'+this.selector+'[href="'+c+'"]').parent("li").addClass("active");c.parent(".dropdown-menu").length&&(c=c.closest("li.dropdown").addClass("active"));c.trigger("activate")}};var d=a.fn.scrollspy;a.fn.scrollspy=function(c){return this.each(function(){var d=
a(this),g=d.data("scrollspy"),f="object"==typeof c&&c;g||d.data("scrollspy",g=new b(this,f));if("string"==typeof c)g[c]()})};a.fn.scrollspy.Constructor=b;a.fn.scrollspy.defaults={offset:10};a.fn.scrollspy.noConflict=function(){a.fn.scrollspy=d;return this};a(window).on("load",function(){a('[data-spy="scroll"]').each(function(){var c=a(this);c.scrollspy(c.data())})})}(window.jQuery);
!function(a){var b=function(c){this.element=a(c)};b.prototype={constructor:b,show:function(){var c=this.element,b=c.closest("ul:not(.dropdown-menu)"),d=c.attr("data-target"),f,l;d||(d=(d=c.attr("href"))&&d.replace(/.*(?=#[^\s]*$)/,""));c.parent("li").hasClass("active")||(f=b.find(".active:last a")[0],l=a.Event("show",{relatedTarget:f}),c.trigger(l),l.isDefaultPrevented()||(d=a(d),this.activate(c.parent("li"),b),this.activate(d,d.parent(),function(){c.trigger({type:"shown",relatedTarget:f})})))},activate:function(c,
b,d){function f(){l.removeClass("active").find("> .dropdown-menu > .active").removeClass("active");c.addClass("active");h?(c[0].offsetWidth,c.addClass("in")):c.removeClass("fade");c.parent(".dropdown-menu")&&c.closest("li.dropdown").addClass("active");d&&d()}var l=b.find("> .active"),h=d&&a.support.transition&&l.hasClass("fade");h?l.one(a.support.transition.end,f):f();l.removeClass("in")}};var d=a.fn.tab;a.fn.tab=function(c){return this.each(function(){var d=a(this),g=d.data("tab");g||d.data("tab",
g=new b(this));if("string"==typeof c)g[c]()})};a.fn.tab.Constructor=b;a.fn.tab.noConflict=function(){a.fn.tab=d;return this};a(document).on("click.tab.data-api",'[data-toggle="tab"], [data-toggle="pill"]',function(c){c.preventDefault();a(this).tab("show")})}(window.jQuery);
!function(a){var b=function(c,b){this.$element=a(c);this.options=a.extend({},a.fn.typeahead.defaults,b);this.matcher=this.options.matcher||this.matcher;this.sorter=this.options.sorter||this.sorter;this.highlighter=this.options.highlighter||this.highlighter;this.updater=this.options.updater||this.updater;this.source=this.options.source;this.$menu=a(this.options.menu);this.shown=!1;this.listen()};b.prototype={constructor:b,select:function(){var c=this.$menu.find(".active").attr("data-value");this.$element.val(this.updater(c)).change();
return this.hide()},updater:function(c){return c},show:function(){var c=a.extend({},this.$element.position(),{height:this.$element[0].offsetHeight});this.$menu.insertAfter(this.$element).css({top:c.top+c.height,left:c.left}).show();this.shown=!0;return this},hide:function(){this.$menu.hide();this.shown=!1;return this},lookup:function(c){this.query=this.$element.val();return!this.query||this.query.length<this.options.minLength?this.shown?this.hide():this:(c=a.isFunction(this.source)?this.source(this.query,
a.proxy(this.process,this)):this.source)?this.process(c):this},process:function(c){var b=this;c=a.grep(c,function(c){return b.matcher(c)});c=this.sorter(c);return c.length?this.render(c.slice(0,this.options.items)).show():this.shown?this.hide():this},matcher:function(c){return~c.toLowerCase().indexOf(this.query.toLowerCase())},sorter:function(c){for(var a=[],b=[],d=[],l;l=c.shift();)l.toLowerCase().indexOf(this.query.toLowerCase())?~l.indexOf(this.query)?b.push(l):d.push(l):a.push(l);return a.concat(b,
d)},highlighter:function(c){var a=this.query.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g,"\\$&");return c.replace(new RegExp("("+a+")","ig"),function(a,c){return"<strong>"+c+"</strong>"})},render:function(c){var b=this;c=a(c).map(function(c,d){c=a(b.options.item).attr("data-value",d);c.find("a").html(b.highlighter(d));return c[0]});c.first().addClass("active");this.$menu.html(c);return this},next:function(c){c=this.$menu.find(".active").removeClass("active").next();c.length||(c=a(this.$menu.find("li")[0]));
c.addClass("active")},prev:function(c){c=this.$menu.find(".active").removeClass("active").prev();c.length||(c=this.$menu.find("li").last());c.addClass("active")},listen:function(){this.$element.on("focus",a.proxy(this.focus,this)).on("blur",a.proxy(this.blur,this)).on("keypress",a.proxy(this.keypress,this)).on("keyup",a.proxy(this.keyup,this));if(this.eventSupported("keydown"))this.$element.on("keydown",a.proxy(this.keydown,this));this.$menu.on("click",a.proxy(this.click,this)).on("mouseenter","li",
a.proxy(this.mouseenter,this)).on("mouseleave","li",a.proxy(this.mouseleave,this))},eventSupported:function(c){var a=c in this.$element;a||(this.$element.setAttribute(c,"return;"),a="function"===typeof this.$element[c]);return a},move:function(a){if(this.shown){switch(a.keyCode){case 9:case 13:case 27:a.preventDefault();break;case 38:a.preventDefault();this.prev();break;case 40:a.preventDefault(),this.next()}a.stopPropagation()}},keydown:function(c){this.suppressKeyPressRepeat=~a.inArray(c.keyCode,
[40,38,9,13,27]);this.move(c)},keypress:function(a){this.suppressKeyPressRepeat||this.move(a)},keyup:function(a){switch(a.keyCode){case 40:case 38:case 16:case 17:case 18:break;case 9:case 13:if(!this.shown)return;this.select();break;case 27:if(!this.shown)return;this.hide();break;default:this.lookup()}a.stopPropagation();a.preventDefault()},focus:function(a){this.focused=!0},blur:function(a){this.focused=!1;!this.mousedover&&this.shown&&this.hide()},click:function(a){a.stopPropagation();a.preventDefault();
this.select();this.$element.focus()},mouseenter:function(c){this.mousedover=!0;this.$menu.find(".active").removeClass("active");a(c.currentTarget).addClass("active")},mouseleave:function(a){this.mousedover=!1;!this.focused&&this.shown&&this.hide()}};var d=a.fn.typeahead;a.fn.typeahead=function(c){return this.each(function(){var d=a(this),g=d.data("typeahead"),f="object"==typeof c&&c;g||d.data("typeahead",g=new b(this,f));if("string"==typeof c)g[c]()})};a.fn.typeahead.defaults={source:[],items:8,menu:'<ul class="typeahead dropdown-menu"></ul>',
item:'<li><a href="#"></a></li>',minLength:1};a.fn.typeahead.Constructor=b;a.fn.typeahead.noConflict=function(){a.fn.typeahead=d;return this};a(document).on("focus.typeahead.data-api",'[data-provide="typeahead"]',function(c){c=a(this);c.data("typeahead")||c.typeahead(c.data())})}(window.jQuery);
!function(a){var b=function(c,b){this.options=a.extend({},a.fn.affix.defaults,b);this.$window=a(window).on("scroll.affix.data-api",a.proxy(this.checkPosition,this)).on("click.affix.data-api",a.proxy(function(){setTimeout(a.proxy(this.checkPosition,this),1)},this));this.$element=a(c);this.checkPosition()};b.prototype.checkPosition=function(){if(this.$element.is(":visible")){var c=a(document).height(),b=this.$window.scrollTop(),d=this.$element.offset(),f=this.options.offset,l=f.bottom,h=f.top;"object"!=
typeof f&&(l=h=f);"function"==typeof h&&(h=f.top());"function"==typeof l&&(l=f.bottom());c=null!=this.unpin&&b+this.unpin<=d.top?!1:null!=l&&d.top+this.$element.height()>=c-l?"bottom":null!=h&&b<=h?"top":!1;this.affixed!==c&&(this.affixed=c,this.unpin="bottom"==c?d.top-b:null,this.$element.removeClass("affix affix-top affix-bottom").addClass("affix"+(c?"-"+c:"")))}};var d=a.fn.affix;a.fn.affix=function(c){return this.each(function(){var d=a(this),g=d.data("affix"),f="object"==typeof c&&c;g||d.data("affix",
g=new b(this,f));if("string"==typeof c)g[c]()})};a.fn.affix.Constructor=b;a.fn.affix.defaults={offset:0};a.fn.affix.noConflict=function(){a.fn.affix=d;return this};a(window).on("load",function(){a('[data-spy="affix"]').each(function(){var c=a(this),b=c.data();b.offset=b.offset||{};b.offsetBottom&&(b.offset.bottom=b.offsetBottom);b.offsetTop&&(b.offset.top=b.offsetTop);c.affix(b)})})}(window.jQuery);(function(){var a=this,b=a.humanize,d={};"undefined"!==typeof exports?("undefined"!==typeof module&&module.exports&&(exports=module.exports=d),exports.humanize=d):("function"===typeof define&&define.amd&&define("humanize",function(){return d}),a.humanize=d);d.noConflict=function(){a.humanize=b;return this};d.pad=function(a,c,b,d){a+="";b?1<b.length&&(b=b.charAt(0)):b=" ";if("right"===(void 0===d?"left":"right"))for(;a.length<c;)a+=b;else for(;a.length<c;)a=b+a;return a};d.time=function(){return(new Date).getTime()/
1E3};var c=[0,0,31,59,90,120,151,181,212,243,273,304,334],e=[0,0,31,60,91,121,152,182,213,244,274,305,335];d.date=function(a,b){var l=void 0===b?new Date:b instanceof Date?new Date(b):new Date(1E3*b),h=/\\?([a-z])/gi,r=function(a,c){return n[a]?n[a]():c},p="Sunday Monday Tuesday Wednesday Thursday Friday Saturday".split(" "),q="January February March April May June July August September October November December".split(" "),n={d:function(){return d.pad(n.j(),2,"0")},D:function(){return n.l().slice(0,
3)},j:function(){return l.getDate()},l:function(){return p[n.w()]},N:function(){return n.w()||7},S:function(){var a=n.j();return 4<a&&21>a?"th":{1:"st",2:"nd",3:"rd"}[a%10]||"th"},w:function(){return l.getDay()},z:function(){return(n.L()?e[n.n()]:c[n.n()])+n.j()-1},W:function(){var a=n.z()-n.N()+1.5;return d.pad(1+Math.floor(Math.abs(a)/7)+(3.5<a%7?1:0),2,"0")},F:function(){return q[l.getMonth()]},m:function(){return d.pad(n.n(),2,"0")},M:function(){return n.F().slice(0,3)},n:function(){return l.getMonth()+
1},t:function(){return(new Date(n.Y(),n.n(),0)).getDate()},L:function(){return 1===(new Date(n.Y(),1,29)).getMonth()?1:0},o:function(){var a=n.n(),c=n.W();return n.Y()+(12===a&&9>c?-1:1===a&&9<c)},Y:function(){return l.getFullYear()},y:function(){return String(n.Y()).slice(-2)},a:function(){return 11<l.getHours()?"pm":"am"},A:function(){return n.a().toUpperCase()},B:function(){var a=l.getTime()/1E3,c=a%86400+3600;0>c&&(c+=86400);c=c/86.4%1E3;return 0>a?Math.ceil(c):Math.floor(c)},g:function(){return n.G()%
12||12},G:function(){return l.getHours()},h:function(){return d.pad(n.g(),2,"0")},H:function(){return d.pad(n.G(),2,"0")},i:function(){return d.pad(l.getMinutes(),2,"0")},s:function(){return d.pad(l.getSeconds(),2,"0")},u:function(){return d.pad(1E3*l.getMilliseconds(),6,"0")},O:function(){var a=l.getTimezoneOffset(),c=Math.abs(a);return(0<a?"-":"+")+d.pad(100*Math.floor(c/60)+c%60,4,"0")},P:function(){var a=n.O();return a.substr(0,3)+":"+a.substr(3,2)},Z:function(){return 60*-l.getTimezoneOffset()},
c:function(){return"Y-m-d\\TH:i:sP".replace(h,r)},r:function(){return"D, d M Y H:i:s O".replace(h,r)},U:function(){return l.getTime()/1E3||0}};return a.replace(h,r)};d.numberFormat=function(a,c,b,d){c=isNaN(c)?2:Math.abs(c);b=void 0===b?".":b;d=void 0===d?",":d;var e=0>a?"-":"";a=Math.abs(+a||0);var p=parseInt(a.toFixed(c),10)+"",q=3<p.length?p.length%3:0;return e+(q?p.substr(0,q)+d:"")+p.substr(q).replace(/(\d{3})(?=\d)/g,"$1"+d)+(c?b+Math.abs(a-p).toFixed(c).slice(2):"")};d.naturalDay=function(a,
c){a=void 0===a?d.time():a;c=void 0===c?"Y-m-d":c;var b=new Date,b=(new Date(b.getFullYear(),b.getMonth(),b.getDate())).getTime()/1E3;return a<b&&a>=b-86400?"yesterday":a>=b&&a<b+86400?"today":a>=b+86400&&a<b+172800?"tomorrow":d.date(c,a)};d.relativeTime=function(a){a=void 0===a?d.time():a;var c=d.time(),b=c-a;if(2>b&&-2<b)return(0<=b?"just ":"")+"now";if(60>b&&-60<b)return 0<=b?Math.floor(b)+" seconds ago":"in "+Math.floor(-b)+" seconds";if(120>b&&-120<b)return 0<=b?"about a minute ago":"in about a minute";
if(3600>b&&-3600<b)return 0<=b?Math.floor(b/60)+" minutes ago":"in "+Math.floor(-b/60)+" minutes";if(7200>b&&-7200<b)return 0<=b?"about an hour ago":"in about an hour";if(86400>b&&-86400<b)return 0<=b?Math.floor(b/3600)+" hours ago":"in "+Math.floor(-b/3600)+" hours";if(172800>b&&-172800<b)return 0<=b?"1 day ago":"in 1 day";if(2505600>b&&-2505600<b)return 0<=b?Math.floor(b/86400)+" days ago":"in "+Math.floor(-b/86400)+" days";if(5184E3>b&&-5184E3<b)return 0<=b?"about a month ago":"in about a month";
var b=parseInt(d.date("Y",c),10),e=parseInt(d.date("Y",a),10),c=12*b+parseInt(d.date("n",c),10);a=12*e+parseInt(d.date("n",a),10);a=c-a;if(12>a&&-12<a)return 0<=a?a+" months ago":"in "+-a+" months";b-=e;return 2>b&&-2<b?0<=b?"a year ago":"in a year":0<=b?b+" years ago":"in "+-b+" years"};d.ordinal=function(a){a=parseInt(a,10);a=isNaN(a)?0:a;var c=0>a?"-":"";a=Math.abs(a);return c+a+(4<a&&21>a?"th":{1:"st",2:"nd",3:"rd"}[a%10]||"th")};d.filesize=function(a,c,b,e,r){c=void 0===c?1024:c;b=isNaN(b)?2:
Math.abs(b);e=void 0===e?".":e;r=void 0===r?",":r;if(0>=a)return"0 bytes";var p=[1],q="bytes Kb Mb Gb Tb Pb".split(" ");if(a<c)return d.numberFormat(a,0)+" "+q[0];for(var n=1;n<q.length;n++)if(p[n]=p[n-1]*c,a<p[n])return d.numberFormat(a/p[n-1],b,e,r)+" "+q[n-1];return d.numberFormat(a/p[q.length-1],b,e,r)+" "+q[q.length-1]};d.linebreaks=function(a){a=a.replace(/^([\n|\r]*)/,"");a=a.replace(/([\n|\r]*)$/,"");a=a.replace(/(\r\n|\n|\r)/g,"\n");a=a.replace(/(\n{2,})/g,"</p><p>");a=a.replace(/\n/g,"<br />");
return"<p>"+a+"</p>"};d.nl2br=function(a){return a.replace(/(\r\n|\n|\r)/g,"<br />")};d.truncatechars=function(a,c){return a.length<=c?a:a.substr(0,c)+"\u2026"};d.truncatewords=function(a,c){var b=a.split(" ");return b.length<c?a:b.slice(0,c).join(" ")+"\u2026"}}).call(this);(function(a){function b(c){var b=c.data;c.isDefaultPrevented()||(c.preventDefault(),a(this).ajaxSubmit(b))}function d(c){var b=c.target,d=a(b);if(!d.is(":submit,input:image")){b=d.closest(":submit");if(0===b.length)return;b=b[0]}var e=this;e.clk=b;"image"==b.type&&(void 0!==c.offsetX?(e.clk_x=c.offsetX,e.clk_y=c.offsetY):"function"==typeof a.fn.offset?(d=d.offset(),e.clk_x=c.pageX-d.left,e.clk_y=c.pageY-d.top):(e.clk_x=c.pageX-b.offsetLeft,e.clk_y=c.pageY-b.offsetTop));setTimeout(function(){e.clk=
e.clk_x=e.clk_y=null},100)}function c(){if(a.fn.ajaxSubmit.debug){var c="[jquery.form] "+Array.prototype.join.call(arguments,"");window.console&&window.console.log?window.console.log(c):window.opera&&window.opera.postError&&window.opera.postError(c)}}var e,g;e=void 0!==a("<input type='file'/>").get(0).files;(g=void 0!==window.FormData)&&-1<navigator.userAgent.toLowerCase().indexOf("trident")&&(g=g&&-1<location.protocol.toLowerCase().indexOf("https"));a.fn.ajaxSubmit=function(b){function d(c){for(var k=
new FormData,e=0;e<c.length;e++)k.append(c[e].name,c[e].value);if(b.extraData)for(var g in b.extraData)b.extraData.hasOwnProperty(g)&&k.append(g,b.extraData[g]);b.data=null;c=a.extend(!0,{},a.ajaxSettings,b,{contentType:!1,processData:!1,cache:!1,type:"POST"});b.uploadProgress&&(c.xhr=function(){var a=jQuery.ajaxSettings.xhr();a.upload&&(a.upload.onprogress=function(a){var c=0,d=a.loaded||a.position,k=a.total;a.lengthComputable&&(c=Math.ceil(d/k*100));b.uploadProgress(a,d,k,c)});return a});c.data=
null;var l=c.beforeSend;c.beforeSend=function(a,c){c.data=k;l&&l.call(c,a,b)};a.ajax(c)}function h(d){function k(){function b(){try{var a=(v.contentWindow?v.contentWindow.document:v.contentDocument?v.contentDocument:v.document).readyState;c("state = "+a);a&&"uninitialized"==a.toLowerCase()&&setTimeout(b,50)}catch(d){c("Server abort: ",d," (",d.name,")"),e(2),B&&clearTimeout(B),B=void 0}}var d=q.attr("target"),f=q.attr("action");g.setAttribute("target",n);r||g.setAttribute("method","POST");f!=h.url&&
g.setAttribute("action",h.url);h.skipEncodingOverride||r&&!/post/i.test(r)||q.attr({encoding:"multipart/form-data",enctype:"multipart/form-data"});h.timeout&&(B=setTimeout(function(){E=!0;e(1)},h.timeout));var l=[];try{if(h.extraData)for(var p in h.extraData)h.extraData.hasOwnProperty(p)&&l.push(a('<input type="hidden" name="'+p+'">').attr("value",h.extraData[p]).appendTo(g)[0]);h.iframeTarget||(u.appendTo("body"),v.attachEvent?v.attachEvent("onload",e):v.addEventListener("load",e,!1));setTimeout(b,
15);g.submit()}finally{g.setAttribute("action",f),d?g.setAttribute("target",d):q.removeAttr("target"),a(l).remove()}}function e(b){if(!t.aborted&&!G){try{x=v.contentWindow?v.contentWindow.document:v.contentDocument?v.contentDocument:v.document}catch(d){c("cannot access response document: ",d),b=2}if(1===b&&t)t.abort("timeout");else if(2==b&&t)t.abort("server abort");else if(x&&x.location.href!=h.iframeSrc||E){v.detachEvent?v.detachEvent("onload",e):v.removeEventListener("load",e,!1);b="success";var f;
try{if(E)throw"timeout";var k="xml"==h.dataType||x.XMLDocument||a.isXMLDoc(x);c("isXml="+k);if(!k&&window.opera&&(null===x.body||!x.body.innerHTML)&&--K){c("requeing onLoad callback, DOM not available");setTimeout(e,250);return}var g=x.body?x.body:x.documentElement;t.responseText=g?g.innerHTML:null;t.responseXML=x.XMLDocument?x.XMLDocument:x;k&&(h.dataType="xml");t.getResponseHeader=function(a){return{"content-type":h.dataType}[a]};g&&(t.status=Number(g.getAttribute("status"))||t.status,t.statusText=
g.getAttribute("statusText")||t.statusText);var l=(h.dataType||"").toLowerCase(),m=/(json|script|text)/.test(l);if(m||h.textarea){var n=x.getElementsByTagName("textarea")[0];if(n)t.responseText=n.value,t.status=Number(n.getAttribute("status"))||t.status,t.statusText=n.getAttribute("statusText")||t.statusText;else if(m){var r=x.getElementsByTagName("pre")[0],y=x.getElementsByTagName("body")[0];r?t.responseText=r.textContent?r.textContent:r.innerText:y&&(t.responseText=y.textContent?y.textContent:y.innerText)}}else"xml"==
l&&!t.responseXML&&t.responseText&&(t.responseXML=J(t.responseText));try{F=I(t,l,h)}catch(d){b="parsererror",t.error=f=d||b}}catch(d){c("error caught: ",d),b="error",t.error=f=d||b}t.aborted&&(c("upload aborted"),b=null);t.status&&(b=200<=t.status&&300>t.status||304===t.status?"success":"error");"success"===b?(h.success&&h.success.call(h.context,F,"success",t),p&&a.event.trigger("ajaxSuccess",[t,h])):b&&(void 0===f&&(f=t.statusText),h.error&&h.error.call(h.context,t,b,f),p&&a.event.trigger("ajaxError",
[t,h,f]));p&&a.event.trigger("ajaxComplete",[t,h]);p&&!--a.active&&a.event.trigger("ajaxStop");h.complete&&h.complete.call(h.context,t,b);G=!0;h.timeout&&clearTimeout(B);setTimeout(function(){h.iframeTarget||u.remove();t.responseXML=null},100)}}}var g=q[0],l,h,p,n,u,v,t,w,E,B;w=!!a.fn.prop;if(a(":input[name=submit],:input[id=submit]",g).length)alert('Error: Form elements must not have name or id of "submit".');else{if(d)for(l=0;l<m.length;l++)d=a(m[l]),w?d.prop("disabled",!1):d.removeAttr("disabled");
h=a.extend(!0,{},a.ajaxSettings,b);h.context=h.context||h;n="jqFormIO"+(new Date).getTime();h.iframeTarget?(u=a(h.iframeTarget),(d=u.attr("name"))?n=d:u.attr("name",n)):(u=a('<iframe name="'+n+'" src="'+h.iframeSrc+'" />'),u.css({position:"absolute",top:"-1000px",left:"-1000px"}));v=u[0];t={aborted:0,responseText:null,responseXML:null,status:0,statusText:"n/a",getAllResponseHeaders:function(){},getResponseHeader:function(){},setRequestHeader:function(){},abort:function(b){var d="timeout"===b?"timeout":
"aborted";c("aborting upload... "+d);this.aborted=1;u.attr("src",h.iframeSrc);t.error=d;h.error&&h.error.call(h.context,t,d,b);p&&a.event.trigger("ajaxError",[t,h,d]);h.complete&&h.complete.call(h.context,t,d)}};(p=h.global)&&0===a.active++&&a.event.trigger("ajaxStart");p&&a.event.trigger("ajaxSend",[t,h]);if(h.beforeSend&&!1===h.beforeSend.call(h.context,t,h))h.global&&a.active--;else if(!t.aborted){(w=g.clk)&&(d=w.name)&&!w.disabled&&(h.extraData=h.extraData||{},h.extraData[d]=w.value,"image"==
w.type&&(h.extraData[d+".x"]=g.clk_x,h.extraData[d+".y"]=g.clk_y));w=a("meta[name=csrf-token]").attr("content");(d=a("meta[name=csrf-param]").attr("content"))&&w&&(h.extraData=h.extraData||{},h.extraData[d]=w);h.forceSync?k():setTimeout(k,10);var F,x,K=50,G,J=a.parseXML||function(a,b){window.ActiveXObject?(b=new ActiveXObject("Microsoft.XMLDOM"),b.async="false",b.loadXML(a)):b=(new DOMParser).parseFromString(a,"text/xml");return b&&b.documentElement&&"parsererror"!=b.documentElement.nodeName?b:null},
L=a.parseJSON||function(a){return window.eval("("+a+")")},I=function(b,c,d){var f=b.getResponseHeader("content-type")||"",k="xml"===c||!c&&0<=f.indexOf("xml");b=k?b.responseXML:b.responseText;k&&"parsererror"===b.documentElement.nodeName&&a.error&&a.error("parsererror");d&&d.dataFilter&&(b=d.dataFilter(b,c));"string"===typeof b&&("json"===c||!c&&0<=f.indexOf("json")?b=L(b):("script"===c||!c&&0<=f.indexOf("javascript"))&&a.globalEval(b));return b}}}}if(!this.length)return c("ajaxSubmit: skipping submit process - no element selected"),
this;var r,p,q=this;"function"==typeof b&&(b={success:b});r=this.attr("method");p=this.attr("action");(p=(p="string"===typeof p?a.trim(p):"")||window.location.href||"")&&(p=(p.match(/^([^#]+)/)||[])[1]);b=a.extend(!0,{url:p,success:a.ajaxSettings.success,type:r||"GET",iframeSrc:/^https/i.test(window.location.href||"")?"javascript:false":"about:blank"},b);p={};this.trigger("form-pre-serialize",[this,b,p]);if(p.veto)return c("ajaxSubmit: submit vetoed via form-pre-serialize trigger"),this;if(b.beforeSerialize&&
!1===b.beforeSerialize(this,b))return c("ajaxSubmit: submit aborted via beforeSerialize callback"),this;var n=b.traditional;void 0===n&&(n=a.ajaxSettings.traditional);var m=[],k,u=this.formToArray(b.semantic,m);b.data&&(b.extraData=b.data,k=a.param(b.data,n));if(b.beforeSubmit&&!1===b.beforeSubmit(u,this,b))return c("ajaxSubmit: submit aborted via beforeSubmit callback"),this;this.trigger("form-submit-validate",[u,this,b,p]);if(p.veto)return c("ajaxSubmit: submit vetoed via form-submit-validate trigger"),
this;p=a.param(u,n);k&&(p=p?p+"&"+k:k);"GET"==b.type.toUpperCase()?(b.url+=(0<=b.url.indexOf("?")?"&":"?")+p,b.data=null):b.data=p;var v=[];b.resetForm&&v.push(function(){q.resetForm()});b.clearForm&&v.push(function(){q.clearForm(b.includeHidden)});if(!b.dataType&&b.target){var w=b.success||function(){};v.push(function(c){var d=b.replaceTarget?"replaceWith":"html";a(b.target)[d](c).each(w,arguments)})}else b.success&&v.push(b.success);b.success=function(a,c,d){for(var k=b.context||b,e=0,g=v.length;e<
g;e++)v[e].apply(k,[a,c,d||q,q])};k=0<a("input:file:enabled[value]",this).length;p="multipart/form-data"==q.attr("enctype")||"multipart/form-data"==q.attr("encoding");n=e&&g;c("fileAPI :"+n);!1!==b.iframe&&(b.iframe||(k||p)&&!n)?b.closeKeepAlive?a.get(b.closeKeepAlive,function(){h(u)}):h(u):(k||p)&&n?d(u):a.ajax(b);for(k=0;k<m.length;k++)m[k]=null;this.trigger("form-submit-notify",[this,b]);return this};a.fn.ajaxForm=function(f){f=f||{};f.delegation=f.delegation&&a.isFunction(a.fn.on);if(!f.delegation&&
0===this.length){var e=this.selector,g=this.context;if(!a.isReady&&e)return c("DOM not ready, queuing ajaxForm"),a(function(){a(e,g).ajaxForm(f)}),this;c("terminating; zero elements found by selector"+(a.isReady?"":" (DOM not ready)"));return this}return f.delegation?(a(document).off("submit.form-plugin",this.selector,b).off("click.form-plugin",this.selector,d).on("submit.form-plugin",this.selector,f,b).on("click.form-plugin",this.selector,f,d),this):this.ajaxFormUnbind().bind("submit.form-plugin",
f,b).bind("click.form-plugin",f,d)};a.fn.ajaxFormUnbind=function(){return this.unbind("submit.form-plugin click.form-plugin")};a.fn.formToArray=function(b,c){var d=[];if(0===this.length)return d;var g=this[0],p=b?g.getElementsByTagName("*"):g.elements;if(!p)return d;var q,n,m,k,u,v;q=0;for(v=p.length;q<v;q++)if(u=p[q],m=u.name)if(b&&g.clk&&"image"==u.type)u.disabled||g.clk!=u||(d.push({name:m,value:a(u).val(),type:u.type}),d.push({name:m+".x",value:g.clk_x},{name:m+".y",value:g.clk_y}));else if((k=
a.fieldValue(u,!0))&&k.constructor==Array)for(c&&c.push(u),n=0,u=k.length;n<u;n++)d.push({name:m,value:k[n]});else if(e&&"file"==u.type&&!u.disabled)if(c&&c.push(u),k=u.files,k.length)for(n=0;n<k.length;n++)d.push({name:m,value:k[n],type:u.type});else d.push({name:m,value:"",type:u.type});else null!==k&&"undefined"!=typeof k&&(c&&c.push(u),d.push({name:m,value:k,type:u.type,required:u.required}));!b&&g.clk&&(p=a(g.clk),q=p[0],(m=q.name)&&!q.disabled&&"image"==q.type&&(d.push({name:m,value:p.val()}),
d.push({name:m+".x",value:g.clk_x},{name:m+".y",value:g.clk_y})));return d};a.fn.formSerialize=function(b){return a.param(this.formToArray(b))};a.fn.fieldSerialize=function(b){var c=[];this.each(function(){var d=this.name;if(d){var e=a.fieldValue(this,b);if(e&&e.constructor==Array)for(var g=0,q=e.length;g<q;g++)c.push({name:d,value:e[g]});else null!==e&&"undefined"!=typeof e&&c.push({name:this.name,value:e})}});return a.param(c)};a.fn.fieldValue=function(b){for(var c=[],d=0,e=this.length;d<e;d++){var g=
a.fieldValue(this[d],b);null===g||"undefined"==typeof g||g.constructor==Array&&!g.length||(g.constructor==Array?a.merge(c,g):c.push(g))}return c};a.fieldValue=function(b,c){var d=b.name,e=b.type,g=b.tagName.toLowerCase();void 0===c&&(c=!0);if(c&&(!d||b.disabled||"reset"==e||"button"==e||("checkbox"==e||"radio"==e)&&!b.checked||("submit"==e||"image"==e)&&b.form&&b.form.clk!=b||"select"==g&&-1==b.selectedIndex))return null;if("select"==g){var q=b.selectedIndex;if(0>q)return null;for(var d=[],g=b.options,
n=(e="select-one"==e)?q+1:g.length,q=e?q:0;q<n;q++){var m=g[q];if(m.selected){var k=m.value;k||(k=m.attributes&&m.attributes.value&&!m.attributes.value.specified?m.text:m.value);if(e)return k;d.push(k)}}return d}return a(b).val()};a.fn.clearForm=function(b){return this.each(function(){a("input,select,textarea",this).clearFields(b)})};a.fn.clearFields=a.fn.clearInputs=function(b){var c=/^(?:color|date|datetime|email|month|number|password|range|search|tel|text|time|url|week)$/i;return this.each(function(){var d=
this.type,e=this.tagName.toLowerCase();c.test(d)||"textarea"==e?this.value="":"checkbox"==d||"radio"==d?this.checked=!1:"select"==e?this.selectedIndex=-1:b&&(!0===b&&/hidden/.test(d)||"string"==typeof b&&a(this).is(b))&&(this.value="")})};a.fn.resetForm=function(){return this.each(function(){("function"==typeof this.reset||"object"==typeof this.reset&&!this.reset.nodeType)&&this.reset()})};a.fn.enable=function(a){void 0===a&&(a=!0);return this.each(function(){this.disabled=!a})};a.fn.selected=function(b){void 0===
b&&(b=!0);return this.each(function(){var c=this.type;"checkbox"==c||"radio"==c?this.checked=b:"option"==this.tagName.toLowerCase()&&(c=a(this).parent("select"),b&&c[0]&&"select-one"==c[0].type&&c.find("option").selected(!1),this.selected=b)})};a.fn.ajaxSubmit.debug=!1})(jQuery);(function(a,b,d){function c(a){var b={},c=/^jQuery\d+$/;d.each(a.attributes,function(a,d){d.specified&&!c.test(d.name)&&(b[d.name]=d.value)});return b}function e(a,c){var e=d(this);if(this.value==e.attr("placeholder")&&e.hasClass("placeholder"))if(e.data("placeholder-password")){e=e.hide().next().show().attr("id",e.removeAttr("id").data("placeholder-id"));if(!0===a)return e[0].value=c;e.focus()}else this.value="",e.removeClass("placeholder"),this==b.activeElement&&this.select()}function g(){var a,
b=d(this),g=this.id;if(""==this.value){if("password"==this.type){if(!b.data("placeholder-textinput")){try{a=b.clone().attr({type:"text"})}catch(f){a=d("<input>").attr(d.extend(c(this),{type:"text"}))}a.removeAttr("name").data({"placeholder-password":!0,"placeholder-id":g}).bind("focus.placeholder",e);b.data({"placeholder-textinput":a,"placeholder-id":g}).before(a)}b=b.removeAttr("id").hide().prev().attr("id",g).show()}b.addClass("placeholder");b[0].value=b.attr("placeholder")}else b.removeClass("placeholder")}
var f="placeholder"in b.createElement("input"),l="placeholder"in b.createElement("textarea"),h=d.fn,r=d.valHooks;f&&l?(h=h.placeholder=function(){return this},h.input=h.textarea=!0):(h=h.placeholder=function(){this.filter((f?"textarea":":input")+"[placeholder]").not(".placeholder").bind({"focus.placeholder":e,"blur.placeholder":g}).data("placeholder-enabled",!0).trigger("blur.placeholder");return this},h.input=f,h.textarea=l,h={get:function(a){var b=d(a);return b.data("placeholder-enabled")&&b.hasClass("placeholder")?
"":a.value},set:function(a,c){var f=d(a);if(!f.data("placeholder-enabled"))return a.value=c;""==c?(a.value=c,a!=b.activeElement&&g.call(a)):f.hasClass("placeholder")?e.call(a,!0,c)||(a.value=c):a.value=c;return f}},f||(r.input=h),l||(r.textarea=h),d(function(){d(b).delegate("form","submit.placeholder",function(){var a=d(".placeholder",this).each(e);setTimeout(function(){a.each(g)},10)})}),d(a).bind("beforeunload.placeholder",function(){d(".placeholder").each(function(){this.value=""})}))})(this,document,
jQuery);!function(a){var b=function(a,b){this.init(a,b);this.options=this._htData;this.on=this._attachCustomEvent;this.off=this._detachCustomEvent};b.prototype={constructor:b,init:function(b,d){var g=a(b);this._htData=this._getRequestOptions(g,d||{});this._htHandlers={};if("get"!==this._htData.sMethod||"a"!==el.tagName.toLowerCase())return"function"===typeof this._htData.fOnLoad&&this._attachCustomEvent("load",d.fOnLoad),"function"===typeof this._htData.fOnError&&this._attachCustomEvent("error",d.fOnError),
g.css("cursor","pointer"),g.on("click keydown",a.proxy(this._onClickTarget,this)),{options:this._htData,on:this._attachCustomEvent,off:this._detachCustomEvent}},_onClickTarget:function(a){if(("keydown"!==a.type||13===a.keyCode)&&this._htData)return this._sendRequest(this._htData),a.preventDefault(),a.stopPropagation(),!1},_sendRequest:function(b){var d={method:b.sMethod,success:a.proxy(this._onSuccessRequest,this),error:a.proxy(this._onErrorRequest,this),cache:!1,dataType:"text"};b.htAjaxOpt instanceof
Object&&(d=a.extend(d,b.htAjaxOpt));if(!1===this._fireEvent("beforeRequest",d))return!1;a.ajax(b.sHref,d)},_getRequestOptions:function(b,d){var g=a(b);return{sMethod:d.sMethod||g.data("request-method")||"get",sHref:d.sHref||g.data("request-uri")||g.attr("href"),fOnLoad:d.fOnLoad||void 0,fOnError:d.fOnError||void 0}},_onSuccessRequest:function(a,b,d){!1!==this._fireEvent("load",{oRes:a,oXHR:d,sStatus:b})&&(a=d.getResponseHeader("Location"),204===d.status&&a?document.location.href=a:document.location.reload())},
_onErrorRequest:function(a){this._fireEvent("error",{oXHR:a});switch(a.status){case 200:document.location.reload();break;case 204:document.location.href=a.getResponseHeader("Location")}},_attachCustomEvent:function(a,b){if("object"===typeof a)for(var d in a)this._htHandlers[d]=this._htHandlers[d]||[],this._htHandlers[d].push(a[d]);else this._htHandlers[a]=this._htHandlers[a]||[],this._htHandlers[a].push(b)},_detachCustomEvent:function(a,b){if(b){var d=this._htHandlers[a],d=d?d.indexOf(b):-1;-1<d&&
this._htHandlers[a].splice(d,1)}else this._htHandlers[a]=[]},_fireEvent:function(a,b){var d=this._htHandlers[a];if(!1!==d instanceof Array){var f=void 0;d.forEach(function(a){f=f||a(b)});return f}}};var d=a.fn.requestAs;a.fn.requestAs=function(c){return this.each(function(){var d=a(this),g=d.data("requestAs");g||d.data("requestAs",g=new b(this,c));if("string"==typeof c)g[c]()})};a.fn.requestAs.noConflict=function(){a.fn.requestAs=d;return this};a(document).ready(function(){a("[data-request-method]").requestAs()})}(window.jQuery);!function(a){var b=function(b,c){this.$element=a(b);this.options=a.extend({},a.fn.search.defaults,c);this.item=this.options.item||this.$element.data("items");this.items=a('[data-item="'+this.item+'"]');this.lookup();this.searchTimer};b.prototype={constructor:b,lookup:function(){this.$element.on("keyup",a.proxy(this.keyup,this));this.$element.on("keydown",a.proxy(this.kedown,this))},keyup:function(){this.searchTimer=setTimeout(a.proxy(this.search,this),this.options.delay,this.$element.val().toLowerCase())},
keydown:function(){clearTimeout(this.searchTimer)},search:function(b){var c=this;a.trim(b)?this.items.each(function(e,g){c.matcher(b,g)?a(g).show():a(g).hide()}):this.items.show()},matcher:function(b,c){return-1!==a(c).data("value").toLowerCase().indexOf(b)}};a.fn.search=function(d){return this.each(function(){var c=a(this),e=c.data("search"),g="object"==typeof d&&d;e||c.data("search",e=new b(this,g));if("string"==typeof d)e[d]()})};a.fn.search.defaults={items:"",delay:200};a(document).on("focus",
'[data-toggle="item-search"]',function(b){b=a(this);b.data("search")||b.search(b.data())})}(window.jQuery);(function(a){a.extend(a.fn,{validate:function(b){if(this.length){var d=a.data(this[0],"validator");if(d)return d;this.attr("novalidate","novalidate");d=new a.validator(b,this[0]);a.data(this[0],"validator",d);d.settings.onsubmit&&(b=this.find("input, button"),b.filter(".cancel").click(function(){d.cancelSubmit=!0}),d.settings.submitHandler&&b.filter(":submit").click(function(){d.submitButton=this}),this.submit(function(b){function e(){if(d.settings.submitHandler){if(d.submitButton)var b=a("<input type='hidden'/>").attr("name",
d.submitButton.name).val(d.submitButton.value).appendTo(d.currentForm);d.settings.submitHandler.call(d,d.currentForm);d.submitButton&&b.remove();return!1}return!0}d.settings.debug&&b.preventDefault();if(d.cancelSubmit)return d.cancelSubmit=!1,e();if(d.form())return d.pendingRequest?(d.formSubmitted=!0,!1):e();d.focusInvalid();return!1}));return d}b&&b.debug&&window.console&&console.warn("nothing selected, can't validate, returning nothing")},valid:function(){if(a(this[0]).is("form"))return this.validate().form();
var b=!0,d=a(this[0].form).validate();this.each(function(){b&=d.element(this)});return b},removeAttrs:function(b){var d={},c=this;a.each(b.split(/\s/),function(a,b){d[b]=c.attr(b);c.removeAttr(b)});return d},rules:function(b,d){var c=this[0];if(b){var e=a.data(c.form,"validator").settings,g=e.rules,f=a.validator.staticRules(c);switch(b){case "add":a.extend(f,a.validator.normalizeRule(d));g[c.name]=f;d.messages&&(e.messages[c.name]=a.extend(e.messages[c.name],d.messages));break;case "remove":if(!d)return delete g[c.name],
f;var l={};a.each(d.split(/\s/),function(a,b){l[b]=f[b];delete f[b]});return l}}c=a.validator.normalizeRules(a.extend({},a.validator.metadataRules(c),a.validator.classRules(c),a.validator.attributeRules(c),a.validator.staticRules(c)),c);c.required&&(e=c.required,delete c.required,c=a.extend({required:e},c));return c}});a.extend(a.expr[":"],{blank:function(b){return!a.trim(""+b.value)},filled:function(b){return!!a.trim(""+b.value)},unchecked:function(a){return!a.checked}});a.validator=function(b,d){this.settings=
a.extend(!0,{},a.validator.defaults,b);this.currentForm=d;this.init()};a.validator.format=function(b,d){if(1==arguments.length)return function(){var c=a.makeArray(arguments);c.unshift(b);return a.validator.format.apply(this,c)};2<arguments.length&&d.constructor!=Array&&(d=a.makeArray(arguments).slice(1));d.constructor!=Array&&(d=[d]);a.each(d,function(a,d){b=b.replace(new RegExp("\\{"+a+"\\}","g"),d)});return b};a.extend(a.validator,{defaults:{messages:{},groups:{},rules:{},errorClass:"error",validClass:"valid",
errorElement:"label",focusInvalid:!0,errorContainer:a([]),errorLabelContainer:a([]),onsubmit:!0,ignore:":hidden",ignoreTitle:!1,onfocusin:function(a,d){this.lastActive=a;this.settings.focusCleanup&&!this.blockFocusCleanup&&(this.settings.unhighlight&&this.settings.unhighlight.call(this,a,this.settings.errorClass,this.settings.validClass),this.addWrapper(this.errorsFor(a)).hide())},onfocusout:function(a,d){this.checkable(a)||!(a.name in this.submitted)&&this.optional(a)||this.element(a)},onkeyup:function(a,
d){(a.name in this.submitted||a==this.lastElement)&&this.element(a)},onclick:function(a,d){a.name in this.submitted?this.element(a):a.parentNode.name in this.submitted&&this.element(a.parentNode)},highlight:function(b,d,c){"radio"===b.type?this.findByName(b.name).addClass(d).removeClass(c):a(b).addClass(d).removeClass(c)},unhighlight:function(b,d,c){"radio"===b.type?this.findByName(b.name).removeClass(d).addClass(c):a(b).removeClass(d).addClass(c)}},setDefaults:function(b){a.extend(a.validator.defaults,
b)},messages:{required:"This field is required.",remote:"Please fix this field.",email:"Please enter a valid email address.",url:"Please enter a valid URL.",date:"Please enter a valid date.",dateISO:"Please enter a valid date (ISO).",number:"Please enter a valid number.",digits:"Please enter only digits.",creditcard:"Please enter a valid credit card number.",equalTo:"Please enter the same value again.",accept:"Please enter a value with a valid extension.",maxlength:a.validator.format("Please enter no more than {0} characters."),
minlength:a.validator.format("Please enter at least {0} characters."),rangelength:a.validator.format("Please enter a value between {0} and {1} characters long."),range:a.validator.format("Please enter a value between {0} and {1}."),max:a.validator.format("Please enter a value less than or equal to {0}."),min:a.validator.format("Please enter a value greater than or equal to {0}.")},autoCreateRanges:!1,prototype:{init:function(){function b(b){var c=a.data(this[0].form,"validator"),d="on"+b.type.replace(/^validate/,
"");c.settings[d]&&c.settings[d].call(c,this[0],b)}this.labelContainer=a(this.settings.errorLabelContainer);this.errorContext=this.labelContainer.length&&this.labelContainer||a(this.currentForm);this.containers=a(this.settings.errorContainer).add(this.settings.errorLabelContainer);this.submitted={};this.valueCache={};this.pendingRequest=0;this.pending={};this.invalid={};this.reset();var d=this.groups={};a.each(this.settings.groups,function(b,c){a.each(c.split(/\s/),function(a,c){d[c]=b})});var c=
this.settings.rules;a.each(c,function(b,d){c[b]=a.validator.normalizeRule(d)});a(this.currentForm).validateDelegate("[type='text'], [type='password'], [type='file'], select, textarea, [type='number'], [type='search'] ,[type='tel'], [type='url'], [type='email'], [type='datetime'], [type='date'], [type='month'], [type='week'], [type='time'], [type='datetime-local'], [type='range'], [type='color'] ","focusin focusout keyup",b).validateDelegate("[type='radio'], [type='checkbox'], select, option","click",
b);this.settings.invalidHandler&&a(this.currentForm).bind("invalid-form.validate",this.settings.invalidHandler)},form:function(){this.checkForm();a.extend(this.submitted,this.errorMap);this.invalid=a.extend({},this.errorMap);this.valid()||a(this.currentForm).triggerHandler("invalid-form",[this]);this.showErrors();return this.valid()},checkForm:function(){this.prepareForm();for(var a=0,d=this.currentElements=this.elements();d[a];a++)this.check(d[a]);return this.valid()},element:function(b){this.lastElement=
b=this.validationTargetFor(this.clean(b));this.prepareElement(b);this.currentElements=a(b);var d=this.check(b);d?delete this.invalid[b.name]:this.invalid[b.name]=!0;this.numberOfInvalids()||(this.toHide=this.toHide.add(this.containers));this.showErrors();return d},showErrors:function(b){if(b){a.extend(this.errorMap,b);this.errorList=[];for(var d in b)this.errorList.push({message:b[d],element:this.findByName(d)[0]});this.successList=a.grep(this.successList,function(a){return!(a.name in b)})}this.settings.showErrors?
this.settings.showErrors.call(this,this.errorMap,this.errorList):this.defaultShowErrors()},resetForm:function(){a.fn.resetForm&&a(this.currentForm).resetForm();this.submitted={};this.lastElement=null;this.prepareForm();this.hideErrors();this.elements().removeClass(this.settings.errorClass)},numberOfInvalids:function(){return this.objectLength(this.invalid)},objectLength:function(a){var d=0,c;for(c in a)d++;return d},hideErrors:function(){this.addWrapper(this.toHide).hide()},valid:function(){return 0==
this.size()},size:function(){return this.errorList.length},focusInvalid:function(){if(this.settings.focusInvalid)try{a(this.findLastActive()||this.errorList.length&&this.errorList[0].element||[]).filter(":visible").focus().trigger("focusin")}catch(b){}},findLastActive:function(){var b=this.lastActive;return b&&1==a.grep(this.errorList,function(a){return a.element.name==b.name}).length&&b},elements:function(){var b=this,d={};return a(this.currentForm).find("input, select, textarea").not(":submit, :reset, :image, [disabled]").not(this.settings.ignore).filter(function(){!this.name&&
b.settings.debug&&window.console&&console.error("%o has no name assigned",this);return this.name in d||!b.objectLength(a(this).rules())?!1:d[this.name]=!0})},clean:function(b){return a(b)[0]},errors:function(){return a(this.settings.errorElement+"."+this.settings.errorClass,this.errorContext)},reset:function(){this.successList=[];this.errorList=[];this.errorMap={};this.toShow=a([]);this.toHide=a([]);this.currentElements=a([])},prepareForm:function(){this.reset();this.toHide=this.errors().add(this.containers)},
prepareElement:function(a){this.reset();this.toHide=this.errorsFor(a)},check:function(b){b=this.validationTargetFor(this.clean(b));var d=a(b).rules(),c=!1,e;for(e in d){var g={method:e,parameters:d[e]};try{var f=a.validator.methods[e].call(this,b.value.replace(/\r/g,""),b,g.parameters);if("dependency-mismatch"==f)c=!0;else{c=!1;if("pending"==f){this.toHide=this.toHide.not(this.errorsFor(b));return}if(!f)return this.formatAndAdd(b,g),!1}}catch(l){throw this.settings.debug&&window.console&&console.log("exception occured when checking element "+
b.id+", check the '"+g.method+"' method",l),l;}}if(!c)return this.objectLength(d)&&this.successList.push(b),!0},customMetaMessage:function(b,d){if(a.metadata){var c=this.settings.meta?a(b).metadata()[this.settings.meta]:a(b).metadata();return c&&c.messages&&c.messages[d]}},customMessage:function(a,d){var c=this.settings.messages[a];return c&&(c.constructor==String?c:c[d])},findDefined:function(){for(var a=0;a<arguments.length;a++)if(void 0!==arguments[a])return arguments[a]},defaultMessage:function(b,
d){return this.findDefined(this.customMessage(b.name,d),this.customMetaMessage(b,d),!this.settings.ignoreTitle&&b.title||void 0,a.validator.messages[d],"<strong>Warning: No message defined for "+b.name+"</strong>")},formatAndAdd:function(a,d){var c=this.defaultMessage(a,d.method),e=/\$?\{(\d+)\}/g;"function"==typeof c?c=c.call(this,d.parameters,a):e.test(c)&&(c=jQuery.format(c.replace(e,"{$1}"),d.parameters));this.errorList.push({message:c,element:a});this.errorMap[a.name]=c;this.submitted[a.name]=
c},addWrapper:function(a){this.settings.wrapper&&(a=a.add(a.parent(this.settings.wrapper)));return a},defaultShowErrors:function(){for(var a=0;this.errorList[a];a++){var d=this.errorList[a];this.settings.highlight&&this.settings.highlight.call(this,d.element,this.settings.errorClass,this.settings.validClass);this.showLabel(d.element,d.message)}this.errorList.length&&(this.toShow=this.toShow.add(this.containers));if(this.settings.success)for(a=0;this.successList[a];a++)this.showLabel(this.successList[a]);
if(this.settings.unhighlight)for(a=0,d=this.validElements();d[a];a++)this.settings.unhighlight.call(this,d[a],this.settings.errorClass,this.settings.validClass);this.toHide=this.toHide.not(this.toShow);this.hideErrors();this.addWrapper(this.toShow).show()},validElements:function(){return this.currentElements.not(this.invalidElements())},invalidElements:function(){return a(this.errorList).map(function(){return this.element})},showLabel:function(b,d){var c=this.errorsFor(b);c.length?(c.removeClass(this.settings.validClass).addClass(this.settings.errorClass),
c.attr("generated")&&c.html(d)):(c=a("<"+this.settings.errorElement+"/>").attr({"for":this.idOrName(b),generated:!0}).addClass(this.settings.errorClass).html(d||""),this.settings.wrapper&&(c=c.hide().show().wrap("<"+this.settings.wrapper+"/>").parent()),this.labelContainer.append(c).length||(this.settings.errorPlacement?this.settings.errorPlacement(c,a(b)):c.insertAfter(b)));!d&&this.settings.success&&(c.text(""),"string"==typeof this.settings.success?c.addClass(this.settings.success):this.settings.success(c));
this.toShow=this.toShow.add(c)},errorsFor:function(b){var d=this.idOrName(b);return this.errors().filter(function(){return a(this).attr("for")==d})},idOrName:function(a){return this.groups[a.name]||(this.checkable(a)?a.name:a.id||a.name)},validationTargetFor:function(a){this.checkable(a)&&(a=this.findByName(a.name).not(this.settings.ignore)[0]);return a},checkable:function(a){return/radio|checkbox/i.test(a.type)},findByName:function(b){var d=this.currentForm;return a(document.getElementsByName(b)).map(function(a,
e){return e.form==d&&e.name==b&&e||null})},getLength:function(b,d){switch(d.nodeName.toLowerCase()){case "select":return a("option:selected",d).length;case "input":if(this.checkable(d))return this.findByName(d.name).filter(":checked").length}return b.length},depend:function(a,d){return this.dependTypes[typeof a]?this.dependTypes[typeof a](a,d):!0},dependTypes:{"boolean":function(a,d){return a},string:function(b,d){return!!a(b,d.form).length},"function":function(a,d){return a(d)}},optional:function(b){return!a.validator.methods.required.call(this,
a.trim(b.value),b)&&"dependency-mismatch"},startRequest:function(a){this.pending[a.name]||(this.pendingRequest++,this.pending[a.name]=!0)},stopRequest:function(b,d){this.pendingRequest--;0>this.pendingRequest&&(this.pendingRequest=0);delete this.pending[b.name];d&&0==this.pendingRequest&&this.formSubmitted&&this.form()?(a(this.currentForm).submit(),this.formSubmitted=!1):!d&&0==this.pendingRequest&&this.formSubmitted&&(a(this.currentForm).triggerHandler("invalid-form",[this]),this.formSubmitted=!1)},
previousValue:function(b){return a.data(b,"previousValue")||a.data(b,"previousValue",{old:null,valid:!0,message:this.defaultMessage(b,"remote")})}},classRuleSettings:{required:{required:!0},email:{email:!0},url:{url:!0},date:{date:!0},dateISO:{dateISO:!0},dateDE:{dateDE:!0},number:{number:!0},numberDE:{numberDE:!0},digits:{digits:!0},creditcard:{creditcard:!0}},addClassRules:function(b,d){b.constructor==String?this.classRuleSettings[b]=d:a.extend(this.classRuleSettings,b)},classRules:function(b){var d=
{};(b=a(b).attr("class"))&&a.each(b.split(" "),function(){this in a.validator.classRuleSettings&&a.extend(d,a.validator.classRuleSettings[this])});return d},attributeRules:function(b){var d={};b=a(b);for(var c in a.validator.methods){var e;(e="required"===c&&"function"===typeof a.fn.prop?b.prop(c):b.attr(c))?d[c]=e:b[0].getAttribute("type")===c&&(d[c]=!0)}d.maxlength&&/-1|2147483647|524288/.test(d.maxlength)&&delete d.maxlength;return d},metadataRules:function(b){if(!a.metadata)return{};var d=a.data(b.form,
"validator").settings.meta;return d?a(b).metadata()[d]:a(b).metadata()},staticRules:function(b){var d={},c=a.data(b.form,"validator");c.settings.rules&&(d=a.validator.normalizeRule(c.settings.rules[b.name])||{});return d},normalizeRules:function(b,d){a.each(b,function(c,e){if(!1===e)delete b[c];else if(e.param||e.depends){var g=!0;switch(typeof e.depends){case "string":g=!!a(e.depends,d.form).length;break;case "function":g=e.depends.call(d,d)}g?b[c]=void 0!==e.param?e.param:!0:delete b[c]}});a.each(b,
function(c,e){b[c]=a.isFunction(e)?e(d):e});a.each(["minlength","maxlength","min","max"],function(){b[this]&&(b[this]=Number(b[this]))});a.each(["rangelength","range"],function(){b[this]&&(b[this]=[Number(b[this][0]),Number(b[this][1])])});a.validator.autoCreateRanges&&(b.min&&b.max&&(b.range=[b.min,b.max],delete b.min,delete b.max),b.minlength&&b.maxlength&&(b.rangelength=[b.minlength,b.maxlength],delete b.minlength,delete b.maxlength));b.messages&&delete b.messages;return b},normalizeRule:function(b){if("string"==
typeof b){var d={};a.each(b.split(/\s/),function(){d[this]=!0});b=d}return b},addMethod:function(b,d,c){a.validator.methods[b]=d;a.validator.messages[b]=void 0!=c?c:a.validator.messages[b];3>d.length&&a.validator.addClassRules(b,a.validator.normalizeRule(b))},methods:{required:function(b,d,c){if(!this.depend(c,d))return"dependency-mismatch";switch(d.nodeName.toLowerCase()){case "select":return(b=a(d).val())&&0<b.length;case "input":if(this.checkable(d))return 0<this.getLength(b,d);default:return 0<
a.trim(b).length}},remote:function(b,d,c){if(this.optional(d))return"dependency-mismatch";var e=this.previousValue(d);this.settings.messages[d.name]||(this.settings.messages[d.name]={});e.originalMessage=this.settings.messages[d.name].remote;this.settings.messages[d.name].remote=e.message;c="string"==typeof c&&{url:c}||c;if(this.pending[d.name])return"pending";if(e.old===b)return e.valid;e.old=b;var g=this;this.startRequest(d);var f={};f[d.name]=b;a.ajax(a.extend(!0,{url:c,mode:"abort",port:"validate"+
d.name,dataType:"json",data:f,success:function(c){g.settings.messages[d.name].remote=e.originalMessage;var f=!0===c;if(f){var r=g.formSubmitted;g.prepareElement(d);g.formSubmitted=r;g.successList.push(d);g.showErrors()}else r={},c=c||g.defaultMessage(d,"remote"),r[d.name]=e.message=a.isFunction(c)?c(b):c,g.showErrors(r);e.valid=f;g.stopRequest(d,f)}},c));return"pending"},minlength:function(b,d,c){return this.optional(d)||this.getLength(a.trim(b),d)>=c},maxlength:function(b,d,c){return this.optional(d)||
this.getLength(a.trim(b),d)<=c},rangelength:function(b,d,c){b=this.getLength(a.trim(b),d);return this.optional(d)||b>=c[0]&&b<=c[1]},min:function(a,d,c){return this.optional(d)||a>=c},max:function(a,d,c){return this.optional(d)||a<=c},range:function(a,d,c){return this.optional(d)||a>=c[0]&&a<=c[1]},email:function(a,d){return this.optional(d)||/^((([a-z]|\d|[!#\$%&'\*\+\-\/=\?\^_`{\|}~]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])+(\.([a-z]|\d|[!#\$%&'\*\+\-\/=\?\^_`{\|}~]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])+)*)|((\x22)((((\x20|\x09)*(\x0d\x0a))?(\x20|\x09)+)?(([\x01-\x08\x0b\x0c\x0e-\x1f\x7f]|\x21|[\x23-\x5b]|[\x5d-\x7e]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(\\([\x01-\x09\x0b\x0c\x0d-\x7f]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]))))*(((\x20|\x09)*(\x0d\x0a))?(\x20|\x09)+)?(\x22)))@((([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.)+(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))$/i.test(a)},
url:function(a,d){return this.optional(d)||/^(https?|ftp):\/\/(((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:)*@)?(((\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5]))|((([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.)+(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.?)(:\d*)?)(\/((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)+(\/(([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)*)*)?)?(\?((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)|[\uE000-\uF8FF]|\/|\?)*)?(\#((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)|\/|\?)*)?$/i.test(a)},
date:function(a,d){return this.optional(d)||!/Invalid|NaN/.test(new Date(a))},dateISO:function(a,d){return this.optional(d)||/^\d{4}[\/-]\d{1,2}[\/-]\d{1,2}$/.test(a)},number:function(a,d){return this.optional(d)||/^-?(?:\d+|\d{1,3}(?:,\d{3})+)(?:\.\d+)?$/.test(a)},digits:function(a,d){return this.optional(d)||/^\d+$/.test(a)},creditcard:function(a,d){if(this.optional(d))return"dependency-mismatch";if(/[^0-9 -]+/.test(a))return!1;var c=0,e=0,g=!1;a=a.replace(/\D/g,"");for(var f=a.length-1;0<=f;f--)e=
a.charAt(f),e=parseInt(e,10),g&&9<(e*=2)&&(e-=9),c+=e,g=!g;return 0==c%10},accept:function(a,d,c){c="string"==typeof c?c.replace(/,/g,"|"):"png|jpe?g|gif";return this.optional(d)||a.match(new RegExp(".("+c+")$","i"))},equalTo:function(b,d,c){c=a(c).unbind(".validate-equalTo").bind("blur.validate-equalTo",function(){a(d).valid()});return b==c.val()}}});a.format=a.validator.format})(jQuery);
(function(a){var b={};if(a.ajaxPrefilter)a.ajaxPrefilter(function(a,d,g){d=a.port;"abort"==a.mode&&(b[d]&&b[d].abort(),b[d]=g)});else{var d=a.ajax;a.ajax=function(c){var e=("port"in c?c:a.ajaxSettings).port;return"abort"==("mode"in c?c:a.ajaxSettings).mode?(b[e]&&b[e].abort(),b[e]=d.apply(this,arguments)):d.apply(this,arguments)}}})(jQuery);(function(a){a.fn.zclip=function(b){if("object"==typeof b&&!b.length){var d=a.extend({path:"ZeroClipboard.swf",copy:null,beforeCopy:null,afterCopy:null,clickAfter:!0,setHandCursor:!0,setCSSEffects:!0},b);return this.each(function(){var b=a(this);if(b.is(":visible")&&("string"==typeof d.copy||a.isFunction(d.copy))){ZeroClipboard.setMoviePath(d.path);var e=new ZeroClipboard.Client;a.isFunction(d.copy)&&b.bind("zClip_copy",d.copy);a.isFunction(d.beforeCopy)&&b.bind("zClip_beforeCopy",d.beforeCopy);a.isFunction(d.afterCopy)&&
b.bind("zClip_afterCopy",d.afterCopy);e.setHandCursor(d.setHandCursor);e.setCSSEffects(d.setCSSEffects);e.addEventListener("mouseOver",function(a){b.trigger("mouseenter")});e.addEventListener("mouseOut",function(a){b.trigger("mouseleave")});e.addEventListener("mouseDown",function(g){b.trigger("mousedown");a.isFunction(d.copy)?e.setText(b.triggerHandler("zClip_copy")):e.setText(d.copy);a.isFunction(d.beforeCopy)&&b.trigger("zClip_beforeCopy")});e.addEventListener("complete",function(e,f){a.isFunction(d.afterCopy)?
b.trigger("zClip_afterCopy"):(500<f.length&&(f=f.substr(0,500)+"...\n\n("+(f.length-500)+" characters not shown)"),b.removeClass("hover"),alert("Copied text to clipboard:\n\n "+f));d.clickAfter&&b.trigger("click")});e.glue(b[0],b.parent()[0]);a(window).bind("load resize",function(){e.reposition()})}})}if("string"==typeof b)return this.each(function(){var c=a(this);b=b.toLowerCase();var d=c.data("zclipId"),d=a("#"+d+".zclip");"remove"==b?(d.remove(),c.removeClass("active hover")):"hide"==b?(d.hide(),
c.removeClass("active hover")):"show"==b&&d.show()})}})(jQuery);
var ZeroClipboard={version:"1.0.7",clients:{},moviePath:"ZeroClipboard.swf",nextId:1,$:function(a){"string"==typeof a&&(a=document.getElementById(a));a.addClass||(a.hide=function(){this.style.display="none"},a.show=function(){this.style.display=""},a.addClass=function(a){this.removeClass(a);this.className+=" "+a},a.removeClass=function(a){for(var d=this.className.split(/\s+/),c=-1,e=0;e<d.length;e++)d[e]==a&&(c=e,e=d.length);-1<c&&(d.splice(c,1),this.className=d.join(" "));return this},a.hasClass=
function(a){return!!this.className.match(new RegExp("\\s*"+a+"\\s*"))});return a},setMoviePath:function(a){this.moviePath=a},dispatch:function(a,b,d){(a=this.clients[a])&&a.receiveEvent(b,d)},register:function(a,b){this.clients[a]=b},getDOMObjectPosition:function(a,b){var d={left:0,top:0,width:a.width?a.width:a.offsetWidth,height:a.height?a.height:a.offsetHeight};a&&a!=b&&(d.left+=a.offsetLeft,d.top+=a.offsetTop);return d},Client:function(a){this.handlers={};this.id=ZeroClipboard.nextId++;this.movieId=
"ZeroClipboardMovie_"+this.id;ZeroClipboard.register(this.id,this);a&&this.glue(a)}};
ZeroClipboard.Client.prototype={id:0,ready:!1,movie:null,clipText:"",handCursorEnabled:!0,cssEffects:!0,handlers:null,glue:function(a,b,d){this.domElement=ZeroClipboard.$(a);a=99;this.domElement.style.zIndex&&(a=parseInt(this.domElement.style.zIndex,10)+1);"string"==typeof b?b=ZeroClipboard.$(b):"undefined"==typeof b&&(b=document.getElementsByTagName("body")[0]);var c=ZeroClipboard.getDOMObjectPosition(this.domElement,b);this.div=document.createElement("div");this.div.className="zclip";this.div.id=
"zclip-"+this.movieId;$(this.domElement).data("zclipId","zclip-"+this.movieId);var e=this.div.style;e.position="absolute";e.left=""+c.left+"px";e.top=""+c.top+"px";e.width=""+c.width+"px";e.height=""+c.height+"px";e.zIndex=a;if("object"==typeof d)for(addedStyle in d)e[addedStyle]=d[addedStyle];b.appendChild(this.div);this.div.innerHTML=this.getHTML(c.width,c.height)},getHTML:function(a,b){var d="",c="id="+this.id+"&width="+a+"&height="+b;if(navigator.userAgent.match(/MSIE/))var e=location.href.match(/^https/i)?
"https://":"http://",d=d+('<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="'+e+'download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,0,0" width="'+a+'" height="'+b+'" id="'+this.movieId+'" align="middle"><param name="allowScriptAccess" value="always" /><param name="allowFullScreen" value="false" /><param name="movie" value="'+ZeroClipboard.moviePath+'" /><param name="loop" value="false" /><param name="menu" value="false" /><param name="quality" value="best" /><param name="bgcolor" value="#ffffff" /><param name="flashvars" value="'+
c+'"/><param name="wmode" value="transparent"/></object>');else d+='<embed id="'+this.movieId+'" src="'+ZeroClipboard.moviePath+'" loop="false" menu="false" quality="best" bgcolor="#ffffff" width="'+a+'" height="'+b+'" name="'+this.movieId+'" align="middle" allowScriptAccess="always" allowFullScreen="false" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" flashvars="'+c+'" wmode="transparent" />';return d},hide:function(){this.div&&(this.div.style.left=
"-2000px")},show:function(){this.reposition()},destroy:function(){if(this.domElement&&this.div){this.hide();this.div.innerHTML="";var a=document.getElementsByTagName("body")[0];try{a.removeChild(this.div)}catch(b){}this.div=this.domElement=null}},reposition:function(a){a&&((this.domElement=ZeroClipboard.$(a))||this.hide());if(this.domElement&&this.div){a=ZeroClipboard.getDOMObjectPosition(this.domElement);var b=this.div.style;b.left=""+a.left+"px";b.top=""+a.top+"px"}},setText:function(a){this.clipText=
a;this.ready&&this.movie.setText(a)},addEventListener:function(a,b){a=a.toString().toLowerCase().replace(/^on/,"");this.handlers[a]||(this.handlers[a]=[]);this.handlers[a].push(b)},setHandCursor:function(a){this.handCursorEnabled=a;this.ready&&this.movie.setHandCursor(a)},setCSSEffects:function(a){this.cssEffects=!!a},receiveEvent:function(a,b){a=a.toString().toLowerCase().replace(/^on/,"");switch(a){case "load":this.movie=document.getElementById(this.movieId);if(!this.movie){var d=this;setTimeout(function(){d.receiveEvent("load",
null)},1);return}if(!this.ready&&navigator.userAgent.match(/Firefox/)&&navigator.userAgent.match(/Windows/)){d=this;setTimeout(function(){d.receiveEvent("load",null)},100);this.ready=!0;return}this.ready=!0;try{this.movie.setText(this.clipText)}catch(f){}try{this.movie.setHandCursor(this.handCursorEnabled)}catch(f){}break;case "mouseover":this.domElement&&this.cssEffects&&(this.domElement.addClass("hover"),this.recoverActive&&this.domElement.addClass("active"));break;case "mouseout":this.domElement&&
this.cssEffects&&(this.recoverActive=!1,this.domElement.hasClass("active")&&(this.domElement.removeClass("active"),this.recoverActive=!0),this.domElement.removeClass("hover"));break;case "mousedown":this.domElement&&this.cssEffects&&this.domElement.addClass("active");break;case "mouseup":this.domElement&&this.cssEffects&&(this.domElement.removeClass("active"),this.recoverActive=!1)}if(this.handlers[a])for(var c=0,e=this.handlers[a].length;c<e;c++){var g=this.handlers[a][c];if("function"==typeof g)g(this,
b);else if("object"==typeof g&&2==g.length)g[0][g[1]](this,b);else if("string"==typeof g)window[g](this,b)}}};/*
Use it if you like it
*/
function RGBColor(a){this.ok=!1;"#"==a.charAt(0)&&(a=a.substr(1,6));a=a.replace(/ /g,"");a=a.toLowerCase();var b={aliceblue:"f0f8ff",antiquewhite:"faebd7",aqua:"00ffff",aquamarine:"7fffd4",azure:"f0ffff",beige:"f5f5dc",bisque:"ffe4c4",black:"000000",blanchedalmond:"ffebcd",blue:"0000ff",blueviolet:"8a2be2",brown:"a52a2a",burlywood:"deb887",cadetblue:"5f9ea0",chartreuse:"7fff00",chocolate:"d2691e",coral:"ff7f50",cornflowerblue:"6495ed",cornsilk:"fff8dc",crimson:"dc143c",cyan:"00ffff",darkblue:"00008b",
darkcyan:"008b8b",darkgoldenrod:"b8860b",darkgray:"a9a9a9",darkgreen:"006400",darkkhaki:"bdb76b",darkmagenta:"8b008b",darkolivegreen:"556b2f",darkorange:"ff8c00",darkorchid:"9932cc",darkred:"8b0000",darksalmon:"e9967a",darkseagreen:"8fbc8f",darkslateblue:"483d8b",darkslategray:"2f4f4f",darkturquoise:"00ced1",darkviolet:"9400d3",deeppink:"ff1493",deepskyblue:"00bfff",dimgray:"696969",dodgerblue:"1e90ff",feldspar:"d19275",firebrick:"b22222",floralwhite:"fffaf0",forestgreen:"228b22",fuchsia:"ff00ff",
gainsboro:"dcdcdc",ghostwhite:"f8f8ff",gold:"ffd700",goldenrod:"daa520",gray:"808080",green:"008000",greenyellow:"adff2f",honeydew:"f0fff0",hotpink:"ff69b4",indianred:"cd5c5c",indigo:"4b0082",ivory:"fffff0",khaki:"f0e68c",lavender:"e6e6fa",lavenderblush:"fff0f5",lawngreen:"7cfc00",lemonchiffon:"fffacd",lightblue:"add8e6",lightcoral:"f08080",lightcyan:"e0ffff",lightgoldenrodyellow:"fafad2",lightgrey:"d3d3d3",lightgreen:"90ee90",lightpink:"ffb6c1",lightsalmon:"ffa07a",lightseagreen:"20b2aa",lightskyblue:"87cefa",
lightslateblue:"8470ff",lightslategray:"778899",lightsteelblue:"b0c4de",lightyellow:"ffffe0",lime:"00ff00",limegreen:"32cd32",linen:"faf0e6",magenta:"ff00ff",maroon:"800000",mediumaquamarine:"66cdaa",mediumblue:"0000cd",mediumorchid:"ba55d3",mediumpurple:"9370d8",mediumseagreen:"3cb371",mediumslateblue:"7b68ee",mediumspringgreen:"00fa9a",mediumturquoise:"48d1cc",mediumvioletred:"c71585",midnightblue:"191970",mintcream:"f5fffa",mistyrose:"ffe4e1",moccasin:"ffe4b5",navajowhite:"ffdead",navy:"000080",
oldlace:"fdf5e6",olive:"808000",olivedrab:"6b8e23",orange:"ffa500",orangered:"ff4500",orchid:"da70d6",palegoldenrod:"eee8aa",palegreen:"98fb98",paleturquoise:"afeeee",palevioletred:"d87093",papayawhip:"ffefd5",peachpuff:"ffdab9",peru:"cd853f",pink:"ffc0cb",plum:"dda0dd",powderblue:"b0e0e6",purple:"800080",red:"ff0000",rosybrown:"bc8f8f",royalblue:"4169e1",saddlebrown:"8b4513",salmon:"fa8072",sandybrown:"f4a460",seagreen:"2e8b57",seashell:"fff5ee",sienna:"a0522d",silver:"c0c0c0",skyblue:"87ceeb",slateblue:"6a5acd",
slategray:"708090",snow:"fffafa",springgreen:"00ff7f",steelblue:"4682b4",tan:"d2b48c",teal:"008080",thistle:"d8bfd8",tomato:"ff6347",turquoise:"40e0d0",violet:"ee82ee",violetred:"d02090",wheat:"f5deb3",white:"ffffff",whitesmoke:"f5f5f5",yellow:"ffff00",yellowgreen:"9acd32"},d;for(d in b)a==d&&(a=b[d]);var c=[{re:/^rgb\((\d{1,3}),\s*(\d{1,3}),\s*(\d{1,3})\)$/,example:["rgb(123, 234, 45)","rgb(255,234,245)"],process:function(a){return[parseInt(a[1]),parseInt(a[2]),parseInt(a[3])]}},{re:/^(\w{2})(\w{2})(\w{2})$/,
example:["#00ff00","336699"],process:function(a){return[parseInt(a[1],16),parseInt(a[2],16),parseInt(a[3],16)]}},{re:/^(\w{1})(\w{1})(\w{1})$/,example:["#fb0","f0f"],process:function(a){return[parseInt(a[1]+a[1],16),parseInt(a[2]+a[2],16),parseInt(a[3]+a[3],16)]}}];for(d=0;d<c.length;d++){var e=c[d].process,g=c[d].re.exec(a);g&&(channels=e(g),this.r=channels[0],this.g=channels[1],this.b=channels[2],this.ok=!0)}this.r=0>this.r||isNaN(this.r)?0:255<this.r?255:this.r;this.g=0>this.g||isNaN(this.g)?0:
255<this.g?255:this.g;this.b=0>this.b||isNaN(this.b)?0:255<this.b?255:this.b;this.toRGB=function(){return"rgb("+this.r+", "+this.g+", "+this.b+")"};this.toHex=function(){var a=this.r.toString(16),b=this.g.toString(16),c=this.b.toString(16);1==a.length&&(a="0"+a);1==b.length&&(b="0"+b);1==c.length&&(c="0"+c);return"#"+a+b+c};this.getHelpXML=function(){for(var a=[],d=0;d<c.length;d++)for(var e=c[d].example,g=0;g<e.length;g++)a[a.length]=e[g];for(var p in b)a[a.length]=p;e=document.createElement("ul");
e.setAttribute("id","rgbcolor-examples");for(d=0;d<a.length;d++)try{var q=document.createElement("li"),n=new RGBColor(a[d]),m=document.createElement("div");m.style.cssText="margin: 3px; border: 1px solid black; background:"+n.toHex()+"; color:"+n.toHex();m.appendChild(document.createTextNode("test"));var k=document.createTextNode(" "+a[d]+" -> "+n.toRGB()+" -> "+n.toHex());q.appendChild(m);q.appendChild(k);e.appendChild(q)}catch(u){}return e}};(function(a,b,d){var c={required:"The %s field is required.",matches:"The %s field does not match the %s field.",valid_email:"The %s field must contain a valid email address.",valid_emails:"The %s field must contain all valid email addresses.",min_length:"The %s field must be at least %s characters in length.",max_length:"The %s field must not exceed %s characters in length.",exact_length:"The %s field must be exactly %s characters in length.",greater_than:"The %s field must contain a number greater than %s.",
less_than:"The %s field must contain a number less than %s.",alpha:"The %s field must only contain alphabetical characters.",alpha_numeric:"The %s field must only contain alpha-numeric characters.",alpha_dash:"The %s field must only contain alpha-numeric characters, underscores, and dashes.",numeric:"The %s field must contain only numbers.",integer:"The %s field must contain an integer.",decimal:"The %s field must contain a decimal number.",is_natural:"The %s field must contain only positive numbers.",
is_natural_no_zero:"The %s field must contain a number greater than zero.",valid_ip:"The %s field must contain a valid IP.",valid_base64:"The %s field must contain a base64 string."},e=function(a){},g=/^(.+?)\[(.+)\]$/,f=/^[0-9]+$/,l=/^\-?[0-9]+$/,h=/^\-?[0-9]*\.?[0-9]+$/,r=/[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?/i,p=/^[a-z]+$/i,q=/^[a-z0-9]+$/i,n=/^[a-z0-9_-]+$/i,m=/^[0-9]+$/i,k=/^[1-9][0-9]*$/i,u=/^((25[0-5]|2[0-4][0-9]|1[0-9]{2}|[0-9]{1,2})\.){3}(25[0-5]|2[0-4][0-9]|1[0-9]{2}|[0-9]{1,2})$/i,
v=/[^a-zA-Z0-9\/\+=]/i,w=function(a,c,d){this.callback=d||e;this.errors=[];this.fields={};this.form=b.forms[a]||{};this.messages={};this.handlers={};a=0;for(d=c.length;a<d;a++){var k=c[a];k.name&&k.rules&&(this.fields[k.name]={name:k.name,display:k.display||k.name,rules:k.rules,id:null,type:null,value:null,checked:null})}this.form.onsubmit=function(a){return function(b){try{return a._validateForm(b)}catch(c){return console.error(c),!1}}}(this)};w.prototype.setMessage=function(a,b){this.messages[a]=
b;return this};w.prototype.registerCallback=function(a,b){a&&"string"===typeof a&&b&&"function"===typeof b&&(this.handlers[a]=b);return this};w.prototype._validateForm=function(a){this.errors=[];for(var b in this.fields)if(this.fields.hasOwnProperty(b)){var c=this.fields[b]||{},k=this.form[c.name];k&&k!==d&&(c.id=k.id,c.type=k.type,c.value=k.value,c.checked=k.checked);this._validateField(c)}if("function"===typeof this.callback&&(b=this.callback(this.errors,a),"boolean"===typeof b))return b;if(0<this.errors.length)if(a&&
a.preventDefault)a.preventDefault();else return!1;return!0};w.prototype._validateField=function(a){var b=a.rules.split("|");if(-1!==a.rules.indexOf("required")||a.value&&""!==a.value&&a.value!==d)for(var k=0,e=b.length;k<e;k++){var f=b[k],h=null,l=!1;if(parts=g.exec(f))f=parts[1],h=parts[2];"function"===typeof this._hooks[f]?this._hooks[f].apply(this,[a,h])||(l=!0):"callback_"===f.substring(0,9)&&(f=f.substring(9,f.length),"function"===typeof this.handlers[f]&&!1===this.handlers[f].apply(this,[a.value])&&
(l=!0));if(l){b=this.messages[f]||c[f];k="An error has occurred with the "+a.display+" field.";b&&(k=b.replace("%s",a.display),h&&(k=k.replace("%s",this.fields[h]?this.fields[h].display:h)));this.errors.push({id:a.id,name:a.name,message:k});break}}};w.prototype._hooks={required:function(a){var b=a.value;return"checkbox"===a.type?!0===a.checked:null!==b&&""!==b},matches:function(a,b){return(el=this.form[b])?a.value===el.value:!1},valid_email:function(a){return r.test(a.value)},valid_emails:function(a){a=
a.value.split(",");for(var b=0;b<a.length;b++)if(!r.test(a[b]))return!1;return!0},min_length:function(a,b){return f.test(b)?a.value.length>=parseInt(b,10):!1},max_length:function(a,b){return f.test(b)?a.value.length<=parseInt(b,10):!1},exact_length:function(a,b){return f.test(b)?a.value.length===parseInt(b,10):!1},greater_than:function(a,b){return h.test(a.value)?parseFloat(a.value)>parseFloat(b):!1},less_than:function(a,b){return h.test(a.value)?parseFloat(a.value)<parseFloat(b):!1},alpha:function(a){return p.test(a.value)},
alpha_numeric:function(a){return q.test(a.value)},alpha_dash:function(a){return n.test(a.value)},numeric:function(a){return h.test(a.value)},integer:function(a){return l.test(a.value)},decimal:function(a){return h.test(a.value)},is_natural:function(a){return m.test(a.value)},is_natural_no_zero:function(a){return k.test(a.value)},valid_ip:function(a){return u.test(a.value)},valid_base64:function(a){return v.test(a.value)}};a.FormValidator=w})(window,document);(function(a,b){"function"===typeof define&&define.amd?define(["exports"],b):"object"===typeof exports?b(exports):b(a)})(this,function(a){function b(a){for(var b in q)a=a.replace(q[b],"");return a}function d(a){var b=/\/\*.*?\*\//g;return a.replace(/\s*[a-z-]+\s*=\s*'[^']*'/gi,function(a){return a.replace(b,"")}).replace(/\s*[a-z-]+\s*=\s*"[^"]*"/gi,function(a){return a.replace(b,"")}).replace(/\s*[a-z-]+\s*=\s*[^\s]+/gi,function(a){return a.replace(b,"")})}function c(a){return/^(\d?\d?\d)\.(\d?\d?\d)\.(\d?\d?\d)\.(\d?\d?\d)$/.test(a)?
255<a.split(".").sort()[3]?!1:!0:!1}function e(a){return/^::|^::1|^([a-fA-F0-9]{1,4}::?){1,7}([a-fA-F0-9]{1,4})$/.test(a)?!0:!1}function g(a){if(a instanceof Date)return a;a=Date.parse(a);return isNaN(a)?null:new Date(a)}var f={"&nbsp;":"\u00a0","&iexcl;":"\u00a1","&cent;":"\u00a2","&pound;":"\u00a3","&curren;":"\u20ac","&yen;":"\u00a5","&brvbar;":"\u0160","&sect;":"\u00a7","&uml;":"\u0161","&copy;":"\u00a9","&ordf;":"\u00aa","&laquo;":"\u00ab","&not;":"\u00ac","&shy;":"\u00ad","&reg;":"\u00ae","&macr;":"\u00af",
"&deg;":"\u00b0","&plusmn;":"\u00b1","&sup2;":"\u00b2","&sup3;":"\u00b3","&acute;":"\u017d","&micro;":"\u00b5","&para;":"\u00b6","&middot;":"\u00b7","&cedil;":"\u017e","&sup1;":"\u00b9","&ordm;":"\u00ba","&raquo;":"\u00bb","&frac14;":"\u0152","&frac12;":"\u0153","&frac34;":"\u0178","&iquest;":"\u00bf","&Agrave;":"\u00c0","&Aacute;":"\u00c1","&Acirc;":"\u00c2","&Atilde;":"\u00c3","&Auml;":"\u00c4","&Aring;":"\u00c5","&AElig;":"\u00c6","&Ccedil;":"\u00c7","&Egrave;":"\u00c8","&Eacute;":"\u00c9","&Ecirc;":"\u00ca",
"&Euml;":"\u00cb","&Igrave;":"\u00cc","&Iacute;":"\u00cd","&Icirc;":"\u00ce","&Iuml;":"\u00cf","&ETH;":"\u00d0","&Ntilde;":"\u00d1","&Ograve;":"\u00d2","&Oacute;":"\u00d3","&Ocirc;":"\u00d4","&Otilde;":"\u00d5","&Ouml;":"\u00d6","&times;":"\u00d7","&Oslash;":"\u00d8","&Ugrave;":"\u00d9","&Uacute;":"\u00da","&Ucirc;":"\u00db","&Uuml;":"\u00dc","&Yacute;":"\u00dd","&THORN;":"\u00de","&szlig;":"\u00df","&agrave;":"\u00e0","&aacute;":"\u00e1","&acirc;":"\u00e2","&atilde;":"\u00e3","&auml;":"\u00e4","&aring;":"\u00e5",
"&aelig;":"\u00e6","&ccedil;":"\u00e7","&egrave;":"\u00e8","&eacute;":"\u00e9","&ecirc;":"\u00ea","&euml;":"\u00eb","&igrave;":"\u00ec","&iacute;":"\u00ed","&icirc;":"\u00ee","&iuml;":"\u00ef","&eth;":"\u00f0","&ntilde;":"\u00f1","&ograve;":"\u00f2","&oacute;":"\u00f3","&ocirc;":"\u00f4","&otilde;":"\u00f5","&ouml;":"\u00f6","&divide;":"\u00f7","&oslash;":"\u00f8","&ugrave;":"\u00f9","&uacute;":"\u00fa","&ucirc;":"\u00fb","&uuml;":"\u00fc","&yacute;":"\u00fd","&thorn;":"\u00fe","&yuml;":"\u00ff",
"&quot;":'"',"&lt;":"<","&gt;":">","&apos;":"'","&minus;":"\u2212","&circ;":"\u02c6","&tilde;":"\u02dc","&Scaron;":"\u0160","&lsaquo;":"\u2039","&OElig;":"\u0152","&lsquo;":"\u2018","&rsquo;":"\u2019","&ldquo;":"\u201c","&rdquo;":"\u201d","&bull;":"\u2022","&ndash;":"\u2013","&mdash;":"\u2014","&trade;":"\u2122","&scaron;":"\u0161","&rsaquo;":"\u203a","&oelig;":"\u0153","&Yuml;":"\u0178","&fnof;":"\u0192","&Alpha;":"\u0391","&Beta;":"\u0392","&Gamma;":"\u0393","&Delta;":"\u0394","&Epsilon;":"\u0395",
"&Zeta;":"\u0396","&Eta;":"\u0397","&Theta;":"\u0398","&Iota;":"\u0399","&Kappa;":"\u039a","&Lambda;":"\u039b","&Mu;":"\u039c","&Nu;":"\u039d","&Xi;":"\u039e","&Omicron;":"\u039f","&Pi;":"\u03a0","&Rho;":"\u03a1","&Sigma;":"\u03a3","&Tau;":"\u03a4","&Upsilon;":"\u03a5","&Phi;":"\u03a6","&Chi;":"\u03a7","&Psi;":"\u03a8","&Omega;":"\u03a9","&alpha;":"\u03b1","&beta;":"\u03b2","&gamma;":"\u03b3","&delta;":"\u03b4","&epsilon;":"\u03b5","&zeta;":"\u03b6","&eta;":"\u03b7","&theta;":"\u03b8","&iota;":"\u03b9",
"&kappa;":"\u03ba","&lambda;":"\u03bb","&mu;":"\u03bc","&nu;":"\u03bd","&xi;":"\u03be","&omicron;":"\u03bf","&pi;":"\u03c0","&rho;":"\u03c1","&sigmaf;":"\u03c2","&sigma;":"\u03c3","&tau;":"\u03c4","&upsilon;":"\u03c5","&phi;":"\u03c6","&chi;":"\u03c7","&psi;":"\u03c8","&omega;":"\u03c9","&thetasym;":"\u03d1","&upsih;":"\u03d2","&piv;":"\u03d6","&ensp;":"\u2002","&emsp;":"\u2003","&thinsp;":"\u2009","&zwnj;":"\u200c","&zwj;":"\u200d","&lrm;":"\u200e","&rlm;":"\u200f","&sbquo;":"\u201a","&bdquo;":"\u201e",
"&dagger;":"\u2020","&Dagger;":"\u2021","&hellip;":"\u2026","&permil;":"\u2030","&prime;":"\u2032","&Prime;":"\u2033","&oline;":"\u203e","&frasl;":"\u2044","&euro;":"\u20ac","&image;":"\u2111","&weierp;":"\u2118","&real;":"\u211c","&alefsym;":"\u2135","&larr;":"\u2190","&uarr;":"\u2191","&rarr;":"\u2192","&darr;":"\u2193","&harr;":"\u2194","&crarr;":"\u21b5","&lArr;":"\u21d0","&uArr;":"\u21d1","&rArr;":"\u21d2","&dArr;":"\u21d3","&hArr;":"\u21d4","&forall;":"\u2200","&part;":"\u2202","&exist;":"\u2203",
"&empty;":"\u2205","&nabla;":"\u2207","&isin;":"\u2208","&notin;":"\u2209","&ni;":"\u220b","&prod;":"\u220f","&sum;":"\u2211","&lowast;":"\u2217","&radic;":"\u221a","&prop;":"\u221d","&infin;":"\u221e","&ang;":"\u2220","&and;":"\u2227","&or;":"\u2228","&cap;":"\u2229","&cup;":"\u222a","&int;":"\u222b","&there4;":"\u2234","&sim;":"\u223c","&cong;":"\u2245","&asymp;":"\u2248","&ne;":"\u2260","&equiv;":"\u2261","&le;":"\u2264","&ge;":"\u2265","&sub;":"\u2282","&sup;":"\u2283","&nsub;":"\u2284","&sube;":"\u2286",
"&supe;":"\u2287","&oplus;":"\u2295","&otimes;":"\u2297","&perp;":"\u22a5","&sdot;":"\u22c5","&lceil;":"\u2308","&rceil;":"\u2309","&lfloor;":"\u230a","&rfloor;":"\u230b","&lang;":"\u2329","&rang;":"\u232a","&loz;":"\u25ca","&spades;":"\u2660","&clubs;":"\u2663","&hearts;":"\u2665","&diams;":"\u2666"},l=function(a){if(!~a.indexOf("&"))return a;for(var b in f)a=a.replace(new RegExp(b,"g"),f[b]);a=a.replace(/&#x(0*[0-9a-f]{2,5});?/gi,function(a,b){return String.fromCharCode(parseInt(+b,16))});a=a.replace(/&#([0-9]{2,4});?/gi,
function(a,b){return String.fromCharCode(+b)});return a=a.replace(/&amp;/g,"&")},h=function(a){a=a.replace(/&/g,"&amp;");a=a.replace(/'/g,"&#39;");for(var b in f)a=a.replace(new RegExp(f[b],"g"),b);return a};a.entities={encode:h,decode:l};var r={"document.cookie":"","document.write":"",".parentNode":"",".innerHTML":"","window.location":"","-moz-binding":"","\x3c!--":"&lt;!--","--\x3e":"--&gt;","<![CDATA[":"&lt;![CDATA["},p={"javascript\\s*:":"","expression\\s*(\\(|&\\#40;)":"","vbscript\\s*:":"",
"Redirect\\s+302":""},q=[/%0[0-8bcef]/g,/%1[0-9a-f]/g,/[\x00-\x08]/g,/\x0b/g,/\x0c/g,/[\x0e-\x1f]/g],n="javascript expression vbscript script applet alert document write cookie window".split(" ");a.xssClean=function(c,e){if("object"===typeof c){for(var f in c)c[f]=a.xssClean(c[f]);return c}c=b(c);c=c.replace(/\&([a-z\_0-9]+)\=([a-z\_0-9]+)/i,"!*$^#(@*#&$1=$2");c=c.replace(/(&\#?[0-9a-z]{2,})([\x00-\x20])*;?/i,"$1;$2");c=c.replace(/(&\#x?)([0-9A-F]+);?/i,"$1;$2");c=c.replace("!*$^#(@*#&","&");c=c.replace(/[a-z]+=([\'\"]).*?\1/gi,
function(a,b){return a.replace(b,b.replace(">","&gt;").replace("<","&lt;").replace("\\","\\\\"))});c=b(c);var g=c=c.replace("\t"," ");for(f in r)c=c.replace(f,r[f]);for(f in p)c=c.replace(new RegExp(f,"i"),p[f]);for(f in n){var h=n[f].split("").join("\\s*")+"\\s*";c=c.replace(new RegExp("("+h+")(\\s)","ig"),function(a,b,c){return b.replace(/\s+/g,"")+c})}do if(h=c,c.match(/<a/i)&&(c=c.replace(/<a\s+([^>]*?)(>|$)/gi,function(a,b,c){b=d(b.replace("<","").replace(">",""));return a.replace(b,b.replace(/href=.*?(alert\(|alert&\#40;|javascript\:|charset\=|window\.|document\.|\.cookie|<script|<xss|base64\s*,)/gi,
""))})),c.match(/<img/i)&&(c=c.replace(/<img\s+([^>]*?)(\s?\/?>|$)/gi,function(a,b,c){b=d(b.replace("<","").replace(">",""));return a.replace(b,b.replace(/src=.*?(alert\(|alert&\#40;|javascript\:|charset\=|window\.|document\.|\.cookie|<script|<xss|base64\s*,)/gi,""))})),c.match(/<video/i)&&(c=c.replace(/<video\s+([^>]*?)(\s?\/?>|$)/gi,function(a,b,c){b=d(b.replace("<","").replace(">",""));return a.replace(b,b.replace(/poster=.*?(alert\(|alert&\#40;|javascript\:|charset\=|window\.|document\.|\.cookie|<script|<xss|base64\s*,)/gi,
""))})),c.match(/script/i)||c.match(/xss/i))c=c.replace(/<(\/*)(script|xss)(.*?)\>/gi,"");while(h!=c);event_handlers=["[^a-z_-]on\\w*"];e||event_handlers.push("xmlns");c=c.replace(new RegExp("<([^><]+?)("+event_handlers.join("|")+")(\\s*=\\s*[^><]*)([><]*)","i"),"<$1$4");naughty="alert|applet|audio|basefont|base|behavior|bgsound|blink|body|embed|expression|form|frameset|frame|head|html|ilayer|iframe|input|isindex|layer|link|meta|object|plaintext|style|script|textarea|title|xml|xss";c=c.replace(new RegExp("<(/*\\s*)("+
naughty+")([^><]*)([><]*)","gi"),function(a,b,c,d,e){return"&lt;"+b+c+d+e.replace(">","&gt;").replace("<","&lt;")});c=c.replace(/(alert|cmd|passthru|eval|exec|expression|system|fopen|fsockopen|file|file_get_contents|readfile|unlink)(\s*)\((.*?)\)/gi,"$1$2&#40;$3&#41;");for(f in r)c=c.replace(f,r[f]);for(f in p)c=c.replace(new RegExp(f,"i"),p[f]);if(e&&c!==g)throw Error("Image may contain XSS");return c};var m=a.Validator=function(){};m.prototype.check=function(a,b){this.str="undefined"===typeof a||
null===a||isNaN(a)&&void 0===a.length?"":a+"";this.msg=b;this._errors=this._errors||[];return this};m.prototype.validate=m.prototype.check;m.prototype.assert=m.prototype.check;m.prototype.error=function(a){throw Error(a);};m.prototype.isAfter=function(a){a=a||new Date;var b=g(this.str);a=g(a);return b&&a&&b>=a?this:this.error(this.msg||"Invalid date")};m.prototype.isBefore=function(a){a=a||new Date;var b=g(this.str);a=g(a);return b&&a&&b<=a?this:this.error(this.msg||"Invalid date")};m.prototype.isEmail=
function(){return this.str.match(/^(?:[\w\!\#\$\%\&\'\*\+\-\/\=\?\^\`\{\|\}\~]+\.)*[\w\!\#\$\%\&\'\*\+\-\/\=\?\^\`\{\|\}\~]+@(?:(?:(?:[a-zA-Z0-9](?:[a-zA-Z0-9\-](?!\.)){0,61}[a-zA-Z0-9]?\.)+[a-zA-Z0-9](?:[a-zA-Z0-9\-](?!$)){0,61}[a-zA-Z0-9]?)|(?:\[(?:(?:[01]?\d{1,2}|2[0-4]\d|25[0-5])\.){3}(?:[01]?\d{1,2}|2[0-4]\d|25[0-5])\]))$/)?this:this.error(this.msg||"Invalid email")};m.prototype.isCreditCard=function(){this.str=this.str.replace(/[^0-9]+/g,"");if(!this.str.match(/^(?:4[0-9]{12}(?:[0-9]{3})?|5[1-5][0-9]{14}|6(?:011|5[0-9][0-9])[0-9]{12}|3[47][0-9]{13}|3(?:0[0-5]|[68][0-9])[0-9]{11}|(?:2131|1800|35\d{3})\d{11})$/))return this.error(this.msg||
"Invalid credit card");for(var a=0,b,c=!1,d=this.length-1;0<=d;d--)b=this.substring(d,d+1),b=parseInt(b,10),c?(b*=2,a=10<=b?a+(b%10+1):a+b):a+=b,c=c?!1:!0;return 0!==a%10?this.error(this.msg||"Invalid credit card"):this};m.prototype.isUrl=function(){return!this.str.match(/^(?!mailto:)(?:(?:https?|ftp):\/\/)?(?:\S+(?::\S*)?@)?(?:(?:(?:[1-9]\d?|1\d\d|2[01]\d|22[0-3])(?:\.(?:1?\d{1,2}|2[0-4]\d|25[0-5])){2}(?:\.(?:[1-9]\d?|1\d\d|2[0-4]\d|25[0-4]))|(?:(?:[a-z\u00a1-\uffff0-9]+-?)*[a-z\u00a1-\uffff0-9]+)(?:\.(?:[a-z\u00a1-\uffff0-9]+-?)*[a-z\u00a1-\uffff0-9]+)*(?:\.(?:[a-z\u00a1-\uffff]{2,})))|localhost)(?::\d{2,5})?(?:\/[^\s]*)?$/i)||
2083<this.str.length?this.error(this.msg||"Invalid URL"):this};m.prototype.isIPv4=function(){return c(this.str)?this:this.error(this.msg||"Invalid IP")};m.prototype.isIPv6=function(){return e(this.str)?this:this.error(this.msg||"Invalid IP")};m.prototype.isIP=function(){return c(this.str)||e(this.str)?this:this.error(this.msg||"Invalid IP")};m.prototype.isAlpha=function(){return this.str.match(/^[a-zA-Z]+$/)?this:this.error(this.msg||"Invalid characters")};m.prototype.isAlphanumeric=function(){return this.str.match(/^[a-zA-Z0-9]+$/)?
this:this.error(this.msg||"Invalid characters")};m.prototype.isNumeric=function(){return this.str.match(/^-?[0-9]+$/)?this:this.error(this.msg||"Invalid number")};m.prototype.isHexadecimal=function(){return this.str.match(/^[0-9a-fA-F]+$/)?this:this.error(this.msg||"Invalid hexadecimal")};m.prototype.isHexColor=function(){return this.str.match(/^#?([0-9a-fA-F]{3}|[0-9a-fA-F]{6})$/)?this:this.error(this.msg||"Invalid hexcolor")};m.prototype.isLowercase=function(){return this.str!==this.str.toLowerCase()?
this.error(this.msg||"Invalid characters"):this};m.prototype.isUppercase=function(){return this.str!==this.str.toUpperCase()?this.error(this.msg||"Invalid characters"):this};m.prototype.isInt=function(){return this.str.match(/^(?:-?(?:0|[1-9][0-9]*))$/)?this:this.error(this.msg||"Invalid integer")};m.prototype.isDecimal=function(){return this.str.match(/^(?:-?(?:0|[1-9][0-9]*))?(?:\.[0-9]*)?$/)?this:this.error(this.msg||"Invalid decimal")};m.prototype.isDivisibleBy=function(a){return 0===parseFloat(this.str)%
parseInt(a,10)};m.prototype.isFloat=function(){return this.isDecimal()};m.prototype.notNull=function(){return""===this.str?this.error(this.msg||"String is empty"):this};m.prototype.isNull=function(){return""!==this.str?this.error(this.msg||"String is not empty"):this};m.prototype.notEmpty=function(){return this.str.match(/^[\s\t\r\n]*$/)?this.error(this.msg||"String is whitespace"):this};m.prototype.equals=function(a){return this.str!=a?this.error(this.msg||"Not equal"):this};m.prototype.contains=
function(a){return-1!==this.str.indexOf(a)&&a?this:this.error(this.msg||"Invalid characters")};m.prototype.notContains=function(a){return 0<=this.str.indexOf(a)?this.error(this.msg||"Invalid characters"):this};m.prototype.regex=m.prototype.is=function(a,b){"RegExp"!==Object.prototype.toString.call(a).slice(8,-1)&&(a=new RegExp(a,b));return this.str.match(a)?this:this.error(this.msg||"Invalid characters")};m.prototype.notRegex=m.prototype.not=function(a,b){"RegExp"!==Object.prototype.toString.call(a).slice(8,
-1)&&(a=new RegExp(a,b));this.str.match(a)&&this.error(this.msg||"Invalid characters");return this};m.prototype.len=function(a,b){return this.str.length<a?this.error(this.msg||"String is too small"):this.str.length>b?this.error(this.msg||"String is too large"):this};m.prototype.isUUID=function(a){return this.str.match(3==a||"v3"==a?/[0-9A-F]{8}-[0-9A-F]{4}-3[0-9A-F]{3}-[0-9A-F]{4}-[0-9A-F]{12}$/i:4==a||"v4"==a?/[0-9A-F]{8}-[0-9A-F]{4}-4[0-9A-F]{3}-[89AB][0-9A-F]{3}-[0-9A-F]{12}$/i:5==a||"v5"==a?/^[0-9A-F]{8}-[0-9A-F]{4}-5[0-9A-F]{3}-[89AB][0-9A-F]{3}-[0-9A-F]{12}$/i:
/[0-9A-F]{8}-[0-9A-F]{4}-[0-9A-F]{4}-[0-9A-F]{4}-[0-9A-F]{12}$/i)?this:this.error(this.msg||"Not a UUID")};m.prototype.isUUIDv3=function(){return this.isUUID(3)};m.prototype.isUUIDv4=function(){return this.isUUID(4)};m.prototype.isUUIDv5=function(){return this.isUUID(5)};m.prototype.isDate=function(){var a=Date.parse(this.str);return isNaN(a)?this.error(this.msg||"Not a date"):this};m.prototype.isIn=function(a){return a&&"function"===typeof a.indexOf?~a.indexOf(this.str)?this:this.error(this.msg||
"Unexpected value"):this.error(this.msg||"Invalid in() argument")};m.prototype.notIn=function(a){return a&&"function"===typeof a.indexOf?-1!==a.indexOf(this.str)?this.error(this.msg||"Unexpected value"):this:this.error(this.msg||"Invalid notIn() argument")};m.prototype.min=function(a){var b=parseFloat(this.str);return!isNaN(b)&&b<a?this.error(this.msg||"Invalid number"):this};m.prototype.max=function(a){var b=parseFloat(this.str);return!isNaN(b)&&b>a?this.error(this.msg||"Invalid number"):this};m=
a.Filter=function(){};m.prototype.modify=function(a){this.str=a};m.prototype.convert=m.prototype.sanitize=function(a){this.str=null==a?"":a+"";return this};m.prototype.xss=function(b){this.modify(a.xssClean(this.str,b));return this.str};m.prototype.defence=function(a){return this.sanitize(a).xss()};m.prototype.entityDecode=function(){this.modify(l(this.str));return this.str};m.prototype.entityEncode=function(){this.modify(h(this.str));return this.str};m.prototype.escape=function(){this.modify(this.str.replace(/&/g,
"&amp;").replace(/"/g,"&quot;").replace(/</g,"&lt;").replace(/>/g,"&gt;"));return this.str};m.prototype.ltrim=function(a){this.modify(this.str.replace(new RegExp("^["+(a||"\\r\\n\\t\\s")+"]+","g"),""));return this.str};m.prototype.rtrim=function(a){this.modify(this.str.replace(new RegExp("["+(a||"\\r\\n\\t\\s")+"]+$","g"),""));return this.str};m.prototype.trim=function(a){a=a||"\\r\\n\\t\\s";this.modify(this.str.replace(new RegExp("^["+a+"]+|["+a+"]+$","g"),""));return this.str};m.prototype.ifNull=
function(a){this.str&&""!==this.str||this.modify(a);return this.str};m.prototype.toFloat=function(){this.modify(parseFloat(this.str));return this.str};m.prototype.toInt=function(a){this.modify(parseInt(this.str,a||10));return this.str};m.prototype.toBoolean=function(){this.str&&"0"!=this.str&&"false"!=this.str&&""!=this.str?this.modify(!0):this.modify(!1);return this.str};m.prototype.toBooleanStrict=function(){"1"==this.str||"true"==this.str?this.modify(!0):this.modify(!1);return this.str};a.sanitize=
a.convert=function(b){return(new a.Filter).sanitize(b)};a.check=a.validate=a.assert=function(b,c){return(new a.Validator).check(b,c)};return a});

+ 211
- 0
public/javascripts/yona-layout.js View File

@@ -0,0 +1,211 @@
(function(e,g){"function"===typeof define&&define.amd?define(g):"object"===typeof exports?module.exports=g():e.NProgress=g()})(this,function(){function e(e,g,r){return e<g?g:e>r?r:e}function g(e,g,r){e="translate3d"===w.positionUsing?{transform:"translate3d("+100*(-1+e)+"%,0,0)"}:"translate"===w.positionUsing?{transform:"translate("+100*(-1+e)+"%,0)"}:{"margin-left":100*(-1+e)+"%"};e.transition="all "+g+"ms "+r;return e}function m(e,g){return 0<=("string"==typeof e?e:W(e)).indexOf(" "+g+" ")}function z(e,
g){var r=W(e),l=r+g;m(r,g)||(e.className=l.substring(1))}function p(e,g){var r=W(e);m(e,g)&&(r=r.replace(" "+g+" "," "),e.className=r.substring(1,r.length-1))}function W(e){return(" "+(e.className||"")+" ").replace(/\s+/gi," ")}var l={version:"0.1.6"},w=l.settings={minimum:.08,easing:"ease",positionUsing:"",speed:200,trickle:!0,trickleRate:.02,trickleSpeed:800,showSpinner:!0,barSelector:'[role="bar"]',spinnerSelector:'[role="spinner"]',parent:"body",template:'<div class="bar" role="bar"><div class="peg"></div></div><div class="spinner" role="spinner"><div class="spinner-icon"></div></div>'};
l.configure=function(e){var g,r;for(g in e)r=e[g],void 0!==r&&e.hasOwnProperty(g)&&(w[g]=r);return this};l.status=null;l.set=function(D){var O=l.isStarted();D=e(D,w.minimum,1);l.status=1===D?null:D;var V=l.render(!O),m=V.querySelector(w.barSelector),p=w.speed,z=w.easing;V.offsetWidth;r(function(e){""===w.positionUsing&&(w.positionUsing=l.getPositioningCSS());y(m,g(D,p,z));1===D?(y(V,{transition:"none",opacity:1}),V.offsetWidth,setTimeout(function(){y(V,{transition:"all "+p+"ms linear",opacity:0});
setTimeout(function(){l.remove();e()},p)},p)):setTimeout(e,p)});return this};l.isStarted=function(){return"number"===typeof l.status};l.start=function(){l.status||l.set(0);var e=function(){setTimeout(function(){l.status&&(l.trickle(),e())},w.trickleSpeed)};w.trickle&&e();return this};l.done=function(e){return e||l.status?l.inc(.3+.5*Math.random()).set(1):this};l.inc=function(g){var r=l.status;return r?("number"!==typeof g&&(g=(1-r)*e(Math.random()*r,.1,.95)),r=e(r+g,0,.994),l.set(r)):l.start()};l.trickle=
function(){return l.inc(Math.random()*w.trickleRate)};(function(){var e=0,g=0;l.promise=function(r){if(!r||"resolved"==r.state())return this;0==g&&l.start();e++;g++;r.always(function(){g--;0==g?(e=0,l.done()):l.set((e-g)/e)});return this}})();l.render=function(e){if(l.isRendered())return document.getElementById("nprogress");z(document.documentElement,"nprogress-busy");var g=document.createElement("div");g.id="nprogress";g.innerHTML=w.template;var r=g.querySelector(w.barSelector),m=e?"-100":100*(-1+
(l.status||0));e=document.querySelector(w.parent);y(r,{transition:"all 0 linear",transform:"translate3d("+m+"%,0,0)"});w.showSpinner||(r=g.querySelector(w.spinnerSelector))&&r&&r.parentNode&&r.parentNode.removeChild(r);e!=document.body&&z(e,"nprogress-custom-parent");e.appendChild(g);return g};l.remove=function(){p(document.documentElement,"nprogress-busy");p(document.querySelector(w.parent),"nprogress-custom-parent");var e=document.getElementById("nprogress");e&&e&&e.parentNode&&e.parentNode.removeChild(e)};
l.isRendered=function(){return!!document.getElementById("nprogress")};l.getPositioningCSS=function(){var e=document.body.style,g="WebkitTransform"in e?"Webkit":"MozTransform"in e?"Moz":"msTransform"in e?"ms":"OTransform"in e?"O":"";return g+"Perspective"in e?"translate3d":g+"Transform"in e?"translate":"margin"};var r=function(){function e(){var r=g.shift();r&&r(e)}var g=[];return function(r){g.push(r);1==g.length&&e()}}(),y=function(){function e(g){return g.replace(/^-ms-/,"ms-").replace(/-([\da-z])/gi,
function(e,g){return g.toUpperCase()})}function g(y){y=e(y);var O;if(!(O=l[y])){O=y;a:{var m=document.body.style;if(!(y in m))for(var p=r.length,z=y.charAt(0).toUpperCase()+y.slice(1),w;p--;)if(w=r[p]+z,w in m){y=w;break a}}O=l[O]=y}return O}var r=["Webkit","O","Moz","ms"],l={};return function(e,r){var l=arguments,y,D;if(2==l.length)for(y in r){if(D=r[y],void 0!==D&&r.hasOwnProperty(y)){var l=e,m=y,m=g(m);l.style[m]=D}}else y=e,m=l[1],l=l[2],m=g(m),y.style[m]=l}}();return l});window.yobi="undefined"==typeof yobi?{}:yobi;
$yobi=yobi.Common=function(){function e(r,y,D){y=y||{};if(!1===g(r,y))return l.htTryLoad=l.htTryLoad||{},l.htTryLoad[r]="undefined"==typeof l.htTryLoad[r]?1:++l.htTryLoad[r],3<l.htTryLoad[r]?(console.log("[Yobi] fail to load module "+r),!1):m(l.sScriptPath+"service/yobi."+r+".js",function(){e(r,y,D)});"function"==typeof D&&D(y)}function g(e,g){for(var l=e.split("."),m=l.shift(),p=yobi[m];l.length&&p;)m=l.shift(),p=p[m];$("[data-toggle=popover]").popover();var z;if("undefined"==typeof p)return!1;"function"==
typeof p?z=new p(g):"object"==typeof p&&(z=p,z.init());return w[e]=z}function m(e,g){var l=document.createElement("script");l.type="text/javascript";l.async=!0;l.src=e;var m=function(){"function"==typeof g&&g();document.body.removeChild(l);l=m=null};l.addEventListener?l.addEventListener("load",m,!1):"undefined"==typeof l.onload?l.onreadystatechange=function(){"complete"!==this.readyState&&"loaded"!==this.readyState||m()}:l.onload=m;document.body.appendChild(l)}function z(e,g,m){l.oAlertDialog||(l.oAlertDialog=
new yobi.ui.Dialog("#yobiDialog"));l.oAlertDialog.show(e,m,{fOnAfterHide:g})}function p(e,g,m,p){l.oConfirmDialog||(l.oConfirmDialog=new yobi.ui.Dialog("#yobiDialog"));p=p||{};var z=p.aButtonStyles;p=p.aButtonLabels||[Messages("button.cancel"),Messages("button.confirm")];l.oConfirmDialog.show(e,m,{fOnClickButton:g,aButtonLabels:p,aButtonStyles:z})}function W(e){if("undefined"!==typeof window.File&&e instanceof window.File||"undefined"!==typeof window.Blob&&e instanceof window.Blob)return 0===e.type.toLowerCase().indexOf("image/");
var g=$(e);if((e=g.prop("files"))&&e.length){for(var g=!0,m=0,p=e.length;m<p;m++)g=g&&W(e[m]);return g}return"string"===typeof g.val()?(l.rxImgExts=l.rxImgExts||/\.(gif|bmp|jpg|jpeg|png)$/i,l.rxImgExts.test(g.val())):null}var l={sScriptPath:"",rxTrim:/\s+/g},w={};return{setScriptPath:function(e){l.sScriptPath=e},createNamespace:function(e){e=e.split(".");for(var g=window,l=null,m=0,p=e.length;m<p;m++){l=e[m];if(m==p-1)break;"object"!==typeof g[l]&&(g[l]={});g=g[l]}return{container:g,name:l}},getContrastColor:function(e){e=
new RGBColor(e);return 192<.21*e.r+.72*e.g+.07*e.b?"dimgray":"white"},loadModule:e,loadScript:m,stopEvent:function(e){e&&(e.cancelBubble=!0,e.returnValue=!1,e.stopPropagation&&e.stopPropagation(),e.preventDefault&&e.preventDefault())},sendForm:function(e){var g="",l=[],m=[],p=e.htOptForm||{method:"post"};for(g in p)m.push(g+'="'+p[g]+'"');var m=m.join(" "),z=$('<form action="'+e.sURL+'" '+m+">"),m=e.htData||{};for(g in m)l.push($('<input type="hidden" name="'+g+'" value="'+m[g]+'">'));z.append(l);
z.appendTo(document.body);z.ajaxForm({success:function(){"function"===typeof e.fOnLoad&&e.fOnLoad.apply(this,arguments);z.remove()},error:function(){"function"===typeof e.fOnError&&e.fOnError.apply(this,arguments);z.remove()},dataType:e.sDataType||null});z.submit();l=m=m=null},getTrim:function(e){return e.trim().replace(l.rxTrim,"")},showAlert:z,alert:z,confirm:p,ajaxConfirm:function(e,g,l,m){p(e,function(e){1===e.nButtonIndex&&$.ajax(g)},l,m)},notify:function(e,g,m){l.oToast||(l.oToast=new yobi.ui.Toast("#yobiToasts",
{sTplToast:$("#tplYobiToast").text()}));m?l.oToast.push("<strong>"+m+"</strong><br/>"+e,g):l.oToast.push(e,g)},nl2br:function(e){return"string"===typeof e?e.split("\n").join("<br>"):e},tmpl:function(e,g){l.rxTemplate=l.rxTemplate||/\${([^{}]*)}/g;return e.replace(l.rxTemplate,function(e,l){return"undefined"==typeof g[l]?"":g[l]})},htmlspecialchars:function(e){l.welHSC=l.welHSC||$("<div>");return l.welHSC.text(e).html()},isImageFile:W,xssClean:function(e){return(new Filter).defence(e)}}}();(function(e,g){function m(a){var b=a.length,d=c.type(a);return c.isWindow(a)?!1:1===a.nodeType&&b?!0:"array"===d||"function"!==d&&(0===b||"number"===typeof b&&0<b&&b-1 in a)}function z(a){var b=eb[a]={};c.each(a.match(P)||[],function(a,c){b[c]=!0});return b}function p(a,b,d,f){if(c.acceptData(a)){var h=c.expando,k="string"===typeof b,t=a.nodeType,x=t?c.cache:a,e=t?a[h]:a[h]&&h;if(e&&x[e]&&(f||x[e].data)||!k||d!==g){e||(t?a[h]=e=ma.pop()||c.guid++:e=h);x[e]||(x[e]={},t||(x[e].toJSON=c.noop));if("object"===
typeof b||"function"===typeof b)f?x[e]=c.extend(x[e],b):x[e].data=c.extend(x[e].data,b);a=x[e];f||(a.data||(a.data={}),a=a.data);d!==g&&(a[c.camelCase(b)]=d);k?(d=a[b],null==d&&(d=a[c.camelCase(b)])):d=a;return d}}}function W(a,b,d){if(c.acceptData(a)){var f,h,k,t=a.nodeType,e=t?c.cache:a,g=t?a[c.expando]:c.expando;if(e[g]){if(b&&(f=d?e[g]:e[g].data)){c.isArray(b)?b=b.concat(c.map(b,c.camelCase)):b in f?b=[b]:(b=c.camelCase(b),b=b in f?[b]:b.split(" "));h=0;for(k=b.length;h<k;h++)delete f[b[h]];if(!(d?
w:c.isEmptyObject)(f))return}if(!d&&(delete e[g].data,!w(e[g])))return;t?c.cleanData([a],!0):c.support.deleteExpando||e!=e.window?delete e[g]:e[g]=null}}}function l(a,b,d){if(d===g&&1===a.nodeType)if(d="data-"+b.replace(Gb,"-$1").toLowerCase(),d=a.getAttribute(d),"string"===typeof d){try{d="true"===d?!0:"false"===d?!1:"null"===d?null:+d+""===d?+d:Hb.test(d)?c.parseJSON(d):d}catch(f){}c.data(a,b,d)}else d=g;return d}function w(a){for(var b in a)if(("data"!==b||!c.isEmptyObject(a[b]))&&"toJSON"!==b)return!1;
return!0}function r(){return!0}function y(){return!1}function D(a,b){do a=a[b];while(a&&1!==a.nodeType);return a}function O(a,b,d){b=b||0;if(c.isFunction(b))return c.grep(a,function(a,c){return!!b.call(a,c,a)===d});if(b.nodeType)return c.grep(a,function(a){return a===b===d});if("string"===typeof b){var f=c.grep(a,function(a){return 1===a.nodeType});if(Ib.test(b))return c.filter(b,f,!d);b=c.filter(b,f)}return c.grep(a,function(a){return 0<=c.inArray(a,b)===d})}function V(a){var b=fb.split("|");a=a.createDocumentFragment();
if(a.createElement)for(;b.length;)a.createElement(b.pop());return a}function ta(a,b){return a.getElementsByTagName(b)[0]||a.appendChild(a.ownerDocument.createElement(b))}function fa(a){var b=a.getAttributeNode("type");a.type=(b&&b.specified)+"/"+a.type;return a}function za(a){var b=Jb.exec(a.type);b?a.type=b[1]:a.removeAttribute("type");return a}function Aa(a,b){for(var d,f=0;null!=(d=a[f]);f++)c._data(d,"globalEval",!b||c._data(b[f],"globalEval"))}function Fa(a,b){if(1===b.nodeType&&c.hasData(a)){var d,
f,h;f=c._data(a);var k=c._data(b,f),t=f.events;if(t)for(d in delete k.handle,k.events={},t)for(f=0,h=t[d].length;f<h;f++)c.event.add(b,d,t[d][f]);k.data&&(k.data=c.extend({},k.data))}}function J(a,b){var d,f,h=0,k="undefined"!==typeof a.getElementsByTagName?a.getElementsByTagName(b||"*"):"undefined"!==typeof a.querySelectorAll?a.querySelectorAll(b||"*"):g;if(!k)for(k=[],d=a.childNodes||a;null!=(f=d[h]);h++)!b||c.nodeName(f,b)?k.push(f):c.merge(k,J(f,b));return b===g||b&&c.nodeName(a,b)?c.merge([a],
k):k}function Ga(a){Pa.test(a.type)&&(a.defaultChecked=a.checked)}function Ba(a,b){if(b in a)return b;for(var c=b.charAt(0).toUpperCase()+b.slice(1),f=b,h=gb.length;h--;)if(b=gb[h]+c,b in a)return b;return f}function ca(a,b){a=b||a;return"none"===c.css(a,"display")||!c.contains(a.ownerDocument,a)}function Ha(a,b){for(var d,f=[],h=0,k=a.length;h<k;h++)d=a[h],d.style&&(f[h]=c._data(d,"olddisplay"),b?(f[h]||"none"!==d.style.display||(d.style.display=""),""===d.style.display&&ca(d)&&(f[h]=c._data(d,"olddisplay",
S(d.nodeName)))):f[h]||ca(d)||c._data(d,"olddisplay",c.css(d,"display")));for(h=0;h<k;h++)d=a[h],!d.style||b&&"none"!==d.style.display&&""!==d.style.display||(d.style.display=b?f[h]||"":"none");return a}function na(a,b,c){return(a=Kb.exec(b))?Math.max(0,a[1]-(c||0))+(a[2]||"px"):b}function R(a,b,d,f,h){b=d===(f?"border":"content")?4:"width"===b?1:0;for(var k=0;4>b;b+=2)"margin"===d&&(k+=c.css(a,d+ga[b],!0,h)),f?("content"===d&&(k-=c.css(a,"padding"+ga[b],!0,h)),"margin"!==d&&(k-=c.css(a,"border"+
ga[b]+"Width",!0,h))):(k+=c.css(a,"padding"+ga[b],!0,h),"padding"!==d&&(k+=c.css(a,"border"+ga[b]+"Width",!0,h)));return k}function da(a,b,d){var f=!0,h="width"===b?a.offsetWidth:a.offsetHeight,k=Y(a),t=c.support.boxSizing&&"border-box"===c.css(a,"boxSizing",!1,k);if(0>=h||null==h){h=ia(a,b,k);if(0>h||null==h)h=a.style[b];if(Ia.test(h))return h;f=t&&(c.support.boxSizingReliable||h===a.style[b]);h=parseFloat(h)||0}return h+R(a,b,d||(t?"border":"content"),f,k)+"px"}function S(a){var b=v,d=hb[a];d||
(d=n(a,b),"none"!==d&&d||(Ca=(Ca||c("<iframe frameborder='0' width='0' height='0'/>").css("cssText","display:block !important")).appendTo(b.documentElement),b=(Ca[0].contentWindow||Ca[0].contentDocument).document,b.write("<!doctype html><html><body>"),b.close(),d=n(a,b),Ca.detach()),hb[a]=d);return d}function n(a,b){var d=c(b.createElement(a)).appendTo(b.body),f=c.css(d[0],"display");d.remove();return f}function u(a,b,d,f){var h;if(c.isArray(b))c.each(b,function(b,c){d||Lb.test(a)?f(a,c):u(a+"["+
("object"===typeof c?b:"")+"]",c,d,f)});else if(d||"object"!==c.type(b))f(a,b);else for(h in b)u(a+"["+h+"]",b[h],d,f)}function Z(a){return function(b,d){"string"!==typeof b&&(d=b,b="*");var f,h=0,k=b.toLowerCase().match(P)||[];if(c.isFunction(d))for(;f=k[h++];)"+"===f[0]?(f=f.slice(1)||"*",(a[f]=a[f]||[]).unshift(d)):(a[f]=a[f]||[]).push(d)}}function N(a,b,d,f){function h(e){var g;k[e]=!0;c.each(a[e]||[],function(a,c){var e=c(b,d,f);if("string"===typeof e&&!t&&!k[e])return b.dataTypes.unshift(e),
h(e),!1;if(t)return!(g=e)});return g}var k={},t=a===Qa;return h(b.dataTypes[0])||!k["*"]&&h("*")}function E(a,b){var d,f,h=c.ajaxSettings.flatOptions||{};for(d in b)b[d]!==g&&((h[d]?a:f||(f={}))[d]=b[d]);f&&c.extend(!0,a,f);return a}function Q(){try{return new e.XMLHttpRequest}catch(a){}}function A(){setTimeout(function(){oa=g});return oa=c.now()}function ja(a,b){c.each(b,function(b,c){for(var h=(Da[b]||[]).concat(Da["*"]),k=0,t=h.length;k<t&&!h[k].call(a,b,c);k++);})}function M(a,b,d){var f,h=0,
k=Ja.length,t=c.Deferred().always(function(){delete e.elem}),e=function(){if(f)return!1;for(var b=oa||A(),b=Math.max(0,g.startTime+g.duration-b),c=1-(b/g.duration||0),d=0,h=g.tweens.length;d<h;d++)g.tweens[d].run(c);t.notifyWith(a,[g,c,b]);if(1>c&&h)return b;t.resolveWith(a,[g]);return!1},g=t.promise({elem:a,props:c.extend({},b),opts:c.extend(!0,{specialEasing:{}},d),originalProperties:b,originalOptions:d,startTime:oa||A(),duration:d.duration,tweens:[],createTween:function(b,d){var f=c.Tween(a,g.opts,
b,d,g.opts.specialEasing[b]||g.opts.easing);g.tweens.push(f);return f},stop:function(b){var c=0,d=b?g.tweens.length:0;if(f)return this;for(f=!0;c<d;c++)g.tweens[c].run(1);b?t.resolveWith(a,[g,b]):t.rejectWith(a,[g,b]);return this}});d=g.props;for(ea(d,g.opts.specialEasing);h<k;h++)if(b=Ja[h].call(g,a,d,g.opts))return b;ja(g,d);c.isFunction(g.opts.start)&&g.opts.start.call(a,g);c.fx.timer(c.extend(e,{elem:a,anim:g,queue:g.opts.queue}));return g.progress(g.opts.progress).done(g.opts.done,g.opts.complete).fail(g.opts.fail).always(g.opts.always)}
function ea(a,b){var d,f,h,k,t;for(d in a)if(f=c.camelCase(d),h=b[f],k=a[d],c.isArray(k)&&(h=k[1],k=a[d]=k[0]),d!==f&&(a[f]=k,delete a[d]),(t=c.cssHooks[f])&&"expand"in t)for(d in k=t.expand(k),delete a[f],k)d in a||(a[d]=k[d],b[d]=h);else b[f]=h}function G(a,b,c,f,h){return new G.prototype.init(a,b,c,f,h)}function va(a,b){var c,f={height:a},h=0;for(b=b?1:0;4>h;h+=2-b)c=ga[h],f["margin"+c]=f["padding"+c]=a;b&&(f.opacity=f.width=a);return f}function H(a){return c.isWindow(a)?a:9===a.nodeType?a.defaultView||
a.parentWindow:!1}var ib,Ka,v=e.document,Mb=e.location,Nb=e.jQuery,Ob=e.$,La={},ma=[],jb=ma.concat,Ra=ma.push,ka=ma.slice,kb=ma.indexOf,Pb=La.toString,Sa=La.hasOwnProperty,Ta="1.9.0".trim,c=function(a,b){return new c.fn.init(a,b,ib)},Ma=/[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/.source,P=/\S+/g,Qb=/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,Rb=/^(?:(<[\w\W]+>)[^>]*|#([\w-]*))$/,lb=/^<(\w+)\s*\/?>(?:<\/\1>|)$/,Sb=/^[\],:{}\s]*$/,Tb=/(?:^|:|,)(?:\s*\[)+/g,Ub=/\\(?:["\\\/bfnrt]|u[\da-fA-F]{4})/g,Vb=/"[^"\\\r\n]*"|true|false|null|-?(?:\d+\.|)\d+(?:[eE][+-]?\d+|)/g,
Wb=/^-ms-/,Xb=/-([\da-z])/gi,Yb=function(a,b){return b.toUpperCase()},Na=function(){v.addEventListener?(v.removeEventListener("DOMContentLoaded",Na,!1),c.ready()):"complete"===v.readyState&&(v.detachEvent("onreadystatechange",Na),c.ready())};c.fn=c.prototype={jquery:"1.9.0",constructor:c,init:function(a,b,d){var f;if(!a)return this;if("string"===typeof a){f="<"===a.charAt(0)&&">"===a.charAt(a.length-1)&&3<=a.length?[null,a,null]:Rb.exec(a);if(!f||!f[1]&&b)return!b||b.jquery?(b||d).find(a):this.constructor(b).find(a);
if(f[1]){if(b=b instanceof c?b[0]:b,c.merge(this,c.parseHTML(f[1],b&&b.nodeType?b.ownerDocument||b:v,!0)),lb.test(f[1])&&c.isPlainObject(b))for(f in b)if(c.isFunction(this[f]))this[f](b[f]);else this.attr(f,b[f])}else{if((b=v.getElementById(f[2]))&&b.parentNode){if(b.id!==f[2])return d.find(a);this.length=1;this[0]=b}this.context=v;this.selector=a}return this}if(a.nodeType)return this.context=this[0]=a,this.length=1,this;if(c.isFunction(a))return d.ready(a);a.selector!==g&&(this.selector=a.selector,
this.context=a.context);return c.makeArray(a,this)},selector:"",length:0,size:function(){return this.length},toArray:function(){return ka.call(this)},get:function(a){return null==a?this.toArray():0>a?this[this.length+a]:this[a]},pushStack:function(a){a=c.merge(this.constructor(),a);a.prevObject=this;a.context=this.context;return a},each:function(a,b){return c.each(this,a,b)},ready:function(a){c.ready.promise().done(a);return this},slice:function(){return this.pushStack(ka.apply(this,arguments))},
first:function(){return this.eq(0)},last:function(){return this.eq(-1)},eq:function(a){var b=this.length;a=+a+(0>a?b:0);return this.pushStack(0<=a&&a<b?[this[a]]:[])},map:function(a){return this.pushStack(c.map(this,function(b,c){return a.call(b,c,b)}))},end:function(){return this.prevObject||this.constructor(null)},push:Ra,sort:[].sort,splice:[].splice};c.fn.init.prototype=c.fn;c.extend=c.fn.extend=function(){var a,b,d,f,h,k=arguments[0]||{},t=1,e=arguments.length,n=!1;"boolean"===typeof k&&(n=k,
k=arguments[1]||{},t=2);"object"===typeof k||c.isFunction(k)||(k={});e===t&&(k=this,--t);for(;t<e;t++)if(null!=(a=arguments[t]))for(b in a)d=k[b],f=a[b],k!==f&&(n&&f&&(c.isPlainObject(f)||(h=c.isArray(f)))?(h?(h=!1,d=d&&c.isArray(d)?d:[]):d=d&&c.isPlainObject(d)?d:{},k[b]=c.extend(n,d,f)):f!==g&&(k[b]=f));return k};c.extend({noConflict:function(a){e.$===c&&(e.$=Ob);a&&e.jQuery===c&&(e.jQuery=Nb);return c},isReady:!1,readyWait:1,holdReady:function(a){a?c.readyWait++:c.ready(!0)},ready:function(a){if(!0===
a?!--c.readyWait:!c.isReady){if(!v.body)return setTimeout(c.ready);c.isReady=!0;!0!==a&&0<--c.readyWait||(Ka.resolveWith(v,[c]),c.fn.trigger&&c(v).trigger("ready").off("ready"))}},isFunction:function(a){return"function"===c.type(a)},isArray:Array.isArray||function(a){return"array"===c.type(a)},isWindow:function(a){return null!=a&&a==a.window},isNumeric:function(a){return!isNaN(parseFloat(a))&&isFinite(a)},type:function(a){return null==a?String(a):"object"===typeof a||"function"===typeof a?La[Pb.call(a)]||
"object":typeof a},isPlainObject:function(a){if(!a||"object"!==c.type(a)||a.nodeType||c.isWindow(a))return!1;try{if(a.constructor&&!Sa.call(a,"constructor")&&!Sa.call(a.constructor.prototype,"isPrototypeOf"))return!1}catch(d){return!1}for(var b in a);return b===g||Sa.call(a,b)},isEmptyObject:function(a){for(var b in a)return!1;return!0},error:function(a){throw Error(a);},parseHTML:function(a,b,d){if(!a||"string"!==typeof a)return null;"boolean"===typeof b&&(d=b,b=!1);b=b||v;var f=lb.exec(a);d=!d&&
[];if(f)return[b.createElement(f[1])];f=c.buildFragment([a],b,d);d&&c(d).remove();return c.merge([],f.childNodes)},parseJSON:function(a){if(e.JSON&&e.JSON.parse)return e.JSON.parse(a);if(null===a)return a;if("string"===typeof a&&(a=c.trim(a))&&Sb.test(a.replace(Ub,"@").replace(Vb,"]").replace(Tb,"")))return(new Function("return "+a))();c.error("Invalid JSON: "+a)},parseXML:function(a){var b,d;if(!a||"string"!==typeof a)return null;try{e.DOMParser?(d=new DOMParser,b=d.parseFromString(a,"text/xml")):
(b=new ActiveXObject("Microsoft.XMLDOM"),b.async="false",b.loadXML(a))}catch(f){b=g}b&&b.documentElement&&!b.getElementsByTagName("parsererror").length||c.error("Invalid XML: "+a);return b},noop:function(){},globalEval:function(a){a&&c.trim(a)&&(e.execScript||function(a){e.eval.call(e,a)})(a)},camelCase:function(a){return a.replace(Wb,"ms-").replace(Xb,Yb)},nodeName:function(a,b){return a.nodeName&&a.nodeName.toLowerCase()===b.toLowerCase()},each:function(a,b,c){var f,h=0,k=a.length;f=m(a);if(c)if(f)for(;h<
k&&(f=b.apply(a[h],c),!1!==f);h++);else for(h in a){if(f=b.apply(a[h],c),!1===f)break}else if(f)for(;h<k&&(f=b.call(a[h],h,a[h]),!1!==f);h++);else for(h in a)if(f=b.call(a[h],h,a[h]),!1===f)break;return a},trim:Ta&&!Ta.call("\ufeff\u00a0")?function(a){return null==a?"":Ta.call(a)}:function(a){return null==a?"":(a+"").replace(Qb,"")},makeArray:function(a,b){var d=b||[];null!=a&&(m(Object(a))?c.merge(d,"string"===typeof a?[a]:a):Ra.call(d,a));return d},inArray:function(a,b,c){var f;if(b){if(kb)return kb.call(b,
a,c);f=b.length;for(c=c?0>c?Math.max(0,f+c):c:0;c<f;c++)if(c in b&&b[c]===a)return c}return-1},merge:function(a,b){var c=b.length,f=a.length,h=0;if("number"===typeof c)for(;h<c;h++)a[f++]=b[h];else for(;b[h]!==g;)a[f++]=b[h++];a.length=f;return a},grep:function(a,b,c){var f,h=[],k=0,t=a.length;for(c=!!c;k<t;k++)f=!!b(a[k],k),c!==f&&h.push(a[k]);return h},map:function(a,b,c){var f,h=0,k=a.length,t=[];if(m(a))for(;h<k;h++)f=b(a[h],h,c),null!=f&&(t[t.length]=f);else for(h in a)f=b(a[h],h,c),null!=f&&
(t[t.length]=f);return jb.apply([],t)},guid:1,proxy:function(a,b){var d,f;"string"===typeof b&&(d=a[b],b=a,a=d);if(!c.isFunction(a))return g;f=ka.call(arguments,2);d=function(){return a.apply(b||this,f.concat(ka.call(arguments)))};d.guid=a.guid=a.guid||c.guid++;return d},access:function(a,b,d,f,h,k,t){var e=0,n=a.length,F=null==d;if("object"===c.type(d))for(e in h=!0,d)c.access(a,b,e,d[e],!0,k,t);else if(f!==g&&(h=!0,c.isFunction(f)||(t=!0),F&&(t?(b.call(a,f),b=null):(F=b,b=function(a,b,d){return F.call(c(a),
d)})),b))for(;e<n;e++)b(a[e],d,t?f:f.call(a[e],e,b(a[e],d)));return h?a:F?b.call(a):n?b(a[0],d):k},now:function(){return(new Date).getTime()}});c.ready.promise=function(a){if(!Ka)if(Ka=c.Deferred(),"complete"===v.readyState)setTimeout(c.ready);else if(v.addEventListener)v.addEventListener("DOMContentLoaded",Na,!1),e.addEventListener("load",c.ready,!1);else{v.attachEvent("onreadystatechange",Na);e.attachEvent("onload",c.ready);var b=!1;try{b=null==e.frameElement&&v.documentElement}catch(d){}b&&b.doScroll&&
function f(){if(!c.isReady){try{b.doScroll("left")}catch(a){return setTimeout(f,50)}c.ready()}}()}return Ka.promise(a)};c.each("Boolean Number String Function Array Date RegExp Object Error".split(" "),function(a,b){La["[object "+b+"]"]=b.toLowerCase()});ib=c(v);var eb={};c.Callbacks=function(a){a="string"===typeof a?eb[a]||z(a):c.extend({},a);var b,d,f,h,k,e,x=[],n=!a.once&&[],F=function(c){b=a.memory&&c;d=!0;e=h||0;h=0;k=x.length;for(f=!0;x&&e<k;e++)if(!1===x[e].apply(c[0],c[1])&&a.stopOnFalse){b=
!1;break}f=!1;x&&(n?n.length&&F(n.shift()):b?x=[]:l.disable())},l={add:function(){if(x){var d=x.length;(function Zb(b){c.each(b,function(b,d){var f=c.type(d);"function"===f?a.unique&&l.has(d)||x.push(d):d&&d.length&&"string"!==f&&Zb(d)})})(arguments);f?k=x.length:b&&(h=d,F(b))}return this},remove:function(){x&&c.each(arguments,function(a,b){for(var d;-1<(d=c.inArray(b,x,d));)x.splice(d,1),f&&(d<=k&&k--,d<=e&&e--)});return this},has:function(a){return-1<c.inArray(a,x)},empty:function(){x=[];return this},
disable:function(){x=n=b=g;return this},disabled:function(){return!x},lock:function(){n=g;b||l.disable();return this},locked:function(){return!n},fireWith:function(a,b){b=b||[];b=[a,b.slice?b.slice():b];!x||d&&!n||(f?n.push(b):F(b));return this},fire:function(){l.fireWith(this,arguments);return this},fired:function(){return!!d}};return l};c.extend({Deferred:function(a){var b=[["resolve","done",c.Callbacks("once memory"),"resolved"],["reject","fail",c.Callbacks("once memory"),"rejected"],["notify",
"progress",c.Callbacks("memory")]],d="pending",f={state:function(){return d},always:function(){h.done(arguments).fail(arguments);return this},then:function(){var a=arguments;return c.Deferred(function(d){c.each(b,function(b,e){var g=e[0],n=c.isFunction(a[b])&&a[b];h[e[1]](function(){var a=n&&n.apply(this,arguments);if(a&&c.isFunction(a.promise))a.promise().done(d.resolve).fail(d.reject).progress(d.notify);else d[g+"With"](this===f?d.promise():this,n?[a]:arguments)})});a=null}).promise()},promise:function(a){return null!=
a?c.extend(a,f):f}},h={};f.pipe=f.then;c.each(b,function(a,c){var e=c[2],g=c[3];f[c[1]]=e.add;g&&e.add(function(){d=g},b[a^1][2].disable,b[2][2].lock);h[c[0]]=function(){h[c[0]+"With"](this===h?f:this,arguments);return this};h[c[0]+"With"]=e.fireWith});f.promise(h);a&&a.call(h,h);return h},when:function(a){var b=0,d=ka.call(arguments),f=d.length,h=1!==f||a&&c.isFunction(a.promise)?f:0,k=1===h?a:c.Deferred(),e=function(a,b,c){return function(d){b[a]=this;c[a]=1<arguments.length?ka.call(arguments):
d;c===g?k.notifyWith(b,c):--h||k.resolveWith(b,c)}},g,n,l;if(1<f)for(g=Array(f),n=Array(f),l=Array(f);b<f;b++)d[b]&&c.isFunction(d[b].promise)?d[b].promise().done(e(b,l,d)).fail(k.reject).progress(e(b,n,g)):--h;h||k.resolveWith(l,d);return k.promise()}});c.support=function(){var a,b,d,f,h,k,t,g=v.createElement("div");g.setAttribute("className","t");g.innerHTML=" <link/><table></table><a href='/a'>a</a><input type='checkbox'/>";b=g.getElementsByTagName("*");d=g.getElementsByTagName("a")[0];if(!b||
!d||!b.length)return{};f=v.createElement("select");h=f.appendChild(v.createElement("option"));b=g.getElementsByTagName("input")[0];d.style.cssText="top:1px;float:left;opacity:.5";a={getSetAttribute:"t"!==g.className,leadingWhitespace:3===g.firstChild.nodeType,tbody:!g.getElementsByTagName("tbody").length,htmlSerialize:!!g.getElementsByTagName("link").length,style:/top/.test(d.getAttribute("style")),hrefNormalized:"/a"===d.getAttribute("href"),opacity:/^0.5/.test(d.style.opacity),cssFloat:!!d.style.cssFloat,
checkOn:!!b.value,optSelected:h.selected,enctype:!!v.createElement("form").enctype,html5Clone:"<:nav></:nav>"!==v.createElement("nav").cloneNode(!0).outerHTML,boxModel:"CSS1Compat"===v.compatMode,deleteExpando:!0,noCloneEvent:!0,inlineBlockNeedsLayout:!1,shrinkWrapBlocks:!1,reliableMarginRight:!0,boxSizingReliable:!0,pixelPosition:!1};b.checked=!0;a.noCloneChecked=b.cloneNode(!0).checked;f.disabled=!0;a.optDisabled=!h.disabled;try{delete g.test}catch(n){a.deleteExpando=!1}b=v.createElement("input");
b.setAttribute("value","");a.input=""===b.getAttribute("value");b.value="t";b.setAttribute("type","radio");a.radioValue="t"===b.value;b.setAttribute("checked","t");b.setAttribute("name","t");d=v.createDocumentFragment();d.appendChild(b);a.appendChecked=b.checked;a.checkClone=d.cloneNode(!0).cloneNode(!0).lastChild.checked;g.attachEvent&&(g.attachEvent("onclick",function(){a.noCloneEvent=!1}),g.cloneNode(!0).click());for(t in{submit:!0,change:!0,focusin:!0})g.setAttribute(d="on"+t,"t"),a[t+"Bubbles"]=
d in e||!1===g.attributes[d].expando;g.style.backgroundClip="content-box";g.cloneNode(!0).style.backgroundClip="";a.clearCloneStyle="content-box"===g.style.backgroundClip;c(function(){var b,c,d=v.getElementsByTagName("body")[0];d&&(b=v.createElement("div"),b.style.cssText="border:0;width:0;height:0;position:absolute;top:0;left:-9999px;margin-top:1px",d.appendChild(b).appendChild(g),g.innerHTML="<table><tr><td></td><td>t</td></tr></table>",c=g.getElementsByTagName("td"),c[0].style.cssText="padding:0;margin:0;border:0;display:none",
k=0===c[0].offsetHeight,c[0].style.display="",c[1].style.display="none",a.reliableHiddenOffsets=k&&0===c[0].offsetHeight,g.innerHTML="",g.style.cssText="box-sizing:border-box;-moz-box-sizing:border-box;-webkit-box-sizing:border-box;padding:1px;border:1px;display:block;width:4px;margin-top:1%;position:absolute;top:1%;",a.boxSizing=4===g.offsetWidth,a.doesNotIncludeMarginInBodyOffset=1!==d.offsetTop,e.getComputedStyle&&(a.pixelPosition="1%"!==(e.getComputedStyle(g,null)||{}).top,a.boxSizingReliable=
"4px"===(e.getComputedStyle(g,null)||{width:"4px"}).width,c=g.appendChild(v.createElement("div")),c.style.cssText=g.style.cssText="padding:0;margin:0;border:0;display:block;box-sizing:content-box;-moz-box-sizing:content-box;-webkit-box-sizing:content-box;",c.style.marginRight=c.style.width="0",g.style.width="1px",a.reliableMarginRight=!parseFloat((e.getComputedStyle(c,null)||{}).marginRight)),"undefined"!==typeof g.style.zoom&&(g.innerHTML="",g.style.cssText="padding:0;margin:0;border:0;display:block;box-sizing:content-box;-moz-box-sizing:content-box;-webkit-box-sizing:content-box;width:1px;padding:1px;display:inline;zoom:1",
a.inlineBlockNeedsLayout=3===g.offsetWidth,g.style.display="block",g.innerHTML="<div></div>",g.firstChild.style.width="5px",a.shrinkWrapBlocks=3!==g.offsetWidth,d.style.zoom=1),d.removeChild(b),g=null)});b=f=d=h=d=b=null;return a}();var Hb=/(?:\{[\s\S]*\}|\[[\s\S]*\])$/,Gb=/([A-Z])/g;c.extend({cache:{},expando:"jQuery"+("1.9.0"+Math.random()).replace(/\D/g,""),noData:{embed:!0,object:"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000",applet:!0},hasData:function(a){a=a.nodeType?c.cache[a[c.expando]]:a[c.expando];
return!!a&&!w(a)},data:function(a,b,c){return p(a,b,c,!1)},removeData:function(a,b){return W(a,b,!1)},_data:function(a,b,c){return p(a,b,c,!0)},_removeData:function(a,b){return W(a,b,!0)},acceptData:function(a){var b=a.nodeName&&c.noData[a.nodeName.toLowerCase()];return!b||!0!==b&&a.getAttribute("classid")===b}});c.fn.extend({data:function(a,b){var d,f,h=this[0],k=0,e=null;if(a===g){if(this.length&&(e=c.data(h),1===h.nodeType&&!c._data(h,"parsedAttrs"))){for(d=h.attributes;k<d.length;k++)f=d[k].name,
f.indexOf("data-")||(f=c.camelCase(f.substring(5)),l(h,f,e[f]));c._data(h,"parsedAttrs",!0)}return e}return"object"===typeof a?this.each(function(){c.data(this,a)}):c.access(this,function(b){if(b===g)return h?l(h,a,c.data(h,a)):null;this.each(function(){c.data(this,a,b)})},null,b,1<arguments.length,null,!0)},removeData:function(a){return this.each(function(){c.removeData(this,a)})}});c.extend({queue:function(a,b,d){var f;if(a)return b=(b||"fx")+"queue",f=c._data(a,b),d&&(!f||c.isArray(d)?f=c._data(a,
b,c.makeArray(d)):f.push(d)),f||[]},dequeue:function(a,b){b=b||"fx";var d=c.queue(a,b),f=d.length,h=d.shift(),k=c._queueHooks(a,b),e=function(){c.dequeue(a,b)};"inprogress"===h&&(h=d.shift(),f--);if(k.cur=h)"fx"===b&&d.unshift("inprogress"),delete k.stop,h.call(a,e,k);!f&&k&&k.empty.fire()},_queueHooks:function(a,b){var d=b+"queueHooks";return c._data(a,d)||c._data(a,d,{empty:c.Callbacks("once memory").add(function(){c._removeData(a,b+"queue");c._removeData(a,d)})})}});c.fn.extend({queue:function(a,
b){var d=2;"string"!==typeof a&&(b=a,a="fx",d--);return arguments.length<d?c.queue(this[0],a):b===g?this:this.each(function(){var d=c.queue(this,a,b);c._queueHooks(this,a);"fx"===a&&"inprogress"!==d[0]&&c.dequeue(this,a)})},dequeue:function(a){return this.each(function(){c.dequeue(this,a)})},delay:function(a,b){a=c.fx?c.fx.speeds[a]||a:a;return this.queue(b||"fx",function(b,c){var h=setTimeout(b,a);c.stop=function(){clearTimeout(h)}})},clearQueue:function(a){return this.queue(a||"fx",[])},promise:function(a,
b){var d,f=1,h=c.Deferred(),k=this,e=this.length,x=function(){--f||h.resolveWith(k,[k])};"string"!==typeof a&&(b=a,a=g);for(a=a||"fx";e--;)(d=c._data(k[e],a+"queueHooks"))&&d.empty&&(f++,d.empty.add(x));x();return h.promise(b)}});var pa,mb,Ua=/[\t\r\n]/g,$b=/\r/g,ac=/^(?:input|select|textarea|button|object)$/i,bc=/^(?:a|area)$/i,nb=/^(?:checked|selected|autofocus|autoplay|async|controls|defer|disabled|hidden|loop|multiple|open|readonly|required|scoped)$/i,Va=/^(?:checked|selected)$/i,la=c.support.getSetAttribute,
Wa=c.support.input;c.fn.extend({attr:function(a,b){return c.access(this,c.attr,a,b,1<arguments.length)},removeAttr:function(a){return this.each(function(){c.removeAttr(this,a)})},prop:function(a,b){return c.access(this,c.prop,a,b,1<arguments.length)},removeProp:function(a){a=c.propFix[a]||a;return this.each(function(){try{this[a]=g,delete this[a]}catch(b){}})},addClass:function(a){var b,d,f,h,k,e=0,g=this.length;b="string"===typeof a&&a;if(c.isFunction(a))return this.each(function(b){c(this).addClass(a.call(this,
b,this.className))});if(b)for(b=(a||"").match(P)||[];e<g;e++)if(d=this[e],f=1===d.nodeType&&(d.className?(" "+d.className+" ").replace(Ua," "):" ")){for(k=0;h=b[k++];)0>f.indexOf(" "+h+" ")&&(f+=h+" ");d.className=c.trim(f)}return this},removeClass:function(a){var b,d,f,h,k,e=0,g=this.length;b=0===arguments.length||"string"===typeof a&&a;if(c.isFunction(a))return this.each(function(b){c(this).removeClass(a.call(this,b,this.className))});if(b)for(b=(a||"").match(P)||[];e<g;e++)if(d=this[e],f=1===d.nodeType&&
(d.className?(" "+d.className+" ").replace(Ua," "):"")){for(k=0;h=b[k++];)for(;0<=f.indexOf(" "+h+" ");)f=f.replace(" "+h+" "," ");d.className=a?c.trim(f):""}return this},toggleClass:function(a,b){var d=typeof a,f="boolean"===typeof b;return c.isFunction(a)?this.each(function(d){c(this).toggleClass(a.call(this,d,this.className,b),b)}):this.each(function(){if("string"===d)for(var h,k=0,e=c(this),g=b,n=a.match(P)||[];h=n[k++];)g=f?g:!e.hasClass(h),e[g?"addClass":"removeClass"](h);else if("undefined"===
d||"boolean"===d)this.className&&c._data(this,"__className__",this.className),this.className=this.className||!1===a?"":c._data(this,"__className__")||""})},hasClass:function(a){a=" "+a+" ";for(var b=0,c=this.length;b<c;b++)if(1===this[b].nodeType&&0<=(" "+this[b].className+" ").replace(Ua," ").indexOf(a))return!0;return!1},val:function(a){var b,d,f,h=this[0];if(arguments.length)return f=c.isFunction(a),this.each(function(d){var h=c(this);1===this.nodeType&&(d=f?a.call(this,d,h.val()):a,null==d?d=
"":"number"===typeof d?d+="":c.isArray(d)&&(d=c.map(d,function(a){return null==a?"":a+""})),b=c.valHooks[this.type]||c.valHooks[this.nodeName.toLowerCase()],b&&"set"in b&&b.set(this,d,"value")!==g||(this.value=d))});if(h){if((b=c.valHooks[h.type]||c.valHooks[h.nodeName.toLowerCase()])&&"get"in b&&(d=b.get(h,"value"))!==g)return d;d=h.value;return"string"===typeof d?d.replace($b,""):null==d?"":d}}});c.extend({valHooks:{option:{get:function(a){var b=a.attributes.value;return!b||b.specified?a.value:
a.text}},select:{get:function(a){for(var b,d=a.options,f=a.selectedIndex,h=(a="select-one"===a.type||0>f)?null:[],k=a?f+1:d.length,e=0>f?k:a?f:0;e<k;e++)if(b=d[e],!(!b.selected&&e!==f||(c.support.optDisabled?b.disabled:null!==b.getAttribute("disabled"))||b.parentNode.disabled&&c.nodeName(b.parentNode,"optgroup"))){b=c(b).val();if(a)return b;h.push(b)}return h},set:function(a,b){var d=c.makeArray(b);c(a).find("option").each(function(){this.selected=0<=c.inArray(c(this).val(),d)});d.length||(a.selectedIndex=
-1);return d}}},attr:function(a,b,d){var f,h,k;k=a.nodeType;if(a&&3!==k&&8!==k&&2!==k){if("undefined"===typeof a.getAttribute)return c.prop(a,b,d);if(k=1!==k||!c.isXMLDoc(a))b=b.toLowerCase(),h=c.attrHooks[b]||(nb.test(b)?mb:pa);if(d!==g)if(null===d)c.removeAttr(a,b);else{if(h&&k&&"set"in h&&(f=h.set(a,d,b))!==g)return f;a.setAttribute(b,d+"");return d}else{if(h&&k&&"get"in h&&null!==(f=h.get(a,b)))return f;"undefined"!==typeof a.getAttribute&&(f=a.getAttribute(b));return null==f?g:f}}},removeAttr:function(a,
b){var d,f,h=0,k=b&&b.match(P);if(k&&1===a.nodeType)for(;d=k[h++];)f=c.propFix[d]||d,nb.test(d)?!la&&Va.test(d)?a[c.camelCase("default-"+d)]=a[f]=!1:a[f]=!1:c.attr(a,d,""),a.removeAttribute(la?d:f)},attrHooks:{type:{set:function(a,b){if(!c.support.radioValue&&"radio"===b&&c.nodeName(a,"input")){var d=a.value;a.setAttribute("type",b);d&&(a.value=d);return b}}}},propFix:{tabindex:"tabIndex",readonly:"readOnly","for":"htmlFor","class":"className",maxlength:"maxLength",cellspacing:"cellSpacing",cellpadding:"cellPadding",
rowspan:"rowSpan",colspan:"colSpan",usemap:"useMap",frameborder:"frameBorder",contenteditable:"contentEditable"},prop:function(a,b,d){var f,h,k;k=a.nodeType;if(a&&3!==k&&8!==k&&2!==k){if(k=1!==k||!c.isXMLDoc(a))b=c.propFix[b]||b,h=c.propHooks[b];return d!==g?h&&"set"in h&&(f=h.set(a,d,b))!==g?f:a[b]=d:h&&"get"in h&&null!==(f=h.get(a,b))?f:a[b]}},propHooks:{tabIndex:{get:function(a){var b=a.getAttributeNode("tabindex");return b&&b.specified?parseInt(b.value,10):ac.test(a.nodeName)||bc.test(a.nodeName)&&
a.href?0:g}}}});mb={get:function(a,b){var d=c.prop(a,b),f="boolean"===typeof d&&a.getAttribute(b);return(d="boolean"===typeof d?Wa&&la?null!=f:Va.test(b)?a[c.camelCase("default-"+b)]:!!f:a.getAttributeNode(b))&&!1!==d.value?b.toLowerCase():g},set:function(a,b,d){!1===b?c.removeAttr(a,d):Wa&&la||!Va.test(d)?a.setAttribute(!la&&c.propFix[d]||d,d):a[c.camelCase("default-"+d)]=a[d]=!0;return d}};Wa&&la||(c.attrHooks.value={get:function(a,b){var d=a.getAttributeNode(b);return c.nodeName(a,"input")?a.defaultValue:
d&&d.specified?d.value:g},set:function(a,b,d){if(c.nodeName(a,"input"))a.defaultValue=b;else return pa&&pa.set(a,b,d)}});la||(pa=c.valHooks.button={get:function(a,b){var c=a.getAttributeNode(b);return c&&("id"===b||"name"===b||"coords"===b?""!==c.value:c.specified)?c.value:g},set:function(a,b,c){var f=a.getAttributeNode(c);f||a.setAttributeNode(f=a.ownerDocument.createAttribute(c));f.value=b+="";return"value"===c||b===a.getAttribute(c)?b:g}},c.attrHooks.contenteditable={get:pa.get,set:function(a,
b,c){pa.set(a,""===b?!1:b,c)}},c.each(["width","height"],function(a,b){c.attrHooks[b]=c.extend(c.attrHooks[b],{set:function(a,c){if(""===c)return a.setAttribute(b,"auto"),c}})}));c.support.hrefNormalized||(c.each(["href","src","width","height"],function(a,b){c.attrHooks[b]=c.extend(c.attrHooks[b],{get:function(a){a=a.getAttribute(b,2);return null==a?g:a}})}),c.each(["href","src"],function(a,b){c.propHooks[b]={get:function(a){return a.getAttribute(b,4)}}}));c.support.style||(c.attrHooks.style={get:function(a){return a.style.cssText||
g},set:function(a,b){return a.style.cssText=b+""}});c.support.optSelected||(c.propHooks.selected=c.extend(c.propHooks.selected,{get:function(a){if(a=a.parentNode)a.selectedIndex,a.parentNode&&a.parentNode.selectedIndex;return null}}));c.support.enctype||(c.propFix.enctype="encoding");c.support.checkOn||c.each(["radio","checkbox"],function(){c.valHooks[this]={get:function(a){return null===a.getAttribute("value")?"on":a.value}}});c.each(["radio","checkbox"],function(){c.valHooks[this]=c.extend(c.valHooks[this],
{set:function(a,b){if(c.isArray(b))return a.checked=0<=c.inArray(c(a).val(),b)}})});var Xa=/^(?:input|select|textarea)$/i,cc=/^key/,dc=/^(?:mouse|contextmenu)|click/,ob=/^(?:focusinfocus|focusoutblur)$/,pb=/^([^.]*)(?:\.(.+)|)$/;c.event={global:{},add:function(a,b,d,f,h){var k,e,x,n,l,m,q,u,p;if(l=3!==a.nodeType&&8!==a.nodeType&&c._data(a)){d.handler&&(k=d,d=k.handler,h=k.selector);d.guid||(d.guid=c.guid++);(n=l.events)||(n=l.events={});(e=l.handle)||(e=l.handle=function(a){return"undefined"===typeof c||
a&&c.event.triggered===a.type?g:c.event.dispatch.apply(e.elem,arguments)},e.elem=a);b=(b||"").match(P)||[""];for(l=b.length;l--;)x=pb.exec(b[l])||[],u=m=x[1],p=(x[2]||"").split(".").sort(),x=c.event.special[u]||{},u=(h?x.delegateType:x.bindType)||u,x=c.event.special[u]||{},m=c.extend({type:u,origType:m,data:f,handler:d,guid:d.guid,selector:h,needsContext:h&&c.expr.match.needsContext.test(h),namespace:p.join(".")},k),(q=n[u])||(q=n[u]=[],q.delegateCount=0,x.setup&&!1!==x.setup.call(a,f,p,e)||(a.addEventListener?
a.addEventListener(u,e,!1):a.attachEvent&&a.attachEvent("on"+u,e))),x.add&&(x.add.call(a,m),m.handler.guid||(m.handler.guid=d.guid)),h?q.splice(q.delegateCount++,0,m):q.push(m),c.event.global[u]=!0;a=null}},remove:function(a,b,d,f,h){var k,e,g,n,l,m,q,u,p,r,z,v=c.hasData(a)&&c._data(a);if(v&&(n=v.events)){b=(b||"").match(P)||[""];for(l=b.length;l--;)if(g=pb.exec(b[l])||[],p=z=g[1],r=(g[2]||"").split(".").sort(),p){q=c.event.special[p]||{};p=(f?q.delegateType:q.bindType)||p;u=n[p]||[];g=g[2]&&new RegExp("(^|\\.)"+
r.join("\\.(?:.*\\.|)")+"(\\.|$)");for(e=k=u.length;k--;)m=u[k],!h&&z!==m.origType||d&&d.guid!==m.guid||g&&!g.test(m.namespace)||f&&f!==m.selector&&("**"!==f||!m.selector)||(u.splice(k,1),m.selector&&u.delegateCount--,q.remove&&q.remove.call(a,m));e&&!u.length&&(q.teardown&&!1!==q.teardown.call(a,r,v.handle)||c.removeEvent(a,p,v.handle),delete n[p])}else for(p in n)c.event.remove(a,p+b[l],d,f,!0);c.isEmptyObject(n)&&(delete v.handle,c._removeData(a,"events"))}},trigger:function(a,b,d,f){var h,k,t,
n,l,m,u=[d||v],q=a.type||a;m=a.namespace?a.namespace.split("."):[];k=h=d=d||v;if(3!==d.nodeType&&8!==d.nodeType&&!ob.test(q+c.event.triggered)&&(0<=q.indexOf(".")&&(m=q.split("."),q=m.shift(),m.sort()),n=0>q.indexOf(":")&&"on"+q,a=a[c.expando]?a:new c.Event(q,"object"===typeof a&&a),a.isTrigger=!0,a.namespace=m.join("."),a.namespace_re=a.namespace?new RegExp("(^|\\.)"+m.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,a.result=g,a.target||(a.target=d),b=null==b?[a]:c.makeArray(b,[a]),m=c.event.special[q]||{},
f||!m.trigger||!1!==m.trigger.apply(d,b))){if(!f&&!m.noBubble&&!c.isWindow(d)){t=m.delegateType||q;ob.test(t+q)||(k=k.parentNode);for(;k;k=k.parentNode)u.push(k),h=k;h===(d.ownerDocument||v)&&u.push(h.defaultView||h.parentWindow||e)}for(h=0;(k=u[h++])&&!a.isPropagationStopped();)a.type=1<h?t:m.bindType||q,(l=(c._data(k,"events")||{})[a.type]&&c._data(k,"handle"))&&l.apply(k,b),(l=n&&k[n])&&c.acceptData(k)&&l.apply&&!1===l.apply(k,b)&&a.preventDefault();a.type=q;if(!(f||a.isDefaultPrevented()||m._default&&
!1!==m._default.apply(d.ownerDocument,b)||"click"===q&&c.nodeName(d,"a"))&&c.acceptData(d)&&n&&d[q]&&!c.isWindow(d)){(h=d[n])&&(d[n]=null);c.event.triggered=q;try{d[q]()}catch(p){}c.event.triggered=g;h&&(d[n]=h)}return a.result}},dispatch:function(a){a=c.event.fix(a);var b,d,f,h,k=[],e=ka.call(arguments);b=(c._data(this,"events")||{})[a.type]||[];var n=c.event.special[a.type]||{};e[0]=a;a.delegateTarget=this;if(!n.preDispatch||!1!==n.preDispatch.call(this,a)){k=c.event.handlers.call(this,a,b);for(b=
0;(h=k[b++])&&!a.isPropagationStopped();)for(a.currentTarget=h.elem,d=0;(f=h.handlers[d++])&&!a.isImmediatePropagationStopped();)if(!a.namespace_re||a.namespace_re.test(f.namespace))a.handleObj=f,a.data=f.data,f=((c.event.special[f.origType]||{}).handle||f.handler).apply(h.elem,e),f!==g&&!1===(a.result=f)&&(a.preventDefault(),a.stopPropagation());n.postDispatch&&n.postDispatch.call(this,a);return a.result}},handlers:function(a,b){var d,f,h,k,e=[],n=b.delegateCount,l=a.target;if(n&&l.nodeType&&(!a.button||
"click"!==a.type))for(;l!=this;l=l.parentNode||this)if(!0!==l.disabled||"click"!==a.type){f=[];for(d=0;d<n;d++)k=b[d],h=k.selector+" ",f[h]===g&&(f[h]=k.needsContext?0<=c(h,this).index(l):c.find(h,this,null,[l]).length),f[h]&&f.push(k);f.length&&e.push({elem:l,handlers:f})}n<b.length&&e.push({elem:this,handlers:b.slice(n)});return e},fix:function(a){if(a[c.expando])return a;var b,d,f=a,h=c.event.fixHooks[a.type]||{},k=h.props?this.props.concat(h.props):this.props;a=new c.Event(f);for(b=k.length;b--;)d=
k[b],a[d]=f[d];a.target||(a.target=f.srcElement||v);3===a.target.nodeType&&(a.target=a.target.parentNode);a.metaKey=!!a.metaKey;return h.filter?h.filter(a,f):a},props:"altKey bubbles cancelable ctrlKey currentTarget eventPhase metaKey relatedTarget shiftKey target timeStamp view which".split(" "),fixHooks:{},keyHooks:{props:["char","charCode","key","keyCode"],filter:function(a,b){null==a.which&&(a.which=null!=b.charCode?b.charCode:b.keyCode);return a}},mouseHooks:{props:"button buttons clientX clientY fromElement offsetX offsetY pageX pageY screenX screenY toElement".split(" "),
filter:function(a,b){var c,f,h=b.button,k=b.fromElement;null==a.pageX&&null!=b.clientX&&(c=a.target.ownerDocument||v,f=c.documentElement,c=c.body,a.pageX=b.clientX+(f&&f.scrollLeft||c&&c.scrollLeft||0)-(f&&f.clientLeft||c&&c.clientLeft||0),a.pageY=b.clientY+(f&&f.scrollTop||c&&c.scrollTop||0)-(f&&f.clientTop||c&&c.clientTop||0));!a.relatedTarget&&k&&(a.relatedTarget=k===a.target?b.toElement:k);a.which||h===g||(a.which=h&1?1:h&2?3:h&4?2:0);return a}},special:{load:{noBubble:!0},click:{trigger:function(){if(c.nodeName(this,
"input")&&"checkbox"===this.type&&this.click)return this.click(),!1}},focus:{trigger:function(){if(this!==v.activeElement&&this.focus)try{return this.focus(),!1}catch(a){}},delegateType:"focusin"},blur:{trigger:function(){if(this===v.activeElement&&this.blur)return this.blur(),!1},delegateType:"focusout"},beforeunload:{postDispatch:function(a){a.result!==g&&(a.originalEvent.returnValue=a.result)}}},simulate:function(a,b,d,f){a=c.extend(new c.Event,d,{type:a,isSimulated:!0,originalEvent:{}});f?c.event.trigger(a,
null,b):c.event.dispatch.call(b,a);a.isDefaultPrevented()&&d.preventDefault()}};c.removeEvent=v.removeEventListener?function(a,b,c){a.removeEventListener&&a.removeEventListener(b,c,!1)}:function(a,b,c){b="on"+b;a.detachEvent&&("undefined"===typeof a[b]&&(a[b]=null),a.detachEvent(b,c))};c.Event=function(a,b){if(!(this instanceof c.Event))return new c.Event(a,b);a&&a.type?(this.originalEvent=a,this.type=a.type,this.isDefaultPrevented=a.defaultPrevented||!1===a.returnValue||a.getPreventDefault&&a.getPreventDefault()?
r:y):this.type=a;b&&c.extend(this,b);this.timeStamp=a&&a.timeStamp||c.now();this[c.expando]=!0};c.Event.prototype={isDefaultPrevented:y,isPropagationStopped:y,isImmediatePropagationStopped:y,preventDefault:function(){var a=this.originalEvent;this.isDefaultPrevented=r;a&&(a.preventDefault?a.preventDefault():a.returnValue=!1)},stopPropagation:function(){var a=this.originalEvent;this.isPropagationStopped=r;a&&(a.stopPropagation&&a.stopPropagation(),a.cancelBubble=!0)},stopImmediatePropagation:function(){this.isImmediatePropagationStopped=
r;this.stopPropagation()}};c.each({mouseenter:"mouseover",mouseleave:"mouseout"},function(a,b){c.event.special[a]={delegateType:b,bindType:b,handle:function(a){var f,h=a.relatedTarget,k=a.handleObj;if(!h||h!==this&&!c.contains(this,h))a.type=k.origType,f=k.handler.apply(this,arguments),a.type=b;return f}}});c.support.submitBubbles||(c.event.special.submit={setup:function(){if(c.nodeName(this,"form"))return!1;c.event.add(this,"click._submit keypress._submit",function(a){a=a.target;(a=c.nodeName(a,
"input")||c.nodeName(a,"button")?a.form:g)&&!c._data(a,"submitBubbles")&&(c.event.add(a,"submit._submit",function(a){a._submit_bubble=!0}),c._data(a,"submitBubbles",!0))})},postDispatch:function(a){a._submit_bubble&&(delete a._submit_bubble,this.parentNode&&!a.isTrigger&&c.event.simulate("submit",this.parentNode,a,!0))},teardown:function(){if(c.nodeName(this,"form"))return!1;c.event.remove(this,"._submit")}});c.support.changeBubbles||(c.event.special.change={setup:function(){if(Xa.test(this.nodeName)){if("checkbox"===
this.type||"radio"===this.type)c.event.add(this,"propertychange._change",function(a){"checked"===a.originalEvent.propertyName&&(this._just_changed=!0)}),c.event.add(this,"click._change",function(a){this._just_changed&&!a.isTrigger&&(this._just_changed=!1);c.event.simulate("change",this,a,!0)});return!1}c.event.add(this,"beforeactivate._change",function(a){a=a.target;Xa.test(a.nodeName)&&!c._data(a,"changeBubbles")&&(c.event.add(a,"change._change",function(a){!this.parentNode||a.isSimulated||a.isTrigger||
c.event.simulate("change",this.parentNode,a,!0)}),c._data(a,"changeBubbles",!0))})},handle:function(a){var b=a.target;if(this!==b||a.isSimulated||a.isTrigger||"radio"!==b.type&&"checkbox"!==b.type)return a.handleObj.handler.apply(this,arguments)},teardown:function(){c.event.remove(this,"._change");return!Xa.test(this.nodeName)}});c.support.focusinBubbles||c.each({focus:"focusin",blur:"focusout"},function(a,b){var d=0,f=function(a){c.event.simulate(b,a.target,c.event.fix(a),!0)};c.event.special[b]=
{setup:function(){0===d++&&v.addEventListener(a,f,!0)},teardown:function(){0===--d&&v.removeEventListener(a,f,!0)}}});c.fn.extend({on:function(a,b,d,f,h){var k,e;if("object"===typeof a){"string"!==typeof b&&(d=d||b,b=g);for(e in a)this.on(e,b,d,a[e],h);return this}null==d&&null==f?(f=b,d=b=g):null==f&&("string"===typeof b?(f=d,d=g):(f=d,d=b,b=g));if(!1===f)f=y;else if(!f)return this;1===h&&(k=f,f=function(a){c().off(a);return k.apply(this,arguments)},f.guid=k.guid||(k.guid=c.guid++));return this.each(function(){c.event.add(this,
a,f,d,b)})},one:function(a,b,c,f){return this.on(a,b,c,f,1)},off:function(a,b,d){var f;if(a&&a.preventDefault&&a.handleObj)return f=a.handleObj,c(a.delegateTarget).off(f.namespace?f.origType+"."+f.namespace:f.origType,f.selector,f.handler),this;if("object"===typeof a){for(f in a)this.off(f,b,a[f]);return this}if(!1===b||"function"===typeof b)d=b,b=g;!1===d&&(d=y);return this.each(function(){c.event.remove(this,a,d,b)})},bind:function(a,b,c){return this.on(a,null,b,c)},unbind:function(a,b){return this.off(a,
null,b)},delegate:function(a,b,c,f){return this.on(b,a,c,f)},undelegate:function(a,b,c){return 1===arguments.length?this.off(a,"**"):this.off(b,a||"**",c)},trigger:function(a,b){return this.each(function(){c.event.trigger(a,b,this)})},triggerHandler:function(a,b){var d=this[0];if(d)return c.event.trigger(a,b,d,!0)},hover:function(a,b){return this.mouseenter(a).mouseleave(b||a)}});c.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(a,b){c.fn[b]=function(a,c){return 0<arguments.length?this.on(b,null,a,c):this.trigger(b)};cc.test(b)&&(c.event.fixHooks[b]=c.event.keyHooks);dc.test(b)&&(c.event.fixHooks[b]=c.event.mouseHooks)});(function(a,b){function d(a){return ma.test(a+"")}function f(){var a,b=[];return a=function(c,d){b.push(c+=" ")>B.cacheLength&&delete a[b.shift()];return a[c]=d}}function h(a){a[L]=!0;return a}function k(a){var b=T.createElement("div");try{return a(b)}catch(c){return!1}finally{}}function e(a,b,c,
d){var f,h,k,g,t;(b?b.ownerDocument||b:ua)!==T&&wa(b);b=b||T;c=c||[];if(!a||"string"!==typeof a)return c;if(1!==(g=b.nodeType)&&9!==g)return[];if(!A&&!d){if(f=na.exec(a))if(k=f[1])if(9===g)if((h=b.getElementById(k))&&h.parentNode){if(h.id===k)return c.push(h),c}else return c;else{if(b.ownerDocument&&(h=b.ownerDocument.getElementById(k))&&H(b,h)&&h.id===k)return c.push(h),c}else{if(f[2])return R.apply(c,S.call(b.getElementsByTagName(a),0)),c;if((k=f[3])&&I.getByClassName&&b.getElementsByClassName)return R.apply(c,
S.call(b.getElementsByClassName(k),0)),c}if(I.qsa&&!ha.test(a)){f=!0;h=L;k=b;t=9===g&&a;if(1===g&&"object"!==b.nodeName.toLowerCase()){g=q(a);(f=b.getAttribute("id"))?h=f.replace(sa,"\\$&"):b.setAttribute("id",h);h="[id='"+h+"'] ";for(k=g.length;k--;)g[k]=h+u(g[k]);k=fa.test(a)&&b.parentNode||b;t=g.join(",")}if(t)try{return R.apply(c,S.call(k.querySelectorAll(t),0)),c}catch(n){}finally{f||b.removeAttribute("id")}}}var l;a:{a=a.replace(Y,"$1");h=q(a);if(!d&&1===h.length){f=h[0]=h[0].slice(0);if(2<
f.length&&"ID"===(l=f[0]).type&&9===b.nodeType&&!A&&B.relative[f[1].type]){b=B.find.ID(l.matches[0].replace(qa,ra),b)[0];if(!b){l=c;break a}a=a.slice(f.shift().value.length)}for(g=aa.needsContext.test(a)?-1:f.length-1;0<=g;g--){l=f[g];if(B.relative[k=l.type])break;if(k=B.find[k])if(d=k(l.matches[0].replace(qa,ra),fa.test(f[0].type)&&b.parentNode||b)){f.splice(g,1);a=d.length&&u(f);if(!a){R.apply(c,S.call(d,0));l=c;break a}break}}}D(a,h)(d,b,A,c,fa.test(a));l=c}return l}function g(a,b){for(var c=a&&
b&&a.nextSibling;c;c=c.nextSibling)if(c===b)return-1;return a?1:-1}function n(a){return function(b){return"input"===b.nodeName.toLowerCase()&&b.type===a}}function l(a){return function(b){var c=b.nodeName.toLowerCase();return("input"===c||"button"===c)&&b.type===a}}function m(a){return h(function(b){b=+b;return h(function(c,d){for(var f,h=a([],c.length,b),e=h.length;e--;)c[f=h[e]]&&(c[f]=!(d[f]=c[f]))})})}function q(a,b){var c,d,f,h,k,g,n;if(k=V[a+" "])return b?0:k.slice(0);k=a;g=[];for(n=B.preFilter;k;){if(!c||
(d=ia.exec(k)))d&&(k=k.slice(d[0].length)||k),g.push(f=[]);c=!1;if(d=va.exec(k))c=d.shift(),f.push({value:c,type:d[0].replace(Y," ")}),k=k.slice(c.length);for(h in B.filter)!(d=aa[h].exec(k))||n[h]&&!(d=n[h](d))||(c=d.shift(),f.push({value:c,type:h,matches:d}),k=k.slice(c.length));if(!c)break}return b?k.length:k?e.error(a):V(a,g).slice(0)}function u(a){for(var b=0,c=a.length,d="";b<c;b++)d+=a[b].value;return d}function p(a,b,c){var d=b.dir,f=c&&"parentNode"===b.dir,h=O++;return b.first?function(b,
c,h){for(;b=b[d];)if(1===b.nodeType||f)return a(b,c,h)}:function(b,c,k){var e,g,t,qb=Q+" "+h;if(k)for(;b=b[d];){if((1===b.nodeType||f)&&a(b,c,k))return!0}else for(;b=b[d];)if(1===b.nodeType||f)if(t=b[L]||(b[L]={}),(g=t[d])&&g[0]===qb){if(!0===(e=g[1])||e===C)return!0===e}else if(g=t[d]=[qb],g[1]=a(b,c,k)||C,!0===g[1])return!0}}function r(a){return 1<a.length?function(b,c,d){for(var f=a.length;f--;)if(!a[f](b,c,d))return!1;return!0}:a[0]}function v(a,b,c,d,f){for(var h,k=[],e=0,g=a.length,t=null!=
b;e<g;e++)if(h=a[e])if(!c||c(h,d,f))k.push(h),t&&b.push(e);return k}function z(a,b,c,d,f,k){d&&!d[L]&&(d=z(d));f&&!f[L]&&(f=z(f,k));return h(function(h,k,g,n){var l,x,m=[],q=[],u=k.length,p;if(!(p=h)){p=b||"*";for(var F=g.nodeType?[g]:g,r=[],B=0,K=F.length;B<K;B++)e(p,F[B],r);p=r}p=!a||!h&&b?p:v(p,m,a,g,n);F=c?f||(h?a:u||d)?[]:k:p;c&&c(p,F,g,n);if(d)for(l=v(F,q),d(l,[],g,n),g=l.length;g--;)if(x=l[g])F[q[g]]=!(p[q[g]]=x);if(h){if(f||a){if(f){l=[];for(g=F.length;g--;)(x=F[g])&&l.push(p[g]=x);f(null,
F=[],l,n)}for(g=F.length;g--;)(x=F[g])&&-1<(l=f?ba.call(h,x):m[g])&&(h[l]=!(k[l]=x))}}else F=v(F===k?F.splice(u,F.length):F),f?f(null,k,F,n):R.apply(k,F)})}function N(a){var b,c,d,f=a.length,h=B.relative[a[0].type];c=h||B.relative[" "];for(var k=h?1:0,e=p(function(a){return a===b},c,!0),g=p(function(a){return-1<ba.call(b,a)},c,!0),t=[function(a,c,d){return!h&&(d||c!==ja)||((b=c).nodeType?e(a,c,d):g(a,c,d))}];k<f;k++)if(c=B.relative[a[k].type])t=[p(r(t),c)];else{c=B.filter[a[k].type].apply(null,a[k].matches);
if(c[L]){for(d=++k;d<f&&!B.relative[a[d].type];d++);return z(1<k&&r(t),1<k&&u(a.slice(0,k-1)).replace(Y,"$1"),c,k<d&&N(a.slice(k,d)),d<f&&N(a=a.slice(d)),d<f&&u(a))}t.push(c)}return r(t)}function Z(a,b){var c=0,d=0<b.length,f=0<a.length,k=function(h,k,g,n,l){var x,m,q=[],u=0,p="0",F=h&&[],r=null!=l,K=ja,z=h||f&&B.find.TAG("*",l&&k.parentNode||k),N=Q+=null==K?1:Math.E;r&&(ja=k!==T&&k,C=c);for(;null!=(l=z[p]);p++){if(f&&l){for(x=0;m=a[x];x++)if(m(l,k,g)){n.push(l);break}r&&(Q=N,C=++c)}d&&((l=!m&&l)&&
u--,h&&F.push(l))}u+=p;if(d&&p!==u){for(x=0;m=b[x];x++)m(F,q,k,g);if(h){if(0<u)for(;p--;)F[p]||q[p]||(q[p]=ca.call(n));q=v(q)}R.apply(n,q);r&&!h&&0<q.length&&1<u+b.length&&e.uniqueSort(n)}r&&(Q=N,ja=K);return F};return d?h(k):k}function y(){}var w,C,B,G,E,D,xa,ja,wa,T,X,A,ha,ya,M,H,J,L="sizzle"+-new Date,ua=a.document,I={},Q=0,O=0,U=f(),V=f(),W=f(),ea=typeof b,P=[],ca=P.pop,R=P.push,S=P.slice,ba=P.indexOf||function(a){for(var b=0,c=this.length;b<c;b++)if(this[b]===a)return b;return-1},P="(?:\\\\.|[\\w-]|[^\\x00-\\xa0])+".replace("w",
"w#"),ga="\\[[\\x20\\t\\r\\n\\f]*((?:\\\\.|[\\w-]|[^\\x00-\\xa0])+)[\\x20\\t\\r\\n\\f]*(?:([*^$|!~]?=)[\\x20\\t\\r\\n\\f]*(?:(['\"])((?:\\\\.|[^\\\\])*?)\\3|("+P+")|)|)[\\x20\\t\\r\\n\\f]*\\]",da=":((?:\\\\.|[\\w-]|[^\\x00-\\xa0])+)(?:\\(((['\"])((?:\\\\.|[^\\\\])*?)\\3|((?:\\\\.|[^\\\\()[\\]]|"+ga.replace(3,8)+")*)|.*)\\)|)",Y=RegExp("^[\\x20\\t\\r\\n\\f]+|((?:^|[^\\\\])(?:\\\\.)*)[\\x20\\t\\r\\n\\f]+$","g"),ia=/^[\x20\t\r\n\f]*,[\x20\t\r\n\f]*/,va=/^[\x20\t\r\n\f]*([\x20\t\r\n\f>+~])[\x20\t\r\n\f]*/,
ka=new RegExp(da),la=new RegExp("^"+P+"$"),aa={ID:/^#((?:\\.|[\w-]|[^\x00-\xa0])+)/,CLASS:/^\.((?:\\.|[\w-]|[^\x00-\xa0])+)/,NAME:/^\[name=['"]?((?:\\.|[\w-]|[^\x00-\xa0])+)['"]?\]/,TAG:new RegExp("^("+"(?:\\\\.|[\\w-]|[^\\x00-\\xa0])+".replace("w","w*")+")"),ATTR:new RegExp("^"+ga),PSEUDO:new RegExp("^"+da),CHILD:/^:(only|first|last|nth|nth-last)-(child|of-type)(?:\([\x20\t\r\n\f]*(even|odd|(([+-]|)(\d*)n|)[\x20\t\r\n\f]*(?:([+-]|)[\x20\t\r\n\f]*(\d+)|))[\x20\t\r\n\f]*\)|)/i,needsContext:/^[\x20\t\r\n\f]*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\([\x20\t\r\n\f]*((?:-\d)?\d*)[\x20\t\r\n\f]*\)|)(?=[^-]|$)/i},
fa=/[\x20\t\r\n\f]*[+~]/,ma=/\{\s*\[native code\]\s*\}/,na=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,oa=/^(?:input|select|textarea|button)$/i,pa=/^h\d$/i,sa=/'|\\/g,ta=/\=[\x20\t\r\n\f]*([^'"\]]*)[\x20\t\r\n\f]*\]/g,qa=/\\([\da-fA-F]{1,6}[\x20\t\r\n\f]?|.)/g,ra=function(a,b){var c="0x"+b-65536;return c!==c?b:0>c?String.fromCharCode(c+65536):String.fromCharCode(c>>10|55296,c&1023|56320)};try{S.call(X.childNodes,0)[0].nodeType}catch(Cc){S=function(a){for(var b,c=[];b=this[a];a++)c.push(b);return c}}E=e.isXML=
function(a){return(a=a&&(a.ownerDocument||a).documentElement)?"HTML"!==a.nodeName:!1};wa=e.setDocument=function(a){var c=a?a.ownerDocument||a:ua;if(c===T||9!==c.nodeType||!c.documentElement)return T;T=c;X=c.documentElement;A=E(c);I.tagNameNoComments=k(function(a){a.appendChild(c.createComment(""));return!a.getElementsByTagName("*").length});I.attributes=k(function(a){a.innerHTML="<select></select>";a=typeof a.lastChild.getAttribute("multiple");return"boolean"!==a&&"string"!==a});I.getByClassName=
k(function(a){a.innerHTML="<div class='hidden e'></div><div class='hidden'></div>";if(!a.getElementsByClassName||!a.getElementsByClassName("e").length)return!1;a.lastChild.className="e";return 2===a.getElementsByClassName("e").length});I.getByName=k(function(a){a.id=L+0;a.innerHTML="<a name='"+L+"'></a><div name='"+L+"'></div>";X.insertBefore(a,X.firstChild);var b=c.getElementsByName&&c.getElementsByName(L).length===2+c.getElementsByName(L+0).length;I.getIdNotName=!c.getElementById(L);X.removeChild(a);
return b});B.attrHandle=k(function(a){a.innerHTML="<a href='#'></a>";return a.firstChild&&typeof a.firstChild.getAttribute!==ea&&"#"===a.firstChild.getAttribute("href")})?{}:{href:function(a){return a.getAttribute("href",2)},type:function(a){return a.getAttribute("type")}};I.getIdNotName?(B.find.ID=function(a,b){if(typeof b.getElementById!==ea&&!A){var c=b.getElementById(a);return c&&c.parentNode?[c]:[]}},B.filter.ID=function(a){var b=a.replace(qa,ra);return function(a){return a.getAttribute("id")===
b}}):(B.find.ID=function(a,c){if(typeof c.getElementById!==ea&&!A){var d=c.getElementById(a);return d?d.id===a||typeof d.getAttributeNode!==ea&&d.getAttributeNode("id").value===a?[d]:b:[]}},B.filter.ID=function(a){var b=a.replace(qa,ra);return function(a){return(a=typeof a.getAttributeNode!==ea&&a.getAttributeNode("id"))&&a.value===b}});B.find.TAG=I.tagNameNoComments?function(a,b){if(typeof b.getElementsByTagName!==ea)return b.getElementsByTagName(a)}:function(a,b){var c,d=[],f=0,h=b.getElementsByTagName(a);
if("*"===a){for(;c=h[f];f++)1===c.nodeType&&d.push(c);return d}return h};B.find.NAME=I.getByName&&function(a,b){if(typeof b.getElementsByName!==ea)return b.getElementsByName(name)};B.find.CLASS=I.getByClassName&&function(a,b){if(typeof b.getElementsByClassName!==ea&&!A)return b.getElementsByClassName(a)};ya=[];ha=[":focus"];if(I.qsa=d(c.querySelectorAll))k(function(a){a.innerHTML="<select><option selected=''></option></select>";a.querySelectorAll("[selected]").length||ha.push("\\[[\\x20\\t\\r\\n\\f]*(?:checked|disabled|ismap|multiple|readonly|selected|value)");
a.querySelectorAll(":checked").length||ha.push(":checked")}),k(function(a){a.innerHTML="<input type='hidden' i=''/>";a.querySelectorAll("[i^='']").length&&ha.push("[*^$]=[\\x20\\t\\r\\n\\f]*(?:\"\"|'')");a.querySelectorAll(":enabled").length||ha.push(":enabled",":disabled");a.querySelectorAll("*,:x");ha.push(",.*:")});(I.matchesSelector=d(M=X.matchesSelector||X.mozMatchesSelector||X.webkitMatchesSelector||X.oMatchesSelector||X.msMatchesSelector))&&k(function(a){I.disconnectedMatch=M.call(a,"div");
M.call(a,"[s!='']:x");ya.push("!=",da)});ha=new RegExp(ha.join("|"));ya=new RegExp(ya.join("|"));H=d(X.contains)||X.compareDocumentPosition?function(a,b){var c=9===a.nodeType?a.documentElement:a,d=b&&b.parentNode;return a===d||!!(d&&1===d.nodeType&&(c.contains?c.contains(d):a.compareDocumentPosition&&a.compareDocumentPosition(d)&16))}:function(a,b){if(b)for(;b=b.parentNode;)if(b===a)return!0;return!1};J=X.compareDocumentPosition?function(a,b){var d;return a===b?(xa=!0,0):(d=b.compareDocumentPosition&&
a.compareDocumentPosition&&a.compareDocumentPosition(b))?d&1||a.parentNode&&11===a.parentNode.nodeType?a===c||H(ua,a)?-1:b===c||H(ua,b)?1:0:d&4?-1:1:a.compareDocumentPosition?-1:1}:function(a,b){var d,f=0;d=a.parentNode;var h=b.parentNode,k=[a],e=[b];if(a===b)return xa=!0,0;if(a.sourceIndex&&b.sourceIndex)return(~b.sourceIndex||-2147483648)-(H(ua,a)&&~a.sourceIndex||-2147483648);if(!d||!h)return a===c?-1:b===c?1:d?-1:h?1:0;if(d===h)return g(a,b);for(d=a;d=d.parentNode;)k.unshift(d);for(d=b;d=d.parentNode;)e.unshift(d);
for(;k[f]===e[f];)f++;return f?g(k[f],e[f]):k[f]===ua?-1:e[f]===ua?1:0};xa=!1;[0,0].sort(J);I.detectDuplicates=xa;return T};e.matches=function(a,b){return e(a,null,null,b)};e.matchesSelector=function(a,b){(a.ownerDocument||a)!==T&&wa(a);b=b.replace(ta,"='$1']");if(!(!I.matchesSelector||A||ya&&ya.test(b)||ha.test(b)))try{var c=M.call(a,b);if(c||I.disconnectedMatch||a.document&&11!==a.document.nodeType)return c}catch(d){}return 0<e(b,T,null,[a]).length};e.contains=function(a,b){(a.ownerDocument||a)!==
T&&wa(a);return H(a,b)};e.attr=function(a,b){var c;(a.ownerDocument||a)!==T&&wa(a);A||(b=b.toLowerCase());return(c=B.attrHandle[b])?c(a):A||I.attributes?a.getAttribute(b):((c=a.getAttributeNode(b))||a.getAttribute(b))&&!0===a[b]?b:c&&c.specified?c.value:null};e.error=function(a){throw Error("Syntax error, unrecognized expression: "+a);};e.uniqueSort=function(a){var b,c=[],d=1,f=0;xa=!I.detectDuplicates;a.sort(J);if(xa){for(;b=a[d];d++)b===a[d-1]&&(f=c.push(d));for(;f--;)a.splice(c[f],1)}return a};
G=e.getText=function(a){var b,c="",d=0;b=a.nodeType;if(!b)for(;b=a[d];d++)c+=G(b);else if(1===b||9===b||11===b){if("string"===typeof a.textContent)return a.textContent;for(a=a.firstChild;a;a=a.nextSibling)c+=G(a)}else if(3===b||4===b)return a.nodeValue;return c};B=e.selectors={cacheLength:50,createPseudo:h,match:aa,find:{},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(a){a[1]=a[1].replace(qa,
ra);a[3]=(a[4]||a[5]||"").replace(qa,ra);"~="===a[2]&&(a[3]=" "+a[3]+" ");return a.slice(0,4)},CHILD:function(a){a[1]=a[1].toLowerCase();"nth"===a[1].slice(0,3)?(a[3]||e.error(a[0]),a[4]=+(a[4]?a[5]+(a[6]||1):2*("even"===a[3]||"odd"===a[3])),a[5]=+(a[7]+a[8]||"odd"===a[3])):a[3]&&e.error(a[0]);return a},PSEUDO:function(a){var b,c=!a[5]&&a[2];if(aa.CHILD.test(a[0]))return null;a[4]?a[2]=a[4]:c&&ka.test(c)&&(b=q(c,!0))&&(b=c.indexOf(")",c.length-b)-c.length)&&(a[0]=a[0].slice(0,b),a[2]=c.slice(0,b));
return a.slice(0,3)}},filter:{TAG:function(a){if("*"===a)return function(){return!0};a=a.replace(qa,ra).toLowerCase();return function(b){return b.nodeName&&b.nodeName.toLowerCase()===a}},CLASS:function(a){var b=U[a+" "];return b||(b=new RegExp("(^|[\\x20\\t\\r\\n\\f])"+a+"([\\x20\\t\\r\\n\\f]|$)"),U(a,function(a){return b.test(a.className||typeof a.getAttribute!==ea&&a.getAttribute("class")||"")}))},ATTR:function(a,b,c){return function(d){d=e.attr(d,a);if(null==d)return"!="===b;if(!b)return!0;d+=
"";return"="===b?d===c:"!="===b?d!==c:"^="===b?c&&0===d.indexOf(c):"*="===b?c&&-1<d.indexOf(c):"$="===b?c&&d.substr(d.length-c.length)===c:"~="===b?-1<(" "+d+" ").indexOf(c):"|="===b?d===c||d.substr(0,c.length+1)===c+"-":!1}},CHILD:function(a,b,c,d,f){var h="nth"!==a.slice(0,3),k="last"!==a.slice(-4),e="of-type"===b;return 1===d&&0===f?function(a){return!!a.parentNode}:function(b,c,g){var t,n,l,x,m;c=h!==k?"nextSibling":"previousSibling";var q=b.parentNode,u=e&&b.nodeName.toLowerCase();g=!g&&!e;if(q){if(h){for(;c;){for(n=
b;n=n[c];)if(e?n.nodeName.toLowerCase()===u:1===n.nodeType)return!1;m=c="only"===a&&!m&&"nextSibling"}return!0}m=[k?q.firstChild:q.lastChild];if(k&&g)for(g=q[L]||(q[L]={}),t=g[a]||[],x=t[0]===Q&&t[1],l=t[0]===Q&&t[2],n=x&&q.childNodes[x];n=++x&&n&&n[c]||(l=x=0)||m.pop();){if(1===n.nodeType&&++l&&n===b){g[a]=[Q,x,l];break}}else if(g&&(t=(b[L]||(b[L]={}))[a])&&t[0]===Q)l=t[1];else for(;(n=++x&&n&&n[c]||(l=x=0)||m.pop())&&((e?n.nodeName.toLowerCase()!==u:1!==n.nodeType)||!++l||(g&&((n[L]||(n[L]={}))[a]=
[Q,l]),n!==b)););l-=f;return l===d||0===l%d&&0<=l/d}}},PSEUDO:function(a,b){var c,d=B.pseudos[a]||B.setFilters[a.toLowerCase()]||e.error("unsupported pseudo: "+a);return d[L]?d(b):1<d.length?(c=[a,a,"",b],B.setFilters.hasOwnProperty(a.toLowerCase())?h(function(a,c){for(var f,h=d(a,b),k=h.length;k--;)f=ba.call(a,h[k]),a[f]=!(c[f]=h[k])}):function(a){return d(a,0,c)}):d}},pseudos:{not:h(function(a){var b=[],c=[],d=D(a.replace(Y,"$1"));return d[L]?h(function(a,b,c,f){f=d(a,null,f,[]);for(var h=a.length;h--;)if(c=
f[h])a[h]=!(b[h]=c)}):function(a,f,h){b[0]=a;d(b,null,h,c);return!c.pop()}}),has:h(function(a){return function(b){return 0<e(a,b).length}}),contains:h(function(a){return function(b){return-1<(b.textContent||b.innerText||G(b)).indexOf(a)}}),lang:h(function(a){la.test(a||"")||e.error("unsupported lang: "+a);a=a.replace(qa,ra).toLowerCase();return function(b){var c;do if(c=A?b.getAttribute("xml:lang")||b.getAttribute("lang"):b.lang)return c=c.toLowerCase(),c===a||0===c.indexOf(a+"-");while((b=b.parentNode)&&
1===b.nodeType);return!1}}),target:function(b){var c=a.location&&a.location.hash;return c&&c.slice(1)===b.id},root:function(a){return a===X},focus:function(a){return a===T.activeElement&&(!T.hasFocus||T.hasFocus())&&!!(a.type||a.href||~a.tabIndex)},enabled:function(a){return!1===a.disabled},disabled:function(a){return!0===a.disabled},checked:function(a){var b=a.nodeName.toLowerCase();return"input"===b&&!!a.checked||"option"===b&&!!a.selected},selected:function(a){a.parentNode&&a.parentNode.selectedIndex;
return!0===a.selected},empty:function(a){for(a=a.firstChild;a;a=a.nextSibling)if("@"<a.nodeName||3===a.nodeType||4===a.nodeType)return!1;return!0},parent:function(a){return!B.pseudos.empty(a)},header:function(a){return pa.test(a.nodeName)},input:function(a){return oa.test(a.nodeName)},button:function(a){var b=a.nodeName.toLowerCase();return"input"===b&&"button"===a.type||"button"===b},text:function(a){var b;return"input"===a.nodeName.toLowerCase()&&"text"===a.type&&(null==(b=a.getAttribute("type"))||
b.toLowerCase()===a.type)},first:m(function(){return[0]}),last:m(function(a,b){return[b-1]}),eq:m(function(a,b,c){return[0>c?c+b:c]}),even:m(function(a,b){for(var c=0;c<b;c+=2)a.push(c);return a}),odd:m(function(a,b){for(var c=1;c<b;c+=2)a.push(c);return a}),lt:m(function(a,b,c){for(b=0>c?c+b:c;0<=--b;)a.push(b);return a}),gt:m(function(a,b,c){for(c=0>c?c+b:c;++c<b;)a.push(c);return a})}};for(w in{radio:!0,checkbox:!0,file:!0,password:!0,image:!0})B.pseudos[w]=n(w);for(w in{submit:!0,reset:!0})B.pseudos[w]=
l(w);D=e.compile=function(a,b){var c,d=[],f=[],h=W[a+" "];if(!h){b||(b=q(a));for(c=b.length;c--;)h=N(b[c]),h[L]?d.push(h):f.push(h);h=W(a,Z(f,d))}return h};B.pseudos.nth=B.pseudos.eq;B.filters=y.prototype=B.pseudos;B.setFilters=new y;wa();e.attr=c.attr;c.find=e;c.expr=e.selectors;c.expr[":"]=c.expr.pseudos;c.unique=e.uniqueSort;c.text=e.getText;c.isXMLDoc=e.isXML;c.contains=e.contains})(e);var ec=/Until$/,fc=/^(?:parents|prev(?:Until|All))/,Ib=/^.[^:#\[\.,]*$/,rb=c.expr.match.needsContext,gc={children:!0,
contents:!0,next:!0,prev:!0};c.fn.extend({find:function(a){var b,d,f;if("string"!==typeof a)return f=this,this.pushStack(c(a).filter(function(){for(b=0;b<f.length;b++)if(c.contains(f[b],this))return!0}));d=[];for(b=0;b<this.length;b++)c.find(a,this[b],d);d=this.pushStack(c.unique(d));d.selector=(this.selector?this.selector+" ":"")+a;return d},has:function(a){var b,d=c(a,this),f=d.length;return this.filter(function(){for(b=0;b<f;b++)if(c.contains(this,d[b]))return!0})},not:function(a){return this.pushStack(O(this,
a,!1))},filter:function(a){return this.pushStack(O(this,a,!0))},is:function(a){return!!a&&("string"===typeof a?rb.test(a)?0<=c(a,this.context).index(this[0]):0<c.filter(a,this).length:0<this.filter(a).length)},closest:function(a,b){for(var d,f=0,h=this.length,k=[],e=rb.test(a)||"string"!==typeof a?c(a,b||this.context):0;f<h;f++)for(d=this[f];d&&d.ownerDocument&&d!==b&&11!==d.nodeType;){if(e?-1<e.index(d):c.find.matchesSelector(d,a)){k.push(d);break}d=d.parentNode}return this.pushStack(1<k.length?
c.unique(k):k)},index:function(a){return a?"string"===typeof a?c.inArray(this[0],c(a)):c.inArray(a.jquery?a[0]:a,this):this[0]&&this[0].parentNode?this.first().prevAll().length:-1},add:function(a,b){var d="string"===typeof a?c(a,b):c.makeArray(a&&a.nodeType?[a]:a),d=c.merge(this.get(),d);return this.pushStack(c.unique(d))},addBack:function(a){return this.add(null==a?this.prevObject:this.prevObject.filter(a))}});c.fn.andSelf=c.fn.addBack;c.each({parent:function(a){return(a=a.parentNode)&&11!==a.nodeType?
a:null},parents:function(a){return c.dir(a,"parentNode")},parentsUntil:function(a,b,d){return c.dir(a,"parentNode",d)},next:function(a){return D(a,"nextSibling")},prev:function(a){return D(a,"previousSibling")},nextAll:function(a){return c.dir(a,"nextSibling")},prevAll:function(a){return c.dir(a,"previousSibling")},nextUntil:function(a,b,d){return c.dir(a,"nextSibling",d)},prevUntil:function(a,b,d){return c.dir(a,"previousSibling",d)},siblings:function(a){return c.sibling((a.parentNode||{}).firstChild,
a)},children:function(a){return c.sibling(a.firstChild)},contents:function(a){return c.nodeName(a,"iframe")?a.contentDocument||a.contentWindow.document:c.merge([],a.childNodes)}},function(a,b){c.fn[a]=function(d,f){var h=c.map(this,b,d);ec.test(a)||(f=d);f&&"string"===typeof f&&(h=c.filter(f,h));h=1<this.length&&!gc[a]?c.unique(h):h;1<this.length&&fc.test(a)&&(h=h.reverse());return this.pushStack(h)}});c.extend({filter:function(a,b,d){d&&(a=":not("+a+")");return 1===b.length?c.find.matchesSelector(b[0],
a)?[b[0]]:[]:c.find.matches(a,b)},dir:function(a,b,d){var f=[];for(a=a[b];a&&9!==a.nodeType&&(d===g||1!==a.nodeType||!c(a).is(d));)1===a.nodeType&&f.push(a),a=a[b];return f},sibling:function(a,b){for(var c=[];a;a=a.nextSibling)1===a.nodeType&&a!==b&&c.push(a);return c}});var fb="abbr|article|aside|audio|bdi|canvas|data|datalist|details|figcaption|figure|footer|header|hgroup|mark|meter|nav|output|progress|section|summary|time|video",hc=/ jQuery\d+="(?:null|\d+)"/g,sb=new RegExp("<(?:"+fb+")[\\s/>]",
"i"),Ya=/^\s+/,tb=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/gi,ub=/<([\w:]+)/,vb=/<tbody/i,ic=/<|&#?\w+;/,jc=/<(?:script|style|link)/i,Pa=/^(?:checkbox|radio)$/i,kc=/checked\s*(?:[^=]|=\s*.checked.)/i,wb=/^$|\/(?:java|ecma)script/i,Jb=/^true\/(.*)/,lc=/^\s*<!(?:\[CDATA\[|--)|(?:\]\]|--)>\s*$/g,U={option:[1,"<select multiple='multiple'>","</select>"],legend:[1,"<fieldset>","</fieldset>"],area:[1,"<map>","</map>"],param:[1,"<object>","</object>"],thead:[1,"<table>","</table>"],
tr:[2,"<table><tbody>","</tbody></table>"],col:[2,"<table><tbody></tbody><colgroup>","</colgroup></table>"],td:[3,"<table><tbody><tr>","</tr></tbody></table>"],_default:c.support.htmlSerialize?[0,"",""]:[1,"X<div>","</div>"]},Za=V(v).appendChild(v.createElement("div"));U.optgroup=U.option;U.tbody=U.tfoot=U.colgroup=U.caption=U.thead;U.th=U.td;c.fn.extend({text:function(a){return c.access(this,function(a){return a===g?c.text(this):this.empty().append((this[0]&&this[0].ownerDocument||v).createTextNode(a))},
null,a,arguments.length)},wrapAll:function(a){if(c.isFunction(a))return this.each(function(b){c(this).wrapAll(a.call(this,b))});if(this[0]){var b=c(a,this[0].ownerDocument).eq(0).clone(!0);this[0].parentNode&&b.insertBefore(this[0]);b.map(function(){for(var a=this;a.firstChild&&1===a.firstChild.nodeType;)a=a.firstChild;return a}).append(this)}return this},wrapInner:function(a){return c.isFunction(a)?this.each(function(b){c(this).wrapInner(a.call(this,b))}):this.each(function(){var b=c(this),d=b.contents();
d.length?d.wrapAll(a):b.append(a)})},wrap:function(a){var b=c.isFunction(a);return this.each(function(d){c(this).wrapAll(b?a.call(this,d):a)})},unwrap:function(){return this.parent().each(function(){c.nodeName(this,"body")||c(this).replaceWith(this.childNodes)}).end()},append:function(){return this.domManip(arguments,!0,function(a){1!==this.nodeType&&11!==this.nodeType&&9!==this.nodeType||this.appendChild(a)})},prepend:function(){return this.domManip(arguments,!0,function(a){1!==this.nodeType&&11!==
this.nodeType&&9!==this.nodeType||this.insertBefore(a,this.firstChild)})},before:function(){return this.domManip(arguments,!1,function(a){this.parentNode&&this.parentNode.insertBefore(a,this)})},after:function(){return this.domManip(arguments,!1,function(a){this.parentNode&&this.parentNode.insertBefore(a,this.nextSibling)})},remove:function(a,b){for(var d,f=0;null!=(d=this[f]);f++)if(!a||0<c.filter(a,[d]).length)b||1!==d.nodeType||c.cleanData(J(d)),d.parentNode&&(b&&c.contains(d.ownerDocument,d)&&
Aa(J(d,"script")),d.parentNode.removeChild(d));return this},empty:function(){for(var a,b=0;null!=(a=this[b]);b++){for(1===a.nodeType&&c.cleanData(J(a,!1));a.firstChild;)a.removeChild(a.firstChild);a.options&&c.nodeName(a,"select")&&(a.options.length=0)}return this},clone:function(a,b){a=null==a?!1:a;b=null==b?a:b;return this.map(function(){return c.clone(this,a,b)})},html:function(a){return c.access(this,function(a){var d=this[0]||{},f=0,h=this.length;if(a===g)return 1===d.nodeType?d.innerHTML.replace(hc,
""):g;if(!("string"!==typeof a||jc.test(a)||!c.support.htmlSerialize&&sb.test(a)||!c.support.leadingWhitespace&&Ya.test(a)||U[(ub.exec(a)||["",""])[1].toLowerCase()])){a=a.replace(tb,"<$1></$2>");try{for(;f<h;f++)d=this[f]||{},1===d.nodeType&&(c.cleanData(J(d,!1)),d.innerHTML=a);d=0}catch(k){}}d&&this.empty().append(a)},null,a,arguments.length)},replaceWith:function(a){c.isFunction(a)||"string"===typeof a||(a=c(a).not(this).detach());return this.domManip([a],!0,function(a){var d=this.nextSibling,
f=this.parentNode;if(f&&1===this.nodeType||11===this.nodeType)c(this).remove(),d?d.parentNode.insertBefore(a,d):f.appendChild(a)})},detach:function(a){return this.remove(a,!0)},domManip:function(a,b,d){a=jb.apply([],a);var f,h,k,e,n=0,l=this.length,m=this,u=l-1,q=a[0],p=c.isFunction(q);if(p||!(1>=l||"string"!==typeof q||c.support.checkClone)&&kc.test(q))return this.each(function(c){var f=m.eq(c);p&&(a[0]=q.call(this,c,b?f.html():g));f.domManip(a,b,d)});if(l&&(f=c.buildFragment(a,this[0].ownerDocument,
!1,this),h=f.firstChild,1===f.childNodes.length&&(f=h),h)){b=b&&c.nodeName(h,"tr");h=c.map(J(f,"script"),fa);for(k=h.length;n<l;n++)e=f,n!==u&&(e=c.clone(e,!0,!0),k&&c.merge(h,J(e,"script"))),d.call(b&&c.nodeName(this[n],"table")?ta(this[n],"tbody"):this[n],e,n);if(k)for(f=h[h.length-1].ownerDocument,c.map(h,za),n=0;n<k;n++)e=h[n],wb.test(e.type||"")&&!c._data(e,"globalEval")&&c.contains(f,e)&&(e.src?c.ajax({url:e.src,type:"GET",dataType:"script",async:!1,global:!1,"throws":!0}):c.globalEval((e.text||
e.textContent||e.innerHTML||"").replace(lc,"")));f=h=null}return this}});c.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(a,b){c.fn[a]=function(a){for(var f=0,h=[],k=c(a),e=k.length-1;f<=e;f++)a=f===e?this:this.clone(!0),c(k[f])[b](a),Ra.apply(h,a.get());return this.pushStack(h)}});c.extend({clone:function(a,b,d){var f,h,k,e,g,n=c.contains(a.ownerDocument,a);c.support.html5Clone||c.isXMLDoc(a)||!sb.test("<"+a.nodeName+">")?
g=a.cloneNode(!0):(Za.innerHTML=a.outerHTML,Za.removeChild(g=Za.firstChild));if(!(c.support.noCloneEvent&&c.support.noCloneChecked||1!==a.nodeType&&11!==a.nodeType||c.isXMLDoc(a)))for(f=J(g),h=J(a),e=0;null!=(k=h[e]);++e)if(f[e]){var l=f[e],m=void 0,q=void 0,u=void 0;if(1===l.nodeType){m=l.nodeName.toLowerCase();if(!c.support.noCloneEvent&&l[c.expando]){q=c._data(l);for(u in q.events)c.removeEvent(l,u,q.handle);l.removeAttribute(c.expando)}if("script"===m&&l.text!==k.text)fa(l).text=k.text,za(l);
else if("object"===m)l.parentNode&&(l.outerHTML=k.outerHTML),c.support.html5Clone&&k.innerHTML&&!c.trim(l.innerHTML)&&(l.innerHTML=k.innerHTML);else if("input"===m&&Pa.test(k.type))l.defaultChecked=l.checked=k.checked,l.value!==k.value&&(l.value=k.value);else if("option"===m)l.defaultSelected=l.selected=k.defaultSelected;else if("input"===m||"textarea"===m)l.defaultValue=k.defaultValue}}if(b)if(d)for(h=h||J(a),f=f||J(g),e=0;null!=(k=h[e]);e++)Fa(k,f[e]);else Fa(a,g);f=J(g,"script");0<f.length&&Aa(f,
!n&&J(a,"script"));return g},buildFragment:function(a,b,d,f){for(var h,k,e,g,n,l,m=a.length,q=V(b),u=[],p=0;p<m;p++)if((h=a[p])||0===h)if("object"===c.type(h))c.merge(u,h.nodeType?[h]:h);else if(ic.test(h)){e=e||q.appendChild(b.createElement("div"));k=(ub.exec(h)||["",""])[1].toLowerCase();g=U[k]||U._default;e.innerHTML=g[1]+h.replace(tb,"<$1></$2>")+g[2];for(l=g[0];l--;)e=e.lastChild;!c.support.leadingWhitespace&&Ya.test(h)&&u.push(b.createTextNode(Ya.exec(h)[0]));if(!c.support.tbody)for(l=(h="table"!==
k||vb.test(h)?"<table>"!==g[1]||vb.test(h)?0:e:e.firstChild)&&h.childNodes.length;l--;)c.nodeName(n=h.childNodes[l],"tbody")&&!n.childNodes.length&&h.removeChild(n);c.merge(u,e.childNodes);for(e.textContent="";e.firstChild;)e.removeChild(e.firstChild);e=q.lastChild}else u.push(b.createTextNode(h));e&&q.removeChild(e);c.support.appendChecked||c.grep(J(u,"input"),Ga);for(p=0;h=u[p++];)if(!f||-1===c.inArray(h,f))if(a=c.contains(h.ownerDocument,h),e=J(q.appendChild(h),"script"),a&&Aa(e),d)for(l=0;h=e[l++];)wb.test(h.type||
"")&&d.push(h);return q},cleanData:function(a,b){for(var d,f,h,e,g=0,n=c.expando,l=c.cache,m=c.support.deleteExpando,u=c.event.special;null!=(h=a[g]);g++)if(b||c.acceptData(h))if(d=(f=h[n])&&l[f]){if(d.events)for(e in d.events)u[e]?c.event.remove(h,e):c.removeEvent(h,e,d.handle);l[f]&&(delete l[f],m?delete h[n]:"undefined"!==typeof h.removeAttribute?h.removeAttribute(n):h[n]=null,ma.push(f))}}});var ia,Y,Ca,$a=/alpha\([^)]*\)/i,mc=/opacity\s*=\s*([^)]*)/,nc=/^(top|right|bottom|left)$/,oc=/^(none|table(?!-c[ea]).+)/,
xb=/^margin/,Kb=new RegExp("^("+Ma+")(.*)$","i"),Ia=new RegExp("^("+Ma+")(?!px)[a-z%]+$","i"),pc=new RegExp("^([+-])=("+Ma+")","i"),hb={BODY:"block"},qc={position:"absolute",visibility:"hidden",display:"block"},yb={letterSpacing:0,fontWeight:400},ga=["Top","Right","Bottom","Left"],gb=["Webkit","O","Moz","ms"];c.fn.extend({css:function(a,b){return c.access(this,function(a,b,h){var e,n={},l=0;if(c.isArray(b)){h=Y(a);for(e=b.length;l<e;l++)n[b[l]]=c.css(a,b[l],!1,h);return n}return h!==g?c.style(a,b,
h):c.css(a,b)},a,b,1<arguments.length)},show:function(){return Ha(this,!0)},hide:function(){return Ha(this)},toggle:function(a){var b="boolean"===typeof a;return this.each(function(){(b?a:ca(this))?c(this).show():c(this).hide()})}});c.extend({cssHooks:{opacity:{get:function(a,b){if(b){var c=ia(a,"opacity");return""===c?"1":c}}}},cssNumber:{columnCount:!0,fillOpacity:!0,fontWeight:!0,lineHeight:!0,opacity:!0,orphans:!0,widows:!0,zIndex:!0,zoom:!0},cssProps:{"float":c.support.cssFloat?"cssFloat":"styleFloat"},
style:function(a,b,d,f){if(a&&3!==a.nodeType&&8!==a.nodeType&&a.style){var h,e,n,l=c.camelCase(b),m=a.style;b=c.cssProps[l]||(c.cssProps[l]=Ba(m,l));n=c.cssHooks[b]||c.cssHooks[l];if(d!==g){if(e=typeof d,"string"===e&&(h=pc.exec(d))&&(d=(h[1]+1)*h[2]+parseFloat(c.css(a,b)),e="number"),!(null==d||"number"===e&&isNaN(d)||("number"!==e||c.cssNumber[l]||(d+="px"),c.support.clearCloneStyle||""!==d||0!==b.indexOf("background")||(m[b]="inherit"),n&&"set"in n&&(d=n.set(a,d,f))===g)))try{m[b]=d}catch(u){}}else return n&&
"get"in n&&(h=n.get(a,!1,f))!==g?h:m[b]}},css:function(a,b,d,f){var h,e;e=c.camelCase(b);b=c.cssProps[e]||(c.cssProps[e]=Ba(a.style,e));(e=c.cssHooks[b]||c.cssHooks[e])&&"get"in e&&(h=e.get(a,!0,d));h===g&&(h=ia(a,b,f));"normal"===h&&b in yb&&(h=yb[b]);return d?(a=parseFloat(h),!0===d||c.isNumeric(a)?a||0:h):h},swap:function(a,b,c,f){var h,e={};for(h in b)e[h]=a.style[h],a.style[h]=b[h];c=c.apply(a,f||[]);for(h in b)a.style[h]=e[h];return c}});e.getComputedStyle?(Y=function(a){return e.getComputedStyle(a,
null)},ia=function(a,b,d){var f,h=(d=d||Y(a))?d.getPropertyValue(b)||d[b]:g,e=a.style;d&&(""!==h||c.contains(a.ownerDocument,a)||(h=c.style(a,b)),Ia.test(h)&&xb.test(b)&&(a=e.width,b=e.minWidth,f=e.maxWidth,e.minWidth=e.maxWidth=e.width=h,h=d.width,e.width=a,e.minWidth=b,e.maxWidth=f));return h}):v.documentElement.currentStyle&&(Y=function(a){return a.currentStyle},ia=function(a,b,c){var f,h,e=(c=c||Y(a))?c[b]:g,n=a.style;null==e&&n&&n[b]&&(e=n[b]);if(Ia.test(e)&&!nc.test(b)){c=n.left;if(h=(f=a.runtimeStyle)&&
f.left)f.left=a.currentStyle.left;n.left="fontSize"===b?"1em":e;e=n.pixelLeft+"px";n.left=c;h&&(f.left=h)}return""===e?"auto":e});c.each(["height","width"],function(a,b){c.cssHooks[b]={get:function(a,f,h){if(f)return 0===a.offsetWidth&&oc.test(c.css(a,"display"))?c.swap(a,qc,function(){return da(a,b,h)}):da(a,b,h)},set:function(a,f,h){var e=h&&Y(a);return na(a,f,h?R(a,b,h,c.support.boxSizing&&"border-box"===c.css(a,"boxSizing",!1,e),e):0)}}});c.support.opacity||(c.cssHooks.opacity={get:function(a,
b){return mc.test((b&&a.currentStyle?a.currentStyle.filter:a.style.filter)||"")?.01*parseFloat(RegExp.$1)+"":b?"1":""},set:function(a,b){var d=a.style,f=a.currentStyle,h=c.isNumeric(b)?"alpha(opacity="+100*b+")":"",e=f&&f.filter||d.filter||"";d.zoom=1;if((1<=b||""===b)&&""===c.trim(e.replace($a,""))&&d.removeAttribute&&(d.removeAttribute("filter"),""===b||f&&!f.filter))return;d.filter=$a.test(e)?e.replace($a,h):e+" "+h}});c(function(){c.support.reliableMarginRight||(c.cssHooks.marginRight={get:function(a,
b){if(b)return c.swap(a,{display:"inline-block"},ia,[a,"marginRight"])}});!c.support.pixelPosition&&c.fn.position&&c.each(["top","left"],function(a,b){c.cssHooks[b]={get:function(a,f){if(f)return f=ia(a,b),Ia.test(f)?c(a).position()[b]+"px":f}}})});c.expr&&c.expr.filters&&(c.expr.filters.hidden=function(a){return 0===a.offsetWidth&&0===a.offsetHeight||!c.support.reliableHiddenOffsets&&"none"===(a.style&&a.style.display||c.css(a,"display"))},c.expr.filters.visible=function(a){return!c.expr.filters.hidden(a)});
c.each({margin:"",padding:"",border:"Width"},function(a,b){c.cssHooks[a+b]={expand:function(c){var f=0,h={};for(c="string"===typeof c?c.split(" "):[c];4>f;f++)h[a+ga[f]+b]=c[f]||c[f-2]||c[0];return h}};xb.test(a)||(c.cssHooks[a+b].set=na)});var rc=/%20/g,Lb=/\[\]$/,zb=/\r?\n/g,sc=/^(?:submit|button|image|reset)$/i,tc=/^(?:input|select|textarea|keygen)/i;c.fn.extend({serialize:function(){return c.param(this.serializeArray())},serializeArray:function(){return this.map(function(){var a=c.prop(this,"elements");
return a?c.makeArray(a):this}).filter(function(){var a=this.type;return this.name&&!c(this).is(":disabled")&&tc.test(this.nodeName)&&!sc.test(a)&&(this.checked||!Pa.test(a))}).map(function(a,b){var d=c(this).val();return null==d?null:c.isArray(d)?c.map(d,function(a){return{name:b.name,value:a.replace(zb,"\r\n")}}):{name:b.name,value:d.replace(zb,"\r\n")}}).get()}});c.param=function(a,b){var d,f=[],h=function(a,b){b=c.isFunction(b)?b():null==b?"":b;f[f.length]=encodeURIComponent(a)+"="+encodeURIComponent(b)};
b===g&&(b=c.ajaxSettings&&c.ajaxSettings.traditional);if(c.isArray(a)||a.jquery&&!c.isPlainObject(a))c.each(a,function(){h(this.name,this.value)});else for(d in a)u(d,a[d],b,h);return f.join("&").replace(rc,"+")};var aa,ba,ab=c.now(),bb=/\?/,uc=/#.*$/,Ab=/([?&])_=[^&]*/,vc=/^(.*?):[ \t]*([^\r\n]*)\r?$/mg,wc=/^(?:GET|HEAD)$/,xc=/^\/\//,Bb=/^([\w.+-]+:)(?:\/\/([^\/?#:]*)(?::(\d+)|)|)/,Cb=c.fn.load,Db={},Qa={},Eb="*/".concat("*");try{ba=Mb.href}catch(a){ba=v.createElement("a"),ba.href="",ba=ba.href}aa=
Bb.exec(ba.toLowerCase())||[];c.fn.load=function(a,b,d){if("string"!==typeof a&&Cb)return Cb.apply(this,arguments);var f,h,e,n=this,l=a.indexOf(" ");0<=l&&(f=a.slice(l,a.length),a=a.slice(0,l));c.isFunction(b)?(d=b,b=g):b&&"object"===typeof b&&(h="POST");0<n.length&&c.ajax({url:a,type:h,dataType:"html",data:b}).done(function(a){e=arguments;n.html(f?c("<div>").append(c.parseHTML(a)).find(f):a)}).complete(d&&function(a,b){n.each(d,e||[a.responseText,b,a])});return this};c.each("ajaxStart ajaxStop ajaxComplete ajaxError ajaxSuccess ajaxSend".split(" "),
function(a,b){c.fn[b]=function(a){return this.on(b,a)}});c.each(["get","post"],function(a,b){c[b]=function(a,f,h,e){c.isFunction(f)&&(e=e||h,h=f,f=g);return c.ajax({url:a,type:b,dataType:e,data:f,success:h})}});c.extend({active:0,lastModified:{},etag:{},ajaxSettings:{url:ba,type:"GET",isLocal:/^(?:about|app|app-storage|.+-extension|file|res|widget):$/.test(aa[1]),global:!0,processData:!0,async:!0,contentType:"application/x-www-form-urlencoded; charset=UTF-8",accepts:{"*":Eb,text:"text/plain",html:"text/html",
xml:"application/xml, text/xml",json:"application/json, text/javascript"},contents:{xml:/xml/,html:/html/,json:/json/},responseFields:{xml:"responseXML",text:"responseText"},converters:{"* text":e.String,"text html":!0,"text json":c.parseJSON,"text xml":c.parseXML},flatOptions:{url:!0,context:!0}},ajaxSetup:function(a,b){return b?E(E(a,c.ajaxSettings),b):E(c.ajaxSettings,a)},ajaxPrefilter:Z(Db),ajaxTransport:Z(Qa),ajax:function(a,b){function d(a,b,d,n){var m,t,p,N,w=b;if(2!==A){A=2;l&&clearTimeout(l);
f=g;e=n||"";C.readyState=0<a?4:0;if(d){N=q;n=C;var G,K,E,Q,H=N.contents,D=N.dataTypes,ja=N.responseFields;for(K in ja)K in d&&(n[ja[K]]=d[K]);for(;"*"===D[0];)D.shift(),G===g&&(G=N.mimeType||n.getResponseHeader("Content-Type"));if(G)for(K in H)if(H[K]&&H[K].test(G)){D.unshift(K);break}if(D[0]in d)E=D[0];else{for(K in d){if(!D[0]||N.converters[K+" "+D[0]]){E=K;break}Q||(Q=K)}E=E||Q}E?(E!==D[0]&&D.unshift(E),N=d[E]):N=void 0}if(200<=a&&300>a||304===a)if(q.ifModified&&((d=C.getResponseHeader("Last-Modified"))&&
(c.lastModified[h]=d),(d=C.getResponseHeader("etag"))&&(c.etag[h]=d)),304===a)m=!0,w="notmodified";else{a:{t=q;p=N;var M,I,w={};G=0;K=t.dataTypes.slice();E=K[0];t.dataFilter&&(p=t.dataFilter(p,t.dataType));if(K[1])for(M in t.converters)w[M.toLowerCase()]=t.converters[M];for(;d=K[++G];)if("*"!==d){if("*"!==E&&E!==d){M=w[E+" "+d]||w["* "+d];if(!M)for(I in w)if(m=I.split(" "),m[1]===d&&(M=w[E+" "+m[0]]||w["* "+m[0]])){!0===M?M=w[I]:!0!==w[I]&&(d=m[0],K.splice(G--,0,d));break}if(!0!==M)if(M&&t["throws"])p=
M(p);else try{p=M(p)}catch(J){m={state:"parsererror",error:M?J:"No conversion from "+E+" to "+d};break a}}E=d}m={state:"success",data:p}}w=m.state;t=m.data;p=m.error;m=!p}else if(p=w,a||!w)w="error",0>a&&(a=0);C.status=a;C.statusText=(b||w)+"";m?z.resolveWith(r,[t,w,C]):z.rejectWith(r,[C,w,p]);C.statusCode(Z);Z=g;u&&v.trigger(m?"ajaxSuccess":"ajaxError",[C,q,m?t:p]);y.fireWith(r,[C,w]);u&&(v.trigger("ajaxComplete",[C,q]),--c.active||c.event.trigger("ajaxStop"))}}"object"===typeof a&&(b=a,a=g);b=b||
{};var f,h,e,n,l,m,u,p,q=c.ajaxSetup({},b),r=q.context||q,v=q.context&&(r.nodeType||r.jquery)?c(r):c.event,z=c.Deferred(),y=c.Callbacks("once memory"),Z=q.statusCode||{},w={},G={},A=0,E="canceled",C={readyState:0,getResponseHeader:function(a){var b;if(2===A){if(!n)for(n={};b=vc.exec(e);)n[b[1].toLowerCase()]=b[2];b=n[a.toLowerCase()]}return null==b?null:b},getAllResponseHeaders:function(){return 2===A?e:null},setRequestHeader:function(a,b){var c=a.toLowerCase();A||(a=G[c]=G[c]||a,w[a]=b);return this},
overrideMimeType:function(a){A||(q.mimeType=a);return this},statusCode:function(a){var b;if(a)if(2>A)for(b in a)Z[b]=[Z[b],a[b]];else C.always(a[C.status]);return this},abort:function(a){a=a||E;f&&f.abort(a);d(0,a);return this}};z.promise(C).complete=y.add;C.success=C.done;C.error=C.fail;q.url=((a||q.url||ba)+"").replace(uc,"").replace(xc,aa[1]+"//");q.type=b.method||b.type||q.method||q.type;q.dataTypes=c.trim(q.dataType||"*").toLowerCase().match(P)||[""];null==q.crossDomain&&(m=Bb.exec(q.url.toLowerCase()),
q.crossDomain=!(!m||m[1]===aa[1]&&m[2]===aa[2]&&(m[3]||("http:"===m[1]?80:443))==(aa[3]||("http:"===aa[1]?80:443))));q.data&&q.processData&&"string"!==typeof q.data&&(q.data=c.param(q.data,q.traditional));N(Db,q,b,C);if(2===A)return C;(u=q.global)&&0===c.active++&&c.event.trigger("ajaxStart");q.type=q.type.toUpperCase();q.hasContent=!wc.test(q.type);h=q.url;q.hasContent||(q.data&&(h=q.url+=(bb.test(h)?"&":"?")+q.data,delete q.data),!1===q.cache&&(q.url=Ab.test(h)?h.replace(Ab,"$1_="+ab++):h+(bb.test(h)?
"&":"?")+"_="+ab++));q.ifModified&&(c.lastModified[h]&&C.setRequestHeader("If-Modified-Since",c.lastModified[h]),c.etag[h]&&C.setRequestHeader("If-None-Match",c.etag[h]));(q.data&&q.hasContent&&!1!==q.contentType||b.contentType)&&C.setRequestHeader("Content-Type",q.contentType);C.setRequestHeader("Accept",q.dataTypes[0]&&q.accepts[q.dataTypes[0]]?q.accepts[q.dataTypes[0]]+("*"!==q.dataTypes[0]?", "+Eb+"; q=0.01":""):q.accepts["*"]);for(p in q.headers)C.setRequestHeader(p,q.headers[p]);if(q.beforeSend&&
(!1===q.beforeSend.call(r,C,q)||2===A))return C.abort();E="abort";for(p in{success:1,error:1,complete:1})C[p](q[p]);if(f=N(Qa,q,b,C)){C.readyState=1;u&&v.trigger("ajaxSend",[C,q]);q.async&&0<q.timeout&&(l=setTimeout(function(){C.abort("timeout")},q.timeout));try{A=1,f.send(w,d)}catch(B){if(2>A)d(-1,B);else throw B;}}else d(-1,"No Transport");return C},getScript:function(a,b){return c.get(a,g,b,"script")},getJSON:function(a,b,d){return c.get(a,b,d,"json")}});c.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},
contents:{script:/(?:java|ecma)script/},converters:{"text script":function(a){c.globalEval(a);return a}}});c.ajaxPrefilter("script",function(a){a.cache===g&&(a.cache=!1);a.crossDomain&&(a.type="GET",a.global=!1)});c.ajaxTransport("script",function(a){if(a.crossDomain){var b,d=v.head||c("head")[0]||v.documentElement;return{send:function(c,h){b=v.createElement("script");b.async=!0;a.scriptCharset&&(b.charset=a.scriptCharset);b.src=a.url;b.onload=b.onreadystatechange=function(a,c){if(c||!b.readyState||
/loaded|complete/.test(b.readyState))b.onload=b.onreadystatechange=null,b.parentNode&&b.parentNode.removeChild(b),b=null,c||h(200,"success")};d.insertBefore(b,d.firstChild)},abort:function(){if(b)b.onload(g,!0)}}}});var Fb=[],cb=/(=)\?(?=&|$)|\?\?/;c.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var a=Fb.pop()||c.expando+"_"+ab++;this[a]=!0;return a}});c.ajaxPrefilter("json jsonp",function(a,b,d){var f,h,k,n=!1!==a.jsonp&&(cb.test(a.url)?"url":"string"===typeof a.data&&!(a.contentType||"").indexOf("application/x-www-form-urlencoded")&&
cb.test(a.data)&&"data");if(n||"jsonp"===a.dataTypes[0])return f=a.jsonpCallback=c.isFunction(a.jsonpCallback)?a.jsonpCallback():a.jsonpCallback,n?a[n]=a[n].replace(cb,"$1"+f):!1!==a.jsonp&&(a.url+=(bb.test(a.url)?"&":"?")+a.jsonp+"="+f),a.converters["script json"]=function(){k||c.error(f+" was not called");return k[0]},a.dataTypes[0]="json",h=e[f],e[f]=function(){k=arguments},d.always(function(){e[f]=h;a[f]&&(a.jsonpCallback=b.jsonpCallback,Fb.push(f));k&&c.isFunction(h)&&h(k[0]);k=h=g}),"script"});
var sa,Ea,yc=0,db=e.ActiveXObject&&function(){for(var a in sa)sa[a](g,!0)};c.ajaxSettings.xhr=e.ActiveXObject?function(){var a;if(!(a=!this.isLocal&&Q()))a:{try{a=new e.ActiveXObject("Microsoft.XMLHTTP");break a}catch(b){}a=void 0}return a}:Q;Ea=c.ajaxSettings.xhr();c.support.cors=!!Ea&&"withCredentials"in Ea;(Ea=c.support.ajax=!!Ea)&&c.ajaxTransport(function(a){if(!a.crossDomain||c.support.cors){var b;return{send:function(d,f){var h,k,n=a.xhr();a.username?n.open(a.type,a.url,a.async,a.username,a.password):
n.open(a.type,a.url,a.async);if(a.xhrFields)for(k in a.xhrFields)n[k]=a.xhrFields[k];a.mimeType&&n.overrideMimeType&&n.overrideMimeType(a.mimeType);a.crossDomain||d["X-Requested-With"]||(d["X-Requested-With"]="XMLHttpRequest");try{for(k in d)n.setRequestHeader(k,d[k])}catch(l){}n.send(a.hasContent&&a.data||null);b=function(d,e){var k,l,m,p,u;try{if(b&&(e||4===n.readyState))if(b=g,h&&(n.onreadystatechange=c.noop,db&&delete sa[h]),e)4!==n.readyState&&n.abort();else{p={};k=n.status;u=n.responseXML;m=
n.getAllResponseHeaders();u&&u.documentElement&&(p.xml=u);"string"===typeof n.responseText&&(p.text=n.responseText);try{l=n.statusText}catch(r){l=""}k||!a.isLocal||a.crossDomain?1223===k&&(k=204):k=p.text?200:404}}catch(r){e||f(-1,r)}p&&f(k,l,p,m)};a.async?4===n.readyState?setTimeout(b):(h=++yc,db&&(sa||(sa={},c(e).unload(db)),sa[h]=b),n.onreadystatechange=b):b()},abort:function(){b&&b(g,!0)}}}});var oa,Oa,zc=/^(?:toggle|show|hide)$/,Ac=new RegExp("^(?:([+-])=|)("+Ma+")([a-z%]*)$","i"),Bc=/queueHooks$/,
Ja=[function(a,b,d){var f,h,e,g,n,l,m=this,p=a.style,u={},r=[],v=a.nodeType&&ca(a);d.queue||(n=c._queueHooks(a,"fx"),null==n.unqueued&&(n.unqueued=0,l=n.empty.fire,n.empty.fire=function(){n.unqueued||l()}),n.unqueued++,m.always(function(){m.always(function(){n.unqueued--;c.queue(a,"fx").length||n.empty.fire()})}));1===a.nodeType&&("height"in b||"width"in b)&&(d.overflow=[p.overflow,p.overflowX,p.overflowY],"inline"===c.css(a,"display")&&"none"===c.css(a,"float")&&(c.support.inlineBlockNeedsLayout&&
"inline"!==S(a.nodeName)?p.zoom=1:p.display="inline-block"));d.overflow&&(p.overflow="hidden",c.support.shrinkWrapBlocks||m.done(function(){p.overflow=d.overflow[0];p.overflowX=d.overflow[1];p.overflowY=d.overflow[2]}));for(f in b)e=b[f],zc.exec(e)&&(delete b[f],h=h||"toggle"===e,e!==(v?"hide":"show")&&r.push(f));if(b=r.length)for(e=c._data(a,"fxshow")||c._data(a,"fxshow",{}),("hidden"in e)&&(v=e.hidden),h&&(e.hidden=!v),v?c(a).show():m.done(function(){c(a).hide()}),m.done(function(){var b;c._removeData(a,
"fxshow");for(b in u)c.style(a,b,u[b])}),f=0;f<b;f++)h=r[f],g=m.createTween(h,v?e[h]:0),u[h]=e[h]||c.style(a,h),h in e||(e[h]=g.start,v&&(g.end=g.start,g.start="width"===h||"height"===h?1:0))}],Da={"*":[function(a,b){var d,f,h=this.createTween(a,b),e=Ac.exec(b),g=h.cur(),n=+g||0,l=1,m=20;if(e){d=+e[2];f=e[3]||(c.cssNumber[a]?"":"px");if("px"!==f&&n){n=c.css(h.elem,a,!0)||d||1;do l=l||".5",n/=l,c.style(h.elem,a,n+f);while(l!==(l=h.cur()/g)&&1!==l&&--m)}h.unit=f;h.start=n;h.end=e[1]?n+(e[1]+1)*d:d}return h}]};
c.Animation=c.extend(M,{tweener:function(a,b){c.isFunction(a)?(b=a,a=["*"]):a=a.split(" ");for(var d,f=0,h=a.length;f<h;f++)d=a[f],Da[d]=Da[d]||[],Da[d].unshift(b)},prefilter:function(a,b){b?Ja.unshift(a):Ja.push(a)}});c.Tween=G;G.prototype={constructor:G,init:function(a,b,d,f,h,e){this.elem=a;this.prop=d;this.easing=h||"swing";this.options=b;this.start=this.now=this.cur();this.end=f;this.unit=e||(c.cssNumber[d]?"":"px")},cur:function(){var a=G.propHooks[this.prop];return a&&a.get?a.get(this):G.propHooks._default.get(this)},
run:function(a){var b,d=G.propHooks[this.prop];this.pos=this.options.duration?b=c.easing[this.easing](a,this.options.duration*a,0,1,this.options.duration):b=a;this.now=(this.end-this.start)*b+this.start;this.options.step&&this.options.step.call(this.elem,this.now,this);d&&d.set?d.set(this):G.propHooks._default.set(this);return this}};G.prototype.init.prototype=G.prototype;G.propHooks={_default:{get:function(a){return null==a.elem[a.prop]||a.elem.style&&null!=a.elem.style[a.prop]?(a=c.css(a.elem,a.prop,
"auto"))&&"auto"!==a?a:0:a.elem[a.prop]},set:function(a){if(c.fx.step[a.prop])c.fx.step[a.prop](a);else a.elem.style&&(null!=a.elem.style[c.cssProps[a.prop]]||c.cssHooks[a.prop])?c.style(a.elem,a.prop,a.now+a.unit):a.elem[a.prop]=a.now}}};G.propHooks.scrollTop=G.propHooks.scrollLeft={set:function(a){a.elem.nodeType&&a.elem.parentNode&&(a.elem[a.prop]=a.now)}};c.each(["toggle","show","hide"],function(a,b){var d=c.fn[b];c.fn[b]=function(a,c,e){return null==a||"boolean"===typeof a?d.apply(this,arguments):
this.animate(va(b,!0),a,c,e)}});c.fn.extend({fadeTo:function(a,b,c,f){return this.filter(ca).css("opacity",0).show().end().animate({opacity:b},a,c,f)},animate:function(a,b,d,f){var h=c.isEmptyObject(a),e=c.speed(b,d,f),g=function(){var b=M(this,c.extend({},a),e);g.finish=function(){b.stop(!0)};(h||c._data(this,"finish"))&&b.stop(!0)};g.finish=g;return h||!1===e.queue?this.each(g):this.queue(e.queue,g)},stop:function(a,b,d){var f=function(a){var b=a.stop;delete a.stop;b(d)};"string"!==typeof a&&(d=
b,b=a,a=g);b&&!1!==a&&this.queue(a||"fx",[]);return this.each(function(){var b=!0,e=null!=a&&a+"queueHooks",g=c.timers,n=c._data(this);if(e)n[e]&&n[e].stop&&f(n[e]);else for(e in n)n[e]&&n[e].stop&&Bc.test(e)&&f(n[e]);for(e=g.length;e--;)g[e].elem!==this||null!=a&&g[e].queue!==a||(g[e].anim.stop(d),b=!1,g.splice(e,1));!b&&d||c.dequeue(this,a)})},finish:function(a){!1!==a&&(a=a||"fx");return this.each(function(){var b,d=c._data(this),f=d[a+"queue"];b=d[a+"queueHooks"];var e=c.timers,g=f?f.length:0;
d.finish=!0;c.queue(this,a,[]);b&&b.cur&&b.cur.finish&&b.cur.finish.call(this);for(b=e.length;b--;)e[b].elem===this&&e[b].queue===a&&(e[b].anim.stop(!0),e.splice(b,1));for(b=0;b<g;b++)f[b]&&f[b].finish&&f[b].finish.call(this);delete d.finish})}});c.each({slideDown:va("show"),slideUp:va("hide"),slideToggle:va("toggle"),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"},fadeToggle:{opacity:"toggle"}},function(a,b){c.fn[a]=function(a,c,e){return this.animate(b,a,c,e)}});c.speed=function(a,b,d){var f=a&&
"object"===typeof a?c.extend({},a):{complete:d||!d&&b||c.isFunction(a)&&a,duration:a,easing:d&&b||b&&!c.isFunction(b)&&b};f.duration=c.fx.off?0:"number"===typeof f.duration?f.duration:f.duration in c.fx.speeds?c.fx.speeds[f.duration]:c.fx.speeds._default;if(null==f.queue||!0===f.queue)f.queue="fx";f.old=f.complete;f.complete=function(){c.isFunction(f.old)&&f.old.call(this);f.queue&&c.dequeue(this,f.queue)};return f};c.easing={linear:function(a){return a},swing:function(a){return.5-Math.cos(a*Math.PI)/
2}};c.timers=[];c.fx=G.prototype.init;c.fx.tick=function(){var a,b=c.timers,d=0;for(oa=c.now();d<b.length;d++)a=b[d],a()||b[d]!==a||b.splice(d--,1);b.length||c.fx.stop();oa=g};c.fx.timer=function(a){a()&&c.timers.push(a)&&c.fx.start()};c.fx.interval=13;c.fx.start=function(){Oa||(Oa=setInterval(c.fx.tick,c.fx.interval))};c.fx.stop=function(){clearInterval(Oa);Oa=null};c.fx.speeds={slow:600,fast:200,_default:400};c.fx.step={};c.expr&&c.expr.filters&&(c.expr.filters.animated=function(a){return c.grep(c.timers,
function(b){return a===b.elem}).length});c.fn.offset=function(a){if(arguments.length)return a===g?this:this.each(function(b){c.offset.setOffset(this,a,b)});var b,d,f={top:0,left:0},e=(d=this[0])&&d.ownerDocument;if(e){b=e.documentElement;if(!c.contains(b,d))return f;"undefined"!==typeof d.getBoundingClientRect&&(f=d.getBoundingClientRect());d=H(e);return{top:f.top+(d.pageYOffset||b.scrollTop)-(b.clientTop||0),left:f.left+(d.pageXOffset||b.scrollLeft)-(b.clientLeft||0)}}};c.offset={setOffset:function(a,
b,d){var f=c.css(a,"position");"static"===f&&(a.style.position="relative");var e=c(a),g=e.offset(),n=c.css(a,"top"),l=c.css(a,"left"),m={},p={};("absolute"===f||"fixed"===f)&&-1<c.inArray("auto",[n,l])?(p=e.position(),f=p.top,l=p.left):(f=parseFloat(n)||0,l=parseFloat(l)||0);c.isFunction(b)&&(b=b.call(a,d,g));null!=b.top&&(m.top=b.top-g.top+f);null!=b.left&&(m.left=b.left-g.left+l);"using"in b?b.using.call(a,m):e.css(m)}};c.fn.extend({position:function(){if(this[0]){var a,b,d={top:0,left:0},f=this[0];
"fixed"===c.css(f,"position")?b=f.getBoundingClientRect():(a=this.offsetParent(),b=this.offset(),c.nodeName(a[0],"html")||(d=a.offset()),d.top+=c.css(a[0],"borderTopWidth",!0),d.left+=c.css(a[0],"borderLeftWidth",!0));return{top:b.top-d.top-c.css(f,"marginTop",!0),left:b.left-d.left-c.css(f,"marginLeft",!0)}}},offsetParent:function(){return this.map(function(){for(var a=this.offsetParent||v.documentElement;a&&!c.nodeName(a,"html")&&"static"===c.css(a,"position");)a=a.offsetParent;return a||v.documentElement})}});
c.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},function(a,b){var d=/Y/.test(b);c.fn[a]=function(f){return c.access(this,function(a,f,e){var n=H(a);if(e===g)return n?b in n?n[b]:n.document.documentElement[f]:a[f];n?n.scrollTo(d?c(n).scrollLeft():e,d?e:c(n).scrollTop()):a[f]=e},a,f,arguments.length,null)}});c.each({Height:"height",Width:"width"},function(a,b){c.each({padding:"inner"+a,content:b,"":"outer"+a},function(d,f){c.fn[f]=function(f,e){var n=arguments.length&&(d||"boolean"!==typeof f),
l=d||(!0===f||!0===e?"margin":"border");return c.access(this,function(b,d,f){return c.isWindow(b)?b.document.documentElement["client"+a]:9===b.nodeType?(d=b.documentElement,Math.max(b.body["scroll"+a],d["scroll"+a],b.body["offset"+a],d["offset"+a],d["client"+a])):f===g?c.css(b,d,l):c.style(b,d,f,l)},b,n?f:g,n,null)}})});e.jQuery=e.$=c;"function"===typeof define&&define.amd&&define.amd.jQuery&&define("jquery",[],function(){return c})})(window);(function(e,g,m){e.uaMatch=function(e){e=e.toLowerCase();var g=/(opr)[\/]([\w.]+)/.exec(e)||/(chrome)[ \/]([\w.]+)/.exec(e)||/(version)[ \/]([\w.]+).*(safari)[ \/]([\w.]+)/.exec(e)||/(webkit)[ \/]([\w.]+)/.exec(e)||/(opera)(?:.*version|)[ \/]([\w.]+)/.exec(e)||/(msie) ([\w.]+)/.exec(e)||0<=e.indexOf("trident")&&/(rv)(?::| )([\w.]+)/.exec(e)||0>e.indexOf("compatible")&&/(mozilla)(?:.*? rv:([\w.]+)|)/.exec(e)||[];e=/(ipad)/.exec(e)||/(iphone)/.exec(e)||/(android)/.exec(e)||/(windows phone)/.exec(e)||
/(win)/.exec(e)||/(mac)/.exec(e)||/(linux)/.exec(e)||/(cros)/i.exec(e)||[];return{browser:g[3]||g[1]||"",version:g[2]||"0",platform:e[0]||""}};g=e.uaMatch(g.navigator.userAgent);m={};g.browser&&(m[g.browser]=!0,m.version=g.version,m.versionNumber=parseInt(g.version));g.platform&&(m[g.platform]=!0);if(m.android||m.ipad||m.iphone||m["windows phone"])m.mobile=!0;if(m.cros||m.mac||m.linux||m.win)m.desktop=!0;if(m.chrome||m.opr||m.safari)m.webkit=!0;m.rv&&(g.browser="msie",m.msie=!0);m.opr&&(g.browser=
"opera",m.opera=!0);m.safari&&m.android&&(g.browser="android",m.android=!0);m.name=g.browser;m.platform=g.platform;e.browser=m})(jQuery,window);(function(e){function g(g,l,p){var r=this;return this.on("click.pjax",g,function(g){var n=e.extend({},O(l,p));n.container||(n.container=e(this).attr("data-pjax")||r);m(g,n)})}function m(g,l,m){m=O(l,m);l=g.currentTarget;if("A"!==l.tagName.toUpperCase())throw"$.fn.pjax or $.pjax.click requires an anchor element";if(!(1<g.which||g.metaKey||g.ctrlKey||g.shiftKey||g.altKey||location.protocol!==l.protocol||location.hostname!==l.hostname||l.hash&&l.href.replace(l.hash,"")===location.href.replace(location.hash,
"")||l.href===location.href+"#")){var r={url:l.href,container:e(l).attr("data-pjax"),target:l};m=e.extend({},r,m);r=e.Event("pjax:click");e(l).trigger(r,[m]);r.isDefaultPrevented()||(p(m),g.preventDefault())}}function z(g,l,m){m=O(l,m);l=g.currentTarget;if("FORM"!==l.tagName.toUpperCase())throw"$.pjax.submit requires a form element";l={type:l.method.toUpperCase(),url:l.action,data:e(l).serializeArray(),container:e(l).attr("data-pjax"),target:l};p(e.extend({},l,m));g.preventDefault()}function p(g){function m(g,
l){var n=e.Event(g,{relatedTarget:r});E.trigger(n,l);return!n.isDefaultPrevented()}g=e.extend(!0,{},e.ajaxSettings,p.defaults,g);e.isFunction(g.url)&&(g.url=g.url());var r=g.target,w=D(g.url).hash,E=g.context=V(g.container);g.data||(g.data={});g.data._pjax=E.selector;var z;g.beforeSend=function(e,l){"GET"!==l.type&&(l.timeout=0);e.setRequestHeader("X-PJAX","true");e.setRequestHeader("X-PJAX-Container",E.selector);if(!m("pjax:beforeSend",[e,l]))return!1;0<l.timeout&&(z=setTimeout(function(){m("pjax:timeout",
[e,g])&&e.abort("timeout")},l.timeout),l.timeout=0);g.requestUrl=D(l.url).href};g.complete=function(e,l){z&&clearTimeout(z);m("pjax:complete",[e,l,g]);m("pjax:end",[e,g])};g.error=function(e,p,r){var w=za("",e,g);e=m("pjax:error",[e,p,r,g]);"GET"==g.type&&"abort"!==p&&e&&l(w.url)};g.success=function(r,z,y){var A="function"===typeof e.pjax.defaults.version?e.pjax.defaults.version():e.pjax.defaults.version,Z=y.getResponseHeader("X-PJAX-Version"),H=za(r,y,g);A&&Z&&A!==Z?l(H.url):H.contents?(p.state=
{id:g.id||(new Date).getTime(),url:H.url,title:H.title,container:E.selector,fragment:g.fragment,timeout:g.timeout},(g.push||g.replace)&&window.history.replaceState(p.state,H.title,H.url),document.activeElement.blur(),H.title&&(document.title=H.title),E.html(H.contents),(A=E.find("input[autofocus], textarea[autofocus]").last()[0])&&document.activeElement!==A&&A.focus(),Aa(H.scripts),"number"===typeof g.scrollTo&&e(window).scrollTop(g.scrollTo),""!==w&&(A=D(H.url),A.hash=w,p.state.url=A.href,window.history.replaceState(p.state,
H.title,A.href),H=e(A.hash),H.length&&e(window).scrollTop(H.offset().top)),m("pjax:success",[r,z,y,g])):l(H.url)};p.state||(p.state={id:(new Date).getTime(),url:window.location.href,title:document.title,container:E.selector,fragment:g.fragment,timeout:g.timeout},window.history.replaceState(p.state,document.title));var A=p.xhr;A&&4>A.readyState&&(A.onreadystatechange=e.noop,A.abort());p.options=g;A=p.xhr=e.ajax(g);0<A.readyState&&(g.push&&!g.replace&&(Fa(p.state.id,E.clone().contents()),window.history.pushState(null,
"",y(g.requestUrl))),m("pjax:start",[A,g]),m("pjax:send",[A,g]));return p.xhr}function W(g,l){return p(e.extend({url:window.location.href,push:!1,replace:!0,scrollTo:!1},O(g,l)))}function l(e){window.history.replaceState(null,"","#");window.location.replace(e)}function w(g){if((g=g.state)&&g.container){if(ca&&Ha==g.url||p.state.id===g.id)return;var m=e(g.container);if(m.length){var r,w=R[g.id];if(p.state){var y=r=p.state.id<g.id?"forward":"back",z=p.state.id,A=m.clone().contents();R[z]=A;"forward"===
y?(y=S,A=da):(y=da,A=S);y.push(z);(z=A.pop())&&delete R[z]}r=e.Event("pjax:popstate",{state:g,direction:r});m.trigger(r);r={id:g.id,url:g.url,container:m,push:!1,fragment:g.fragment,timeout:g.timeout,scrollTo:!1};w?(m.trigger("pjax:start",[null,r]),g.title&&(document.title=g.title),m.html(w),p.state=g,m.trigger("pjax:end",[null,r])):p(r);m[0].offsetHeight}else l(location.href)}ca=!1}function r(g){var l=e.isFunction(g.url)?g.url():g.url,m=g.type?g.type.toUpperCase():"GET",p=e("<form>",{method:"GET"===
m?"GET":"POST",action:l,style:"display:none"});"GET"!==m&&"POST"!==m&&p.append(e("<input>",{type:"hidden",name:"_method",value:m.toLowerCase()}));g=g.data;if("string"===typeof g)e.each(g.split("&"),function(g,l){var n=l.split("=");p.append(e("<input>",{type:"hidden",name:n[0],value:n[1]}))});else if("object"===typeof g)for(key in g)p.append(e("<input>",{type:"hidden",name:key,value:g[key]}));e(document.body).append(p);p.submit()}function y(e){return e.replace(/\?_pjax=[^&]+&?/,"?").replace(/_pjax=[^&]+&?/,
"").replace(/[\?&]$/,"")}function D(e){var g=document.createElement("a");g.href=e;return g}function O(g,l){g&&l?l.container=g:l=e.isPlainObject(g)?g:{container:g};l.container&&(l.container=V(l.container));return l}function V(g){g=e(g);if(g.length){if(""!==g.selector&&g.context===document)return g;if(g.attr("id"))return e("#"+g.attr("id"));throw"cant get selector for pjax container!";}throw"no pjax container for "+g.selector;}function ta(e,g){return e.filter(g).add(e.find(g))}function fa(g){return e.parseHTML(g,
document,!0)}function za(g,l,m){var p={};p.url=y(l.getResponseHeader("X-PJAX-URL")||m.requestUrl);if(/<html/i.test(g)){l=e(fa(g.match(/<head[^>]*>([\s\S.]*)<\/head>/i)[0]));var r=e(fa(g.match(/<body[^>]*>([\s\S.]*)<\/body>/i)[0]))}else l=r=e(fa(g));if(0===r.length)return p;p.title=ta(l,"title").last().text();m.fragment?(g="body"===m.fragment?r:ta(r,m.fragment).first(),g.length&&(p.contents=g.contents(),p.title||(p.title=g.attr("title")||g.data("title")))):/<html/i.test(g)||(p.contents=r);p.contents&&
(p.contents=p.contents.not(function(){return e(this).is("title")}),p.contents.find("title").remove(),p.scripts=ta(p.contents,"script[src]").remove(),p.contents=p.contents.not(p.scripts));p.title&&(p.title=e.trim(p.title));return p}function Aa(g){if(g){var l=e("script[src]");g.each(function(){var g=this.src;if(!l.filter(function(){return this.src===g}).length){var m=document.createElement("script");m.type=e(this).attr("type");m.src=e(this).attr("src");document.head.appendChild(m)}})}}function Fa(e,
g){R[e]=g;for(S.push(e);da.length;)delete R[da.shift()];for(;S.length>p.defaults.maxCacheLength;)delete R[S.shift()]}function J(){return e("meta").filter(function(){var g=e(this).attr("http-equiv");return g&&"X-PJAX-VERSION"===g.toUpperCase()}).attr("content")}function Ga(){e.fn.pjax=g;e.pjax=p;e.pjax.enable=e.noop;e.pjax.disable=Ba;e.pjax.click=m;e.pjax.submit=z;e.pjax.reload=W;e.pjax.defaults={timeout:650,push:!0,replace:!1,type:"GET",dataType:"html",scrollTo:0,maxCacheLength:20,version:J};e(window).on("popstate.pjax",
w)}function Ba(){e.fn.pjax=function(){return this};e.pjax=r;e.pjax.enable=Ga;e.pjax.disable=e.noop;e.pjax.click=e.noop;e.pjax.submit=e.noop;e.pjax.reload=function(){window.location.reload()};e(window).off("popstate.pjax",w)}var ca=!0,Ha=window.location.href,na=window.history.state;na&&na.container&&(p.state=na);"state"in window.history&&(ca=!1);var R={},da=[],S=[];0>e.inArray("state",e.event.props)&&e.event.props.push("state");e.support.pjax=window.history&&window.history.pushState&&window.history.replaceState&&
!navigator.userAgent.match(/((iPod|iPhone|iPad).+\bOS\s+[1-4]|WebApps\/.+CFNetwork)/);e.support.pjax?Ga():Ba()})(jQuery);

+ 43
- 0
public/javascripts/yona-lib.js View File

@@ -0,0 +1,43 @@
yobi.Attachments=function(h){function q(g){r({vFile:g.oFile.files?g.oFile.files[0]:g.oFile,bTemporary:!0})}function r(g){if("undefined"===typeof g.vFile)return 0;var p,a=0,b=[];(g.vFile instanceof Array?g.vFile:[g.vFile]).forEach(function(d){var e=g.bTemporary,f=$.tmpl(m.sTplFileItem,{fileId:d.id,fileName:d.name,fileHref:d.url,fileSize:d.size,fileSizeReadable:humanize.filesize(d.size),mimeType:d.mimeType});t(f,d.mimeType);e&&f.addClass("temporary");p=f;"undefined"!==typeof d.id&&""!==d.id?(p.addClass("complete"),
0<n.welTextarea.length&&p.click(c)):(p.attr("id",d.nSubmitId),p.css("opacity","0.2"),p.data("progressBar",p.find(".progress > .bar")));b.push(p);a+=parseInt(d.size,10)});0<b.length&&(0===n.welFileList.length&&(n.welFileList=$(m.sTplFileList),n.welContainer.append(n.welFileList)),n.welFileList.show(),n.welFileListHelp.show(),n.welFileList.append(b));return a}function u(g,p){var a;p=p||"#f36c22";a=g.css("background");g.css("background",p);setTimeout(function(){g.css("background",a)},500)}function k(g){var p=
g.oRes,a=g.nSubmitId,b=g.oRes.id;-1===m.aTemporaryFileIds.indexOf(b)&&(m.aTemporaryFileIds.push(b),n.welTemporaryUploadFileList.val(m.aTemporaryFileIds.join(",")));if(!(p instanceof Object&&p.name&&p.url))return e(a,p);var b=$("#"+a),d=n.welFileList.find('[data-id="'+p.id+'"]');0<d.length?(b.remove(),u(d),p=!1):(b.attr({"data-id":p.id,"data-href":p.url,"data-name":p.name,"data-mime":p.mimeType}),b.find(".name").html(p.name),b.find(".size").html(humanize.filesize(p.size)),b.click(c),p=void 0);!1!==
p&&f(a,100);a=$(["#"+g.nSubmitId,'.attached-file[data-id="'+g.oRes.id+'"]'].join(", "));p=x(g.nSubmitId);b=A(a);d=n.welTextarea;if(0!==d.length){var k=d.prop("selectionStart"),l=b.length-p.length-1;d.val(d.val().split(p).join(b));0<l&&z(d,k+l)}t(a,g.oRes.mimeType)}function l(g){f(g.nSubmitId,g.nPercentComplete)}function f(g,a){var b=$("#"+g);b.data("progressBar").css("width",a+"%");100===1*a&&(b.css("opacity","1"),setTimeout(function(){b.addClass("complete")},1E3))}function e(g){$("#"+g.nSubmitId).remove();
0===n.welFileList.children().length&&(n.welFileList.hide(),n.welFileListHelp.hide());$yobi.notify(Messages("common.attach.error.upload",g.oRes.status,g.oRes.statusText));B(x(g.nSubmitId+".png"))}function c(g){var p=$(g.target);g=$(g.currentTarget);p.hasClass("btn-delete")?b(g):a(g)}function b(g){var a=g.attr("data-href");yobi.Files.deleteFile({sURL:a,fOnLoad:function(){var a=g.data("id"),a=m.aTemporaryFileIds.indexOf(a.toString());-1!==a&&(m.aTemporaryFileIds.splice(a,1),n.welTemporaryUploadFileList.val(m.aTemporaryFileIds.join(",")));
B(g);g.remove();0===n.welFileList.children().length&&(n.welFileList.hide(),n.welFileListHelp.hide())},fOnError:function(g){$yobi.notify(Messages("common.attach.error.delete",g.status,g.statusText))}})}function a(g){var a=n.welTextarea;if(0===a.length)return!1;var b=a.prop("selectionStart"),c=a.val();g="string"===typeof g?g:A(g);a.val(c.substring(0,b)+g+c.substring(b));z(a,b+g.length)}function d(g){return 0<=["video/mp4","video/ogg","video/webm"].indexOf($.trim(g).toLowerCase())}function t(g,a){d(a)&&
g.children("i.mimetype").addClass("yobicon-video2").show()}function A(g){var a=g.attr("data-mime"),b=g.attr("data-name");g=g.attr("data-href");b="["+b+"]("+g+")\n";return"image"===a.substr(0,5)?"!"+b:d(a)?$("<div>").append($("<video>").attr("controls",!0).append($("<source>").attr("src",g)).append(b)).html():b}function x(g){return"\x3c!--_"+g+"_--\x3e"}function B(g){var a=n.welTextarea;if(0===a.length)return!1;g="string"===typeof g?g:A(g);var b=a.val().split(g).join(""),b=b.split(g.trim()).join("");
a.val(b)}function z(g,a){var b=g.get(0);b.setSelectionRange?b.setSelectionRange(a,a):b.createTextRange&&(b=b.createTextRange(),b.collapse(!0),b.moveEnd("character",a),b.moveStart("character",a),b.select())}function y(g){a(x(g.nSubmitId))}function v(g){var b=g.oFiles,n=b.length;if("textarea"===g.weEvt.target.tagName.toLowerCase())for(g=0;g<n;g++)a(x(b[g].nSubmitId))}function w(a){r({vFile:a.attachments,bTemporary:!1});"undefined"===typeof m.sResourceId&&r({vFile:a.tempFiles,bTemporary:!0})}var m={},
n={};(function(a){var b=a=a||{},c='<a href="${fileHref}?action=download" class="download ybtn ybtn-mini" title="'+Messages("button.download")+' ${fileName}"><i class="yobicon-download"></i></a>';m.sTplFileList=b.sTplFileList||'<ul class="attaches wm">';m.sTplFileItem=b.sTplFileItem||'<li class="attach"><a href="${fileHref}" class="vmiddle" target="_blank"><i class="yobicon-paperclip"></i><span class="filename">${fileName}</span><span class="filesize">(${fileSizeReadable})</span></a>'+c+"</li>";m.sResourceId=
b.sResourceId;m.sResourceType=b.sResourceType;b=a;n.welToAttach=b.targetFormId||$(b.elContainer);n.welTemporaryUploadFileList=$('<input type="hidden" name="'+(b.sTagNameForTemporaryUploadFiles||"temporaryUploadFiles")+'">');n.welToAttach.prepend(n.welTemporaryUploadFileList);m.aTemporaryFileIds=[];n.welContainer=$(b.elContainer);n.welContainer.data("isYobiAttachment",!0);m.sResourceId=m.sResourceId||n.welContainer.data("resourceId");m.sResourceType=m.sResourceType||n.welContainer.data("resourceType");
m.attachments||(m.attachments=n.welContainer.data("attachments"));n.welTextarea=$(b.elTextarea);n.welFileList=n.welContainer.find("ul.attached-files");n.welFileListHelp=n.welContainer.find("p.help");b=yobi.Files.getEnv();n.welHelpDroppable=n.welContainer.find(".help-droppable");n.welHelpPastable=n.welContainer.find(".help-pastable");n.welHelpDroppable[b.bDroppable?"show":"hide"]();n.welHelpPastable[b.bPastable?"show":"hide"]();m.attachments?w(m.attachments):(m.sResourceType&&m.sResourceId||m.attachments)&&
yobi.Files.getList({fOnLoad:w,sResourceType:m.sResourceType,sResourceId:m.sResourceId});a.sUploaderId&&yobi.Files.attach({beforeUpload:q,uploadProgress:l,successUpload:k,errorUpload:e,pasteFile:y,dropFile:v},a.sUploaderId)})(h||{});return{destroy:function(){h.sUploaderId&&yobi.Files.detach({beforeUpload:q,uploadProgress:l,successUpload:k,errorUpload:e,pasteFile:y,dropFile:v},h.sUploaderId);for(var a in n)n[a]=null;n=null}}};yobi.Files=function(){function h(a,b){if(a&&a.length)for(var c=0;c<a.length;c++)q(a[c],z(),b);else q(a,z(),b)}function q(a,b,c){a&&(a.nSubmitId=b||z());return!1===y("beforeUpload",{oFile:a,nSubmitId:a?a.nSubmitId:b},c)?!1:v.bXHR2?r(b,a,c):u(b,a,c)}function r(a,b,c){if(b.size&&b.size>v.nMaxFileSize)return f(a,{status:0,statusText:Messages("error.toolargefile",humanize.filesize(v.nMaxFileSize))},c);var d=new FormData;d.append("filePath",b,b.name);$.ajax({type:"post",url:v.sUploadURL,data:d,cache:!1,
processData:!1,contentType:!1,success:function(b){l(a,b,c)},error:function(b){f(a,b,c)},xhr:function(){var b=$.ajaxSettings.xhr();b.upload&&b.upload.addEventListener("progress",function(b){b.lengthComputable&&k(a,Math.ceil(b.loaded/b.total*100),c)},!1);return b}})}function u(a,b,c){var d=w[c];if(!d.welInputFile&&!b)return!1;var e=d.welInputFile||$(b);b=e.clone();var t=$('<form method="post" enctype="multipart/form-data" style="display:none">');b.insertAfter(e);b.on("change",$.proxy(A,this,c));d.welInputFile=
b;t.attr("action",v.sUploadURL);t.append(e).appendTo(document.body);var m=function(){e.remove();t.remove();t=e=null},d=v.htUploadOpts;d.success=function(b){l(a,b,c);m();m=null};d.uploadProgress=function(b,g,d,e){k(a,e,c);m();m=null};d.error=function(b){f(a,b,c);m();m=null};t.ajaxForm(d);t.submit()}function k(b,a,c){y("uploadProgress",{nSubmitId:b,nPercentComplete:a},c)}function l(b,a,c){if(!(a instanceof Object&&a.name&&a.url))return f(b,a);c&&w[c]&&w[c].welInputFile&&w[c].welInputFile.val("");y("successUpload",
{nSubmitId:b,oRes:a},c)}function f(a,b,c){y("errorUpload",{nSubmitId:a,oRes:b},c)}function e(b){var c=w[b];c.welInputFile.on("change",$.proxy(A,this,b));if(v.bDroppable){c.welContainer.on({dragover:$.proxy(a,this,b),drop:$.proxy(x,this,b)});var e=$("#tplDropFilesHere").text().trim()||'<div class="upload-drop-here"><div class="msg-wrap"><div class="msg">'+Messages("common.attach.dropFilesHere")+"</div></div></div>";c.welDropper=$(e);c.welTextarea.before(c.welDropper);c.welTextarea.on({dragover:$.proxy(a,
this,b),dragenter:$.proxy(d,this,b),dragleave:$.proxy(t,this,b),drop:$.proxy(x,this,b)})}if(v.bPastable&&c.welTextarea)c.welTextarea.on("paste",$.proxy(B,this,b));c.welContainer.data("isYobiUploader",!0);c.welTextarea.data("isYobiUploader",!0)}function c(){$(document.body).addClass("dragover")}function b(){$(document.body).removeClass("dragover")}function a(b,a){c();a.stopPropagation();a.preventDefault();return!1}function d(b,a){c();var d=a.originalEvent.dataTransfer,e;e=a.originalEvent.dataTransfer;
e=e.types?-1<e.types.indexOf("text/uri-list")?"link":-1<e.types.indexOf("Files")||-1<e.types.indexOf("text/plain")?"copy":"none":"none";d.dropEffect=e;a.stopPropagation();a.preventDefault()}function t(a,c){b();c.originalEvent.dataTransfer.dropEffect="none";c.stopPropagation();c.preventDefault()}function A(b){var a=w[b],c;c=a.welInputFile.val();var d=c.indexOf("fakepath");(c=-1<d?c.substring(d+8+1):c)&&""!==c&&h(a.welInputFile[0].files||a.welInputFile[0],b)}function x(a,c){b();var d=c.originalEvent.dataTransfer.files;
if(d&&0!==d.length)return h(d,a),y("dropFile",{weEvt:c,oFiles:d},a),c.stopPropagation(),c.preventDefault(),!1}function B(a,b){var c=b.originalEvent.clipboardData;if(c&&c.items)for(var d,e,f=0,t=c.items.length;f<t;f++)d=c.items[f],(e=d.getAsFile())&&0===e.type.indexOf("image/")&&(d=z(),e.name=d+".png",q(e,d,a),y("pasteFile",{nSubmitId:d,oFile:e},a),b.preventDefault())}function z(){return parseInt(Math.random()*(new Date).getTime())}function y(a,b,c){a=(m[a]||[]).concat(m[(c?c+".":"")+a]||[]);if(!1!==
a instanceof Array){var d;a.forEach(function(a){d=d||a(b)});return d}}var v={},w={},m={};return{init:function(a){a=a||{};v.sListURL=a.sListURL;v.sUploadURL=a.sUploadURL;v.htUploadOpts=a.htUploadOpts||{dataType:"json"};v.bXHR2=!(!window.ProgressEvent||!window.FileReader)&&!!window.FormData;-1<navigator.userAgent.toLowerCase().indexOf("trident")&&(v.bXHR2=v.bXHR2&&-1<location.protocol.toLowerCase().indexOf("https"));v.bDroppable="undefined"!=typeof window.File&&v.bXHR2;v.bPastable="undefined"!=typeof document.onpaste&&
v.bXHR2&&-1===navigator.userAgent.indexOf("FireFox");v.nMaxFileSize=2147483454},getEnv:function(){return v},getUploader:function(a,b,c){c=c||z();if($(a).data("isYobiUploader")||$(b).data("isYobiUploader"))return!1;var d=c;w[d]={};w[d].welContainer=$(a);w[d].welTextarea=$(b);w[d].welInputFile=w[d].welContainer.find("input[type=file]");w[d].welContainer.attr("data-namespace",d);v.bXHR2||w[d].welInputFile.attr("multiple",null);e(c);return w[c].welContainer},destroyUploader:function(a){if(a&&w[a]){var b=
w[a];b.welInputFile.off();b.welContainer.off();b.welTextarea.off();b.welContainer.data("isYobiUploader",!1);b.welTextarea.data("isYobiUploader",!1);delete w[a]}},attach:function(a,b,c){if("object"===typeof a){c=b?b+".":"";for(var d in a)m[c+d]=m[c+d]||[],m[c+d].push(a[d])}else c=c?c+".":"",m[c+a]=m[c+a]||[],m[c+a].push(b)},detach:function(a,b,c){c=c?c+".":"";if(b){var d=m[c+a];b=d?d.indexOf(b):-1;-1<b&&m[c+a].splice(b,1)}else m[c+a]=[]},getList:function(a){$.ajax({type:"get",url:v.sListURL,success:a.fOnLoad,
error:a.fOnError,data:{containerType:a.sResourceType,containerId:a.sResourceId}})},uploadFile:h,deleteFile:function(a){$yobi.sendForm({sURL:a.sURL,fOnLoad:a.fOnLoad,fOnError:a.fOnError,htData:{_method:"delete"},htOptForm:{method:"post",enctype:"multipart/form-data"}})}}}();yobi.Markdown=function(h){var q,r;function u(e){q=e.sMarkdownRendererUrl;r={gfm:!0,tables:!0,pedantic:!1,sanitize:!1,smartLists:!0,langPrefix:"",highlight:function(c,b){if(b)try{return hljs.highlight(b.toLowerCase(),c).value}catch(a){console.log(a.message)}}}}function k(e,c){$.ajax(q,{type:"post",data:{body:c,breaks:e.hasClass("readme-body")?!1:!0},success:function(b){e.html(b)}})}function l(e){var c=e.parents('[data-toggle="markdown-editor"]').get(0);if(!c)return!1;$(c).on("click",'a[data-mode="preview"]',
function(b){b=$(b.delegateTarget).find("div.markdown-preview");var a=e.val();q&&k(b,a);b.css({"min-height":e.height()+"px"})});e.on("keydown.tabkey-event-handler",function(b){if(9===b.keyCode){b.preventDefault();b=this.selectionStart;var a=this.selectionEnd;this.value=this.value.substring(0,b)+"\t"+this.value.substring(a);this.selectionEnd=b+1}})}function f(e){$(e||"[markdown]").each(function(c,b){var a=b.tagName.toUpperCase();if("TEXTAREA"===a||"INPUT"===a||"true"==b.contentEditable)l($(b));else{var a=
$(b),d=a.text(),d=d?$yobi.xssClean(marked(d,r)):a.html();$(".markdown-loader").remove();a.html(d).removeClass("markdown-before")}})}r=q=void 0;return{init:function(e){e=e||{};u(e);f(e.aTarget)},enableMarkdown:f,render:k}}();yobi.Mention=function(h){function q(c){c=c||window.event;c=c.which||c.keyCode;(64===c||35===c)&&f.doesNotDataLoaded&&k()}function r(){f.nKeyupEventGenerator&&clearInterval(f.nKeyupEventGenerator);f.nKeyupEventGenerator=setInterval(function(){f.sMentionText!=e.welTarget.val()&&(e.welTarget.trigger("keyup"),f.sMentionText=e.welTarget.val())},100)}function u(){f.nKeyupEventGenerator&&(clearInterval(f.nKeyupEventGenerator),f.nKeyupEventGenerator=null)}function k(){$.ajax({url:f.url,type:"get",contentType:"application/json",
dataType:"json",beforeSend:function(){NProgress.start()}}).done(function(c){NProgress.done();l(c)})}function l(c){f.doesNotDataLoaded=!1;e.welTarget.atwho({at:"@",limit:10,data:c.result,tpl:"<li data-value='@${loginid}'><img style='width:20px;height:20px;' src='${image}'> ${username} <small>${loginid}</small></li>",show_the_at:!0}).atwho({at:"#",limit:10,tpl:'<li data-value="#${issueNo}"><small>#${issueNo}</small> ${title}</li>',data:c.issues,callbacks:{sorter:function(b,a,c){var e,f,k;if(!b)return a;
k=[];e=0;for(f=a.length;e<f;e++){c=a[e];if(c.issueNo===b)c.atwhoOrder=0;else{var l=c.issueNo.toLowerCase().indexOf(b.toLowerCase());c.atwhoOrder=e+1+Math.pow(10,l)+(-1<l?0:Math.pow(100,c.title.toLowerCase().indexOf(b.toLowerCase())))}k.push(c)}return k.sort(function(a,b){return a.atwhoOrder-b.atwhoOrder})}}}).atwho("run")}var f={},e={};(function(c){f=c||{};f.doesNotDataLoaded=!0;f.nKeyupEventGenerator=null;f.sMentionText=null;f.target?e.welTarget=$(f.target):window.console&&console.error("mention form element targeting doesn't exist!");
e.welTarget.on("keypress",q);jQuery.browser.mozilla&&(e.welTarget.on("focus",r),e.welTarget.on("blur",u))})(h||{})};yobi.OriginalMessage=function(h){function q(h,q,k){var l,f;l=function(){q();h.click(f)};f=function(){k();h.click(l)};h.click(l)}return{hide:function(h){$.each(h,function(h,k){var l,f,e,c=$(k);c.find(":contains('---')").each(function(){var b=$(this).html();return b&&!$(this).is(c.children(":first"))&&b.match(/(^|^<[^>]+>)---+[^-]*---+/)?(l=$(this),!1):!0});l&&(f=l.add(l.nextAll()).add(l.parents().filter(function(b,a){return 0<c.has(a).length}).nextAll()).hide(),e=$("<button>").css("border",0).css("padding-left",
"5px").css("padding-right","5px").attr("type","button").text("..."),q(e,function(){f.show()},function(){f.hide()}),l.before(e))})}}}();yobi.Pagination=function(h,q){function r(c){var b=q.createElement("a");b.href=c.replace("&amp;","&");return b.search}function u(c,b,a){var d=r(c),e=new RegExp("(^|&|\\?)"+a+"=[^&]+"),f=e.exec(d);b=d=f?d.replace(e,f[1]+a+"="+b):d+"&"+a+"="+b;a=q.createElement("a");a.href=c;a.search="?"==b[0]?b:"?"+b;return a.href}function k(c){var b=$('<input type="number" pattern="[0-9]*" class="input-mini nospinner">');b.prop({name:c.paramNameForPage,max:c.totalPages,min:1});b.val(c.current);b.on("keydown",function(a){var d;
d=c.current;if(!1===e.test(b.val()))b.val(d),d=!1;else{d=parseInt(b.val(),10);var f=parseInt(b.attr("min"),10),k=parseInt(b.attr("max"),10);d<f?b.val(f):d>k&&b.val(k);d=!0}d&&(d=b.val(),"function"===typeof c.submit?c.submit(d):13===a.which&&(q.location.href=u(c.url,d,c.paramNameForPage)))});return b}function l(c){var b=$('<li class="page-num ikon">');if(c.bActive){var a=$("<a pjax-page>");a.html(c.sLinkHTMLOn);"function"===typeof c.submit?(a.attr("href","javascript: void(0);"),a.on("click",function(){c.submit(c.nSubmitPageNum)})):
a.attr("href",c.sLinkHref);b.append(a)}else b.html(c.sLinkHTMLOff);yobi.ShortcutKey&&(a={},a[c.sShortcutKey]=c.sLinkHref,yobi.ShortcutKey.setKeymapLink(a));return b}var f={},e=/^.[0-9]*$/;return{update:function(c,b,a){if(!(0>=b)){c=$(c);a=a||{};a.url=a.url||q.URL;a.firstPage=a.firstPage||1;a.totalPages=b;a.paramNameForPage=a.paramNameForPage||"pageNum";var d;if(e.test(a.current))d=a.current;else{var t=r(a.url);d=parseInt;var h=a.paramNameForPage;f[h]=f[h]||new RegExp("(^|&|\\?)"+h+"=([^&]+)");t=f[h].exec(t);
d=d(t?t[2]:null,10)||a.firstPage}a.current=d;a.hasPrev="undefined"===typeof a.hasPrev?a.current>a.firstPage:a.hasPrev;a.hasNext="undefined"===typeof a.hasNext?a.current<a.totalPages:a.hasNext;if(!$.isNumeric(a.current))throw Error("options.current is not valid: "+a.current);c.html("");c.addClass("page-navigation-wrap");t=Messages("button.prevPage")||"PREV";d='<i class="ico btn-pg-prev"></i><span>'+t+"</span>";t='<i class="ico btn-pg-prev off"></i><span class="off">'+t+"</span>";d=$.extend(a,{bActive:a.hasPrev,
sLinkHref:a.hasPrev?u(a.url,a.current-1,a.paramNameForPage):"",sLinkHTMLOn:d,sLinkHTMLOff:t,sShortcutKey:"A",nSubmitPageNum:a.current-1});d=l(d);h=Messages("button.nextPage")||"NEXT";t="<span>"+h+'</span><i class="ico btn-pg-next"></i>';h='<span class="off">'+h+'</span><i class="ico btn-pg-next off"></i>';t=$.extend(a,{bActive:a.hasNext,sLinkHref:a.hasNext?u(a.url,a.current+1,a.paramNameForPage):"",sLinkHTMLOn:t,sLinkHTMLOff:h,sShortcutKey:"S",nSubmitPageNum:a.current+1});t=l(t);a=k(a);a=$('<li class="page-num">').append(a);
h=$('<li class="page-num delimiter">').text("/");b=$('<li class="page-num">').text(b);var x=$('<ul class="page-nums">');x.append([d,a,h,b,t]);c.append(x)}}}}(window,document);$(document).on("click.pagination.number-api",'input[name="pageNum"][type="number"]',function(){$(this).select()});yobi.ShortcutKey=function(h){function q(c){var b;var a=f.htKeycodeMap[c.keyCode];if("undefined"===typeof a)b=void 0;else{b=[];var d="";c.altKey&&b.push("ALT");(c.ctrlKey||c.metaKey)&&b.push("CTRL");c.shiftKey&&b.push("SHIFT");b.push(a);b=d=b.join("+").toUpperCase()}a=e[b];if("function"===typeof a){d=c.target.tagName.toUpperCase();c={weEvt:c,welTarget:$(c.target),sTagName:d,sKeyInput:b,bFormInput:-1<f.aFormTags.indexOf(d)};try{a(c)}catch(k){}finally{}}}function r(c,b){if("string"===typeof c){var a,
d=b;a=k(c);e[a]=d}else for(a in c){b=c[a];var d=a,f=b,d=k(d);e[d]=f}}function u(c){c=k(c);delete e[c]}function k(c){c=c.toUpperCase()||"";c=c.replace(f.rxTrim,"");return c=c.split("+").sort(function(b){return-1*f.aCombinationKeys.indexOf(b)}).join("+")}function l(){$(window).off({keydown:q,beforeunload:l});e=f=null}var f={},e={};f.rxTrim=/\s+/g;f.aFormTags=["INPUT","TEXTAREA"];f.aCombinationKeys=["CTRL","ALT","SHIFT"];f.htKeycodeMap={13:"ENTER",38:"UP",40:"DOWN",37:"LEFT",39:"RIGHT",13:"ENTER",27:"ESC",
32:"SPACE",8:"BACKSPACE",9:"TAB",46:"DELETE",33:"PAGEUP",34:"PAGEDOWN",36:"HOME",35:"END",65:"A",66:"B",67:"C",68:"D",69:"E",70:"F",71:"G",72:"H",73:"I",74:"J",75:"K",76:"L",77:"M",78:"N",79:"O",80:"P",81:"Q",82:"R",83:"S",84:"T",85:"U",86:"V",87:"W",88:"X",89:"Y",90:"Z",48:"0",49:"1",50:"2",51:"3",52:"4",53:"5",54:"6",55:"7",56:"8",57:"9",219:"[",221:"]",186:";",222:"'",188:",",190:".",191:"/",189:"-",187:"=",220:"\\",192:"`",112:"F1",113:"F2",114:"F3",115:"F4",116:"F5",117:"F6",118:"F7",119:"F8",
120:"F9",121:"F10",122:"F11",123:"F12"};$(window).on({keydown:q,beforeunload:l});return{attach:r,detach:u,getHandlers:function(){return e},setKeymapLink:function(c){var b,a=function(a){a.bFormInput||(document.location.href=c[a.sKeyInput])};for(b in c)c[b]?r(b,a):u(b)}}}();(function(h){h=$yobi.createNamespace(h);h.container[h.name]=function(h,r){function u(b){if("function"===typeof e.fOnClickButton&&!1===e.fOnClickButton({weEvt:b,nButtonIndex:$(this).index()}))return!1;k()}function k(){c.welContainer.modal("hide")}function l(){"function"==typeof e.fOnAfterShow&&e.fOnAfterShow();e.bAutoFocusOnLastButton&&c.welButtons.find(".ybtn-primary:last,button:last").focus()}function f(){c.welMessage.html("");"function"==typeof e.fOnAfterHide&&e.fOnAfterHide()}var e={},c={};(function(b,
a){e.sDefaultButton='<button type="button" class="ybtn ybtn-info" data-dismiss="modal">'+Messages("button.confirm")+"</button>";e.sTplCustomButton='<button type="button" class="ybtn ${class}">${text}</button>';e.bAutoFocusOnLastButton="undefined"!==typeof a.bAutoFocusOnLastButton?a.bAutoFocusOnLastButton:!0;c.welContainer=$(b).clone();c.welMessage=c.welContainer.find(".msg");c.welDescription=c.welContainer.find(".desc");c.welButtons=c.welContainer.find(".buttons");c.welContainer.modal({show:!1});
c.welContainer.on("shown",l);c.welContainer.on("hidden",f);c.welContainer.on("click","button.ybtn",u)})(h,r||{});return{show:function(b,a,d){e.fOnAfterShow=d.fOnAfterShow;e.fOnAfterHide=d.fOnAfterHide;e.fOnClickButton=d.fOnClickButton;var f;if(d.aButtonLabels){f=[];var k=d.aButtonLabels;d=d.aButtonStyles||[];for(var h=0,l=k.length;h<l;h++)f.push($yobi.tmpl(e.sTplCustomButton,{text:k[h],"class":d[h]||(0===d.length&&h===l-1?"ybtn-primary":"ybtn-default")}));f=f.join("")}else f=e.sDefaultButton;c.welButtons.html(f);
c.welMessage.html($yobi.nl2br(b));c.welDescription.html($yobi.nl2br(a||""));c.welContainer.modal("show")},hide:k}}})("yobi.ui.Dialog");(function(h){h=$yobi.createNamespace(h);h.container[h.name]=function(h){function r(b){if(0<b.originalEvent.deltaY&&a.welList.scrollTop()+a.welList.height()===a.welList.get(0).scrollHeight||0>b.originalEvent.deltaY&&0===a.welList.scrollTop())return b.preventDefault(),b.stopPropagation(),!1}function u(a){var b=$(a.target),b="LI"===a.target.tagName?b:$(b.parents("li")[0]);if(0===b.length||"undefined"===typeof b.attr("data-value"))return a.stopPropagation(),a.preventDefault(),!1;k(b);l(b);f()}function k(b){a.welSelectedLabel.html(b.html());
a.waItems.removeClass("active");b.addClass("active")}function l(c){c=c.attr("data-value");var e=a.welContainer.attr("data-name");b.sName=e;b.sValue=c;if("undefined"!==typeof e){var f=a.welContainer.find("input[name='"+e+"']");0===f.length&&(f=$('<input type="hidden" name="'+e+'">'),a.welContainer.append(f));f.val(c)}}function f(){"function"==typeof b.fOnChange&&setTimeout(function(){b.fOnChange(e())},0)}function e(){return b.sValue}function c(b){b=a.welContainer.find(b);if(0>=b.length)return!1;b=
$(b[0]);k(b);l(b);return!0}var b={sValue:""},a={};(function(d){a.welContainer=$(d.elContainer);a.welSelectedLabel=a.welContainer.find(".d-label");a.welList=a.welContainer.find(".dropdown-menu");a.waItems=a.welList.find("li");a.welList.on("click","li",u);a.welList.on("mousewheel",r);b.fOnChange=d.fOnChange;c("li[data-selected=true]")})(h);return{getValue:e,onChange:function(a){b.fOnChange=a;return!0},selectByValue:function(a){return c("li[data-value='"+a+"']")},selectItem:c}}})("yobi.ui.Dropdown");$(document).ready(function(){function h(k,h){var f;h=$("#"+k).find("li > a");(f=localStorage.getItem("yobitab-"+k))&&h[f]&&(f=$(h[f]))&&f.data(!1)&&f.tab("show")}var q,r,u;$(".nav-tabs[id]").each(function(k,l){r=$(l);u=r.attr("id");"undefined"!=typeof u&&(q=r.find("li"),q.click(function(){localStorage.setItem("yobitab-"+u,$(this).index())}),h(u,q))})});(function(h){h=$yobi.createNamespace(h);h.container[h.name]=function(h,r){function u(c){$(this).remove()}function k(c,b){c.bind("webkitTransitionEnd",function(){c.remove()});setTimeout(function(){c.css("opacity",0)},b)}var l,f,e;(function(c,b){b.sTplToast=b.sTplToast.replace("\n","");l=b.sTplToast||'<div class="toast" tabindex="-1"> <div class="btn-dismiss"><button type="button" class="btn-transparent">&times;</button></div> <div class="center-text msg"></div></div>';f=$(c);
e=$(l)})(h,r||{});return{push:function(c,b){var a=e.clone(),d=a.find(".msg");a.css("opacity","0");a.click(u);d.html($yobi.nl2br(c));f.prepend(a);a.css("opacity","1");b&&0<b&&k(a,b)},clear:function(){f.empty()}}}})("yobi.ui.Toast");(function(h){h=$yobi.createNamespace(h);h.container[h.name]=function(h,r){function u(f,e){f.match(k.sLastQuery)&&k.bIsLastRangeEntire?e(k.htCachedUsers):(k.htData.query=f,$yobi.sendForm({sURL:k.sActionURL,htOptForm:{method:"get"},htData:k.htData,sDataType:"json",fOnLoad:function(c,b,a){b=a.getResponseHeader("Content-Range");b=(b=k.rxContentRange.exec(b||""))?!(parseInt(b[1],10)<parseInt(b[2],10)):!0;k.bIsLastRangeEntire=b;k.sLastQuery=f;k.htCachedUsers=c;e(c)}}))}var k={},l;(function(f,e){k.sActionURL=
e.sActionURL||"/users";k.rxContentRange=/items\s+([0-9]+)\/([0-9]+)/;k.htData=e.htData||{};try{l=$(f),l.typeahead({minLength:k.htData.minLength||0}),htData=l.data("typeahead"),htData.items=k.htData.limit||8,htData.source=k.htData.source||u,"function"===typeof k.htData.updater&&(htData.updater=k.htData.updater),"function"===typeof k.htData.render&&(htData.render=k.htData.render),htData.minLength=k.htData.minLength||0}catch(c){"object"==typeof console&&console.log(c)}})(h,r||{})}})("yobi.ui.Typeahead");

Loading…
Cancel
Save