var BaseRepository={get:function(n){return this._execRelative("GET",null,n)},getNonQuery:function(n){return this._execRelative("GET",null,n)},postNonQuery:function(n,t){return window.cache=[],this._execRelative("POST",n,t)},post:function(n,t){return window.cache=[],this._execRelative("POST",n,t)},putNonQuery:function(n,t){return this._execRelative("PUT",n,t)},put:function(n,t){return window.cache=[],this._execRelative("PUT",n,t,callback)},deleteNonQuery:function(n,t){return window.cache=[],this._execRelative("DELETE",n,t)},"delete":function(n,t){return window.cache=[],this._execRelative("DELETE",n,t)},deleteAbsolute:function(n,t){return window.cache=[],this._exec("DELETE",n,t,!1)},getAbsolute:function(n){return window.cache=[],this._exec("GET",null,n,!1)},_execRelative:function(n,t,i){var r="/"+i;return this._exec(n,t,r,!1)},_sessionIsValid:!0,_exec:function(n,t,i,r){$("#loading").show();$(".toast").remove();const o=new Date,s=o.getTime();var f={url:i,type:n,cache:!1,dataType:"json",beforeSend:function(n){n.setRequestHeader("Content-Type","application/json");n.setRequestHeader("Accept","application/json")},jsonp:!1,jsonpCallback:""};f.data=t==null?"":JSON.stringify(t);const h=$.ajax(f),u=$.Deferred(),c=t=>{$("#loading").hide();const r=(new Date).getTime()-s;r>2e3?consoleWarn("WARNING: "+n+" "+i+" takes "+r+"ms"):consoleLog("retrieved : "+i+" ("+r+"ms)");u.resolve(t)},e=f=>{if(r===!1&&f.status===403){const r=f=>{f.origin===window.location.origin&&f.data==="accessRenewed"&&(this._sessionIsValid=!0,window.removeEventListener("message",r,!1),this._exec(n,t,i,!0).always(n=>{u.resolve(n)}),$("#modalOpenWindowRenewAccessFailed").modal("hide"))};if(window.addEventListener("message",r,!1),this._sessionIsValid){this._sessionIsValid=!1;const n=window.open("/Account/RenewAccess","_blank");n==null?$("#modalOpenWindowRenewAccessFailed").modal("show"):n.focus();setTimeout(()=>{window.removeEventListener("message",r,!1),u.resolve("Het vernieuwen van uw sessie is mislukt of heeft te lang geduurd, vernieuw deze pagina. Uw wijzigingen zullen niet worden opgeslagen!")},9e5)}}else{$("#loading").hide();typeof f=="string"?consoleWarn("WARNING: "+f):consoleWarn(f);var e="Er zijn geen gegevens gevonden.";(f.status==500||f.status==400)&&(e=JSON.parse(f.responseText).Message);u.resolve(e)}};return h.then(c,e),u.fail(e).promise()}};window.cache=window.cache||{}