japji/resources/public/js/cljs-runtime/ajax.core.js
2025-09-01 12:49:14 +01:00

457 lines
19 KiB
JavaScript

goog.provide('ajax.core');
ajax.core.to_interceptor = ajax.interceptors.to_interceptor;
/**
* Call this on the result of `ajax-request` to cancel the request.
*/
ajax.core.abort = (function ajax$core$abort(this$){
return ajax.protocols._abort(this$);
});
ajax.core.json_request_format = ajax.json.json_request_format;
ajax.core.json_response_format = ajax.json.json_response_format;
ajax.core.transit_request_format = ajax.transit.transit_request_format;
ajax.core.transit_response_format = ajax.transit.transit_response_format;
ajax.core.ring_response_format = ajax.ring.ring_response_format;
ajax.core.url_request_format = ajax.url.url_request_format;
ajax.core.text_request_format = ajax.formats.text_request_format;
ajax.core.text_response_format = ajax.formats.text_response_format;
ajax.core.raw_response_format = ajax.formats.raw_response_format;
ajax.core.success_QMARK_ = ajax.util.success_QMARK_;
ajax.core.default_interceptors = ajax.simple.default_interceptors;
ajax.core.ajax_request = ajax.simple.ajax_request;
ajax.core.default_formats = ajax.easy.default_formats;
ajax.core.detect_response_format = ajax.easy.detect_response_format;
/**
* accepts the URI and an optional map of options, options include:
* :handler - the handler function for successful operation
* should accept a single parameter which is the
* deserialized response
* :progress-handler - the handler function for progress events.
* this handler is only available when using the goog.net.XhrIo API
* :error-handler - the handler function for errors, should accept a
* map with keys :status and :status-text
* :format - the format for the request
* :response-format - the format for the response
* :params - a map of parameters that will be sent with the request
*/
ajax.core.GET = (function ajax$core$GET(var_args){
var args__5755__auto__ = [];
var len__5749__auto___47456 = arguments.length;
var i__5750__auto___47457 = (0);
while(true){
if((i__5750__auto___47457 < len__5749__auto___47456)){
args__5755__auto__.push((arguments[i__5750__auto___47457]));
var G__47460 = (i__5750__auto___47457 + (1));
i__5750__auto___47457 = G__47460;
continue;
} else {
}
break;
}
var argseq__5756__auto__ = ((((1) < args__5755__auto__.length))?(new cljs.core.IndexedSeq(args__5755__auto__.slice((1)),(0),null)):null);
return ajax.core.GET.cljs$core$IFn$_invoke$arity$variadic((arguments[(0)]),argseq__5756__auto__);
});
(ajax.core.GET.cljs$core$IFn$_invoke$arity$variadic = (function (uri,opts){
var f__46799__auto__ = cljs.core.first(opts);
return ajax.easy.easy_ajax_request(uri,"GET",(((f__46799__auto__ instanceof cljs.core.Keyword))?cljs.core.apply.cljs$core$IFn$_invoke$arity$2(cljs.core.hash_map,opts):f__46799__auto__));
}));
(ajax.core.GET.cljs$lang$maxFixedArity = (1));
/** @this {Function} */
(ajax.core.GET.cljs$lang$applyTo = (function (seq47294){
var G__47295 = cljs.core.first(seq47294);
var seq47294__$1 = cljs.core.next(seq47294);
var self__5734__auto__ = this;
return self__5734__auto__.cljs$core$IFn$_invoke$arity$variadic(G__47295,seq47294__$1);
}));
/**
* accepts the URI and an optional map of options, options include:
* :handler - the handler function for successful operation
* should accept a single parameter which is the
* deserialized response
* :progress-handler - the handler function for progress events.
* this handler is only available when using the goog.net.XhrIo API
* :error-handler - the handler function for errors, should accept a
* map with keys :status and :status-text
* :format - the format for the request
* :response-format - the format for the response
* :params - a map of parameters that will be sent with the request
*/
ajax.core.HEAD = (function ajax$core$HEAD(var_args){
var args__5755__auto__ = [];
var len__5749__auto___47475 = arguments.length;
var i__5750__auto___47476 = (0);
while(true){
if((i__5750__auto___47476 < len__5749__auto___47475)){
args__5755__auto__.push((arguments[i__5750__auto___47476]));
var G__47477 = (i__5750__auto___47476 + (1));
i__5750__auto___47476 = G__47477;
continue;
} else {
}
break;
}
var argseq__5756__auto__ = ((((1) < args__5755__auto__.length))?(new cljs.core.IndexedSeq(args__5755__auto__.slice((1)),(0),null)):null);
return ajax.core.HEAD.cljs$core$IFn$_invoke$arity$variadic((arguments[(0)]),argseq__5756__auto__);
});
(ajax.core.HEAD.cljs$core$IFn$_invoke$arity$variadic = (function (uri,opts){
var f__46799__auto__ = cljs.core.first(opts);
return ajax.easy.easy_ajax_request(uri,"HEAD",(((f__46799__auto__ instanceof cljs.core.Keyword))?cljs.core.apply.cljs$core$IFn$_invoke$arity$2(cljs.core.hash_map,opts):f__46799__auto__));
}));
(ajax.core.HEAD.cljs$lang$maxFixedArity = (1));
/** @this {Function} */
(ajax.core.HEAD.cljs$lang$applyTo = (function (seq47306){
var G__47307 = cljs.core.first(seq47306);
var seq47306__$1 = cljs.core.next(seq47306);
var self__5734__auto__ = this;
return self__5734__auto__.cljs$core$IFn$_invoke$arity$variadic(G__47307,seq47306__$1);
}));
/**
* accepts the URI and an optional map of options, options include:
* :handler - the handler function for successful operation
* should accept a single parameter which is the
* deserialized response
* :progress-handler - the handler function for progress events.
* this handler is only available when using the goog.net.XhrIo API
* :error-handler - the handler function for errors, should accept a
* map with keys :status and :status-text
* :format - the format for the request
* :response-format - the format for the response
* :params - a map of parameters that will be sent with the request
*/
ajax.core.POST = (function ajax$core$POST(var_args){
var args__5755__auto__ = [];
var len__5749__auto___47490 = arguments.length;
var i__5750__auto___47496 = (0);
while(true){
if((i__5750__auto___47496 < len__5749__auto___47490)){
args__5755__auto__.push((arguments[i__5750__auto___47496]));
var G__47497 = (i__5750__auto___47496 + (1));
i__5750__auto___47496 = G__47497;
continue;
} else {
}
break;
}
var argseq__5756__auto__ = ((((1) < args__5755__auto__.length))?(new cljs.core.IndexedSeq(args__5755__auto__.slice((1)),(0),null)):null);
return ajax.core.POST.cljs$core$IFn$_invoke$arity$variadic((arguments[(0)]),argseq__5756__auto__);
});
(ajax.core.POST.cljs$core$IFn$_invoke$arity$variadic = (function (uri,opts){
var f__46799__auto__ = cljs.core.first(opts);
return ajax.easy.easy_ajax_request(uri,"POST",(((f__46799__auto__ instanceof cljs.core.Keyword))?cljs.core.apply.cljs$core$IFn$_invoke$arity$2(cljs.core.hash_map,opts):f__46799__auto__));
}));
(ajax.core.POST.cljs$lang$maxFixedArity = (1));
/** @this {Function} */
(ajax.core.POST.cljs$lang$applyTo = (function (seq47320){
var G__47321 = cljs.core.first(seq47320);
var seq47320__$1 = cljs.core.next(seq47320);
var self__5734__auto__ = this;
return self__5734__auto__.cljs$core$IFn$_invoke$arity$variadic(G__47321,seq47320__$1);
}));
/**
* accepts the URI and an optional map of options, options include:
* :handler - the handler function for successful operation
* should accept a single parameter which is the
* deserialized response
* :progress-handler - the handler function for progress events.
* this handler is only available when using the goog.net.XhrIo API
* :error-handler - the handler function for errors, should accept a
* map with keys :status and :status-text
* :format - the format for the request
* :response-format - the format for the response
* :params - a map of parameters that will be sent with the request
*/
ajax.core.PUT = (function ajax$core$PUT(var_args){
var args__5755__auto__ = [];
var len__5749__auto___47502 = arguments.length;
var i__5750__auto___47503 = (0);
while(true){
if((i__5750__auto___47503 < len__5749__auto___47502)){
args__5755__auto__.push((arguments[i__5750__auto___47503]));
var G__47504 = (i__5750__auto___47503 + (1));
i__5750__auto___47503 = G__47504;
continue;
} else {
}
break;
}
var argseq__5756__auto__ = ((((1) < args__5755__auto__.length))?(new cljs.core.IndexedSeq(args__5755__auto__.slice((1)),(0),null)):null);
return ajax.core.PUT.cljs$core$IFn$_invoke$arity$variadic((arguments[(0)]),argseq__5756__auto__);
});
(ajax.core.PUT.cljs$core$IFn$_invoke$arity$variadic = (function (uri,opts){
var f__46799__auto__ = cljs.core.first(opts);
return ajax.easy.easy_ajax_request(uri,"PUT",(((f__46799__auto__ instanceof cljs.core.Keyword))?cljs.core.apply.cljs$core$IFn$_invoke$arity$2(cljs.core.hash_map,opts):f__46799__auto__));
}));
(ajax.core.PUT.cljs$lang$maxFixedArity = (1));
/** @this {Function} */
(ajax.core.PUT.cljs$lang$applyTo = (function (seq47334){
var G__47335 = cljs.core.first(seq47334);
var seq47334__$1 = cljs.core.next(seq47334);
var self__5734__auto__ = this;
return self__5734__auto__.cljs$core$IFn$_invoke$arity$variadic(G__47335,seq47334__$1);
}));
/**
* accepts the URI and an optional map of options, options include:
* :handler - the handler function for successful operation
* should accept a single parameter which is the
* deserialized response
* :progress-handler - the handler function for progress events.
* this handler is only available when using the goog.net.XhrIo API
* :error-handler - the handler function for errors, should accept a
* map with keys :status and :status-text
* :format - the format for the request
* :response-format - the format for the response
* :params - a map of parameters that will be sent with the request
*/
ajax.core.DELETE = (function ajax$core$DELETE(var_args){
var args__5755__auto__ = [];
var len__5749__auto___47521 = arguments.length;
var i__5750__auto___47522 = (0);
while(true){
if((i__5750__auto___47522 < len__5749__auto___47521)){
args__5755__auto__.push((arguments[i__5750__auto___47522]));
var G__47523 = (i__5750__auto___47522 + (1));
i__5750__auto___47522 = G__47523;
continue;
} else {
}
break;
}
var argseq__5756__auto__ = ((((1) < args__5755__auto__.length))?(new cljs.core.IndexedSeq(args__5755__auto__.slice((1)),(0),null)):null);
return ajax.core.DELETE.cljs$core$IFn$_invoke$arity$variadic((arguments[(0)]),argseq__5756__auto__);
});
(ajax.core.DELETE.cljs$core$IFn$_invoke$arity$variadic = (function (uri,opts){
var f__46799__auto__ = cljs.core.first(opts);
return ajax.easy.easy_ajax_request(uri,"DELETE",(((f__46799__auto__ instanceof cljs.core.Keyword))?cljs.core.apply.cljs$core$IFn$_invoke$arity$2(cljs.core.hash_map,opts):f__46799__auto__));
}));
(ajax.core.DELETE.cljs$lang$maxFixedArity = (1));
/** @this {Function} */
(ajax.core.DELETE.cljs$lang$applyTo = (function (seq47345){
var G__47346 = cljs.core.first(seq47345);
var seq47345__$1 = cljs.core.next(seq47345);
var self__5734__auto__ = this;
return self__5734__auto__.cljs$core$IFn$_invoke$arity$variadic(G__47346,seq47345__$1);
}));
/**
* accepts the URI and an optional map of options, options include:
* :handler - the handler function for successful operation
* should accept a single parameter which is the
* deserialized response
* :progress-handler - the handler function for progress events.
* this handler is only available when using the goog.net.XhrIo API
* :error-handler - the handler function for errors, should accept a
* map with keys :status and :status-text
* :format - the format for the request
* :response-format - the format for the response
* :params - a map of parameters that will be sent with the request
*/
ajax.core.OPTIONS = (function ajax$core$OPTIONS(var_args){
var args__5755__auto__ = [];
var len__5749__auto___47528 = arguments.length;
var i__5750__auto___47530 = (0);
while(true){
if((i__5750__auto___47530 < len__5749__auto___47528)){
args__5755__auto__.push((arguments[i__5750__auto___47530]));
var G__47531 = (i__5750__auto___47530 + (1));
i__5750__auto___47530 = G__47531;
continue;
} else {
}
break;
}
var argseq__5756__auto__ = ((((1) < args__5755__auto__.length))?(new cljs.core.IndexedSeq(args__5755__auto__.slice((1)),(0),null)):null);
return ajax.core.OPTIONS.cljs$core$IFn$_invoke$arity$variadic((arguments[(0)]),argseq__5756__auto__);
});
(ajax.core.OPTIONS.cljs$core$IFn$_invoke$arity$variadic = (function (uri,opts){
var f__46799__auto__ = cljs.core.first(opts);
return ajax.easy.easy_ajax_request(uri,"OPTIONS",(((f__46799__auto__ instanceof cljs.core.Keyword))?cljs.core.apply.cljs$core$IFn$_invoke$arity$2(cljs.core.hash_map,opts):f__46799__auto__));
}));
(ajax.core.OPTIONS.cljs$lang$maxFixedArity = (1));
/** @this {Function} */
(ajax.core.OPTIONS.cljs$lang$applyTo = (function (seq47351){
var G__47352 = cljs.core.first(seq47351);
var seq47351__$1 = cljs.core.next(seq47351);
var self__5734__auto__ = this;
return self__5734__auto__.cljs$core$IFn$_invoke$arity$variadic(G__47352,seq47351__$1);
}));
/**
* accepts the URI and an optional map of options, options include:
* :handler - the handler function for successful operation
* should accept a single parameter which is the
* deserialized response
* :progress-handler - the handler function for progress events.
* this handler is only available when using the goog.net.XhrIo API
* :error-handler - the handler function for errors, should accept a
* map with keys :status and :status-text
* :format - the format for the request
* :response-format - the format for the response
* :params - a map of parameters that will be sent with the request
*/
ajax.core.TRACE = (function ajax$core$TRACE(var_args){
var args__5755__auto__ = [];
var len__5749__auto___47551 = arguments.length;
var i__5750__auto___47552 = (0);
while(true){
if((i__5750__auto___47552 < len__5749__auto___47551)){
args__5755__auto__.push((arguments[i__5750__auto___47552]));
var G__47553 = (i__5750__auto___47552 + (1));
i__5750__auto___47552 = G__47553;
continue;
} else {
}
break;
}
var argseq__5756__auto__ = ((((1) < args__5755__auto__.length))?(new cljs.core.IndexedSeq(args__5755__auto__.slice((1)),(0),null)):null);
return ajax.core.TRACE.cljs$core$IFn$_invoke$arity$variadic((arguments[(0)]),argseq__5756__auto__);
});
(ajax.core.TRACE.cljs$core$IFn$_invoke$arity$variadic = (function (uri,opts){
var f__46799__auto__ = cljs.core.first(opts);
return ajax.easy.easy_ajax_request(uri,"TRACE",(((f__46799__auto__ instanceof cljs.core.Keyword))?cljs.core.apply.cljs$core$IFn$_invoke$arity$2(cljs.core.hash_map,opts):f__46799__auto__));
}));
(ajax.core.TRACE.cljs$lang$maxFixedArity = (1));
/** @this {Function} */
(ajax.core.TRACE.cljs$lang$applyTo = (function (seq47362){
var G__47363 = cljs.core.first(seq47362);
var seq47362__$1 = cljs.core.next(seq47362);
var self__5734__auto__ = this;
return self__5734__auto__.cljs$core$IFn$_invoke$arity$variadic(G__47363,seq47362__$1);
}));
/**
* accepts the URI and an optional map of options, options include:
* :handler - the handler function for successful operation
* should accept a single parameter which is the
* deserialized response
* :progress-handler - the handler function for progress events.
* this handler is only available when using the goog.net.XhrIo API
* :error-handler - the handler function for errors, should accept a
* map with keys :status and :status-text
* :format - the format for the request
* :response-format - the format for the response
* :params - a map of parameters that will be sent with the request
*/
ajax.core.PATCH = (function ajax$core$PATCH(var_args){
var args__5755__auto__ = [];
var len__5749__auto___47570 = arguments.length;
var i__5750__auto___47571 = (0);
while(true){
if((i__5750__auto___47571 < len__5749__auto___47570)){
args__5755__auto__.push((arguments[i__5750__auto___47571]));
var G__47572 = (i__5750__auto___47571 + (1));
i__5750__auto___47571 = G__47572;
continue;
} else {
}
break;
}
var argseq__5756__auto__ = ((((1) < args__5755__auto__.length))?(new cljs.core.IndexedSeq(args__5755__auto__.slice((1)),(0),null)):null);
return ajax.core.PATCH.cljs$core$IFn$_invoke$arity$variadic((arguments[(0)]),argseq__5756__auto__);
});
(ajax.core.PATCH.cljs$core$IFn$_invoke$arity$variadic = (function (uri,opts){
var f__46799__auto__ = cljs.core.first(opts);
return ajax.easy.easy_ajax_request(uri,"PATCH",(((f__46799__auto__ instanceof cljs.core.Keyword))?cljs.core.apply.cljs$core$IFn$_invoke$arity$2(cljs.core.hash_map,opts):f__46799__auto__));
}));
(ajax.core.PATCH.cljs$lang$maxFixedArity = (1));
/** @this {Function} */
(ajax.core.PATCH.cljs$lang$applyTo = (function (seq47387){
var G__47388 = cljs.core.first(seq47387);
var seq47387__$1 = cljs.core.next(seq47387);
var self__5734__auto__ = this;
return self__5734__auto__.cljs$core$IFn$_invoke$arity$variadic(G__47388,seq47387__$1);
}));
/**
* accepts the URI and an optional map of options, options include:
* :handler - the handler function for successful operation
* should accept a single parameter which is the
* deserialized response
* :progress-handler - the handler function for progress events.
* this handler is only available when using the goog.net.XhrIo API
* :error-handler - the handler function for errors, should accept a
* map with keys :status and :status-text
* :format - the format for the request
* :response-format - the format for the response
* :params - a map of parameters that will be sent with the request
*/
ajax.core.PURGE = (function ajax$core$PURGE(var_args){
var args__5755__auto__ = [];
var len__5749__auto___47575 = arguments.length;
var i__5750__auto___47576 = (0);
while(true){
if((i__5750__auto___47576 < len__5749__auto___47575)){
args__5755__auto__.push((arguments[i__5750__auto___47576]));
var G__47577 = (i__5750__auto___47576 + (1));
i__5750__auto___47576 = G__47577;
continue;
} else {
}
break;
}
var argseq__5756__auto__ = ((((1) < args__5755__auto__.length))?(new cljs.core.IndexedSeq(args__5755__auto__.slice((1)),(0),null)):null);
return ajax.core.PURGE.cljs$core$IFn$_invoke$arity$variadic((arguments[(0)]),argseq__5756__auto__);
});
(ajax.core.PURGE.cljs$core$IFn$_invoke$arity$variadic = (function (uri,opts){
var f__46799__auto__ = cljs.core.first(opts);
return ajax.easy.easy_ajax_request(uri,"PURGE",(((f__46799__auto__ instanceof cljs.core.Keyword))?cljs.core.apply.cljs$core$IFn$_invoke$arity$2(cljs.core.hash_map,opts):f__46799__auto__));
}));
(ajax.core.PURGE.cljs$lang$maxFixedArity = (1));
/** @this {Function} */
(ajax.core.PURGE.cljs$lang$applyTo = (function (seq47412){
var G__47413 = cljs.core.first(seq47412);
var seq47412__$1 = cljs.core.next(seq47412);
var self__5734__auto__ = this;
return self__5734__auto__.cljs$core$IFn$_invoke$arity$variadic(G__47413,seq47412__$1);
}));
//# sourceMappingURL=ajax.core.js.map