mirror of
https://github.com/internetee/registry.git
synced 2025-08-01 07:26:22 +02:00
8 lines
No EOL
228 KiB
JavaScript
8 lines
No EOL
228 KiB
JavaScript
!function(t,e){"object"==typeof module&&"object"==typeof module.exports?module.exports=t.document?e(t,!0):function(t){if(!t.document)throw new Error("jQuery requires a window with a document");return e(t)}:e(t)}("undefined"!=typeof window?window:this,function(t,e){function n(t){var e=t.length,n=re.type(t);return"function"===n||re.isWindow(t)?!1:1===t.nodeType&&e?!0:"array"===n||0===e||"number"==typeof e&&e>0&&e-1 in t}function i(t,e,n){if(re.isFunction(e))return re.grep(t,function(t,i){return!!e.call(t,i,t)!==n});if(e.nodeType)return re.grep(t,function(t){return t===e!==n});if("string"==typeof e){if(pe.test(e))return re.filter(e,t,n);e=re.filter(e,t)}return re.grep(t,function(t){return re.inArray(t,e)>=0!==n})}function r(t,e){do t=t[e];while(t&&1!==t.nodeType);return t}function o(t){var e=we[t]={};return re.each(t.match(be)||[],function(t,n){e[n]=!0}),e}function s(){fe.addEventListener?(fe.removeEventListener("DOMContentLoaded",a,!1),t.removeEventListener("load",a,!1)):(fe.detachEvent("onreadystatechange",a),t.detachEvent("onload",a))}function a(){(fe.addEventListener||"load"===event.type||"complete"===fe.readyState)&&(s(),re.ready())}function l(t,e,n){if(void 0===n&&1===t.nodeType){var i="data-"+e.replace(ke,"-$1").toLowerCase();if(n=t.getAttribute(i),"string"==typeof n){try{n="true"===n?!0:"false"===n?!1:"null"===n?null:+n+""===n?+n:Se.test(n)?re.parseJSON(n):n}catch(r){}re.data(t,e,n)}else n=void 0}return n}function u(t){var e;for(e in t)if(("data"!==e||!re.isEmptyObject(t[e]))&&"toJSON"!==e)return!1;return!0}function c(t,e,n,i){if(re.acceptData(t)){var r,o,s=re.expando,a=t.nodeType,l=a?re.cache:t,u=a?t[s]:t[s]&&s;if(u&&l[u]&&(i||l[u].data)||void 0!==n||"string"!=typeof e)return u||(u=a?t[s]=Q.pop()||re.guid++:s),l[u]||(l[u]=a?{}:{toJSON:re.noop}),("object"==typeof e||"function"==typeof e)&&(i?l[u]=re.extend(l[u],e):l[u].data=re.extend(l[u].data,e)),o=l[u],i||(o.data||(o.data={}),o=o.data),void 0!==n&&(o[re.camelCase(e)]=n),"string"==typeof e?(r=o[e],null==r&&(r=o[re.camelCase(e)])):r=o,r}}function d(t,e,n){if(re.acceptData(t)){var i,r,o=t.nodeType,s=o?re.cache:t,a=o?t[re.expando]:re.expando;if(s[a]){if(e&&(i=n?s[a]:s[a].data)){re.isArray(e)?e=e.concat(re.map(e,re.camelCase)):e in i?e=[e]:(e=re.camelCase(e),e=e in i?[e]:e.split(" ")),r=e.length;for(;r--;)delete i[e[r]];if(n?!u(i):!re.isEmptyObject(i))return}(n||(delete s[a].data,u(s[a])))&&(o?re.cleanData([t],!0):ne.deleteExpando||s!=s.window?delete s[a]:s[a]=null)}}}function p(){return!0}function h(){return!1}function f(){try{return fe.activeElement}catch(t){}}function g(t){var e=Fe.split("|"),n=t.createDocumentFragment();if(n.createElement)for(;e.length;)n.createElement(e.pop());return n}function m(t,e){var n,i,r=0,o=typeof t.getElementsByTagName!==Te?t.getElementsByTagName(e||"*"):typeof t.querySelectorAll!==Te?t.querySelectorAll(e||"*"):void 0;if(!o)for(o=[],n=t.childNodes||t;null!=(i=n[r]);r++)!e||re.nodeName(i,e)?o.push(i):re.merge(o,m(i,e));return void 0===e||e&&re.nodeName(t,e)?re.merge([t],o):o}function v(t){Ne.test(t.type)&&(t.defaultChecked=t.checked)}function y(t,e){return re.nodeName(t,"table")&&re.nodeName(11!==e.nodeType?e:e.firstChild,"tr")?t.getElementsByTagName("tbody")[0]||t.appendChild(t.ownerDocument.createElement("tbody")):t}function b(t){return t.type=(null!==re.find.attr(t,"type"))+"/"+t.type,t}function w(t){var e=Ke.exec(t.type);return e?t.type=e[1]:t.removeAttribute("type"),t}function x(t,e){for(var n,i=0;null!=(n=t[i]);i++)re._data(n,"globalEval",!e||re._data(e[i],"globalEval"))}function C(t,e){if(1===e.nodeType&&re.hasData(t)){var n,i,r,o=re._data(t),s=re._data(e,o),a=o.events;if(a){delete s.handle,s.events={};for(n in a)for(i=0,r=a[n].length;r>i;i++)re.event.add(e,n,a[n][i])}s.data&&(s.data=re.extend({},s.data))}}function T(t,e){var n,i,r;if(1===e.nodeType){if(n=e.nodeName.toLowerCase(),!ne.noCloneEvent&&e[re.expando]){r=re._data(e);for(i in r.events)re.removeEvent(e,i,r.handle);e.removeAttribute(re.expando)}"script"===n&&e.text!==t.text?(b(e).text=t.text,w(e)):"object"===n?(e.parentNode&&(e.outerHTML=t.outerHTML),ne.html5Clone&&t.innerHTML&&!re.trim(e.innerHTML)&&(e.innerHTML=t.innerHTML)):"input"===n&&Ne.test(t.type)?(e.defaultChecked=e.checked=t.checked,e.value!==t.value&&(e.value=t.value)):"option"===n?e.defaultSelected=e.selected=t.defaultSelected:("input"===n||"textarea"===n)&&(e.defaultValue=t.defaultValue)}}function S(e,n){var i,r=re(n.createElement(e)).appendTo(n.body),o=t.getDefaultComputedStyle&&(i=t.getDefaultComputedStyle(r[0]))?i.display:re.css(r[0],"display");return r.detach(),o}function k(t){var e=fe,n=Ze[t];return n||(n=S(t,e),"none"!==n&&n||(Je=(Je||re("<iframe frameborder='0' width='0' height='0'/>")).appendTo(e.documentElement),e=(Je[0].contentWindow||Je[0].contentDocument).document,e.write(),e.close(),n=S(t,e),Je.detach()),Ze[t]=n),n}function E(t,e){return{get:function(){var n=t();if(null!=n)return n?void delete this.get:(this.get=e).apply(this,arguments)}}}function $(t,e){if(e in t)return e;for(var n=e.charAt(0).toUpperCase()+e.slice(1),i=e,r=hn.length;r--;)if(e=hn[r]+n,e in t)return e;return i}function _(t,e){for(var n,i,r,o=[],s=0,a=t.length;a>s;s++)i=t[s],i.style&&(o[s]=re._data(i,"olddisplay"),n=i.style.display,e?(o[s]||"none"!==n||(i.style.display=""),""===i.style.display&&_e(i)&&(o[s]=re._data(i,"olddisplay",k(i.nodeName)))):(r=_e(i),(n&&"none"!==n||!r)&&re._data(i,"olddisplay",r?n:re.css(i,"display"))));for(s=0;a>s;s++)i=t[s],i.style&&(e&&"none"!==i.style.display&&""!==i.style.display||(i.style.display=e?o[s]||"":"none"));return t}function A(t,e,n){var i=un.exec(e);return i?Math.max(0,i[1]-(n||0))+(i[2]||"px"):e}function N(t,e,n,i,r){for(var o=n===(i?"border":"content")?4:"width"===e?1:0,s=0;4>o;o+=2)"margin"===n&&(s+=re.css(t,n+$e[o],!0,r)),i?("content"===n&&(s-=re.css(t,"padding"+$e[o],!0,r)),"margin"!==n&&(s-=re.css(t,"border"+$e[o]+"Width",!0,r))):(s+=re.css(t,"padding"+$e[o],!0,r),"padding"!==n&&(s+=re.css(t,"border"+$e[o]+"Width",!0,r)));return s}function D(t,e,n){var i=!0,r="width"===e?t.offsetWidth:t.offsetHeight,o=tn(t),s=ne.boxSizing&&"border-box"===re.css(t,"boxSizing",!1,o);if(0>=r||null==r){if(r=en(t,e,o),(0>r||null==r)&&(r=t.style[e]),rn.test(r))return r;i=s&&(ne.boxSizingReliable()||r===t.style[e]),r=parseFloat(r)||0}return r+N(t,e,n||(s?"border":"content"),i,o)+"px"}function O(t,e,n,i,r){return new O.prototype.init(t,e,n,i,r)}function I(){return setTimeout(function(){fn=void 0}),fn=re.now()}function j(t,e){var n,i={height:t},r=0;for(e=e?1:0;4>r;r+=2-e)n=$e[r],i["margin"+n]=i["padding"+n]=t;return e&&(i.opacity=i.width=t),i}function L(t,e,n){for(var i,r=(wn[e]||[]).concat(wn["*"]),o=0,s=r.length;s>o;o++)if(i=r[o].call(n,e,t))return i}function F(t,e,n){var i,r,o,s,a,l,u,c,d=this,p={},h=t.style,f=t.nodeType&&_e(t),g=re._data(t,"fxshow");n.queue||(a=re._queueHooks(t,"fx"),null==a.unqueued&&(a.unqueued=0,l=a.empty.fire,a.empty.fire=function(){a.unqueued||l()}),a.unqueued++,d.always(function(){d.always(function(){a.unqueued--,re.queue(t,"fx").length||a.empty.fire()})})),1===t.nodeType&&("height"in e||"width"in e)&&(n.overflow=[h.overflow,h.overflowX,h.overflowY],u=re.css(t,"display"),c="none"===u?re._data(t,"olddisplay")||k(t.nodeName):u,"inline"===c&&"none"===re.css(t,"float")&&(ne.inlineBlockNeedsLayout&&"inline"!==k(t.nodeName)?h.zoom=1:h.display="inline-block")),n.overflow&&(h.overflow="hidden",ne.shrinkWrapBlocks()||d.always(function(){h.overflow=n.overflow[0],h.overflowX=n.overflow[1],h.overflowY=n.overflow[2]}));for(i in e)if(r=e[i],mn.exec(r)){if(delete e[i],o=o||"toggle"===r,r===(f?"hide":"show")){if("show"!==r||!g||void 0===g[i])continue;f=!0}p[i]=g&&g[i]||re.style(t,i)}else u=void 0;if(re.isEmptyObject(p))"inline"===("none"===u?k(t.nodeName):u)&&(h.display=u);else{g?"hidden"in g&&(f=g.hidden):g=re._data(t,"fxshow",{}),o&&(g.hidden=!f),f?re(t).show():d.done(function(){re(t).hide()}),d.done(function(){var e;re._removeData(t,"fxshow");for(e in p)re.style(t,e,p[e])});for(i in p)s=L(f?g[i]:0,i,d),i in g||(g[i]=s.start,f&&(s.end=s.start,s.start="width"===i||"height"===i?1:0))}}function R(t,e){var n,i,r,o,s;for(n in t)if(i=re.camelCase(n),r=e[i],o=t[n],re.isArray(o)&&(r=o[1],o=t[n]=o[0]),n!==i&&(t[i]=o,delete t[n]),s=re.cssHooks[i],s&&"expand"in s){o=s.expand(o),delete t[i];for(n in o)n in t||(t[n]=o[n],e[n]=r)}else e[i]=r}function H(t,e,n){var i,r,o=0,s=bn.length,a=re.Deferred().always(function(){delete l.elem}),l=function(){if(r)return!1;for(var e=fn||I(),n=Math.max(0,u.startTime+u.duration-e),i=n/u.duration||0,o=1-i,s=0,l=u.tweens.length;l>s;s++)u.tweens[s].run(o);return a.notifyWith(t,[u,o,n]),1>o&&l?n:(a.resolveWith(t,[u]),!1)},u=a.promise({elem:t,props:re.extend({},e),opts:re.extend(!0,{specialEasing:{}},n),originalProperties:e,originalOptions:n,startTime:fn||I(),duration:n.duration,tweens:[],createTween:function(e,n){var i=re.Tween(t,u.opts,e,n,u.opts.specialEasing[e]||u.opts.easing);return u.tweens.push(i),i},stop:function(e){var n=0,i=e?u.tweens.length:0;if(r)return this;for(r=!0;i>n;n++)u.tweens[n].run(1);return e?a.resolveWith(t,[u,e]):a.rejectWith(t,[u,e]),this}}),c=u.props;for(R(c,u.opts.specialEasing);s>o;o++)if(i=bn[o].call(u,t,c,u.opts))return i;return re.map(c,L,u),re.isFunction(u.opts.start)&&u.opts.start.call(t,u),re.fx.timer(re.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 q(t){return function(e,n){"string"!=typeof e&&(n=e,e="*");var i,r=0,o=e.toLowerCase().match(be)||[];if(re.isFunction(n))for(;i=o[r++];)"+"===i.charAt(0)?(i=i.slice(1)||"*",(t[i]=t[i]||[]).unshift(n)):(t[i]=t[i]||[]).push(n)}}function P(t,e,n,i){function r(a){var l;return o[a]=!0,re.each(t[a]||[],function(t,a){var u=a(e,n,i);return"string"!=typeof u||s||o[u]?s?!(l=u):void 0:(e.dataTypes.unshift(u),r(u),!1)}),l}var o={},s=t===Wn;return r(e.dataTypes[0])||!o["*"]&&r("*")}function z(t,e){var n,i,r=re.ajaxSettings.flatOptions||{};for(i in e)void 0!==e[i]&&((r[i]?t:n||(n={}))[i]=e[i]);return n&&re.extend(!0,t,n),t}function M(t,e,n){for(var i,r,o,s,a=t.contents,l=t.dataTypes;"*"===l[0];)l.shift(),void 0===r&&(r=t.mimeType||e.getResponseHeader("Content-Type"));if(r)for(s in a)if(a[s]&&a[s].test(r)){l.unshift(s);break}if(l[0]in n)o=l[0];else{for(s in n){if(!l[0]||t.converters[s+" "+l[0]]){o=s;break}i||(i=s)}o=o||i}return o?(o!==l[0]&&l.unshift(o),n[o]):void 0}function B(t,e,n,i){var r,o,s,a,l,u={},c=t.dataTypes.slice();if(c[1])for(s in t.converters)u[s.toLowerCase()]=t.converters[s];for(o=c.shift();o;)if(t.responseFields[o]&&(n[t.responseFields[o]]=e),!l&&i&&t.dataFilter&&(e=t.dataFilter(e,t.dataType)),l=o,o=c.shift())if("*"===o)o=l;else if("*"!==l&&l!==o){if(s=u[l+" "+o]||u["* "+o],!s)for(r in u)if(a=r.split(" "),a[1]===o&&(s=u[l+" "+a[0]]||u["* "+a[0]])){s===!0?s=u[r]:u[r]!==!0&&(o=a[0],c.unshift(a[1]));break}if(s!==!0)if(s&&t["throws"])e=s(e);else try{e=s(e)}catch(d){return{state:"parsererror",error:s?d:"No conversion from "+l+" to "+o}}}return{state:"success",data:e}}function W(t,e,n,i){var r;if(re.isArray(e))re.each(e,function(e,r){n||Qn.test(t)?i(t,r):W(t+"["+("object"==typeof r?e:"")+"]",r,n,i)});else if(n||"object"!==re.type(e))i(t,e);else for(r in e)W(t+"["+r+"]",e[r],n,i)}function U(){try{return new t.XMLHttpRequest}catch(e){}}function V(){try{return new t.ActiveXObject("Microsoft.XMLHTTP")}catch(e){}}function K(t){return re.isWindow(t)?t:9===t.nodeType?t.defaultView||t.parentWindow:!1}var Q=[],X=Q.slice,G=Q.concat,Y=Q.push,J=Q.indexOf,Z={},te=Z.toString,ee=Z.hasOwnProperty,ne={},ie="1.11.2",re=function(t,e){return new re.fn.init(t,e)},oe=/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,se=/^-ms-/,ae=/-([\da-z])/gi,le=function(t,e){return e.toUpperCase()};re.fn=re.prototype={jquery:ie,constructor:re,selector:"",length:0,toArray:function(){return X.call(this)},get:function(t){return null!=t?0>t?this[t+this.length]:this[t]:X.call(this)},pushStack:function(t){var e=re.merge(this.constructor(),t);return e.prevObject=this,e.context=this.context,e},each:function(t,e){return re.each(this,t,e)},map:function(t){return this.pushStack(re.map(this,function(e,n){return t.call(e,n,e)}))},slice:function(){return this.pushStack(X.apply(this,arguments))},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},eq:function(t){var e=this.length,n=+t+(0>t?e:0);return this.pushStack(n>=0&&e>n?[this[n]]:[])},end:function(){return this.prevObject||this.constructor(null)},push:Y,sort:Q.sort,splice:Q.splice},re.extend=re.fn.extend=function(){var t,e,n,i,r,o,s=arguments[0]||{},a=1,l=arguments.length,u=!1;for("boolean"==typeof s&&(u=s,s=arguments[a]||{},a++),"object"==typeof s||re.isFunction(s)||(s={}),a===l&&(s=this,a--);l>a;a++)if(null!=(r=arguments[a]))for(i in r)t=s[i],n=r[i],s!==n&&(u&&n&&(re.isPlainObject(n)||(e=re.isArray(n)))?(e?(e=!1,o=t&&re.isArray(t)?t:[]):o=t&&re.isPlainObject(t)?t:{},s[i]=re.extend(u,o,n)):void 0!==n&&(s[i]=n));return s},re.extend({expando:"jQuery"+(ie+Math.random()).replace(/\D/g,""),isReady:!0,error:function(t){throw new Error(t)},noop:function(){},isFunction:function(t){return"function"===re.type(t)},isArray:Array.isArray||function(t){return"array"===re.type(t)},isWindow:function(t){return null!=t&&t==t.window},isNumeric:function(t){return!re.isArray(t)&&t-parseFloat(t)+1>=0},isEmptyObject:function(t){var e;for(e in t)return!1;return!0},isPlainObject:function(t){var e;if(!t||"object"!==re.type(t)||t.nodeType||re.isWindow(t))return!1;try{if(t.constructor&&!ee.call(t,"constructor")&&!ee.call(t.constructor.prototype,"isPrototypeOf"))return!1}catch(n){return!1}if(ne.ownLast)for(e in t)return ee.call(t,e);for(e in t);return void 0===e||ee.call(t,e)},type:function(t){return null==t?t+"":"object"==typeof t||"function"==typeof t?Z[te.call(t)]||"object":typeof t},globalEval:function(e){e&&re.trim(e)&&(t.execScript||function(e){t.eval.call(t,e)})(e)},camelCase:function(t){return t.replace(se,"ms-").replace(ae,le)},nodeName:function(t,e){return t.nodeName&&t.nodeName.toLowerCase()===e.toLowerCase()},each:function(t,e,i){var r,o=0,s=t.length,a=n(t);if(i){if(a)for(;s>o&&(r=e.apply(t[o],i),r!==!1);o++);else for(o in t)if(r=e.apply(t[o],i),r===!1)break}else if(a)for(;s>o&&(r=e.call(t[o],o,t[o]),r!==!1);o++);else for(o in t)if(r=e.call(t[o],o,t[o]),r===!1)break;return t},trim:function(t){return null==t?"":(t+"").replace(oe,"")},makeArray:function(t,e){var i=e||[];return null!=t&&(n(Object(t))?re.merge(i,"string"==typeof t?[t]:t):Y.call(i,t)),i},inArray:function(t,e,n){var i;if(e){if(J)return J.call(e,t,n);for(i=e.length,n=n?0>n?Math.max(0,i+n):n:0;i>n;n++)if(n in e&&e[n]===t)return n}return-1},merge:function(t,e){for(var n=+e.length,i=0,r=t.length;n>i;)t[r++]=e[i++];if(n!==n)for(;void 0!==e[i];)t[r++]=e[i++];return t.length=r,t},grep:function(t,e,n){for(var i,r=[],o=0,s=t.length,a=!n;s>o;o++)i=!e(t[o],o),i!==a&&r.push(t[o]);return r},map:function(t,e,i){var r,o=0,s=t.length,a=n(t),l=[];if(a)for(;s>o;o++)r=e(t[o],o,i),null!=r&&l.push(r);else for(o in t)r=e(t[o],o,i),null!=r&&l.push(r);return G.apply([],l)},guid:1,proxy:function(t,e){var n,i,r;return"string"==typeof e&&(r=t[e],e=t,t=r),re.isFunction(t)?(n=X.call(arguments,2),i=function(){return t.apply(e||this,n.concat(X.call(arguments)))},i.guid=t.guid=t.guid||re.guid++,i):void 0},now:function(){return+new Date},support:ne}),re.each("Boolean Number String Function Array Date RegExp Object Error".split(" "),function(t,e){Z["[object "+e+"]"]=e.toLowerCase()});var ue=function(t){function e(t,e,n,i){var r,o,s,a,l,u,d,h,f,g;if((e?e.ownerDocument||e:P)!==O&&D(e),e=e||O,n=n||[],a=e.nodeType,"string"!=typeof t||!t||1!==a&&9!==a&&11!==a)return n;if(!i&&j){if(11!==a&&(r=ye.exec(t)))if(s=r[1]){if(9===a){if(o=e.getElementById(s),!o||!o.parentNode)return n;if(o.id===s)return n.push(o),n}else if(e.ownerDocument&&(o=e.ownerDocument.getElementById(s))&&H(e,o)&&o.id===s)return n.push(o),n}else{if(r[2])return J.apply(n,e.getElementsByTagName(t)),n;if((s=r[3])&&x.getElementsByClassName)return J.apply(n,e.getElementsByClassName(s)),n}if(x.qsa&&(!L||!L.test(t))){if(h=d=q,f=e,g=1!==a&&t,1===a&&"object"!==e.nodeName.toLowerCase()){for(u=k(t),(d=e.getAttribute("id"))?h=d.replace(we,"\\$&"):e.setAttribute("id",h),h="[id='"+h+"'] ",l=u.length;l--;)u[l]=h+p(u[l]);f=be.test(t)&&c(e.parentNode)||e,g=u.join(",")}if(g)try{return J.apply(n,f.querySelectorAll(g)),n}catch(m){}finally{d||e.removeAttribute("id")}}}return $(t.replace(le,"$1"),e,n,i)}function n(){function t(n,i){return e.push(n+" ")>C.cacheLength&&delete t[e.shift()],t[n+" "]=i}var e=[];return t}function i(t){return t[q]=!0,t}function r(t){var e=O.createElement("div");try{return!!t(e)}catch(n){return!1}finally{e.parentNode&&e.parentNode.removeChild(e),e=null}}function o(t,e){for(var n=t.split("|"),i=t.length;i--;)C.attrHandle[n[i]]=e}function s(t,e){var n=e&&t,i=n&&1===t.nodeType&&1===e.nodeType&&(~e.sourceIndex||K)-(~t.sourceIndex||K);if(i)return i;if(n)for(;n=n.nextSibling;)if(n===e)return-1;return t?1:-1}function a(t){return function(e){var n=e.nodeName.toLowerCase();return"input"===n&&e.type===t}}function l(t){return function(e){var n=e.nodeName.toLowerCase();return("input"===n||"button"===n)&&e.type===t}}function u(t){return i(function(e){return e=+e,i(function(n,i){for(var r,o=t([],n.length,e),s=o.length;s--;)n[r=o[s]]&&(n[r]=!(i[r]=n[r]))})})}function c(t){return t&&"undefined"!=typeof t.getElementsByTagName&&t}function d(){}function p(t){for(var e=0,n=t.length,i="";n>e;e++)i+=t[e].value;return i}function h(t,e,n){var i=e.dir,r=n&&"parentNode"===i,o=M++;return e.first?function(e,n,o){for(;e=e[i];)if(1===e.nodeType||r)return t(e,n,o)}:function(e,n,s){var a,l,u=[z,o];if(s){for(;e=e[i];)if((1===e.nodeType||r)&&t(e,n,s))return!0}else for(;e=e[i];)if(1===e.nodeType||r){if(l=e[q]||(e[q]={}),(a=l[i])&&a[0]===z&&a[1]===o)return u[2]=a[2];if(l[i]=u,u[2]=t(e,n,s))return!0}}}function f(t){return t.length>1?function(e,n,i){for(var r=t.length;r--;)if(!t[r](e,n,i))return!1;return!0}:t[0]}function g(t,n,i){for(var r=0,o=n.length;o>r;r++)e(t,n[r],i);return i}function m(t,e,n,i,r){for(var o,s=[],a=0,l=t.length,u=null!=e;l>a;a++)(o=t[a])&&(!n||n(o,i,r))&&(s.push(o),u&&e.push(a));return s}function v(t,e,n,r,o,s){return r&&!r[q]&&(r=v(r)),o&&!o[q]&&(o=v(o,s)),i(function(i,s,a,l){var u,c,d,p=[],h=[],f=s.length,v=i||g(e||"*",a.nodeType?[a]:a,[]),y=!t||!i&&e?v:m(v,p,t,a,l),b=n?o||(i?t:f||r)?[]:s:y;if(n&&n(y,b,a,l),r)for(u=m(b,h),r(u,[],a,l),c=u.length;c--;)(d=u[c])&&(b[h[c]]=!(y[h[c]]=d));if(i){if(o||t){if(o){for(u=[],c=b.length;c--;)(d=b[c])&&u.push(y[c]=d);o(null,b=[],u,l)}for(c=b.length;c--;)(d=b[c])&&(u=o?te(i,d):p[c])>-1&&(i[u]=!(s[u]=d))}}else b=m(b===s?b.splice(f,b.length):b),o?o(null,s,b,l):J.apply(s,b)})}function y(t){for(var e,n,i,r=t.length,o=C.relative[t[0].type],s=o||C.relative[" "],a=o?1:0,l=h(function(t){return t===e},s,!0),u=h(function(t){return te(e,t)>-1},s,!0),c=[function(t,n,i){var r=!o&&(i||n!==_)||((e=n).nodeType?l(t,n,i):u(t,n,i));return e=null,r}];r>a;a++)if(n=C.relative[t[a].type])c=[h(f(c),n)];else{if(n=C.filter[t[a].type].apply(null,t[a].matches),n[q]){for(i=++a;r>i&&!C.relative[t[i].type];i++);return v(a>1&&f(c),a>1&&p(t.slice(0,a-1).concat({value:" "===t[a-2].type?"*":""})).replace(le,"$1"),n,i>a&&y(t.slice(a,i)),r>i&&y(t=t.slice(i)),r>i&&p(t))}c.push(n)}return f(c)}function b(t,n){var r=n.length>0,o=t.length>0,s=function(i,s,a,l,u){var c,d,p,h=0,f="0",g=i&&[],v=[],y=_,b=i||o&&C.find.TAG("*",u),w=z+=null==y?1:Math.random()||.1,x=b.length;for(u&&(_=s!==O&&s);f!==x&&null!=(c=b[f]);f++){if(o&&c){for(d=0;p=t[d++];)if(p(c,s,a)){l.push(c);break}u&&(z=w)}r&&((c=!p&&c)&&h--,i&&g.push(c))}if(h+=f,r&&f!==h){for(d=0;p=n[d++];)p(g,v,s,a);if(i){if(h>0)for(;f--;)g[f]||v[f]||(v[f]=G.call(l));v=m(v)}J.apply(l,v),u&&!i&&v.length>0&&h+n.length>1&&e.uniqueSort(l)}return u&&(z=w,_=y),g};return r?i(s):s}var w,x,C,T,S,k,E,$,_,A,N,D,O,I,j,L,F,R,H,q="sizzle"+1*new Date,P=t.document,z=0,M=0,B=n(),W=n(),U=n(),V=function(t,e){return t===e&&(N=!0),0},K=1<<31,Q={}.hasOwnProperty,X=[],G=X.pop,Y=X.push,J=X.push,Z=X.slice,te=function(t,e){for(var n=0,i=t.length;i>n;n++)if(t[n]===e)return n;return-1},ee="checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped",ne="[\\x20\\t\\r\\n\\f]",ie="(?:\\\\.|[\\w-]|[^\\x00-\\xa0])+",re=ie.replace("w","w#"),oe="\\["+ne+"*("+ie+")(?:"+ne+"*([*^$|!~]?=)"+ne+"*(?:'((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\"|("+re+"))|)"+ne+"*\\]",se=":("+ie+")(?:\\((('((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\")|((?:\\\\.|[^\\\\()[\\]]|"+oe+")*)|.*)\\)|)",ae=new RegExp(ne+"+","g"),le=new RegExp("^"+ne+"+|((?:^|[^\\\\])(?:\\\\.)*)"+ne+"+$","g"),ue=new RegExp("^"+ne+"*,"+ne+"*"),ce=new RegExp("^"+ne+"*([>+~]|"+ne+")"+ne+"*"),de=new RegExp("="+ne+"*([^\\]'\"]*?)"+ne+"*\\]","g"),pe=new RegExp(se),he=new RegExp("^"+re+"$"),fe={ID:new RegExp("^#("+ie+")"),CLASS:new RegExp("^\\.("+ie+")"),TAG:new RegExp("^("+ie.replace("w","w*")+")"),ATTR:new RegExp("^"+oe),PSEUDO:new RegExp("^"+se),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+ne+"*(even|odd|(([+-]|)(\\d*)n|)"+ne+"*(?:([+-]|)"+ne+"*(\\d+)|))"+ne+"*\\)|)","i"),bool:new RegExp("^(?:"+ee+")$","i"),needsContext:new RegExp("^"+ne+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+ne+"*((?:-\\d)?\\d*)"+ne+"*\\)|)(?=[^-]|$)","i")},ge=/^(?:input|select|textarea|button)$/i,me=/^h\d$/i,ve=/^[^{]+\{\s*\[native \w/,ye=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,be=/[+~]/,we=/'|\\/g,xe=new RegExp("\\\\([\\da-f]{1,6}"+ne+"?|("+ne+")|.)","ig"),Ce=function(t,e,n){var i="0x"+e-65536;return i!==i||n?e:0>i?String.fromCharCode(i+65536):String.fromCharCode(i>>10|55296,1023&i|56320)},Te=function(){D()};try{J.apply(X=Z.call(P.childNodes),P.childNodes),X[P.childNodes.length].nodeType}catch(Se){J={apply:X.length?function(t,e){Y.apply(t,Z.call(e))}:function(t,e){for(var n=t.length,i=0;t[n++]=e[i++];);t.length=n-1}}}x=e.support={},S=e.isXML=function(t){var e=t&&(t.ownerDocument||t).documentElement;return e?"HTML"!==e.nodeName:!1},D=e.setDocument=function(t){var e,n,i=t?t.ownerDocument||t:P;return i!==O&&9===i.nodeType&&i.documentElement?(O=i,I=i.documentElement,n=i.defaultView,n&&n!==n.top&&(n.addEventListener?n.addEventListener("unload",Te,!1):n.attachEvent&&n.attachEvent("onunload",Te)),j=!S(i),x.attributes=r(function(t){return t.className="i",!t.getAttribute("className")}),x.getElementsByTagName=r(function(t){return t.appendChild(i.createComment("")),!t.getElementsByTagName("*").length}),x.getElementsByClassName=ve.test(i.getElementsByClassName),x.getById=r(function(t){return I.appendChild(t).id=q,!i.getElementsByName||!i.getElementsByName(q).length}),x.getById?(C.find.ID=function(t,e){if("undefined"!=typeof e.getElementById&&j){var n=e.getElementById(t);return n&&n.parentNode?[n]:[]}},C.filter.ID=function(t){var e=t.replace(xe,Ce);return function(t){return t.getAttribute("id")===e}}):(delete C.find.ID,C.filter.ID=function(t){var e=t.replace(xe,Ce);return function(t){var n="undefined"!=typeof t.getAttributeNode&&t.getAttributeNode("id");return n&&n.value===e}}),C.find.TAG=x.getElementsByTagName?function(t,e){return"undefined"!=typeof e.getElementsByTagName?e.getElementsByTagName(t):x.qsa?e.querySelectorAll(t):void 0}:function(t,e){var n,i=[],r=0,o=e.getElementsByTagName(t);if("*"===t){for(;n=o[r++];)1===n.nodeType&&i.push(n);return i}return o},C.find.CLASS=x.getElementsByClassName&&function(t,e){return j?e.getElementsByClassName(t):void 0},F=[],L=[],(x.qsa=ve.test(i.querySelectorAll))&&(r(function(t){I.appendChild(t).innerHTML="<a id='"+q+"'></a><select id='"+q+"-\f]' msallowcapture=''><option selected=''></option></select>",t.querySelectorAll("[msallowcapture^='']").length&&L.push("[*^$]="+ne+"*(?:''|\"\")"),t.querySelectorAll("[selected]").length||L.push("\\["+ne+"*(?:value|"+ee+")"),t.querySelectorAll("[id~="+q+"-]").length||L.push("~="),t.querySelectorAll(":checked").length||L.push(":checked"),t.querySelectorAll("a#"+q+"+*").length||L.push(".#.+[+~]")}),r(function(t){var e=i.createElement("input");e.setAttribute("type","hidden"),t.appendChild(e).setAttribute("name","D"),t.querySelectorAll("[name=d]").length&&L.push("name"+ne+"*[*^$|!~]?="),t.querySelectorAll(":enabled").length||L.push(":enabled",":disabled"),t.querySelectorAll("*,:x"),L.push(",.*:")})),(x.matchesSelector=ve.test(R=I.matches||I.webkitMatchesSelector||I.mozMatchesSelector||I.oMatchesSelector||I.msMatchesSelector))&&r(function(t){x.disconnectedMatch=R.call(t,"div"),R.call(t,"[s!='']:x"),F.push("!=",se)}),L=L.length&&new RegExp(L.join("|")),F=F.length&&new RegExp(F.join("|")),e=ve.test(I.compareDocumentPosition),H=e||ve.test(I.contains)?function(t,e){var n=9===t.nodeType?t.documentElement:t,i=e&&e.parentNode;return t===i||!(!i||1!==i.nodeType||!(n.contains?n.contains(i):t.compareDocumentPosition&&16&t.compareDocumentPosition(i)))}: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 n=!t.compareDocumentPosition-!e.compareDocumentPosition;return n?n:(n=(t.ownerDocument||t)===(e.ownerDocument||e)?t.compareDocumentPosition(e):1,1&n||!x.sortDetached&&e.compareDocumentPosition(t)===n?t===i||t.ownerDocument===P&&H(P,t)?-1:e===i||e.ownerDocument===P&&H(P,e)?1:A?te(A,t)-te(A,e):0:4&n?-1:1)}:function(t,e){if(t===e)return N=!0,0;var n,r=0,o=t.parentNode,a=e.parentNode,l=[t],u=[e];if(!o||!a)return t===i?-1:e===i?1:o?-1:a?1:A?te(A,t)-te(A,e):0;if(o===a)return s(t,e);for(n=t;n=n.parentNode;)l.unshift(n);for(n=e;n=n.parentNode;)u.unshift(n);for(;l[r]===u[r];)r++;return r?s(l[r],u[r]):l[r]===P?-1:u[r]===P?1:0},i):O},e.matches=function(t,n){return e(t,null,null,n)},e.matchesSelector=function(t,n){if((t.ownerDocument||t)!==O&&D(t),n=n.replace(de,"='$1']"),!(!x.matchesSelector||!j||F&&F.test(n)||L&&L.test(n)))try{var i=R.call(t,n);if(i||x.disconnectedMatch||t.document&&11!==t.document.nodeType)return i}catch(r){}return e(n,O,null,[t]).length>0},e.contains=function(t,e){return(t.ownerDocument||t)!==O&&D(t),H(t,e)},e.attr=function(t,e){(t.ownerDocument||t)!==O&&D(t);var n=C.attrHandle[e.toLowerCase()],i=n&&Q.call(C.attrHandle,e.toLowerCase())?n(t,e,!j):void 0;return void 0!==i?i:x.attributes||!j?t.getAttribute(e):(i=t.getAttributeNode(e))&&i.specified?i.value:null},e.error=function(t){throw new Error("Syntax error, unrecognized expression: "+t)},e.uniqueSort=function(t){var e,n=[],i=0,r=0;if(N=!x.detectDuplicates,A=!x.sortStable&&t.slice(0),t.sort(V),N){for(;e=t[r++];)e===t[r]&&(i=n.push(r));for(;i--;)t.splice(n[i],1)}return A=null,t},T=e.getText=function(t){var e,n="",i=0,r=t.nodeType;if(r){if(1===r||9===r||11===r){if("string"==typeof t.textContent)return t.textContent;for(t=t.firstChild;t;t=t.nextSibling)n+=T(t)}else if(3===r||4===r)return t.nodeValue}else for(;e=t[i++];)n+=T(e);return n},C=e.selectors={cacheLength:50,createPseudo:i,match:fe,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(xe,Ce),t[3]=(t[3]||t[4]||t[5]||"").replace(xe,Ce),"~="===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,n=!t[6]&&t[2];return fe.CHILD.test(t[0])?null:(t[3]?t[2]=t[4]||t[5]||"":n&&pe.test(n)&&(e=k(n,!0))&&(e=n.indexOf(")",n.length-e)-n.length)&&(t[0]=t[0].slice(0,e),t[2]=n.slice(0,e)),t.slice(0,3))}},filter:{TAG:function(t){var e=t.replace(xe,Ce).toLowerCase();return"*"===t?function(){return!0}:function(t){return t.nodeName&&t.nodeName.toLowerCase()===e}},CLASS:function(t){var e=B[t+" "];return e||(e=new RegExp("(^|"+ne+")"+t+"("+ne+"|$)"))&&B(t,function(t){return e.test("string"==typeof t.className&&t.className||"undefined"!=typeof t.getAttribute&&t.getAttribute("class")||"")})},ATTR:function(t,n,i){return function(r){var o=e.attr(r,t);return null==o?"!="===n:n?(o+="","="===n?o===i:"!="===n?o!==i:"^="===n?i&&0===o.indexOf(i):"*="===n?i&&o.indexOf(i)>-1:"$="===n?i&&o.slice(-i.length)===i:"~="===n?(" "+o.replace(ae," ")+" ").indexOf(i)>-1:"|="===n?o===i||o.slice(0,i.length+1)===i+"-":!1):!0}},CHILD:function(t,e,n,i,r){var o="nth"!==t.slice(0,3),s="last"!==t.slice(-4),a="of-type"===e;return 1===i&&0===r?function(t){return!!t.parentNode}:function(e,n,l){var u,c,d,p,h,f,g=o!==s?"nextSibling":"previousSibling",m=e.parentNode,v=a&&e.nodeName.toLowerCase(),y=!l&&!a;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=[s?m.firstChild:m.lastChild],s&&y){for(c=m[q]||(m[q]={}),u=c[t]||[],h=u[0]===z&&u[1],p=u[0]===z&&u[2],d=h&&m.childNodes[h];d=++h&&d&&d[g]||(p=h=0)||f.pop();)if(1===d.nodeType&&++p&&d===e){c[t]=[z,h,p];break}}else if(y&&(u=(e[q]||(e[q]={}))[t])&&u[0]===z)p=u[1];else for(;(d=++h&&d&&d[g]||(p=h=0)||f.pop())&&((a?d.nodeName.toLowerCase()!==v:1!==d.nodeType)||!++p||(y&&((d[q]||(d[q]={}))[t]=[z,p]),d!==e)););return p-=r,p===i||p%i===0&&p/i>=0}}},PSEUDO:function(t,n){var r,o=C.pseudos[t]||C.setFilters[t.toLowerCase()]||e.error("unsupported pseudo: "+t);return o[q]?o(n):o.length>1?(r=[t,t,"",n],C.setFilters.hasOwnProperty(t.toLowerCase())?i(function(t,e){for(var i,r=o(t,n),s=r.length;s--;)i=te(t,r[s]),t[i]=!(e[i]=r[s])}):function(t){return o(t,0,r)}):o}},pseudos:{not:i(function(t){var e=[],n=[],r=E(t.replace(le,"$1"));return r[q]?i(function(t,e,n,i){for(var o,s=r(t,null,i,[]),a=t.length;a--;)(o=s[a])&&(t[a]=!(e[a]=o))}):function(t,i,o){return e[0]=t,r(e,null,o,n),e[0]=null,!n.pop()}}),has:i(function(t){return function(n){return e(t,n).length>0}}),contains:i(function(t){return t=t.replace(xe,Ce),function(e){return(e.textContent||e.innerText||T(e)).indexOf(t)>-1}}),lang:i(function(t){return he.test(t||"")||e.error("unsupported lang: "+t),t=t.replace(xe,Ce).toLowerCase(),function(e){var n;do if(n=j?e.lang:e.getAttribute("xml:lang")||e.getAttribute("lang"))return n=n.toLowerCase(),n===t||0===n.indexOf(t+"-");while((e=e.parentNode)&&1===e.nodeType);return!1}}),target:function(e){var n=t.location&&t.location.hash;return n&&n.slice(1)===e.id},root:function(t){return t===I},focus:function(t){return t===O.activeElement&&(!O.hasFocus||O.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!C.pseudos.empty(t)},header:function(t){return me.test(t.nodeName)},input:function(t){return ge.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,n){return[0>n?n+e:n]}),even:u(function(t,e){for(var n=0;e>n;n+=2)t.push(n);return t}),odd:u(function(t,e){for(var n=1;e>n;n+=2)t.push(n);return t}),lt:u(function(t,e,n){for(var i=0>n?n+e:n;--i>=0;)t.push(i);return t}),gt:u(function(t,e,n){for(var i=0>n?n+e:n;++i<e;)t.push(i);return t})}},C.pseudos.nth=C.pseudos.eq;for(w in{radio:!0,checkbox:!0,file:!0,password:!0,image:!0})C.pseudos[w]=a(w);for(w in{submit:!0,reset:!0})C.pseudos[w]=l(w);return d.prototype=C.filters=C.pseudos,C.setFilters=new d,k=e.tokenize=function(t,n){var i,r,o,s,a,l,u,c=W[t+" "];if(c)return n?0:c.slice(0);for(a=t,l=[],u=C.preFilter;a;){(!i||(r=ue.exec(a)))&&(r&&(a=a.slice(r[0].length)||a),l.push(o=[])),i=!1,(r=ce.exec(a))&&(i=r.shift(),o.push({value:i,type:r[0].replace(le," ")}),a=a.slice(i.length));for(s in C.filter)!(r=fe[s].exec(a))||u[s]&&!(r=u[s](r))||(i=r.shift(),o.push({value:i,type:s,matches:r}),a=a.slice(i.length));if(!i)break}return n?a.length:a?e.error(t):W(t,l).slice(0)},E=e.compile=function(t,e){var n,i=[],r=[],o=U[t+" "];if(!o){for(e||(e=k(t)),n=e.length;n--;)o=y(e[n]),o[q]?i.push(o):r.push(o);o=U(t,b(r,i)),o.selector=t}return o},$=e.select=function(t,e,n,i){var r,o,s,a,l,u="function"==typeof t&&t,d=!i&&k(t=u.selector||t);if(n=n||[],1===d.length){if(o=d[0]=d[0].slice(0),o.length>2&&"ID"===(s=o[0]).type&&x.getById&&9===e.nodeType&&j&&C.relative[o[1].type]){if(e=(C.find.ID(s.matches[0].replace(xe,Ce),e)||[])[0],!e)return n;u&&(e=e.parentNode),t=t.slice(o.shift().value.length)}for(r=fe.needsContext.test(t)?0:o.length;r--&&(s=o[r],!C.relative[a=s.type]);)if((l=C.find[a])&&(i=l(s.matches[0].replace(xe,Ce),be.test(o[0].type)&&c(e.parentNode)||e))){if(o.splice(r,1),t=i.length&&p(o),!t)return J.apply(n,i),n;
|
|
break}}return(u||E(t,d))(i,e,!j,n,be.test(t)&&c(e.parentNode)||e),n},x.sortStable=q.split("").sort(V).join("")===q,x.detectDuplicates=!!N,D(),x.sortDetached=r(function(t){return 1&t.compareDocumentPosition(O.createElement("div"))}),r(function(t){return t.innerHTML="<a href='#'></a>","#"===t.firstChild.getAttribute("href")})||o("type|href|height|width",function(t,e,n){return n?void 0:t.getAttribute(e,"type"===e.toLowerCase()?1:2)}),x.attributes&&r(function(t){return t.innerHTML="<input/>",t.firstChild.setAttribute("value",""),""===t.firstChild.getAttribute("value")})||o("value",function(t,e,n){return n||"input"!==t.nodeName.toLowerCase()?void 0:t.defaultValue}),r(function(t){return null==t.getAttribute("disabled")})||o(ee,function(t,e,n){var i;return n?void 0:t[e]===!0?e.toLowerCase():(i=t.getAttributeNode(e))&&i.specified?i.value:null}),e}(t);re.find=ue,re.expr=ue.selectors,re.expr[":"]=re.expr.pseudos,re.unique=ue.uniqueSort,re.text=ue.getText,re.isXMLDoc=ue.isXML,re.contains=ue.contains;var ce=re.expr.match.needsContext,de=/^<(\w+)\s*\/?>(?:<\/\1>|)$/,pe=/^.[^:#\[\.,]*$/;re.filter=function(t,e,n){var i=e[0];return n&&(t=":not("+t+")"),1===e.length&&1===i.nodeType?re.find.matchesSelector(i,t)?[i]:[]:re.find.matches(t,re.grep(e,function(t){return 1===t.nodeType}))},re.fn.extend({find:function(t){var e,n=[],i=this,r=i.length;if("string"!=typeof t)return this.pushStack(re(t).filter(function(){for(e=0;r>e;e++)if(re.contains(i[e],this))return!0}));for(e=0;r>e;e++)re.find(t,i[e],n);return n=this.pushStack(r>1?re.unique(n):n),n.selector=this.selector?this.selector+" "+t:t,n},filter:function(t){return this.pushStack(i(this,t||[],!1))},not:function(t){return this.pushStack(i(this,t||[],!0))},is:function(t){return!!i(this,"string"==typeof t&&ce.test(t)?re(t):t||[],!1).length}});var he,fe=t.document,ge=/^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]*))$/,me=re.fn.init=function(t,e){var n,i;if(!t)return this;if("string"==typeof t){if(n="<"===t.charAt(0)&&">"===t.charAt(t.length-1)&&t.length>=3?[null,t,null]:ge.exec(t),!n||!n[1]&&e)return!e||e.jquery?(e||he).find(t):this.constructor(e).find(t);if(n[1]){if(e=e instanceof re?e[0]:e,re.merge(this,re.parseHTML(n[1],e&&e.nodeType?e.ownerDocument||e:fe,!0)),de.test(n[1])&&re.isPlainObject(e))for(n in e)re.isFunction(this[n])?this[n](e[n]):this.attr(n,e[n]);return this}if(i=fe.getElementById(n[2]),i&&i.parentNode){if(i.id!==n[2])return he.find(t);this.length=1,this[0]=i}return this.context=fe,this.selector=t,this}return t.nodeType?(this.context=this[0]=t,this.length=1,this):re.isFunction(t)?"undefined"!=typeof he.ready?he.ready(t):t(re):(void 0!==t.selector&&(this.selector=t.selector,this.context=t.context),re.makeArray(t,this))};me.prototype=re.fn,he=re(fe);var ve=/^(?:parents|prev(?:Until|All))/,ye={children:!0,contents:!0,next:!0,prev:!0};re.extend({dir:function(t,e,n){for(var i=[],r=t[e];r&&9!==r.nodeType&&(void 0===n||1!==r.nodeType||!re(r).is(n));)1===r.nodeType&&i.push(r),r=r[e];return i},sibling:function(t,e){for(var n=[];t;t=t.nextSibling)1===t.nodeType&&t!==e&&n.push(t);return n}}),re.fn.extend({has:function(t){var e,n=re(t,this),i=n.length;return this.filter(function(){for(e=0;i>e;e++)if(re.contains(this,n[e]))return!0})},closest:function(t,e){for(var n,i=0,r=this.length,o=[],s=ce.test(t)||"string"!=typeof t?re(t,e||this.context):0;r>i;i++)for(n=this[i];n&&n!==e;n=n.parentNode)if(n.nodeType<11&&(s?s.index(n)>-1:1===n.nodeType&&re.find.matchesSelector(n,t))){o.push(n);break}return this.pushStack(o.length>1?re.unique(o):o)},index:function(t){return t?"string"==typeof t?re.inArray(this[0],re(t)):re.inArray(t.jquery?t[0]:t,this):this[0]&&this[0].parentNode?this.first().prevAll().length:-1},add:function(t,e){return this.pushStack(re.unique(re.merge(this.get(),re(t,e))))},addBack:function(t){return this.add(null==t?this.prevObject:this.prevObject.filter(t))}}),re.each({parent:function(t){var e=t.parentNode;return e&&11!==e.nodeType?e:null},parents:function(t){return re.dir(t,"parentNode")},parentsUntil:function(t,e,n){return re.dir(t,"parentNode",n)},next:function(t){return r(t,"nextSibling")},prev:function(t){return r(t,"previousSibling")},nextAll:function(t){return re.dir(t,"nextSibling")},prevAll:function(t){return re.dir(t,"previousSibling")},nextUntil:function(t,e,n){return re.dir(t,"nextSibling",n)},prevUntil:function(t,e,n){return re.dir(t,"previousSibling",n)},siblings:function(t){return re.sibling((t.parentNode||{}).firstChild,t)},children:function(t){return re.sibling(t.firstChild)},contents:function(t){return re.nodeName(t,"iframe")?t.contentDocument||t.contentWindow.document:re.merge([],t.childNodes)}},function(t,e){re.fn[t]=function(n,i){var r=re.map(this,e,n);return"Until"!==t.slice(-5)&&(i=n),i&&"string"==typeof i&&(r=re.filter(i,r)),this.length>1&&(ye[t]||(r=re.unique(r)),ve.test(t)&&(r=r.reverse())),this.pushStack(r)}});var be=/\S+/g,we={};re.Callbacks=function(t){t="string"==typeof t?we[t]||o(t):re.extend({},t);var e,n,i,r,s,a,l=[],u=!t.once&&[],c=function(o){for(n=t.memory&&o,i=!0,s=a||0,a=0,r=l.length,e=!0;l&&r>s;s++)if(l[s].apply(o[0],o[1])===!1&&t.stopOnFalse){n=!1;break}e=!1,l&&(u?u.length&&c(u.shift()):n?l=[]:d.disable())},d={add:function(){if(l){var i=l.length;!function o(e){re.each(e,function(e,n){var i=re.type(n);"function"===i?t.unique&&d.has(n)||l.push(n):n&&n.length&&"string"!==i&&o(n)})}(arguments),e?r=l.length:n&&(a=i,c(n))}return this},remove:function(){return l&&re.each(arguments,function(t,n){for(var i;(i=re.inArray(n,l,i))>-1;)l.splice(i,1),e&&(r>=i&&r--,s>=i&&s--)}),this},has:function(t){return t?re.inArray(t,l)>-1:!(!l||!l.length)},empty:function(){return l=[],r=0,this},disable:function(){return l=u=n=void 0,this},disabled:function(){return!l},lock:function(){return u=void 0,n||d.disable(),this},locked:function(){return!u},fireWith:function(t,n){return!l||i&&!u||(n=n||[],n=[t,n.slice?n.slice():n],e?u.push(n):c(n)),this},fire:function(){return d.fireWith(this,arguments),this},fired:function(){return!!i}};return d},re.extend({Deferred:function(t){var e=[["resolve","done",re.Callbacks("once memory"),"resolved"],["reject","fail",re.Callbacks("once memory"),"rejected"],["notify","progress",re.Callbacks("memory")]],n="pending",i={state:function(){return n},always:function(){return r.done(arguments).fail(arguments),this},then:function(){var t=arguments;return re.Deferred(function(n){re.each(e,function(e,o){var s=re.isFunction(t[e])&&t[e];r[o[1]](function(){var t=s&&s.apply(this,arguments);t&&re.isFunction(t.promise)?t.promise().done(n.resolve).fail(n.reject).progress(n.notify):n[o[0]+"With"](this===i?n.promise():this,s?[t]:arguments)})}),t=null}).promise()},promise:function(t){return null!=t?re.extend(t,i):i}},r={};return i.pipe=i.then,re.each(e,function(t,o){var s=o[2],a=o[3];i[o[1]]=s.add,a&&s.add(function(){n=a},e[1^t][2].disable,e[2][2].lock),r[o[0]]=function(){return r[o[0]+"With"](this===r?i:this,arguments),this},r[o[0]+"With"]=s.fireWith}),i.promise(r),t&&t.call(r,r),r},when:function(t){var e,n,i,r=0,o=X.call(arguments),s=o.length,a=1!==s||t&&re.isFunction(t.promise)?s:0,l=1===a?t:re.Deferred(),u=function(t,n,i){return function(r){n[t]=this,i[t]=arguments.length>1?X.call(arguments):r,i===e?l.notifyWith(n,i):--a||l.resolveWith(n,i)}};if(s>1)for(e=new Array(s),n=new Array(s),i=new Array(s);s>r;r++)o[r]&&re.isFunction(o[r].promise)?o[r].promise().done(u(r,i,o)).fail(l.reject).progress(u(r,n,e)):--a;return a||l.resolveWith(i,o),l.promise()}});var xe;re.fn.ready=function(t){return re.ready.promise().done(t),this},re.extend({isReady:!1,readyWait:1,holdReady:function(t){t?re.readyWait++:re.ready(!0)},ready:function(t){if(t===!0?!--re.readyWait:!re.isReady){if(!fe.body)return setTimeout(re.ready);re.isReady=!0,t!==!0&&--re.readyWait>0||(xe.resolveWith(fe,[re]),re.fn.triggerHandler&&(re(fe).triggerHandler("ready"),re(fe).off("ready")))}}}),re.ready.promise=function(e){if(!xe)if(xe=re.Deferred(),"complete"===fe.readyState)setTimeout(re.ready);else if(fe.addEventListener)fe.addEventListener("DOMContentLoaded",a,!1),t.addEventListener("load",a,!1);else{fe.attachEvent("onreadystatechange",a),t.attachEvent("onload",a);var n=!1;try{n=null==t.frameElement&&fe.documentElement}catch(i){}n&&n.doScroll&&!function r(){if(!re.isReady){try{n.doScroll("left")}catch(t){return setTimeout(r,50)}s(),re.ready()}}()}return xe.promise(e)};var Ce,Te="undefined";for(Ce in re(ne))break;ne.ownLast="0"!==Ce,ne.inlineBlockNeedsLayout=!1,re(function(){var t,e,n,i;n=fe.getElementsByTagName("body")[0],n&&n.style&&(e=fe.createElement("div"),i=fe.createElement("div"),i.style.cssText="position:absolute;border:0;width:0;height:0;top:0;left:-9999px",n.appendChild(i).appendChild(e),typeof e.style.zoom!==Te&&(e.style.cssText="display:inline;margin:0;border:0;padding:1px;width:1px;zoom:1",ne.inlineBlockNeedsLayout=t=3===e.offsetWidth,t&&(n.style.zoom=1)),n.removeChild(i))}),function(){var t=fe.createElement("div");if(null==ne.deleteExpando){ne.deleteExpando=!0;try{delete t.test}catch(e){ne.deleteExpando=!1}}t=null}(),re.acceptData=function(t){var e=re.noData[(t.nodeName+" ").toLowerCase()],n=+t.nodeType||1;return 1!==n&&9!==n?!1:!e||e!==!0&&t.getAttribute("classid")===e};var Se=/^(?:\{[\w\W]*\}|\[[\w\W]*\])$/,ke=/([A-Z])/g;re.extend({cache:{},noData:{"applet ":!0,"embed ":!0,"object ":"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"},hasData:function(t){return t=t.nodeType?re.cache[t[re.expando]]:t[re.expando],!!t&&!u(t)},data:function(t,e,n){return c(t,e,n)},removeData:function(t,e){return d(t,e)},_data:function(t,e,n){return c(t,e,n,!0)},_removeData:function(t,e){return d(t,e,!0)}}),re.fn.extend({data:function(t,e){var n,i,r,o=this[0],s=o&&o.attributes;if(void 0===t){if(this.length&&(r=re.data(o),1===o.nodeType&&!re._data(o,"parsedAttrs"))){for(n=s.length;n--;)s[n]&&(i=s[n].name,0===i.indexOf("data-")&&(i=re.camelCase(i.slice(5)),l(o,i,r[i])));re._data(o,"parsedAttrs",!0)}return r}return"object"==typeof t?this.each(function(){re.data(this,t)}):arguments.length>1?this.each(function(){re.data(this,t,e)}):o?l(o,t,re.data(o,t)):void 0},removeData:function(t){return this.each(function(){re.removeData(this,t)})}}),re.extend({queue:function(t,e,n){var i;return t?(e=(e||"fx")+"queue",i=re._data(t,e),n&&(!i||re.isArray(n)?i=re._data(t,e,re.makeArray(n)):i.push(n)),i||[]):void 0},dequeue:function(t,e){e=e||"fx";var n=re.queue(t,e),i=n.length,r=n.shift(),o=re._queueHooks(t,e),s=function(){re.dequeue(t,e)};"inprogress"===r&&(r=n.shift(),i--),r&&("fx"===e&&n.unshift("inprogress"),delete o.stop,r.call(t,s,o)),!i&&o&&o.empty.fire()},_queueHooks:function(t,e){var n=e+"queueHooks";return re._data(t,n)||re._data(t,n,{empty:re.Callbacks("once memory").add(function(){re._removeData(t,e+"queue"),re._removeData(t,n)})})}}),re.fn.extend({queue:function(t,e){var n=2;return"string"!=typeof t&&(e=t,t="fx",n--),arguments.length<n?re.queue(this[0],t):void 0===e?this:this.each(function(){var n=re.queue(this,t,e);re._queueHooks(this,t),"fx"===t&&"inprogress"!==n[0]&&re.dequeue(this,t)})},dequeue:function(t){return this.each(function(){re.dequeue(this,t)})},clearQueue:function(t){return this.queue(t||"fx",[])},promise:function(t,e){var n,i=1,r=re.Deferred(),o=this,s=this.length,a=function(){--i||r.resolveWith(o,[o])};for("string"!=typeof t&&(e=t,t=void 0),t=t||"fx";s--;)n=re._data(o[s],t+"queueHooks"),n&&n.empty&&(i++,n.empty.add(a));return a(),r.promise(e)}});var Ee=/[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/.source,$e=["Top","Right","Bottom","Left"],_e=function(t,e){return t=e||t,"none"===re.css(t,"display")||!re.contains(t.ownerDocument,t)},Ae=re.access=function(t,e,n,i,r,o,s){var a=0,l=t.length,u=null==n;if("object"===re.type(n)){r=!0;for(a in n)re.access(t,e,a,n[a],!0,o,s)}else if(void 0!==i&&(r=!0,re.isFunction(i)||(s=!0),u&&(s?(e.call(t,i),e=null):(u=e,e=function(t,e,n){return u.call(re(t),n)})),e))for(;l>a;a++)e(t[a],n,s?i:i.call(t[a],a,e(t[a],n)));return r?t:u?e.call(t):l?e(t[0],n):o},Ne=/^(?:checkbox|radio)$/i;!function(){var t=fe.createElement("input"),e=fe.createElement("div"),n=fe.createDocumentFragment();if(e.innerHTML=" <link/><table></table><a href='/a'>a</a><input type='checkbox'/>",ne.leadingWhitespace=3===e.firstChild.nodeType,ne.tbody=!e.getElementsByTagName("tbody").length,ne.htmlSerialize=!!e.getElementsByTagName("link").length,ne.html5Clone="<:nav></:nav>"!==fe.createElement("nav").cloneNode(!0).outerHTML,t.type="checkbox",t.checked=!0,n.appendChild(t),ne.appendChecked=t.checked,e.innerHTML="<textarea>x</textarea>",ne.noCloneChecked=!!e.cloneNode(!0).lastChild.defaultValue,n.appendChild(e),e.innerHTML="<input type='radio' checked='checked' name='t'/>",ne.checkClone=e.cloneNode(!0).cloneNode(!0).lastChild.checked,ne.noCloneEvent=!0,e.attachEvent&&(e.attachEvent("onclick",function(){ne.noCloneEvent=!1}),e.cloneNode(!0).click()),null==ne.deleteExpando){ne.deleteExpando=!0;try{delete e.test}catch(i){ne.deleteExpando=!1}}}(),function(){var e,n,i=fe.createElement("div");for(e in{submit:!0,change:!0,focusin:!0})n="on"+e,(ne[e+"Bubbles"]=n in t)||(i.setAttribute(n,"t"),ne[e+"Bubbles"]=i.attributes[n].expando===!1);i=null}();var De=/^(?:input|select|textarea)$/i,Oe=/^key/,Ie=/^(?:mouse|pointer|contextmenu)|click/,je=/^(?:focusinfocus|focusoutblur)$/,Le=/^([^.]*)(?:\.(.+)|)$/;re.event={global:{},add:function(t,e,n,i,r){var o,s,a,l,u,c,d,p,h,f,g,m=re._data(t);if(m){for(n.handler&&(l=n,n=l.handler,r=l.selector),n.guid||(n.guid=re.guid++),(s=m.events)||(s=m.events={}),(c=m.handle)||(c=m.handle=function(t){return typeof re===Te||t&&re.event.triggered===t.type?void 0:re.event.dispatch.apply(c.elem,arguments)},c.elem=t),e=(e||"").match(be)||[""],a=e.length;a--;)o=Le.exec(e[a])||[],h=g=o[1],f=(o[2]||"").split(".").sort(),h&&(u=re.event.special[h]||{},h=(r?u.delegateType:u.bindType)||h,u=re.event.special[h]||{},d=re.extend({type:h,origType:g,data:i,handler:n,guid:n.guid,selector:r,needsContext:r&&re.expr.match.needsContext.test(r),namespace:f.join(".")},l),(p=s[h])||(p=s[h]=[],p.delegateCount=0,u.setup&&u.setup.call(t,i,f,c)!==!1||(t.addEventListener?t.addEventListener(h,c,!1):t.attachEvent&&t.attachEvent("on"+h,c))),u.add&&(u.add.call(t,d),d.handler.guid||(d.handler.guid=n.guid)),r?p.splice(p.delegateCount++,0,d):p.push(d),re.event.global[h]=!0);t=null}},remove:function(t,e,n,i,r){var o,s,a,l,u,c,d,p,h,f,g,m=re.hasData(t)&&re._data(t);if(m&&(c=m.events)){for(e=(e||"").match(be)||[""],u=e.length;u--;)if(a=Le.exec(e[u])||[],h=g=a[1],f=(a[2]||"").split(".").sort(),h){for(d=re.event.special[h]||{},h=(i?d.delegateType:d.bindType)||h,p=c[h]||[],a=a[2]&&new RegExp("(^|\\.)"+f.join("\\.(?:.*\\.|)")+"(\\.|$)"),l=o=p.length;o--;)s=p[o],!r&&g!==s.origType||n&&n.guid!==s.guid||a&&!a.test(s.namespace)||i&&i!==s.selector&&("**"!==i||!s.selector)||(p.splice(o,1),s.selector&&p.delegateCount--,d.remove&&d.remove.call(t,s));l&&!p.length&&(d.teardown&&d.teardown.call(t,f,m.handle)!==!1||re.removeEvent(t,h,m.handle),delete c[h])}else for(h in c)re.event.remove(t,h+e[u],n,i,!0);re.isEmptyObject(c)&&(delete m.handle,re._removeData(t,"events"))}},trigger:function(e,n,i,r){var o,s,a,l,u,c,d,p=[i||fe],h=ee.call(e,"type")?e.type:e,f=ee.call(e,"namespace")?e.namespace.split("."):[];if(a=c=i=i||fe,3!==i.nodeType&&8!==i.nodeType&&!je.test(h+re.event.triggered)&&(h.indexOf(".")>=0&&(f=h.split("."),h=f.shift(),f.sort()),s=h.indexOf(":")<0&&"on"+h,e=e[re.expando]?e:new re.Event(h,"object"==typeof e&&e),e.isTrigger=r?2:3,e.namespace=f.join("."),e.namespace_re=e.namespace?new RegExp("(^|\\.)"+f.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,e.result=void 0,e.target||(e.target=i),n=null==n?[e]:re.makeArray(n,[e]),u=re.event.special[h]||{},r||!u.trigger||u.trigger.apply(i,n)!==!1)){if(!r&&!u.noBubble&&!re.isWindow(i)){for(l=u.delegateType||h,je.test(l+h)||(a=a.parentNode);a;a=a.parentNode)p.push(a),c=a;c===(i.ownerDocument||fe)&&p.push(c.defaultView||c.parentWindow||t)}for(d=0;(a=p[d++])&&!e.isPropagationStopped();)e.type=d>1?l:u.bindType||h,o=(re._data(a,"events")||{})[e.type]&&re._data(a,"handle"),o&&o.apply(a,n),o=s&&a[s],o&&o.apply&&re.acceptData(a)&&(e.result=o.apply(a,n),e.result===!1&&e.preventDefault());if(e.type=h,!r&&!e.isDefaultPrevented()&&(!u._default||u._default.apply(p.pop(),n)===!1)&&re.acceptData(i)&&s&&i[h]&&!re.isWindow(i)){c=i[s],c&&(i[s]=null),re.event.triggered=h;try{i[h]()}catch(g){}re.event.triggered=void 0,c&&(i[s]=c)}return e.result}},dispatch:function(t){t=re.event.fix(t);var e,n,i,r,o,s=[],a=X.call(arguments),l=(re._data(this,"events")||{})[t.type]||[],u=re.event.special[t.type]||{};if(a[0]=t,t.delegateTarget=this,!u.preDispatch||u.preDispatch.call(this,t)!==!1){for(s=re.event.handlers.call(this,t,l),e=0;(r=s[e++])&&!t.isPropagationStopped();)for(t.currentTarget=r.elem,o=0;(i=r.handlers[o++])&&!t.isImmediatePropagationStopped();)(!t.namespace_re||t.namespace_re.test(i.namespace))&&(t.handleObj=i,t.data=i.data,n=((re.event.special[i.origType]||{}).handle||i.handler).apply(r.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 n,i,r,o,s=[],a=e.delegateCount,l=t.target;if(a&&l.nodeType&&(!t.button||"click"!==t.type))for(;l!=this;l=l.parentNode||this)if(1===l.nodeType&&(l.disabled!==!0||"click"!==t.type)){for(r=[],o=0;a>o;o++)i=e[o],n=i.selector+" ",void 0===r[n]&&(r[n]=i.needsContext?re(n,this).index(l)>=0:re.find(n,this,null,[l]).length),r[n]&&r.push(i);r.length&&s.push({elem:l,handlers:r})}return a<e.length&&s.push({elem:this,handlers:e.slice(a)}),s},fix:function(t){if(t[re.expando])return t;var e,n,i,r=t.type,o=t,s=this.fixHooks[r];for(s||(this.fixHooks[r]=s=Ie.test(r)?this.mouseHooks:Oe.test(r)?this.keyHooks:{}),i=s.props?this.props.concat(s.props):this.props,t=new re.Event(o),e=i.length;e--;)n=i[e],t[n]=o[n];return t.target||(t.target=o.srcElement||fe),3===t.target.nodeType&&(t.target=t.target.parentNode),t.metaKey=!!t.metaKey,s.filter?s.filter(t,o):t},props:"altKey bubbles cancelable ctrlKey currentTarget eventPhase metaKey relatedTarget shiftKey target timeStamp view which".split(" "),fixHooks:{},keyHooks:{props:"char charCode key keyCode".split(" "),filter:function(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 n,i,r,o=e.button,s=e.fromElement;return null==t.pageX&&null!=e.clientX&&(i=t.target.ownerDocument||fe,r=i.documentElement,n=i.body,t.pageX=e.clientX+(r&&r.scrollLeft||n&&n.scrollLeft||0)-(r&&r.clientLeft||n&&n.clientLeft||0),t.pageY=e.clientY+(r&&r.scrollTop||n&&n.scrollTop||0)-(r&&r.clientTop||n&&n.clientTop||0)),!t.relatedTarget&&s&&(t.relatedTarget=s===t.target?e.toElement:s),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!==f()&&this.focus)try{return this.focus(),!1}catch(t){}},delegateType:"focusin"},blur:{trigger:function(){return this===f()&&this.blur?(this.blur(),!1):void 0},delegateType:"focusout"},click:{trigger:function(){return re.nodeName(this,"input")&&"checkbox"===this.type&&this.click?(this.click(),!1):void 0},_default:function(t){return re.nodeName(t.target,"a")}},beforeunload:{postDispatch:function(t){void 0!==t.result&&t.originalEvent&&(t.originalEvent.returnValue=t.result)}}},simulate:function(t,e,n,i){var r=re.extend(new re.Event,n,{type:t,isSimulated:!0,originalEvent:{}});i?re.event.trigger(r,null,e):re.event.dispatch.call(e,r),r.isDefaultPrevented()&&n.preventDefault()}},re.removeEvent=fe.removeEventListener?function(t,e,n){t.removeEventListener&&t.removeEventListener(e,n,!1)}:function(t,e,n){var i="on"+e;t.detachEvent&&(typeof t[i]===Te&&(t[i]=null),t.detachEvent(i,n))},re.Event=function(t,e){return this instanceof re.Event?(t&&t.type?(this.originalEvent=t,this.type=t.type,this.isDefaultPrevented=t.defaultPrevented||void 0===t.defaultPrevented&&t.returnValue===!1?p:h):this.type=t,e&&re.extend(this,e),this.timeStamp=t&&t.timeStamp||re.now(),void(this[re.expando]=!0)):new re.Event(t,e)},re.Event.prototype={isDefaultPrevented:h,isPropagationStopped:h,isImmediatePropagationStopped:h,preventDefault:function(){var t=this.originalEvent;this.isDefaultPrevented=p,t&&(t.preventDefault?t.preventDefault():t.returnValue=!1)},stopPropagation:function(){var t=this.originalEvent;this.isPropagationStopped=p,t&&(t.stopPropagation&&t.stopPropagation(),t.cancelBubble=!0)},stopImmediatePropagation:function(){var t=this.originalEvent;this.isImmediatePropagationStopped=p,t&&t.stopImmediatePropagation&&t.stopImmediatePropagation(),this.stopPropagation()}},re.each({mouseenter:"mouseover",mouseleave:"mouseout",pointerenter:"pointerover",pointerleave:"pointerout"},function(t,e){re.event.special[t]={delegateType:e,bindType:e,handle:function(t){var n,i=this,r=t.relatedTarget,o=t.handleObj;return(!r||r!==i&&!re.contains(i,r))&&(t.type=o.origType,n=o.handler.apply(this,arguments),t.type=e),n}}}),ne.submitBubbles||(re.event.special.submit={setup:function(){return re.nodeName(this,"form")?!1:void re.event.add(this,"click._submit keypress._submit",function(t){var e=t.target,n=re.nodeName(e,"input")||re.nodeName(e,"button")?e.form:void 0;n&&!re._data(n,"submitBubbles")&&(re.event.add(n,"submit._submit",function(t){t._submit_bubble=!0}),re._data(n,"submitBubbles",!0))})},postDispatch:function(t){t._submit_bubble&&(delete t._submit_bubble,this.parentNode&&!t.isTrigger&&re.event.simulate("submit",this.parentNode,t,!0))},teardown:function(){return re.nodeName(this,"form")?!1:void re.event.remove(this,"._submit")}}),ne.changeBubbles||(re.event.special.change={setup:function(){return De.test(this.nodeName)?(("checkbox"===this.type||"radio"===this.type)&&(re.event.add(this,"propertychange._change",function(t){"checked"===t.originalEvent.propertyName&&(this._just_changed=!0)}),re.event.add(this,"click._change",function(t){this._just_changed&&!t.isTrigger&&(this._just_changed=!1),re.event.simulate("change",this,t,!0)})),!1):void re.event.add(this,"beforeactivate._change",function(t){var e=t.target;De.test(e.nodeName)&&!re._data(e,"changeBubbles")&&(re.event.add(e,"change._change",function(t){!this.parentNode||t.isSimulated||t.isTrigger||re.event.simulate("change",this.parentNode,t,!0)}),re._data(e,"changeBubbles",!0))})},handle:function(t){var e=t.target;return this!==e||t.isSimulated||t.isTrigger||"radio"!==e.type&&"checkbox"!==e.type?t.handleObj.handler.apply(this,arguments):void 0},teardown:function(){return re.event.remove(this,"._change"),!De.test(this.nodeName)}}),ne.focusinBubbles||re.each({focus:"focusin",blur:"focusout"},function(t,e){var n=function(t){re.event.simulate(e,t.target,re.event.fix(t),!0)};re.event.special[e]={setup:function(){var i=this.ownerDocument||this,r=re._data(i,e);r||i.addEventListener(t,n,!0),re._data(i,e,(r||0)+1)},teardown:function(){var i=this.ownerDocument||this,r=re._data(i,e)-1;r?re._data(i,e,r):(i.removeEventListener(t,n,!0),re._removeData(i,e))}}}),re.fn.extend({on:function(t,e,n,i,r){var o,s;if("object"==typeof t){"string"!=typeof e&&(n=n||e,e=void 0);for(o in t)this.on(o,e,n,t[o],r);return this}if(null==n&&null==i?(i=e,n=e=void 0):null==i&&("string"==typeof e?(i=n,n=void 0):(i=n,n=e,e=void 0)),i===!1)i=h;else if(!i)return this;return 1===r&&(s=i,i=function(t){return re().off(t),s.apply(this,arguments)},i.guid=s.guid||(s.guid=re.guid++)),this.each(function(){re.event.add(this,t,i,n,e)})},one:function(t,e,n,i){return this.on(t,e,n,i,1)},off:function(t,e,n){var i,r;if(t&&t.preventDefault&&t.handleObj)return i=t.handleObj,re(t.delegateTarget).off(i.namespace?i.origType+"."+i.namespace:i.origType,i.selector,i.handler),this;if("object"==typeof t){for(r in t)this.off(r,e,t[r]);return this}return(e===!1||"function"==typeof e)&&(n=e,e=void 0),n===!1&&(n=h),this.each(function(){re.event.remove(this,t,n,e)})},trigger:function(t,e){return this.each(function(){re.event.trigger(t,e,this)})},triggerHandler:function(t,e){var n=this[0];return n?re.event.trigger(t,e,n,!0):void 0}});var Fe="abbr|article|aside|audio|bdi|canvas|data|datalist|details|figcaption|figure|footer|header|hgroup|mark|meter|nav|output|progress|section|summary|time|video",Re=/ jQuery\d+="(?:null|\d+)"/g,He=new RegExp("<(?:"+Fe+")[\\s/>]","i"),qe=/^\s+/,Pe=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/gi,ze=/<([\w:]+)/,Me=/<tbody/i,Be=/<|&#?\w+;/,We=/<(?:script|style|link)/i,Ue=/checked\s*(?:[^=]|=\s*.checked.)/i,Ve=/^$|\/(?:java|ecma)script/i,Ke=/^true\/(.*)/,Qe=/^\s*<!(?:\[CDATA\[|--)|(?:\]\]|--)>\s*$/g,Xe={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:ne.htmlSerialize?[0,"",""]:[1,"X<div>","</div>"]},Ge=g(fe),Ye=Ge.appendChild(fe.createElement("div"));Xe.optgroup=Xe.option,Xe.tbody=Xe.tfoot=Xe.colgroup=Xe.caption=Xe.thead,Xe.th=Xe.td,re.extend({clone:function(t,e,n){var i,r,o,s,a,l=re.contains(t.ownerDocument,t);if(ne.html5Clone||re.isXMLDoc(t)||!He.test("<"+t.nodeName+">")?o=t.cloneNode(!0):(Ye.innerHTML=t.outerHTML,Ye.removeChild(o=Ye.firstChild)),!(ne.noCloneEvent&&ne.noCloneChecked||1!==t.nodeType&&11!==t.nodeType||re.isXMLDoc(t)))for(i=m(o),a=m(t),s=0;null!=(r=a[s]);++s)i[s]&&T(r,i[s]);if(e)if(n)for(a=a||m(t),i=i||m(o),s=0;null!=(r=a[s]);s++)C(r,i[s]);else C(t,o);return i=m(o,"script"),i.length>0&&x(i,!l&&m(t,"script")),i=a=r=null,o},buildFragment:function(t,e,n,i){for(var r,o,s,a,l,u,c,d=t.length,p=g(e),h=[],f=0;d>f;f++)if(o=t[f],o||0===o)if("object"===re.type(o))re.merge(h,o.nodeType?[o]:o);else if(Be.test(o)){for(a=a||p.appendChild(e.createElement("div")),l=(ze.exec(o)||["",""])[1].toLowerCase(),c=Xe[l]||Xe._default,a.innerHTML=c[1]+o.replace(Pe,"<$1></$2>")+c[2],r=c[0];r--;)a=a.lastChild;if(!ne.leadingWhitespace&&qe.test(o)&&h.push(e.createTextNode(qe.exec(o)[0])),!ne.tbody)for(o="table"!==l||Me.test(o)?"<table>"!==c[1]||Me.test(o)?0:a:a.firstChild,r=o&&o.childNodes.length;r--;)re.nodeName(u=o.childNodes[r],"tbody")&&!u.childNodes.length&&o.removeChild(u);for(re.merge(h,a.childNodes),a.textContent="";a.firstChild;)a.removeChild(a.firstChild);a=p.lastChild}else h.push(e.createTextNode(o));for(a&&p.removeChild(a),ne.appendChecked||re.grep(m(h,"input"),v),f=0;o=h[f++];)if((!i||-1===re.inArray(o,i))&&(s=re.contains(o.ownerDocument,o),a=m(p.appendChild(o),"script"),s&&x(a),n))for(r=0;o=a[r++];)Ve.test(o.type||"")&&n.push(o);return a=null,p},cleanData:function(t,e){for(var n,i,r,o,s=0,a=re.expando,l=re.cache,u=ne.deleteExpando,c=re.event.special;null!=(n=t[s]);s++)if((e||re.acceptData(n))&&(r=n[a],o=r&&l[r])){if(o.events)for(i in o.events)c[i]?re.event.remove(n,i):re.removeEvent(n,i,o.handle);l[r]&&(delete l[r],u?delete n[a]:typeof n.removeAttribute!==Te?n.removeAttribute(a):n[a]=null,Q.push(r))}}}),re.fn.extend({text:function(t){return Ae(this,function(t){return void 0===t?re.text(this):this.empty().append((this[0]&&this[0].ownerDocument||fe).createTextNode(t))},null,t,arguments.length)},append:function(){return this.domManip(arguments,function(t){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var e=y(this,t);e.appendChild(t)}})},prepend:function(){return this.domManip(arguments,function(t){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var e=y(this,t);e.insertBefore(t,e.firstChild)}})},before:function(){return this.domManip(arguments,function(t){this.parentNode&&this.parentNode.insertBefore(t,this)})},after:function(){return this.domManip(arguments,function(t){this.parentNode&&this.parentNode.insertBefore(t,this.nextSibling)})},remove:function(t,e){for(var n,i=t?re.filter(t,this):this,r=0;null!=(n=i[r]);r++)e||1!==n.nodeType||re.cleanData(m(n)),n.parentNode&&(e&&re.contains(n.ownerDocument,n)&&x(m(n,"script")),n.parentNode.removeChild(n));return this},empty:function(){for(var t,e=0;null!=(t=this[e]);e++){for(1===t.nodeType&&re.cleanData(m(t,!1));t.firstChild;)t.removeChild(t.firstChild);t.options&&re.nodeName(t,"select")&&(t.options.length=0)}return this},clone:function(t,e){return t=null==t?!1:t,e=null==e?t:e,this.map(function(){return re.clone(this,t,e)})},html:function(t){return Ae(this,function(t){var e=this[0]||{},n=0,i=this.length;if(void 0===t)return 1===e.nodeType?e.innerHTML.replace(Re,""):void 0;if(!("string"!=typeof t||We.test(t)||!ne.htmlSerialize&&He.test(t)||!ne.leadingWhitespace&&qe.test(t)||Xe[(ze.exec(t)||["",""])[1].toLowerCase()])){t=t.replace(Pe,"<$1></$2>");try{for(;i>n;n++)e=this[n]||{},1===e.nodeType&&(re.cleanData(m(e,!1)),e.innerHTML=t);e=0}catch(r){}}e&&this.empty().append(t)},null,t,arguments.length)},replaceWith:function(){var t=arguments[0];return this.domManip(arguments,function(e){t=this.parentNode,re.cleanData(m(this)),t&&t.replaceChild(e,this)}),t&&(t.length||t.nodeType)?this:this.remove()},detach:function(t){return this.remove(t,!0)},domManip:function(t,e){t=G.apply([],t);var n,i,r,o,s,a,l=0,u=this.length,c=this,d=u-1,p=t[0],h=re.isFunction(p);if(h||u>1&&"string"==typeof p&&!ne.checkClone&&Ue.test(p))return this.each(function(n){var i=c.eq(n);h&&(t[0]=p.call(this,n,i.html())),i.domManip(t,e)});if(u&&(a=re.buildFragment(t,this[0].ownerDocument,!1,this),n=a.firstChild,1===a.childNodes.length&&(a=n),n)){for(o=re.map(m(a,"script"),b),r=o.length;u>l;l++)i=a,l!==d&&(i=re.clone(i,!0,!0),r&&re.merge(o,m(i,"script"))),e.call(this[l],i,l);if(r)for(s=o[o.length-1].ownerDocument,re.map(o,w),l=0;r>l;l++)i=o[l],Ve.test(i.type||"")&&!re._data(i,"globalEval")&&re.contains(s,i)&&(i.src?re._evalUrl&&re._evalUrl(i.src):re.globalEval((i.text||i.textContent||i.innerHTML||"").replace(Qe,"")));a=n=null}return this}}),re.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(t,e){re.fn[t]=function(t){for(var n,i=0,r=[],o=re(t),s=o.length-1;s>=i;i++)n=i===s?this:this.clone(!0),re(o[i])[e](n),Y.apply(r,n.get());return this.pushStack(r)}});var Je,Ze={};!function(){var t;ne.shrinkWrapBlocks=function(){if(null!=t)return t;t=!1;var e,n,i;return n=fe.getElementsByTagName("body")[0],n&&n.style?(e=fe.createElement("div"),i=fe.createElement("div"),i.style.cssText="position:absolute;border:0;width:0;height:0;top:0;left:-9999px",n.appendChild(i).appendChild(e),typeof e.style.zoom!==Te&&(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(fe.createElement("div")).style.width="5px",t=3!==e.offsetWidth),n.removeChild(i),t):void 0}}();var tn,en,nn=/^margin/,rn=new RegExp("^("+Ee+")(?!px)[a-z%]+$","i"),on=/^(top|right|bottom|left)$/;t.getComputedStyle?(tn=function(e){return e.ownerDocument.defaultView.opener?e.ownerDocument.defaultView.getComputedStyle(e,null):t.getComputedStyle(e,null)},en=function(t,e,n){var i,r,o,s,a=t.style;return n=n||tn(t),s=n?n.getPropertyValue(e)||n[e]:void 0,n&&(""!==s||re.contains(t.ownerDocument,t)||(s=re.style(t,e)),rn.test(s)&&nn.test(e)&&(i=a.width,r=a.minWidth,o=a.maxWidth,a.minWidth=a.maxWidth=a.width=s,s=n.width,a.width=i,a.minWidth=r,a.maxWidth=o)),void 0===s?s:s+""}):fe.documentElement.currentStyle&&(tn=function(t){return t.currentStyle},en=function(t,e,n){var i,r,o,s,a=t.style;return n=n||tn(t),s=n?n[e]:void 0,null==s&&a&&a[e]&&(s=a[e]),rn.test(s)&&!on.test(e)&&(i=a.left,r=t.runtimeStyle,o=r&&r.left,o&&(r.left=t.currentStyle.left),a.left="fontSize"===e?"1em":s,s=a.pixelLeft+"px",a.left=i,o&&(r.left=o)),void 0===s?s:s+""||"auto"}),function(){function e(){var e,n,i,r;n=fe.getElementsByTagName("body")[0],n&&n.style&&(e=fe.createElement("div"),i=fe.createElement("div"),i.style.cssText="position:absolute;border:0;width:0;height:0;top:0;left:-9999px",n.appendChild(i).appendChild(e),e.style.cssText="-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;display:block;margin-top:1%;top:1%;border:1px;padding:1px;width:4px;position:absolute",o=s=!1,l=!0,t.getComputedStyle&&(o="1%"!==(t.getComputedStyle(e,null)||{}).top,s="4px"===(t.getComputedStyle(e,null)||{width:"4px"}).width,r=e.appendChild(fe.createElement("div")),r.style.cssText=e.style.cssText="-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box;display:block;margin:0;border:0;padding:0",r.style.marginRight=r.style.width="0",e.style.width="1px",l=!parseFloat((t.getComputedStyle(r,null)||{}).marginRight),e.removeChild(r)),e.innerHTML="<table><tr><td></td><td>t</td></tr></table>",r=e.getElementsByTagName("td"),r[0].style.cssText="margin:0;border:0;padding:0;display:none",a=0===r[0].offsetHeight,a&&(r[0].style.display="",r[1].style.display="none",a=0===r[0].offsetHeight),n.removeChild(i))
|
|
}var n,i,r,o,s,a,l;n=fe.createElement("div"),n.innerHTML=" <link/><table></table><a href='/a'>a</a><input type='checkbox'/>",r=n.getElementsByTagName("a")[0],i=r&&r.style,i&&(i.cssText="float:left;opacity:.5",ne.opacity="0.5"===i.opacity,ne.cssFloat=!!i.cssFloat,n.style.backgroundClip="content-box",n.cloneNode(!0).style.backgroundClip="",ne.clearCloneStyle="content-box"===n.style.backgroundClip,ne.boxSizing=""===i.boxSizing||""===i.MozBoxSizing||""===i.WebkitBoxSizing,re.extend(ne,{reliableHiddenOffsets:function(){return null==a&&e(),a},boxSizingReliable:function(){return null==s&&e(),s},pixelPosition:function(){return null==o&&e(),o},reliableMarginRight:function(){return null==l&&e(),l}}))}(),re.swap=function(t,e,n,i){var r,o,s={};for(o in e)s[o]=t.style[o],t.style[o]=e[o];r=n.apply(t,i||[]);for(o in e)t.style[o]=s[o];return r};var sn=/alpha\([^)]*\)/i,an=/opacity\s*=\s*([^)]*)/,ln=/^(none|table(?!-c[ea]).+)/,un=new RegExp("^("+Ee+")(.*)$","i"),cn=new RegExp("^([+-])=("+Ee+")","i"),dn={position:"absolute",visibility:"hidden",display:"block"},pn={letterSpacing:"0",fontWeight:"400"},hn=["Webkit","O","Moz","ms"];re.extend({cssHooks:{opacity:{get:function(t,e){if(e){var n=en(t,"opacity");return""===n?"1":n}}}},cssNumber:{columnCount:!0,fillOpacity:!0,flexGrow:!0,flexShrink:!0,fontWeight:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,widows:!0,zIndex:!0,zoom:!0},cssProps:{"float":ne.cssFloat?"cssFloat":"styleFloat"},style:function(t,e,n,i){if(t&&3!==t.nodeType&&8!==t.nodeType&&t.style){var r,o,s,a=re.camelCase(e),l=t.style;if(e=re.cssProps[a]||(re.cssProps[a]=$(l,a)),s=re.cssHooks[e]||re.cssHooks[a],void 0===n)return s&&"get"in s&&void 0!==(r=s.get(t,!1,i))?r:l[e];if(o=typeof n,"string"===o&&(r=cn.exec(n))&&(n=(r[1]+1)*r[2]+parseFloat(re.css(t,e)),o="number"),null!=n&&n===n&&("number"!==o||re.cssNumber[a]||(n+="px"),ne.clearCloneStyle||""!==n||0!==e.indexOf("background")||(l[e]="inherit"),!(s&&"set"in s&&void 0===(n=s.set(t,n,i)))))try{l[e]=n}catch(u){}}},css:function(t,e,n,i){var r,o,s,a=re.camelCase(e);return e=re.cssProps[a]||(re.cssProps[a]=$(t.style,a)),s=re.cssHooks[e]||re.cssHooks[a],s&&"get"in s&&(o=s.get(t,!0,n)),void 0===o&&(o=en(t,e,i)),"normal"===o&&e in pn&&(o=pn[e]),""===n||n?(r=parseFloat(o),n===!0||re.isNumeric(r)?r||0:o):o}}),re.each(["height","width"],function(t,e){re.cssHooks[e]={get:function(t,n,i){return n?ln.test(re.css(t,"display"))&&0===t.offsetWidth?re.swap(t,dn,function(){return D(t,e,i)}):D(t,e,i):void 0},set:function(t,n,i){var r=i&&tn(t);return A(t,n,i?N(t,e,i,ne.boxSizing&&"border-box"===re.css(t,"boxSizing",!1,r),r):0)}}}),ne.opacity||(re.cssHooks.opacity={get:function(t,e){return an.test((e&&t.currentStyle?t.currentStyle.filter:t.style.filter)||"")?.01*parseFloat(RegExp.$1)+"":e?"1":""},set:function(t,e){var n=t.style,i=t.currentStyle,r=re.isNumeric(e)?"alpha(opacity="+100*e+")":"",o=i&&i.filter||n.filter||"";n.zoom=1,(e>=1||""===e)&&""===re.trim(o.replace(sn,""))&&n.removeAttribute&&(n.removeAttribute("filter"),""===e||i&&!i.filter)||(n.filter=sn.test(o)?o.replace(sn,r):o+" "+r)}}),re.cssHooks.marginRight=E(ne.reliableMarginRight,function(t,e){return e?re.swap(t,{display:"inline-block"},en,[t,"marginRight"]):void 0}),re.each({margin:"",padding:"",border:"Width"},function(t,e){re.cssHooks[t+e]={expand:function(n){for(var i=0,r={},o="string"==typeof n?n.split(" "):[n];4>i;i++)r[t+$e[i]+e]=o[i]||o[i-2]||o[0];return r}},nn.test(t)||(re.cssHooks[t+e].set=A)}),re.fn.extend({css:function(t,e){return Ae(this,function(t,e,n){var i,r,o={},s=0;if(re.isArray(e)){for(i=tn(t),r=e.length;r>s;s++)o[e[s]]=re.css(t,e[s],!1,i);return o}return void 0!==n?re.style(t,e,n):re.css(t,e)},t,e,arguments.length>1)},show:function(){return _(this,!0)},hide:function(){return _(this)},toggle:function(t){return"boolean"==typeof t?t?this.show():this.hide():this.each(function(){_e(this)?re(this).show():re(this).hide()})}}),re.Tween=O,O.prototype={constructor:O,init:function(t,e,n,i,r,o){this.elem=t,this.prop=n,this.easing=r||"swing",this.options=e,this.start=this.now=this.cur(),this.end=i,this.unit=o||(re.cssNumber[n]?"":"px")},cur:function(){var t=O.propHooks[this.prop];return t&&t.get?t.get(this):O.propHooks._default.get(this)},run:function(t){var e,n=O.propHooks[this.prop];return this.pos=e=this.options.duration?re.easing[this.easing](t,this.options.duration*t,0,1,this.options.duration):t,this.now=(this.end-this.start)*e+this.start,this.options.step&&this.options.step.call(this.elem,this.now,this),n&&n.set?n.set(this):O.propHooks._default.set(this),this}},O.prototype.init.prototype=O.prototype,O.propHooks={_default:{get:function(t){var e;return null==t.elem[t.prop]||t.elem.style&&null!=t.elem.style[t.prop]?(e=re.css(t.elem,t.prop,""),e&&"auto"!==e?e:0):t.elem[t.prop]},set:function(t){re.fx.step[t.prop]?re.fx.step[t.prop](t):t.elem.style&&(null!=t.elem.style[re.cssProps[t.prop]]||re.cssHooks[t.prop])?re.style(t.elem,t.prop,t.now+t.unit):t.elem[t.prop]=t.now}}},O.propHooks.scrollTop=O.propHooks.scrollLeft={set:function(t){t.elem.nodeType&&t.elem.parentNode&&(t.elem[t.prop]=t.now)}},re.easing={linear:function(t){return t},swing:function(t){return.5-Math.cos(t*Math.PI)/2}},re.fx=O.prototype.init,re.fx.step={};var fn,gn,mn=/^(?:toggle|show|hide)$/,vn=new RegExp("^(?:([+-])=|)("+Ee+")([a-z%]*)$","i"),yn=/queueHooks$/,bn=[F],wn={"*":[function(t,e){var n=this.createTween(t,e),i=n.cur(),r=vn.exec(e),o=r&&r[3]||(re.cssNumber[t]?"":"px"),s=(re.cssNumber[t]||"px"!==o&&+i)&&vn.exec(re.css(n.elem,t)),a=1,l=20;if(s&&s[3]!==o){o=o||s[3],r=r||[],s=+i||1;do a=a||".5",s/=a,re.style(n.elem,t,s+o);while(a!==(a=n.cur()/i)&&1!==a&&--l)}return r&&(s=n.start=+s||+i||0,n.unit=o,n.end=r[1]?s+(r[1]+1)*r[2]:+r[2]),n}]};re.Animation=re.extend(H,{tweener:function(t,e){re.isFunction(t)?(e=t,t=["*"]):t=t.split(" ");for(var n,i=0,r=t.length;r>i;i++)n=t[i],wn[n]=wn[n]||[],wn[n].unshift(e)},prefilter:function(t,e){e?bn.unshift(t):bn.push(t)}}),re.speed=function(t,e,n){var i=t&&"object"==typeof t?re.extend({},t):{complete:n||!n&&e||re.isFunction(t)&&t,duration:t,easing:n&&e||e&&!re.isFunction(e)&&e};return i.duration=re.fx.off?0:"number"==typeof i.duration?i.duration:i.duration in re.fx.speeds?re.fx.speeds[i.duration]:re.fx.speeds._default,(null==i.queue||i.queue===!0)&&(i.queue="fx"),i.old=i.complete,i.complete=function(){re.isFunction(i.old)&&i.old.call(this),i.queue&&re.dequeue(this,i.queue)},i},re.fn.extend({fadeTo:function(t,e,n,i){return this.filter(_e).css("opacity",0).show().end().animate({opacity:e},t,n,i)},animate:function(t,e,n,i){var r=re.isEmptyObject(t),o=re.speed(e,n,i),s=function(){var e=H(this,re.extend({},t),o);(r||re._data(this,"finish"))&&e.stop(!0)};return s.finish=s,r||o.queue===!1?this.each(s):this.queue(o.queue,s)},stop:function(t,e,n){var i=function(t){var e=t.stop;delete t.stop,e(n)};return"string"!=typeof t&&(n=e,e=t,t=void 0),e&&t!==!1&&this.queue(t||"fx",[]),this.each(function(){var e=!0,r=null!=t&&t+"queueHooks",o=re.timers,s=re._data(this);if(r)s[r]&&s[r].stop&&i(s[r]);else for(r in s)s[r]&&s[r].stop&&yn.test(r)&&i(s[r]);for(r=o.length;r--;)o[r].elem!==this||null!=t&&o[r].queue!==t||(o[r].anim.stop(n),e=!1,o.splice(r,1));(e||!n)&&re.dequeue(this,t)})},finish:function(t){return t!==!1&&(t=t||"fx"),this.each(function(){var e,n=re._data(this),i=n[t+"queue"],r=n[t+"queueHooks"],o=re.timers,s=i?i.length:0;for(n.finish=!0,re.queue(this,t,[]),r&&r.stop&&r.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;s>e;e++)i[e]&&i[e].finish&&i[e].finish.call(this);delete n.finish})}}),re.each(["toggle","show","hide"],function(t,e){var n=re.fn[e];re.fn[e]=function(t,i,r){return null==t||"boolean"==typeof t?n.apply(this,arguments):this.animate(j(e,!0),t,i,r)}}),re.each({slideDown:j("show"),slideUp:j("hide"),slideToggle:j("toggle"),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"},fadeToggle:{opacity:"toggle"}},function(t,e){re.fn[t]=function(t,n,i){return this.animate(e,t,n,i)}}),re.timers=[],re.fx.tick=function(){var t,e=re.timers,n=0;for(fn=re.now();n<e.length;n++)t=e[n],t()||e[n]!==t||e.splice(n--,1);e.length||re.fx.stop(),fn=void 0},re.fx.timer=function(t){re.timers.push(t),t()?re.fx.start():re.timers.pop()},re.fx.interval=13,re.fx.start=function(){gn||(gn=setInterval(re.fx.tick,re.fx.interval))},re.fx.stop=function(){clearInterval(gn),gn=null},re.fx.speeds={slow:600,fast:200,_default:400},re.fn.delay=function(t,e){return t=re.fx?re.fx.speeds[t]||t:t,e=e||"fx",this.queue(e,function(e,n){var i=setTimeout(e,t);n.stop=function(){clearTimeout(i)}})},function(){var t,e,n,i,r;e=fe.createElement("div"),e.setAttribute("className","t"),e.innerHTML=" <link/><table></table><a href='/a'>a</a><input type='checkbox'/>",i=e.getElementsByTagName("a")[0],n=fe.createElement("select"),r=n.appendChild(fe.createElement("option")),t=e.getElementsByTagName("input")[0],i.style.cssText="top:1px",ne.getSetAttribute="t"!==e.className,ne.style=/top/.test(i.getAttribute("style")),ne.hrefNormalized="/a"===i.getAttribute("href"),ne.checkOn=!!t.value,ne.optSelected=r.selected,ne.enctype=!!fe.createElement("form").enctype,n.disabled=!0,ne.optDisabled=!r.disabled,t=fe.createElement("input"),t.setAttribute("value",""),ne.input=""===t.getAttribute("value"),t.value="t",t.setAttribute("type","radio"),ne.radioValue="t"===t.value}();var xn=/\r/g;re.fn.extend({val:function(t){var e,n,i,r=this[0];{if(arguments.length)return i=re.isFunction(t),this.each(function(n){var r;1===this.nodeType&&(r=i?t.call(this,n,re(this).val()):t,null==r?r="":"number"==typeof r?r+="":re.isArray(r)&&(r=re.map(r,function(t){return null==t?"":t+""})),e=re.valHooks[this.type]||re.valHooks[this.nodeName.toLowerCase()],e&&"set"in e&&void 0!==e.set(this,r,"value")||(this.value=r))});if(r)return e=re.valHooks[r.type]||re.valHooks[r.nodeName.toLowerCase()],e&&"get"in e&&void 0!==(n=e.get(r,"value"))?n:(n=r.value,"string"==typeof n?n.replace(xn,""):null==n?"":n)}}}),re.extend({valHooks:{option:{get:function(t){var e=re.find.attr(t,"value");return null!=e?e:re.trim(re.text(t))}},select:{get:function(t){for(var e,n,i=t.options,r=t.selectedIndex,o="select-one"===t.type||0>r,s=o?null:[],a=o?r+1:i.length,l=0>r?a:o?r:0;a>l;l++)if(n=i[l],!(!n.selected&&l!==r||(ne.optDisabled?n.disabled:null!==n.getAttribute("disabled"))||n.parentNode.disabled&&re.nodeName(n.parentNode,"optgroup"))){if(e=re(n).val(),o)return e;s.push(e)}return s},set:function(t,e){for(var n,i,r=t.options,o=re.makeArray(e),s=r.length;s--;)if(i=r[s],re.inArray(re.valHooks.option.get(i),o)>=0)try{i.selected=n=!0}catch(a){i.scrollHeight}else i.selected=!1;return n||(t.selectedIndex=-1),r}}}}),re.each(["radio","checkbox"],function(){re.valHooks[this]={set:function(t,e){return re.isArray(e)?t.checked=re.inArray(re(t).val(),e)>=0:void 0}},ne.checkOn||(re.valHooks[this].get=function(t){return null===t.getAttribute("value")?"on":t.value})});var Cn,Tn,Sn=re.expr.attrHandle,kn=/^(?:checked|selected)$/i,En=ne.getSetAttribute,$n=ne.input;re.fn.extend({attr:function(t,e){return Ae(this,re.attr,t,e,arguments.length>1)},removeAttr:function(t){return this.each(function(){re.removeAttr(this,t)})}}),re.extend({attr:function(t,e,n){var i,r,o=t.nodeType;if(t&&3!==o&&8!==o&&2!==o)return typeof t.getAttribute===Te?re.prop(t,e,n):(1===o&&re.isXMLDoc(t)||(e=e.toLowerCase(),i=re.attrHooks[e]||(re.expr.match.bool.test(e)?Tn:Cn)),void 0===n?i&&"get"in i&&null!==(r=i.get(t,e))?r:(r=re.find.attr(t,e),null==r?void 0:r):null!==n?i&&"set"in i&&void 0!==(r=i.set(t,n,e))?r:(t.setAttribute(e,n+""),n):void re.removeAttr(t,e))},removeAttr:function(t,e){var n,i,r=0,o=e&&e.match(be);if(o&&1===t.nodeType)for(;n=o[r++];)i=re.propFix[n]||n,re.expr.match.bool.test(n)?$n&&En||!kn.test(n)?t[i]=!1:t[re.camelCase("default-"+n)]=t[i]=!1:re.attr(t,n,""),t.removeAttribute(En?n:i)},attrHooks:{type:{set:function(t,e){if(!ne.radioValue&&"radio"===e&&re.nodeName(t,"input")){var n=t.value;return t.setAttribute("type",e),n&&(t.value=n),e}}}}}),Tn={set:function(t,e,n){return e===!1?re.removeAttr(t,n):$n&&En||!kn.test(n)?t.setAttribute(!En&&re.propFix[n]||n,n):t[re.camelCase("default-"+n)]=t[n]=!0,n}},re.each(re.expr.match.bool.source.match(/\w+/g),function(t,e){var n=Sn[e]||re.find.attr;Sn[e]=$n&&En||!kn.test(e)?function(t,e,i){var r,o;return i||(o=Sn[e],Sn[e]=r,r=null!=n(t,e,i)?e.toLowerCase():null,Sn[e]=o),r}:function(t,e,n){return n?void 0:t[re.camelCase("default-"+e)]?e.toLowerCase():null}}),$n&&En||(re.attrHooks.value={set:function(t,e,n){return re.nodeName(t,"input")?void(t.defaultValue=e):Cn&&Cn.set(t,e,n)}}),En||(Cn={set:function(t,e,n){var i=t.getAttributeNode(n);return i||t.setAttributeNode(i=t.ownerDocument.createAttribute(n)),i.value=e+="","value"===n||e===t.getAttribute(n)?e:void 0}},Sn.id=Sn.name=Sn.coords=function(t,e,n){var i;return n?void 0:(i=t.getAttributeNode(e))&&""!==i.value?i.value:null},re.valHooks.button={get:function(t,e){var n=t.getAttributeNode(e);return n&&n.specified?n.value:void 0},set:Cn.set},re.attrHooks.contenteditable={set:function(t,e,n){Cn.set(t,""===e?!1:e,n)}},re.each(["width","height"],function(t,e){re.attrHooks[e]={set:function(t,n){return""===n?(t.setAttribute(e,"auto"),n):void 0}}})),ne.style||(re.attrHooks.style={get:function(t){return t.style.cssText||void 0},set:function(t,e){return t.style.cssText=e+""}});var _n=/^(?:input|select|textarea|button|object)$/i,An=/^(?:a|area)$/i;re.fn.extend({prop:function(t,e){return Ae(this,re.prop,t,e,arguments.length>1)},removeProp:function(t){return t=re.propFix[t]||t,this.each(function(){try{this[t]=void 0,delete this[t]}catch(e){}})}}),re.extend({propFix:{"for":"htmlFor","class":"className"},prop:function(t,e,n){var i,r,o,s=t.nodeType;if(t&&3!==s&&8!==s&&2!==s)return o=1!==s||!re.isXMLDoc(t),o&&(e=re.propFix[e]||e,r=re.propHooks[e]),void 0!==n?r&&"set"in r&&void 0!==(i=r.set(t,n,e))?i:t[e]=n:r&&"get"in r&&null!==(i=r.get(t,e))?i:t[e]},propHooks:{tabIndex:{get:function(t){var e=re.find.attr(t,"tabindex");return e?parseInt(e,10):_n.test(t.nodeName)||An.test(t.nodeName)&&t.href?0:-1}}}}),ne.hrefNormalized||re.each(["href","src"],function(t,e){re.propHooks[e]={get:function(t){return t.getAttribute(e,4)}}}),ne.optSelected||(re.propHooks.selected={get:function(t){var e=t.parentNode;return e&&(e.selectedIndex,e.parentNode&&e.parentNode.selectedIndex),null}}),re.each(["tabIndex","readOnly","maxLength","cellSpacing","cellPadding","rowSpan","colSpan","useMap","frameBorder","contentEditable"],function(){re.propFix[this.toLowerCase()]=this}),ne.enctype||(re.propFix.enctype="encoding");var Nn=/[\t\r\n\f]/g;re.fn.extend({addClass:function(t){var e,n,i,r,o,s,a=0,l=this.length,u="string"==typeof t&&t;if(re.isFunction(t))return this.each(function(e){re(this).addClass(t.call(this,e,this.className))});if(u)for(e=(t||"").match(be)||[];l>a;a++)if(n=this[a],i=1===n.nodeType&&(n.className?(" "+n.className+" ").replace(Nn," "):" ")){for(o=0;r=e[o++];)i.indexOf(" "+r+" ")<0&&(i+=r+" ");s=re.trim(i),n.className!==s&&(n.className=s)}return this},removeClass:function(t){var e,n,i,r,o,s,a=0,l=this.length,u=0===arguments.length||"string"==typeof t&&t;if(re.isFunction(t))return this.each(function(e){re(this).removeClass(t.call(this,e,this.className))});if(u)for(e=(t||"").match(be)||[];l>a;a++)if(n=this[a],i=1===n.nodeType&&(n.className?(" "+n.className+" ").replace(Nn," "):"")){for(o=0;r=e[o++];)for(;i.indexOf(" "+r+" ")>=0;)i=i.replace(" "+r+" "," ");s=t?re.trim(i):"",n.className!==s&&(n.className=s)}return this},toggleClass:function(t,e){var n=typeof t;return"boolean"==typeof e&&"string"===n?e?this.addClass(t):this.removeClass(t):this.each(re.isFunction(t)?function(n){re(this).toggleClass(t.call(this,n,this.className,e),e)}:function(){if("string"===n)for(var e,i=0,r=re(this),o=t.match(be)||[];e=o[i++];)r.hasClass(e)?r.removeClass(e):r.addClass(e);else(n===Te||"boolean"===n)&&(this.className&&re._data(this,"__className__",this.className),this.className=this.className||t===!1?"":re._data(this,"__className__")||"")})},hasClass:function(t){for(var e=" "+t+" ",n=0,i=this.length;i>n;n++)if(1===this[n].nodeType&&(" "+this[n].className+" ").replace(Nn," ").indexOf(e)>=0)return!0;return!1}}),re.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){re.fn[e]=function(t,n){return arguments.length>0?this.on(e,null,t,n):this.trigger(e)}}),re.fn.extend({hover:function(t,e){return this.mouseenter(t).mouseleave(e||t)},bind:function(t,e,n){return this.on(t,null,e,n)},unbind:function(t,e){return this.off(t,null,e)},delegate:function(t,e,n,i){return this.on(e,t,n,i)},undelegate:function(t,e,n){return 1===arguments.length?this.off(t,"**"):this.off(e,t||"**",n)}});var Dn=re.now(),On=/\?/,In=/(,)|(\[|{)|(}|])|"(?:[^"\\\r\n]|\\["\\\/bfnrt]|\\u[\da-fA-F]{4})*"\s*:?|true|false|null|-?(?!0\d)\d+(?:\.\d+|)(?:[eE][+-]?\d+|)/g;re.parseJSON=function(e){if(t.JSON&&t.JSON.parse)return t.JSON.parse(e+"");var n,i=null,r=re.trim(e+"");return r&&!re.trim(r.replace(In,function(t,e,r,o){return n&&e&&(i=0),0===i?t:(n=r||e,i+=!o-!r,"")}))?Function("return "+r)():re.error("Invalid JSON: "+e)},re.parseXML=function(e){var n,i;if(!e||"string"!=typeof e)return null;try{t.DOMParser?(i=new DOMParser,n=i.parseFromString(e,"text/xml")):(n=new ActiveXObject("Microsoft.XMLDOM"),n.async="false",n.loadXML(e))}catch(r){n=void 0}return n&&n.documentElement&&!n.getElementsByTagName("parsererror").length||re.error("Invalid XML: "+e),n};var jn,Ln,Fn=/#.*$/,Rn=/([?&])_=[^&]*/,Hn=/^(.*?):[ \t]*([^\r\n]*)\r?$/gm,qn=/^(?:about|app|app-storage|.+-extension|file|res|widget):$/,Pn=/^(?:GET|HEAD)$/,zn=/^\/\//,Mn=/^([\w.+-]+:)(?:\/\/(?:[^\/?#]*@|)([^\/?#:]*)(?::(\d+)|)|)/,Bn={},Wn={},Un="*/".concat("*");try{Ln=location.href}catch(Vn){Ln=fe.createElement("a"),Ln.href="",Ln=Ln.href}jn=Mn.exec(Ln.toLowerCase())||[],re.extend({active:0,lastModified:{},etag:{},ajaxSettings:{url:Ln,type:"GET",isLocal:qn.test(jn[1]),global:!0,processData:!0,async:!0,contentType:"application/x-www-form-urlencoded; charset=UTF-8",accepts:{"*":Un,text:"text/plain",html:"text/html",xml:"application/xml, text/xml",json:"application/json, text/javascript"},contents:{xml:/xml/,html:/html/,json:/json/},responseFields:{xml:"responseXML",text:"responseText",json:"responseJSON"},converters:{"* text":String,"text html":!0,"text json":re.parseJSON,"text xml":re.parseXML},flatOptions:{url:!0,context:!0}},ajaxSetup:function(t,e){return e?z(z(t,re.ajaxSettings),e):z(re.ajaxSettings,t)},ajaxPrefilter:q(Bn),ajaxTransport:q(Wn),ajax:function(t,e){function n(t,e,n,i){var r,c,v,y,w,C=e;2!==b&&(b=2,a&&clearTimeout(a),u=void 0,s=i||"",x.readyState=t>0?4:0,r=t>=200&&300>t||304===t,n&&(y=M(d,x,n)),y=B(d,y,x,r),r?(d.ifModified&&(w=x.getResponseHeader("Last-Modified"),w&&(re.lastModified[o]=w),w=x.getResponseHeader("etag"),w&&(re.etag[o]=w)),204===t||"HEAD"===d.type?C="nocontent":304===t?C="notmodified":(C=y.state,c=y.data,v=y.error,r=!v)):(v=C,(t||!C)&&(C="error",0>t&&(t=0))),x.status=t,x.statusText=(e||C)+"",r?f.resolveWith(p,[c,C,x]):f.rejectWith(p,[x,C,v]),x.statusCode(m),m=void 0,l&&h.trigger(r?"ajaxSuccess":"ajaxError",[x,d,r?c:v]),g.fireWith(p,[x,C]),l&&(h.trigger("ajaxComplete",[x,d]),--re.active||re.event.trigger("ajaxStop")))}"object"==typeof t&&(e=t,t=void 0),e=e||{};var i,r,o,s,a,l,u,c,d=re.ajaxSetup({},e),p=d.context||d,h=d.context&&(p.nodeType||p.jquery)?re(p):re.event,f=re.Deferred(),g=re.Callbacks("once memory"),m=d.statusCode||{},v={},y={},b=0,w="canceled",x={readyState:0,getResponseHeader:function(t){var e;if(2===b){if(!c)for(c={};e=Hn.exec(s);)c[e[1].toLowerCase()]=e[2];e=c[t.toLowerCase()]}return null==e?null:e},getAllResponseHeaders:function(){return 2===b?s:null},setRequestHeader:function(t,e){var n=t.toLowerCase();return b||(t=y[n]=y[n]||t,v[t]=e),this},overrideMimeType:function(t){return b||(d.mimeType=t),this},statusCode:function(t){var e;if(t)if(2>b)for(e in t)m[e]=[m[e],t[e]];else x.always(t[x.status]);return this},abort:function(t){var e=t||w;return u&&u.abort(e),n(0,e),this}};if(f.promise(x).complete=g.add,x.success=x.done,x.error=x.fail,d.url=((t||d.url||Ln)+"").replace(Fn,"").replace(zn,jn[1]+"//"),d.type=e.method||e.type||d.method||d.type,d.dataTypes=re.trim(d.dataType||"*").toLowerCase().match(be)||[""],null==d.crossDomain&&(i=Mn.exec(d.url.toLowerCase()),d.crossDomain=!(!i||i[1]===jn[1]&&i[2]===jn[2]&&(i[3]||("http:"===i[1]?"80":"443"))===(jn[3]||("http:"===jn[1]?"80":"443")))),d.data&&d.processData&&"string"!=typeof d.data&&(d.data=re.param(d.data,d.traditional)),P(Bn,d,e,x),2===b)return x;l=re.event&&d.global,l&&0===re.active++&&re.event.trigger("ajaxStart"),d.type=d.type.toUpperCase(),d.hasContent=!Pn.test(d.type),o=d.url,d.hasContent||(d.data&&(o=d.url+=(On.test(o)?"&":"?")+d.data,delete d.data),d.cache===!1&&(d.url=Rn.test(o)?o.replace(Rn,"$1_="+Dn++):o+(On.test(o)?"&":"?")+"_="+Dn++)),d.ifModified&&(re.lastModified[o]&&x.setRequestHeader("If-Modified-Since",re.lastModified[o]),re.etag[o]&&x.setRequestHeader("If-None-Match",re.etag[o])),(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]?", "+Un+"; q=0.01":""):d.accepts["*"]);for(r in d.headers)x.setRequestHeader(r,d.headers[r]);if(d.beforeSend&&(d.beforeSend.call(p,x,d)===!1||2===b))return x.abort();w="abort";for(r in{success:1,error:1,complete:1})x[r](d[r]);if(u=P(Wn,d,e,x)){x.readyState=1,l&&h.trigger("ajaxSend",[x,d]),d.async&&d.timeout>0&&(a=setTimeout(function(){x.abort("timeout")},d.timeout));try{b=1,u.send(v,n)}catch(C){if(!(2>b))throw C;n(-1,C)}}else n(-1,"No Transport");return x},getJSON:function(t,e,n){return re.get(t,e,n,"json")},getScript:function(t,e){return re.get(t,void 0,e,"script")}}),re.each(["get","post"],function(t,e){re[e]=function(t,n,i,r){return re.isFunction(n)&&(r=r||i,i=n,n=void 0),re.ajax({url:t,type:e,dataType:r,data:n,success:i})}}),re._evalUrl=function(t){return re.ajax({url:t,type:"GET",dataType:"script",async:!1,global:!1,"throws":!0})},re.fn.extend({wrapAll:function(t){if(re.isFunction(t))return this.each(function(e){re(this).wrapAll(t.call(this,e))});if(this[0]){var e=re(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 this.each(re.isFunction(t)?function(e){re(this).wrapInner(t.call(this,e))}:function(){var e=re(this),n=e.contents();n.length?n.wrapAll(t):e.append(t)})},wrap:function(t){var e=re.isFunction(t);return this.each(function(n){re(this).wrapAll(e?t.call(this,n):t)})},unwrap:function(){return this.parent().each(function(){re.nodeName(this,"body")||re(this).replaceWith(this.childNodes)}).end()}}),re.expr.filters.hidden=function(t){return t.offsetWidth<=0&&t.offsetHeight<=0||!ne.reliableHiddenOffsets()&&"none"===(t.style&&t.style.display||re.css(t,"display"))},re.expr.filters.visible=function(t){return!re.expr.filters.hidden(t)};var Kn=/%20/g,Qn=/\[\]$/,Xn=/\r?\n/g,Gn=/^(?:submit|button|image|reset|file)$/i,Yn=/^(?:input|select|textarea|keygen)/i;re.param=function(t,e){var n,i=[],r=function(t,e){e=re.isFunction(e)?e():null==e?"":e,i[i.length]=encodeURIComponent(t)+"="+encodeURIComponent(e)};if(void 0===e&&(e=re.ajaxSettings&&re.ajaxSettings.traditional),re.isArray(t)||t.jquery&&!re.isPlainObject(t))re.each(t,function(){r(this.name,this.value)});else for(n in t)W(n,t[n],e,r);return i.join("&").replace(Kn,"+")},re.fn.extend({serialize:function(){return re.param(this.serializeArray())},serializeArray:function(){return this.map(function(){var t=re.prop(this,"elements");return t?re.makeArray(t):this}).filter(function(){var t=this.type;return this.name&&!re(this).is(":disabled")&&Yn.test(this.nodeName)&&!Gn.test(t)&&(this.checked||!Ne.test(t))}).map(function(t,e){var n=re(this).val();return null==n?null:re.isArray(n)?re.map(n,function(t){return{name:e.name,value:t.replace(Xn,"\r\n")}}):{name:e.name,value:n.replace(Xn,"\r\n")}}).get()}}),re.ajaxSettings.xhr=void 0!==t.ActiveXObject?function(){return!this.isLocal&&/^(get|post|head|put|delete|options)$/i.test(this.type)&&U()||V()}:U;var Jn=0,Zn={},ti=re.ajaxSettings.xhr();t.attachEvent&&t.attachEvent("onunload",function(){for(var t in Zn)Zn[t](void 0,!0)}),ne.cors=!!ti&&"withCredentials"in ti,ti=ne.ajax=!!ti,ti&&re.ajaxTransport(function(t){if(!t.crossDomain||ne.cors){var e;return{send:function(n,i){var r,o=t.xhr(),s=++Jn;if(o.open(t.type,t.url,t.async,t.username,t.password),t.xhrFields)for(r in t.xhrFields)o[r]=t.xhrFields[r];t.mimeType&&o.overrideMimeType&&o.overrideMimeType(t.mimeType),t.crossDomain||n["X-Requested-With"]||(n["X-Requested-With"]="XMLHttpRequest");for(r in n)void 0!==n[r]&&o.setRequestHeader(r,n[r]+"");o.send(t.hasContent&&t.data||null),e=function(n,r){var a,l,u;if(e&&(r||4===o.readyState))if(delete Zn[s],e=void 0,o.onreadystatechange=re.noop,r)4!==o.readyState&&o.abort();else{u={},a=o.status,"string"==typeof o.responseText&&(u.text=o.responseText);try{l=o.statusText}catch(c){l=""}a||!t.isLocal||t.crossDomain?1223===a&&(a=204):a=u.text?200:404}u&&i(a,l,u,o.getAllResponseHeaders())},t.async?4===o.readyState?setTimeout(e):o.onreadystatechange=Zn[s]=e:e()},abort:function(){e&&e(void 0,!0)}}}}),re.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/(?:java|ecma)script/},converters:{"text script":function(t){return re.globalEval(t),t}}}),re.ajaxPrefilter("script",function(t){void 0===t.cache&&(t.cache=!1),t.crossDomain&&(t.type="GET",t.global=!1)}),re.ajaxTransport("script",function(t){if(t.crossDomain){var e,n=fe.head||re("head")[0]||fe.documentElement;return{send:function(i,r){e=fe.createElement("script"),e.async=!0,t.scriptCharset&&(e.charset=t.scriptCharset),e.src=t.url,e.onload=e.onreadystatechange=function(t,n){(n||!e.readyState||/loaded|complete/.test(e.readyState))&&(e.onload=e.onreadystatechange=null,e.parentNode&&e.parentNode.removeChild(e),e=null,n||r(200,"success"))},n.insertBefore(e,n.firstChild)},abort:function(){e&&e.onload(void 0,!0)}}}});var ei=[],ni=/(=)\?(?=&|$)|\?\?/;re.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var t=ei.pop()||re.expando+"_"+Dn++;return this[t]=!0,t}}),re.ajaxPrefilter("json jsonp",function(e,n,i){var r,o,s,a=e.jsonp!==!1&&(ni.test(e.url)?"url":"string"==typeof e.data&&!(e.contentType||"").indexOf("application/x-www-form-urlencoded")&&ni.test(e.data)&&"data");return a||"jsonp"===e.dataTypes[0]?(r=e.jsonpCallback=re.isFunction(e.jsonpCallback)?e.jsonpCallback():e.jsonpCallback,a?e[a]=e[a].replace(ni,"$1"+r):e.jsonp!==!1&&(e.url+=(On.test(e.url)?"&":"?")+e.jsonp+"="+r),e.converters["script json"]=function(){return s||re.error(r+" was not called"),s[0]},e.dataTypes[0]="json",o=t[r],t[r]=function(){s=arguments},i.always(function(){t[r]=o,e[r]&&(e.jsonpCallback=n.jsonpCallback,ei.push(r)),s&&re.isFunction(o)&&o(s[0]),s=o=void 0}),"script"):void 0}),re.parseHTML=function(t,e,n){if(!t||"string"!=typeof t)return null;"boolean"==typeof e&&(n=e,e=!1),e=e||fe;var i=de.exec(t),r=!n&&[];return i?[e.createElement(i[1])]:(i=re.buildFragment([t],e,r),r&&r.length&&re(r).remove(),re.merge([],i.childNodes))};var ii=re.fn.load;re.fn.load=function(t,e,n){if("string"!=typeof t&&ii)return ii.apply(this,arguments);var i,r,o,s=this,a=t.indexOf(" ");return a>=0&&(i=re.trim(t.slice(a,t.length)),t=t.slice(0,a)),re.isFunction(e)?(n=e,e=void 0):e&&"object"==typeof e&&(o="POST"),s.length>0&&re.ajax({url:t,type:o,dataType:"html",data:e}).done(function(t){r=arguments,s.html(i?re("<div>").append(re.parseHTML(t)).find(i):t)}).complete(n&&function(t,e){s.each(n,r||[t.responseText,e,t])}),this},re.each(["ajaxStart","ajaxStop","ajaxComplete","ajaxError","ajaxSuccess","ajaxSend"],function(t,e){re.fn[e]=function(t){return this.on(e,t)}}),re.expr.filters.animated=function(t){return re.grep(re.timers,function(e){return t===e.elem}).length};var ri=t.document.documentElement;re.offset={setOffset:function(t,e,n){var i,r,o,s,a,l,u,c=re.css(t,"position"),d=re(t),p={};"static"===c&&(t.style.position="relative"),a=d.offset(),o=re.css(t,"top"),l=re.css(t,"left"),u=("absolute"===c||"fixed"===c)&&re.inArray("auto",[o,l])>-1,u?(i=d.position(),s=i.top,r=i.left):(s=parseFloat(o)||0,r=parseFloat(l)||0),re.isFunction(e)&&(e=e.call(t,n,a)),null!=e.top&&(p.top=e.top-a.top+s),null!=e.left&&(p.left=e.left-a.left+r),"using"in e?e.using.call(t,p):d.css(p)}},re.fn.extend({offset:function(t){if(arguments.length)return void 0===t?this:this.each(function(e){re.offset.setOffset(this,t,e)});var e,n,i={top:0,left:0},r=this[0],o=r&&r.ownerDocument;if(o)return e=o.documentElement,re.contains(e,r)?(typeof r.getBoundingClientRect!==Te&&(i=r.getBoundingClientRect()),n=K(o),{top:i.top+(n.pageYOffset||e.scrollTop)-(e.clientTop||0),left:i.left+(n.pageXOffset||e.scrollLeft)-(e.clientLeft||0)}):i},position:function(){if(this[0]){var t,e,n={top:0,left:0},i=this[0];return"fixed"===re.css(i,"position")?e=i.getBoundingClientRect():(t=this.offsetParent(),e=this.offset(),re.nodeName(t[0],"html")||(n=t.offset()),n.top+=re.css(t[0],"borderTopWidth",!0),n.left+=re.css(t[0],"borderLeftWidth",!0)),{top:e.top-n.top-re.css(i,"marginTop",!0),left:e.left-n.left-re.css(i,"marginLeft",!0)}}},offsetParent:function(){return this.map(function(){for(var t=this.offsetParent||ri;t&&!re.nodeName(t,"html")&&"static"===re.css(t,"position");)t=t.offsetParent;return t||ri})}}),re.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},function(t,e){var n=/Y/.test(e);re.fn[t]=function(i){return Ae(this,function(t,i,r){var o=K(t);return void 0===r?o?e in o?o[e]:o.document.documentElement[i]:t[i]:void(o?o.scrollTo(n?re(o).scrollLeft():r,n?r:re(o).scrollTop()):t[i]=r)},t,i,arguments.length,null)}}),re.each(["top","left"],function(t,e){re.cssHooks[e]=E(ne.pixelPosition,function(t,n){return n?(n=en(t,e),rn.test(n)?re(t).position()[e]+"px":n):void 0})}),re.each({Height:"height",Width:"width"},function(t,e){re.each({padding:"inner"+t,content:e,"":"outer"+t},function(n,i){re.fn[i]=function(i,r){var o=arguments.length&&(n||"boolean"!=typeof i),s=n||(i===!0||r===!0?"margin":"border");return Ae(this,function(e,n,i){var r;return re.isWindow(e)?e.document.documentElement["client"+t]:9===e.nodeType?(r=e.documentElement,Math.max(e.body["scroll"+t],r["scroll"+t],e.body["offset"+t],r["offset"+t],r["client"+t])):void 0===i?re.css(e,n,s):re.style(e,n,i,s)},e,o?i:void 0,o,null)}})}),re.fn.size=function(){return this.length},re.fn.andSelf=re.fn.addBack,"function"==typeof define&&define.amd&&define("jquery",[],function(){return re});var oi=t.jQuery,si=t.$;return re.noConflict=function(e){return t.$===re&&(t.$=si),e&&t.jQuery===re&&(t.jQuery=oi),re},typeof e===Te&&(t.jQuery=t.$=re),re}),function(t,e){t.rails!==e&&t.error("jquery-ujs has already been loaded!");var n,i=t(document);t.rails=n={linkClickSelector:"a[data-confirm], a[data-method], a[data-remote], a[data-disable-with], a[data-disable]",buttonClickSelector:"button[data-remote]:not(form button), button[data-confirm]:not(form button)",inputChangeSelector:"select[data-remote], input[data-remote], textarea[data-remote]",formSubmitSelector:"form",formInputClickSelector:"form input[type=submit], form input[type=image], form button[type=submit], form button:not([type]), input[type=submit][form], input[type=image][form], button[type=submit][form], button[form]:not([type])",disableSelector:"input[data-disable-with]:enabled, button[data-disable-with]:enabled, textarea[data-disable-with]:enabled, input[data-disable]:enabled, button[data-disable]:enabled, textarea[data-disable]:enabled",enableSelector:"input[data-disable-with]:disabled, button[data-disable-with]:disabled, textarea[data-disable-with]:disabled, input[data-disable]:disabled, button[data-disable]:disabled, textarea[data-disable]:disabled",requiredInputSelector:"input[name][required]:not([disabled]),textarea[name][required]:not([disabled])",fileInputSelector:"input[type=file]",linkDisableSelector:"a[data-disable-with], a[data-disable]",buttonDisableSelector:"button[data-remote][data-disable-with], button[data-remote][data-disable]",CSRFProtection:function(e){var n=t('meta[name="csrf-token"]').attr("content");n&&e.setRequestHeader("X-CSRF-Token",n)},refreshCSRFTokens:function(){var e=t("meta[name=csrf-token]").attr("content"),n=t("meta[name=csrf-param]").attr("content");t('form input[name="'+n+'"]').val(e)},fire:function(e,n,i){var r=t.Event(n);return e.trigger(r,i),r.result!==!1},confirm:function(t){return confirm(t)},ajax:function(e){return t.ajax(e)},href:function(t){return t.attr("href")},handleRemote:function(i){var r,o,s,a,l,u,c,d;
|
|
if(n.fire(i,"ajax:before")){if(a=i.data("cross-domain"),l=a===e?null:a,u=i.data("with-credentials")||null,c=i.data("type")||t.ajaxSettings&&t.ajaxSettings.dataType,i.is("form")){r=i.attr("method"),o=i.attr("action"),s=i.serializeArray();var p=i.data("ujs:submit-button");p&&(s.push(p),i.data("ujs:submit-button",null))}else i.is(n.inputChangeSelector)?(r=i.data("method"),o=i.data("url"),s=i.serialize(),i.data("params")&&(s=s+"&"+i.data("params"))):i.is(n.buttonClickSelector)?(r=i.data("method")||"get",o=i.data("url"),s=i.serialize(),i.data("params")&&(s=s+"&"+i.data("params"))):(r=i.data("method"),o=n.href(i),s=i.data("params")||null);return d={type:r||"GET",data:s,dataType:c,beforeSend:function(t,r){return r.dataType===e&&t.setRequestHeader("accept","*/*;q=0.5, "+r.accepts.script),n.fire(i,"ajax:beforeSend",[t,r])?void i.trigger("ajax:send",t):!1},success:function(t,e,n){i.trigger("ajax:success",[t,e,n])},complete:function(t,e){i.trigger("ajax:complete",[t,e])},error:function(t,e,n){i.trigger("ajax:error",[t,e,n])},crossDomain:l},u&&(d.xhrFields={withCredentials:u}),o&&(d.url=o),n.ajax(d)}return!1},handleMethod:function(i){var r=n.href(i),o=i.data("method"),s=i.attr("target"),a=t("meta[name=csrf-token]").attr("content"),l=t("meta[name=csrf-param]").attr("content"),u=t('<form method="post" action="'+r+'"></form>'),c='<input name="_method" value="'+o+'" type="hidden" />';l!==e&&a!==e&&(c+='<input name="'+l+'" value="'+a+'" type="hidden" />'),s&&u.attr("target",s),u.hide().append(c).appendTo("body"),u.submit()},formElements:function(e,n){return e.is("form")?t(e[0].elements).filter(n):e.find(n)},disableFormElements:function(e){n.formElements(e,n.disableSelector).each(function(){n.disableFormElement(t(this))})},disableFormElement:function(t){var n,i;n=t.is("button")?"html":"val",i=t.data("disable-with"),t.data("ujs:enable-with",t[n]()),i!==e&&t[n](i),t.prop("disabled",!0)},enableFormElements:function(e){n.formElements(e,n.enableSelector).each(function(){n.enableFormElement(t(this))})},enableFormElement:function(t){var e=t.is("button")?"html":"val";t.data("ujs:enable-with")&&t[e](t.data("ujs:enable-with")),t.prop("disabled",!1)},allowAction:function(t){var e,i=t.data("confirm"),r=!1;return i?(n.fire(t,"confirm")&&(r=n.confirm(i),e=n.fire(t,"confirm:complete",[r])),r&&e):!0},blankInputs:function(e,n,i){var r,o,s=t(),a=n||"input,textarea",l=e.find(a);return l.each(function(){if(r=t(this),o=r.is("input[type=checkbox],input[type=radio]")?r.is(":checked"):r.val(),!o==!i){if(r.is("input[type=radio]")&&l.filter('input[type=radio]:checked[name="'+r.attr("name")+'"]').length)return!0;s=s.add(r)}}),s.length?s:!1},nonBlankInputs:function(t,e){return n.blankInputs(t,e,!0)},stopEverything:function(e){return t(e.target).trigger("ujs:everythingStopped"),e.stopImmediatePropagation(),!1},disableElement:function(t){var i=t.data("disable-with");t.data("ujs:enable-with",t.html()),i!==e&&t.html(i),t.bind("click.railsDisable",function(t){return n.stopEverything(t)})},enableElement:function(t){t.data("ujs:enable-with")!==e&&(t.html(t.data("ujs:enable-with")),t.removeData("ujs:enable-with")),t.unbind("click.railsDisable")}},n.fire(i,"rails:attachBindings")&&(t.ajaxPrefilter(function(t,e,i){t.crossDomain||n.CSRFProtection(i)}),t(window).on("pageshow.rails",function(){t(t.rails.enableSelector).each(function(){var e=t(this);e.data("ujs:enable-with")&&t.rails.enableFormElement(e)}),t(t.rails.linkDisableSelector).each(function(){var e=t(this);e.data("ujs:enable-with")&&t.rails.enableElement(e)})}),i.delegate(n.linkDisableSelector,"ajax:complete",function(){n.enableElement(t(this))}),i.delegate(n.buttonDisableSelector,"ajax:complete",function(){n.enableFormElement(t(this))}),i.delegate(n.linkClickSelector,"click.rails",function(i){var r=t(this),o=r.data("method"),s=r.data("params"),a=i.metaKey||i.ctrlKey;if(!n.allowAction(r))return n.stopEverything(i);if(!a&&r.is(n.linkDisableSelector)&&n.disableElement(r),r.data("remote")!==e){if(a&&(!o||"GET"===o)&&!s)return!0;var l=n.handleRemote(r);return l===!1?n.enableElement(r):l.fail(function(){n.enableElement(r)}),!1}return o?(n.handleMethod(r),!1):void 0}),i.delegate(n.buttonClickSelector,"click.rails",function(e){var i=t(this);if(!n.allowAction(i))return n.stopEverything(e);i.is(n.buttonDisableSelector)&&n.disableFormElement(i);var r=n.handleRemote(i);return r===!1?n.enableFormElement(i):r.fail(function(){n.enableFormElement(i)}),!1}),i.delegate(n.inputChangeSelector,"change.rails",function(e){var i=t(this);return n.allowAction(i)?(n.handleRemote(i),!1):n.stopEverything(e)}),i.delegate(n.formSubmitSelector,"submit.rails",function(i){var r,o,s=t(this),a=s.data("remote")!==e;if(!n.allowAction(s))return n.stopEverything(i);if(s.attr("novalidate")==e&&(r=n.blankInputs(s,n.requiredInputSelector),r&&n.fire(s,"ajax:aborted:required",[r])))return n.stopEverything(i);if(a){if(o=n.nonBlankInputs(s,n.fileInputSelector)){setTimeout(function(){n.disableFormElements(s)},13);var l=n.fire(s,"ajax:aborted:file",[o]);return l||setTimeout(function(){n.enableFormElements(s)},13),l}return n.handleRemote(s),!1}setTimeout(function(){n.disableFormElements(s)},13)}),i.delegate(n.formInputClickSelector,"click.rails",function(e){var i=t(this);if(!n.allowAction(i))return n.stopEverything(e);var r=i.attr("name"),o=r?{name:r,value:i.val()}:null;i.closest("form").data("ujs:submit-button",o)}),i.delegate(n.formSubmitSelector,"ajax:send.rails",function(e){this==e.target&&n.disableFormElements(t(this))}),i.delegate(n.formSubmitSelector,"ajax:complete.rails",function(e){this==e.target&&n.enableFormElements(t(this))}),t(function(){n.refreshCSRFTokens()}))}(jQuery),function(){var t,e,n,i,r,o,s,a,l,u,c,d,p,h,f,g,m,v,y,b,w,x,C,T,S,k,E,$,_,A,N,D,O,I,j,L,F,R,H,q,P,z,M,B,W,U,V,K,Q,X,G,Y,J,Z,te,ee,ne=[].indexOf||function(t){for(var e=0,n=this.length;n>e;e++)if(e in this&&this[e]===t)return e;return-1},ie={}.hasOwnProperty,re=function(t,e){function n(){this.constructor=t}for(var i in e)ie.call(e,i)&&(t[i]=e[i]);return n.prototype=e.prototype,t.prototype=new n,t.__super__=e.prototype,t},oe=[].slice,se=function(t,e){return function(){return t.apply(e,arguments)}};I={},p=10,G=!1,H=null,y=null,D=null,P=null,te=null,i={BEFORE_CHANGE:"page:before-change",FETCH:"page:fetch",RECEIVE:"page:receive",CHANGE:"page:change",UPDATE:"page:update",LOAD:"page:load",RESTORE:"page:restore",BEFORE_UNLOAD:"page:before-unload",EXPIRE:"page:expire"},T=function(t){var e;return t=new n(t),U(),d(),null!=H&&H.start(),G&&(e=Y(t.absolute))?(S(e),k(t,null,!1)):k(t,Q)},Y=function(t){var e;return e=I[t],e&&!e.transitionCacheDisabled?e:void 0},w=function(t){return null==t&&(t=!0),G=t},b=function(t){return null==t&&(t=!0),u?t?null!=H?H:H=new o("html"):(null!=H&&H.uninstall(),H=null):void 0},k=function(t,e,n){return null==n&&(n=!0),J(i.FETCH,{url:t.absolute}),null!=te&&te.abort(),te=new XMLHttpRequest,te.open("GET",t.withoutHashForIE10compatibility(),!0),te.setRequestHeader("Accept","text/html, application/xhtml+xml, application/xml"),te.setRequestHeader("X-XHR-Referer",P),te.onload=function(){var n;return J(i.RECEIVE,{url:t.absolute}),(n=R())?(z(t),M(),h.apply(null,C(n)),O(),"function"==typeof e&&e(),J(i.LOAD)):document.location.href=v()||t.absolute},H&&n&&(te.onprogress=function(){return function(t){var e;return e=t.lengthComputable?t.loaded/t.total*100:H.value+(100-H.value)/10,H.advanceTo(e)}}(this)),te.onloadend=function(){return te=null},te.onerror=function(){return document.location.href=t.absolute},te.send()},S=function(t){return null!=te&&te.abort(),h(t.title,t.body),q(t),J(i.RESTORE)},d=function(){var t;return t=new n(y.url),I[t.absolute]={url:t.relative,body:document.body,title:document.title,positionY:window.pageYOffset,positionX:window.pageXOffset,cachedAt:(new Date).getTime(),transitionCacheDisabled:null!=document.querySelector("[data-no-transition-cache]")},g(p)},L=function(t){return null==t&&(t=p),/^[\d]+$/.test(t)?p=parseInt(t):void 0},g=function(t){var e,n,r,o,s,a;for(r=Object.keys(I),e=r.map(function(t){return I[t].cachedAt}).sort(function(t,e){return e-t}),a=[],o=0,s=r.length;s>o;o++)n=r[o],I[n].cachedAt<=e[t]&&(J(i.EXPIRE,I[n]),a.push(delete I[n]));return a},h=function(e,n,r,o){return J(i.BEFORE_UNLOAD),document.title=e,document.documentElement.replaceChild(n,document.body),null!=r&&t.update(r),X(),o&&x(),y=window.history.state,null!=H&&H.done(),J(i.CHANGE),J(i.UPDATE)},x=function(){var t,e,n,i,r,o,s,a,l,u,c,d;for(o=Array.prototype.slice.call(document.body.querySelectorAll('script:not([data-turbolinks-eval="false"])')),s=0,l=o.length;l>s;s++)if(r=o[s],""===(c=r.type)||"text/javascript"===c){for(e=document.createElement("script"),d=r.attributes,a=0,u=d.length;u>a;a++)t=d[a],e.setAttribute(t.name,t.value);r.hasAttribute("async")||(e.async=!1),e.appendChild(document.createTextNode(r.innerHTML)),i=r.parentNode,n=r.nextSibling,i.removeChild(r),i.insertBefore(e,n)}},V=function(t){return t.innerHTML=t.innerHTML.replace(/<noscript[\S\s]*?<\/noscript>/gi,""),t},X=function(){var t,e;return t=(e=document.querySelectorAll("input[autofocus], textarea[autofocus]"))[e.length-1],t&&document.activeElement!==t?t.focus():void 0},z=function(t){return(t=new n(t)).absolute!==P?window.history.pushState({turbolinks:!0,url:t.absolute},"",t.absolute):void 0},M=function(){var t,e;return(t=te.getResponseHeader("X-XHR-Redirected-To"))?(t=new n(t),e=t.hasNoHash()?document.location.hash:"",window.history.replaceState(window.history.state,"",t.href+e)):void 0},v=function(){var t;return null!=(t=te.getResponseHeader("Location"))&&new n(t).crossOrigin()?t:void 0},U=function(){return P=document.location.href},W=function(){return window.history.replaceState({turbolinks:!0,url:document.location.href},"",document.location.href)},B=function(){return y=window.history.state},O=function(){var t;return navigator.userAgent.match(/Firefox/)&&!(t=new n).hasNoHash()?(window.history.replaceState(y,"",t.withoutHash()),document.location.hash=t.hash):void 0},q=function(t){return window.scrollTo(t.positionX,t.positionY)},Q=function(){return document.location.hash?document.location.href=document.location.href:window.scrollTo(0,0)},f=function(t){var e,n,i;if(null==t||"object"!=typeof t)return t;e=new t.constructor;for(n in t)i=t[n],e[n]=f(i);return e},F=function(t){var e,n;return e=(null!=(n=document.cookie.match(new RegExp(t+"=(\\w+)")))?n[1].toUpperCase():void 0)||"",document.cookie=t+"=; expires=Thu, 01-Jan-70 00:00:01 GMT; path=/",e},J=function(t,e){var n;return"undefined"!=typeof Prototype&&Event.fire(document,t,e,!0),n=document.createEvent("Events"),e&&(n.data=e),n.initEvent(t,!0,!0),document.dispatchEvent(n)},j=function(t){return!J(i.BEFORE_CHANGE,{url:t})},R=function(){var t,e,n,i,r,o;return e=function(){var t;return 400<=(t=te.status)&&600>t},o=function(){var t;return null!=(t=te.getResponseHeader("Content-Type"))&&t.match(/^(?:text\/html|application\/xhtml\+xml|application\/xml)(?:;|$)/)},i=function(t){var e,n,i,r,o;for(r=t.querySelector("head").childNodes,o=[],n=0,i=r.length;i>n;n++)e=r[n],null!=("function"==typeof e.getAttribute?e.getAttribute("data-turbolinks-track"):void 0)&&o.push(e.getAttribute("src")||e.getAttribute("href"));return o},t=function(t){var e;return D||(D=i(document)),e=i(t),e.length!==D.length||r(e,D).length!==D.length},r=function(t,e){var n,i,r,o,s;for(t.length>e.length&&(o=[e,t],t=o[0],e=o[1]),s=[],i=0,r=t.length;r>i;i++)n=t[i],ne.call(e,n)>=0&&s.push(n);return s},!e()&&o()&&(n=m(te.responseText),n&&!t(n))?n:void 0},C=function(e){var n;return n=e.querySelector("title"),[null!=n?n.textContent:void 0,V(e.querySelector("body")),t.get(e).token,"runScripts"]},t={get:function(t){var e;return null==t&&(t=document),{node:e=t.querySelector('meta[name="csrf-token"]'),token:null!=e&&"function"==typeof e.getAttribute?e.getAttribute("content"):void 0}},update:function(t){var e;return e=this.get(),null!=e.token&&null!=t&&e.token!==t?e.node.setAttribute("content",t):void 0}},m=function(t){var e;return e=document.documentElement.cloneNode(),e.innerHTML=t,e.head=e.querySelector("head"),e.body=e.querySelector("body"),e},n=function(){function t(e){return this.original=null!=e?e:document.location.href,this.original.constructor===t?this.original:void this._parse()}return t.prototype.withoutHash=function(){return this.href.replace(this.hash,"").replace("#","")},t.prototype.withoutHashForIE10compatibility=function(){return this.withoutHash()},t.prototype.hasNoHash=function(){return 0===this.hash.length},t.prototype.crossOrigin=function(){return this.origin!==(new t).origin},t.prototype._parse=function(){var t;return(null!=this.link?this.link:this.link=document.createElement("a")).href=this.original,t=this.link,this.href=t.href,this.protocol=t.protocol,this.host=t.host,this.hostname=t.hostname,this.port=t.port,this.pathname=t.pathname,this.search=t.search,this.hash=t.hash,this.origin=[this.protocol,"//",this.hostname].join(""),0!==this.port.length&&(this.origin+=":"+this.port),this.relative=[this.pathname,this.search,this.hash].join(""),this.absolute=this.href},t}(),r=function(t){function e(t){return this.link=t,this.link.constructor===e?this.link:(this.original=this.link.href,this.originalElement=this.link,this.link=this.link.cloneNode(!1),void e.__super__.constructor.apply(this,arguments))}return re(e,t),e.HTML_EXTENSIONS=["html"],e.allowExtensions=function(){var t,n,i,r;for(n=1<=arguments.length?oe.call(arguments,0):[],i=0,r=n.length;r>i;i++)t=n[i],e.HTML_EXTENSIONS.push(t);return e.HTML_EXTENSIONS},e.prototype.shouldIgnore=function(){return this.crossOrigin()||this._anchored()||this._nonHtml()||this._optOut()||this._target()},e.prototype._anchored=function(){return(this.hash.length>0||"#"===this.href.charAt(this.href.length-1))&&this.withoutHash()===(new n).withoutHash()},e.prototype._nonHtml=function(){return this.pathname.match(/\.[a-z]+$/g)&&!this.pathname.match(new RegExp("\\.(?:"+e.HTML_EXTENSIONS.join("|")+")?$","g"))},e.prototype._optOut=function(){var t,e;for(e=this.originalElement;!t&&e!==document;)t=null!=e.getAttribute("data-no-turbolink"),e=e.parentNode;return t},e.prototype._target=function(){return 0!==this.link.target.length},e}(n),e=function(){function t(t){this.event=t,this.event.defaultPrevented||(this._extractLink(),this._validForTurbolinks()&&(j(this.link.absolute)||Z(this.link.href),this.event.preventDefault()))}return t.installHandlerLast=function(e){return e.defaultPrevented?void 0:(document.removeEventListener("click",t.handle,!1),document.addEventListener("click",t.handle,!1))},t.handle=function(e){return new t(e)},t.prototype._extractLink=function(){var t;for(t=this.event.target;t.parentNode&&"A"!==t.nodeName;)t=t.parentNode;return"A"===t.nodeName&&0!==t.href.length?this.link=new r(t):void 0},t.prototype._validForTurbolinks=function(){return null!=this.link&&!(this.link.shouldIgnore()||this._nonStandardClick())},t.prototype._nonStandardClick=function(){return this.event.which>1||this.event.metaKey||this.event.ctrlKey||this.event.shiftKey||this.event.altKey},t}(),o=function(){function t(t){this.elementSelector=t,this._trickle=se(this._trickle,this),this.value=0,this.content="",this.speed=300,this.opacity=.99,this.install()}var e;return e="turbolinks-progress-bar",t.prototype.install=function(){return this.element=document.querySelector(this.elementSelector),this.element.classList.add(e),this.styleElement=document.createElement("style"),document.head.appendChild(this.styleElement),this._updateStyle()},t.prototype.uninstall=function(){return this.element.classList.remove(e),document.head.removeChild(this.styleElement)},t.prototype.start=function(){return this.advanceTo(5)},t.prototype.advanceTo=function(t){var e;if(t>(e=this.value)&&100>=e){if(this.value=t,this._updateStyle(),100===this.value)return this._stopTrickle();if(this.value>0)return this._startTrickle()}},t.prototype.done=function(){return this.value>0?(this.advanceTo(100),this._reset()):void 0},t.prototype._reset=function(){var t;return t=this.opacity,setTimeout(function(t){return function(){return t.opacity=0,t._updateStyle()}}(this),this.speed/2),setTimeout(function(e){return function(){return e.value=0,e.opacity=t,e._withSpeed(0,function(){return e._updateStyle(!0)})}}(this),this.speed)},t.prototype._startTrickle=function(){return this.trickling?void 0:(this.trickling=!0,setTimeout(this._trickle,this.speed))},t.prototype._stopTrickle=function(){return delete this.trickling},t.prototype._trickle=function(){return this.trickling?(this.advanceTo(this.value+Math.random()/2),setTimeout(this._trickle,this.speed)):void 0},t.prototype._withSpeed=function(t,e){var n,i;return n=this.speed,this.speed=t,i=e(),this.speed=n,i},t.prototype._updateStyle=function(t){return null==t&&(t=!1),t&&this._changeContentToForceRepaint(),this.styleElement.textContent=this._createCSSRule()},t.prototype._changeContentToForceRepaint=function(){return this.content=""===this.content?" ":""},t.prototype._createCSSRule=function(){return""+this.elementSelector+"."+e+"::before {\n content: '"+this.content+"';\n position: fixed;\n top: 0;\n left: 0;\n z-index: 2000;\n background-color: #0076ff;\n height: 3px;\n opacity: "+this.opacity+";\n width: "+this.value+"%;\n transition: width "+this.speed+"ms ease-out, opacity "+this.speed/2+"ms ease-in;\n transform: translate3d(0,0,0);\n}"},t}(),c=function(t){return setTimeout(t,500)},_=function(){return document.addEventListener("DOMContentLoaded",function(){return J(i.CHANGE),J(i.UPDATE)},!0)},N=function(){return"undefined"!=typeof jQuery?jQuery(document).on("ajaxSuccess",function(t,e){return jQuery.trim(e.responseText)?J(i.UPDATE):void 0}):void 0},A=function(t){var e,i;return(null!=(i=t.state)?i.turbolinks:void 0)?(e=I[new n(t.state.url).absolute])?(d(),S(e)):Z(t.target.location.href):void 0},$=function(){return W(),B(),document.addEventListener("click",e.installHandlerLast,!0),window.addEventListener("hashchange",function(){return W(),B()},!1),c(function(){return window.addEventListener("popstate",A,!1)})},E=void 0!==window.history.state||navigator.userAgent.match(/Firefox\/2[6|7]/),l=window.history&&window.history.pushState&&window.history.replaceState&&E,s=!navigator.userAgent.match(/CriOS\//),K="GET"===(ee=F("request_method"))||""===ee,u=l&&s&&K,a=document.addEventListener&&document.createEvent,a&&(_(),N()),u?(Z=T,$()):Z=function(t){return document.location.href=t},this.Turbolinks={visit:Z,pagesCached:L,enableTransitionCache:w,enableProgressBar:b,allowLinkExtensions:r.allowExtensions,supported:u,EVENTS:f(i)}}.call(this),+function(t){"use strict";function e(e){return this.each(function(){var i=t(this),r=i.data("bs.affix"),o="object"==typeof e&&e;r||i.data("bs.affix",r=new n(this,o)),"string"==typeof e&&r[e]()})}var n=function(e,i){this.options=t.extend({},n.DEFAULTS,i),this.$target=t(this.options.target).on("scroll.bs.affix.data-api",t.proxy(this.checkPosition,this)).on("click.bs.affix.data-api",t.proxy(this.checkPositionWithEventLoop,this)),this.$element=t(e),this.affixed=this.unpin=this.pinnedOffset=null,this.checkPosition()};n.VERSION="3.3.1",n.RESET="affix affix-top affix-bottom",n.DEFAULTS={offset:0,target:window},n.prototype.getState=function(t,e,n,i){var r=this.$target.scrollTop(),o=this.$element.offset(),s=this.$target.height();if(null!=n&&"top"==this.affixed)return n>r?"top":!1;if("bottom"==this.affixed)return null!=n?r+this.unpin<=o.top?!1:"bottom":t-i>=r+s?!1:"bottom";var a=null==this.affixed,l=a?r:o.top,u=a?s:e;return null!=n&&n>=l?"top":null!=i&&l+u>=t-i?"bottom":!1},n.prototype.getPinnedOffset=function(){if(this.pinnedOffset)return this.pinnedOffset;this.$element.removeClass(n.RESET).addClass("affix");var t=this.$target.scrollTop(),e=this.$element.offset();return this.pinnedOffset=e.top-t},n.prototype.checkPositionWithEventLoop=function(){setTimeout(t.proxy(this.checkPosition,this),1)},n.prototype.checkPosition=function(){if(this.$element.is(":visible")){var e=this.$element.height(),i=this.options.offset,r=i.top,o=i.bottom,s=t("body").height();"object"!=typeof i&&(o=r=i),"function"==typeof r&&(r=i.top(this.$element)),"function"==typeof o&&(o=i.bottom(this.$element));var a=this.getState(s,e,r,o);if(this.affixed!=a){null!=this.unpin&&this.$element.css("top","");var l="affix"+(a?"-"+a:""),u=t.Event(l+".bs.affix");if(this.$element.trigger(u),u.isDefaultPrevented())return;this.affixed=a,this.unpin="bottom"==a?this.getPinnedOffset():null,this.$element.removeClass(n.RESET).addClass(l).trigger(l.replace("affix","affixed")+".bs.affix")}"bottom"==a&&this.$element.offset({top:s-e-o})}};var i=t.fn.affix;t.fn.affix=e,t.fn.affix.Constructor=n,t.fn.affix.noConflict=function(){return t.fn.affix=i,this},t(window).on("load",function(){t('[data-spy="affix"]').each(function(){var n=t(this),i=n.data();i.offset=i.offset||{},null!=i.offsetBottom&&(i.offset.bottom=i.offsetBottom),null!=i.offsetTop&&(i.offset.top=i.offsetTop),e.call(n,i)})})}(jQuery),+function(t){"use strict";function e(e){return this.each(function(){var n=t(this),r=n.data("bs.alert");r||n.data("bs.alert",r=new i(this)),"string"==typeof e&&r[e].call(n)})}var n='[data-dismiss="alert"]',i=function(e){t(e).on("click",n,this.close)};i.VERSION="3.3.1",i.TRANSITION_DURATION=150,i.prototype.close=function(e){function n(){s.detach().trigger("closed.bs.alert").remove()}var r=t(this),o=r.attr("data-target");o||(o=r.attr("href"),o=o&&o.replace(/.*(?=#[^\s]*$)/,""));var s=t(o);e&&e.preventDefault(),s.length||(s=r.closest(".alert")),s.trigger(e=t.Event("close.bs.alert")),e.isDefaultPrevented()||(s.removeClass("in"),t.support.transition&&s.hasClass("fade")?s.one("bsTransitionEnd",n).emulateTransitionEnd(i.TRANSITION_DURATION):n())};var r=t.fn.alert;t.fn.alert=e,t.fn.alert.Constructor=i,t.fn.alert.noConflict=function(){return t.fn.alert=r,this},t(document).on("click.bs.alert.data-api",n,i.prototype.close)}(jQuery),+function(t){"use strict";function e(e){return this.each(function(){var i=t(this),r=i.data("bs.button"),o="object"==typeof e&&e;r||i.data("bs.button",r=new n(this,o)),"toggle"==e?r.toggle():e&&r.setState(e)})}var n=function(e,i){this.$element=t(e),this.options=t.extend({},n.DEFAULTS,i),this.isLoading=!1};n.VERSION="3.3.1",n.DEFAULTS={loadingText:"loading..."},n.prototype.setState=function(e){var n="disabled",i=this.$element,r=i.is("input")?"val":"html",o=i.data();e+="Text",null==o.resetText&&i.data("resetText",i[r]()),setTimeout(t.proxy(function(){i[r](null==o[e]?this.options[e]:o[e]),"loadingText"==e?(this.isLoading=!0,i.addClass(n).attr(n,n)):this.isLoading&&(this.isLoading=!1,i.removeClass(n).removeAttr(n))},this),0)},n.prototype.toggle=function(){var t=!0,e=this.$element.closest('[data-toggle="buttons"]');if(e.length){var n=this.$element.find("input");"radio"==n.prop("type")&&(n.prop("checked")&&this.$element.hasClass("active")?t=!1:e.find(".active").removeClass("active")),t&&n.prop("checked",!this.$element.hasClass("active")).trigger("change")}else this.$element.attr("aria-pressed",!this.$element.hasClass("active"));t&&this.$element.toggleClass("active")};var i=t.fn.button;t.fn.button=e,t.fn.button.Constructor=n,t.fn.button.noConflict=function(){return t.fn.button=i,this},t(document).on("click.bs.button.data-api",'[data-toggle^="button"]',function(n){var i=t(n.target);i.hasClass("btn")||(i=i.closest(".btn")),e.call(i,"toggle"),n.preventDefault()}).on("focus.bs.button.data-api blur.bs.button.data-api",'[data-toggle^="button"]',function(e){t(e.target).closest(".btn").toggleClass("focus",/^focus(in)?$/.test(e.type))})}(jQuery),+function(t){"use strict";function e(e){return this.each(function(){var i=t(this),r=i.data("bs.carousel"),o=t.extend({},n.DEFAULTS,i.data(),"object"==typeof e&&e),s="string"==typeof e?e:o.slide;r||i.data("bs.carousel",r=new n(this,o)),"number"==typeof e?r.to(e):s?r[s]():o.interval&&r.pause().cycle()})}var n=function(e,n){this.$element=t(e),this.$indicators=this.$element.find(".carousel-indicators"),this.options=n,this.paused=this.sliding=this.interval=this.$active=this.$items=null,this.options.keyboard&&this.$element.on("keydown.bs.carousel",t.proxy(this.keydown,this)),"hover"==this.options.pause&&!("ontouchstart"in document.documentElement)&&this.$element.on("mouseenter.bs.carousel",t.proxy(this.pause,this)).on("mouseleave.bs.carousel",t.proxy(this.cycle,this))};n.VERSION="3.3.1",n.TRANSITION_DURATION=600,n.DEFAULTS={interval:5e3,pause:"hover",wrap:!0,keyboard:!0},n.prototype.keydown=function(t){if(!/input|textarea/i.test(t.target.tagName)){switch(t.which){case 37:this.prev();break;case 39:this.next();break;default:return}t.preventDefault()}},n.prototype.cycle=function(e){return e||(this.paused=!1),this.interval&&clearInterval(this.interval),this.options.interval&&!this.paused&&(this.interval=setInterval(t.proxy(this.next,this),this.options.interval)),this},n.prototype.getItemIndex=function(t){return this.$items=t.parent().children(".item"),this.$items.index(t||this.$active)},n.prototype.getItemForDirection=function(t,e){var n="prev"==t?-1:1,i=this.getItemIndex(e),r=(i+n)%this.$items.length;return this.$items.eq(r)},n.prototype.to=function(t){var e=this,n=this.getItemIndex(this.$active=this.$element.find(".item.active"));return t>this.$items.length-1||0>t?void 0:this.sliding?this.$element.one("slid.bs.carousel",function(){e.to(t)}):n==t?this.pause().cycle():this.slide(t>n?"next":"prev",this.$items.eq(t))},n.prototype.pause=function(e){return e||(this.paused=!0),this.$element.find(".next, .prev").length&&t.support.transition&&(this.$element.trigger(t.support.transition.end),this.cycle(!0)),this.interval=clearInterval(this.interval),this},n.prototype.next=function(){return this.sliding?void 0:this.slide("next")},n.prototype.prev=function(){return this.sliding?void 0:this.slide("prev")},n.prototype.slide=function(e,i){var r=this.$element.find(".item.active"),o=i||this.getItemForDirection(e,r),s=this.interval,a="next"==e?"left":"right",l="next"==e?"first":"last",u=this;if(!o.length){if(!this.options.wrap)return;o=this.$element.find(".item")[l]()}if(o.hasClass("active"))return this.sliding=!1;var c=o[0],d=t.Event("slide.bs.carousel",{relatedTarget:c,direction:a});if(this.$element.trigger(d),!d.isDefaultPrevented()){if(this.sliding=!0,s&&this.pause(),this.$indicators.length){this.$indicators.find(".active").removeClass("active");var p=t(this.$indicators.children()[this.getItemIndex(o)]);p&&p.addClass("active")}var h=t.Event("slid.bs.carousel",{relatedTarget:c,direction:a});return t.support.transition&&this.$element.hasClass("slide")?(o.addClass(e),o[0].offsetWidth,r.addClass(a),o.addClass(a),r.one("bsTransitionEnd",function(){o.removeClass([e,a].join(" ")).addClass("active"),r.removeClass(["active",a].join(" ")),u.sliding=!1,setTimeout(function(){u.$element.trigger(h)},0)}).emulateTransitionEnd(n.TRANSITION_DURATION)):(r.removeClass("active"),o.addClass("active"),this.sliding=!1,this.$element.trigger(h)),s&&this.cycle(),this}};var i=t.fn.carousel;t.fn.carousel=e,t.fn.carousel.Constructor=n,t.fn.carousel.noConflict=function(){return t.fn.carousel=i,this};var r=function(n){var i,r=t(this),o=t(r.attr("data-target")||(i=r.attr("href"))&&i.replace(/.*(?=#[^\s]+$)/,""));if(o.hasClass("carousel")){var s=t.extend({},o.data(),r.data()),a=r.attr("data-slide-to");a&&(s.interval=!1),e.call(o,s),a&&o.data("bs.carousel").to(a),n.preventDefault()}};t(document).on("click.bs.carousel.data-api","[data-slide]",r).on("click.bs.carousel.data-api","[data-slide-to]",r),t(window).on("load",function(){t('[data-ride="carousel"]').each(function(){var n=t(this);e.call(n,n.data())})})}(jQuery),+function(t){"use strict";function e(e){var n,i=e.attr("data-target")||(n=e.attr("href"))&&n.replace(/.*(?=#[^\s]+$)/,"");return t(i)}function n(e){return this.each(function(){var n=t(this),r=n.data("bs.collapse"),o=t.extend({},i.DEFAULTS,n.data(),"object"==typeof e&&e);!r&&o.toggle&&"show"==e&&(o.toggle=!1),r||n.data("bs.collapse",r=new i(this,o)),"string"==typeof e&&r[e]()})}var i=function(e,n){this.$element=t(e),this.options=t.extend({},i.DEFAULTS,n),this.$trigger=t(this.options.trigger).filter('[href="#'+e.id+'"], [data-target="#'+e.id+'"]'),this.transitioning=null,this.options.parent?this.$parent=this.getParent():this.addAriaAndCollapsedClass(this.$element,this.$trigger),this.options.toggle&&this.toggle()};i.VERSION="3.3.1",i.TRANSITION_DURATION=350,i.DEFAULTS={toggle:!0,trigger:'[data-toggle="collapse"]'},i.prototype.dimension=function(){var t=this.$element.hasClass("width");return t?"width":"height"},i.prototype.show=function(){if(!this.transitioning&&!this.$element.hasClass("in")){var e,r=this.$parent&&this.$parent.find("> .panel").children(".in, .collapsing");if(!(r&&r.length&&(e=r.data("bs.collapse"),e&&e.transitioning))){var o=t.Event("show.bs.collapse");if(this.$element.trigger(o),!o.isDefaultPrevented()){r&&r.length&&(n.call(r,"hide"),e||r.data("bs.collapse",null));var s=this.dimension();this.$element.removeClass("collapse").addClass("collapsing")[s](0).attr("aria-expanded",!0),this.$trigger.removeClass("collapsed").attr("aria-expanded",!0),this.transitioning=1;var a=function(){this.$element.removeClass("collapsing").addClass("collapse in")[s](""),this.transitioning=0,this.$element.trigger("shown.bs.collapse")};if(!t.support.transition)return a.call(this);var l=t.camelCase(["scroll",s].join("-"));this.$element.one("bsTransitionEnd",t.proxy(a,this)).emulateTransitionEnd(i.TRANSITION_DURATION)[s](this.$element[0][l])}}}},i.prototype.hide=function(){if(!this.transitioning&&this.$element.hasClass("in")){var e=t.Event("hide.bs.collapse");if(this.$element.trigger(e),!e.isDefaultPrevented()){var n=this.dimension();this.$element[n](this.$element[n]())[0].offsetHeight,this.$element.addClass("collapsing").removeClass("collapse in").attr("aria-expanded",!1),this.$trigger.addClass("collapsed").attr("aria-expanded",!1),this.transitioning=1;var r=function(){this.transitioning=0,this.$element.removeClass("collapsing").addClass("collapse").trigger("hidden.bs.collapse")};return t.support.transition?void this.$element[n](0).one("bsTransitionEnd",t.proxy(r,this)).emulateTransitionEnd(i.TRANSITION_DURATION):r.call(this)}}},i.prototype.toggle=function(){this[this.$element.hasClass("in")?"hide":"show"]()},i.prototype.getParent=function(){return t(this.options.parent).find('[data-toggle="collapse"][data-parent="'+this.options.parent+'"]').each(t.proxy(function(n,i){var r=t(i);this.addAriaAndCollapsedClass(e(r),r)},this)).end()},i.prototype.addAriaAndCollapsedClass=function(t,e){var n=t.hasClass("in");t.attr("aria-expanded",n),e.toggleClass("collapsed",!n).attr("aria-expanded",n)};var r=t.fn.collapse;t.fn.collapse=n,t.fn.collapse.Constructor=i,t.fn.collapse.noConflict=function(){return t.fn.collapse=r,this},t(document).on("click.bs.collapse.data-api",'[data-toggle="collapse"]',function(i){var r=t(this);r.attr("data-target")||i.preventDefault();var o=e(r),s=o.data("bs.collapse"),a=s?"toggle":t.extend({},r.data(),{trigger:this});n.call(o,a)})}(jQuery),+function(t){"use strict";function e(e){e&&3===e.which||(t(r).remove(),t(o).each(function(){var i=t(this),r=n(i),o={relatedTarget:this};r.hasClass("open")&&(r.trigger(e=t.Event("hide.bs.dropdown",o)),e.isDefaultPrevented()||(i.attr("aria-expanded","false"),r.removeClass("open").trigger("hidden.bs.dropdown",o)))}))}function n(e){var n=e.attr("data-target");n||(n=e.attr("href"),n=n&&/#[A-Za-z]/.test(n)&&n.replace(/.*(?=#[^\s]*$)/,""));var i=n&&t(n);return i&&i.length?i:e.parent()}function i(e){return this.each(function(){var n=t(this),i=n.data("bs.dropdown");i||n.data("bs.dropdown",i=new s(this)),"string"==typeof e&&i[e].call(n)})}var r=".dropdown-backdrop",o='[data-toggle="dropdown"]',s=function(e){t(e).on("click.bs.dropdown",this.toggle)};s.VERSION="3.3.1",s.prototype.toggle=function(i){var r=t(this);if(!r.is(".disabled, :disabled")){var o=n(r),s=o.hasClass("open");if(e(),!s){"ontouchstart"in document.documentElement&&!o.closest(".navbar-nav").length&&t('<div class="dropdown-backdrop"/>').insertAfter(t(this)).on("click",e);var a={relatedTarget:this};if(o.trigger(i=t.Event("show.bs.dropdown",a)),i.isDefaultPrevented())return;r.trigger("focus").attr("aria-expanded","true"),o.toggleClass("open").trigger("shown.bs.dropdown",a)}return!1}},s.prototype.keydown=function(e){if(/(38|40|27|32)/.test(e.which)&&!/input|textarea/i.test(e.target.tagName)){var i=t(this);if(e.preventDefault(),e.stopPropagation(),!i.is(".disabled, :disabled")){var r=n(i),s=r.hasClass("open");if(!s&&27!=e.which||s&&27==e.which)return 27==e.which&&r.find(o).trigger("focus"),i.trigger("click");var a=" li:not(.divider):visible a",l=r.find('[role="menu"]'+a+', [role="listbox"]'+a);if(l.length){var u=l.index(e.target);38==e.which&&u>0&&u--,40==e.which&&u<l.length-1&&u++,~u||(u=0),l.eq(u).trigger("focus")}}}};var a=t.fn.dropdown;t.fn.dropdown=i,t.fn.dropdown.Constructor=s,t.fn.dropdown.noConflict=function(){return t.fn.dropdown=a,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",o,s.prototype.toggle).on("keydown.bs.dropdown.data-api",o,s.prototype.keydown).on("keydown.bs.dropdown.data-api",'[role="menu"]',s.prototype.keydown).on("keydown.bs.dropdown.data-api",'[role="listbox"]',s.prototype.keydown)}(jQuery),+function(t){"use strict";function e(e){return this.each(function(){var i=t(this),r=i.data("bs.tab");r||i.data("bs.tab",r=new n(this)),"string"==typeof e&&r[e]()})}var n=function(e){this.element=t(e)};n.VERSION="3.3.1",n.TRANSITION_DURATION=150,n.prototype.show=function(){var e=this.element,n=e.closest("ul:not(.dropdown-menu)"),i=e.data("target");if(i||(i=e.attr("href"),i=i&&i.replace(/.*(?=#[^\s]*$)/,"")),!e.parent("li").hasClass("active")){var r=n.find(".active:last a"),o=t.Event("hide.bs.tab",{relatedTarget:e[0]}),s=t.Event("show.bs.tab",{relatedTarget:r[0]});if(r.trigger(o),e.trigger(s),!s.isDefaultPrevented()&&!o.isDefaultPrevented()){var a=t(i);this.activate(e.closest("li"),n),this.activate(a,a.parent(),function(){r.trigger({type:"hidden.bs.tab",relatedTarget:e[0]}),e.trigger({type:"shown.bs.tab",relatedTarget:r[0]})})}}},n.prototype.activate=function(e,i,r){function o(){s.removeClass("active").find("> .dropdown-menu > .active").removeClass("active").end().find('[data-toggle="tab"]').attr("aria-expanded",!1),e.addClass("active").find('[data-toggle="tab"]').attr("aria-expanded",!0),a?(e[0].offsetWidth,e.addClass("in")):e.removeClass("fade"),e.parent(".dropdown-menu")&&e.closest("li.dropdown").addClass("active").end().find('[data-toggle="tab"]').attr("aria-expanded",!0),r&&r()}var s=i.find("> .active"),a=r&&t.support.transition&&(s.length&&s.hasClass("fade")||!!i.find("> .fade").length);s.length&&a?s.one("bsTransitionEnd",o).emulateTransitionEnd(n.TRANSITION_DURATION):o(),s.removeClass("in")};var i=t.fn.tab;t.fn.tab=e,t.fn.tab.Constructor=n,t.fn.tab.noConflict=function(){return t.fn.tab=i,this};var r=function(n){n.preventDefault(),e.call(t(this),"show")};t(document).on("click.bs.tab.data-api",'[data-toggle="tab"]',r).on("click.bs.tab.data-api",'[data-toggle="pill"]',r)}(jQuery),+function(t){"use strict";function e(){var t=document.createElement("bootstrap"),e={WebkitTransition:"webkitTransitionEnd",MozTransition:"transitionend",OTransition:"oTransitionEnd otransitionend",transition:"transitionend"};for(var n in e)if(void 0!==t.style[n])return{end:e[n]};return!1}t.fn.emulateTransitionEnd=function(e){var n=!1,i=this;t(this).one("bsTransitionEnd",function(){n=!0});var r=function(){n||t(i).trigger(t.support.transition.end)};return setTimeout(r,e),this},t(function(){t.support.transition=e(),t.support.transition&&(t.event.special.bsTransitionEnd={bindType:t.support.transition.end,delegateType:t.support.transition.end,handle:function(e){return t(e.target).is(this)?e.handleObj.handler.apply(this,arguments):void 0}})})}(jQuery),+function(t){"use strict";function e(n,i){var r=t.proxy(this.process,this);this.$body=t("body"),this.$scrollElement=t(t(n).is("body")?window:n),this.options=t.extend({},e.DEFAULTS,i),this.selector=(this.options.target||"")+" .nav li > a",this.offsets=[],this.targets=[],this.activeTarget=null,this.scrollHeight=0,this.$scrollElement.on("scroll.bs.scrollspy",r),this.refresh(),this.process()}function n(n){return this.each(function(){var i=t(this),r=i.data("bs.scrollspy"),o="object"==typeof n&&n;r||i.data("bs.scrollspy",r=new e(this,o)),"string"==typeof n&&r[n]()})}e.VERSION="3.3.1",e.DEFAULTS={offset:10},e.prototype.getScrollHeight=function(){return this.$scrollElement[0].scrollHeight||Math.max(this.$body[0].scrollHeight,document.documentElement.scrollHeight)},e.prototype.refresh=function(){var e="offset",n=0;t.isWindow(this.$scrollElement[0])||(e="position",n=this.$scrollElement.scrollTop()),this.offsets=[],this.targets=[],this.scrollHeight=this.getScrollHeight();var i=this;this.$body.find(this.selector).map(function(){var i=t(this),r=i.data("target")||i.attr("href"),o=/^#./.test(r)&&t(r);return o&&o.length&&o.is(":visible")&&[[o[e]().top+n,r]]||null}).sort(function(t,e){return t[0]-e[0]}).each(function(){i.offsets.push(this[0]),i.targets.push(this[1])})},e.prototype.process=function(){var t,e=this.$scrollElement.scrollTop()+this.options.offset,n=this.getScrollHeight(),i=this.options.offset+n-this.$scrollElement.height(),r=this.offsets,o=this.targets,s=this.activeTarget;if(this.scrollHeight!=n&&this.refresh(),e>=i)return s!=(t=o[o.length-1])&&this.activate(t);if(s&&e<r[0])return this.activeTarget=null,this.clear();for(t=r.length;t--;)s!=o[t]&&e>=r[t]&&(!r[t+1]||e<=r[t+1])&&this.activate(o[t])},e.prototype.activate=function(e){this.activeTarget=e,this.clear();var n=this.selector+'[data-target="'+e+'"],'+this.selector+'[href="'+e+'"]',i=t(n).parents("li").addClass("active");i.parent(".dropdown-menu").length&&(i=i.closest("li.dropdown").addClass("active")),i.trigger("activate.bs.scrollspy")},e.prototype.clear=function(){t(this.selector).parentsUntil(this.options.target,".active").removeClass("active")};var i=t.fn.scrollspy;t.fn.scrollspy=n,t.fn.scrollspy.Constructor=e,t.fn.scrollspy.noConflict=function(){return t.fn.scrollspy=i,this},t(window).on("load.bs.scrollspy.data-api",function(){t('[data-spy="scroll"]').each(function(){var e=t(this);n.call(e,e.data())})})}(jQuery),+function(t){"use strict";function e(e,i){return this.each(function(){var r=t(this),o=r.data("bs.modal"),s=t.extend({},n.DEFAULTS,r.data(),"object"==typeof e&&e);o||r.data("bs.modal",o=new n(this,s)),"string"==typeof e?o[e](i):s.show&&o.show(i)})}var n=function(e,n){this.options=n,this.$body=t(document.body),this.$element=t(e),this.$backdrop=this.isShown=null,this.scrollbarWidth=0,this.options.remote&&this.$element.find(".modal-content").load(this.options.remote,t.proxy(function(){this.$element.trigger("loaded.bs.modal")},this))};n.VERSION="3.3.1",n.TRANSITION_DURATION=300,n.BACKDROP_TRANSITION_DURATION=150,n.DEFAULTS={backdrop:!0,keyboard:!0,show:!0},n.prototype.toggle=function(t){return this.isShown?this.hide():this.show(t)},n.prototype.show=function(e){var i=this,r=t.Event("show.bs.modal",{relatedTarget:e});this.$element.trigger(r),this.isShown||r.isDefaultPrevented()||(this.isShown=!0,this.checkScrollbar(),this.setScrollbar(),this.$body.addClass("modal-open"),this.escape(),this.resize(),this.$element.on("click.dismiss.bs.modal",'[data-dismiss="modal"]',t.proxy(this.hide,this)),this.backdrop(function(){var r=t.support.transition&&i.$element.hasClass("fade");i.$element.parent().length||i.$element.appendTo(i.$body),i.$element.show().scrollTop(0),i.options.backdrop&&i.adjustBackdrop(),i.adjustDialog(),r&&i.$element[0].offsetWidth,i.$element.addClass("in").attr("aria-hidden",!1),i.enforceFocus();var o=t.Event("shown.bs.modal",{relatedTarget:e});r?i.$element.find(".modal-dialog").one("bsTransitionEnd",function(){i.$element.trigger("focus").trigger(o)}).emulateTransitionEnd(n.TRANSITION_DURATION):i.$element.trigger("focus").trigger(o)}))},n.prototype.hide=function(e){e&&e.preventDefault(),e=t.Event("hide.bs.modal"),this.$element.trigger(e),this.isShown&&!e.isDefaultPrevented()&&(this.isShown=!1,this.escape(),this.resize(),t(document).off("focusin.bs.modal"),this.$element.removeClass("in").attr("aria-hidden",!0).off("click.dismiss.bs.modal"),t.support.transition&&this.$element.hasClass("fade")?this.$element.one("bsTransitionEnd",t.proxy(this.hideModal,this)).emulateTransitionEnd(n.TRANSITION_DURATION):this.hideModal())},n.prototype.enforceFocus=function(){t(document).off("focusin.bs.modal").on("focusin.bs.modal",t.proxy(function(t){this.$element[0]===t.target||this.$element.has(t.target).length||this.$element.trigger("focus")},this))},n.prototype.escape=function(){this.isShown&&this.options.keyboard?this.$element.on("keydown.dismiss.bs.modal",t.proxy(function(t){27==t.which&&this.hide()},this)):this.isShown||this.$element.off("keydown.dismiss.bs.modal")},n.prototype.resize=function(){this.isShown?t(window).on("resize.bs.modal",t.proxy(this.handleUpdate,this)):t(window).off("resize.bs.modal")},n.prototype.hideModal=function(){var t=this;this.$element.hide(),this.backdrop(function(){t.$body.removeClass("modal-open"),t.resetAdjustments(),t.resetScrollbar(),t.$element.trigger("hidden.bs.modal")})},n.prototype.removeBackdrop=function(){this.$backdrop&&this.$backdrop.remove(),this.$backdrop=null},n.prototype.backdrop=function(e){var i=this,r=this.$element.hasClass("fade")?"fade":"";if(this.isShown&&this.options.backdrop){var o=t.support.transition&&r;if(this.$backdrop=t('<div class="modal-backdrop '+r+'" />').prependTo(this.$element).on("click.dismiss.bs.modal",t.proxy(function(t){t.target===t.currentTarget&&("static"==this.options.backdrop?this.$element[0].focus.call(this.$element[0]):this.hide.call(this))},this)),o&&this.$backdrop[0].offsetWidth,this.$backdrop.addClass("in"),!e)return;o?this.$backdrop.one("bsTransitionEnd",e).emulateTransitionEnd(n.BACKDROP_TRANSITION_DURATION):e()}else if(!this.isShown&&this.$backdrop){this.$backdrop.removeClass("in");var s=function(){i.removeBackdrop(),e&&e()};t.support.transition&&this.$element.hasClass("fade")?this.$backdrop.one("bsTransitionEnd",s).emulateTransitionEnd(n.BACKDROP_TRANSITION_DURATION):s()}else e&&e()},n.prototype.handleUpdate=function(){this.options.backdrop&&this.adjustBackdrop(),this.adjustDialog()},n.prototype.adjustBackdrop=function(){this.$backdrop.css("height",0).css("height",this.$element[0].scrollHeight)},n.prototype.adjustDialog=function(){var t=this.$element[0].scrollHeight>document.documentElement.clientHeight;this.$element.css({paddingLeft:!this.bodyIsOverflowing&&t?this.scrollbarWidth:"",paddingRight:this.bodyIsOverflowing&&!t?this.scrollbarWidth:""})},n.prototype.resetAdjustments=function(){this.$element.css({paddingLeft:"",paddingRight:""})},n.prototype.checkScrollbar=function(){this.bodyIsOverflowing=document.body.scrollHeight>document.documentElement.clientHeight,this.scrollbarWidth=this.measureScrollbar()},n.prototype.setScrollbar=function(){var t=parseInt(this.$body.css("padding-right")||0,10);this.bodyIsOverflowing&&this.$body.css("padding-right",t+this.scrollbarWidth)},n.prototype.resetScrollbar=function(){this.$body.css("padding-right","")},n.prototype.measureScrollbar=function(){var t=document.createElement("div");t.className="modal-scrollbar-measure",this.$body.append(t);var e=t.offsetWidth-t.clientWidth;return this.$body[0].removeChild(t),e};var i=t.fn.modal;t.fn.modal=e,t.fn.modal.Constructor=n,t.fn.modal.noConflict=function(){return t.fn.modal=i,this},t(document).on("click.bs.modal.data-api",'[data-toggle="modal"]',function(n){var i=t(this),r=i.attr("href"),o=t(i.attr("data-target")||r&&r.replace(/.*(?=#[^\s]+$)/,"")),s=o.data("bs.modal")?"toggle":t.extend({remote:!/#/.test(r)&&r},o.data(),i.data());i.is("a")&&n.preventDefault(),o.one("show.bs.modal",function(t){t.isDefaultPrevented()||o.one("hidden.bs.modal",function(){i.is(":visible")&&i.trigger("focus")})}),e.call(o,s,this)})}(jQuery),+function(t){"use strict";function e(e){return this.each(function(){var i=t(this),r=i.data("bs.tooltip"),o="object"==typeof e&&e,s=o&&o.selector;(r||"destroy"!=e)&&(s?(r||i.data("bs.tooltip",r={}),r[s]||(r[s]=new n(this,o))):r||i.data("bs.tooltip",r=new n(this,o)),"string"==typeof e&&r[e]())})}var n=function(t,e){this.type=this.options=this.enabled=this.timeout=this.hoverState=this.$element=null,this.init("tooltip",t,e)};n.VERSION="3.3.1",n.TRANSITION_DURATION=150,n.DEFAULTS={animation:!0,placement:"top",selector:!1,template:'<div class="tooltip" role="tooltip"><div class="tooltip-arrow"></div><div class="tooltip-inner"></div></div>',trigger:"hover focus",title:"",delay:0,html:!1,container:!1,viewport:{selector:"body",padding:0}},n.prototype.init=function(e,n,i){this.enabled=!0,this.type=e,this.$element=t(n),this.options=this.getOptions(i),this.$viewport=this.options.viewport&&t(this.options.viewport.selector||this.options.viewport);for(var r=this.options.trigger.split(" "),o=r.length;o--;){var s=r[o];if("click"==s)this.$element.on("click."+this.type,this.options.selector,t.proxy(this.toggle,this));else if("manual"!=s){var a="hover"==s?"mouseenter":"focusin",l="hover"==s?"mouseleave":"focusout";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()},n.prototype.getDefaults=function(){return n.DEFAULTS},n.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},n.prototype.getDelegateOptions=function(){var e={},n=this.getDefaults();return this._options&&t.each(this._options,function(t,i){n[t]!=i&&(e[t]=i)}),e},n.prototype.enter=function(e){var n=e instanceof this.constructor?e:t(e.currentTarget).data("bs."+this.type);return n&&n.$tip&&n.$tip.is(":visible")?void(n.hoverState="in"):(n||(n=new this.constructor(e.currentTarget,this.getDelegateOptions()),t(e.currentTarget).data("bs."+this.type,n)),clearTimeout(n.timeout),n.hoverState="in",n.options.delay&&n.options.delay.show?void(n.timeout=setTimeout(function(){"in"==n.hoverState&&n.show()},n.options.delay.show)):n.show())},n.prototype.leave=function(e){var n=e instanceof this.constructor?e:t(e.currentTarget).data("bs."+this.type);return n||(n=new this.constructor(e.currentTarget,this.getDelegateOptions()),t(e.currentTarget).data("bs."+this.type,n)),clearTimeout(n.timeout),n.hoverState="out",n.options.delay&&n.options.delay.hide?void(n.timeout=setTimeout(function(){"out"==n.hoverState&&n.hide()},n.options.delay.hide)):n.hide()},n.prototype.show=function(){var e=t.Event("show.bs."+this.type);if(this.hasContent()&&this.enabled){this.$element.trigger(e);var i=t.contains(this.$element[0].ownerDocument.documentElement,this.$element[0]);if(e.isDefaultPrevented()||!i)return;var r=this,o=this.tip(),s=this.getUID(this.type);this.setContent(),o.attr("id",s),this.$element.attr("aria-describedby",s),this.options.animation&&o.addClass("fade");var a="function"==typeof this.options.placement?this.options.placement.call(this,o[0],this.$element[0]):this.options.placement,l=/\s?auto?\s?/i,u=l.test(a);u&&(a=a.replace(l,"")||"top"),o.detach().css({top:0,left:0,display:"block"}).addClass(a).data("bs."+this.type,this),this.options.container?o.appendTo(this.options.container):o.insertAfter(this.$element);var c=this.getPosition(),d=o[0].offsetWidth,p=o[0].offsetHeight;if(u){var h=a,f=this.options.container?t(this.options.container):this.$element.parent(),g=this.getPosition(f);a="bottom"==a&&c.bottom+p>g.bottom?"top":"top"==a&&c.top-p<g.top?"bottom":"right"==a&&c.right+d>g.width?"left":"left"==a&&c.left-d<g.left?"right":a,o.removeClass(h).addClass(a)}var m=this.getCalculatedOffset(a,c,d,p);this.applyPlacement(m,a);var v=function(){var t=r.hoverState;r.$element.trigger("shown.bs."+r.type),r.hoverState=null,"out"==t&&r.leave(r)};t.support.transition&&this.$tip.hasClass("fade")?o.one("bsTransitionEnd",v).emulateTransitionEnd(n.TRANSITION_DURATION):v()}},n.prototype.applyPlacement=function(e,n){var i=this.tip(),r=i[0].offsetWidth,o=i[0].offsetHeight,s=parseInt(i.css("margin-top"),10),a=parseInt(i.css("margin-left"),10);isNaN(s)&&(s=0),isNaN(a)&&(a=0),e.top=e.top+s,e.left=e.left+a,t.offset.setOffset(i[0],t.extend({using:function(t){i.css({top:Math.round(t.top),left:Math.round(t.left)})}},e),0),i.addClass("in");var l=i[0].offsetWidth,u=i[0].offsetHeight;"top"==n&&u!=o&&(e.top=e.top+o-u);var c=this.getViewportAdjustedDelta(n,e,l,u);c.left?e.left+=c.left:e.top+=c.top;var d=/top|bottom/.test(n),p=d?2*c.left-r+l:2*c.top-o+u,h=d?"offsetWidth":"offsetHeight";i.offset(e),this.replaceArrow(p,i[0][h],d)},n.prototype.replaceArrow=function(t,e,n){this.arrow().css(n?"left":"top",50*(1-t/e)+"%").css(n?"top":"left","")},n.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")},n.prototype.hide=function(e){function i(){"in"!=r.hoverState&&o.detach(),r.$element.removeAttr("aria-describedby").trigger("hidden.bs."+r.type),e&&e()}var r=this,o=this.tip(),s=t.Event("hide.bs."+this.type);return this.$element.trigger(s),s.isDefaultPrevented()?void 0:(o.removeClass("in"),t.support.transition&&this.$tip.hasClass("fade")?o.one("bsTransitionEnd",i).emulateTransitionEnd(n.TRANSITION_DURATION):i(),this.hoverState=null,this)},n.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","")},n.prototype.hasContent=function(){return this.getTitle()},n.prototype.getPosition=function(e){e=e||this.$element;var n=e[0],i="BODY"==n.tagName,r=n.getBoundingClientRect();null==r.width&&(r=t.extend({},r,{width:r.right-r.left,height:r.bottom-r.top}));var o=i?{top:0,left:0}:e.offset(),s={scroll:i?document.documentElement.scrollTop||document.body.scrollTop:e.scrollTop()},a=i?{width:t(window).width(),height:t(window).height()}:null;return t.extend({},r,s,a,o)},n.prototype.getCalculatedOffset=function(t,e,n,i){return"bottom"==t?{top:e.top+e.height,left:e.left+e.width/2-n/2}:"top"==t?{top:e.top-i,left:e.left+e.width/2-n/2}:"left"==t?{top:e.top+e.height/2-i/2,left:e.left-n}:{top:e.top+e.height/2-i/2,left:e.left+e.width}},n.prototype.getViewportAdjustedDelta=function(t,e,n,i){var r={top:0,left:0};if(!this.$viewport)return r;var o=this.options.viewport&&this.options.viewport.padding||0,s=this.getPosition(this.$viewport);if(/right|left/.test(t)){var a=e.top-o-s.scroll,l=e.top+o-s.scroll+i;a<s.top?r.top=s.top-a:l>s.top+s.height&&(r.top=s.top+s.height-l)}else{var u=e.left-o,c=e.left+o+n;u<s.left?r.left=s.left-u:c>s.width&&(r.left=s.left+s.width-c)}return r},n.prototype.getTitle=function(){var t,e=this.$element,n=this.options;return t=e.attr("data-original-title")||("function"==typeof n.title?n.title.call(e[0]):n.title)},n.prototype.getUID=function(t){do t+=~~(1e6*Math.random());while(document.getElementById(t));return t},n.prototype.tip=function(){return this.$tip=this.$tip||t(this.options.template)},n.prototype.arrow=function(){return this.$arrow=this.$arrow||this.tip().find(".tooltip-arrow")},n.prototype.enable=function(){this.enabled=!0},n.prototype.disable=function(){this.enabled=!1},n.prototype.toggleEnabled=function(){this.enabled=!this.enabled},n.prototype.toggle=function(e){var n=this;e&&(n=t(e.currentTarget).data("bs."+this.type),n||(n=new this.constructor(e.currentTarget,this.getDelegateOptions()),t(e.currentTarget).data("bs."+this.type,n))),n.tip().hasClass("in")?n.leave(n):n.enter(n)},n.prototype.destroy=function(){var t=this;clearTimeout(this.timeout),this.hide(function(){t.$element.off("."+t.type).removeData("bs."+t.type)})};var i=t.fn.tooltip;t.fn.tooltip=e,t.fn.tooltip.Constructor=n,t.fn.tooltip.noConflict=function(){return t.fn.tooltip=i,this}}(jQuery),+function(t){"use strict";function e(e){return this.each(function(){var i=t(this),r=i.data("bs.popover"),o="object"==typeof e&&e,s=o&&o.selector;(r||"destroy"!=e)&&(s?(r||i.data("bs.popover",r={}),r[s]||(r[s]=new n(this,o))):r||i.data("bs.popover",r=new n(this,o)),"string"==typeof e&&r[e]())})}var n=function(t,e){this.init("popover",t,e)};if(!t.fn.tooltip)throw new Error("Popover requires tooltip.js");n.VERSION="3.3.1",n.DEFAULTS=t.extend({},t.fn.tooltip.Constructor.DEFAULTS,{placement:"right",trigger:"click",content:"",template:'<div class="popover" role="tooltip"><div class="arrow"></div><h3 class="popover-title"></h3><div class="popover-content"></div></div>'}),n.prototype=t.extend({},t.fn.tooltip.Constructor.prototype),n.prototype.constructor=n,n.prototype.getDefaults=function(){return n.DEFAULTS},n.prototype.setContent=function(){var t=this.tip(),e=this.getTitle(),n=this.getContent();t.find(".popover-title")[this.options.html?"html":"text"](e),t.find(".popover-content").children().detach().end()[this.options.html?"string"==typeof n?"html":"append":"text"](n),t.removeClass("fade top bottom left right in"),t.find(".popover-title").html()||t.find(".popover-title").hide()},n.prototype.hasContent=function(){return this.getTitle()||this.getContent()},n.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)},n.prototype.arrow=function(){return this.$arrow=this.$arrow||this.tip().find(".arrow")},n.prototype.tip=function(){return this.$tip||(this.$tip=t(this.options.template)),this.$tip};var i=t.fn.popover;t.fn.popover=e,t.fn.popover.Constructor=n,t.fn.popover.noConflict=function(){return t.fn.popover=i,this}}(jQuery),function(t,e){"function"==typeof define&&define.amd?define(e):"object"==typeof exports?module.exports=e():t.NProgress=e()}(this,function(){function t(t,e,n){return e>t?e:t>n?n:t}function e(t){return 100*(-1+t)}function n(t,n,i){var r;return r="translate3d"===u.positionUsing?{transform:"translate3d("+e(t)+"%,0,0)"}:"translate"===u.positionUsing?{transform:"translate("+e(t)+"%,0)"}:{"margin-left":e(t)+"%"},r.transition="all "+n+"ms "+i,r}function i(t,e){var n="string"==typeof t?t:s(t);return n.indexOf(" "+e+" ")>=0}function r(t,e){var n=s(t),r=n+e;i(n,e)||(t.className=r.substring(1))}function o(t,e){var n,r=s(t);i(t,e)&&(n=r.replace(" "+e+" "," "),t.className=n.substring(1,n.length-1))}function s(t){return(" "+(t.className||"")+" ").replace(/\s+/gi," ")}function a(t){t&&t.parentNode&&t.parentNode.removeChild(t)}var l={};l.version="0.1.6";var u=l.settings={minimum:.08,easing:"ease",positionUsing:"",speed:200,trickle:!0,trickleRate:.02,trickleSpeed:800,showSpinner:!0,barSelector:'[role="bar"]',spinnerSelector:'[role="spinner"]',parent:"body",template:'<div class="bar" role="bar"><div class="peg"></div></div><div class="spinner" role="spinner"><div class="spinner-icon"></div></div>'};l.configure=function(t){var e,n;for(e in t)n=t[e],void 0!==n&&t.hasOwnProperty(e)&&(u[e]=n);return this},l.status=null,l.set=function(e){var i=l.isStarted();e=t(e,u.minimum,1),l.status=1===e?null:e;var r=l.render(!i),o=r.querySelector(u.barSelector),s=u.speed,a=u.easing;return r.offsetWidth,c(function(t){""===u.positionUsing&&(u.positionUsing=l.getPositioningCSS()),d(o,n(e,s,a)),1===e?(d(r,{transition:"none",opacity:1}),r.offsetWidth,setTimeout(function(){d(r,{transition:"all "+s+"ms linear",opacity:0}),setTimeout(function(){l.remove(),t()},s)},s)):setTimeout(t,s)}),this},l.isStarted=function(){return"number"==typeof l.status},l.start=function(){l.status||l.set(0);var t=function(){setTimeout(function(){l.status&&(l.trickle(),t())},u.trickleSpeed)};return u.trickle&&t(),this},l.done=function(t){return t||l.status?l.inc(.3+.5*Math.random()).set(1):this},l.inc=function(e){var n=l.status;return n?("number"!=typeof e&&(e=(1-n)*t(Math.random()*n,.1,.95)),n=t(n+e,0,.994),l.set(n)):l.start()},l.trickle=function(){return l.inc(Math.random()*u.trickleRate)},function(){var t=0,e=0;l.promise=function(n){return n&&"resolved"!=n.state()?(0==e&&l.start(),t++,e++,n.always(function(){e--,0==e?(t=0,l.done()):l.set((t-e)/t)}),this):this}}(),l.render=function(t){if(l.isRendered())return document.getElementById("nprogress");r(document.documentElement,"nprogress-busy");var n=document.createElement("div");n.id="nprogress",n.innerHTML=u.template;var i,o=n.querySelector(u.barSelector),s=t?"-100":e(l.status||0),c=document.querySelector(u.parent);return d(o,{transition:"all 0 linear",transform:"translate3d("+s+"%,0,0)"}),u.showSpinner||(i=n.querySelector(u.spinnerSelector),i&&a(i)),c!=document.body&&r(c,"nprogress-custom-parent"),c.appendChild(n),n},l.remove=function(){o(document.documentElement,"nprogress-busy"),o(document.querySelector(u.parent),"nprogress-custom-parent");var t=document.getElementById("nprogress");t&&a(t)},l.isRendered=function(){return!!document.getElementById("nprogress")},l.getPositioningCSS=function(){var t=document.body.style,e="WebkitTransform"in t?"Webkit":"MozTransform"in t?"Moz":"msTransform"in t?"ms":"OTransform"in t?"O":"";return e+"Perspective"in t?"translate3d":e+"Transform"in t?"translate":"margin"};var c=function(){function t(){var n=e.shift();n&&n(t)}var e=[];return function(n){e.push(n),1==e.length&&t()}}(),d=function(){function t(t){return t.replace(/^-ms-/,"ms-").replace(/-([\da-z])/gi,function(t,e){return e.toUpperCase()})}function e(t){var e=document.body.style;if(t in e)return t;for(var n,i=r.length,o=t.charAt(0).toUpperCase()+t.slice(1);i--;)if(n=r[i]+o,n in e)return n;return t}function n(n){return n=t(n),o[n]||(o[n]=e(n))}function i(t,e,i){e=n(e),t.style[e]=i}var r=["Webkit","O","Moz","ms"],o={};return function(t,e){var n,r,o=arguments;if(2==o.length)for(n in e)r=e[n],void 0!==r&&e.hasOwnProperty(n)&&i(t,n,r);else i(t,o[1],o[2])}}();return l}),$(function(){$(document).on("page:fetch",function(){NProgress.start()}),$(document).on("page:receive",function(){NProgress.set(.7)}),$(document).on("page:change",function(){NProgress.done()}),$(document).on("page:restore",function(){NProgress.remove()})}),!function(t){var e=function(){"use strict";return{isMsie:function(){return/(msie|trident)/i.test(navigator.userAgent)?navigator.userAgent.match(/(msie |rv:)(\d+(.\d+)?)/i)[2]:!1},isBlankString:function(t){return!t||/^\s*$/.test(t)},escapeRegExChars:function(t){return t.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&")},isString:function(t){return"string"==typeof t},isNumber:function(t){return"number"==typeof t},isArray:t.isArray,isFunction:t.isFunction,isObject:t.isPlainObject,isUndefined:function(t){return"undefined"==typeof t},toStr:function(t){return e.isUndefined(t)||null===t?"":t+""},bind:t.proxy,each:function(e,n){function i(t,e){return n(e,t)}t.each(e,i)},map:t.map,filter:t.grep,every:function(e,n){var i=!0;return e?(t.each(e,function(t,r){return(i=n.call(null,r,t,e))?void 0:!1}),!!i):i},some:function(e,n){var i=!1;return e?(t.each(e,function(t,r){return(i=n.call(null,r,t,e))?!1:void 0}),!!i):i},mixin:t.extend,getUniqueId:function(){var t=0;return function(){return t++}}(),templatify:function(e){function n(){return String(e)}return t.isFunction(e)?e:n},defer:function(t){setTimeout(t,0)},debounce:function(t,e,n){var i,r;return function(){var o,s,a=this,l=arguments;return o=function(){i=null,n||(r=t.apply(a,l))},s=n&&!i,clearTimeout(i),i=setTimeout(o,e),s&&(r=t.apply(a,l)),r}},throttle:function(t,e){var n,i,r,o,s,a;return s=0,a=function(){s=new Date,r=null,o=t.apply(n,i)},function(){var l=new Date,u=e-(l-s);return n=this,i=arguments,0>=u?(clearTimeout(r),r=null,s=l,o=t.apply(n,i)):r||(r=setTimeout(a,u)),o}},noop:function(){}}}(),n="0.10.5",i=function(){"use strict";function t(t){return t=e.toStr(t),t?t.split(/\s+/):[]}function n(t){return t=e.toStr(t),t?t.split(/\W+/):[]}function i(t){return function(){var n=[].slice.call(arguments,0);return function(i){var r=[];return e.each(n,function(n){r=r.concat(t(e.toStr(i[n])))}),r}}}return{nonword:n,whitespace:t,obj:{nonword:i(n),whitespace:i(t)}}}(),r=function(){"use strict";function n(n){this.maxSize=e.isNumber(n)?n:100,this.reset(),this.maxSize<=0&&(this.set=this.get=t.noop)}function i(){this.head=this.tail=null}function r(t,e){this.key=t,this.val=e,this.prev=this.next=null}return e.mixin(n.prototype,{set:function(t,e){var n,i=this.list.tail;this.size>=this.maxSize&&(this.list.remove(i),delete this.hash[i.key]),(n=this.hash[t])?(n.val=e,this.list.moveToFront(n)):(n=new r(t,e),this.list.add(n),this.hash[t]=n,this.size++)},get:function(t){var e=this.hash[t];return e?(this.list.moveToFront(e),e.val):void 0},reset:function(){this.size=0,this.hash={},this.list=new i}}),e.mixin(i.prototype,{add:function(t){this.head&&(t.next=this.head,this.head.prev=t),this.head=t,this.tail=this.tail||t},remove:function(t){t.prev?t.prev.next=t.next:this.head=t.next,t.next?t.next.prev=t.prev:this.tail=t.prev},moveToFront:function(t){this.remove(t),this.add(t)}}),n}(),o=function(){"use strict";function t(t){this.prefix=["__",t,"__"].join(""),this.ttlKey="__ttl__",this.keyMatcher=new RegExp("^"+e.escapeRegExChars(this.prefix))}function n(){return(new Date).getTime()}function i(t){return JSON.stringify(e.isUndefined(t)?null:t)}function r(t){return JSON.parse(t)}var o,s;try{o=window.localStorage,o.setItem("~~~","!"),o.removeItem("~~~")}catch(a){o=null}return s=o&&window.JSON?{_prefix:function(t){return this.prefix+t},_ttlKey:function(t){return this._prefix(t)+this.ttlKey},get:function(t){return this.isExpired(t)&&this.remove(t),r(o.getItem(this._prefix(t)))},set:function(t,r,s){return e.isNumber(s)?o.setItem(this._ttlKey(t),i(n()+s)):o.removeItem(this._ttlKey(t)),o.setItem(this._prefix(t),i(r))},remove:function(t){return o.removeItem(this._ttlKey(t)),o.removeItem(this._prefix(t)),this},clear:function(){var t,e,n=[],i=o.length;for(t=0;i>t;t++)(e=o.key(t)).match(this.keyMatcher)&&n.push(e.replace(this.keyMatcher,""));for(t=n.length;t--;)this.remove(n[t]);return this},isExpired:function(t){var i=r(o.getItem(this._ttlKey(t)));return e.isNumber(i)&&n()>i?!0:!1}}:{get:e.noop,set:e.noop,remove:e.noop,clear:e.noop,isExpired:e.noop},e.mixin(t.prototype,s),t}(),s=function(){"use strict";function n(e){e=e||{},this.cancelled=!1,this.lastUrl=null,this._send=e.transport?i(e.transport):t.ajax,this._get=e.rateLimiter?e.rateLimiter(this._get):this._get,this._cache=e.cache===!1?new r(0):l}function i(n){return function(i,r){function o(t){e.defer(function(){a.resolve(t)})}function s(t){e.defer(function(){a.reject(t)})}var a=t.Deferred();return n(i,r,o,s),a}}var o=0,s={},a=6,l=new r(10);return n.setMaxPendingRequests=function(t){a=t},n.resetCache=function(){l.reset()},e.mixin(n.prototype,{_get:function(t,e,n){function i(e){n&&n(null,e),c._cache.set(t,e)}function r(){n&&n(!0)}function l(){o--,delete s[t],c.onDeckRequestArgs&&(c._get.apply(c,c.onDeckRequestArgs),c.onDeckRequestArgs=null)}var u,c=this;this.cancelled||t!==this.lastUrl||((u=s[t])?u.done(i).fail(r):a>o?(o++,s[t]=this._send(t,e).done(i).fail(r).always(l)):this.onDeckRequestArgs=[].slice.call(arguments,0))},get:function(t,n,i){var r;return e.isFunction(n)&&(i=n,n={}),this.cancelled=!1,this.lastUrl=t,(r=this._cache.get(t))?e.defer(function(){i&&i(null,r)}):this._get(t,n,i),!!r},cancel:function(){this.cancelled=!0}}),n}(),a=function(){"use strict";function n(e){e=e||{},e.datumTokenizer&&e.queryTokenizer||t.error("datumTokenizer and queryTokenizer are both required"),this.datumTokenizer=e.datumTokenizer,this.queryTokenizer=e.queryTokenizer,this.reset()}function i(t){return t=e.filter(t,function(t){return!!t}),t=e.map(t,function(t){return t.toLowerCase()})}function r(){return{ids:[],children:{}}}function o(t){for(var e={},n=[],i=0,r=t.length;r>i;i++)e[t[i]]||(e[t[i]]=!0,n.push(t[i]));return n}function s(t,e){function n(t,e){return t-e}var i=0,r=0,o=[];t=t.sort(n),e=e.sort(n);for(var s=t.length,a=e.length;s>i&&a>r;)t[i]<e[r]?i++:t[i]>e[r]?r++:(o.push(t[i]),i++,r++);return o}return e.mixin(n.prototype,{bootstrap:function(t){this.datums=t.datums,this.trie=t.trie},add:function(t){var n=this;t=e.isArray(t)?t:[t],e.each(t,function(t){var o,s;o=n.datums.push(t)-1,s=i(n.datumTokenizer(t)),e.each(s,function(t){var e,i,s;for(e=n.trie,i=t.split("");s=i.shift();)e=e.children[s]||(e.children[s]=r()),e.ids.push(o)})})},get:function(t){var n,r,a=this;return n=i(this.queryTokenizer(t)),e.each(n,function(t){var e,n,i,o;if(r&&0===r.length)return!1;for(e=a.trie,n=t.split("");e&&(i=n.shift());)e=e.children[i];return e&&0===n.length?(o=e.ids.slice(0),void(r=r?s(r,o):o)):(r=[],!1)}),r?e.map(o(r),function(t){return a.datums[t]}):[]},reset:function(){this.datums=[],this.trie=r()},serialize:function(){return{datums:this.datums,trie:this.trie}}}),n}(),l=function(){"use strict";function i(t){return t.local||null}function r(i){var r,o;return o={url:null,thumbprint:"",ttl:864e5,filter:null,ajax:{}},(r=i.prefetch||null)&&(r=e.isString(r)?{url:r}:r,r=e.mixin(o,r),r.thumbprint=n+r.thumbprint,r.ajax.type=r.ajax.type||"GET",r.ajax.dataType=r.ajax.dataType||"json",!r.url&&t.error("prefetch requires url to be set")),r}function o(n){function i(t){return function(n){return e.debounce(n,t)}}function r(t){return function(n){return e.throttle(n,t)}}var o,s;return s={url:null,cache:!0,wildcard:"%QUERY",replace:null,rateLimitBy:"debounce",rateLimitWait:300,send:null,filter:null,ajax:{}},(o=n.remote||null)&&(o=e.isString(o)?{url:o}:o,o=e.mixin(s,o),o.rateLimiter=/^throttle$/i.test(o.rateLimitBy)?r(o.rateLimitWait):i(o.rateLimitWait),o.ajax.type=o.ajax.type||"GET",o.ajax.dataType=o.ajax.dataType||"json",delete o.rateLimitBy,delete o.rateLimitWait,!o.url&&t.error("remote requires url to be set")),o}return{local:i,prefetch:r,remote:o}
|
|
}();!function(n){"use strict";function r(e){e&&(e.local||e.prefetch||e.remote)||t.error("one of local, prefetch, or remote is required"),this.limit=e.limit||5,this.sorter=u(e.sorter),this.dupDetector=e.dupDetector||c,this.local=l.local(e),this.prefetch=l.prefetch(e),this.remote=l.remote(e),this.cacheKey=this.prefetch?this.prefetch.cacheKey||this.prefetch.url:null,this.index=new a({datumTokenizer:e.datumTokenizer,queryTokenizer:e.queryTokenizer}),this.storage=this.cacheKey?new o(this.cacheKey):null}function u(t){function n(e){return e.sort(t)}function i(t){return t}return e.isFunction(t)?n:i}function c(){return!1}var d,p;return d=n.Bloodhound,p={data:"data",protocol:"protocol",thumbprint:"thumbprint"},n.Bloodhound=r,r.noConflict=function(){return n.Bloodhound=d,r},r.tokenizers=i,e.mixin(r.prototype,{_loadPrefetch:function(e){function n(t){o.clear(),o.add(e.filter?e.filter(t):t),o._saveToStorage(o.index.serialize(),e.thumbprint,e.ttl)}var i,r,o=this;return(i=this._readFromStorage(e.thumbprint))?(this.index.bootstrap(i),r=t.Deferred().resolve()):r=t.ajax(e.url,e.ajax).done(n),r},_getFromRemote:function(t,e){function n(t,n){e(t?[]:o.remote.filter?o.remote.filter(n):n)}var i,r,o=this;return this.transport?(t=t||"",r=encodeURIComponent(t),i=this.remote.replace?this.remote.replace(this.remote.url,t):this.remote.url.replace(this.remote.wildcard,r),this.transport.get(i,this.remote.ajax,n)):void 0},_cancelLastRemoteRequest:function(){this.transport&&this.transport.cancel()},_saveToStorage:function(t,e,n){this.storage&&(this.storage.set(p.data,t,n),this.storage.set(p.protocol,location.protocol,n),this.storage.set(p.thumbprint,e,n))},_readFromStorage:function(t){var e,n={};return this.storage&&(n.data=this.storage.get(p.data),n.protocol=this.storage.get(p.protocol),n.thumbprint=this.storage.get(p.thumbprint)),e=n.thumbprint!==t||n.protocol!==location.protocol,n.data&&!e?n.data:null},_initialize:function(){function n(){r.add(e.isFunction(o)?o():o)}var i,r=this,o=this.local;return i=this.prefetch?this._loadPrefetch(this.prefetch):t.Deferred().resolve(),o&&i.done(n),this.transport=this.remote?new s(this.remote):null,this.initPromise=i.promise()},initialize:function(t){return!this.initPromise||t?this._initialize():this.initPromise},add:function(t){this.index.add(t)},get:function(t,n){function i(t){var i=o.slice(0);e.each(t,function(t){var n;return n=e.some(i,function(e){return r.dupDetector(t,e)}),!n&&i.push(t),i.length<r.limit}),n&&n(r.sorter(i))}var r=this,o=[],s=!1;o=this.index.get(t),o=this.sorter(o).slice(0,this.limit),o.length<this.limit?s=this._getFromRemote(t,i):this._cancelLastRemoteRequest(),s||(o.length>0||!this.transport)&&n&&n(o)},clear:function(){this.index.reset()},clearPrefetchCache:function(){this.storage&&this.storage.clear()},clearRemoteCache:function(){this.transport&&s.resetCache()},ttAdapter:function(){return e.bind(this.get,this)}}),r}(this);var u=function(){return{wrapper:'<span class="twitter-typeahead"></span>',dropdown:'<span class="tt-dropdown-menu"></span>',dataset:'<div class="tt-dataset-%CLASS%"></div>',suggestions:'<span class="tt-suggestions"></span>',suggestion:'<div class="tt-suggestion"></div>'}}(),c=function(){"use strict";var t={wrapper:{position:"relative",display:"inline-block"},hint:{position:"absolute",top:"0",left:"0",borderColor:"transparent",boxShadow:"none",opacity:"1"},input:{position:"relative",verticalAlign:"top",backgroundColor:"transparent"},inputWithNoHint:{position:"relative",verticalAlign:"top"},dropdown:{position:"absolute",top:"100%",left:"0",zIndex:"100",display:"none"},suggestions:{display:"block"},suggestion:{whiteSpace:"nowrap",cursor:"pointer"},suggestionChild:{whiteSpace:"normal"},ltr:{left:"0",right:"auto"},rtl:{left:"auto",right:" 0"}};return e.isMsie()&&e.mixin(t.input,{backgroundImage:"url(data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7)"}),e.isMsie()&&e.isMsie()<=7&&e.mixin(t.input,{marginTop:"-1px"}),t}(),d=function(){"use strict";function n(e){e&&e.el||t.error("EventBus initialized without el"),this.$el=t(e.el)}var i="typeahead:";return e.mixin(n.prototype,{trigger:function(t){var e=[].slice.call(arguments,1);this.$el.trigger(i+t,e)}}),n}(),p=function(){"use strict";function t(t,e,n,i){var r;if(!n)return this;for(e=e.split(l),n=i?a(n,i):n,this._callbacks=this._callbacks||{};r=e.shift();)this._callbacks[r]=this._callbacks[r]||{sync:[],async:[]},this._callbacks[r][t].push(n);return this}function e(e,n,i){return t.call(this,"async",e,n,i)}function n(e,n,i){return t.call(this,"sync",e,n,i)}function i(t){var e;if(!this._callbacks)return this;for(t=t.split(l);e=t.shift();)delete this._callbacks[e];return this}function r(t){var e,n,i,r,s;if(!this._callbacks)return this;for(t=t.split(l),i=[].slice.call(arguments,1);(e=t.shift())&&(n=this._callbacks[e]);)r=o(n.sync,this,[e].concat(i)),s=o(n.async,this,[e].concat(i)),r()&&u(s);return this}function o(t,e,n){function i(){for(var i,r=0,o=t.length;!i&&o>r;r+=1)i=t[r].apply(e,n)===!1;return!i}return i}function s(){var t;return t=window.setImmediate?function(t){setImmediate(function(){t()})}:function(t){setTimeout(function(){t()},0)}}function a(t,e){return t.bind?t.bind(e):function(){t.apply(e,[].slice.call(arguments,0))}}var l=/\s+/,u=s();return{onSync:n,onAsync:e,off:i,trigger:r}}(),h=function(t){"use strict";function n(t,n,i){for(var r,o=[],s=0,a=t.length;a>s;s++)o.push(e.escapeRegExChars(t[s]));return r=i?"\\b("+o.join("|")+")\\b":"("+o.join("|")+")",n?new RegExp(r):new RegExp(r,"i")}var i={node:null,pattern:null,tagName:"strong",className:null,wordsOnly:!1,caseSensitive:!1};return function(r){function o(e){var n,i,o;return(n=a.exec(e.data))&&(o=t.createElement(r.tagName),r.className&&(o.className=r.className),i=e.splitText(n.index),i.splitText(n[0].length),o.appendChild(i.cloneNode(!0)),e.parentNode.replaceChild(o,i)),!!n}function s(t,e){for(var n,i=3,r=0;r<t.childNodes.length;r++)n=t.childNodes[r],n.nodeType===i?r+=e(n)?1:0:s(n,e)}var a;r=e.mixin({},i,r),r.node&&r.pattern&&(r.pattern=e.isArray(r.pattern)?r.pattern:[r.pattern],a=n(r.pattern,r.caseSensitive,r.wordsOnly),s(r.node,o))}}(window.document),f=function(){"use strict";function n(n){var r,o,a,l,u=this;n=n||{},n.input||t.error("input is missing"),r=e.bind(this._onBlur,this),o=e.bind(this._onFocus,this),a=e.bind(this._onKeydown,this),l=e.bind(this._onInput,this),this.$hint=t(n.hint),this.$input=t(n.input).on("blur.tt",r).on("focus.tt",o).on("keydown.tt",a),0===this.$hint.length&&(this.setHint=this.getHint=this.clearHint=this.clearHintIfInvalid=e.noop),e.isMsie()?this.$input.on("keydown.tt keypress.tt cut.tt paste.tt",function(t){s[t.which||t.keyCode]||e.defer(e.bind(u._onInput,u,t))}):this.$input.on("input.tt",l),this.query=this.$input.val(),this.$overflowHelper=i(this.$input)}function i(e){return t('<pre aria-hidden="true"></pre>').css({position:"absolute",visibility:"hidden",whiteSpace:"pre",fontFamily:e.css("font-family"),fontSize:e.css("font-size"),fontStyle:e.css("font-style"),fontVariant:e.css("font-variant"),fontWeight:e.css("font-weight"),wordSpacing:e.css("word-spacing"),letterSpacing:e.css("letter-spacing"),textIndent:e.css("text-indent"),textRendering:e.css("text-rendering"),textTransform:e.css("text-transform")}).insertAfter(e)}function r(t,e){return n.normalizeQuery(t)===n.normalizeQuery(e)}function o(t){return t.altKey||t.ctrlKey||t.metaKey||t.shiftKey}var s;return s={9:"tab",27:"esc",37:"left",39:"right",13:"enter",38:"up",40:"down"},n.normalizeQuery=function(t){return(t||"").replace(/^\s*/g,"").replace(/\s{2,}/g," ")},e.mixin(n.prototype,p,{_onBlur:function(){this.resetInputValue(),this.trigger("blurred")},_onFocus:function(){this.trigger("focused")},_onKeydown:function(t){var e=s[t.which||t.keyCode];this._managePreventDefault(e,t),e&&this._shouldTrigger(e,t)&&this.trigger(e+"Keyed",t)},_onInput:function(){this._checkInputValue()},_managePreventDefault:function(t,e){var n,i,r;switch(t){case"tab":i=this.getHint(),r=this.getInputValue(),n=i&&i!==r&&!o(e);break;case"up":case"down":n=!o(e);break;default:n=!1}n&&e.preventDefault()},_shouldTrigger:function(t,e){var n;switch(t){case"tab":n=!o(e);break;default:n=!0}return n},_checkInputValue:function(){var t,e,n;t=this.getInputValue(),e=r(t,this.query),n=e?this.query.length!==t.length:!1,this.query=t,e?n&&this.trigger("whitespaceChanged",this.query):this.trigger("queryChanged",this.query)},focus:function(){this.$input.focus()},blur:function(){this.$input.blur()},getQuery:function(){return this.query},setQuery:function(t){this.query=t},getInputValue:function(){return this.$input.val()},setInputValue:function(t,e){this.$input.val(t),e?this.clearHint():this._checkInputValue()},resetInputValue:function(){this.setInputValue(this.query,!0)},getHint:function(){return this.$hint.val()},setHint:function(t){this.$hint.val(t)},clearHint:function(){this.setHint("")},clearHintIfInvalid:function(){var t,e,n,i;t=this.getInputValue(),e=this.getHint(),n=t!==e&&0===e.indexOf(t),i=""!==t&&n&&!this.hasOverflow(),!i&&this.clearHint()},getLanguageDirection:function(){return(this.$input.css("direction")||"ltr").toLowerCase()},hasOverflow:function(){var t=this.$input.width()-2;return this.$overflowHelper.text(this.getInputValue()),this.$overflowHelper.width()>=t},isCursorAtEnd:function(){var t,n,i;return t=this.$input.val().length,n=this.$input[0].selectionStart,e.isNumber(n)?n===t:document.selection?(i=document.selection.createRange(),i.moveStart("character",-t),t===i.text.length):!0},destroy:function(){this.$hint.off(".tt"),this.$input.off(".tt"),this.$hint=this.$input=this.$overflowHelper=null}}),n}(),g=function(){"use strict";function n(n){n=n||{},n.templates=n.templates||{},n.source||t.error("missing source"),n.name&&!o(n.name)&&t.error("invalid dataset name: "+n.name),this.query=null,this.highlight=!!n.highlight,this.name=n.name||e.getUniqueId(),this.source=n.source,this.displayFn=i(n.display||n.displayKey),this.templates=r(n.templates,this.displayFn),this.$el=t(u.dataset.replace("%CLASS%",this.name))}function i(t){function n(e){return e[t]}return t=t||"value",e.isFunction(t)?t:n}function r(t,n){function i(t){return"<p>"+n(t)+"</p>"}return{empty:t.empty&&e.templatify(t.empty),header:t.header&&e.templatify(t.header),footer:t.footer&&e.templatify(t.footer),suggestion:t.suggestion||i}}function o(t){return/^[_a-zA-Z0-9-]+$/.test(t)}var s="ttDataset",a="ttValue",l="ttDatum";return n.extractDatasetName=function(e){return t(e).data(s)},n.extractValue=function(e){return t(e).data(a)},n.extractDatum=function(e){return t(e).data(l)},e.mixin(n.prototype,p,{_render:function(n,i){function r(){return g.templates.empty({query:n,isEmpty:!0})}function o(){function r(e){var n;return n=t(u.suggestion).append(g.templates.suggestion(e)).data(s,g.name).data(a,g.displayFn(e)).data(l,e),n.children().each(function(){t(this).css(c.suggestionChild)}),n}var o,d;return o=t(u.suggestions).css(c.suggestions),d=e.map(i,r),o.append.apply(o,d),g.highlight&&h({className:"tt-highlight",node:o[0],pattern:n}),o}function d(){return g.templates.header({query:n,isEmpty:!f})}function p(){return g.templates.footer({query:n,isEmpty:!f})}if(this.$el){var f,g=this;this.$el.empty(),f=i&&i.length,!f&&this.templates.empty?this.$el.html(r()).prepend(g.templates.header?d():null).append(g.templates.footer?p():null):f&&this.$el.html(o()).prepend(g.templates.header?d():null).append(g.templates.footer?p():null),this.trigger("rendered")}},getRoot:function(){return this.$el},update:function(t){function e(e){n.canceled||t!==n.query||n._render(t,e)}var n=this;this.query=t,this.canceled=!1,this.source(t,e)},cancel:function(){this.canceled=!0},clear:function(){this.cancel(),this.$el.empty(),this.trigger("rendered")},isEmpty:function(){return this.$el.is(":empty")},destroy:function(){this.$el=null}}),n}(),m=function(){"use strict";function n(n){var r,o,s,a=this;n=n||{},n.menu||t.error("menu is required"),this.isOpen=!1,this.isEmpty=!0,this.datasets=e.map(n.datasets,i),r=e.bind(this._onSuggestionClick,this),o=e.bind(this._onSuggestionMouseEnter,this),s=e.bind(this._onSuggestionMouseLeave,this),this.$menu=t(n.menu).on("click.tt",".tt-suggestion",r).on("mouseenter.tt",".tt-suggestion",o).on("mouseleave.tt",".tt-suggestion",s),e.each(this.datasets,function(t){a.$menu.append(t.getRoot()),t.onSync("rendered",a._onRendered,a)})}function i(t){return new g(t)}return e.mixin(n.prototype,p,{_onSuggestionClick:function(e){this.trigger("suggestionClicked",t(e.currentTarget))},_onSuggestionMouseEnter:function(e){this._removeCursor(),this._setCursor(t(e.currentTarget),!0)},_onSuggestionMouseLeave:function(){this._removeCursor()},_onRendered:function(){function t(t){return t.isEmpty()}this.isEmpty=e.every(this.datasets,t),this.isEmpty?this._hide():this.isOpen&&this._show(),this.trigger("datasetRendered")},_hide:function(){this.$menu.hide()},_show:function(){this.$menu.css("display","block")},_getSuggestions:function(){return this.$menu.find(".tt-suggestion")},_getCursor:function(){return this.$menu.find(".tt-cursor").first()},_setCursor:function(t,e){t.first().addClass("tt-cursor"),!e&&this.trigger("cursorMoved")},_removeCursor:function(){this._getCursor().removeClass("tt-cursor")},_moveCursor:function(t){var e,n,i,r;if(this.isOpen){if(n=this._getCursor(),e=this._getSuggestions(),this._removeCursor(),i=e.index(n)+t,i=(i+1)%(e.length+1)-1,-1===i)return void this.trigger("cursorRemoved");-1>i&&(i=e.length-1),this._setCursor(r=e.eq(i)),this._ensureVisible(r)}},_ensureVisible:function(t){var e,n,i,r;e=t.position().top,n=e+t.outerHeight(!0),i=this.$menu.scrollTop(),r=this.$menu.height()+parseInt(this.$menu.css("paddingTop"),10)+parseInt(this.$menu.css("paddingBottom"),10),0>e?this.$menu.scrollTop(i+e):n>r&&this.$menu.scrollTop(i+(n-r))},close:function(){this.isOpen&&(this.isOpen=!1,this._removeCursor(),this._hide(),this.trigger("closed"))},open:function(){this.isOpen||(this.isOpen=!0,!this.isEmpty&&this._show(),this.trigger("opened"))},setLanguageDirection:function(t){this.$menu.css("ltr"===t?c.ltr:c.rtl)},moveCursorUp:function(){this._moveCursor(-1)},moveCursorDown:function(){this._moveCursor(1)},getDatumForSuggestion:function(t){var e=null;return t.length&&(e={raw:g.extractDatum(t),value:g.extractValue(t),datasetName:g.extractDatasetName(t)}),e},getDatumForCursor:function(){return this.getDatumForSuggestion(this._getCursor().first())},getDatumForTopSuggestion:function(){return this.getDatumForSuggestion(this._getSuggestions().first())},update:function(t){function n(e){e.update(t)}e.each(this.datasets,n)},empty:function(){function t(t){t.clear()}e.each(this.datasets,t),this.isEmpty=!0},isVisible:function(){return this.isOpen&&!this.isEmpty},destroy:function(){function t(t){t.destroy()}this.$menu.off(".tt"),this.$menu=null,e.each(this.datasets,t)}}),n}(),v=function(){"use strict";function n(n){var r,o,s;n=n||{},n.input||t.error("missing input"),this.isActivated=!1,this.autoselect=!!n.autoselect,this.minLength=e.isNumber(n.minLength)?n.minLength:1,this.$node=i(n.input,n.withHint),r=this.$node.find(".tt-dropdown-menu"),o=this.$node.find(".tt-input"),s=this.$node.find(".tt-hint"),o.on("blur.tt",function(t){var n,i,s;n=document.activeElement,i=r.is(n),s=r.has(n).length>0,e.isMsie()&&(i||s)&&(t.preventDefault(),t.stopImmediatePropagation(),e.defer(function(){o.focus()}))}),r.on("mousedown.tt",function(t){t.preventDefault()}),this.eventBus=n.eventBus||new d({el:o}),this.dropdown=new m({menu:r,datasets:n.datasets}).onSync("suggestionClicked",this._onSuggestionClicked,this).onSync("cursorMoved",this._onCursorMoved,this).onSync("cursorRemoved",this._onCursorRemoved,this).onSync("opened",this._onOpened,this).onSync("closed",this._onClosed,this).onAsync("datasetRendered",this._onDatasetRendered,this),this.input=new f({input:o,hint:s}).onSync("focused",this._onFocused,this).onSync("blurred",this._onBlurred,this).onSync("enterKeyed",this._onEnterKeyed,this).onSync("tabKeyed",this._onTabKeyed,this).onSync("escKeyed",this._onEscKeyed,this).onSync("upKeyed",this._onUpKeyed,this).onSync("downKeyed",this._onDownKeyed,this).onSync("leftKeyed",this._onLeftKeyed,this).onSync("rightKeyed",this._onRightKeyed,this).onSync("queryChanged",this._onQueryChanged,this).onSync("whitespaceChanged",this._onWhitespaceChanged,this),this._setLanguageDirection()}function i(e,n){var i,o,a,l;i=t(e),o=t(u.wrapper).css(c.wrapper),a=t(u.dropdown).css(c.dropdown),l=i.clone().css(c.hint).css(r(i)),l.val("").removeData().addClass("tt-hint").removeAttr("id name placeholder required").prop("readonly",!0).attr({autocomplete:"off",spellcheck:"false",tabindex:-1}),i.data(s,{dir:i.attr("dir"),autocomplete:i.attr("autocomplete"),spellcheck:i.attr("spellcheck"),style:i.attr("style")}),i.addClass("tt-input").attr({autocomplete:"off",spellcheck:!1}).css(n?c.input:c.inputWithNoHint);try{!i.attr("dir")&&i.attr("dir","auto")}catch(d){}return i.wrap(o).parent().prepend(n?l:null).append(a)}function r(t){return{backgroundAttachment:t.css("background-attachment"),backgroundClip:t.css("background-clip"),backgroundColor:t.css("background-color"),backgroundImage:t.css("background-image"),backgroundOrigin:t.css("background-origin"),backgroundPosition:t.css("background-position"),backgroundRepeat:t.css("background-repeat"),backgroundSize:t.css("background-size")}}function o(t){var n=t.find(".tt-input");e.each(n.data(s),function(t,i){e.isUndefined(t)?n.removeAttr(i):n.attr(i,t)}),n.detach().removeData(s).removeClass("tt-input").insertAfter(t),t.remove()}var s="ttAttrs";return e.mixin(n.prototype,{_onSuggestionClicked:function(t,e){var n;(n=this.dropdown.getDatumForSuggestion(e))&&this._select(n)},_onCursorMoved:function(){var t=this.dropdown.getDatumForCursor();this.input.setInputValue(t.value,!0),this.eventBus.trigger("cursorchanged",t.raw,t.datasetName)},_onCursorRemoved:function(){this.input.resetInputValue(),this._updateHint()},_onDatasetRendered:function(){this._updateHint()},_onOpened:function(){this._updateHint(),this.eventBus.trigger("opened")},_onClosed:function(){this.input.clearHint(),this.eventBus.trigger("closed")},_onFocused:function(){this.isActivated=!0,this.dropdown.open()},_onBlurred:function(){this.isActivated=!1,this.dropdown.empty(),this.dropdown.close()},_onEnterKeyed:function(t,e){var n,i;n=this.dropdown.getDatumForCursor(),i=this.dropdown.getDatumForTopSuggestion(),n?(this._select(n),e.preventDefault()):this.autoselect&&i&&(this._select(i),e.preventDefault())},_onTabKeyed:function(t,e){var n;(n=this.dropdown.getDatumForCursor())?(this._select(n),e.preventDefault()):this._autocomplete(!0)},_onEscKeyed:function(){this.dropdown.close(),this.input.resetInputValue()},_onUpKeyed:function(){var t=this.input.getQuery();this.dropdown.isEmpty&&t.length>=this.minLength?this.dropdown.update(t):this.dropdown.moveCursorUp(),this.dropdown.open()},_onDownKeyed:function(){var t=this.input.getQuery();this.dropdown.isEmpty&&t.length>=this.minLength?this.dropdown.update(t):this.dropdown.moveCursorDown(),this.dropdown.open()},_onLeftKeyed:function(){"rtl"===this.dir&&this._autocomplete()},_onRightKeyed:function(){"ltr"===this.dir&&this._autocomplete()},_onQueryChanged:function(t,e){this.input.clearHintIfInvalid(),e.length>=this.minLength?this.dropdown.update(e):this.dropdown.empty(),this.dropdown.open(),this._setLanguageDirection()},_onWhitespaceChanged:function(){this._updateHint(),this.dropdown.open()},_setLanguageDirection:function(){var t;this.dir!==(t=this.input.getLanguageDirection())&&(this.dir=t,this.$node.css("direction",t),this.dropdown.setLanguageDirection(t))},_updateHint:function(){var t,n,i,r,o,s;t=this.dropdown.getDatumForTopSuggestion(),t&&this.dropdown.isVisible()&&!this.input.hasOverflow()?(n=this.input.getInputValue(),i=f.normalizeQuery(n),r=e.escapeRegExChars(i),o=new RegExp("^(?:"+r+")(.+$)","i"),s=o.exec(t.value),s?this.input.setHint(n+s[1]):this.input.clearHint()):this.input.clearHint()},_autocomplete:function(t){var e,n,i,r;e=this.input.getHint(),n=this.input.getQuery(),i=t||this.input.isCursorAtEnd(),e&&n!==e&&i&&(r=this.dropdown.getDatumForTopSuggestion(),r&&this.input.setInputValue(r.value),this.eventBus.trigger("autocompleted",r.raw,r.datasetName))},_select:function(t){this.input.setQuery(t.value),this.input.setInputValue(t.value,!0),this._setLanguageDirection(),this.eventBus.trigger("selected",t.raw,t.datasetName),this.dropdown.close(),e.defer(e.bind(this.dropdown.empty,this.dropdown))},open:function(){this.dropdown.open()},close:function(){this.dropdown.close()},setVal:function(t){t=e.toStr(t),this.isActivated?this.input.setInputValue(t):(this.input.setQuery(t),this.input.setInputValue(t,!0)),this._setLanguageDirection()},getVal:function(){return this.input.getQuery()},destroy:function(){this.input.destroy(),this.dropdown.destroy(),o(this.$node),this.$node=null}}),n}();!function(){"use strict";var n,i,r;n=t.fn.typeahead,i="ttTypeahead",r={initialize:function(n,r){function o(){var o,s,a=t(this);e.each(r,function(t){t.highlight=!!n.highlight}),s=new v({input:a,eventBus:o=new d({el:a}),withHint:e.isUndefined(n.hint)?!0:!!n.hint,minLength:n.minLength,autoselect:n.autoselect,datasets:r}),a.data(i,s)}return r=e.isArray(r)?r:[].slice.call(arguments,1),n=n||{},this.each(o)},open:function(){function e(){var e,n=t(this);(e=n.data(i))&&e.open()}return this.each(e)},close:function(){function e(){var e,n=t(this);(e=n.data(i))&&e.close()}return this.each(e)},val:function(e){function n(){var n,r=t(this);(n=r.data(i))&&n.setVal(e)}function r(t){var e,n;return(e=t.data(i))&&(n=e.getVal()),n}return arguments.length?this.each(n):r(this.first())},destroy:function(){function e(){var e,n=t(this);(e=n.data(i))&&(e.destroy(),n.removeData(i))}return this.each(e)}},t.fn.typeahead=function(e){var n;return r[e]&&"initialize"!==e?(n=this.filter(function(){return!!t(this).data(i)}),r[e].apply(n,[].slice.call(arguments,1))):r.initialize.apply(this,arguments)},t.fn.typeahead.noConflict=function(){return t.fn.typeahead=n,this}}()}(window.jQuery),function(){this.Autocomplete=function(){function t(){}return t.bindTypeahead=function(e){return t.toggleOkFeedbacksOnLoad(e),$(e.selector).typeahead({highlight:!0,hint:!1},{displayKey:"display_key",source:t.constructSourceAdapter(e.remote)}).on("typeahead:selected",function(n,i){var r,o;return o=$(n.currentTarget).parents("div.js-typeahead-container"),r=o.find(e.hiddenSelector).val(i.id),t.toggleOkFeedback(r)})},t.constructSourceAdapter=function(t){var e;return e=new Bloodhound({datumTokenizer:function(t){return Bloodhound.tokenizers.whitespace(t.display_key)},queryTokenizer:Bloodhound.tokenizers.whitespace,remote:""+t+"?q=%QUERY"}),e.initialize(),e.ttAdapter()},t.toggleOkFeedback=function(t){var e,n;return e=t.parents("div.js-typeahead-container").find(".js-typeahead-ok"),n=t.parents("div.js-typeahead-container").find(".js-typeahead-remove"),t.val()?(e.removeClass("hidden"),n.addClass("hidden")):(n.removeClass("hidden"),e.addClass("hidden"))},t.toggleOkFeedbacksOnLoad=function(e){return $.each($(e.hiddenSelector),function(e,n){return t.toggleOkFeedback($(n))})},t.bindAdminContactSearch=function(){return t.bindTypeahead({remote:"/admin/contacts/search",selector:".js-contact-typeahead",hiddenSelector:".js-contact-id"})},t.bindAdminRegistrarSearch=function(){return t.bindTypeahead({remote:"/admin/registrars/search",selector:".js-registrar-typeahead",hiddenSelector:".js-registrar-id"})},t.bindClientContactSearch=function(){return t.bindTypeahead({remote:"/client/contacts/search",selector:".js-contact-typeahead",hiddenSelector:".js-contact-id"})},t.bindClientRegistrarSearch=function(){return t.bindTypeahead({remote:"/client/registrars/search",selector:".js-registrar-typeahead",hiddenSelector:".js-registrar-id"})},t}()}.call(this),function(){var t,e,n,i=function(t,e){return function(){return t.apply(e,arguments)}};t=jQuery,n={init:function(n){var i,r;if(i=t(this),i.length>1)throw"Can't initialize more than one item at a time";if(i.data("nestedAttributes"))throw"Can't initialize on this element more than once";return r=new e(i,n),i.data("nestedAttributes",r),i},add:function(){var e;if(e=t(this),null==e.data("nestedAttributes"))throw"You are trying to call instance methods without initializing first";return e.data("nestedAttributes").addItem(),e}},t.fn.nestedAttributes=function(e){return null!=n[e]?n[e].apply(this,Array.prototype.slice.call(arguments,1)):"object"!=typeof e&&e?t.error("Method "+e+" does not exist on jQuery.nestedAttributes"):n.init.apply(this,arguments)},e=function(){function e(e,n){this.destroyClick=i(this.destroyClick,this),this.addClick=i(this.addClick,this);var r,o,s,a;for(this.$container=e,this.options=t.extend({},this.settings,n),this.options.bindAddTo&&this.options.bindAddTo.click(this.addClick),this.$items=this.$container.children(),this.options.collectionName||this.autodetectCollectionName(),this.$items.each(function(e){return function(n,i){var r;return r=t(i),e.options.collectIdAttributes&&r.is("input")?(r.appendTo(r.prev()),e.$items=e.$items.not(r)):e.bindDestroy(r)}}(this)),a=this.$items,o=0,s=a.length;s>o;o++)r=a[o],this.hideIfAlreadyDestroyed(t(r));this.options.removeOnLoadIf&&this.$items.each(function(n){return function(i,r){return e=t(r),e.call(!0,n.options.removeOnLoadIf,i)?e.remove():void 0}}(this))}return e.prototype.RELEVANT_INPUTS_SELECTOR=':input[name][name!=""]',e.prototype.settings={collectionName:!1,bindAddTo:!1,removeOnLoadIf:!1,collectIdAttributes:!0,beforeAdd:!1,afterAdd:!1,beforeMove:!1,afterMove:!1,beforeDestroy:!1,afterDestroy:!1,destroySelector:".destroy",deepClone:!0,$clone:null},e.prototype.autodetectCollectionName=function(){var t,e,n;n=/\[(.[^\]]*)_attributes\]/;try{if(e=n.exec(this.$items.first().find(""+this.RELEVANT_INPUTS_SELECTOR+":first").attr("name"))[1],null!==e)return this.options.collectionName=e;throw"Regex error"}catch(i){return t=i,console.log("Error detecting collection name",t)}},e.prototype.addClick=function(t){return this.addItem(),t.preventDefault()},e.prototype.addItem=function(){var t,e;return e=this.$items.length,t=this.applyIndexToItem(this.extractClone(),e),this.options.beforeAdd&&!this.options.beforeAdd.call(void 0,t,e)?!1:(this.$container.append(t),this.options.afterAdd&&this.options.afterAdd.call(void 0,t,e),this.refreshItems())},e.prototype.extractClone=function(){var t;return this.$restorableClone?(t=this.$restorableClone,this.$restorableClone=null):(t=this.options.$clone||this.$items.first(),t=t.clone(this.options.deepClone),(this.options.$clone||!this.options.deepClone)&&this.bindDestroy(t),t.find(":text, textarea, select").val(""),t.find(":checkbox, :radio").attr("checked",!1),t.find('input[name$="\\[id\\]"]').remove(),t.find('input[name$="\\[_destroy\\]"]').remove()),t.show()},e.prototype.applyIndexToItem=function(e,n){var i;return i=this.options.collectionName,e.find(this.RELEVANT_INPUTS_SELECTOR).each(function(){return function(e,r){var o,s,a,l,u,c,d;return o=t(r),s=new RegExp("_"+i+"_attributes_\\d+_"),a="_"+i+"_attributes_"+n+"_",l=new RegExp("\\["+i+"_attributes\\]\\[\\d+\\]"),u="["+i+"_attributes]["+n+"]",o.attr("id")&&(c=o.attr("id").replace(s,a)),d=o.attr("name").replace(l,u),o.attr({id:c,name:d})}}(this)),e.find("label[for]").each(function(){return function(e,r){var o,s,a,l,u;o=t(r);try{return a=new RegExp("_"+i+"_attributes_\\d+_"),l="_"+i+"_attributes_"+n+"_",u=o.attr("for").replace(a,l),o.attr("for",u)}catch(c){return s=c,console.log("Error updating label",s)}}}(this)),e},e.prototype.hideIfAlreadyDestroyed=function(t){var e;return e=t.find("[name$='[_destroy]']"),e.length&&"true"===e.val()?this.destroy(t):void 0},e.prototype.destroyClick=function(e){return e.preventDefault(),this.destroy(t(e.target).parentsUntil(this.$container).last())},e.prototype.destroy=function(e){var n,i,r,o,s,a;return this.$items.length-1||(this.$restorableClone=this.extractClone()),o=this.indexForItem(e),s=0===e.find('input[name$="\\[id\\]"]').length,this.options.beforeDestroy&&!this.options.beforeDestroy.call(void 0,e,o,s)?!1:(this.$items.filter(":visible").length-1||this.addItem(),s?e.remove():(e.hide(),a=e.find(":input[name]:first").attr("name"),i=a.lastIndexOf("["),r=""+a.substring(0,i)+"[_destroy]",n=e.find("input[name='"+r+"']"),0===n.length&&(n=t('<input type="hidden" name="'+r+'" />'),e.append(n)),n.val(!0).change()),this.options.afterDestroy&&this.options.afterDestroy.call(e,o,s),this.refreshItems(),this.resetIndexes())},e.prototype.indexForItem=function(t){var e,n;return n=new RegExp("\\["+this.options.collectionName+"_attributes\\]\\[\\d+\\]"),e=t.find(""+this.RELEVANT_INPUTS_SELECTOR+":first").attr("name"),parseInt(e.match(n)[0].split("][")[1].slice(0,-1),10)},e.prototype.refreshItems=function(){return this.$items=this.$container.children()},e.prototype.resetIndexes=function(){return this.$items.each(function(e){return function(n,i){var r,o;return r=t(i),o=e.indexForItem(r),n===o?!0:(e.options.beforeMove&&e.options.beforeMove.call(r,n,o),e.applyIndexToItem(r,n),e.options.afterMove?e.options.afterMove.call(r,n,o):void 0)}}(this))},e.prototype.bindDestroy=function(t){return this.options.destroySelector?t.find(this.options.destroySelector).click(this.destroyClick):void 0},e}()}.call(this),function(t,e){"function"==typeof define&&define.amd?define("sifter",e):"object"==typeof exports?module.exports=e():t.Sifter=e()}(this,function(){var t=function(t,e){this.items=t,this.settings=e||{diacritics:!0}};t.prototype.tokenize=function(t){if(t=i(String(t||"").toLowerCase()),!t||!t.length)return[];var e,n,o,a,l=[],u=t.split(/ +/);for(e=0,n=u.length;n>e;e++){if(o=r(u[e]),this.settings.diacritics)for(a in s)s.hasOwnProperty(a)&&(o=o.replace(new RegExp(a,"g"),s[a]));l.push({string:u[e],regex:new RegExp(o,"i")})}return l},t.prototype.iterator=function(t,e){var n;n=o(t)?Array.prototype.forEach||function(t){for(var e=0,n=this.length;n>e;e++)t(this[e],e,this)}:function(t){for(var e in this)this.hasOwnProperty(e)&&t(this[e],e,this)},n.apply(t,[e])},t.prototype.getScoreFunction=function(t,e){var n,i,r,o;n=this,t=n.prepareSearch(t,e),r=t.tokens,i=t.options.fields,o=r.length;var s=function(t,e){var n,i;return t?(t=String(t||""),i=t.search(e.regex),-1===i?0:(n=e.string.length/t.length,0===i&&(n+=.5),n)):0},a=function(){var t=i.length;return t?1===t?function(t,e){return s(e[i[0]],t)}:function(e,n){for(var r=0,o=0;t>r;r++)o+=s(n[i[r]],e);return o/t}:function(){return 0}}();return o?1===o?function(t){return a(r[0],t)}:"and"===t.options.conjunction?function(t){for(var e,n=0,i=0;o>n;n++){if(e=a(r[n],t),0>=e)return 0;i+=e}return i/o}:function(t){for(var e=0,n=0;o>e;e++)n+=a(r[e],t);return n/o}:function(){return 0}},t.prototype.getSortFunction=function(t,n){var i,r,o,s,a,l,u,c,d,p,h;if(o=this,t=o.prepareSearch(t,n),h=!t.query&&n.sort_empty||n.sort,d=function(t,e){return"$score"===t?e.score:o.items[e.id][t]},a=[],h)for(i=0,r=h.length;r>i;i++)(t.query||"$score"!==h[i].field)&&a.push(h[i]);if(t.query){for(p=!0,i=0,r=a.length;r>i;i++)if("$score"===a[i].field){p=!1;break}p&&a.unshift({field:"$score",direction:"desc"})}else for(i=0,r=a.length;r>i;i++)if("$score"===a[i].field){a.splice(i,1);break}for(c=[],i=0,r=a.length;r>i;i++)c.push("desc"===a[i].direction?-1:1);return l=a.length,l?1===l?(s=a[0].field,u=c[0],function(t,n){return u*e(d(s,t),d(s,n))}):function(t,n){var i,r,o;for(i=0;l>i;i++)if(o=a[i].field,r=c[i]*e(d(o,t),d(o,n)))return r;return 0}:null},t.prototype.prepareSearch=function(t,e){if("object"==typeof t)return t;e=n({},e);var i=e.fields,r=e.sort,s=e.sort_empty;return i&&!o(i)&&(e.fields=[i]),r&&!o(r)&&(e.sort=[r]),s&&!o(s)&&(e.sort_empty=[s]),{options:e,query:String(t||"").toLowerCase(),tokens:this.tokenize(t),total:0,items:[]}},t.prototype.search=function(t,e){var n,i,r,o,s=this;return i=this.prepareSearch(t,e),e=i.options,t=i.query,o=e.score||s.getScoreFunction(i),t.length?s.iterator(s.items,function(t,r){n=o(t),(e.filter===!1||n>0)&&i.items.push({score:n,id:r})}):s.iterator(s.items,function(t,e){i.items.push({score:1,id:e})}),r=s.getSortFunction(i,e),r&&i.items.sort(r),i.total=i.items.length,"number"==typeof e.limit&&(i.items=i.items.slice(0,e.limit)),i};var e=function(t,e){return"number"==typeof t&&"number"==typeof e?t>e?1:e>t?-1:0:(t=String(t||"").toLowerCase(),e=String(e||"").toLowerCase(),t>e?1:e>t?-1:0)},n=function(t){var e,n,i,r;for(e=1,n=arguments.length;n>e;e++)if(r=arguments[e])for(i in r)r.hasOwnProperty(i)&&(t[i]=r[i]);return t},i=function(t){return(t+"").replace(/^\s+|\s+$|/g,"")},r=function(t){return(t+"").replace(/([.?*+^$[\]\\(){}|-])/g,"\\$1")},o=Array.isArray||$&&$.isArray||function(t){return"[object Array]"===Object.prototype.toString.call(t)},s={a:"[a\xc0\xc1\xc2\xc3\xc4\xc5\xe0\xe1\xe2\xe3\xe4\xe5\u0100\u0101]",c:"[c\xc7\xe7\u0107\u0106\u010d\u010c]",d:"[d\u0111\u0110\u010f\u010e]",e:"[e\xc8\xc9\xca\xcb\xe8\xe9\xea\xeb\u011b\u011a\u0112\u0113]",i:"[i\xcc\xcd\xce\xcf\xec\xed\xee\xef\u012a\u012b]",n:"[n\xd1\xf1\u0148\u0147]",o:"[o\xd2\xd3\xd4\xd5\xd5\xd6\xd8\xf2\xf3\xf4\xf5\xf6\xf8\u014c\u014d]",r:"[r\u0159\u0158]",s:"[s\u0160\u0161]",t:"[t\u0165\u0164]",u:"[u\xd9\xda\xdb\xdc\xf9\xfa\xfb\xfc\u016f\u016e\u016a\u016b]",y:"[y\u0178\xff\xfd\xdd]",z:"[z\u017d\u017e]"};
|
|
return t}),function(t,e){"function"==typeof define&&define.amd?define("microplugin",e):"object"==typeof exports?module.exports=e():t.MicroPlugin=e()}(this,function(){var t={};t.mixin=function(t){t.plugins={},t.prototype.initializePlugins=function(t){var n,i,r,o=this,s=[];if(o.plugins={names:[],settings:{},requested:{},loaded:{}},e.isArray(t))for(n=0,i=t.length;i>n;n++)"string"==typeof t[n]?s.push(t[n]):(o.plugins.settings[t[n].name]=t[n].options,s.push(t[n].name));else if(t)for(r in t)t.hasOwnProperty(r)&&(o.plugins.settings[r]=t[r],s.push(r));for(;s.length;)o.require(s.shift())},t.prototype.loadPlugin=function(e){var n=this,i=n.plugins,r=t.plugins[e];if(!t.plugins.hasOwnProperty(e))throw new Error('Unable to find "'+e+'" plugin');i.requested[e]=!0,i.loaded[e]=r.fn.apply(n,[n.plugins.settings[e]||{}]),i.names.push(e)},t.prototype.require=function(t){var e=this,n=e.plugins;if(!e.plugins.loaded.hasOwnProperty(t)){if(n.requested[t])throw new Error('Plugin has circular dependency ("'+t+'")');e.loadPlugin(t)}return n.loaded[t]},t.define=function(e,n){t.plugins[e]={name:e,fn:n}}};var e={isArray:Array.isArray||function(t){return"[object Array]"===Object.prototype.toString.call(t)}};return t}),function(t,e){"function"==typeof define&&define.amd?define("selectize",["jquery","sifter","microplugin"],e):"object"==typeof exports?module.exports=e(require("jquery"),require("sifter"),require("microplugin")):t.Selectize=e(t.jQuery,t.Sifter,t.MicroPlugin)}(this,function(t,e,n){"use strict";var i=function(t,e){if("string"!=typeof e||e.length){var n="string"==typeof e?new RegExp(e,"i"):e,i=function(t){var e=0;if(3===t.nodeType){var r=t.data.search(n);if(r>=0&&t.data.length>0){var o=t.data.match(n),s=document.createElement("span");s.className="highlight";var a=t.splitText(r),l=(a.splitText(o[0].length),a.cloneNode(!0));s.appendChild(l),a.parentNode.replaceChild(s,a),e=1}}else if(1===t.nodeType&&t.childNodes&&!/(script|style)/i.test(t.tagName))for(var u=0;u<t.childNodes.length;++u)u+=i(t.childNodes[u]);return e};return t.each(function(){i(this)})}},r=function(){};r.prototype={on:function(t,e){this._events=this._events||{},this._events[t]=this._events[t]||[],this._events[t].push(e)},off:function(t,e){var n=arguments.length;return 0===n?delete this._events:1===n?delete this._events[t]:(this._events=this._events||{},void(t in this._events!=!1&&this._events[t].splice(this._events[t].indexOf(e),1)))},trigger:function(t){if(this._events=this._events||{},t in this._events!=!1)for(var e=0;e<this._events[t].length;e++)this._events[t][e].apply(this,Array.prototype.slice.call(arguments,1))}},r.mixin=function(t){for(var e=["on","off","trigger"],n=0;n<e.length;n++)t.prototype[e[n]]=r.prototype[e[n]]};var o=/Mac/.test(navigator.userAgent),s=65,a=13,l=27,u=37,c=38,d=80,p=39,h=40,f=78,g=8,m=46,v=16,y=o?91:17,b=o?18:17,w=9,x=1,C=2,T=function(t){return"undefined"!=typeof t},S=function(t){return"undefined"==typeof t||null===t?null:"boolean"==typeof t?t?"1":"0":t+""},k=function(t){return(t+"").replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""")},E=function(t){return(t+"").replace(/\$/g,"$$$$")},$={};$.before=function(t,e,n){var i=t[e];t[e]=function(){return n.apply(t,arguments),i.apply(t,arguments)}},$.after=function(t,e,n){var i=t[e];t[e]=function(){var e=i.apply(t,arguments);return n.apply(t,arguments),e}};var _=function(e,n){if(!t.isArray(n))return n;var i,r,o={};for(i=0,r=n.length;r>i;i++)n[i].hasOwnProperty(e)&&(o[n[i][e]]=n[i]);return o},A=function(t){var e=!1;return function(){e||(e=!0,t.apply(this,arguments))}},N=function(t,e){var n;return function(){var i=this,r=arguments;window.clearTimeout(n),n=window.setTimeout(function(){t.apply(i,r)},e)}},D=function(t,e,n){var i,r=t.trigger,o={};t.trigger=function(){var n=arguments[0];return-1===e.indexOf(n)?r.apply(t,arguments):void(o[n]=arguments)},n.apply(t,[]),t.trigger=r;for(i in o)o.hasOwnProperty(i)&&r.apply(t,o[i])},O=function(t,e,n,i){t.on(e,n,function(e){for(var n=e.target;n&&n.parentNode!==t[0];)n=n.parentNode;return e.currentTarget=n,i.apply(this,[e])})},I=function(t){var e={};if("selectionStart"in t)e.start=t.selectionStart,e.length=t.selectionEnd-e.start;else if(document.selection){t.focus();var n=document.selection.createRange(),i=document.selection.createRange().text.length;n.moveStart("character",-t.value.length),e.start=n.text.length-i,e.length=i}return e},j=function(t,e,n){var i,r,o={};if(n)for(i=0,r=n.length;r>i;i++)o[n[i]]=t.css(n[i]);else o=t.css();e.css(o)},L=function(e,n){if(!e)return 0;var i=t("<test>").css({position:"absolute",top:-99999,left:-99999,width:"auto",padding:0,whiteSpace:"pre"}).text(e).appendTo("body");j(n,i,["letterSpacing","fontSize","fontFamily","fontWeight","textTransform"]);var r=i.width();return i.remove(),r},F=function(t){var e=null,n=function(n,i){var r,o,s,a,l,u,c,d;n=n||window.event||{},i=i||{},n.metaKey||n.altKey||(i.force||t.data("grow")!==!1)&&(r=t.val(),n.type&&"keydown"===n.type.toLowerCase()&&(o=n.keyCode,s=o>=97&&122>=o||o>=65&&90>=o||o>=48&&57>=o||32===o,o===m||o===g?(d=I(t[0]),d.length?r=r.substring(0,d.start)+r.substring(d.start+d.length):o===g&&d.start?r=r.substring(0,d.start-1)+r.substring(d.start+1):o===m&&"undefined"!=typeof d.start&&(r=r.substring(0,d.start)+r.substring(d.start+1))):s&&(u=n.shiftKey,c=String.fromCharCode(n.keyCode),c=u?c.toUpperCase():c.toLowerCase(),r+=c)),a=t.attr("placeholder"),!r&&a&&(r=a),l=L(r,t)+4,l!==e&&(e=l,t.width(l),t.triggerHandler("resize")))};t.on("keydown keyup update blur",n),n()},R=function(n,i){var r,o,s=this;o=n[0],o.selectize=s;var a=window.getComputedStyle&&window.getComputedStyle(o,null);r=a?a.getPropertyValue("direction"):o.currentStyle&&o.currentStyle.direction,r=r||n.parents("[dir]:first").attr("dir")||"",t.extend(s,{settings:i,$input:n,tagType:"select"===o.tagName.toLowerCase()?x:C,rtl:/rtl/i.test(r),eventNS:".selectize"+ ++R.count,highlightedValue:null,isOpen:!1,isDisabled:!1,isRequired:n.is("[required]"),isInvalid:!1,isLocked:!1,isFocused:!1,isInputHidden:!1,isSetup:!1,isShiftDown:!1,isCmdDown:!1,isCtrlDown:!1,ignoreFocus:!1,ignoreBlur:!1,ignoreHover:!1,hasOptions:!1,currentResults:null,lastValue:"",caretPos:0,loading:0,loadedSearches:{},$activeOption:null,$activeItems:[],optgroups:{},options:{},userOptions:{},items:[],renderCache:{},onSearchChange:null===i.loadThrottle?s.onSearchChange:N(s.onSearchChange,i.loadThrottle)}),s.sifter=new e(this.options,{diacritics:i.diacritics}),t.extend(s.options,_(i.valueField,i.options)),delete s.settings.options,t.extend(s.optgroups,_(i.optgroupValueField,i.optgroups)),delete s.settings.optgroups,s.settings.mode=s.settings.mode||(1===s.settings.maxItems?"single":"multi"),"boolean"!=typeof s.settings.hideSelected&&(s.settings.hideSelected="multi"===s.settings.mode),s.initializePlugins(s.settings.plugins),s.setupCallbacks(),s.setupTemplates(),s.setup()};return r.mixin(R),n.mixin(R),t.extend(R.prototype,{setup:function(){var e,n,i,r,s,a,l,u,c,d,p=this,h=p.settings,f=p.eventNS,g=t(window),m=t(document),w=p.$input;l=p.settings.mode,u=w.attr("tabindex")||"",c=w.attr("class")||"",e=t("<div>").addClass(h.wrapperClass).addClass(c).addClass(l),n=t("<div>").addClass(h.inputClass).addClass("items").appendTo(e),i=t('<input type="text" autocomplete="off" />').appendTo(n).attr("tabindex",u),a=t(h.dropdownParent||e),r=t("<div>").addClass(h.dropdownClass).addClass(l).hide().appendTo(a),s=t("<div>").addClass(h.dropdownContentClass).appendTo(r),p.settings.copyClassesToDropdown&&r.addClass(c),e.css({width:w[0].style.width}),p.plugins.names.length&&(d="plugin-"+p.plugins.names.join(" plugin-"),e.addClass(d),r.addClass(d)),(null===h.maxItems||h.maxItems>1)&&p.tagType===x&&w.attr("multiple","multiple"),p.settings.placeholder&&i.attr("placeholder",h.placeholder),w.attr("autocorrect")&&i.attr("autocorrect",w.attr("autocorrect")),w.attr("autocapitalize")&&i.attr("autocapitalize",w.attr("autocapitalize")),p.$wrapper=e,p.$control=n,p.$control_input=i,p.$dropdown=r,p.$dropdown_content=s,r.on("mouseenter","[data-selectable]",function(){return p.onOptionHover.apply(p,arguments)}),r.on("mousedown","[data-selectable]",function(){return p.onOptionSelect.apply(p,arguments)}),O(n,"mousedown","*:not(input)",function(){return p.onItemSelect.apply(p,arguments)}),F(i),n.on({mousedown:function(){return p.onMouseDown.apply(p,arguments)},click:function(){return p.onClick.apply(p,arguments)}}),i.on({mousedown:function(t){t.stopPropagation()},keydown:function(){return p.onKeyDown.apply(p,arguments)},keyup:function(){return p.onKeyUp.apply(p,arguments)},keypress:function(){return p.onKeyPress.apply(p,arguments)},resize:function(){p.positionDropdown.apply(p,[])},blur:function(){return p.onBlur.apply(p,arguments)},focus:function(){return p.ignoreBlur=!1,p.onFocus.apply(p,arguments)},paste:function(){return p.onPaste.apply(p,arguments)}}),m.on("keydown"+f,function(t){p.isCmdDown=t[o?"metaKey":"ctrlKey"],p.isCtrlDown=t[o?"altKey":"ctrlKey"],p.isShiftDown=t.shiftKey}),m.on("keyup"+f,function(t){t.keyCode===b&&(p.isCtrlDown=!1),t.keyCode===v&&(p.isShiftDown=!1),t.keyCode===y&&(p.isCmdDown=!1)}),m.on("mousedown"+f,function(t){if(p.isFocused){if(t.target===p.$dropdown[0]||t.target.parentNode===p.$dropdown[0])return!1;p.$control.has(t.target).length||t.target===p.$control[0]||p.blur()}}),g.on(["scroll"+f,"resize"+f].join(" "),function(){p.isOpen&&p.positionDropdown.apply(p,arguments)}),g.on("mousemove"+f,function(){p.ignoreHover=!1}),this.revertSettings={$children:w.children().detach(),tabindex:w.attr("tabindex")},w.attr("tabindex",-1).hide().after(p.$wrapper),t.isArray(h.items)&&(p.setValue(h.items),delete h.items),w[0].validity&&w.on("invalid"+f,function(t){t.preventDefault(),p.isInvalid=!0,p.refreshState()}),p.updateOriginalInput(),p.refreshItems(),p.refreshState(),p.updatePlaceholder(),p.isSetup=!0,w.is(":disabled")&&p.disable(),p.on("change",this.onChange),w.data("selectize",p),w.addClass("selectized"),p.trigger("initialize"),h.preload===!0&&p.onSearchChange("")},setupTemplates:function(){var e=this,n=e.settings.labelField,i=e.settings.optgroupLabelField,r={optgroup:function(t){return'<div class="optgroup">'+t.html+"</div>"},optgroup_header:function(t,e){return'<div class="optgroup-header">'+e(t[i])+"</div>"},option:function(t,e){return'<div class="option">'+e(t[n])+"</div>"},item:function(t,e){return'<div class="item">'+e(t[n])+"</div>"},option_create:function(t,e){return'<div class="create">Add <strong>'+e(t.input)+"</strong>…</div>"}};e.settings.render=t.extend({},r,e.settings.render)},setupCallbacks:function(){var t,e,n={initialize:"onInitialize",change:"onChange",item_add:"onItemAdd",item_remove:"onItemRemove",clear:"onClear",option_add:"onOptionAdd",option_remove:"onOptionRemove",option_clear:"onOptionClear",dropdown_open:"onDropdownOpen",dropdown_close:"onDropdownClose",type:"onType",load:"onLoad"};for(t in n)n.hasOwnProperty(t)&&(e=this.settings[n[t]],e&&this.on(t,e))},onClick:function(t){var e=this;e.isFocused||(e.focus(),t.preventDefault())},onMouseDown:function(e){{var n=this,i=e.isDefaultPrevented();t(e.target)}if(n.isFocused){if(e.target!==n.$control_input[0])return"single"===n.settings.mode?n.isOpen?n.close():n.open():i||n.setActiveItem(null),!1}else i||window.setTimeout(function(){n.focus()},0)},onChange:function(){this.$input.trigger("change")},onPaste:function(t){var e=this;(e.isFull()||e.isInputHidden||e.isLocked)&&t.preventDefault()},onKeyPress:function(t){if(this.isLocked)return t&&t.preventDefault();var e=String.fromCharCode(t.keyCode||t.which);return this.settings.create&&e===this.settings.delimiter?(this.createItem(),t.preventDefault(),!1):void 0},onKeyDown:function(t){var e=(t.target===this.$control_input[0],this);if(e.isLocked)return void(t.keyCode!==w&&t.preventDefault());switch(t.keyCode){case s:if(e.isCmdDown)return void e.selectAll();break;case l:return void e.close();case f:if(!t.ctrlKey||t.altKey)break;case h:if(!e.isOpen&&e.hasOptions)e.open();else if(e.$activeOption){e.ignoreHover=!0;var n=e.getAdjacentOption(e.$activeOption,1);n.length&&e.setActiveOption(n,!0,!0)}return void t.preventDefault();case d:if(!t.ctrlKey||t.altKey)break;case c:if(e.$activeOption){e.ignoreHover=!0;var i=e.getAdjacentOption(e.$activeOption,-1);i.length&&e.setActiveOption(i,!0,!0)}return void t.preventDefault();case a:return e.isOpen&&e.$activeOption&&e.onOptionSelect({currentTarget:e.$activeOption}),void t.preventDefault();case u:return void e.advanceSelection(-1,t);case p:return void e.advanceSelection(1,t);case w:return e.settings.selectOnTab&&e.isOpen&&e.$activeOption&&(e.onOptionSelect({currentTarget:e.$activeOption}),t.preventDefault()),void(e.settings.create&&e.createItem()&&t.preventDefault());case g:case m:return void e.deleteSelection(t)}return!e.isFull()&&!e.isInputHidden||(o?t.metaKey:t.ctrlKey)?void 0:void t.preventDefault()},onKeyUp:function(t){var e=this;if(e.isLocked)return t&&t.preventDefault();var n=e.$control_input.val()||"";e.lastValue!==n&&(e.lastValue=n,e.onSearchChange(n),e.refreshOptions(),e.trigger("type",n))},onSearchChange:function(t){var e=this,n=e.settings.load;n&&(e.loadedSearches.hasOwnProperty(t)||(e.loadedSearches[t]=!0,e.load(function(i){n.apply(e,[t,i])})))},onFocus:function(t){var e=this;return e.isFocused=!0,e.isDisabled?(e.blur(),t&&t.preventDefault(),!1):void(e.ignoreFocus||("focus"===e.settings.preload&&e.onSearchChange(""),e.$activeItems.length||(e.showInput(),e.setActiveItem(null),e.refreshOptions(!!e.settings.openOnFocus)),e.refreshState()))},onBlur:function(t){var e=this;if(e.isFocused=!1,!e.ignoreFocus){if(!e.ignoreBlur&&document.activeElement===e.$dropdown_content[0])return e.ignoreBlur=!0,void e.onFocus(t);e.settings.create&&e.settings.createOnBlur&&e.createItem(!1),e.close(),e.setTextboxValue(""),e.setActiveItem(null),e.setActiveOption(null),e.setCaret(e.items.length),e.refreshState()}},onOptionHover:function(t){this.ignoreHover||this.setActiveOption(t.currentTarget,!1)},onOptionSelect:function(e){var n,i,r=this;e.preventDefault&&(e.preventDefault(),e.stopPropagation()),i=t(e.currentTarget),i.hasClass("create")?r.createItem():(n=i.attr("data-value"),"undefined"!=typeof n&&(r.lastQuery=null,r.setTextboxValue(""),r.addItem(n),!r.settings.hideSelected&&e.type&&/mouse/.test(e.type)&&r.setActiveOption(r.getOption(n))))},onItemSelect:function(t){var e=this;e.isLocked||"multi"===e.settings.mode&&(t.preventDefault(),e.setActiveItem(t.currentTarget,t))},load:function(t){var e=this,n=e.$wrapper.addClass("loading");e.loading++,t.apply(e,[function(t){e.loading=Math.max(e.loading-1,0),t&&t.length&&(e.addOption(t),e.refreshOptions(e.isFocused&&!e.isInputHidden)),e.loading||n.removeClass("loading"),e.trigger("load",t)}])},setTextboxValue:function(t){var e=this.$control_input,n=e.val()!==t;n&&(e.val(t).triggerHandler("update"),this.lastValue=t)},getValue:function(){return this.tagType===x&&this.$input.attr("multiple")?this.items:this.items.join(this.settings.delimiter)},setValue:function(t){D(this,["change"],function(){this.clear(),this.addItems(t)})},setActiveItem:function(e,n){var i,r,o,s,a,l,u,c,d=this;if("single"!==d.settings.mode){if(e=t(e),!e.length)return t(d.$activeItems).removeClass("active"),d.$activeItems=[],void(d.isFocused&&d.showInput());if(i=n&&n.type.toLowerCase(),"mousedown"===i&&d.isShiftDown&&d.$activeItems.length){for(c=d.$control.children(".active:last"),s=Array.prototype.indexOf.apply(d.$control[0].childNodes,[c[0]]),a=Array.prototype.indexOf.apply(d.$control[0].childNodes,[e[0]]),s>a&&(u=s,s=a,a=u),r=s;a>=r;r++)l=d.$control[0].childNodes[r],-1===d.$activeItems.indexOf(l)&&(t(l).addClass("active"),d.$activeItems.push(l));n.preventDefault()}else"mousedown"===i&&d.isCtrlDown||"keydown"===i&&this.isShiftDown?e.hasClass("active")?(o=d.$activeItems.indexOf(e[0]),d.$activeItems.splice(o,1),e.removeClass("active")):d.$activeItems.push(e.addClass("active")[0]):(t(d.$activeItems).removeClass("active"),d.$activeItems=[e.addClass("active")[0]]);d.hideInput(),this.isFocused||d.focus()}},setActiveOption:function(e,n,i){var r,o,s,a,l,u=this;u.$activeOption&&u.$activeOption.removeClass("active"),u.$activeOption=null,e=t(e),e.length&&(u.$activeOption=e.addClass("active"),(n||!T(n))&&(r=u.$dropdown_content.height(),o=u.$activeOption.outerHeight(!0),n=u.$dropdown_content.scrollTop()||0,s=u.$activeOption.offset().top-u.$dropdown_content.offset().top+n,a=s,l=s-r+o,s+o>r+n?u.$dropdown_content.stop().animate({scrollTop:l},i?u.settings.scrollDuration:0):n>s&&u.$dropdown_content.stop().animate({scrollTop:a},i?u.settings.scrollDuration:0)))},selectAll:function(){var t=this;"single"!==t.settings.mode&&(t.$activeItems=Array.prototype.slice.apply(t.$control.children(":not(input)").addClass("active")),t.$activeItems.length&&(t.hideInput(),t.close()),t.focus())},hideInput:function(){var t=this;t.setTextboxValue(""),t.$control_input.css({opacity:0,position:"absolute",left:t.rtl?1e4:-1e4}),t.isInputHidden=!0},showInput:function(){this.$control_input.css({opacity:1,position:"relative",left:0}),this.isInputHidden=!1},focus:function(){var t=this;t.isDisabled||(t.ignoreFocus=!0,t.$control_input[0].focus(),window.setTimeout(function(){t.ignoreFocus=!1,t.onFocus()},0))},blur:function(){this.$control_input.trigger("blur")},getScoreFunction:function(t){return this.sifter.getScoreFunction(t,this.getSearchOptions())},getSearchOptions:function(){var t=this.settings,e=t.sortField;return"string"==typeof e&&(e={field:e}),{fields:t.searchField,conjunction:t.searchConjunction,sort:e}},search:function(e){var n,i,r,o=this,s=o.settings,a=this.getSearchOptions();if(s.score&&(r=o.settings.score.apply(this,[e]),"function"!=typeof r))throw new Error('Selectize "score" setting must be a function that returns a function');if(e!==o.lastQuery?(o.lastQuery=e,i=o.sifter.search(e,t.extend(a,{score:r})),o.currentResults=i):i=t.extend(!0,{},o.currentResults),s.hideSelected)for(n=i.items.length-1;n>=0;n--)-1!==o.items.indexOf(S(i.items[n].id))&&i.items.splice(n,1);return i},refreshOptions:function(e){var n,r,o,s,a,l,u,c,d,p,h,f,g,m,v,y;"undefined"==typeof e&&(e=!0);var b=this,w=t.trim(b.$control_input.val()),x=b.search(w),C=b.$dropdown_content,T=b.$activeOption&&S(b.$activeOption.attr("data-value"));if(s=x.items.length,"number"==typeof b.settings.maxOptions&&(s=Math.min(s,b.settings.maxOptions)),a={},b.settings.optgroupOrder)for(l=b.settings.optgroupOrder,n=0;n<l.length;n++)a[l[n]]=[];else l=[];for(n=0;s>n;n++)for(u=b.options[x.items[n].id],c=b.render("option",u),d=u[b.settings.optgroupField]||"",p=t.isArray(d)?d:[d],r=0,o=p&&p.length;o>r;r++)d=p[r],b.optgroups.hasOwnProperty(d)||(d=""),a.hasOwnProperty(d)||(a[d]=[],l.push(d)),a[d].push(c);for(h=[],n=0,s=l.length;s>n;n++)d=l[n],b.optgroups.hasOwnProperty(d)&&a[d].length?(f=b.render("optgroup_header",b.optgroups[d])||"",f+=a[d].join(""),h.push(b.render("optgroup",t.extend({},b.optgroups[d],{html:f})))):h.push(a[d].join(""));if(C.html(h.join("")),b.settings.highlight&&x.query.length&&x.tokens.length)for(n=0,s=x.tokens.length;s>n;n++)i(C,x.tokens[n].regex);if(!b.settings.hideSelected)for(n=0,s=b.items.length;s>n;n++)b.getOption(b.items[n]).addClass("selected");g=b.canCreate(w),g&&(C.prepend(b.render("option_create",{input:w})),y=t(C[0].childNodes[0])),b.hasOptions=x.items.length>0||g,b.hasOptions?(x.items.length>0?(v=T&&b.getOption(T),v&&v.length?m=v:"single"===b.settings.mode&&b.items.length&&(m=b.getOption(b.items[0])),m&&m.length||(m=y&&!b.settings.addPrecedence?b.getAdjacentOption(y,1):C.find("[data-selectable]:first"))):m=y,b.setActiveOption(m),e&&!b.isOpen&&b.open()):(b.setActiveOption(null),e&&b.isOpen&&b.close())},addOption:function(e){var n,i,r,o=this;if(t.isArray(e))for(n=0,i=e.length;i>n;n++)o.addOption(e[n]);else r=S(e[o.settings.valueField]),"string"!=typeof r||o.options.hasOwnProperty(r)||(o.userOptions[r]=!0,o.options[r]=e,o.lastQuery=null,o.trigger("option_add",r,e))},addOptionGroup:function(t,e){this.optgroups[t]=e,this.trigger("optgroup_add",t,e)},updateOption:function(e,n){var i,r,o,s,a,l,u=this;if(e=S(e),o=S(n[u.settings.valueField]),null!==e&&u.options.hasOwnProperty(e)){if("string"!=typeof o)throw new Error("Value must be set in option data");o!==e&&(delete u.options[e],s=u.items.indexOf(e),-1!==s&&u.items.splice(s,1,o)),u.options[o]=n,a=u.renderCache.item,l=u.renderCache.option,a&&(delete a[e],delete a[o]),l&&(delete l[e],delete l[o]),-1!==u.items.indexOf(o)&&(i=u.getItem(e),r=t(u.render("item",n)),i.hasClass("active")&&r.addClass("active"),i.replaceWith(r)),u.lastQuery=null,u.isOpen&&u.refreshOptions(!1)}},removeOption:function(t){var e=this;t=S(t);var n=e.renderCache.item,i=e.renderCache.option;n&&delete n[t],i&&delete i[t],delete e.userOptions[t],delete e.options[t],e.lastQuery=null,e.trigger("option_remove",t),e.removeItem(t)},clearOptions:function(){var t=this;t.loadedSearches={},t.userOptions={},t.renderCache={},t.options=t.sifter.items={},t.lastQuery=null,t.trigger("option_clear"),t.clear()},getOption:function(t){return this.getElementWithValue(t,this.$dropdown_content.find("[data-selectable]"))},getAdjacentOption:function(e,n){var i=this.$dropdown.find("[data-selectable]"),r=i.index(e)+n;return r>=0&&r<i.length?i.eq(r):t()},getElementWithValue:function(e,n){if(e=S(e),"undefined"!=typeof e&&null!==e)for(var i=0,r=n.length;r>i;i++)if(n[i].getAttribute("data-value")===e)return t(n[i]);return t()},getItem:function(t){return this.getElementWithValue(t,this.$control.children())},addItems:function(e){for(var n=t.isArray(e)?e:[e],i=0,r=n.length;r>i;i++)this.isPending=r-1>i,this.addItem(n[i])},addItem:function(e){D(this,["change"],function(){var n,i,r,o,s,a=this,l=a.settings.mode;return e=S(e),-1!==a.items.indexOf(e)?void("single"===l&&a.close()):void(a.options.hasOwnProperty(e)&&("single"===l&&a.clear(),"multi"===l&&a.isFull()||(n=t(a.render("item",a.options[e])),s=a.isFull(),a.items.splice(a.caretPos,0,e),a.insertAtCaret(n),(!a.isPending||!s&&a.isFull())&&a.refreshState(),a.isSetup&&(r=a.$dropdown_content.find("[data-selectable]"),a.isPending||(i=a.getOption(e),o=a.getAdjacentOption(i,1).attr("data-value"),a.refreshOptions(a.isFocused&&"single"!==l),o&&a.setActiveOption(a.getOption(o))),!r.length||a.isFull()?a.close():a.positionDropdown(),a.updatePlaceholder(),a.trigger("item_add",e,n),a.updateOriginalInput()))))})},removeItem:function(t){var e,n,i,r=this;e="object"==typeof t?t:r.getItem(t),t=S(e.attr("data-value")),n=r.items.indexOf(t),-1!==n&&(e.remove(),e.hasClass("active")&&(i=r.$activeItems.indexOf(e[0]),r.$activeItems.splice(i,1)),r.items.splice(n,1),r.lastQuery=null,!r.settings.persist&&r.userOptions.hasOwnProperty(t)&&r.removeOption(t),n<r.caretPos&&r.setCaret(r.caretPos-1),r.refreshState(),r.updatePlaceholder(),r.updateOriginalInput(),r.positionDropdown(),r.trigger("item_remove",t))},createItem:function(e){var n=this,i=t.trim(n.$control_input.val()||""),r=n.caretPos;if(!n.canCreate(i))return!1;n.lock(),"undefined"==typeof e&&(e=!0);var o="function"==typeof n.settings.create?this.settings.create:function(t){var e={};return e[n.settings.labelField]=t,e[n.settings.valueField]=t,e},s=A(function(t){if(n.unlock(),t&&"object"==typeof t){var i=S(t[n.settings.valueField]);"string"==typeof i&&(n.setTextboxValue(""),n.addOption(t),n.setCaret(r),n.addItem(i),n.refreshOptions(e&&"single"!==n.settings.mode))}}),a=o.apply(this,[i,s]);return"undefined"!=typeof a&&s(a),!0},refreshItems:function(){if(this.lastQuery=null,this.isSetup)for(var t=0;t<this.items.length;t++)this.addItem(this.items);this.refreshState(),this.updateOriginalInput()},refreshState:function(){var t,e=this;e.isRequired&&(e.items.length&&(e.isInvalid=!1),e.$control_input.prop("required",t)),e.refreshClasses()},refreshClasses:function(){var e=this,n=e.isFull(),i=e.isLocked;e.$wrapper.toggleClass("rtl",e.rtl),e.$control.toggleClass("focus",e.isFocused).toggleClass("disabled",e.isDisabled).toggleClass("required",e.isRequired).toggleClass("invalid",e.isInvalid).toggleClass("locked",i).toggleClass("full",n).toggleClass("not-full",!n).toggleClass("input-active",e.isFocused&&!e.isInputHidden).toggleClass("dropdown-active",e.isOpen).toggleClass("has-options",!t.isEmptyObject(e.options)).toggleClass("has-items",e.items.length>0),e.$control_input.data("grow",!n&&!i)},isFull:function(){return null!==this.settings.maxItems&&this.items.length>=this.settings.maxItems},updateOriginalInput:function(){var t,e,n,i=this;if(i.tagType===x){for(n=[],t=0,e=i.items.length;e>t;t++)n.push('<option value="'+k(i.items[t])+'" selected="selected"></option>');n.length||this.$input.attr("multiple")||n.push('<option value="" selected="selected"></option>'),i.$input.html(n.join(""))}else i.$input.val(i.getValue()),i.$input.attr("value",i.$input.val());i.isSetup&&i.trigger("change",i.$input.val())},updatePlaceholder:function(){if(this.settings.placeholder){var t=this.$control_input;this.items.length?t.removeAttr("placeholder"):t.attr("placeholder",this.settings.placeholder),t.triggerHandler("update",{force:!0})}},open:function(){var t=this;t.isLocked||t.isOpen||"multi"===t.settings.mode&&t.isFull()||(t.focus(),t.isOpen=!0,t.refreshState(),t.$dropdown.css({visibility:"hidden",display:"block"}),t.positionDropdown(),t.$dropdown.css({visibility:"visible"}),t.trigger("dropdown_open",t.$dropdown))},close:function(){var t=this,e=t.isOpen;"single"===t.settings.mode&&t.items.length&&t.hideInput(),t.isOpen=!1,t.$dropdown.hide(),t.setActiveOption(null),t.refreshState(),e&&t.trigger("dropdown_close",t.$dropdown)},positionDropdown:function(){var t=this.$control,e="body"===this.settings.dropdownParent?t.offset():t.position();e.top+=t.outerHeight(!0),this.$dropdown.css({width:t.outerWidth(),top:e.top,left:e.left})},clear:function(){var t=this;t.items.length&&(t.$control.children(":not(input)").remove(),t.items=[],t.lastQuery=null,t.setCaret(0),t.setActiveItem(null),t.updatePlaceholder(),t.updateOriginalInput(),t.refreshState(),t.showInput(),t.trigger("clear"))},insertAtCaret:function(e){var n=Math.min(this.caretPos,this.items.length);0===n?this.$control.prepend(e):t(this.$control[0].childNodes[n]).before(e),this.setCaret(n+1)},deleteSelection:function(e){var n,i,r,o,s,a,l,u,c,d=this;if(r=e&&e.keyCode===g?-1:1,o=I(d.$control_input[0]),d.$activeOption&&!d.settings.hideSelected&&(l=d.getAdjacentOption(d.$activeOption,-1).attr("data-value")),s=[],d.$activeItems.length){for(c=d.$control.children(".active:"+(r>0?"last":"first")),a=d.$control.children(":not(input)").index(c),r>0&&a++,n=0,i=d.$activeItems.length;i>n;n++)s.push(t(d.$activeItems[n]).attr("data-value"));e&&(e.preventDefault(),e.stopPropagation())}else(d.isFocused||"single"===d.settings.mode)&&d.items.length&&(0>r&&0===o.start&&0===o.length?s.push(d.items[d.caretPos-1]):r>0&&o.start===d.$control_input.val().length&&s.push(d.items[d.caretPos]));if(!s.length||"function"==typeof d.settings.onDelete&&d.settings.onDelete.apply(d,[s])===!1)return!1;for("undefined"!=typeof a&&d.setCaret(a);s.length;)d.removeItem(s.pop());return d.showInput(),d.positionDropdown(),d.refreshOptions(!0),l&&(u=d.getOption(l),u.length&&d.setActiveOption(u)),!0},advanceSelection:function(t,e){var n,i,r,o,s,a,l=this;0!==t&&(l.rtl&&(t*=-1),n=t>0?"last":"first",i=I(l.$control_input[0]),l.isFocused&&!l.isInputHidden?(o=l.$control_input.val().length,s=0>t?0===i.start&&0===i.length:i.start===o,s&&!o&&l.advanceCaret(t,e)):(a=l.$control.children(".active:"+n),a.length&&(r=l.$control.children(":not(input)").index(a),l.setActiveItem(null),l.setCaret(t>0?r+1:r))))},advanceCaret:function(t,e){var n,i,r=this;0!==t&&(n=t>0?"next":"prev",r.isShiftDown?(i=r.$control_input[n](),i.length&&(r.hideInput(),r.setActiveItem(i),e&&e.preventDefault())):r.setCaret(r.caretPos+t))},setCaret:function(e){var n=this;if(e="single"===n.settings.mode?n.items.length:Math.max(0,Math.min(n.items.length,e)),!n.isPending){var i,r,o,s;for(o=n.$control.children(":not(input)"),i=0,r=o.length;r>i;i++)s=t(o[i]).detach(),e>i?n.$control_input.before(s):n.$control.append(s)}n.caretPos=e},lock:function(){this.close(),this.isLocked=!0,this.refreshState()},unlock:function(){this.isLocked=!1,this.refreshState()},disable:function(){var t=this;t.$input.prop("disabled",!0),t.isDisabled=!0,t.lock()},enable:function(){var t=this;t.$input.prop("disabled",!1),t.isDisabled=!1,t.unlock()},destroy:function(){var e=this,n=e.eventNS,i=e.revertSettings;e.trigger("destroy"),e.off(),e.$wrapper.remove(),e.$dropdown.remove(),e.$input.html("").append(i.$children).removeAttr("tabindex").removeClass("selectized").attr({tabindex:i.tabindex}).show(),e.$control_input.removeData("grow"),e.$input.removeData("selectize"),t(window).off(n),t(document).off(n),t(document.body).off(n),delete e.$input[0].selectize},render:function(t,e){var n,i,r="",o=!1,s=this,a=/^[\t ]*<([a-z][a-z0-9\-_]*(?:\:[a-z][a-z0-9\-_]*)?)/i;return("option"===t||"item"===t)&&(n=S(e[s.settings.valueField]),o=!!n),o&&(T(s.renderCache[t])||(s.renderCache[t]={}),s.renderCache[t].hasOwnProperty(n))?s.renderCache[t][n]:(r=s.settings.render[t].apply(this,[e,k]),("option"===t||"option_create"===t)&&(r=r.replace(a,"<$1 data-selectable")),"optgroup"===t&&(i=e[s.settings.optgroupValueField]||"",r=r.replace(a,'<$1 data-group="'+E(k(i))+'"')),("option"===t||"item"===t)&&(r=r.replace(a,'<$1 data-value="'+E(k(n||""))+'"')),o&&(s.renderCache[t][n]=r),r)},clearCache:function(t){var e=this;"undefined"==typeof t?e.renderCache={}:delete e.renderCache[t]},canCreate:function(t){var e=this;if(!e.settings.create)return!1;var n=e.settings.createFilter;return!(!t.length||"function"==typeof n&&!n.apply(e,[t])||"string"==typeof n&&!new RegExp(n).test(t)||n instanceof RegExp&&!n.test(t))}}),R.count=0,R.defaults={plugins:[],delimiter:",",persist:!0,diacritics:!0,create:!1,createOnBlur:!1,createFilter:null,highlight:!0,openOnFocus:!0,maxOptions:1e3,maxItems:null,hideSelected:null,addPrecedence:!1,selectOnTab:!1,preload:!1,allowEmptyOption:!1,scrollDuration:60,loadThrottle:300,dataAttr:"data-data",optgroupField:"optgroup",valueField:"value",labelField:"text",optgroupLabelField:"label",optgroupValueField:"value",optgroupOrder:null,sortField:"$order",searchField:["text"],searchConjunction:"and",mode:null,wrapperClass:"selectize-control",inputClass:"selectize-input",dropdownClass:"selectize-dropdown",dropdownContentClass:"selectize-dropdown-content",dropdownParent:null,copyClassesToDropdown:!0,render:{}},t.fn.selectize=function(e){var n=t.fn.selectize.defaults,i=t.extend({},n,e),r=i.dataAttr,o=i.labelField,s=i.valueField,a=i.optgroupField,l=i.optgroupLabelField,u=i.optgroupValueField,c=function(e,n){var r,a,l,u,c=t.trim(e.val()||"");if(i.allowEmptyOption||c.length){for(l=c.split(i.delimiter),r=0,a=l.length;a>r;r++)u={},u[o]=l[r],u[s]=l[r],n.options[l[r]]=u;n.items=l}},d=function(e,n){var c,d,p,h,f=0,g=n.options,m=function(t){var e=r&&t.attr(r);return"string"==typeof e&&e.length?JSON.parse(e):null},v=function(e,r){var l,u;if(e=t(e),l=e.attr("value")||"",l.length||i.allowEmptyOption){if(g.hasOwnProperty(l))return void(r&&(g[l].optgroup?t.isArray(g[l].optgroup)?g[l].optgroup.push(r):g[l].optgroup=[g[l].optgroup,r]:g[l].optgroup=r));u=m(e)||{},u[o]=u[o]||e.text(),u[s]=u[s]||l,u[a]=u[a]||r,u.$order=++f,g[l]=u,e.is(":selected")&&n.items.push(l)}},y=function(e){var i,r,o,s,a;for(e=t(e),o=e.attr("label"),o&&(s=m(e)||{},s[l]=o,s[u]=o,n.optgroups[o]=s),a=t("option",e),i=0,r=a.length;r>i;i++)v(a[i],o)};for(n.maxItems=e.attr("multiple")?null:1,h=e.children(),c=0,d=h.length;d>c;c++)p=h[c].tagName.toLowerCase(),"optgroup"===p?y(h[c]):"option"===p&&v(h[c])};return this.each(function(){if(!this.selectize){var r,o=t(this),s=this.tagName.toLowerCase(),a=o.attr("placeholder")||o.attr("data-placeholder");a||i.allowEmptyOption||(a=o.children('option[value=""]').text());var l={placeholder:a,options:{},optgroups:{},items:[]};"select"===s?d(o,l):c(o,l),r=new R(o,t.extend(!0,{},n,l,e))}})},t.fn.selectize.defaults=R.defaults,R.define("drag_drop",function(){if(!t.fn.sortable)throw new Error('The "drag_drop" plugin requires jQuery UI "sortable".');if("multi"===this.settings.mode){var e=this;e.lock=function(){var t=e.lock;return function(){var n=e.$control.data("sortable");return n&&n.disable(),t.apply(e,arguments)}}(),e.unlock=function(){var t=e.unlock;return function(){var n=e.$control.data("sortable");return n&&n.enable(),t.apply(e,arguments)}}(),e.setup=function(){var n=e.setup;return function(){n.apply(this,arguments);var i=e.$control.sortable({items:"[data-value]",forcePlaceholderSize:!0,disabled:e.isLocked,start:function(t,e){e.placeholder.css("width",e.helper.css("width")),i.css({overflow:"visible"})},stop:function(){i.css({overflow:"hidden"});var n=e.$activeItems?e.$activeItems.slice():null,r=[];i.children("[data-value]").each(function(){r.push(t(this).attr("data-value"))}),e.setValue(r),e.setActiveItem(n)}})}}()}}),R.define("dropdown_header",function(e){var n=this;
|
|
e=t.extend({title:"Untitled",headerClass:"selectize-dropdown-header",titleRowClass:"selectize-dropdown-header-title",labelClass:"selectize-dropdown-header-label",closeClass:"selectize-dropdown-header-close",html:function(t){return'<div class="'+t.headerClass+'"><div class="'+t.titleRowClass+'"><span class="'+t.labelClass+'">'+t.title+'</span><a href="javascript:void(0)" class="'+t.closeClass+'">×</a></div></div>'}},e),n.setup=function(){var i=n.setup;return function(){i.apply(n,arguments),n.$dropdown_header=t(e.html(e)),n.$dropdown.prepend(n.$dropdown_header)}}()}),R.define("optgroup_columns",function(e){var n=this;e=t.extend({equalizeWidth:!0,equalizeHeight:!0},e),this.getAdjacentOption=function(e,n){var i=e.closest("[data-group]").find("[data-selectable]"),r=i.index(e)+n;return r>=0&&r<i.length?i.eq(r):t()},this.onKeyDown=function(){var t=n.onKeyDown;return function(e){var i,r,o,s;return!this.isOpen||e.keyCode!==u&&e.keyCode!==p?t.apply(this,arguments):(n.ignoreHover=!0,s=this.$activeOption.closest("[data-group]"),i=s.find("[data-selectable]").index(this.$activeOption),s=e.keyCode===u?s.prev("[data-group]"):s.next("[data-group]"),o=s.find("[data-selectable]"),r=o.eq(Math.min(o.length-1,i)),void(r.length&&this.setActiveOption(r)))}}();var i=function(){var t,e=i.width,n=document;return"undefined"==typeof e&&(t=n.createElement("div"),t.innerHTML='<div style="width:50px;height:50px;position:absolute;left:-50px;top:-50px;overflow:auto;"><div style="width:1px;height:100px;"></div></div>',t=t.firstChild,n.body.appendChild(t),e=i.width=t.offsetWidth-t.clientWidth,n.body.removeChild(t)),e},r=function(){var r,o,s,a,l,u,c;if(c=t("[data-group]",n.$dropdown_content),o=c.length,o&&n.$dropdown_content.width()){if(e.equalizeHeight){for(s=0,r=0;o>r;r++)s=Math.max(s,c.eq(r).height());c.css({height:s})}e.equalizeWidth&&(u=n.$dropdown_content.innerWidth()-i(),a=Math.round(u/o),c.css({width:a}),o>1&&(l=u-a*(o-1),c.eq(o-1).css({width:l})))}};(e.equalizeHeight||e.equalizeWidth)&&($.after(this,"positionDropdown",r),$.after(this,"refreshOptions",r))}),R.define("remove_button",function(e){if("single"!==this.settings.mode){e=t.extend({label:"×",title:"Remove",className:"remove",append:!0},e);var n=this,i='<a href="javascript:void(0)" class="'+e.className+'" tabindex="-1" title="'+k(e.title)+'">'+e.label+"</a>",r=function(t,e){var n=t.search(/(<\/[^>]+>\s*)$/);return t.substring(0,n)+e+t.substring(n)};this.setup=function(){var o=n.setup;return function(){if(e.append){var s=n.settings.render.item;n.settings.render.item=function(){return r(s.apply(this,arguments),i)}}o.apply(this,arguments),this.$control.on("click","."+e.className,function(e){if(e.preventDefault(),!n.isLocked){var i=t(e.currentTarget).parent();n.setActiveItem(i),n.deleteSelection()&&n.setCaret(n.items.length)}})}}()}}),R.define("restore_on_backspace",function(t){var e=this;t.text=t.text||function(t){return t[this.settings.labelField]},this.onKeyDown=function(){var n=e.onKeyDown;return function(e){var i,r;return e.keyCode===g&&""===this.$control_input.val()&&!this.$activeItems.length&&(i=this.caretPos-1,i>=0&&i<this.items.length)?(r=this.options[this.items[i]],this.deleteSelection(e)&&(this.setTextboxValue(t.text.apply(this,[r])),this.refreshOptions(!0)),void e.preventDefault()):n.apply(this,arguments)}}()}),R}),function(){var t;t=function(){return $(".selectize").selectize({allowEmptyOption:!0})},$(document).ready(t),$(document).on("page:load",t)}.call(this),function(){NProgress.configure({showSpinner:!1})}.call(this); |