summaryrefslogtreecommitdiff
path: root/srv/src/http/static/viz/2/quil/middlewares/deprecated_options.js
blob: e80614c343e452bc602b84b4fab5f466c2519f29 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
// Compiled by ClojureScript 1.10.439 {}
goog.provide('quil.middlewares.deprecated_options');
goog.require('cljs.core');
quil.middlewares.deprecated_options.deprecated = new cljs.core.PersistentArrayMap(null, 3, [new cljs.core.Keyword(null,"decor","decor",-1730969431),new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, ["2.0","Try :features [:present] for similar effect"], null),new cljs.core.Keyword(null,"target","target",253001721),new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, ["2.0","Use :features [:keep-on-top] instead."], null),new cljs.core.Keyword(null,"safe-draw-fn","safe-draw-fn",1454900202),new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, ["2.0","Use :features [:no-safe-fns] instead."], null)], null);
quil.middlewares.deprecated_options.check_features_vector = (function quil$middlewares$deprecated_options$check_features_vector(features){
var features__$1 = cljs.core.set.call(null,features);
if(cljs.core.truth_(features__$1.call(null,new cljs.core.Keyword(null,"no-safe-draw","no-safe-draw",-1157778157)))){
cljs.core.println.call(null,"Feature :no-safe-draw was renamed to :no-safe-fns in Quil 2.1.","Use :feature [:no-safe-fns] now.");
} else {
}

return cljs.core.disj.call(null,features__$1,new cljs.core.Keyword(null,"no-safe-draw","no-safe-draw",-1157778157));
});
/**
 * Checks if options map contains deprected options and removes them.
 *   Prints messages how to fix deprecated functions.
 */
quil.middlewares.deprecated_options.deprecated_options = (function quil$middlewares$deprecated_options$deprecated_options(options){
var options__$1 = cljs.core.update_in.call(null,options,new cljs.core.PersistentVector(null, 1, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword(null,"features","features",-1146962336)], null),quil.middlewares.deprecated_options.check_features_vector);
return cljs.core.into.call(null,cljs.core.PersistentArrayMap.EMPTY,cljs.core.remove.call(null,cljs.core.nil_QMARK_,(function (){var iter__4434__auto__ = ((function (options__$1){
return (function quil$middlewares$deprecated_options$deprecated_options_$_iter__1106(s__1107){
return (new cljs.core.LazySeq(null,((function (options__$1){
return (function (){
var s__1107__$1 = s__1107;
while(true){
var temp__4657__auto__ = cljs.core.seq.call(null,s__1107__$1);
if(temp__4657__auto__){
var s__1107__$2 = temp__4657__auto__;
if(cljs.core.chunked_seq_QMARK_.call(null,s__1107__$2)){
var c__4432__auto__ = cljs.core.chunk_first.call(null,s__1107__$2);
var size__4433__auto__ = cljs.core.count.call(null,c__4432__auto__);
var b__1109 = cljs.core.chunk_buffer.call(null,size__4433__auto__);
if((function (){var i__1108 = (0);
while(true){
if((i__1108 < size__4433__auto__)){
var vec__1110 = cljs.core._nth.call(null,c__4432__auto__,i__1108);
var name = cljs.core.nth.call(null,vec__1110,(0),null);
var value = cljs.core.nth.call(null,vec__1110,(1),null);
cljs.core.chunk_append.call(null,b__1109,(function (){var temp__4655__auto__ = quil.middlewares.deprecated_options.deprecated.call(null,name);
if(cljs.core.truth_(temp__4655__auto__)){
var vec__1113 = temp__4655__auto__;
var version = cljs.core.nth.call(null,vec__1113,(0),null);
var message = cljs.core.nth.call(null,vec__1113,(1),null);
cljs.core.println.call(null,name,"option was removed in Quil",version,".",message);

return null;
} else {
return new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [name,value], null);
}
})());

var G__1122 = (i__1108 + (1));
i__1108 = G__1122;
continue;
} else {
return true;
}
break;
}
})()){
return cljs.core.chunk_cons.call(null,cljs.core.chunk.call(null,b__1109),quil$middlewares$deprecated_options$deprecated_options_$_iter__1106.call(null,cljs.core.chunk_rest.call(null,s__1107__$2)));
} else {
return cljs.core.chunk_cons.call(null,cljs.core.chunk.call(null,b__1109),null);
}
} else {
var vec__1116 = cljs.core.first.call(null,s__1107__$2);
var name = cljs.core.nth.call(null,vec__1116,(0),null);
var value = cljs.core.nth.call(null,vec__1116,(1),null);
return cljs.core.cons.call(null,(function (){var temp__4655__auto__ = quil.middlewares.deprecated_options.deprecated.call(null,name);
if(cljs.core.truth_(temp__4655__auto__)){
var vec__1119 = temp__4655__auto__;
var version = cljs.core.nth.call(null,vec__1119,(0),null);
var message = cljs.core.nth.call(null,vec__1119,(1),null);
cljs.core.println.call(null,name,"option was removed in Quil",version,".",message);

return null;
} else {
return new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [name,value], null);
}
})(),quil$middlewares$deprecated_options$deprecated_options_$_iter__1106.call(null,cljs.core.rest.call(null,s__1107__$2)));
}
} else {
return null;
}
break;
}
});})(options__$1))
,null,null));
});})(options__$1))
;
return iter__4434__auto__.call(null,options__$1);
})()));
});

//# sourceMappingURL=deprecated_options.js.map