PageSourceSearch

https://didactiefonline.nl/js/superagent.js?v=1788256351

js didactiefonline.nl collected 2026-09-24 09:28:25 UTC 10,614 bytes, 5 lines download raw bytes

1/*
2 * http://smalljs.org/ajax/superagent/
3 */
4
5(function(){function e(t,n,r){var i=e.resolve(t);if(null==i){r=r||t;n=n||"root";var s=new Error('Failed to require "'+r+'" from "'+n+'"');s.path=r;s.parent=n;s.require=true;throw s}var o=e.modules[i];if(!o._resolving&&!o.exports){var u={};u.exports={};u.client=u.component=true;o._resolving=true;o.call(this,u.exports,e.relative(i),u);delete o._resolving;o.exports=u.exports}return o.exports}e.modules={};e.aliases={};e.resolve=function(t){if(t.charAt(0)==="/")t=t.slice(1);var n=[t,t+".js",t+".json",t+"/index.js",t+"/index.json"];for(var r=0;r<n.length;r++){var t=n[r];if(e.modules.hasOwnProperty(t))return t;if(e.aliases.hasOwnProperty(t))return e.aliases[t]}};e.normalize=function(e,t){var n=[];if("."!=t.charAt(0))return t;e=e.split("/");t=t.split("/");for(var r=0;r<t.length;++r){if(".."==t[r]){e.pop()}else if("."!=t[r]&&""!=t[r]){n.push(t[r])}}return e.concat(n).join("/")};e.register=function(t,n){e.modules[t]=n};e.alias=function(t,n){if(!e.modules.hasOwnProperty(t)){throw new Error('Failed to alias "'+t+'", it does not exist')}e.aliases[n]=t};e.relative=function(t){function r(e,t){var n=e.length;while(n--){if(e[n]===t)return n}return-1}function i(n){var r=i.resolve(n);return e(r,t,n)}var n=e.normalize(t,"..");i.resolve=function(i){var s=i.charAt(0);if("/"==s)return i.slice(1);if("."==s)return e.normalize(n,i);var o=t.split("/");var u=r(o,"deps")+1;if(!u)u=0;i=o.slice(0,u+1).join("/")+"/deps/"+i;return i};i.exists=function(t){return e.modules.hasOwnProperty(i.resolve(t))};return i};e.register("component-emitter/index.js",function(e,t,n){function r(e){if(e)return i(e)}function i(e){for(var t in r.prototype){e[t]=r.prototype[t]}return e}n.exports=r;r.prototype.on=r.prototype.addEventListener=function(e,t){this._callbacks=this._callbacks||{};(this._callbacks[e]=this._callbacks[e]||[]).push(t);return this};r.prototype.once=function(e,t){function r(){n.off(e,r);t.apply(this,arguments)}var n=this;this._callbacks=this._callbacks||{};r.fn=t;this.on(e,r);return this};r.prototype.off=r.prototype.removeListener=r.prototype.removeAllListeners=r.prototype.removeEventListener=function(e,t){this._callbacks=this._callbacks||{};if(0==arguments.length){this._callbacks={};return this}var n=this._callbacks[e];if(!n)return this;if(1==arguments.length){delete this._callbacks[e];return this}var r;for(var i=0;i<n.length;i++){r=n[i];if(r===t||r.fn===t){n.splice(i,1);break}}return this};r.prototype.emit=function(e){this._callbacks=this._callbacks||{};var t=[].slice.call(arguments,1),n=this._callbacks[e];if(n){n=n.slice(0);for(var r=0,i=n.length;r<i;++r){n[r].apply(this,t)}}return this};r.prototype.listeners=function(e){this._callbacks=this._callbacks||{};return this._callbacks[e]||[]};r.prototype.hasListeners=function(e){return!!this.listeners(e).length}});e.register("component-reduce/index.js",function(e,t,n){n.exports=function(e,t,n){var r=0;var i=e.length;var s=arguments.length==3?n:e[r++];while(r<i){s=t.call(null,s,e[r],++r,e)}return s}});e.register("superagent/lib/client.js",function(e,t,n){function o(){}function u(e){var t={}.toString.call(e);switch(t){case"[object File]":case"[object Blob]":case"[object FormData]":return true;default:return false}}function a(){if(s.XMLHttpRequest&&"file:"!=s.location.protocol){return new XMLHttpRequest}else{try{return new ActiveXObject("Microsoft.XMLHTTP")}catch(e){}try{return new ActiveXObject("Msxml2.XMLHTTP.6.0")}catch(e){}try{return new ActiveXObject("Msxml2.XMLHTTP.3.0")}catch(e){}try{return new ActiveXObject("Msxml2.XMLHTTP")}catch(e){}}return false}function l(e){return e===Object(e)}function c(e){if(!l(e))return e;var t=[];for(var n in e){if(null!=e[n]){t.push(encodeURIComponent(n)+"="+encodeURIComponent(e[n]))}}return t.join("&")}function h(e){var t={};var n=e.split("&");var r;var i;for(var s=0,o=n.length;s<o;++s){i=n[s];r=i.split("=");
5t[decodeURIComponent(r[0])]=decodeURIComponent(r[1])}return t}function p(e){var t=e.split(/\r?\n/);var n={};var r;var i;var s;var o;t.pop();for(var u=0,a=t.length;u<a;++u){i=t[u];r=i.indexOf(":");s=i.slice(0,r).toLowerCase();o=f(i.slice(r+1));n[s]=o}return n}function d(e){return e.split(/ *; */).shift()}function v(e){return i(e.split(/ *; */),function(e,t){var n=t.split(/ *= */),r=n.shift(),i=n.shift();if(r&&i)e[r]=i;return e},{})}function m(e,t){t=t||{};this.req=e;this.xhr=this.req.xhr;this.text=this.xhr.responseText;this.setStatusProperties(this.xhr.status);this.header=this.headers=p(this.xhr.getAllResponseHeaders());this.header["content-type"]=this.xhr.getResponseHeader("content-type");this.setHeaderProperties(this.header);this.body=this.req.method!="HEAD"?this.parseBody(this.text):null}function g(e,t){var n=this;r.call(this);this._query=this._query||[];this.method=e;this.url=t;this.header={};this._header={};this.on("end",function(){var t=new m(n);if("HEAD"==e)t.text=null;n.callback(null,t)})}function y(e,t){if("function"==typeof t){return(new g("GET",e)).end(t)}if(1==arguments.length){return new g("GET",e)}return new g(e,t)}var r=t("emitter");var i=t("reduce");var s="undefined"==typeof window?this:window;var f="".trim?function(e){return e.trim()}:function(e){return e.replace(/(^\s*|\s*$)/g,"")};y.serializeObject=c;y.parseString=h;y.types={html:"text/html",json:"application/json",xml:"application/xml",urlencoded:"application/x-www-form-urlencoded",form:"application/x-www-form-urlencoded","form-data":"application/x-www-form-urlencoded"};y.serialize={"application/x-www-form-urlencoded":c,"application/json":JSON.stringify};y.parse={"application/x-www-form-urlencoded":h,"application/json":JSON.parse};m.prototype.get=function(e){return this.header[e.toLowerCase()]};m.prototype.setHeaderProperties=function(e){var t=this.header["content-type"]||"";this.type=d(t);var n=v(t);for(var r in n)this[r]=n[r]};m.prototype.parseBody=function(e){var t=y.parse[this.type];return t?t(e):null};m.prototype.setStatusProperties=function(e){var t=e/100|0;this.status=e;this.statusType=t;this.info=1==t;this.ok=2==t;this.clientError=4==t;this.serverError=5==t;this.error=4==t||5==t?this.toError():false;this.accepted=202==e;this.noContent=204==e||1223==e;this.badRequest=400==e;this.unauthorized=401==e;this.notAcceptable=406==e;this.notFound=404==e;this.forbidden=403==e};m.prototype.toError=function(){var e=this.req;var t=e.method;var n=e.url;var r="cannot "+t+" "+n+" ("+this.status+")";var i=new Error(r);i.status=this.status;i.method=t;i.url=n;return i};y.Response=m;r(g.prototype);g.prototype.use=function(e){e(this);return this};g.prototype.timeout=function(e){this._timeout=e;return this};g.prototype.clearTimeout=function(){this._timeout=0;clearTimeout(this._timer);return this};g.prototype.abort=function(){if(this.aborted)return;this.aborted=true;this.xhr.abort();this.clearTimeout();this.emit("abort");return this};g.prototype.set=function(e,t){if(l(e)){for(var n in e){this.set(n,e[n])}return this}this._header[e.toLowerCase()]=t;this.header[e]=t;return this};g.prototype.getHeader=function(e){return this._header[e.toLowerCase()]};g.prototype.type=function(e){this.set("Content-Type",y.types[e]||e);return this};g.prototype.accept=function(e){this.set("Accept",y.types[e]||e);return this};g.prototype.auth=function(e,t){var n=btoa(e+":"+t);this.set("Authorization","Basic "+n);return this};g.prototype.query=function(e){if("string"!=typeof e)e=c(e);if(e)this._query.push(e);return this};g.prototype.field=function(e,t){if(!this._formData)this._formData=new FormData;this._formData.append(e,t);return this};g.prototype.attach=function(e,t,n){if(!this._formData)this._formData=new FormData;this._formData.append(e,t,n);return this};g.prototype.send=function(e){var t=l(e);var n=this.getHeader("Content-Type");if(t&&l(this._data)){for(var r in e){this._data[r]=e[r]}}else if("string"==typeof e){if(!n)this.type("form");n=this.getHeader("Content-Type");if("application/x-www-form-urlencoded"==n){this._data=this._data?this._data+"&"+e:e}else{this._data=(this._data||"")+e}}else{this._data=e}if(!t)return this;if(!n)this.type("json");return this};g.prototype.callback=function(e,t){var n=this._callback;if(2==n.length)return n(e,t);
5if(e)return this.emit("error",e);n(t)};g.prototype.crossDomainError=function(){var e=new Error("Origin is not allowed by Access-Control-Allow-Origin");e.crossDomain=true;this.callback(e)};g.prototype.timeoutError=function(){var e=this._timeout;var t=new Error("timeout of "+e+"ms exceeded");t.timeout=e;this.callback(t)};g.prototype.withCredentials=function(){this._withCredentials=true;return this};g.prototype.end=function(e){var t=this;var n=this.xhr=a();var r=this._query.join("&");var i=this._timeout;var s=this._formData||this._data;this._callback=e||o;n.onreadystatechange=function(){if(4!=n.readyState)return;if(0==n.status){if(t.aborted)return t.timeoutError();return t.crossDomainError()}t.emit("end")};if(n.upload){n.upload.onprogress=function(e){e.percent=e.loaded/e.total*100;t.emit("progress",e)}}if(i&&!this._timer){this._timer=setTimeout(function(){t.abort()},i)}if(r){r=y.serializeObject(r);this.url+=~this.url.indexOf("?")?"&"+r:"?"+r}n.open(this.method,this.url,true);if(this._withCredentials)n.withCredentials=true;if("GET"!=this.method&&"HEAD"!=this.method&&"string"!=typeof s&&!u(s)){var f=y.serialize[this.getHeader("Content-Type")];if(f)s=f(s)}for(var l in this.header){if(null==this.header[l])continue;n.setRequestHeader(l,this.header[l])}this.emit("request",this);n.send(s);return this};y.Request=g;y.get=function(e,t,n){var r=y("GET",e);if("function"==typeof t)n=t,t=null;if(t)r.query(t);if(n)r.end(n);return r};y.head=function(e,t,n){var r=y("HEAD",e);if("function"==typeof t)n=t,t=null;if(t)r.send(t);if(n)r.end(n);return r};y.del=function(e,t){var n=y("DELETE",e);if(t)n.end(t);return n};y.patch=function(e,t,n){var r=y("PATCH",e);if("function"==typeof t)n=t,t=null;if(t)r.send(t);if(n)r.end(n);return r};y.post=function(e,t,n){var r=y("POST",e);if("function"==typeof t)n=t,t=null;if(t)r.send(t);if(n)r.end(n);return r};y.put=function(e,t,n){var r=y("PUT",e);if("function"==typeof t)n=t,t=null;if(t)r.send(t);if(n)r.end(n);return r};n.exports=y});e.alias("component-emitter/index.js","superagent/deps/emitter/index.js");e.alias("component-emitter/index.js","emitter/index.js");e.alias("component-reduce/index.js","superagent/deps/reduce/index.js");e.alias("component-reduce/index.js","reduce/index.js");e.alias("superagent/lib/client.js","superagent/index.js");if(typeof exports=="object"){module.exports=e("superagent")}else if(typeof define=="function"&&define.amd){define([],function(){return e("superagent")})}else{this["superagent"]=e("superagent")}})()

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.