mirror of
https://github.com/galaxyproject/galaxy.git
synced 2026-10-25 10:24:38 +08:00
53 lines
458 KiB
JavaScript
53 lines
458 KiB
JavaScript
!function(t){function e(i){if(n[i])return n[i].exports;var s=n[i]={exports:{},id:i,loaded:!1};return t[i].call(s.exports,s,s.exports,e),s.loaded=!0,s.exports}var i=window.webpackJsonp;window.webpackJsonp=function(o,r){for(var a,l,u=0,c=[];u<o.length;u++)l=o[u],s[l]&&c.push.apply(c,s[l]),s[l]=0;for(a in r)Object.prototype.hasOwnProperty.call(r,a)&&(t[a]=r[a]);for(i&&i(o,r);c.length;)c.shift().call(null,e);if(r[0])return n[0]=0,e(0)};var n={},s={2:0};return e.e=function(t,i){if(0===s[t])return i.call(null,e);if(void 0!==s[t])s[t].push(i);else{s[t]=[i];var n=document.getElementsByTagName("head")[0],o=document.createElement("script");o.type="text/javascript",o.charset="utf-8",o.async=!0,o.src=e.p+""+t+"."+({3:"analysis",4:"admin",5:"login"}[t]||t)+".bundled.js",n.appendChild(o)}},e.m=t,e.c=n,e.p="",e(0)}([function(t,e,i){i(144),i(1),i(112),i(72),i(69),i(70),i(71),i(109),i(68),i(106),i(67),i(108),i(110),i(2),i(3),i(89),i(66),i(35),t.exports=i(143)},function(t,e,i){var n,s;/*!
|
||
* jQuery JavaScript Library v1.12.4
|
||
* http://jquery.com/
|
||
*
|
||
* Includes Sizzle.js
|
||
* http://sizzlejs.com/
|
||
*
|
||
* Copyright jQuery Foundation and other contributors
|
||
* Released under the MIT license
|
||
* http://jquery.org/license
|
||
*
|
||
* Date: 2016-05-20T17:17Z
|
||
*/
|
||
!function(e,i){"object"==typeof t&&"object"==typeof t.exports?t.exports=e.document?i(e,!0):function(t){if(!t.document)throw new Error("jQuery requires a window with a document");return i(t)}:i(e)}("undefined"!=typeof window?window:this,function(i,o){function r(t){var e=!!t&&"length"in t&&t.length,i=vt.type(t);return"function"!==i&&!vt.isWindow(t)&&("array"===i||0===e||"number"==typeof e&&e>0&&e-1 in t)}function a(t,e,i){if(vt.isFunction(e))return vt.grep(t,function(t,n){return!!e.call(t,n,t)!==i});if(e.nodeType)return vt.grep(t,function(t){return t===e!==i});if("string"==typeof e){if(Et.test(e))return vt.filter(e,t,i);e=vt.filter(e,t)}return vt.grep(t,function(t){return vt.inArray(t,e)>-1!==i})}function l(t,e){do t=t[e];while(t&&1!==t.nodeType);return t}function u(t){var e={};return vt.each(t.match(Rt)||[],function(t,i){e[i]=!0}),e}function c(){at.addEventListener?(at.removeEventListener("DOMContentLoaded",h),i.removeEventListener("load",h)):(at.detachEvent("onreadystatechange",h),i.detachEvent("onload",h))}function h(){(at.addEventListener||"load"===i.event.type||"complete"===at.readyState)&&(c(),vt.ready())}function d(t,e,i){if(void 0===i&&1===t.nodeType){var n="data-"+e.replace(Lt,"-$1").toLowerCase();if(i=t.getAttribute(n),"string"==typeof i){try{i="true"===i||"false"!==i&&("null"===i?null:+i+""===i?+i:Ht.test(i)?vt.parseJSON(i):i)}catch(t){}vt.data(t,e,i)}else i=void 0}return i}function p(t){var e;for(e in t)if(("data"!==e||!vt.isEmptyObject(t[e]))&&"toJSON"!==e)return!1;return!0}function f(t,e,i,n){if(It(t)){var s,o,r=vt.expando,a=t.nodeType,l=a?vt.cache:t,u=a?t[r]:t[r]&&r;if(u&&l[u]&&(n||l[u].data)||void 0!==i||"string"!=typeof e)return u||(u=a?t[r]=rt.pop()||vt.guid++:r),l[u]||(l[u]=a?{}:{toJSON:vt.noop}),"object"!=typeof e&&"function"!=typeof e||(n?l[u]=vt.extend(l[u],e):l[u].data=vt.extend(l[u].data,e)),o=l[u],n||(o.data||(o.data={}),o=o.data),void 0!==i&&(o[vt.camelCase(e)]=i),"string"==typeof e?(s=o[e],null==s&&(s=o[vt.camelCase(e)])):s=o,s}}function g(t,e,i){if(It(t)){var n,s,o=t.nodeType,r=o?vt.cache:t,a=o?t[vt.expando]:vt.expando;if(r[a]){if(e&&(n=i?r[a]:r[a].data)){vt.isArray(e)?e=e.concat(vt.map(e,vt.camelCase)):e in n?e=[e]:(e=vt.camelCase(e),e=e in n?[e]:e.split(" ")),s=e.length;for(;s--;)delete n[e[s]];if(i?!p(n):!vt.isEmptyObject(n))return}(i||(delete r[a].data,p(r[a])))&&(o?vt.cleanData([t],!0):gt.deleteExpando||r!=r.window?delete r[a]:r[a]=void 0)}}}function m(t,e,i,n){var s,o=1,r=20,a=n?function(){return n.cur()}:function(){return vt.css(t,e,"")},l=a(),u=i&&i[3]||(vt.cssNumber[e]?"":"px"),c=(vt.cssNumber[e]||"px"!==u&&+l)&&Ft.exec(vt.css(t,e));if(c&&c[3]!==u){u=u||c[3],i=i||[],c=+l||1;do o=o||".5",c/=o,vt.style(t,e,c+u);while(o!==(o=a()/l)&&1!==o&&--r)}return i&&(c=+c||+l||0,s=i[1]?c+(i[1]+1)*i[2]:+i[2],n&&(n.unit=u,n.start=c,n.end=s)),s}function v(t){var e=Xt.split("|"),i=t.createDocumentFragment();if(i.createElement)for(;e.length;)i.createElement(e.pop());return i}function y(t,e){var i,n,s=0,o="undefined"!=typeof t.getElementsByTagName?t.getElementsByTagName(e||"*"):"undefined"!=typeof t.querySelectorAll?t.querySelectorAll(e||"*"):void 0;if(!o)for(o=[],i=t.childNodes||t;null!=(n=i[s]);s++)!e||vt.nodeName(n,e)?o.push(n):vt.merge(o,y(n,e));return void 0===e||e&&vt.nodeName(t,e)?vt.merge([t],o):o}function b(t,e){for(var i,n=0;null!=(i=t[n]);n++)vt._data(i,"globalEval",!e||vt._data(e[n],"globalEval"))}function w(t){Bt.test(t.type)&&(t.defaultChecked=t.checked)}function _(t,e,i,n,s){for(var o,r,a,l,u,c,h,d=t.length,p=v(e),f=[],g=0;g<d;g++)if(r=t[g],r||0===r)if("object"===vt.type(r))vt.merge(f,r.nodeType?[r]:r);else if(Jt.test(r)){for(l=l||p.appendChild(e.createElement("div")),u=(Ut.exec(r)||["",""])[1].toLowerCase(),h=Yt[u]||Yt._default,l.innerHTML=h[1]+vt.htmlPrefilter(r)+h[2],o=h[0];o--;)l=l.lastChild;if(!gt.leadingWhitespace&&Gt.test(r)&&f.push(e.createTextNode(Gt.exec(r)[0])),!gt.tbody)for(r="table"!==u||Kt.test(r)?"<table>"!==h[1]||Kt.test(r)?0:l:l.firstChild,o=r&&r.childNodes.length;o--;)vt.nodeName(c=r.childNodes[o],"tbody")&&!c.childNodes.length&&r.removeChild(c);for(vt.merge(f,l.childNodes),l.textContent="";l.firstChild;)l.removeChild(l.firstChild);l=p.lastChild}else f.push(e.createTextNode(r));for(l&&p.removeChild(l),gt.appendChecked||vt.grep(y(f,"input"),w),g=0;r=f[g++];)if(n&&vt.inArray(r,n)>-1)s&&s.push(r);else if(a=vt.contains(r.ownerDocument,r),l=y(p.appendChild(r),"script"),a&&b(l),i)for(o=0;r=l[o++];)Vt.test(r.type||"")&&i.push(r);return l=null,p}function x(){return!0}function C(){return!1}function S(){try{return at.activeElement}catch(t){}}function k(t,e,i,n,s,o){var r,a;if("object"==typeof e){"string"!=typeof i&&(n=n||i,i=void 0);for(a in e)k(t,a,i,n,e[a],o);return t}if(null==n&&null==s?(s=i,n=i=void 0):null==s&&("string"==typeof i?(s=n,n=void 0):(s=n,n=i,i=void 0)),s===!1)s=C;else if(!s)return t;return 1===o&&(r=s,s=function(t){return vt().off(t),r.apply(this,arguments)},s.guid=r.guid||(r.guid=vt.guid++)),t.each(function(){vt.event.add(this,e,s,n,i)})}function T(t,e){return vt.nodeName(t,"table")&&vt.nodeName(11!==e.nodeType?e:e.firstChild,"tr")?t.getElementsByTagName("tbody")[0]||t.appendChild(t.ownerDocument.createElement("tbody")):t}function E(t){return t.type=(null!==vt.find.attr(t,"type"))+"/"+t.type,t}function A(t){var e=le.exec(t.type);return e?t.type=e[1]:t.removeAttribute("type"),t}function D(t,e){if(1===e.nodeType&&vt.hasData(t)){var i,n,s,o=vt._data(t),r=vt._data(e,o),a=o.events;if(a){delete r.handle,r.events={};for(i in a)for(n=0,s=a[i].length;n<s;n++)vt.event.add(e,i,a[i][n])}r.data&&(r.data=vt.extend({},r.data))}}function N(t,e){var i,n,s;if(1===e.nodeType){if(i=e.nodeName.toLowerCase(),!gt.noCloneEvent&&e[vt.expando]){s=vt._data(e);for(n in s.events)vt.removeEvent(e,n,s.handle);e.removeAttribute(vt.expando)}"script"===i&&e.text!==t.text?(E(e).text=t.text,A(e)):"object"===i?(e.parentNode&&(e.outerHTML=t.outerHTML),gt.html5Clone&&t.innerHTML&&!vt.trim(e.innerHTML)&&(e.innerHTML=t.innerHTML)):"input"===i&&Bt.test(t.type)?(e.defaultChecked=e.checked=t.checked,e.value!==t.value&&(e.value=t.value)):"option"===i?e.defaultSelected=e.selected=t.defaultSelected:"input"!==i&&"textarea"!==i||(e.defaultValue=t.defaultValue)}}function O(t,e,i,n){e=ut.apply([],e);var s,o,r,a,l,u,c=0,h=t.length,d=h-1,p=e[0],f=vt.isFunction(p);if(f||h>1&&"string"==typeof p&&!gt.checkClone&&ae.test(p))return t.each(function(s){var o=t.eq(s);f&&(e[0]=p.call(this,s,o.html())),O(o,e,i,n)});if(h&&(u=_(e,t[0].ownerDocument,!1,t,n),s=u.firstChild,1===u.childNodes.length&&(u=s),s||n)){for(a=vt.map(y(u,"script"),E),r=a.length;c<h;c++)o=u,c!==d&&(o=vt.clone(o,!0,!0),r&&vt.merge(a,y(o,"script"))),i.call(t[c],o,c);if(r)for(l=a[a.length-1].ownerDocument,vt.map(a,A),c=0;c<r;c++)o=a[c],Vt.test(o.type||"")&&!vt._data(o,"globalEval")&&vt.contains(l,o)&&(o.src?vt._evalUrl&&vt._evalUrl(o.src):vt.globalEval((o.text||o.textContent||o.innerHTML||"").replace(ue,"")));u=s=null}return t}function P(t,e,i){for(var n,s=e?vt.filter(e,t):t,o=0;null!=(n=s[o]);o++)i||1!==n.nodeType||vt.cleanData(y(n)),n.parentNode&&(i&&vt.contains(n.ownerDocument,n)&&b(y(n,"script")),n.parentNode.removeChild(n));return t}function R(t,e){var i=vt(e.createElement(t)).appendTo(e.body),n=vt.css(i[0],"display");return i.detach(),n}function M(t){var e=at,i=pe[t];return i||(i=R(t,e),"none"!==i&&i||(de=(de||vt("<iframe frameborder='0' width='0' height='0'/>")).appendTo(e.documentElement),e=(de[0].contentWindow||de[0].contentDocument).document,e.write(),e.close(),i=R(t,e),de.detach()),pe[t]=i),i}function j(t,e){return{get:function(){return t()?void delete this.get:(this.get=e).apply(this,arguments)}}}function I(t){if(t in Ae)return t;for(var e=t.charAt(0).toUpperCase()+t.slice(1),i=Ee.length;i--;)if(t=Ee[i]+e,t in Ae)return t}function H(t,e){for(var i,n,s,o=[],r=0,a=t.length;r<a;r++)n=t[r],n.style&&(o[r]=vt._data(n,"olddisplay"),i=n.style.display,e?(o[r]||"none"!==i||(n.style.display=""),""===n.style.display&&Wt(n)&&(o[r]=vt._data(n,"olddisplay",M(n.nodeName)))):(s=Wt(n),(i&&"none"!==i||!s)&&vt._data(n,"olddisplay",s?i:vt.css(n,"display"))));for(r=0;r<a;r++)n=t[r],n.style&&(e&&"none"!==n.style.display&&""!==n.style.display||(n.style.display=e?o[r]||"":"none"));return t}function L(t,e,i){var n=Se.exec(e);return n?Math.max(0,n[1]-(i||0))+(n[2]||"px"):e}function $(t,e,i,n,s){for(var o=i===(n?"border":"content")?4:"width"===e?1:0,r=0;o<4;o+=2)"margin"===i&&(r+=vt.css(t,i+qt[o],!0,s)),n?("content"===i&&(r-=vt.css(t,"padding"+qt[o],!0,s)),"margin"!==i&&(r-=vt.css(t,"border"+qt[o]+"Width",!0,s))):(r+=vt.css(t,"padding"+qt[o],!0,s),"padding"!==i&&(r+=vt.css(t,"border"+qt[o]+"Width",!0,s)));return r}function F(t,e,i){var n=!0,s="width"===e?t.offsetWidth:t.offsetHeight,o=ye(t),r=gt.boxSizing&&"border-box"===vt.css(t,"boxSizing",!1,o);if(s<=0||null==s){if(s=be(t,e,o),(s<0||null==s)&&(s=t.style[e]),ge.test(s))return s;n=r&&(gt.boxSizingReliable()||s===t.style[e]),s=parseFloat(s)||0}return s+$(t,e,i||(r?"border":"content"),n,o)+"px"}function q(t,e,i,n,s){return new q.prototype.init(t,e,i,n,s)}function W(){return i.setTimeout(function(){De=void 0}),De=vt.now()}function z(t,e){var i,n={height:t},s=0;for(e=e?1:0;s<4;s+=2-e)i=qt[s],n["margin"+i]=n["padding"+i]=t;return e&&(n.opacity=n.width=t),n}function B(t,e,i){for(var n,s=(G.tweeners[e]||[]).concat(G.tweeners["*"]),o=0,r=s.length;o<r;o++)if(n=s[o].call(i,e,t))return n}function U(t,e,i){var n,s,o,r,a,l,u,c,h=this,d={},p=t.style,f=t.nodeType&&Wt(t),g=vt._data(t,"fxshow");i.queue||(a=vt._queueHooks(t,"fx"),null==a.unqueued&&(a.unqueued=0,l=a.empty.fire,a.empty.fire=function(){a.unqueued||l()}),a.unqueued++,h.always(function(){h.always(function(){a.unqueued--,vt.queue(t,"fx").length||a.empty.fire()})})),1===t.nodeType&&("height"in e||"width"in e)&&(i.overflow=[p.overflow,p.overflowX,p.overflowY],u=vt.css(t,"display"),c="none"===u?vt._data(t,"olddisplay")||M(t.nodeName):u,"inline"===c&&"none"===vt.css(t,"float")&&(gt.inlineBlockNeedsLayout&&"inline"!==M(t.nodeName)?p.zoom=1:p.display="inline-block")),i.overflow&&(p.overflow="hidden",gt.shrinkWrapBlocks()||h.always(function(){p.overflow=i.overflow[0],p.overflowX=i.overflow[1],p.overflowY=i.overflow[2]}));for(n in e)if(s=e[n],Oe.exec(s)){if(delete e[n],o=o||"toggle"===s,s===(f?"hide":"show")){if("show"!==s||!g||void 0===g[n])continue;f=!0}d[n]=g&&g[n]||vt.style(t,n)}else u=void 0;if(vt.isEmptyObject(d))"inline"===("none"===u?M(t.nodeName):u)&&(p.display=u);else{g?"hidden"in g&&(f=g.hidden):g=vt._data(t,"fxshow",{}),o&&(g.hidden=!f),f?vt(t).show():h.done(function(){vt(t).hide()}),h.done(function(){var e;vt._removeData(t,"fxshow");for(e in d)vt.style(t,e,d[e])});for(n in d)r=B(f?g[n]:0,n,h),n in g||(g[n]=r.start,f&&(r.end=r.start,r.start="width"===n||"height"===n?1:0))}}function V(t,e){var i,n,s,o,r;for(i in t)if(n=vt.camelCase(i),s=e[n],o=t[i],vt.isArray(o)&&(s=o[1],o=t[i]=o[0]),i!==n&&(t[n]=o,delete t[i]),r=vt.cssHooks[n],r&&"expand"in r){o=r.expand(o),delete t[n];for(i in o)i in t||(t[i]=o[i],e[i]=s)}else e[n]=s}function G(t,e,i){var n,s,o=0,r=G.prefilters.length,a=vt.Deferred().always(function(){delete l.elem}),l=function(){if(s)return!1;for(var e=De||W(),i=Math.max(0,u.startTime+u.duration-e),n=i/u.duration||0,o=1-n,r=0,l=u.tweens.length;r<l;r++)u.tweens[r].run(o);return a.notifyWith(t,[u,o,i]),o<1&&l?i:(a.resolveWith(t,[u]),!1)},u=a.promise({elem:t,props:vt.extend({},e),opts:vt.extend(!0,{specialEasing:{},easing:vt.easing._default},i),originalProperties:e,originalOptions:i,startTime:De||W(),duration:i.duration,tweens:[],createTween:function(e,i){var n=vt.Tween(t,u.opts,e,i,u.opts.specialEasing[e]||u.opts.easing);return u.tweens.push(n),n},stop:function(e){var i=0,n=e?u.tweens.length:0;if(s)return this;for(s=!0;i<n;i++)u.tweens[i].run(1);return e?(a.notifyWith(t,[u,1,0]),a.resolveWith(t,[u,e])):a.rejectWith(t,[u,e]),this}}),c=u.props;for(V(c,u.opts.specialEasing);o<r;o++)if(n=G.prefilters[o].call(u,t,c,u.opts))return vt.isFunction(n.stop)&&(vt._queueHooks(u.elem,u.opts.queue).stop=vt.proxy(n.stop,n)),n;return vt.map(c,B,u),vt.isFunction(u.opts.start)&&u.opts.start.call(t,u),vt.fx.timer(vt.extend(l,{elem:t,anim:u,queue:u.opts.queue})),u.progress(u.opts.progress).done(u.opts.done,u.opts.complete).fail(u.opts.fail).always(u.opts.always)}function X(t){return vt.attr(t,"class")||""}function Y(t){return function(e,i){"string"!=typeof e&&(i=e,e="*");var n,s=0,o=e.toLowerCase().match(Rt)||[];if(vt.isFunction(i))for(;n=o[s++];)"+"===n.charAt(0)?(n=n.slice(1)||"*",(t[n]=t[n]||[]).unshift(i)):(t[n]=t[n]||[]).push(i)}}function J(t,e,i,n){function s(a){var l;return o[a]=!0,vt.each(t[a]||[],function(t,a){var u=a(e,i,n);return"string"!=typeof u||r||o[u]?r?!(l=u):void 0:(e.dataTypes.unshift(u),s(u),!1)}),l}var o={},r=t===ii;return s(e.dataTypes[0])||!o["*"]&&s("*")}function K(t,e){var i,n,s=vt.ajaxSettings.flatOptions||{};for(n in e)void 0!==e[n]&&((s[n]?t:i||(i={}))[n]=e[n]);return i&&vt.extend(!0,t,i),t}function Q(t,e,i){for(var n,s,o,r,a=t.contents,l=t.dataTypes;"*"===l[0];)l.shift(),void 0===s&&(s=t.mimeType||e.getResponseHeader("Content-Type"));if(s)for(r in a)if(a[r]&&a[r].test(s)){l.unshift(r);break}if(l[0]in i)o=l[0];else{for(r in i){if(!l[0]||t.converters[r+" "+l[0]]){o=r;break}n||(n=r)}o=o||n}if(o)return o!==l[0]&&l.unshift(o),i[o]}function Z(t,e,i,n){var s,o,r,a,l,u={},c=t.dataTypes.slice();if(c[1])for(r in t.converters)u[r.toLowerCase()]=t.converters[r];for(o=c.shift();o;)if(t.responseFields[o]&&(i[t.responseFields[o]]=e),!l&&n&&t.dataFilter&&(e=t.dataFilter(e,t.dataType)),l=o,o=c.shift())if("*"===o)o=l;else if("*"!==l&&l!==o){if(r=u[l+" "+o]||u["* "+o],!r)for(s in u)if(a=s.split(" "),a[1]===o&&(r=u[l+" "+a[0]]||u["* "+a[0]])){r===!0?r=u[s]:u[s]!==!0&&(o=a[0],c.unshift(a[1]));break}if(r!==!0)if(r&&t.throws)e=r(e);else try{e=r(e)}catch(t){return{state:"parsererror",error:r?t:"No conversion from "+l+" to "+o}}}return{state:"success",data:e}}function tt(t){return t.style&&t.style.display||vt.css(t,"display")}function et(t){if(!vt.contains(t.ownerDocument||at,t))return!0;for(;t&&1===t.nodeType;){if("none"===tt(t)||"hidden"===t.type)return!0;t=t.parentNode}return!1}function it(t,e,i,n){var s;if(vt.isArray(e))vt.each(e,function(e,s){i||ai.test(t)?n(t,s):it(t+"["+("object"==typeof s&&null!=s?e:"")+"]",s,i,n)});else if(i||"object"!==vt.type(e))n(t,e);else for(s in e)it(t+"["+s+"]",e[s],i,n)}function nt(){try{return new i.XMLHttpRequest}catch(t){}}function st(){try{return new i.ActiveXObject("Microsoft.XMLHTTP")}catch(t){}}function ot(t){return vt.isWindow(t)?t:9===t.nodeType&&(t.defaultView||t.parentWindow)}var rt=[],at=i.document,lt=rt.slice,ut=rt.concat,ct=rt.push,ht=rt.indexOf,dt={},pt=dt.toString,ft=dt.hasOwnProperty,gt={},mt="1.12.4",vt=function(t,e){return new vt.fn.init(t,e)},yt=/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,bt=/^-ms-/,wt=/-([\da-z])/gi,_t=function(t,e){return e.toUpperCase()};vt.fn=vt.prototype={jquery:mt,constructor:vt,selector:"",length:0,toArray:function(){return lt.call(this)},get:function(t){return null!=t?t<0?this[t+this.length]:this[t]:lt.call(this)},pushStack:function(t){var e=vt.merge(this.constructor(),t);return e.prevObject=this,e.context=this.context,e},each:function(t){return vt.each(this,t)},map:function(t){return this.pushStack(vt.map(this,function(e,i){return t.call(e,i,e)}))},slice:function(){return this.pushStack(lt.apply(this,arguments))},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},eq:function(t){var e=this.length,i=+t+(t<0?e:0);return this.pushStack(i>=0&&i<e?[this[i]]:[])},end:function(){return this.prevObject||this.constructor()},push:ct,sort:rt.sort,splice:rt.splice},vt.extend=vt.fn.extend=function(){var t,e,i,n,s,o,r=arguments[0]||{},a=1,l=arguments.length,u=!1;for("boolean"==typeof r&&(u=r,r=arguments[a]||{},a++),"object"==typeof r||vt.isFunction(r)||(r={}),a===l&&(r=this,a--);a<l;a++)if(null!=(s=arguments[a]))for(n in s)t=r[n],i=s[n],r!==i&&(u&&i&&(vt.isPlainObject(i)||(e=vt.isArray(i)))?(e?(e=!1,o=t&&vt.isArray(t)?t:[]):o=t&&vt.isPlainObject(t)?t:{},r[n]=vt.extend(u,o,i)):void 0!==i&&(r[n]=i));return r},vt.extend({expando:"jQuery"+(mt+Math.random()).replace(/\D/g,""),isReady:!0,error:function(t){throw new Error(t)},noop:function(){},isFunction:function(t){return"function"===vt.type(t)},isArray:Array.isArray||function(t){return"array"===vt.type(t)},isWindow:function(t){return null!=t&&t==t.window},isNumeric:function(t){var e=t&&t.toString();return!vt.isArray(t)&&e-parseFloat(e)+1>=0},isEmptyObject:function(t){var e;for(e in t)return!1;return!0},isPlainObject:function(t){var e;if(!t||"object"!==vt.type(t)||t.nodeType||vt.isWindow(t))return!1;try{if(t.constructor&&!ft.call(t,"constructor")&&!ft.call(t.constructor.prototype,"isPrototypeOf"))return!1}catch(t){return!1}if(!gt.ownFirst)for(e in t)return ft.call(t,e);for(e in t);return void 0===e||ft.call(t,e)},type:function(t){return null==t?t+"":"object"==typeof t||"function"==typeof t?dt[pt.call(t)]||"object":typeof t},globalEval:function(t){t&&vt.trim(t)&&(i.execScript||function(t){i.eval.call(i,t)})(t)},camelCase:function(t){return t.replace(bt,"ms-").replace(wt,_t)},nodeName:function(t,e){return t.nodeName&&t.nodeName.toLowerCase()===e.toLowerCase()},each:function(t,e){var i,n=0;if(r(t))for(i=t.length;n<i&&e.call(t[n],n,t[n])!==!1;n++);else for(n in t)if(e.call(t[n],n,t[n])===!1)break;return t},trim:function(t){return null==t?"":(t+"").replace(yt,"")},makeArray:function(t,e){var i=e||[];return null!=t&&(r(Object(t))?vt.merge(i,"string"==typeof t?[t]:t):ct.call(i,t)),i},inArray:function(t,e,i){var n;if(e){if(ht)return ht.call(e,t,i);for(n=e.length,i=i?i<0?Math.max(0,n+i):i:0;i<n;i++)if(i in e&&e[i]===t)return i}return-1},merge:function(t,e){for(var i=+e.length,n=0,s=t.length;n<i;)t[s++]=e[n++];if(i!==i)for(;void 0!==e[n];)t[s++]=e[n++];return t.length=s,t},grep:function(t,e,i){for(var n,s=[],o=0,r=t.length,a=!i;o<r;o++)n=!e(t[o],o),n!==a&&s.push(t[o]);return s},map:function(t,e,i){var n,s,o=0,a=[];if(r(t))for(n=t.length;o<n;o++)s=e(t[o],o,i),null!=s&&a.push(s);else for(o in t)s=e(t[o],o,i),null!=s&&a.push(s);return ut.apply([],a)},guid:1,proxy:function(t,e){var i,n,s;if("string"==typeof e&&(s=t[e],e=t,t=s),vt.isFunction(t))return i=lt.call(arguments,2),n=function(){return t.apply(e||this,i.concat(lt.call(arguments)))},n.guid=t.guid=t.guid||vt.guid++,n},now:function(){return+new Date},support:gt}),"function"==typeof Symbol&&(vt.fn[Symbol.iterator]=rt[Symbol.iterator]),vt.each("Boolean Number String Function Array Date RegExp Object Error Symbol".split(" "),function(t,e){dt["[object "+e+"]"]=e.toLowerCase()});var xt=/*!
|
||
* Sizzle CSS Selector Engine v2.2.1
|
||
* http://sizzlejs.com/
|
||
*
|
||
* Copyright jQuery Foundation and other contributors
|
||
* Released under the MIT license
|
||
* http://jquery.org/license
|
||
*
|
||
* Date: 2015-10-17
|
||
*/
|
||
function(t){function e(t,e,i,n){var s,o,r,a,l,u,h,p,f=e&&e.ownerDocument,g=e?e.nodeType:9;if(i=i||[],"string"!=typeof t||!t||1!==g&&9!==g&&11!==g)return i;if(!n&&((e?e.ownerDocument||e:F)!==P&&O(e),e=e||P,M)){if(11!==g&&(u=vt.exec(t)))if(s=u[1]){if(9===g){if(!(r=e.getElementById(s)))return i;if(r.id===s)return i.push(r),i}else if(f&&(r=f.getElementById(s))&&L(e,r)&&r.id===s)return i.push(r),i}else{if(u[2])return Q.apply(i,e.getElementsByTagName(t)),i;if((s=u[3])&&_.getElementsByClassName&&e.getElementsByClassName)return Q.apply(i,e.getElementsByClassName(s)),i}if(_.qsa&&!U[t+" "]&&(!j||!j.test(t))){if(1!==g)f=e,p=t;else if("object"!==e.nodeName.toLowerCase()){for((a=e.getAttribute("id"))?a=a.replace(bt,"\\$&"):e.setAttribute("id",a=$),h=k(t),o=h.length,l=dt.test(a)?"#"+a:"[id='"+a+"']";o--;)h[o]=l+" "+d(h[o]);p=h.join(","),f=yt.test(t)&&c(e.parentNode)||e}if(p)try{return Q.apply(i,f.querySelectorAll(p)),i}catch(t){}finally{a===$&&e.removeAttribute("id")}}}return E(t.replace(at,"$1"),e,i,n)}function i(){function t(i,n){return e.push(i+" ")>x.cacheLength&&delete t[e.shift()],t[i+" "]=n}var e=[];return t}function n(t){return t[$]=!0,t}function s(t){var e=P.createElement("div");try{return!!t(e)}catch(t){return!1}finally{e.parentNode&&e.parentNode.removeChild(e),e=null}}function o(t,e){for(var i=t.split("|"),n=i.length;n--;)x.attrHandle[i[n]]=e}function r(t,e){var i=e&&t,n=i&&1===t.nodeType&&1===e.nodeType&&(~e.sourceIndex||G)-(~t.sourceIndex||G);if(n)return n;if(i)for(;i=i.nextSibling;)if(i===e)return-1;return t?1:-1}function a(t){return function(e){var i=e.nodeName.toLowerCase();return"input"===i&&e.type===t}}function l(t){return function(e){var i=e.nodeName.toLowerCase();return("input"===i||"button"===i)&&e.type===t}}function u(t){return n(function(e){return e=+e,n(function(i,n){for(var s,o=t([],i.length,e),r=o.length;r--;)i[s=o[r]]&&(i[s]=!(n[s]=i[s]))})})}function c(t){return t&&"undefined"!=typeof t.getElementsByTagName&&t}function h(){}function d(t){for(var e=0,i=t.length,n="";e<i;e++)n+=t[e].value;return n}function p(t,e,i){var n=e.dir,s=i&&"parentNode"===n,o=W++;return e.first?function(e,i,o){for(;e=e[n];)if(1===e.nodeType||s)return t(e,i,o)}:function(e,i,r){var a,l,u,c=[q,o];if(r){for(;e=e[n];)if((1===e.nodeType||s)&&t(e,i,r))return!0}else for(;e=e[n];)if(1===e.nodeType||s){if(u=e[$]||(e[$]={}),l=u[e.uniqueID]||(u[e.uniqueID]={}),(a=l[n])&&a[0]===q&&a[1]===o)return c[2]=a[2];if(l[n]=c,c[2]=t(e,i,r))return!0}}}function f(t){return t.length>1?function(e,i,n){for(var s=t.length;s--;)if(!t[s](e,i,n))return!1;return!0}:t[0]}function g(t,i,n){for(var s=0,o=i.length;s<o;s++)e(t,i[s],n);return n}function m(t,e,i,n,s){for(var o,r=[],a=0,l=t.length,u=null!=e;a<l;a++)(o=t[a])&&(i&&!i(o,n,s)||(r.push(o),u&&e.push(a)));return r}function v(t,e,i,s,o,r){return s&&!s[$]&&(s=v(s)),o&&!o[$]&&(o=v(o,r)),n(function(n,r,a,l){var u,c,h,d=[],p=[],f=r.length,v=n||g(e||"*",a.nodeType?[a]:a,[]),y=!t||!n&&e?v:m(v,d,t,a,l),b=i?o||(n?t:f||s)?[]:r:y;if(i&&i(y,b,a,l),s)for(u=m(b,p),s(u,[],a,l),c=u.length;c--;)(h=u[c])&&(b[p[c]]=!(y[p[c]]=h));if(n){if(o||t){if(o){for(u=[],c=b.length;c--;)(h=b[c])&&u.push(y[c]=h);o(null,b=[],u,l)}for(c=b.length;c--;)(h=b[c])&&(u=o?tt(n,h):d[c])>-1&&(n[u]=!(r[u]=h))}}else b=m(b===r?b.splice(f,b.length):b),o?o(null,r,b,l):Q.apply(r,b)})}function y(t){for(var e,i,n,s=t.length,o=x.relative[t[0].type],r=o||x.relative[" "],a=o?1:0,l=p(function(t){return t===e},r,!0),u=p(function(t){return tt(e,t)>-1},r,!0),c=[function(t,i,n){var s=!o&&(n||i!==A)||((e=i).nodeType?l(t,i,n):u(t,i,n));return e=null,s}];a<s;a++)if(i=x.relative[t[a].type])c=[p(f(c),i)];else{if(i=x.filter[t[a].type].apply(null,t[a].matches),i[$]){for(n=++a;n<s&&!x.relative[t[n].type];n++);return v(a>1&&f(c),a>1&&d(t.slice(0,a-1).concat({value:" "===t[a-2].type?"*":""})).replace(at,"$1"),i,a<n&&y(t.slice(a,n)),n<s&&y(t=t.slice(n)),n<s&&d(t))}c.push(i)}return f(c)}function b(t,i){var s=i.length>0,o=t.length>0,r=function(n,r,a,l,u){var c,h,d,p=0,f="0",g=n&&[],v=[],y=A,b=n||o&&x.find.TAG("*",u),w=q+=null==y?1:Math.random()||.1,_=b.length;for(u&&(A=r===P||r||u);f!==_&&null!=(c=b[f]);f++){if(o&&c){for(h=0,r||c.ownerDocument===P||(O(c),a=!M);d=t[h++];)if(d(c,r||P,a)){l.push(c);break}u&&(q=w)}s&&((c=!d&&c)&&p--,n&&g.push(c))}if(p+=f,s&&f!==p){for(h=0;d=i[h++];)d(g,v,r,a);if(n){if(p>0)for(;f--;)g[f]||v[f]||(v[f]=J.call(l));v=m(v)}Q.apply(l,v),u&&!n&&v.length>0&&p+i.length>1&&e.uniqueSort(l)}return u&&(q=w,A=y),g};return s?n(r):r}var w,_,x,C,S,k,T,E,A,D,N,O,P,R,M,j,I,H,L,$="sizzle"+1*new Date,F=t.document,q=0,W=0,z=i(),B=i(),U=i(),V=function(t,e){return t===e&&(N=!0),0},G=1<<31,X={}.hasOwnProperty,Y=[],J=Y.pop,K=Y.push,Q=Y.push,Z=Y.slice,tt=function(t,e){for(var i=0,n=t.length;i<n;i++)if(t[i]===e)return i;return-1},et="checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped",it="[\\x20\\t\\r\\n\\f]",nt="(?:\\\\.|[\\w-]|[^\\x00-\\xa0])+",st="\\["+it+"*("+nt+")(?:"+it+"*([*^$|!~]?=)"+it+"*(?:'((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\"|("+nt+"))|)"+it+"*\\]",ot=":("+nt+")(?:\\((('((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\")|((?:\\\\.|[^\\\\()[\\]]|"+st+")*)|.*)\\)|)",rt=new RegExp(it+"+","g"),at=new RegExp("^"+it+"+|((?:^|[^\\\\])(?:\\\\.)*)"+it+"+$","g"),lt=new RegExp("^"+it+"*,"+it+"*"),ut=new RegExp("^"+it+"*([>+~]|"+it+")"+it+"*"),ct=new RegExp("="+it+"*([^\\]'\"]*?)"+it+"*\\]","g"),ht=new RegExp(ot),dt=new RegExp("^"+nt+"$"),pt={ID:new RegExp("^#("+nt+")"),CLASS:new RegExp("^\\.("+nt+")"),TAG:new RegExp("^("+nt+"|[*])"),ATTR:new RegExp("^"+st),PSEUDO:new RegExp("^"+ot),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+it+"*(even|odd|(([+-]|)(\\d*)n|)"+it+"*(?:([+-]|)"+it+"*(\\d+)|))"+it+"*\\)|)","i"),bool:new RegExp("^(?:"+et+")$","i"),needsContext:new RegExp("^"+it+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+it+"*((?:-\\d)?\\d*)"+it+"*\\)|)(?=[^-]|$)","i")},ft=/^(?:input|select|textarea|button)$/i,gt=/^h\d$/i,mt=/^[^{]+\{\s*\[native \w/,vt=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,yt=/[+~]/,bt=/'|\\/g,wt=new RegExp("\\\\([\\da-f]{1,6}"+it+"?|("+it+")|.)","ig"),_t=function(t,e,i){var n="0x"+e-65536;return n!==n||i?e:n<0?String.fromCharCode(n+65536):String.fromCharCode(n>>10|55296,1023&n|56320)},xt=function(){O()};try{Q.apply(Y=Z.call(F.childNodes),F.childNodes),Y[F.childNodes.length].nodeType}catch(t){Q={apply:Y.length?function(t,e){K.apply(t,Z.call(e))}:function(t,e){for(var i=t.length,n=0;t[i++]=e[n++];);t.length=i-1}}}_=e.support={},S=e.isXML=function(t){var e=t&&(t.ownerDocument||t).documentElement;return!!e&&"HTML"!==e.nodeName},O=e.setDocument=function(t){var e,i,n=t?t.ownerDocument||t:F;return n!==P&&9===n.nodeType&&n.documentElement?(P=n,R=P.documentElement,M=!S(P),(i=P.defaultView)&&i.top!==i&&(i.addEventListener?i.addEventListener("unload",xt,!1):i.attachEvent&&i.attachEvent("onunload",xt)),_.attributes=s(function(t){return t.className="i",!t.getAttribute("className")}),_.getElementsByTagName=s(function(t){return t.appendChild(P.createComment("")),!t.getElementsByTagName("*").length}),_.getElementsByClassName=mt.test(P.getElementsByClassName),_.getById=s(function(t){return R.appendChild(t).id=$,!P.getElementsByName||!P.getElementsByName($).length}),_.getById?(x.find.ID=function(t,e){if("undefined"!=typeof e.getElementById&&M){var i=e.getElementById(t);return i?[i]:[]}},x.filter.ID=function(t){var e=t.replace(wt,_t);return function(t){return t.getAttribute("id")===e}}):(delete x.find.ID,x.filter.ID=function(t){var e=t.replace(wt,_t);return function(t){var i="undefined"!=typeof t.getAttributeNode&&t.getAttributeNode("id");return i&&i.value===e}}),x.find.TAG=_.getElementsByTagName?function(t,e){return"undefined"!=typeof e.getElementsByTagName?e.getElementsByTagName(t):_.qsa?e.querySelectorAll(t):void 0}:function(t,e){var i,n=[],s=0,o=e.getElementsByTagName(t);if("*"===t){for(;i=o[s++];)1===i.nodeType&&n.push(i);return n}return o},x.find.CLASS=_.getElementsByClassName&&function(t,e){if("undefined"!=typeof e.getElementsByClassName&&M)return e.getElementsByClassName(t)},I=[],j=[],(_.qsa=mt.test(P.querySelectorAll))&&(s(function(t){R.appendChild(t).innerHTML="<a id='"+$+"'></a><select id='"+$+"-\r\\' msallowcapture=''><option selected=''></option></select>",t.querySelectorAll("[msallowcapture^='']").length&&j.push("[*^$]="+it+"*(?:''|\"\")"),t.querySelectorAll("[selected]").length||j.push("\\["+it+"*(?:value|"+et+")"),t.querySelectorAll("[id~="+$+"-]").length||j.push("~="),t.querySelectorAll(":checked").length||j.push(":checked"),t.querySelectorAll("a#"+$+"+*").length||j.push(".#.+[+~]")}),s(function(t){var e=P.createElement("input");e.setAttribute("type","hidden"),t.appendChild(e).setAttribute("name","D"),t.querySelectorAll("[name=d]").length&&j.push("name"+it+"*[*^$|!~]?="),t.querySelectorAll(":enabled").length||j.push(":enabled",":disabled"),t.querySelectorAll("*,:x"),j.push(",.*:")})),(_.matchesSelector=mt.test(H=R.matches||R.webkitMatchesSelector||R.mozMatchesSelector||R.oMatchesSelector||R.msMatchesSelector))&&s(function(t){_.disconnectedMatch=H.call(t,"div"),H.call(t,"[s!='']:x"),I.push("!=",ot)}),j=j.length&&new RegExp(j.join("|")),I=I.length&&new RegExp(I.join("|")),e=mt.test(R.compareDocumentPosition),L=e||mt.test(R.contains)?function(t,e){var i=9===t.nodeType?t.documentElement:t,n=e&&e.parentNode;return t===n||!(!n||1!==n.nodeType||!(i.contains?i.contains(n):t.compareDocumentPosition&&16&t.compareDocumentPosition(n)))}:function(t,e){if(e)for(;e=e.parentNode;)if(e===t)return!0;return!1},V=e?function(t,e){if(t===e)return N=!0,0;var i=!t.compareDocumentPosition-!e.compareDocumentPosition;return i?i:(i=(t.ownerDocument||t)===(e.ownerDocument||e)?t.compareDocumentPosition(e):1,1&i||!_.sortDetached&&e.compareDocumentPosition(t)===i?t===P||t.ownerDocument===F&&L(F,t)?-1:e===P||e.ownerDocument===F&&L(F,e)?1:D?tt(D,t)-tt(D,e):0:4&i?-1:1)}:function(t,e){if(t===e)return N=!0,0;var i,n=0,s=t.parentNode,o=e.parentNode,a=[t],l=[e];if(!s||!o)return t===P?-1:e===P?1:s?-1:o?1:D?tt(D,t)-tt(D,e):0;if(s===o)return r(t,e);for(i=t;i=i.parentNode;)a.unshift(i);for(i=e;i=i.parentNode;)l.unshift(i);for(;a[n]===l[n];)n++;return n?r(a[n],l[n]):a[n]===F?-1:l[n]===F?1:0},P):P},e.matches=function(t,i){return e(t,null,null,i)},e.matchesSelector=function(t,i){if((t.ownerDocument||t)!==P&&O(t),i=i.replace(ct,"='$1']"),_.matchesSelector&&M&&!U[i+" "]&&(!I||!I.test(i))&&(!j||!j.test(i)))try{var n=H.call(t,i);if(n||_.disconnectedMatch||t.document&&11!==t.document.nodeType)return n}catch(t){}return e(i,P,null,[t]).length>0},e.contains=function(t,e){return(t.ownerDocument||t)!==P&&O(t),L(t,e)},e.attr=function(t,e){(t.ownerDocument||t)!==P&&O(t);var i=x.attrHandle[e.toLowerCase()],n=i&&X.call(x.attrHandle,e.toLowerCase())?i(t,e,!M):void 0;return void 0!==n?n:_.attributes||!M?t.getAttribute(e):(n=t.getAttributeNode(e))&&n.specified?n.value:null},e.error=function(t){throw new Error("Syntax error, unrecognized expression: "+t)},e.uniqueSort=function(t){var e,i=[],n=0,s=0;if(N=!_.detectDuplicates,D=!_.sortStable&&t.slice(0),t.sort(V),N){for(;e=t[s++];)e===t[s]&&(n=i.push(s));for(;n--;)t.splice(i[n],1)}return D=null,t},C=e.getText=function(t){var e,i="",n=0,s=t.nodeType;if(s){if(1===s||9===s||11===s){if("string"==typeof t.textContent)return t.textContent;for(t=t.firstChild;t;t=t.nextSibling)i+=C(t)}else if(3===s||4===s)return t.nodeValue}else for(;e=t[n++];)i+=C(e);return i},x=e.selectors={cacheLength:50,createPseudo:n,match:pt,attrHandle:{},find:{},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(t){return t[1]=t[1].replace(wt,_t),t[3]=(t[3]||t[4]||t[5]||"").replace(wt,_t),"~="===t[2]&&(t[3]=" "+t[3]+" "),t.slice(0,4)},CHILD:function(t){return t[1]=t[1].toLowerCase(),"nth"===t[1].slice(0,3)?(t[3]||e.error(t[0]),t[4]=+(t[4]?t[5]+(t[6]||1):2*("even"===t[3]||"odd"===t[3])),t[5]=+(t[7]+t[8]||"odd"===t[3])):t[3]&&e.error(t[0]),t},PSEUDO:function(t){var e,i=!t[6]&&t[2];return pt.CHILD.test(t[0])?null:(t[3]?t[2]=t[4]||t[5]||"":i&&ht.test(i)&&(e=k(i,!0))&&(e=i.indexOf(")",i.length-e)-i.length)&&(t[0]=t[0].slice(0,e),t[2]=i.slice(0,e)),t.slice(0,3))}},filter:{TAG:function(t){var e=t.replace(wt,_t).toLowerCase();return"*"===t?function(){return!0}:function(t){return t.nodeName&&t.nodeName.toLowerCase()===e}},CLASS:function(t){var e=z[t+" "];return e||(e=new RegExp("(^|"+it+")"+t+"("+it+"|$)"))&&z(t,function(t){return e.test("string"==typeof t.className&&t.className||"undefined"!=typeof t.getAttribute&&t.getAttribute("class")||"")})},ATTR:function(t,i,n){return function(s){var o=e.attr(s,t);return null==o?"!="===i:!i||(o+="","="===i?o===n:"!="===i?o!==n:"^="===i?n&&0===o.indexOf(n):"*="===i?n&&o.indexOf(n)>-1:"$="===i?n&&o.slice(-n.length)===n:"~="===i?(" "+o.replace(rt," ")+" ").indexOf(n)>-1:"|="===i&&(o===n||o.slice(0,n.length+1)===n+"-"))}},CHILD:function(t,e,i,n,s){var o="nth"!==t.slice(0,3),r="last"!==t.slice(-4),a="of-type"===e;return 1===n&&0===s?function(t){return!!t.parentNode}:function(e,i,l){var u,c,h,d,p,f,g=o!==r?"nextSibling":"previousSibling",m=e.parentNode,v=a&&e.nodeName.toLowerCase(),y=!l&&!a,b=!1;if(m){if(o){for(;g;){for(d=e;d=d[g];)if(a?d.nodeName.toLowerCase()===v:1===d.nodeType)return!1;f=g="only"===t&&!f&&"nextSibling"}return!0}if(f=[r?m.firstChild:m.lastChild],r&&y){for(d=m,h=d[$]||(d[$]={}),c=h[d.uniqueID]||(h[d.uniqueID]={}),u=c[t]||[],p=u[0]===q&&u[1],b=p&&u[2],d=p&&m.childNodes[p];d=++p&&d&&d[g]||(b=p=0)||f.pop();)if(1===d.nodeType&&++b&&d===e){c[t]=[q,p,b];break}}else if(y&&(d=e,h=d[$]||(d[$]={}),c=h[d.uniqueID]||(h[d.uniqueID]={}),u=c[t]||[],p=u[0]===q&&u[1],b=p),b===!1)for(;(d=++p&&d&&d[g]||(b=p=0)||f.pop())&&((a?d.nodeName.toLowerCase()!==v:1!==d.nodeType)||!++b||(y&&(h=d[$]||(d[$]={}),c=h[d.uniqueID]||(h[d.uniqueID]={}),c[t]=[q,b]),d!==e)););return b-=s,b===n||b%n===0&&b/n>=0}}},PSEUDO:function(t,i){var s,o=x.pseudos[t]||x.setFilters[t.toLowerCase()]||e.error("unsupported pseudo: "+t);return o[$]?o(i):o.length>1?(s=[t,t,"",i],x.setFilters.hasOwnProperty(t.toLowerCase())?n(function(t,e){for(var n,s=o(t,i),r=s.length;r--;)n=tt(t,s[r]),t[n]=!(e[n]=s[r])}):function(t){return o(t,0,s)}):o}},pseudos:{not:n(function(t){var e=[],i=[],s=T(t.replace(at,"$1"));return s[$]?n(function(t,e,i,n){for(var o,r=s(t,null,n,[]),a=t.length;a--;)(o=r[a])&&(t[a]=!(e[a]=o))}):function(t,n,o){return e[0]=t,s(e,null,o,i),e[0]=null,!i.pop()}}),has:n(function(t){return function(i){return e(t,i).length>0}}),contains:n(function(t){return t=t.replace(wt,_t),function(e){return(e.textContent||e.innerText||C(e)).indexOf(t)>-1}}),lang:n(function(t){return dt.test(t||"")||e.error("unsupported lang: "+t),t=t.replace(wt,_t).toLowerCase(),function(e){var i;do if(i=M?e.lang:e.getAttribute("xml:lang")||e.getAttribute("lang"))return i=i.toLowerCase(),i===t||0===i.indexOf(t+"-");while((e=e.parentNode)&&1===e.nodeType);return!1}}),target:function(e){var i=t.location&&t.location.hash;return i&&i.slice(1)===e.id},root:function(t){return t===R},focus:function(t){return t===P.activeElement&&(!P.hasFocus||P.hasFocus())&&!!(t.type||t.href||~t.tabIndex)},enabled:function(t){return t.disabled===!1},disabled:function(t){return t.disabled===!0},checked:function(t){var e=t.nodeName.toLowerCase();return"input"===e&&!!t.checked||"option"===e&&!!t.selected},selected:function(t){return t.parentNode&&t.parentNode.selectedIndex,t.selected===!0},empty:function(t){for(t=t.firstChild;t;t=t.nextSibling)if(t.nodeType<6)return!1;return!0},parent:function(t){return!x.pseudos.empty(t)},header:function(t){return gt.test(t.nodeName)},input:function(t){return ft.test(t.nodeName)},button:function(t){var e=t.nodeName.toLowerCase();return"input"===e&&"button"===t.type||"button"===e},text:function(t){var e;return"input"===t.nodeName.toLowerCase()&&"text"===t.type&&(null==(e=t.getAttribute("type"))||"text"===e.toLowerCase())},first:u(function(){return[0]}),last:u(function(t,e){return[e-1]}),eq:u(function(t,e,i){return[i<0?i+e:i]}),even:u(function(t,e){for(var i=0;i<e;i+=2)t.push(i);return t}),odd:u(function(t,e){for(var i=1;i<e;i+=2)t.push(i);return t}),lt:u(function(t,e,i){for(var n=i<0?i+e:i;--n>=0;)t.push(n);return t}),gt:u(function(t,e,i){for(var n=i<0?i+e:i;++n<e;)t.push(n);return t})}},x.pseudos.nth=x.pseudos.eq;for(w in{radio:!0,checkbox:!0,file:!0,password:!0,image:!0})x.pseudos[w]=a(w);for(w in{submit:!0,reset:!0})x.pseudos[w]=l(w);return h.prototype=x.filters=x.pseudos,x.setFilters=new h,k=e.tokenize=function(t,i){var n,s,o,r,a,l,u,c=B[t+" "];if(c)return i?0:c.slice(0);for(a=t,l=[],u=x.preFilter;a;){n&&!(s=lt.exec(a))||(s&&(a=a.slice(s[0].length)||a),l.push(o=[])),n=!1,(s=ut.exec(a))&&(n=s.shift(),o.push({value:n,type:s[0].replace(at," ")}),a=a.slice(n.length));for(r in x.filter)!(s=pt[r].exec(a))||u[r]&&!(s=u[r](s))||(n=s.shift(),o.push({value:n,type:r,matches:s}),a=a.slice(n.length));if(!n)break}return i?a.length:a?e.error(t):B(t,l).slice(0)},T=e.compile=function(t,e){var i,n=[],s=[],o=U[t+" "];if(!o){for(e||(e=k(t)),i=e.length;i--;)o=y(e[i]),o[$]?n.push(o):s.push(o);o=U(t,b(s,n)),o.selector=t}return o},E=e.select=function(t,e,i,n){var s,o,r,a,l,u="function"==typeof t&&t,h=!n&&k(t=u.selector||t);if(i=i||[],1===h.length){if(o=h[0]=h[0].slice(0),o.length>2&&"ID"===(r=o[0]).type&&_.getById&&9===e.nodeType&&M&&x.relative[o[1].type]){if(e=(x.find.ID(r.matches[0].replace(wt,_t),e)||[])[0],!e)return i;u&&(e=e.parentNode),t=t.slice(o.shift().value.length)}for(s=pt.needsContext.test(t)?0:o.length;s--&&(r=o[s],!x.relative[a=r.type]);)if((l=x.find[a])&&(n=l(r.matches[0].replace(wt,_t),yt.test(o[0].type)&&c(e.parentNode)||e))){if(o.splice(s,1),t=n.length&&d(o),!t)return Q.apply(i,n),i;break}}return(u||T(t,h))(n,e,!M,i,!e||yt.test(t)&&c(e.parentNode)||e),i},_.sortStable=$.split("").sort(V).join("")===$,_.detectDuplicates=!!N,O(),_.sortDetached=s(function(t){return 1&t.compareDocumentPosition(P.createElement("div"))}),s(function(t){return t.innerHTML="<a href='#'></a>","#"===t.firstChild.getAttribute("href")})||o("type|href|height|width",function(t,e,i){if(!i)return t.getAttribute(e,"type"===e.toLowerCase()?1:2)}),_.attributes&&s(function(t){return t.innerHTML="<input/>",t.firstChild.setAttribute("value",""),""===t.firstChild.getAttribute("value")})||o("value",function(t,e,i){if(!i&&"input"===t.nodeName.toLowerCase())return t.defaultValue}),s(function(t){return null==t.getAttribute("disabled")})||o(et,function(t,e,i){var n;if(!i)return t[e]===!0?e.toLowerCase():(n=t.getAttributeNode(e))&&n.specified?n.value:null}),e}(i);vt.find=xt,vt.expr=xt.selectors,vt.expr[":"]=vt.expr.pseudos,vt.uniqueSort=vt.unique=xt.uniqueSort,vt.text=xt.getText,vt.isXMLDoc=xt.isXML,vt.contains=xt.contains;var Ct=function(t,e,i){for(var n=[],s=void 0!==i;(t=t[e])&&9!==t.nodeType;)if(1===t.nodeType){if(s&&vt(t).is(i))break;n.push(t)}return n},St=function(t,e){for(var i=[];t;t=t.nextSibling)1===t.nodeType&&t!==e&&i.push(t);return i},kt=vt.expr.match.needsContext,Tt=/^<([\w-]+)\s*\/?>(?:<\/\1>|)$/,Et=/^.[^:#\[\.,]*$/;vt.filter=function(t,e,i){var n=e[0];return i&&(t=":not("+t+")"),1===e.length&&1===n.nodeType?vt.find.matchesSelector(n,t)?[n]:[]:vt.find.matches(t,vt.grep(e,function(t){return 1===t.nodeType}))},vt.fn.extend({find:function(t){var e,i=[],n=this,s=n.length;if("string"!=typeof t)return this.pushStack(vt(t).filter(function(){for(e=0;e<s;e++)if(vt.contains(n[e],this))return!0}));for(e=0;e<s;e++)vt.find(t,n[e],i);return i=this.pushStack(s>1?vt.unique(i):i),i.selector=this.selector?this.selector+" "+t:t,i},filter:function(t){return this.pushStack(a(this,t||[],!1))},not:function(t){return this.pushStack(a(this,t||[],!0))},is:function(t){return!!a(this,"string"==typeof t&&kt.test(t)?vt(t):t||[],!1).length}});var At,Dt=/^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]*))$/,Nt=vt.fn.init=function(t,e,i){var n,s;if(!t)return this;if(i=i||At,"string"==typeof t){if(n="<"===t.charAt(0)&&">"===t.charAt(t.length-1)&&t.length>=3?[null,t,null]:Dt.exec(t),!n||!n[1]&&e)return!e||e.jquery?(e||i).find(t):this.constructor(e).find(t);if(n[1]){if(e=e instanceof vt?e[0]:e,vt.merge(this,vt.parseHTML(n[1],e&&e.nodeType?e.ownerDocument||e:at,!0)),Tt.test(n[1])&&vt.isPlainObject(e))for(n in e)vt.isFunction(this[n])?this[n](e[n]):this.attr(n,e[n]);return this}if(s=at.getElementById(n[2]),s&&s.parentNode){if(s.id!==n[2])return At.find(t);this.length=1,this[0]=s}return this.context=at,this.selector=t,this}return t.nodeType?(this.context=this[0]=t,this.length=1,this):vt.isFunction(t)?"undefined"!=typeof i.ready?i.ready(t):t(vt):(void 0!==t.selector&&(this.selector=t.selector,this.context=t.context),vt.makeArray(t,this))};Nt.prototype=vt.fn,At=vt(at);var Ot=/^(?:parents|prev(?:Until|All))/,Pt={children:!0,contents:!0,next:!0,prev:!0};vt.fn.extend({has:function(t){var e,i=vt(t,this),n=i.length;return this.filter(function(){for(e=0;e<n;e++)if(vt.contains(this,i[e]))return!0})},closest:function(t,e){for(var i,n=0,s=this.length,o=[],r=kt.test(t)||"string"!=typeof t?vt(t,e||this.context):0;n<s;n++)for(i=this[n];i&&i!==e;i=i.parentNode)if(i.nodeType<11&&(r?r.index(i)>-1:1===i.nodeType&&vt.find.matchesSelector(i,t))){o.push(i);break}return this.pushStack(o.length>1?vt.uniqueSort(o):o)},index:function(t){return t?"string"==typeof t?vt.inArray(this[0],vt(t)):vt.inArray(t.jquery?t[0]:t,this):this[0]&&this[0].parentNode?this.first().prevAll().length:-1},add:function(t,e){return this.pushStack(vt.uniqueSort(vt.merge(this.get(),vt(t,e))))},addBack:function(t){return this.add(null==t?this.prevObject:this.prevObject.filter(t))}}),vt.each({parent:function(t){var e=t.parentNode;return e&&11!==e.nodeType?e:null},parents:function(t){return Ct(t,"parentNode")},parentsUntil:function(t,e,i){return Ct(t,"parentNode",i)},next:function(t){return l(t,"nextSibling")},prev:function(t){return l(t,"previousSibling")},nextAll:function(t){return Ct(t,"nextSibling")},prevAll:function(t){return Ct(t,"previousSibling")},nextUntil:function(t,e,i){return Ct(t,"nextSibling",i)},prevUntil:function(t,e,i){return Ct(t,"previousSibling",i)},siblings:function(t){return St((t.parentNode||{}).firstChild,t)},children:function(t){return St(t.firstChild)},contents:function(t){return vt.nodeName(t,"iframe")?t.contentDocument||t.contentWindow.document:vt.merge([],t.childNodes)}},function(t,e){vt.fn[t]=function(i,n){var s=vt.map(this,e,i);return"Until"!==t.slice(-5)&&(n=i),n&&"string"==typeof n&&(s=vt.filter(n,s)),this.length>1&&(Pt[t]||(s=vt.uniqueSort(s)),Ot.test(t)&&(s=s.reverse())),this.pushStack(s)}});var Rt=/\S+/g;vt.Callbacks=function(t){t="string"==typeof t?u(t):vt.extend({},t);var e,i,n,s,o=[],r=[],a=-1,l=function(){for(s=t.once,n=e=!0;r.length;a=-1)for(i=r.shift();++a<o.length;)o[a].apply(i[0],i[1])===!1&&t.stopOnFalse&&(a=o.length,i=!1);t.memory||(i=!1),e=!1,s&&(o=i?[]:"")},c={add:function(){return o&&(i&&!e&&(a=o.length-1,r.push(i)),function e(i){vt.each(i,function(i,n){vt.isFunction(n)?t.unique&&c.has(n)||o.push(n):n&&n.length&&"string"!==vt.type(n)&&e(n)})}(arguments),i&&!e&&l()),this},remove:function(){return vt.each(arguments,function(t,e){for(var i;(i=vt.inArray(e,o,i))>-1;)o.splice(i,1),i<=a&&a--}),this},has:function(t){return t?vt.inArray(t,o)>-1:o.length>0},empty:function(){return o&&(o=[]),this},disable:function(){return s=r=[],o=i="",this},disabled:function(){return!o},lock:function(){return s=!0,i||c.disable(),this},locked:function(){return!!s},fireWith:function(t,i){return s||(i=i||[],i=[t,i.slice?i.slice():i],r.push(i),e||l()),this},fire:function(){return c.fireWith(this,arguments),this},fired:function(){return!!n}};return c},vt.extend({Deferred:function(t){var e=[["resolve","done",vt.Callbacks("once memory"),"resolved"],["reject","fail",vt.Callbacks("once memory"),"rejected"],["notify","progress",vt.Callbacks("memory")]],i="pending",n={state:function(){return i},always:function(){return s.done(arguments).fail(arguments),this},then:function(){var t=arguments;return vt.Deferred(function(i){vt.each(e,function(e,o){var r=vt.isFunction(t[e])&&t[e];s[o[1]](function(){var t=r&&r.apply(this,arguments);t&&vt.isFunction(t.promise)?t.promise().progress(i.notify).done(i.resolve).fail(i.reject):i[o[0]+"With"](this===n?i.promise():this,r?[t]:arguments)})}),t=null}).promise()},promise:function(t){return null!=t?vt.extend(t,n):n}},s={};return n.pipe=n.then,vt.each(e,function(t,o){var r=o[2],a=o[3];n[o[1]]=r.add,a&&r.add(function(){i=a},e[1^t][2].disable,e[2][2].lock),s[o[0]]=function(){return s[o[0]+"With"](this===s?n:this,arguments),this},s[o[0]+"With"]=r.fireWith}),n.promise(s),t&&t.call(s,s),s},when:function(t){var e,i,n,s=0,o=lt.call(arguments),r=o.length,a=1!==r||t&&vt.isFunction(t.promise)?r:0,l=1===a?t:vt.Deferred(),u=function(t,i,n){return function(s){i[t]=this,n[t]=arguments.length>1?lt.call(arguments):s,n===e?l.notifyWith(i,n):--a||l.resolveWith(i,n)}};if(r>1)for(e=new Array(r),i=new Array(r),n=new Array(r);s<r;s++)o[s]&&vt.isFunction(o[s].promise)?o[s].promise().progress(u(s,i,e)).done(u(s,n,o)).fail(l.reject):--a;return a||l.resolveWith(n,o),l.promise()}});var Mt;vt.fn.ready=function(t){return vt.ready.promise().done(t),this},vt.extend({isReady:!1,readyWait:1,holdReady:function(t){t?vt.readyWait++:vt.ready(!0)},ready:function(t){(t===!0?--vt.readyWait:vt.isReady)||(vt.isReady=!0,t!==!0&&--vt.readyWait>0||(Mt.resolveWith(at,[vt]),vt.fn.triggerHandler&&(vt(at).triggerHandler("ready"),vt(at).off("ready"))))}}),vt.ready.promise=function(t){if(!Mt)if(Mt=vt.Deferred(),"complete"===at.readyState||"loading"!==at.readyState&&!at.documentElement.doScroll)i.setTimeout(vt.ready);else if(at.addEventListener)at.addEventListener("DOMContentLoaded",h),i.addEventListener("load",h);else{at.attachEvent("onreadystatechange",h),i.attachEvent("onload",h);var e=!1;try{e=null==i.frameElement&&at.documentElement}catch(t){}e&&e.doScroll&&!function t(){if(!vt.isReady){try{e.doScroll("left")}catch(e){return i.setTimeout(t,50)}c(),vt.ready()}}()}return Mt.promise(t)},vt.ready.promise();var jt;for(jt in vt(gt))break;gt.ownFirst="0"===jt,gt.inlineBlockNeedsLayout=!1,vt(function(){var t,e,i,n;i=at.getElementsByTagName("body")[0],i&&i.style&&(e=at.createElement("div"),n=at.createElement("div"),n.style.cssText="position:absolute;border:0;width:0;height:0;top:0;left:-9999px",i.appendChild(n).appendChild(e),"undefined"!=typeof e.style.zoom&&(e.style.cssText="display:inline;margin:0;border:0;padding:1px;width:1px;zoom:1",gt.inlineBlockNeedsLayout=t=3===e.offsetWidth,t&&(i.style.zoom=1)),i.removeChild(n))}),function(){var t=at.createElement("div");gt.deleteExpando=!0;try{delete t.test}catch(t){gt.deleteExpando=!1}t=null}();var It=function(t){var e=vt.noData[(t.nodeName+" ").toLowerCase()],i=+t.nodeType||1;return(1===i||9===i)&&(!e||e!==!0&&t.getAttribute("classid")===e)},Ht=/^(?:\{[\w\W]*\}|\[[\w\W]*\])$/,Lt=/([A-Z])/g;vt.extend({cache:{},noData:{"applet ":!0,"embed ":!0,"object ":"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"},hasData:function(t){return t=t.nodeType?vt.cache[t[vt.expando]]:t[vt.expando],!!t&&!p(t)},data:function(t,e,i){return f(t,e,i)},removeData:function(t,e){return g(t,e)},_data:function(t,e,i){return f(t,e,i,!0)},_removeData:function(t,e){return g(t,e,!0)}}),vt.fn.extend({data:function(t,e){var i,n,s,o=this[0],r=o&&o.attributes;if(void 0===t){if(this.length&&(s=vt.data(o),1===o.nodeType&&!vt._data(o,"parsedAttrs"))){for(i=r.length;i--;)r[i]&&(n=r[i].name,0===n.indexOf("data-")&&(n=vt.camelCase(n.slice(5)),d(o,n,s[n])));vt._data(o,"parsedAttrs",!0)}return s}return"object"==typeof t?this.each(function(){vt.data(this,t)}):arguments.length>1?this.each(function(){vt.data(this,t,e)}):o?d(o,t,vt.data(o,t)):void 0},removeData:function(t){return this.each(function(){vt.removeData(this,t)})}}),vt.extend({queue:function(t,e,i){var n;if(t)return e=(e||"fx")+"queue",n=vt._data(t,e),i&&(!n||vt.isArray(i)?n=vt._data(t,e,vt.makeArray(i)):n.push(i)),n||[]},dequeue:function(t,e){e=e||"fx";var i=vt.queue(t,e),n=i.length,s=i.shift(),o=vt._queueHooks(t,e),r=function(){vt.dequeue(t,e)};"inprogress"===s&&(s=i.shift(),n--),s&&("fx"===e&&i.unshift("inprogress"),delete o.stop,s.call(t,r,o)),!n&&o&&o.empty.fire()},_queueHooks:function(t,e){var i=e+"queueHooks";return vt._data(t,i)||vt._data(t,i,{empty:vt.Callbacks("once memory").add(function(){vt._removeData(t,e+"queue"),vt._removeData(t,i)})})}}),vt.fn.extend({queue:function(t,e){var i=2;return"string"!=typeof t&&(e=t,t="fx",i--),arguments.length<i?vt.queue(this[0],t):void 0===e?this:this.each(function(){var i=vt.queue(this,t,e);vt._queueHooks(this,t),"fx"===t&&"inprogress"!==i[0]&&vt.dequeue(this,t)})},dequeue:function(t){return this.each(function(){vt.dequeue(this,t)})},clearQueue:function(t){return this.queue(t||"fx",[])},promise:function(t,e){var i,n=1,s=vt.Deferred(),o=this,r=this.length,a=function(){--n||s.resolveWith(o,[o])};for("string"!=typeof t&&(e=t,t=void 0),t=t||"fx";r--;)i=vt._data(o[r],t+"queueHooks"),i&&i.empty&&(n++,i.empty.add(a));return a(),s.promise(e)}}),function(){var t;gt.shrinkWrapBlocks=function(){if(null!=t)return t;t=!1;var e,i,n;return i=at.getElementsByTagName("body")[0],i&&i.style?(e=at.createElement("div"),n=at.createElement("div"),n.style.cssText="position:absolute;border:0;width:0;height:0;top:0;left:-9999px",i.appendChild(n).appendChild(e),"undefined"!=typeof e.style.zoom&&(e.style.cssText="-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box;display:block;margin:0;border:0;padding:1px;width:1px;zoom:1",e.appendChild(at.createElement("div")).style.width="5px",t=3!==e.offsetWidth),i.removeChild(n),t):void 0}}();var $t=/[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/.source,Ft=new RegExp("^(?:([+-])=|)("+$t+")([a-z%]*)$","i"),qt=["Top","Right","Bottom","Left"],Wt=function(t,e){return t=e||t,"none"===vt.css(t,"display")||!vt.contains(t.ownerDocument,t)},zt=function(t,e,i,n,s,o,r){var a=0,l=t.length,u=null==i;if("object"===vt.type(i)){s=!0;for(a in i)zt(t,e,a,i[a],!0,o,r)}else if(void 0!==n&&(s=!0,vt.isFunction(n)||(r=!0),u&&(r?(e.call(t,n),e=null):(u=e,e=function(t,e,i){return u.call(vt(t),i)})),e))for(;a<l;a++)e(t[a],i,r?n:n.call(t[a],a,e(t[a],i)));return s?t:u?e.call(t):l?e(t[0],i):o},Bt=/^(?:checkbox|radio)$/i,Ut=/<([\w:-]+)/,Vt=/^$|\/(?:java|ecma)script/i,Gt=/^\s+/,Xt="abbr|article|aside|audio|bdi|canvas|data|datalist|details|dialog|figcaption|figure|footer|header|hgroup|main|mark|meter|nav|output|picture|progress|section|summary|template|time|video";!function(){var t=at.createElement("div"),e=at.createDocumentFragment(),i=at.createElement("input");t.innerHTML=" <link/><table></table><a href='/a'>a</a><input type='checkbox'/>",gt.leadingWhitespace=3===t.firstChild.nodeType,gt.tbody=!t.getElementsByTagName("tbody").length,gt.htmlSerialize=!!t.getElementsByTagName("link").length,gt.html5Clone="<:nav></:nav>"!==at.createElement("nav").cloneNode(!0).outerHTML,i.type="checkbox",i.checked=!0,e.appendChild(i),gt.appendChecked=i.checked,t.innerHTML="<textarea>x</textarea>",gt.noCloneChecked=!!t.cloneNode(!0).lastChild.defaultValue,e.appendChild(t),i=at.createElement("input"),i.setAttribute("type","radio"),i.setAttribute("checked","checked"),i.setAttribute("name","t"),t.appendChild(i),gt.checkClone=t.cloneNode(!0).cloneNode(!0).lastChild.checked,gt.noCloneEvent=!!t.addEventListener,t[vt.expando]=1,gt.attributes=!t.getAttribute(vt.expando)}();var Yt={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:gt.htmlSerialize?[0,"",""]:[1,"X<div>","</div>"]};Yt.optgroup=Yt.option,Yt.tbody=Yt.tfoot=Yt.colgroup=Yt.caption=Yt.thead,Yt.th=Yt.td;var Jt=/<|&#?\w+;/,Kt=/<tbody/i;!function(){var t,e,n=at.createElement("div");for(t in{submit:!0,change:!0,focusin:!0})e="on"+t,(gt[t]=e in i)||(n.setAttribute(e,"t"),gt[t]=n.attributes[e].expando===!1);n=null}();var Qt=/^(?:input|select|textarea)$/i,Zt=/^key/,te=/^(?:mouse|pointer|contextmenu|drag|drop)|click/,ee=/^(?:focusinfocus|focusoutblur)$/,ie=/^([^.]*)(?:\.(.+)|)/;
|
||
vt.event={global:{},add:function(t,e,i,n,s){var o,r,a,l,u,c,h,d,p,f,g,m=vt._data(t);if(m){for(i.handler&&(l=i,i=l.handler,s=l.selector),i.guid||(i.guid=vt.guid++),(r=m.events)||(r=m.events={}),(c=m.handle)||(c=m.handle=function(t){return"undefined"==typeof vt||t&&vt.event.triggered===t.type?void 0:vt.event.dispatch.apply(c.elem,arguments)},c.elem=t),e=(e||"").match(Rt)||[""],a=e.length;a--;)o=ie.exec(e[a])||[],p=g=o[1],f=(o[2]||"").split(".").sort(),p&&(u=vt.event.special[p]||{},p=(s?u.delegateType:u.bindType)||p,u=vt.event.special[p]||{},h=vt.extend({type:p,origType:g,data:n,handler:i,guid:i.guid,selector:s,needsContext:s&&vt.expr.match.needsContext.test(s),namespace:f.join(".")},l),(d=r[p])||(d=r[p]=[],d.delegateCount=0,u.setup&&u.setup.call(t,n,f,c)!==!1||(t.addEventListener?t.addEventListener(p,c,!1):t.attachEvent&&t.attachEvent("on"+p,c))),u.add&&(u.add.call(t,h),h.handler.guid||(h.handler.guid=i.guid)),s?d.splice(d.delegateCount++,0,h):d.push(h),vt.event.global[p]=!0);t=null}},remove:function(t,e,i,n,s){var o,r,a,l,u,c,h,d,p,f,g,m=vt.hasData(t)&&vt._data(t);if(m&&(c=m.events)){for(e=(e||"").match(Rt)||[""],u=e.length;u--;)if(a=ie.exec(e[u])||[],p=g=a[1],f=(a[2]||"").split(".").sort(),p){for(h=vt.event.special[p]||{},p=(n?h.delegateType:h.bindType)||p,d=c[p]||[],a=a[2]&&new RegExp("(^|\\.)"+f.join("\\.(?:.*\\.|)")+"(\\.|$)"),l=o=d.length;o--;)r=d[o],!s&&g!==r.origType||i&&i.guid!==r.guid||a&&!a.test(r.namespace)||n&&n!==r.selector&&("**"!==n||!r.selector)||(d.splice(o,1),r.selector&&d.delegateCount--,h.remove&&h.remove.call(t,r));l&&!d.length&&(h.teardown&&h.teardown.call(t,f,m.handle)!==!1||vt.removeEvent(t,p,m.handle),delete c[p])}else for(p in c)vt.event.remove(t,p+e[u],i,n,!0);vt.isEmptyObject(c)&&(delete m.handle,vt._removeData(t,"events"))}},trigger:function(t,e,n,s){var o,r,a,l,u,c,h,d=[n||at],p=ft.call(t,"type")?t.type:t,f=ft.call(t,"namespace")?t.namespace.split("."):[];if(a=c=n=n||at,3!==n.nodeType&&8!==n.nodeType&&!ee.test(p+vt.event.triggered)&&(p.indexOf(".")>-1&&(f=p.split("."),p=f.shift(),f.sort()),r=p.indexOf(":")<0&&"on"+p,t=t[vt.expando]?t:new vt.Event(p,"object"==typeof t&&t),t.isTrigger=s?2:3,t.namespace=f.join("."),t.rnamespace=t.namespace?new RegExp("(^|\\.)"+f.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,t.result=void 0,t.target||(t.target=n),e=null==e?[t]:vt.makeArray(e,[t]),u=vt.event.special[p]||{},s||!u.trigger||u.trigger.apply(n,e)!==!1)){if(!s&&!u.noBubble&&!vt.isWindow(n)){for(l=u.delegateType||p,ee.test(l+p)||(a=a.parentNode);a;a=a.parentNode)d.push(a),c=a;c===(n.ownerDocument||at)&&d.push(c.defaultView||c.parentWindow||i)}for(h=0;(a=d[h++])&&!t.isPropagationStopped();)t.type=h>1?l:u.bindType||p,o=(vt._data(a,"events")||{})[t.type]&&vt._data(a,"handle"),o&&o.apply(a,e),o=r&&a[r],o&&o.apply&&It(a)&&(t.result=o.apply(a,e),t.result===!1&&t.preventDefault());if(t.type=p,!s&&!t.isDefaultPrevented()&&(!u._default||u._default.apply(d.pop(),e)===!1)&&It(n)&&r&&n[p]&&!vt.isWindow(n)){c=n[r],c&&(n[r]=null),vt.event.triggered=p;try{n[p]()}catch(t){}vt.event.triggered=void 0,c&&(n[r]=c)}return t.result}},dispatch:function(t){t=vt.event.fix(t);var e,i,n,s,o,r=[],a=lt.call(arguments),l=(vt._data(this,"events")||{})[t.type]||[],u=vt.event.special[t.type]||{};if(a[0]=t,t.delegateTarget=this,!u.preDispatch||u.preDispatch.call(this,t)!==!1){for(r=vt.event.handlers.call(this,t,l),e=0;(s=r[e++])&&!t.isPropagationStopped();)for(t.currentTarget=s.elem,i=0;(o=s.handlers[i++])&&!t.isImmediatePropagationStopped();)t.rnamespace&&!t.rnamespace.test(o.namespace)||(t.handleObj=o,t.data=o.data,n=((vt.event.special[o.origType]||{}).handle||o.handler).apply(s.elem,a),void 0!==n&&(t.result=n)===!1&&(t.preventDefault(),t.stopPropagation()));return u.postDispatch&&u.postDispatch.call(this,t),t.result}},handlers:function(t,e){var i,n,s,o,r=[],a=e.delegateCount,l=t.target;if(a&&l.nodeType&&("click"!==t.type||isNaN(t.button)||t.button<1))for(;l!=this;l=l.parentNode||this)if(1===l.nodeType&&(l.disabled!==!0||"click"!==t.type)){for(n=[],i=0;i<a;i++)o=e[i],s=o.selector+" ",void 0===n[s]&&(n[s]=o.needsContext?vt(s,this).index(l)>-1:vt.find(s,this,null,[l]).length),n[s]&&n.push(o);n.length&&r.push({elem:l,handlers:n})}return a<e.length&&r.push({elem:this,handlers:e.slice(a)}),r},fix:function(t){if(t[vt.expando])return t;var e,i,n,s=t.type,o=t,r=this.fixHooks[s];for(r||(this.fixHooks[s]=r=te.test(s)?this.mouseHooks:Zt.test(s)?this.keyHooks:{}),n=r.props?this.props.concat(r.props):this.props,t=new vt.Event(o),e=n.length;e--;)i=n[e],t[i]=o[i];return t.target||(t.target=o.srcElement||at),3===t.target.nodeType&&(t.target=t.target.parentNode),t.metaKey=!!t.metaKey,r.filter?r.filter(t,o):t},props:"altKey bubbles cancelable ctrlKey currentTarget detail eventPhase metaKey relatedTarget shiftKey target timeStamp view which".split(" "),fixHooks:{},keyHooks:{props:"char charCode key keyCode".split(" "),filter:function(t,e){return null==t.which&&(t.which=null!=e.charCode?e.charCode:e.keyCode),t}},mouseHooks:{props:"button buttons clientX clientY fromElement offsetX offsetY pageX pageY screenX screenY toElement".split(" "),filter:function(t,e){var i,n,s,o=e.button,r=e.fromElement;return null==t.pageX&&null!=e.clientX&&(n=t.target.ownerDocument||at,s=n.documentElement,i=n.body,t.pageX=e.clientX+(s&&s.scrollLeft||i&&i.scrollLeft||0)-(s&&s.clientLeft||i&&i.clientLeft||0),t.pageY=e.clientY+(s&&s.scrollTop||i&&i.scrollTop||0)-(s&&s.clientTop||i&&i.clientTop||0)),!t.relatedTarget&&r&&(t.relatedTarget=r===t.target?e.toElement:r),t.which||void 0===o||(t.which=1&o?1:2&o?3:4&o?2:0),t}},special:{load:{noBubble:!0},focus:{trigger:function(){if(this!==S()&&this.focus)try{return this.focus(),!1}catch(t){}},delegateType:"focusin"},blur:{trigger:function(){if(this===S()&&this.blur)return this.blur(),!1},delegateType:"focusout"},click:{trigger:function(){if(vt.nodeName(this,"input")&&"checkbox"===this.type&&this.click)return this.click(),!1},_default:function(t){return vt.nodeName(t.target,"a")}},beforeunload:{postDispatch:function(t){void 0!==t.result&&t.originalEvent&&(t.originalEvent.returnValue=t.result)}}},simulate:function(t,e,i){var n=vt.extend(new vt.Event,i,{type:t,isSimulated:!0});vt.event.trigger(n,null,e),n.isDefaultPrevented()&&i.preventDefault()}},vt.removeEvent=at.removeEventListener?function(t,e,i){t.removeEventListener&&t.removeEventListener(e,i)}:function(t,e,i){var n="on"+e;t.detachEvent&&("undefined"==typeof t[n]&&(t[n]=null),t.detachEvent(n,i))},vt.Event=function(t,e){return this instanceof vt.Event?(t&&t.type?(this.originalEvent=t,this.type=t.type,this.isDefaultPrevented=t.defaultPrevented||void 0===t.defaultPrevented&&t.returnValue===!1?x:C):this.type=t,e&&vt.extend(this,e),this.timeStamp=t&&t.timeStamp||vt.now(),void(this[vt.expando]=!0)):new vt.Event(t,e)},vt.Event.prototype={constructor:vt.Event,isDefaultPrevented:C,isPropagationStopped:C,isImmediatePropagationStopped:C,preventDefault:function(){var t=this.originalEvent;this.isDefaultPrevented=x,t&&(t.preventDefault?t.preventDefault():t.returnValue=!1)},stopPropagation:function(){var t=this.originalEvent;this.isPropagationStopped=x,t&&!this.isSimulated&&(t.stopPropagation&&t.stopPropagation(),t.cancelBubble=!0)},stopImmediatePropagation:function(){var t=this.originalEvent;this.isImmediatePropagationStopped=x,t&&t.stopImmediatePropagation&&t.stopImmediatePropagation(),this.stopPropagation()}},vt.each({mouseenter:"mouseover",mouseleave:"mouseout",pointerenter:"pointerover",pointerleave:"pointerout"},function(t,e){vt.event.special[t]={delegateType:e,bindType:e,handle:function(t){var i,n=this,s=t.relatedTarget,o=t.handleObj;return s&&(s===n||vt.contains(n,s))||(t.type=o.origType,i=o.handler.apply(this,arguments),t.type=e),i}}}),gt.submit||(vt.event.special.submit={setup:function(){return!vt.nodeName(this,"form")&&void vt.event.add(this,"click._submit keypress._submit",function(t){var e=t.target,i=vt.nodeName(e,"input")||vt.nodeName(e,"button")?vt.prop(e,"form"):void 0;i&&!vt._data(i,"submit")&&(vt.event.add(i,"submit._submit",function(t){t._submitBubble=!0}),vt._data(i,"submit",!0))})},postDispatch:function(t){t._submitBubble&&(delete t._submitBubble,this.parentNode&&!t.isTrigger&&vt.event.simulate("submit",this.parentNode,t))},teardown:function(){return!vt.nodeName(this,"form")&&void vt.event.remove(this,"._submit")}}),gt.change||(vt.event.special.change={setup:function(){return Qt.test(this.nodeName)?("checkbox"!==this.type&&"radio"!==this.type||(vt.event.add(this,"propertychange._change",function(t){"checked"===t.originalEvent.propertyName&&(this._justChanged=!0)}),vt.event.add(this,"click._change",function(t){this._justChanged&&!t.isTrigger&&(this._justChanged=!1),vt.event.simulate("change",this,t)})),!1):void vt.event.add(this,"beforeactivate._change",function(t){var e=t.target;Qt.test(e.nodeName)&&!vt._data(e,"change")&&(vt.event.add(e,"change._change",function(t){!this.parentNode||t.isSimulated||t.isTrigger||vt.event.simulate("change",this.parentNode,t)}),vt._data(e,"change",!0))})},handle:function(t){var e=t.target;if(this!==e||t.isSimulated||t.isTrigger||"radio"!==e.type&&"checkbox"!==e.type)return t.handleObj.handler.apply(this,arguments)},teardown:function(){return vt.event.remove(this,"._change"),!Qt.test(this.nodeName)}}),gt.focusin||vt.each({focus:"focusin",blur:"focusout"},function(t,e){var i=function(t){vt.event.simulate(e,t.target,vt.event.fix(t))};vt.event.special[e]={setup:function(){var n=this.ownerDocument||this,s=vt._data(n,e);s||n.addEventListener(t,i,!0),vt._data(n,e,(s||0)+1)},teardown:function(){var n=this.ownerDocument||this,s=vt._data(n,e)-1;s?vt._data(n,e,s):(n.removeEventListener(t,i,!0),vt._removeData(n,e))}}}),vt.fn.extend({on:function(t,e,i,n){return k(this,t,e,i,n)},one:function(t,e,i,n){return k(this,t,e,i,n,1)},off:function(t,e,i){var n,s;if(t&&t.preventDefault&&t.handleObj)return n=t.handleObj,vt(t.delegateTarget).off(n.namespace?n.origType+"."+n.namespace:n.origType,n.selector,n.handler),this;if("object"==typeof t){for(s in t)this.off(s,e,t[s]);return this}return e!==!1&&"function"!=typeof e||(i=e,e=void 0),i===!1&&(i=C),this.each(function(){vt.event.remove(this,t,i,e)})},trigger:function(t,e){return this.each(function(){vt.event.trigger(t,e,this)})},triggerHandler:function(t,e){var i=this[0];if(i)return vt.event.trigger(t,e,i,!0)}});var ne=/ jQuery\d+="(?:null|\d+)"/g,se=new RegExp("<(?:"+Xt+")[\\s/>]","i"),oe=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:-]+)[^>]*)\/>/gi,re=/<script|<style|<link/i,ae=/checked\s*(?:[^=]|=\s*.checked.)/i,le=/^true\/(.*)/,ue=/^\s*<!(?:\[CDATA\[|--)|(?:\]\]|--)>\s*$/g,ce=v(at),he=ce.appendChild(at.createElement("div"));vt.extend({htmlPrefilter:function(t){return t.replace(oe,"<$1></$2>")},clone:function(t,e,i){var n,s,o,r,a,l=vt.contains(t.ownerDocument,t);if(gt.html5Clone||vt.isXMLDoc(t)||!se.test("<"+t.nodeName+">")?o=t.cloneNode(!0):(he.innerHTML=t.outerHTML,he.removeChild(o=he.firstChild)),!(gt.noCloneEvent&>.noCloneChecked||1!==t.nodeType&&11!==t.nodeType||vt.isXMLDoc(t)))for(n=y(o),a=y(t),r=0;null!=(s=a[r]);++r)n[r]&&N(s,n[r]);if(e)if(i)for(a=a||y(t),n=n||y(o),r=0;null!=(s=a[r]);r++)D(s,n[r]);else D(t,o);return n=y(o,"script"),n.length>0&&b(n,!l&&y(t,"script")),n=a=s=null,o},cleanData:function(t,e){for(var i,n,s,o,r=0,a=vt.expando,l=vt.cache,u=gt.attributes,c=vt.event.special;null!=(i=t[r]);r++)if((e||It(i))&&(s=i[a],o=s&&l[s])){if(o.events)for(n in o.events)c[n]?vt.event.remove(i,n):vt.removeEvent(i,n,o.handle);l[s]&&(delete l[s],u||"undefined"==typeof i.removeAttribute?i[a]=void 0:i.removeAttribute(a),rt.push(s))}}}),vt.fn.extend({domManip:O,detach:function(t){return P(this,t,!0)},remove:function(t){return P(this,t)},text:function(t){return zt(this,function(t){return void 0===t?vt.text(this):this.empty().append((this[0]&&this[0].ownerDocument||at).createTextNode(t))},null,t,arguments.length)},append:function(){return O(this,arguments,function(t){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var e=T(this,t);e.appendChild(t)}})},prepend:function(){return O(this,arguments,function(t){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var e=T(this,t);e.insertBefore(t,e.firstChild)}})},before:function(){return O(this,arguments,function(t){this.parentNode&&this.parentNode.insertBefore(t,this)})},after:function(){return O(this,arguments,function(t){this.parentNode&&this.parentNode.insertBefore(t,this.nextSibling)})},empty:function(){for(var t,e=0;null!=(t=this[e]);e++){for(1===t.nodeType&&vt.cleanData(y(t,!1));t.firstChild;)t.removeChild(t.firstChild);t.options&&vt.nodeName(t,"select")&&(t.options.length=0)}return this},clone:function(t,e){return t=null!=t&&t,e=null==e?t:e,this.map(function(){return vt.clone(this,t,e)})},html:function(t){return zt(this,function(t){var e=this[0]||{},i=0,n=this.length;if(void 0===t)return 1===e.nodeType?e.innerHTML.replace(ne,""):void 0;if("string"==typeof t&&!re.test(t)&&(gt.htmlSerialize||!se.test(t))&&(gt.leadingWhitespace||!Gt.test(t))&&!Yt[(Ut.exec(t)||["",""])[1].toLowerCase()]){t=vt.htmlPrefilter(t);try{for(;i<n;i++)e=this[i]||{},1===e.nodeType&&(vt.cleanData(y(e,!1)),e.innerHTML=t);e=0}catch(t){}}e&&this.empty().append(t)},null,t,arguments.length)},replaceWith:function(){var t=[];return O(this,arguments,function(e){var i=this.parentNode;vt.inArray(this,t)<0&&(vt.cleanData(y(this)),i&&i.replaceChild(e,this))},t)}}),vt.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(t,e){vt.fn[t]=function(t){for(var i,n=0,s=[],o=vt(t),r=o.length-1;n<=r;n++)i=n===r?this:this.clone(!0),vt(o[n])[e](i),ct.apply(s,i.get());return this.pushStack(s)}});var de,pe={HTML:"block",BODY:"block"},fe=/^margin/,ge=new RegExp("^("+$t+")(?!px)[a-z%]+$","i"),me=function(t,e,i,n){var s,o,r={};for(o in e)r[o]=t.style[o],t.style[o]=e[o];s=i.apply(t,n||[]);for(o in e)t.style[o]=r[o];return s},ve=at.documentElement;!function(){function t(){var t,c,h=at.documentElement;h.appendChild(l),u.style.cssText="-webkit-box-sizing:border-box;box-sizing:border-box;position:relative;display:block;margin:auto;border:1px;padding:1px;top:1%;width:50%",e=s=a=!1,n=r=!0,i.getComputedStyle&&(c=i.getComputedStyle(u),e="1%"!==(c||{}).top,a="2px"===(c||{}).marginLeft,s="4px"===(c||{width:"4px"}).width,u.style.marginRight="50%",n="4px"===(c||{marginRight:"4px"}).marginRight,t=u.appendChild(at.createElement("div")),t.style.cssText=u.style.cssText="-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box;display:block;margin:0;border:0;padding:0",t.style.marginRight=t.style.width="0",u.style.width="1px",r=!parseFloat((i.getComputedStyle(t)||{}).marginRight),u.removeChild(t)),u.style.display="none",o=0===u.getClientRects().length,o&&(u.style.display="",u.innerHTML="<table><tr><td></td><td>t</td></tr></table>",u.childNodes[0].style.borderCollapse="separate",t=u.getElementsByTagName("td"),t[0].style.cssText="margin:0;border:0;padding:0;display:none",o=0===t[0].offsetHeight,o&&(t[0].style.display="",t[1].style.display="none",o=0===t[0].offsetHeight)),h.removeChild(l)}var e,n,s,o,r,a,l=at.createElement("div"),u=at.createElement("div");u.style&&(u.style.cssText="float:left;opacity:.5",gt.opacity="0.5"===u.style.opacity,gt.cssFloat=!!u.style.cssFloat,u.style.backgroundClip="content-box",u.cloneNode(!0).style.backgroundClip="",gt.clearCloneStyle="content-box"===u.style.backgroundClip,l=at.createElement("div"),l.style.cssText="border:0;width:8px;height:0;top:0;left:-9999px;padding:0;margin-top:1px;position:absolute",u.innerHTML="",l.appendChild(u),gt.boxSizing=""===u.style.boxSizing||""===u.style.MozBoxSizing||""===u.style.WebkitBoxSizing,vt.extend(gt,{reliableHiddenOffsets:function(){return null==e&&t(),o},boxSizingReliable:function(){return null==e&&t(),s},pixelMarginRight:function(){return null==e&&t(),n},pixelPosition:function(){return null==e&&t(),e},reliableMarginRight:function(){return null==e&&t(),r},reliableMarginLeft:function(){return null==e&&t(),a}}))}();var ye,be,we=/^(top|right|bottom|left)$/;i.getComputedStyle?(ye=function(t){var e=t.ownerDocument.defaultView;return e&&e.opener||(e=i),e.getComputedStyle(t)},be=function(t,e,i){var n,s,o,r,a=t.style;return i=i||ye(t),r=i?i.getPropertyValue(e)||i[e]:void 0,""!==r&&void 0!==r||vt.contains(t.ownerDocument,t)||(r=vt.style(t,e)),i&&!gt.pixelMarginRight()&&ge.test(r)&&fe.test(e)&&(n=a.width,s=a.minWidth,o=a.maxWidth,a.minWidth=a.maxWidth=a.width=r,r=i.width,a.width=n,a.minWidth=s,a.maxWidth=o),void 0===r?r:r+""}):ve.currentStyle&&(ye=function(t){return t.currentStyle},be=function(t,e,i){var n,s,o,r,a=t.style;return i=i||ye(t),r=i?i[e]:void 0,null==r&&a&&a[e]&&(r=a[e]),ge.test(r)&&!we.test(e)&&(n=a.left,s=t.runtimeStyle,o=s&&s.left,o&&(s.left=t.currentStyle.left),a.left="fontSize"===e?"1em":r,r=a.pixelLeft+"px",a.left=n,o&&(s.left=o)),void 0===r?r:r+""||"auto"});var _e=/alpha\([^)]*\)/i,xe=/opacity\s*=\s*([^)]*)/i,Ce=/^(none|table(?!-c[ea]).+)/,Se=new RegExp("^("+$t+")(.*)$","i"),ke={position:"absolute",visibility:"hidden",display:"block"},Te={letterSpacing:"0",fontWeight:"400"},Ee=["Webkit","O","Moz","ms"],Ae=at.createElement("div").style;vt.extend({cssHooks:{opacity:{get:function(t,e){if(e){var i=be(t,"opacity");return""===i?"1":i}}}},cssNumber:{animationIterationCount:!0,columnCount:!0,fillOpacity:!0,flexGrow:!0,flexShrink:!0,fontWeight:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,widows:!0,zIndex:!0,zoom:!0},cssProps:{float:gt.cssFloat?"cssFloat":"styleFloat"},style:function(t,e,i,n){if(t&&3!==t.nodeType&&8!==t.nodeType&&t.style){var s,o,r,a=vt.camelCase(e),l=t.style;if(e=vt.cssProps[a]||(vt.cssProps[a]=I(a)||a),r=vt.cssHooks[e]||vt.cssHooks[a],void 0===i)return r&&"get"in r&&void 0!==(s=r.get(t,!1,n))?s:l[e];if(o=typeof i,"string"===o&&(s=Ft.exec(i))&&s[1]&&(i=m(t,e,s),o="number"),null!=i&&i===i&&("number"===o&&(i+=s&&s[3]||(vt.cssNumber[a]?"":"px")),gt.clearCloneStyle||""!==i||0!==e.indexOf("background")||(l[e]="inherit"),!(r&&"set"in r&&void 0===(i=r.set(t,i,n)))))try{l[e]=i}catch(t){}}},css:function(t,e,i,n){var s,o,r,a=vt.camelCase(e);return e=vt.cssProps[a]||(vt.cssProps[a]=I(a)||a),r=vt.cssHooks[e]||vt.cssHooks[a],r&&"get"in r&&(o=r.get(t,!0,i)),void 0===o&&(o=be(t,e,n)),"normal"===o&&e in Te&&(o=Te[e]),""===i||i?(s=parseFloat(o),i===!0||isFinite(s)?s||0:o):o}}),vt.each(["height","width"],function(t,e){vt.cssHooks[e]={get:function(t,i,n){if(i)return Ce.test(vt.css(t,"display"))&&0===t.offsetWidth?me(t,ke,function(){return F(t,e,n)}):F(t,e,n)},set:function(t,i,n){var s=n&&ye(t);return L(t,i,n?$(t,e,n,gt.boxSizing&&"border-box"===vt.css(t,"boxSizing",!1,s),s):0)}}}),gt.opacity||(vt.cssHooks.opacity={get:function(t,e){return xe.test((e&&t.currentStyle?t.currentStyle.filter:t.style.filter)||"")?.01*parseFloat(RegExp.$1)+"":e?"1":""},set:function(t,e){var i=t.style,n=t.currentStyle,s=vt.isNumeric(e)?"alpha(opacity="+100*e+")":"",o=n&&n.filter||i.filter||"";i.zoom=1,(e>=1||""===e)&&""===vt.trim(o.replace(_e,""))&&i.removeAttribute&&(i.removeAttribute("filter"),""===e||n&&!n.filter)||(i.filter=_e.test(o)?o.replace(_e,s):o+" "+s)}}),vt.cssHooks.marginRight=j(gt.reliableMarginRight,function(t,e){if(e)return me(t,{display:"inline-block"},be,[t,"marginRight"])}),vt.cssHooks.marginLeft=j(gt.reliableMarginLeft,function(t,e){if(e)return(parseFloat(be(t,"marginLeft"))||(vt.contains(t.ownerDocument,t)?t.getBoundingClientRect().left-me(t,{marginLeft:0},function(){return t.getBoundingClientRect().left}):0))+"px"}),vt.each({margin:"",padding:"",border:"Width"},function(t,e){vt.cssHooks[t+e]={expand:function(i){for(var n=0,s={},o="string"==typeof i?i.split(" "):[i];n<4;n++)s[t+qt[n]+e]=o[n]||o[n-2]||o[0];return s}},fe.test(t)||(vt.cssHooks[t+e].set=L)}),vt.fn.extend({css:function(t,e){return zt(this,function(t,e,i){var n,s,o={},r=0;if(vt.isArray(e)){for(n=ye(t),s=e.length;r<s;r++)o[e[r]]=vt.css(t,e[r],!1,n);return o}return void 0!==i?vt.style(t,e,i):vt.css(t,e)},t,e,arguments.length>1)},show:function(){return H(this,!0)},hide:function(){return H(this)},toggle:function(t){return"boolean"==typeof t?t?this.show():this.hide():this.each(function(){Wt(this)?vt(this).show():vt(this).hide()})}}),vt.Tween=q,q.prototype={constructor:q,init:function(t,e,i,n,s,o){this.elem=t,this.prop=i,this.easing=s||vt.easing._default,this.options=e,this.start=this.now=this.cur(),this.end=n,this.unit=o||(vt.cssNumber[i]?"":"px")},cur:function(){var t=q.propHooks[this.prop];return t&&t.get?t.get(this):q.propHooks._default.get(this)},run:function(t){var e,i=q.propHooks[this.prop];return this.options.duration?this.pos=e=vt.easing[this.easing](t,this.options.duration*t,0,1,this.options.duration):this.pos=e=t,this.now=(this.end-this.start)*e+this.start,this.options.step&&this.options.step.call(this.elem,this.now,this),i&&i.set?i.set(this):q.propHooks._default.set(this),this}},q.prototype.init.prototype=q.prototype,q.propHooks={_default:{get:function(t){var e;return 1!==t.elem.nodeType||null!=t.elem[t.prop]&&null==t.elem.style[t.prop]?t.elem[t.prop]:(e=vt.css(t.elem,t.prop,""),e&&"auto"!==e?e:0)},set:function(t){vt.fx.step[t.prop]?vt.fx.step[t.prop](t):1!==t.elem.nodeType||null==t.elem.style[vt.cssProps[t.prop]]&&!vt.cssHooks[t.prop]?t.elem[t.prop]=t.now:vt.style(t.elem,t.prop,t.now+t.unit)}}},q.propHooks.scrollTop=q.propHooks.scrollLeft={set:function(t){t.elem.nodeType&&t.elem.parentNode&&(t.elem[t.prop]=t.now)}},vt.easing={linear:function(t){return t},swing:function(t){return.5-Math.cos(t*Math.PI)/2},_default:"swing"},vt.fx=q.prototype.init,vt.fx.step={};var De,Ne,Oe=/^(?:toggle|show|hide)$/,Pe=/queueHooks$/;vt.Animation=vt.extend(G,{tweeners:{"*":[function(t,e){var i=this.createTween(t,e);return m(i.elem,t,Ft.exec(e),i),i}]},tweener:function(t,e){vt.isFunction(t)?(e=t,t=["*"]):t=t.match(Rt);for(var i,n=0,s=t.length;n<s;n++)i=t[n],G.tweeners[i]=G.tweeners[i]||[],G.tweeners[i].unshift(e)},prefilters:[U],prefilter:function(t,e){e?G.prefilters.unshift(t):G.prefilters.push(t)}}),vt.speed=function(t,e,i){var n=t&&"object"==typeof t?vt.extend({},t):{complete:i||!i&&e||vt.isFunction(t)&&t,duration:t,easing:i&&e||e&&!vt.isFunction(e)&&e};return n.duration=vt.fx.off?0:"number"==typeof n.duration?n.duration:n.duration in vt.fx.speeds?vt.fx.speeds[n.duration]:vt.fx.speeds._default,null!=n.queue&&n.queue!==!0||(n.queue="fx"),n.old=n.complete,n.complete=function(){vt.isFunction(n.old)&&n.old.call(this),n.queue&&vt.dequeue(this,n.queue)},n},vt.fn.extend({fadeTo:function(t,e,i,n){return this.filter(Wt).css("opacity",0).show().end().animate({opacity:e},t,i,n)},animate:function(t,e,i,n){var s=vt.isEmptyObject(t),o=vt.speed(e,i,n),r=function(){var e=G(this,vt.extend({},t),o);(s||vt._data(this,"finish"))&&e.stop(!0)};return r.finish=r,s||o.queue===!1?this.each(r):this.queue(o.queue,r)},stop:function(t,e,i){var n=function(t){var e=t.stop;delete t.stop,e(i)};return"string"!=typeof t&&(i=e,e=t,t=void 0),e&&t!==!1&&this.queue(t||"fx",[]),this.each(function(){var e=!0,s=null!=t&&t+"queueHooks",o=vt.timers,r=vt._data(this);if(s)r[s]&&r[s].stop&&n(r[s]);else for(s in r)r[s]&&r[s].stop&&Pe.test(s)&&n(r[s]);for(s=o.length;s--;)o[s].elem!==this||null!=t&&o[s].queue!==t||(o[s].anim.stop(i),e=!1,o.splice(s,1));!e&&i||vt.dequeue(this,t)})},finish:function(t){return t!==!1&&(t=t||"fx"),this.each(function(){var e,i=vt._data(this),n=i[t+"queue"],s=i[t+"queueHooks"],o=vt.timers,r=n?n.length:0;for(i.finish=!0,vt.queue(this,t,[]),s&&s.stop&&s.stop.call(this,!0),e=o.length;e--;)o[e].elem===this&&o[e].queue===t&&(o[e].anim.stop(!0),o.splice(e,1));for(e=0;e<r;e++)n[e]&&n[e].finish&&n[e].finish.call(this);delete i.finish})}}),vt.each(["toggle","show","hide"],function(t,e){var i=vt.fn[e];vt.fn[e]=function(t,n,s){return null==t||"boolean"==typeof t?i.apply(this,arguments):this.animate(z(e,!0),t,n,s)}}),vt.each({slideDown:z("show"),slideUp:z("hide"),slideToggle:z("toggle"),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"},fadeToggle:{opacity:"toggle"}},function(t,e){vt.fn[t]=function(t,i,n){return this.animate(e,t,i,n)}}),vt.timers=[],vt.fx.tick=function(){var t,e=vt.timers,i=0;for(De=vt.now();i<e.length;i++)t=e[i],t()||e[i]!==t||e.splice(i--,1);e.length||vt.fx.stop(),De=void 0},vt.fx.timer=function(t){vt.timers.push(t),t()?vt.fx.start():vt.timers.pop()},vt.fx.interval=13,vt.fx.start=function(){Ne||(Ne=i.setInterval(vt.fx.tick,vt.fx.interval))},vt.fx.stop=function(){i.clearInterval(Ne),Ne=null},vt.fx.speeds={slow:600,fast:200,_default:400},vt.fn.delay=function(t,e){return t=vt.fx?vt.fx.speeds[t]||t:t,e=e||"fx",this.queue(e,function(e,n){var s=i.setTimeout(e,t);n.stop=function(){i.clearTimeout(s)}})},function(){var t,e=at.createElement("input"),i=at.createElement("div"),n=at.createElement("select"),s=n.appendChild(at.createElement("option"));i=at.createElement("div"),i.setAttribute("className","t"),i.innerHTML=" <link/><table></table><a href='/a'>a</a><input type='checkbox'/>",t=i.getElementsByTagName("a")[0],e.setAttribute("type","checkbox"),i.appendChild(e),t=i.getElementsByTagName("a")[0],t.style.cssText="top:1px",gt.getSetAttribute="t"!==i.className,gt.style=/top/.test(t.getAttribute("style")),gt.hrefNormalized="/a"===t.getAttribute("href"),gt.checkOn=!!e.value,gt.optSelected=s.selected,gt.enctype=!!at.createElement("form").enctype,n.disabled=!0,gt.optDisabled=!s.disabled,e=at.createElement("input"),e.setAttribute("value",""),gt.input=""===e.getAttribute("value"),e.value="t",e.setAttribute("type","radio"),gt.radioValue="t"===e.value}();var Re=/\r/g,Me=/[\x20\t\r\n\f]+/g;vt.fn.extend({val:function(t){var e,i,n,s=this[0];{if(arguments.length)return n=vt.isFunction(t),this.each(function(i){var s;1===this.nodeType&&(s=n?t.call(this,i,vt(this).val()):t,null==s?s="":"number"==typeof s?s+="":vt.isArray(s)&&(s=vt.map(s,function(t){return null==t?"":t+""})),e=vt.valHooks[this.type]||vt.valHooks[this.nodeName.toLowerCase()],e&&"set"in e&&void 0!==e.set(this,s,"value")||(this.value=s))});if(s)return e=vt.valHooks[s.type]||vt.valHooks[s.nodeName.toLowerCase()],e&&"get"in e&&void 0!==(i=e.get(s,"value"))?i:(i=s.value,"string"==typeof i?i.replace(Re,""):null==i?"":i)}}}),vt.extend({valHooks:{option:{get:function(t){var e=vt.find.attr(t,"value");return null!=e?e:vt.trim(vt.text(t)).replace(Me," ")}},select:{get:function(t){for(var e,i,n=t.options,s=t.selectedIndex,o="select-one"===t.type||s<0,r=o?null:[],a=o?s+1:n.length,l=s<0?a:o?s:0;l<a;l++)if(i=n[l],(i.selected||l===s)&&(gt.optDisabled?!i.disabled:null===i.getAttribute("disabled"))&&(!i.parentNode.disabled||!vt.nodeName(i.parentNode,"optgroup"))){if(e=vt(i).val(),o)return e;r.push(e)}return r},set:function(t,e){for(var i,n,s=t.options,o=vt.makeArray(e),r=s.length;r--;)if(n=s[r],vt.inArray(vt.valHooks.option.get(n),o)>-1)try{n.selected=i=!0}catch(t){n.scrollHeight}else n.selected=!1;return i||(t.selectedIndex=-1),s}}}}),vt.each(["radio","checkbox"],function(){vt.valHooks[this]={set:function(t,e){if(vt.isArray(e))return t.checked=vt.inArray(vt(t).val(),e)>-1}},gt.checkOn||(vt.valHooks[this].get=function(t){return null===t.getAttribute("value")?"on":t.value})});var je,Ie,He=vt.expr.attrHandle,Le=/^(?:checked|selected)$/i,$e=gt.getSetAttribute,Fe=gt.input;vt.fn.extend({attr:function(t,e){return zt(this,vt.attr,t,e,arguments.length>1)},removeAttr:function(t){return this.each(function(){vt.removeAttr(this,t)})}}),vt.extend({attr:function(t,e,i){var n,s,o=t.nodeType;if(3!==o&&8!==o&&2!==o)return"undefined"==typeof t.getAttribute?vt.prop(t,e,i):(1===o&&vt.isXMLDoc(t)||(e=e.toLowerCase(),s=vt.attrHooks[e]||(vt.expr.match.bool.test(e)?Ie:je)),void 0!==i?null===i?void vt.removeAttr(t,e):s&&"set"in s&&void 0!==(n=s.set(t,i,e))?n:(t.setAttribute(e,i+""),i):s&&"get"in s&&null!==(n=s.get(t,e))?n:(n=vt.find.attr(t,e),null==n?void 0:n))},attrHooks:{type:{set:function(t,e){if(!gt.radioValue&&"radio"===e&&vt.nodeName(t,"input")){var i=t.value;return t.setAttribute("type",e),i&&(t.value=i),e}}}},removeAttr:function(t,e){var i,n,s=0,o=e&&e.match(Rt);if(o&&1===t.nodeType)for(;i=o[s++];)n=vt.propFix[i]||i,vt.expr.match.bool.test(i)?Fe&&$e||!Le.test(i)?t[n]=!1:t[vt.camelCase("default-"+i)]=t[n]=!1:vt.attr(t,i,""),t.removeAttribute($e?i:n)}}),Ie={set:function(t,e,i){return e===!1?vt.removeAttr(t,i):Fe&&$e||!Le.test(i)?t.setAttribute(!$e&&vt.propFix[i]||i,i):t[vt.camelCase("default-"+i)]=t[i]=!0,i}},vt.each(vt.expr.match.bool.source.match(/\w+/g),function(t,e){var i=He[e]||vt.find.attr;Fe&&$e||!Le.test(e)?He[e]=function(t,e,n){var s,o;return n||(o=He[e],He[e]=s,s=null!=i(t,e,n)?e.toLowerCase():null,He[e]=o),s}:He[e]=function(t,e,i){if(!i)return t[vt.camelCase("default-"+e)]?e.toLowerCase():null}}),Fe&&$e||(vt.attrHooks.value={set:function(t,e,i){return vt.nodeName(t,"input")?void(t.defaultValue=e):je&&je.set(t,e,i)}}),$e||(je={set:function(t,e,i){var n=t.getAttributeNode(i);if(n||t.setAttributeNode(n=t.ownerDocument.createAttribute(i)),n.value=e+="","value"===i||e===t.getAttribute(i))return e}},He.id=He.name=He.coords=function(t,e,i){var n;if(!i)return(n=t.getAttributeNode(e))&&""!==n.value?n.value:null},vt.valHooks.button={get:function(t,e){var i=t.getAttributeNode(e);if(i&&i.specified)return i.value},set:je.set},vt.attrHooks.contenteditable={set:function(t,e,i){je.set(t,""!==e&&e,i)}},vt.each(["width","height"],function(t,e){vt.attrHooks[e]={set:function(t,i){if(""===i)return t.setAttribute(e,"auto"),i}}})),gt.style||(vt.attrHooks.style={get:function(t){return t.style.cssText||void 0},set:function(t,e){return t.style.cssText=e+""}});var qe=/^(?:input|select|textarea|button|object)$/i,We=/^(?:a|area)$/i;vt.fn.extend({prop:function(t,e){return zt(this,vt.prop,t,e,arguments.length>1)},removeProp:function(t){return t=vt.propFix[t]||t,this.each(function(){try{this[t]=void 0,delete this[t]}catch(t){}})}}),vt.extend({prop:function(t,e,i){var n,s,o=t.nodeType;if(3!==o&&8!==o&&2!==o)return 1===o&&vt.isXMLDoc(t)||(e=vt.propFix[e]||e,s=vt.propHooks[e]),void 0!==i?s&&"set"in s&&void 0!==(n=s.set(t,i,e))?n:t[e]=i:s&&"get"in s&&null!==(n=s.get(t,e))?n:t[e]},propHooks:{tabIndex:{get:function(t){var e=vt.find.attr(t,"tabindex");return e?parseInt(e,10):qe.test(t.nodeName)||We.test(t.nodeName)&&t.href?0:-1}}},propFix:{for:"htmlFor",class:"className"}}),gt.hrefNormalized||vt.each(["href","src"],function(t,e){vt.propHooks[e]={get:function(t){return t.getAttribute(e,4)}}}),gt.optSelected||(vt.propHooks.selected={get:function(t){var e=t.parentNode;return e&&(e.selectedIndex,e.parentNode&&e.parentNode.selectedIndex),null},set:function(t){var e=t.parentNode;e&&(e.selectedIndex,e.parentNode&&e.parentNode.selectedIndex)}}),vt.each(["tabIndex","readOnly","maxLength","cellSpacing","cellPadding","rowSpan","colSpan","useMap","frameBorder","contentEditable"],function(){vt.propFix[this.toLowerCase()]=this}),gt.enctype||(vt.propFix.enctype="encoding");var ze=/[\t\r\n\f]/g;vt.fn.extend({addClass:function(t){var e,i,n,s,o,r,a,l=0;if(vt.isFunction(t))return this.each(function(e){vt(this).addClass(t.call(this,e,X(this)))});if("string"==typeof t&&t)for(e=t.match(Rt)||[];i=this[l++];)if(s=X(i),n=1===i.nodeType&&(" "+s+" ").replace(ze," ")){for(r=0;o=e[r++];)n.indexOf(" "+o+" ")<0&&(n+=o+" ");a=vt.trim(n),s!==a&&vt.attr(i,"class",a)}return this},removeClass:function(t){var e,i,n,s,o,r,a,l=0;if(vt.isFunction(t))return this.each(function(e){vt(this).removeClass(t.call(this,e,X(this)))});if(!arguments.length)return this.attr("class","");if("string"==typeof t&&t)for(e=t.match(Rt)||[];i=this[l++];)if(s=X(i),n=1===i.nodeType&&(" "+s+" ").replace(ze," ")){for(r=0;o=e[r++];)for(;n.indexOf(" "+o+" ")>-1;)n=n.replace(" "+o+" "," ");a=vt.trim(n),s!==a&&vt.attr(i,"class",a)}return this},toggleClass:function(t,e){var i=typeof t;return"boolean"==typeof e&&"string"===i?e?this.addClass(t):this.removeClass(t):vt.isFunction(t)?this.each(function(i){vt(this).toggleClass(t.call(this,i,X(this),e),e)}):this.each(function(){var e,n,s,o;if("string"===i)for(n=0,s=vt(this),o=t.match(Rt)||[];e=o[n++];)s.hasClass(e)?s.removeClass(e):s.addClass(e);else void 0!==t&&"boolean"!==i||(e=X(this),e&&vt._data(this,"__className__",e),vt.attr(this,"class",e||t===!1?"":vt._data(this,"__className__")||""));
|
||
})},hasClass:function(t){var e,i,n=0;for(e=" "+t+" ";i=this[n++];)if(1===i.nodeType&&(" "+X(i)+" ").replace(ze," ").indexOf(e)>-1)return!0;return!1}}),vt.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(t,e){vt.fn[e]=function(t,i){return arguments.length>0?this.on(e,null,t,i):this.trigger(e)}}),vt.fn.extend({hover:function(t,e){return this.mouseenter(t).mouseleave(e||t)}});var Be=i.location,Ue=vt.now(),Ve=/\?/,Ge=/(,)|(\[|{)|(}|])|"(?:[^"\\\r\n]|\\["\\\/bfnrt]|\\u[\da-fA-F]{4})*"\s*:?|true|false|null|-?(?!0\d)\d+(?:\.\d+|)(?:[eE][+-]?\d+|)/g;vt.parseJSON=function(t){if(i.JSON&&i.JSON.parse)return i.JSON.parse(t+"");var e,n=null,s=vt.trim(t+"");return s&&!vt.trim(s.replace(Ge,function(t,i,s,o){return e&&i&&(n=0),0===n?t:(e=s||i,n+=!o-!s,"")}))?Function("return "+s)():vt.error("Invalid JSON: "+t)},vt.parseXML=function(t){var e,n;if(!t||"string"!=typeof t)return null;try{i.DOMParser?(n=new i.DOMParser,e=n.parseFromString(t,"text/xml")):(e=new i.ActiveXObject("Microsoft.XMLDOM"),e.async="false",e.loadXML(t))}catch(t){e=void 0}return e&&e.documentElement&&!e.getElementsByTagName("parsererror").length||vt.error("Invalid XML: "+t),e};var Xe=/#.*$/,Ye=/([?&])_=[^&]*/,Je=/^(.*?):[ \t]*([^\r\n]*)\r?$/gm,Ke=/^(?:about|app|app-storage|.+-extension|file|res|widget):$/,Qe=/^(?:GET|HEAD)$/,Ze=/^\/\//,ti=/^([\w.+-]+:)(?:\/\/(?:[^\/?#]*@|)([^\/?#:]*)(?::(\d+)|)|)/,ei={},ii={},ni="*/".concat("*"),si=Be.href,oi=ti.exec(si.toLowerCase())||[];vt.extend({active:0,lastModified:{},etag:{},ajaxSettings:{url:si,type:"GET",isLocal:Ke.test(oi[1]),global:!0,processData:!0,async:!0,contentType:"application/x-www-form-urlencoded; charset=UTF-8",accepts:{"*":ni,text:"text/plain",html:"text/html",xml:"application/xml, text/xml",json:"application/json, text/javascript"},contents:{xml:/\bxml\b/,html:/\bhtml/,json:/\bjson\b/},responseFields:{xml:"responseXML",text:"responseText",json:"responseJSON"},converters:{"* text":String,"text html":!0,"text json":vt.parseJSON,"text xml":vt.parseXML},flatOptions:{url:!0,context:!0}},ajaxSetup:function(t,e){return e?K(K(t,vt.ajaxSettings),e):K(vt.ajaxSettings,t)},ajaxPrefilter:Y(ei),ajaxTransport:Y(ii),ajax:function(t,e){function n(t,e,n,s){var o,h,y,b,_,C=e;2!==w&&(w=2,l&&i.clearTimeout(l),c=void 0,a=s||"",x.readyState=t>0?4:0,o=t>=200&&t<300||304===t,n&&(b=Q(d,x,n)),b=Z(d,b,x,o),o?(d.ifModified&&(_=x.getResponseHeader("Last-Modified"),_&&(vt.lastModified[r]=_),_=x.getResponseHeader("etag"),_&&(vt.etag[r]=_)),204===t||"HEAD"===d.type?C="nocontent":304===t?C="notmodified":(C=b.state,h=b.data,y=b.error,o=!y)):(y=C,!t&&C||(C="error",t<0&&(t=0))),x.status=t,x.statusText=(e||C)+"",o?g.resolveWith(p,[h,C,x]):g.rejectWith(p,[x,C,y]),x.statusCode(v),v=void 0,u&&f.trigger(o?"ajaxSuccess":"ajaxError",[x,d,o?h:y]),m.fireWith(p,[x,C]),u&&(f.trigger("ajaxComplete",[x,d]),--vt.active||vt.event.trigger("ajaxStop")))}"object"==typeof t&&(e=t,t=void 0),e=e||{};var s,o,r,a,l,u,c,h,d=vt.ajaxSetup({},e),p=d.context||d,f=d.context&&(p.nodeType||p.jquery)?vt(p):vt.event,g=vt.Deferred(),m=vt.Callbacks("once memory"),v=d.statusCode||{},y={},b={},w=0,_="canceled",x={readyState:0,getResponseHeader:function(t){var e;if(2===w){if(!h)for(h={};e=Je.exec(a);)h[e[1].toLowerCase()]=e[2];e=h[t.toLowerCase()]}return null==e?null:e},getAllResponseHeaders:function(){return 2===w?a:null},setRequestHeader:function(t,e){var i=t.toLowerCase();return w||(t=b[i]=b[i]||t,y[t]=e),this},overrideMimeType:function(t){return w||(d.mimeType=t),this},statusCode:function(t){var e;if(t)if(w<2)for(e in t)v[e]=[v[e],t[e]];else x.always(t[x.status]);return this},abort:function(t){var e=t||_;return c&&c.abort(e),n(0,e),this}};if(g.promise(x).complete=m.add,x.success=x.done,x.error=x.fail,d.url=((t||d.url||si)+"").replace(Xe,"").replace(Ze,oi[1]+"//"),d.type=e.method||e.type||d.method||d.type,d.dataTypes=vt.trim(d.dataType||"*").toLowerCase().match(Rt)||[""],null==d.crossDomain&&(s=ti.exec(d.url.toLowerCase()),d.crossDomain=!(!s||s[1]===oi[1]&&s[2]===oi[2]&&(s[3]||("http:"===s[1]?"80":"443"))===(oi[3]||("http:"===oi[1]?"80":"443")))),d.data&&d.processData&&"string"!=typeof d.data&&(d.data=vt.param(d.data,d.traditional)),J(ei,d,e,x),2===w)return x;u=vt.event&&d.global,u&&0===vt.active++&&vt.event.trigger("ajaxStart"),d.type=d.type.toUpperCase(),d.hasContent=!Qe.test(d.type),r=d.url,d.hasContent||(d.data&&(r=d.url+=(Ve.test(r)?"&":"?")+d.data,delete d.data),d.cache===!1&&(d.url=Ye.test(r)?r.replace(Ye,"$1_="+Ue++):r+(Ve.test(r)?"&":"?")+"_="+Ue++)),d.ifModified&&(vt.lastModified[r]&&x.setRequestHeader("If-Modified-Since",vt.lastModified[r]),vt.etag[r]&&x.setRequestHeader("If-None-Match",vt.etag[r])),(d.data&&d.hasContent&&d.contentType!==!1||e.contentType)&&x.setRequestHeader("Content-Type",d.contentType),x.setRequestHeader("Accept",d.dataTypes[0]&&d.accepts[d.dataTypes[0]]?d.accepts[d.dataTypes[0]]+("*"!==d.dataTypes[0]?", "+ni+"; q=0.01":""):d.accepts["*"]);for(o in d.headers)x.setRequestHeader(o,d.headers[o]);if(d.beforeSend&&(d.beforeSend.call(p,x,d)===!1||2===w))return x.abort();_="abort";for(o in{success:1,error:1,complete:1})x[o](d[o]);if(c=J(ii,d,e,x)){if(x.readyState=1,u&&f.trigger("ajaxSend",[x,d]),2===w)return x;d.async&&d.timeout>0&&(l=i.setTimeout(function(){x.abort("timeout")},d.timeout));try{w=1,c.send(y,n)}catch(t){if(!(w<2))throw t;n(-1,t)}}else n(-1,"No Transport");return x},getJSON:function(t,e,i){return vt.get(t,e,i,"json")},getScript:function(t,e){return vt.get(t,void 0,e,"script")}}),vt.each(["get","post"],function(t,e){vt[e]=function(t,i,n,s){return vt.isFunction(i)&&(s=s||n,n=i,i=void 0),vt.ajax(vt.extend({url:t,type:e,dataType:s,data:i,success:n},vt.isPlainObject(t)&&t))}}),vt._evalUrl=function(t){return vt.ajax({url:t,type:"GET",dataType:"script",cache:!0,async:!1,global:!1,throws:!0})},vt.fn.extend({wrapAll:function(t){if(vt.isFunction(t))return this.each(function(e){vt(this).wrapAll(t.call(this,e))});if(this[0]){var e=vt(t,this[0].ownerDocument).eq(0).clone(!0);this[0].parentNode&&e.insertBefore(this[0]),e.map(function(){for(var t=this;t.firstChild&&1===t.firstChild.nodeType;)t=t.firstChild;return t}).append(this)}return this},wrapInner:function(t){return vt.isFunction(t)?this.each(function(e){vt(this).wrapInner(t.call(this,e))}):this.each(function(){var e=vt(this),i=e.contents();i.length?i.wrapAll(t):e.append(t)})},wrap:function(t){var e=vt.isFunction(t);return this.each(function(i){vt(this).wrapAll(e?t.call(this,i):t)})},unwrap:function(){return this.parent().each(function(){vt.nodeName(this,"body")||vt(this).replaceWith(this.childNodes)}).end()}}),vt.expr.filters.hidden=function(t){return gt.reliableHiddenOffsets()?t.offsetWidth<=0&&t.offsetHeight<=0&&!t.getClientRects().length:et(t)},vt.expr.filters.visible=function(t){return!vt.expr.filters.hidden(t)};var ri=/%20/g,ai=/\[\]$/,li=/\r?\n/g,ui=/^(?:submit|button|image|reset|file)$/i,ci=/^(?:input|select|textarea|keygen)/i;vt.param=function(t,e){var i,n=[],s=function(t,e){e=vt.isFunction(e)?e():null==e?"":e,n[n.length]=encodeURIComponent(t)+"="+encodeURIComponent(e)};if(void 0===e&&(e=vt.ajaxSettings&&vt.ajaxSettings.traditional),vt.isArray(t)||t.jquery&&!vt.isPlainObject(t))vt.each(t,function(){s(this.name,this.value)});else for(i in t)it(i,t[i],e,s);return n.join("&").replace(ri,"+")},vt.fn.extend({serialize:function(){return vt.param(this.serializeArray())},serializeArray:function(){return this.map(function(){var t=vt.prop(this,"elements");return t?vt.makeArray(t):this}).filter(function(){var t=this.type;return this.name&&!vt(this).is(":disabled")&&ci.test(this.nodeName)&&!ui.test(t)&&(this.checked||!Bt.test(t))}).map(function(t,e){var i=vt(this).val();return null==i?null:vt.isArray(i)?vt.map(i,function(t){return{name:e.name,value:t.replace(li,"\r\n")}}):{name:e.name,value:i.replace(li,"\r\n")}}).get()}}),vt.ajaxSettings.xhr=void 0!==i.ActiveXObject?function(){return this.isLocal?st():at.documentMode>8?nt():/^(get|post|head|put|delete|options)$/i.test(this.type)&&nt()||st()}:nt;var hi=0,di={},pi=vt.ajaxSettings.xhr();i.attachEvent&&i.attachEvent("onunload",function(){for(var t in di)di[t](void 0,!0)}),gt.cors=!!pi&&"withCredentials"in pi,pi=gt.ajax=!!pi,pi&&vt.ajaxTransport(function(t){if(!t.crossDomain||gt.cors){var e;return{send:function(n,s){var o,r=t.xhr(),a=++hi;if(r.open(t.type,t.url,t.async,t.username,t.password),t.xhrFields)for(o in t.xhrFields)r[o]=t.xhrFields[o];t.mimeType&&r.overrideMimeType&&r.overrideMimeType(t.mimeType),t.crossDomain||n["X-Requested-With"]||(n["X-Requested-With"]="XMLHttpRequest");for(o in n)void 0!==n[o]&&r.setRequestHeader(o,n[o]+"");r.send(t.hasContent&&t.data||null),e=function(i,n){var o,l,u;if(e&&(n||4===r.readyState))if(delete di[a],e=void 0,r.onreadystatechange=vt.noop,n)4!==r.readyState&&r.abort();else{u={},o=r.status,"string"==typeof r.responseText&&(u.text=r.responseText);try{l=r.statusText}catch(t){l=""}o||!t.isLocal||t.crossDomain?1223===o&&(o=204):o=u.text?200:404}u&&s(o,l,u,r.getAllResponseHeaders())},t.async?4===r.readyState?i.setTimeout(e):r.onreadystatechange=di[a]=e:e()},abort:function(){e&&e(void 0,!0)}}}}),vt.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/\b(?:java|ecma)script\b/},converters:{"text script":function(t){return vt.globalEval(t),t}}}),vt.ajaxPrefilter("script",function(t){void 0===t.cache&&(t.cache=!1),t.crossDomain&&(t.type="GET",t.global=!1)}),vt.ajaxTransport("script",function(t){if(t.crossDomain){var e,i=at.head||vt("head")[0]||at.documentElement;return{send:function(n,s){e=at.createElement("script"),e.async=!0,t.scriptCharset&&(e.charset=t.scriptCharset),e.src=t.url,e.onload=e.onreadystatechange=function(t,i){(i||!e.readyState||/loaded|complete/.test(e.readyState))&&(e.onload=e.onreadystatechange=null,e.parentNode&&e.parentNode.removeChild(e),e=null,i||s(200,"success"))},i.insertBefore(e,i.firstChild)},abort:function(){e&&e.onload(void 0,!0)}}}});var fi=[],gi=/(=)\?(?=&|$)|\?\?/;vt.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var t=fi.pop()||vt.expando+"_"+Ue++;return this[t]=!0,t}}),vt.ajaxPrefilter("json jsonp",function(t,e,n){var s,o,r,a=t.jsonp!==!1&&(gi.test(t.url)?"url":"string"==typeof t.data&&0===(t.contentType||"").indexOf("application/x-www-form-urlencoded")&&gi.test(t.data)&&"data");if(a||"jsonp"===t.dataTypes[0])return s=t.jsonpCallback=vt.isFunction(t.jsonpCallback)?t.jsonpCallback():t.jsonpCallback,a?t[a]=t[a].replace(gi,"$1"+s):t.jsonp!==!1&&(t.url+=(Ve.test(t.url)?"&":"?")+t.jsonp+"="+s),t.converters["script json"]=function(){return r||vt.error(s+" was not called"),r[0]},t.dataTypes[0]="json",o=i[s],i[s]=function(){r=arguments},n.always(function(){void 0===o?vt(i).removeProp(s):i[s]=o,t[s]&&(t.jsonpCallback=e.jsonpCallback,fi.push(s)),r&&vt.isFunction(o)&&o(r[0]),r=o=void 0}),"script"}),vt.parseHTML=function(t,e,i){if(!t||"string"!=typeof t)return null;"boolean"==typeof e&&(i=e,e=!1),e=e||at;var n=Tt.exec(t),s=!i&&[];return n?[e.createElement(n[1])]:(n=_([t],e,s),s&&s.length&&vt(s).remove(),vt.merge([],n.childNodes))};var mi=vt.fn.load;vt.fn.load=function(t,e,i){if("string"!=typeof t&&mi)return mi.apply(this,arguments);var n,s,o,r=this,a=t.indexOf(" ");return a>-1&&(n=vt.trim(t.slice(a,t.length)),t=t.slice(0,a)),vt.isFunction(e)?(i=e,e=void 0):e&&"object"==typeof e&&(s="POST"),r.length>0&&vt.ajax({url:t,type:s||"GET",dataType:"html",data:e}).done(function(t){o=arguments,r.html(n?vt("<div>").append(vt.parseHTML(t)).find(n):t)}).always(i&&function(t,e){r.each(function(){i.apply(this,o||[t.responseText,e,t])})}),this},vt.each(["ajaxStart","ajaxStop","ajaxComplete","ajaxError","ajaxSuccess","ajaxSend"],function(t,e){vt.fn[e]=function(t){return this.on(e,t)}}),vt.expr.filters.animated=function(t){return vt.grep(vt.timers,function(e){return t===e.elem}).length},vt.offset={setOffset:function(t,e,i){var n,s,o,r,a,l,u,c=vt.css(t,"position"),h=vt(t),d={};"static"===c&&(t.style.position="relative"),a=h.offset(),o=vt.css(t,"top"),l=vt.css(t,"left"),u=("absolute"===c||"fixed"===c)&&vt.inArray("auto",[o,l])>-1,u?(n=h.position(),r=n.top,s=n.left):(r=parseFloat(o)||0,s=parseFloat(l)||0),vt.isFunction(e)&&(e=e.call(t,i,vt.extend({},a))),null!=e.top&&(d.top=e.top-a.top+r),null!=e.left&&(d.left=e.left-a.left+s),"using"in e?e.using.call(t,d):h.css(d)}},vt.fn.extend({offset:function(t){if(arguments.length)return void 0===t?this:this.each(function(e){vt.offset.setOffset(this,t,e)});var e,i,n={top:0,left:0},s=this[0],o=s&&s.ownerDocument;if(o)return e=o.documentElement,vt.contains(e,s)?("undefined"!=typeof s.getBoundingClientRect&&(n=s.getBoundingClientRect()),i=ot(o),{top:n.top+(i.pageYOffset||e.scrollTop)-(e.clientTop||0),left:n.left+(i.pageXOffset||e.scrollLeft)-(e.clientLeft||0)}):n},position:function(){if(this[0]){var t,e,i={top:0,left:0},n=this[0];return"fixed"===vt.css(n,"position")?e=n.getBoundingClientRect():(t=this.offsetParent(),e=this.offset(),vt.nodeName(t[0],"html")||(i=t.offset()),i.top+=vt.css(t[0],"borderTopWidth",!0),i.left+=vt.css(t[0],"borderLeftWidth",!0)),{top:e.top-i.top-vt.css(n,"marginTop",!0),left:e.left-i.left-vt.css(n,"marginLeft",!0)}}},offsetParent:function(){return this.map(function(){for(var t=this.offsetParent;t&&!vt.nodeName(t,"html")&&"static"===vt.css(t,"position");)t=t.offsetParent;return t||ve})}}),vt.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},function(t,e){var i=/Y/.test(e);vt.fn[t]=function(n){return zt(this,function(t,n,s){var o=ot(t);return void 0===s?o?e in o?o[e]:o.document.documentElement[n]:t[n]:void(o?o.scrollTo(i?vt(o).scrollLeft():s,i?s:vt(o).scrollTop()):t[n]=s)},t,n,arguments.length,null)}}),vt.each(["top","left"],function(t,e){vt.cssHooks[e]=j(gt.pixelPosition,function(t,i){if(i)return i=be(t,e),ge.test(i)?vt(t).position()[e]+"px":i})}),vt.each({Height:"height",Width:"width"},function(t,e){vt.each({padding:"inner"+t,content:e,"":"outer"+t},function(i,n){vt.fn[n]=function(n,s){var o=arguments.length&&(i||"boolean"!=typeof n),r=i||(n===!0||s===!0?"margin":"border");return zt(this,function(e,i,n){var s;return vt.isWindow(e)?e.document.documentElement["client"+t]:9===e.nodeType?(s=e.documentElement,Math.max(e.body["scroll"+t],s["scroll"+t],e.body["offset"+t],s["offset"+t],s["client"+t])):void 0===n?vt.css(e,i,r):vt.style(e,i,n,r)},e,o?n:void 0,o,null)}})}),vt.fn.extend({bind:function(t,e,i){return this.on(t,null,e,i)},unbind:function(t,e){return this.off(t,null,e)},delegate:function(t,e,i,n){return this.on(e,t,i,n)},undelegate:function(t,e,i){return 1===arguments.length?this.off(t,"**"):this.off(e,t||"**",i)}}),vt.fn.size=function(){return this.length},vt.fn.andSelf=vt.fn.addBack,n=[],s=function(){return vt}.apply(e,n),!(void 0!==s&&(t.exports=s));var vi=i.jQuery,yi=i.$;return vt.noConflict=function(t){return i.$===vt&&(i.$=yi),t&&i.jQuery===vt&&(i.jQuery=vi),vt},o||(i.jQuery=i.$=vt),vt})},function(t,e,i){var n,s;(function(){function i(t){function e(e,i,n,s,o,r){for(;o>=0&&o<r;o+=t){var a=s?s[o]:o;n=i(n,e[a],a,e)}return n}return function(i,n,s,o){n=C(n,o,4);var r=!N(i)&&x.keys(i),a=(r||i).length,l=t>0?0:a-1;return arguments.length<3&&(s=i[r?r[l]:l],l+=t),e(i,n,s,r,l,a)}}function o(t){return function(e,i,n){i=S(i,n);for(var s=D(e),o=t>0?0:s-1;o>=0&&o<s;o+=t)if(i(e[o],o,e))return o;return-1}}function r(t,e,i){return function(n,s,o){var r=0,a=D(n);if("number"==typeof o)t>0?r=o>=0?o:Math.max(o+a,r):a=o>=0?Math.min(o+1,a):o+a+1;else if(i&&o&&a)return o=i(n,s),n[o]===s?o:-1;if(s!==s)return o=e(f.call(n,r,a),x.isNaN),o>=0?o+r:-1;for(o=t>0?r:a-1;o>=0&&o<a;o+=t)if(n[o]===s)return o;return-1}}function a(t,e){var i=j.length,n=t.constructor,s=x.isFunction(n)&&n.prototype||h,o="constructor";for(x.has(t,o)&&!x.contains(e,o)&&e.push(o);i--;)o=j[i],o in t&&t[o]!==s[o]&&!x.contains(e,o)&&e.push(o)}var l=this,u=l._,c=Array.prototype,h=Object.prototype,d=Function.prototype,p=c.push,f=c.slice,g=h.toString,m=h.hasOwnProperty,v=Array.isArray,y=Object.keys,b=d.bind,w=Object.create,_=function(){},x=function(t){return t instanceof x?t:this instanceof x?void(this._wrapped=t):new x(t)};"undefined"!=typeof t&&t.exports&&(e=t.exports=x),e._=x,x.VERSION="1.8.3";var C=function(t,e,i){if(void 0===e)return t;switch(null==i?3:i){case 1:return function(i){return t.call(e,i)};case 2:return function(i,n){return t.call(e,i,n)};case 3:return function(i,n,s){return t.call(e,i,n,s)};case 4:return function(i,n,s,o){return t.call(e,i,n,s,o)}}return function(){return t.apply(e,arguments)}},S=function(t,e,i){return null==t?x.identity:x.isFunction(t)?C(t,e,i):x.isObject(t)?x.matcher(t):x.property(t)};x.iteratee=function(t,e){return S(t,e,1/0)};var k=function(t,e){return function(i){var n=arguments.length;if(n<2||null==i)return i;for(var s=1;s<n;s++)for(var o=arguments[s],r=t(o),a=r.length,l=0;l<a;l++){var u=r[l];e&&void 0!==i[u]||(i[u]=o[u])}return i}},T=function(t){if(!x.isObject(t))return{};if(w)return w(t);_.prototype=t;var e=new _;return _.prototype=null,e},E=function(t){return function(e){return null==e?void 0:e[t]}},A=Math.pow(2,53)-1,D=E("length"),N=function(t){var e=D(t);return"number"==typeof e&&e>=0&&e<=A};x.each=x.forEach=function(t,e,i){e=C(e,i);var n,s;if(N(t))for(n=0,s=t.length;n<s;n++)e(t[n],n,t);else{var o=x.keys(t);for(n=0,s=o.length;n<s;n++)e(t[o[n]],o[n],t)}return t},x.map=x.collect=function(t,e,i){e=S(e,i);for(var n=!N(t)&&x.keys(t),s=(n||t).length,o=Array(s),r=0;r<s;r++){var a=n?n[r]:r;o[r]=e(t[a],a,t)}return o},x.reduce=x.foldl=x.inject=i(1),x.reduceRight=x.foldr=i(-1),x.find=x.detect=function(t,e,i){var n;if(n=N(t)?x.findIndex(t,e,i):x.findKey(t,e,i),void 0!==n&&n!==-1)return t[n]},x.filter=x.select=function(t,e,i){var n=[];return e=S(e,i),x.each(t,function(t,i,s){e(t,i,s)&&n.push(t)}),n},x.reject=function(t,e,i){return x.filter(t,x.negate(S(e)),i)},x.every=x.all=function(t,e,i){e=S(e,i);for(var n=!N(t)&&x.keys(t),s=(n||t).length,o=0;o<s;o++){var r=n?n[o]:o;if(!e(t[r],r,t))return!1}return!0},x.some=x.any=function(t,e,i){e=S(e,i);for(var n=!N(t)&&x.keys(t),s=(n||t).length,o=0;o<s;o++){var r=n?n[o]:o;if(e(t[r],r,t))return!0}return!1},x.contains=x.includes=x.include=function(t,e,i,n){return N(t)||(t=x.values(t)),("number"!=typeof i||n)&&(i=0),x.indexOf(t,e,i)>=0},x.invoke=function(t,e){var i=f.call(arguments,2),n=x.isFunction(e);return x.map(t,function(t){var s=n?e:t[e];return null==s?s:s.apply(t,i)})},x.pluck=function(t,e){return x.map(t,x.property(e))},x.where=function(t,e){return x.filter(t,x.matcher(e))},x.findWhere=function(t,e){return x.find(t,x.matcher(e))},x.max=function(t,e,i){var n,s,o=-(1/0),r=-(1/0);if(null==e&&null!=t){t=N(t)?t:x.values(t);for(var a=0,l=t.length;a<l;a++)n=t[a],n>o&&(o=n)}else e=S(e,i),x.each(t,function(t,i,n){s=e(t,i,n),(s>r||s===-(1/0)&&o===-(1/0))&&(o=t,r=s)});return o},x.min=function(t,e,i){var n,s,o=1/0,r=1/0;if(null==e&&null!=t){t=N(t)?t:x.values(t);for(var a=0,l=t.length;a<l;a++)n=t[a],n<o&&(o=n)}else e=S(e,i),x.each(t,function(t,i,n){s=e(t,i,n),(s<r||s===1/0&&o===1/0)&&(o=t,r=s)});return o},x.shuffle=function(t){for(var e,i=N(t)?t:x.values(t),n=i.length,s=Array(n),o=0;o<n;o++)e=x.random(0,o),e!==o&&(s[o]=s[e]),s[e]=i[o];return s},x.sample=function(t,e,i){return null==e||i?(N(t)||(t=x.values(t)),t[x.random(t.length-1)]):x.shuffle(t).slice(0,Math.max(0,e))},x.sortBy=function(t,e,i){return e=S(e,i),x.pluck(x.map(t,function(t,i,n){return{value:t,index:i,criteria:e(t,i,n)}}).sort(function(t,e){var i=t.criteria,n=e.criteria;if(i!==n){if(i>n||void 0===i)return 1;if(i<n||void 0===n)return-1}return t.index-e.index}),"value")};var O=function(t){return function(e,i,n){var s={};return i=S(i,n),x.each(e,function(n,o){var r=i(n,o,e);t(s,n,r)}),s}};x.groupBy=O(function(t,e,i){x.has(t,i)?t[i].push(e):t[i]=[e]}),x.indexBy=O(function(t,e,i){t[i]=e}),x.countBy=O(function(t,e,i){x.has(t,i)?t[i]++:t[i]=1}),x.toArray=function(t){return t?x.isArray(t)?f.call(t):N(t)?x.map(t,x.identity):x.values(t):[]},x.size=function(t){return null==t?0:N(t)?t.length:x.keys(t).length},x.partition=function(t,e,i){e=S(e,i);var n=[],s=[];return x.each(t,function(t,i,o){(e(t,i,o)?n:s).push(t)}),[n,s]},x.first=x.head=x.take=function(t,e,i){if(null!=t)return null==e||i?t[0]:x.initial(t,t.length-e)},x.initial=function(t,e,i){return f.call(t,0,Math.max(0,t.length-(null==e||i?1:e)))},x.last=function(t,e,i){if(null!=t)return null==e||i?t[t.length-1]:x.rest(t,Math.max(0,t.length-e))},x.rest=x.tail=x.drop=function(t,e,i){return f.call(t,null==e||i?1:e)},x.compact=function(t){return x.filter(t,x.identity)};var P=function(t,e,i,n){for(var s=[],o=0,r=n||0,a=D(t);r<a;r++){var l=t[r];if(N(l)&&(x.isArray(l)||x.isArguments(l))){e||(l=P(l,e,i));var u=0,c=l.length;for(s.length+=c;u<c;)s[o++]=l[u++]}else i||(s[o++]=l)}return s};x.flatten=function(t,e){return P(t,e,!1)},x.without=function(t){return x.difference(t,f.call(arguments,1))},x.uniq=x.unique=function(t,e,i,n){x.isBoolean(e)||(n=i,i=e,e=!1),null!=i&&(i=S(i,n));for(var s=[],o=[],r=0,a=D(t);r<a;r++){var l=t[r],u=i?i(l,r,t):l;e?(r&&o===u||s.push(l),o=u):i?x.contains(o,u)||(o.push(u),s.push(l)):x.contains(s,l)||s.push(l)}return s},x.union=function(){return x.uniq(P(arguments,!0,!0))},x.intersection=function(t){for(var e=[],i=arguments.length,n=0,s=D(t);n<s;n++){var o=t[n];if(!x.contains(e,o)){for(var r=1;r<i&&x.contains(arguments[r],o);r++);r===i&&e.push(o)}}return e},x.difference=function(t){var e=P(arguments,!0,!0,1);return x.filter(t,function(t){return!x.contains(e,t)})},x.zip=function(){return x.unzip(arguments)},x.unzip=function(t){for(var e=t&&x.max(t,D).length||0,i=Array(e),n=0;n<e;n++)i[n]=x.pluck(t,n);return i},x.object=function(t,e){for(var i={},n=0,s=D(t);n<s;n++)e?i[t[n]]=e[n]:i[t[n][0]]=t[n][1];return i},x.findIndex=o(1),x.findLastIndex=o(-1),x.sortedIndex=function(t,e,i,n){i=S(i,n,1);for(var s=i(e),o=0,r=D(t);o<r;){var a=Math.floor((o+r)/2);i(t[a])<s?o=a+1:r=a}return o},x.indexOf=r(1,x.findIndex,x.sortedIndex),x.lastIndexOf=r(-1,x.findLastIndex),x.range=function(t,e,i){null==e&&(e=t||0,t=0),i=i||1;for(var n=Math.max(Math.ceil((e-t)/i),0),s=Array(n),o=0;o<n;o++,t+=i)s[o]=t;return s};var R=function(t,e,i,n,s){if(!(n instanceof e))return t.apply(i,s);var o=T(t.prototype),r=t.apply(o,s);return x.isObject(r)?r:o};x.bind=function(t,e){if(b&&t.bind===b)return b.apply(t,f.call(arguments,1));if(!x.isFunction(t))throw new TypeError("Bind must be called on a function");var i=f.call(arguments,2),n=function(){return R(t,n,e,this,i.concat(f.call(arguments)))};return n},x.partial=function(t){var e=f.call(arguments,1),i=function(){for(var n=0,s=e.length,o=Array(s),r=0;r<s;r++)o[r]=e[r]===x?arguments[n++]:e[r];for(;n<arguments.length;)o.push(arguments[n++]);return R(t,i,this,this,o)};return i},x.bindAll=function(t){var e,i,n=arguments.length;if(n<=1)throw new Error("bindAll must be passed function names");for(e=1;e<n;e++)i=arguments[e],t[i]=x.bind(t[i],t);return t},x.memoize=function(t,e){var i=function(n){var s=i.cache,o=""+(e?e.apply(this,arguments):n);return x.has(s,o)||(s[o]=t.apply(this,arguments)),s[o]};return i.cache={},i},x.delay=function(t,e){var i=f.call(arguments,2);return setTimeout(function(){return t.apply(null,i)},e)},x.defer=x.partial(x.delay,x,1),x.throttle=function(t,e,i){var n,s,o,r=null,a=0;i||(i={});var l=function(){a=i.leading===!1?0:x.now(),r=null,o=t.apply(n,s),r||(n=s=null)};return function(){var u=x.now();a||i.leading!==!1||(a=u);var c=e-(u-a);return n=this,s=arguments,c<=0||c>e?(r&&(clearTimeout(r),r=null),a=u,o=t.apply(n,s),r||(n=s=null)):r||i.trailing===!1||(r=setTimeout(l,c)),o}},x.debounce=function(t,e,i){var n,s,o,r,a,l=function(){var u=x.now()-r;u<e&&u>=0?n=setTimeout(l,e-u):(n=null,i||(a=t.apply(o,s),n||(o=s=null)))};return function(){o=this,s=arguments,r=x.now();var u=i&&!n;return n||(n=setTimeout(l,e)),u&&(a=t.apply(o,s),o=s=null),a}},x.wrap=function(t,e){return x.partial(e,t)},x.negate=function(t){return function(){return!t.apply(this,arguments)}},x.compose=function(){var t=arguments,e=t.length-1;return function(){for(var i=e,n=t[e].apply(this,arguments);i--;)n=t[i].call(this,n);return n}},x.after=function(t,e){return function(){if(--t<1)return e.apply(this,arguments)}},x.before=function(t,e){var i;return function(){return--t>0&&(i=e.apply(this,arguments)),t<=1&&(e=null),i}},x.once=x.partial(x.before,2);var M=!{toString:null}.propertyIsEnumerable("toString"),j=["valueOf","isPrototypeOf","toString","propertyIsEnumerable","hasOwnProperty","toLocaleString"];x.keys=function(t){if(!x.isObject(t))return[];if(y)return y(t);var e=[];for(var i in t)x.has(t,i)&&e.push(i);return M&&a(t,e),e},x.allKeys=function(t){if(!x.isObject(t))return[];var e=[];for(var i in t)e.push(i);return M&&a(t,e),e},x.values=function(t){for(var e=x.keys(t),i=e.length,n=Array(i),s=0;s<i;s++)n[s]=t[e[s]];return n},x.mapObject=function(t,e,i){e=S(e,i);for(var n,s=x.keys(t),o=s.length,r={},a=0;a<o;a++)n=s[a],r[n]=e(t[n],n,t);return r},x.pairs=function(t){for(var e=x.keys(t),i=e.length,n=Array(i),s=0;s<i;s++)n[s]=[e[s],t[e[s]]];return n},x.invert=function(t){for(var e={},i=x.keys(t),n=0,s=i.length;n<s;n++)e[t[i[n]]]=i[n];return e},x.functions=x.methods=function(t){var e=[];for(var i in t)x.isFunction(t[i])&&e.push(i);return e.sort()},x.extend=k(x.allKeys),x.extendOwn=x.assign=k(x.keys),x.findKey=function(t,e,i){e=S(e,i);for(var n,s=x.keys(t),o=0,r=s.length;o<r;o++)if(n=s[o],e(t[n],n,t))return n},x.pick=function(t,e,i){var n,s,o={},r=t;if(null==r)return o;x.isFunction(e)?(s=x.allKeys(r),n=C(e,i)):(s=P(arguments,!1,!1,1),n=function(t,e,i){return e in i},r=Object(r));for(var a=0,l=s.length;a<l;a++){var u=s[a],c=r[u];n(c,u,r)&&(o[u]=c)}return o},x.omit=function(t,e,i){if(x.isFunction(e))e=x.negate(e);else{var n=x.map(P(arguments,!1,!1,1),String);e=function(t,e){return!x.contains(n,e)}}return x.pick(t,e,i)},x.defaults=k(x.allKeys,!0),x.create=function(t,e){var i=T(t);return e&&x.extendOwn(i,e),i},x.clone=function(t){return x.isObject(t)?x.isArray(t)?t.slice():x.extend({},t):t},x.tap=function(t,e){return e(t),t},x.isMatch=function(t,e){var i=x.keys(e),n=i.length;if(null==t)return!n;for(var s=Object(t),o=0;o<n;o++){var r=i[o];if(e[r]!==s[r]||!(r in s))return!1}return!0};var I=function(t,e,i,n){if(t===e)return 0!==t||1/t===1/e;if(null==t||null==e)return t===e;t instanceof x&&(t=t._wrapped),e instanceof x&&(e=e._wrapped);var s=g.call(t);if(s!==g.call(e))return!1;switch(s){case"[object RegExp]":case"[object String]":return""+t==""+e;case"[object Number]":return+t!==+t?+e!==+e:0===+t?1/+t===1/e:+t===+e;case"[object Date]":case"[object Boolean]":return+t===+e}var o="[object Array]"===s;if(!o){if("object"!=typeof t||"object"!=typeof e)return!1;var r=t.constructor,a=e.constructor;if(r!==a&&!(x.isFunction(r)&&r instanceof r&&x.isFunction(a)&&a instanceof a)&&"constructor"in t&&"constructor"in e)return!1}i=i||[],n=n||[];for(var l=i.length;l--;)if(i[l]===t)return n[l]===e;if(i.push(t),n.push(e),o){if(l=t.length,l!==e.length)return!1;for(;l--;)if(!I(t[l],e[l],i,n))return!1}else{var u,c=x.keys(t);if(l=c.length,x.keys(e).length!==l)return!1;for(;l--;)if(u=c[l],!x.has(e,u)||!I(t[u],e[u],i,n))return!1}return i.pop(),n.pop(),!0};x.isEqual=function(t,e){return I(t,e)},x.isEmpty=function(t){return null==t||(N(t)&&(x.isArray(t)||x.isString(t)||x.isArguments(t))?0===t.length:0===x.keys(t).length)},x.isElement=function(t){return!(!t||1!==t.nodeType)},x.isArray=v||function(t){return"[object Array]"===g.call(t)},x.isObject=function(t){var e=typeof t;return"function"===e||"object"===e&&!!t},x.each(["Arguments","Function","String","Number","Date","RegExp","Error"],function(t){x["is"+t]=function(e){return g.call(e)==="[object "+t+"]"}}),x.isArguments(arguments)||(x.isArguments=function(t){return x.has(t,"callee")}),"function"!=typeof/./&&"object"!=typeof Int8Array&&(x.isFunction=function(t){return"function"==typeof t||!1}),x.isFinite=function(t){return isFinite(t)&&!isNaN(parseFloat(t))},x.isNaN=function(t){return x.isNumber(t)&&t!==+t},x.isBoolean=function(t){return t===!0||t===!1||"[object Boolean]"===g.call(t)},x.isNull=function(t){return null===t},x.isUndefined=function(t){return void 0===t},x.has=function(t,e){return null!=t&&m.call(t,e)},x.noConflict=function(){return l._=u,this},x.identity=function(t){return t},x.constant=function(t){return function(){return t}},x.noop=function(){},x.property=E,x.propertyOf=function(t){return null==t?function(){}:function(e){return t[e]}},x.matcher=x.matches=function(t){return t=x.extendOwn({},t),function(e){return x.isMatch(e,t)}},x.times=function(t,e,i){var n=Array(Math.max(0,t));e=C(e,i,1);for(var s=0;s<t;s++)n[s]=e(s);return n},x.random=function(t,e){return null==e&&(e=t,t=0),t+Math.floor(Math.random()*(e-t+1))},x.now=Date.now||function(){return(new Date).getTime()};var H={"&":"&","<":"<",">":">",'"':""","'":"'","`":"`"},L=x.invert(H),$=function(t){var e=function(e){return t[e]},i="(?:"+x.keys(t).join("|")+")",n=RegExp(i),s=RegExp(i,"g");return function(t){return t=null==t?"":""+t,n.test(t)?t.replace(s,e):t}};x.escape=$(H),x.unescape=$(L),x.result=function(t,e,i){var n=null==t?void 0:t[e];return void 0===n&&(n=i),x.isFunction(n)?n.call(t):n};var F=0;x.uniqueId=function(t){var e=++F+"";return t?t+e:e},x.templateSettings={evaluate:/<%([\s\S]+?)%>/g,interpolate:/<%=([\s\S]+?)%>/g,escape:/<%-([\s\S]+?)%>/g};var q=/(.)^/,W={"'":"'","\\":"\\","\r":"r","\n":"n","\u2028":"u2028","\u2029":"u2029"},z=/\\|'|\r|\n|\u2028|\u2029/g,B=function(t){return"\\"+W[t]};x.template=function(t,e,i){!e&&i&&(e=i),e=x.defaults({},e,x.templateSettings);var n=RegExp([(e.escape||q).source,(e.interpolate||q).source,(e.evaluate||q).source].join("|")+"|$","g"),s=0,o="__p+='";t.replace(n,function(e,i,n,r,a){return o+=t.slice(s,a).replace(z,B),s=a+e.length,i?o+="'+\n((__t=("+i+"))==null?'':_.escape(__t))+\n'":n?o+="'+\n((__t=("+n+"))==null?'':__t)+\n'":r&&(o+="';\n"+r+"\n__p+='"),e}),o+="';\n",e.variable||(o="with(obj||{}){\n"+o+"}\n"),o="var __t,__p='',__j=Array.prototype.join,print=function(){__p+=__j.call(arguments,'');};\n"+o+"return __p;\n";try{var r=new Function(e.variable||"obj","_",o)}catch(t){throw t.source=o,t}var a=function(t){return r.call(this,t,x)},l=e.variable||"obj";return a.source="function("+l+"){\n"+o+"}",a},x.chain=function(t){var e=x(t);return e._chain=!0,e};var U=function(t,e){return t._chain?x(e).chain():e};x.mixin=function(t){x.each(x.functions(t),function(e){var i=x[e]=t[e];x.prototype[e]=function(){var t=[this._wrapped];return p.apply(t,arguments),U(this,i.apply(x,t))}})},x.mixin(x),x.each(["pop","push","reverse","shift","sort","splice","unshift"],function(t){var e=c[t];x.prototype[t]=function(){var i=this._wrapped;return e.apply(i,arguments),"shift"!==t&&"splice"!==t||0!==i.length||delete i[0],U(this,i)}}),x.each(["concat","join","slice"],function(t){var e=c[t];x.prototype[t]=function(){return U(this,e.apply(this._wrapped,arguments))}}),x.prototype.value=function(){return this._wrapped},x.prototype.valueOf=x.prototype.toJSON=x.prototype.value,x.prototype.toString=function(){return""+this._wrapped},n=[],s=function(){return x}.apply(e,n),!(void 0!==s&&(t.exports=s))}).call(this)},function(t,e,i){var n,s;(function(o){!function(r){var a="object"==typeof self&&self.self===self&&self||"object"==typeof o&&o.global===o&&o;n=[i(2),i(1),e],s=function(t,e,i){a.Backbone=r(a,i,t,e)}.apply(e,n),!(void 0!==s&&(t.exports=s))}(function(t,e,i,n){var s=t.Backbone,o=Array.prototype.slice;e.VERSION="1.3.3",e.$=n,e.noConflict=function(){return t.Backbone=s,this},e.emulateHTTP=!1,e.emulateJSON=!1;var r=function(t,e,n){switch(t){case 1:return function(){return i[e](this[n])};case 2:return function(t){return i[e](this[n],t)};case 3:return function(t,s){return i[e](this[n],l(t,this),s)};case 4:return function(t,s,o){return i[e](this[n],l(t,this),s,o)};default:return function(){var t=o.call(arguments);return t.unshift(this[n]),i[e].apply(i,t)}}},a=function(t,e,n){i.each(e,function(e,s){i[s]&&(t.prototype[s]=r(e,s,n))})},l=function(t,e){return i.isFunction(t)?t:i.isObject(t)&&!e._isModel(t)?u(t):i.isString(t)?function(e){
|
||
return e.get(t)}:t},u=function(t){var e=i.matches(t);return function(t){return e(t.attributes)}},c=e.Events={},h=/\s+/,d=function(t,e,n,s,o){var r,a=0;if(n&&"object"==typeof n){void 0!==s&&"context"in o&&void 0===o.context&&(o.context=s);for(r=i.keys(n);a<r.length;a++)e=d(t,e,r[a],n[r[a]],o)}else if(n&&h.test(n))for(r=n.split(h);a<r.length;a++)e=t(e,r[a],s,o);else e=t(e,n,s,o);return e};c.on=function(t,e,i){return p(this,t,e,i)};var p=function(t,e,i,n,s){if(t._events=d(f,t._events||{},e,i,{context:n,ctx:t,listening:s}),s){var o=t._listeners||(t._listeners={});o[s.id]=s}return t};c.listenTo=function(t,e,n){if(!t)return this;var s=t._listenId||(t._listenId=i.uniqueId("l")),o=this._listeningTo||(this._listeningTo={}),r=o[s];if(!r){var a=this._listenId||(this._listenId=i.uniqueId("l"));r=o[s]={obj:t,objId:s,id:a,listeningTo:o,count:0}}return p(t,e,n,this,r),this};var f=function(t,e,i,n){if(i){var s=t[e]||(t[e]=[]),o=n.context,r=n.ctx,a=n.listening;a&&a.count++,s.push({callback:i,context:o,ctx:o||r,listening:a})}return t};c.off=function(t,e,i){return this._events?(this._events=d(g,this._events,t,e,{context:i,listeners:this._listeners}),this):this},c.stopListening=function(t,e,n){var s=this._listeningTo;if(!s)return this;for(var o=t?[t._listenId]:i.keys(s),r=0;r<o.length;r++){var a=s[o[r]];if(!a)break;a.obj.off(e,n,this)}return this};var g=function(t,e,n,s){if(t){var o,r=0,a=s.context,l=s.listeners;if(e||n||a){for(var u=e?[e]:i.keys(t);r<u.length;r++){e=u[r];var c=t[e];if(!c)break;for(var h=[],d=0;d<c.length;d++){var p=c[d];n&&n!==p.callback&&n!==p.callback._callback||a&&a!==p.context?h.push(p):(o=p.listening,o&&0===--o.count&&(delete l[o.id],delete o.listeningTo[o.objId]))}h.length?t[e]=h:delete t[e]}return t}for(var f=i.keys(l);r<f.length;r++)o=l[f[r]],delete l[o.id],delete o.listeningTo[o.objId]}};c.once=function(t,e,n){var s=d(m,{},t,e,i.bind(this.off,this));return"string"==typeof t&&null==n&&(e=void 0),this.on(s,e,n)},c.listenToOnce=function(t,e,n){var s=d(m,{},e,n,i.bind(this.stopListening,this,t));return this.listenTo(t,s)};var m=function(t,e,n,s){if(n){var o=t[e]=i.once(function(){s(e,o),n.apply(this,arguments)});o._callback=n}return t};c.trigger=function(t){if(!this._events)return this;for(var e=Math.max(0,arguments.length-1),i=Array(e),n=0;n<e;n++)i[n]=arguments[n+1];return d(v,this._events,t,void 0,i),this};var v=function(t,e,i,n){if(t){var s=t[e],o=t.all;s&&o&&(o=o.slice()),s&&y(s,n),o&&y(o,[e].concat(n))}return t},y=function(t,e){var i,n=-1,s=t.length,o=e[0],r=e[1],a=e[2];switch(e.length){case 0:for(;++n<s;)(i=t[n]).callback.call(i.ctx);return;case 1:for(;++n<s;)(i=t[n]).callback.call(i.ctx,o);return;case 2:for(;++n<s;)(i=t[n]).callback.call(i.ctx,o,r);return;case 3:for(;++n<s;)(i=t[n]).callback.call(i.ctx,o,r,a);return;default:for(;++n<s;)(i=t[n]).callback.apply(i.ctx,e);return}};c.bind=c.on,c.unbind=c.off,i.extend(e,c);var b=e.Model=function(t,e){var n=t||{};e||(e={}),this.cid=i.uniqueId(this.cidPrefix),this.attributes={},e.collection&&(this.collection=e.collection),e.parse&&(n=this.parse(n,e)||{});var s=i.result(this,"defaults");n=i.defaults(i.extend({},s,n),s),this.set(n,e),this.changed={},this.initialize.apply(this,arguments)};i.extend(b.prototype,c,{changed:null,validationError:null,idAttribute:"id",cidPrefix:"c",initialize:function(){},toJSON:function(t){return i.clone(this.attributes)},sync:function(){return e.sync.apply(this,arguments)},get:function(t){return this.attributes[t]},escape:function(t){return i.escape(this.get(t))},has:function(t){return null!=this.get(t)},matches:function(t){return!!i.iteratee(t,this)(this.attributes)},set:function(t,e,n){if(null==t)return this;var s;if("object"==typeof t?(s=t,n=e):(s={})[t]=e,n||(n={}),!this._validate(s,n))return!1;var o=n.unset,r=n.silent,a=[],l=this._changing;this._changing=!0,l||(this._previousAttributes=i.clone(this.attributes),this.changed={});var u=this.attributes,c=this.changed,h=this._previousAttributes;for(var d in s)e=s[d],i.isEqual(u[d],e)||a.push(d),i.isEqual(h[d],e)?delete c[d]:c[d]=e,o?delete u[d]:u[d]=e;if(this.idAttribute in s&&(this.id=this.get(this.idAttribute)),!r){a.length&&(this._pending=n);for(var p=0;p<a.length;p++)this.trigger("change:"+a[p],this,u[a[p]],n)}if(l)return this;if(!r)for(;this._pending;)n=this._pending,this._pending=!1,this.trigger("change",this,n);return this._pending=!1,this._changing=!1,this},unset:function(t,e){return this.set(t,void 0,i.extend({},e,{unset:!0}))},clear:function(t){var e={};for(var n in this.attributes)e[n]=void 0;return this.set(e,i.extend({},t,{unset:!0}))},hasChanged:function(t){return null==t?!i.isEmpty(this.changed):i.has(this.changed,t)},changedAttributes:function(t){if(!t)return!!this.hasChanged()&&i.clone(this.changed);var e=this._changing?this._previousAttributes:this.attributes,n={};for(var s in t){var o=t[s];i.isEqual(e[s],o)||(n[s]=o)}return!!i.size(n)&&n},previous:function(t){return null!=t&&this._previousAttributes?this._previousAttributes[t]:null},previousAttributes:function(){return i.clone(this._previousAttributes)},fetch:function(t){t=i.extend({parse:!0},t);var e=this,n=t.success;return t.success=function(i){var s=t.parse?e.parse(i,t):i;return!!e.set(s,t)&&(n&&n.call(t.context,e,i,t),void e.trigger("sync",e,i,t))},q(this,t),this.sync("read",this,t)},save:function(t,e,n){var s;null==t||"object"==typeof t?(s=t,n=e):(s={})[t]=e,n=i.extend({validate:!0,parse:!0},n);var o=n.wait;if(s&&!o){if(!this.set(s,n))return!1}else if(!this._validate(s,n))return!1;var r=this,a=n.success,l=this.attributes;n.success=function(t){r.attributes=l;var e=n.parse?r.parse(t,n):t;return o&&(e=i.extend({},s,e)),!(e&&!r.set(e,n))&&(a&&a.call(n.context,r,t,n),void r.trigger("sync",r,t,n))},q(this,n),s&&o&&(this.attributes=i.extend({},l,s));var u=this.isNew()?"create":n.patch?"patch":"update";"patch"!==u||n.attrs||(n.attrs=s);var c=this.sync(u,this,n);return this.attributes=l,c},destroy:function(t){t=t?i.clone(t):{};var e=this,n=t.success,s=t.wait,o=function(){e.stopListening(),e.trigger("destroy",e,e.collection,t)};t.success=function(i){s&&o(),n&&n.call(t.context,e,i,t),e.isNew()||e.trigger("sync",e,i,t)};var r=!1;return this.isNew()?i.defer(t.success):(q(this,t),r=this.sync("delete",this,t)),s||o(),r},url:function(){var t=i.result(this,"urlRoot")||i.result(this.collection,"url")||F();if(this.isNew())return t;var e=this.get(this.idAttribute);return t.replace(/[^\/]$/,"$&/")+encodeURIComponent(e)},parse:function(t,e){return t},clone:function(){return new this.constructor(this.attributes)},isNew:function(){return!this.has(this.idAttribute)},isValid:function(t){return this._validate({},i.extend({},t,{validate:!0}))},_validate:function(t,e){if(!e.validate||!this.validate)return!0;t=i.extend({},this.attributes,t);var n=this.validationError=this.validate(t,e)||null;return!n||(this.trigger("invalid",this,n,i.extend(e,{validationError:n})),!1)}});var w={keys:1,values:1,pairs:1,invert:1,pick:0,omit:0,chain:1,isEmpty:1};a(b,w,"attributes");var _=e.Collection=function(t,e){e||(e={}),e.model&&(this.model=e.model),void 0!==e.comparator&&(this.comparator=e.comparator),this._reset(),this.initialize.apply(this,arguments),t&&this.reset(t,i.extend({silent:!0},e))},x={add:!0,remove:!0,merge:!0},C={add:!0,remove:!1},S=function(t,e,i){i=Math.min(Math.max(i,0),t.length);var n,s=Array(t.length-i),o=e.length;for(n=0;n<s.length;n++)s[n]=t[n+i];for(n=0;n<o;n++)t[n+i]=e[n];for(n=0;n<s.length;n++)t[n+o+i]=s[n]};i.extend(_.prototype,c,{model:b,initialize:function(){},toJSON:function(t){return this.map(function(e){return e.toJSON(t)})},sync:function(){return e.sync.apply(this,arguments)},add:function(t,e){return this.set(t,i.extend({merge:!1},e,C))},remove:function(t,e){e=i.extend({},e);var n=!i.isArray(t);t=n?[t]:t.slice();var s=this._removeModels(t,e);return!e.silent&&s.length&&(e.changes={added:[],merged:[],removed:s},this.trigger("update",this,e)),n?s[0]:s},set:function(t,e){if(null!=t){e=i.extend({},x,e),e.parse&&!this._isModel(t)&&(t=this.parse(t,e)||[]);var n=!i.isArray(t);t=n?[t]:t.slice();var s=e.at;null!=s&&(s=+s),s>this.length&&(s=this.length),s<0&&(s+=this.length+1);var o,r,a=[],l=[],u=[],c=[],h={},d=e.add,p=e.merge,f=e.remove,g=!1,m=this.comparator&&null==s&&e.sort!==!1,v=i.isString(this.comparator)?this.comparator:null;for(r=0;r<t.length;r++){o=t[r];var y=this.get(o);if(y){if(p&&o!==y){var b=this._isModel(o)?o.attributes:o;e.parse&&(b=y.parse(b,e)),y.set(b,e),u.push(y),m&&!g&&(g=y.hasChanged(v))}h[y.cid]||(h[y.cid]=!0,a.push(y)),t[r]=y}else d&&(o=t[r]=this._prepareModel(o,e),o&&(l.push(o),this._addReference(o,e),h[o.cid]=!0,a.push(o)))}if(f){for(r=0;r<this.length;r++)o=this.models[r],h[o.cid]||c.push(o);c.length&&this._removeModels(c,e)}var w=!1,_=!m&&d&&f;if(a.length&&_?(w=this.length!==a.length||i.some(this.models,function(t,e){return t!==a[e]}),this.models.length=0,S(this.models,a,0),this.length=this.models.length):l.length&&(m&&(g=!0),S(this.models,l,null==s?this.length:s),this.length=this.models.length),g&&this.sort({silent:!0}),!e.silent){for(r=0;r<l.length;r++)null!=s&&(e.index=s+r),o=l[r],o.trigger("add",o,this,e);(g||w)&&this.trigger("sort",this,e),(l.length||c.length||u.length)&&(e.changes={added:l,removed:c,merged:u},this.trigger("update",this,e))}return n?t[0]:t}},reset:function(t,e){e=e?i.clone(e):{};for(var n=0;n<this.models.length;n++)this._removeReference(this.models[n],e);return e.previousModels=this.models,this._reset(),t=this.add(t,i.extend({silent:!0},e)),e.silent||this.trigger("reset",this,e),t},push:function(t,e){return this.add(t,i.extend({at:this.length},e))},pop:function(t){var e=this.at(this.length-1);return this.remove(e,t)},unshift:function(t,e){return this.add(t,i.extend({at:0},e))},shift:function(t){var e=this.at(0);return this.remove(e,t)},slice:function(){return o.apply(this.models,arguments)},get:function(t){if(null!=t)return this._byId[t]||this._byId[this.modelId(t.attributes||t)]||t.cid&&this._byId[t.cid]},has:function(t){return null!=this.get(t)},at:function(t){return t<0&&(t+=this.length),this.models[t]},where:function(t,e){return this[e?"find":"filter"](t)},findWhere:function(t){return this.where(t,!0)},sort:function(t){var e=this.comparator;if(!e)throw new Error("Cannot sort a set without a comparator");t||(t={});var n=e.length;return i.isFunction(e)&&(e=i.bind(e,this)),1===n||i.isString(e)?this.models=this.sortBy(e):this.models.sort(e),t.silent||this.trigger("sort",this,t),this},pluck:function(t){return this.map(t+"")},fetch:function(t){t=i.extend({parse:!0},t);var e=t.success,n=this;return t.success=function(i){var s=t.reset?"reset":"set";n[s](i,t),e&&e.call(t.context,n,i,t),n.trigger("sync",n,i,t)},q(this,t),this.sync("read",this,t)},create:function(t,e){e=e?i.clone(e):{};var n=e.wait;if(t=this._prepareModel(t,e),!t)return!1;n||this.add(t,e);var s=this,o=e.success;return e.success=function(t,e,i){n&&s.add(t,i),o&&o.call(i.context,t,e,i)},t.save(null,e),t},parse:function(t,e){return t},clone:function(){return new this.constructor(this.models,{model:this.model,comparator:this.comparator})},modelId:function(t){return t[this.model.prototype.idAttribute||"id"]},_reset:function(){this.length=0,this.models=[],this._byId={}},_prepareModel:function(t,e){if(this._isModel(t))return t.collection||(t.collection=this),t;e=e?i.clone(e):{},e.collection=this;var n=new this.model(t,e);return n.validationError?(this.trigger("invalid",this,n.validationError,e),!1):n},_removeModels:function(t,e){for(var i=[],n=0;n<t.length;n++){var s=this.get(t[n]);if(s){var o=this.indexOf(s);this.models.splice(o,1),this.length--,delete this._byId[s.cid];var r=this.modelId(s.attributes);null!=r&&delete this._byId[r],e.silent||(e.index=o,s.trigger("remove",s,this,e)),i.push(s),this._removeReference(s,e)}}return i},_isModel:function(t){return t instanceof b},_addReference:function(t,e){this._byId[t.cid]=t;var i=this.modelId(t.attributes);null!=i&&(this._byId[i]=t),t.on("all",this._onModelEvent,this)},_removeReference:function(t,e){delete this._byId[t.cid];var i=this.modelId(t.attributes);null!=i&&delete this._byId[i],this===t.collection&&delete t.collection,t.off("all",this._onModelEvent,this)},_onModelEvent:function(t,e,i,n){if(e){if(("add"===t||"remove"===t)&&i!==this)return;if("destroy"===t&&this.remove(e,n),"change"===t){var s=this.modelId(e.previousAttributes()),o=this.modelId(e.attributes);s!==o&&(null!=s&&delete this._byId[s],null!=o&&(this._byId[o]=e))}}this.trigger.apply(this,arguments)}});var k={forEach:3,each:3,map:3,collect:3,reduce:0,foldl:0,inject:0,reduceRight:0,foldr:0,find:3,detect:3,filter:3,select:3,reject:3,every:3,all:3,some:3,any:3,include:3,includes:3,contains:3,invoke:0,max:3,min:3,toArray:1,size:1,first:3,head:3,take:3,initial:3,rest:3,tail:3,drop:3,last:3,without:0,difference:0,indexOf:3,shuffle:1,lastIndexOf:3,isEmpty:1,chain:1,sample:3,partition:3,groupBy:3,countBy:3,sortBy:3,indexBy:3,findIndex:3,findLastIndex:3};a(_,k,"models");var T=e.View=function(t){this.cid=i.uniqueId("view"),i.extend(this,i.pick(t,A)),this._ensureElement(),this.initialize.apply(this,arguments)},E=/^(\S+)\s*(.*)$/,A=["model","collection","el","id","attributes","className","tagName","events"];i.extend(T.prototype,c,{tagName:"div",$:function(t){return this.$el.find(t)},initialize:function(){},render:function(){return this},remove:function(){return this._removeElement(),this.stopListening(),this},_removeElement:function(){this.$el.remove()},setElement:function(t){return this.undelegateEvents(),this._setElement(t),this.delegateEvents(),this},_setElement:function(t){this.$el=t instanceof e.$?t:e.$(t),this.el=this.$el[0]},delegateEvents:function(t){if(t||(t=i.result(this,"events")),!t)return this;this.undelegateEvents();for(var e in t){var n=t[e];if(i.isFunction(n)||(n=this[n]),n){var s=e.match(E);this.delegate(s[1],s[2],i.bind(n,this))}}return this},delegate:function(t,e,i){return this.$el.on(t+".delegateEvents"+this.cid,e,i),this},undelegateEvents:function(){return this.$el&&this.$el.off(".delegateEvents"+this.cid),this},undelegate:function(t,e,i){return this.$el.off(t+".delegateEvents"+this.cid,e,i),this},_createElement:function(t){return document.createElement(t)},_ensureElement:function(){if(this.el)this.setElement(i.result(this,"el"));else{var t=i.extend({},i.result(this,"attributes"));this.id&&(t.id=i.result(this,"id")),this.className&&(t.class=i.result(this,"className")),this.setElement(this._createElement(i.result(this,"tagName"))),this._setAttributes(t)}},_setAttributes:function(t){this.$el.attr(t)}}),e.sync=function(t,n,s){var o=D[t];i.defaults(s||(s={}),{emulateHTTP:e.emulateHTTP,emulateJSON:e.emulateJSON});var r={type:o,dataType:"json"};if(s.url||(r.url=i.result(n,"url")||F()),null!=s.data||!n||"create"!==t&&"update"!==t&&"patch"!==t||(r.contentType="application/json",r.data=JSON.stringify(s.attrs||n.toJSON(s))),s.emulateJSON&&(r.contentType="application/x-www-form-urlencoded",r.data=r.data?{model:r.data}:{}),s.emulateHTTP&&("PUT"===o||"DELETE"===o||"PATCH"===o)){r.type="POST",s.emulateJSON&&(r.data._method=o);var a=s.beforeSend;s.beforeSend=function(t){if(t.setRequestHeader("X-HTTP-Method-Override",o),a)return a.apply(this,arguments)}}"GET"===r.type||s.emulateJSON||(r.processData=!1);var l=s.error;s.error=function(t,e,i){s.textStatus=e,s.errorThrown=i,l&&l.call(s.context,t,e,i)};var u=s.xhr=e.ajax(i.extend(r,s));return n.trigger("request",n,u,s),u};var D={create:"POST",update:"PUT",patch:"PATCH",delete:"DELETE",read:"GET"};e.ajax=function(){return e.$.ajax.apply(e.$,arguments)};var N=e.Router=function(t){t||(t={}),t.routes&&(this.routes=t.routes),this._bindRoutes(),this.initialize.apply(this,arguments)},O=/\((.*?)\)/g,P=/(\(\?)?:\w+/g,R=/\*\w+/g,M=/[\-{}\[\]+?.,\\\^$|#\s]/g;i.extend(N.prototype,c,{initialize:function(){},route:function(t,n,s){i.isRegExp(t)||(t=this._routeToRegExp(t)),i.isFunction(n)&&(s=n,n=""),s||(s=this[n]);var o=this;return e.history.route(t,function(i){var r=o._extractParameters(t,i);o.execute(s,r,n)!==!1&&(o.trigger.apply(o,["route:"+n].concat(r)),o.trigger("route",n,r),e.history.trigger("route",o,n,r))}),this},execute:function(t,e,i){t&&t.apply(this,e)},navigate:function(t,i){return e.history.navigate(t,i),this},_bindRoutes:function(){if(this.routes){this.routes=i.result(this,"routes");for(var t,e=i.keys(this.routes);null!=(t=e.pop());)this.route(t,this.routes[t])}},_routeToRegExp:function(t){return t=t.replace(M,"\\$&").replace(O,"(?:$1)?").replace(P,function(t,e){return e?t:"([^/?]+)"}).replace(R,"([^?]*?)"),new RegExp("^"+t+"(?:\\?([\\s\\S]*))?$")},_extractParameters:function(t,e){var n=t.exec(e).slice(1);return i.map(n,function(t,e){return e===n.length-1?t||null:t?decodeURIComponent(t):null})}});var j=e.History=function(){this.handlers=[],this.checkUrl=i.bind(this.checkUrl,this),"undefined"!=typeof window&&(this.location=window.location,this.history=window.history)},I=/^[#\/]|\s+$/g,H=/^\/+|\/+$/g,L=/#.*$/;j.started=!1,i.extend(j.prototype,c,{interval:50,atRoot:function(){var t=this.location.pathname.replace(/[^\/]$/,"$&/");return t===this.root&&!this.getSearch()},matchRoot:function(){var t=this.decodeFragment(this.location.pathname),e=t.slice(0,this.root.length-1)+"/";return e===this.root},decodeFragment:function(t){return decodeURI(t.replace(/%25/g,"%2525"))},getSearch:function(){var t=this.location.href.replace(/#.*/,"").match(/\?.+/);return t?t[0]:""},getHash:function(t){var e=(t||this).location.href.match(/#(.*)$/);return e?e[1]:""},getPath:function(){var t=this.decodeFragment(this.location.pathname+this.getSearch()).slice(this.root.length-1);return"/"===t.charAt(0)?t.slice(1):t},getFragment:function(t){return null==t&&(t=this._usePushState||!this._wantsHashChange?this.getPath():this.getHash()),t.replace(I,"")},start:function(t){if(j.started)throw new Error("Backbone.history has already been started");if(j.started=!0,this.options=i.extend({root:"/"},this.options,t),this.root=this.options.root,this._wantsHashChange=this.options.hashChange!==!1,this._hasHashChange="onhashchange"in window&&(void 0===document.documentMode||document.documentMode>7),this._useHashChange=this._wantsHashChange&&this._hasHashChange,this._wantsPushState=!!this.options.pushState,this._hasPushState=!(!this.history||!this.history.pushState),this._usePushState=this._wantsPushState&&this._hasPushState,this.fragment=this.getFragment(),this.root=("/"+this.root+"/").replace(H,"/"),this._wantsHashChange&&this._wantsPushState){if(!this._hasPushState&&!this.atRoot()){var e=this.root.slice(0,-1)||"/";return this.location.replace(e+"#"+this.getPath()),!0}this._hasPushState&&this.atRoot()&&this.navigate(this.getHash(),{replace:!0})}if(!this._hasHashChange&&this._wantsHashChange&&!this._usePushState){this.iframe=document.createElement("iframe"),this.iframe.src="javascript:0",this.iframe.style.display="none",this.iframe.tabIndex=-1;var n=document.body,s=n.insertBefore(this.iframe,n.firstChild).contentWindow;s.document.open(),s.document.close(),s.location.hash="#"+this.fragment}var o=window.addEventListener||function(t,e){return attachEvent("on"+t,e)};if(this._usePushState?o("popstate",this.checkUrl,!1):this._useHashChange&&!this.iframe?o("hashchange",this.checkUrl,!1):this._wantsHashChange&&(this._checkUrlInterval=setInterval(this.checkUrl,this.interval)),!this.options.silent)return this.loadUrl()},stop:function(){var t=window.removeEventListener||function(t,e){return detachEvent("on"+t,e)};this._usePushState?t("popstate",this.checkUrl,!1):this._useHashChange&&!this.iframe&&t("hashchange",this.checkUrl,!1),this.iframe&&(document.body.removeChild(this.iframe),this.iframe=null),this._checkUrlInterval&&clearInterval(this._checkUrlInterval),j.started=!1},route:function(t,e){this.handlers.unshift({route:t,callback:e})},checkUrl:function(t){var e=this.getFragment();return e===this.fragment&&this.iframe&&(e=this.getHash(this.iframe.contentWindow)),e!==this.fragment&&(this.iframe&&this.navigate(e),void this.loadUrl())},loadUrl:function(t){return!!this.matchRoot()&&(t=this.fragment=this.getFragment(t),i.some(this.handlers,function(e){if(e.route.test(t))return e.callback(t),!0}))},navigate:function(t,e){if(!j.started)return!1;e&&e!==!0||(e={trigger:!!e}),t=this.getFragment(t||"");var i=this.root;""!==t&&"?"!==t.charAt(0)||(i=i.slice(0,-1)||"/");var n=i+t;if(t=this.decodeFragment(t.replace(L,"")),this.fragment!==t){if(this.fragment=t,this._usePushState)this.history[e.replace?"replaceState":"pushState"]({},document.title,n);else{if(!this._wantsHashChange)return this.location.assign(n);if(this._updateHash(this.location,t,e.replace),this.iframe&&t!==this.getHash(this.iframe.contentWindow)){var s=this.iframe.contentWindow;e.replace||(s.document.open(),s.document.close()),this._updateHash(s.location,t,e.replace)}}return e.trigger?this.loadUrl(t):void 0}},_updateHash:function(t,e,i){if(i){var n=t.href.replace(/(javascript:|#).*$/,"");t.replace(n+"#"+e)}else t.hash="#"+e}}),e.history=new j;var $=function(t,e){var n,s=this;return n=t&&i.has(t,"constructor")?t.constructor:function(){return s.apply(this,arguments)},i.extend(n,s,e),n.prototype=i.create(s.prototype,t),n.prototype.constructor=n,n.__super__=s.prototype,n};b.extend=_.extend=N.extend=T.extend=j.extend=$;var F=function(){throw new Error('A "url" property or function must be specified')},q=function(t,e){var i=e.error;e.error=function(n){i&&i.call(e.context,t,n,e),t.trigger("error",t,n,e)}};return e})}).call(e,function(){return this}())},function(t,e,i){var n,s;(function(i,o,r){n=[],s=function(){function t(t){return'<iframe src="'+t+'" frameborder="0" style="width: 100%; height: 100%;"/>'}function e(t,n){for(var s in t){var o=t[s];if(i.isObject(o)){var r=n(o);r&&(t[s]=r),e(o,n)}}}function n(t){var e,i,n,s;return i=/(\b(https?|ftp):\/\/[-A-Z0-9+&@#\/%?=~_|!:,.;]*[-A-Z0-9+&@#\/%=~_|])/gim,e=t.replace(i,'<a href="$1" target="_blank">$1</a>'),n=/(^|[^\/])(www\.[\S]+(\b|$))/gim,e=e.replace(n,'$1<a href="http://$2" target="_blank">$2</a>'),s=/(([a-zA-Z0-9\-\_\.])+@[a-zA-Z\_]+?(\.[a-zA-Z]{2,6})+)/gim,e=e.replace(s,'<a href="mailto:$1">$1</a>')}function s(t){return JSON.parse(JSON.stringify(t)||null)}function a(t){return/^[\],:{}\s]*$/.test(t.replace(/\\["\\\/bfnrtu]/g,"@").replace(/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,"]").replace(/(?:^|:|,)(?:\s*\[)+/g,""))}function l(t){return o("<div/>").text(t).html()}function u(t){if(t instanceof Array||(t=[t]),0===t.length)return!0;for(var e in t)if(["__null__","__undefined__",null,void 0].indexOf(t[e])>-1)return!0;return!1}function c(t){if(o.isArray(t)){var t=t.toString().replace(/,/g,", "),e=t.lastIndexOf(", ");return e!=-1&&(t=t.substr(0,e)+" or "+t.substr(e+2)),t}return""}function h(t){top.__utils__get__=top.__utils__get__||{};var e=JSON.stringify(t);t.cache&&top.__utils__get__[e]?(t.success&&t.success(top.__utils__get__[e]),window.console.debug("utils.js::get() - Fetching from cache ["+t.url+"].")):d({url:t.url,data:t.data,success:function(i){top.__utils__get__[e]=i,t.success&&t.success(i)},error:function(e,i){t.error&&t.error(e,i)}})}function d(t){var e={contentType:"application/json",type:t.type||"GET",data:t.data||{},url:t.url};"GET"==e.type||"DELETE"==e.type?(o.isEmptyObject(e.data)||(e.url+=e.url.indexOf("?")==-1?"?":"&",e.url+=o.param(e.data,!0)),e.data=null):(e.dataType="json",e.url=e.url,e.data=JSON.stringify(e.data)),o.ajax(e).done(function(e){if("string"==typeof e)try{e=e.replace("Infinity,",'"Infinity",'),e=r.parseJSON(e)}catch(t){console.debug(t)}t.success&&t.success(e)}).fail(function(e){var i=null;try{i=r.parseJSON(e.responseText)}catch(t){i=e.responseText}t.error&&t.error(i,e.status)}).always(function(){t.complete&&t.complete()})}function p(t,e){var i=o('<div class="'+t+'"></div>');i.appendTo(":eq(0)");var n=i.css(e);return i.remove(),n}function f(t){o('link[href^="'+t+'"]').length||o('<link href="'+Galaxy.root+t+'" rel="stylesheet">').appendTo("head")}function g(t,e){return t?i.defaults(t,e):e}function m(t,e){for(var i=1,n=0;n<e;n++)i*=10;return Math.round(t*i)/i}function v(t,e,i){i=void 0!==i?i:1;var n="";if(t>=k)t/=k,n="TB";else if(t>=S)t/=S,n="GB";else if(t>=C)t/=C,n="MB";else if(t>=x)t/=x,n="KB";else{if(!(t>0))return e?"0 b":"<strong>-</strong>";n="b"}var s="b"==n?t:m(t,i);return e?s+" "+n:"<strong>"+s+"</strong> "+n}function y(){return top.__utils__uid__=top.__utils__uid__||0,"uid-"+top.__utils__uid__++}function b(){var t=new Date,e=(t.getHours()<10?"0":"")+t.getHours(),i=(t.getMinutes()<10?"0":"")+t.getMinutes();return datetime=t.getDate()+"/"+(t.getMonth()+1)+"/"+t.getFullYear()+", "+e+":"+i}function w(t){t.script&&""!==t.script&&o("<script/>",{type:"text/javascript"}).text(t.script).appendTo("head"),t.styles&&""!==t.styles&&o("<style/>",{type:"text/css"}).text(t.styles).appendTo("head")}function _(t){return decodeURIComponent(window.location.search.replace(new RegExp("^(?:.*[&\\?]"+encodeURIComponent(t).replace(/[\.\+\*]/g,"\\$&")+"(?:\\=([^&]*))?)?.*$","i"),"$1"))}var x=1024,C=x*x,S=C*x,k=S*x;return{cssLoadFile:f,cssGetAttribute:p,get:h,merge:g,iframe:t,bytesToString:v,uid:y,time:b,request:d,sanitize:l,textify:c,isEmpty:u,deepeach:e,isJSON:a,clone:s,linkify:n,appendScriptStyle:w,getQueryString:_}}.apply(e,n),!(void 0!==s&&(t.exports=s))}).call(e,i(2),i(1),i(1))},function(t,e,i){var n,s;n=[i(94)],s=function(t){if(t.hasOwnProperty("__root")){var e="undefined"==typeof navigator?"__root":(navigator.language||navigator.userLanguage||"__root").toLowerCase();t=t["__"+e]||t["__"+e.split("-")[0]]||t.__root}var i=function(e){return t[e]||e};return i.cacheNonLocalized=!1,i}.apply(e,n),!(void 0!==s&&(t.exports=s))},function(t,e,i){var n,s;(function(o){n=[i(2),i(3),i(92),i(5)],s=function(t,e,i,n){"use strict";function s(e,i){var n=Array.prototype.slice.call(arguments,0),s=n.pop();return n.unshift(s),t.defaults.apply(t,n)}function r(e,i){i=i||"model";var s=t.template(e.join(""));return function(t,e){var o={view:e||{},_l:n};return o[i]=t||{},s(o)}}function a(t,e){e=e||{};var i=e.ascending?1:-1;return function(e,n){return e=e.get(t),n=n.get(t),(e<n?-1:e>n?1:0)*i}}var l={logger:null,_logNamespace:"."};i(l);var u=e.Model.extend({initialize:function(e){if(this._checkEnabledSessionStorage(),!e.id)throw new Error("SessionStorageModel requires an id in the initial attributes");this.id=e.id;var i=this.isNew()?{}:this._read(this);this.clear({silent:!0}),this.save(t.extend({},this.defaults,i,e),{silent:!0}),this.on("change",function(){this.save()})},_checkEnabledSessionStorage:function(){try{return window.sessionStorage.length>=0}catch(t){return alert("Please enable cookies in your browser for this Galaxy site"),!1}},sync:function(t,e,i){i.silent||e.trigger("request",e,{},i);var n={};switch(t){case"create":n=this._create(e);break;case"read":n=this._read(e);break;case"update":n=this._update(e);break;case"delete":n=this._delete(e)}return void 0!==n||null!==n?i.success&&i.success():i.error&&i.error(),n},_create:function(t){try{var e=t.toJSON(),i=sessionStorage.setItem(t.id,JSON.stringify(e));return null===i?i:e}catch(t){if(!(t instanceof DOMException&&navigator.userAgent.indexOf("Safari")>-1))throw t}return null},_read:function(t){return JSON.parse(sessionStorage.getItem(t.id))},_update:function(t){return t._create(t)},_delete:function(t){return sessionStorage.removeItem(t.id)},isNew:function(){return!sessionStorage.hasOwnProperty(this.id)},_log:function(){return JSON.stringify(this.toJSON(),null," ")},toString:function(){return"SessionStorageModel("+this.id+")"}});!function(){u.prototype=t.omit(u.prototype,"url","urlRoot")}();var c={searchAttributes:[],searchAliases:{},searchAttribute:function(e,i){var n=this.get(e);return!(!i||void 0===n||null===n)&&(t.isArray(n)?this._searchArrayAttribute(n,i):n.toString().toLowerCase().indexOf(i.toLowerCase())!==-1)},_searchArrayAttribute:function(e,i){return i=i.toLowerCase(),t.any(e,function(t){return t.toString().toLowerCase().indexOf(i.toLowerCase())!==-1})},search:function(e){var i=this;return t.filter(this.searchAttributes,function(t){return i.searchAttribute(t,e)})},matches:function(t){var e="=",i=t.split(e);if(i.length>=2){var n=i[0];return n=this.searchAliases[n]||n,this.searchAttribute(n,i[1])}return!!this.search(t).length},matchesAll:function(e){var i=this;return e=e.match(/(".*"|\w*=".*"|\S*)/g).filter(function(t){return!!t}),t.all(e,function(t){return t=t.replace(/"/g,""),i.matches(t)})}},h={hiddenUntilActivated:function(e,i){if(i=i||{},this.HUAVOptions={$elementShown:this.$el,showFn:o.prototype.toggle,showSpeed:"fast"},t.extend(this.HUAVOptions,i||{}),this.HUAVOptions.hasBeenShown=this.HUAVOptions.$elementShown.is(":visible"),this.hidden=this.isHidden(),e){var n=this;e.on("click",function(t){n.toggle(n.HUAVOptions.showSpeed)})}},isHidden:function(){return this.HUAVOptions.$elementShown.is(":hidden")},toggle:function(){return this.hidden?(this.HUAVOptions.hasBeenShown||t.isFunction(this.HUAVOptions.onshowFirstTime)&&(this.HUAVOptions.hasBeenShown=!0,this.HUAVOptions.onshowFirstTime.call(this)),t.isFunction(this.HUAVOptions.onshow)&&(this.HUAVOptions.onshow.call(this),this.trigger("hiddenUntilActivated:shown",this)),this.hidden=!1):(t.isFunction(this.HUAVOptions.onhide)&&(this.HUAVOptions.onhide.call(this),this.trigger("hiddenUntilActivated:hidden",this)),this.hidden=!0),this.HUAVOptions.showFn.apply(this.HUAVOptions.$elementShown,arguments)}},d={initialize:function(t){this.draggable=t.draggable||!1},$dragHandle:function(){return this.$(".title-bar")},toggleDraggable:function(){this.draggable?this.draggableOff():this.draggableOn()},draggableOn:function(){this.draggable=!0,this.dragStartHandler=t.bind(this._dragStartHandler,this),this.dragEndHandler=t.bind(this._dragEndHandler,this);var e=this.$dragHandle().attr("draggable",!0).get(0);e.addEventListener("dragstart",this.dragStartHandler,!1),e.addEventListener("dragend",this.dragEndHandler,!1)},draggableOff:function(){this.draggable=!1;var t=this.$dragHandle().attr("draggable",!1).get(0);t.removeEventListener("dragstart",this.dragStartHandler,!1),t.removeEventListener("dragend",this.dragEndHandler,!1)},_dragStartHandler:function(t){return t.dataTransfer.effectAllowed="move",t.dataTransfer.setData("text",JSON.stringify(this.model.toJSON())),this.trigger("draggable:dragstart",t,this),!1},_dragEndHandler:function(t){return this.trigger("draggable:dragend",t,this),!1}},p={initialize:function(t){this.selectable=t.selectable||!1,this.selected=t.selected||!1},$selector:function(){return this.$(".selector")},_renderSelected:function(){this.$selector().find("span").toggleClass("fa-check-square-o",this.selected).toggleClass("fa-square-o",!this.selected)},toggleSelector:function(){this.$selector().is(":visible")?this.hideSelector():this.showSelector()},showSelector:function(t){t=void 0!==t?t:this.fxSpeed,this.selectable=!0,this.trigger("selectable",!0,this),this._renderSelected(),t?this.$selector().show(t):this.$selector().show()},hideSelector:function(t){t=void 0!==t?t:this.fxSpeed,this.selectable=!1,this.trigger("selectable",!1,this),t?this.$selector().hide(t):this.$selector().hide()},toggleSelect:function(t){this.selected?this.deselect(t):this.select(t)},select:function(t){return this.selected||(this.trigger("selected",this,t),this.selected=!0,this._renderSelected()),!1},deselect:function(t){return this.selected&&(this.trigger("de-selected",this,t),this.selected=!1,this._renderSelected()),!1}};return{LoggableMixin:l,SessionStorageModel:u,mixin:s,SearchableModelMixin:c,HiddenUntilActivatedViewMixin:h,DraggableViewMixin:d,SelectableViewMixin:p,wrapTemplate:r,buildComparator:a}}.apply(e,n),!(void 0!==s&&(t.exports=s))}).call(e,i(1))},,function(t,e,i){var n,s;(function(i,o,r){n=[],s=function(){var t=i.View.extend({className:"ui-modal",optionsDefault:{container:"body",title:"ui-modal",cls:"ui-modal",body:"",backdrop:!0,height:null,width:null,closing_events:!1,closing_callback:null,title_separator:!0},buttonList:{},initialize:function(t){this.options=o.defaults(t||{},this.optionsDefault),r(this.options.container).prepend(this.el),t&&this.render()},show:function(t){if(t&&(this.options=o.defaults(t,this.optionsDefault),
|
||
this.render()),!this.visible&&(this.visible=!0,this.$el.fadeIn("fast"),this.options.closing_events)){var e=this;r(document).on("keyup.ui-modal",function(t){27==t.keyCode&&e.hide(!0)}),this.$backdrop.on("click",function(){e.hide(!0)})}},hide:function(t){this.visible=!1,this.$el.fadeOut("fast"),this.options.closing_callback&&this.options.closing_callback(t),r(document).off("keyup.ui-modal"),this.$backdrop.off("click")},render:function(){var t=this;if(this.$el.html(this._template()),this.$header=this.$(".modal-header"),this.$dialog=this.$(".modal-dialog"),this.$body=this.$(".modal-body"),this.$footer=this.$(".modal-footer"),this.$backdrop=this.$(".modal-backdrop"),this.$buttons=this.$(".buttons"),"progress"==this.options.body&&(this.options.body=r('<div class="progress progress-striped active"><div class="progress-bar progress-bar-info" style="width:100%"/></div>')),this.$el.removeClass().addClass("modal").addClass(this.options.cls),this.$header.find(".title").html(this.options.title),this.$body.html(this.options.body),this.$buttons.empty(),this.buttonList={},this.options.buttons){var e=0;r.each(this.options.buttons,function(i,n){var s=r("<button/>").attr("id","button-"+e++).text(i).click(n);t.$buttons.append(s).append(" "),t.buttonList[i]=s})}else this.$footer.hide();this.$backdrop[this.options.backdrop&&"addClass"||"removeClass"]("in"),this.$header[!this.options.title_separator&&"addClass"||"removeClass"]("no-separator"),this.$body.removeAttr("style"),this.options.height?(this.$body.css("height",this.options.height),this.$body.css("overflow","hidden")):this.$body.css("max-height",r(window).height()/2),this.options.width&&this.$dialog.css("width",this.options.width)},getButton:function(t){return this.buttonList[t]},enableButton:function(t){this.getButton(t).prop("disabled",!1)},disableButton:function(t){this.getButton(t).prop("disabled",!0)},showButton:function(t){this.getButton(t).show()},hideButton:function(t){this.getButton(t).hide()},scrollTop:function(){return this.$body.scrollTop()},_template:function(){return'<div class="modal-backdrop fade"/><div class="modal-dialog"><div class="modal-content"><div class="modal-header"><h4 class="title"/></div><div class="modal-body"/><div class="modal-footer"><div class="buttons"/></div></div></div>'}});return{View:t}}.apply(e,n),!(void 0!==s&&(t.exports=s))}).call(e,i(3),i(2),i(1))},,,,,,,,,,,,,,,,,function(t,e,i){var n,s;(function(i,o){n=[],s=function(){var t=i.Model.extend({defaults:{activate:!1}}),e=i.Collection.extend({model:t}),n=i.View.extend({el:"#webhook-view",initialize:function(e){var i=this,n=e.toolId||"",s=e.toolVersion||"";this.$el.attr("tool_id",n),this.$el.attr("tool_version",s),this.model=new t,this.model.urlRoot=e.urlRoot,this.model.fetch({success:function(){i.render()}})},render:function(){var t=this.model.toJSON();return this.$el.html('<div id="'+t.name+'"></div>'),t.styles&&o("<style/>",{type:"text/css"}).text(t.styles).appendTo("head"),t.script&&o("<script/>",{type:"text/javascript"}).text(t.script).appendTo("head"),this}}),s=function(t){var i=new e;i.url=Galaxy.root+t.url,i.fetch({async:!t.async||t.async,success:t.callback})};return{Webhooks:e,WebhookView:n,add:s}}.apply(e,n),!(void 0!==s&&(t.exports=s))}).call(e,i(3),i(1))},,,,function(t,e,i){var n,s;(function(i,o,r){n=[],s=function(){var t=i.View.extend({initialize:function(t){this.model=t&&t.model||new i.Model(t),this.setElement(o("<div/>").addClass("corner frame")),this.$el.append(o("<div/>").addClass("f-header corner").append(o("<div/>").addClass("f-title")).append(o("<div/>").addClass("f-icon f-close fa fa-close").tooltip({title:"Close",placement:"bottom"}))).append(o("<div/>").addClass("f-content")).append(o("<div/>").addClass("f-resize f-icon corner fa fa-expand").tooltip({title:"Resize"})).append(o("<div/>").addClass("f-cover")),this.$header=this.$(".f-header"),this.$title=this.$(".f-title"),this.$content=this.$(".f-content"),this.render(),this.listenTo(this.model,"change",this.render,this)},render:function(){var t=this,e=this.model.attributes;this.$title.html(e.title||""),this.$header.find(".f-icon-left").remove(),r.each(e.menu,function(e){var i=o("<div/>").addClass("f-icon-left").addClass(e.icon);r.isFunction(e.disabled)&&e.disabled()?i.attr("disabled",!0):i.on("click",function(){e.onclick(t)}).tooltip({title:e.tooltip,placement:"bottom"}),t.$header.append(i)}),e.url?this.$content.html(o("<iframe/>").addClass("f-iframe").attr("scrolling","auto").attr("src",e.url+(e.url.indexOf("?")===-1?"?":"&")+"widget=True")):e.content&&(r.isFunction(e.content)?e.content(t.$content):t.$content.html(e.content))}}),e=i.View.extend({defaultOptions:{frame:{cols:6,rows:3},rows:1e3,cell:130,margin:5,scroll:5,top_min:40,frame_max:9,visible:!0},cols:0,top:0,top_max:0,frame_z:0,frame_counter:0,frame_uid:0,frame_list:{},frame_shadow:null,visible:!1,event:{},initialize:function(t){var e=this;this.options=r.defaults(t||{},this.defaultOptions),this.visible=this.options.visible,this.top=this.top_max=this.options.top_min,this.setElement(o("<div/>").addClass("galaxy-frame").append(o("<div/>").addClass("frame-background")).append(o("<div/>").addClass("frame-menu frame-scroll-up fa fa-chevron-up fa-2x")).append(o("<div/>").addClass("frame-menu frame-scroll-down fa fa-chevron-down fa-2x"))),this.frame_shadow=new i.View({el:o("<div/>").addClass("corner frame-shadow")}),this.$el.append(this.frame_shadow.$el),this._frameInit(this.frame_shadow,"#frame-shadow"),this._frameResize(this.frame_shadow,{width:0,height:0}),this.frame_list["#frame-shadow"]=this.frame_shadow,this.visible?this.show():this.hide(),this._panelRefresh(),o(window).resize(function(){e.visible&&e._panelRefresh()})},render:function(){this.$(".frame-scroll-up")[this.top!=this.options.top_min&&"show"||"hide"](),this.$(".frame-scroll-down")[this.top!=this.top_max&&"show"||"hide"]()},add:function(e){if(this.frame_counter>=this.options.frame_max)Galaxy.modal.show({title:"Warning",body:"You have reached the maximum number of allowed frames ("+this.options.frame_max+").",buttons:{Close:function(){Galaxy.modal.hide()}}});else{var i="#frame-"+this.frame_uid++;if(0!==o(i).length)Galaxy.modal.show({title:"Error",body:"This frame already exists. This page might contain multiple frame managers.",buttons:{Close:function(){Galaxy.modal.hide()}}});else{this.top=this.options.top_min;var n=new t(e);this.$el.append(n.$el),e.width=this._toPixelCoord("width",this.options.frame.cols),e.height=this._toPixelCoord("height",this.options.frame.rows),this.frame_z=parseInt(n.$el.css("z-index")),this.frame_list[i]=n,this.frame_counter++,this._frameInit(n,i),this._frameResize(n,{width:e.width,height:e.height}),this._frameInsert(n,{top:0,left:0},!0),!this.visible&&this.show(),this.trigger("add")}}},del:function(t){var e=this,i=t.$el;i.fadeOut("fast",function(){i.remove(),delete e.frame_list[t.id],e.frame_counter--,e._panelRefresh(!0),e._panelAnimationComplete(),e.trigger("remove")})},show:function(){this.visible=!0,this.$el.fadeIn("fast"),this.trigger("show")},hide:function(){this.event.type||(this.visible=!1,this.$el.fadeOut("fast",function(){o(this).hide()}),this.trigger("hide"))},length:function(){return this.frame_counter},events:{mousemove:"_eventFrameMouseMove",mouseup:"_eventFrameMouseUp",mouseleave:"_eventFrameMouseUp",mousewheel:"_eventPanelScroll",DOMMouseScroll:"_eventPanelScroll","mousedown .frame":"_eventFrameMouseDown","mousedown .frame-background":"_eventHide","mousedown .frame-scroll-up":"_eventPanelScroll_up","mousedown .frame-scroll-down":"_eventPanelScroll_down","mousedown .f-close":"_eventFrameClose"},_eventFrameMouseDown:function(t){o(".tooltip").hide(),this.event.type||((o(t.target).hasClass("f-header")||o(t.target).hasClass("f-title"))&&(this.event.type="drag"),o(t.target).hasClass("f-resize")&&(this.event.type="resize"),this.event.type&&(t.preventDefault(),this.event.target=this._frameIdentify(t.target),this.event.xy={x:t.originalEvent.pageX,y:t.originalEvent.pageY},this._frameDragStart(this.event.target)))},_eventFrameMouseMove:function(t){if(this.event.type){var e={x:t.originalEvent.pageX,y:t.originalEvent.pageY},i={x:e.x-this.event.xy.x,y:e.y-this.event.xy.y};this.event.xy=e;var n=this._frameScreen(this.event.target);if("resize"==this.event.type){n.width+=i.x,n.height+=i.y;var s=this.options.cell-this.options.margin-1;n.width=Math.max(n.width,s),n.height=Math.max(n.height,s),this._frameResize(this.event.target,n),n.width=this._toGridCoord("width",n.width)+1,n.height=this._toGridCoord("height",n.height)+1,n.width=this._toPixelCoord("width",n.width),n.height=this._toPixelCoord("height",n.height),this._frameResize(this.frame_shadow,n),this._frameInsert(this.frame_shadow,{top:this._toGridCoord("top",n.top),left:this._toGridCoord("left",n.left)})}else if("drag"==this.event.type){n.left+=i.x,n.top+=i.y,this._frameOffset(this.event.target,n);var o={top:this._toGridCoord("top",n.top),left:this._toGridCoord("left",n.left)};0!==o.left&&o.left++,this._frameInsert(this.frame_shadow,o)}}},_eventFrameMouseUp:function(t){this.event.type&&(this._frameDragStop(this.event.target),this.event.type=null)},_eventFrameClose:function(t){this.event.type||(t.preventDefault(),this.del(this._frameIdentify(t.target)))},_eventHide:function(t){!this.event.type&&this.hide()},_eventPanelScroll:function(t){if(!this.event.type&&this.visible){var e=o(t.srcElement).parents(".frame");0!==e.length?t.stopPropagation():(t.preventDefault(),this._panelScroll(t.originalEvent.detail?t.originalEvent.detail:t.originalEvent.wheelDelta/-3))}},_eventPanelScroll_up:function(t){this.event.type||(t.preventDefault(),this._panelScroll(-this.options.scroll))},_eventPanelScroll_down:function(t){this.event.type||(t.preventDefault(),this._panelScroll(this.options.scroll))},_frameIdentify:function(t){return this.frame_list["#"+o(t).closest(".frame").attr("id")]},_frameDragStart:function(t){this._frameFocus(t,!0);var e=this._frameScreen(t);this._frameResize(this.frame_shadow,e),this._frameGrid(this.frame_shadow,t.grid_location),t.grid_location=null,this.frame_shadow.$el.show(),o(".f-cover").show()},_frameDragStop:function(t){this._frameFocus(t,!1);var e=this._frameScreen(this.frame_shadow);this._frameResize(t,e),this._frameGrid(t,this.frame_shadow.grid_location,!0),this.frame_shadow.grid_location=null,this.frame_shadow.$el.hide(),o(".f-cover").hide(),this._panelAnimationComplete()},_toGridCoord:function(t,e){var i="width"==t||"height"==t?1:-1;return"top"==t&&(e-=this.top),parseInt((e+i*this.options.margin)/this.options.cell,10)},_toPixelCoord:function(t,e){var i="width"==t||"height"==t?1:-1,n=e*this.options.cell-i*this.options.margin;return"top"==t&&(n+=this.top),n},_toGrid:function(t){return{top:this._toGridCoord("top",t.top),left:this._toGridCoord("left",t.left),width:this._toGridCoord("width",t.width),height:this._toGridCoord("height",t.height)}},_toPixel:function(t){return{top:this._toPixelCoord("top",t.top),left:this._toPixelCoord("left",t.left),width:this._toPixelCoord("width",t.width),height:this._toPixelCoord("height",t.height)}},_isCollision:function(t){function e(t,e){return!(t.left>e.left+e.width-1||t.left+t.width-1<e.left||t.top>e.top+e.height-1||t.top+t.height-1<e.top)}for(var i in this.frame_list){var n=this.frame_list[i];if(null!==n.grid_location&&e(t,n.grid_location))return!0}return!1},_locationRank:function(t){return t.top*this.cols+t.left},_panelRefresh:function(t){this.cols=parseInt(o(window).width()/this.options.cell,10)+1,this._frameInsert(null,null,t)},_panelAnimationComplete:function(){var t=this;o(".frame").promise().done(function(){t._panelScroll(0,!0)})},_panelScroll:function(t,e){var i=this.top-this.options.scroll*t;if(i=Math.max(i,this.top_max),i=Math.min(i,this.options.top_min),this.top!=i){for(var n in this.frame_list){var s=this.frame_list[n];if(null!==s.grid_location){var o={top:s.screen_location.top-(this.top-i),left:s.screen_location.left};this._frameOffset(s,o,e)}}this.top=i}this.render()},_frameInit:function(t,e){t.id=e,t.screen_location={},t.grid_location={},t.grid_rank=null,t.$el.attr("id",e.substring(1))},_frameInsert:function(t,e,i){var n=this,s=[];t&&(t.grid_location=null,s.push([t,this._locationRank(e)])),r.each(this.frame_list,function(t){null!==t.grid_location&&(t.grid_location=null,s.push([t,t.grid_rank]))}),s.sort(function(t,e){return t[1]<e[1]?-1:t[1]>e[1]?1:0}),r.each(s,function(t){n._framePlace(t[0],i)}),this.top_max=0,r.each(this.frame_list,function(t){null!==t.grid_location&&(n.top_max=Math.max(n.top_max,t.grid_location.top+t.grid_location.height))}),this.top_max=o(window).height()-this.top_max*this.options.cell-2*this.options.margin,this.top_max=Math.min(this.top_max,this.options.top_min),this.render()},_framePlace:function(t,e){t.grid_location=null;for(var i=this._toGrid(this._frameScreen(t)),n=!1,s=0;s<this.options.rows;s++){for(var o=0;o<Math.max(1,this.cols-i.width);o++)if(i.top=s,i.left=o,!this._isCollision(i)){n=!0;break}if(n)break}n?this._frameGrid(t,i,e):console.log("Grid dimensions exceeded.")},_frameFocus:function(t,e){t.$el.css("z-index",this.frame_z+(e?1:0))},_frameOffset:function(t,e,i){if(t.screen_location.left=e.left,t.screen_location.top=e.top,i){this._frameFocus(t,!0);var n=this;t.$el.animate({top:e.top,left:e.left},"fast",function(){n._frameFocus(t,!1)})}else t.$el.css({top:e.top,left:e.left})},_frameResize:function(t,e){t.$el.css({width:e.width,height:e.height}),t.screen_location.width=e.width,t.screen_location.height=e.height},_frameGrid:function(t,e,i){t.grid_location=e,this._frameOffset(t,this._toPixel(e),i),t.grid_rank=this._locationRank(e)},_frameScreen:function(t){var e=t.screen_location;return{top:e.top,left:e.left,width:e.width,height:e.height}}});return{View:e}}.apply(e,n),!(void 0!==s&&(t.exports=s))}).call(e,i(3),i(1),i(2))},,,,function(t,e,i){var n,s;(function(o){n=[i(2),i(3),i(6),i(88),i(150),i(92),i(5)],s=function(t,e,i,n,s,r,a){function l(t,e){var i=this;return i._init(t||{},e||{})}r(l,"GalaxyApp");var u="galaxy:debug",c=u+":namespaces",h=!1;try{h="true"==localStorage.getItem(u)}catch(t){console.log(a("localStorage not available for debug flag retrieval"))}return l.prototype._init=function(i,n){var s=this;return t.extend(s,e.Events),h&&(s.logger=console,console.debug("debugging galaxy:","options:",i,"bootstrapped:",n)),s._processOptions(i),s.root=i.root||"/",s._initConfig(i.config||{}),s._patchGalaxy(window.Galaxy),s._initLogger(s.options.loggerOptions||{}),s.debug("GalaxyApp.options: ",s.options),s.debug("GalaxyApp.config: ",s.config),s.debug("GalaxyApp.logger: ",s.logger),s._initLocale(),s.debug("GalaxyApp.localize: ",s.localize),s.config=i.config||{},s.debug("GalaxyApp.config: ",s.config),s._initUser(i.user||{}),s.debug("GalaxyApp.user: ",s.user),s._setUpListeners(),s.trigger("ready",s),s},l.prototype.defaultOptions={patchExisting:!0,root:"/"},l.prototype._processOptions=function(t){var e=this,i=e.defaultOptions;e.options={};for(var n in i)i.hasOwnProperty(n)&&(e.options[n]=t.hasOwnProperty(n)?t[n]:i[n]);return e},l.prototype._initConfig=function(t){var e=this;return e.config=t,e.config.debug=h||e.config.debug,e},l.prototype._patchGalaxy=function(t){var e=this;if(e.options.patchExisting&&t)for(var i in t)t.hasOwnProperty(i)&&(e[i]=t[i])},l.prototype._initLogger=function(t){var e=this;if(e.config.debug){t.consoleLogger=t.consoleLogger||console,t.consoleLevel=t.consoleLevel||s.MetricsLogger.ALL;try{t.consoleNamespaceWhitelist=localStorage.getItem(c).split(",")}catch(t){}}return e.logger=new s.MetricsLogger(t),e.emit={},["log","debug","info","warn","error","metric"].map(function(t){e.emit[t]=function(i){e.logger.emit(t,arguments[0],Array.prototype.slice.call(arguments,1))}}),e.config.debug&&(i.LoggableMixin.logger=e.logger),e},l.prototype._initLocale=function(t){var e=this;return e.debug("_initLocale:",t),e.localize=a,window._l=e.localize,e},l.prototype._initUser=function(t){var e=this;return e.debug("_initUser:",t),e.user=new n.User(t),e.user.logger=e.logger,e},l.prototype._setUpListeners=function(){var t=this;return t.lastAjax={},o(document).bind("ajaxSend",function(e,i,n){var s=n.data;try{s=JSON.parse(s)}catch(t){}t.lastAjax={url:location.href.slice(0,-1)+n.url,data:s}}),t},l.prototype.debugging=function(t){var e=this;try{if(void 0===t)return"true"===localStorage.getItem(u);if(t)return localStorage.setItem(u,!0),!0;localStorage.removeItem(u),e.debuggingNamespaces(null)}catch(t){console.log(a("localStorage not available for debug flag retrieval"))}return!1},l.prototype.debuggingNamespaces=function(t){var e=this;try{if(void 0===t){var i=localStorage.getItem(c);return"string"==typeof i?i.split(","):[]}null===t?localStorage.removeItem(c):localStorage.setItem(c,t);var n=e.debuggingNamespaces();return e.logger&&(e.logger.options.consoleNamespaceWhitelist=n),n}catch(t){console.log(a("localStorage not available for debug namespace retrieval"))}},l.prototype.toString=function(){var t=this.user?this.user.get("email")||"(anonymous)":"uninitialized";return"GalaxyApp("+t+")"},{GalaxyApp:l}}.apply(e,n),!(void 0!==s&&(t.exports=s))}).call(e,i(1))},function(t,e,i){var n,s;(function(o,r,a){n=[i(99),i(35),i(8)],s=function(t,e,i){var n=o.View.extend({el:"body",className:"full-content",_panelids:["left","right"],initialize:function(n){var s=this;this.config=r.defaults(n.config||{},{message_box_visible:!1,message_box_content:"",message_box_class:"info",show_inactivity_warning:!1,inactivity_box_content:""}),Galaxy.modal=this.modal=new i.View,Galaxy.display=this.display=function(t){s.center.display(t)},Galaxy.router=this.router=n.Router&&new n.Router(s,n),this.masthead=new t.View(this.config),this.center=new e.CenterPanel,this.$el.attr("scroll","no"),this.$el.html(this._template()),this.$("#masthead").replaceWith(this.masthead.$el),this.$("#center").append(this.center.$el),this.$el.append(this.masthead.frame.$el),this.$el.append(this.modal.$el),this.$messagebox=this.$("#messagebox"),this.$inactivebox=this.$("#inactivebox"),this.panels={},r.each(this._panelids,function(t){var i=t.charAt(0).toUpperCase()+t.slice(1),o=n[i];if(o){var r=new o(s,n);s[r.toString()]=r,s.panels[t]=new e.SidePanel({id:t,el:s.$("#"+t),view:r})}}),this.render()},render:function(){return a(".select2-hidden-accessible").remove(),this.masthead.render(),this.renderMessageBox(),this.renderInactivityBox(),this.renderPanels(),this._checkCommunicationServerOnline(),this},renderMessageBox:function(){if(this.config.message_box_visible){var t=this.config.message_box_content||"",e=this.config.message_box_class||"info";this.$el.addClass("has-message-box"),this.$messagebox.attr("class","panel-"+e+"-message").html(t).toggle(!!t).show()}else this.$el.removeClass("has-message-box"),this.$messagebox.hide();return this},renderInactivityBox:function(){if(this.config.show_inactivity_warning){var t=this.config.inactivity_box_content||"",e=a("<a/>").attr("href",Galaxy.root+"user/resend_verification").text("Resend verification");this.$el.addClass("has-inactivity-box"),this.$inactivebox.html(t+" ").append(e).toggle(!!t).show()}else this.$el.removeClass("has-inactivity-box"),this.$inactivebox.hide();return this},renderPanels:function(){var t=this;return r.each(this._panelids,function(e){var i=t.panels[e];i?i.render():(t.$("#center").css(e,0),t.$("#"+e).hide())}),this},_template:function(){return['<div id="everything">','<div id="background"/>','<div id="masthead"/>','<div id="messagebox"/>','<div id="inactivebox" class="panel-warning-message" />','<div id="left" />','<div id="center" class="inbound" />','<div id="right" />',"</div>",'<div id="dd-helper" />'].join("")},toString:function(){return"PageLayoutView"},_checkCommunicationServerOnline:function(){var t=window.Galaxy.config.communication_server_host,e=window.Galaxy.config.communication_server_port,i=window.Galaxy.user.attributes.preferences,n=a("#show-chat-online");i&&["1","true"].indexOf(i.communication_server)!=-1?a.ajax({url:t+":"+e}).success(function(t){null!==window.Galaxy.user.id&&"hidden"===n.css("visibility")&&n.css("visibility","visible")}).error(function(t){n.css("visibility","hidden")}):n.css("visibility","hidden")}});return{View:n}}.apply(e,n),!(void 0!==s&&(t.exports=s))}).call(e,i(3),i(2),i(1))},function(t,e,i){var n,s;n=[i(1),i(2),i(3)],s=function(t,e,i){"use strict";var n=160,s=800,o=i.View.extend({initialize:function(t){this.view=t.view,this.hidden=!1,this.saved_size=null,this.hiddenByTool=!1},$center:function(){return this.$el.siblings("#center")},$toggleButton:function(){return this.$(".unified-panel-footer > .panel-collapse")},render:function(){var t=this,i=this.view,n=this.view.model.attributes||{};this.$el.html(this._templatePanel(this.id)),e.each(n.buttons,function(e){t.$(".panel-header-buttons").append(e.$el)}),this.$el.addClass(n.cls),this.$(".panel-header-text").html(e.escape(n.title)),this.$(".unified-panel-body").append(i.$el),i.render()},_templatePanel:function(){return[this._templateHeader(),this._templateBody(),this._templateFooter()].join("")},_templateHeader:function(t){return['<div class="unified-panel-header" unselectable="on">','<div class="unified-panel-header-inner">','<div class="panel-header-buttons" style="float: right"/>','<div class="panel-header-text"/>',"</div>","</div>"].join("")},_templateBody:function(t){return'<div class="unified-panel-body"/>'},_templateFooter:function(t){return['<div class="unified-panel-footer">','<div class="panel-collapse ',e.escape(this.id),'"/>','<div class="drag"/>',"</div>"].join("")},events:{"mousedown .unified-panel-footer > .drag":"_mousedownDragHandler","click .unified-panel-footer > .panel-collapse":"toggle"},_mousedownDragHandler:function(e){function i(t){var e=t.pageX-a;a=t.pageX;var i=o.$el.width(),l=r?i+e:i-e;l=Math.min(s,Math.max(n,l)),o.resize(l)}var o=this,r="left"===this.id,a=e.pageX;t("#dd-helper").show().on("mousemove",i).one("mouseup",function(e){t(this).hide().off("mousemove",i)})},resize:function(t){return this.$el.css("width",t),this.$center().css(this.id,t),this},show:function(){if(this.hidden){var t=this,e={},i=this.id;return e[i]=0,t.$el.css(i,-this.saved_size).show().animate(e,"fast",function(){t.resize(t.saved_size)}),t.hidden=!1,t.$toggleButton().removeClass("hidden"),this}},hide:function(){if(!this.hidden){var t={},e=this.id;return this.saved_size=this.$el.width(),t[e]=-this.saved_size,this.$el.animate(t,"fast"),this.$center().css(e,0),this.hidden=!0,this.$toggleButton().addClass("hidden"),this}},toggle:function(t){return this.hidden?this.show():this.hide(),this.hiddenByTool=!1,this},handle_minwidth_hint:function(t){var e=this.$center().width()-(this.hidden?this.saved_size:0);return e<t?this.hidden||(this.toggle(),this.hiddenByTool=!0):this.hiddenByTool&&(this.toggle(),this.hiddenByTool=!1),self},force_panel:function(t){return"show"==t?this.show():"hide"==t?this.hide():self},toString:function(){return"SidePanel("+this.id+")"}}),r=o.extend({id:"left"}),a=o.extend({id:"right"}),l=i.View.extend({initialize:function(i){this.setElement(t(this.template())),this.$frame=this.$(".center-frame"),this.$panel=this.$(".center-panel"),this.$frame.on("load",e.bind(this._iframeChangeHandler,this))},_iframeChangeHandler:function(e){var i=e.currentTarget,n=i.contentWindow&&i.contentWindow.location;n&&n.host&&(t(i).show(),this.$panel.empty().hide(),Galaxy.trigger("center-frame:load",{fullpath:n.pathname+n.search+n.hash,pathname:n.pathname,search:n.search,hash:n.hash}))},display:function(t){var e=this.$frame[0].contentWindow||{},i=e.onbeforeunload&&e.onbeforeunload();i&&!confirm(i)||(e.onbeforeunload=void 0,this.$frame.attr("src","about:blank").hide(),this.$panel.empty().scrollTop(0).append(t.$el).show(),Galaxy.trigger("center-panel:load",t))},template:function(){return'<div class="center-container"><iframe id="galaxy_main" name="galaxy_main" frameborder="0" class="center-frame" /><div class="center-panel" /></div>'},toString:function(){return"CenterPanel"}});return{SidePanel:o,LeftPanel:r,RightPanel:a,CenterPanel:l}}.apply(e,n),!(void 0!==s&&(t.exports=s))},,,,,,,,,,,,,,,,,,,,,,,,,,,,,function(t,e,i){var n,s;n=[],s=function(){function t(t,e){e=e||window.location.search.substr(1);var i=new RegExp(t+"=([^&#$]+)"),n=e.match(i);if(n&&n.length)return n=n.splice(1),1===n.length?n[0]:n}function e(t){if(!t)return{};var e={},i=t.split("&");return i.forEach(function(t){var i=t.split("=");e[i[0]]=decodeURI(i[1])}),e}return{get:t,parse:e}}.apply(e,n),!(void 0!==s&&(t.exports=s))},,function(t,e,i){var n,s;n=[i(1)],s=function(t){"use strict";function e(){a.hide()}function i(t,e,i,n,s){a.setContent({title:t,body:e,buttons:i,extra_buttons:n}),a.show({backdrop:!0},s)}function n(t,e,i,n,s){a.setContent({title:t,body:e,buttons:i,extra_buttons:n}),a.show({backdrop:!1},s)}function s(t){var i=t.width||"600",n=t.height||"400",s=t.scroll||"auto";o("#overlay-background").bind("click.overlay",function(){e(),o("#overlay-background").unbind("click.overlay")}),a.setContent({closeButton:!0,title:" ",body:o("<div style='margin: -5px;'><iframe style='margin: 0; padding: 0;' src='"+t.url+"' width='"+i+"' height='"+n+"' scrolling='"+s+"' frameborder='0'></iframe></div>")}),a.show({backdrop:!0})}var o=t,r=function(t){this.$overlay=t.overlay,this.$dialog=t.dialog,this.$header=this.$dialog.find(".modal-header"),this.$body=this.$dialog.find(".modal-body"),this.$footer=this.$dialog.find(".modal-footer"),this.$backdrop=t.backdrop,this.$header.find(".close").on("click",o.proxy(this.hide,this))};o.extend(r.prototype,{setContent:function(t){this.$header.hide(),t.title&&(this.$header.find(".title").html(t.title),this.$header.show()),t.closeButton?(this.$header.find(".close").show(),this.$header.show()):this.$header.find(".close").hide(),this.$footer.hide();var e=this.$footer.find(".buttons").html("");t.buttons&&(o.each(t.buttons,function(t,i){e.append(o("<button></button> ").text(t).click(i)).append(" ")}),this.$footer.show());var i=this.$footer.find(".extra_buttons").html("");t.extra_buttons&&(o.each(t.extra_buttons,function(t,e){i.append(o("<button></button>").text(t).click(e)).append(" ")}),this.$footer.show());var n=t.body;"progress"==n&&(n=o("<div class='progress progress-striped active'><div class='progress-bar' style='width: 100%'></div></div>")),this.$body.html(n)},show:function(t,e){this.$dialog.is(":visible")||(t.backdrop?this.$backdrop.addClass("in"):this.$backdrop.removeClass("in"),this.$overlay.show(),this.$dialog.show(),this.$overlay.addClass("in"),this.$body.css("min-width",this.$body.width()),this.$body.css("max-height",o(window).height()-this.$footer.outerHeight()-this.$header.outerHeight()-parseInt(this.$dialog.css("padding-top"),10)-parseInt(this.$dialog.css("padding-bottom"),10))),e&&e()},hide:function(){var t=this;t.$dialog.fadeOut(function(){t.$overlay.hide(),t.$backdrop.removeClass("in"),t.$body.children().remove(),t.$body.css("min-width",void 0)})}});var a;return o(function(){a=new r({overlay:o("#top-modal"),dialog:o("#top-modal-dialog"),backdrop:o("#top-modal-backdrop")})}),{Modal:r,hide_modal:e,show_modal:i,show_message:n,show_in_overlay:s}}.apply(e,n),!(void 0!==s&&(t.exports=s))},function(t,e,i){(function(t){!function(t,e){var i,n;return n=e.document,i=function(){function i(i){var n;try{n=e.localStorage}catch(t){n=!1}this._options=t.extend({name:"tour",steps:[],container:"body",autoscroll:!0,keyboard:!0,storage:n,debug:!1,backdrop:!1,backdropContainer:"body",backdropPadding:0,redirect:!0,orphan:!1,duration:!1,delay:!1,basePath:"",template:'<div class="popover" role="tooltip"> <div class="arrow"></div> <h3 class="popover-title"></h3> <div class="popover-content"></div> <div class="popover-navigation"> <div class="btn-group"> <button class="btn btn-sm btn-default" data-role="prev">« Prev</button> <button class="btn btn-sm btn-default" data-role="next">Next »</button> <button class="btn btn-sm btn-default" data-role="pause-resume" data-pause-text="Pause" data-resume-text="Resume">Pause</button> </div> <button class="btn btn-sm btn-default" data-role="end">End tour</button> </div> </div>',afterSetState:function(t,e){},afterGetState:function(t,e){},afterRemoveState:function(t){},onStart:function(t){},onEnd:function(t){},onShow:function(t){},onShown:function(t){},onHide:function(t){},onHidden:function(t){},onNext:function(t){},onPrev:function(t){},onPause:function(t,e){},onResume:function(t,e){},onRedirectError:function(t){}},i),this._force=!1,this._inited=!1,this._current=null,this.backdrop={overlay:null,$element:null,$background:null,backgroundShown:!1,overlayElementShown:!1}}return i.prototype.addSteps=function(t){var e,i,n;for(i=0,n=t.length;i<n;i++)e=t[i],this.addStep(e);return this},i.prototype.addStep=function(t){return this._options.steps.push(t),this},i.prototype.getStep=function(e){if(null!=this._options.steps[e])return t.extend({id:"step-"+e,path:"",host:"",placement:"right",title:"",content:"<p></p>",next:e===this._options.steps.length-1?-1:e+1,prev:e-1,animation:!0,container:this._options.container,autoscroll:this._options.autoscroll,backdrop:this._options.backdrop,backdropContainer:this._options.backdropContainer,backdropPadding:this._options.backdropPadding,redirect:this._options.redirect,reflexElement:this._options.steps[e].element,orphan:this._options.orphan,duration:this._options.duration,delay:this._options.delay,template:this._options.template,onShow:this._options.onShow,onShown:this._options.onShown,onHide:this._options.onHide,onHidden:this._options.onHidden,onNext:this._options.onNext,onPrev:this._options.onPrev,onPause:this._options.onPause,onResume:this._options.onResume,onRedirectError:this._options.onRedirectError},this._options.steps[e])},i.prototype.init=function(t){return this._force=t,this.ended()?(this._debug("Tour ended, init prevented."),this):(this.setCurrentStep(),this._initMouseNavigation(),this._initKeyboardNavigation(),this._onResize(function(t){return function(){return t.showStep(t._current)}}(this)),null!==this._current&&this.showStep(this._current),this._inited=!0,this)},i.prototype.start=function(t){var e;return null==t&&(t=!1),this._inited||this.init(t),null===this._current&&(e=this._makePromise(null!=this._options.onStart?this._options.onStart(this):void 0),this._callOnPromiseDone(e,this.showStep,0)),this},i.prototype.next=function(){var t;return t=this.hideStep(this._current),this._callOnPromiseDone(t,this._showNextStep)},i.prototype.prev=function(){var t;return t=this.hideStep(this._current),this._callOnPromiseDone(t,this._showPrevStep)},i.prototype.goTo=function(t){var e;return e=this.hideStep(this._current),this._callOnPromiseDone(e,this.showStep,t)},i.prototype.end=function(){var i,s;return i=function(i){return function(s){if(t(n).off("click.tour-"+i._options.name),t(n).off("keyup.tour-"+i._options.name),t(e).off("resize.tour-"+i._options.name),i._setState("end","yes"),i._inited=!1,i._force=!1,i._clearTimer(),null!=i._options.onEnd)return i._options.onEnd(i)}}(this),s=this.hideStep(this._current),this._callOnPromiseDone(s,i)},i.prototype.ended=function(){return!this._force&&!!this._getState("end")},i.prototype.restart=function(){return this._removeState("current_step"),this._removeState("end"),this._removeState("redirect_to"),this.start()},i.prototype.pause=function(){var t;return t=this.getStep(this._current),t&&t.duration?(this._paused=!0,this._duration-=(new Date).getTime()-this._start,e.clearTimeout(this._timer),this._debug("Paused/Stopped step "+(this._current+1)+" timer ("+this._duration+" remaining)."),null!=t.onPause?t.onPause(this,this._duration):void 0):this},i.prototype.resume=function(){var t;return t=this.getStep(this._current),t&&t.duration?(this._paused=!1,this._start=(new Date).getTime(),this._duration=this._duration||t.duration,this._timer=e.setTimeout(function(t){return function(){return t._isLast()?t.next():t.end()}}(this),this._duration),this._debug("Started step "+(this._current+1)+" timer with duration "+this._duration),null!=t.onResume&&this._duration!==t.duration?t.onResume(this,this._duration):void 0):this},i.prototype.hideStep=function(e){var i,n,s;if(s=this.getStep(e))return this._clearTimer(),
|
||
n=this._makePromise(null!=s.onHide?s.onHide(this,e):void 0),i=function(i){return function(n){var o;if(o=t(s.element),o.data("bs.popover")||o.data("popover")||(o=t("body")),o.popover("destroy").removeClass("tour-"+i._options.name+"-element tour-"+i._options.name+"-"+e+"-element"),o.removeData("bs.popover"),s.reflex&&t(s.reflexElement).removeClass("tour-step-element-reflex").off(""+i._reflexEvent(s.reflex)+".tour-"+i._options.name),s.backdrop&&i._hideBackdrop(),null!=s.onHidden)return s.onHidden(i)}}(this),this._callOnPromiseDone(n,i),n},i.prototype.showStep=function(t){var i,s,o,r;return this.ended()?(this._debug("Tour ended, showStep prevented."),this):(r=this.getStep(t))?(o=t<this._current,i=this._makePromise(null!=r.onShow?r.onShow(this,t):void 0),s=function(e){return function(i){var s,a;if(e.setCurrentStep(t),s=function(){switch({}.toString.call(r.path)){case"[object Function]":return r.path();case"[object String]":return this._options.basePath+r.path;default:return r.path}}.call(e),!e._isRedirect(r.host,s,n.location)||(e._redirect(r,t,s),e._isJustPathHashDifferent(r.host,s,n.location))){if(e._isOrphan(r)){if(r.orphan===!1)return e._debug("Skip the orphan step "+(e._current+1)+".\nOrphan option is false and the element does not exist or is hidden."),void(o?e._showPrevStep():e._showNextStep());e._debug("Show the orphan step "+(e._current+1)+". Orphans option is true.")}return r.backdrop&&e._showBackdrop(r),a=function(){if(e.getCurrentStep()===t&&!e.ended())return null!=r.element&&r.backdrop&&e._showOverlayElement(r),e._showPopover(r,t),null!=r.onShown&&r.onShown(e),e._debug("Step "+(e._current+1)+" of "+e._options.steps.length)},r.autoscroll?e._scrollIntoView(r.element,a):a(),r.duration?e.resume():void 0}}}(this),r.delay?(this._debug("Wait "+r.delay+" milliseconds to show the step "+(this._current+1)),e.setTimeout(function(t){return function(){return t._callOnPromiseDone(i,s)}}(this),r.delay)):this._callOnPromiseDone(i,s),i):void 0},i.prototype.getCurrentStep=function(){return this._current},i.prototype.setCurrentStep=function(t){return null!=t?(this._current=t,this._setState("current_step",t)):(this._current=this._getState("current_step"),this._current=null===this._current?null:parseInt(this._current,10)),this},i.prototype.redraw=function(){return this._showOverlayElement(this.getStep(this.getCurrentStep()).element,!0)},i.prototype._setState=function(t,e){var i,n;if(this._options.storage){n=""+this._options.name+"_"+t;try{this._options.storage.setItem(n,e)}catch(t){i=t,i.code===DOMException.QUOTA_EXCEEDED_ERR&&this._debug("LocalStorage quota exceeded. State storage failed.")}return this._options.afterSetState(n,e)}return null==this._state&&(this._state={}),this._state[t]=e},i.prototype._removeState=function(t){var e;return this._options.storage?(e=""+this._options.name+"_"+t,this._options.storage.removeItem(e),this._options.afterRemoveState(e)):null!=this._state?delete this._state[t]:void 0},i.prototype._getState=function(t){var e,i;return this._options.storage?(e=""+this._options.name+"_"+t,i=this._options.storage.getItem(e)):null!=this._state&&(i=this._state[t]),void 0!==i&&"null"!==i||(i=null),this._options.afterGetState(t,i),i},i.prototype._showNextStep=function(){var t,e,i;return i=this.getStep(this._current),e=function(t){return function(e){return t.showStep(i.next)}}(this),t=this._makePromise(null!=i.onNext?i.onNext(this):void 0),this._callOnPromiseDone(t,e)},i.prototype._showPrevStep=function(){var t,e,i;return i=this.getStep(this._current),e=function(t){return function(e){return t.showStep(i.prev)}}(this),t=this._makePromise(null!=i.onPrev?i.onPrev(this):void 0),this._callOnPromiseDone(t,e)},i.prototype._debug=function(t){if(this._options.debug)return e.console.log("Bootstrap Tour '"+this._options.name+"' | "+t)},i.prototype._isRedirect=function(t,e,i){var n;return!(""===t||!this._isHostDifferent(t,i.href))||(n=[i.pathname,i.search,i.hash].join(""),null!=e&&""!==e&&("[object RegExp]"==={}.toString.call(e)&&!e.test(n)||"[object String]"==={}.toString.call(e)&&this._isPathDifferent(e,n)))},i.prototype._isHostDifferent=function(t,e){return this._getProtocol(t)!==this._getProtocol(e)||this._getHost(t)!==this._getHost(e)},i.prototype._isPathDifferent=function(t,e){return this._getPath(t)!==this._getPath(e)||!this._equal(this._getQuery(t),this._getQuery(e))||!this._equal(this._getHash(t),this._getHash(e))},i.prototype._isJustPathHashDifferent=function(t,e,i){var n;return(""===t||!this._isHostDifferent(t,i.href))&&(n=[i.pathname,i.search,i.hash].join(""),"[object String]"==={}.toString.call(e)&&(this._getPath(e)===this._getPath(n)&&this._equal(this._getQuery(e),this._getQuery(n))&&!this._equal(this._getHash(e),this._getHash(n))))},i.prototype._redirect=function(e,i,s){if(t.isFunction(e.redirect))return e.redirect.call(this,s);if(e.redirect===!0){if(this._debug("Redirect to "+e.host+s),this._getState("redirect_to")!==""+i)return this._setState("redirect_to",""+i),n.location.href=""+e.host+s;if(this._debug("Error redirection loop to "+s),this._removeState("redirect_to"),null!=e.onRedirectError)return e.onRedirectError(this)}},i.prototype._isOrphan=function(e){return null==e.element||!t(e.element).length||t(e.element).is(":hidden")&&"http://www.w3.org/2000/svg"!==t(e.element)[0].namespaceURI},i.prototype._isLast=function(){return this._current<this._options.steps.length-1},i.prototype._showPopover=function(e,i){var n,s,o,r,a;if(t(".tour-"+this._options.name).remove(),r=t.extend({},this._options),o=this._isOrphan(e),e.template=this._template(e,i),o&&(e.element="body",e.placement="top"),n=t(e.element),n.addClass("tour-"+this._options.name+"-element tour-"+this._options.name+"-"+i+"-element"),e.options&&t.extend(r,e.options),e.reflex&&!o&&t(e.reflexElement).addClass("tour-step-element-reflex").off(""+this._reflexEvent(e.reflex)+".tour-"+this._options.name).on(""+this._reflexEvent(e.reflex)+".tour-"+this._options.name,function(t){return function(){return t._isLast()?t.next():t.end()}}(this)),a=e.smartPlacement===!0&&e.placement.search(/auto/i)===-1,n.popover({placement:a?"auto "+e.placement:e.placement,trigger:"manual",title:e.title,content:e.content,html:!0,animation:e.animation,container:e.container,template:e.template,selector:e.element}).popover("show"),s=n.data("bs.popover")?n.data("bs.popover").tip():n.data("popover").tip(),s.attr("id",e.id),this._reposition(s,e),o)return this._center(s)},i.prototype._template=function(e,i){var n,s,o,r,a,l;return l=e.template,this._isOrphan(e)&&"[object Boolean]"!=={}.toString.call(e.orphan)&&(l=e.orphan),a=t(t.isFunction(l)?l(i,e):l),n=a.find(".popover-navigation"),o=n.find('[data-role="prev"]'),s=n.find('[data-role="next"]'),r=n.find('[data-role="pause-resume"]'),this._isOrphan(e)&&a.addClass("orphan"),a.addClass("tour-"+this._options.name+" tour-"+this._options.name+"-"+i),e.reflex&&a.addClass("tour-"+this._options.name+"-reflex"),e.prev<0&&(o.addClass("disabled"),o.prop("disabled",!0)),e.next<0&&(s.addClass("disabled"),s.prop("disabled",!0)),e.duration||r.remove(),a.clone().wrap("<div>").parent().html()},i.prototype._reflexEvent=function(t){return"[object Boolean]"==={}.toString.call(t)?"click":t},i.prototype._reposition=function(e,i){var s,o,r,a,l,u,c;if(a=e[0].offsetWidth,o=e[0].offsetHeight,c=e.offset(),l=c.left,u=c.top,s=t(n).outerHeight()-c.top-e.outerHeight(),s<0&&(c.top=c.top+s),r=t("html").outerWidth()-c.left-e.outerWidth(),r<0&&(c.left=c.left+r),c.top<0&&(c.top=0),c.left<0&&(c.left=0),e.offset(c),"bottom"===i.placement||"top"===i.placement){if(l!==c.left)return this._replaceArrow(e,2*(c.left-l),a,"left")}else if(u!==c.top)return this._replaceArrow(e,2*(c.top-u),o,"top")},i.prototype._center=function(i){return i.css("top",t(e).outerHeight()/2-i.outerHeight()/2)},i.prototype._replaceArrow=function(t,e,i,n){return t.find(".arrow").css(n,e?50*(1-e/i)+"%":"")},i.prototype._scrollIntoView=function(i,n){var s,o,r,a,l,u;return s=t(i),s.length?(o=t(e),a=s.offset().top,u=o.height(),l=Math.max(0,a-u/2),this._debug("Scroll into view. ScrollTop: "+l+". Element offset: "+a+". Window height: "+u+"."),r=0,t("body, html").stop(!0,!0).animate({scrollTop:Math.ceil(l)},function(t){return function(){if(2===++r)return n(),t._debug("Scroll into view.\nAnimation end element offset: "+s.offset().top+".\nWindow height: "+o.height()+".")}}(this))):n()},i.prototype._onResize=function(i,n){return t(e).on("resize.tour-"+this._options.name,function(){return clearTimeout(n),n=setTimeout(i,100)})},i.prototype._initMouseNavigation=function(){var e;return e=this,t(n).off("click.tour-"+this._options.name,".popover.tour-"+this._options.name+" *[data-role='prev']").off("click.tour-"+this._options.name,".popover.tour-"+this._options.name+" *[data-role='next']").off("click.tour-"+this._options.name,".popover.tour-"+this._options.name+" *[data-role='end']").off("click.tour-"+this._options.name,".popover.tour-"+this._options.name+" *[data-role='pause-resume']").on("click.tour-"+this._options.name,".popover.tour-"+this._options.name+" *[data-role='next']",function(t){return function(e){return e.preventDefault(),t.next()}}(this)).on("click.tour-"+this._options.name,".popover.tour-"+this._options.name+" *[data-role='prev']",function(t){return function(e){return e.preventDefault(),t.prev()}}(this)).on("click.tour-"+this._options.name,".popover.tour-"+this._options.name+" *[data-role='end']",function(t){return function(e){return e.preventDefault(),t.end()}}(this)).on("click.tour-"+this._options.name,".popover.tour-"+this._options.name+" *[data-role='pause-resume']",function(i){var n;return i.preventDefault(),n=t(this),n.text(e._paused?n.data("pause-text"):n.data("resume-text")),e._paused?e.resume():e.pause()})},i.prototype._initKeyboardNavigation=function(){if(this._options.keyboard)return t(n).on("keyup.tour-"+this._options.name,function(t){return function(e){if(e.which)switch(e.which){case 39:return e.preventDefault(),t._isLast()?t.next():t.end();case 37:if(e.preventDefault(),t._current>0)return t.prev();break;case 27:return e.preventDefault(),t.end()}}}(this))},i.prototype._makePromise=function(e){return e&&t.isFunction(e.then)?e:null},i.prototype._callOnPromiseDone=function(t,e,i){return t?t.then(function(t){return function(n){return e.call(t,i)}}(this)):e.call(this,i)},i.prototype._showBackdrop=function(e){if(!this.backdrop.backgroundShown)return this.backdrop=t("<div>",{class:"tour-backdrop"}),this.backdrop.backgroundShown=!0,t(e.backdropContainer).append(this.backdrop)},i.prototype._hideBackdrop=function(){return this._hideOverlayElement(),this._hideBackground()},i.prototype._hideBackground=function(){if(this.backdrop)return this.backdrop.remove(),this.backdrop.overlay=null,this.backdrop.backgroundShown=!1},i.prototype._showOverlayElement=function(e,i){var n,s;if(n=t(e.element),n&&0!==n.length&&(!this.backdrop.overlayElementShown||i))return this.backdrop.overlayElementShown||(this.backdrop.$element=n.addClass("tour-step-backdrop"),this.backdrop.$background=t("<div>",{class:"tour-step-background"}),this.backdrop.$background.appendTo(e.backdropContainer),this.backdrop.overlayElementShown=!0),s={width:n.innerWidth(),height:n.innerHeight(),offset:n.offset()},e.backdropPadding&&(s=this._applyBackdropPadding(e.backdropPadding,s)),this.backdrop.$background.width(s.width).height(s.height).offset(s.offset)},i.prototype._hideOverlayElement=function(){if(this.backdrop.overlayElementShown)return this.backdrop.$element.removeClass("tour-step-backdrop"),this.backdrop.$background.remove(),this.backdrop.$element=null,this.backdrop.$background=null,this.backdrop.overlayElementShown=!1},i.prototype._applyBackdropPadding=function(t,e){return"object"==typeof t?(null==t.top&&(t.top=0),null==t.right&&(t.right=0),null==t.bottom&&(t.bottom=0),null==t.left&&(t.left=0),e.offset.top=e.offset.top-t.top,e.offset.left=e.offset.left-t.left,e.width=e.width+t.left+t.right,e.height=e.height+t.top+t.bottom):(e.offset.top=e.offset.top-t,e.offset.left=e.offset.left-t,e.width=e.width+2*t,e.height=e.height+2*t),e},i.prototype._clearTimer=function(){return e.clearTimeout(this._timer),this._timer=null,this._duration=null},i.prototype._getProtocol=function(t){return t=t.split("://"),t.length>1?t[0]:"http"},i.prototype._getHost=function(t){return t=t.split("//"),t=t.length>1?t[1]:t[0],t.split("/")[0]},i.prototype._getPath=function(t){return t.replace(/\/?$/,"").split("?")[0].split("#")[0]},i.prototype._getQuery=function(t){return this._getParams(t,"?")},i.prototype._getHash=function(t){return this._getParams(t,"#")},i.prototype._getParams=function(t,e){var i,n,s,o,r;if(n=t.split(e),1===n.length)return{};for(n=n[1].split("&"),s={},o=0,r=n.length;o<r;o++)i=n[o],i=i.split("="),s[i[0]]=i[1]||"";return s},i.prototype._equal=function(t,e){var i,n;if("[object Object]"==={}.toString.call(t)&&"[object Object]"==={}.toString.call(e)){for(i in t)if(n=t[i],e[i]!==n)return!1;for(i in e)if(n=e[i],t[i]!==n)return!1;return!0}return t===e},i}(),e.Tour=i}(t,window)}).call(e,i(1))},function(t,e,i){(function(t){/*! jQuery UI - v1.9.1 - 2012-10-29
|
||
* http://jqueryui.com
|
||
* Includes: jquery.ui.core.js, jquery.ui.widget.js, jquery.ui.mouse.js, jquery.ui.position.js, jquery.ui.autocomplete.js, jquery.ui.button.js, jquery.ui.menu.js, jquery.ui.slider.js
|
||
* Copyright (c) 2012 jQuery Foundation and other contributors Licensed MIT */
|
||
!function(t,e){function i(e,i){var s,o,r,a=e.nodeName.toLowerCase();return"area"===a?(s=e.parentNode,o=s.name,!(!e.href||!o||"map"!==s.nodeName.toLowerCase())&&(r=t("img[usemap=#"+o+"]")[0],!!r&&n(r))):(/input|select|textarea|button|object/.test(a)?!e.disabled:"a"===a?e.href||i:i)&&n(e)}function n(e){return t.expr.filters.visible(e)&&!t(e).parents().andSelf().filter(function(){return"hidden"===t.css(this,"visibility")}).length}var s=0,o=/^ui-id-\d+$/;t.ui=t.ui||{},t.ui.version||(t.extend(t.ui,{version:"1.9.1",keyCode:{BACKSPACE:8,COMMA:188,DELETE:46,DOWN:40,END:35,ENTER:13,ESCAPE:27,HOME:36,LEFT:37,NUMPAD_ADD:107,NUMPAD_DECIMAL:110,NUMPAD_DIVIDE:111,NUMPAD_ENTER:108,NUMPAD_MULTIPLY:106,NUMPAD_SUBTRACT:109,PAGE_DOWN:34,PAGE_UP:33,PERIOD:190,RIGHT:39,SPACE:32,TAB:9,UP:38}}),t.fn.extend({_focus:t.fn.focus,focus:function(e,i){return"number"==typeof e?this.each(function(){var n=this;setTimeout(function(){t(n).focus(),i&&i.call(n)},e)}):this._focus.apply(this,arguments)},scrollParent:function(){var e;return e=t.ui.ie&&/(static|relative)/.test(this.css("position"))||/absolute/.test(this.css("position"))?this.parents().filter(function(){return/(relative|absolute|fixed)/.test(t.css(this,"position"))&&/(auto|scroll)/.test(t.css(this,"overflow")+t.css(this,"overflow-y")+t.css(this,"overflow-x"))}).eq(0):this.parents().filter(function(){return/(auto|scroll)/.test(t.css(this,"overflow")+t.css(this,"overflow-y")+t.css(this,"overflow-x"))}).eq(0),/fixed/.test(this.css("position"))||!e.length?t(document):e},zIndex:function(i){if(i!==e)return this.css("zIndex",i);if(this.length)for(var n,s,o=t(this[0]);o.length&&o[0]!==document;){if(n=o.css("position"),("absolute"===n||"relative"===n||"fixed"===n)&&(s=parseInt(o.css("zIndex"),10),!isNaN(s)&&0!==s))return s;o=o.parent()}return 0},uniqueId:function(){return this.each(function(){this.id||(this.id="ui-id-"+ ++s)})},removeUniqueId:function(){return this.each(function(){o.test(this.id)&&t(this).removeAttr("id")})}}),t("<a>").outerWidth(1).jquery||t.each(["Width","Height"],function(i,n){function s(e,i,n,s){return t.each(o,function(){i-=parseFloat(t.css(e,"padding"+this))||0,n&&(i-=parseFloat(t.css(e,"border"+this+"Width"))||0),s&&(i-=parseFloat(t.css(e,"margin"+this))||0)}),i}var o="Width"===n?["Left","Right"]:["Top","Bottom"],r=n.toLowerCase(),a={innerWidth:t.fn.innerWidth,innerHeight:t.fn.innerHeight,outerWidth:t.fn.outerWidth,outerHeight:t.fn.outerHeight};t.fn["inner"+n]=function(i){return i===e?a["inner"+n].call(this):this.each(function(){t(this).css(r,s(this,i)+"px")})},t.fn["outer"+n]=function(e,i){return"number"!=typeof e?a["outer"+n].call(this,e):this.each(function(){t(this).css(r,s(this,e,!0,i)+"px")})}}),t.extend(t.expr[":"],{data:t.expr.createPseudo?t.expr.createPseudo(function(e){return function(i){return!!t.data(i,e)}}):function(e,i,n){return!!t.data(e,n[3])},focusable:function(e){return i(e,!isNaN(t.attr(e,"tabindex")))},tabbable:function(e){var n=t.attr(e,"tabindex"),s=isNaN(n);return(s||n>=0)&&i(e,!s)}}),t(function(){var e=document.body,i=e.appendChild(i=document.createElement("div"));i.offsetHeight,t.extend(i.style,{minHeight:"100px",height:"auto",padding:0,borderWidth:0}),t.support.minHeight=100===i.offsetHeight,t.support.selectstart="onselectstart"in i,e.removeChild(i).style.display="none"}),function(){var e=/msie ([\w.]+)/.exec(navigator.userAgent.toLowerCase())||[];t.ui.ie=!!e.length,t.ui.ie6=6===parseFloat(e[1],10)}(),t.fn.extend({disableSelection:function(){return this.bind((t.support.selectstart?"selectstart":"mousedown")+".ui-disableSelection",function(t){t.preventDefault()})},enableSelection:function(){return this.unbind(".ui-disableSelection")}}),t.extend(t.ui,{plugin:{add:function(e,i,n){var s,o=t.ui[e].prototype;for(s in n)o.plugins[s]=o.plugins[s]||[],o.plugins[s].push([i,n[s]])},call:function(t,e,i){var n,s=t.plugins[e];if(s&&t.element[0].parentNode&&11!==t.element[0].parentNode.nodeType)for(n=0;n<s.length;n++)t.options[s[n][0]]&&s[n][1].apply(t.element,i)}},contains:t.contains,hasScroll:function(e,i){if("hidden"===t(e).css("overflow"))return!1;var n=i&&"left"===i?"scrollLeft":"scrollTop",s=!1;return e[n]>0||(e[n]=1,s=e[n]>0,e[n]=0,s)},isOverAxis:function(t,e,i){return t>e&&t<e+i},isOver:function(e,i,n,s,o,r){return t.ui.isOverAxis(e,n,o)&&t.ui.isOverAxis(i,s,r)}}))}(t),function(t,e){var i=0,n=Array.prototype.slice,s=t.cleanData;t.cleanData=function(e){for(var i,n=0;null!=(i=e[n]);n++)try{t(i).triggerHandler("remove")}catch(t){}s(e)},t.widget=function(e,i,n){var s,o,r,a,l=e.split(".")[0];e=e.split(".")[1],s=l+"-"+e,n||(n=i,i=t.Widget),t.expr[":"][s.toLowerCase()]=function(e){return!!t.data(e,s)},t[l]=t[l]||{},o=t[l][e],r=t[l][e]=function(t,e){return this._createWidget?void(arguments.length&&this._createWidget(t,e)):new r(t,e)},t.extend(r,o,{version:n.version,_proto:t.extend({},n),_childConstructors:[]}),a=new i,a.options=t.widget.extend({},a.options),t.each(n,function(e,s){t.isFunction(s)&&(n[e]=function(){var t=function(){return i.prototype[e].apply(this,arguments)},n=function(t){return i.prototype[e].apply(this,t)};return function(){var e,i=this._super,o=this._superApply;return this._super=t,this._superApply=n,e=s.apply(this,arguments),this._super=i,this._superApply=o,e}}())}),r.prototype=t.widget.extend(a,{widgetEventPrefix:a.widgetEventPrefix||e},n,{constructor:r,namespace:l,widgetName:e,widgetBaseClass:s,widgetFullName:s}),o?(t.each(o._childConstructors,function(e,i){var n=i.prototype;t.widget(n.namespace+"."+n.widgetName,r,i._proto)}),delete o._childConstructors):i._childConstructors.push(r),t.widget.bridge(e,r)},t.widget.extend=function(i){for(var s,o,r=n.call(arguments,1),a=0,l=r.length;a<l;a++)for(s in r[a])o=r[a][s],r[a].hasOwnProperty(s)&&o!==e&&(t.isPlainObject(o)?i[s]=t.isPlainObject(i[s])?t.widget.extend({},i[s],o):t.widget.extend({},o):i[s]=o);return i},t.widget.bridge=function(i,s){var o=s.prototype.widgetFullName;t.fn[i]=function(r){var a="string"==typeof r,l=n.call(arguments,1),u=this;return r=!a&&l.length?t.widget.extend.apply(null,[r].concat(l)):r,a?this.each(function(){var n,s=t.data(this,o);return s?t.isFunction(s[r])&&"_"!==r.charAt(0)?(n=s[r].apply(s,l),n!==s&&n!==e?(u=n&&n.jquery?u.pushStack(n.get()):n,!1):void 0):t.error("no such method '"+r+"' for "+i+" widget instance"):t.error("cannot call methods on "+i+" prior to initialization; attempted to call method '"+r+"'")}):this.each(function(){var e=t.data(this,o);e?e.option(r||{})._init():new s(r,this)}),u}},t.Widget=function(){},t.Widget._childConstructors=[],t.Widget.prototype={widgetName:"widget",widgetEventPrefix:"",defaultElement:"<div>",options:{disabled:!1,create:null},_createWidget:function(e,n){n=t(n||this.defaultElement||this)[0],this.element=t(n),this.uuid=i++,this.eventNamespace="."+this.widgetName+this.uuid,this.options=t.widget.extend({},this.options,this._getCreateOptions(),e),this.bindings=t(),this.hoverable=t(),this.focusable=t(),n!==this&&(t.data(n,this.widgetName,this),t.data(n,this.widgetFullName,this),this._on(this.element,{remove:function(t){t.target===n&&this.destroy()}}),this.document=t(n.style?n.ownerDocument:n.document||n),this.window=t(this.document[0].defaultView||this.document[0].parentWindow)),this._create(),this._trigger("create",null,this._getCreateEventData()),this._init()},_getCreateOptions:t.noop,_getCreateEventData:t.noop,_create:t.noop,_init:t.noop,destroy:function(){this._destroy(),this.element.unbind(this.eventNamespace).removeData(this.widgetName).removeData(this.widgetFullName).removeData(t.camelCase(this.widgetFullName)),this.widget().unbind(this.eventNamespace).removeAttr("aria-disabled").removeClass(this.widgetFullName+"-disabled ui-state-disabled"),this.bindings.unbind(this.eventNamespace),this.hoverable.removeClass("ui-state-hover"),this.focusable.removeClass("ui-state-focus")},_destroy:t.noop,widget:function(){return this.element},option:function(i,n){var s,o,r,a=i;if(0===arguments.length)return t.widget.extend({},this.options);if("string"==typeof i)if(a={},s=i.split("."),i=s.shift(),s.length){for(o=a[i]=t.widget.extend({},this.options[i]),r=0;r<s.length-1;r++)o[s[r]]=o[s[r]]||{},o=o[s[r]];if(i=s.pop(),n===e)return o[i]===e?null:o[i];o[i]=n}else{if(n===e)return this.options[i]===e?null:this.options[i];a[i]=n}return this._setOptions(a),this},_setOptions:function(t){var e;for(e in t)this._setOption(e,t[e]);return this},_setOption:function(t,e){return this.options[t]=e,"disabled"===t&&(this.widget().toggleClass(this.widgetFullName+"-disabled ui-state-disabled",!!e).attr("aria-disabled",e),this.hoverable.removeClass("ui-state-hover"),this.focusable.removeClass("ui-state-focus")),this},enable:function(){return this._setOption("disabled",!1)},disable:function(){return this._setOption("disabled",!0)},_on:function(e,i){var n,s=this;i?(e=n=t(e),this.bindings=this.bindings.add(e)):(i=e,e=this.element,n=this.widget()),t.each(i,function(i,o){function r(){if(s.options.disabled!==!0&&!t(this).hasClass("ui-state-disabled"))return("string"==typeof o?s[o]:o).apply(s,arguments)}"string"!=typeof o&&(r.guid=o.guid=o.guid||r.guid||t.guid++);var a=i.match(/^(\w+)\s*(.*)$/),l=a[1]+s.eventNamespace,u=a[2];u?n.delegate(u,l,r):e.bind(l,r)})},_off:function(t,e){e=(e||"").split(" ").join(this.eventNamespace+" ")+this.eventNamespace,t.unbind(e).undelegate(e)},_delay:function(t,e){function i(){return("string"==typeof t?n[t]:t).apply(n,arguments)}var n=this;return setTimeout(i,e||0)},_hoverable:function(e){this.hoverable=this.hoverable.add(e),this._on(e,{mouseenter:function(e){t(e.currentTarget).addClass("ui-state-hover")},mouseleave:function(e){t(e.currentTarget).removeClass("ui-state-hover")}})},_focusable:function(e){this.focusable=this.focusable.add(e),this._on(e,{focusin:function(e){t(e.currentTarget).addClass("ui-state-focus")},focusout:function(e){t(e.currentTarget).removeClass("ui-state-focus")}})},_trigger:function(e,i,n){var s,o,r=this.options[e];if(n=n||{},i=t.Event(i),i.type=(e===this.widgetEventPrefix?e:this.widgetEventPrefix+e).toLowerCase(),i.target=this.element[0],o=i.originalEvent,o)for(s in o)s in i||(i[s]=o[s]);return this.element.trigger(i,n),!(t.isFunction(r)&&r.apply(this.element[0],[i].concat(n))===!1||i.isDefaultPrevented())}},t.each({show:"fadeIn",hide:"fadeOut"},function(e,i){t.Widget.prototype["_"+e]=function(n,s,o){"string"==typeof s&&(s={effect:s});var r,a=s?s===!0||"number"==typeof s?i:s.effect||i:e;s=s||{},"number"==typeof s&&(s={duration:s}),r=!t.isEmptyObject(s),s.complete=o,s.delay&&n.delay(s.delay),r&&t.effects&&(t.effects.effect[a]||t.uiBackCompat!==!1&&t.effects[a])?n[e](s):a!==e&&n[a]?n[a](s.duration,s.easing,o):n.queue(function(i){t(this)[e](),o&&o.call(n[0]),i()})}}),t.uiBackCompat!==!1&&(t.Widget.prototype._getCreateOptions=function(){return t.metadata&&t.metadata.get(this.element[0])[this.widgetName]})}(t),function(t,e){var i=!1;t(document).mouseup(function(t){i=!1}),t.widget("ui.mouse",{version:"1.9.1",options:{cancel:"input,textarea,button,select,option",distance:1,delay:0},_mouseInit:function(){var e=this;this.element.bind("mousedown."+this.widgetName,function(t){return e._mouseDown(t)}).bind("click."+this.widgetName,function(i){if(!0===t.data(i.target,e.widgetName+".preventClickEvent"))return t.removeData(i.target,e.widgetName+".preventClickEvent"),i.stopImmediatePropagation(),!1}),this.started=!1},_mouseDestroy:function(){this.element.unbind("."+this.widgetName),this._mouseMoveDelegate&&t(document).unbind("mousemove."+this.widgetName,this._mouseMoveDelegate).unbind("mouseup."+this.widgetName,this._mouseUpDelegate)},_mouseDown:function(e){if(!i){this._mouseStarted&&this._mouseUp(e),this._mouseDownEvent=e;var n=this,s=1===e.which,o=!("string"!=typeof this.options.cancel||!e.target.nodeName)&&t(e.target).closest(this.options.cancel).length;return!(s&&!o&&this._mouseCapture(e))||(this.mouseDelayMet=!this.options.delay,this.mouseDelayMet||(this._mouseDelayTimer=setTimeout(function(){n.mouseDelayMet=!0},this.options.delay)),this._mouseDistanceMet(e)&&this._mouseDelayMet(e)&&(this._mouseStarted=this._mouseStart(e)!==!1,!this._mouseStarted)?(e.preventDefault(),!0):(!0===t.data(e.target,this.widgetName+".preventClickEvent")&&t.removeData(e.target,this.widgetName+".preventClickEvent"),this._mouseMoveDelegate=function(t){return n._mouseMove(t)},this._mouseUpDelegate=function(t){return n._mouseUp(t)},t(document).bind("mousemove."+this.widgetName,this._mouseMoveDelegate).bind("mouseup."+this.widgetName,this._mouseUpDelegate),e.preventDefault(),i=!0,!0))}},_mouseMove:function(e){return!t.ui.ie||document.documentMode>=9||e.button?this._mouseStarted?(this._mouseDrag(e),e.preventDefault()):(this._mouseDistanceMet(e)&&this._mouseDelayMet(e)&&(this._mouseStarted=this._mouseStart(this._mouseDownEvent,e)!==!1,this._mouseStarted?this._mouseDrag(e):this._mouseUp(e)),!this._mouseStarted):this._mouseUp(e)},_mouseUp:function(e){return t(document).unbind("mousemove."+this.widgetName,this._mouseMoveDelegate).unbind("mouseup."+this.widgetName,this._mouseUpDelegate),this._mouseStarted&&(this._mouseStarted=!1,e.target===this._mouseDownEvent.target&&t.data(e.target,this.widgetName+".preventClickEvent",!0),this._mouseStop(e)),!1},_mouseDistanceMet:function(t){return Math.max(Math.abs(this._mouseDownEvent.pageX-t.pageX),Math.abs(this._mouseDownEvent.pageY-t.pageY))>=this.options.distance},_mouseDelayMet:function(t){return this.mouseDelayMet},_mouseStart:function(t){},_mouseDrag:function(t){},_mouseStop:function(t){},_mouseCapture:function(t){return!0}})}(t),function(e,i){function n(t,e,i){return[parseInt(t[0],10)*(p.test(t[0])?e/100:1),parseInt(t[1],10)*(p.test(t[1])?i/100:1)]}function s(t,i){return parseInt(e.css(t,i),10)||0}e.ui=e.ui||{};var o,r=Math.max,a=Math.abs,l=Math.round,u=/left|center|right/,c=/top|center|bottom/,h=/[\+\-]\d+%?/,d=/^\w+/,p=/%$/,f=e.fn.position;e.position={scrollbarWidth:function(){if(o!==i)return o;var t,n,s=e("<div style='display:block;width:50px;height:50px;overflow:hidden;'><div style='height:100px;width:auto;'></div></div>"),r=s.children()[0];return e("body").append(s),t=r.offsetWidth,s.css("overflow","scroll"),n=r.offsetWidth,t===n&&(n=s[0].clientWidth),s.remove(),o=t-n},getScrollInfo:function(t){var i=t.isWindow?"":t.element.css("overflow-x"),n=t.isWindow?"":t.element.css("overflow-y"),s="scroll"===i||"auto"===i&&t.width<t.element[0].scrollWidth,o="scroll"===n||"auto"===n&&t.height<t.element[0].scrollHeight;return{width:s?e.position.scrollbarWidth():0,height:o?e.position.scrollbarWidth():0}},getWithinInfo:function(t){var i=e(t||window),n=e.isWindow(i[0]);return{element:i,isWindow:n,offset:i.offset()||{left:0,top:0},scrollLeft:i.scrollLeft(),scrollTop:i.scrollTop(),width:n?i.width():i.outerWidth(),height:n?i.height():i.outerHeight()}}},e.fn.position=function(t){if(!t||!t.of)return f.apply(this,arguments);t=e.extend({},t);var i,o,p,g,m,v=e(t.of),y=e.position.getWithinInfo(t.within),b=e.position.getScrollInfo(y),w=v[0],_=(t.collision||"flip").split(" "),x={};return 9===w.nodeType?(o=v.width(),p=v.height(),g={top:0,left:0}):e.isWindow(w)?(o=v.width(),p=v.height(),g={top:v.scrollTop(),left:v.scrollLeft()}):w.preventDefault?(t.at="left top",o=p=0,g={top:w.pageY,left:w.pageX}):(o=v.outerWidth(),p=v.outerHeight(),g=v.offset()),m=e.extend({},g),e.each(["my","at"],function(){var e,i,n=(t[this]||"").split(" ");1===n.length&&(n=u.test(n[0])?n.concat(["center"]):c.test(n[0])?["center"].concat(n):["center","center"]),n[0]=u.test(n[0])?n[0]:"center",n[1]=c.test(n[1])?n[1]:"center",e=h.exec(n[0]),i=h.exec(n[1]),x[this]=[e?e[0]:0,i?i[0]:0],t[this]=[d.exec(n[0])[0],d.exec(n[1])[0]]}),1===_.length&&(_[1]=_[0]),"right"===t.at[0]?m.left+=o:"center"===t.at[0]&&(m.left+=o/2),"bottom"===t.at[1]?m.top+=p:"center"===t.at[1]&&(m.top+=p/2),i=n(x.at,o,p),m.left+=i[0],m.top+=i[1],this.each(function(){var u,c,h=e(this),d=h.outerWidth(),f=h.outerHeight(),w=s(this,"marginLeft"),C=s(this,"marginTop"),S=d+w+s(this,"marginRight")+b.width,k=f+C+s(this,"marginBottom")+b.height,T=e.extend({},m),E=n(x.my,h.outerWidth(),h.outerHeight());"right"===t.my[0]?T.left-=d:"center"===t.my[0]&&(T.left-=d/2),"bottom"===t.my[1]?T.top-=f:"center"===t.my[1]&&(T.top-=f/2),T.left+=E[0],T.top+=E[1],e.support.offsetFractions||(T.left=l(T.left),T.top=l(T.top)),u={marginLeft:w,marginTop:C},e.each(["left","top"],function(n,s){e.ui.position[_[n]]&&e.ui.position[_[n]][s](T,{targetWidth:o,targetHeight:p,elemWidth:d,elemHeight:f,collisionPosition:u,collisionWidth:S,collisionHeight:k,offset:[i[0]+E[0],i[1]+E[1]],my:t.my,at:t.at,within:y,elem:h})}),e.fn.bgiframe&&h.bgiframe(),t.using&&(c=function(e){var i=g.left-T.left,n=i+o-d,s=g.top-T.top,l=s+p-f,u={target:{element:v,left:g.left,top:g.top,width:o,height:p},element:{element:h,left:T.left,top:T.top,width:d,height:f},horizontal:n<0?"left":i>0?"right":"center",vertical:l<0?"top":s>0?"bottom":"middle"};o<d&&a(i+n)<o&&(u.horizontal="center"),p<f&&a(s+l)<p&&(u.vertical="middle"),r(a(i),a(n))>r(a(s),a(l))?u.important="horizontal":u.important="vertical",t.using.call(this,e,u)}),h.offset(e.extend(T,{using:c}))})},e.ui.position={fit:{left:function(t,e){var i,n=e.within,s=n.isWindow?n.scrollLeft:n.offset.left,o=n.width,a=t.left-e.collisionPosition.marginLeft,l=s-a,u=a+e.collisionWidth-o-s;e.collisionWidth>o?l>0&&u<=0?(i=t.left+l+e.collisionWidth-o-s,t.left+=l-i):u>0&&l<=0?t.left=s:l>u?t.left=s+o-e.collisionWidth:t.left=s:l>0?t.left+=l:u>0?t.left-=u:t.left=r(t.left-a,t.left)},top:function(t,e){var i,n=e.within,s=n.isWindow?n.scrollTop:n.offset.top,o=e.within.height,a=t.top-e.collisionPosition.marginTop,l=s-a,u=a+e.collisionHeight-o-s;e.collisionHeight>o?l>0&&u<=0?(i=t.top+l+e.collisionHeight-o-s,t.top+=l-i):u>0&&l<=0?t.top=s:l>u?t.top=s+o-e.collisionHeight:t.top=s:l>0?t.top+=l:u>0?t.top-=u:t.top=r(t.top-a,t.top)}},flip:{left:function(t,e){var i,n,s=e.within,o=s.offset.left+s.scrollLeft,r=s.width,l=s.isWindow?s.scrollLeft:s.offset.left,u=t.left-e.collisionPosition.marginLeft,c=u-l,h=u+e.collisionWidth-r-l,d="left"===e.my[0]?-e.elemWidth:"right"===e.my[0]?e.elemWidth:0,p="left"===e.at[0]?e.targetWidth:"right"===e.at[0]?-e.targetWidth:0,f=-2*e.offset[0];c<0?(i=t.left+d+p+f+e.collisionWidth-r-o,(i<0||i<a(c))&&(t.left+=d+p+f)):h>0&&(n=t.left-e.collisionPosition.marginLeft+d+p+f-l,(n>0||a(n)<h)&&(t.left+=d+p+f))},top:function(t,e){var i,n,s=e.within,o=s.offset.top+s.scrollTop,r=s.height,l=s.isWindow?s.scrollTop:s.offset.top,u=t.top-e.collisionPosition.marginTop,c=u-l,h=u+e.collisionHeight-r-l,d="top"===e.my[1],p=d?-e.elemHeight:"bottom"===e.my[1]?e.elemHeight:0,f="top"===e.at[1]?e.targetHeight:"bottom"===e.at[1]?-e.targetHeight:0,g=-2*e.offset[1];c<0?(n=t.top+p+f+g+e.collisionHeight-r-o,t.top+p+f+g>c&&(n<0||n<a(c))&&(t.top+=p+f+g)):h>0&&(i=t.top-e.collisionPosition.marginTop+p+f+g-l,t.top+p+f+g>h&&(i>0||a(i)<h)&&(t.top+=p+f+g))}},flipfit:{left:function(){e.ui.position.flip.left.apply(this,arguments),e.ui.position.fit.left.apply(this,arguments)},top:function(){e.ui.position.flip.top.apply(this,arguments),e.ui.position.fit.top.apply(this,arguments)}}},function(){var t,i,n,s,o,r=document.getElementsByTagName("body")[0],a=document.createElement("div");t=document.createElement(r?"div":"body"),n={visibility:"hidden",width:0,height:0,border:0,margin:0,background:"none"},r&&e.extend(n,{position:"absolute",left:"-1000px",top:"-1000px"});for(o in n)t.style[o]=n[o];t.appendChild(a),i=r||document.documentElement,i.insertBefore(t,i.firstChild),a.style.cssText="position: absolute; left: 10.7432222px;",s=e(a).offset().left,e.support.offsetFractions=s>10&&s<11,t.innerHTML="",i.removeChild(t)}(),e.uiBackCompat!==!1&&function(t){var e=t.fn.position;t.fn.position=function(n){if(!n||!n.offset)return e.call(this,n);var s=n.offset.split(" "),o=n.at.split(" ");return 1===s.length&&(s[1]=s[0]),/^\d/.test(s[0])&&(s[0]="+"+s[0]),/^\d/.test(s[1])&&(s[1]="+"+s[1]),1===o.length&&(/left|center|right/.test(o[0])?o[1]="center":(o[1]=o[0],o[0]="center")),e.call(this,t.extend(n,{at:o[0]+s[0]+" "+o[1]+s[1],offset:i}))}}(t)}(t),function(t,e){var i=0;t.widget("ui.autocomplete",{version:"1.9.1",defaultElement:"<input>",options:{appendTo:"body",autoFocus:!1,delay:300,minLength:1,position:{my:"left top",at:"left bottom",collision:"none"},source:null,change:null,close:null,focus:null,open:null,response:null,search:null,select:null},pending:0,_create:function(){var e,i,n;this.isMultiLine=this._isMultiLine(),this.valueMethod=this.element[this.element.is("input,textarea")?"val":"text"],this.isNewMenu=!0,this.element.addClass("ui-autocomplete-input").attr("autocomplete","off"),this._on(this.element,{keydown:function(s){if(this.element.prop("readOnly"))return e=!0,n=!0,i=!0,void 0;e=!1,n=!1,i=!1;var o=t.ui.keyCode;switch(s.keyCode){case o.PAGE_UP:e=!0,this._move("previousPage",s);break;case o.PAGE_DOWN:e=!0,this._move("nextPage",s);break;case o.UP:e=!0,this._keyEvent("previous",s);break;case o.DOWN:e=!0,this._keyEvent("next",s);break;case o.ENTER:case o.NUMPAD_ENTER:this.menu.active&&(e=!0,s.preventDefault(),this.menu.select(s));break;case o.TAB:this.menu.active&&this.menu.select(s);break;case o.ESCAPE:this.menu.element.is(":visible")&&(this._value(this.term),this.close(s),s.preventDefault());break;default:i=!0,this._searchTimeout(s)}},keypress:function(n){if(e)return e=!1,void n.preventDefault();if(!i){var s=t.ui.keyCode;switch(n.keyCode){case s.PAGE_UP:this._move("previousPage",n);break;case s.PAGE_DOWN:this._move("nextPage",n);break;case s.UP:this._keyEvent("previous",n);break;case s.DOWN:this._keyEvent("next",n)}}},input:function(t){return n?(n=!1,void t.preventDefault()):void this._searchTimeout(t)},focus:function(){this.selectedItem=null,this.previous=this._value()},blur:function(t){return this.cancelBlur?void delete this.cancelBlur:(clearTimeout(this.searching),this.close(t),this._change(t),void 0)}}),this._initSource(),this.menu=t("<ul>").addClass("ui-autocomplete").appendTo(this.document.find(this.options.appendTo||"body")[0]).menu({input:t(),role:null}).zIndex(this.element.zIndex()+1).hide().data("menu"),this._on(this.menu.element,{mousedown:function(e){e.preventDefault(),this.cancelBlur=!0,this._delay(function(){delete this.cancelBlur});var i=this.menu.element[0];t(e.target).closest(".ui-menu-item").length||this._delay(function(){var e=this;this.document.one("mousedown",function(n){n.target!==e.element[0]&&n.target!==i&&!t.contains(i,n.target)&&e.close()})})},menufocus:function(e,i){if(this.isNewMenu&&(this.isNewMenu=!1,e.originalEvent&&/^mouse/.test(e.originalEvent.type)))return this.menu.blur(),void this.document.one("mousemove",function(){t(e.target).trigger(e.originalEvent)});var n=i.item.data("ui-autocomplete-item")||i.item.data("item.autocomplete");!1!==this._trigger("focus",e,{item:n})?e.originalEvent&&/^key/.test(e.originalEvent.type)&&this._value(n.value):this.liveRegion.text(n.value)},menuselect:function(t,e){var i=e.item.data("ui-autocomplete-item")||e.item.data("item.autocomplete"),n=this.previous;this.element[0]!==this.document[0].activeElement&&(this.element.focus(),this.previous=n,this._delay(function(){this.previous=n,this.selectedItem=i})),!1!==this._trigger("select",t,{item:i})&&this._value(i.value),this.term=this._value(),this.close(t),this.selectedItem=i}}),this.liveRegion=t("<span>",{role:"status","aria-live":"polite"}).addClass("ui-helper-hidden-accessible").insertAfter(this.element),t.fn.bgiframe&&this.menu.element.bgiframe(),this._on(this.window,{beforeunload:function(){this.element.removeAttr("autocomplete")}})},_destroy:function(){clearTimeout(this.searching),this.element.removeClass("ui-autocomplete-input").removeAttr("autocomplete"),this.menu.element.remove(),this.liveRegion.remove()},_setOption:function(t,e){this._super(t,e),"source"===t&&this._initSource(),"appendTo"===t&&this.menu.element.appendTo(this.document.find(e||"body")[0]),"disabled"===t&&e&&this.xhr&&this.xhr.abort()},_isMultiLine:function(){return!!this.element.is("textarea")||!this.element.is("input")&&this.element.prop("isContentEditable")},_initSource:function(){var e,i,n=this;t.isArray(this.options.source)?(e=this.options.source,this.source=function(i,n){n(t.ui.autocomplete.filter(e,i.term))}):"string"==typeof this.options.source?(i=this.options.source,this.source=function(e,s){n.xhr&&n.xhr.abort(),n.xhr=t.ajax({url:i,data:e,dataType:"json",success:function(t){s(t)},error:function(){s([])}})}):this.source=this.options.source},_searchTimeout:function(t){clearTimeout(this.searching),this.searching=this._delay(function(){this.term!==this._value()&&(this.selectedItem=null,this.search(null,t))},this.options.delay)},search:function(t,e){return t=null!=t?t:this._value(),this.term=this._value(),t.length<this.options.minLength?this.close(e):this._trigger("search",e)!==!1?this._search(t):void 0},_search:function(t){this.pending++,this.element.addClass("ui-autocomplete-loading"),this.cancelSearch=!1,this.source({term:t},this._response())},_response:function(){var t=this,e=++i;return function(n){e===i&&t.__response(n),t.pending--,t.pending||t.element.removeClass("ui-autocomplete-loading")}},__response:function(t){t&&(t=this._normalize(t)),this._trigger("response",null,{content:t}),!this.options.disabled&&t&&t.length&&!this.cancelSearch?(this._suggest(t),this._trigger("open")):this._close()},close:function(t){this.cancelSearch=!0,this._close(t)},_close:function(t){this.menu.element.is(":visible")&&(this.menu.element.hide(),this.menu.blur(),this.isNewMenu=!0,this._trigger("close",t))},_change:function(t){this.previous!==this._value()&&this._trigger("change",t,{item:this.selectedItem})},_normalize:function(e){return e.length&&e[0].label&&e[0].value?e:t.map(e,function(e){return"string"==typeof e?{label:e,value:e}:t.extend({label:e.label||e.value,value:e.value||e.label},e)})},_suggest:function(e){var i=this.menu.element.empty().zIndex(this.element.zIndex()+1);this._renderMenu(i,e),this.menu.refresh(),i.show(),this._resizeMenu(),i.position(t.extend({of:this.element},this.options.position)),this.options.autoFocus&&this.menu.next()},_resizeMenu:function(){var t=this.menu.element;t.outerWidth(Math.max(t.width("").outerWidth()+1,this.element.outerWidth()))},_renderMenu:function(e,i){var n=this;t.each(i,function(t,i){n._renderItemData(e,i)})},_renderItemData:function(t,e){return this._renderItem(t,e).data("ui-autocomplete-item",e)},_renderItem:function(e,i){return t("<li>").append(t("<a>").text(i.label)).appendTo(e)},_move:function(t,e){return this.menu.element.is(":visible")?this.menu.isFirstItem()&&/^previous/.test(t)||this.menu.isLastItem()&&/^next/.test(t)?(this._value(this.term),void this.menu.blur()):void this.menu[t](e):void this.search(null,e)},widget:function(){return this.menu.element},_value:function(){return this.valueMethod.apply(this.element,arguments)},_keyEvent:function(t,e){this.isMultiLine&&!this.menu.element.is(":visible")||(this._move(t,e),e.preventDefault())}}),t.extend(t.ui.autocomplete,{escapeRegex:function(t){return t.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g,"\\$&")},filter:function(e,i){var n=new RegExp(t.ui.autocomplete.escapeRegex(i),"i");return t.grep(e,function(t){return n.test(t.label||t.value||t)})}}),t.widget("ui.autocomplete",t.ui.autocomplete,{options:{messages:{noResults:"No search results.",results:function(t){return t+(t>1?" results are":" result is")+" available, use up and down arrow keys to navigate."}}},__response:function(t){var e;this._superApply(arguments),this.options.disabled||this.cancelSearch||(e=t&&t.length?this.options.messages.results(t.length):this.options.messages.noResults,this.liveRegion.text(e))}})}(t),function(t,e){var i,n,s,o,r="ui-button ui-widget ui-state-default ui-corner-all",a="ui-state-hover ui-state-active ",l="ui-button-icons-only ui-button-icon-only ui-button-text-icons ui-button-text-icon-primary ui-button-text-icon-secondary ui-button-text-only",u=function(){var e=t(this).find(":ui-button");setTimeout(function(){e.button("refresh")},1)},c=function(e){var i=e.name,n=e.form,s=t([]);return i&&(s=n?t(n).find("[name='"+i+"']"):t("[name='"+i+"']",e.ownerDocument).filter(function(){return!this.form})),s};t.widget("ui.button",{version:"1.9.1",defaultElement:"<button>",options:{disabled:null,text:!0,label:null,icons:{primary:null,secondary:null}},_create:function(){this.element.closest("form").unbind("reset"+this.eventNamespace).bind("reset"+this.eventNamespace,u),"boolean"!=typeof this.options.disabled?this.options.disabled=!!this.element.prop("disabled"):this.element.prop("disabled",this.options.disabled),this._determineButtonType(),this.hasTitle=!!this.buttonElement.attr("title");var e=this,a=this.options,l="checkbox"===this.type||"radio"===this.type,h="ui-state-hover"+(l?"":" ui-state-active"),d="ui-state-focus";null===a.label&&(a.label="input"===this.type?this.buttonElement.val():this.buttonElement.html()),this.buttonElement.addClass(r).attr("role","button").bind("mouseenter"+this.eventNamespace,function(){a.disabled||(t(this).addClass("ui-state-hover"),this===i&&t(this).addClass("ui-state-active"))}).bind("mouseleave"+this.eventNamespace,function(){a.disabled||t(this).removeClass(h)}).bind("click"+this.eventNamespace,function(t){a.disabled&&(t.preventDefault(),t.stopImmediatePropagation())}),this.element.bind("focus"+this.eventNamespace,function(){e.buttonElement.addClass(d)}).bind("blur"+this.eventNamespace,function(){e.buttonElement.removeClass(d)}),l&&(this.element.bind("change"+this.eventNamespace,function(){o||e.refresh()}),this.buttonElement.bind("mousedown"+this.eventNamespace,function(t){a.disabled||(o=!1,n=t.pageX,s=t.pageY)}).bind("mouseup"+this.eventNamespace,function(t){a.disabled||n===t.pageX&&s===t.pageY||(o=!0)})),"checkbox"===this.type?this.buttonElement.bind("click"+this.eventNamespace,function(){return!a.disabled&&!o&&(t(this).toggleClass("ui-state-active"),void e.buttonElement.attr("aria-pressed",e.element[0].checked))}):"radio"===this.type?this.buttonElement.bind("click"+this.eventNamespace,function(){if(a.disabled||o)return!1;t(this).addClass("ui-state-active"),e.buttonElement.attr("aria-pressed","true");var i=e.element[0];c(i).not(i).map(function(){return t(this).button("widget")[0]}).removeClass("ui-state-active").attr("aria-pressed","false")}):(this.buttonElement.bind("mousedown"+this.eventNamespace,function(){return!a.disabled&&(t(this).addClass("ui-state-active"),i=this,e.document.one("mouseup",function(){i=null}),void 0)}).bind("mouseup"+this.eventNamespace,function(){return!a.disabled&&void t(this).removeClass("ui-state-active")}).bind("keydown"+this.eventNamespace,function(e){return!a.disabled&&void((e.keyCode===t.ui.keyCode.SPACE||e.keyCode===t.ui.keyCode.ENTER)&&t(this).addClass("ui-state-active"))}).bind("keyup"+this.eventNamespace,function(){t(this).removeClass("ui-state-active")}),this.buttonElement.is("a")&&this.buttonElement.keyup(function(e){e.keyCode===t.ui.keyCode.SPACE&&t(this).click()})),this._setOption("disabled",a.disabled),this._resetButton()},_determineButtonType:function(){var t,e,i;this.element.is("[type=checkbox]")?this.type="checkbox":this.element.is("[type=radio]")?this.type="radio":this.element.is("input")?this.type="input":this.type="button","checkbox"===this.type||"radio"===this.type?(t=this.element.parents().last(),e="label[for='"+this.element.attr("id")+"']",this.buttonElement=t.find(e),this.buttonElement.length||(t=t.length?t.siblings():this.element.siblings(),this.buttonElement=t.filter(e),this.buttonElement.length||(this.buttonElement=t.find(e))),this.element.addClass("ui-helper-hidden-accessible"),i=this.element.is(":checked"),i&&this.buttonElement.addClass("ui-state-active"),this.buttonElement.prop("aria-pressed",i)):this.buttonElement=this.element},widget:function(){return this.buttonElement},_destroy:function(){this.element.removeClass("ui-helper-hidden-accessible"),this.buttonElement.removeClass(r+" "+a+" "+l).removeAttr("role").removeAttr("aria-pressed").html(this.buttonElement.find(".ui-button-text").html()),this.hasTitle||this.buttonElement.removeAttr("title")},_setOption:function(t,e){return this._super(t,e),"disabled"===t?void(e?this.element.prop("disabled",!0):this.element.prop("disabled",!1)):void this._resetButton();
|
||
},refresh:function(){var e=this.element.is(":disabled")||this.element.hasClass("ui-button-disabled");e!==this.options.disabled&&this._setOption("disabled",e),"radio"===this.type?c(this.element[0]).each(function(){t(this).is(":checked")?t(this).button("widget").addClass("ui-state-active").attr("aria-pressed","true"):t(this).button("widget").removeClass("ui-state-active").attr("aria-pressed","false")}):"checkbox"===this.type&&(this.element.is(":checked")?this.buttonElement.addClass("ui-state-active").attr("aria-pressed","true"):this.buttonElement.removeClass("ui-state-active").attr("aria-pressed","false"))},_resetButton:function(){if("input"===this.type)return void(this.options.label&&this.element.val(this.options.label));var e=this.buttonElement.removeClass(l),i=t("<span></span>",this.document[0]).addClass("ui-button-text").html(this.options.label).appendTo(e.empty()).text(),n=this.options.icons,s=n.primary&&n.secondary,o=[];n.primary||n.secondary?(this.options.text&&o.push("ui-button-text-icon"+(s?"s":n.primary?"-primary":"-secondary")),n.primary&&e.prepend("<span class='ui-button-icon-primary ui-icon "+n.primary+"'></span>"),n.secondary&&e.append("<span class='ui-button-icon-secondary ui-icon "+n.secondary+"'></span>"),this.options.text||(o.push(s?"ui-button-icons-only":"ui-button-icon-only"),this.hasTitle||e.attr("title",t.trim(i)))):o.push("ui-button-text-only"),e.addClass(o.join(" "))}}),t.widget("ui.buttonset",{version:"1.9.1",options:{items:"button, input[type=button], input[type=submit], input[type=reset], input[type=checkbox], input[type=radio], a, :data(button)"},_create:function(){this.element.addClass("ui-buttonset")},_init:function(){this.refresh()},_setOption:function(t,e){"disabled"===t&&this.buttons.button("option",t,e),this._super(t,e)},refresh:function(){var e="rtl"===this.element.css("direction");this.buttons=this.element.find(this.options.items).filter(":ui-button").button("refresh").end().not(":ui-button").button().end().map(function(){return t(this).button("widget")[0]}).removeClass("ui-corner-all ui-corner-left ui-corner-right").filter(":first").addClass(e?"ui-corner-right":"ui-corner-left").end().filter(":last").addClass(e?"ui-corner-left":"ui-corner-right").end().end()},_destroy:function(){this.element.removeClass("ui-buttonset"),this.buttons.map(function(){return t(this).button("widget")[0]}).removeClass("ui-corner-left ui-corner-right").end().button("destroy")}})}(t),function(t,e){var i=!1;t.widget("ui.menu",{version:"1.9.1",defaultElement:"<ul>",delay:300,options:{icons:{submenu:"ui-icon-carat-1-e"},menus:"ul",position:{my:"left top",at:"right top"},role:"menu",blur:null,focus:null,select:null},_create:function(){this.activeMenu=this.element,this.element.uniqueId().addClass("ui-menu ui-widget ui-widget-content ui-corner-all").toggleClass("ui-menu-icons",!!this.element.find(".ui-icon").length).attr({role:this.options.role,tabIndex:0}).bind("click"+this.eventNamespace,t.proxy(function(t){this.options.disabled&&t.preventDefault()},this)),this.options.disabled&&this.element.addClass("ui-state-disabled").attr("aria-disabled","true"),this._on({"mousedown .ui-menu-item > a":function(t){t.preventDefault()},"click .ui-state-disabled > a":function(t){t.preventDefault()},"click .ui-menu-item:has(a)":function(e){var n=t(e.target).closest(".ui-menu-item");!i&&n.not(".ui-state-disabled").length&&(i=!0,this.select(e),n.has(".ui-menu").length?this.expand(e):this.element.is(":focus")||(this.element.trigger("focus",[!0]),this.active&&1===this.active.parents(".ui-menu").length&&clearTimeout(this.timer)))},"mouseenter .ui-menu-item":function(e){var i=t(e.currentTarget);i.siblings().children(".ui-state-active").removeClass("ui-state-active"),this.focus(e,i)},mouseleave:"collapseAll","mouseleave .ui-menu":"collapseAll",focus:function(t,e){var i=this.active||this.element.children(".ui-menu-item").eq(0);e||this.focus(t,i)},blur:function(e){this._delay(function(){t.contains(this.element[0],this.document[0].activeElement)||this.collapseAll(e)})},keydown:"_keydown"}),this.refresh(),this._on(this.document,{click:function(e){t(e.target).closest(".ui-menu").length||this.collapseAll(e),i=!1}})},_destroy:function(){this.element.removeAttr("aria-activedescendant").find(".ui-menu").andSelf().removeClass("ui-menu ui-widget ui-widget-content ui-corner-all ui-menu-icons").removeAttr("role").removeAttr("tabIndex").removeAttr("aria-labelledby").removeAttr("aria-expanded").removeAttr("aria-hidden").removeAttr("aria-disabled").removeUniqueId().show(),this.element.find(".ui-menu-item").removeClass("ui-menu-item").removeAttr("role").removeAttr("aria-disabled").children("a").removeUniqueId().removeClass("ui-corner-all ui-state-hover").removeAttr("tabIndex").removeAttr("role").removeAttr("aria-haspopup").children().each(function(){var e=t(this);e.data("ui-menu-submenu-carat")&&e.remove()}),this.element.find(".ui-menu-divider").removeClass("ui-menu-divider ui-widget-content")},_keydown:function(e){function i(t){return t.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g,"\\$&")}var n,s,o,r,a,l=!0;switch(e.keyCode){case t.ui.keyCode.PAGE_UP:this.previousPage(e);break;case t.ui.keyCode.PAGE_DOWN:this.nextPage(e);break;case t.ui.keyCode.HOME:this._move("first","first",e);break;case t.ui.keyCode.END:this._move("last","last",e);break;case t.ui.keyCode.UP:this.previous(e);break;case t.ui.keyCode.DOWN:this.next(e);break;case t.ui.keyCode.LEFT:this.collapse(e);break;case t.ui.keyCode.RIGHT:this.active&&!this.active.is(".ui-state-disabled")&&this.expand(e);break;case t.ui.keyCode.ENTER:case t.ui.keyCode.SPACE:this._activate(e);break;case t.ui.keyCode.ESCAPE:this.collapse(e);break;default:l=!1,s=this.previousFilter||"",o=String.fromCharCode(e.keyCode),r=!1,clearTimeout(this.filterTimer),o===s?r=!0:o=s+o,a=new RegExp("^"+i(o),"i"),n=this.activeMenu.children(".ui-menu-item").filter(function(){return a.test(t(this).children("a").text())}),n=r&&n.index(this.active.next())!==-1?this.active.nextAll(".ui-menu-item"):n,n.length||(o=String.fromCharCode(e.keyCode),a=new RegExp("^"+i(o),"i"),n=this.activeMenu.children(".ui-menu-item").filter(function(){return a.test(t(this).children("a").text())})),n.length?(this.focus(e,n),n.length>1?(this.previousFilter=o,this.filterTimer=this._delay(function(){delete this.previousFilter},1e3)):delete this.previousFilter):delete this.previousFilter}l&&e.preventDefault()},_activate:function(t){this.active.is(".ui-state-disabled")||(this.active.children("a[aria-haspopup='true']").length?this.expand(t):this.select(t))},refresh:function(){var e,i=this.options.icons.submenu,n=this.element.find(this.options.menus+":not(.ui-menu)").addClass("ui-menu ui-widget ui-widget-content ui-corner-all").hide().attr({role:this.options.role,"aria-hidden":"true","aria-expanded":"false"});e=n.add(this.element),e.children(":not(.ui-menu-item):has(a)").addClass("ui-menu-item").attr("role","presentation").children("a").uniqueId().addClass("ui-corner-all").attr({tabIndex:-1,role:this._itemRole()}),e.children(":not(.ui-menu-item)").each(function(){var e=t(this);/[^\-—–\s]/.test(e.text())||e.addClass("ui-widget-content ui-menu-divider")}),e.children(".ui-state-disabled").attr("aria-disabled","true"),n.each(function(){var e=t(this),n=e.prev("a"),s=t("<span>").addClass("ui-menu-icon ui-icon "+i).data("ui-menu-submenu-carat",!0);n.attr("aria-haspopup","true").prepend(s),e.attr("aria-labelledby",n.attr("id"))}),this.active&&!t.contains(this.element[0],this.active[0])&&this.blur()},_itemRole:function(){return{menu:"menuitem",listbox:"option"}[this.options.role]},focus:function(t,e){var i,n;this.blur(t,t&&"focus"===t.type),this._scrollIntoView(e),this.active=e.first(),n=this.active.children("a").addClass("ui-state-focus"),this.options.role&&this.element.attr("aria-activedescendant",n.attr("id")),this.active.parent().closest(".ui-menu-item").children("a:first").addClass("ui-state-active"),t&&"keydown"===t.type?this._close():this.timer=this._delay(function(){this._close()},this.delay),i=e.children(".ui-menu"),i.length&&/^mouse/.test(t.type)&&this._startOpening(i),this.activeMenu=e.parent(),this._trigger("focus",t,{item:e})},_scrollIntoView:function(e){var i,n,s,o,r,a;this._hasScroll()&&(i=parseFloat(t.css(this.activeMenu[0],"borderTopWidth"))||0,n=parseFloat(t.css(this.activeMenu[0],"paddingTop"))||0,s=e.offset().top-this.activeMenu.offset().top-i-n,o=this.activeMenu.scrollTop(),r=this.activeMenu.height(),a=e.height(),s<0?this.activeMenu.scrollTop(o+s):s+a>r&&this.activeMenu.scrollTop(o+s-r+a))},blur:function(t,e){e||clearTimeout(this.timer),this.active&&(this.active.children("a").removeClass("ui-state-focus"),this.active=null,this._trigger("blur",t,{item:this.active}))},_startOpening:function(t){clearTimeout(this.timer),"true"===t.attr("aria-hidden")&&(this.timer=this._delay(function(){this._close(),this._open(t)},this.delay))},_open:function(e){var i=t.extend({of:this.active},this.options.position);clearTimeout(this.timer),this.element.find(".ui-menu").not(e.parents(".ui-menu")).hide().attr("aria-hidden","true"),e.show().removeAttr("aria-hidden").attr("aria-expanded","true").position(i)},collapseAll:function(e,i){clearTimeout(this.timer),this.timer=this._delay(function(){var n=i?this.element:t(e&&e.target).closest(this.element.find(".ui-menu"));n.length||(n=this.element),this._close(n),this.blur(e),this.activeMenu=n},this.delay)},_close:function(t){t||(t=this.active?this.active.parent():this.element),t.find(".ui-menu").hide().attr("aria-hidden","true").attr("aria-expanded","false").end().find("a.ui-state-active").removeClass("ui-state-active")},collapse:function(t){var e=this.active&&this.active.parent().closest(".ui-menu-item",this.element);e&&e.length&&(this._close(),this.focus(t,e))},expand:function(t){var e=this.active&&this.active.children(".ui-menu ").children(".ui-menu-item").first();e&&e.length&&(this._open(e.parent()),this._delay(function(){this.focus(t,e)}))},next:function(t){this._move("next","first",t)},previous:function(t){this._move("prev","last",t)},isFirstItem:function(){return this.active&&!this.active.prevAll(".ui-menu-item").length},isLastItem:function(){return this.active&&!this.active.nextAll(".ui-menu-item").length},_move:function(t,e,i){var n;this.active&&(n="first"===t||"last"===t?this.active["first"===t?"prevAll":"nextAll"](".ui-menu-item").eq(-1):this.active[t+"All"](".ui-menu-item").eq(0)),n&&n.length&&this.active||(n=this.activeMenu.children(".ui-menu-item")[e]()),this.focus(i,n)},nextPage:function(e){var i,n,s;return this.active?void(this.isLastItem()||(this._hasScroll()?(n=this.active.offset().top,s=this.element.height(),this.active.nextAll(".ui-menu-item").each(function(){return i=t(this),i.offset().top-n-s<0}),this.focus(e,i)):this.focus(e,this.activeMenu.children(".ui-menu-item")[this.active?"last":"first"]()))):void this.next(e)},previousPage:function(e){var i,n,s;return this.active?void(this.isFirstItem()||(this._hasScroll()?(n=this.active.offset().top,s=this.element.height(),this.active.prevAll(".ui-menu-item").each(function(){return i=t(this),i.offset().top-n+s>0}),this.focus(e,i)):this.focus(e,this.activeMenu.children(".ui-menu-item").first()))):void this.next(e)},_hasScroll:function(){return this.element.outerHeight()<this.element.prop("scrollHeight")},select:function(e){this.active=this.active||t(e.target).closest(".ui-menu-item");var i={item:this.active};this.active.has(".ui-menu").length||this.collapseAll(e,!0),this._trigger("select",e,i)}})}(t),function(t,e){var i=5;t.widget("ui.slider",t.ui.mouse,{version:"1.9.1",widgetEventPrefix:"slide",options:{animate:!1,distance:0,max:100,min:0,orientation:"horizontal",range:!1,step:1,value:0,values:null},_create:function(){var e,n,s=this.options,o=this.element.find(".ui-slider-handle").addClass("ui-state-default ui-corner-all"),r="<a class='ui-slider-handle ui-state-default ui-corner-all' href='#'></a>",a=[];for(this._keySliding=!1,this._mouseSliding=!1,this._animateOff=!0,this._handleIndex=null,this._detectOrientation(),this._mouseInit(),this.element.addClass("ui-slider ui-slider-"+this.orientation+" ui-widget ui-widget-content ui-corner-all"+(s.disabled?" ui-slider-disabled ui-disabled":"")),this.range=t([]),s.range&&(s.range===!0&&(s.values||(s.values=[this._valueMin(),this._valueMin()]),s.values.length&&2!==s.values.length&&(s.values=[s.values[0],s.values[0]])),this.range=t("<div></div>").appendTo(this.element).addClass("ui-slider-range ui-widget-header"+("min"===s.range||"max"===s.range?" ui-slider-range-"+s.range:""))),n=s.values&&s.values.length||1,e=o.length;e<n;e++)a.push(r);this.handles=o.add(t(a.join("")).appendTo(this.element)),this.handle=this.handles.eq(0),this.handles.add(this.range).filter("a").click(function(t){t.preventDefault()}).mouseenter(function(){s.disabled||t(this).addClass("ui-state-hover")}).mouseleave(function(){t(this).removeClass("ui-state-hover")}).focus(function(){s.disabled?t(this).blur():(t(".ui-slider .ui-state-focus").removeClass("ui-state-focus"),t(this).addClass("ui-state-focus"))}).blur(function(){t(this).removeClass("ui-state-focus")}),this.handles.each(function(e){t(this).data("ui-slider-handle-index",e)}),this._on(this.handles,{keydown:function(e){var n,s,o,r,a=t(e.target).data("ui-slider-handle-index");switch(e.keyCode){case t.ui.keyCode.HOME:case t.ui.keyCode.END:case t.ui.keyCode.PAGE_UP:case t.ui.keyCode.PAGE_DOWN:case t.ui.keyCode.UP:case t.ui.keyCode.RIGHT:case t.ui.keyCode.DOWN:case t.ui.keyCode.LEFT:if(e.preventDefault(),!this._keySliding&&(this._keySliding=!0,t(e.target).addClass("ui-state-active"),n=this._start(e,a),n===!1))return}switch(r=this.options.step,s=o=this.options.values&&this.options.values.length?this.values(a):this.value(),e.keyCode){case t.ui.keyCode.HOME:o=this._valueMin();break;case t.ui.keyCode.END:o=this._valueMax();break;case t.ui.keyCode.PAGE_UP:o=this._trimAlignValue(s+(this._valueMax()-this._valueMin())/i);break;case t.ui.keyCode.PAGE_DOWN:o=this._trimAlignValue(s-(this._valueMax()-this._valueMin())/i);break;case t.ui.keyCode.UP:case t.ui.keyCode.RIGHT:if(s===this._valueMax())return;o=this._trimAlignValue(s+r);break;case t.ui.keyCode.DOWN:case t.ui.keyCode.LEFT:if(s===this._valueMin())return;o=this._trimAlignValue(s-r)}this._slide(e,a,o)},keyup:function(e){var i=t(e.target).data("ui-slider-handle-index");this._keySliding&&(this._keySliding=!1,this._stop(e,i),this._change(e,i),t(e.target).removeClass("ui-state-active"))}}),this._refreshValue(),this._animateOff=!1},_destroy:function(){this.handles.remove(),this.range.remove(),this.element.removeClass("ui-slider ui-slider-horizontal ui-slider-vertical ui-slider-disabled ui-widget ui-widget-content ui-corner-all"),this._mouseDestroy()},_mouseCapture:function(e){var i,n,s,o,r,a,l,u,c=this,h=this.options;return!h.disabled&&(this.elementSize={width:this.element.outerWidth(),height:this.element.outerHeight()},this.elementOffset=this.element.offset(),i={x:e.pageX,y:e.pageY},n=this._normValueFromMouse(i),s=this._valueMax()-this._valueMin()+1,this.handles.each(function(e){var i=Math.abs(n-c.values(e));s>i&&(s=i,o=t(this),r=e)}),h.range===!0&&this.values(1)===h.min&&(r+=1,o=t(this.handles[r])),a=this._start(e,r),a!==!1&&(this._mouseSliding=!0,this._handleIndex=r,o.addClass("ui-state-active").focus(),l=o.offset(),u=!t(e.target).parents().andSelf().is(".ui-slider-handle"),this._clickOffset=u?{left:0,top:0}:{left:e.pageX-l.left-o.width()/2,top:e.pageY-l.top-o.height()/2-(parseInt(o.css("borderTopWidth"),10)||0)-(parseInt(o.css("borderBottomWidth"),10)||0)+(parseInt(o.css("marginTop"),10)||0)},this.handles.hasClass("ui-state-hover")||this._slide(e,r,n),this._animateOff=!0,!0))},_mouseStart:function(){return!0},_mouseDrag:function(t){var e={x:t.pageX,y:t.pageY},i=this._normValueFromMouse(e);return this._slide(t,this._handleIndex,i),!1},_mouseStop:function(t){return this.handles.removeClass("ui-state-active"),this._mouseSliding=!1,this._stop(t,this._handleIndex),this._change(t,this._handleIndex),this._handleIndex=null,this._clickOffset=null,this._animateOff=!1,!1},_detectOrientation:function(){this.orientation="vertical"===this.options.orientation?"vertical":"horizontal"},_normValueFromMouse:function(t){var e,i,n,s,o;return"horizontal"===this.orientation?(e=this.elementSize.width,i=t.x-this.elementOffset.left-(this._clickOffset?this._clickOffset.left:0)):(e=this.elementSize.height,i=t.y-this.elementOffset.top-(this._clickOffset?this._clickOffset.top:0)),n=i/e,n>1&&(n=1),n<0&&(n=0),"vertical"===this.orientation&&(n=1-n),s=this._valueMax()-this._valueMin(),o=this._valueMin()+n*s,this._trimAlignValue(o)},_start:function(t,e){var i={handle:this.handles[e],value:this.value()};return this.options.values&&this.options.values.length&&(i.value=this.values(e),i.values=this.values()),this._trigger("start",t,i)},_slide:function(t,e,i){var n,s,o;this.options.values&&this.options.values.length?(n=this.values(e?0:1),2===this.options.values.length&&this.options.range===!0&&(0===e&&i>n||1===e&&i<n)&&(i=n),i!==this.values(e)&&(s=this.values(),s[e]=i,o=this._trigger("slide",t,{handle:this.handles[e],value:i,values:s}),n=this.values(e?0:1),o!==!1&&this.values(e,i,!0))):i!==this.value()&&(o=this._trigger("slide",t,{handle:this.handles[e],value:i}),o!==!1&&this.value(i))},_stop:function(t,e){var i={handle:this.handles[e],value:this.value()};this.options.values&&this.options.values.length&&(i.value=this.values(e),i.values=this.values()),this._trigger("stop",t,i)},_change:function(t,e){if(!this._keySliding&&!this._mouseSliding){var i={handle:this.handles[e],value:this.value()};this.options.values&&this.options.values.length&&(i.value=this.values(e),i.values=this.values()),this._trigger("change",t,i)}},value:function(t){return arguments.length?(this.options.value=this._trimAlignValue(t),this._refreshValue(),this._change(null,0),void 0):this._value()},values:function(e,i){var n,s,o;if(arguments.length>1)return this.options.values[e]=this._trimAlignValue(i),this._refreshValue(),this._change(null,e),void 0;if(!arguments.length)return this._values();if(!t.isArray(arguments[0]))return this.options.values&&this.options.values.length?this._values(e):this.value();for(n=this.options.values,s=arguments[0],o=0;o<n.length;o+=1)n[o]=this._trimAlignValue(s[o]),this._change(null,o);this._refreshValue()},_setOption:function(e,i){var n,s=0;switch(t.isArray(this.options.values)&&(s=this.options.values.length),t.Widget.prototype._setOption.apply(this,arguments),e){case"disabled":i?(this.handles.filter(".ui-state-focus").blur(),this.handles.removeClass("ui-state-hover"),this.handles.prop("disabled",!0),this.element.addClass("ui-disabled")):(this.handles.prop("disabled",!1),this.element.removeClass("ui-disabled"));break;case"orientation":this._detectOrientation(),this.element.removeClass("ui-slider-horizontal ui-slider-vertical").addClass("ui-slider-"+this.orientation),this._refreshValue();break;case"value":this._animateOff=!0,this._refreshValue(),this._change(null,0),this._animateOff=!1;break;case"values":for(this._animateOff=!0,this._refreshValue(),n=0;n<s;n+=1)this._change(null,n);this._animateOff=!1;break;case"min":case"max":this._animateOff=!0,this._refreshValue(),this._animateOff=!1}},_value:function(){var t=this.options.value;return t=this._trimAlignValue(t)},_values:function(t){var e,i,n;if(arguments.length)return e=this.options.values[t],e=this._trimAlignValue(e);for(i=this.options.values.slice(),n=0;n<i.length;n+=1)i[n]=this._trimAlignValue(i[n]);return i},_trimAlignValue:function(t){if(t<=this._valueMin())return this._valueMin();if(t>=this._valueMax())return this._valueMax();var e=this.options.step>0?this.options.step:1,i=(t-this._valueMin())%e,n=t-i;return 2*Math.abs(i)>=e&&(n+=i>0?e:-e),parseFloat(n.toFixed(5))},_valueMin:function(){return this.options.min},_valueMax:function(){return this.options.max},_refreshValue:function(){var e,i,n,s,o,r=this.options.range,a=this.options,l=this,u=!this._animateOff&&a.animate,c={};this.options.values&&this.options.values.length?this.handles.each(function(n){i=(l.values(n)-l._valueMin())/(l._valueMax()-l._valueMin())*100,c["horizontal"===l.orientation?"left":"bottom"]=i+"%",t(this).stop(1,1)[u?"animate":"css"](c,a.animate),l.options.range===!0&&("horizontal"===l.orientation?(0===n&&l.range.stop(1,1)[u?"animate":"css"]({left:i+"%"},a.animate),1===n&&l.range[u?"animate":"css"]({width:i-e+"%"},{queue:!1,duration:a.animate})):(0===n&&l.range.stop(1,1)[u?"animate":"css"]({bottom:i+"%"},a.animate),1===n&&l.range[u?"animate":"css"]({height:i-e+"%"},{queue:!1,duration:a.animate}))),e=i}):(n=this.value(),s=this._valueMin(),o=this._valueMax(),i=o!==s?(n-s)/(o-s)*100:0,c["horizontal"===this.orientation?"left":"bottom"]=i+"%",this.handle.stop(1,1)[u?"animate":"css"](c,a.animate),"min"===r&&"horizontal"===this.orientation&&this.range.stop(1,1)[u?"animate":"css"]({width:i+"%"},a.animate),"max"===r&&"horizontal"===this.orientation&&this.range[u?"animate":"css"]({width:100-i+"%"},{queue:!1,duration:a.animate}),"min"===r&&"vertical"===this.orientation&&this.range.stop(1,1)[u?"animate":"css"]({height:i+"%"},a.animate),"max"===r&&"vertical"===this.orientation&&this.range[u?"animate":"css"]({height:100-i+"%"},{queue:!1,duration:a.animate}))}})}(t)}).call(e,i(1))},function(t,e,i){(function(t){!function(t){function e(i){function n(){e(s)}var s=i.data||i;switch(i.type){case"mouseenter":s.dist2=0,s.event=i,i.type="hoverstart",t.event.dispatch.call(this,i)!==!1&&(s.elem=this,t.event.add(this,"mousemove",e,s),s.timer=setTimeout(n,s.delay));break;case"mousemove":s.dist2+=Math.pow(i.pageX-s.event.pageX,2)+Math.pow(i.pageY-s.event.pageY,2),s.event=i;break;case"mouseleave":clearTimeout(s.timer),s.hovered?(i.type="hoverend",t.event.dispatch.call(this,i),s.hovered--):t.event.remove(s.elem,"mousemove",e);break;default:s.dist2<=Math.pow(s.speed*(s.delay/1e3),2)?(t.event.remove(s.elem,"mousemove",e),s.event.type="hover",t.event.dispatch.call(s.elem,s.event)!==!1&&s.hovered++):s.timer=setTimeout(n,s.delay),s.dist2=0}}t.fn._hover=t.fn.hover,t.fn.hover=function(t,e,i){return i&&this.bind("hoverstart",t),e&&this.bind("hoverend",i?i:e),t?this.bind("hover",i?e:t):this.trigger("hover")};var i=t.event.special.hover={delay:100,speed:100,setup:function(n){n=t.extend({speed:i.speed,delay:i.delay,hovered:0},n||{}),t.event.add(this,"mouseenter mouseleave",e,n)},teardown:function(){t.event.remove(this,"mouseenter mouseleave",e)}}}(t)}).call(e,i(1))},function(t,e,i){(function(t){!function(t){"use strict";function e(e){var i=e.data;e.isDefaultPrevented()||(e.preventDefault(),t(e.target).ajaxSubmit(i))}function i(e){var i=e.target,n=t(i);if(!n.is("[type=submit],[type=image]")){var s=n.closest("[type=submit]");if(0===s.length)return;i=s[0]}var o=this;if(o.clk=i,"image"==i.type)if(void 0!==e.offsetX)o.clk_x=e.offsetX,o.clk_y=e.offsetY;else if("function"==typeof t.fn.offset){var r=n.offset();o.clk_x=e.pageX-r.left,o.clk_y=e.pageY-r.top}else o.clk_x=e.pageX-i.offsetLeft,o.clk_y=e.pageY-i.offsetTop;setTimeout(function(){o.clk=o.clk_x=o.clk_y=null},100)}function n(){if(t.fn.ajaxSubmit.debug){var e="[jquery.form] "+Array.prototype.join.call(arguments,"");window.console&&window.console.log?window.console.log(e):window.opera&&window.opera.postError&&window.opera.postError(e)}}var s={};s.fileapi=void 0!==t("<input type='file'/>").get(0).files,s.formdata=void 0!==window.FormData;var o=!!t.fn.prop;t.fn.attr2=function(){if(!o)return this.attr.apply(this,arguments);var t=this.prop.apply(this,arguments);return t&&t.jquery||"string"==typeof t?t:this.attr.apply(this,arguments)},t.fn.ajaxSubmit=function(e){function i(i){var n,s,o=t.param(i,e.traditional).split("&"),r=o.length,a=[];for(n=0;n<r;n++)o[n]=o[n].replace(/\+/g," "),s=o[n].split("="),a.push([decodeURIComponent(s[0]),decodeURIComponent(s[1])]);return a}function r(n){for(var s=new FormData,o=0;o<n.length;o++)s.append(n[o].name,n[o].value);if(e.extraData){var r=i(e.extraData);for(o=0;o<r.length;o++)r[o]&&s.append(r[o][0],r[o][1])}e.data=null;var a=t.extend(!0,{},t.ajaxSettings,e,{contentType:!1,processData:!1,cache:!1,type:l||"POST"});e.uploadProgress&&(a.xhr=function(){var i=t.ajaxSettings.xhr();return i.upload&&i.upload.addEventListener("progress",function(t){var i=0,n=t.loaded||t.position,s=t.total;t.lengthComputable&&(i=Math.ceil(n/s*100)),e.uploadProgress(t,n,s,i)},!1),i}),a.data=null;var u=a.beforeSend;return a.beforeSend=function(t,i){e.formData?i.data=e.formData:i.data=s,u&&u.call(this,t,i)},t.ajax(a)}function a(i){function s(t){var e=null;try{t.contentWindow&&(e=t.contentWindow.document)}catch(t){n("cannot get iframe.contentWindow document: "+t)}if(e)return e;try{e=t.contentDocument?t.contentDocument:t.document}catch(i){n("cannot get iframe.contentDocument: "+i),e=t.document}return e}function r(){function e(){try{var t=s(v).readyState;n("state = "+t),t&&"uninitialized"==t.toLowerCase()&&setTimeout(e,50)}catch(t){n("Server abort: ",t," (",t.name,")"),a(T),x&&clearTimeout(x),x=void 0}}var i=h.attr2("target"),o=h.attr2("action");C.setAttribute("target",f),l&&!/post/i.test(l)||C.setAttribute("method","POST"),o!=d.url&&C.setAttribute("action",d.url),d.skipEncodingOverride||l&&!/post/i.test(l)||h.attr({encoding:"multipart/form-data",enctype:"multipart/form-data"}),d.timeout&&(x=setTimeout(function(){_=!0,a(k)},d.timeout));var r=[];try{if(d.extraData)for(var u in d.extraData)d.extraData.hasOwnProperty(u)&&(t.isPlainObject(d.extraData[u])&&d.extraData[u].hasOwnProperty("name")&&d.extraData[u].hasOwnProperty("value")?r.push(t('<input type="hidden" name="'+d.extraData[u].name+'">').val(d.extraData[u].value).appendTo(C)[0]):r.push(t('<input type="hidden" name="'+u+'">').val(d.extraData[u]).appendTo(C)[0]));d.iframeTarget||m.appendTo("body"),v.attachEvent?v.attachEvent("onload",a):v.addEventListener("load",a,!1),setTimeout(e,15);try{C.submit()}catch(t){var c=document.createElement("form").submit;c.apply(C)}}finally{C.setAttribute("action",o),i?C.setAttribute("target",i):h.removeAttr("target"),t(r).remove()}}function a(e){if(!y.aborted&&!O){if(N=s(v),N||(n("cannot access response document"),e=T),e===k&&y)return y.abort("timeout"),void S.reject(y,"timeout");if(e==T&&y)return y.abort("server abort"),void S.reject(y,"error","server abort");if(N&&N.location.href!=d.iframeSrc||_){v.detachEvent?v.detachEvent("onload",a):v.removeEventListener("load",a,!1);var i,o="success";try{if(_)throw"timeout";var r="xml"==d.dataType||N.XMLDocument||t.isXMLDoc(N);if(n("isXml="+r),!r&&window.opera&&(null===N.body||!N.body.innerHTML)&&--P)return n("requeing onLoad callback, DOM not available"),void setTimeout(a,250);var l=N.body?N.body:N.documentElement;y.responseText=l?l.innerHTML:null,y.responseXML=N.XMLDocument?N.XMLDocument:N,r&&(d.dataType="xml"),y.getResponseHeader=function(t){var e={"content-type":d.dataType};return e[t.toLowerCase()]},l&&(y.status=Number(l.getAttribute("status"))||y.status,y.statusText=l.getAttribute("statusText")||y.statusText);var u=(d.dataType||"").toLowerCase(),c=/(json|script|text)/.test(u);if(c||d.textarea){var h=N.getElementsByTagName("textarea")[0];if(h)y.responseText=h.value,y.status=Number(h.getAttribute("status"))||y.status,y.statusText=h.getAttribute("statusText")||y.statusText;else if(c){var f=N.getElementsByTagName("pre")[0],g=N.getElementsByTagName("body")[0];f?y.responseText=f.textContent?f.textContent:f.innerText:g&&(y.responseText=g.textContent?g.textContent:g.innerText)}}else"xml"==u&&!y.responseXML&&y.responseText&&(y.responseXML=R(y.responseText));try{D=j(y,u,d)}catch(t){o="parsererror",y.error=i=t||o}}catch(t){n("error caught: ",t),o="error",y.error=i=t||o}y.aborted&&(n("upload aborted"),o=null),y.status&&(o=y.status>=200&&y.status<300||304===y.status?"success":"error"),"success"===o?(d.success&&d.success.call(d.context,D,"success",y),S.resolve(y.responseText,"success",y),p&&t.event.trigger("ajaxSuccess",[y,d])):o&&(void 0===i&&(i=y.statusText),d.error&&d.error.call(d.context,y,o,i),S.reject(y,"error",i),p&&t.event.trigger("ajaxError",[y,d,i])),p&&t.event.trigger("ajaxComplete",[y,d]),p&&!--t.active&&t.event.trigger("ajaxStop"),d.complete&&d.complete.call(d.context,y,o),O=!0,d.timeout&&clearTimeout(x),setTimeout(function(){d.iframeTarget?m.attr("src",d.iframeSrc):m.remove(),y.responseXML=null},100)}}}var u,c,d,p,f,m,v,y,b,w,_,x,C=h[0],S=t.Deferred();if(S.abort=function(t){y.abort(t)},i)for(c=0;c<g.length;c++)u=t(g[c]),o?u.prop("disabled",!1):u.removeAttr("disabled");if(d=t.extend(!0,{},t.ajaxSettings,e),d.context=d.context||d,f="jqFormIO"+(new Date).getTime(),d.iframeTarget?(m=t(d.iframeTarget),w=m.attr2("name"),w?f=w:m.attr2("name",f)):(m=t('<iframe name="'+f+'" src="'+d.iframeSrc+'" />'),m.css({position:"absolute",top:"-1000px",left:"-1000px"})),v=m[0],y={aborted:0,responseText:null,responseXML:null,status:0,statusText:"n/a",getAllResponseHeaders:function(){},getResponseHeader:function(){},setRequestHeader:function(){},abort:function(e){var i="timeout"===e?"timeout":"aborted";n("aborting upload... "+i),this.aborted=1;try{v.contentWindow.document.execCommand&&v.contentWindow.document.execCommand("Stop")}catch(t){}m.attr("src",d.iframeSrc),y.error=i,d.error&&d.error.call(d.context,y,i,e),p&&t.event.trigger("ajaxError",[y,d,i]),d.complete&&d.complete.call(d.context,y,i)}},p=d.global,p&&0===t.active++&&t.event.trigger("ajaxStart"),p&&t.event.trigger("ajaxSend",[y,d]),d.beforeSend&&d.beforeSend.call(d.context,y,d)===!1)return d.global&&t.active--,S.reject(),S;if(y.aborted)return S.reject(),S;b=C.clk,b&&(w=b.name,w&&!b.disabled&&(d.extraData=d.extraData||{},d.extraData[w]=b.value,"image"==b.type&&(d.extraData[w+".x"]=C.clk_x,d.extraData[w+".y"]=C.clk_y)));var k=1,T=2,E=t("meta[name=csrf-token]").attr("content"),A=t("meta[name=csrf-param]").attr("content");A&&E&&(d.extraData=d.extraData||{},d.extraData[A]=E),d.forceSync?r():setTimeout(r,10);var D,N,O,P=50,R=t.parseXML||function(t,e){return window.ActiveXObject?(e=new ActiveXObject("Microsoft.XMLDOM"),e.async="false",e.loadXML(t)):e=(new DOMParser).parseFromString(t,"text/xml"),e&&e.documentElement&&"parsererror"!=e.documentElement.nodeName?e:null},M=t.parseJSON||function(t){return window.eval("("+t+")")},j=function(e,i,n){var s=e.getResponseHeader("content-type")||"",o="xml"===i||!i&&s.indexOf("xml")>=0,r=o?e.responseXML:e.responseText;return o&&"parsererror"===r.documentElement.nodeName&&t.error&&t.error("parsererror"),n&&n.dataFilter&&(r=n.dataFilter(r,i)),"string"==typeof r&&("json"===i||!i&&s.indexOf("json")>=0?r=M(r):("script"===i||!i&&s.indexOf("javascript")>=0)&&t.globalEval(r)),r};return S}if(!this.length)return n("ajaxSubmit: skipping submit process - no element selected"),this;var l,u,c,h=this;"function"==typeof e?e={success:e}:void 0===e&&(e={}),l=e.type||this.attr2("method"),u=e.url||this.attr2("action"),c="string"==typeof u?t.trim(u):"",c=c||window.location.href||"",c&&(c=(c.match(/^([^#]+)/)||[])[1]),e=t.extend(!0,{url:c,success:t.ajaxSettings.success,type:l||t.ajaxSettings.type,iframeSrc:/^https/i.test(window.location.href||"")?"javascript:false":"about:blank"},e);var d={};if(this.trigger("form-pre-serialize",[this,e,d]),d.veto)return n("ajaxSubmit: submit vetoed via form-pre-serialize trigger"),this;if(e.beforeSerialize&&e.beforeSerialize(this,e)===!1)return n("ajaxSubmit: submit aborted via beforeSerialize callback"),this;var p=e.traditional;void 0===p&&(p=t.ajaxSettings.traditional);var f,g=[],m=this.formToArray(e.semantic,g);if(e.data&&(e.extraData=e.data,f=t.param(e.data,p)),e.beforeSubmit&&e.beforeSubmit(m,this,e)===!1)return n("ajaxSubmit: submit aborted via beforeSubmit callback"),this;if(this.trigger("form-submit-validate",[m,this,e,d]),d.veto)return n("ajaxSubmit: submit vetoed via form-submit-validate trigger"),this;var v=t.param(m,p);f&&(v=v?v+"&"+f:f),"GET"==e.type.toUpperCase()?(e.url+=(e.url.indexOf("?")>=0?"&":"?")+v,e.data=null):e.data=v;var y=[];if(e.resetForm&&y.push(function(){h.resetForm()}),e.clearForm&&y.push(function(){h.clearForm(e.includeHidden)}),!e.dataType&&e.target){var b=e.success||function(){};y.push(function(i){var n=e.replaceTarget?"replaceWith":"html";
|
||
t(e.target)[n](i).each(b,arguments)})}else e.success&&y.push(e.success);if(e.success=function(t,i,n){for(var s=e.context||this,o=0,r=y.length;o<r;o++)y[o].apply(s,[t,i,n||h,h])},e.error){var w=e.error;e.error=function(t,i,n){var s=e.context||this;w.apply(s,[t,i,n,h])}}if(e.complete){var _=e.complete;e.complete=function(t,i){var n=e.context||this;_.apply(n,[t,i,h])}}var x=t("input[type=file]:enabled",this).filter(function(){return""!==t(this).val()}),C=x.length>0,S="multipart/form-data",k=h.attr("enctype")==S||h.attr("encoding")==S,T=s.fileapi&&s.formdata;n("fileAPI :"+T);var E,A=(C||k)&&!T;e.iframe!==!1&&(e.iframe||A)?e.closeKeepAlive?t.get(e.closeKeepAlive,function(){E=a(m)}):E=a(m):E=(C||k)&&T?r(m):t.ajax(e),h.removeData("jqxhr").data("jqxhr",E);for(var D=0;D<g.length;D++)g[D]=null;return this.trigger("form-submit-notify",[this,e]),this},t.fn.ajaxForm=function(s){if(s=s||{},s.delegation=s.delegation&&t.isFunction(t.fn.on),!s.delegation&&0===this.length){var o={s:this.selector,c:this.context};return!t.isReady&&o.s?(n("DOM not ready, queuing ajaxForm"),t(function(){t(o.s,o.c).ajaxForm(s)}),this):(n("terminating; zero elements found by selector"+(t.isReady?"":" (DOM not ready)")),this)}return s.delegation?(t(document).off("submit.form-plugin",this.selector,e).off("click.form-plugin",this.selector,i).on("submit.form-plugin",this.selector,s,e).on("click.form-plugin",this.selector,s,i),this):this.ajaxFormUnbind().bind("submit.form-plugin",s,e).bind("click.form-plugin",s,i)},t.fn.ajaxFormUnbind=function(){return this.unbind("submit.form-plugin click.form-plugin")},t.fn.formToArray=function(e,i){var n=[];if(0===this.length)return n;var o=this[0],r=e?o.getElementsByTagName("*"):o.elements;if(!r)return n;var a,l,u,c,h,d,p;for(a=0,d=r.length;a<d;a++)if(h=r[a],u=h.name,u&&!h.disabled)if(e&&o.clk&&"image"==h.type)o.clk==h&&(n.push({name:u,value:t(h).val(),type:h.type}),n.push({name:u+".x",value:o.clk_x},{name:u+".y",value:o.clk_y}));else if(c=t.fieldValue(h,!0),c&&c.constructor==Array)for(i&&i.push(h),l=0,p=c.length;l<p;l++)n.push({name:u,value:c[l]});else if(s.fileapi&&"file"==h.type){i&&i.push(h);var f=h.files;if(f.length)for(l=0;l<f.length;l++)n.push({name:u,value:f[l],type:h.type});else n.push({name:u,value:"",type:h.type})}else null!==c&&"undefined"!=typeof c&&(i&&i.push(h),n.push({name:u,value:c,type:h.type,required:h.required}));if(!e&&o.clk){var g=t(o.clk),m=g[0];u=m.name,u&&!m.disabled&&"image"==m.type&&(n.push({name:u,value:g.val()}),n.push({name:u+".x",value:o.clk_x},{name:u+".y",value:o.clk_y}))}return n},t.fn.formSerialize=function(e){return t.param(this.formToArray(e))},t.fn.fieldSerialize=function(e){var i=[];return this.each(function(){var n=this.name;if(n){var s=t.fieldValue(this,e);if(s&&s.constructor==Array)for(var o=0,r=s.length;o<r;o++)i.push({name:n,value:s[o]});else null!==s&&"undefined"!=typeof s&&i.push({name:this.name,value:s})}}),t.param(i)},t.fn.fieldValue=function(e){for(var i=[],n=0,s=this.length;n<s;n++){var o=this[n],r=t.fieldValue(o,e);null===r||"undefined"==typeof r||r.constructor==Array&&!r.length||(r.constructor==Array?t.merge(i,r):i.push(r))}return i},t.fieldValue=function(e,i){var n=e.name,s=e.type,o=e.tagName.toLowerCase();if(void 0===i&&(i=!0),i&&(!n||e.disabled||"reset"==s||"button"==s||("checkbox"==s||"radio"==s)&&!e.checked||("submit"==s||"image"==s)&&e.form&&e.form.clk!=e||"select"==o&&e.selectedIndex==-1))return null;if("select"==o){var r=e.selectedIndex;if(r<0)return null;for(var a=[],l=e.options,u="select-one"==s,c=u?r+1:l.length,h=u?r:0;h<c;h++){var d=l[h];if(d.selected){var p=d.value;if(p||(p=d.attributes&&d.attributes.value&&!d.attributes.value.specified?d.text:d.value),u)return p;a.push(p)}}return a}return t(e).val()},t.fn.clearForm=function(e){return this.each(function(){t("input,select,textarea",this).clearFields(e)})},t.fn.clearFields=t.fn.clearInputs=function(e){var i=/^(?:color|date|datetime|email|month|number|password|range|search|tel|text|time|url|week)$/i;return this.each(function(){var n=this.type,s=this.tagName.toLowerCase();i.test(n)||"textarea"==s?this.value="":"checkbox"==n||"radio"==n?this.checked=!1:"select"==s?this.selectedIndex=-1:"file"==n?/MSIE/.test(navigator.userAgent)?t(this).replaceWith(t(this).clone(!0)):t(this).val(""):e&&(e===!0&&/hidden/.test(n)||"string"==typeof e&&t(this).is(e))&&(this.value="")})},t.fn.resetForm=function(){return this.each(function(){("function"==typeof this.reset||"object"==typeof this.reset&&!this.reset.nodeType)&&this.reset()})},t.fn.enable=function(t){return void 0===t&&(t=!0),this.each(function(){this.disabled=!t})},t.fn.selected=function(e){return void 0===e&&(e=!0),this.each(function(){var i=this.type;if("checkbox"==i||"radio"==i)this.checked=e;else if("option"==this.tagName.toLowerCase()){var n=t(this).parent("select");e&&n[0]&&"select-one"==n[0].type&&n.find("option").selected(!1),this.selected=e}})},t.fn.ajaxSubmit.debug=!1}("undefined"!=typeof t?t:window.Zepto)}).call(e,i(1))},function(t,e,i){(function(t,e){t&&function(t){if(!t.support.opacity&&!t.support.style)try{document.execCommand("BackgroundImageCache",!1,!0)}catch(t){}t.fn.rating=function(e){if(0==this.length)return this;if("string"==typeof arguments[0]){if(this.length>1){var i=arguments;return this.each(function(){t.fn.rating.apply(t(this),i)})}return t.fn.rating[arguments[0]].apply(this,t.makeArray(arguments).slice(1)||[]),this}var e=t.extend({},t.fn.rating.options,e||{});return t.fn.rating.calls++,this.not(".star-rating-applied").addClass("star-rating-applied").each(function(){var i,n=t(this),s=(this.name||"unnamed-rating").replace(/\[|\]/g,"_").replace(/^\_+|\_+$/g,""),o=t(this.form||document.body),r=o.data("rating");r&&r.call==t.fn.rating.calls||(r={count:0,call:t.fn.rating.calls});var a=r[s]||o.data("rating"+s);a&&(i=a.data("rating")),a&&i?i.count++:(i=t.extend({},e||{},(t.metadata?n.metadata():t.meta?n.data():null)||{},{count:0,stars:[],inputs:[]}),i.serial=r.count++,a=t('<span class="star-rating-control"/>'),n.before(a),a.addClass("rating-to-be-drawn"),(n.attr("disabled")||n.hasClass("disabled"))&&(i.readOnly=!0),n.hasClass("required")&&(i.required=!0),a.append(i.cancel=t('<div class="rating-cancel"><a title="'+i.cancel+'">'+i.cancelValue+"</a></div>").on("mouseover",function(){t(this).rating("drain"),t(this).addClass("star-rating-hover")}).on("mouseout",function(){t(this).rating("draw"),t(this).removeClass("star-rating-hover")}).on("click",function(){t(this).rating("select")}).data("rating",i)));var l=t('<div role="text" aria-label="'+this.title+'" class="star-rating rater-'+i.serial+'"><a title="'+(this.title||this.value)+'">'+this.value+"</a></div>");if(a.append(l),this.id&&l.attr("id",this.id),this.className&&l.addClass(this.className),i.half&&(i.split=2),"number"==typeof i.split&&i.split>0){var u=(t.fn.width?l.width():0)||i.starWidth,c=i.count%i.split,h=Math.floor(u/i.split);l.width(h).find("a").css({"margin-left":"-"+c*h+"px"})}i.readOnly?l.addClass("star-rating-readonly"):l.addClass("star-rating-live").on("mouseover",function(){t(this).rating("fill"),t(this).rating("focus")}).on("mouseout",function(){t(this).rating("draw"),t(this).rating("blur")}).on("click",function(){t(this).rating("select")}),this.checked&&(i.current=l),"A"==this.nodeName&&t(this).hasClass("selected")&&(i.current=l),n.hide(),n.on("change.rating",function(e){return!e.selfTriggered&&void t(this).rating("select")}),l.data("rating.input",n.data("rating.star",l)),i.stars[i.stars.length]=l[0],i.inputs[i.inputs.length]=n[0],i.rater=r[s]=a,i.context=o,n.data("rating",i),a.data("rating",i),l.data("rating",i),o.data("rating",r),o.data("rating"+s,a)}),t(".rating-to-be-drawn").rating("draw").removeClass("rating-to-be-drawn"),this},t.extend(t.fn.rating,{calls:0,focus:function(){var e=this.data("rating");if(!e)return this;if(!e.focus)return this;var i=t(this).data("rating.input")||t("INPUT"==this.tagName?this:null);e.focus&&e.focus.apply(i[0],[i.val(),t("a",i.data("rating.star"))[0]])},blur:function(){var e=this.data("rating");if(!e)return this;if(!e.blur)return this;var i=t(this).data("rating.input")||t("INPUT"==this.tagName?this:null);e.blur&&e.blur.apply(i[0],[i.val(),t("a",i.data("rating.star"))[0]])},fill:function(){var t=this.data("rating");return t?void(t.readOnly||(this.rating("drain"),this.prevAll().addBack().filter(".rater-"+t.serial).addClass("star-rating-hover"))):this},drain:function(){var t=this.data("rating");return t?void(t.readOnly||t.rater.children().filter(".rater-"+t.serial).removeClass("star-rating-on").removeClass("star-rating-hover")):this},draw:function(){var e=this.data("rating");if(!e)return this;this.rating("drain");var i=t(e.current),n=i.length?i.prevAll().addBack().filter(".rater-"+e.serial):null;n&&n.addClass("star-rating-on"),e.cancel[e.readOnly||e.required?"hide":"show"](),this.siblings()[e.readOnly?"addClass":"removeClass"]("star-rating-readonly")},select:function(e,i){var n=this.data("rating");if(!n)return this;if(!n.readOnly){if(n.current=null,"undefined"!=typeof e||this.length>1){if("number"==typeof e)return t(n.stars[e]).rating("select",void 0,i);if("string"==typeof e)return t.each(n.stars,function(){t(this).data("rating.input").val()==e&&t(this).rating("select",void 0,i)}),this}else n.current="INPUT"==this[0].tagName?this.data("rating.star"):this.is(".rater-"+n.serial)?this:null;this.data("rating",n),this.rating("draw");var s=t(n.current?n.current.data("rating.input"):null),o=t(n.inputs).filter(":checked"),r=t(n.inputs).not(s);return r.prop("checked",!1),s.prop("checked",!0),t(s.length?s:o).trigger({type:"change",selfTriggered:!0}),(i||void 0==i)&&n.callback&&n.callback.apply(s[0],[s.val(),t("a",n.current)[0]]),this}},readOnly:function(e,i){var n=this.data("rating");return n?(n.readOnly=!(!e&&void 0!=e),i?t(n.inputs).attr("disabled","disabled"):t(n.inputs).removeAttr("disabled"),this.data("rating",n),void this.rating("draw")):this},disable:function(){this.rating("readOnly",!0,!0)},enable:function(){this.rating("readOnly",!1,!1)}}),t.fn.rating.options={cancel:"Cancel Rating",cancelValue:"",split:0,starWidth:16},t(function(){t("input[type=radio].star").rating()})}(e)}).call(e,i(1),i(1))},function(t,e,i){(function(t){!function(t){"undefined"==typeof t.fn.each2&&t.extend(t.fn,{each2:function(e){for(var i=t([0]),n=-1,s=this.length;++n<s&&(i.context=i[0]=this[n])&&e.call(i[0],n,i)!==!1;);return this}})}(t),function(t,e){"use strict";function i(e){var i=t(document.createTextNode(""));e.before(i),i.before(e),i.remove()}function n(t){function e(t){return F[t]||t}return t.replace(/[^\u0000-\u007E]/g,e)}function s(t,e){for(var i=0,n=e.length;i<n;i+=1)if(r(t,e[i]))return i;return-1}function o(){var e=t($);e.appendTo("body");var i={width:e.width()-e[0].clientWidth,height:e.height()-e[0].clientHeight};return e.remove(),i}function r(t,i){return t===i||t!==e&&i!==e&&(null!==t&&null!==i&&(t.constructor===String?t+""==i+"":i.constructor===String&&i+""==t+""))}function a(e,i){var n,s,o;if(null===e||e.length<1)return[];for(n=e.split(i),s=0,o=n.length;s<o;s+=1)n[s]=t.trim(n[s]);return n}function l(t){return t.outerWidth(!1)-t.width()}function u(i){var n="keyup-change-value";i.on("keydown",function(){t.data(i,n)===e&&t.data(i,n,i.val())}),i.on("keyup",function(){var s=t.data(i,n);s!==e&&i.val()!==s&&(t.removeData(i,n),i.trigger("keyup-change"))})}function c(i){i.on("mousemove",function(i){var n=L;n!==e&&n.x===i.pageX&&n.y===i.pageY||t(i.target).trigger("mousemove-filtered",i)})}function h(t,i,n){n=n||e;var s;return function(){var e=arguments;window.clearTimeout(s),s=window.setTimeout(function(){i.apply(n,e)},t)}}function d(t,e){var i=h(t,function(t){e.trigger("scroll-debounced",t)});e.on("scroll",function(t){s(t.target,e.get())>=0&&i(t)})}function p(t){t[0]!==document.activeElement&&window.setTimeout(function(){var e,i=t[0],n=t.val().length;t.focus();var s=i.offsetWidth>0||i.offsetHeight>0;s&&i===document.activeElement&&(i.setSelectionRange?i.setSelectionRange(n,n):i.createTextRange&&(e=i.createTextRange(),e.collapse(!1),e.select()))},0)}function f(e){e=t(e)[0];var i=0,n=0;if("selectionStart"in e)i=e.selectionStart,n=e.selectionEnd-i;else if("selection"in document){e.focus();var s=document.selection.createRange();n=document.selection.createRange().text.length,s.moveStart("character",-e.value.length),i=s.text.length-n}return{offset:i,length:n}}function g(t){t.preventDefault(),t.stopPropagation()}function m(t){t.preventDefault(),t.stopImmediatePropagation()}function v(e){if(!j){var i=e[0].currentStyle||window.getComputedStyle(e[0],null);j=t(document.createElement("div")).css({position:"absolute",left:"-10000px",top:"-10000px",display:"none",fontSize:i.fontSize,fontFamily:i.fontFamily,fontStyle:i.fontStyle,fontWeight:i.fontWeight,letterSpacing:i.letterSpacing,textTransform:i.textTransform,whiteSpace:"nowrap"}),j.attr("class","select2-sizer"),t("body").append(j)}return j.text(e.val()),j.width()}function y(e,i,n){var s,o,r=[];s=t.trim(e.attr("class")),s&&(s=""+s,t(s.split(/\s+/)).each2(function(){0===this.indexOf("select2-")&&r.push(this)})),s=t.trim(i.attr("class")),s&&(s=""+s,t(s.split(/\s+/)).each2(function(){0!==this.indexOf("select2-")&&(o=n(this),o&&r.push(o))})),e.attr("class",r.join(" "))}function b(t,e,i,s){var o=n(t.toUpperCase()).indexOf(n(e.toUpperCase())),r=e.length;return o<0?void i.push(s(t)):(i.push(s(t.substring(0,o))),i.push("<span class='select2-match'>"),i.push(s(t.substring(o,o+r))),i.push("</span>"),void i.push(s(t.substring(o+r,t.length))))}function w(t){var e={"\\":"\","&":"&","<":"<",">":">",'"':""","'":"'","/":"/"};return String(t).replace(/[&<>"'\/\\]/g,function(t){return e[t]})}function _(i){var n,s=null,o=i.quietMillis||100,r=i.url,a=this;return function(l){window.clearTimeout(n),n=window.setTimeout(function(){var n=i.data,o=r,u=i.transport||t.fn.select2.ajaxDefaults.transport,c={type:i.type||"GET",cache:i.cache||!1,jsonpCallback:i.jsonpCallback||e,dataType:i.dataType||"json"},h=t.extend({},t.fn.select2.ajaxDefaults.params,c);n=n?n.call(a,l.term,l.page,l.context):null,o="function"==typeof o?o.call(a,l.term,l.page,l.context):o,s&&"function"==typeof s.abort&&s.abort(),i.params&&(t.isFunction(i.params)?t.extend(h,i.params.call(a)):t.extend(h,i.params)),t.extend(h,{url:o,dataType:i.dataType,data:n,success:function(t){var e=i.results(t,l.page,l);l.callback(e)},error:function(t,e,i){var n={hasError:!0,jqXHR:t,textStatus:e,errorThrown:i};l.callback(n)}}),s=u.call(a,h)},o)}}function x(e){var i,n,s=e,o=function(t){return""+t.text};t.isArray(s)&&(n=s,s={results:n}),t.isFunction(s)===!1&&(n=s,s=function(){return n});var r=s();return r.text&&(o=r.text,t.isFunction(o)||(i=r.text,o=function(t){return t[i]})),function(e){var i,n=e.term,r={results:[]};return""===n?void e.callback(s()):(i=function(s,r){var a,l;if(s=s[0],s.children){a={};for(l in s)s.hasOwnProperty(l)&&(a[l]=s[l]);a.children=[],t(s.children).each2(function(t,e){i(e,a.children)}),(a.children.length||e.matcher(n,o(a),s))&&r.push(a)}else e.matcher(n,o(s),s)&&r.push(s)},t(s().results).each2(function(t,e){i(e,r.results)}),void e.callback(r))}}function C(i){var n=t.isFunction(i);return function(s){var o=s.term,r={results:[]},a=n?i(s):i;t.isArray(a)&&(t(a).each(function(){var t=this.text!==e,i=t?this.text:this;(""===o||s.matcher(o,i))&&r.results.push(t?this:{id:this,text:this})}),s.callback(r))}}function S(e,i){if(t.isFunction(e))return!0;if(!e)return!1;if("string"==typeof e)return!0;throw new Error(i+" must be a string, function, or falsy value")}function k(e,i){if(t.isFunction(e)){var n=Array.prototype.slice.call(arguments,2);return e.apply(i,n)}return e}function T(e){var i=0;return t.each(e,function(t,e){e.children?i+=T(e.children):i++}),i}function E(t,i,n,s){var o,a,l,u,c,h=t,d=!1;if(!s.createSearchChoice||!s.tokenSeparators||s.tokenSeparators.length<1)return e;for(;;){for(a=-1,l=0,u=s.tokenSeparators.length;l<u&&(c=s.tokenSeparators[l],a=t.indexOf(c),!(a>=0));l++);if(a<0)break;if(o=t.substring(0,a),t=t.substring(a+c.length),o.length>0&&(o=s.createSearchChoice.call(this,o,i),o!==e&&null!==o&&s.id(o)!==e&&null!==s.id(o))){for(d=!1,l=0,u=i.length;l<u;l++)if(r(s.id(o),s.id(i[l]))){d=!0;break}d||n(o)}}return h!==t?t:void 0}function A(){var e=this;t.each(arguments,function(t,i){e[i].remove(),e[i]=null})}function D(e,i){var n=function(){};return n.prototype=new e,n.prototype.constructor=n,n.prototype.parent=e.prototype,n.prototype=t.extend(n.prototype,i),n}if(window.Select2===e){var N,O,P,R,M,j,I,H,L={x:0,y:0},N={TAB:9,ENTER:13,ESC:27,SPACE:32,LEFT:37,UP:38,RIGHT:39,DOWN:40,SHIFT:16,CTRL:17,ALT:18,PAGE_UP:33,PAGE_DOWN:34,HOME:36,END:35,BACKSPACE:8,DELETE:46,isArrow:function(t){switch(t=t.which?t.which:t){case N.LEFT:case N.RIGHT:case N.UP:case N.DOWN:return!0}return!1},isControl:function(t){var e=t.which;switch(e){case N.SHIFT:case N.CTRL:case N.ALT:return!0}return!!t.metaKey},isFunctionKey:function(t){return t=t.which?t.which:t,t>=112&&t<=123}},$="<div class='select2-measure-scrollbar'></div>",F={"Ⓐ":"A","A":"A","À":"A","Á":"A","Â":"A","Ầ":"A","Ấ":"A","Ẫ":"A","Ẩ":"A","Ã":"A","Ā":"A","Ă":"A","Ằ":"A","Ắ":"A","Ẵ":"A","Ẳ":"A","Ȧ":"A","Ǡ":"A","Ä":"A","Ǟ":"A","Ả":"A","Å":"A","Ǻ":"A","Ǎ":"A","Ȁ":"A","Ȃ":"A","Ạ":"A","Ậ":"A","Ặ":"A","Ḁ":"A","Ą":"A","Ⱥ":"A","Ɐ":"A","Ꜳ":"AA","Æ":"AE","Ǽ":"AE","Ǣ":"AE","Ꜵ":"AO","Ꜷ":"AU","Ꜹ":"AV","Ꜻ":"AV","Ꜽ":"AY","Ⓑ":"B","B":"B","Ḃ":"B","Ḅ":"B","Ḇ":"B","Ƀ":"B","Ƃ":"B","Ɓ":"B","Ⓒ":"C","C":"C","Ć":"C","Ĉ":"C","Ċ":"C","Č":"C","Ç":"C","Ḉ":"C","Ƈ":"C","Ȼ":"C","Ꜿ":"C","Ⓓ":"D","D":"D","Ḋ":"D","Ď":"D","Ḍ":"D","Ḑ":"D","Ḓ":"D","Ḏ":"D","Đ":"D","Ƌ":"D","Ɗ":"D","Ɖ":"D","Ꝺ":"D","DZ":"DZ","DŽ":"DZ","Dz":"Dz","Dž":"Dz","Ⓔ":"E","E":"E","È":"E","É":"E","Ê":"E","Ề":"E","Ế":"E","Ễ":"E","Ể":"E","Ẽ":"E","Ē":"E","Ḕ":"E","Ḗ":"E","Ĕ":"E","Ė":"E","Ë":"E","Ẻ":"E","Ě":"E","Ȅ":"E","Ȇ":"E","Ẹ":"E","Ệ":"E","Ȩ":"E","Ḝ":"E","Ę":"E","Ḙ":"E","Ḛ":"E","Ɛ":"E","Ǝ":"E","Ⓕ":"F","F":"F","Ḟ":"F","Ƒ":"F","Ꝼ":"F","Ⓖ":"G","G":"G","Ǵ":"G","Ĝ":"G","Ḡ":"G","Ğ":"G","Ġ":"G","Ǧ":"G","Ģ":"G","Ǥ":"G","Ɠ":"G","Ꞡ":"G","Ᵹ":"G","Ꝿ":"G","Ⓗ":"H","H":"H","Ĥ":"H","Ḣ":"H","Ḧ":"H","Ȟ":"H","Ḥ":"H","Ḩ":"H","Ḫ":"H","Ħ":"H","Ⱨ":"H","Ⱶ":"H","Ɥ":"H","Ⓘ":"I","I":"I","Ì":"I","Í":"I","Î":"I","Ĩ":"I","Ī":"I","Ĭ":"I","İ":"I","Ï":"I","Ḯ":"I","Ỉ":"I","Ǐ":"I","Ȉ":"I","Ȋ":"I","Ị":"I","Į":"I","Ḭ":"I","Ɨ":"I","Ⓙ":"J","J":"J","Ĵ":"J","Ɉ":"J","Ⓚ":"K","K":"K","Ḱ":"K","Ǩ":"K","Ḳ":"K","Ķ":"K","Ḵ":"K","Ƙ":"K","Ⱪ":"K","Ꝁ":"K","Ꝃ":"K","Ꝅ":"K","Ꞣ":"K","Ⓛ":"L","L":"L","Ŀ":"L","Ĺ":"L","Ľ":"L","Ḷ":"L","Ḹ":"L","Ļ":"L","Ḽ":"L","Ḻ":"L","Ł":"L","Ƚ":"L","Ɫ":"L","Ⱡ":"L","Ꝉ":"L","Ꝇ":"L","Ꞁ":"L","LJ":"LJ","Lj":"Lj","Ⓜ":"M","M":"M","Ḿ":"M","Ṁ":"M","Ṃ":"M","Ɱ":"M","Ɯ":"M","Ⓝ":"N","N":"N","Ǹ":"N","Ń":"N","Ñ":"N","Ṅ":"N","Ň":"N","Ṇ":"N","Ņ":"N","Ṋ":"N","Ṉ":"N","Ƞ":"N","Ɲ":"N","Ꞑ":"N","Ꞥ":"N","NJ":"NJ","Nj":"Nj","Ⓞ":"O","O":"O","Ò":"O","Ó":"O","Ô":"O","Ồ":"O","Ố":"O","Ỗ":"O","Ổ":"O","Õ":"O","Ṍ":"O","Ȭ":"O","Ṏ":"O","Ō":"O","Ṑ":"O","Ṓ":"O","Ŏ":"O","Ȯ":"O","Ȱ":"O","Ö":"O","Ȫ":"O","Ỏ":"O","Ő":"O","Ǒ":"O","Ȍ":"O","Ȏ":"O","Ơ":"O","Ờ":"O","Ớ":"O","Ỡ":"O","Ở":"O","Ợ":"O","Ọ":"O","Ộ":"O","Ǫ":"O","Ǭ":"O","Ø":"O","Ǿ":"O","Ɔ":"O","Ɵ":"O","Ꝋ":"O","Ꝍ":"O","Ƣ":"OI","Ꝏ":"OO","Ȣ":"OU","Ⓟ":"P","P":"P","Ṕ":"P","Ṗ":"P","Ƥ":"P","Ᵽ":"P","Ꝑ":"P","Ꝓ":"P","Ꝕ":"P","Ⓠ":"Q","Q":"Q","Ꝗ":"Q","Ꝙ":"Q","Ɋ":"Q","Ⓡ":"R","R":"R","Ŕ":"R","Ṙ":"R","Ř":"R","Ȑ":"R","Ȓ":"R","Ṛ":"R","Ṝ":"R","Ŗ":"R","Ṟ":"R","Ɍ":"R","Ɽ":"R","Ꝛ":"R","Ꞧ":"R","Ꞃ":"R","Ⓢ":"S","S":"S","ẞ":"S","Ś":"S","Ṥ":"S","Ŝ":"S","Ṡ":"S","Š":"S","Ṧ":"S","Ṣ":"S","Ṩ":"S","Ș":"S","Ş":"S","Ȿ":"S","Ꞩ":"S","Ꞅ":"S","Ⓣ":"T","T":"T","Ṫ":"T","Ť":"T","Ṭ":"T","Ț":"T","Ţ":"T","Ṱ":"T","Ṯ":"T","Ŧ":"T","Ƭ":"T","Ʈ":"T","Ⱦ":"T","Ꞇ":"T","Ꜩ":"TZ","Ⓤ":"U","U":"U","Ù":"U","Ú":"U","Û":"U","Ũ":"U","Ṹ":"U","Ū":"U","Ṻ":"U","Ŭ":"U","Ü":"U","Ǜ":"U","Ǘ":"U","Ǖ":"U","Ǚ":"U","Ủ":"U","Ů":"U","Ű":"U","Ǔ":"U","Ȕ":"U","Ȗ":"U","Ư":"U","Ừ":"U","Ứ":"U","Ữ":"U","Ử":"U","Ự":"U","Ụ":"U","Ṳ":"U","Ų":"U","Ṷ":"U","Ṵ":"U","Ʉ":"U","Ⓥ":"V","V":"V","Ṽ":"V","Ṿ":"V","Ʋ":"V","Ꝟ":"V","Ʌ":"V","Ꝡ":"VY","Ⓦ":"W","W":"W","Ẁ":"W","Ẃ":"W","Ŵ":"W","Ẇ":"W","Ẅ":"W","Ẉ":"W","Ⱳ":"W","Ⓧ":"X","X":"X","Ẋ":"X","Ẍ":"X","Ⓨ":"Y","Y":"Y","Ỳ":"Y","Ý":"Y","Ŷ":"Y","Ỹ":"Y","Ȳ":"Y","Ẏ":"Y","Ÿ":"Y","Ỷ":"Y","Ỵ":"Y","Ƴ":"Y","Ɏ":"Y","Ỿ":"Y","Ⓩ":"Z","Z":"Z","Ź":"Z","Ẑ":"Z","Ż":"Z","Ž":"Z","Ẓ":"Z","Ẕ":"Z","Ƶ":"Z","Ȥ":"Z","Ɀ":"Z","Ⱬ":"Z","Ꝣ":"Z","ⓐ":"a","a":"a","ẚ":"a","à":"a","á":"a","â":"a","ầ":"a","ấ":"a","ẫ":"a","ẩ":"a","ã":"a","ā":"a","ă":"a","ằ":"a","ắ":"a","ẵ":"a","ẳ":"a","ȧ":"a","ǡ":"a","ä":"a","ǟ":"a","ả":"a","å":"a","ǻ":"a","ǎ":"a","ȁ":"a","ȃ":"a","ạ":"a","ậ":"a","ặ":"a","ḁ":"a","ą":"a","ⱥ":"a","ɐ":"a","ꜳ":"aa","æ":"ae","ǽ":"ae","ǣ":"ae","ꜵ":"ao","ꜷ":"au","ꜹ":"av","ꜻ":"av","ꜽ":"ay","ⓑ":"b","b":"b","ḃ":"b","ḅ":"b","ḇ":"b","ƀ":"b","ƃ":"b","ɓ":"b","ⓒ":"c","c":"c","ć":"c","ĉ":"c","ċ":"c","č":"c","ç":"c","ḉ":"c","ƈ":"c","ȼ":"c","ꜿ":"c","ↄ":"c","ⓓ":"d","d":"d","ḋ":"d","ď":"d","ḍ":"d","ḑ":"d","ḓ":"d","ḏ":"d","đ":"d","ƌ":"d","ɖ":"d","ɗ":"d","ꝺ":"d","dz":"dz","dž":"dz","ⓔ":"e","e":"e","è":"e","é":"e","ê":"e","ề":"e","ế":"e","ễ":"e","ể":"e","ẽ":"e","ē":"e","ḕ":"e","ḗ":"e","ĕ":"e","ė":"e","ë":"e","ẻ":"e","ě":"e","ȅ":"e","ȇ":"e","ẹ":"e","ệ":"e","ȩ":"e","ḝ":"e","ę":"e","ḙ":"e","ḛ":"e","ɇ":"e","ɛ":"e","ǝ":"e","ⓕ":"f","f":"f","ḟ":"f","ƒ":"f","ꝼ":"f","ⓖ":"g","g":"g","ǵ":"g","ĝ":"g","ḡ":"g","ğ":"g","ġ":"g","ǧ":"g","ģ":"g","ǥ":"g","ɠ":"g","ꞡ":"g","ᵹ":"g","ꝿ":"g","ⓗ":"h","h":"h","ĥ":"h","ḣ":"h","ḧ":"h","ȟ":"h","ḥ":"h","ḩ":"h","ḫ":"h","ẖ":"h","ħ":"h","ⱨ":"h","ⱶ":"h","ɥ":"h","ƕ":"hv","ⓘ":"i","i":"i","ì":"i","í":"i","î":"i","ĩ":"i","ī":"i","ĭ":"i","ï":"i","ḯ":"i","ỉ":"i","ǐ":"i","ȉ":"i","ȋ":"i","ị":"i","į":"i","ḭ":"i","ɨ":"i","ı":"i","ⓙ":"j","j":"j","ĵ":"j","ǰ":"j","ɉ":"j","ⓚ":"k","k":"k","ḱ":"k","ǩ":"k","ḳ":"k","ķ":"k","ḵ":"k","ƙ":"k","ⱪ":"k","ꝁ":"k","ꝃ":"k","ꝅ":"k","ꞣ":"k","ⓛ":"l","l":"l","ŀ":"l","ĺ":"l","ľ":"l","ḷ":"l","ḹ":"l","ļ":"l","ḽ":"l","ḻ":"l","ſ":"l","ł":"l","ƚ":"l","ɫ":"l","ⱡ":"l","ꝉ":"l","ꞁ":"l","ꝇ":"l","lj":"lj","ⓜ":"m","m":"m","ḿ":"m","ṁ":"m","ṃ":"m","ɱ":"m","ɯ":"m","ⓝ":"n","n":"n","ǹ":"n","ń":"n","ñ":"n","ṅ":"n","ň":"n","ṇ":"n","ņ":"n","ṋ":"n","ṉ":"n","ƞ":"n","ɲ":"n","ʼn":"n","ꞑ":"n","ꞥ":"n","nj":"nj","ⓞ":"o","o":"o","ò":"o","ó":"o","ô":"o","ồ":"o","ố":"o","ỗ":"o","ổ":"o","õ":"o","ṍ":"o","ȭ":"o","ṏ":"o","ō":"o","ṑ":"o","ṓ":"o","ŏ":"o","ȯ":"o","ȱ":"o","ö":"o","ȫ":"o","ỏ":"o","ő":"o","ǒ":"o","ȍ":"o","ȏ":"o","ơ":"o","ờ":"o","ớ":"o","ỡ":"o","ở":"o","ợ":"o","ọ":"o","ộ":"o","ǫ":"o","ǭ":"o","ø":"o","ǿ":"o","ɔ":"o","ꝋ":"o","ꝍ":"o","ɵ":"o","ƣ":"oi","ȣ":"ou","ꝏ":"oo","ⓟ":"p","p":"p","ṕ":"p","ṗ":"p","ƥ":"p","ᵽ":"p","ꝑ":"p","ꝓ":"p","ꝕ":"p","ⓠ":"q","q":"q","ɋ":"q","ꝗ":"q","ꝙ":"q","ⓡ":"r","r":"r","ŕ":"r","ṙ":"r","ř":"r","ȑ":"r","ȓ":"r","ṛ":"r","ṝ":"r","ŗ":"r","ṟ":"r","ɍ":"r","ɽ":"r","ꝛ":"r","ꞧ":"r","ꞃ":"r","ⓢ":"s","s":"s","ß":"s","ś":"s","ṥ":"s","ŝ":"s","ṡ":"s","š":"s","ṧ":"s","ṣ":"s","ṩ":"s","ș":"s","ş":"s","ȿ":"s","ꞩ":"s","ꞅ":"s","ẛ":"s","ⓣ":"t","t":"t","ṫ":"t","ẗ":"t","ť":"t","ṭ":"t","ț":"t","ţ":"t","ṱ":"t","ṯ":"t","ŧ":"t","ƭ":"t","ʈ":"t","ⱦ":"t","ꞇ":"t","ꜩ":"tz","ⓤ":"u","u":"u","ù":"u","ú":"u","û":"u","ũ":"u","ṹ":"u","ū":"u","ṻ":"u","ŭ":"u","ü":"u","ǜ":"u","ǘ":"u","ǖ":"u","ǚ":"u","ủ":"u","ů":"u","ű":"u","ǔ":"u","ȕ":"u","ȗ":"u","ư":"u","ừ":"u","ứ":"u","ữ":"u","ử":"u","ự":"u","ụ":"u","ṳ":"u","ų":"u","ṷ":"u","ṵ":"u","ʉ":"u","ⓥ":"v","v":"v","ṽ":"v","ṿ":"v","ʋ":"v","ꝟ":"v","ʌ":"v","ꝡ":"vy","ⓦ":"w","w":"w","ẁ":"w","ẃ":"w","ŵ":"w","ẇ":"w","ẅ":"w","ẘ":"w","ẉ":"w","ⱳ":"w","ⓧ":"x","x":"x","ẋ":"x","ẍ":"x","ⓨ":"y","y":"y","ỳ":"y","ý":"y","ŷ":"y","ỹ":"y","ȳ":"y","ẏ":"y","ÿ":"y","ỷ":"y","ẙ":"y","ỵ":"y","ƴ":"y","ɏ":"y","ỿ":"y","ⓩ":"z","z":"z","ź":"z","ẑ":"z","ż":"z","ž":"z","ẓ":"z","ẕ":"z","ƶ":"z","ȥ":"z","ɀ":"z","ⱬ":"z","ꝣ":"z","Ά":"Α","Έ":"Ε","Ή":"Η","Ί":"Ι","Ϊ":"Ι","Ό":"Ο","Ύ":"Υ","Ϋ":"Υ","Ώ":"Ω","ά":"α","έ":"ε","ή":"η","ί":"ι","ϊ":"ι","ΐ":"ι","ό":"ο","ύ":"υ","ϋ":"υ","ΰ":"υ","ω":"ω","ς":"σ"};I=t(document),M=function(){var t=1;return function(){return t++}}(),O=D(Object,{bind:function(t){var e=this;return function(){t.apply(e,arguments)}},init:function(i){var n,s,r=".select2-results";this.opts=i=this.prepareOpts(i),this.id=i.id,i.element.data("select2")!==e&&null!==i.element.data("select2")&&i.element.data("select2").destroy(),this.container=this.createContainer(),this.liveRegion=t("<span>",{role:"status","aria-live":"polite"}).addClass("select2-hidden-accessible").appendTo(document.body),this.containerId="s2id_"+(i.element.attr("id")||"autogen"+M()),this.containerEventName=this.containerId.replace(/([.])/g,"_").replace(/([;&,\-\.\+\*\~':"\!\^#$%@\[\]\(\)=>\|])/g,"\\$1"),this.container.attr("id",this.containerId),this.container.attr("title",i.element.attr("title")),this.body=t("body"),y(this.container,this.opts.element,this.opts.adaptContainerCssClass),this.container.attr("style",i.element.attr("style")),this.container.css(k(i.containerCss,this.opts.element)),this.container.addClass(k(i.containerCssClass,this.opts.element)),this.elementTabIndex=this.opts.element.attr("tabindex"),this.opts.element.data("select2",this).attr("tabindex","-1").before(this.container).on("click.select2",g),this.container.data("select2",this),this.dropdown=this.container.find(".select2-drop"),y(this.dropdown,this.opts.element,this.opts.adaptDropdownCssClass),this.dropdown.addClass(k(i.dropdownCssClass,this.opts.element)),this.dropdown.data("select2",this),this.dropdown.on("click",g),this.results=n=this.container.find(r),this.search=s=this.container.find("input.select2-input"),this.queryCount=0,this.resultsPage=0,this.context=null,this.initContainer(),this.container.on("click",g),c(this.results),this.dropdown.on("mousemove-filtered",r,this.bind(this.highlightUnderEvent)),this.dropdown.on("touchstart touchmove touchend",r,this.bind(function(t){this._touchEvent=!0,this.highlightUnderEvent(t)})),this.dropdown.on("touchmove",r,this.bind(this.touchMoved)),this.dropdown.on("touchstart touchend",r,this.bind(this.clearTouchMoved)),this.dropdown.on("click",this.bind(function(t){this._touchEvent&&(this._touchEvent=!1,this.selectHighlighted())})),d(80,this.results),this.dropdown.on("scroll-debounced",r,this.bind(this.loadMoreIfNeeded)),t(this.container).on("change",".select2-input",function(t){t.stopPropagation()}),t(this.dropdown).on("change",".select2-input",function(t){t.stopPropagation()}),t.fn.mousewheel&&n.mousewheel(function(t,e,i,s){var o=n.scrollTop();s>0&&o-s<=0?(n.scrollTop(0),g(t)):s<0&&n.get(0).scrollHeight-n.scrollTop()+s<=n.height()&&(n.scrollTop(n.get(0).scrollHeight-n.height()),g(t))}),u(s),s.on("keyup-change input paste",this.bind(this.updateResults)),s.on("focus",function(){s.addClass("select2-focused")}),s.on("blur",function(){s.removeClass("select2-focused")}),this.dropdown.on("mouseup",r,this.bind(function(e){t(e.target).closest(".select2-result-selectable").length>0&&(this.highlightUnderEvent(e),this.selectHighlighted(e))})),this.dropdown.on("click mouseup mousedown touchstart touchend focusin",function(t){t.stopPropagation()}),this.nextSearchTerm=e,t.isFunction(this.opts.initSelection)&&(this.initSelection(),this.monitorSource()),null!==i.maximumInputLength&&this.search.attr("maxlength",i.maximumInputLength);var a=i.element.prop("disabled");a===e&&(a=!1),this.enable(!a);var l=i.element.prop("readonly");l===e&&(l=!1),this.readonly(l),H=H||o(),this.autofocus=i.element.prop("autofocus"),i.element.prop("autofocus",!1),this.autofocus&&this.focus(),this.search.attr("placeholder",i.searchInputPlaceholder)},destroy:function(){var t=this.opts.element,i=t.data("select2"),n=this;this.close(),t.length&&t[0].detachEvent&&t.each(function(){this.detachEvent("onpropertychange",n._sync)}),this.propertyObserver&&(this.propertyObserver.disconnect(),this.propertyObserver=null),this._sync=null,i!==e&&(i.container.remove(),i.liveRegion.remove(),i.dropdown.remove(),t.removeClass("select2-offscreen").removeData("select2").off(".select2").prop("autofocus",this.autofocus||!1),this.elementTabIndex?t.attr({tabindex:this.elementTabIndex}):t.removeAttr("tabindex"),t.show()),A.call(this,"container","liveRegion","dropdown","results","search")},optionToData:function(t){return t.is("option")?{id:t.prop("value"),text:t.text(),element:t.get(),css:t.attr("class"),disabled:t.prop("disabled"),locked:r(t.attr("locked"),"locked")||r(t.data("locked"),!0)}:t.is("optgroup")?{text:t.attr("label"),children:[],element:t.get(),css:t.attr("class")}:void 0},prepareOpts:function(i){var n,s,o,l,u=this;if(n=i.element,"select"===n.get(0).tagName.toLowerCase()&&(this.select=s=i.element),s&&t.each(["id","multiple","ajax","query","createSearchChoice","initSelection","data","tags"],function(){if(this in i)throw new Error("Option '"+this+"' is not allowed for Select2 when attached to a <select> element.")}),i=t.extend({},{populateResults:function(n,s,o){var r,a=this.opts.id,l=this.liveRegion;(r=function(n,s,c){var h,d,p,f,g,m,v,y,b,w;n=i.sortResults(n,s,o);var _=[];for(h=0,d=n.length;h<d;h+=1)p=n[h],g=p.disabled===!0,f=!g&&a(p)!==e,m=p.children&&p.children.length>0,v=t("<li></li>"),v.addClass("select2-results-dept-"+c),v.addClass("select2-result"),v.addClass(f?"select2-result-selectable":"select2-result-unselectable"),g&&v.addClass("select2-disabled"),m&&v.addClass("select2-result-with-children"),v.addClass(u.opts.formatResultCssClass(p)),v.attr("role","presentation"),y=t(document.createElement("div")),y.addClass("select2-result-label"),y.attr("id","select2-result-label-"+M()),y.attr("role","option"),w=i.formatResult(p,y,o,u.opts.escapeMarkup),w!==e&&(y.html(w),v.append(y)),m&&(b=t("<ul></ul>"),b.addClass("select2-result-sub"),r(p.children,b,c+1),v.append(b)),v.data("select2-data",p),_.push(v[0]);s.append(_),l.text(i.formatMatches(n.length))})(s,n,0)}},t.fn.select2.defaults,i),"function"!=typeof i.id&&(o=i.id,i.id=function(t){return t[o]}),t.isArray(i.element.data("select2Tags"))){if("tags"in i)throw"tags specified as both an attribute 'data-select2-tags' and in options of Select2 "+i.element.attr("id");i.tags=i.element.data("select2Tags")}if(s?(i.query=this.bind(function(t){var i,s,o,r={results:[],more:!1},a=t.term;o=function(e,i){var n;e.is("option")?t.matcher(a,e.text(),e)&&i.push(u.optionToData(e)):e.is("optgroup")&&(n=u.optionToData(e),e.children().each2(function(t,e){o(e,n.children)}),n.children.length>0&&i.push(n))},i=n.children(),this.getPlaceholder()!==e&&i.length>0&&(s=this.getPlaceholderOption(),s&&(i=i.not(s))),i.each2(function(t,e){o(e,r.results)}),t.callback(r)}),i.id=function(t){return t.id}):"query"in i||("ajax"in i?(l=i.element.data("ajax-url"),l&&l.length>0&&(i.ajax.url=l),i.query=_.call(i.element,i.ajax)):"data"in i?i.query=x(i.data):"tags"in i&&(i.query=C(i.tags),i.createSearchChoice===e&&(i.createSearchChoice=function(e){return{id:t.trim(e),text:t.trim(e)}}),i.initSelection===e&&(i.initSelection=function(e,n){var s=[];t(a(e.val(),i.separator)).each(function(){var e={id:this,text:this},n=i.tags;t.isFunction(n)&&(n=n()),t(n).each(function(){if(r(this.id,e.id))return e=this,!1}),s.push(e)}),n(s)}))),"function"!=typeof i.query)throw"query function not defined for Select2 "+i.element.attr("id");if("top"===i.createSearchChoicePosition)i.createSearchChoicePosition=function(t,e){t.unshift(e)};else if("bottom"===i.createSearchChoicePosition)i.createSearchChoicePosition=function(t,e){t.push(e)};else if("function"!=typeof i.createSearchChoicePosition)throw"invalid createSearchChoicePosition option must be 'top', 'bottom' or a custom function";return i},monitorSource:function(){var i,n=this.opts.element,s=this;n.on("change.select2",this.bind(function(t){this.opts.element.data("select2-change-triggered")!==!0&&this.initSelection()})),this._sync=this.bind(function(){var t=n.prop("disabled");t===e&&(t=!1),this.enable(!t);var i=n.prop("readonly");i===e&&(i=!1),this.readonly(i),y(this.container,this.opts.element,this.opts.adaptContainerCssClass),this.container.addClass(k(this.opts.containerCssClass,this.opts.element)),y(this.dropdown,this.opts.element,this.opts.adaptDropdownCssClass),this.dropdown.addClass(k(this.opts.dropdownCssClass,this.opts.element))}),n.length&&n[0].attachEvent&&n.each(function(){this.attachEvent("onpropertychange",s._sync)}),i=window.MutationObserver||window.WebKitMutationObserver||window.MozMutationObserver,
|
||
i!==e&&(this.propertyObserver&&(delete this.propertyObserver,this.propertyObserver=null),this.propertyObserver=new i(function(e){t.each(e,s._sync)}),this.propertyObserver.observe(n.get(0),{attributes:!0,subtree:!1}))},triggerSelect:function(e){var i=t.Event("select2-selecting",{val:this.id(e),object:e,choice:e});return this.opts.element.trigger(i),!i.isDefaultPrevented()},triggerChange:function(e){e=e||{},e=t.extend({},e,{type:"change",val:this.val()}),this.opts.element.data("select2-change-triggered",!0),this.opts.element.trigger(e),this.opts.element.data("select2-change-triggered",!1),this.opts.element.click(),this.opts.blurOnChange&&this.opts.element.blur()},isInterfaceEnabled:function(){return this.enabledInterface===!0},enableInterface:function(){var t=this._enabled&&!this._readonly,e=!t;return t!==this.enabledInterface&&(this.container.toggleClass("select2-container-disabled",e),this.close(),this.enabledInterface=t,!0)},enable:function(t){t===e&&(t=!0),this._enabled!==t&&(this._enabled=t,this.opts.element.prop("disabled",!t),this.enableInterface())},disable:function(){this.enable(!1)},readonly:function(t){t===e&&(t=!1),this._readonly!==t&&(this._readonly=t,this.opts.element.prop("readonly",t),this.enableInterface())},opened:function(){return!!this.container&&this.container.hasClass("select2-dropdown-open")},positionDropdown:function(){var e,i,n,s,o,r=this.dropdown,a=this.container.offset(),l=this.container.outerHeight(!1),u=this.container.outerWidth(!1),c=r.outerHeight(!1),h=t(window),d=h.width(),p=h.height(),f=h.scrollLeft()+d,g=h.scrollTop()+p,m=a.top+l,v=a.left,y=m+c<=g,b=a.top-c>=h.scrollTop(),w=r.outerWidth(!1),_=v+w<=f,x=r.hasClass("select2-drop-above");x?(i=!0,!b&&y&&(n=!0,i=!1)):(i=!1,!y&&b&&(n=!0,i=!0)),n&&(r.hide(),a=this.container.offset(),l=this.container.outerHeight(!1),u=this.container.outerWidth(!1),c=r.outerHeight(!1),f=h.scrollLeft()+d,g=h.scrollTop()+p,m=a.top+l,v=a.left,w=r.outerWidth(!1),_=v+w<=f,r.show(),this.focusSearch()),this.opts.dropdownAutoWidth?(o=t(".select2-results",r)[0],r.addClass("select2-drop-auto-width"),r.css("width",""),w=r.outerWidth(!1)+(o.scrollHeight===o.clientHeight?0:H.width),w>u?u=w:w=u,c=r.outerHeight(!1),_=v+w<=f):this.container.removeClass("select2-drop-auto-width"),"static"!==this.body.css("position")&&(e=this.body.offset(),m-=e.top,v-=e.left),_||(v=a.left+this.container.outerWidth(!1)-w),s={left:v,width:u},i?(s.top=a.top-c,s.bottom="auto",this.container.addClass("select2-drop-above"),r.addClass("select2-drop-above")):(s.top=m,s.bottom="auto",this.container.removeClass("select2-drop-above"),r.removeClass("select2-drop-above")),s=t.extend(s,k(this.opts.dropdownCss,this.opts.element)),r.css(s)},shouldOpen:function(){var e;return!this.opened()&&(this._enabled!==!1&&this._readonly!==!0&&(e=t.Event("select2-opening"),this.opts.element.trigger(e),!e.isDefaultPrevented()))},clearDropdownAlignmentPreference:function(){this.container.removeClass("select2-drop-above"),this.dropdown.removeClass("select2-drop-above")},open:function(){return!!this.shouldOpen()&&(this.opening(),I.on("mousemove.select2Event",function(t){L.x=t.pageX,L.y=t.pageY}),!0)},opening:function(){var e,n=this.containerEventName,s="scroll."+n,o="resize."+n,r="orientationchange."+n;this.container.addClass("select2-dropdown-open").addClass("select2-container-active"),this.clearDropdownAlignmentPreference(),this.dropdown[0]!==this.body.children().last()[0]&&this.dropdown.detach().appendTo(this.body),e=t("#select2-drop-mask"),0==e.length&&(e=t(document.createElement("div")),e.attr("id","select2-drop-mask").attr("class","select2-drop-mask"),e.hide(),e.appendTo(this.body),e.on("mousedown touchstart click",function(n){i(e);var s,o=t("#select2-drop");o.length>0&&(s=o.data("select2"),s.opts.selectOnBlur&&s.selectHighlighted({noFocus:!0}),s.close(),n.preventDefault(),n.stopPropagation())})),this.dropdown.prev()[0]!==e[0]&&this.dropdown.before(e),t("#select2-drop").removeAttr("id"),this.dropdown.attr("id","select2-drop"),e.show(),this.positionDropdown(),this.dropdown.show(),this.positionDropdown(),this.dropdown.addClass("select2-drop-active");var a=this;this.container.parents().add(window).each(function(){t(this).on(o+" "+s+" "+r,function(t){a.opened()&&a.positionDropdown()})})},close:function(){if(this.opened()){var e=this.containerEventName,i="scroll."+e,n="resize."+e,s="orientationchange."+e;this.container.parents().add(window).each(function(){t(this).off(i).off(n).off(s)}),this.clearDropdownAlignmentPreference(),t("#select2-drop-mask").hide(),this.dropdown.removeAttr("id"),this.dropdown.hide(),this.container.removeClass("select2-dropdown-open").removeClass("select2-container-active"),this.results.empty(),I.off("mousemove.select2Event"),this.clearSearch(),this.search.removeClass("select2-active"),this.opts.element.trigger(t.Event("select2-close"))}},externalSearch:function(t){this.open(),this.search.val(t),this.updateResults(!1)},clearSearch:function(){},getMaximumSelectionSize:function(){return k(this.opts.maximumSelectionSize,this.opts.element)},ensureHighlightVisible:function(){var e,i,n,s,o,r,a,l,u=this.results;if(i=this.highlight(),!(i<0)){if(0==i)return void u.scrollTop(0);e=this.findHighlightableChoices().find(".select2-result-label"),n=t(e[i]),l=(n.offset()||{}).top||0,s=l+n.outerHeight(!0),i===e.length-1&&(a=u.find("li.select2-more-results"),a.length>0&&(s=a.offset().top+a.outerHeight(!0))),o=u.offset().top+u.outerHeight(!0),s>o&&u.scrollTop(u.scrollTop()+(s-o)),r=l-u.offset().top,r<0&&"none"!=n.css("display")&&u.scrollTop(u.scrollTop()+r)}},findHighlightableChoices:function(){return this.results.find(".select2-result-selectable:not(.select2-disabled):not(.select2-selected)")},moveHighlight:function(e){for(var i=this.findHighlightableChoices(),n=this.highlight();n>-1&&n<i.length;){n+=e;var s=t(i[n]);if(s.hasClass("select2-result-selectable")&&!s.hasClass("select2-disabled")&&!s.hasClass("select2-selected")){this.highlight(n);break}}},highlight:function(e){var i,n,o=this.findHighlightableChoices();return 0===arguments.length?s(o.filter(".select2-highlighted")[0],o.get()):(e>=o.length&&(e=o.length-1),e<0&&(e=0),this.removeHighlight(),i=t(o[e]),i.addClass("select2-highlighted"),this.search.attr("aria-activedescendant",i.find(".select2-result-label").attr("id")),this.ensureHighlightVisible(),this.liveRegion.text(i.text()),n=i.data("select2-data"),void(n&&this.opts.element.trigger({type:"select2-highlight",val:this.id(n),choice:n})))},removeHighlight:function(){this.results.find(".select2-highlighted").removeClass("select2-highlighted")},touchMoved:function(){this._touchMoved=!0},clearTouchMoved:function(){this._touchMoved=!1},countSelectableResults:function(){return this.findHighlightableChoices().length},highlightUnderEvent:function(e){var i=t(e.target).closest(".select2-result-selectable");if(i.length>0&&!i.is(".select2-highlighted")){var n=this.findHighlightableChoices();this.highlight(n.index(i))}else 0==i.length&&this.removeHighlight()},loadMoreIfNeeded:function(){var t,e=this.results,i=e.find("li.select2-more-results"),n=this.resultsPage+1,s=this,o=this.search.val(),r=this.context;0!==i.length&&(t=i.offset().top-e.offset().top-e.height(),t<=this.opts.loadMorePadding&&(i.addClass("select2-active"),this.opts.query({element:this.opts.element,term:o,page:n,context:r,matcher:this.opts.matcher,callback:this.bind(function(t){s.opened()&&(s.opts.populateResults.call(this,e,t.results,{term:o,page:n,context:r}),s.postprocessResults(t,!1,!1),t.more===!0?(i.detach().appendTo(e).text(k(s.opts.formatLoadMore,s.opts.element,n+1)),window.setTimeout(function(){s.loadMoreIfNeeded()},10)):i.remove(),s.positionDropdown(),s.resultsPage=n,s.context=t.context,this.opts.element.trigger({type:"select2-loaded",items:t}))})})))},tokenize:function(){},updateResults:function(i){function n(){u.removeClass("select2-active"),d.positionDropdown(),c.find(".select2-no-results,.select2-selection-limit,.select2-searching").length?d.liveRegion.text(c.text()):d.liveRegion.text(d.opts.formatMatches(c.find(".select2-result-selectable").length))}function s(t){c.html(t),n()}var o,a,l,u=this.search,c=this.results,h=this.opts,d=this,p=u.val(),f=t.data(this.container,"select2-last-term");if((i===!0||!f||!r(p,f))&&(t.data(this.container,"select2-last-term",p),i===!0||this.showSearchInput!==!1&&this.opened())){l=++this.queryCount;var g=this.getMaximumSelectionSize();if(g>=1&&(o=this.data(),t.isArray(o)&&o.length>=g&&S(h.formatSelectionTooBig,"formatSelectionTooBig")))return void s("<li class='select2-selection-limit'>"+k(h.formatSelectionTooBig,h.element,g)+"</li>");if(u.val().length<h.minimumInputLength)return s(S(h.formatInputTooShort,"formatInputTooShort")?"<li class='select2-no-results'>"+k(h.formatInputTooShort,h.element,u.val(),h.minimumInputLength)+"</li>":""),void(i&&this.showSearch&&this.showSearch(!0));if(h.maximumInputLength&&u.val().length>h.maximumInputLength)return void s(S(h.formatInputTooLong,"formatInputTooLong")?"<li class='select2-no-results'>"+k(h.formatInputTooLong,h.element,u.val(),h.maximumInputLength)+"</li>":"");h.formatSearching&&0===this.findHighlightableChoices().length&&s("<li class='select2-searching'>"+k(h.formatSearching,h.element)+"</li>"),u.addClass("select2-active"),this.removeHighlight(),a=this.tokenize(),a!=e&&null!=a&&u.val(a),this.resultsPage=1,h.query({element:h.element,term:u.val(),page:this.resultsPage,context:null,matcher:h.matcher,callback:this.bind(function(o){var a;if(l==this.queryCount){if(!this.opened())return void this.search.removeClass("select2-active");if(o.hasError!==e&&S(h.formatAjaxError,"formatAjaxError"))return void s("<li class='select2-ajax-error'>"+k(h.formatAjaxError,h.element,o.jqXHR,o.textStatus,o.errorThrown)+"</li>");if(this.context=o.context===e?null:o.context,this.opts.createSearchChoice&&""!==u.val()&&(a=this.opts.createSearchChoice.call(d,u.val(),o.results),a!==e&&null!==a&&d.id(a)!==e&&null!==d.id(a)&&0===t(o.results).filter(function(){return r(d.id(this),d.id(a))}).length&&this.opts.createSearchChoicePosition(o.results,a)),0===o.results.length&&S(h.formatNoMatches,"formatNoMatches"))return void s("<li class='select2-no-results'>"+k(h.formatNoMatches,h.element,u.val())+"</li>");c.empty(),d.opts.populateResults.call(this,c,o.results,{term:u.val(),page:this.resultsPage,context:null}),o.more===!0&&S(h.formatLoadMore,"formatLoadMore")&&(c.append("<li class='select2-more-results'>"+h.escapeMarkup(k(h.formatLoadMore,h.element,this.resultsPage))+"</li>"),window.setTimeout(function(){d.loadMoreIfNeeded()},10)),this.postprocessResults(o,i),n(),this.opts.element.trigger({type:"select2-loaded",items:o})}})})}},cancel:function(){this.close()},blur:function(){this.opts.selectOnBlur&&this.selectHighlighted({noFocus:!0}),this.close(),this.container.removeClass("select2-container-active"),this.search[0]===document.activeElement&&this.search.blur(),this.clearSearch(),this.selection.find(".select2-search-choice-focus").removeClass("select2-search-choice-focus")},focusSearch:function(){p(this.search)},selectHighlighted:function(t){if(this._touchMoved)return void this.clearTouchMoved();var e=this.highlight(),i=this.results.find(".select2-highlighted"),n=i.closest(".select2-result").data("select2-data");n?(this.highlight(e),this.onSelect(n,t)):t&&t.noFocus&&this.close()},getPlaceholder:function(){var t;return this.opts.element.attr("placeholder")||this.opts.element.attr("data-placeholder")||this.opts.element.data("placeholder")||this.opts.placeholder||((t=this.getPlaceholderOption())!==e?t.text():e)},getPlaceholderOption:function(){if(this.select){var i=this.select.children("option").first();if(this.opts.placeholderOption!==e)return"first"===this.opts.placeholderOption&&i||"function"==typeof this.opts.placeholderOption&&this.opts.placeholderOption(this.select);if(""===t.trim(i.text())&&""===i.val())return i}},initContainerWidth:function(){function i(){var i,n,s,o,r,a;if("off"===this.opts.width)return null;if("element"===this.opts.width)return 0===this.opts.element.outerWidth(!1)?"auto":this.opts.element.outerWidth(!1)+"px";if("copy"===this.opts.width||"resolve"===this.opts.width){if(i=this.opts.element.attr("style"),i!==e)for(n=i.split(";"),o=0,r=n.length;o<r;o+=1)if(a=n[o].replace(/\s/g,""),s=a.match(/^width:(([-+]?([0-9]*\.)?[0-9]+)(px|em|ex|%|in|cm|mm|pt|pc))/i),null!==s&&s.length>=1)return s[1];return"resolve"===this.opts.width?(i=this.opts.element.css("width"),i.indexOf("%")>0?i:0===this.opts.element.outerWidth(!1)?"auto":this.opts.element.outerWidth(!1)+"px"):null}return t.isFunction(this.opts.width)?this.opts.width():this.opts.width}var n=i.call(this);null!==n&&this.container.css("width",n)}}),P=D(O,{createContainer:function(){var e=t(document.createElement("div")).attr({class:"select2-container"}).html(["<a href='javascript:void(0)' class='select2-choice' tabindex='-1'>"," <span class='select2-chosen'> </span><abbr class='select2-search-choice-close'></abbr>"," <span class='select2-arrow' role='presentation'><b role='presentation'></b></span>","</a>","<label for='' class='select2-offscreen'></label>","<input class='select2-focusser select2-offscreen' type='text' aria-haspopup='true' role='button' />","<div class='select2-drop select2-display-none'>"," <div class='select2-search'>"," <label for='' class='select2-offscreen'></label>"," <input type='text' autocomplete='off' autocorrect='off' autocapitalize='off' spellcheck='false' class='select2-input' role='combobox' aria-expanded='true'"," aria-autocomplete='list' />"," </div>"," <ul class='select2-results' role='listbox'>"," </ul>","</div>"].join(""));return e},enableInterface:function(){this.parent.enableInterface.apply(this,arguments)&&this.focusser.prop("disabled",!this.isInterfaceEnabled())},opening:function(){var i,n,s;this.opts.minimumResultsForSearch>=0&&this.showSearch(!0),this.parent.opening.apply(this,arguments),this.showSearchInput!==!1&&this.search.val(this.focusser.val()),this.opts.shouldFocusInput(this)&&(this.search.focus(),i=this.search.get(0),i.createTextRange?(n=i.createTextRange(),n.collapse(!1),n.select()):i.setSelectionRange&&(s=this.search.val().length,i.setSelectionRange(s,s))),""===this.search.val()&&this.nextSearchTerm!=e&&(this.search.val(this.nextSearchTerm),this.search.select()),this.focusser.prop("disabled",!0).val(""),this.updateResults(!0),this.opts.element.trigger(t.Event("select2-open"))},close:function(){this.opened()&&(this.parent.close.apply(this,arguments),this.focusser.prop("disabled",!1),this.opts.shouldFocusInput(this)&&this.focusser.focus())},focus:function(){this.opened()?this.close():(this.focusser.prop("disabled",!1),this.opts.shouldFocusInput(this)&&this.focusser.focus())},isFocused:function(){return this.container.hasClass("select2-container-active")},cancel:function(){this.parent.cancel.apply(this,arguments),this.focusser.prop("disabled",!1),this.opts.shouldFocusInput(this)&&this.focusser.focus()},destroy:function(){t("label[for='"+this.focusser.attr("id")+"']").attr("for",this.opts.element.attr("id")),this.parent.destroy.apply(this,arguments),A.call(this,"selection","focusser")},initContainer:function(){var e,n,s=this.container,o=this.dropdown,r=M();this.opts.minimumResultsForSearch<0?this.showSearch(!1):this.showSearch(!0),this.selection=e=s.find(".select2-choice"),this.focusser=s.find(".select2-focusser"),e.find(".select2-chosen").attr("id","select2-chosen-"+r),this.focusser.attr("aria-labelledby","select2-chosen-"+r),this.results.attr("id","select2-results-"+r),this.search.attr("aria-owns","select2-results-"+r),this.focusser.attr("id","s2id_autogen"+r),n=t("label[for='"+this.opts.element.attr("id")+"']"),this.focusser.prev().text(n.text()).attr("for",this.focusser.attr("id"));var a=this.opts.element.attr("title");this.opts.element.attr("title",a||n.text()),this.focusser.attr("tabindex",this.elementTabIndex),this.search.attr("id",this.focusser.attr("id")+"_search"),this.search.prev().text(t("label[for='"+this.focusser.attr("id")+"']").text()).attr("for",this.search.attr("id")),this.search.on("keydown",this.bind(function(t){if(this.isInterfaceEnabled()&&229!=t.keyCode){if(t.which===N.PAGE_UP||t.which===N.PAGE_DOWN)return void g(t);switch(t.which){case N.UP:case N.DOWN:return this.moveHighlight(t.which===N.UP?-1:1),void g(t);case N.ENTER:return this.selectHighlighted(),void g(t);case N.TAB:return void this.selectHighlighted({noFocus:!0});case N.ESC:return this.cancel(t),void g(t)}}})),this.search.on("blur",this.bind(function(t){document.activeElement===this.body.get(0)&&window.setTimeout(this.bind(function(){this.opened()&&this.search.focus()}),0)})),this.focusser.on("keydown",this.bind(function(t){if(this.isInterfaceEnabled()&&t.which!==N.TAB&&!N.isControl(t)&&!N.isFunctionKey(t)&&t.which!==N.ESC){if(this.opts.openOnEnter===!1&&t.which===N.ENTER)return void g(t);if(t.which==N.DOWN||t.which==N.UP||t.which==N.ENTER&&this.opts.openOnEnter){if(t.altKey||t.ctrlKey||t.shiftKey||t.metaKey)return;return this.open(),void g(t)}return t.which==N.DELETE||t.which==N.BACKSPACE?(this.opts.allowClear&&this.clear(),void g(t)):void 0}})),u(this.focusser),this.focusser.on("keyup-change input",this.bind(function(t){if(this.opts.minimumResultsForSearch>=0){if(t.stopPropagation(),this.opened())return;this.open()}})),e.on("mousedown touchstart","abbr",this.bind(function(t){this.isInterfaceEnabled()&&(this.clear(),m(t),this.close(),this.selection.focus())})),e.on("mousedown touchstart",this.bind(function(n){i(e),this.container.hasClass("select2-container-active")||this.opts.element.trigger(t.Event("select2-focus")),this.opened()?this.close():this.isInterfaceEnabled()&&this.open(),g(n)})),o.on("mousedown touchstart",this.bind(function(){this.opts.shouldFocusInput(this)&&this.search.focus()})),e.on("focus",this.bind(function(t){g(t)})),this.focusser.on("focus",this.bind(function(){this.container.hasClass("select2-container-active")||this.opts.element.trigger(t.Event("select2-focus")),this.container.addClass("select2-container-active")})).on("blur",this.bind(function(){this.opened()||(this.container.removeClass("select2-container-active"),this.opts.element.trigger(t.Event("select2-blur")))})),this.search.on("focus",this.bind(function(){this.container.hasClass("select2-container-active")||this.opts.element.trigger(t.Event("select2-focus")),this.container.addClass("select2-container-active")})),this.initContainerWidth(),this.opts.element.addClass("select2-offscreen"),this.setPlaceholder()},clear:function(e){var i=this.selection.data("select2-data");if(i){var n=t.Event("select2-clearing");if(this.opts.element.trigger(n),n.isDefaultPrevented())return;var s=this.getPlaceholderOption();this.opts.element.val(s?s.val():""),this.selection.find(".select2-chosen").empty(),this.selection.removeData("select2-data"),this.setPlaceholder(),e!==!1&&(this.opts.element.trigger({type:"select2-removed",val:this.id(i),choice:i}),this.triggerChange({removed:i}))}},initSelection:function(){if(this.isPlaceholderOptionSelected())this.updateSelection(null),this.close(),this.setPlaceholder();else{var t=this;this.opts.initSelection.call(null,this.opts.element,function(i){i!==e&&null!==i&&(t.updateSelection(i),t.close(),t.setPlaceholder(),t.nextSearchTerm=t.opts.nextSearchTerm(i,t.search.val()))})}},isPlaceholderOptionSelected:function(){var t;return this.getPlaceholder()!==e&&((t=this.getPlaceholderOption())!==e&&t.prop("selected")||""===this.opts.element.val()||this.opts.element.val()===e||null===this.opts.element.val())},prepareOpts:function(){var e=this.parent.prepareOpts.apply(this,arguments),i=this;return"select"===e.element.get(0).tagName.toLowerCase()?e.initSelection=function(t,e){var n=t.find("option").filter(function(){return this.selected&&!this.disabled});e(i.optionToData(n))}:"data"in e&&(e.initSelection=e.initSelection||function(i,n){var s=i.val(),o=null;e.query({matcher:function(t,i,n){var a=r(s,e.id(n));return a&&(o=n),a},callback:t.isFunction(n)?function(){n(o)}:t.noop})}),e},getPlaceholder:function(){return this.select&&this.getPlaceholderOption()===e?e:this.parent.getPlaceholder.apply(this,arguments)},setPlaceholder:function(){var t=this.getPlaceholder();if(this.isPlaceholderOptionSelected()&&t!==e){if(this.select&&this.getPlaceholderOption()===e)return;this.selection.find(".select2-chosen").html(this.opts.escapeMarkup(t)),this.selection.addClass("select2-default"),this.container.removeClass("select2-allowclear")}},postprocessResults:function(t,e,i){var n=0,s=this;if(this.findHighlightableChoices().each2(function(t,e){if(r(s.id(e.data("select2-data")),s.opts.element.val()))return n=t,!1}),i!==!1&&(e===!0&&n>=0?this.highlight(n):this.highlight(0)),e===!0){var o=this.opts.minimumResultsForSearch;o>=0&&this.showSearch(T(t.results)>=o)}},showSearch:function(e){this.showSearchInput!==e&&(this.showSearchInput=e,this.dropdown.find(".select2-search").toggleClass("select2-search-hidden",!e),this.dropdown.find(".select2-search").toggleClass("select2-offscreen",!e),t(this.dropdown,this.container).toggleClass("select2-with-searchbox",e))},onSelect:function(t,e){if(this.triggerSelect(t)){var i=this.opts.element.val(),n=this.data();this.opts.element.val(this.id(t)),this.updateSelection(t),this.opts.element.trigger({type:"select2-selected",val:this.id(t),choice:t}),this.nextSearchTerm=this.opts.nextSearchTerm(t,this.search.val()),this.close(),e&&e.noFocus||!this.opts.shouldFocusInput(this)||this.focusser.focus(),r(i,this.id(t))||this.triggerChange({added:t,removed:n})}},updateSelection:function(t){var i,n,s=this.selection.find(".select2-chosen");this.selection.data("select2-data",t),s.empty(),null!==t&&(i=this.opts.formatSelection(t,s,this.opts.escapeMarkup)),i!==e&&s.append(i),n=this.opts.formatSelectionCssClass(t,s),n!==e&&s.addClass(n),this.selection.removeClass("select2-default"),this.opts.allowClear&&this.getPlaceholder()!==e&&this.container.addClass("select2-allowclear")},val:function(){var t,i=!1,n=null,s=this,o=this.data();if(0===arguments.length)return this.opts.element.val();if(t=arguments[0],arguments.length>1&&(i=arguments[1]),this.select)this.select.val(t).find("option").filter(function(){return this.selected}).each2(function(t,e){return n=s.optionToData(e),!1}),this.updateSelection(n),this.setPlaceholder(),i&&this.triggerChange({added:n,removed:o});else{if(!t&&0!==t)return void this.clear(i);if(this.opts.initSelection===e)throw new Error("cannot call val() if initSelection() is not defined");this.opts.element.val(t),this.opts.initSelection(this.opts.element,function(t){s.opts.element.val(t?s.id(t):""),s.updateSelection(t),s.setPlaceholder(),i&&s.triggerChange({added:t,removed:o})})}},clearSearch:function(){this.search.val(""),this.focusser.val("")},data:function(t){var i,n=!1;return 0===arguments.length?(i=this.selection.data("select2-data"),i==e&&(i=null),i):(arguments.length>1&&(n=arguments[1]),void(t?(i=this.data(),this.opts.element.val(t?this.id(t):""),this.updateSelection(t),n&&this.triggerChange({added:t,removed:i})):this.clear(n)))}}),R=D(O,{createContainer:function(){var e=t(document.createElement("div")).attr({class:"select2-container select2-container-multi"}).html(["<ul class='select2-choices'>"," <li class='select2-search-field'>"," <label for='' class='select2-offscreen'></label>"," <input type='text' autocomplete='off' autocorrect='off' autocapitalize='off' spellcheck='false' class='select2-input'>"," </li>","</ul>","<div class='select2-drop select2-drop-multi select2-display-none'>"," <ul class='select2-results'>"," </ul>","</div>"].join(""));return e},prepareOpts:function(){var e=this.parent.prepareOpts.apply(this,arguments),i=this;return"select"===e.element.get(0).tagName.toLowerCase()?e.initSelection=function(t,e){var n=[];t.find("option").filter(function(){return this.selected&&!this.disabled}).each2(function(t,e){n.push(i.optionToData(e))}),e(n)}:"data"in e&&(e.initSelection=e.initSelection||function(i,n){var s=a(i.val(),e.separator),o=[];e.query({matcher:function(i,n,a){var l=t.grep(s,function(t){return r(t,e.id(a))}).length;return l&&o.push(a),l},callback:t.isFunction(n)?function(){for(var t=[],i=0;i<s.length;i++)for(var a=s[i],l=0;l<o.length;l++){var u=o[l];if(r(a,e.id(u))){t.push(u),o.splice(l,1);break}}n(t)}:t.noop})}),e},selectChoice:function(t){var e=this.container.find(".select2-search-choice-focus");e.length&&t&&t[0]==e[0]||(e.length&&this.opts.element.trigger("choice-deselected",e),e.removeClass("select2-search-choice-focus"),t&&t.length&&(this.close(),t.addClass("select2-search-choice-focus"),this.opts.element.trigger("choice-selected",t)))},destroy:function(){t("label[for='"+this.search.attr("id")+"']").attr("for",this.opts.element.attr("id")),this.parent.destroy.apply(this,arguments),A.call(this,"searchContainer","selection")},initContainer:function(){var e,i=".select2-choices";this.searchContainer=this.container.find(".select2-search-field"),this.selection=e=this.container.find(i);var n=this;this.selection.on("click",".select2-search-choice:not(.select2-locked)",function(e){n.search[0].focus(),n.selectChoice(t(this))}),this.search.attr("id","s2id_autogen"+M()),this.search.prev().text(t("label[for='"+this.opts.element.attr("id")+"']").text()).attr("for",this.search.attr("id")),this.search.on("input paste",this.bind(function(){this.search.attr("placeholder")&&0==this.search.val().length||this.isInterfaceEnabled()&&(this.opened()||this.open())})),this.search.attr("tabindex",this.elementTabIndex),this.keydowns=0,this.search.on("keydown",this.bind(function(t){if(this.isInterfaceEnabled()){++this.keydowns;var i=e.find(".select2-search-choice-focus"),n=i.prev(".select2-search-choice:not(.select2-locked)"),s=i.next(".select2-search-choice:not(.select2-locked)"),o=f(this.search);if(i.length&&(t.which==N.LEFT||t.which==N.RIGHT||t.which==N.BACKSPACE||t.which==N.DELETE||t.which==N.ENTER)){var r=i;return t.which==N.LEFT&&n.length?r=n:t.which==N.RIGHT?r=s.length?s:null:t.which===N.BACKSPACE?this.unselect(i.first())&&(this.search.width(10),r=n.length?n:s):t.which==N.DELETE?this.unselect(i.first())&&(this.search.width(10),r=s.length?s:null):t.which==N.ENTER&&(r=null),this.selectChoice(r),g(t),void(r&&r.length||this.open())}if((t.which===N.BACKSPACE&&1==this.keydowns||t.which==N.LEFT)&&0==o.offset&&!o.length)return this.selectChoice(e.find(".select2-search-choice:not(.select2-locked)").last()),void g(t);if(this.selectChoice(null),this.opened())switch(t.which){case N.UP:case N.DOWN:return this.moveHighlight(t.which===N.UP?-1:1),void g(t);case N.ENTER:return this.selectHighlighted(),void g(t);case N.TAB:return this.selectHighlighted({noFocus:!0}),void this.close();case N.ESC:return this.cancel(t),void g(t)}if(t.which!==N.TAB&&!N.isControl(t)&&!N.isFunctionKey(t)&&t.which!==N.BACKSPACE&&t.which!==N.ESC){if(t.which===N.ENTER){if(this.opts.openOnEnter===!1)return;if(t.altKey||t.ctrlKey||t.shiftKey||t.metaKey)return}this.open(),t.which!==N.PAGE_UP&&t.which!==N.PAGE_DOWN||g(t),t.which===N.ENTER&&g(t)}}})),this.search.on("keyup",this.bind(function(t){this.keydowns=0,this.resizeSearch()})),this.search.on("blur",this.bind(function(e){this.container.removeClass("select2-container-active"),this.search.removeClass("select2-focused"),this.selectChoice(null),this.opened()||this.clearSearch(),e.stopImmediatePropagation(),this.opts.element.trigger(t.Event("select2-blur"))})),this.container.on("click",i,this.bind(function(e){this.isInterfaceEnabled()&&(t(e.target).closest(".select2-search-choice").length>0||(this.selectChoice(null),this.clearPlaceholder(),this.container.hasClass("select2-container-active")||this.opts.element.trigger(t.Event("select2-focus")),this.open(),this.focusSearch(),e.preventDefault()))})),this.container.on("focus",i,this.bind(function(){this.isInterfaceEnabled()&&(this.container.hasClass("select2-container-active")||this.opts.element.trigger(t.Event("select2-focus")),this.container.addClass("select2-container-active"),this.dropdown.addClass("select2-drop-active"),this.clearPlaceholder())})),this.initContainerWidth(),this.opts.element.addClass("select2-offscreen"),this.clearSearch()},enableInterface:function(){this.parent.enableInterface.apply(this,arguments)&&this.search.prop("disabled",!this.isInterfaceEnabled())},initSelection:function(){if(""===this.opts.element.val()&&""===this.opts.element.text()&&(this.updateSelection([]),this.close(),this.clearSearch()),this.select||""!==this.opts.element.val()){var t=this;this.opts.initSelection.call(null,this.opts.element,function(i){i!==e&&null!==i&&(t.updateSelection(i),t.close(),t.clearSearch())})}},clearSearch:function(){var t=this.getPlaceholder(),i=this.getMaxSearchWidth();t!==e&&0===this.getVal().length&&this.search.hasClass("select2-focused")===!1?(this.search.val(t).addClass("select2-default"),this.search.width(i>0?i:this.container.css("width"))):this.search.val("").width(10)},clearPlaceholder:function(){this.search.hasClass("select2-default")&&this.search.val("").removeClass("select2-default")},opening:function(){this.clearPlaceholder(),this.resizeSearch(),this.parent.opening.apply(this,arguments),this.focusSearch(),""===this.search.val()&&this.nextSearchTerm!=e&&(this.search.val(this.nextSearchTerm),this.search.select()),this.updateResults(!0),this.opts.shouldFocusInput(this)&&this.search.focus(),this.opts.element.trigger(t.Event("select2-open"))},close:function(){this.opened()&&this.parent.close.apply(this,arguments)},focus:function(){this.close(),this.search.focus()},isFocused:function(){return this.search.hasClass("select2-focused")},updateSelection:function(e){var i=[],n=[],o=this;t(e).each(function(){s(o.id(this),i)<0&&(i.push(o.id(this)),n.push(this))}),e=n,this.selection.find(".select2-search-choice").remove(),t(e).each(function(){o.addSelectedChoice(this)}),o.postprocessResults()},tokenize:function(){var t=this.search.val();t=this.opts.tokenizer.call(this,t,this.data(),this.bind(this.onSelect),this.opts),null!=t&&t!=e&&(this.search.val(t),t.length>0&&this.open())},onSelect:function(t,i){this.triggerSelect(t)&&""!==t.text&&(this.addSelectedChoice(t),this.opts.element.trigger({type:"selected",val:this.id(t),choice:t}),this.nextSearchTerm=this.opts.nextSearchTerm(t,this.search.val()),this.moveHighlight(1),!this.select&&this.opts.closeOnSelect||this.postprocessResults(t,!1,this.opts.closeOnSelect===!0),this.opts.closeOnSelect?(this.clearSearch(),this.updateResults(),this.close(),this.search.width(10)):this.countSelectableResults()>0?(this.search.width(10),this.resizeSearch(),this.getMaximumSelectionSize()>0&&this.val().length>=this.getMaximumSelectionSize()?this.updateResults(!0):this.nextSearchTerm!=e&&(this.search.val(this.nextSearchTerm),this.updateResults(),this.search.select()),this.positionDropdown()):(this.close(),this.search.width(10)),this.triggerChange({added:t}),i&&i.noFocus||this.focusSearch())},cancel:function(){this.close(),this.focusSearch()},addSelectedChoice:function(i){var n,s,o=!i.locked,r=t("<li class='select2-search-choice'> <div></div> <a href='#' class='select2-search-choice-close' tabindex='-1'></a></li>"),a=t("<li class='select2-search-choice select2-locked'><div></div></li>"),l=o?r:a,u=this.id(i),c=this.getVal();n=this.opts.formatSelection(i,l.find("div"),this.opts.escapeMarkup),n!=e&&l.find("div").replaceWith("<div>"+n+"</div>"),s=this.opts.formatSelectionCssClass(i,l.find("div")),s!=e&&l.addClass(s),o&&l.find(".select2-search-choice-close").on("mousedown",g).on("click dblclick",this.bind(function(e){this.isInterfaceEnabled()&&(this.unselect(t(e.target)),this.selection.find(".select2-search-choice-focus").removeClass("select2-search-choice-focus"),g(e),this.close(),this.focusSearch())})).on("focus",this.bind(function(){this.isInterfaceEnabled()&&(this.container.addClass("select2-container-active"),this.dropdown.addClass("select2-drop-active"))})),l.data("select2-data",i),l.insertBefore(this.searchContainer),c.push(u),this.setVal(c)},unselect:function(e){var i,n,o=this.getVal();if(e=e.closest(".select2-search-choice"),0===e.length)throw"Invalid argument: "+e+". Must be .select2-search-choice";
|
||
if(i=e.data("select2-data")){var r=t.Event("select2-removing");if(r.val=this.id(i),r.choice=i,this.opts.element.trigger(r),r.isDefaultPrevented())return!1;for(;(n=s(this.id(i),o))>=0;)o.splice(n,1),this.setVal(o),this.select&&this.postprocessResults();return e.remove(),this.opts.element.trigger({type:"select2-removed",val:this.id(i),choice:i}),this.triggerChange({removed:i}),!0}},postprocessResults:function(t,e,i){var n=this.getVal(),o=this.results.find(".select2-result"),r=this.results.find(".select2-result-with-children"),a=this;o.each2(function(t,e){var i=a.id(e.data("select2-data"));s(i,n)>=0&&(e.addClass("select2-selected"),e.find(".select2-result-selectable").addClass("select2-selected"))}),r.each2(function(t,e){e.is(".select2-result-selectable")||0!==e.find(".select2-result-selectable:not(.select2-selected)").length||e.addClass("select2-selected")}),this.highlight()==-1&&i!==!1&&a.highlight(0),!this.opts.createSearchChoice&&!o.filter(".select2-result:not(.select2-selected)").length>0&&(!t||t&&!t.more&&0===this.results.find(".select2-no-results").length)&&S(a.opts.formatNoMatches,"formatNoMatches")&&this.results.append("<li class='select2-no-results'>"+k(a.opts.formatNoMatches,a.opts.element,a.search.val())+"</li>")},getMaxSearchWidth:function(){return this.selection.width()-l(this.search)},resizeSearch:function(){var t,e,i,n,s,o=l(this.search);t=v(this.search)+10,e=this.search.offset().left,i=this.selection.width(),n=this.selection.offset().left,s=i-(e-n)-o,s<t&&(s=i-o),s<40&&(s=i-o),s<=0&&(s=t),this.search.width(Math.floor(s))},getVal:function(){var t;return this.select?(t=this.select.val(),null===t?[]:t):(t=this.opts.element.val(),a(t,this.opts.separator))},setVal:function(e){var i;this.select?this.select.val(e):(i=[],t(e).each(function(){s(this,i)<0&&i.push(this)}),this.opts.element.val(0===i.length?"":i.join(this.opts.separator)))},buildChangeDetails:function(t,e){for(var e=e.slice(0),t=t.slice(0),i=0;i<e.length;i++)for(var n=0;n<t.length;n++)r(this.opts.id(e[i]),this.opts.id(t[n]))&&(e.splice(i,1),i>0&&i--,t.splice(n,1),n--);return{added:e,removed:t}},val:function(i,n){var s,o=this;if(0===arguments.length)return this.getVal();if(s=this.data(),s.length||(s=[]),!i&&0!==i)return this.opts.element.val(""),this.updateSelection([]),this.clearSearch(),void(n&&this.triggerChange({added:this.data(),removed:s}));if(this.setVal(i),this.select)this.opts.initSelection(this.select,this.bind(this.updateSelection)),n&&this.triggerChange(this.buildChangeDetails(s,this.data()));else{if(this.opts.initSelection===e)throw new Error("val() cannot be called if initSelection() is not defined");this.opts.initSelection(this.opts.element,function(e){var i=t.map(e,o.id);o.setVal(i),o.updateSelection(e),o.clearSearch(),n&&o.triggerChange(o.buildChangeDetails(s,o.data()))})}this.clearSearch()},onSortStart:function(){if(this.select)throw new Error("Sorting of elements is not supported when attached to <select>. Attach to <input type='hidden'/> instead.");this.search.width(0),this.searchContainer.hide()},onSortEnd:function(){var e=[],i=this;this.searchContainer.show(),this.searchContainer.appendTo(this.searchContainer.parent()),this.resizeSearch(),this.selection.find(".select2-search-choice").each(function(){e.push(i.opts.id(t(this).data("select2-data")))}),this.setVal(e),this.triggerChange()},data:function(e,i){var n,s,o=this;return 0===arguments.length?this.selection.children(".select2-search-choice").map(function(){return t(this).data("select2-data")}).get():(s=this.data(),e||(e=[]),n=t.map(e,function(t){return o.opts.id(t)}),this.setVal(n),this.updateSelection(e),this.clearSearch(),i&&this.triggerChange(this.buildChangeDetails(s,this.data())),void 0)}}),t.fn.select2=function(){var i,n,o,r,a,l=Array.prototype.slice.call(arguments,0),u=["val","destroy","opened","open","close","focus","isFocused","container","dropdown","onSortStart","onSortEnd","enable","disable","readonly","positionDropdown","data","search"],c=["opened","isFocused","container","dropdown"],h=["val","data"],d={search:"externalSearch"};return this.each(function(){if(0===l.length||"object"==typeof l[0])i=0===l.length?{}:t.extend({},l[0]),i.element=t(this),"select"===i.element.get(0).tagName.toLowerCase()?a=i.element.prop("multiple"):(a=i.multiple||!1,"tags"in i&&(i.multiple=a=!0)),n=a?new window.Select2.class.multi:new window.Select2.class.single,n.init(i);else{if("string"!=typeof l[0])throw"Invalid arguments to select2 plugin: "+l;if(s(l[0],u)<0)throw"Unknown method: "+l[0];if(r=e,n=t(this).data("select2"),n===e)return;if(o=l[0],"container"===o?r=n.container:"dropdown"===o?r=n.dropdown:(d[o]&&(o=d[o]),r=n[o].apply(n,l.slice(1))),s(l[0],c)>=0||s(l[0],h)>=0&&1==l.length)return!1}}),r===e?this:r},t.fn.select2.defaults={width:"copy",loadMorePadding:0,closeOnSelect:!0,openOnEnter:!0,containerCss:{},dropdownCss:{},containerCssClass:"",dropdownCssClass:"",formatResult:function(t,e,i,n){var s=[];return b(t.text,i.term,s,n),s.join("")},formatSelection:function(t,i,n){return t?n(t.text):e},sortResults:function(t,e,i){return t},formatResultCssClass:function(t){return t.css},formatSelectionCssClass:function(t,i){return e},minimumResultsForSearch:0,minimumInputLength:0,maximumInputLength:null,maximumSelectionSize:0,id:function(t){return t==e?null:t.id},matcher:function(t,e){return n(""+e).toUpperCase().indexOf(n(""+t).toUpperCase())>=0},separator:",",tokenSeparators:[],tokenizer:E,escapeMarkup:w,blurOnChange:!1,selectOnBlur:!1,adaptContainerCssClass:function(t){return t},adaptDropdownCssClass:function(t){return null},nextSearchTerm:function(t,i){return e},searchInputPlaceholder:"",createSearchChoicePosition:"top",shouldFocusInput:function(t){var e="ontouchstart"in window||navigator.msMaxTouchPoints>0;return!e||!(t.opts.minimumResultsForSearch<0)}},t.fn.select2.locales=[],t.fn.select2.locales.en={formatMatches:function(t){return 1===t?"One result is available, press enter to select it.":t+" results are available, use up and down arrow keys to navigate."},formatNoMatches:function(){return"No matches found"},formatAjaxError:function(t,e,i){return"Loading failed"},formatInputTooShort:function(t,e){var i=e-t.length;return"Please enter "+i+" or more character"+(1==i?"":"s")},formatInputTooLong:function(t,e){var i=t.length-e;return"Please delete "+i+" character"+(1==i?"":"s")},formatSelectionTooBig:function(t){return"You can only select "+t+" item"+(1==t?"":"s")},formatLoadMore:function(t){return"Loading more results…"},formatSearching:function(){return"Searching…"}},t.extend(t.fn.select2.defaults,t.fn.select2.locales.en),t.fn.select2.ajaxDefaults={transport:t.ajax,params:{type:"GET",cache:!1,dataType:"json"}},window.Select2={query:{ajax:_,local:x,tags:C},util:{debounce:h,markMatch:b,escapeMarkup:w,stripDiacritics:n},class:{abstract:O,single:P,multi:R}}}}(t)}).call(e,i(1))},,,,,,,,,,,,,,function(t,e,i){var n,s;(function(o,r,a){n=[i(67)],s=function(t){var e="undefined"==typeof Galaxy?"/":Galaxy.root,i={storage:window.sessionStorage,onEnd:function(){sessionStorage.removeItem("activeGalaxyTour")},delay:150,orphan:!0},n=function(t){return o.each(t.steps,function(t){t.preclick&&(t.onShow=function(){o.each(t.preclick,function(t){r(t).click()})}),t.postclick&&(t.onNext=function(){o.each(t.postclick,function(t){r(t).click()})}),t.textinsert&&(t.onShown=function(){r(t.element).val(t.textinsert).trigger("change")})}),t},s=a.Model.extend({urlRoot:e+"api/tours"}),l=a.Collection.extend({url:e+"api/tours",model:s}),u=function(t){var s=e+"api/tours/"+t;r.getJSON(s,function(t){var e=n(t);sessionStorage.setItem("activeGalaxyTour",JSON.stringify(t));var s=new Tour(o.extend({steps:e.steps},i));s.init(),s.goTo(0),s.restart()})},c=a.View.extend({initialize:function(){var t=this;this.setElement("<div/>"),this.model=new l,this.model.fetch({success:function(){t.render()},error:function(){console.error("Failed to fetch tours.")}})},render:function(){var t=o.template(["<h2>Galaxy Tours</h2>","<p>This page presents a list of interactive tours available on this Galaxy server. ","Select any tour to get started (and remember, you can click 'End Tour' at any time).</p>","<ul>","<% _.each(tours, function(tour) { %>","<li>",'<a href="/tours/<%- tour.id %>" class="tourItem" data-tour.id=<%- tour.id %>>',"<%- tour.attributes.name || tour.id %>","</a>",' - <%- tour.attributes.description || "No description given." %>',"</li>","<% }); %>","</ul>"].join(""));this.$el.html(t({tours:this.model.models})).on("click",".tourItem",function(t){t.preventDefault(),u(r(this).data("tour.id"))})}});return{ToursView:c,hooked_tour_from_data:n,tour_opts:i,giveTour:u}}.apply(e,n),!(void 0!==s&&(t.exports=s))}).call(e,i(2),i(1),i(3))},,function(t,e,i){var n,s;n=[i(2),i(3),i(6),i(5)],s=function(t,e,i,n){"use strict";var s="user",o=e.Model.extend(i.LoggableMixin).extend({_logNamespace:s,urlRoot:function(){return Galaxy.root+"api/users"},defaults:{id:null,username:"("+n("anonymous user")+")",email:"",total_disk_usage:0,nice_total_disk_usage:"",quota_percent:null,is_admin:!1},initialize:function(t){this.log("User.initialize:",t),this.on("loaded",function(t,e){this.log(this+" has loaded:",t,e)}),this.on("change",function(t,e){this.log(this+" has changed:",t,e.changes)})},isAnonymous:function(){return!this.get("email")},isAdmin:function(){return this.get("is_admin")},loadFromApi:function(t,i){t=t||o.CURRENT_ID_STR,i=i||{};var n=this,s=i.success;return i.success=function(t,e){n.trigger("loaded",t,e),s&&s(t,e)},t===o.CURRENT_ID_STR&&(i.url=this.urlRoot+"/"+o.CURRENT_ID_STR),e.Model.prototype.fetch.call(this,i)},clearSessionStorage:function(){for(var t in sessionStorage)0===t.indexOf("history:")?sessionStorage.removeItem(t):"history-panel"===t&&sessionStorage.removeItem(t)},toString:function(){var t=[this.get("username")];return this.get("id")&&(t.unshift(this.get("id")),t.push(this.get("email"))),"User("+t.join(":")+")"}});o.CURRENT_ID_STR="current",o.getCurrentUserFromApi=function(t){var e=new o;return e.loadFromApi(o.CURRENT_ID_STR,t),e};e.Collection.extend(i.LoggableMixin).extend({model:o,urlRoot:function(){return Galaxy.root+"api/users"}});return{User:o}}.apply(e,n),!(void 0!==s&&(t.exports=s))},function(t,e,i){var n,s,o;(function(r){!function(r){s=[i(1)],n=r,o="function"==typeof n?n.apply(e,s):n,!(void 0!==o&&(t.exports=o))}(function(t){"use_strict";function e(t,e){i(t).find(".tag-name").each(function(){i(this).click(function(){var t=i(this).text(),n=t.split(":");return e(n[0],n[1]),!0})})}var i=t;return t.fn.autocomplete_tagging=function(n){function s(t){i(t).mouseenter(function(){i(this).attr("src",l.delete_tag_img_rollover)}),i(t).mouseleave(function(){i(this).attr("src",l.delete_tag_img)}),i(t).click(function(){var e=i(this).parent(),n=e.find(".tag-name").eq(0),s=n.text(),o=s.split(":"),r=o[0],a=o[1],u=e.prev();e.remove(),delete l.tags[r];var d=l.get_toggle_link_text_fn(l.tags);return h.text(d),i.ajax({url:l.ajax_delete_tag_url,data:{tag_name:r},error:function(){l.tags[r]=a,u.hasClass("tag-button")?u.after(e):c.prepend(e),alert("Remove tag failed"),h.text(l.get_toggle_link_text_fn(l.tags)),t.mouseenter(function(){i(this).attr("src",l.delete_tag_img_rollover)}),t.mouseleave(function(){i(this).attr("src",l.delete_tag_img)})},success:function(){}}),!0})}function o(t){var e=i("<img/>").attr("src",l.delete_tag_img).addClass("delete-tag-img");s(e);var n=i("<span>").text(t).addClass("tag-name");n.click(function(){var e=t.split(":");return l.tag_click_fn(e[0],e[1]),!0});var o=i("<span></span>").addClass("tag-button");return o.append(n),l.editable&&o.append(e),o}var a={get_toggle_link_text_fn:function(t){var e="",i=r.size(t);return e=i>0?i+(i>1?" Tags":" Tag"):"Add tags"},tag_click_fn:function(t,e){},editable:!0,input_size:20,in_form:!1,tags:{},use_toggle_link:!0,item_id:"",add_tag_img:"",add_tag_img_rollover:"",delete_tag_img:"",ajax_autocomplete_tag_url:"",ajax_retag_url:"",ajax_delete_tag_url:"",ajax_add_tag_url:""},l=t.extend(a,n),u=i(this),c=u.find(".tag-area"),h=u.find(".toggle-link"),d=u.find(".tag-input"),p=u.find(".add-tag-button");h.click(function(){var t;return t=c.is(":hidden")?function(){var t=i(this).find(".tag-button").length;0===t&&c.click()}:function(){c.blur()},c.slideToggle("fast",t),i(this)}),l.editable&&d.hide(),d.keyup(function(t){if(27===t.keyCode)i(this).trigger("blur");else if(13===t.keyCode||188===t.keyCode||32===t.keyCode){var e=this.value;if(e.indexOf(": ",e.length-2)!==-1)return this.value=e.substring(0,e.length-1),!1;if(188!==t.keyCode&&32!==t.keyCode||(e=e.substring(0,e.length-1)),e=i.trim(e),e.length<2)return!1;this.value="";var n=o(e),s=c.children(".tag-button");if(0!==s.length){var r=s.slice(s.length-1);r.after(n)}else c.prepend(n);var a=e.split(":");l.tags[a[0]]=a[1];var u=l.get_toggle_link_text_fn(l.tags);h.text(u);var d=i(this);return i.ajax({url:l.ajax_add_tag_url,data:{new_tag:e},error:function(){n.remove(),delete l.tags[a[0]];var t=l.get_toggle_link_text_fn(l.tags);h.text(t),alert("Add tag failed")},success:function(){d.data("autocompleter").cacheFlush()}}),!1}});var f=function(t,e,i,n,s){var o=n.split(":");return 1===o.length?o[0]:o[1]},g={selectFirst:!1,formatItem:f,autoFill:!1,highlight:!1};d.autocomplete_verheul(l.ajax_autocomplete_tag_url,g),u.find(".delete-tag-img").each(function(){s(i(this))}),e(i(this),l.tag_click_fn),p.click(function(){return i(this).hide(),c.click(),!1}),l.editable&&(c.bind("blur",function(t){r.size(l.tags)>0&&(p.show(),d.hide(),c.removeClass("active-tag-area"))}),c.click(function(t){var e=i(this).hasClass("active-tag-area");if(i(t.target).hasClass("delete-tag-img")&&!e)return!1;if(i(t.target).hasClass("tag-name")&&!e)return!1;i(this).addClass("active-tag-area"),p.hide(),d.show(),d.focus();var n=function(t){var e=function(t,e){t.attr("id");e!==t&&(t.blur(),i(window).unbind("click.tagging_blur"),i(this).addClass("tooltip"))};e(c,i(t.target))};return i(window).bind("click.tagging_blur",n),!1})),l.use_toggle_link&&c.hide()},e})}).call(e,i(2))},,,function(t,e,i){var n,s;n=[],s=function(){function t(t,i){var n=void 0!==t.prototype?t.prototype:t;return void 0!==i&&(n._logNamespace=i),e.forEach(function(t){n[t]=function(){if(this.logger)return this.logger.emit?this.logger.emit(t,this._logNamespace,arguments):this.logger[t]?this.logger[t].apply(this.logger,arguments):void 0}}),t}var e=["log","debug","info","warn","error","metric"];return t}.apply(e,n),!(void 0!==s&&(t.exports=s))},,function(t,e){var i={__root:{"Analyze Data":!1,Workflow:!1,"Shared Data":!1,"Data Libraries":!1,Histories:!1,Workflows:!1,Visualizations:!1,Pages:!1,Visualization:!1,"New Track Browser":!1,"Saved Visualizations":!1,"Interactive Environments":!1,Admin:!1,Help:!1,Support:!1,Search:!1,"Mailing Lists":!1,Videos:!1,Wiki:!1,"How to Cite Galaxy":!1,"Interactive Tours":!1,User:!1,Login:!1,Register:!1,"Login or Register":!1,"Logged in as":!1,Preferences:!1,"Custom Builds":!1,Logout:!1,"Saved Histories":!1,"Saved Datasets":!1,"Saved Pages":!1,"Account and saved data":!1,"Account registration or login":!1,"Support, contact, and community":!1,"Administer this Galaxy":!1,"Visualize datasets":!1,"Access published resources":!1,"Chain tools into workflows":!1,"Analysis home view":!1,"History Lists":!1,"Histories Shared with Me":!1,"Current History":!1,"Create New":!1,"Copy History":!1,"Share or Publish":!1,"Show Structure":!1,"Extract Workflow":!1,"Delete Permanently":!1,"Dataset Actions":!1,"Copy Datasets":!1,"Dataset Security":!1,"Resume Paused Jobs":!1,"Collapse Expanded Datasets":!1,"Unhide Hidden Datasets":!1,"Delete Hidden Datasets":!1,"Purge Deleted Datasets":!1,Downloads:!1,"Export Tool Citations":!1,"Export History to File":!1,"Other Actions":!1,"Import from File":!1,Webhooks:!1,"This history is empty":!1,"No matching datasets found":!1,"An error occurred while getting updates from the server":!1,"Please contact a Galaxy administrator if the problem persists":!1,"search datasets":!1,"You are currently viewing a deleted history!":!1,"You are over your disk quota":!1,"Tool execution is on hold until your disk usage drops below your allocated quota":!1,All:!1,None:!1,"For all selected":!1,"Edit history tags":!1,"Edit history Annotation":!1,"Click to rename history":!1,"Operations on multiple datasets":!1,"Hide datasets":!1,"Unhide datasets":!1,"Delete datasets":!1,"Undelete datasets":!1,"Permanently delete datasets":!1,"This will permanently remove the data in your datasets. Are you sure?":!1,Dataset:!1,Annotation:!1,"This history is empty. Click 'Get Data' on the left tool menu to start":!1,"You must be logged in to create histories":!1,"Unable to purge dataset":!1,"Cannot display datasets removed from disk":!1,"This dataset must finish uploading before it can be viewed":!1,"This dataset is not yet viewable":!1,"View data":!1,Download:!1,"Download dataset":!1,"Additional files":!1,"View details":!1,"This is a new dataset and not all of its data are available yet":!1,"You do not have permission to view this dataset":!1,"The job creating this dataset was cancelled before completion":!1,"This job is waiting to run":!1,"This dataset is currently uploading":!1,"Metadata is being auto-detected":!1,"This job is currently running":!1,'This job is paused. Use the "Resume Paused Jobs" in the history menu to resume':!1,"An error occurred with this dataset":!1,"No data":!1,"An error occurred setting the metadata for this dataset":!1,"There was an error getting the data for this dataset":!1,"This dataset has been deleted and removed from disk":!1,"This dataset has been deleted":!1,"This dataset has been hidden":!1,format:!1,database:!1,"Edit attributes":!1,"Cannot edit attributes of datasets removed from disk":!1,"Undelete dataset to edit attributes":!1,"This dataset must finish uploading before it can be edited":!1,"This dataset is not yet editable":!1,Delete:!1,"Dataset is already deleted":!1,"View or report this error":!1,"Run this job again":!1,Visualize:!1,"Visualize in":!1,"Undelete it":!1,"Permanently remove it from disk":!1,"Unhide it":!1,"You may be able to":!1,"set it manually or retry auto-detection":!1,"Edit dataset tags":!1,"Edit dataset annotation":!1,"Tool Help":!1,"Search Tool Shed":!1,"Monitor installing repositories":!1,"Manage installed tools":!1,"Reset metadata":!1,"Download local tool":!1,"Tool lineage":!1,"Reload a tool's configuration":!1,"Review tool migration stages":!1,"View Tool Error Logs":!1,"Manage Display Whitelist":!1,"Manage Tool Dependencies":!1,Users:!1,Groups:!1,"API keys":!1,"Impersonate a user":!1,Data:!1,Quotas:!1,Roles:!1,"Local data":!1,"Form Definitions":!1,"Enable/Disable Scratchbook":!1,"Show/Hide Scratchbook":!1,Tags:!1,"Edit annotation":!1},__ja:{"Analyze Data":"データ解析",Workflow:"ワークフロー","Shared Data":"共有データ","Data Libraries":"データライブラリ",Histories:"ヒストリー",Workflows:"ワークフロー",Visualizations:"可視化",Pages:"ページ",Visualization:"可視化","New Track Browser":"新しい Track Browser","Saved Visualizations":"保存された可視化","Interactive Environments":"インタラクティブ環境",Admin:"管理者",Help:"ヘルプ",Support:"サポート",Search:"検索","Mailing Lists":"メーリングリスト",Videos:"動画","How to Cite Galaxy":"Galaxy を引用する方法","Interactive Tours":"インタラクティブツアー",User:"ユーザー",Login:"ログイン",Register:"登録","Login or Register":"ログイン/登録",Preferences:"設定","Custom Builds":"カスタムビルド",Logout:"ログアウト","Saved Histories":"保存されたヒストリ","Saved Datasets":"保存されたデータセット","Saved Pages":"保存されたページ","Account and saved data":"アカウントと保存されたデータ","Account registration or login":"アカウントの登録またはログイン","Support, contact, and community":"サポート、コンタクト、コミュニティ","Administer this Galaxy":"この Galaxy の管理者","Visualize datasets":"データセットの可視化","Access published resources":"パブリッシュされたリソースへアクセス","Chain tools into workflows":"ツールとワークフローの連携","Analysis home view":"解析ホーム","History Lists":"ヒストリーリスト","Histories Shared with Me":"私と共有されているヒストリー","Current History":"現在のヒストリー","Create New":"新しく作成","Copy History":"ヒストリーをコピーする","Share or Publish":"共有またはパブリッシュ","Show Structure":"構造を見る","Extract Workflow":"ワークフローを抽出","Delete Permanently":"永久に削除","Dataset Actions":"データセットの操作","Copy Datasets":"データセットをコピー","Dataset Security":"データセットのセキュリティ","Resume Paused Jobs":"一時停止したジョブの再開","Collapse Expanded Datasets":"展開されたデータセットを畳む","Unhide Hidden Datasets":"隠されたデータセットを表示する","Delete Hidden Datasets":"隠されたデータセットを削除する","Purge Deleted Datasets":"削除されたデータセットを永久に削除",Downloads:"ダウンロード","Export Tool Citations":"ツールの引用をエクスポート","Export History to File":"ヒストリーをファイルへエクスポート","Other Actions":"その他のアクション","Import from File":"ファイルからの読み込み",Webhooks:"Webhooks","This history is empty":"ヒストリーは空です","No matching datasets found":"一致するデータセットが見つかりませんでした","Search datasets":"データセットを検索する","You are currently viewing a deleted history!":"消去したヒストリーをみています。","You are over your disk quota":"あなたはディスククォータを超えている",All:"一式",None:"なし","For all selected":"各項目を","Edit history tags":"ヒストリーのタグを編集","Edit history annotation":"ヒストリーのアノテーションを編集","Click to rename history":"ヒストリーの名前を変更するにはクリック","Operations on multiple datasets":"複数のデータセットに対する操作","Permanently delete datasets":"永久にデータセットを削除","This will permanently remove the data in your datasets. Are you sure?":"これは永久にあなたのデータセット内のデータを削除します。本当に?",Dataset:"データセット","This history is empty. Click 'Get Data' on the left tool menu to start":"ヒストリーは空です。解析をはじめるには、左パネルの 'データ取得' をクリック","You must be logged in to create histories":"ヒストリーを作成するためにはログインする必要があります","View data":"データを表示",Download:"ダウンロード","Download dataset":"データセットをダウンロード","View details":"細部を表示","This job is waiting to run":"ジョブは実行待ちです","This job is currently running":"ジョブは実行中です","An error occurred with this dataset":"このジョブの実行中に発生したエラー","No data":"データ無し","This dataset has been deleted and removed from disk":"このデータセットは、永続的にディスクから削除されました","This dataset has been deleted":"このデータセットは削除されました","This dataset has been hidden":"このデータセットは、非表示にされた",format:"フォーマット",database:"データベース","Edit attributes":"変数を編集する",Delete:"削除する","View or report this error":"このエラーを届け出る","Run this job again":"もう一度このジョブを実行する",Visualize:"可視化する","Undelete it":"復元する","Permanently remove it from disk":"永久にディスクから削除","Unhide it":"非表示解除する","Search Tool Shed":"Tool Shed で探す","Search Tool Shed (Beta)":"Tool Shed (Beta) で探す","Monitor installing repositories":"インストールレポジトリのモニタ","Manage installed tools":"インストールしたツールの管理","Reset metadata":"メタデータのリセット","Download local tool":"ローカルツールのダウンロード","Tool lineage":"ツール系統","Reload a tool's configuration":"ツールのコンフィグのリロード","Review tool migration stages":"ツール移行ステージのレビュー","View Tool Error Logs":"ツールのエラーログ","Manage Display Whitelist":"表示ホワイトリストの管理","Manage Tool Dependencies":"ツール依存関係の管理",Users:"ユーザー",Groups:"グループ","API keys":"API キー","Impersonate a user":"ユーザー偽装",Data:"データ",Quotas:"クォータ",Roles:"ロール","Local data":"ローカルデータ","Form definitions":"フォーム定義",Administration:"管理",Server:"サーバー","Tools and Tool Shed":"ツールと Tool Shed","User Management":"ユーザ管理","Form Definitions":"フォーム定義"},__fr:{"Analyze Data":"Analyse de données",Workflow:"Workflow","Shared Data":"Données partagées","Data Libraries":"Bibliothèque de données",Histories:"Historiques",Workflows:"Workflows",Visualizations:"Visualisations",Pages:"Pages",Visualization:"Visualisation","New Track Browser":"Nouveau Navigateur de Tracks/Pistes","Saved Visualizations":"Visualisations sauvegardés","Interactive Environments":"Environnements interactifs",Admin:"Admin",Help:"Aide",Support:"Assistance",Search:"Recherche","Mailing Lists":"Liste de diffusion",Videos:"Vidéos",Wiki:"Documentations","How to Cite Galaxy":"Comment citer Galaxy","Interactive Tours":"Guides interactifs",User:"Utilisateur",Login:"Authentification",Register:"Enregistrement","Login or Register":"Authentification et Enregistrement","Logged in as":"Authentifié en tant que",Preferences:"Préférences","Custom Builds":"Mes génomes Builds de référence",Logout:"Déconnexion","Saved Histories":"Historiques sauvegardés","Saved Datasets":"Jeux de données sauvegardés","Saved Pages":"Pages sauvegardées","Account and saved data":"Compte et données sauvegardées","Account registration or login":"Enregistrement ou authentification","Support, contact, and community":"Support,contact et communauté","Administer this Galaxy":"Outils Admin","Visualize datasets":"Visualiser les jeux de données","Access published resources":"Accéder aux données partagées","Chain tools into workflows":"Relier outils dans un workflow","Analysis home view":"Accueil analyse de donnée","History Lists":"Tableaux des historiques","Histories Shared with Me":"Historiques partagés avec moi","Current History":"Cet Historique","Create New":"Créer un nouveau","Copy History":"Copier l'Historique","Share or Publish":"Partager et publier","Show Structure":"Montrer la structure","Extract Workflow":"Extraire un Workflow","Delete Permanently":"Supprimer définitivement","Dataset Actions":"Actions sur les jeux de données","Copy Datasets":"Copier des jeux de données","Dataset Security":"Permissions/Sécurité","Resume Paused Jobs":"Reprendre les processus en pause","Collapse Expanded Datasets":"Réduire les données étendues","Unhide Hidden Datasets":"Afficher les données cachées","Delete Hidden Datasets":"Supprimer les données cachées","Purge Deleted Datasets":"Purger les données supprimées",Downloads:"Télécharger","Export Tool Citations":"Exporter les citations des outils","Export History to File":"Exporter l'Historique dans un fichier","Other Actions":"Autres actions","Import from File":"Importer depuis un fichier",Webhooks:"Webhooks","This history is empty":"Cet historique est vide","No matching datasets found":"Aucunes données correspondantes n'a été trouvées","An error occurred while getting updates from the server":"Une erreur s'est produite lors de la réception des données depuis le serveur","Please contact a Galaxy administrator if the problem persists":"Veuillez contacter un administrateur de l'instance Galaxy si ce problème persiste","search datasets":"Rechercher des données","You are currently viewing a deleted history!":"Vous consultez actuellement un historique supprimé!","You are over your disk quota":"Vous avez dépassé votre quota d'espace disque","Tool execution is on hold until your disk usage drops below your allocated quota":"L'exécution de l'outil est en attente tant que votre utilisation d'espace disque dépasse le quota attribué",All:"Tout",None:"Aucun","For all selected":"Pour toute la sélection","Edit history tags":"Editer les mots-clés de l'historique","Edit history Annotation":"Editer l'annotation de l'historique","Click to rename history":"Cliquer pour renommer l'historique","Operations on multiple datasets":"Opérer sur plusieurs jeux de données en même temps","Hide datasets":"Cacher les jeux de données","Unhide datasets":"Afficher les jeux de données cachés","Delete datasets":"Supprimer les jeux de données","Undelete datasets":"Restaurer les jeux de données supprimés","Permanently delete datasets":"Supprimer définitivement les jeux de données","This will permanently remove the data in your datasets. Are you sure?":"Cela supprimera de manière permanente les données de votre historique. Êtes-vous certain?",Dataset:"Jeu de données",Annotation:"Annotation","This history is empty. Click 'Get Data' on the left tool menu to start":"Cet historique est vide. Cliquer sur 'Get Data' au niveau du menu d'outils à gauche pour démarrer","You must be logged in to create histories":"Vous devez être connecté pour créer un historique","load your own data":"Charger vos propres données","get data from an external source":"Charger des données depuis une source externe","Include Deleted Datasets":"Inclure les jeux de données supprimés","Include Hidden Datasets":"Inclure les jeux de données cachés","Unable to purge dataset":"Impossible de purger le jeu de données","Cannot display datasets removed from disk":"Impossible de visualiser les jeux de données supprimés du disque","This dataset must finish uploading before it can be viewed":"Le jeu de données doit être totalement téléversé avant de pouvoir être visualiser","This dataset is not yet viewable":"Ce jeu de données n'est pas visualisable","View data":"Voir les données",Download:"Télécharger","Download dataset":"Télécharger le jeu de données","Additional files":"Fichiers additionnels","View details":"Voir les détails","This is a new dataset and not all of its data are available yet":"Il s'agit d'un nouveau jeu de données et seule une partie des données est accessible pour le moment","You do not have permission to view this dataset":"Vous n'avez pas la permission de voir ce jeu de données","The job creating this dataset was cancelled before completion":"Le processus à l'origine de ce jeu de données a été annulé prématurément","This job is waiting to run":"Ce calcul est en attente de traitement","This dataset is currently uploading":"Ce jeu de données est en cours de téléversement","Metadata is being auto-detected":"Les métadonnées sont auto-détectées","This job is currently running":"Le traitement est en cours",'This job is paused. Use the "Resume Paused Jobs" in the history menu to resume':'Ce traitement est en pause. Utilisez le "Relancer les traitements en pause" dans le menu d\'historique pour le relancer',"An error occurred with this dataset":"Un erreur est survenue avec ce jeu de données","No data":"Aucune donnée","An error occurred setting the metadata for this dataset":"Une erreur est survenue pendant la récupération des métadonnées de ce jeu de données","There was an error getting the data for this dataset":"Il est survenu une erreur durant la récupération du contenu de ce jeu de données","This dataset has been deleted and removed from disk":"Ce jeu de données a été supprimé et effacé du disque","This dataset has been deleted":"Ce jeu de données a été supprimé","This dataset has been hidden":"Ce jeu de données a été caché",format:"format",database:"génome de référence","Edit attributes":"Editer les attributs","Cannot edit attributes of datasets removed from disk":"Impossible d'éditer les attributs de jeux de données effacés du disque","Undelete dataset to edit attributes":"Restaurer le jeu de données pour en éditer les attributs","This dataset must finish uploading before it can be edited":"Ce jeu de données doit être entièrement téléversé avant toute modification","This dataset is not yet editable":"Ce jeu de données n'est pas encore éditable",Delete:"Supprimer","Dataset is already deleted":"Le jeu de données est déjà supprimé","View or report this error":"Voir ou remonter cette erreur","Run this job again":"Exécuter ce traitement à nouveau",Visualize:"Visualiser","Visualize in":"Visualiser via","Undelete it":"Restaurer","Permanently remove it from disk":"Supprimer définitivement du disque","Unhide it":"Rendre visible","You may be able to":"Vous devriez être en mesure de","set it manually or retry auto-detection":"Traitez le manuellement ou retenter la détection automatique","Edit dataset tags":"Editer les mots-clés du jeu de données","Edit dataset annotation":"Editer les annotations du jeu de données",Tags:"Mots-clés","Edit annotation":"Editer les annotations"},__zh:{"This history is empty":"历史已空","No matching datasets found":"未找到匹配的数据集","Search datasets":"搜索数据集","You are currently viewing a deleted history!":"正在查看已删除的历史","You are over your disk quota":"您已超过磁盘配额",All:"皆",None:"一个也没有","For all selected":"为每个选定","Click to rename history":"单击要重命名的历史","Operations on multiple datasets":"编辑多个数据集","Permanently delete datasets":"永久删除数据集","This will permanently remove the data in your datasets. Are you sure?":"这将永久在你的数据集删除数据。你确定?",Dataset:"数据集","This history is empty. Click 'Get Data' on the left tool menu to start":"历史已空,请单击左边窗格中‘获取数据’","You must be logged in to create histories":"你必须登录后才能创建历史","View data":"数据",Download:"下载","Download dataset":"下载数据集","View details":"查看详情","This job is waiting to run":"等待运行的进程","This job is currently running":"正在运行的进程","An error occurred with this dataset":"进程运行时出错","No data":"没有数据","This dataset has been deleted":"此数据集已被删除","This dataset has been hidden":"此数据集已隐藏",format:"格式",database:"数据库","Edit attributes":"编辑属性",Delete:"删除","View or report this error":"报告错误","Run this job again":"重新运行",Visualize:"图形","Undelete it":"反删除","Permanently remove it from disk":"从磁盘中永久删除",
|
||
"Unhide it":"取消隐藏"}};i.init=function(t){t||(t=window._i18n&&window._i18n.locale?window._i18n.locale:"root"),Object.assign(this,this.__root,this["__"+t])},i.init(),t.exports=i},,,,function(t,e,i){var n,s;(function(o,r){n=[i(8)],s=function(t){var e=o.View.extend({initialize:function(){this.modal=null},makeModalIframe:function(i){var n=window.Galaxy.config.communication_server_host,s=window.Galaxy.config.communication_server_port,o=escape(window.Galaxy.user.attributes.username),a=escape(window.Galaxy.config.persistent_communication_rooms),l="?username="+o+"&persistent_communication_rooms="+a,u=n+":"+s+l,c=null,h=null,d='<iframe class="f-iframe fade in communication-iframe" src="'+u+'"> </iframe>',p='<i class="fa fa-comment" aria-hidden="true" title="Communicate with other users"></i><i class="fa fa-expand expand-compress-modal" aria-hidden="true" title="Maximize"></i><i class="fa fa-times close-modal" aria-hidden="true" title="Close"></i>',f=350,g=600,m="ui-modal chat-modal";return r(".chat-modal").length>0&&r(".chat-modal").remove(),e.modal=new t.View({body:d,height:f,width:g,closing_events:!0,title_separator:!1,cls:m}),e.modal.show(),c=r(".chat-modal .modal-header"),h=r(".chat-modal .modal-body"),c.addClass("modal-header-body"),h.addClass("modal-header-body"),c.find("h4").remove(),c.removeAttr("min-height padding border"),c.append(p),r(".close-modal").click(function(t){r(".chat-modal").css("display","none")}),r(".expand-compress-modal").click(function(t){r(".expand-compress-modal").hasClass("fa-expand")?(r(".chat-modal .modal-dialog").width("1000px"),r(".chat-modal .modal-body").height("575px"),r(".expand-compress-modal").removeClass("fa-expand").addClass("fa-compress"),r(".expand-compress-modal").attr("title","Minimize"),r(".expand-compress-modal").css("margin-left","96.2%")):(r(".chat-modal .modal-dialog").width(g+"px"),r(".chat-modal .modal-body").height(f+"px"),r(".expand-compress-modal").removeClass("fa-compress").addClass("fa-expand"),r(".expand-compress-modal").attr("title","Maximize"),r(".expand-compress-modal").css("margin-left","93.2%"))}),this},render:function(){var t=this,e={};return e={id:"show-chat-online",icon:"fa-comment-o",tooltip:"Chat online",visible:!1,onclick:t.makeModalIframe}}});return{GenericNavView:e}}.apply(e,n),!(void 0!==s&&(t.exports=s))}).call(e,i(3),i(1))},function(t,e,i){var n,s;(function(o,r){n=[i(4),i(100),i(101),i(139)],s=function(t,e,i,n){var s=o.View.extend({initialize:function(t){var s=this;this.options=t,this.setElement(this._template()),this.$navbarBrandLink=this.$(".navbar-brand-link"),this.$navbarBrandImage=this.$(".navbar-brand-image"),this.$navbarBrandTitle=this.$(".navbar-brand-title"),this.$navbarTabs=this.$(".navbar-tabs"),this.$quoteMeter=this.$(".quota-meter-container"),this.collection=new e.Collection,this.collection.on("add",function(t){s.$navbarTabs.append(new e.Tab({model:t}).render().$el)}).on("reset",function(){s.$navbarTabs.empty()}).on("dispatch",function(t){s.collection.each(function(e){t(e)})}).fetch(this.options),Galaxy.frame=this.frame=new i({collection:this.collection}),Galaxy.quotaMeter=this.quotaMeter=new n.UserQuotaMeter({model:Galaxy.user,el:this.$quoteMeter}),r(window).on("click",function(t){var e=r(t.target).closest("a[download]");1==e.length&&(0===r("iframe[id=download]").length&&r("body").append(r("<iframe/>").attr("id","download").hide()),r("iframe[id=download]").attr("src",e.attr("href")),t.preventDefault())}).on("beforeunload",function(){var t="";if(s.collection.each(function(e){var i=e.get("onbeforeunload")&&e.get("onbeforeunload")();i&&(t+=i+" ")}),""!==t)return t})},render:function(){return this.$navbarBrandTitle.html("Galaxy "+(this.options.brand&&"/ "+this.options.brand||"")),this.$navbarBrandLink.attr("href",this.options.logo_url),this.$navbarBrandImage.attr("src",this.options.logo_src),this.quotaMeter.render(),this},_template:function(){return'<div id="masthead" class="navbar navbar-fixed-top navbar-inverse"><div class="navbar-header"><div class="navbar-tabs"/></div><div class="navbar-brand"><a class="navbar-brand-link"><img class="navbar-brand-image"/><span class="navbar-brand-title"/></a></div><div class="quota-meter-container"/><div class="navbar-icons"/></div>'}});return{View:s}}.apply(e,n),!(void 0!==s&&(t.exports=s))}).call(e,i(3),i(1))},function(t,e,i){var n,s;(function(o,r,a,l){n=[i(98),i(25),i(5),i(4)],s=function(t,e,i,n){var s=o.Collection.extend({model:o.Model.extend({defaults:{visible:!0,target:"_parent"}}),fetch:function(s){s=s||{},this.reset();var o=new t.GenericNavView;this.add(o.render()),this.add({id:"analysis",title:i("Analyze Data"),url:"",tooltip:i("Analysis home view")}),this.add({id:"workflow",title:i("Workflow"),tooltip:i("Chain tools into workflows"),disabled:!Galaxy.user.id,url:"workflow",target:"galaxy_main",onclick:function(){window.location=Galaxy.root+"workflow"}}),this.add({id:"shared",title:i("Shared Data"),url:"library/index",tooltip:i("Access published resources"),menu:[{title:i("Data Libraries"),url:"library/list"},{title:i("Histories"),url:"histories/list_published"},{title:i("Workflows"),url:"workflows/list_published"},{title:i("Visualizations"),url:"visualizations/list_published"},{title:i("Pages"),url:"pages/list_published"}]}),s.user_requests&&this.add({id:"lab",title:"Lab",menu:[{title:"Sequencing Requests",url:"requests/index"},{title:"Find Samples",url:"requests/find_samples_index"},{title:"Help",url:s.lims_doc_url}]}),this.add({id:"visualization",title:i("Visualization"),url:"visualization/list",tooltip:i("Visualize datasets"),disabled:!Galaxy.user.id,menu:[{title:i("New Track Browser"),url:"visualization/trackster",target:"_frame"},{title:i("Saved Visualizations"),url:"visualization/list",target:"_frame"},{title:i("Interactive Environments"),url:"visualization/gie_list",target:"galaxy_main"}]}),e.add({url:"api/webhooks/masthead/all",callback:function(t){r(document).ready(function(){r.each(t.models,function(t,e){var i=e.toJSON();if(i.activate){var s={id:i.name,icon:i.config.icon,url:i.config.url,tooltip:i.config.tooltip,onclick:i.config.function&&new Function(i.config.function)};Galaxy.page?Galaxy.page.masthead.collection.add(s):Galaxy.masthead&&Galaxy.masthead.collection.add(s),n.appendScriptStyle(i)}})})}}),Galaxy.user.get("is_admin")&&this.add({id:"admin",title:i("Admin"),url:"admin",tooltip:i("Administer this Galaxy"),cls:"admin-only"});var l={id:"help",title:i("Help"),tooltip:i("Support, contact, and community"),menu:[{title:i("Support"),url:s.support_url,target:"_blank"},{title:i("Search"),url:s.search_url,target:"_blank"},{title:i("Mailing Lists"),url:s.mailing_lists,target:"_blank"},{title:i("Videos"),url:s.screencasts_url,target:"_blank"},{title:i("Wiki"),url:s.wiki_url,target:"_blank"},{title:i("How to Cite Galaxy"),url:s.citation_url,target:"_blank"},{title:i("Interactive Tours"),url:"tours",onclick:function(){Galaxy.router?Galaxy.router.navigate("tours",{trigger:!0}):window.location=Galaxy.root+"tours"}}]};s.terms_url&&l.menu.push({title:i("Terms and Conditions"),url:s.terms_url,target:"_blank"}),s.biostar_url&&l.menu.unshift({title:i("Ask a question"),url:"biostar/biostar_question_redirect",target:"_blank"}),s.biostar_url&&l.menu.unshift({title:i("Galaxy Biostar"),url:s.biostar_url_redirect,target:"_blank"}),this.add(l);var u={};u=Galaxy.user.id?{id:"user",title:i("User"),cls:"loggedin-only",tooltip:i("Account and saved data"),menu:[{title:i("Logged in as")+" "+Galaxy.user.get("email")},{title:i("Preferences"),url:"user",target:"galaxy_main",onclick:function(){Galaxy.router?Galaxy.router.push("user"):window.location=Galaxy.root+"user"}},{title:i("Custom Builds"),url:"custom_builds",target:"galaxy_main",onclick:function(){Galaxy.router?Galaxy.router.push("custom_builds"):window.location=Galaxy.root+"custom_builds"}},{title:i("Logout"),url:"user/logout",target:"_top",divider:!0},{title:i("Saved Histories"),url:"histories/list",target:"_top"},{title:i("Saved Datasets"),url:"datasets/list",target:"_top"},{title:i("Saved Pages"),url:"pages/list",target:"_top"}]}:s.allow_user_creation?{id:"user",title:i("Login or Register"),cls:"loggedout-only",tooltip:i("Account registration or login"),menu:[{title:i("Login"),url:"user/login",target:"galaxy_main",noscratchbook:!0},{title:i("Register"),url:"user/create",target:"galaxy_main",noscratchbook:!0}]}:{id:"user",title:i("Login"),cls:"loggedout-only",tooltip:i("Login"),url:"user/login",target:"galaxy_main",noscratchbook:!0},this.add(u);var c=this.get(s.active_view);return c&&c.set("active",!0),(new a.Deferred).resolve().promise()}}),u=o.View.extend({initialize:function(t){this.model=t.model,this.setElement(this._template()),this.$dropdown=this.$(".dropdown"),this.$toggle=this.$(".dropdown-toggle"),this.$menu=this.$(".dropdown-menu"),this.$note=this.$(".dropdown-note"),this.listenTo(this.model,"change",this.render,this)},events:{"click .dropdown-toggle":"_toggleClick"},render:function(){var t=this;return r(".tooltip").remove(),this.$el.attr("id",this.model.id).css({visibility:this.model.get("visible")&&"visible"||"hidden"}),this.model.set("url",this._formatUrl(this.model.get("url"))),this.$note.html(this.model.get("note")||"").removeClass().addClass("dropdown-note").addClass(this.model.get("note_cls")).css({display:this.model.get("show_note")&&"block"||"none"}),this.$toggle.html(this.model.get("title")||"").removeClass().addClass("dropdown-toggle").addClass(this.model.get("cls")).addClass(this.model.get("icon")&&"dropdown-icon fa "+this.model.get("icon")).addClass(this.model.get("toggle")&&"toggle").attr("target",this.model.get("target")).attr("href",this.model.get("url")).attr("title",this.model.get("tooltip")).tooltip("destroy"),this.model.get("tooltip")&&this.$toggle.tooltip({placement:"bottom"}),this.$dropdown.removeClass().addClass("dropdown").addClass(this.model.get("disabled")&&"disabled").addClass(this.model.get("active")&&"active"),this.model.get("menu")&&this.model.get("show_menu")?(this.$menu.show(),r("#dd-helper").show().off().on("click",function(){r("#dd-helper").hide(),t.model.set("show_menu",!1)})):(t.$menu.hide(),r("#dd-helper").hide()),this.$menu.empty().removeClass("dropdown-menu"),this.model.get("menu")&&(l.each(this.model.get("menu"),function(e){t.$menu.append(t._buildMenuItem(e)),e.divider&&t.$menu.append(r("<li/>").addClass("divider"))}),t.$menu.addClass("dropdown-menu"),t.$toggle.append(r("<b/>").addClass("caret"))),this},_buildMenuItem:function(t){var e=this;return t=l.defaults(t||{},{title:"",url:"",target:"_parent",noscratchbook:!1}),t.url=e._formatUrl(t.url),r("<li/>").append(r("<a/>").attr("href",t.url).attr("target",t.target).html(t.title).on("click",function(i){i.preventDefault(),e.model.set("show_menu",!1),t.onclick?t.onclick():Galaxy.frame.add(t)}))},_toggleClick:function(t){function e(t,e){return r("<div/>").append(r("<a/>").attr("href",Galaxy.root+e).html(t)).html()}var i=this,n=this.model;t.preventDefault(),r(".tooltip").hide(),n.trigger("dispatch",function(t){n.id!==t.id&&t.get("menu")&&t.set("show_menu",!1)}),n.get("disabled")?(this.$toggle.popover&&this.$toggle.popover("destroy"),this.$toggle.popover({html:!0,placement:"bottom",content:"Please "+e("login","user/login?use_panels=True")+" or "+e("register","user/create?use_panels=True")+" to use this feature."}).popover("show"),setTimeout(function(){i.$toggle.popover("destroy")},5e3)):n.get("menu")?n.set("show_menu",!0):n.get("onclick")?n.get("onclick")():Galaxy.frame.add(n.attributes)},_formatUrl:function(t){return"string"==typeof t&&t.indexOf("//")===-1&&"/"!=t.charAt(0)?Galaxy.root+t:t},_template:function(){return'<ul class="nav navbar-nav"><li class="dropdown"><a class="dropdown-toggle"/><ul class="dropdown-menu"/><div class="dropdown-note"/></li></ul>'}});return{Collection:s,Tab:u}}.apply(e,n),!(void 0!==s&&(t.exports=s))}).call(e,i(3),i(1),i(1),i(2))},function(t,e,i){var n,s;(function(o,r,a){n=[i(29)],s=function(t){return o.View.extend({initialize:function(e){var i=this;e=e||{},this.frames=new t.View({visible:!1}),this.setElement(this.frames.$el),this.buttonActive=e.collection.add({id:"enable-scratchbook",icon:"fa-th",tooltip:_l("Enable/Disable Scratchbook"),onclick:function(){i.active=!i.active,i.buttonActive.set({toggle:i.active,show_note:i.active,note_cls:i.active&&"fa fa-check"}),!i.active&&i.frames.hide()},onbeforeunload:function(){if(i.frames.length()>0)return"You opened "+i.frames.length()+" frame(s) which will be lost."}}),this.buttonLoad=e.collection.add({id:"show-scratchbook",icon:"fa-eye",tooltip:_l("Show/Hide Scratchbook"),show_note:!0,visible:!1,onclick:function(t){i.frames.visible?i.frames.hide():i.frames.show()}}),this.frames.on("add remove",function(){this.visible&&0==this.length()&&this.hide(),i.buttonLoad.set({note:this.length(),visible:this.length()>0})}).on("show hide ",function(){i.buttonLoad.set({toggle:this.visible,icon:this.visible&&"fa-eye"||"fa-eye-slash"})}),this.history_cache={}},addDataset:function(t){var e=this,i=null;if(Galaxy&&Galaxy.currHistoryPanel){var n=Galaxy.currHistoryPanel.collection.historyId;this.history_cache[n]={name:Galaxy.currHistoryPanel.model.get("name"),dataset_ids:[]},Galaxy.currHistoryPanel.collection.each(function(t){!t.get("deleted")&&t.get("visible")&&e.history_cache[n].dataset_ids.push(t.get("id"))})}var s=function(t,i){if(t){var n=e.history_cache[t.get("history_id")];if(n&&n.dataset_ids){var s=n.dataset_ids,o=s.indexOf(t.get("id"));if(o!==-1&&o+i>=0&&o+i<s.length)return s[o+i]}}},o=function(t,n,o){var r=s(t,n);r?e._loadDataset(r,function(t,e){i=t,o.model.set(e)}):o.model.trigger("change")};this._loadDataset(t,function(t,n){i=t,e.add(r.extend({menu:[{icon:"fa fa-chevron-circle-left",tooltip:"Previous in History",onclick:function(t){o(i,-1,t)},disabled:function(){return!s(i,-1)}},{icon:"fa fa-chevron-circle-right",tooltip:"Next in History",onclick:function(t){o(i,1,t)},disabled:function(){return!s(i,1)}}]},n))})},_loadDataset:function(t,e){var n=this;i.e(1,function(i){(function(s,o){var r=[i(10)];(function(i){var r=new i.Dataset({id:t});s.when(r.fetch()).then(function(){var s=o.find(["tabular","interval"],function(t){return r.get("data_type").indexOf(t)!==-1}),a=r.get("name"),l=n.history_cache[r.get("history_id")];l&&(a=l.name+": "+a),e(r,s?{title:a,url:null,content:i.createTabularDatasetChunkedView({model:new i.TabularDataset(r.toJSON()),embedded:!0,height:"100%"}).$el}:{title:a,url:Galaxy.root+"datasets/"+t+"/display/?preview=True",content:null})})}).apply(null,r)}).call(this,i(1),i(2))})},addTrackster:function(t){var e=this;i.e(0,function(i){(function(n,s){var o=[i(32),i(152)];(function(i,o){var r=new i.Visualization({id:t});n.when(r.fetch()).then(function(){var t=new o.TracksterUI(Galaxy.root),i={title:r.get("name"),type:"other",content:function(e){var i={container:e,name:r.get("title"),id:r.id,dbkey:r.get("dbkey"),stand_alone:!1},n=r.get("latest_revision"),o=n.config.view.drawables;s.each(o,function(t){t.dataset={hda_ldda:t.hda_ldda,id:t.dataset_id}}),view=t.create_visualization(i,n.config.viewport,n.config.view.drawables,n.config.bookmarks,!1)}};e.add(i)})}).apply(null,o)}).call(this,i(1),i(2))})},add:function(t){if("_blank"==t.target)window.open(t.url);else if("_top"==t.target||"_parent"==t.target||"_self"==t.target)window.location=t.url;else if(!this.active||t.noscratchbook){var e=a(window.parent.document).find("#galaxy_main");"galaxy_main"==t.target||"center"==t.target?0===e.length?window.location=t.url+(t.url.indexOf("?")==-1?"?":"&")+"use_panels=True":e.attr("src",t.url):window.location=t.url}else this.frames.add(t)}})}.apply(e,n),!(void 0!==s&&(t.exports=s))}).call(e,i(3),i(2),i(1))},,,,,function(t,e,i){(function(t,e){+function(t){"use strict";function e(){var t=document.createElement("bootstrap"),e={WebkitTransition:"webkitTransitionEnd",MozTransition:"transitionend",OTransition:"oTransitionEnd otransitionend",transition:"transitionend"};for(var i in e)if(void 0!==t.style[i])return{end:e[i]}}t.fn.emulateTransitionEnd=function(e){var i=!1,n=this;t(this).one(t.support.transition.end,function(){i=!0});var s=function(){i||t(n).trigger(t.support.transition.end)};return setTimeout(s,e),this},t(function(){t.support.transition=e()})}(t),+function(t){"use strict";var e=function(e){this.element=t(e)};e.prototype.show=function(){var e=this.element,i=e.closest("ul:not(.dropdown-menu)"),n=e.attr("data-target");if(n||(n=e.attr("href"),n=n&&n.replace(/.*(?=#[^\s]*$)/,"")),!e.parent("li").hasClass("active")){var s=i.find(".active:last a")[0],o=t.Event("show.bs.tab",{relatedTarget:s});if(e.trigger(o),!o.isDefaultPrevented()){var r=t(n);this.activate(e.parent("li"),i),this.activate(r,r.parent(),function(){e.trigger({type:"shown.bs.tab",relatedTarget:s})})}}},e.prototype.activate=function(e,i,n){function s(){o.removeClass("active").find("> .dropdown-menu > .active").removeClass("active"),e.addClass("active"),r?(e[0].offsetWidth,e.addClass("in")):e.removeClass("fade"),e.parent(".dropdown-menu")&&e.closest("li.dropdown").addClass("active"),n&&n()}var o=i.find("> .active"),r=n&&t.support.transition&&o.hasClass("fade");r?o.one(t.support.transition.end,s).emulateTransitionEnd(150):s(),o.removeClass("in")};var i=t.fn.tab;t.fn.tab=function(i){return this.each(function(){var n=t(this),s=n.data("bs.tab");s||n.data("bs.tab",s=new e(this)),"string"==typeof i&&s[i]()})},t.fn.tab.Constructor=e,t.fn.tab.noConflict=function(){return t.fn.tab=i,this},t(document).on("click.bs.tab.data-api",'[data-toggle="tab"], [data-toggle="pill"]',function(e){e.preventDefault(),t(this).tab("show")})}(t),+function(t){"use strict";var e=function(t,e){this.type=this.options=this.enabled=this.timeout=this.hoverState=this.$element=null,this.init("tooltip",t,e)};e.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:"body"},e.prototype.init=function(e,i,n){this.enabled=!0,this.type=e,this.$element=t(i),this.options=this.getOptions(n);for(var s=this.options.trigger.split(" "),o=s.length;o--;){var r=s[o];if("click"==r)this.$element.on("click."+this.type,this.options.selector,t.proxy(this.toggle,this));else if("manual"!=r){var a="hover"==r?"mouseenter":"focus",l="hover"==r?"mouseleave":"blur";this.$element.on(a+"."+this.type,this.options.selector,t.proxy(this.enter,this)),this.$element.on(l+"."+this.type,this.options.selector,t.proxy(this.leave,this))}}this.options.selector?this._options=t.extend({},this.options,{trigger:"manual",selector:""}):this.fixTitle()},e.prototype.getDefaults=function(){return e.DEFAULTS},e.prototype.getOptions=function(e){return e=t.extend({},this.getDefaults(),this.$element.data(),e),e.delay&&"number"==typeof e.delay&&(e.delay={show:e.delay,hide:e.delay}),e},e.prototype.getDelegateOptions=function(){var e={},i=this.getDefaults();return this._options&&t.each(this._options,function(t,n){i[t]!=n&&(e[t]=n)}),e},e.prototype.enter=function(e){var i=e instanceof this.constructor?e:t(e.currentTarget)[this.type](this.getDelegateOptions()).data("bs."+this.type);return clearTimeout(i.timeout),i.hoverState="in",i.options.delay&&i.options.delay.show?void(i.timeout=setTimeout(function(){"in"==i.hoverState&&i.show()},i.options.delay.show)):i.show()},e.prototype.leave=function(e){var i=e instanceof this.constructor?e:t(e.currentTarget)[this.type](this.getDelegateOptions()).data("bs."+this.type);return clearTimeout(i.timeout),i.hoverState="out",i.options.delay&&i.options.delay.hide?void(i.timeout=setTimeout(function(){"out"==i.hoverState&&i.hide()},i.options.delay.hide)):i.hide()},e.prototype.show=function(){var e=t.Event("show.bs."+this.type);if(this.hasContent()&&this.enabled){if(this.$element.trigger(e),e.isDefaultPrevented())return;var i=this.tip();this.setContent(),this.options.animation&&i.addClass("fade");var n="function"==typeof this.options.placement?this.options.placement.call(this,i[0],this.$element[0]):this.options.placement,s=/\s?auto?\s?/i,o=s.test(n);o&&(n=n.replace(s,"")||"top"),i.detach().css({top:0,left:0,display:"block"}).addClass(n),this.options.container?i.appendTo(this.options.container):i.insertAfter(this.$element);var r=this.getPosition(),a=i[0].offsetWidth,l=i[0].offsetHeight;if(o){var u=this.$element.parent(),c=n,h=document.documentElement.scrollTop||document.body.scrollTop,d="body"==this.options.container?window.innerWidth:u.outerWidth(),p="body"==this.options.container?window.innerHeight:u.outerHeight(),f="body"==this.options.container?0:u.offset().left;n="bottom"==n&&r.top+r.height+l-h>p?"top":"top"==n&&r.top-h-l<0?"bottom":"right"==n&&r.right+a>d?"left":"left"==n&&r.left-a<f?"right":n,i.removeClass(c).addClass(n)}var g=this.getCalculatedOffset(n,r,a,l);this.applyPlacement(g,n),this.$element.trigger("shown.bs."+this.type)}},e.prototype.applyPlacement=function(t,e){var i,n=this.tip(),s=n[0].offsetWidth,o=n[0].offsetHeight,r=parseInt(n.css("margin-top"),10),a=parseInt(n.css("margin-left"),10);isNaN(r)&&(r=0),isNaN(a)&&(a=0),t.top=t.top+r,t.left=t.left+a,n.offset(t).addClass("in");var l=n[0].offsetWidth,u=n[0].offsetHeight;if("top"==e&&u!=o&&(i=!0,t.top=t.top+o-u),/bottom|top/.test(e)){var c=0;t.left<0&&(c=t.left*-2,t.left=0,n.offset(t),l=n[0].offsetWidth,u=n[0].offsetHeight),this.replaceArrow(c-s+l,l,"left")}else this.replaceArrow(u-o,u,"top");i&&n.offset(t)},e.prototype.replaceArrow=function(t,e,i){this.arrow().css(i,t?50*(1-t/e)+"%":"")},e.prototype.setContent=function(){var t=this.tip(),e=this.getTitle();t.find(".tooltip-inner")[this.options.html?"html":"text"](e),t.removeClass("fade in top bottom left right")},e.prototype.hide=function(){function e(){"in"!=i.hoverState&&n.detach()}var i=this,n=this.tip(),s=t.Event("hide.bs."+this.type);if(this.$element.trigger(s),!s.isDefaultPrevented())return n.removeClass("in"),t.support.transition&&this.$tip.hasClass("fade")?n.one(t.support.transition.end,e).emulateTransitionEnd(150):e(),this.$element.trigger("hidden.bs."+this.type),this},e.prototype.fixTitle=function(){var t=this.$element;(t.attr("title")||"string"!=typeof t.attr("data-original-title"))&&t.attr("data-original-title",t.attr("title")||"").attr("title","")},e.prototype.hasContent=function(){return this.getTitle()},e.prototype.getPosition=function(){var e=this.$element[0];return t.extend({},"function"==typeof e.getBoundingClientRect?e.getBoundingClientRect():{width:e.offsetWidth,height:e.offsetHeight},this.$element.offset())},e.prototype.getCalculatedOffset=function(t,e,i,n){return"bottom"==t?{top:e.top+e.height,left:e.left+e.width/2-i/2}:"top"==t?{top:e.top-n,left:e.left+e.width/2-i/2}:"left"==t?{top:e.top+e.height/2-n/2,left:e.left-i}:{top:e.top+e.height/2-n/2,left:e.left+e.width}},e.prototype.getTitle=function(){var t,e=this.$element,i=this.options;return t=e.attr("data-original-title")||("function"==typeof i.title?i.title.call(e[0]):i.title)},e.prototype.tip=function(){return this.$tip=this.$tip||t(this.options.template)},e.prototype.arrow=function(){return this.$arrow=this.$arrow||this.tip().find(".tooltip-arrow")},e.prototype.validate=function(){this.$element[0].parentNode||(this.hide(),this.$element=null,this.options=null)},e.prototype.enable=function(){this.enabled=!0},e.prototype.disable=function(){this.enabled=!1},e.prototype.toggleEnabled=function(){this.enabled=!this.enabled},e.prototype.toggle=function(e){var i=e?t(e.currentTarget)[this.type](this.getDelegateOptions()).data("bs."+this.type):this;i.tip().hasClass("in")?i.leave(i):i.enter(i)},e.prototype.destroy=function(){this.hide().$element.off("."+this.type).removeData("bs."+this.type)};var i=t.fn.tooltip;t.fn.tooltip=function(i){return this.each(function(){var n=t(this),s=n.data("bs.tooltip"),o="object"==typeof i&&i;s||n.data("bs.tooltip",s=new e(this,o)),"string"==typeof i&&s[i]()})},t.fn.tooltip.Constructor=e,t.fn.tooltip.noConflict=function(){return t.fn.tooltip=i,this}}(t),+function(t){"use strict";function e(){t(n).remove(),t(s).each(function(e){var n=i(t(this));n.hasClass("open")&&(n.trigger(e=t.Event("hide.bs.dropdown")),e.isDefaultPrevented()||n.removeClass("open").trigger("hidden.bs.dropdown"))})}function i(e){var i=e.attr("data-target");i||(i=e.attr("href"),i=i&&/#/.test(i)&&i.replace(/.*(?=#[^\s]*$)/,""));var n=i&&t(i);return n&&n.length?n:e.parent()}var n=".dropdown-backdrop",s="[data-toggle=dropdown]",o=function(e){t(e).on("click.bs.dropdown",this.toggle)};o.prototype.toggle=function(n){var s=t(this);if(!s.is(".disabled, :disabled")){var o=i(s),r=o.hasClass("open");if(e(),!r){if("ontouchstart"in document.documentElement&&!o.closest(".navbar-nav").length&&t('<div class="dropdown-backdrop"/>').insertAfter(t(this)).on("click",e),o.trigger(n=t.Event("show.bs.dropdown")),n.isDefaultPrevented())return;o.toggleClass("open").trigger("shown.bs.dropdown"),s.focus()}return!1}},o.prototype.keydown=function(e){if(/(38|40|27)/.test(e.keyCode)){var n=t(this);if(e.preventDefault(),e.stopPropagation(),!n.is(".disabled, :disabled")){var o=i(n),r=o.hasClass("open");if(!r||r&&27==e.keyCode)return 27==e.which&&o.find(s).focus(),n.click();var a=t("[role=menu] li:not(.divider):visible a",o);if(a.length){var l=a.index(a.filter(":focus"));38==e.keyCode&&l>0&&l--,40==e.keyCode&&l<a.length-1&&l++,~l||(l=0),a.eq(l).focus()}}}};var r=t.fn.dropdown;t.fn.dropdown=function(e){return this.each(function(){var i=t(this),n=i.data("dropdown");n||i.data("dropdown",n=new o(this)),"string"==typeof e&&n[e].call(i)})},t.fn.dropdown.Constructor=o,t.fn.dropdown.noConflict=function(){return t.fn.dropdown=r,this},t(document).on("click.bs.dropdown.data-api",e).on("click.bs.dropdown.data-api",".dropdown form",function(t){t.stopPropagation()}).on("click.bs.dropdown.data-api",s,o.prototype.toggle).on("keydown.bs.dropdown.data-api",s+", [role=menu]",o.prototype.keydown)}(t),+function(t){"use strict";var e=function(t,e){this.init("popover",t,e)};if(!t.fn.tooltip)throw new Error("Popover requires tooltip.js");e.DEFAULTS=t.extend({},t.fn.tooltip.Constructor.DEFAULTS,{placement:"right",trigger:"click",content:"",template:'<div class="popover"><div class="arrow"></div><h3 class="popover-title"></h3><div class="popover-content"></div></div>'}),e.prototype=t.extend({},t.fn.tooltip.Constructor.prototype),e.prototype.constructor=e,e.prototype.getDefaults=function(){return e.DEFAULTS},e.prototype.setContent=function(){var t=this.tip(),e=this.getTitle(),i=this.getContent();t.find(".popover-title")[this.options.html?"html":"text"](e),t.find(".popover-content")[this.options.html?"html":"text"](i),t.removeClass("fade top bottom left right in"),t.find(".popover-title").html()||t.find(".popover-title").hide()},e.prototype.hasContent=function(){return this.getTitle()||this.getContent()},e.prototype.getContent=function(){var t=this.$element,e=this.options;return t.attr("data-content")||("function"==typeof e.content?e.content.call(t[0]):e.content)},e.prototype.arrow=function(){return this.$arrow=this.$arrow||this.tip().find(".arrow")},e.prototype.tip=function(){return this.$tip||(this.$tip=t(this.options.template)),this.$tip};var i=t.fn.popover;t.fn.popover=function(i){return this.each(function(){var n=t(this),s=n.data("bs.popover"),o="object"==typeof i&&i;s||n.data("bs.popover",s=new e(this,o)),"string"==typeof i&&s[i]()})},t.fn.popover.Constructor=e,t.fn.popover.noConflict=function(){return t.fn.popover=i,this}}(e)}).call(e,i(1),i(1))},,function(t,e,i){(function(t){!function(t){t.fn.extend({complexify:function(e,i){function n(t,e){for(var i=t.length-1;i>=0;i--)if(e[0]<=t.charCodeAt(i)&&t.charCodeAt(i)<=e[1])return e[1]-e[0]+1;return 0}function s(i){if("strict"===e.banMode){for(var n=0;n<e.bannedPasswords.length;n++)if(i.toLowerCase().indexOf(e.bannedPasswords[n].toLowerCase())!==-1)return!0;return!1}return t.inArray(i,e.bannedPasswords)>-1}function o(){var o=t(this).val(),u=0,c=!1;if(s(o))u=1;else for(var h=l.length-1;h>=0;h--)u+=n(o,l[h]);u=Math.log(Math.pow(u,o.length))*(1/e.strengthScaleFactor),c=u>r&&o.length>=e.minimumChars,u=u/a*100,u=u>100?100:u,i.call(this,c,u)}var r=49,a=120,l=[[32,32],[48,57],[65,90],[97,122],[33,47],[58,64],[91,96],[123,126],[128,255],[256,383],[384,591],[592,687],[688,767],[768,879],[880,1023],[1024,1279],[1328,1423],[1424,1535],[1536,1791],[1792,1871],[1920,1983],[2304,2431],[2432,2559],[2560,2687],[2688,2815],[2816,2943],[2944,3071],[3072,3199],[3200,3327],[3328,3455],[3456,3583],[3584,3711],[3712,3839],[3840,4095],[4096,4255],[4256,4351],[4352,4607],[4608,4991],[5024,5119],[5120,5759],[5760,5791],[5792,5887],[6016,6143],[6144,6319],[7680,7935],[7936,8191],[8192,8303],[8304,8351],[8352,8399],[8400,8447],[8448,8527],[8528,8591],[8592,8703],[8704,8959],[8960,9215],[9216,9279],[9280,9311],[9312,9471],[9472,9599],[9600,9631],[9632,9727],[9728,9983],[9984,10175],[10240,10495],[11904,12031],[12032,12255],[12272,12287],[12288,12351],[12352,12447],[12448,12543],[12544,12591],[12592,12687],[12688,12703],[12704,12735],[12800,13055],[13056,13311],[13312,19893],[19968,40959],[40960,42127],[42128,42191],[44032,55203],[55296,56191],[56192,56319],[56320,57343],[57344,63743],[63744,64255],[64256,64335],[64336,65023],[65056,65071],[65072,65103],[65104,65135],[65136,65278],[65279,65279],[65280,65519],[65520,65533]],u={minimumChars:8,strengthScaleFactor:1,bannedPasswords:window.COMPLEXIFY_BANLIST||[],banMode:"strict"};return t.isFunction(e)&&!i&&(i=e,e={}),e=t.extend(u,e),this.each(function(){t(this).val()&&o.apply(this)}),this.each(function(){t(this).bind("keyup focus input propertychange mouseup",o)})}})}(t)}).call(e,i(1))},function(t,e,i){var n,s,o;!function(r,a,l){!function(r){s=[i(1)],n=r,o="function"==typeof n?n.apply(e,s):n,!(o!==l&&(t.exports=o))}(function(t){"use strict";var e,i,n,s,o,u,c,h,d,p,f,g,m,v,y,b,w,_,x,C,S,k,T,E,A,D,N,O,P,R,M,j,I={},H=0;e=function(){return{common:{type:"line",lineColor:"#00f",fillColor:"#cdf",defaultPixelsPerValue:3,width:"auto",height:"auto",composite:!1,tagValuesAttribute:"values",tagOptionsPrefix:"spark",enableTagOptions:!1,enableHighlight:!0,highlightLighten:1.4,tooltipSkipNull:!0,tooltipPrefix:"",tooltipSuffix:"",disableHiddenCheck:!1,numberFormatter:!1,numberDigitGroupCount:3,numberDigitGroupSep:",",numberDecimalMark:".",disableTooltips:!1,disableInteraction:!1},line:{spotColor:"#f80",highlightSpotColor:"#5f5",highlightLineColor:"#f22",spotRadius:1.5,minSpotColor:"#f80",maxSpotColor:"#f80",lineWidth:1,normalRangeMin:l,normalRangeMax:l,normalRangeColor:"#ccc",drawNormalOnTop:!1,chartRangeMin:l,chartRangeMax:l,chartRangeMinX:l,chartRangeMaxX:l,tooltipFormat:new n('<span style="color: {{color}}">●</span> {{prefix}}{{y}}{{suffix}}')},bar:{barColor:"#3366cc",negBarColor:"#f44",stackedBarColor:["#3366cc","#dc3912","#ff9900","#109618","#66aa00","#dd4477","#0099c6","#990099"],zeroColor:l,nullColor:l,zeroAxis:!0,barWidth:4,barSpacing:1,chartRangeMax:l,chartRangeMin:l,chartRangeClip:!1,colorMap:l,tooltipFormat:new n('<span style="color: {{color}}">●</span> {{prefix}}{{value}}{{suffix}}')},tristate:{barWidth:4,barSpacing:1,posBarColor:"#6f6",negBarColor:"#f44",zeroBarColor:"#999",colorMap:{},tooltipFormat:new n('<span style="color: {{color}}">●</span> {{value:map}}'),tooltipValueLookups:{map:{"-1":"Loss",0:"Draw",1:"Win"}}},discrete:{lineHeight:"auto",thresholdColor:l,thresholdValue:0,chartRangeMax:l,chartRangeMin:l,chartRangeClip:!1,tooltipFormat:new n("{{prefix}}{{value}}{{suffix}}")},bullet:{targetColor:"#f33",targetWidth:3,performanceColor:"#33f",rangeColors:["#d3dafe","#a8b6ff","#7f94ff"],base:l,tooltipFormat:new n("{{fieldkey:fields}} - {{value}}"),tooltipValueLookups:{fields:{r:"Range",p:"Performance",t:"Target"}}},pie:{offset:0,sliceColors:["#3366cc","#dc3912","#ff9900","#109618","#66aa00","#dd4477","#0099c6","#990099"],borderWidth:0,borderColor:"#000",tooltipFormat:new n('<span style="color: {{color}}">●</span> {{value}} ({{percent.1}}%)')},box:{raw:!1,boxLineColor:"#000",boxFillColor:"#cdf",whiskerColor:"#000",outlierLineColor:"#333",outlierFillColor:"#fff",medianColor:"#f00",showOutliers:!0,outlierIQR:1.5,spotRadius:1.5,target:l,
|
||
targetColor:"#4a2",chartRangeMax:l,chartRangeMin:l,tooltipFormat:new n("{{field:fields}}: {{value}}"),tooltipFormatFieldlistKey:"field",tooltipValueLookups:{fields:{lq:"Lower Quartile",med:"Median",uq:"Upper Quartile",lo:"Left Outlier",ro:"Right Outlier",lw:"Left Whisker",rw:"Right Whisker"}}}}},D='.jqstooltip { position: absolute;left: 0px;top: 0px;visibility: hidden;background: rgb(0, 0, 0) transparent;background-color: rgba(0,0,0,0.6);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr=#99000000, endColorstr=#99000000);-ms-filter: "progid:DXImageTransform.Microsoft.gradient(startColorstr=#99000000, endColorstr=#99000000)";color: white;font: 10px arial, san serif;text-align: left;white-space: nowrap;padding: 5px;border: 1px solid white;z-index: 10000;}.jqsfield { color: white;font: 10px arial, san serif;text-align: left;}',i=function(){var e,i;return e=function(){this.init.apply(this,arguments)},arguments.length>1?(arguments[0]?(e.prototype=t.extend(new arguments[0],arguments[arguments.length-1]),e._super=arguments[0].prototype):e.prototype=arguments[arguments.length-1],arguments.length>2&&(i=Array.prototype.slice.call(arguments,1,-1),i.unshift(e.prototype),t.extend.apply(t,i))):e.prototype=arguments[0],e.prototype.cls=e,e},t.SPFormatClass=n=i({fre:/\{\{([\w.]+?)(:(.+?))?\}\}/g,precre:/(\w+)\.(\d+)/,init:function(t,e){this.format=t,this.fclass=e},render:function(t,e,i){var n,s,o,r,a,u=this,c=t;return this.format.replace(this.fre,function(){var t;return s=arguments[1],o=arguments[3],n=u.precre.exec(s),n?(a=n[2],s=n[1]):a=!1,r=c[s],r===l?"":o&&e&&e[o]?(t=e[o],t.get?e[o].get(r)||r:e[o][r]||r):(d(r)&&(r=i.get("numberFormatter")?i.get("numberFormatter")(r):v(r,a,i.get("numberDigitGroupCount"),i.get("numberDigitGroupSep"),i.get("numberDecimalMark"))),r)})}}),t.spformat=function(t,e){return new n(t,e)},s=function(t,e,i){return t<e?e:t>i?i:t},o=function(t,e){var i;return 2===e?(i=a.floor(t.length/2),t.length%2?t[i]:(t[i-1]+t[i])/2):t.length%2?(i=(t.length*e+e)/4,i%1?(t[a.floor(i)]+t[a.floor(i)-1])/2:t[i-1]):(i=(t.length*e+2)/4,i%1?(t[a.floor(i)]+t[a.floor(i)-1])/2:t[i-1])},u=function(t){var e;switch(t){case"undefined":t=l;break;case"null":t=null;break;case"true":t=!0;break;case"false":t=!1;break;default:e=parseFloat(t),t==e&&(t=e)}return t},c=function(t){var e,i=[];for(e=t.length;e--;)i[e]=u(t[e]);return i},h=function(t,e){var i,n,s=[];for(i=0,n=t.length;i<n;i++)t[i]!==e&&s.push(t[i]);return s},d=function(t){return!isNaN(parseFloat(t))&&isFinite(t)},v=function(e,i,n,s,o){var r,a;for(e=(i===!1?parseFloat(e).toString():e.toFixed(i)).split(""),r=(r=t.inArray(".",e))<0?e.length:r,r<e.length&&(e[r]=o),a=r-n;a>0;a-=n)e.splice(a,0,s);return e.join("")},p=function(t,e,i){var n;for(n=e.length;n--;)if((!i||null!==e[n])&&e[n]!==t)return!1;return!0},f=function(t){var e,i=0;for(e=t.length;e--;)i+="number"==typeof t[e]?t[e]:0;return i},m=function(e){return t.isArray(e)?e:[e]},g=function(t){var e;r.createStyleSheet?r.createStyleSheet().cssText=t:(e=r.createElement("style"),e.type="text/css",r.getElementsByTagName("head")[0].appendChild(e),e["string"==typeof r.body.style.WebkitAppearance?"innerText":"innerHTML"]=t)},t.fn.simpledraw=function(e,i,n,s){var o,a;if(n&&(o=this.data("_jqs_vcanvas")))return o;if(t.fn.sparkline.canvas===!1)return!1;if(t.fn.sparkline.canvas===l){var u=r.createElement("canvas");if(u.getContext&&u.getContext("2d"))t.fn.sparkline.canvas=function(t,e,i,n){return new R(t,e,i,n)};else{if(!r.namespaces||r.namespaces.v)return t.fn.sparkline.canvas=!1,!1;r.namespaces.add("v","urn:schemas-microsoft-com:vml","#default#VML"),t.fn.sparkline.canvas=function(t,e,i,n){return new M(t,e,i)}}}return e===l&&(e=t(this).innerWidth()),i===l&&(i=t(this).innerHeight()),o=t.fn.sparkline.canvas(e,i,this,s),a=t(this).data("_jqs_mhandler"),a&&a.registerCanvas(o),o},t.fn.cleardraw=function(){var t=this.data("_jqs_vcanvas");t&&t.reset()},t.RangeMapClass=y=i({init:function(t){var e,i,n=[];for(e in t)t.hasOwnProperty(e)&&"string"==typeof e&&e.indexOf(":")>-1&&(i=e.split(":"),i[0]=0===i[0].length?-(1/0):parseFloat(i[0]),i[1]=0===i[1].length?1/0:parseFloat(i[1]),i[2]=t[e],n.push(i));this.map=t,this.rangelist=n||!1},get:function(t){var e,i,n,s=this.rangelist;if((n=this.map[t])!==l)return n;if(s)for(e=s.length;e--;)if(i=s[e],i[0]<=t&&i[1]>=t)return i[2];return l}}),t.range_map=function(t){return new y(t)},b=i({init:function(e,i){var n=t(e);this.$el=n,this.options=i,this.currentPageX=0,this.currentPageY=0,this.el=e,this.splist=[],this.tooltip=null,this.over=!1,this.displayTooltips=!i.get("disableTooltips"),this.highlightEnabled=!i.get("disableHighlight")},registerSparkline:function(t){this.splist.push(t),this.over&&this.updateDisplay()},registerCanvas:function(e){var i=t(e.canvas);this.canvas=e,this.$canvas=i,i.mouseenter(t.proxy(this.mouseenter,this)),i.mouseleave(t.proxy(this.mouseleave,this)),i.click(t.proxy(this.mouseclick,this))},reset:function(t){this.splist=[],this.tooltip&&t&&(this.tooltip.remove(),this.tooltip=l)},mouseclick:function(e){var i=t.Event("sparklineClick");i.originalEvent=e,i.sparklines=this.splist,this.$el.trigger(i)},mouseenter:function(e){t(r.body).unbind("mousemove.jqs"),t(r.body).bind("mousemove.jqs",t.proxy(this.mousemove,this)),this.over=!0,this.currentPageX=e.pageX,this.currentPageY=e.pageY,this.currentEl=e.target,!this.tooltip&&this.displayTooltips&&(this.tooltip=new w(this.options),this.tooltip.updatePosition(e.pageX,e.pageY)),this.updateDisplay()},mouseleave:function(){t(r.body).unbind("mousemove.jqs");var e,i,n=this.splist,s=n.length,o=!1;for(this.over=!1,this.currentEl=null,this.tooltip&&(this.tooltip.remove(),this.tooltip=null),i=0;i<s;i++)e=n[i],e.clearRegionHighlight()&&(o=!0);o&&this.canvas.render()},mousemove:function(t){this.currentPageX=t.pageX,this.currentPageY=t.pageY,this.currentEl=t.target,this.tooltip&&this.tooltip.updatePosition(t.pageX,t.pageY),this.updateDisplay()},updateDisplay:function(){var e,i,n,s,o,r=this.splist,a=r.length,l=!1,u=this.$canvas.offset(),c=this.currentPageX-u.left,h=this.currentPageY-u.top;if(this.over){for(n=0;n<a;n++)i=r[n],s=i.setRegionHighlight(this.currentEl,c,h),s&&(l=!0);if(l){if(o=t.Event("sparklineRegionChange"),o.sparklines=this.splist,this.$el.trigger(o),this.tooltip){for(e="",n=0;n<a;n++)i=r[n],e+=i.getCurrentRegionTooltip();this.tooltip.setContent(e)}this.disableHighlight||this.canvas.render()}null===s&&this.mouseleave()}}}),w=i({sizeStyle:"position: static !important;display: block !important;visibility: hidden !important;float: left !important;",init:function(e){var i,n=e.get("tooltipClassname","jqstooltip"),s=this.sizeStyle;this.container=e.get("tooltipContainer")||r.body,this.tooltipOffsetX=e.get("tooltipOffsetX",10),this.tooltipOffsetY=e.get("tooltipOffsetY",12),t("#jqssizetip").remove(),t("#jqstooltip").remove(),this.sizetip=t("<div/>",{id:"jqssizetip",style:s,class:n}),this.tooltip=t("<div/>",{id:"jqstooltip",class:n}).appendTo(this.container),i=this.tooltip.offset(),this.offsetLeft=i.left,this.offsetTop=i.top,this.hidden=!0,t(window).unbind("resize.jqs scroll.jqs"),t(window).bind("resize.jqs scroll.jqs",t.proxy(this.updateWindowDims,this)),this.updateWindowDims()},updateWindowDims:function(){this.scrollTop=t(window).scrollTop(),this.scrollLeft=t(window).scrollLeft(),this.scrollRight=this.scrollLeft+t(window).width(),this.updatePosition()},getSize:function(t){this.sizetip.html(t).appendTo(this.container),this.width=this.sizetip.width()+1,this.height=this.sizetip.height(),this.sizetip.remove()},setContent:function(t){return t?(this.getSize(t),this.tooltip.html(t).css({width:this.width,height:this.height,visibility:"visible"}),void(this.hidden&&(this.hidden=!1,this.updatePosition()))):(this.tooltip.css("visibility","hidden"),void(this.hidden=!0))},updatePosition:function(t,e){if(t===l){if(this.mousex===l)return;t=this.mousex-this.offsetLeft,e=this.mousey-this.offsetTop}else this.mousex=t-=this.offsetLeft,this.mousey=e-=this.offsetTop;this.height&&this.width&&!this.hidden&&(e-=this.height+this.tooltipOffsetY,t+=this.tooltipOffsetX,e<this.scrollTop&&(e=this.scrollTop),t<this.scrollLeft?t=this.scrollLeft:t+this.width>this.scrollRight&&(t=this.scrollRight-this.width),this.tooltip.css({left:t,top:e}))},remove:function(){this.tooltip.remove(),this.sizetip.remove(),this.sizetip=this.tooltip=l,t(window).unbind("resize.jqs scroll.jqs")}}),N=function(){g(D)},t(N),j=[],t.fn.sparkline=function(e,i){return this.each(function(){var n,s,o=new t.fn.sparkline.options(this,i),a=t(this);if(n=function(){var i,n,s,u,c,h,d;return"html"===e||e===l?(d=this.getAttribute(o.get("tagValuesAttribute")),d!==l&&null!==d||(d=a.html()),i=d.replace(/(^\s*<!--)|(-->\s*$)|\s+/g,"").split(",")):i=e,n="auto"===o.get("width")?i.length*o.get("defaultPixelsPerValue"):o.get("width"),"auto"===o.get("height")?o.get("composite")&&t.data(this,"_jqs_vcanvas")||(u=r.createElement("span"),u.innerHTML="a",a.html(u),s=t(u).innerHeight()||t(u).height(),t(u).remove(),u=null):s=o.get("height"),o.get("disableInteraction")?c=!1:(c=t.data(this,"_jqs_mhandler"),c?o.get("composite")||c.reset():(c=new b(this,o),t.data(this,"_jqs_mhandler",c))),o.get("composite")&&!t.data(this,"_jqs_vcanvas")?void(t.data(this,"_jqs_errnotify")||(alert("Attempted to attach a composite sparkline to an element with no existing sparkline"),t.data(this,"_jqs_errnotify",!0))):(h=new(t.fn.sparkline[o.get("type")])(this,i,o,n,s),h.render(),void(c&&c.registerSparkline(h)))},t(this).html()&&!o.get("disableHiddenCheck")&&t(this).is(":hidden")||!t(this).parents("body").length){if(!o.get("composite")&&t.data(this,"_jqs_pending"))for(s=j.length;s;s--)j[s-1][0]==this&&j.splice(s-1,1);j.push([this,n]),t.data(this,"_jqs_pending",!0)}else n.call(this)})},t.fn.sparkline.defaults=e(),t.sparkline_display_visible=function(){var e,i,n,s=[];for(i=0,n=j.length;i<n;i++)e=j[i][0],t(e).is(":visible")&&!t(e).parents().is(":hidden")?(j[i][1].call(e),t.data(j[i][0],"_jqs_pending",!1),s.push(i)):t(e).closest("html").length||t.data(e,"_jqs_pending")||(t.data(j[i][0],"_jqs_pending",!1),s.push(i));for(i=s.length;i;i--)j.splice(s[i-1],1)},t.fn.sparkline.options=i({init:function(e,i){var n,s,o,r;this.userOptions=i=i||{},this.tag=e,this.tagValCache={},s=t.fn.sparkline.defaults,o=s.common,this.tagOptionsPrefix=i.enableTagOptions&&(i.tagOptionsPrefix||o.tagOptionsPrefix),r=this.getTagSetting("type"),n=r===I?s[i.type||o.type]:s[r],this.mergedOptions=t.extend({},o,n,i)},getTagSetting:function(t){var e,i,n,s,o=this.tagOptionsPrefix;if(o===!1||o===l)return I;if(this.tagValCache.hasOwnProperty(t))e=this.tagValCache.key;else{if(e=this.tag.getAttribute(o+t),e===l||null===e)e=I;else if("["===e.substr(0,1))for(e=e.substr(1,e.length-2).split(","),i=e.length;i--;)e[i]=u(e[i].replace(/(^\s*)|(\s*$)/g,""));else if("{"===e.substr(0,1))for(n=e.substr(1,e.length-2).split(","),e={},i=n.length;i--;)s=n[i].split(":",2),e[s[0].replace(/(^\s*)|(\s*$)/g,"")]=u(s[1].replace(/(^\s*)|(\s*$)/g,""));else e=u(e);this.tagValCache.key=e}return e},get:function(t,e){var i,n=this.getTagSetting(t);return n!==I?n:(i=this.mergedOptions[t])===l?e:i}}),t.fn.sparkline._base=i({disabled:!1,init:function(e,i,n,s,o){this.el=e,this.$el=t(e),this.values=i,this.options=n,this.width=s,this.height=o,this.currentRegion=l},initTarget:function(){var t=!this.options.get("disableInteraction");(this.target=this.$el.simpledraw(this.width,this.height,this.options.get("composite"),t))?(this.canvasWidth=this.target.pixelWidth,this.canvasHeight=this.target.pixelHeight):this.disabled=!0},render:function(){return!this.disabled||(this.el.innerHTML="",!1)},getRegion:function(t,e){},setRegionHighlight:function(t,e,i){var n,s=this.currentRegion,o=!this.options.get("disableHighlight");return e>this.canvasWidth||i>this.canvasHeight||e<0||i<0?null:(n=this.getRegion(t,e,i),s!==n&&(s!==l&&o&&this.removeHighlight(),this.currentRegion=n,n!==l&&o&&this.renderHighlight(),!0))},clearRegionHighlight:function(){return this.currentRegion!==l&&(this.removeHighlight(),this.currentRegion=l,!0)},renderHighlight:function(){this.changeHighlight(!0)},removeHighlight:function(){this.changeHighlight(!1)},changeHighlight:function(t){},getCurrentRegionTooltip:function(){var e,i,s,o,r,a,u,c,h,d,p,f,g,m,v=this.options,y="",b=[];if(this.currentRegion===l)return"";if(e=this.getCurrentRegionFields(),p=v.get("tooltipFormatter"))return p(this,v,e);if(v.get("tooltipChartTitle")&&(y+='<div class="jqs jqstitle">'+v.get("tooltipChartTitle")+"</div>\n"),i=this.options.get("tooltipFormat"),!i)return"";if(t.isArray(i)||(i=[i]),t.isArray(e)||(e=[e]),u=this.options.get("tooltipFormatFieldlist"),c=this.options.get("tooltipFormatFieldlistKey"),u&&c){for(h=[],a=e.length;a--;)d=e[a][c],(m=t.inArray(d,u))!=-1&&(h[m]=e[a]);e=h}for(s=i.length,g=e.length,a=0;a<s;a++)for(f=i[a],"string"==typeof f&&(f=new n(f)),o=f.fclass||"jqsfield",m=0;m<g;m++)e[m].isNull&&v.get("tooltipSkipNull")||(t.extend(e[m],{prefix:v.get("tooltipPrefix"),suffix:v.get("tooltipSuffix")}),r=f.render(e[m],v.get("tooltipValueLookups"),v),b.push('<div class="'+o+'">'+r+"</div>"));return b.length?y+b.join("\n"):""},getCurrentRegionFields:function(){},calcHighlightColor:function(t,e){var i,n,o,r,l=e.get("highlightColor"),u=e.get("highlightLighten");if(l)return l;if(u&&(i=/^#([0-9a-f])([0-9a-f])([0-9a-f])$/i.exec(t)||/^#([0-9a-f]{2})([0-9a-f]{2})([0-9a-f]{2})$/i.exec(t))){for(o=[],n=4===t.length?16:1,r=0;r<3;r++)o[r]=s(a.round(parseInt(i[r+1],16)*n*u),0,255);return"rgb("+o.join(",")+")"}return t}}),_={changeHighlight:function(e){var i,n=this.currentRegion,s=this.target,o=this.regionShapes[n];o&&(i=this.renderRegion(n,e),t.isArray(i)||t.isArray(o)?(s.replaceWithShapes(o,i),this.regionShapes[n]=t.map(i,function(t){return t.id})):(s.replaceWithShape(o,i),this.regionShapes[n]=i.id))},render:function(){var e,i,n,s,o=this.values,r=this.target,a=this.regionShapes;if(this.cls._super.render.call(this)){for(n=o.length;n--;)if(e=this.renderRegion(n))if(t.isArray(e)){for(i=[],s=e.length;s--;)e[s].append(),i.push(e[s].id);a[n]=i}else e.append(),a[n]=e.id;else a[n]=null;r.render()}}},t.fn.sparkline.line=x=i(t.fn.sparkline._base,{type:"line",init:function(t,e,i,n,s){x._super.init.call(this,t,e,i,n,s),this.vertices=[],this.regionMap=[],this.xvalues=[],this.yvalues=[],this.yminmax=[],this.hightlightSpotId=null,this.lastShapeId=null,this.initTarget()},getRegion:function(t,e,i){var n,s=this.regionMap;for(n=s.length;n--;)if(null!==s[n]&&e>=s[n][0]&&e<=s[n][1])return s[n][2];return l},getCurrentRegionFields:function(){var t=this.currentRegion;return{isNull:null===this.yvalues[t],x:this.xvalues[t],y:this.yvalues[t],color:this.options.get("lineColor"),fillColor:this.options.get("fillColor"),offset:t}},renderHighlight:function(){var t,e,i=this.currentRegion,n=this.target,s=this.vertices[i],o=this.options,r=o.get("spotRadius"),a=o.get("highlightSpotColor"),u=o.get("highlightLineColor");s&&(r&&a&&(t=n.drawCircle(s[0],s[1],r,l,a),this.highlightSpotId=t.id,n.insertAfterShape(this.lastShapeId,t)),u&&(e=n.drawLine(s[0],this.canvasTop,s[0],this.canvasTop+this.canvasHeight,u),this.highlightLineId=e.id,n.insertAfterShape(this.lastShapeId,e)))},removeHighlight:function(){var t=this.target;this.highlightSpotId&&(t.removeShapeId(this.highlightSpotId),this.highlightSpotId=null),this.highlightLineId&&(t.removeShapeId(this.highlightLineId),this.highlightLineId=null)},scanValues:function(){var t,e,i,n,s,o=this.values,r=o.length,l=this.xvalues,u=this.yvalues,c=this.yminmax;for(t=0;t<r;t++)e=o[t],i="string"==typeof o[t],n="object"==typeof o[t]&&o[t]instanceof Array,s=i&&o[t].split(":"),i&&2===s.length?(l.push(Number(s[0])),u.push(Number(s[1])),c.push(Number(s[1]))):n?(l.push(e[0]),u.push(e[1]),c.push(e[1])):(l.push(t),null===o[t]||"null"===o[t]?u.push(null):(u.push(Number(e)),c.push(Number(e))));this.options.get("xvalues")&&(l=this.options.get("xvalues")),this.maxy=this.maxyorg=a.max.apply(a,c),this.miny=this.minyorg=a.min.apply(a,c),this.maxx=a.max.apply(a,l),this.minx=a.min.apply(a,l),this.xvalues=l,this.yvalues=u,this.yminmax=c},processRangeOptions:function(){var t=this.options,e=t.get("normalRangeMin"),i=t.get("normalRangeMax");e!==l&&(e<this.miny&&(this.miny=e),i>this.maxy&&(this.maxy=i)),t.get("chartRangeMin")!==l&&(t.get("chartRangeClip")||t.get("chartRangeMin")<this.miny)&&(this.miny=t.get("chartRangeMin")),t.get("chartRangeMax")!==l&&(t.get("chartRangeClip")||t.get("chartRangeMax")>this.maxy)&&(this.maxy=t.get("chartRangeMax")),t.get("chartRangeMinX")!==l&&(t.get("chartRangeClipX")||t.get("chartRangeMinX")<this.minx)&&(this.minx=t.get("chartRangeMinX")),t.get("chartRangeMaxX")!==l&&(t.get("chartRangeClipX")||t.get("chartRangeMaxX")>this.maxx)&&(this.maxx=t.get("chartRangeMaxX"))},drawNormalRange:function(t,e,i,n,s){var o=this.options.get("normalRangeMin"),r=this.options.get("normalRangeMax"),u=e+a.round(i-i*((r-this.miny)/s)),c=a.round(i*(r-o)/s);this.target.drawRect(t,u,n,c,l,this.options.get("normalRangeColor")).append()},render:function(){var e,i,n,s,o,r,u,c,h,d,p,f,g,m,v,b,w,_,C,S,k,T,E,A,D,N=this.options,O=this.target,P=this.canvasWidth,R=this.canvasHeight,M=this.vertices,j=N.get("spotRadius"),I=this.regionMap;if(x._super.render.call(this)&&(this.scanValues(),this.processRangeOptions(),E=this.xvalues,A=this.yvalues,this.yminmax.length&&!(this.yvalues.length<2))){for(s=o=0,e=this.maxx-this.minx===0?1:this.maxx-this.minx,i=this.maxy-this.miny===0?1:this.maxy-this.miny,n=this.yvalues.length-1,j&&(P<4*j||R<4*j)&&(j=0),j&&(k=N.get("highlightSpotColor")&&!N.get("disableInteraction"),(k||N.get("minSpotColor")||N.get("spotColor")&&A[n]===this.miny)&&(R-=a.ceil(j)),(k||N.get("maxSpotColor")||N.get("spotColor")&&A[n]===this.maxy)&&(R-=a.ceil(j),s+=a.ceil(j)),(k||(N.get("minSpotColor")||N.get("maxSpotColor"))&&(A[0]===this.miny||A[0]===this.maxy))&&(o+=a.ceil(j),P-=a.ceil(j)),(k||N.get("spotColor")||N.get("minSpotColor")||N.get("maxSpotColor")&&(A[n]===this.miny||A[n]===this.maxy))&&(P-=a.ceil(j))),R--,N.get("normalRangeMin")===l||N.get("drawNormalOnTop")||this.drawNormalRange(o,s,R,P,i),u=[],c=[u],m=v=null,b=A.length,D=0;D<b;D++)h=E[D],p=E[D+1],d=A[D],f=o+a.round((h-this.minx)*(P/e)),g=D<b-1?o+a.round((p-this.minx)*(P/e)):P,v=f+(g-f)/2,I[D]=[m||0,v,D],m=v,null===d?D&&(null!==A[D-1]&&(u=[],c.push(u)),M.push(null)):(d<this.miny&&(d=this.miny),d>this.maxy&&(d=this.maxy),u.length||u.push([f,s+R]),r=[f,s+a.round(R-R*((d-this.miny)/i))],u.push(r),M.push(r));for(w=[],_=[],C=c.length,D=0;D<C;D++)u=c[D],u.length&&(N.get("fillColor")&&(u.push([u[u.length-1][0],s+R]),_.push(u.slice(0)),u.pop()),u.length>2&&(u[0]=[u[0][0],u[1][1]]),w.push(u));for(C=_.length,D=0;D<C;D++)O.drawShape(_[D],N.get("fillColor"),N.get("fillColor")).append();for(N.get("normalRangeMin")!==l&&N.get("drawNormalOnTop")&&this.drawNormalRange(o,s,R,P,i),C=w.length,D=0;D<C;D++)O.drawShape(w[D],N.get("lineColor"),l,N.get("lineWidth")).append();if(j&&N.get("valueSpots"))for(S=N.get("valueSpots"),S.get===l&&(S=new y(S)),D=0;D<b;D++)T=S.get(A[D]),T&&O.drawCircle(o+a.round((E[D]-this.minx)*(P/e)),s+a.round(R-R*((A[D]-this.miny)/i)),j,l,T).append();j&&N.get("spotColor")&&null!==A[n]&&O.drawCircle(o+a.round((E[E.length-1]-this.minx)*(P/e)),s+a.round(R-R*((A[n]-this.miny)/i)),j,l,N.get("spotColor")).append(),this.maxy!==this.minyorg&&(j&&N.get("minSpotColor")&&(h=E[t.inArray(this.minyorg,A)],O.drawCircle(o+a.round((h-this.minx)*(P/e)),s+a.round(R-R*((this.minyorg-this.miny)/i)),j,l,N.get("minSpotColor")).append()),j&&N.get("maxSpotColor")&&(h=E[t.inArray(this.maxyorg,A)],O.drawCircle(o+a.round((h-this.minx)*(P/e)),s+a.round(R-R*((this.maxyorg-this.miny)/i)),j,l,N.get("maxSpotColor")).append())),this.lastShapeId=O.getLastShapeId(),this.canvasTop=s,O.render()}}}),t.fn.sparkline.bar=C=i(t.fn.sparkline._base,_,{type:"bar",init:function(e,i,n,o,r){var d,p,f,g,m,v,b,w,_,x,S,k,T,E,A,D,N,O,P,R,M,j,I=parseInt(n.get("barWidth"),10),H=parseInt(n.get("barSpacing"),10),L=n.get("chartRangeMin"),$=n.get("chartRangeMax"),F=n.get("chartRangeClip"),q=1/0,W=-(1/0);for(C._super.init.call(this,e,i,n,o,r),v=0,b=i.length;v<b;v++)R=i[v],d="string"==typeof R&&R.indexOf(":")>-1,(d||t.isArray(R))&&(A=!0,d&&(R=i[v]=c(R.split(":"))),R=h(R,null),p=a.min.apply(a,R),f=a.max.apply(a,R),p<q&&(q=p),f>W&&(W=f));this.stacked=A,this.regionShapes={},this.barWidth=I,this.barSpacing=H,this.totalBarWidth=I+H,this.width=o=i.length*I+(i.length-1)*H,this.initTarget(),F&&(T=L===l?-(1/0):L,E=$===l?1/0:$),m=[],g=A?[]:m;var z=[],B=[];for(v=0,b=i.length;v<b;v++)if(A)for(D=i[v],i[v]=P=[],z[v]=0,g[v]=B[v]=0,N=0,O=D.length;N<O;N++)R=P[N]=F?s(D[N],T,E):D[N],null!==R&&(R>0&&(z[v]+=R),q<0&&W>0?R<0?B[v]+=a.abs(R):g[v]+=R:g[v]+=a.abs(R-(R<0?W:q)),m.push(R));else R=F?s(i[v],T,E):i[v],R=i[v]=u(R),null!==R&&m.push(R);this.max=k=a.max.apply(a,m),this.min=S=a.min.apply(a,m),this.stackMax=W=A?a.max.apply(a,z):k,this.stackMin=q=A?a.min.apply(a,m):S,n.get("chartRangeMin")!==l&&(n.get("chartRangeClip")||n.get("chartRangeMin")<S)&&(S=n.get("chartRangeMin")),n.get("chartRangeMax")!==l&&(n.get("chartRangeClip")||n.get("chartRangeMax")>k)&&(k=n.get("chartRangeMax")),this.zeroAxis=_=n.get("zeroAxis",!0),x=S<=0&&k>=0&&_?0:0==_?S:S>0?S:k,this.xaxisOffset=x,w=A?a.max.apply(a,g)+a.max.apply(a,B):k-S,this.canvasHeightEf=_&&S<0?this.canvasHeight-2:this.canvasHeight-1,S<x?(j=A&&k>=0?W:k,M=(j-x)/w*this.canvasHeight,M!==a.ceil(M)&&(this.canvasHeightEf-=2,M=a.ceil(M))):M=this.canvasHeight,this.yoffset=M,t.isArray(n.get("colorMap"))?(this.colorMapByIndex=n.get("colorMap"),this.colorMapByValue=null):(this.colorMapByIndex=null,this.colorMapByValue=n.get("colorMap"),this.colorMapByValue&&this.colorMapByValue.get===l&&(this.colorMapByValue=new y(this.colorMapByValue))),this.range=w},getRegion:function(t,e,i){var n=a.floor(e/this.totalBarWidth);return n<0||n>=this.values.length?l:n},getCurrentRegionFields:function(){var t,e,i=this.currentRegion,n=m(this.values[i]),s=[];for(e=n.length;e--;)t=n[e],s.push({isNull:null===t,value:t,color:this.calcColor(e,t,i),offset:i});return s},calcColor:function(e,i,n){var s,o,r=this.colorMapByIndex,a=this.colorMapByValue,u=this.options;return s=this.stacked?u.get("stackedBarColor"):i<0?u.get("negBarColor"):u.get("barColor"),0===i&&u.get("zeroColor")!==l&&(s=u.get("zeroColor")),a&&(o=a.get(i))?s=o:r&&r.length>n&&(s=r[n]),t.isArray(s)?s[e%s.length]:s},renderRegion:function(e,i){var n,s,o,r,u,c,h,d,f,g,m=this.values[e],v=this.options,y=this.xaxisOffset,b=[],w=this.range,_=this.stacked,x=this.target,C=e*this.totalBarWidth,S=this.canvasHeightEf,k=this.yoffset;if(m=t.isArray(m)?m:[m],h=m.length,d=m[0],r=p(null,m),g=p(y,m,!0),r)return v.get("nullColor")?(o=i?v.get("nullColor"):this.calcHighlightColor(v.get("nullColor"),v),n=k>0?k-1:k,x.drawRect(C,n,this.barWidth-1,0,o,o)):l;for(u=k,c=0;c<h;c++){if(d=m[c],_&&d===y){if(!g||f)continue;f=!0}s=w>0?a.floor(S*(a.abs(d-y)/w))+1:1,d<y||d===y&&0===k?(n=u,u+=s):(n=k-s,k-=s),o=this.calcColor(c,d,e),i&&(o=this.calcHighlightColor(o,v)),b.push(x.drawRect(C,n,this.barWidth-1,s-1,o,o))}return 1===b.length?b[0]:b}}),t.fn.sparkline.tristate=S=i(t.fn.sparkline._base,_,{type:"tristate",init:function(e,i,n,s,o){var r=parseInt(n.get("barWidth"),10),a=parseInt(n.get("barSpacing"),10);S._super.init.call(this,e,i,n,s,o),this.regionShapes={},this.barWidth=r,this.barSpacing=a,this.totalBarWidth=r+a,this.values=t.map(i,Number),this.width=s=i.length*r+(i.length-1)*a,t.isArray(n.get("colorMap"))?(this.colorMapByIndex=n.get("colorMap"),this.colorMapByValue=null):(this.colorMapByIndex=null,this.colorMapByValue=n.get("colorMap"),this.colorMapByValue&&this.colorMapByValue.get===l&&(this.colorMapByValue=new y(this.colorMapByValue))),this.initTarget()},getRegion:function(t,e,i){return a.floor(e/this.totalBarWidth)},getCurrentRegionFields:function(){var t=this.currentRegion;return{isNull:this.values[t]===l,value:this.values[t],color:this.calcColor(this.values[t],t),offset:t}},calcColor:function(t,e){var i,n,s=this.values,o=this.options,r=this.colorMapByIndex,a=this.colorMapByValue;return i=a&&(n=a.get(t))?n:r&&r.length>e?r[e]:s[e]<0?o.get("negBarColor"):s[e]>0?o.get("posBarColor"):o.get("zeroBarColor")},renderRegion:function(t,e){var i,n,s,o,r,l,u=this.values,c=this.options,h=this.target;if(i=h.pixelHeight,s=a.round(i/2),o=t*this.totalBarWidth,u[t]<0?(r=s,n=s-1):u[t]>0?(r=0,n=s-1):(r=s-1,n=2),l=this.calcColor(u[t],t),null!==l)return e&&(l=this.calcHighlightColor(l,c)),h.drawRect(o,r,this.barWidth-1,n-1,l,l)}}),t.fn.sparkline.discrete=k=i(t.fn.sparkline._base,_,{type:"discrete",init:function(e,i,n,s,o){k._super.init.call(this,e,i,n,s,o),this.regionShapes={},this.values=i=t.map(i,Number),this.min=a.min.apply(a,i),this.max=a.max.apply(a,i),this.range=this.max-this.min,this.width=s="auto"===n.get("width")?2*i.length:this.width,this.interval=a.floor(s/i.length),this.itemWidth=s/i.length,n.get("chartRangeMin")!==l&&(n.get("chartRangeClip")||n.get("chartRangeMin")<this.min)&&(this.min=n.get("chartRangeMin")),n.get("chartRangeMax")!==l&&(n.get("chartRangeClip")||n.get("chartRangeMax")>this.max)&&(this.max=n.get("chartRangeMax")),this.initTarget(),this.target&&(this.lineHeight="auto"===n.get("lineHeight")?a.round(.3*this.canvasHeight):n.get("lineHeight"))},getRegion:function(t,e,i){return a.floor(e/this.itemWidth)},getCurrentRegionFields:function(){var t=this.currentRegion;return{isNull:this.values[t]===l,value:this.values[t],offset:t}},renderRegion:function(t,e){var i,n,o,r,l=this.values,u=this.options,c=this.min,h=this.max,d=this.range,p=this.interval,f=this.target,g=this.canvasHeight,m=this.lineHeight,v=g-m;return n=s(l[t],c,h),r=t*p,i=a.round(v-v*((n-c)/d)),o=u.get("thresholdColor")&&n<u.get("thresholdValue")?u.get("thresholdColor"):u.get("lineColor"),e&&(o=this.calcHighlightColor(o,u)),f.drawLine(r,i,r,i+m,o)}}),t.fn.sparkline.bullet=T=i(t.fn.sparkline._base,{type:"bullet",init:function(t,e,i,n,s){var o,r,u;T._super.init.call(this,t,e,i,n,s),this.values=e=c(e),u=e.slice(),u[0]=null===u[0]?u[2]:u[0],u[1]=null===e[1]?u[2]:u[1],o=a.min.apply(a,e),r=a.max.apply(a,e),o=i.get("base")===l?o<0?o:0:i.get("base"),this.min=o,this.max=r,this.range=r-o,this.shapes={},this.valueShapes={},this.regiondata={},this.width=n="auto"===i.get("width")?"4.0em":n,this.target=this.$el.simpledraw(n,s,i.get("composite")),e.length||(this.disabled=!0),this.initTarget()},getRegion:function(t,e,i){var n=this.target.getShapeAt(t,e,i);return n!==l&&this.shapes[n]!==l?this.shapes[n]:l},getCurrentRegionFields:function(){var t=this.currentRegion;return{fieldkey:t.substr(0,1),value:this.values[t.substr(1)],region:t}},changeHighlight:function(t){var e,i=this.currentRegion,n=this.valueShapes[i];switch(delete this.shapes[n],i.substr(0,1)){case"r":e=this.renderRange(i.substr(1),t);break;case"p":e=this.renderPerformance(t);break;case"t":e=this.renderTarget(t)}this.valueShapes[i]=e.id,this.shapes[e.id]=i,this.target.replaceWithShape(n,e)},renderRange:function(t,e){var i=this.values[t],n=a.round(this.canvasWidth*((i-this.min)/this.range)),s=this.options.get("rangeColors")[t-2];return e&&(s=this.calcHighlightColor(s,this.options)),this.target.drawRect(0,0,n-1,this.canvasHeight-1,s,s)},renderPerformance:function(t){var e=this.values[1],i=a.round(this.canvasWidth*((e-this.min)/this.range)),n=this.options.get("performanceColor");return t&&(n=this.calcHighlightColor(n,this.options)),this.target.drawRect(0,a.round(.3*this.canvasHeight),i-1,a.round(.4*this.canvasHeight)-1,n,n)},renderTarget:function(t){var e=this.values[0],i=a.round(this.canvasWidth*((e-this.min)/this.range)-this.options.get("targetWidth")/2),n=a.round(.1*this.canvasHeight),s=this.canvasHeight-2*n,o=this.options.get("targetColor");return t&&(o=this.calcHighlightColor(o,this.options)),this.target.drawRect(i,n,this.options.get("targetWidth")-1,s-1,o,o)},render:function(){var t,e,i=this.values.length,n=this.target;if(T._super.render.call(this)){for(t=2;t<i;t++)e=this.renderRange(t).append(),this.shapes[e.id]="r"+t,this.valueShapes["r"+t]=e.id;null!==this.values[1]&&(e=this.renderPerformance().append(),this.shapes[e.id]="p1",this.valueShapes.p1=e.id),null!==this.values[0]&&(e=this.renderTarget().append(),this.shapes[e.id]="t0",this.valueShapes.t0=e.id),n.render()}}}),t.fn.sparkline.pie=E=i(t.fn.sparkline._base,{type:"pie",init:function(e,i,n,s,o){var r,l=0;if(E._super.init.call(this,e,i,n,s,o),this.shapes={},this.valueShapes={},this.values=i=t.map(i,Number),"auto"===n.get("width")&&(this.width=this.height),i.length>0)for(r=i.length;r--;)l+=i[r];this.total=l,this.initTarget(),this.radius=a.floor(a.min(this.canvasWidth,this.canvasHeight)/2)},getRegion:function(t,e,i){var n=this.target.getShapeAt(t,e,i);return n!==l&&this.shapes[n]!==l?this.shapes[n]:l},getCurrentRegionFields:function(){var t=this.currentRegion;return{isNull:this.values[t]===l,value:this.values[t],percent:this.values[t]/this.total*100,color:this.options.get("sliceColors")[t%this.options.get("sliceColors").length],offset:t}},changeHighlight:function(t){var e=this.currentRegion,i=this.renderSlice(e,t),n=this.valueShapes[e];delete this.shapes[n],this.target.replaceWithShape(n,i),this.valueShapes[e]=i.id,this.shapes[i.id]=e},renderSlice:function(t,e){var i,n,s,o,r,u=this.target,c=this.options,h=this.radius,d=c.get("borderWidth"),p=c.get("offset"),f=2*a.PI,g=this.values,m=this.total,v=p?2*a.PI*(p/360):0;for(o=g.length,s=0;s<o;s++){if(i=v,n=v,m>0&&(n=v+f*(g[s]/m)),t===s)return r=c.get("sliceColors")[s%c.get("sliceColors").length],e&&(r=this.calcHighlightColor(r,c)),u.drawPieSlice(h,h,h-d,i,n,l,r);v=n}},render:function(){var t,e,i=this.target,n=this.values,s=this.options,o=this.radius,r=s.get("borderWidth");if(E._super.render.call(this)){for(r&&i.drawCircle(o,o,a.floor(o-r/2),s.get("borderColor"),l,r).append(),e=n.length;e--;)n[e]&&(t=this.renderSlice(e).append(),this.valueShapes[e]=t.id,this.shapes[t.id]=e);i.render()}}}),t.fn.sparkline.box=A=i(t.fn.sparkline._base,{type:"box",init:function(e,i,n,s,o){A._super.init.call(this,e,i,n,s,o),this.values=t.map(i,Number),this.width="auto"===n.get("width")?"4.0em":s,this.initTarget(),this.values.length||(this.disabled=1)},getRegion:function(){return 1},getCurrentRegionFields:function(){var t=[{field:"lq",value:this.quartiles[0]},{field:"med",value:this.quartiles[1]},{field:"uq",value:this.quartiles[2]}];return this.loutlier!==l&&t.push({field:"lo",value:this.loutlier}),this.routlier!==l&&t.push({field:"ro",value:this.routlier}),this.lwhisker!==l&&t.push({field:"lw",value:this.lwhisker}),this.rwhisker!==l&&t.push({field:"rw",value:this.rwhisker}),t},render:function(){var t,e,i,n,s,r,u,c,h,d,p,f=this.target,g=this.values,m=g.length,v=this.options,y=this.canvasWidth,b=this.canvasHeight,w=v.get("chartRangeMin")===l?a.min.apply(a,g):v.get("chartRangeMin"),_=v.get("chartRangeMax")===l?a.max.apply(a,g):v.get("chartRangeMax"),x=0;if(A._super.render.call(this)){if(v.get("raw"))v.get("showOutliers")&&g.length>5?(e=g[0],t=g[1],n=g[2],s=g[3],r=g[4],u=g[5],c=g[6]):(t=g[0],n=g[1],s=g[2],r=g[3],u=g[4]);else if(g.sort(function(t,e){return t-e}),n=o(g,1),s=o(g,2),r=o(g,3),i=r-n,v.get("showOutliers")){for(t=u=l,h=0;h<m;h++)t===l&&g[h]>n-i*v.get("outlierIQR")&&(t=g[h]),g[h]<r+i*v.get("outlierIQR")&&(u=g[h]);e=g[0],c=g[m-1]}else t=g[0],u=g[m-1];this.quartiles=[n,s,r],this.lwhisker=t,this.rwhisker=u,this.loutlier=e,this.routlier=c,p=y/(_-w+1),v.get("showOutliers")&&(x=a.ceil(v.get("spotRadius")),y-=2*a.ceil(v.get("spotRadius")),p=y/(_-w+1),e<t&&f.drawCircle((e-w)*p+x,b/2,v.get("spotRadius"),v.get("outlierLineColor"),v.get("outlierFillColor")).append(),c>u&&f.drawCircle((c-w)*p+x,b/2,v.get("spotRadius"),v.get("outlierLineColor"),v.get("outlierFillColor")).append()),f.drawRect(a.round((n-w)*p+x),a.round(.1*b),a.round((r-n)*p),a.round(.8*b),v.get("boxLineColor"),v.get("boxFillColor")).append(),f.drawLine(a.round((t-w)*p+x),a.round(b/2),a.round((n-w)*p+x),a.round(b/2),v.get("lineColor")).append(),f.drawLine(a.round((t-w)*p+x),a.round(b/4),a.round((t-w)*p+x),a.round(b-b/4),v.get("whiskerColor")).append(),f.drawLine(a.round((u-w)*p+x),a.round(b/2),a.round((r-w)*p+x),a.round(b/2),v.get("lineColor")).append(),f.drawLine(a.round((u-w)*p+x),a.round(b/4),a.round((u-w)*p+x),a.round(b-b/4),v.get("whiskerColor")).append(),
|
||
f.drawLine(a.round((s-w)*p+x),a.round(.1*b),a.round((s-w)*p+x),a.round(.9*b),v.get("medianColor")).append(),v.get("target")&&(d=a.ceil(v.get("spotRadius")),f.drawLine(a.round((v.get("target")-w)*p+x),a.round(b/2-d),a.round((v.get("target")-w)*p+x),a.round(b/2+d),v.get("targetColor")).append(),f.drawLine(a.round((v.get("target")-w)*p+x-d),a.round(b/2),a.round((v.get("target")-w)*p+x+d),a.round(b/2),v.get("targetColor")).append()),f.render()}}}),O=i({init:function(t,e,i,n){this.target=t,this.id=e,this.type=i,this.args=n},append:function(){return this.target.appendShape(this),this}}),P=i({_pxregex:/(\d+)(px)?\s*$/i,init:function(e,i,n){e&&(this.width=e,this.height=i,this.target=n,this.lastShapeId=null,n[0]&&(n=n[0]),t.data(n,"_jqs_vcanvas",this))},drawLine:function(t,e,i,n,s,o){return this.drawShape([[t,e],[i,n]],s,o)},drawShape:function(t,e,i,n){return this._genShape("Shape",[t,e,i,n])},drawCircle:function(t,e,i,n,s,o){return this._genShape("Circle",[t,e,i,n,s,o])},drawPieSlice:function(t,e,i,n,s,o,r){return this._genShape("PieSlice",[t,e,i,n,s,o,r])},drawRect:function(t,e,i,n,s,o){return this._genShape("Rect",[t,e,i,n,s,o])},getElement:function(){return this.canvas},getLastShapeId:function(){return this.lastShapeId},reset:function(){alert("reset not implemented")},_insert:function(e,i){t(i).html(e)},_calculatePixelDims:function(e,i,n){var s;s=this._pxregex.exec(i),s?this.pixelHeight=s[1]:this.pixelHeight=t(n).height(),s=this._pxregex.exec(e),s?this.pixelWidth=s[1]:this.pixelWidth=t(n).width()},_genShape:function(t,e){var i=H++;return e.unshift(i),new O(this,i,t,e)},appendShape:function(t){alert("appendShape not implemented")},replaceWithShape:function(t,e){alert("replaceWithShape not implemented")},insertAfterShape:function(t,e){alert("insertAfterShape not implemented")},removeShapeId:function(t){alert("removeShapeId not implemented")},getShapeAt:function(t,e,i){alert("getShapeAt not implemented")},render:function(){alert("render not implemented")}}),R=i(P,{init:function(e,i,n,s){R._super.init.call(this,e,i,n),this.canvas=r.createElement("canvas"),n[0]&&(n=n[0]),t.data(n,"_jqs_vcanvas",this),t(this.canvas).css({display:"inline-block",width:e,height:i,verticalAlign:"top"}),this._insert(this.canvas,n),this._calculatePixelDims(e,i,this.canvas),this.canvas.width=this.pixelWidth,this.canvas.height=this.pixelHeight,this.interact=s,this.shapes={},this.shapeseq=[],this.currentTargetShapeId=l,t(this.canvas).css({width:this.pixelWidth,height:this.pixelHeight})},_getContext:function(t,e,i){var n=this.canvas.getContext("2d");return t!==l&&(n.strokeStyle=t),n.lineWidth=i===l?1:i,e!==l&&(n.fillStyle=e),n},reset:function(){var t=this._getContext();t.clearRect(0,0,this.pixelWidth,this.pixelHeight),this.shapes={},this.shapeseq=[],this.currentTargetShapeId=l},_drawShape:function(t,e,i,n,s){var o,r,a=this._getContext(i,n,s);for(a.beginPath(),a.moveTo(e[0][0]+.5,e[0][1]+.5),o=1,r=e.length;o<r;o++)a.lineTo(e[o][0]+.5,e[o][1]+.5);i!==l&&a.stroke(),n!==l&&a.fill(),this.targetX!==l&&this.targetY!==l&&a.isPointInPath(this.targetX,this.targetY)&&(this.currentTargetShapeId=t)},_drawCircle:function(t,e,i,n,s,o,r){var u=this._getContext(s,o,r);u.beginPath(),u.arc(e,i,n,0,2*a.PI,!1),this.targetX!==l&&this.targetY!==l&&u.isPointInPath(this.targetX,this.targetY)&&(this.currentTargetShapeId=t),s!==l&&u.stroke(),o!==l&&u.fill()},_drawPieSlice:function(t,e,i,n,s,o,r,a){var u=this._getContext(r,a);u.beginPath(),u.moveTo(e,i),u.arc(e,i,n,s,o,!1),u.lineTo(e,i),u.closePath(),r!==l&&u.stroke(),a&&u.fill(),this.targetX!==l&&this.targetY!==l&&u.isPointInPath(this.targetX,this.targetY)&&(this.currentTargetShapeId=t)},_drawRect:function(t,e,i,n,s,o,r){return this._drawShape(t,[[e,i],[e+n,i],[e+n,i+s],[e,i+s],[e,i]],o,r)},appendShape:function(t){return this.shapes[t.id]=t,this.shapeseq.push(t.id),this.lastShapeId=t.id,t.id},replaceWithShape:function(t,e){var i,n=this.shapeseq;for(this.shapes[e.id]=e,i=n.length;i--;)n[i]==t&&(n[i]=e.id);delete this.shapes[t]},replaceWithShapes:function(t,e){var i,n,s,o=this.shapeseq,r={};for(n=t.length;n--;)r[t[n]]=!0;for(n=o.length;n--;)i=o[n],r[i]&&(o.splice(n,1),delete this.shapes[i],s=n);for(n=e.length;n--;)o.splice(s,0,e[n].id),this.shapes[e[n].id]=e[n]},insertAfterShape:function(t,e){var i,n=this.shapeseq;for(i=n.length;i--;)if(n[i]===t)return n.splice(i+1,0,e.id),void(this.shapes[e.id]=e)},removeShapeId:function(t){var e,i=this.shapeseq;for(e=i.length;e--;)if(i[e]===t){i.splice(e,1);break}delete this.shapes[t]},getShapeAt:function(t,e,i){return this.targetX=e,this.targetY=i,this.render(),this.currentTargetShapeId},render:function(){var t,e,i,n=this.shapeseq,s=this.shapes,o=n.length,r=this._getContext();for(r.clearRect(0,0,this.pixelWidth,this.pixelHeight),i=0;i<o;i++)t=n[i],e=s[t],this["_draw"+e.type].apply(this,e.args);this.interact||(this.shapes={},this.shapeseq=[])}}),M=i(P,{init:function(e,i,n){var s;M._super.init.call(this,e,i,n),n[0]&&(n=n[0]),t.data(n,"_jqs_vcanvas",this),this.canvas=r.createElement("span"),t(this.canvas).css({display:"inline-block",position:"relative",overflow:"hidden",width:e,height:i,margin:"0px",padding:"0px",verticalAlign:"top"}),this._insert(this.canvas,n),this._calculatePixelDims(e,i,this.canvas),this.canvas.width=this.pixelWidth,this.canvas.height=this.pixelHeight,s='<v:group coordorigin="0 0" coordsize="'+this.pixelWidth+" "+this.pixelHeight+'" style="position:absolute;top:0;left:0;width:'+this.pixelWidth+"px;height="+this.pixelHeight+'px;"></v:group>',this.canvas.insertAdjacentHTML("beforeEnd",s),this.group=t(this.canvas).children()[0],this.rendered=!1,this.prerender=""},_drawShape:function(t,e,i,n,s){var o,r,a,u,c,h,d,p=[];for(d=0,h=e.length;d<h;d++)p[d]=""+e[d][0]+","+e[d][1];return o=p.splice(0,1),s=s===l?1:s,r=i===l?' stroked="false" ':' strokeWeight="'+s+'px" strokeColor="'+i+'" ',a=n===l?' filled="false"':' fillColor="'+n+'" filled="true" ',u=p[0]===p[p.length-1]?"x ":"",c='<v:shape coordorigin="0 0" coordsize="'+this.pixelWidth+" "+this.pixelHeight+'" id="jqsshape'+t+'" '+r+a+' style="position:absolute;left:0px;top:0px;height:'+this.pixelHeight+"px;width:"+this.pixelWidth+'px;padding:0px;margin:0px;" path="m '+o+" l "+p.join(", ")+" "+u+'e"> </v:shape>'},_drawCircle:function(t,e,i,n,s,o,r){var a,u,c;return e-=n,i-=n,a=s===l?' stroked="false" ':' strokeWeight="'+r+'px" strokeColor="'+s+'" ',u=o===l?' filled="false"':' fillColor="'+o+'" filled="true" ',c='<v:oval id="jqsshape'+t+'" '+a+u+' style="position:absolute;top:'+i+"px; left:"+e+"px; width:"+2*n+"px; height:"+2*n+'px"></v:oval>'},_drawPieSlice:function(t,e,i,n,s,o,r,u){var c,h,d,p,f,g,m,v;if(s===o)return"";if(o-s===2*a.PI&&(s=0,o=2*a.PI),h=e+a.round(a.cos(s)*n),d=i+a.round(a.sin(s)*n),p=e+a.round(a.cos(o)*n),f=i+a.round(a.sin(o)*n),h===p&&d===f){if(o-s<a.PI)return"";h=p=e+n,d=f=i}return h===p&&d===f&&o-s<a.PI?"":(c=[e-n,i-n,e+n,i+n,h,d,p,f],g=r===l?' stroked="false" ':' strokeWeight="1px" strokeColor="'+r+'" ',m=u===l?' filled="false"':' fillColor="'+u+'" filled="true" ',v='<v:shape coordorigin="0 0" coordsize="'+this.pixelWidth+" "+this.pixelHeight+'" id="jqsshape'+t+'" '+g+m+' style="position:absolute;left:0px;top:0px;height:'+this.pixelHeight+"px;width:"+this.pixelWidth+'px;padding:0px;margin:0px;" path="m '+e+","+i+" wa "+c.join(", ")+' x e"> </v:shape>')},_drawRect:function(t,e,i,n,s,o,r){return this._drawShape(t,[[e,i],[e,i+s],[e+n,i+s],[e+n,i],[e,i]],o,r)},reset:function(){this.group.innerHTML=""},appendShape:function(t){var e=this["_draw"+t.type].apply(this,t.args);return this.rendered?this.group.insertAdjacentHTML("beforeEnd",e):this.prerender+=e,this.lastShapeId=t.id,t.id},replaceWithShape:function(e,i){var n=t("#jqsshape"+e),s=this["_draw"+i.type].apply(this,i.args);n[0].outerHTML=s},replaceWithShapes:function(e,i){var n,s=t("#jqsshape"+e[0]),o="",r=i.length;for(n=0;n<r;n++)o+=this["_draw"+i[n].type].apply(this,i[n].args);for(s[0].outerHTML=o,n=1;n<e.length;n++)t("#jqsshape"+e[n]).remove()},insertAfterShape:function(e,i){var n=t("#jqsshape"+e),s=this["_draw"+i.type].apply(this,i.args);n[0].insertAdjacentHTML("afterEnd",s)},removeShapeId:function(e){var i=t("#jqsshape"+e);this.group.removeChild(i[0])},getShapeAt:function(t,e,i){var n=t.id.substr(8);return n},render:function(){this.rendered||(this.group.innerHTML=this.prerender,this.rendered=!0)}})})}(document,Math)},function(t,e,i){(function(t){/**
|
||
* @fileOverview jquery-autocomplete, the jQuery Autocompleter
|
||
* @author <a href="mailto:dylan@dyve.net">Dylan Verheul</a>
|
||
* @version 2.4.4
|
||
* @requires jQuery 1.6+
|
||
* @license MIT | GPL | Apache 2.0, see LICENSE.txt
|
||
* @see https://github.com/dyve/jquery-autocomplete
|
||
*/
|
||
!function(t){"use strict";t.fn.autocomplete_verheul=function(e){var i;arguments.length>1?(i=e,e=arguments[1],e.url=i):"string"==typeof e&&(i=e,e={url:i});var n=t.extend({},t.fn.autocomplete_verheul.defaults,e);return this.each(function(){var e=t(this);e.data("autocompleter",new t.Autocompleter(e,t.meta?t.extend({},n,e.data()):n))})},t.fn.autocomplete_verheul.defaults={inputClass:"acInput",loadingClass:"acLoading",resultsClass:"acResults",selectClass:"acSelect",queryParamName:"q",extraParams:{},remoteDataType:!1,lineSeparator:"\n",cellSeparator:"|",minChars:2,maxItemsToShow:10,delay:400,useCache:!0,maxCacheLength:10,matchSubset:!0,matchCase:!1,matchInside:!0,mustMatch:!1,selectFirst:!1,selectOnly:!1,showResult:null,preventDefaultReturn:1,preventDefaultTab:0,autoFill:!1,filterResults:!0,filter:!0,sortResults:!0,sortFunction:null,onItemSelect:null,onNoMatch:null,onFinish:null,matchStringConverter:null,beforeUseConverter:null,autoWidth:"min-width",useDelimiter:!1,delimiterChar:",",delimiterKeyCode:188,processData:null,onError:null,enabled:!0};var e=function(e){var i,n,s=typeof e;return"string"===s?(i=e,n={}):t.isArray(e)?(i=e[0],n=e.slice(1)):"object"===s&&(i=e.value,n=e.data),i=String(i),"object"!=typeof n&&(n={}),{value:i,data:n}},i=function(t,e,i){var n=parseInt(t,10);return i=i||{},(isNaN(n)||i.min&&n<i.min)&&(n=e),n},n=function(t,e){return[t,encodeURIComponent(e)].join("=")},s=function(e,i){var s=[];return t.each(i,function(t,e){s.push(n(t,e))}),s.length&&(e+=e.indexOf("?")===-1?"?":"&",e+=s.join("&")),e},o=function(t,e,i){return t=String(t.value),e=String(e.value),i||(t=t.toLowerCase(),e=e.toLowerCase()),t>e?1:t<e?-1:0},r=function(t,e,i){var n,s,o,r,a,l,u=[];for(l=String(t).replace("\r\n","\n").split(e),n=0;n<l.length;n++){for(r=l[n].split(i),o=[],s=0;s<r.length;s++)o.push(decodeURIComponent(r[s]));a=o.shift(),u.push({value:a,data:o})}return u};t.Autocompleter=function(e,n){if(!e||!(e instanceof t)||1!==e.length||"INPUT"!==e.get(0).tagName.toUpperCase()&&"TEXTAREA"!==e.get(0).tagName.toUpperCase())throw new Error("Invalid parameter for jquery.Autocompleter, jQuery object with one element with INPUT or TEXTAREA tag expected.");var s=this;this.options=n,this.cacheData_={},this.cacheLength_=0,this.selectClass_="jquery-autocomplete-selected-item",this.keyTimeout_=null,this.finishTimeout_=null,this.lastKeyPressed_=null,this.lastProcessedValue_=null,this.lastSelectedValue_=null,this.active_=!1,this.finishOnBlur_=!0,this.options.minChars=i(this.options.minChars,t.fn.autocomplete_verheul.defaults.minChars,{min:0}),this.options.maxItemsToShow=i(this.options.maxItemsToShow,t.fn.autocomplete_verheul.defaults.maxItemsToShow,{min:0}),this.options.maxCacheLength=i(this.options.maxCacheLength,t.fn.autocomplete_verheul.defaults.maxCacheLength,{min:1}),this.options.delay=i(this.options.delay,t.fn.autocomplete_verheul.defaults.delay,{min:0}),2!=this.options.preventDefaultReturn&&(this.options.preventDefaultReturn=this.options.preventDefaultReturn?1:0),2!=this.options.preventDefaultTab&&(this.options.preventDefaultTab=this.options.preventDefaultTab?1:0),this.dom={},this.dom.$elem=e,this.dom.$elem.attr("autocomplete","off").addClass(this.options.inputClass),this.dom.$results=t("<div></div>").hide().addClass(this.options.resultsClass).css({position:"absolute"}),t("body").append(this.dom.$results),e.keydown(function(t){switch(s.lastKeyPressed_=t.keyCode,s.lastKeyPressed_){case s.options.delimiterKeyCode:s.options.useDelimiter&&s.active_&&s.selectCurrent();break;case 35:case 36:case 16:case 17:case 18:case 37:case 39:break;case 38:return t.preventDefault(),s.active_?s.focusPrev():s.activate(),!1;case 40:return t.preventDefault(),s.active_?s.focusNext():s.activate(),!1;case 9:if(s.active_&&(s.selectCurrent(),s.options.preventDefaultTab))return t.preventDefault(),!1;if(2===s.options.preventDefaultTab)return t.preventDefault(),!1;break;case 13:if(s.active_&&(s.selectCurrent(),s.options.preventDefaultReturn))return t.preventDefault(),!1;if(2===s.options.preventDefaultReturn)return t.preventDefault(),!1;break;case 27:if(s.active_)return t.preventDefault(),s.deactivate(!0),!1;break;default:s.activate()}}),e.on("paste",function(){s.activate()});var o=function(){s.deactivate(!0)};e.blur(function(){s.finishOnBlur_&&(s.finishTimeout_=setTimeout(o,200))}),e.parents("form").on("submit",o)},t.Autocompleter.prototype.position=function(){var e=this.dom.$elem.offset(),i=this.dom.$results.outerHeight(),n=t(window).outerHeight(),s=e.top+this.dom.$elem.outerHeight(),o=s+i,r={top:s,left:e.left};if(o>n){var a=e.top-i;a>=0&&(r.top=a)}this.dom.$results.css(r)},t.Autocompleter.prototype.cacheRead=function(t){var e,i,n,s,o;if(this.options.useCache)for(t=String(t),e=t.length,i=this.options.matchSubset?1:e;i<=e;){for(s=this.options.matchInside?e-i:0,o=0;o<=s;){if(n=t.substr(0,i),void 0!==this.cacheData_[n])return this.cacheData_[n];o++}i++}return!1},t.Autocompleter.prototype.cacheWrite=function(t,e){return!!this.options.useCache&&(this.cacheLength_>=this.options.maxCacheLength&&this.cacheFlush(),t=String(t),void 0!==this.cacheData_[t]&&this.cacheLength_++,this.cacheData_[t]=e,this.cacheData_[t])},t.Autocompleter.prototype.cacheFlush=function(){this.cacheData_={},this.cacheLength_=0},t.Autocompleter.prototype.callHook=function(e,i){var n=this.options[e];return!(!n||!t.isFunction(n))&&n(i,this)},t.Autocompleter.prototype.activate=function(){if(this.options.enabled){var t=this;this.keyTimeout_&&clearTimeout(this.keyTimeout_),this.keyTimeout_=setTimeout(function(){t.activateNow()},this.options.delay)}},t.Autocompleter.prototype.activateNow=function(){var t=this.beforeUseConverter(this.dom.$elem.val());t!==this.lastProcessedValue_&&t!==this.lastSelectedValue_&&this.fetchData(t)},t.Autocompleter.prototype.fetchData=function(t){var e=this,i=function(t,i){e.options.processData&&(t=e.options.processData(t)),e.showResults(e.filterResults(t,i),i)};this.lastProcessedValue_=t,t.length<this.options.minChars?i([],t):this.options.data?i(this.options.data,t):this.fetchRemoteData(t,function(e){i(e,t)})},t.Autocompleter.prototype.fetchRemoteData=function(e,i){var n=this.cacheRead(e);if(n)i(n);else{var s=this,o="json"===s.options.remoteDataType?"json":"text",r=function(t){var n=!1;t!==!1&&(n=s.parseRemoteData(t),s.cacheWrite(e,n)),s.dom.$elem.removeClass(s.options.loadingClass),i(n)};this.dom.$elem.addClass(this.options.loadingClass),t.ajax({url:this.makeUrl(e),success:r,error:function(e,i,n){t.isFunction(s.options.onError)?s.options.onError(e,i,n):r(!1)},dataType:o})}},t.Autocompleter.prototype.setExtraParam=function(e,i){var n=t.trim(String(e));return n&&(this.options.extraParams||(this.options.extraParams={}),this.options.extraParams[n]!==i&&(this.options.extraParams[n]=i,this.cacheFlush())),this},t.Autocompleter.prototype.makeUrl=function(e){var i=this.options.url,n=t.extend({},this.options.extraParams);return this.options.queryParamName===!1?i+=encodeURIComponent(e):n[this.options.queryParamName]=e,s(i,n)},t.Autocompleter.prototype.parseRemoteData=function(e){var i,n=e;if("json"===this.options.remoteDataType){switch(i=typeof e){case"object":n=e;break;case"string":n=t.parseJSON(e);break;default:throw new Error("Unexpected remote data type: "+i)}return n}return r(n,this.options.lineSeparator,this.options.cellSeparator)},t.Autocompleter.prototype.defaultFilter=function(t,e){if(!t.value)return!1;if(this.options.filterResults){var i=this.matchStringConverter(e),n=this.matchStringConverter(t.value);this.options.matchCase||(i=i.toLowerCase(),n=n.toLowerCase());var s=n.indexOf(i);return this.options.matchInside?s>-1:0===s}return!0},t.Autocompleter.prototype.filterResult=function(e,i){return this.options.filter===!1||(t.isFunction(this.options.filter)?this.options.filter(e,i):this.defaultFilter(e,i))},t.Autocompleter.prototype.filterResults=function(t,i){var n,s,o=[];for(n=0;n<t.length;n++)s=e(t[n]),this.filterResult(s,i)&&o.push(s);return this.options.sortResults&&(o=this.sortResults(o,i)),this.options.maxItemsToShow>0&&this.options.maxItemsToShow<o.length&&(o.length=this.options.maxItemsToShow),o},t.Autocompleter.prototype.sortResults=function(e,i){var n=this,s=this.options.sortFunction;return t.isFunction(s)||(s=function(t,e,i){return o(t,e,n.options.matchCase)}),e.sort(function(t,e){return s(t,e,i,n.options)}),e},t.Autocompleter.prototype.matchStringConverter=function(e,i,n){var s=this.options.matchStringConverter;return t.isFunction(s)&&(e=s(e,i,n)),e},t.Autocompleter.prototype.beforeUseConverter=function(e){e=this.getValue(e);var i=this.options.beforeUseConverter;return t.isFunction(i)&&(e=i(e)),e},t.Autocompleter.prototype.enableFinishOnBlur=function(){this.finishOnBlur_=!0},t.Autocompleter.prototype.disableFinishOnBlur=function(){this.finishOnBlur_=!1},t.Autocompleter.prototype.createItemFromResult=function(e){var i=this,n=t("<li/>");return n.html(this.showResult(e.value,e.data)),n.data({value:e.value,data:e.data}).click(function(){i.selectItem(n)}).mousedown(i.disableFinishOnBlur).mouseup(i.enableFinishOnBlur),n},t.Autocompleter.prototype.getItems=function(){return t(">ul>li",this.dom.$results)},t.Autocompleter.prototype.showResults=function(e,i){var n,s,o,r,a=e.length,l=this,u=t("<ul></ul>"),c=!1,h=!1;if(a){for(n=0;n<a;n++)s=e[n],o=this.createItemFromResult(s),u.append(o),c===!1&&(c=String(s.value),h=o,o.addClass(this.options.firstItemClass)),n===a-1&&o.addClass(this.options.lastItemClass);this.dom.$results.html(u).show(),this.position(),this.options.autoWidth&&(r=this.dom.$elem.outerWidth()-this.dom.$results.outerWidth()+this.dom.$results.width(),this.dom.$results.css(this.options.autoWidth,r)),this.getItems().hover(function(){l.focusItem(this)},function(){}),(this.autoFill(c,i)||this.options.selectFirst||this.options.selectOnly&&1===a)&&this.focusItem(h),this.active_=!0}else this.hideResults(),this.active_=!1},t.Autocompleter.prototype.showResult=function(e,i){return t.isFunction(this.options.showResult)?this.options.showResult(e,i):t("<p></p>").text(e).html()},t.Autocompleter.prototype.autoFill=function(t,e){var i,n,s,o;if(this.options.autoFill&&8!==this.lastKeyPressed_&&(i=String(t).toLowerCase(),n=String(e).toLowerCase(),s=t.length,o=e.length,i.substr(0,o)===n)){var r=this.getDelimiterOffsets(),a=r.start?" ":"";this.setValue(a+t);var l=o+r.start+a.length,u=s+r.start+a.length;return this.selectRange(l,u),!0}return!1},t.Autocompleter.prototype.focusNext=function(){this.focusMove(1)},t.Autocompleter.prototype.focusPrev=function(){this.focusMove(-1)},t.Autocompleter.prototype.focusMove=function(e){var n=this.getItems();if(e=i(e,0))for(var s=0;s<n.length;s++)if(t(n[s]).hasClass(this.selectClass_))return void this.focusItem(s+e);this.focusItem(0)},t.Autocompleter.prototype.focusItem=function(e){var i,n=this.getItems();n.length&&(n.removeClass(this.selectClass_).removeClass(this.options.selectClass),"number"==typeof e?(e<0?e=0:e>=n.length&&(e=n.length-1),i=t(n[e])):i=t(e),i&&i.addClass(this.selectClass_).addClass(this.options.selectClass))},t.Autocompleter.prototype.selectCurrent=function(){var e=t("li."+this.selectClass_,this.dom.$results);1===e.length?this.selectItem(e):this.deactivate(!1)},t.Autocompleter.prototype.selectItem=function(t){var e=t.data("value"),i=t.data("data"),n=this.displayValue(e,i),s=this.beforeUseConverter(n);this.lastProcessedValue_=s,this.lastSelectedValue_=s;var o=this.getDelimiterOffsets(),r=this.options.delimiterChar,a=this.dom.$elem,l=0;this.options.useDelimiter&&(a.val().substring(o.start-1,o.start)==r&&" "!=r&&(n=" "+n),a.val().substring(o.end,o.end+1)!=r&&this.lastKeyPressed_!=this.options.delimiterKeyCode?n+=r:l=1),this.setValue(n),this.setCaret(o.start+n.length+l),this.callHook("onItemSelect",{value:e,data:i}),this.deactivate(!0),a.focus()},t.Autocompleter.prototype.displayValue=function(e,i){return t.isFunction(this.options.displayValue)?this.options.displayValue(e,i):e},t.Autocompleter.prototype.hideResults=function(){this.dom.$results.hide()},t.Autocompleter.prototype.deactivate=function(t){this.finishTimeout_&&clearTimeout(this.finishTimeout_),this.keyTimeout_&&clearTimeout(this.keyTimeout_),t&&(this.lastProcessedValue_!==this.lastSelectedValue_&&(this.options.mustMatch&&this.setValue(""),this.callHook("onNoMatch")),this.active_&&this.callHook("onFinish"),this.lastKeyPressed_=null,this.lastProcessedValue_=null,this.lastSelectedValue_=null,this.active_=!1),this.hideResults()},t.Autocompleter.prototype.selectRange=function(t,e){var i=this.dom.$elem.get(0);if(i.setSelectionRange)i.focus(),i.setSelectionRange(t,e);else if(i.createTextRange){var n=i.createTextRange();n.collapse(!0),n.moveEnd("character",e),n.moveStart("character",t),n.select()}},t.Autocompleter.prototype.setCaret=function(t){this.selectRange(t,t)},t.Autocompleter.prototype.getCaret=function(){var t,e,i,n,s,o,r=this.dom.$elem,a=r[0];return a.createTextRange?(e=document.selection,"textarea"!=a.tagName.toLowerCase()?(t=r.val(),i=e.createRange().duplicate(),i.moveEnd("character",t.length),n=""===i.text?t.length:t.lastIndexOf(i.text),i=e.createRange().duplicate(),i.moveStart("character",-t.length),s=i.text.length):(i=e.createRange(),o=i.duplicate(),o.moveToElementText(a),o.setEndPoint("EndToEnd",i),n=o.text.length-i.text.length,s=n+i.text.length)):(n=r[0].selectionStart,s=r[0].selectionEnd),{start:n,end:s}},t.Autocompleter.prototype.setValue=function(t){if(this.options.useDelimiter){var e=this.dom.$elem.val(),i=this.getDelimiterOffsets(),n=e.substring(0,i.start),s=e.substring(i.end);t=n+t+s}this.dom.$elem.val(t)},t.Autocompleter.prototype.getValue=function(t){if(this.options.useDelimiter){var e=this.getDelimiterOffsets();return t.substring(e.start,e.end).trim()}return t},t.Autocompleter.prototype.getDelimiterOffsets=function(){var t=this.dom.$elem.val();if(this.options.useDelimiter){var e=t.substring(0,this.getCaret().start),i=e.lastIndexOf(this.options.delimiterChar)+1,n=t.substring(this.getCaret().start),s=n.indexOf(this.options.delimiterChar);s==-1&&(s=t.length),s+=this.getCaret().start}else i=0,s=t.length;return{start:i,end:s}}}(t)}).call(e,i(1))},,function(t,e,i){(function(t){/*!
|
||
* jQuery Migrate - v1.4.0 - 2016-02-26
|
||
* Copyright jQuery Foundation and other contributors
|
||
*/
|
||
!function(t,e,i){function n(i){var n=e.console;o[i]||(o[i]=!0,t.migrateWarnings.push(i),n&&n.warn&&!t.migrateMute&&(n.warn("JQMIGRATE: "+i),t.migrateTrace&&n.trace&&n.trace()))}function s(e,i,s,o){if(Object.defineProperty)try{return void Object.defineProperty(e,i,{configurable:!0,enumerable:!0,get:function(){return n(o),s},set:function(t){n(o),s=t}})}catch(t){}t._definePropertyBroken=!0,e[i]=s}t.migrateVersion="1.4.0";var o={};t.migrateWarnings=[],e.console&&e.console.log&&e.console.log("JQMIGRATE: Migrate is installed"+(t.migrateMute?"":" with logging active")+", version "+t.migrateVersion),t.migrateTrace===i&&(t.migrateTrace=!0),t.migrateReset=function(){o={},t.migrateWarnings.length=0},"BackCompat"===document.compatMode&&n("jQuery is not compatible with Quirks Mode");var r=t("<input/>",{size:1}).attr("size")&&t.attrFn,a=t.attr,l=t.attrHooks.value&&t.attrHooks.value.get||function(){return null},u=t.attrHooks.value&&t.attrHooks.value.set||function(){return i},c=/^(?:input|button)$/i,h=/^[238]$/,d=/^(?:autofocus|autoplay|async|checked|controls|defer|disabled|hidden|loop|multiple|open|readonly|required|scoped|selected)$/i,p=/^(?:checked|selected)$/i;s(t,"attrFn",r||{},"jQuery.attrFn is deprecated"),t.attr=function(e,s,o,l){var u=s.toLowerCase(),f=e&&e.nodeType;return l&&(a.length<4&&n("jQuery.fn.attr( props, pass ) is deprecated"),e&&!h.test(f)&&(r?s in r:t.isFunction(t.fn[s])))?t(e)[s](o):("type"===s&&o!==i&&c.test(e.nodeName)&&e.parentNode&&n("Can't change the 'type' of an input or button in IE 6/7/8"),!t.attrHooks[u]&&d.test(u)&&(t.attrHooks[u]={get:function(e,n){var s,o=t.prop(e,n);return o===!0||"boolean"!=typeof o&&(s=e.getAttributeNode(n))&&s.nodeValue!==!1?n.toLowerCase():i},set:function(e,i,n){var s;return i===!1?t.removeAttr(e,n):(s=t.propFix[n]||n,s in e&&(e[s]=!0),e.setAttribute(n,n.toLowerCase())),n}},p.test(u)&&n("jQuery.fn.attr('"+u+"') might use property instead of attribute")),a.call(t,e,s,o))},t.attrHooks.value={get:function(t,e){var i=(t.nodeName||"").toLowerCase();return"button"===i?l.apply(this,arguments):("input"!==i&&"option"!==i&&n("jQuery.fn.attr('value') no longer gets properties"),e in t?t.value:null)},set:function(t,e){var i=(t.nodeName||"").toLowerCase();return"button"===i?u.apply(this,arguments):("input"!==i&&"option"!==i&&n("jQuery.fn.attr('value', val) no longer sets properties"),void(t.value=e))}};var f,g,m=t.fn.init,v=t.parseJSON,y=/^\s*</,b=/\[\s*\w+\s*[~|^$*]?=\s*(?![\s'"])[^#\]]*#/,w=/^([^<]*)(<[\w\W]+>)([^>]*)$/;t.fn.init=function(e,s,o){var r,a;return e&&"string"==typeof e&&!t.isPlainObject(s)&&(r=w.exec(t.trim(e)))&&r[0]&&(y.test(e)||n("$(html) HTML strings must start with '<' character"),r[3]&&n("$(html) HTML text after last tag is ignored"),"#"===r[0].charAt(0)&&(n("HTML string cannot start with a '#' character"),t.error("JQMIGRATE: Invalid selector string (XSS)")),s&&s.context&&(s=s.context),t.parseHTML)?m.call(this,t.parseHTML(r[2],s&&s.ownerDocument||s||document,!0),s,o):("#"===e?(n("jQuery( '#' ) is not a valid selector"),e=[]):b.test(e)&&n("Attribute selectors with '#' must be quoted: '"+e+"'"),a=m.apply(this,arguments),e&&e.selector!==i?(a.selector=e.selector,a.context=e.context):(a.selector="string"==typeof e?e:"",e&&(a.context=e.nodeType?e:s||document)),a)},t.fn.init.prototype=t.fn,t.parseJSON=function(t){return t?v.apply(this,arguments):(n("jQuery.parseJSON requires a valid JSON string"),null)},t.uaMatch=function(t){t=t.toLowerCase();var e=/(chrome)[ \/]([\w.]+)/.exec(t)||/(webkit)[ \/]([\w.]+)/.exec(t)||/(opera)(?:.*version|)[ \/]([\w.]+)/.exec(t)||/(msie) ([\w.]+)/.exec(t)||t.indexOf("compatible")<0&&/(mozilla)(?:.*? rv:([\w.]+)|)/.exec(t)||[];return{browser:e[1]||"",version:e[2]||"0"}},t.browser||(f=t.uaMatch(navigator.userAgent),g={},f.browser&&(g[f.browser]=!0,g.version=f.version),g.chrome?g.webkit=!0:g.webkit&&(g.safari=!0),t.browser=g),s(t,"browser",t.browser,"jQuery.browser is deprecated"),t.boxModel=t.support.boxModel="CSS1Compat"===document.compatMode,s(t,"boxModel",t.boxModel,"jQuery.boxModel is deprecated"),s(t.support,"boxModel",t.support.boxModel,"jQuery.support.boxModel is deprecated"),t.sub=function(){function e(t,i){return new e.fn.init(t,i)}t.extend(!0,e,this),e.superclass=this,e.fn=e.prototype=this(),e.fn.constructor=e,e.sub=this.sub,e.fn.init=function(n,s){var o=t.fn.init.call(this,n,s,i);return o instanceof e?o:e(o)},e.fn.init.prototype=e.fn;var i=e(document);return n("jQuery.sub() is deprecated"),e},t.fn.size=function(){return n("jQuery.fn.size() is deprecated; use the .length property"),this.length};var _=!1;t.swap&&t.each(["height","width","reliableMarginRight"],function(e,i){var n=t.cssHooks[i]&&t.cssHooks[i].get;n&&(t.cssHooks[i].get=function(){var t;return _=!0,t=n.apply(this,arguments),_=!1,t})}),t.swap=function(t,e,i,s){var o,r,a={};_||n("jQuery.swap() is undocumented and deprecated");for(r in e)a[r]=t.style[r],t.style[r]=e[r];o=i.apply(t,s||[]);for(r in e)t.style[r]=a[r];return o},t.ajaxSetup({converters:{"text json":t.parseJSON}});var x=t.fn.data;t.fn.data=function(e){var s,o,r=this[0];return!r||"events"!==e||1!==arguments.length||(s=t.data(r,e),o=t._data(r,e),s!==i&&s!==o||o===i)?x.apply(this,arguments):(n("Use of jQuery.fn.data('events') is deprecated"),o)};var C=/\/(java|ecma)script/i;t.clean||(t.clean=function(e,i,s,o){i=i||document,i=!i.nodeType&&i[0]||i,i=i.ownerDocument||i,n("jQuery.clean() is deprecated");var r,a,l,u,c=[];if(t.merge(c,t.buildFragment(e,i).childNodes),s)for(l=function(t){if(!t.type||C.test(t.type))return o?o.push(t.parentNode?t.parentNode.removeChild(t):t):s.appendChild(t)},r=0;null!=(a=c[r]);r++)t.nodeName(a,"script")&&l(a)||(s.appendChild(a),"undefined"!=typeof a.getElementsByTagName&&(u=t.grep(t.merge([],a.getElementsByTagName("script")),l),c.splice.apply(c,[r+1,0].concat(u)),r+=u.length));return c});var S=t.event.add,k=t.event.remove,T=t.event.trigger,E=t.fn.toggle,A=t.fn.live,D=t.fn.die,N=t.fn.load,O="ajaxStart|ajaxStop|ajaxSend|ajaxComplete|ajaxError|ajaxSuccess",P=new RegExp("\\b(?:"+O+")\\b"),R=/(?:^|\s)hover(\.\S+|)\b/,M=function(e){return"string"!=typeof e||t.event.special.hover?e:(R.test(e)&&n("'hover' pseudo-event is deprecated, use 'mouseenter mouseleave'"),e&&e.replace(R,"mouseenter$1 mouseleave$1"))};t.event.props&&"attrChange"!==t.event.props[0]&&t.event.props.unshift("attrChange","attrName","relatedNode","srcElement"),t.event.dispatch&&s(t.event,"handle",t.event.dispatch,"jQuery.event.handle is undocumented and deprecated"),t.event.add=function(t,e,i,s,o){t!==document&&P.test(e)&&n("AJAX events should be attached to document: "+e),S.call(this,t,M(e||""),i,s,o)},t.event.remove=function(t,e,i,n,s){k.call(this,t,M(e)||"",i,n,s)},t.each(["load","unload","error"],function(e,i){t.fn[i]=function(){var t=Array.prototype.slice.call(arguments,0);return"load"===i&&"string"==typeof t[0]?N.apply(this,t):(n("jQuery.fn."+i+"() is deprecated"),t.splice(0,0,i),arguments.length?this.bind.apply(this,t):(this.triggerHandler.apply(this,t),this))}}),t.fn.toggle=function(e,i){if(!t.isFunction(e)||!t.isFunction(i))return E.apply(this,arguments);n("jQuery.fn.toggle(handler, handler...) is deprecated");var s=arguments,o=e.guid||t.guid++,r=0,a=function(i){var n=(t._data(this,"lastToggle"+e.guid)||0)%r;return t._data(this,"lastToggle"+e.guid,n+1),i.preventDefault(),s[n].apply(this,arguments)||!1};for(a.guid=o;r<s.length;)s[r++].guid=o;return this.click(a)},t.fn.live=function(e,i,s){return n("jQuery.fn.live() is deprecated"),A?A.apply(this,arguments):(t(this.context).on(e,this.selector,i,s),this)},t.fn.die=function(e,i){return n("jQuery.fn.die() is deprecated"),D?D.apply(this,arguments):(t(this.context).off(e,this.selector||"**",i),this)},t.event.trigger=function(t,e,i,s){return i||P.test(t)||n("Global events are undocumented and deprecated"),T.call(this,t,e,i||document,s)},t.each(O.split("|"),function(e,i){t.event.special[i]={setup:function(){var e=this;return e!==document&&(t.event.add(document,i+"."+t.guid,function(){t.event.trigger(i,Array.prototype.slice.call(arguments,1),e,!0)}),t._data(this,i,t.guid++)),!1},teardown:function(){return this!==document&&t.event.remove(document,i+"."+t._data(this,i)),!1}}}),t.event.special.ready={setup:function(){this===document&&n("'ready' event is deprecated")}};var j=t.fn.andSelf||t.fn.addBack,I=t.fn.find;if(t.fn.andSelf=function(){return n("jQuery.fn.andSelf() replaced by jQuery.fn.addBack()"),j.apply(this,arguments)},t.fn.find=function(t){var e=I.apply(this,arguments);return e.context=this.context,e.selector=this.selector?this.selector+" "+t:t,e},t.Callbacks){var H=t.Deferred,L=[["resolve","done",t.Callbacks("once memory"),t.Callbacks("once memory"),"resolved"],["reject","fail",t.Callbacks("once memory"),t.Callbacks("once memory"),"rejected"],["notify","progress",t.Callbacks("memory"),t.Callbacks("memory")]];t.Deferred=function(e){var i=H(),s=i.promise();return i.pipe=s.pipe=function(){var e=arguments;return n("deferred.pipe() is deprecated"),t.Deferred(function(n){t.each(L,function(o,r){var a=t.isFunction(e[o])&&e[o];i[r[1]](function(){var e=a&&a.apply(this,arguments);e&&t.isFunction(e.promise)?e.promise().done(n.resolve).fail(n.reject).progress(n.notify):n[r[0]+"With"](this===s?n.promise():this,a?[e]:arguments)})}),e=null}).promise()},i.isResolved=function(){return n("deferred.isResolved is deprecated"),"resolved"===i.state()},i.isRejected=function(){return n("deferred.isRejected is deprecated"),"rejected"===i.state()},e&&e.call(i,i),i}}}(t,window)}).call(e,i(1))},,,,,,,,,,,,,,,,,,,,,,,,,,,function(t,e,i){var n,s;(function(o,r,a){n=[i(6),i(5)],s=function(t,e){"use strict";var i="user",n=o.View.extend(t.LoggableMixin).extend({_logNamespace:i,options:{warnAtPercent:85,errorAtPercent:100},initialize:function(t){this.log(this+".initialize:",t),r.extend(this.options,t),this.listenTo(this.model,"change:quota_percent change:total_disk_usage",this.render)},update:function(t){return this.log(this+" updating user data...",t),this.model.loadFromApi(this.model.get("id"),t),this},isOverQuota:function(){return null!==this.model.get("quota_percent")&&this.model.get("quota_percent")>=this.options.errorAtPercent},_render_quota:function(){var t=this.model.toJSON(),e=t.quota_percent,i=a(this._templateQuotaMeter(t)),n=i.find(".progress-bar");return this.isOverQuota()?(n.attr("class","progress-bar progress-bar-danger"),i.find(".quota-meter-text").css("color","white"),this.trigger("quota:over",t)):e>=this.options.warnAtPercent?(n.attr("class","progress-bar progress-bar-warning"),this.trigger("quota:under quota:under:approaching",t)):(n.attr("class","progress-bar progress-bar-success"),this.trigger("quota:under quota:under:ok",t)),i},_render_usage:function(){var t=a(this._templateUsage(this.model.toJSON()));return this.log(this+".rendering usage:",t),t},render:function(){var t=null;return this.log(this+".model.quota_percent:",this.model.get("quota_percent")),t=null===this.model.get("quota_percent")||void 0===this.model.get("quota_percent")?this._render_usage():this._render_quota(),this.$el.html(t),this.$el.find(".quota-meter-text").tooltip(),this},_templateQuotaMeter:function(t){return['<div id="quota-meter" class="quota-meter progress">','<div class="progress-bar" style="width: ',t.quota_percent,'%"></div>','<div class="quota-meter-text" data-placement="left" style="top: 6px"',t.nice_total_disk_usage?' title="Using '+t.nice_total_disk_usage+'. This value is recalculated when you log out.">':">",e("Using")," ",t.quota_percent,"%","</div>","</div>"].join("")},_templateUsage:function(t){return['<div id="quota-meter" class="quota-meter" style="background-color: transparent">','<div class="quota-meter-text" data-placement="left" data-original-title="This value is recalculated when you log out." style="top: 6px; color: white">',t.nice_total_disk_usage?e("Using ")+t.nice_total_disk_usage:"","</div>","</div>"].join("")},toString:function(){return"UserQuotaMeter("+this.model+")"}});return{UserQuotaMeter:n}}.apply(e,n),!(void 0!==s&&(t.exports=s))}).call(e,i(3),i(2),i(1))},,,,function(t,e,i){(function(t,e,n,s){function o(e,i,n){function o(t){var e=s(t),i={placeholder:"Click to select",closeOnSelect:!e.is("[MULTIPLE]"),dropdownAutoWidth:!0,containerCssClass:"select2-minwidth"};return t.select2(i)}t.fn.select2&&(void 0===e&&(e=20),void 0===i&&(i=3e3),n=n||s("select"),n.each(function(){var t=s(this).not("[multiple]"),n=t.find("option").length;n<e||n>i||t.hasClass("no-autocomplete")||o(t)}))}function r(){s("select[refresh_on_change='true']").off("change").change(function(){var t=s(this),e=t.val(),i=t.attr("refresh_on_change_values");if(i){i=i.split(",");var n=t.attr("last_selected_value");if(s.inArray(e,i)===-1&&s.inArray(n,i)===-1)return}s(window).trigger("refresh_on_change"),s(document).trigger("convert_to_values"),t.get(0).form.submit()}),s(":checkbox[refresh_on_change='true']").off("click").click(function(){var t=s(this),e=t.val(),i=t.attr("refresh_on_change_values");if(i){i=i.split(",");var n=t.attr("last_selected_value");if(s.inArray(e,i)===-1&&s.inArray(n,i)===-1)return}s(window).trigger("refresh_on_change"),t.get(0).form.submit()}),s("a[confirm]").off("click").click(function(){return confirm(s(this).attr("confirm"))})}window.jQuery=t,window.$=t,window._=e,window.Backbone=n,window.panels=i(35),e.extend(window,i(66)),window.async_save_text=i(148);var a=i(146);window.make_popupmenu=a.make_popupmenu,window.make_popup_menus=a.make_popup_menus,window.init_tag_click_function=i(89);var l=i(86);i(64);window.init_refresh_on_change=r,s(document).ready(function(){r(),s.fn.tooltip&&(s(".unified-panel-header [title]").tooltip({placement:"bottom"}),s("[title]").tooltip()),make_popup_menus(),o(20,1500),s("a").click(function(){var t=s(this),e=parent.frames&&parent.frames.galaxy_main;if("galaxy_main"==t.attr("target")&&!e){var i=t.attr("href");i+=i.indexOf("?")==-1?"?":"&",i+="use_panels=True",t.attr("href",i),t.attr("target","_self")}return t});var t=JSON.parse(sessionStorage.getItem("activeGalaxyTour"));if(t&&(t=l.hooked_tour_from_data(t),t&&t.steps&&window&&window.self===window.top)){var i=new Tour(e.extend({steps:t.steps},l.tour_opts));i.init(),i.restart()}s.getJSON("/api/webhooks/onload/all",function(t){e.each(t,function(t){t.activate&&t.script&&(s("<script/>",{type:"text/javascript"}).text(t.script).appendTo("head"),s("<style/>",{type:"text/css"}).text(t.styles).appendTo("head"))})})})}).call(e,i(1),i(2),i(3),i(1))},function(t,e,i){(function(t){!function(){"use strict";window.console=window.console||{log:function(){},debug:function(){},info:function(){},warn:function(){},error:function(){},assert:function(){}},Object.assign=Object.assign||t.extend;for(var e=0,i=["ms","moz","webkit","o"],n=0;n<i.length&&!window.requestAnimationFrame;++n)window.requestAnimationFrame=window[i[n]+"RequestAnimationFrame"],window.cancelRequestAnimationFrame=window[i[n]+"CancelRequestAnimationFrame"];window.requestAnimationFrame||(window.requestAnimationFrame=function(t,i){var n=(new Date).getTime(),s=Math.max(0,16-(n-e)),o=window.setTimeout(function(){t(n+s)},s);return e=n+s,o}),window.cancelAnimationFrame||(window.cancelAnimationFrame=function(t){clearTimeout(t)});var s=[{name:"canvas",compatible:function(){return window.CanvasRenderingContext2D}},{name:"sessionStorage",compatible:function(){try{return window.sessionStorage.length>=0}catch(t){}return!1}}],o=s.filter(function(t){return!t.compatible()}).map(function(t){return t.name});if(o.length){var r=document.querySelectorAll('link[rel="index"]').item(0);r&&(window.location=r.href+"static/incompatible-browser.html"),console.log("incompatible browser:\n"+o.join("\n"))}}()}).call(e,i(2))},,function(t,e,i){var n,s;(function(o){n=[i(1)],s=function(t){"use_strict";function e(t,e){var i=t.data("menu_options");t.data("menu_options",e),i||t.bind("click.show_popup",function(e){return n(".popmenu-wrapper").remove(),setTimeout(function(){var i=n("<ul class='dropdown-menu' id='"+t.attr("id")+"-menu'></ul>"),s=t.data("menu_options");o.size(s)<=0&&n("<li>No Options.</li>").appendTo(i),n.each(s,function(t,e){if(e){var s=e.action||e;i.append(n("<li></li>").append(n("<a>").attr("href",e.url).html(t).click(s)))}else i.append(n("<li></li>").addClass("head").append(n("<a href='#'></a>").html(t)))});var r=n("<div class='popmenu-wrapper' style='position: absolute;left: 0; top: -1000;'></div>").append(i).appendTo("body"),a=e.pageX-r.width()/2;a=Math.min(a,n(document).scrollLeft()+n(window).width()-n(r).width()-5),a=Math.max(a,n(document).scrollLeft()+5),r.css({top:e.pageY,left:a})},10),setTimeout(function(){var t=function(t){n(t).bind("click.close_popup",function(){n(".popmenu-wrapper").remove(),t.unbind("click.close_popup")})};t(n(window.document)),t(n(window.top.document));for(var e=window.top.frames.length;e--;){var i=n(window.top.frames[e].document);t(i)}},50),!1})}function i(t){t=t||document,n(t).find("div[popupmenu]").each(function(){var i={},s=n(this);s.find("a").each(function(){var t=n(this),e=t.get(0),s=e.getAttribute("confirm"),o=e.getAttribute("href"),r=e.getAttribute("target");o?i[t.text()]={url:o,action:function(e){if(!s||confirm(s)){if(r)return window.open(o,r),!1;t.click()}else e.preventDefault()}}:i[t.text()]=null});var o=n(t).find("#"+s.attr("popupmenu"));o.find("a").bind("click",function(t){return t.stopPropagation(),!0}),e(o,i),o.addClass("popup"),s.remove()})}var n=t;return{make_popupmenu:e,make_popup_menus:i}}.apply(e,n),!(void 0!==s&&(t.exports=s))}).call(e,i(2))},,function(t,e,i){var n,s;n=[i(1)],s=function(t){"use_strict";function e(t,e,n,s,o,r,a,l,u){void 0===o&&(o=30),void 0===a&&(a=4),i("#"+t).click(function(){if(!(i("#renaming-active").length>0)){var t,c=i("#"+e),h=c.text();t=r?i("<textarea></textarea>").attr({rows:a,cols:o}).text(i.trim(h)):i("<input type='text'></input>").attr({value:i.trim(h),size:o}),t.attr("id","renaming-active"),t.blur(function(){i(this).remove(),c.show(),u&&u(t)}),t.keyup(function(o){if(27===o.keyCode)i(this).trigger("blur");else if(13===o.keyCode){var r={};r[s]=i(this).val(),i(this).trigger("blur"),i.ajax({url:n,data:r,error:function(){alert("Text editing for elt "+e+" failed")},success:function(e){""!==e?c.text(e):c.html("<em>None</em>"),u&&u(t)}})}}),l&&l(t),c.hide(),t.insertAfter(c),t.focus(),t.select()}})}var i=t;return e}.apply(e,n),!(void 0!==s&&(t.exports=s))},,function(t,e,i){var n,s;(function(i){n=[],s=function(){function t(t){t=t||{};var e=this;return e.userId=window.bootstrapped&&window.bootstrapped.user?window.bootstrapped.user.id:null,e.userId=e.userId||t.userId||null,e.consoleLogger=t.consoleLogger||null,e._init(t),e}function e(t){var e=this;return e._init(t||{})}return t.ALL=0,t.LOG=0,t.DEBUG=10,t.INFO=20,t.WARN=30,t.ERROR=40,t.METRIC=50,t.NONE=100,t.defaultOptions={logLevel:t.NONE,consoleLevel:t.NONE,defaultNamespace:"Galaxy",consoleNamespaceWhitelist:null,clientPrefix:"client.",maxCacheSize:3e3,postSize:1e3,addTime:!0,cacheKeyPrefix:"logs-",postUrl:"/api/metrics",delayPostInMs:6e5,getPingData:void 0,onServerResponse:void 0},t.prototype._init=function(e){var i=this;i.options={};for(var n in t.defaultOptions)t.defaultOptions.hasOwnProperty(n)&&(i.options[n]=e.hasOwnProperty(n)?e[n]:t.defaultOptions[n]);return i.options.logLevel=i._parseLevel(i.options.logLevel),i.options.consoleLevel=i._parseLevel(i.options.consoleLevel),i._sending=!1,i._waiting=null,i._postSize=i.options.postSize,i._initCache(),i},t.prototype._initCache=function(){try{this.cache=new e({maxSize:this.options.maxCacheSize,key:this.options.cacheKeyPrefix+this.userId})}catch(e){this._emitToConsole("warn","MetricsLogger",["Could not intitialize logging cache:",e]),this.options.logLevel=t.NONE}},t.prototype._parseLevel=function(e){var i=typeof e;if("number"===i)return e;if("string"===i){var n=e.toUpperCase();if(t.hasOwnProperty(n))return t[n]}throw new Error("Unknown log level: "+e)},t.prototype.emit=function(t,e,i){var n=this;return e=e||n.options.defaultNamespace,t&&i?(t=n._parseLevel(t),t>=n.options.logLevel&&n._addToCache(t,e,i),n.consoleLogger&&t>=n.options.consoleLevel&&n._emitToConsole(t,e,i),n):n},t.prototype._addToCache=function(t,e,i){this._emitToConsole("debug","MetricsLogger",["_addToCache:",arguments,this.options.addTime,this.cache.length()]);var n=this;try{var s=n.cache.add(n._buildEntry(t,e,i));s>=n._postSize&&n._postCache()}catch(t){n._emitToConsole("warn","MetricsLogger",["Metrics logger could not stringify logArguments:",e,i]),n._emitToConsole("error","MetricsLogger",[t])}return n},t.prototype._buildEntry=function(t,e,i){this._emitToConsole("debug","MetricsLogger",["_buildEntry:",arguments]);var n={level:t,namespace:this.options.clientPrefix+e,args:i};return this.options.addTime&&(n.time=(new Date).toISOString()),n},t.prototype._postCache=function(t){if(t=t||{},this._emitToConsole("info","MetricsLogger",["_postCache",t,this._postSize]),!this.options.postUrl||this._sending)return i.when({});var e=this,n=t.count||e._postSize,s=e.cache.get(n),o=s.length,r="function"==typeof e.options.getPingData?e.options.getPingData():{};return r.metrics=JSON.stringify(s),e._sending=!0,i.post(e.options.postUrl,r).always(function(){e._sending=!1}).fail(function(t,i,n){e._postSize=e.options.maxCacheSize,e.emit("error","MetricsLogger",["_postCache error:",t.readyState,t.status,t.responseJSON||t.responseText])}).done(function(t){"function"==typeof e.options.onServerResponse&&e.options.onServerResponse(t),e.cache.remove(o),e._postSize=e.options.postSize})},t.prototype._delayPost=function(){var t=this;t._waiting=setTimeout(function(){t._waiting=null},t.options.delayPostInMs)},t.prototype._emitToConsole=function(e,i,n){var s=this,o=s.options.consoleNamespaceWhitelist;if(!s.consoleLogger)return s;if(o&&o.indexOf(i)===-1)return s;var r=Array.prototype.slice.call(n,0);return r.unshift(i),e>=t.METRIC&&"function"==typeof s.consoleLogger.info?s.consoleLogger.info.apply(s.consoleLogger,r):e>=t.ERROR&&"function"==typeof s.consoleLogger.error?s.consoleLogger.error.apply(s.consoleLogger,r):(e>=t.WARN&&"function"==typeof s.consoleLogger.warn?s.consoleLogger.warn.apply(s.consoleLogger,r):e>=t.INFO&&"function"==typeof s.consoleLogger.info?s.consoleLogger.info.apply(s.consoleLogger,r):e>=t.DEBUG&&"function"==typeof s.consoleLogger.debug?s.consoleLogger.debug.apply(s.consoleLogger,r):"function"==typeof s.consoleLogger.log&&s.consoleLogger.log.apply(s.consoleLogger,r),s)},t.prototype.log=function(){this.emit(1,this.options.defaultNamespace,Array.prototype.slice.call(arguments,0))},t.prototype.debug=function(){this.emit(t.DEBUG,this.options.defaultNamespace,Array.prototype.slice.call(arguments,0))},t.prototype.info=function(){this.emit(t.INFO,this.options.defaultNamespace,Array.prototype.slice.call(arguments,0))},t.prototype.warn=function(){this.emit(t.WARN,this.options.defaultNamespace,Array.prototype.slice.call(arguments,0))},t.prototype.error=function(){this.emit(t.ERROR,this.options.defaultNamespace,Array.prototype.slice.call(arguments,0))},t.prototype.metric=function(){this.emit(t.METRIC,this.options.defaultNamespace,Array.prototype.slice.call(arguments,0))},e.defaultOptions={maxSize:5e3},e.prototype._init=function(t){if(!this._hasStorage())throw new Error("LoggingCache needs localStorage");if(!t.key)throw new Error("LoggingCache needs key for localStorage");return this.key=t.key,this._initStorage(),this.maxSize=t.maxSize||e.defaultOptions.maxSize,this},e.prototype._hasStorage=function(){var t="test";try{return localStorage.setItem(t,t),localStorage.removeItem(t),!0}catch(t){return!1}},e.prototype._initStorage=function(){return null===localStorage.getItem(this.key)?this.empty():this},e.prototype.add=function(t){var e=this,i=e._fetchAndParse(),n=i.length+1-e.maxSize;return n>0&&i.splice(0,n),i.push(t),e._unparseAndStore(i),i.length},e.prototype._fetchAndParse=function(){var t=this;return JSON.parse(localStorage.getItem(t.key))},e.prototype._unparseAndStore=function(t){var e=this;return localStorage.setItem(e.key,JSON.stringify(t))},e.prototype.length=function(){return this._fetchAndParse().length},e.prototype.get=function(t){return this._fetchAndParse().slice(0,t)},e.prototype.remove=function(t){var e=this._fetchAndParse(),i=e.splice(0,t);return this._unparseAndStore(e),i},e.prototype.empty=function(){return localStorage.setItem(this.key,"[]"),this},e.prototype.stringify=function(t){return JSON.stringify(this.get(t))},e.prototype.print=function(){console.log(JSON.stringify(this._fetchAndParse(),null," "))},{MetricsLogger:t,LoggingCache:e}}.apply(e,n),!(void 0!==s&&(t.exports=s))}).call(e,i(1))}]);
|
||
//# sourceMappingURL=libs.bundled.js.map
|