var BURFORD_SEARCH;(function(n){function i(n,t){for(var i=window,r=(n||"").split(".");i&&r.length;)i=i[r.shift()];return typeof i=="function"?i:(t.push(n),Function.constructor.apply(null,t))}function r(n){return n==="GET"||n==="POST"}function e(n,t){r(t)||n.setRequestHeader("X-HTTP-Method-Override",t)}function o(t,i,r){var u;r.indexOf("application/x-javascript")===-1&&(u=(t.getAttribute("data-ajax-mode")||"").toUpperCase(),n(t.getAttribute("data-ajax-update")).each(function(t,r){var f;switch(u){case"BEFORE":f=r.firstChild;n("
").html(i).contents().each(function(){r.insertBefore(this,f)});break;case"AFTER":n("").html(i).contents().each(function(){r.appendChild(this)});break;default:n(r).html(i)}}))}function u(t,u){var s,h,f,c;(s=t.getAttribute("data-ajax-confirm"),!s||window.confirm(s))&&(h=n(t.getAttribute("data-ajax-loading")),c=t.getAttribute("data-ajax-loading-duration")||0,n.extend(u,{type:t.getAttribute("data-ajax-method")||undefined,url:t.getAttribute("data-ajax-url")||undefined,beforeSend:function(n){var r;return e(n,f),r=i(t.getAttribute("data-ajax-begin"),["xhr"]).apply(this,arguments),r!==!1&&h.show(c),r},complete:function(){h.hide(c);i(t.getAttribute("data-ajax-complete"),["xhr","status"]).apply(this,arguments)},success:function(n,r,u){o(t,n,u.getResponseHeader("Content-Type")||"text/html");i(t.getAttribute("data-ajax-success"),["data","status","xhr"]).apply(this,arguments)},error:i(t.getAttribute("data-ajax-failure"),["xhr","status","error"])}),u.data.push({name:"X-Requested-With",value:"XMLHttpRequest"}),f=u.type.toUpperCase(),r(f)||(u.type="POST",u.data.push({name:"X-HTTP-Method-Override",value:f})),n.ajax(u))}function s(t){var i=n(t).data(f);return!i||!i.validate||i.validate()}var t="unobtrusiveAjaxClick",f="unobtrusiveValidation";n(document).on("click","a[data-ajax=true]",function(n){n.preventDefault();u(this,{url:this.href,type:"GET",data:[]})});n(document).on("click","form[data-ajax=true] input[type=image]",function(i){var r=i.target.name,u=n(i.target),f=u.parents("form")[0],e=u.offset();n(f).data(t,[{name:r+".x",value:Math.round(i.pageX-e.left)},{name:r+".y",value:Math.round(i.pageY-e.top)}]);setTimeout(function(){n(f).removeData(t)},0)});n(document).on("click","form[data-ajax=true] :submit",function(i){var r=i.target.name,u=n(i.target).parents("form")[0];n(u).data(t,r?[{name:r,value:i.target.value}]:[]);setTimeout(function(){n(u).removeData(t)},0)});n(document).on("submit","form[data-ajax=true]",function(i){var r=n(this).data(t)||[];(i.preventDefault(),s(this))&&u(this,{url:this.action,type:this.method||"GET",data:r.concat(n(this).serializeArray())})})})(jQuery);!function(n){"function"==typeof define&&define.amd?define(["jquery"],n):"object"==typeof module&&module.exports?module.exports=n(require("jquery")):n(jQuery)}(function(n){n.extend(n.fn,{validate:function(t){if(!this.length)return void(t&&t.debug&&window.console&&console.warn("Nothing selected, can't validate, returning nothing."));var i=n.data(this[0],"validator");return i?i:(this.attr("novalidate","novalidate"),i=new n.validator(t,this[0]),n.data(this[0],"validator",i),i.settings.onsubmit&&(this.on("click.validate",":submit",function(t){i.submitButton=t.currentTarget;n(this).hasClass("cancel")&&(i.cancelSubmit=!0);void 0!==n(this).attr("formnovalidate")&&(i.cancelSubmit=!0)}),this.on("submit.validate",function(t){function r(){var r,u;return i.submitButton&&(i.settings.submitHandler||i.formSubmitted)&&(r=n("").attr("name",i.submitButton.name).val(n(i.submitButton).val()).appendTo(i.currentForm)),!i.settings.submitHandler||(u=i.settings.submitHandler.call(i,i.currentForm,t),r&&r.remove(),void 0!==u&&u)}return i.settings.debug&&t.preventDefault(),i.cancelSubmit?(i.cancelSubmit=!1,r()):i.form()?i.pendingRequest?(i.formSubmitted=!0,!1):r():(i.focusInvalid(),!1)})),i)},valid:function(){var t,i,r;return n(this[0]).is("form")?t=this.validate().form():(r=[],t=!0,i=n(this[0].form).validate(),this.each(function(){t=i.element(this)&&t;t||(r=r.concat(i.errorList))}),i.errorList=r),t},rules:function(t,i){var e,s,f,u,o,h,r=this[0];if(null!=r&&(!r.form&&r.hasAttribute("contenteditable")&&(r.form=this.closest("form")[0],r.name=this.attr("name")),null!=r.form)){if(t)switch(e=n.data(r.form,"validator").settings,s=e.rules,f=n.validator.staticRules(r),t){case"add":n.extend(f,n.validator.normalizeRule(i));delete f.messages;s[r.name]=f;i.messages&&(e.messages[r.name]=n.extend(e.messages[r.name],i.messages));break;case"remove":return i?(h={},n.each(i.split(/\s/),function(n,t){h[t]=f[t];delete f[t]}),h):(delete s[r.name],f)}return u=n.validator.normalizeRules(n.extend({},n.validator.classRules(r),n.validator.attributeRules(r),n.validator.dataRules(r),n.validator.staticRules(r)),r),u.required&&(o=u.required,delete u.required,u=n.extend({required:o},u)),u.remote&&(o=u.remote,delete u.remote,u=n.extend(u,{remote:o})),u}}});n.extend(n.expr.pseudos||n.expr[":"],{blank:function(t){return!n.trim(""+n(t).val())},filled:function(t){var i=n(t).val();return null!==i&&!!n.trim(""+i)},unchecked:function(t){return!n(t).prop("checked")}});n.validator=function(t,i){this.settings=n.extend(!0,{},n.validator.defaults,t);this.currentForm=i;this.init()};n.validator.format=function(t,i){return 1===arguments.length?function(){var i=n.makeArray(arguments);return i.unshift(t),n.validator.format.apply(this,i)}:void 0===i?t:(arguments.length>2&&i.constructor!==Array&&(i=n.makeArray(arguments).slice(1)),i.constructor!==Array&&(i=[i]),n.each(i,function(n,i){t=t.replace(new RegExp("\\{"+n+"\\}","g"),function(){return i})}),t)};n.extend(n.validator,{defaults:{messages:{},groups:{},rules:{},errorClass:"error",pendingClass:"pending",validClass:"valid",errorElement:"label",focusCleanup:!1,focusInvalid:!0,errorContainer:n([]),errorLabelContainer:n([]),onsubmit:!0,ignore:":hidden",ignoreTitle:!1,onfocusin:function(n){this.lastActive=n;this.settings.focusCleanup&&(this.settings.unhighlight&&this.settings.unhighlight.call(this,n,this.settings.errorClass,this.settings.validClass),this.hideThese(this.errorsFor(n)))},onfocusout:function(n){!this.checkable(n)&&(n.name in this.submitted||!this.optional(n))&&this.element(n)},onkeyup:function(t,i){9===i.which&&""===this.elementValue(t)||n.inArray(i.keyCode,[16,17,18,20,35,36,37,38,39,40,45,144,225])!==-1||(t.name in this.submitted||t.name in this.invalid)&&this.element(t)},onclick:function(n){n.name in this.submitted?this.element(n):n.parentNode.name in this.submitted&&this.element(n.parentNode)},highlight:function(t,i,r){"radio"===t.type?this.findByName(t.name).addClass(i).removeClass(r):n(t).addClass(i).removeClass(r)},unhighlight:function(t,i,r){"radio"===t.type?this.findByName(t.name).removeClass(i).addClass(r):n(t).removeClass(i).addClass(r)}},setDefaults:function(t){n.extend(n.validator.defaults,t)},messages:{required:"This field is required.",remote:"Please fix this field.",email:"Please enter a valid email address.",url:"Please enter a valid URL.",date:"Please enter a valid date.",dateISO:"Please enter a valid date (ISO).",number:"Please enter a valid number.",digits:"Please enter only digits.",equalTo:"Please enter the same value again.",maxlength:n.validator.format("Please enter no more than {0} characters."),minlength:n.validator.format("Please enter at least {0} characters."),rangelength:n.validator.format("Please enter a value between {0} and {1} characters long."),range:n.validator.format("Please enter a value between {0} and {1}."),max:n.validator.format("Please enter a value less than or equal to {0}."),min:n.validator.format("Please enter a value greater than or equal to {0}."),step:n.validator.format("Please enter a multiple of {0}.")},autoCreateRanges:!1,prototype:{init:function(){function i(t){!this.form&&this.hasAttribute("contenteditable")&&(this.form=n(this).closest("form")[0],this.name=n(this).attr("name"));var r=n.data(this.form,"validator"),u="on"+t.type.replace(/^validate/,""),i=r.settings;i[u]&&!n(this).is(i.ignore)&&i[u].call(r,this,t)}this.labelContainer=n(this.settings.errorLabelContainer);this.errorContext=this.labelContainer.length&&this.labelContainer||n(this.currentForm);this.containers=n(this.settings.errorContainer).add(this.settings.errorLabelContainer);this.submitted={};this.valueCache={};this.pendingRequest=0;this.pending={};this.invalid={};this.reset();var t,r=this.groups={};n.each(this.settings.groups,function(t,i){"string"==typeof i&&(i=i.split(/\s/));n.each(i,function(n,i){r[i]=t})});t=this.settings.rules;n.each(t,function(i,r){t[i]=n.validator.normalizeRule(r)});n(this.currentForm).on("focusin.validate focusout.validate keyup.validate",":text, [type='password'], [type='file'], select, textarea, [type='number'], [type='search'], [type='tel'], [type='url'], [type='email'], [type='datetime'], [type='date'], [type='month'], [type='week'], [type='time'], [type='datetime-local'], [type='range'], [type='color'], [type='radio'], [type='checkbox'], [contenteditable], [type='button']",i).on("click.validate","select, option, [type='radio'], [type='checkbox']",i);this.settings.invalidHandler&&n(this.currentForm).on("invalid-form.validate",this.settings.invalidHandler)},form:function(){return this.checkForm(),n.extend(this.submitted,this.errorMap),this.invalid=n.extend({},this.errorMap),this.valid()||n(this.currentForm).triggerHandler("invalid-form",[this]),this.showErrors(),this.valid()},checkForm:function(){this.prepareForm();for(var n=0,t=this.currentElements=this.elements();t[n];n++)this.check(t[n]);return this.valid()},element:function(t){var e,o,i=this.clean(t),r=this.validationTargetFor(i),u=this,f=!0;return void 0===r?delete this.invalid[i.name]:(this.prepareElement(r),this.currentElements=n(r),o=this.groups[r.name],o&&n.each(this.groups,function(n,t){t===o&&n!==r.name&&(i=u.validationTargetFor(u.clean(u.findByName(n))),i&&i.name in u.invalid&&(u.currentElements.push(i),f=u.check(i)&&f))}),e=this.check(r)!==!1,f=f&&e,this.invalid[r.name]=e?!1:!0,this.numberOfInvalids()||(this.toHide=this.toHide.add(this.containers)),this.showErrors(),n(t).attr("aria-invalid",!e)),f},showErrors:function(t){if(t){var i=this;n.extend(this.errorMap,t);this.errorList=n.map(this.errorMap,function(n,t){return{message:n,element:i.findByName(t)[0]}});this.successList=n.grep(this.successList,function(n){return!(n.name in t)})}this.settings.showErrors?this.settings.showErrors.call(this,this.errorMap,this.errorList):this.defaultShowErrors()},resetForm:function(){n.fn.resetForm&&n(this.currentForm).resetForm();this.invalid={};this.submitted={};this.prepareForm();this.hideErrors();var t=this.elements().removeData("previousValue").removeAttr("aria-invalid");this.resetElements(t)},resetElements:function(n){var t;if(this.settings.unhighlight)for(t=0;n[t];t++)this.settings.unhighlight.call(this,n[t],this.settings.errorClass,""),this.findByName(n[t].name).removeClass(this.settings.validClass);else n.removeClass(this.settings.errorClass).removeClass(this.settings.validClass)},numberOfInvalids:function(){return this.objectLength(this.invalid)},objectLength:function(n){var t,i=0;for(t in n)void 0!==n[t]&&null!==n[t]&&n[t]!==!1&&i++;return i},hideErrors:function(){this.hideThese(this.toHide)},hideThese:function(n){n.not(this.containers).text("");this.addWrapper(n).hide()},valid:function(){return 0===this.size()},size:function(){return this.errorList.length},focusInvalid:function(){if(this.settings.focusInvalid)try{n(this.findLastActive()||this.errorList.length&&this.errorList[0].element||[]).filter(":visible").focus().trigger("focusin")}catch(t){}},findLastActive:function(){var t=this.lastActive;return t&&1===n.grep(this.errorList,function(n){return n.element.name===t.name}).length&&t},elements:function(){var t=this,i={};return n(this.currentForm).find("input, select, textarea, [contenteditable]").not(":submit, :reset, :image, :disabled").not(this.settings.ignore).filter(function(){var r=this.name||n(this).attr("name");return!r&&t.settings.debug&&window.console&&console.error("%o has no name assigned",this),this.hasAttribute("contenteditable")&&(this.form=n(this).closest("form")[0],this.name=r),!(r in i||!t.objectLength(n(this).rules()))&&(i[r]=!0,!0)})},clean:function(t){return n(t)[0]},errors:function(){var t=this.settings.errorClass.split(" ").join(".");return n(this.settings.errorElement+"."+t,this.errorContext)},resetInternals:function(){this.successList=[];this.errorList=[];this.errorMap={};this.toShow=n([]);this.toHide=n([])},reset:function(){this.resetInternals();this.currentElements=n([])},prepareForm:function(){this.reset();this.toHide=this.errors().add(this.containers)},prepareElement:function(n){this.reset();this.toHide=this.errorsFor(n)},elementValue:function(t){var i,r,f=n(t),u=t.type;return"radio"===u||"checkbox"===u?this.findByName(t.name).filter(":checked").val():"number"===u&&"undefined"!=typeof t.validity?t.validity.badInput?"NaN":f.val():(i=t.hasAttribute("contenteditable")?f.text():f.val(),"file"===u?"C:\\fakepath\\"===i.substr(0,12)?i.substr(12):(r=i.lastIndexOf("/"),r>=0?i.substr(r+1):(r=i.lastIndexOf("\\"),r>=0?i.substr(r+1):i)):"string"==typeof i?i.replace(/\r/g,""):i)},check:function(t){t=this.validationTargetFor(this.clean(t));var u,f,r,e,i=n(t).rules(),c=n.map(i,function(n,t){return t}).length,h=!1,o=this.elementValue(t);if("function"==typeof i.normalizer?e=i.normalizer:"function"==typeof this.settings.normalizer&&(e=this.settings.normalizer),e){if(o=e.call(t,o),"string"!=typeof o)throw new TypeError("The normalizer should return a string value.");delete i.normalizer}for(f in i){r={method:f,parameters:i[f]};try{if(u=n.validator.methods[f].call(this,o,t,r.parameters),"dependency-mismatch"===u&&1===c){h=!0;continue}if(h=!1,"pending"===u)return void(this.toHide=this.toHide.not(this.errorsFor(t)));if(!u)return this.formatAndAdd(t,r),!1}catch(s){throw this.settings.debug&&window.console&&console.log("Exception occurred when checking element "+t.id+", check the '"+r.method+"' method.",s),s instanceof TypeError&&(s.message+=". Exception occurred when checking element "+t.id+", check the '"+r.method+"' method."),s;}}if(!h)return this.objectLength(i)&&this.successList.push(t),!0},customDataMessage:function(t,i){return n(t).data("msg"+i.charAt(0).toUpperCase()+i.substring(1).toLowerCase())||n(t).data("msg")},customMessage:function(n,t){var i=this.settings.messages[n];return i&&(i.constructor===String?i:i[t])},findDefined:function(){for(var n=0;n