").append(rt.parseHTML(t)).find(i):t)}).complete(n&&function(t,e){a.each(n,r||[t.responseText,e,t])}),this},rt.each(["ajaxStart","ajaxStop","ajaxComplete","ajaxError","ajaxSuccess","ajaxSend"],function(t,e){rt.fn[e]=function(t){return this.on(e,t)}}),rt.expr.filters.animated=function(t){return rt.grep(rt.timers,function(e){return t===e.elem}).length};var rn=t.document.documentElement;rt.offset={setOffset:function(t,e,n){var i,r,o,a,s,l,u,c=rt.css(t,"position"),d=rt(t),p={};"static"===c&&(t.style.position="relative"),s=d.offset(),o=rt.css(t,"top"),l=rt.css(t,"left"),u=("absolute"===c||"fixed"===c)&&rt.inArray("auto",[o,l])>-1,u?(i=d.position(),a=i.top,r=i.left):(a=parseFloat(o)||0,r=parseFloat(l)||0),rt.isFunction(e)&&(e=e.call(t,n,s)),null!=e.top&&(p.top=e.top-s.top+a),null!=e.left&&(p.left=e.left-s.left+r),"using"in e?e.using.call(t,p):d.css(p)}},rt.fn.extend({offset:function(t){if(arguments.length)return void 0===t?this:this.each(function(e){rt.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,rt.contains(e,r)?(typeof r.getBoundingClientRect!==Et&&(i=r.getBoundingClientRect()),n=Q(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"===rt.css(i,"position")?e=i.getBoundingClientRect():(t=this.offsetParent(),e=this.offset(),rt.nodeName(t[0],"html")||(n=t.offset()),n.top+=rt.css(t[0],"borderTopWidth",!0),n.left+=rt.css(t[0],"borderLeftWidth",!0)),{top:e.top-n.top-rt.css(i,"marginTop",!0),left:e.left-n.left-rt.css(i,"marginLeft",!0)}}},offsetParent:function(){return this.map(function(){for(var t=this.offsetParent||rn;t&&!rt.nodeName(t,"html")&&"static"===rt.css(t,"position");)t=t.offsetParent;return t||rn})}}),rt.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},function(t,e){var n=/Y/.test(e);rt.fn[t]=function(i){return At(this,function(t,i,r){var o=Q(t);return void 0===r?o?e in o?o[e]:o.document.documentElement[i]:t[i]:void(o?o.scrollTo(n?rt(o).scrollLeft():r,n?r:rt(o).scrollTop()):t[i]=r)},t,i,arguments.length,null)}}),rt.each(["top","left"],function(t,e){rt.cssHooks[e]=S(nt.pixelPosition,function(t,n){return n?(n=ee(t,e),ie.test(n)?rt(t).position()[e]+"px":n):void 0})}),rt.each({Height:"height",Width:"width"},function(t,e){rt.each({padding:"inner"+t,content:e,"":"outer"+t},function(n,i){rt.fn[i]=function(i,r){var o=arguments.length&&(n||"boolean"!=typeof i),a=n||(i===!0||r===!0?"margin":"border");return At(this,function(e,n,i){var r;return rt.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?rt.css(e,n,a):rt.style(e,n,i,a)},e,o?i:void 0,o,null)}})}),rt.fn.size=function(){return this.length},rt.fn.andSelf=rt.fn.addBack,"function"==typeof define&&define.amd&&define("jquery",[],function(){return rt});var on=t.jQuery,an=t.$;return rt.noConflict=function(e){return t.$===rt&&(t.$=an),e&&t.jQuery===rt&&(t.jQuery=on),rt},typeof e===Et&&(t.jQuery=t.$=rt),rt}),function(t,e){"use strict";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]:not([disabled])",linkDisableSelector:"a[data-disable-with], a[data-disable]",buttonDisableSelector:"button[data-remote][data-disable-with], button[data-remote][data-disable]",csrfToken:function(){return t("meta[name=csrf-token]").attr("content")},csrfParam:function(){return t("meta[name=csrf-param]").attr("content")},CSRFProtection:function(t){var e=n.csrfToken();e&&t.setRequestHeader("X-CSRF-Token",e)},refreshCSRFTokens:function(){t('form input[name="'+n.csrfParam()+'"]').val(n.csrfToken())},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[0].href},isRemote:function(t){return t.data("remote")!==e&&t.data("remote")!==!1},handleRemote:function(i){var r,o,a,s,l,u;if(n.fire(i,"ajax:before")){if(s=i.data("with-credentials")||null,l=i.data("type")||t.ajaxSettings&&t.ajaxSettings.dataType,i.is("form")){r=i.attr("method"),o=i.attr("action"),a=i.serializeArray();var c=i.data("ujs:submit-button");c&&(a.push(c),i.data("ujs:submit-button",null))}else i.is(n.inputChangeSelector)?(r=i.data("method"),o=i.data("url"),a=i.serialize(),i.data("params")&&(a=a+"&"+i.data("params"))):i.is(n.buttonClickSelector)?(r=i.data("method")||"get",o=i.data("url"),a=i.serialize(),i.data("params")&&(a=a+"&"+i.data("params"))):(r=i.data("method"),o=n.href(i),a=i.data("params")||null);return u={type:r||"GET",data:a,dataType:l,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:n.isCrossDomain(o)},s&&(u.xhrFields={withCredentials:s}),o&&(u.url=o),n.ajax(u)}return!1},isCrossDomain:function(t){var e=document.createElement("a");e.href=location.href;var n=document.createElement("a");try{return n.href=t,n.href=n.href,!((!n.protocol||":"===n.protocol)&&!n.host||e.protocol+"//"+e.host==n.protocol+"//"+n.host)}catch(i){return!0}},handleMethod:function(i){var r=n.href(i),o=i.data("method"),a=i.attr("target"),s=n.csrfToken(),l=n.csrfParam(),u=t('
'),c='
';l===e||s===e||n.isCrossDomain(r)||(c+='
'),a&&u.attr("target",a),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";"undefined"!=typeof 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;if(!i)return!0;if(n.fire(t,"confirm")){try{r=n.confirm(i)}catch(o){(console.error||console.log).call(console,o.stack||o)}e=n.fire(t,"confirm:complete",[r])}return r&&e},blankInputs:function(e,n,i){var r,o,a=t(),s=n||"input,textarea",l=e.find(s);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;a=a.add(r)}}),a.length?a:!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(e){var i=t(this),r=i.data("method"),o=i.data("params"),a=e.metaKey||e.ctrlKey;if(!n.allowAction(i))return n.stopEverything(e);if(!a&&i.is(n.linkDisableSelector)&&n.disableElement(i),n.isRemote(i)){if(a&&(!r||"GET"===r)&&!o)return!0;var s=n.handleRemote(i);return s===!1?n.enableElement(i):s.fail(function(){n.enableElement(i)}),!1}return r?(n.handleMethod(i),!1):void 0}),i.delegate(n.buttonClickSelector,"click.rails",function(e){var i=t(this);if(!n.allowAction(i)||!n.isRemote(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.isRemote(i)?(n.handleRemote(i),!1):n.stopEverything(e)}),i.delegate(n.formSubmitSelector,"submit.rails",function(i){var r,o,a=t(this),s=n.isRemote(a);if(!n.allowAction(a))return n.stopEverything(i);if(a.attr("novalidate")===e&&(r=n.blankInputs(a,n.requiredInputSelector,!1),r&&n.fire(a,"ajax:aborted:required",[r])))return n.stopEverything(i);if(s){if(o=n.nonBlankInputs(a,n.fileInputSelector)){setTimeout(function(){n.disableFormElements(a)},13);var l=n.fire(a,"ajax:aborted:file",[o]);return l||setTimeout(function(){n.enableFormElements(a)},13),l}return n.handleRemote(a),!1}setTimeout(function(){n.disableFormElements(a)},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,a,s,l,u,c,d,p,f,h,m,g,v,y,b,x,w,T,E,C,k,S,N,$,A,D,_,j,L,O,H,R,I,F,q,M,P,B,W,z,U,X,Q,V,K,G,Y,J,Z,tt,et,nt=[].indexOf||function(t){for(var e=0,n=this.length;n>e;e++)if(e in this&&this[e]===t)return e;return-1},it=function(t,e){function n(){this.constructor=t}for(var i in e)rt.call(e,i)&&(t[i]=e[i]);return n.prototype=e.prototype,t.prototype=new n,t.__super__=e.prototype,t},rt={}.hasOwnProperty,ot=[].slice,at=function(t,e){return function(){return t.apply(e,arguments)}};L={},p=10,Y=!1,F=null,y=null,_=null,P=null,et=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"},E=function(t){var e;return t=new n(t),X(),d(),null!=F&&F.start(),Y&&(e=J(t.absolute))?(C(e),k(t,null,!1)):k(t,K)},J=function(t){var e;return e=L[t],e&&!e.transitionCacheDisabled?e:void 0},x=function(t){return null==t&&(t=!0),Y=t},b=function(t){return null==t&&(t=!0),u?t?null!=F?F:F=new o("html"):(null!=F&&F.uninstall(),F=null):void 0},k=function(t,e,n){return null==n&&(n=!0),Z(i.FETCH,{url:t.absolute}),null!=et&&et.abort(),et=new XMLHttpRequest,et.open("GET",t.withoutHashForIE10compatibility(),!0),et.setRequestHeader("Accept","text/html, application/xhtml+xml, application/xml"),et.setRequestHeader("X-XHR-Referer",P),et.onload=function(){var n;return Z(i.RECEIVE,{url:t.absolute}),(n=I())?(B(t),W(),f.apply(null,T(n)),j(),"function"==typeof e&&e(),Z(i.LOAD)):document.location.href=v()||t.absolute},F&&n&&(et.onprogress=function(t){return function(t){var e;return e=t.lengthComputable?t.loaded/t.total*100:F.value+(100-F.value)/10,F.advanceTo(e)}}(this)),et.onloadend=function(){return et=null},et.onerror=function(){return document.location.href=t.absolute},et.send()},C=function(t){return null!=et&&et.abort(),f(t.title,t.body),q(t),Z(i.RESTORE)},d=function(){var t;return t=new n(y.url),L[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]")},m(p)},H=function(t){return null==t&&(t=p),/^[\d]+$/.test(t)?p=parseInt(t):void 0},m=function(t){var e,n,r,o,a,s;for(a=Object.keys(L),e=a.map(function(t){return L[t].cachedAt}).sort(function(t,e){return e-t}),s=[],n=0,o=a.length;o>n;n++)r=a[n],L[r].cachedAt<=e[t]&&(Z(i.EXPIRE,L[r]),s.push(delete L[r]));return s},f=function(e,n,r,o){return Z(i.BEFORE_UNLOAD),document.title=e,document.documentElement.replaceChild(n,document.body),null!=r&&t.update(r),G(),o&&w(),y=window.history.state,null!=F&&F.done(),Z(i.CHANGE),Z(i.UPDATE)},w=function(){var t,e,n,i,r,o,a,s,l,u,c,d;for(d=Array.prototype.slice.call(document.body.querySelectorAll('script:not([data-turbolinks-eval="false"])')),n=0,r=d.length;r>n;n++)if(c=d[n],""===(l=c.type)||"text/javascript"===l){for(e=document.createElement("script"),u=c.attributes,i=0,o=u.length;o>i;i++)t=u[i],e.setAttribute(t.name,t.value);c.hasAttribute("async")||(e.async=!1),e.appendChild(document.createTextNode(c.innerHTML)),s=c.parentNode,a=c.nextSibling,s.removeChild(c),s.insertBefore(e,a)}},Q=function(t){return t.innerHTML=t.innerHTML.replace(/
',trigger:"hover focus",title:"",delay:0,html:!1,container:!1,viewport:{selector:"body",padding:0}},n.prototype.init=function(e,n,i){if(this.enabled=!0,this.type=e,this.$element=t(n),this.options=this.getOptions(i),this.$viewport=this.options.viewport&&t(t.isFunction(this.options.viewport)?this.options.viewport.call(this,this.$element):this.options.viewport.selector||this.options.viewport),this.inState={click:!1,hover:!1,focus:!1},this.$element[0]instanceof document.constructor&&!this.options.selector)throw new Error("`selector` option must be specified when initializing "+this.type+" on the window.document object!");for(var r=this.options.trigger.split(" "),o=r.length;o--;){var a=r[o];if("click"==a)this.$element.on("click."+this.type,this.options.selector,t.proxy(this.toggle,this));else if("manual"!=a){var s="hover"==a?"mouseenter":"focusin",l="hover"==a?"mouseleave":"focusout";this.$element.on(s+"."+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=new this.constructor(e.currentTarget,this.getDelegateOptions()),t(e.currentTarget).data("bs."+this.type,n)),e instanceof t.Event&&(n.inState["focusin"==e.type?"focus":"hover"]=!0),n.tip().hasClass("in")||"in"==n.hoverState?void(n.hoverState="in"):(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.isInStateTrue=function(){for(var t in this.inState)if(this.inState[t])return!0;return!1},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)),e instanceof t.Event&&(n.inState["focusout"==e.type?"focus":"hover"]=!1),n.isInStateTrue()?void 0:(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(),a=this.getUID(this.type);this.setContent(),o.attr("id",a),this.$element.attr("aria-describedby",a),this.options.animation&&o.addClass("fade");var s="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(s);u&&(s=s.replace(l,"")||"top"),o.detach().css({top:0,left:0,display:"block"}).addClass(s).data("bs."+this.type,this),this.options.container?o.appendTo(this.options.container):o.insertAfter(this.$element),this.$element.trigger("inserted.bs."+this.type);var c=this.getPosition(),d=o[0].offsetWidth,p=o[0].offsetHeight;if(u){var f=s,h=this.getPosition(this.$viewport);s="bottom"==s&&c.bottom+p>h.bottom?"top":"top"==s&&c.top-p