function refreshAd(n){n.matches?SBMGlobal.run.reload({layout:"small",pagetype:window.sbmOptions.user.page,citationCount:window.sbmOptions.user.citationCount}):SBMGlobal.run.reload({layout:"large",pagetype:window.sbmOptions.user.page,citationCount:window.sbmOptions.user.citationCount})}function reloadWithEmptyPagetype(){SBMGlobal.run.reload({pagetype:"empty"})}(function(){var t=this,n;(function(){(function(){this.Turbolinks={supported:function(){return null!=window.history.pushState&&null!=window.requestAnimationFrame&&null!=window.addEventListener}(),visit:function(t,i){return n.controller.visit(t,i)},clearCache:function(){return n.controller.clearCache()},setProgressBarDelay:function(t){return n.controller.setProgressBarDelay(t)}}}).call(this)}).call(t);n=t.Turbolinks,function(){(function(){var i,t,r,u=[].slice;n.copyObject=function(n){var t,i,r;i={};for(t in n)r=n[t],i[t]=r;return i};n.closest=function(n,t){return i.call(n,t)};i=function(){var n,i;return n=document.documentElement,null!=(i=n.closest)?i:function(n){for(var i=this;i;){if(i.nodeType===Node.ELEMENT_NODE&&t.call(i,n))return i;i=i.parentNode}}}();n.defer=function(n){return setTimeout(n,1)};n.throttle=function(n){var t;return t=null,function(){var i;return i=1<=arguments.length?u.call(arguments,0):[],null!=t?t:t=requestAnimationFrame(function(r){return function(){return t=null,n.apply(r,i)}}(this))}};n.dispatch=function(n,t){var o,f,i,s,u,e;return u=null!=t?t:{},e=u.target,o=u.cancelable,f=u.data,i=document.createEvent("Events"),i.initEvent(n,!0,o===!0),i.data=null!=f?f:{},i.cancelable&&!r&&(s=i.preventDefault,i.preventDefault=function(){return this.defaultPrevented||Object.defineProperty(this,"defaultPrevented",{get:function(){return!0}}),s.call(this)}),(null!=e?e:document).dispatchEvent(i),i};r=function(){var n;return n=document.createEvent("Events"),n.initEvent("test",!0,!0),n.preventDefault(),n.defaultPrevented}();n.match=function(n,i){return t.call(n,i)};t=function(){var n,t,i,r;return n=document.documentElement,null!=(t=null!=(i=null!=(r=n.matchesSelector)?r:n.webkitMatchesSelector)?i:n.msMatchesSelector)?t:n.mozMatchesSelector}();n.uuid=function(){for(var t,i="",n=t=1;36>=t;n=++t)i+=9===n||14===n||19===n||24===n?"-":15===n?"4":20===n?(Math.floor(4*Math.random())+8).toString(16):Math.floor(15*Math.random()).toString(16);return i}}).call(this),function(){n.Location=function(){function n(n){var i,t;null==n&&(n="");t=document.createElement("a");t.href=n.toString();this.absoluteURL=t.href;i=t.hash.length;2>i?this.requestURL=this.absoluteURL:(this.requestURL=this.absoluteURL.slice(0,-i),this.anchor=t.hash.slice(1))}var t,i,r,u;return n.wrap=function(n){return n instanceof this?n:new this(n)},n.prototype.getOrigin=function(){return this.absoluteURL.split("/",3).join("/")},n.prototype.getPath=function(){var n,t;return null!=(n=null!=(t=this.requestURL.match(/\/\/[^\/]*(\/[^?;]*)/))?t[1]:void 0)?n:"/"},n.prototype.getPathComponents=function(){return this.getPath().split("/").slice(1)},n.prototype.getLastPathComponent=function(){return this.getPathComponents().slice(-1)[0]},n.prototype.getExtension=function(){var n,t;return null!=(n=null!=(t=this.getLastPathComponent().match(/\.[^.]*$/))?t[0]:void 0)?n:""},n.prototype.isHTML=function(){return this.getExtension().match(/^(?:|\.(?:htm|html|xhtml))$/)},n.prototype.isPrefixedBy=function(n){var t;return t=i(n),this.isEqualTo(n)||u(this.absoluteURL,t)},n.prototype.isEqualTo=function(n){return this.absoluteURL===(null!=n?n.absoluteURL:void 0)},n.prototype.toCacheKey=function(){return this.requestURL},n.prototype.toJSON=function(){return this.absoluteURL},n.prototype.toString=function(){return this.absoluteURL},n.prototype.valueOf=function(){return this.absoluteURL},i=function(n){return t(n.getOrigin()+n.getPath())},t=function(n){return r(n,"/")?n:n+"/"},u=function(n,t){return n.slice(0,t.length)===t},r=function(n,t){return n.slice(-t.length)===t},n}()}.call(this),function(){var t=function(n,t){return function(){return n.apply(t,arguments)}};n.HttpRequest=function(){function i(i,r,u){this.delegate=i;this.requestCanceled=t(this.requestCanceled,this);this.requestTimedOut=t(this.requestTimedOut,this);this.requestFailed=t(this.requestFailed,this);this.requestLoaded=t(this.requestLoaded,this);this.requestProgressed=t(this.requestProgressed,this);this.url=n.Location.wrap(r).requestURL;this.referrer=n.Location.wrap(u).absoluteURL;this.createXHR()}return i.NETWORK_FAILURE=0,i.TIMEOUT_FAILURE=-1,i.timeout=60,i.prototype.send=function(){var n;if(this.xhr&&!this.sent)return(this.notifyApplicationBeforeRequestStart(),this.setProgress(0),this.xhr.send(),this.sent=!0,"function"==typeof(n=this.delegate).requestStarted?n.requestStarted():void 0)},i.prototype.cancel=function(){if(this.xhr&&this.sent)return this.xhr.abort()},i.prototype.requestProgressed=function(n){if(n.lengthComputable)return this.setProgress(n.loaded/n.total)},i.prototype.requestLoaded=function(){return this.endRequest(function(n){return function(){var t;return 200<=(t=n.xhr.status)&&300>t?n.delegate.requestCompletedWithResponse(n.xhr.responseText,n.xhr.getResponseHeader("Turbolinks-Location")):(n.failed=!0,n.delegate.requestFailedWithStatusCode(n.xhr.status,n.xhr.responseText))}}(this))},i.prototype.requestFailed=function(){return this.endRequest(function(n){return function(){return n.failed=!0,n.delegate.requestFailedWithStatusCode(n.constructor.NETWORK_FAILURE)}}(this))},i.prototype.requestTimedOut=function(){return this.endRequest(function(n){return function(){return n.failed=!0,n.delegate.requestFailedWithStatusCode(n.constructor.TIMEOUT_FAILURE)}}(this))},i.prototype.requestCanceled=function(){return this.endRequest()},i.prototype.notifyApplicationBeforeRequestStart=function(){return n.dispatch("turbolinks:request-start",{data:{url:this.url,xhr:this.xhr}})},i.prototype.notifyApplicationAfterRequestEnd=function(){return n.dispatch("turbolinks:request-end",{data:{url:this.url,xhr:this.xhr}})},i.prototype.createXHR=function(){return this.xhr=new XMLHttpRequest,this.xhr.open("GET",this.url,!0),this.xhr.timeout=1e3*this.constructor.timeout,this.xhr.setRequestHeader("Accept","text/html, application/xhtml+xml"),this.xhr.setRequestHeader("Turbolinks-Referrer",this.referrer),this.xhr.onprogress=this.requestProgressed,this.xhr.onload=this.requestLoaded,this.xhr.onerror=this.requestFailed,this.xhr.ontimeout=this.requestTimedOut,this.xhr.onabort=this.requestCanceled},i.prototype.endRequest=function(n){if(this.xhr)return(this.notifyApplicationAfterRequestEnd(),null!=n&&n.call(this),this.destroy())},i.prototype.setProgress=function(n){var t;return this.progress=n,"function"==typeof(t=this.delegate).requestProgressed?t.requestProgressed(this.progress):void 0},i.prototype.destroy=function(){var n;return this.setProgress(1),"function"==typeof(n=this.delegate).requestFinished&&n.requestFinished(),this.delegate=null,this.xhr=null},i}()}.call(this),function(){var t=function(n,t){return function(){return n.apply(t,arguments)}};n.ProgressBar=function(){function n(){this.trickle=t(this.trickle,this);this.stylesheetElement=this.createStylesheetElement();this.progressElement=this.createProgressElement()}var i;return i=300,n.defaultCSS=".turbolinks-progress-bar {\n  position: fixed;\n  display: block;\n  top: 0;\n  left: 0;\n  height: 3px;\n  background: #0076ff;\n  z-index: 9999;\n  transition: width "+i+"ms ease-out, opacity "+i/2+"ms "+i/2+"ms ease-in;\n  transform: translate3d(0, 0, 0);\n}",n.prototype.show=function(){if(!this.visible)return(this.visible=!0,this.installStylesheetElement(),this.installProgressElement(),this.startTrickling())},n.prototype.hide=function(){if(this.visible&&!this.hiding)return(this.hiding=!0,this.fadeProgressElement(function(n){return function(){return n.uninstallProgressElement(),n.stopTrickling(),n.visible=!1,n.hiding=!1}}(this)))},n.prototype.setValue=function(n){return this.value=n,this.refresh()},n.prototype.installStylesheetElement=function(){return document.head.insertBefore(this.stylesheetElement,document.head.firstChild)},n.prototype.installProgressElement=function(){return this.progressElement.style.width=0,this.progressElement.style.opacity=1,document.documentElement.insertBefore(this.progressElement,document.body),this.refresh()},n.prototype.fadeProgressElement=function(n){return this.progressElement.style.opacity=0,setTimeout(n,1.5*i)},n.prototype.uninstallProgressElement=function(){if(this.progressElement.parentNode)return document.documentElement.removeChild(this.progressElement)},n.prototype.startTrickling=function(){return null!=this.trickleInterval?this.trickleInterval:this.trickleInterval=setInterval(this.trickle,i)},n.prototype.stopTrickling=function(){return clearInterval(this.trickleInterval),this.trickleInterval=null},n.prototype.trickle=function(){return this.setValue(this.value+Math.random()/100)},n.prototype.refresh=function(){return requestAnimationFrame(function(n){return function(){return n.progressElement.style.width=10+90*n.value+"%"}}(this))},n.prototype.createStylesheetElement=function(){var n;return n=document.createElement("style"),n.type="text/css",n.textContent=this.constructor.defaultCSS,n},n.prototype.createProgressElement=function(){var n;return n=document.createElement("div"),n.className="turbolinks-progress-bar",n},n}()}.call(this),function(){var t=function(n,t){return function(){return n.apply(t,arguments)}};n.BrowserAdapter=function(){function i(i){this.controller=i;this.showProgressBar=t(this.showProgressBar,this);this.progressBar=new n.ProgressBar}var u,f,r;return r=n.HttpRequest,u=r.NETWORK_FAILURE,f=r.TIMEOUT_FAILURE,i.prototype.visitProposedToLocationWithAction=function(n,t){return this.controller.startVisitToLocationWithAction(n,t)},i.prototype.visitStarted=function(n){return n.issueRequest(),n.changeHistory(),n.loadCachedSnapshot()},i.prototype.visitRequestStarted=function(n){return this.progressBar.setValue(0),n.hasCachedSnapshot()||"restore"!==n.action?this.showProgressBarAfterDelay():this.showProgressBar()},i.prototype.visitRequestProgressed=function(n){return this.progressBar.setValue(n.progress)},i.prototype.visitRequestCompleted=function(n){return n.loadResponse()},i.prototype.visitRequestFailedWithStatusCode=function(n,t){switch(t){case u:case f:return this.reload();default:return n.loadResponse()}},i.prototype.visitRequestFinished=function(){return this.hideProgressBar()},i.prototype.visitCompleted=function(n){return n.followRedirect()},i.prototype.pageInvalidated=function(){return this.reload()},i.prototype.showProgressBarAfterDelay=function(){return this.progressBarTimeout=setTimeout(this.showProgressBar,this.controller.progressBarDelay)},i.prototype.showProgressBar=function(){return this.progressBar.show()},i.prototype.hideProgressBar=function(){return this.progressBar.hide(),clearTimeout(this.progressBarTimeout)},i.prototype.reload=function(){return window.location.reload()},i}()}.call(this),function(){var t=function(n,t){return function(){return n.apply(t,arguments)}};n.History=function(){function i(n){this.delegate=n;this.onPageLoad=t(this.onPageLoad,this);this.onPopState=t(this.onPopState,this)}return i.prototype.start=function(){if(!this.started)return(addEventListener("popstate",this.onPopState,!1),addEventListener("load",this.onPageLoad,!1),this.started=!0)},i.prototype.stop=function(){if(this.started)return(removeEventListener("popstate",this.onPopState,!1),removeEventListener("load",this.onPageLoad,!1),this.started=!1)},i.prototype.push=function(t,i){return t=n.Location.wrap(t),this.update("push",t,i)},i.prototype.replace=function(t,i){return t=n.Location.wrap(t),this.update("replace",t,i)},i.prototype.onPopState=function(t){var i,r,u,f;if(this.shouldHandlePopState()&&(f=null!=(r=t.state)?r.turbolinks:void 0))return(i=n.Location.wrap(window.location),u=f.restorationIdentifier,this.delegate.historyPoppedToLocationWithRestorationIdentifier(i,u))},i.prototype.onPageLoad=function(){return n.defer(function(n){return function(){return n.pageLoaded=!0}}(this))},i.prototype.shouldHandlePopState=function(){return this.pageIsLoaded()},i.prototype.pageIsLoaded=function(){return this.pageLoaded||"complete"===document.readyState},i.prototype.update=function(n,t,i){var r;return r={turbolinks:{restorationIdentifier:i}},history[n+"State"](r,null,t)},i}()}.call(this),function(){n.Snapshot=function(){function t(n){var t,i;i=n.head;t=n.body;this.head=null!=i?i:document.createElement("head");this.body=null!=t?t:document.createElement("body")}return t.wrap=function(n){return n instanceof this?n:this.fromHTML(n)},t.fromHTML=function(n){var t;return t=document.createElement("html"),t.innerHTML=n,this.fromElement(t)},t.fromElement=function(n){return new this({head:n.querySelector("head"),body:n.querySelector("body")})},t.prototype.clone=function(){return new t({head:this.head.cloneNode(!0),body:this.body.cloneNode(!0)})},t.prototype.getRootLocation=function(){var t,i;return i=null!=(t=this.getSetting("root"))?t:"/",new n.Location(i)},t.prototype.getCacheControlValue=function(){return this.getSetting("cache-control")},t.prototype.getElementForAnchor=function(n){try{return this.body.querySelector("[id='"+n+"'], a[name='"+n+"']")}catch(t){}},t.prototype.hasAnchor=function(n){return null!=this.getElementForAnchor(n)},t.prototype.isPreviewable=function(){return"no-preview"!==this.getCacheControlValue()},t.prototype.isCacheable=function(){return"no-cache"!==this.getCacheControlValue()},t.prototype.isVisitable=function(){return"reload"!==this.getSetting("visit-control")},t.prototype.getSetting=function(n){var t,i;return i=this.head.querySelectorAll("meta[name='turbolinks-"+n+"']"),t=i[i.length-1],null!=t?t.getAttribute("content"):void 0},t}()}.call(this),function(){var t=[].slice;n.Renderer=function(){function n(){}var i;return n.render=function(){var i,r,u,n;return u=arguments[0],r=arguments[1],i=3<=arguments.length?t.call(arguments,2):[],n=function(n,t,i){i.prototype=n.prototype;var u=new i,r=n.apply(u,t);return Object(r)===r?r:u}(this,i,function(){}),n.delegate=u,n.render(r),n},n.prototype.renderView=function(n){return this.delegate.viewWillRender(this.newBody),n(),this.delegate.viewRendered(this.newBody)},n.prototype.invalidateView=function(){return this.delegate.viewInvalidated()},n.prototype.createScriptElement=function(n){var t;return"false"===n.getAttribute("data-turbolinks-eval")?n:(t=document.createElement("script"),t.textContent=n.textContent,t.async=!1,i(t,n),t)},i=function(n,t){var i,e,o,r,u,f,s;for(r=t.attributes,f=[],i=0,e=r.length;e>i;i++)u=r[i],o=u.name,s=u.value,f.push(n.setAttribute(o,s));return f},n}()}.call(this),function(){n.HeadDetails=function(){function n(n){var e,s,t,i,f,h,o;for(this.element=n,this.elements={},o=this.element.childNodes,i=0,h=o.length;h>i;i++)t=o[i],t.nodeType===Node.ELEMENT_NODE&&(f=t.outerHTML,s=null!=(e=this.elements)[f]?e[f]:e[f]={type:u(t),tracked:r(t),elements:[]},s.elements.push(t))}var t,i,r,u;return n.prototype.hasElementWithKey=function(n){return n in this.elements},n.prototype.getTrackedElementSignature=function(){var n,t;return function(){var i,r;i=this.elements;r=[];for(n in i)t=i[n].tracked,t&&r.push(n);return r}.call(this).join("")},n.prototype.getScriptElementsNotInDetails=function(n){return this.getElementsMatchingTypeNotInDetails("script",n)},n.prototype.getStylesheetElementsNotInDetails=function(n){return this.getElementsMatchingTypeNotInDetails("stylesheet",n)},n.prototype.getElementsMatchingTypeNotInDetails=function(n,t){var e,i,r,u,f,o;r=this.elements;f=[];for(i in r)u=r[i],o=u.type,e=u.elements,o!==n||t.hasElementWithKey(i)||f.push(e[0]);return f},n.prototype.getProvisionalElements=function(){var t,u,n,r,i,f,e;n=[];r=this.elements;for(u in r)i=r[u],e=i.type,f=i.tracked,t=i.elements,null!=e||f?t.length>1&&n.push.apply(n,t.slice(1)):n.push.apply(n,t);return n},u=function(n){return t(n)?"script":i(n)?"stylesheet":void 0},r=function(n){return"reload"===n.getAttribute("data-turbolinks-track")},t=function(n){var t;return t=n.tagName.toLowerCase(),"script"===t},i=function(n){var t;return t=n.tagName.toLowerCase(),"style"===t||"link"===t&&"stylesheet"===n.getAttribute("rel")},n}()}.call(this),function(){var t,i=function(n,t){function u(){this.constructor=n}for(var i in t)r.call(t,i)&&(n[i]=t[i]);return u.prototype=t.prototype,n.prototype=new u,n.__super__=t.prototype,n},r={}.hasOwnProperty;n.SnapshotRenderer=function(r){function u(t,i,r){this.currentSnapshot=t;this.newSnapshot=i;this.isPreview=r;this.currentHeadDetails=new n.HeadDetails(this.currentSnapshot.head);this.newHeadDetails=new n.HeadDetails(this.newSnapshot.head);this.newBody=this.newSnapshot.body}return i(u,r),u.prototype.render=function(n){return this.shouldRender()?(this.mergeHead(),this.renderView(function(t){return function(){return t.replaceBody(),t.isPreview||t.focusFirstAutofocusableElement(),n()}}(this))):this.invalidateView()},u.prototype.mergeHead=function(){return this.copyNewHeadStylesheetElements(),this.copyNewHeadScriptElements(),this.removeCurrentHeadProvisionalElements(),this.copyNewHeadProvisionalElements()},u.prototype.replaceBody=function(){return this.activateBodyScriptElements(),this.importBodyPermanentElements(),this.assignNewBody()},u.prototype.shouldRender=function(){return this.newSnapshot.isVisitable()&&this.trackedElementsAreIdentical()},u.prototype.trackedElementsAreIdentical=function(){return this.currentHeadDetails.getTrackedElementSignature()===this.newHeadDetails.getTrackedElementSignature()},u.prototype.copyNewHeadStylesheetElements=function(){var r,n,u,t,i;for(t=this.getNewHeadStylesheetElements(),i=[],n=0,u=t.length;u>n;n++)r=t[n],i.push(document.head.appendChild(r));return i},u.prototype.copyNewHeadScriptElements=function(){var r,n,u,t,i;for(t=this.getNewHeadScriptElements(),i=[],n=0,u=t.length;u>n;n++)r=t[n],i.push(document.head.appendChild(this.createScriptElement(r)));return i},u.prototype.removeCurrentHeadProvisionalElements=function(){var r,n,u,t,i;for(t=this.getCurrentHeadProvisionalElements(),i=[],n=0,u=t.length;u>n;n++)r=t[n],i.push(document.head.removeChild(r));return i},u.prototype.copyNewHeadProvisionalElements=function(){var r,n,u,t,i;for(t=this.getNewHeadProvisionalElements(),i=[],n=0,u=t.length;u>n;n++)r=t[n],i.push(document.head.appendChild(r));return i},u.prototype.importBodyPermanentElements=function(){var u,n,f,r,t,i;for(r=this.getNewBodyPermanentElements(),i=[],n=0,f=r.length;f>n;n++)t=r[n],(u=this.findCurrentBodyPermanentElement(t))?i.push(t.parentNode.replaceChild(u,t)):i.push(void 0);return i},u.prototype.activateBodyScriptElements=function(){var u,n,f,i,t,r;for(i=this.getNewBodyScriptElements(),r=[],n=0,f=i.length;f>n;n++)t=i[n],u=this.createScriptElement(t),r.push(t.parentNode.replaceChild(u,t));return r},u.prototype.assignNewBody=function(){var n,i;return n=t(document.body),i=t(this.newBody),i&&n?n.parentNode.replaceChild(i,n):document.body=this.newBody},u.prototype.focusFirstAutofocusableElement=function(){var n;if(null!=(n=this.findFirstAutofocusableElement()))return n.focus()},u.prototype.getNewHeadStylesheetElements=function(){return this.newHeadDetails.getStylesheetElementsNotInDetails(this.currentHeadDetails)},u.prototype.getNewHeadScriptElements=function(){return this.newHeadDetails.getScriptElementsNotInDetails(this.currentHeadDetails)},u.prototype.getCurrentHeadProvisionalElements=function(){return this.currentHeadDetails.getProvisionalElements()},u.prototype.getNewHeadProvisionalElements=function(){return this.newHeadDetails.getProvisionalElements()},u.prototype.getNewBodyPermanentElements=function(){return this.newBody.querySelectorAll("[id][data-turbolinks-permanent]")},u.prototype.findCurrentBodyPermanentElement=function(n){return document.body.querySelector("#"+n.id+"[data-turbolinks-permanent]")},u.prototype.getNewBodyScriptElements=function(){return this.newBody.querySelectorAll("script")},u.prototype.findFirstAutofocusableElement=function(){return document.body.querySelector("[autofocus]")},u}(n.Renderer);t=function(n){if(null!=n)return n.querySelector("[data-turbolinks-root]")}}.call(this),function(){var t=function(n,t){function u(){this.constructor=n}for(var r in t)i.call(t,r)&&(n[r]=t[r]);return u.prototype=t.prototype,n.prototype=new u,n.__super__=t.prototype,n},i={}.hasOwnProperty;n.ErrorRenderer=function(n){function i(n){this.html=n}return t(i,n),i.prototype.render=function(n){return this.renderView(function(t){return function(){return t.replaceDocumentHTML(),t.activateBodyScriptElements(),n()}}(this))},i.prototype.replaceDocumentHTML=function(){return document.documentElement.innerHTML=this.html},i.prototype.activateBodyScriptElements=function(){var u,n,f,i,t,r;for(i=this.getScriptElements(),r=[],n=0,f=i.length;f>n;n++)t=i[n],u=this.createScriptElement(t),r.push(t.parentNode.replaceChild(u,t));return r},i.prototype.getScriptElements=function(){return document.documentElement.querySelectorAll("script")},i}(n.Renderer)}.call(this),function(){n.View=function(){function t(n){this.delegate=n;this.element=document.documentElement}return t.prototype.getRootLocation=function(){return this.getSnapshot().getRootLocation()},t.prototype.getElementForAnchor=function(n){return this.getSnapshot().getElementForAnchor(n)},t.prototype.getSnapshot=function(){return n.Snapshot.fromElement(this.element)},t.prototype.render=function(n,t){var u,i,r;return r=n.snapshot,u=n.error,i=n.isPreview,this.markAsPreview(i),null!=r?this.renderSnapshot(r,i,t):this.renderError(u,t)},t.prototype.markAsPreview=function(n){return n?this.element.setAttribute("data-turbolinks-preview",""):this.element.removeAttribute("data-turbolinks-preview")},t.prototype.renderSnapshot=function(t,i,r){return n.SnapshotRenderer.render(this.delegate,r,this.getSnapshot(),n.Snapshot.wrap(t),i)},t.prototype.renderError=function(t,i){return n.ErrorRenderer.render(this.delegate,i,t)},t}()}.call(this),function(){var t=function(n,t){return function(){return n.apply(t,arguments)}};n.ScrollManager=function(){function i(i){this.delegate=i;this.onScroll=t(this.onScroll,this);this.onScroll=n.throttle(this.onScroll)}return i.prototype.start=function(){if(!this.started)return(addEventListener("scroll",this.onScroll,!1),this.onScroll(),this.started=!0)},i.prototype.stop=function(){if(this.started)return(removeEventListener("scroll",this.onScroll,!1),this.started=!1)},i.prototype.scrollToElement=function(n){return n.scrollIntoView()},i.prototype.scrollToPosition=function(n){var t,i;return t=n.x,i=n.y,window.scrollTo(t,i)},i.prototype.onScroll=function(){return this.updatePosition({x:window.pageXOffset,y:window.pageYOffset})},i.prototype.updatePosition=function(n){var t;return this.position=n,null!=(t=this.delegate)?t.scrollPositionChanged(this.position):void 0},i}()}.call(this),function(){n.SnapshotCache=function(){function t(n){this.size=n;this.keys=[];this.snapshots={}}var i;return t.prototype.has=function(n){var t;return t=i(n),t in this.snapshots},t.prototype.get=function(n){var t;if(this.has(n))return t=this.read(n),this.touch(n),t},t.prototype.put=function(n,t){return this.write(n,t),this.touch(n),t},t.prototype.read=function(n){var t;return t=i(n),this.snapshots[t]},t.prototype.write=function(n,t){var r;return r=i(n),this.snapshots[r]=t},t.prototype.touch=function(n){var t,r;return r=i(n),t=this.keys.indexOf(r),t>-1&&this.keys.splice(t,1),this.keys.unshift(r),this.trim()},t.prototype.trim=function(){var n,r,u,t,i;for(t=this.keys.splice(this.size),i=[],n=0,u=t.length;u>n;n++)r=t[n],i.push(delete this.snapshots[r]);return i},i=function(t){return n.Location.wrap(t).toCacheKey()},t}()}.call(this),function(){var t=function(n,t){return function(){return n.apply(t,arguments)}};n.Visit=function(){function i(i,r,u){this.controller=i;this.action=u;this.performScroll=t(this.performScroll,this);this.identifier=n.uuid();this.location=n.Location.wrap(r);this.adapter=this.controller.adapter;this.state="initialized";this.timingMetrics={}}var r;return i.prototype.start=function(){if("initialized"===this.state)return(this.recordTimingMetric("visitStart"),this.state="started",this.adapter.visitStarted(this))},i.prototype.cancel=function(){var n;if("started"===this.state)return(null!=(n=this.request)&&n.cancel(),this.cancelRender(),this.state="canceled")},i.prototype.complete=function(){var n;if("started"===this.state)return(this.recordTimingMetric("visitEnd"),this.state="completed","function"==typeof(n=this.adapter).visitCompleted&&n.visitCompleted(this),this.controller.visitCompleted(this))},i.prototype.fail=function(){var n;if("started"===this.state)return(this.state="failed","function"==typeof(n=this.adapter).visitFailed?n.visitFailed(this):void 0)},i.prototype.changeHistory=function(){var n,t;if(!this.historyChanged)return(n=this.location.isEqualTo(this.referrer)?"replace":this.action,t=r(n),this.controller[t](this.location,this.restorationIdentifier),this.historyChanged=!0)},i.prototype.issueRequest=function(){if(this.shouldIssueRequest()&&null==this.request)return(this.progress=0,this.request=new n.HttpRequest(this,this.location,this.referrer),this.request.send())},i.prototype.getCachedSnapshot=function(){var n;if((n=this.controller.getCachedSnapshotForLocation(this.location))&&(null==this.location.anchor||n.hasAnchor(this.location.anchor))&&("restore"===this.action||n.isPreviewable()))return n},i.prototype.hasCachedSnapshot=function(){return null!=this.getCachedSnapshot()},i.prototype.loadCachedSnapshot=function(){var n,t;if((t=this.getCachedSnapshot()))return(n=this.shouldIssueRequest(),this.render(function(){var i;return this.cacheSnapshot(),this.controller.render({snapshot:t,isPreview:n},this.performScroll),"function"==typeof(i=this.adapter).visitRendered&&i.visitRendered(this),n?void 0:this.complete()}))},i.prototype.loadResponse=function(){if(null!=this.response)return this.render(function(){var n,t;return this.cacheSnapshot(),this.request.failed?(this.controller.render({error:this.response},this.performScroll),"function"==typeof(n=this.adapter).visitRendered&&n.visitRendered(this),this.fail()):(this.controller.render({snapshot:this.response},this.performScroll),"function"==typeof(t=this.adapter).visitRendered&&t.visitRendered(this),this.complete())})},i.prototype.followRedirect=function(){if(this.redirectedToLocation&&!this.followedRedirect)return(this.location=this.redirectedToLocation,this.controller.replaceHistoryWithLocationAndRestorationIdentifier(this.redirectedToLocation,this.restorationIdentifier),this.followedRedirect=!0)},i.prototype.requestStarted=function(){var n;return this.recordTimingMetric("requestStart"),"function"==typeof(n=this.adapter).visitRequestStarted?n.visitRequestStarted(this):void 0},i.prototype.requestProgressed=function(n){var t;return this.progress=n,"function"==typeof(t=this.adapter).visitRequestProgressed?t.visitRequestProgressed(this):void 0},i.prototype.requestCompletedWithResponse=function(t,i){return this.response=t,null!=i&&(this.redirectedToLocation=n.Location.wrap(i)),this.adapter.visitRequestCompleted(this)},i.prototype.requestFailedWithStatusCode=function(n,t){return this.response=t,this.adapter.visitRequestFailedWithStatusCode(this,n)},i.prototype.requestFinished=function(){var n;return this.recordTimingMetric("requestEnd"),"function"==typeof(n=this.adapter).visitRequestFinished?n.visitRequestFinished(this):void 0},i.prototype.performScroll=function(){if(!this.scrolled)return("restore"===this.action?this.scrollToRestoredPosition()||this.scrollToTop():this.scrollToAnchor()||this.scrollToTop(),this.scrolled=!0)},i.prototype.scrollToRestoredPosition=function(){var n,t;return n=null!=(t=this.restorationData)?t.scrollPosition:void 0,null!=n?(this.controller.scrollToPosition(n),!0):void 0},i.prototype.scrollToAnchor=function(){if(null!=this.location.anchor)return(this.controller.scrollToAnchor(this.location.anchor),!0)},i.prototype.scrollToTop=function(){return this.controller.scrollToPosition({x:0,y:0})},i.prototype.recordTimingMetric=function(n){var t;return null!=(t=this.timingMetrics)[n]?t[n]:t[n]=(new Date).getTime()},i.prototype.getTimingMetrics=function(){return n.copyObject(this.timingMetrics)},r=function(n){switch(n){case"replace":return"replaceHistoryWithLocationAndRestorationIdentifier";case"advance":case"restore":return"pushHistoryWithLocationAndRestorationIdentifier"}},i.prototype.shouldIssueRequest=function(){return"restore"===this.action?!this.hasCachedSnapshot():!0},i.prototype.cacheSnapshot=function(){if(!this.snapshotCached)return(this.controller.cacheSnapshot(),this.snapshotCached=!0)},i.prototype.render=function(n){return this.cancelRender(),this.frame=requestAnimationFrame(function(t){return function(){return t.frame=null,n.call(t)}}(this))},i.prototype.cancelRender=function(){if(this.frame)return cancelAnimationFrame(this.frame)},i}()}.call(this),function(){var t=function(n,t){return function(){return n.apply(t,arguments)}};n.Controller=function(){function i(){this.clickBubbled=t(this.clickBubbled,this);this.clickCaptured=t(this.clickCaptured,this);this.pageLoaded=t(this.pageLoaded,this);this.history=new n.History(this);this.view=new n.View(this);this.scrollManager=new n.ScrollManager(this);this.restorationData={};this.clearCache();this.setProgressBarDelay(500)}return i.prototype.start=function(){if(n.supported&&!this.started)return(addEventListener("click",this.clickCaptured,!0),addEventListener("DOMContentLoaded",this.pageLoaded,!1),this.scrollManager.start(),this.startHistory(),this.started=!0,this.enabled=!0)},i.prototype.disable=function(){return this.enabled=!1},i.prototype.stop=function(){if(this.started)return(removeEventListener("click",this.clickCaptured,!0),removeEventListener("DOMContentLoaded",this.pageLoaded,!1),this.scrollManager.stop(),this.stopHistory(),this.started=!1)},i.prototype.clearCache=function(){return this.cache=new n.SnapshotCache(10)},i.prototype.visit=function(t,i){var r,u;return null==i&&(i={}),t=n.Location.wrap(t),this.applicationAllowsVisitingLocation(t)?this.locationIsVisitable(t)?(r=null!=(u=i.action)?u:"advance",this.adapter.visitProposedToLocationWithAction(t,r)):window.location=t:void 0},i.prototype.startVisitToLocationWithAction=function(t,i,r){var u;return n.supported?(u=this.getRestorationDataForIdentifier(r),this.startVisit(t,i,{restorationData:u})):window.location=t},i.prototype.setProgressBarDelay=function(n){return this.progressBarDelay=n},i.prototype.startHistory=function(){return this.location=n.Location.wrap(window.location),this.restorationIdentifier=n.uuid(),this.history.start(),this.history.replace(this.location,this.restorationIdentifier)},i.prototype.stopHistory=function(){return this.history.stop()},i.prototype.pushHistoryWithLocationAndRestorationIdentifier=function(t,i){return this.restorationIdentifier=i,this.location=n.Location.wrap(t),this.history.push(this.location,this.restorationIdentifier)},i.prototype.replaceHistoryWithLocationAndRestorationIdentifier=function(t,i){return this.restorationIdentifier=i,this.location=n.Location.wrap(t),this.history.replace(this.location,this.restorationIdentifier)},i.prototype.historyPoppedToLocationWithRestorationIdentifier=function(t,i){var r;return this.restorationIdentifier=i,this.enabled?(r=this.getRestorationDataForIdentifier(this.restorationIdentifier),this.startVisit(t,"restore",{restorationIdentifier:this.restorationIdentifier,restorationData:r,historyChanged:!0}),this.location=n.Location.wrap(t)):this.adapter.pageInvalidated()},i.prototype.getCachedSnapshotForLocation=function(n){var t;return t=this.cache.get(n),t?t.clone():void 0},i.prototype.shouldCacheSnapshot=function(){return this.view.getSnapshot().isCacheable()},i.prototype.cacheSnapshot=function(){var n;if(this.shouldCacheSnapshot())return(this.notifyApplicationBeforeCachingSnapshot(),n=this.view.getSnapshot(),this.cache.put(this.lastRenderedLocation,n.clone()))},i.prototype.scrollToAnchor=function(n){var t;return(t=this.view.getElementForAnchor(n))?this.scrollToElement(t):this.scrollToPosition({x:0,y:0})},i.prototype.scrollToElement=function(n){return this.scrollManager.scrollToElement(n)},i.prototype.scrollToPosition=function(n){return this.scrollManager.scrollToPosition(n)},i.prototype.scrollPositionChanged=function(n){var t;return t=this.getCurrentRestorationData(),t.scrollPosition=n},i.prototype.render=function(n,t){return this.view.render(n,t)},i.prototype.viewInvalidated=function(){return this.adapter.pageInvalidated()},i.prototype.viewWillRender=function(n){return this.notifyApplicationBeforeRender(n)},i.prototype.viewRendered=function(){return this.lastRenderedLocation=this.currentVisit.location,this.notifyApplicationAfterRender()},i.prototype.pageLoaded=function(){return this.lastRenderedLocation=this.location,this.notifyApplicationAfterPageLoad()},i.prototype.clickCaptured=function(){return removeEventListener("click",this.clickBubbled,!1),addEventListener("click",this.clickBubbled,!1)},i.prototype.clickBubbled=function(n){var r,t,i;if(this.enabled&&this.clickEventIsSignificant(n)&&(t=this.getVisitableLinkForNode(n.target))&&(i=this.getVisitableLocationForLink(t))&&this.applicationAllowsFollowingLinkToLocation(t,i))return(n.preventDefault(),r=this.getActionForLink(t),this.visit(i,{action:r}))},i.prototype.applicationAllowsFollowingLinkToLocation=function(n,t){var i;return i=this.notifyApplicationAfterClickingLinkToLocation(n,t),!i.defaultPrevented},i.prototype.applicationAllowsVisitingLocation=function(n){var t;return t=this.notifyApplicationBeforeVisitingLocation(n),!t.defaultPrevented},i.prototype.notifyApplicationAfterClickingLinkToLocation=function(t,i){return n.dispatch("turbolinks:click",{target:t,data:{url:i.absoluteURL},cancelable:!0})},i.prototype.notifyApplicationBeforeVisitingLocation=function(t){return n.dispatch("turbolinks:before-visit",{data:{url:t.absoluteURL},cancelable:!0})},i.prototype.notifyApplicationAfterVisitingLocation=function(t){return n.dispatch("turbolinks:visit",{data:{url:t.absoluteURL}})},i.prototype.notifyApplicationBeforeCachingSnapshot=function(){return n.dispatch("turbolinks:before-cache")},i.prototype.notifyApplicationBeforeRender=function(t){return n.dispatch("turbolinks:before-render",{data:{newBody:t}})},i.prototype.notifyApplicationAfterRender=function(){return n.dispatch("turbolinks:render")},i.prototype.notifyApplicationAfterPageLoad=function(t){return null==t&&(t={}),n.dispatch("turbolinks:load",{data:{url:this.location.absoluteURL,timing:t}})},i.prototype.startVisit=function(n,t,i){var r;return null!=(r=this.currentVisit)&&r.cancel(),this.currentVisit=this.createVisit(n,t,i),this.currentVisit.start(),this.notifyApplicationAfterVisitingLocation(n)},i.prototype.createVisit=function(t,i,r){var o,f,s,e,u;return f=null!=r?r:{},e=f.restorationIdentifier,s=f.restorationData,o=f.historyChanged,u=new n.Visit(this,t,i),u.restorationIdentifier=null!=e?e:n.uuid(),u.restorationData=n.copyObject(s),u.historyChanged=o,u.referrer=this.location,u},i.prototype.visitCompleted=function(n){return this.notifyApplicationAfterPageLoad(n.getTimingMetrics())},i.prototype.clickEventIsSignificant=function(n){return!(n.defaultPrevented||n.target.isContentEditable||n.which>1||n.altKey||n.ctrlKey||n.metaKey||n.shiftKey)},i.prototype.getVisitableLinkForNode=function(t){if(this.nodeIsVisitable(t))return n.closest(t,"a[href]:not([target]):not([download])")},i.prototype.getVisitableLocationForLink=function(t){var i;return i=new n.Location(t.getAttribute("href")),this.locationIsVisitable(i)?i:void 0},i.prototype.getActionForLink=function(n){var t;return null!=(t=n.getAttribute("data-turbolinks-action"))?t:"advance"},i.prototype.nodeIsVisitable=function(t){var i;return(i=n.closest(t,"[data-turbolinks]"))?"false"!==i.getAttribute("data-turbolinks"):!0},i.prototype.locationIsVisitable=function(n){return n.isPrefixedBy(this.view.getRootLocation())&&n.isHTML()},i.prototype.getCurrentRestorationData=function(){return this.getRestorationDataForIdentifier(this.restorationIdentifier)},i.prototype.getRestorationDataForIdentifier=function(n){var t;return null!=(t=this.restorationData)[n]?t[n]:t[n]={}},i}()}.call(this),function(){!function(){var n,t;if((n=t=document.currentScript)&&!t.hasAttribute("data-turbolinks-suppress-warning"))for(;n=n.parentNode;)if(n===document.body)return console.warn("You are loading Turbolinks from a <script> element inside the <body> element. This is probably not what you meant to do!\n\nLoad your application’s JavaScript bundle inside the <head> element instead. <script> elements in <body> are evaluated with each page change.\n\nFor more information, see: https://github.com/turbolinks/turbolinks#working-with-script-elements\n\n——\nSuppress this warning by adding a `data-turbolinks-suppress-warning` attribute to: %s",t.outerHTML)}()}.call(this),function(){var i,r,t;n.start=function(){if(r())return(null==n.controller&&(n.controller=i()),n.controller.start())};r=function(){return null==window.Turbolinks&&(window.Turbolinks=n),t()};i=function(){var t;return t=new n.Controller,t.adapter=new n.BrowserAdapter(t),t};t=function(){return window.Turbolinks===n};t()&&n.start()}.call(this)}.call(this);"object"==typeof module&&module.exports?module.exports=n:"function"==typeof define&&define.amd&&define(n)}).call(this);document.addEventListener("turbolinks:load",function(){$("form.turbolinks_form_enabled").on("submit",function(n){n.preventDefault();var i=$(this).serialize(),r=$(this).attr("action"),u=$(this).attr("method"),t=$(this).find(":submit");t.prop("disabled",!0);Turbolinks.controller.adapter.progressBar.setValue(0);Turbolinks.controller.adapter.progressBar.show();$.ajax({type:u,url:r,data:i,success:function(n,t,i){finalUrl=i.getResponseHeader("current-location");var r=Turbolinks.Snapshot.wrap(n);Turbolinks.controller.cache.put(finalUrl,r);Turbolinks.controller.adapter.progressBar.hide();Turbolinks.controller.adapter.progressBar.setValue(100);Turbolinks.visit(finalUrl,{action:"restore"})},error:function(){t.prop("disabled",!1)}})});var n=window.matchMedia("(max-width: 1295px)");refreshAd(n);n.addListener(refreshAd)})