/* nuget: begin license text * * microsoft grants you the right to use these script files for the sole * purpose of either: (i) interacting through your browser with the microsoft * website or online service, subject to the applicable licensing or use * terms; or (ii) using the files as included with a microsoft product subject * to that product's license terms. microsoft reserves all other rights to the * files not expressly granted by microsoft, whether by implication, estoppel * or otherwise. insofar as a script file is dual licensed under gpl, * microsoft neither took the code under gpl nor distributes it thereunder but * under the terms set out in this paragraph. all notices and licenses * below are for informational purposes only. * * nuget: end license text */ /* ** unobtrusive ajax support library for jquery ** copyright (c) microsoft corporation. all rights reserved. */ (function(a){var b="unobtrusiveajaxclick",g="unobtrusivevalidation";function c(d,b){var a=window,c=(d||"").split(".");while(a&&c.length)a=a[c.shift()];if(typeof a==="function")return a;b.push(d);return function.constructor.apply(null,b)}function d(a){return a==="get"||a==="post"}function f(b,a){!d(a)&&b.setrequestheader("x-http-method-override",a)}function h(c,b,e){var d;if(e.indexof("application/x-javascript")!==-1)return;d=(c.getattribute("data-ajax-mode")||"").touppercase();a(c.getattribute("data-ajax-update")).each(function(f,c){var e;switch(d){case"before":e=c.firstchild;a("
").html(b).contents().each(function(){c.insertbefore(this,e)});break;case"after":a("
").html(b).contents().each(function(){c.appendchild(this)});break;default:a(c).html(b)}})}function e(b,e){var j,k,g,i;j=b.getattribute("data-ajax-confirm");if(j&&!window.confirm(j))return;k=a(b.getattribute("data-ajax-loading"));i=b.getattribute("data-ajax-loading-duration")||0;a.extend(e,{type:b.getattribute("data-ajax-method")||undefined,url:b.getattribute("data-ajax-url")||undefined,beforesend:function(d){var a;f(d,g);a=c(b.getattribute("data-ajax-begin"),["xhr"]).apply(this,arguments);a!==false&&k.show(i);return a},complete:function(){k.hide(i);c(b.getattribute("data-ajax-complete"),["xhr","status"]).apply(this,arguments)},success:function(a,e,d){h(b,a,d.getresponseheader("content-type")||"text/html");c(b.getattribute("data-ajax-success"),["data","status","xhr"]).apply(this,arguments)},error:c(b.getattribute("data-ajax-failure"),["xhr","status","error"])});e.data.push({name:"x-requested-with",value:"xmlhttprequest"});g=e.type.touppercase();if(!d(g)){e.type="post";e.data.push({name:"x-http-method-override",value:g})}a.ajax(e)}function i(c){var b=a(c).data(g);return!b||!b.validate||b.validate()}a(document).on("click","a[data-ajax=true]",function(a){a.preventdefault();e(this,{url:this.href,type:"get",data:[]})});a(document).on("click","form[data-ajax=true] input[type=image]",function(c){var g=c.target.name,d=a(c.target),f=d.parents("form")[0],e=d.offset();a(f).data(b,[{name:g+".x",value:math.round(c.pagex-e.left)},{name:g+".y",value:math.round(c.pagey-e.top)}]);settimeout(function(){a(f).removedata(b)},0)});a(document).on("click","form[data-ajax=true] :submit",function(c){var e=c.target.name,d=a(c.target).parents("form")[0];a(d).data(b,e?[{name:e,value:c.target.value}]:[]);settimeout(function(){a(d).removedata(b)},0)});a(document).on("submit","form[data-ajax=true]",function(d){var c=a(this).data(b)||[];d.preventdefault();if(!i(this))return;e(this,{url:this.action,type:this.method||"get",data:c.concat(a(this).serializearray())})})})(jquery);