32661 lines
No EOL
1.2 MiB
32661 lines
No EOL
1.2 MiB
var CLOSURE_NO_DEPS = true;
|
|
var COMPILED = false;
|
|
var goog = goog || {};
|
|
goog.global = this;
|
|
goog.DEBUG = true;
|
|
goog.LOCALE = "en";
|
|
goog.provide = function(name) {
|
|
if(!COMPILED) {
|
|
if(goog.isProvided_(name)) {
|
|
throw Error('Namespace "' + name + '" already declared.');
|
|
}
|
|
delete goog.implicitNamespaces_[name];
|
|
var namespace = name;
|
|
while(namespace = namespace.substring(0, namespace.lastIndexOf("."))) {
|
|
if(goog.getObjectByName(namespace)) {
|
|
break
|
|
}
|
|
goog.implicitNamespaces_[namespace] = true
|
|
}
|
|
}
|
|
goog.exportPath_(name)
|
|
};
|
|
goog.setTestOnly = function(opt_message) {
|
|
if(COMPILED && !goog.DEBUG) {
|
|
opt_message = opt_message || "";
|
|
throw Error("Importing test-only code into non-debug environment" + opt_message ? ": " + opt_message : ".");
|
|
}
|
|
};
|
|
if(!COMPILED) {
|
|
goog.isProvided_ = function(name) {
|
|
return!goog.implicitNamespaces_[name] && !!goog.getObjectByName(name)
|
|
};
|
|
goog.implicitNamespaces_ = {}
|
|
}
|
|
goog.exportPath_ = function(name, opt_object, opt_objectToExportTo) {
|
|
var parts = name.split(".");
|
|
var cur = opt_objectToExportTo || goog.global;
|
|
if(!(parts[0] in cur) && cur.execScript) {
|
|
cur.execScript("var " + parts[0])
|
|
}
|
|
for(var part;parts.length && (part = parts.shift());) {
|
|
if(!parts.length && goog.isDef(opt_object)) {
|
|
cur[part] = opt_object
|
|
}else {
|
|
if(cur[part]) {
|
|
cur = cur[part]
|
|
}else {
|
|
cur = cur[part] = {}
|
|
}
|
|
}
|
|
}
|
|
};
|
|
goog.getObjectByName = function(name, opt_obj) {
|
|
var parts = name.split(".");
|
|
var cur = opt_obj || goog.global;
|
|
for(var part;part = parts.shift();) {
|
|
if(goog.isDefAndNotNull(cur[part])) {
|
|
cur = cur[part]
|
|
}else {
|
|
return null
|
|
}
|
|
}
|
|
return cur
|
|
};
|
|
goog.globalize = function(obj, opt_global) {
|
|
var global = opt_global || goog.global;
|
|
for(var x in obj) {
|
|
global[x] = obj[x]
|
|
}
|
|
};
|
|
goog.addDependency = function(relPath, provides, requires) {
|
|
if(!COMPILED) {
|
|
var provide, require;
|
|
var path = relPath.replace(/\\/g, "/");
|
|
var deps = goog.dependencies_;
|
|
for(var i = 0;provide = provides[i];i++) {
|
|
deps.nameToPath[provide] = path;
|
|
if(!(path in deps.pathToNames)) {
|
|
deps.pathToNames[path] = {}
|
|
}
|
|
deps.pathToNames[path][provide] = true
|
|
}
|
|
for(var j = 0;require = requires[j];j++) {
|
|
if(!(path in deps.requires)) {
|
|
deps.requires[path] = {}
|
|
}
|
|
deps.requires[path][require] = true
|
|
}
|
|
}
|
|
};
|
|
goog.ENABLE_DEBUG_LOADER = true;
|
|
goog.require = function(name) {
|
|
if(!COMPILED) {
|
|
if(goog.isProvided_(name)) {
|
|
return
|
|
}
|
|
if(goog.ENABLE_DEBUG_LOADER) {
|
|
var path = goog.getPathFromDeps_(name);
|
|
if(path) {
|
|
goog.included_[path] = true;
|
|
goog.writeScripts_();
|
|
return
|
|
}
|
|
}
|
|
var errorMessage = "goog.require could not find: " + name;
|
|
if(goog.global.console) {
|
|
goog.global.console["error"](errorMessage)
|
|
}
|
|
throw Error(errorMessage);
|
|
}
|
|
};
|
|
goog.basePath = "";
|
|
goog.global.CLOSURE_BASE_PATH;
|
|
goog.global.CLOSURE_NO_DEPS;
|
|
goog.global.CLOSURE_IMPORT_SCRIPT;
|
|
goog.nullFunction = function() {
|
|
};
|
|
goog.identityFunction = function(opt_returnValue, var_args) {
|
|
return opt_returnValue
|
|
};
|
|
goog.abstractMethod = function() {
|
|
throw Error("unimplemented abstract method");
|
|
};
|
|
goog.addSingletonGetter = function(ctor) {
|
|
ctor.getInstance = function() {
|
|
if(ctor.instance_) {
|
|
return ctor.instance_
|
|
}
|
|
if(goog.DEBUG) {
|
|
goog.instantiatedSingletons_[goog.instantiatedSingletons_.length] = ctor
|
|
}
|
|
return ctor.instance_ = new ctor
|
|
}
|
|
};
|
|
goog.instantiatedSingletons_ = [];
|
|
if(!COMPILED && goog.ENABLE_DEBUG_LOADER) {
|
|
goog.included_ = {};
|
|
goog.dependencies_ = {pathToNames:{}, nameToPath:{}, requires:{}, visited:{}, written:{}};
|
|
goog.inHtmlDocument_ = function() {
|
|
var doc = goog.global.document;
|
|
return typeof doc != "undefined" && "write" in doc
|
|
};
|
|
goog.findBasePath_ = function() {
|
|
if(goog.global.CLOSURE_BASE_PATH) {
|
|
goog.basePath = goog.global.CLOSURE_BASE_PATH;
|
|
return
|
|
}else {
|
|
if(!goog.inHtmlDocument_()) {
|
|
return
|
|
}
|
|
}
|
|
var doc = goog.global.document;
|
|
var scripts = doc.getElementsByTagName("script");
|
|
for(var i = scripts.length - 1;i >= 0;--i) {
|
|
var src = scripts[i].src;
|
|
var qmark = src.lastIndexOf("?");
|
|
var l = qmark == -1 ? src.length : qmark;
|
|
if(src.substr(l - 7, 7) == "base.js") {
|
|
goog.basePath = src.substr(0, l - 7);
|
|
return
|
|
}
|
|
}
|
|
};
|
|
goog.importScript_ = function(src) {
|
|
var importScript = goog.global.CLOSURE_IMPORT_SCRIPT || goog.writeScriptTag_;
|
|
if(!goog.dependencies_.written[src] && importScript(src)) {
|
|
goog.dependencies_.written[src] = true
|
|
}
|
|
};
|
|
goog.writeScriptTag_ = function(src) {
|
|
if(goog.inHtmlDocument_()) {
|
|
var doc = goog.global.document;
|
|
doc.write('<script type="text/javascript" src="' + src + '"></' + "script>");
|
|
return true
|
|
}else {
|
|
return false
|
|
}
|
|
};
|
|
goog.writeScripts_ = function() {
|
|
var scripts = [];
|
|
var seenScript = {};
|
|
var deps = goog.dependencies_;
|
|
function visitNode(path) {
|
|
if(path in deps.written) {
|
|
return
|
|
}
|
|
if(path in deps.visited) {
|
|
if(!(path in seenScript)) {
|
|
seenScript[path] = true;
|
|
scripts.push(path)
|
|
}
|
|
return
|
|
}
|
|
deps.visited[path] = true;
|
|
if(path in deps.requires) {
|
|
for(var requireName in deps.requires[path]) {
|
|
if(!goog.isProvided_(requireName)) {
|
|
if(requireName in deps.nameToPath) {
|
|
visitNode(deps.nameToPath[requireName])
|
|
}else {
|
|
throw Error("Undefined nameToPath for " + requireName);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
if(!(path in seenScript)) {
|
|
seenScript[path] = true;
|
|
scripts.push(path)
|
|
}
|
|
}
|
|
for(var path in goog.included_) {
|
|
if(!deps.written[path]) {
|
|
visitNode(path)
|
|
}
|
|
}
|
|
for(var i = 0;i < scripts.length;i++) {
|
|
if(scripts[i]) {
|
|
goog.importScript_(goog.basePath + scripts[i])
|
|
}else {
|
|
throw Error("Undefined script input");
|
|
}
|
|
}
|
|
};
|
|
goog.getPathFromDeps_ = function(rule) {
|
|
if(rule in goog.dependencies_.nameToPath) {
|
|
return goog.dependencies_.nameToPath[rule]
|
|
}else {
|
|
return null
|
|
}
|
|
};
|
|
goog.findBasePath_();
|
|
if(!goog.global.CLOSURE_NO_DEPS) {
|
|
goog.importScript_(goog.basePath + "deps.js")
|
|
}
|
|
}
|
|
goog.typeOf = function(value) {
|
|
var s = typeof value;
|
|
if(s == "object") {
|
|
if(value) {
|
|
if(value instanceof Array) {
|
|
return"array"
|
|
}else {
|
|
if(value instanceof Object) {
|
|
return s
|
|
}
|
|
}
|
|
var className = Object.prototype.toString.call(value);
|
|
if(className == "[object Window]") {
|
|
return"object"
|
|
}
|
|
if(className == "[object Array]" || typeof value.length == "number" && typeof value.splice != "undefined" && typeof value.propertyIsEnumerable != "undefined" && !value.propertyIsEnumerable("splice")) {
|
|
return"array"
|
|
}
|
|
if(className == "[object Function]" || typeof value.call != "undefined" && typeof value.propertyIsEnumerable != "undefined" && !value.propertyIsEnumerable("call")) {
|
|
return"function"
|
|
}
|
|
}else {
|
|
return"null"
|
|
}
|
|
}else {
|
|
if(s == "function" && typeof value.call == "undefined") {
|
|
return"object"
|
|
}
|
|
}
|
|
return s
|
|
};
|
|
goog.isDef = function(val) {
|
|
return val !== undefined
|
|
};
|
|
goog.isNull = function(val) {
|
|
return val === null
|
|
};
|
|
goog.isDefAndNotNull = function(val) {
|
|
return val != null
|
|
};
|
|
goog.isArray = function(val) {
|
|
return goog.typeOf(val) == "array"
|
|
};
|
|
goog.isArrayLike = function(val) {
|
|
var type = goog.typeOf(val);
|
|
return type == "array" || type == "object" && typeof val.length == "number"
|
|
};
|
|
goog.isDateLike = function(val) {
|
|
return goog.isObject(val) && typeof val.getFullYear == "function"
|
|
};
|
|
goog.isString = function(val) {
|
|
return typeof val == "string"
|
|
};
|
|
goog.isBoolean = function(val) {
|
|
return typeof val == "boolean"
|
|
};
|
|
goog.isNumber = function(val) {
|
|
return typeof val == "number"
|
|
};
|
|
goog.isFunction = function(val) {
|
|
return goog.typeOf(val) == "function"
|
|
};
|
|
goog.isObject = function(val) {
|
|
var type = typeof val;
|
|
return type == "object" && val != null || type == "function"
|
|
};
|
|
goog.getUid = function(obj) {
|
|
return obj[goog.UID_PROPERTY_] || (obj[goog.UID_PROPERTY_] = ++goog.uidCounter_)
|
|
};
|
|
goog.removeUid = function(obj) {
|
|
if("removeAttribute" in obj) {
|
|
obj.removeAttribute(goog.UID_PROPERTY_)
|
|
}
|
|
try {
|
|
delete obj[goog.UID_PROPERTY_]
|
|
}catch(ex) {
|
|
}
|
|
};
|
|
goog.UID_PROPERTY_ = "closure_uid_" + Math.floor(Math.random() * 2147483648).toString(36);
|
|
goog.uidCounter_ = 0;
|
|
goog.getHashCode = goog.getUid;
|
|
goog.removeHashCode = goog.removeUid;
|
|
goog.cloneObject = function(obj) {
|
|
var type = goog.typeOf(obj);
|
|
if(type == "object" || type == "array") {
|
|
if(obj.clone) {
|
|
return obj.clone()
|
|
}
|
|
var clone = type == "array" ? [] : {};
|
|
for(var key in obj) {
|
|
clone[key] = goog.cloneObject(obj[key])
|
|
}
|
|
return clone
|
|
}
|
|
return obj
|
|
};
|
|
goog.bindNative_ = function(fn, selfObj, var_args) {
|
|
return fn.call.apply(fn.bind, arguments)
|
|
};
|
|
goog.bindJs_ = function(fn, selfObj, var_args) {
|
|
if(!fn) {
|
|
throw new Error;
|
|
}
|
|
if(arguments.length > 2) {
|
|
var boundArgs = Array.prototype.slice.call(arguments, 2);
|
|
return function() {
|
|
var newArgs = Array.prototype.slice.call(arguments);
|
|
Array.prototype.unshift.apply(newArgs, boundArgs);
|
|
return fn.apply(selfObj, newArgs)
|
|
}
|
|
}else {
|
|
return function() {
|
|
return fn.apply(selfObj, arguments)
|
|
}
|
|
}
|
|
};
|
|
goog.bind = function(fn, selfObj, var_args) {
|
|
if(Function.prototype.bind && Function.prototype.bind.toString().indexOf("native code") != -1) {
|
|
goog.bind = goog.bindNative_
|
|
}else {
|
|
goog.bind = goog.bindJs_
|
|
}
|
|
return goog.bind.apply(null, arguments)
|
|
};
|
|
goog.partial = function(fn, var_args) {
|
|
var args = Array.prototype.slice.call(arguments, 1);
|
|
return function() {
|
|
var newArgs = Array.prototype.slice.call(arguments);
|
|
newArgs.unshift.apply(newArgs, args);
|
|
return fn.apply(this, newArgs)
|
|
}
|
|
};
|
|
goog.mixin = function(target, source) {
|
|
for(var x in source) {
|
|
target[x] = source[x]
|
|
}
|
|
};
|
|
goog.now = Date.now || function() {
|
|
return+new Date
|
|
};
|
|
goog.globalEval = function(script) {
|
|
if(goog.global.execScript) {
|
|
goog.global.execScript(script, "JavaScript")
|
|
}else {
|
|
if(goog.global.eval) {
|
|
if(goog.evalWorksForGlobals_ == null) {
|
|
goog.global.eval("var _et_ = 1;");
|
|
if(typeof goog.global["_et_"] != "undefined") {
|
|
delete goog.global["_et_"];
|
|
goog.evalWorksForGlobals_ = true
|
|
}else {
|
|
goog.evalWorksForGlobals_ = false
|
|
}
|
|
}
|
|
if(goog.evalWorksForGlobals_) {
|
|
goog.global.eval(script)
|
|
}else {
|
|
var doc = goog.global.document;
|
|
var scriptElt = doc.createElement("script");
|
|
scriptElt.type = "text/javascript";
|
|
scriptElt.defer = false;
|
|
scriptElt.appendChild(doc.createTextNode(script));
|
|
doc.body.appendChild(scriptElt);
|
|
doc.body.removeChild(scriptElt)
|
|
}
|
|
}else {
|
|
throw Error("goog.globalEval not available");
|
|
}
|
|
}
|
|
};
|
|
goog.evalWorksForGlobals_ = null;
|
|
goog.cssNameMapping_;
|
|
goog.cssNameMappingStyle_;
|
|
goog.getCssName = function(className, opt_modifier) {
|
|
var getMapping = function(cssName) {
|
|
return goog.cssNameMapping_[cssName] || cssName
|
|
};
|
|
var renameByParts = function(cssName) {
|
|
var parts = cssName.split("-");
|
|
var mapped = [];
|
|
for(var i = 0;i < parts.length;i++) {
|
|
mapped.push(getMapping(parts[i]))
|
|
}
|
|
return mapped.join("-")
|
|
};
|
|
var rename;
|
|
if(goog.cssNameMapping_) {
|
|
rename = goog.cssNameMappingStyle_ == "BY_WHOLE" ? getMapping : renameByParts
|
|
}else {
|
|
rename = function(a) {
|
|
return a
|
|
}
|
|
}
|
|
if(opt_modifier) {
|
|
return className + "-" + rename(opt_modifier)
|
|
}else {
|
|
return rename(className)
|
|
}
|
|
};
|
|
goog.setCssNameMapping = function(mapping, opt_style) {
|
|
goog.cssNameMapping_ = mapping;
|
|
goog.cssNameMappingStyle_ = opt_style
|
|
};
|
|
goog.global.CLOSURE_CSS_NAME_MAPPING;
|
|
if(!COMPILED && goog.global.CLOSURE_CSS_NAME_MAPPING) {
|
|
goog.cssNameMapping_ = goog.global.CLOSURE_CSS_NAME_MAPPING
|
|
}
|
|
goog.getMsg = function(str, opt_values) {
|
|
var values = opt_values || {};
|
|
for(var key in values) {
|
|
var value = ("" + values[key]).replace(/\$/g, "$$$$");
|
|
str = str.replace(new RegExp("\\{\\$" + key + "\\}", "gi"), value)
|
|
}
|
|
return str
|
|
};
|
|
goog.exportSymbol = function(publicPath, object, opt_objectToExportTo) {
|
|
goog.exportPath_(publicPath, object, opt_objectToExportTo)
|
|
};
|
|
goog.exportProperty = function(object, publicName, symbol) {
|
|
object[publicName] = symbol
|
|
};
|
|
goog.inherits = function(childCtor, parentCtor) {
|
|
function tempCtor() {
|
|
}
|
|
tempCtor.prototype = parentCtor.prototype;
|
|
childCtor.superClass_ = parentCtor.prototype;
|
|
childCtor.prototype = new tempCtor;
|
|
childCtor.prototype.constructor = childCtor
|
|
};
|
|
goog.base = function(me, opt_methodName, var_args) {
|
|
var caller = arguments.callee.caller;
|
|
if(caller.superClass_) {
|
|
return caller.superClass_.constructor.apply(me, Array.prototype.slice.call(arguments, 1))
|
|
}
|
|
var args = Array.prototype.slice.call(arguments, 2);
|
|
var foundCaller = false;
|
|
for(var ctor = me.constructor;ctor;ctor = ctor.superClass_ && ctor.superClass_.constructor) {
|
|
if(ctor.prototype[opt_methodName] === caller) {
|
|
foundCaller = true
|
|
}else {
|
|
if(foundCaller) {
|
|
return ctor.prototype[opt_methodName].apply(me, args)
|
|
}
|
|
}
|
|
}
|
|
if(me[opt_methodName] === caller) {
|
|
return me.constructor.prototype[opt_methodName].apply(me, args)
|
|
}else {
|
|
throw Error("goog.base called from a method of one name " + "to a method of a different name");
|
|
}
|
|
};
|
|
goog.scope = function(fn) {
|
|
fn.call(goog.global)
|
|
};
|
|
goog.provide("goog.string");
|
|
goog.provide("goog.string.Unicode");
|
|
goog.string.Unicode = {NBSP:"\u00a0"};
|
|
goog.string.startsWith = function(str, prefix) {
|
|
return str.lastIndexOf(prefix, 0) == 0
|
|
};
|
|
goog.string.endsWith = function(str, suffix) {
|
|
var l = str.length - suffix.length;
|
|
return l >= 0 && str.indexOf(suffix, l) == l
|
|
};
|
|
goog.string.caseInsensitiveStartsWith = function(str, prefix) {
|
|
return goog.string.caseInsensitiveCompare(prefix, str.substr(0, prefix.length)) == 0
|
|
};
|
|
goog.string.caseInsensitiveEndsWith = function(str, suffix) {
|
|
return goog.string.caseInsensitiveCompare(suffix, str.substr(str.length - suffix.length, suffix.length)) == 0
|
|
};
|
|
goog.string.subs = function(str, var_args) {
|
|
for(var i = 1;i < arguments.length;i++) {
|
|
var replacement = String(arguments[i]).replace(/\$/g, "$$$$");
|
|
str = str.replace(/\%s/, replacement)
|
|
}
|
|
return str
|
|
};
|
|
goog.string.collapseWhitespace = function(str) {
|
|
return str.replace(/[\s\xa0]+/g, " ").replace(/^\s+|\s+$/g, "")
|
|
};
|
|
goog.string.isEmpty = function(str) {
|
|
return/^[\s\xa0]*$/.test(str)
|
|
};
|
|
goog.string.isEmptySafe = function(str) {
|
|
return goog.string.isEmpty(goog.string.makeSafe(str))
|
|
};
|
|
goog.string.isBreakingWhitespace = function(str) {
|
|
return!/[^\t\n\r ]/.test(str)
|
|
};
|
|
goog.string.isAlpha = function(str) {
|
|
return!/[^a-zA-Z]/.test(str)
|
|
};
|
|
goog.string.isNumeric = function(str) {
|
|
return!/[^0-9]/.test(str)
|
|
};
|
|
goog.string.isAlphaNumeric = function(str) {
|
|
return!/[^a-zA-Z0-9]/.test(str)
|
|
};
|
|
goog.string.isSpace = function(ch) {
|
|
return ch == " "
|
|
};
|
|
goog.string.isUnicodeChar = function(ch) {
|
|
return ch.length == 1 && ch >= " " && ch <= "~" || ch >= "\u0080" && ch <= "\ufffd"
|
|
};
|
|
goog.string.stripNewlines = function(str) {
|
|
return str.replace(/(\r\n|\r|\n)+/g, " ")
|
|
};
|
|
goog.string.canonicalizeNewlines = function(str) {
|
|
return str.replace(/(\r\n|\r|\n)/g, "\n")
|
|
};
|
|
goog.string.normalizeWhitespace = function(str) {
|
|
return str.replace(/\xa0|\s/g, " ")
|
|
};
|
|
goog.string.normalizeSpaces = function(str) {
|
|
return str.replace(/\xa0|[ \t]+/g, " ")
|
|
};
|
|
goog.string.collapseBreakingSpaces = function(str) {
|
|
return str.replace(/[\t\r\n ]+/g, " ").replace(/^[\t\r\n ]+|[\t\r\n ]+$/g, "")
|
|
};
|
|
goog.string.trim = function(str) {
|
|
return str.replace(/^[\s\xa0]+|[\s\xa0]+$/g, "")
|
|
};
|
|
goog.string.trimLeft = function(str) {
|
|
return str.replace(/^[\s\xa0]+/, "")
|
|
};
|
|
goog.string.trimRight = function(str) {
|
|
return str.replace(/[\s\xa0]+$/, "")
|
|
};
|
|
goog.string.caseInsensitiveCompare = function(str1, str2) {
|
|
var test1 = String(str1).toLowerCase();
|
|
var test2 = String(str2).toLowerCase();
|
|
if(test1 < test2) {
|
|
return-1
|
|
}else {
|
|
if(test1 == test2) {
|
|
return 0
|
|
}else {
|
|
return 1
|
|
}
|
|
}
|
|
};
|
|
goog.string.numerateCompareRegExp_ = /(\.\d+)|(\d+)|(\D+)/g;
|
|
goog.string.numerateCompare = function(str1, str2) {
|
|
if(str1 == str2) {
|
|
return 0
|
|
}
|
|
if(!str1) {
|
|
return-1
|
|
}
|
|
if(!str2) {
|
|
return 1
|
|
}
|
|
var tokens1 = str1.toLowerCase().match(goog.string.numerateCompareRegExp_);
|
|
var tokens2 = str2.toLowerCase().match(goog.string.numerateCompareRegExp_);
|
|
var count = Math.min(tokens1.length, tokens2.length);
|
|
for(var i = 0;i < count;i++) {
|
|
var a = tokens1[i];
|
|
var b = tokens2[i];
|
|
if(a != b) {
|
|
var num1 = parseInt(a, 10);
|
|
if(!isNaN(num1)) {
|
|
var num2 = parseInt(b, 10);
|
|
if(!isNaN(num2) && num1 - num2) {
|
|
return num1 - num2
|
|
}
|
|
}
|
|
return a < b ? -1 : 1
|
|
}
|
|
}
|
|
if(tokens1.length != tokens2.length) {
|
|
return tokens1.length - tokens2.length
|
|
}
|
|
return str1 < str2 ? -1 : 1
|
|
};
|
|
goog.string.urlEncode = function(str) {
|
|
return encodeURIComponent(String(str))
|
|
};
|
|
goog.string.urlDecode = function(str) {
|
|
return decodeURIComponent(str.replace(/\+/g, " "))
|
|
};
|
|
goog.string.newLineToBr = function(str, opt_xml) {
|
|
return str.replace(/(\r\n|\r|\n)/g, opt_xml ? "<br />" : "<br>")
|
|
};
|
|
goog.string.htmlEscape = function(str, opt_isLikelyToContainHtmlChars) {
|
|
if(opt_isLikelyToContainHtmlChars) {
|
|
return str.replace(goog.string.amperRe_, "&").replace(goog.string.ltRe_, "<").replace(goog.string.gtRe_, ">").replace(goog.string.quotRe_, """)
|
|
}else {
|
|
if(!goog.string.allRe_.test(str)) {
|
|
return str
|
|
}
|
|
if(str.indexOf("&") != -1) {
|
|
str = str.replace(goog.string.amperRe_, "&")
|
|
}
|
|
if(str.indexOf("<") != -1) {
|
|
str = str.replace(goog.string.ltRe_, "<")
|
|
}
|
|
if(str.indexOf(">") != -1) {
|
|
str = str.replace(goog.string.gtRe_, ">")
|
|
}
|
|
if(str.indexOf('"') != -1) {
|
|
str = str.replace(goog.string.quotRe_, """)
|
|
}
|
|
return str
|
|
}
|
|
};
|
|
goog.string.amperRe_ = /&/g;
|
|
goog.string.ltRe_ = /</g;
|
|
goog.string.gtRe_ = />/g;
|
|
goog.string.quotRe_ = /\"/g;
|
|
goog.string.allRe_ = /[&<>\"]/;
|
|
goog.string.unescapeEntities = function(str) {
|
|
if(goog.string.contains(str, "&")) {
|
|
if("document" in goog.global) {
|
|
return goog.string.unescapeEntitiesUsingDom_(str)
|
|
}else {
|
|
return goog.string.unescapePureXmlEntities_(str)
|
|
}
|
|
}
|
|
return str
|
|
};
|
|
goog.string.unescapeEntitiesUsingDom_ = function(str) {
|
|
var seen = {"&":"&", "<":"<", ">":">", """:'"'};
|
|
var div = document.createElement("div");
|
|
return str.replace(goog.string.HTML_ENTITY_PATTERN_, function(s, entity) {
|
|
var value = seen[s];
|
|
if(value) {
|
|
return value
|
|
}
|
|
if(entity.charAt(0) == "#") {
|
|
var n = Number("0" + entity.substr(1));
|
|
if(!isNaN(n)) {
|
|
value = String.fromCharCode(n)
|
|
}
|
|
}
|
|
if(!value) {
|
|
div.innerHTML = s + " ";
|
|
value = div.firstChild.nodeValue.slice(0, -1)
|
|
}
|
|
return seen[s] = value
|
|
})
|
|
};
|
|
goog.string.unescapePureXmlEntities_ = function(str) {
|
|
return str.replace(/&([^;]+);/g, function(s, entity) {
|
|
switch(entity) {
|
|
case "amp":
|
|
return"&";
|
|
case "lt":
|
|
return"<";
|
|
case "gt":
|
|
return">";
|
|
case "quot":
|
|
return'"';
|
|
default:
|
|
if(entity.charAt(0) == "#") {
|
|
var n = Number("0" + entity.substr(1));
|
|
if(!isNaN(n)) {
|
|
return String.fromCharCode(n)
|
|
}
|
|
}
|
|
return s
|
|
}
|
|
})
|
|
};
|
|
goog.string.HTML_ENTITY_PATTERN_ = /&([^;\s<&]+);?/g;
|
|
goog.string.whitespaceEscape = function(str, opt_xml) {
|
|
return goog.string.newLineToBr(str.replace(/ /g, "  "), opt_xml)
|
|
};
|
|
goog.string.stripQuotes = function(str, quoteChars) {
|
|
var length = quoteChars.length;
|
|
for(var i = 0;i < length;i++) {
|
|
var quoteChar = length == 1 ? quoteChars : quoteChars.charAt(i);
|
|
if(str.charAt(0) == quoteChar && str.charAt(str.length - 1) == quoteChar) {
|
|
return str.substring(1, str.length - 1)
|
|
}
|
|
}
|
|
return str
|
|
};
|
|
goog.string.truncate = function(str, chars, opt_protectEscapedCharacters) {
|
|
if(opt_protectEscapedCharacters) {
|
|
str = goog.string.unescapeEntities(str)
|
|
}
|
|
if(str.length > chars) {
|
|
str = str.substring(0, chars - 3) + "..."
|
|
}
|
|
if(opt_protectEscapedCharacters) {
|
|
str = goog.string.htmlEscape(str)
|
|
}
|
|
return str
|
|
};
|
|
goog.string.truncateMiddle = function(str, chars, opt_protectEscapedCharacters, opt_trailingChars) {
|
|
if(opt_protectEscapedCharacters) {
|
|
str = goog.string.unescapeEntities(str)
|
|
}
|
|
if(opt_trailingChars && str.length > chars) {
|
|
if(opt_trailingChars > chars) {
|
|
opt_trailingChars = chars
|
|
}
|
|
var endPoint = str.length - opt_trailingChars;
|
|
var startPoint = chars - opt_trailingChars;
|
|
str = str.substring(0, startPoint) + "..." + str.substring(endPoint)
|
|
}else {
|
|
if(str.length > chars) {
|
|
var half = Math.floor(chars / 2);
|
|
var endPos = str.length - half;
|
|
half += chars % 2;
|
|
str = str.substring(0, half) + "..." + str.substring(endPos)
|
|
}
|
|
}
|
|
if(opt_protectEscapedCharacters) {
|
|
str = goog.string.htmlEscape(str)
|
|
}
|
|
return str
|
|
};
|
|
goog.string.specialEscapeChars_ = {"\x00":"\\0", "\b":"\\b", "\f":"\\f", "\n":"\\n", "\r":"\\r", "\t":"\\t", "\x0B":"\\x0B", '"':'\\"', "\\":"\\\\"};
|
|
goog.string.jsEscapeCache_ = {"'":"\\'"};
|
|
goog.string.quote = function(s) {
|
|
s = String(s);
|
|
if(s.quote) {
|
|
return s.quote()
|
|
}else {
|
|
var sb = ['"'];
|
|
for(var i = 0;i < s.length;i++) {
|
|
var ch = s.charAt(i);
|
|
var cc = ch.charCodeAt(0);
|
|
sb[i + 1] = goog.string.specialEscapeChars_[ch] || (cc > 31 && cc < 127 ? ch : goog.string.escapeChar(ch))
|
|
}
|
|
sb.push('"');
|
|
return sb.join("")
|
|
}
|
|
};
|
|
goog.string.escapeString = function(str) {
|
|
var sb = [];
|
|
for(var i = 0;i < str.length;i++) {
|
|
sb[i] = goog.string.escapeChar(str.charAt(i))
|
|
}
|
|
return sb.join("")
|
|
};
|
|
goog.string.escapeChar = function(c) {
|
|
if(c in goog.string.jsEscapeCache_) {
|
|
return goog.string.jsEscapeCache_[c]
|
|
}
|
|
if(c in goog.string.specialEscapeChars_) {
|
|
return goog.string.jsEscapeCache_[c] = goog.string.specialEscapeChars_[c]
|
|
}
|
|
var rv = c;
|
|
var cc = c.charCodeAt(0);
|
|
if(cc > 31 && cc < 127) {
|
|
rv = c
|
|
}else {
|
|
if(cc < 256) {
|
|
rv = "\\x";
|
|
if(cc < 16 || cc > 256) {
|
|
rv += "0"
|
|
}
|
|
}else {
|
|
rv = "\\u";
|
|
if(cc < 4096) {
|
|
rv += "0"
|
|
}
|
|
}
|
|
rv += cc.toString(16).toUpperCase()
|
|
}
|
|
return goog.string.jsEscapeCache_[c] = rv
|
|
};
|
|
goog.string.toMap = function(s) {
|
|
var rv = {};
|
|
for(var i = 0;i < s.length;i++) {
|
|
rv[s.charAt(i)] = true
|
|
}
|
|
return rv
|
|
};
|
|
goog.string.contains = function(s, ss) {
|
|
return s.indexOf(ss) != -1
|
|
};
|
|
goog.string.countOf = function(s, ss) {
|
|
return s && ss ? s.split(ss).length - 1 : 0
|
|
};
|
|
goog.string.removeAt = function(s, index, stringLength) {
|
|
var resultStr = s;
|
|
if(index >= 0 && index < s.length && stringLength > 0) {
|
|
resultStr = s.substr(0, index) + s.substr(index + stringLength, s.length - index - stringLength)
|
|
}
|
|
return resultStr
|
|
};
|
|
goog.string.remove = function(s, ss) {
|
|
var re = new RegExp(goog.string.regExpEscape(ss), "");
|
|
return s.replace(re, "")
|
|
};
|
|
goog.string.removeAll = function(s, ss) {
|
|
var re = new RegExp(goog.string.regExpEscape(ss), "g");
|
|
return s.replace(re, "")
|
|
};
|
|
goog.string.regExpEscape = function(s) {
|
|
return String(s).replace(/([-()\[\]{}+?*.$\^|,:#<!\\])/g, "\\$1").replace(/\x08/g, "\\x08")
|
|
};
|
|
goog.string.repeat = function(string, length) {
|
|
return(new Array(length + 1)).join(string)
|
|
};
|
|
goog.string.padNumber = function(num, length, opt_precision) {
|
|
var s = goog.isDef(opt_precision) ? num.toFixed(opt_precision) : String(num);
|
|
var index = s.indexOf(".");
|
|
if(index == -1) {
|
|
index = s.length
|
|
}
|
|
return goog.string.repeat("0", Math.max(0, length - index)) + s
|
|
};
|
|
goog.string.makeSafe = function(obj) {
|
|
return obj == null ? "" : String(obj)
|
|
};
|
|
goog.string.buildString = function(var_args) {
|
|
return Array.prototype.join.call(arguments, "")
|
|
};
|
|
goog.string.getRandomString = function() {
|
|
var x = 2147483648;
|
|
return Math.floor(Math.random() * x).toString(36) + Math.abs(Math.floor(Math.random() * x) ^ goog.now()).toString(36)
|
|
};
|
|
goog.string.compareVersions = function(version1, version2) {
|
|
var order = 0;
|
|
var v1Subs = goog.string.trim(String(version1)).split(".");
|
|
var v2Subs = goog.string.trim(String(version2)).split(".");
|
|
var subCount = Math.max(v1Subs.length, v2Subs.length);
|
|
for(var subIdx = 0;order == 0 && subIdx < subCount;subIdx++) {
|
|
var v1Sub = v1Subs[subIdx] || "";
|
|
var v2Sub = v2Subs[subIdx] || "";
|
|
var v1CompParser = new RegExp("(\\d*)(\\D*)", "g");
|
|
var v2CompParser = new RegExp("(\\d*)(\\D*)", "g");
|
|
do {
|
|
var v1Comp = v1CompParser.exec(v1Sub) || ["", "", ""];
|
|
var v2Comp = v2CompParser.exec(v2Sub) || ["", "", ""];
|
|
if(v1Comp[0].length == 0 && v2Comp[0].length == 0) {
|
|
break
|
|
}
|
|
var v1CompNum = v1Comp[1].length == 0 ? 0 : parseInt(v1Comp[1], 10);
|
|
var v2CompNum = v2Comp[1].length == 0 ? 0 : parseInt(v2Comp[1], 10);
|
|
order = goog.string.compareElements_(v1CompNum, v2CompNum) || goog.string.compareElements_(v1Comp[2].length == 0, v2Comp[2].length == 0) || goog.string.compareElements_(v1Comp[2], v2Comp[2])
|
|
}while(order == 0)
|
|
}
|
|
return order
|
|
};
|
|
goog.string.compareElements_ = function(left, right) {
|
|
if(left < right) {
|
|
return-1
|
|
}else {
|
|
if(left > right) {
|
|
return 1
|
|
}
|
|
}
|
|
return 0
|
|
};
|
|
goog.string.HASHCODE_MAX_ = 4294967296;
|
|
goog.string.hashCode = function(str) {
|
|
var result = 0;
|
|
for(var i = 0;i < str.length;++i) {
|
|
result = 31 * result + str.charCodeAt(i);
|
|
result %= goog.string.HASHCODE_MAX_
|
|
}
|
|
return result
|
|
};
|
|
goog.string.uniqueStringCounter_ = Math.random() * 2147483648 | 0;
|
|
goog.string.createUniqueString = function() {
|
|
return"goog_" + goog.string.uniqueStringCounter_++
|
|
};
|
|
goog.string.toNumber = function(str) {
|
|
var num = Number(str);
|
|
if(num == 0 && goog.string.isEmpty(str)) {
|
|
return NaN
|
|
}
|
|
return num
|
|
};
|
|
goog.string.toCamelCase = function(str) {
|
|
return String(str).replace(/\-([a-z])/g, function(all, match) {
|
|
return match.toUpperCase()
|
|
})
|
|
};
|
|
goog.string.toSelectorCase = function(str) {
|
|
return String(str).replace(/([A-Z])/g, "-$1").toLowerCase()
|
|
};
|
|
goog.string.toTitleCase = function(str, opt_delimiters) {
|
|
var delimiters = goog.isString(opt_delimiters) ? goog.string.regExpEscape(opt_delimiters) : "\\s";
|
|
delimiters = delimiters ? "|[" + delimiters + "]+" : "";
|
|
var regexp = new RegExp("(^" + delimiters + ")([a-z])", "g");
|
|
return str.replace(regexp, function(all, p1, p2) {
|
|
return p1 + p2.toUpperCase()
|
|
})
|
|
};
|
|
goog.string.parseInt = function(value) {
|
|
if(isFinite(value)) {
|
|
value = String(value)
|
|
}
|
|
if(goog.isString(value)) {
|
|
return/^\s*-?0x/i.test(value) ? parseInt(value, 16) : parseInt(value, 10)
|
|
}
|
|
return NaN
|
|
};
|
|
goog.provide("goog.debug.Error");
|
|
goog.debug.Error = function(opt_msg) {
|
|
if(Error.captureStackTrace) {
|
|
Error.captureStackTrace(this, goog.debug.Error)
|
|
}else {
|
|
this.stack = (new Error).stack || ""
|
|
}
|
|
if(opt_msg) {
|
|
this.message = String(opt_msg)
|
|
}
|
|
};
|
|
goog.inherits(goog.debug.Error, Error);
|
|
goog.debug.Error.prototype.name = "CustomError";
|
|
goog.provide("goog.asserts");
|
|
goog.provide("goog.asserts.AssertionError");
|
|
goog.require("goog.debug.Error");
|
|
goog.require("goog.string");
|
|
goog.asserts.ENABLE_ASSERTS = goog.DEBUG;
|
|
goog.asserts.AssertionError = function(messagePattern, messageArgs) {
|
|
messageArgs.unshift(messagePattern);
|
|
goog.debug.Error.call(this, goog.string.subs.apply(null, messageArgs));
|
|
messageArgs.shift();
|
|
this.messagePattern = messagePattern
|
|
};
|
|
goog.inherits(goog.asserts.AssertionError, goog.debug.Error);
|
|
goog.asserts.AssertionError.prototype.name = "AssertionError";
|
|
goog.asserts.doAssertFailure_ = function(defaultMessage, defaultArgs, givenMessage, givenArgs) {
|
|
var message = "Assertion failed";
|
|
if(givenMessage) {
|
|
message += ": " + givenMessage;
|
|
var args = givenArgs
|
|
}else {
|
|
if(defaultMessage) {
|
|
message += ": " + defaultMessage;
|
|
args = defaultArgs
|
|
}
|
|
}
|
|
throw new goog.asserts.AssertionError("" + message, args || []);
|
|
};
|
|
goog.asserts.assert = function(condition, opt_message, var_args) {
|
|
if(goog.asserts.ENABLE_ASSERTS && !condition) {
|
|
goog.asserts.doAssertFailure_("", null, opt_message, Array.prototype.slice.call(arguments, 2))
|
|
}
|
|
return condition
|
|
};
|
|
goog.asserts.fail = function(opt_message, var_args) {
|
|
if(goog.asserts.ENABLE_ASSERTS) {
|
|
throw new goog.asserts.AssertionError("Failure" + (opt_message ? ": " + opt_message : ""), Array.prototype.slice.call(arguments, 1));
|
|
}
|
|
};
|
|
goog.asserts.assertNumber = function(value, opt_message, var_args) {
|
|
if(goog.asserts.ENABLE_ASSERTS && !goog.isNumber(value)) {
|
|
goog.asserts.doAssertFailure_("Expected number but got %s: %s.", [goog.typeOf(value), value], opt_message, Array.prototype.slice.call(arguments, 2))
|
|
}
|
|
return value
|
|
};
|
|
goog.asserts.assertString = function(value, opt_message, var_args) {
|
|
if(goog.asserts.ENABLE_ASSERTS && !goog.isString(value)) {
|
|
goog.asserts.doAssertFailure_("Expected string but got %s: %s.", [goog.typeOf(value), value], opt_message, Array.prototype.slice.call(arguments, 2))
|
|
}
|
|
return value
|
|
};
|
|
goog.asserts.assertFunction = function(value, opt_message, var_args) {
|
|
if(goog.asserts.ENABLE_ASSERTS && !goog.isFunction(value)) {
|
|
goog.asserts.doAssertFailure_("Expected function but got %s: %s.", [goog.typeOf(value), value], opt_message, Array.prototype.slice.call(arguments, 2))
|
|
}
|
|
return value
|
|
};
|
|
goog.asserts.assertObject = function(value, opt_message, var_args) {
|
|
if(goog.asserts.ENABLE_ASSERTS && !goog.isObject(value)) {
|
|
goog.asserts.doAssertFailure_("Expected object but got %s: %s.", [goog.typeOf(value), value], opt_message, Array.prototype.slice.call(arguments, 2))
|
|
}
|
|
return value
|
|
};
|
|
goog.asserts.assertArray = function(value, opt_message, var_args) {
|
|
if(goog.asserts.ENABLE_ASSERTS && !goog.isArray(value)) {
|
|
goog.asserts.doAssertFailure_("Expected array but got %s: %s.", [goog.typeOf(value), value], opt_message, Array.prototype.slice.call(arguments, 2))
|
|
}
|
|
return value
|
|
};
|
|
goog.asserts.assertBoolean = function(value, opt_message, var_args) {
|
|
if(goog.asserts.ENABLE_ASSERTS && !goog.isBoolean(value)) {
|
|
goog.asserts.doAssertFailure_("Expected boolean but got %s: %s.", [goog.typeOf(value), value], opt_message, Array.prototype.slice.call(arguments, 2))
|
|
}
|
|
return value
|
|
};
|
|
goog.asserts.assertInstanceof = function(value, type, opt_message, var_args) {
|
|
if(goog.asserts.ENABLE_ASSERTS && !(value instanceof type)) {
|
|
goog.asserts.doAssertFailure_("instanceof check failed.", null, opt_message, Array.prototype.slice.call(arguments, 3))
|
|
}
|
|
return value
|
|
};
|
|
goog.provide("goog.array");
|
|
goog.provide("goog.array.ArrayLike");
|
|
goog.require("goog.asserts");
|
|
goog.NATIVE_ARRAY_PROTOTYPES = true;
|
|
goog.array.ArrayLike;
|
|
goog.array.peek = function(array) {
|
|
return array[array.length - 1]
|
|
};
|
|
goog.array.ARRAY_PROTOTYPE_ = Array.prototype;
|
|
goog.array.indexOf = goog.NATIVE_ARRAY_PROTOTYPES && goog.array.ARRAY_PROTOTYPE_.indexOf ? function(arr, obj, opt_fromIndex) {
|
|
goog.asserts.assert(arr.length != null);
|
|
return goog.array.ARRAY_PROTOTYPE_.indexOf.call(arr, obj, opt_fromIndex)
|
|
} : function(arr, obj, opt_fromIndex) {
|
|
var fromIndex = opt_fromIndex == null ? 0 : opt_fromIndex < 0 ? Math.max(0, arr.length + opt_fromIndex) : opt_fromIndex;
|
|
if(goog.isString(arr)) {
|
|
if(!goog.isString(obj) || obj.length != 1) {
|
|
return-1
|
|
}
|
|
return arr.indexOf(obj, fromIndex)
|
|
}
|
|
for(var i = fromIndex;i < arr.length;i++) {
|
|
if(i in arr && arr[i] === obj) {
|
|
return i
|
|
}
|
|
}
|
|
return-1
|
|
};
|
|
goog.array.lastIndexOf = goog.NATIVE_ARRAY_PROTOTYPES && goog.array.ARRAY_PROTOTYPE_.lastIndexOf ? function(arr, obj, opt_fromIndex) {
|
|
goog.asserts.assert(arr.length != null);
|
|
var fromIndex = opt_fromIndex == null ? arr.length - 1 : opt_fromIndex;
|
|
return goog.array.ARRAY_PROTOTYPE_.lastIndexOf.call(arr, obj, fromIndex)
|
|
} : function(arr, obj, opt_fromIndex) {
|
|
var fromIndex = opt_fromIndex == null ? arr.length - 1 : opt_fromIndex;
|
|
if(fromIndex < 0) {
|
|
fromIndex = Math.max(0, arr.length + fromIndex)
|
|
}
|
|
if(goog.isString(arr)) {
|
|
if(!goog.isString(obj) || obj.length != 1) {
|
|
return-1
|
|
}
|
|
return arr.lastIndexOf(obj, fromIndex)
|
|
}
|
|
for(var i = fromIndex;i >= 0;i--) {
|
|
if(i in arr && arr[i] === obj) {
|
|
return i
|
|
}
|
|
}
|
|
return-1
|
|
};
|
|
goog.array.forEach = goog.NATIVE_ARRAY_PROTOTYPES && goog.array.ARRAY_PROTOTYPE_.forEach ? function(arr, f, opt_obj) {
|
|
goog.asserts.assert(arr.length != null);
|
|
goog.array.ARRAY_PROTOTYPE_.forEach.call(arr, f, opt_obj)
|
|
} : function(arr, f, opt_obj) {
|
|
var l = arr.length;
|
|
var arr2 = goog.isString(arr) ? arr.split("") : arr;
|
|
for(var i = 0;i < l;i++) {
|
|
if(i in arr2) {
|
|
f.call(opt_obj, arr2[i], i, arr)
|
|
}
|
|
}
|
|
};
|
|
goog.array.forEachRight = function(arr, f, opt_obj) {
|
|
var l = arr.length;
|
|
var arr2 = goog.isString(arr) ? arr.split("") : arr;
|
|
for(var i = l - 1;i >= 0;--i) {
|
|
if(i in arr2) {
|
|
f.call(opt_obj, arr2[i], i, arr)
|
|
}
|
|
}
|
|
};
|
|
goog.array.filter = goog.NATIVE_ARRAY_PROTOTYPES && goog.array.ARRAY_PROTOTYPE_.filter ? function(arr, f, opt_obj) {
|
|
goog.asserts.assert(arr.length != null);
|
|
return goog.array.ARRAY_PROTOTYPE_.filter.call(arr, f, opt_obj)
|
|
} : function(arr, f, opt_obj) {
|
|
var l = arr.length;
|
|
var res = [];
|
|
var resLength = 0;
|
|
var arr2 = goog.isString(arr) ? arr.split("") : arr;
|
|
for(var i = 0;i < l;i++) {
|
|
if(i in arr2) {
|
|
var val = arr2[i];
|
|
if(f.call(opt_obj, val, i, arr)) {
|
|
res[resLength++] = val
|
|
}
|
|
}
|
|
}
|
|
return res
|
|
};
|
|
goog.array.map = goog.NATIVE_ARRAY_PROTOTYPES && goog.array.ARRAY_PROTOTYPE_.map ? function(arr, f, opt_obj) {
|
|
goog.asserts.assert(arr.length != null);
|
|
return goog.array.ARRAY_PROTOTYPE_.map.call(arr, f, opt_obj)
|
|
} : function(arr, f, opt_obj) {
|
|
var l = arr.length;
|
|
var res = new Array(l);
|
|
var arr2 = goog.isString(arr) ? arr.split("") : arr;
|
|
for(var i = 0;i < l;i++) {
|
|
if(i in arr2) {
|
|
res[i] = f.call(opt_obj, arr2[i], i, arr)
|
|
}
|
|
}
|
|
return res
|
|
};
|
|
goog.array.reduce = function(arr, f, val, opt_obj) {
|
|
if(arr.reduce) {
|
|
if(opt_obj) {
|
|
return arr.reduce(goog.bind(f, opt_obj), val)
|
|
}else {
|
|
return arr.reduce(f, val)
|
|
}
|
|
}
|
|
var rval = val;
|
|
goog.array.forEach(arr, function(val, index) {
|
|
rval = f.call(opt_obj, rval, val, index, arr)
|
|
});
|
|
return rval
|
|
};
|
|
goog.array.reduceRight = function(arr, f, val, opt_obj) {
|
|
if(arr.reduceRight) {
|
|
if(opt_obj) {
|
|
return arr.reduceRight(goog.bind(f, opt_obj), val)
|
|
}else {
|
|
return arr.reduceRight(f, val)
|
|
}
|
|
}
|
|
var rval = val;
|
|
goog.array.forEachRight(arr, function(val, index) {
|
|
rval = f.call(opt_obj, rval, val, index, arr)
|
|
});
|
|
return rval
|
|
};
|
|
goog.array.some = goog.NATIVE_ARRAY_PROTOTYPES && goog.array.ARRAY_PROTOTYPE_.some ? function(arr, f, opt_obj) {
|
|
goog.asserts.assert(arr.length != null);
|
|
return goog.array.ARRAY_PROTOTYPE_.some.call(arr, f, opt_obj)
|
|
} : function(arr, f, opt_obj) {
|
|
var l = arr.length;
|
|
var arr2 = goog.isString(arr) ? arr.split("") : arr;
|
|
for(var i = 0;i < l;i++) {
|
|
if(i in arr2 && f.call(opt_obj, arr2[i], i, arr)) {
|
|
return true
|
|
}
|
|
}
|
|
return false
|
|
};
|
|
goog.array.every = goog.NATIVE_ARRAY_PROTOTYPES && goog.array.ARRAY_PROTOTYPE_.every ? function(arr, f, opt_obj) {
|
|
goog.asserts.assert(arr.length != null);
|
|
return goog.array.ARRAY_PROTOTYPE_.every.call(arr, f, opt_obj)
|
|
} : function(arr, f, opt_obj) {
|
|
var l = arr.length;
|
|
var arr2 = goog.isString(arr) ? arr.split("") : arr;
|
|
for(var i = 0;i < l;i++) {
|
|
if(i in arr2 && !f.call(opt_obj, arr2[i], i, arr)) {
|
|
return false
|
|
}
|
|
}
|
|
return true
|
|
};
|
|
goog.array.find = function(arr, f, opt_obj) {
|
|
var i = goog.array.findIndex(arr, f, opt_obj);
|
|
return i < 0 ? null : goog.isString(arr) ? arr.charAt(i) : arr[i]
|
|
};
|
|
goog.array.findIndex = function(arr, f, opt_obj) {
|
|
var l = arr.length;
|
|
var arr2 = goog.isString(arr) ? arr.split("") : arr;
|
|
for(var i = 0;i < l;i++) {
|
|
if(i in arr2 && f.call(opt_obj, arr2[i], i, arr)) {
|
|
return i
|
|
}
|
|
}
|
|
return-1
|
|
};
|
|
goog.array.findRight = function(arr, f, opt_obj) {
|
|
var i = goog.array.findIndexRight(arr, f, opt_obj);
|
|
return i < 0 ? null : goog.isString(arr) ? arr.charAt(i) : arr[i]
|
|
};
|
|
goog.array.findIndexRight = function(arr, f, opt_obj) {
|
|
var l = arr.length;
|
|
var arr2 = goog.isString(arr) ? arr.split("") : arr;
|
|
for(var i = l - 1;i >= 0;i--) {
|
|
if(i in arr2 && f.call(opt_obj, arr2[i], i, arr)) {
|
|
return i
|
|
}
|
|
}
|
|
return-1
|
|
};
|
|
goog.array.contains = function(arr, obj) {
|
|
return goog.array.indexOf(arr, obj) >= 0
|
|
};
|
|
goog.array.isEmpty = function(arr) {
|
|
return arr.length == 0
|
|
};
|
|
goog.array.clear = function(arr) {
|
|
if(!goog.isArray(arr)) {
|
|
for(var i = arr.length - 1;i >= 0;i--) {
|
|
delete arr[i]
|
|
}
|
|
}
|
|
arr.length = 0
|
|
};
|
|
goog.array.insert = function(arr, obj) {
|
|
if(!goog.array.contains(arr, obj)) {
|
|
arr.push(obj)
|
|
}
|
|
};
|
|
goog.array.insertAt = function(arr, obj, opt_i) {
|
|
goog.array.splice(arr, opt_i, 0, obj)
|
|
};
|
|
goog.array.insertArrayAt = function(arr, elementsToAdd, opt_i) {
|
|
goog.partial(goog.array.splice, arr, opt_i, 0).apply(null, elementsToAdd)
|
|
};
|
|
goog.array.insertBefore = function(arr, obj, opt_obj2) {
|
|
var i;
|
|
if(arguments.length == 2 || (i = goog.array.indexOf(arr, opt_obj2)) < 0) {
|
|
arr.push(obj)
|
|
}else {
|
|
goog.array.insertAt(arr, obj, i)
|
|
}
|
|
};
|
|
goog.array.remove = function(arr, obj) {
|
|
var i = goog.array.indexOf(arr, obj);
|
|
var rv;
|
|
if(rv = i >= 0) {
|
|
goog.array.removeAt(arr, i)
|
|
}
|
|
return rv
|
|
};
|
|
goog.array.removeAt = function(arr, i) {
|
|
goog.asserts.assert(arr.length != null);
|
|
return goog.array.ARRAY_PROTOTYPE_.splice.call(arr, i, 1).length == 1
|
|
};
|
|
goog.array.removeIf = function(arr, f, opt_obj) {
|
|
var i = goog.array.findIndex(arr, f, opt_obj);
|
|
if(i >= 0) {
|
|
goog.array.removeAt(arr, i);
|
|
return true
|
|
}
|
|
return false
|
|
};
|
|
goog.array.concat = function(var_args) {
|
|
return goog.array.ARRAY_PROTOTYPE_.concat.apply(goog.array.ARRAY_PROTOTYPE_, arguments)
|
|
};
|
|
goog.array.toArray = function(object) {
|
|
var length = object.length;
|
|
if(length > 0) {
|
|
var rv = new Array(length);
|
|
for(var i = 0;i < length;i++) {
|
|
rv[i] = object[i]
|
|
}
|
|
return rv
|
|
}
|
|
return[]
|
|
};
|
|
goog.array.clone = goog.array.toArray;
|
|
goog.array.extend = function(arr1, var_args) {
|
|
for(var i = 1;i < arguments.length;i++) {
|
|
var arr2 = arguments[i];
|
|
var isArrayLike;
|
|
if(goog.isArray(arr2) || (isArrayLike = goog.isArrayLike(arr2)) && arr2.hasOwnProperty("callee")) {
|
|
arr1.push.apply(arr1, arr2)
|
|
}else {
|
|
if(isArrayLike) {
|
|
var len1 = arr1.length;
|
|
var len2 = arr2.length;
|
|
for(var j = 0;j < len2;j++) {
|
|
arr1[len1 + j] = arr2[j]
|
|
}
|
|
}else {
|
|
arr1.push(arr2)
|
|
}
|
|
}
|
|
}
|
|
};
|
|
goog.array.splice = function(arr, index, howMany, var_args) {
|
|
goog.asserts.assert(arr.length != null);
|
|
return goog.array.ARRAY_PROTOTYPE_.splice.apply(arr, goog.array.slice(arguments, 1))
|
|
};
|
|
goog.array.slice = function(arr, start, opt_end) {
|
|
goog.asserts.assert(arr.length != null);
|
|
if(arguments.length <= 2) {
|
|
return goog.array.ARRAY_PROTOTYPE_.slice.call(arr, start)
|
|
}else {
|
|
return goog.array.ARRAY_PROTOTYPE_.slice.call(arr, start, opt_end)
|
|
}
|
|
};
|
|
goog.array.removeDuplicates = function(arr, opt_rv) {
|
|
var returnArray = opt_rv || arr;
|
|
var seen = {}, cursorInsert = 0, cursorRead = 0;
|
|
while(cursorRead < arr.length) {
|
|
var current = arr[cursorRead++];
|
|
var key = goog.isObject(current) ? "o" + goog.getUid(current) : (typeof current).charAt(0) + current;
|
|
if(!Object.prototype.hasOwnProperty.call(seen, key)) {
|
|
seen[key] = true;
|
|
returnArray[cursorInsert++] = current
|
|
}
|
|
}
|
|
returnArray.length = cursorInsert
|
|
};
|
|
goog.array.binarySearch = function(arr, target, opt_compareFn) {
|
|
return goog.array.binarySearch_(arr, opt_compareFn || goog.array.defaultCompare, false, target)
|
|
};
|
|
goog.array.binarySelect = function(arr, evaluator, opt_obj) {
|
|
return goog.array.binarySearch_(arr, evaluator, true, undefined, opt_obj)
|
|
};
|
|
goog.array.binarySearch_ = function(arr, compareFn, isEvaluator, opt_target, opt_selfObj) {
|
|
var left = 0;
|
|
var right = arr.length;
|
|
var found;
|
|
while(left < right) {
|
|
var middle = left + right >> 1;
|
|
var compareResult;
|
|
if(isEvaluator) {
|
|
compareResult = compareFn.call(opt_selfObj, arr[middle], middle, arr)
|
|
}else {
|
|
compareResult = compareFn(opt_target, arr[middle])
|
|
}
|
|
if(compareResult > 0) {
|
|
left = middle + 1
|
|
}else {
|
|
right = middle;
|
|
found = !compareResult
|
|
}
|
|
}
|
|
return found ? left : ~left
|
|
};
|
|
goog.array.sort = function(arr, opt_compareFn) {
|
|
goog.asserts.assert(arr.length != null);
|
|
goog.array.ARRAY_PROTOTYPE_.sort.call(arr, opt_compareFn || goog.array.defaultCompare)
|
|
};
|
|
goog.array.stableSort = function(arr, opt_compareFn) {
|
|
for(var i = 0;i < arr.length;i++) {
|
|
arr[i] = {index:i, value:arr[i]}
|
|
}
|
|
var valueCompareFn = opt_compareFn || goog.array.defaultCompare;
|
|
function stableCompareFn(obj1, obj2) {
|
|
return valueCompareFn(obj1.value, obj2.value) || obj1.index - obj2.index
|
|
}
|
|
goog.array.sort(arr, stableCompareFn);
|
|
for(var i = 0;i < arr.length;i++) {
|
|
arr[i] = arr[i].value
|
|
}
|
|
};
|
|
goog.array.sortObjectsByKey = function(arr, key, opt_compareFn) {
|
|
var compare = opt_compareFn || goog.array.defaultCompare;
|
|
goog.array.sort(arr, function(a, b) {
|
|
return compare(a[key], b[key])
|
|
})
|
|
};
|
|
goog.array.isSorted = function(arr, opt_compareFn, opt_strict) {
|
|
var compare = opt_compareFn || goog.array.defaultCompare;
|
|
for(var i = 1;i < arr.length;i++) {
|
|
var compareResult = compare(arr[i - 1], arr[i]);
|
|
if(compareResult > 0 || compareResult == 0 && opt_strict) {
|
|
return false
|
|
}
|
|
}
|
|
return true
|
|
};
|
|
goog.array.equals = function(arr1, arr2, opt_equalsFn) {
|
|
if(!goog.isArrayLike(arr1) || !goog.isArrayLike(arr2) || arr1.length != arr2.length) {
|
|
return false
|
|
}
|
|
var l = arr1.length;
|
|
var equalsFn = opt_equalsFn || goog.array.defaultCompareEquality;
|
|
for(var i = 0;i < l;i++) {
|
|
if(!equalsFn(arr1[i], arr2[i])) {
|
|
return false
|
|
}
|
|
}
|
|
return true
|
|
};
|
|
goog.array.compare = function(arr1, arr2, opt_equalsFn) {
|
|
return goog.array.equals(arr1, arr2, opt_equalsFn)
|
|
};
|
|
goog.array.compare3 = function(arr1, arr2, opt_compareFn) {
|
|
var compare = opt_compareFn || goog.array.defaultCompare;
|
|
var l = Math.min(arr1.length, arr2.length);
|
|
for(var i = 0;i < l;i++) {
|
|
var result = compare(arr1[i], arr2[i]);
|
|
if(result != 0) {
|
|
return result
|
|
}
|
|
}
|
|
return goog.array.defaultCompare(arr1.length, arr2.length)
|
|
};
|
|
goog.array.defaultCompare = function(a, b) {
|
|
return a > b ? 1 : a < b ? -1 : 0
|
|
};
|
|
goog.array.defaultCompareEquality = function(a, b) {
|
|
return a === b
|
|
};
|
|
goog.array.binaryInsert = function(array, value, opt_compareFn) {
|
|
var index = goog.array.binarySearch(array, value, opt_compareFn);
|
|
if(index < 0) {
|
|
goog.array.insertAt(array, value, -(index + 1));
|
|
return true
|
|
}
|
|
return false
|
|
};
|
|
goog.array.binaryRemove = function(array, value, opt_compareFn) {
|
|
var index = goog.array.binarySearch(array, value, opt_compareFn);
|
|
return index >= 0 ? goog.array.removeAt(array, index) : false
|
|
};
|
|
goog.array.bucket = function(array, sorter) {
|
|
var buckets = {};
|
|
for(var i = 0;i < array.length;i++) {
|
|
var value = array[i];
|
|
var key = sorter(value, i, array);
|
|
if(goog.isDef(key)) {
|
|
var bucket = buckets[key] || (buckets[key] = []);
|
|
bucket.push(value)
|
|
}
|
|
}
|
|
return buckets
|
|
};
|
|
goog.array.repeat = function(value, n) {
|
|
var array = [];
|
|
for(var i = 0;i < n;i++) {
|
|
array[i] = value
|
|
}
|
|
return array
|
|
};
|
|
goog.array.flatten = function(var_args) {
|
|
var result = [];
|
|
for(var i = 0;i < arguments.length;i++) {
|
|
var element = arguments[i];
|
|
if(goog.isArray(element)) {
|
|
result.push.apply(result, goog.array.flatten.apply(null, element))
|
|
}else {
|
|
result.push(element)
|
|
}
|
|
}
|
|
return result
|
|
};
|
|
goog.array.rotate = function(array, n) {
|
|
goog.asserts.assert(array.length != null);
|
|
if(array.length) {
|
|
n %= array.length;
|
|
if(n > 0) {
|
|
goog.array.ARRAY_PROTOTYPE_.unshift.apply(array, array.splice(-n, n))
|
|
}else {
|
|
if(n < 0) {
|
|
goog.array.ARRAY_PROTOTYPE_.push.apply(array, array.splice(0, -n))
|
|
}
|
|
}
|
|
}
|
|
return array
|
|
};
|
|
goog.array.zip = function(var_args) {
|
|
if(!arguments.length) {
|
|
return[]
|
|
}
|
|
var result = [];
|
|
for(var i = 0;true;i++) {
|
|
var value = [];
|
|
for(var j = 0;j < arguments.length;j++) {
|
|
var arr = arguments[j];
|
|
if(i >= arr.length) {
|
|
return result
|
|
}
|
|
value.push(arr[i])
|
|
}
|
|
result.push(value)
|
|
}
|
|
};
|
|
goog.array.shuffle = function(arr, opt_randFn) {
|
|
var randFn = opt_randFn || Math.random;
|
|
for(var i = arr.length - 1;i > 0;i--) {
|
|
var j = Math.floor(randFn() * (i + 1));
|
|
var tmp = arr[i];
|
|
arr[i] = arr[j];
|
|
arr[j] = tmp
|
|
}
|
|
};
|
|
goog.provide("goog.object");
|
|
goog.object.forEach = function(obj, f, opt_obj) {
|
|
for(var key in obj) {
|
|
f.call(opt_obj, obj[key], key, obj)
|
|
}
|
|
};
|
|
goog.object.filter = function(obj, f, opt_obj) {
|
|
var res = {};
|
|
for(var key in obj) {
|
|
if(f.call(opt_obj, obj[key], key, obj)) {
|
|
res[key] = obj[key]
|
|
}
|
|
}
|
|
return res
|
|
};
|
|
goog.object.map = function(obj, f, opt_obj) {
|
|
var res = {};
|
|
for(var key in obj) {
|
|
res[key] = f.call(opt_obj, obj[key], key, obj)
|
|
}
|
|
return res
|
|
};
|
|
goog.object.some = function(obj, f, opt_obj) {
|
|
for(var key in obj) {
|
|
if(f.call(opt_obj, obj[key], key, obj)) {
|
|
return true
|
|
}
|
|
}
|
|
return false
|
|
};
|
|
goog.object.every = function(obj, f, opt_obj) {
|
|
for(var key in obj) {
|
|
if(!f.call(opt_obj, obj[key], key, obj)) {
|
|
return false
|
|
}
|
|
}
|
|
return true
|
|
};
|
|
goog.object.getCount = function(obj) {
|
|
var rv = 0;
|
|
for(var key in obj) {
|
|
rv++
|
|
}
|
|
return rv
|
|
};
|
|
goog.object.getAnyKey = function(obj) {
|
|
for(var key in obj) {
|
|
return key
|
|
}
|
|
};
|
|
goog.object.getAnyValue = function(obj) {
|
|
for(var key in obj) {
|
|
return obj[key]
|
|
}
|
|
};
|
|
goog.object.contains = function(obj, val) {
|
|
return goog.object.containsValue(obj, val)
|
|
};
|
|
goog.object.getValues = function(obj) {
|
|
var res = [];
|
|
var i = 0;
|
|
for(var key in obj) {
|
|
res[i++] = obj[key]
|
|
}
|
|
return res
|
|
};
|
|
goog.object.getKeys = function(obj) {
|
|
var res = [];
|
|
var i = 0;
|
|
for(var key in obj) {
|
|
res[i++] = key
|
|
}
|
|
return res
|
|
};
|
|
goog.object.getValueByKeys = function(obj, var_args) {
|
|
var isArrayLike = goog.isArrayLike(var_args);
|
|
var keys = isArrayLike ? var_args : arguments;
|
|
for(var i = isArrayLike ? 0 : 1;i < keys.length;i++) {
|
|
obj = obj[keys[i]];
|
|
if(!goog.isDef(obj)) {
|
|
break
|
|
}
|
|
}
|
|
return obj
|
|
};
|
|
goog.object.containsKey = function(obj, key) {
|
|
return key in obj
|
|
};
|
|
goog.object.containsValue = function(obj, val) {
|
|
for(var key in obj) {
|
|
if(obj[key] == val) {
|
|
return true
|
|
}
|
|
}
|
|
return false
|
|
};
|
|
goog.object.findKey = function(obj, f, opt_this) {
|
|
for(var key in obj) {
|
|
if(f.call(opt_this, obj[key], key, obj)) {
|
|
return key
|
|
}
|
|
}
|
|
return undefined
|
|
};
|
|
goog.object.findValue = function(obj, f, opt_this) {
|
|
var key = goog.object.findKey(obj, f, opt_this);
|
|
return key && obj[key]
|
|
};
|
|
goog.object.isEmpty = function(obj) {
|
|
for(var key in obj) {
|
|
return false
|
|
}
|
|
return true
|
|
};
|
|
goog.object.clear = function(obj) {
|
|
for(var i in obj) {
|
|
delete obj[i]
|
|
}
|
|
};
|
|
goog.object.remove = function(obj, key) {
|
|
var rv;
|
|
if(rv = key in obj) {
|
|
delete obj[key]
|
|
}
|
|
return rv
|
|
};
|
|
goog.object.add = function(obj, key, val) {
|
|
if(key in obj) {
|
|
throw Error('The object already contains the key "' + key + '"');
|
|
}
|
|
goog.object.set(obj, key, val)
|
|
};
|
|
goog.object.get = function(obj, key, opt_val) {
|
|
if(key in obj) {
|
|
return obj[key]
|
|
}
|
|
return opt_val
|
|
};
|
|
goog.object.set = function(obj, key, value) {
|
|
obj[key] = value
|
|
};
|
|
goog.object.setIfUndefined = function(obj, key, value) {
|
|
return key in obj ? obj[key] : obj[key] = value
|
|
};
|
|
goog.object.clone = function(obj) {
|
|
var res = {};
|
|
for(var key in obj) {
|
|
res[key] = obj[key]
|
|
}
|
|
return res
|
|
};
|
|
goog.object.unsafeClone = function(obj) {
|
|
var type = goog.typeOf(obj);
|
|
if(type == "object" || type == "array") {
|
|
if(obj.clone) {
|
|
return obj.clone()
|
|
}
|
|
var clone = type == "array" ? [] : {};
|
|
for(var key in obj) {
|
|
clone[key] = goog.object.unsafeClone(obj[key])
|
|
}
|
|
return clone
|
|
}
|
|
return obj
|
|
};
|
|
goog.object.transpose = function(obj) {
|
|
var transposed = {};
|
|
for(var key in obj) {
|
|
transposed[obj[key]] = key
|
|
}
|
|
return transposed
|
|
};
|
|
goog.object.PROTOTYPE_FIELDS_ = ["constructor", "hasOwnProperty", "isPrototypeOf", "propertyIsEnumerable", "toLocaleString", "toString", "valueOf"];
|
|
goog.object.extend = function(target, var_args) {
|
|
var key, source;
|
|
for(var i = 1;i < arguments.length;i++) {
|
|
source = arguments[i];
|
|
for(key in source) {
|
|
target[key] = source[key]
|
|
}
|
|
for(var j = 0;j < goog.object.PROTOTYPE_FIELDS_.length;j++) {
|
|
key = goog.object.PROTOTYPE_FIELDS_[j];
|
|
if(Object.prototype.hasOwnProperty.call(source, key)) {
|
|
target[key] = source[key]
|
|
}
|
|
}
|
|
}
|
|
};
|
|
goog.object.create = function(var_args) {
|
|
var argLength = arguments.length;
|
|
if(argLength == 1 && goog.isArray(arguments[0])) {
|
|
return goog.object.create.apply(null, arguments[0])
|
|
}
|
|
if(argLength % 2) {
|
|
throw Error("Uneven number of arguments");
|
|
}
|
|
var rv = {};
|
|
for(var i = 0;i < argLength;i += 2) {
|
|
rv[arguments[i]] = arguments[i + 1]
|
|
}
|
|
return rv
|
|
};
|
|
goog.object.createSet = function(var_args) {
|
|
var argLength = arguments.length;
|
|
if(argLength == 1 && goog.isArray(arguments[0])) {
|
|
return goog.object.createSet.apply(null, arguments[0])
|
|
}
|
|
var rv = {};
|
|
for(var i = 0;i < argLength;i++) {
|
|
rv[arguments[i]] = true
|
|
}
|
|
return rv
|
|
};
|
|
goog.provide("goog.string.format");
|
|
goog.require("goog.string");
|
|
goog.string.format = function(formatString, var_args) {
|
|
var args = Array.prototype.slice.call(arguments);
|
|
var template = args.shift();
|
|
if(typeof template == "undefined") {
|
|
throw Error("[goog.string.format] Template required");
|
|
}
|
|
var formatRe = /%([0\-\ \+]*)(\d+)?(\.(\d+))?([%sfdiu])/g;
|
|
function replacerDemuxer(match, flags, width, dotp, precision, type, offset, wholeString) {
|
|
if(type == "%") {
|
|
return"%"
|
|
}
|
|
var value = args.shift();
|
|
if(typeof value == "undefined") {
|
|
throw Error("[goog.string.format] Not enough arguments");
|
|
}
|
|
arguments[0] = value;
|
|
return goog.string.format.demuxes_[type].apply(null, arguments)
|
|
}
|
|
return template.replace(formatRe, replacerDemuxer)
|
|
};
|
|
goog.string.format.demuxes_ = {};
|
|
goog.string.format.demuxes_["s"] = function(value, flags, width, dotp, precision, type, offset, wholeString) {
|
|
var replacement = value;
|
|
if(isNaN(width) || width == "" || replacement.length >= width) {
|
|
return replacement
|
|
}
|
|
if(flags.indexOf("-", 0) > -1) {
|
|
replacement = replacement + goog.string.repeat(" ", width - replacement.length)
|
|
}else {
|
|
replacement = goog.string.repeat(" ", width - replacement.length) + replacement
|
|
}
|
|
return replacement
|
|
};
|
|
goog.string.format.demuxes_["f"] = function(value, flags, width, dotp, precision, type, offset, wholeString) {
|
|
var replacement = value.toString();
|
|
if(!(isNaN(precision) || precision == "")) {
|
|
replacement = value.toFixed(precision)
|
|
}
|
|
var sign;
|
|
if(value < 0) {
|
|
sign = "-"
|
|
}else {
|
|
if(flags.indexOf("+") >= 0) {
|
|
sign = "+"
|
|
}else {
|
|
if(flags.indexOf(" ") >= 0) {
|
|
sign = " "
|
|
}else {
|
|
sign = ""
|
|
}
|
|
}
|
|
}
|
|
if(value >= 0) {
|
|
replacement = sign + replacement
|
|
}
|
|
if(isNaN(width) || replacement.length >= width) {
|
|
return replacement
|
|
}
|
|
replacement = isNaN(precision) ? Math.abs(value).toString() : Math.abs(value).toFixed(precision);
|
|
var padCount = width - replacement.length - sign.length;
|
|
if(flags.indexOf("-", 0) >= 0) {
|
|
replacement = sign + replacement + goog.string.repeat(" ", padCount)
|
|
}else {
|
|
var paddingChar = flags.indexOf("0", 0) >= 0 ? "0" : " ";
|
|
replacement = sign + goog.string.repeat(paddingChar, padCount) + replacement
|
|
}
|
|
return replacement
|
|
};
|
|
goog.string.format.demuxes_["d"] = function(value, flags, width, dotp, precision, type, offset, wholeString) {
|
|
return goog.string.format.demuxes_["f"](parseInt(value, 10), flags, width, dotp, 0, type, offset, wholeString)
|
|
};
|
|
goog.string.format.demuxes_["i"] = goog.string.format.demuxes_["d"];
|
|
goog.string.format.demuxes_["u"] = goog.string.format.demuxes_["d"];
|
|
goog.provide("goog.string.StringBuffer");
|
|
goog.string.StringBuffer = function(opt_a1, var_args) {
|
|
if(opt_a1 != null) {
|
|
this.append.apply(this, arguments)
|
|
}
|
|
};
|
|
goog.string.StringBuffer.prototype.buffer_ = "";
|
|
goog.string.StringBuffer.prototype.set = function(s) {
|
|
this.buffer_ = "" + s
|
|
};
|
|
goog.string.StringBuffer.prototype.append = function(a1, opt_a2, var_args) {
|
|
this.buffer_ += a1;
|
|
if(opt_a2 != null) {
|
|
for(var i = 1;i < arguments.length;i++) {
|
|
this.buffer_ += arguments[i]
|
|
}
|
|
}
|
|
return this
|
|
};
|
|
goog.string.StringBuffer.prototype.clear = function() {
|
|
this.buffer_ = ""
|
|
};
|
|
goog.string.StringBuffer.prototype.getLength = function() {
|
|
return this.buffer_.length
|
|
};
|
|
goog.string.StringBuffer.prototype.toString = function() {
|
|
return this.buffer_
|
|
};
|
|
goog.provide("cljs.core");
|
|
goog.require("goog.array");
|
|
goog.require("goog.object");
|
|
goog.require("goog.string.format");
|
|
goog.require("goog.string.StringBuffer");
|
|
goog.require("goog.string");
|
|
cljs.core._STAR_unchecked_if_STAR_ = false;
|
|
cljs.core._STAR_print_fn_STAR_ = function _STAR_print_fn_STAR_(_) {
|
|
throw new Error("No *print-fn* fn set for evaluation environment");
|
|
};
|
|
cljs.core.set_print_fn_BANG_ = function set_print_fn_BANG_(f) {
|
|
return cljs.core._STAR_print_fn_STAR_ = f
|
|
};
|
|
goog.exportSymbol("cljs.core.set_print_fn_BANG_", cljs.core.set_print_fn_BANG_);
|
|
cljs.core._STAR_flush_on_newline_STAR_ = true;
|
|
cljs.core._STAR_print_readably_STAR_ = true;
|
|
cljs.core._STAR_print_meta_STAR_ = false;
|
|
cljs.core._STAR_print_dup_STAR_ = false;
|
|
cljs.core.pr_opts = function pr_opts() {
|
|
return cljs.core.PersistentArrayMap.fromArray(["\ufdd0:flush-on-newline", cljs.core._STAR_flush_on_newline_STAR_, "\ufdd0:readably", cljs.core._STAR_print_readably_STAR_, "\ufdd0:meta", cljs.core._STAR_print_meta_STAR_, "\ufdd0:dup", cljs.core._STAR_print_dup_STAR_], true)
|
|
};
|
|
cljs.core.truth_ = function truth_(x) {
|
|
return x != null && x !== false
|
|
};
|
|
cljs.core.not_native = null;
|
|
cljs.core.identical_QMARK_ = function identical_QMARK_(x, y) {
|
|
return x === y
|
|
};
|
|
cljs.core.nil_QMARK_ = function nil_QMARK_(x) {
|
|
return x == null
|
|
};
|
|
cljs.core.array_QMARK_ = function array_QMARK_(x) {
|
|
return x instanceof Array
|
|
};
|
|
cljs.core.number_QMARK_ = function number_QMARK_(n) {
|
|
return typeof n === "number"
|
|
};
|
|
cljs.core.not = function not(x) {
|
|
if(cljs.core.truth_(x)) {
|
|
return false
|
|
}else {
|
|
return true
|
|
}
|
|
};
|
|
cljs.core.string_QMARK_ = function string_QMARK_(x) {
|
|
var and__3941__auto__ = goog.isString(x);
|
|
if(and__3941__auto__) {
|
|
return!(x.charAt(0) === "\ufdd0")
|
|
}else {
|
|
return and__3941__auto__
|
|
}
|
|
};
|
|
cljs.core.type_satisfies_ = function type_satisfies_(p, x) {
|
|
var x__$1 = x == null ? null : x;
|
|
if(p[goog.typeOf(x__$1)]) {
|
|
return true
|
|
}else {
|
|
if(p["_"]) {
|
|
return true
|
|
}else {
|
|
if("\ufdd0:else") {
|
|
return false
|
|
}else {
|
|
return null
|
|
}
|
|
}
|
|
}
|
|
};
|
|
cljs.core.is_proto_ = function is_proto_(x) {
|
|
return x.constructor.prototype === x
|
|
};
|
|
cljs.core._STAR_main_cli_fn_STAR_ = null;
|
|
cljs.core.type = function type(x) {
|
|
if(x == null) {
|
|
return null
|
|
}else {
|
|
return x.constructor
|
|
}
|
|
};
|
|
cljs.core.missing_protocol = function missing_protocol(proto, obj) {
|
|
var ty = cljs.core.type.call(null, obj);
|
|
var ty__$1 = cljs.core.truth_(function() {
|
|
var and__3941__auto__ = ty;
|
|
if(cljs.core.truth_(and__3941__auto__)) {
|
|
return ty.cljs$lang$type
|
|
}else {
|
|
return and__3941__auto__
|
|
}
|
|
}()) ? ty.cljs$lang$ctorStr : goog.typeOf(obj);
|
|
return new Error(["No protocol method ", proto, " defined for type ", ty__$1, ": ", obj].join(""))
|
|
};
|
|
cljs.core.aclone = function aclone(array_like) {
|
|
return array_like.slice()
|
|
};
|
|
cljs.core.array = function array(var_args) {
|
|
return Array.prototype.slice.call(arguments)
|
|
};
|
|
cljs.core.make_array = function() {
|
|
var make_array = null;
|
|
var make_array__1 = function(size) {
|
|
return new Array(size)
|
|
};
|
|
var make_array__2 = function(type, size) {
|
|
return make_array.call(null, size)
|
|
};
|
|
make_array = function(type, size) {
|
|
switch(arguments.length) {
|
|
case 1:
|
|
return make_array__1.call(this, type);
|
|
case 2:
|
|
return make_array__2.call(this, type, size)
|
|
}
|
|
throw new Error("Invalid arity: " + arguments.length);
|
|
};
|
|
make_array.cljs$core$IFn$_invoke$arity$1 = make_array__1;
|
|
make_array.cljs$core$IFn$_invoke$arity$2 = make_array__2;
|
|
return make_array
|
|
}();
|
|
cljs.core.aget = function() {
|
|
var aget = null;
|
|
var aget__2 = function(array, i) {
|
|
return array[i]
|
|
};
|
|
var aget__3 = function() {
|
|
var G__13502__delegate = function(array, i, idxs) {
|
|
return cljs.core.apply.call(null, aget, aget.call(null, array, i), idxs)
|
|
};
|
|
var G__13502 = function(array, i, var_args) {
|
|
var idxs = null;
|
|
if(arguments.length > 2) {
|
|
idxs = cljs.core.array_seq(Array.prototype.slice.call(arguments, 2), 0)
|
|
}
|
|
return G__13502__delegate.call(this, array, i, idxs)
|
|
};
|
|
G__13502.cljs$lang$maxFixedArity = 2;
|
|
G__13502.cljs$lang$applyTo = function(arglist__13503) {
|
|
var array = cljs.core.first(arglist__13503);
|
|
arglist__13503 = cljs.core.next(arglist__13503);
|
|
var i = cljs.core.first(arglist__13503);
|
|
var idxs = cljs.core.rest(arglist__13503);
|
|
return G__13502__delegate(array, i, idxs)
|
|
};
|
|
G__13502.cljs$core$IFn$_invoke$arity$variadic = G__13502__delegate;
|
|
return G__13502
|
|
}();
|
|
aget = function(array, i, var_args) {
|
|
var idxs = var_args;
|
|
switch(arguments.length) {
|
|
case 2:
|
|
return aget__2.call(this, array, i);
|
|
default:
|
|
return aget__3.cljs$core$IFn$_invoke$arity$variadic(array, i, cljs.core.array_seq(arguments, 2))
|
|
}
|
|
throw new Error("Invalid arity: " + arguments.length);
|
|
};
|
|
aget.cljs$lang$maxFixedArity = 2;
|
|
aget.cljs$lang$applyTo = aget__3.cljs$lang$applyTo;
|
|
aget.cljs$core$IFn$_invoke$arity$2 = aget__2;
|
|
aget.cljs$core$IFn$_invoke$arity$variadic = aget__3.cljs$core$IFn$_invoke$arity$variadic;
|
|
return aget
|
|
}();
|
|
cljs.core.aset = function() {
|
|
var aset = null;
|
|
var aset__3 = function(array, i, val) {
|
|
return array[i] = val
|
|
};
|
|
var aset__4 = function() {
|
|
var G__13504__delegate = function(array, idx, idx2, idxv) {
|
|
return cljs.core.apply.call(null, aset, array[idx], idx2, idxv)
|
|
};
|
|
var G__13504 = function(array, idx, idx2, var_args) {
|
|
var idxv = null;
|
|
if(arguments.length > 3) {
|
|
idxv = cljs.core.array_seq(Array.prototype.slice.call(arguments, 3), 0)
|
|
}
|
|
return G__13504__delegate.call(this, array, idx, idx2, idxv)
|
|
};
|
|
G__13504.cljs$lang$maxFixedArity = 3;
|
|
G__13504.cljs$lang$applyTo = function(arglist__13505) {
|
|
var array = cljs.core.first(arglist__13505);
|
|
arglist__13505 = cljs.core.next(arglist__13505);
|
|
var idx = cljs.core.first(arglist__13505);
|
|
arglist__13505 = cljs.core.next(arglist__13505);
|
|
var idx2 = cljs.core.first(arglist__13505);
|
|
var idxv = cljs.core.rest(arglist__13505);
|
|
return G__13504__delegate(array, idx, idx2, idxv)
|
|
};
|
|
G__13504.cljs$core$IFn$_invoke$arity$variadic = G__13504__delegate;
|
|
return G__13504
|
|
}();
|
|
aset = function(array, idx, idx2, var_args) {
|
|
var idxv = var_args;
|
|
switch(arguments.length) {
|
|
case 3:
|
|
return aset__3.call(this, array, idx, idx2);
|
|
default:
|
|
return aset__4.cljs$core$IFn$_invoke$arity$variadic(array, idx, idx2, cljs.core.array_seq(arguments, 3))
|
|
}
|
|
throw new Error("Invalid arity: " + arguments.length);
|
|
};
|
|
aset.cljs$lang$maxFixedArity = 3;
|
|
aset.cljs$lang$applyTo = aset__4.cljs$lang$applyTo;
|
|
aset.cljs$core$IFn$_invoke$arity$3 = aset__3;
|
|
aset.cljs$core$IFn$_invoke$arity$variadic = aset__4.cljs$core$IFn$_invoke$arity$variadic;
|
|
return aset
|
|
}();
|
|
cljs.core.alength = function alength(array) {
|
|
return array.length
|
|
};
|
|
cljs.core.into_array = function() {
|
|
var into_array = null;
|
|
var into_array__1 = function(aseq) {
|
|
return into_array.call(null, null, aseq)
|
|
};
|
|
var into_array__2 = function(type, aseq) {
|
|
return cljs.core.reduce.call(null, function(a, x) {
|
|
a.push(x);
|
|
return a
|
|
}, [], aseq)
|
|
};
|
|
into_array = function(type, aseq) {
|
|
switch(arguments.length) {
|
|
case 1:
|
|
return into_array__1.call(this, type);
|
|
case 2:
|
|
return into_array__2.call(this, type, aseq)
|
|
}
|
|
throw new Error("Invalid arity: " + arguments.length);
|
|
};
|
|
into_array.cljs$core$IFn$_invoke$arity$1 = into_array__1;
|
|
into_array.cljs$core$IFn$_invoke$arity$2 = into_array__2;
|
|
return into_array
|
|
}();
|
|
cljs.core.Fn = {};
|
|
cljs.core.IFn = {};
|
|
cljs.core._invoke = function() {
|
|
var _invoke = null;
|
|
var _invoke__1 = function(this$) {
|
|
if(function() {
|
|
var and__3941__auto__ = this$;
|
|
if(and__3941__auto__) {
|
|
return this$.cljs$core$IFn$_invoke$arity$1
|
|
}else {
|
|
return and__3941__auto__
|
|
}
|
|
}()) {
|
|
return this$.cljs$core$IFn$_invoke$arity$1(this$)
|
|
}else {
|
|
var x__2906__auto__ = this$ == null ? null : this$;
|
|
return function() {
|
|
var or__3943__auto__ = cljs.core._invoke[goog.typeOf(x__2906__auto__)];
|
|
if(or__3943__auto__) {
|
|
return or__3943__auto__
|
|
}else {
|
|
var or__3943__auto____$1 = cljs.core._invoke["_"];
|
|
if(or__3943__auto____$1) {
|
|
return or__3943__auto____$1
|
|
}else {
|
|
throw cljs.core.missing_protocol.call(null, "IFn.-invoke", this$);
|
|
}
|
|
}
|
|
}().call(null, this$)
|
|
}
|
|
};
|
|
var _invoke__2 = function(this$, a) {
|
|
if(function() {
|
|
var and__3941__auto__ = this$;
|
|
if(and__3941__auto__) {
|
|
return this$.cljs$core$IFn$_invoke$arity$2
|
|
}else {
|
|
return and__3941__auto__
|
|
}
|
|
}()) {
|
|
return this$.cljs$core$IFn$_invoke$arity$2(this$, a)
|
|
}else {
|
|
var x__2906__auto__ = this$ == null ? null : this$;
|
|
return function() {
|
|
var or__3943__auto__ = cljs.core._invoke[goog.typeOf(x__2906__auto__)];
|
|
if(or__3943__auto__) {
|
|
return or__3943__auto__
|
|
}else {
|
|
var or__3943__auto____$1 = cljs.core._invoke["_"];
|
|
if(or__3943__auto____$1) {
|
|
return or__3943__auto____$1
|
|
}else {
|
|
throw cljs.core.missing_protocol.call(null, "IFn.-invoke", this$);
|
|
}
|
|
}
|
|
}().call(null, this$, a)
|
|
}
|
|
};
|
|
var _invoke__3 = function(this$, a, b) {
|
|
if(function() {
|
|
var and__3941__auto__ = this$;
|
|
if(and__3941__auto__) {
|
|
return this$.cljs$core$IFn$_invoke$arity$3
|
|
}else {
|
|
return and__3941__auto__
|
|
}
|
|
}()) {
|
|
return this$.cljs$core$IFn$_invoke$arity$3(this$, a, b)
|
|
}else {
|
|
var x__2906__auto__ = this$ == null ? null : this$;
|
|
return function() {
|
|
var or__3943__auto__ = cljs.core._invoke[goog.typeOf(x__2906__auto__)];
|
|
if(or__3943__auto__) {
|
|
return or__3943__auto__
|
|
}else {
|
|
var or__3943__auto____$1 = cljs.core._invoke["_"];
|
|
if(or__3943__auto____$1) {
|
|
return or__3943__auto____$1
|
|
}else {
|
|
throw cljs.core.missing_protocol.call(null, "IFn.-invoke", this$);
|
|
}
|
|
}
|
|
}().call(null, this$, a, b)
|
|
}
|
|
};
|
|
var _invoke__4 = function(this$, a, b, c) {
|
|
if(function() {
|
|
var and__3941__auto__ = this$;
|
|
if(and__3941__auto__) {
|
|
return this$.cljs$core$IFn$_invoke$arity$4
|
|
}else {
|
|
return and__3941__auto__
|
|
}
|
|
}()) {
|
|
return this$.cljs$core$IFn$_invoke$arity$4(this$, a, b, c)
|
|
}else {
|
|
var x__2906__auto__ = this$ == null ? null : this$;
|
|
return function() {
|
|
var or__3943__auto__ = cljs.core._invoke[goog.typeOf(x__2906__auto__)];
|
|
if(or__3943__auto__) {
|
|
return or__3943__auto__
|
|
}else {
|
|
var or__3943__auto____$1 = cljs.core._invoke["_"];
|
|
if(or__3943__auto____$1) {
|
|
return or__3943__auto____$1
|
|
}else {
|
|
throw cljs.core.missing_protocol.call(null, "IFn.-invoke", this$);
|
|
}
|
|
}
|
|
}().call(null, this$, a, b, c)
|
|
}
|
|
};
|
|
var _invoke__5 = function(this$, a, b, c, d) {
|
|
if(function() {
|
|
var and__3941__auto__ = this$;
|
|
if(and__3941__auto__) {
|
|
return this$.cljs$core$IFn$_invoke$arity$5
|
|
}else {
|
|
return and__3941__auto__
|
|
}
|
|
}()) {
|
|
return this$.cljs$core$IFn$_invoke$arity$5(this$, a, b, c, d)
|
|
}else {
|
|
var x__2906__auto__ = this$ == null ? null : this$;
|
|
return function() {
|
|
var or__3943__auto__ = cljs.core._invoke[goog.typeOf(x__2906__auto__)];
|
|
if(or__3943__auto__) {
|
|
return or__3943__auto__
|
|
}else {
|
|
var or__3943__auto____$1 = cljs.core._invoke["_"];
|
|
if(or__3943__auto____$1) {
|
|
return or__3943__auto____$1
|
|
}else {
|
|
throw cljs.core.missing_protocol.call(null, "IFn.-invoke", this$);
|
|
}
|
|
}
|
|
}().call(null, this$, a, b, c, d)
|
|
}
|
|
};
|
|
var _invoke__6 = function(this$, a, b, c, d, e) {
|
|
if(function() {
|
|
var and__3941__auto__ = this$;
|
|
if(and__3941__auto__) {
|
|
return this$.cljs$core$IFn$_invoke$arity$6
|
|
}else {
|
|
return and__3941__auto__
|
|
}
|
|
}()) {
|
|
return this$.cljs$core$IFn$_invoke$arity$6(this$, a, b, c, d, e)
|
|
}else {
|
|
var x__2906__auto__ = this$ == null ? null : this$;
|
|
return function() {
|
|
var or__3943__auto__ = cljs.core._invoke[goog.typeOf(x__2906__auto__)];
|
|
if(or__3943__auto__) {
|
|
return or__3943__auto__
|
|
}else {
|
|
var or__3943__auto____$1 = cljs.core._invoke["_"];
|
|
if(or__3943__auto____$1) {
|
|
return or__3943__auto____$1
|
|
}else {
|
|
throw cljs.core.missing_protocol.call(null, "IFn.-invoke", this$);
|
|
}
|
|
}
|
|
}().call(null, this$, a, b, c, d, e)
|
|
}
|
|
};
|
|
var _invoke__7 = function(this$, a, b, c, d, e, f) {
|
|
if(function() {
|
|
var and__3941__auto__ = this$;
|
|
if(and__3941__auto__) {
|
|
return this$.cljs$core$IFn$_invoke$arity$7
|
|
}else {
|
|
return and__3941__auto__
|
|
}
|
|
}()) {
|
|
return this$.cljs$core$IFn$_invoke$arity$7(this$, a, b, c, d, e, f)
|
|
}else {
|
|
var x__2906__auto__ = this$ == null ? null : this$;
|
|
return function() {
|
|
var or__3943__auto__ = cljs.core._invoke[goog.typeOf(x__2906__auto__)];
|
|
if(or__3943__auto__) {
|
|
return or__3943__auto__
|
|
}else {
|
|
var or__3943__auto____$1 = cljs.core._invoke["_"];
|
|
if(or__3943__auto____$1) {
|
|
return or__3943__auto____$1
|
|
}else {
|
|
throw cljs.core.missing_protocol.call(null, "IFn.-invoke", this$);
|
|
}
|
|
}
|
|
}().call(null, this$, a, b, c, d, e, f)
|
|
}
|
|
};
|
|
var _invoke__8 = function(this$, a, b, c, d, e, f, g) {
|
|
if(function() {
|
|
var and__3941__auto__ = this$;
|
|
if(and__3941__auto__) {
|
|
return this$.cljs$core$IFn$_invoke$arity$8
|
|
}else {
|
|
return and__3941__auto__
|
|
}
|
|
}()) {
|
|
return this$.cljs$core$IFn$_invoke$arity$8(this$, a, b, c, d, e, f, g)
|
|
}else {
|
|
var x__2906__auto__ = this$ == null ? null : this$;
|
|
return function() {
|
|
var or__3943__auto__ = cljs.core._invoke[goog.typeOf(x__2906__auto__)];
|
|
if(or__3943__auto__) {
|
|
return or__3943__auto__
|
|
}else {
|
|
var or__3943__auto____$1 = cljs.core._invoke["_"];
|
|
if(or__3943__auto____$1) {
|
|
return or__3943__auto____$1
|
|
}else {
|
|
throw cljs.core.missing_protocol.call(null, "IFn.-invoke", this$);
|
|
}
|
|
}
|
|
}().call(null, this$, a, b, c, d, e, f, g)
|
|
}
|
|
};
|
|
var _invoke__9 = function(this$, a, b, c, d, e, f, g, h) {
|
|
if(function() {
|
|
var and__3941__auto__ = this$;
|
|
if(and__3941__auto__) {
|
|
return this$.cljs$core$IFn$_invoke$arity$9
|
|
}else {
|
|
return and__3941__auto__
|
|
}
|
|
}()) {
|
|
return this$.cljs$core$IFn$_invoke$arity$9(this$, a, b, c, d, e, f, g, h)
|
|
}else {
|
|
var x__2906__auto__ = this$ == null ? null : this$;
|
|
return function() {
|
|
var or__3943__auto__ = cljs.core._invoke[goog.typeOf(x__2906__auto__)];
|
|
if(or__3943__auto__) {
|
|
return or__3943__auto__
|
|
}else {
|
|
var or__3943__auto____$1 = cljs.core._invoke["_"];
|
|
if(or__3943__auto____$1) {
|
|
return or__3943__auto____$1
|
|
}else {
|
|
throw cljs.core.missing_protocol.call(null, "IFn.-invoke", this$);
|
|
}
|
|
}
|
|
}().call(null, this$, a, b, c, d, e, f, g, h)
|
|
}
|
|
};
|
|
var _invoke__10 = function(this$, a, b, c, d, e, f, g, h, i) {
|
|
if(function() {
|
|
var and__3941__auto__ = this$;
|
|
if(and__3941__auto__) {
|
|
return this$.cljs$core$IFn$_invoke$arity$10
|
|
}else {
|
|
return and__3941__auto__
|
|
}
|
|
}()) {
|
|
return this$.cljs$core$IFn$_invoke$arity$10(this$, a, b, c, d, e, f, g, h, i)
|
|
}else {
|
|
var x__2906__auto__ = this$ == null ? null : this$;
|
|
return function() {
|
|
var or__3943__auto__ = cljs.core._invoke[goog.typeOf(x__2906__auto__)];
|
|
if(or__3943__auto__) {
|
|
return or__3943__auto__
|
|
}else {
|
|
var or__3943__auto____$1 = cljs.core._invoke["_"];
|
|
if(or__3943__auto____$1) {
|
|
return or__3943__auto____$1
|
|
}else {
|
|
throw cljs.core.missing_protocol.call(null, "IFn.-invoke", this$);
|
|
}
|
|
}
|
|
}().call(null, this$, a, b, c, d, e, f, g, h, i)
|
|
}
|
|
};
|
|
var _invoke__11 = function(this$, a, b, c, d, e, f, g, h, i, j) {
|
|
if(function() {
|
|
var and__3941__auto__ = this$;
|
|
if(and__3941__auto__) {
|
|
return this$.cljs$core$IFn$_invoke$arity$11
|
|
}else {
|
|
return and__3941__auto__
|
|
}
|
|
}()) {
|
|
return this$.cljs$core$IFn$_invoke$arity$11(this$, a, b, c, d, e, f, g, h, i, j)
|
|
}else {
|
|
var x__2906__auto__ = this$ == null ? null : this$;
|
|
return function() {
|
|
var or__3943__auto__ = cljs.core._invoke[goog.typeOf(x__2906__auto__)];
|
|
if(or__3943__auto__) {
|
|
return or__3943__auto__
|
|
}else {
|
|
var or__3943__auto____$1 = cljs.core._invoke["_"];
|
|
if(or__3943__auto____$1) {
|
|
return or__3943__auto____$1
|
|
}else {
|
|
throw cljs.core.missing_protocol.call(null, "IFn.-invoke", this$);
|
|
}
|
|
}
|
|
}().call(null, this$, a, b, c, d, e, f, g, h, i, j)
|
|
}
|
|
};
|
|
var _invoke__12 = function(this$, a, b, c, d, e, f, g, h, i, j, k) {
|
|
if(function() {
|
|
var and__3941__auto__ = this$;
|
|
if(and__3941__auto__) {
|
|
return this$.cljs$core$IFn$_invoke$arity$12
|
|
}else {
|
|
return and__3941__auto__
|
|
}
|
|
}()) {
|
|
return this$.cljs$core$IFn$_invoke$arity$12(this$, a, b, c, d, e, f, g, h, i, j, k)
|
|
}else {
|
|
var x__2906__auto__ = this$ == null ? null : this$;
|
|
return function() {
|
|
var or__3943__auto__ = cljs.core._invoke[goog.typeOf(x__2906__auto__)];
|
|
if(or__3943__auto__) {
|
|
return or__3943__auto__
|
|
}else {
|
|
var or__3943__auto____$1 = cljs.core._invoke["_"];
|
|
if(or__3943__auto____$1) {
|
|
return or__3943__auto____$1
|
|
}else {
|
|
throw cljs.core.missing_protocol.call(null, "IFn.-invoke", this$);
|
|
}
|
|
}
|
|
}().call(null, this$, a, b, c, d, e, f, g, h, i, j, k)
|
|
}
|
|
};
|
|
var _invoke__13 = function(this$, a, b, c, d, e, f, g, h, i, j, k, l) {
|
|
if(function() {
|
|
var and__3941__auto__ = this$;
|
|
if(and__3941__auto__) {
|
|
return this$.cljs$core$IFn$_invoke$arity$13
|
|
}else {
|
|
return and__3941__auto__
|
|
}
|
|
}()) {
|
|
return this$.cljs$core$IFn$_invoke$arity$13(this$, a, b, c, d, e, f, g, h, i, j, k, l)
|
|
}else {
|
|
var x__2906__auto__ = this$ == null ? null : this$;
|
|
return function() {
|
|
var or__3943__auto__ = cljs.core._invoke[goog.typeOf(x__2906__auto__)];
|
|
if(or__3943__auto__) {
|
|
return or__3943__auto__
|
|
}else {
|
|
var or__3943__auto____$1 = cljs.core._invoke["_"];
|
|
if(or__3943__auto____$1) {
|
|
return or__3943__auto____$1
|
|
}else {
|
|
throw cljs.core.missing_protocol.call(null, "IFn.-invoke", this$);
|
|
}
|
|
}
|
|
}().call(null, this$, a, b, c, d, e, f, g, h, i, j, k, l)
|
|
}
|
|
};
|
|
var _invoke__14 = function(this$, a, b, c, d, e, f, g, h, i, j, k, l, m) {
|
|
if(function() {
|
|
var and__3941__auto__ = this$;
|
|
if(and__3941__auto__) {
|
|
return this$.cljs$core$IFn$_invoke$arity$14
|
|
}else {
|
|
return and__3941__auto__
|
|
}
|
|
}()) {
|
|
return this$.cljs$core$IFn$_invoke$arity$14(this$, a, b, c, d, e, f, g, h, i, j, k, l, m)
|
|
}else {
|
|
var x__2906__auto__ = this$ == null ? null : this$;
|
|
return function() {
|
|
var or__3943__auto__ = cljs.core._invoke[goog.typeOf(x__2906__auto__)];
|
|
if(or__3943__auto__) {
|
|
return or__3943__auto__
|
|
}else {
|
|
var or__3943__auto____$1 = cljs.core._invoke["_"];
|
|
if(or__3943__auto____$1) {
|
|
return or__3943__auto____$1
|
|
}else {
|
|
throw cljs.core.missing_protocol.call(null, "IFn.-invoke", this$);
|
|
}
|
|
}
|
|
}().call(null, this$, a, b, c, d, e, f, g, h, i, j, k, l, m)
|
|
}
|
|
};
|
|
var _invoke__15 = function(this$, a, b, c, d, e, f, g, h, i, j, k, l, m, n) {
|
|
if(function() {
|
|
var and__3941__auto__ = this$;
|
|
if(and__3941__auto__) {
|
|
return this$.cljs$core$IFn$_invoke$arity$15
|
|
}else {
|
|
return and__3941__auto__
|
|
}
|
|
}()) {
|
|
return this$.cljs$core$IFn$_invoke$arity$15(this$, a, b, c, d, e, f, g, h, i, j, k, l, m, n)
|
|
}else {
|
|
var x__2906__auto__ = this$ == null ? null : this$;
|
|
return function() {
|
|
var or__3943__auto__ = cljs.core._invoke[goog.typeOf(x__2906__auto__)];
|
|
if(or__3943__auto__) {
|
|
return or__3943__auto__
|
|
}else {
|
|
var or__3943__auto____$1 = cljs.core._invoke["_"];
|
|
if(or__3943__auto____$1) {
|
|
return or__3943__auto____$1
|
|
}else {
|
|
throw cljs.core.missing_protocol.call(null, "IFn.-invoke", this$);
|
|
}
|
|
}
|
|
}().call(null, this$, a, b, c, d, e, f, g, h, i, j, k, l, m, n)
|
|
}
|
|
};
|
|
var _invoke__16 = function(this$, a, b, c, d, e, f, g, h, i, j, k, l, m, n, o) {
|
|
if(function() {
|
|
var and__3941__auto__ = this$;
|
|
if(and__3941__auto__) {
|
|
return this$.cljs$core$IFn$_invoke$arity$16
|
|
}else {
|
|
return and__3941__auto__
|
|
}
|
|
}()) {
|
|
return this$.cljs$core$IFn$_invoke$arity$16(this$, a, b, c, d, e, f, g, h, i, j, k, l, m, n, o)
|
|
}else {
|
|
var x__2906__auto__ = this$ == null ? null : this$;
|
|
return function() {
|
|
var or__3943__auto__ = cljs.core._invoke[goog.typeOf(x__2906__auto__)];
|
|
if(or__3943__auto__) {
|
|
return or__3943__auto__
|
|
}else {
|
|
var or__3943__auto____$1 = cljs.core._invoke["_"];
|
|
if(or__3943__auto____$1) {
|
|
return or__3943__auto____$1
|
|
}else {
|
|
throw cljs.core.missing_protocol.call(null, "IFn.-invoke", this$);
|
|
}
|
|
}
|
|
}().call(null, this$, a, b, c, d, e, f, g, h, i, j, k, l, m, n, o)
|
|
}
|
|
};
|
|
var _invoke__17 = function(this$, a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p) {
|
|
if(function() {
|
|
var and__3941__auto__ = this$;
|
|
if(and__3941__auto__) {
|
|
return this$.cljs$core$IFn$_invoke$arity$17
|
|
}else {
|
|
return and__3941__auto__
|
|
}
|
|
}()) {
|
|
return this$.cljs$core$IFn$_invoke$arity$17(this$, a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p)
|
|
}else {
|
|
var x__2906__auto__ = this$ == null ? null : this$;
|
|
return function() {
|
|
var or__3943__auto__ = cljs.core._invoke[goog.typeOf(x__2906__auto__)];
|
|
if(or__3943__auto__) {
|
|
return or__3943__auto__
|
|
}else {
|
|
var or__3943__auto____$1 = cljs.core._invoke["_"];
|
|
if(or__3943__auto____$1) {
|
|
return or__3943__auto____$1
|
|
}else {
|
|
throw cljs.core.missing_protocol.call(null, "IFn.-invoke", this$);
|
|
}
|
|
}
|
|
}().call(null, this$, a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p)
|
|
}
|
|
};
|
|
var _invoke__18 = function(this$, a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q) {
|
|
if(function() {
|
|
var and__3941__auto__ = this$;
|
|
if(and__3941__auto__) {
|
|
return this$.cljs$core$IFn$_invoke$arity$18
|
|
}else {
|
|
return and__3941__auto__
|
|
}
|
|
}()) {
|
|
return this$.cljs$core$IFn$_invoke$arity$18(this$, a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q)
|
|
}else {
|
|
var x__2906__auto__ = this$ == null ? null : this$;
|
|
return function() {
|
|
var or__3943__auto__ = cljs.core._invoke[goog.typeOf(x__2906__auto__)];
|
|
if(or__3943__auto__) {
|
|
return or__3943__auto__
|
|
}else {
|
|
var or__3943__auto____$1 = cljs.core._invoke["_"];
|
|
if(or__3943__auto____$1) {
|
|
return or__3943__auto____$1
|
|
}else {
|
|
throw cljs.core.missing_protocol.call(null, "IFn.-invoke", this$);
|
|
}
|
|
}
|
|
}().call(null, this$, a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q)
|
|
}
|
|
};
|
|
var _invoke__19 = function(this$, a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, s) {
|
|
if(function() {
|
|
var and__3941__auto__ = this$;
|
|
if(and__3941__auto__) {
|
|
return this$.cljs$core$IFn$_invoke$arity$19
|
|
}else {
|
|
return and__3941__auto__
|
|
}
|
|
}()) {
|
|
return this$.cljs$core$IFn$_invoke$arity$19(this$, a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, s)
|
|
}else {
|
|
var x__2906__auto__ = this$ == null ? null : this$;
|
|
return function() {
|
|
var or__3943__auto__ = cljs.core._invoke[goog.typeOf(x__2906__auto__)];
|
|
if(or__3943__auto__) {
|
|
return or__3943__auto__
|
|
}else {
|
|
var or__3943__auto____$1 = cljs.core._invoke["_"];
|
|
if(or__3943__auto____$1) {
|
|
return or__3943__auto____$1
|
|
}else {
|
|
throw cljs.core.missing_protocol.call(null, "IFn.-invoke", this$);
|
|
}
|
|
}
|
|
}().call(null, this$, a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, s)
|
|
}
|
|
};
|
|
var _invoke__20 = function(this$, a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, s, t) {
|
|
if(function() {
|
|
var and__3941__auto__ = this$;
|
|
if(and__3941__auto__) {
|
|
return this$.cljs$core$IFn$_invoke$arity$20
|
|
}else {
|
|
return and__3941__auto__
|
|
}
|
|
}()) {
|
|
return this$.cljs$core$IFn$_invoke$arity$20(this$, a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, s, t)
|
|
}else {
|
|
var x__2906__auto__ = this$ == null ? null : this$;
|
|
return function() {
|
|
var or__3943__auto__ = cljs.core._invoke[goog.typeOf(x__2906__auto__)];
|
|
if(or__3943__auto__) {
|
|
return or__3943__auto__
|
|
}else {
|
|
var or__3943__auto____$1 = cljs.core._invoke["_"];
|
|
if(or__3943__auto____$1) {
|
|
return or__3943__auto____$1
|
|
}else {
|
|
throw cljs.core.missing_protocol.call(null, "IFn.-invoke", this$);
|
|
}
|
|
}
|
|
}().call(null, this$, a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, s, t)
|
|
}
|
|
};
|
|
var _invoke__21 = function(this$, a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, s, t, rest) {
|
|
if(function() {
|
|
var and__3941__auto__ = this$;
|
|
if(and__3941__auto__) {
|
|
return this$.cljs$core$IFn$_invoke$arity$21
|
|
}else {
|
|
return and__3941__auto__
|
|
}
|
|
}()) {
|
|
return this$.cljs$core$IFn$_invoke$arity$21(this$, a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, s, t, rest)
|
|
}else {
|
|
var x__2906__auto__ = this$ == null ? null : this$;
|
|
return function() {
|
|
var or__3943__auto__ = cljs.core._invoke[goog.typeOf(x__2906__auto__)];
|
|
if(or__3943__auto__) {
|
|
return or__3943__auto__
|
|
}else {
|
|
var or__3943__auto____$1 = cljs.core._invoke["_"];
|
|
if(or__3943__auto____$1) {
|
|
return or__3943__auto____$1
|
|
}else {
|
|
throw cljs.core.missing_protocol.call(null, "IFn.-invoke", this$);
|
|
}
|
|
}
|
|
}().call(null, this$, a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, s, t, rest)
|
|
}
|
|
};
|
|
_invoke = function(this$, a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, s, t, rest) {
|
|
switch(arguments.length) {
|
|
case 1:
|
|
return _invoke__1.call(this, this$);
|
|
case 2:
|
|
return _invoke__2.call(this, this$, a);
|
|
case 3:
|
|
return _invoke__3.call(this, this$, a, b);
|
|
case 4:
|
|
return _invoke__4.call(this, this$, a, b, c);
|
|
case 5:
|
|
return _invoke__5.call(this, this$, a, b, c, d);
|
|
case 6:
|
|
return _invoke__6.call(this, this$, a, b, c, d, e);
|
|
case 7:
|
|
return _invoke__7.call(this, this$, a, b, c, d, e, f);
|
|
case 8:
|
|
return _invoke__8.call(this, this$, a, b, c, d, e, f, g);
|
|
case 9:
|
|
return _invoke__9.call(this, this$, a, b, c, d, e, f, g, h);
|
|
case 10:
|
|
return _invoke__10.call(this, this$, a, b, c, d, e, f, g, h, i);
|
|
case 11:
|
|
return _invoke__11.call(this, this$, a, b, c, d, e, f, g, h, i, j);
|
|
case 12:
|
|
return _invoke__12.call(this, this$, a, b, c, d, e, f, g, h, i, j, k);
|
|
case 13:
|
|
return _invoke__13.call(this, this$, a, b, c, d, e, f, g, h, i, j, k, l);
|
|
case 14:
|
|
return _invoke__14.call(this, this$, a, b, c, d, e, f, g, h, i, j, k, l, m);
|
|
case 15:
|
|
return _invoke__15.call(this, this$, a, b, c, d, e, f, g, h, i, j, k, l, m, n);
|
|
case 16:
|
|
return _invoke__16.call(this, this$, a, b, c, d, e, f, g, h, i, j, k, l, m, n, o);
|
|
case 17:
|
|
return _invoke__17.call(this, this$, a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p);
|
|
case 18:
|
|
return _invoke__18.call(this, this$, a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q);
|
|
case 19:
|
|
return _invoke__19.call(this, this$, a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, s);
|
|
case 20:
|
|
return _invoke__20.call(this, this$, a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, s, t);
|
|
case 21:
|
|
return _invoke__21.call(this, this$, a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, s, t, rest)
|
|
}
|
|
throw new Error("Invalid arity: " + arguments.length);
|
|
};
|
|
_invoke.cljs$core$IFn$_invoke$arity$1 = _invoke__1;
|
|
_invoke.cljs$core$IFn$_invoke$arity$2 = _invoke__2;
|
|
_invoke.cljs$core$IFn$_invoke$arity$3 = _invoke__3;
|
|
_invoke.cljs$core$IFn$_invoke$arity$4 = _invoke__4;
|
|
_invoke.cljs$core$IFn$_invoke$arity$5 = _invoke__5;
|
|
_invoke.cljs$core$IFn$_invoke$arity$6 = _invoke__6;
|
|
_invoke.cljs$core$IFn$_invoke$arity$7 = _invoke__7;
|
|
_invoke.cljs$core$IFn$_invoke$arity$8 = _invoke__8;
|
|
_invoke.cljs$core$IFn$_invoke$arity$9 = _invoke__9;
|
|
_invoke.cljs$core$IFn$_invoke$arity$10 = _invoke__10;
|
|
_invoke.cljs$core$IFn$_invoke$arity$11 = _invoke__11;
|
|
_invoke.cljs$core$IFn$_invoke$arity$12 = _invoke__12;
|
|
_invoke.cljs$core$IFn$_invoke$arity$13 = _invoke__13;
|
|
_invoke.cljs$core$IFn$_invoke$arity$14 = _invoke__14;
|
|
_invoke.cljs$core$IFn$_invoke$arity$15 = _invoke__15;
|
|
_invoke.cljs$core$IFn$_invoke$arity$16 = _invoke__16;
|
|
_invoke.cljs$core$IFn$_invoke$arity$17 = _invoke__17;
|
|
_invoke.cljs$core$IFn$_invoke$arity$18 = _invoke__18;
|
|
_invoke.cljs$core$IFn$_invoke$arity$19 = _invoke__19;
|
|
_invoke.cljs$core$IFn$_invoke$arity$20 = _invoke__20;
|
|
_invoke.cljs$core$IFn$_invoke$arity$21 = _invoke__21;
|
|
return _invoke
|
|
}();
|
|
cljs.core.ICounted = {};
|
|
cljs.core._count = function _count(coll) {
|
|
if(function() {
|
|
var and__3941__auto__ = coll;
|
|
if(and__3941__auto__) {
|
|
return coll.cljs$core$ICounted$_count$arity$1
|
|
}else {
|
|
return and__3941__auto__
|
|
}
|
|
}()) {
|
|
return coll.cljs$core$ICounted$_count$arity$1(coll)
|
|
}else {
|
|
var x__2906__auto__ = coll == null ? null : coll;
|
|
return function() {
|
|
var or__3943__auto__ = cljs.core._count[goog.typeOf(x__2906__auto__)];
|
|
if(or__3943__auto__) {
|
|
return or__3943__auto__
|
|
}else {
|
|
var or__3943__auto____$1 = cljs.core._count["_"];
|
|
if(or__3943__auto____$1) {
|
|
return or__3943__auto____$1
|
|
}else {
|
|
throw cljs.core.missing_protocol.call(null, "ICounted.-count", coll);
|
|
}
|
|
}
|
|
}().call(null, coll)
|
|
}
|
|
};
|
|
cljs.core.IEmptyableCollection = {};
|
|
cljs.core._empty = function _empty(coll) {
|
|
if(function() {
|
|
var and__3941__auto__ = coll;
|
|
if(and__3941__auto__) {
|
|
return coll.cljs$core$IEmptyableCollection$_empty$arity$1
|
|
}else {
|
|
return and__3941__auto__
|
|
}
|
|
}()) {
|
|
return coll.cljs$core$IEmptyableCollection$_empty$arity$1(coll)
|
|
}else {
|
|
var x__2906__auto__ = coll == null ? null : coll;
|
|
return function() {
|
|
var or__3943__auto__ = cljs.core._empty[goog.typeOf(x__2906__auto__)];
|
|
if(or__3943__auto__) {
|
|
return or__3943__auto__
|
|
}else {
|
|
var or__3943__auto____$1 = cljs.core._empty["_"];
|
|
if(or__3943__auto____$1) {
|
|
return or__3943__auto____$1
|
|
}else {
|
|
throw cljs.core.missing_protocol.call(null, "IEmptyableCollection.-empty", coll);
|
|
}
|
|
}
|
|
}().call(null, coll)
|
|
}
|
|
};
|
|
cljs.core.ICollection = {};
|
|
cljs.core._conj = function _conj(coll, o) {
|
|
if(function() {
|
|
var and__3941__auto__ = coll;
|
|
if(and__3941__auto__) {
|
|
return coll.cljs$core$ICollection$_conj$arity$2
|
|
}else {
|
|
return and__3941__auto__
|
|
}
|
|
}()) {
|
|
return coll.cljs$core$ICollection$_conj$arity$2(coll, o)
|
|
}else {
|
|
var x__2906__auto__ = coll == null ? null : coll;
|
|
return function() {
|
|
var or__3943__auto__ = cljs.core._conj[goog.typeOf(x__2906__auto__)];
|
|
if(or__3943__auto__) {
|
|
return or__3943__auto__
|
|
}else {
|
|
var or__3943__auto____$1 = cljs.core._conj["_"];
|
|
if(or__3943__auto____$1) {
|
|
return or__3943__auto____$1
|
|
}else {
|
|
throw cljs.core.missing_protocol.call(null, "ICollection.-conj", coll);
|
|
}
|
|
}
|
|
}().call(null, coll, o)
|
|
}
|
|
};
|
|
cljs.core.IIndexed = {};
|
|
cljs.core._nth = function() {
|
|
var _nth = null;
|
|
var _nth__2 = function(coll, n) {
|
|
if(function() {
|
|
var and__3941__auto__ = coll;
|
|
if(and__3941__auto__) {
|
|
return coll.cljs$core$IIndexed$_nth$arity$2
|
|
}else {
|
|
return and__3941__auto__
|
|
}
|
|
}()) {
|
|
return coll.cljs$core$IIndexed$_nth$arity$2(coll, n)
|
|
}else {
|
|
var x__2906__auto__ = coll == null ? null : coll;
|
|
return function() {
|
|
var or__3943__auto__ = cljs.core._nth[goog.typeOf(x__2906__auto__)];
|
|
if(or__3943__auto__) {
|
|
return or__3943__auto__
|
|
}else {
|
|
var or__3943__auto____$1 = cljs.core._nth["_"];
|
|
if(or__3943__auto____$1) {
|
|
return or__3943__auto____$1
|
|
}else {
|
|
throw cljs.core.missing_protocol.call(null, "IIndexed.-nth", coll);
|
|
}
|
|
}
|
|
}().call(null, coll, n)
|
|
}
|
|
};
|
|
var _nth__3 = function(coll, n, not_found) {
|
|
if(function() {
|
|
var and__3941__auto__ = coll;
|
|
if(and__3941__auto__) {
|
|
return coll.cljs$core$IIndexed$_nth$arity$3
|
|
}else {
|
|
return and__3941__auto__
|
|
}
|
|
}()) {
|
|
return coll.cljs$core$IIndexed$_nth$arity$3(coll, n, not_found)
|
|
}else {
|
|
var x__2906__auto__ = coll == null ? null : coll;
|
|
return function() {
|
|
var or__3943__auto__ = cljs.core._nth[goog.typeOf(x__2906__auto__)];
|
|
if(or__3943__auto__) {
|
|
return or__3943__auto__
|
|
}else {
|
|
var or__3943__auto____$1 = cljs.core._nth["_"];
|
|
if(or__3943__auto____$1) {
|
|
return or__3943__auto____$1
|
|
}else {
|
|
throw cljs.core.missing_protocol.call(null, "IIndexed.-nth", coll);
|
|
}
|
|
}
|
|
}().call(null, coll, n, not_found)
|
|
}
|
|
};
|
|
_nth = function(coll, n, not_found) {
|
|
switch(arguments.length) {
|
|
case 2:
|
|
return _nth__2.call(this, coll, n);
|
|
case 3:
|
|
return _nth__3.call(this, coll, n, not_found)
|
|
}
|
|
throw new Error("Invalid arity: " + arguments.length);
|
|
};
|
|
_nth.cljs$core$IFn$_invoke$arity$2 = _nth__2;
|
|
_nth.cljs$core$IFn$_invoke$arity$3 = _nth__3;
|
|
return _nth
|
|
}();
|
|
cljs.core.ASeq = {};
|
|
cljs.core.ISeq = {};
|
|
cljs.core._first = function _first(coll) {
|
|
if(function() {
|
|
var and__3941__auto__ = coll;
|
|
if(and__3941__auto__) {
|
|
return coll.cljs$core$ISeq$_first$arity$1
|
|
}else {
|
|
return and__3941__auto__
|
|
}
|
|
}()) {
|
|
return coll.cljs$core$ISeq$_first$arity$1(coll)
|
|
}else {
|
|
var x__2906__auto__ = coll == null ? null : coll;
|
|
return function() {
|
|
var or__3943__auto__ = cljs.core._first[goog.typeOf(x__2906__auto__)];
|
|
if(or__3943__auto__) {
|
|
return or__3943__auto__
|
|
}else {
|
|
var or__3943__auto____$1 = cljs.core._first["_"];
|
|
if(or__3943__auto____$1) {
|
|
return or__3943__auto____$1
|
|
}else {
|
|
throw cljs.core.missing_protocol.call(null, "ISeq.-first", coll);
|
|
}
|
|
}
|
|
}().call(null, coll)
|
|
}
|
|
};
|
|
cljs.core._rest = function _rest(coll) {
|
|
if(function() {
|
|
var and__3941__auto__ = coll;
|
|
if(and__3941__auto__) {
|
|
return coll.cljs$core$ISeq$_rest$arity$1
|
|
}else {
|
|
return and__3941__auto__
|
|
}
|
|
}()) {
|
|
return coll.cljs$core$ISeq$_rest$arity$1(coll)
|
|
}else {
|
|
var x__2906__auto__ = coll == null ? null : coll;
|
|
return function() {
|
|
var or__3943__auto__ = cljs.core._rest[goog.typeOf(x__2906__auto__)];
|
|
if(or__3943__auto__) {
|
|
return or__3943__auto__
|
|
}else {
|
|
var or__3943__auto____$1 = cljs.core._rest["_"];
|
|
if(or__3943__auto____$1) {
|
|
return or__3943__auto____$1
|
|
}else {
|
|
throw cljs.core.missing_protocol.call(null, "ISeq.-rest", coll);
|
|
}
|
|
}
|
|
}().call(null, coll)
|
|
}
|
|
};
|
|
cljs.core.INext = {};
|
|
cljs.core._next = function _next(coll) {
|
|
if(function() {
|
|
var and__3941__auto__ = coll;
|
|
if(and__3941__auto__) {
|
|
return coll.cljs$core$INext$_next$arity$1
|
|
}else {
|
|
return and__3941__auto__
|
|
}
|
|
}()) {
|
|
return coll.cljs$core$INext$_next$arity$1(coll)
|
|
}else {
|
|
var x__2906__auto__ = coll == null ? null : coll;
|
|
return function() {
|
|
var or__3943__auto__ = cljs.core._next[goog.typeOf(x__2906__auto__)];
|
|
if(or__3943__auto__) {
|
|
return or__3943__auto__
|
|
}else {
|
|
var or__3943__auto____$1 = cljs.core._next["_"];
|
|
if(or__3943__auto____$1) {
|
|
return or__3943__auto____$1
|
|
}else {
|
|
throw cljs.core.missing_protocol.call(null, "INext.-next", coll);
|
|
}
|
|
}
|
|
}().call(null, coll)
|
|
}
|
|
};
|
|
cljs.core.ILookup = {};
|
|
cljs.core._lookup = function() {
|
|
var _lookup = null;
|
|
var _lookup__2 = function(o, k) {
|
|
if(function() {
|
|
var and__3941__auto__ = o;
|
|
if(and__3941__auto__) {
|
|
return o.cljs$core$ILookup$_lookup$arity$2
|
|
}else {
|
|
return and__3941__auto__
|
|
}
|
|
}()) {
|
|
return o.cljs$core$ILookup$_lookup$arity$2(o, k)
|
|
}else {
|
|
var x__2906__auto__ = o == null ? null : o;
|
|
return function() {
|
|
var or__3943__auto__ = cljs.core._lookup[goog.typeOf(x__2906__auto__)];
|
|
if(or__3943__auto__) {
|
|
return or__3943__auto__
|
|
}else {
|
|
var or__3943__auto____$1 = cljs.core._lookup["_"];
|
|
if(or__3943__auto____$1) {
|
|
return or__3943__auto____$1
|
|
}else {
|
|
throw cljs.core.missing_protocol.call(null, "ILookup.-lookup", o);
|
|
}
|
|
}
|
|
}().call(null, o, k)
|
|
}
|
|
};
|
|
var _lookup__3 = function(o, k, not_found) {
|
|
if(function() {
|
|
var and__3941__auto__ = o;
|
|
if(and__3941__auto__) {
|
|
return o.cljs$core$ILookup$_lookup$arity$3
|
|
}else {
|
|
return and__3941__auto__
|
|
}
|
|
}()) {
|
|
return o.cljs$core$ILookup$_lookup$arity$3(o, k, not_found)
|
|
}else {
|
|
var x__2906__auto__ = o == null ? null : o;
|
|
return function() {
|
|
var or__3943__auto__ = cljs.core._lookup[goog.typeOf(x__2906__auto__)];
|
|
if(or__3943__auto__) {
|
|
return or__3943__auto__
|
|
}else {
|
|
var or__3943__auto____$1 = cljs.core._lookup["_"];
|
|
if(or__3943__auto____$1) {
|
|
return or__3943__auto____$1
|
|
}else {
|
|
throw cljs.core.missing_protocol.call(null, "ILookup.-lookup", o);
|
|
}
|
|
}
|
|
}().call(null, o, k, not_found)
|
|
}
|
|
};
|
|
_lookup = function(o, k, not_found) {
|
|
switch(arguments.length) {
|
|
case 2:
|
|
return _lookup__2.call(this, o, k);
|
|
case 3:
|
|
return _lookup__3.call(this, o, k, not_found)
|
|
}
|
|
throw new Error("Invalid arity: " + arguments.length);
|
|
};
|
|
_lookup.cljs$core$IFn$_invoke$arity$2 = _lookup__2;
|
|
_lookup.cljs$core$IFn$_invoke$arity$3 = _lookup__3;
|
|
return _lookup
|
|
}();
|
|
cljs.core.IAssociative = {};
|
|
cljs.core._contains_key_QMARK_ = function _contains_key_QMARK_(coll, k) {
|
|
if(function() {
|
|
var and__3941__auto__ = coll;
|
|
if(and__3941__auto__) {
|
|
return coll.cljs$core$IAssociative$_contains_key_QMARK_$arity$2
|
|
}else {
|
|
return and__3941__auto__
|
|
}
|
|
}()) {
|
|
return coll.cljs$core$IAssociative$_contains_key_QMARK_$arity$2(coll, k)
|
|
}else {
|
|
var x__2906__auto__ = coll == null ? null : coll;
|
|
return function() {
|
|
var or__3943__auto__ = cljs.core._contains_key_QMARK_[goog.typeOf(x__2906__auto__)];
|
|
if(or__3943__auto__) {
|
|
return or__3943__auto__
|
|
}else {
|
|
var or__3943__auto____$1 = cljs.core._contains_key_QMARK_["_"];
|
|
if(or__3943__auto____$1) {
|
|
return or__3943__auto____$1
|
|
}else {
|
|
throw cljs.core.missing_protocol.call(null, "IAssociative.-contains-key?", coll);
|
|
}
|
|
}
|
|
}().call(null, coll, k)
|
|
}
|
|
};
|
|
cljs.core._assoc = function _assoc(coll, k, v) {
|
|
if(function() {
|
|
var and__3941__auto__ = coll;
|
|
if(and__3941__auto__) {
|
|
return coll.cljs$core$IAssociative$_assoc$arity$3
|
|
}else {
|
|
return and__3941__auto__
|
|
}
|
|
}()) {
|
|
return coll.cljs$core$IAssociative$_assoc$arity$3(coll, k, v)
|
|
}else {
|
|
var x__2906__auto__ = coll == null ? null : coll;
|
|
return function() {
|
|
var or__3943__auto__ = cljs.core._assoc[goog.typeOf(x__2906__auto__)];
|
|
if(or__3943__auto__) {
|
|
return or__3943__auto__
|
|
}else {
|
|
var or__3943__auto____$1 = cljs.core._assoc["_"];
|
|
if(or__3943__auto____$1) {
|
|
return or__3943__auto____$1
|
|
}else {
|
|
throw cljs.core.missing_protocol.call(null, "IAssociative.-assoc", coll);
|
|
}
|
|
}
|
|
}().call(null, coll, k, v)
|
|
}
|
|
};
|
|
cljs.core.IMap = {};
|
|
cljs.core._dissoc = function _dissoc(coll, k) {
|
|
if(function() {
|
|
var and__3941__auto__ = coll;
|
|
if(and__3941__auto__) {
|
|
return coll.cljs$core$IMap$_dissoc$arity$2
|
|
}else {
|
|
return and__3941__auto__
|
|
}
|
|
}()) {
|
|
return coll.cljs$core$IMap$_dissoc$arity$2(coll, k)
|
|
}else {
|
|
var x__2906__auto__ = coll == null ? null : coll;
|
|
return function() {
|
|
var or__3943__auto__ = cljs.core._dissoc[goog.typeOf(x__2906__auto__)];
|
|
if(or__3943__auto__) {
|
|
return or__3943__auto__
|
|
}else {
|
|
var or__3943__auto____$1 = cljs.core._dissoc["_"];
|
|
if(or__3943__auto____$1) {
|
|
return or__3943__auto____$1
|
|
}else {
|
|
throw cljs.core.missing_protocol.call(null, "IMap.-dissoc", coll);
|
|
}
|
|
}
|
|
}().call(null, coll, k)
|
|
}
|
|
};
|
|
cljs.core.IMapEntry = {};
|
|
cljs.core._key = function _key(coll) {
|
|
if(function() {
|
|
var and__3941__auto__ = coll;
|
|
if(and__3941__auto__) {
|
|
return coll.cljs$core$IMapEntry$_key$arity$1
|
|
}else {
|
|
return and__3941__auto__
|
|
}
|
|
}()) {
|
|
return coll.cljs$core$IMapEntry$_key$arity$1(coll)
|
|
}else {
|
|
var x__2906__auto__ = coll == null ? null : coll;
|
|
return function() {
|
|
var or__3943__auto__ = cljs.core._key[goog.typeOf(x__2906__auto__)];
|
|
if(or__3943__auto__) {
|
|
return or__3943__auto__
|
|
}else {
|
|
var or__3943__auto____$1 = cljs.core._key["_"];
|
|
if(or__3943__auto____$1) {
|
|
return or__3943__auto____$1
|
|
}else {
|
|
throw cljs.core.missing_protocol.call(null, "IMapEntry.-key", coll);
|
|
}
|
|
}
|
|
}().call(null, coll)
|
|
}
|
|
};
|
|
cljs.core._val = function _val(coll) {
|
|
if(function() {
|
|
var and__3941__auto__ = coll;
|
|
if(and__3941__auto__) {
|
|
return coll.cljs$core$IMapEntry$_val$arity$1
|
|
}else {
|
|
return and__3941__auto__
|
|
}
|
|
}()) {
|
|
return coll.cljs$core$IMapEntry$_val$arity$1(coll)
|
|
}else {
|
|
var x__2906__auto__ = coll == null ? null : coll;
|
|
return function() {
|
|
var or__3943__auto__ = cljs.core._val[goog.typeOf(x__2906__auto__)];
|
|
if(or__3943__auto__) {
|
|
return or__3943__auto__
|
|
}else {
|
|
var or__3943__auto____$1 = cljs.core._val["_"];
|
|
if(or__3943__auto____$1) {
|
|
return or__3943__auto____$1
|
|
}else {
|
|
throw cljs.core.missing_protocol.call(null, "IMapEntry.-val", coll);
|
|
}
|
|
}
|
|
}().call(null, coll)
|
|
}
|
|
};
|
|
cljs.core.ISet = {};
|
|
cljs.core._disjoin = function _disjoin(coll, v) {
|
|
if(function() {
|
|
var and__3941__auto__ = coll;
|
|
if(and__3941__auto__) {
|
|
return coll.cljs$core$ISet$_disjoin$arity$2
|
|
}else {
|
|
return and__3941__auto__
|
|
}
|
|
}()) {
|
|
return coll.cljs$core$ISet$_disjoin$arity$2(coll, v)
|
|
}else {
|
|
var x__2906__auto__ = coll == null ? null : coll;
|
|
return function() {
|
|
var or__3943__auto__ = cljs.core._disjoin[goog.typeOf(x__2906__auto__)];
|
|
if(or__3943__auto__) {
|
|
return or__3943__auto__
|
|
}else {
|
|
var or__3943__auto____$1 = cljs.core._disjoin["_"];
|
|
if(or__3943__auto____$1) {
|
|
return or__3943__auto____$1
|
|
}else {
|
|
throw cljs.core.missing_protocol.call(null, "ISet.-disjoin", coll);
|
|
}
|
|
}
|
|
}().call(null, coll, v)
|
|
}
|
|
};
|
|
cljs.core.IStack = {};
|
|
cljs.core._peek = function _peek(coll) {
|
|
if(function() {
|
|
var and__3941__auto__ = coll;
|
|
if(and__3941__auto__) {
|
|
return coll.cljs$core$IStack$_peek$arity$1
|
|
}else {
|
|
return and__3941__auto__
|
|
}
|
|
}()) {
|
|
return coll.cljs$core$IStack$_peek$arity$1(coll)
|
|
}else {
|
|
var x__2906__auto__ = coll == null ? null : coll;
|
|
return function() {
|
|
var or__3943__auto__ = cljs.core._peek[goog.typeOf(x__2906__auto__)];
|
|
if(or__3943__auto__) {
|
|
return or__3943__auto__
|
|
}else {
|
|
var or__3943__auto____$1 = cljs.core._peek["_"];
|
|
if(or__3943__auto____$1) {
|
|
return or__3943__auto____$1
|
|
}else {
|
|
throw cljs.core.missing_protocol.call(null, "IStack.-peek", coll);
|
|
}
|
|
}
|
|
}().call(null, coll)
|
|
}
|
|
};
|
|
cljs.core._pop = function _pop(coll) {
|
|
if(function() {
|
|
var and__3941__auto__ = coll;
|
|
if(and__3941__auto__) {
|
|
return coll.cljs$core$IStack$_pop$arity$1
|
|
}else {
|
|
return and__3941__auto__
|
|
}
|
|
}()) {
|
|
return coll.cljs$core$IStack$_pop$arity$1(coll)
|
|
}else {
|
|
var x__2906__auto__ = coll == null ? null : coll;
|
|
return function() {
|
|
var or__3943__auto__ = cljs.core._pop[goog.typeOf(x__2906__auto__)];
|
|
if(or__3943__auto__) {
|
|
return or__3943__auto__
|
|
}else {
|
|
var or__3943__auto____$1 = cljs.core._pop["_"];
|
|
if(or__3943__auto____$1) {
|
|
return or__3943__auto____$1
|
|
}else {
|
|
throw cljs.core.missing_protocol.call(null, "IStack.-pop", coll);
|
|
}
|
|
}
|
|
}().call(null, coll)
|
|
}
|
|
};
|
|
cljs.core.IVector = {};
|
|
cljs.core._assoc_n = function _assoc_n(coll, n, val) {
|
|
if(function() {
|
|
var and__3941__auto__ = coll;
|
|
if(and__3941__auto__) {
|
|
return coll.cljs$core$IVector$_assoc_n$arity$3
|
|
}else {
|
|
return and__3941__auto__
|
|
}
|
|
}()) {
|
|
return coll.cljs$core$IVector$_assoc_n$arity$3(coll, n, val)
|
|
}else {
|
|
var x__2906__auto__ = coll == null ? null : coll;
|
|
return function() {
|
|
var or__3943__auto__ = cljs.core._assoc_n[goog.typeOf(x__2906__auto__)];
|
|
if(or__3943__auto__) {
|
|
return or__3943__auto__
|
|
}else {
|
|
var or__3943__auto____$1 = cljs.core._assoc_n["_"];
|
|
if(or__3943__auto____$1) {
|
|
return or__3943__auto____$1
|
|
}else {
|
|
throw cljs.core.missing_protocol.call(null, "IVector.-assoc-n", coll);
|
|
}
|
|
}
|
|
}().call(null, coll, n, val)
|
|
}
|
|
};
|
|
cljs.core.IDeref = {};
|
|
cljs.core._deref = function _deref(o) {
|
|
if(function() {
|
|
var and__3941__auto__ = o;
|
|
if(and__3941__auto__) {
|
|
return o.cljs$core$IDeref$_deref$arity$1
|
|
}else {
|
|
return and__3941__auto__
|
|
}
|
|
}()) {
|
|
return o.cljs$core$IDeref$_deref$arity$1(o)
|
|
}else {
|
|
var x__2906__auto__ = o == null ? null : o;
|
|
return function() {
|
|
var or__3943__auto__ = cljs.core._deref[goog.typeOf(x__2906__auto__)];
|
|
if(or__3943__auto__) {
|
|
return or__3943__auto__
|
|
}else {
|
|
var or__3943__auto____$1 = cljs.core._deref["_"];
|
|
if(or__3943__auto____$1) {
|
|
return or__3943__auto____$1
|
|
}else {
|
|
throw cljs.core.missing_protocol.call(null, "IDeref.-deref", o);
|
|
}
|
|
}
|
|
}().call(null, o)
|
|
}
|
|
};
|
|
cljs.core.IDerefWithTimeout = {};
|
|
cljs.core._deref_with_timeout = function _deref_with_timeout(o, msec, timeout_val) {
|
|
if(function() {
|
|
var and__3941__auto__ = o;
|
|
if(and__3941__auto__) {
|
|
return o.cljs$core$IDerefWithTimeout$_deref_with_timeout$arity$3
|
|
}else {
|
|
return and__3941__auto__
|
|
}
|
|
}()) {
|
|
return o.cljs$core$IDerefWithTimeout$_deref_with_timeout$arity$3(o, msec, timeout_val)
|
|
}else {
|
|
var x__2906__auto__ = o == null ? null : o;
|
|
return function() {
|
|
var or__3943__auto__ = cljs.core._deref_with_timeout[goog.typeOf(x__2906__auto__)];
|
|
if(or__3943__auto__) {
|
|
return or__3943__auto__
|
|
}else {
|
|
var or__3943__auto____$1 = cljs.core._deref_with_timeout["_"];
|
|
if(or__3943__auto____$1) {
|
|
return or__3943__auto____$1
|
|
}else {
|
|
throw cljs.core.missing_protocol.call(null, "IDerefWithTimeout.-deref-with-timeout", o);
|
|
}
|
|
}
|
|
}().call(null, o, msec, timeout_val)
|
|
}
|
|
};
|
|
cljs.core.IMeta = {};
|
|
cljs.core._meta = function _meta(o) {
|
|
if(function() {
|
|
var and__3941__auto__ = o;
|
|
if(and__3941__auto__) {
|
|
return o.cljs$core$IMeta$_meta$arity$1
|
|
}else {
|
|
return and__3941__auto__
|
|
}
|
|
}()) {
|
|
return o.cljs$core$IMeta$_meta$arity$1(o)
|
|
}else {
|
|
var x__2906__auto__ = o == null ? null : o;
|
|
return function() {
|
|
var or__3943__auto__ = cljs.core._meta[goog.typeOf(x__2906__auto__)];
|
|
if(or__3943__auto__) {
|
|
return or__3943__auto__
|
|
}else {
|
|
var or__3943__auto____$1 = cljs.core._meta["_"];
|
|
if(or__3943__auto____$1) {
|
|
return or__3943__auto____$1
|
|
}else {
|
|
throw cljs.core.missing_protocol.call(null, "IMeta.-meta", o);
|
|
}
|
|
}
|
|
}().call(null, o)
|
|
}
|
|
};
|
|
cljs.core.IWithMeta = {};
|
|
cljs.core._with_meta = function _with_meta(o, meta) {
|
|
if(function() {
|
|
var and__3941__auto__ = o;
|
|
if(and__3941__auto__) {
|
|
return o.cljs$core$IWithMeta$_with_meta$arity$2
|
|
}else {
|
|
return and__3941__auto__
|
|
}
|
|
}()) {
|
|
return o.cljs$core$IWithMeta$_with_meta$arity$2(o, meta)
|
|
}else {
|
|
var x__2906__auto__ = o == null ? null : o;
|
|
return function() {
|
|
var or__3943__auto__ = cljs.core._with_meta[goog.typeOf(x__2906__auto__)];
|
|
if(or__3943__auto__) {
|
|
return or__3943__auto__
|
|
}else {
|
|
var or__3943__auto____$1 = cljs.core._with_meta["_"];
|
|
if(or__3943__auto____$1) {
|
|
return or__3943__auto____$1
|
|
}else {
|
|
throw cljs.core.missing_protocol.call(null, "IWithMeta.-with-meta", o);
|
|
}
|
|
}
|
|
}().call(null, o, meta)
|
|
}
|
|
};
|
|
cljs.core.IReduce = {};
|
|
cljs.core._reduce = function() {
|
|
var _reduce = null;
|
|
var _reduce__2 = function(coll, f) {
|
|
if(function() {
|
|
var and__3941__auto__ = coll;
|
|
if(and__3941__auto__) {
|
|
return coll.cljs$core$IReduce$_reduce$arity$2
|
|
}else {
|
|
return and__3941__auto__
|
|
}
|
|
}()) {
|
|
return coll.cljs$core$IReduce$_reduce$arity$2(coll, f)
|
|
}else {
|
|
var x__2906__auto__ = coll == null ? null : coll;
|
|
return function() {
|
|
var or__3943__auto__ = cljs.core._reduce[goog.typeOf(x__2906__auto__)];
|
|
if(or__3943__auto__) {
|
|
return or__3943__auto__
|
|
}else {
|
|
var or__3943__auto____$1 = cljs.core._reduce["_"];
|
|
if(or__3943__auto____$1) {
|
|
return or__3943__auto____$1
|
|
}else {
|
|
throw cljs.core.missing_protocol.call(null, "IReduce.-reduce", coll);
|
|
}
|
|
}
|
|
}().call(null, coll, f)
|
|
}
|
|
};
|
|
var _reduce__3 = function(coll, f, start) {
|
|
if(function() {
|
|
var and__3941__auto__ = coll;
|
|
if(and__3941__auto__) {
|
|
return coll.cljs$core$IReduce$_reduce$arity$3
|
|
}else {
|
|
return and__3941__auto__
|
|
}
|
|
}()) {
|
|
return coll.cljs$core$IReduce$_reduce$arity$3(coll, f, start)
|
|
}else {
|
|
var x__2906__auto__ = coll == null ? null : coll;
|
|
return function() {
|
|
var or__3943__auto__ = cljs.core._reduce[goog.typeOf(x__2906__auto__)];
|
|
if(or__3943__auto__) {
|
|
return or__3943__auto__
|
|
}else {
|
|
var or__3943__auto____$1 = cljs.core._reduce["_"];
|
|
if(or__3943__auto____$1) {
|
|
return or__3943__auto____$1
|
|
}else {
|
|
throw cljs.core.missing_protocol.call(null, "IReduce.-reduce", coll);
|
|
}
|
|
}
|
|
}().call(null, coll, f, start)
|
|
}
|
|
};
|
|
_reduce = function(coll, f, start) {
|
|
switch(arguments.length) {
|
|
case 2:
|
|
return _reduce__2.call(this, coll, f);
|
|
case 3:
|
|
return _reduce__3.call(this, coll, f, start)
|
|
}
|
|
throw new Error("Invalid arity: " + arguments.length);
|
|
};
|
|
_reduce.cljs$core$IFn$_invoke$arity$2 = _reduce__2;
|
|
_reduce.cljs$core$IFn$_invoke$arity$3 = _reduce__3;
|
|
return _reduce
|
|
}();
|
|
cljs.core.IKVReduce = {};
|
|
cljs.core._kv_reduce = function _kv_reduce(coll, f, init) {
|
|
if(function() {
|
|
var and__3941__auto__ = coll;
|
|
if(and__3941__auto__) {
|
|
return coll.cljs$core$IKVReduce$_kv_reduce$arity$3
|
|
}else {
|
|
return and__3941__auto__
|
|
}
|
|
}()) {
|
|
return coll.cljs$core$IKVReduce$_kv_reduce$arity$3(coll, f, init)
|
|
}else {
|
|
var x__2906__auto__ = coll == null ? null : coll;
|
|
return function() {
|
|
var or__3943__auto__ = cljs.core._kv_reduce[goog.typeOf(x__2906__auto__)];
|
|
if(or__3943__auto__) {
|
|
return or__3943__auto__
|
|
}else {
|
|
var or__3943__auto____$1 = cljs.core._kv_reduce["_"];
|
|
if(or__3943__auto____$1) {
|
|
return or__3943__auto____$1
|
|
}else {
|
|
throw cljs.core.missing_protocol.call(null, "IKVReduce.-kv-reduce", coll);
|
|
}
|
|
}
|
|
}().call(null, coll, f, init)
|
|
}
|
|
};
|
|
cljs.core.IEquiv = {};
|
|
cljs.core._equiv = function _equiv(o, other) {
|
|
if(function() {
|
|
var and__3941__auto__ = o;
|
|
if(and__3941__auto__) {
|
|
return o.cljs$core$IEquiv$_equiv$arity$2
|
|
}else {
|
|
return and__3941__auto__
|
|
}
|
|
}()) {
|
|
return o.cljs$core$IEquiv$_equiv$arity$2(o, other)
|
|
}else {
|
|
var x__2906__auto__ = o == null ? null : o;
|
|
return function() {
|
|
var or__3943__auto__ = cljs.core._equiv[goog.typeOf(x__2906__auto__)];
|
|
if(or__3943__auto__) {
|
|
return or__3943__auto__
|
|
}else {
|
|
var or__3943__auto____$1 = cljs.core._equiv["_"];
|
|
if(or__3943__auto____$1) {
|
|
return or__3943__auto____$1
|
|
}else {
|
|
throw cljs.core.missing_protocol.call(null, "IEquiv.-equiv", o);
|
|
}
|
|
}
|
|
}().call(null, o, other)
|
|
}
|
|
};
|
|
cljs.core.IHash = {};
|
|
cljs.core._hash = function _hash(o) {
|
|
if(function() {
|
|
var and__3941__auto__ = o;
|
|
if(and__3941__auto__) {
|
|
return o.cljs$core$IHash$_hash$arity$1
|
|
}else {
|
|
return and__3941__auto__
|
|
}
|
|
}()) {
|
|
return o.cljs$core$IHash$_hash$arity$1(o)
|
|
}else {
|
|
var x__2906__auto__ = o == null ? null : o;
|
|
return function() {
|
|
var or__3943__auto__ = cljs.core._hash[goog.typeOf(x__2906__auto__)];
|
|
if(or__3943__auto__) {
|
|
return or__3943__auto__
|
|
}else {
|
|
var or__3943__auto____$1 = cljs.core._hash["_"];
|
|
if(or__3943__auto____$1) {
|
|
return or__3943__auto____$1
|
|
}else {
|
|
throw cljs.core.missing_protocol.call(null, "IHash.-hash", o);
|
|
}
|
|
}
|
|
}().call(null, o)
|
|
}
|
|
};
|
|
cljs.core.ISeqable = {};
|
|
cljs.core._seq = function _seq(o) {
|
|
if(function() {
|
|
var and__3941__auto__ = o;
|
|
if(and__3941__auto__) {
|
|
return o.cljs$core$ISeqable$_seq$arity$1
|
|
}else {
|
|
return and__3941__auto__
|
|
}
|
|
}()) {
|
|
return o.cljs$core$ISeqable$_seq$arity$1(o)
|
|
}else {
|
|
var x__2906__auto__ = o == null ? null : o;
|
|
return function() {
|
|
var or__3943__auto__ = cljs.core._seq[goog.typeOf(x__2906__auto__)];
|
|
if(or__3943__auto__) {
|
|
return or__3943__auto__
|
|
}else {
|
|
var or__3943__auto____$1 = cljs.core._seq["_"];
|
|
if(or__3943__auto____$1) {
|
|
return or__3943__auto____$1
|
|
}else {
|
|
throw cljs.core.missing_protocol.call(null, "ISeqable.-seq", o);
|
|
}
|
|
}
|
|
}().call(null, o)
|
|
}
|
|
};
|
|
cljs.core.ISequential = {};
|
|
cljs.core.IList = {};
|
|
cljs.core.IRecord = {};
|
|
cljs.core.IReversible = {};
|
|
cljs.core._rseq = function _rseq(coll) {
|
|
if(function() {
|
|
var and__3941__auto__ = coll;
|
|
if(and__3941__auto__) {
|
|
return coll.cljs$core$IReversible$_rseq$arity$1
|
|
}else {
|
|
return and__3941__auto__
|
|
}
|
|
}()) {
|
|
return coll.cljs$core$IReversible$_rseq$arity$1(coll)
|
|
}else {
|
|
var x__2906__auto__ = coll == null ? null : coll;
|
|
return function() {
|
|
var or__3943__auto__ = cljs.core._rseq[goog.typeOf(x__2906__auto__)];
|
|
if(or__3943__auto__) {
|
|
return or__3943__auto__
|
|
}else {
|
|
var or__3943__auto____$1 = cljs.core._rseq["_"];
|
|
if(or__3943__auto____$1) {
|
|
return or__3943__auto____$1
|
|
}else {
|
|
throw cljs.core.missing_protocol.call(null, "IReversible.-rseq", coll);
|
|
}
|
|
}
|
|
}().call(null, coll)
|
|
}
|
|
};
|
|
cljs.core.ISorted = {};
|
|
cljs.core._sorted_seq = function _sorted_seq(coll, ascending_QMARK_) {
|
|
if(function() {
|
|
var and__3941__auto__ = coll;
|
|
if(and__3941__auto__) {
|
|
return coll.cljs$core$ISorted$_sorted_seq$arity$2
|
|
}else {
|
|
return and__3941__auto__
|
|
}
|
|
}()) {
|
|
return coll.cljs$core$ISorted$_sorted_seq$arity$2(coll, ascending_QMARK_)
|
|
}else {
|
|
var x__2906__auto__ = coll == null ? null : coll;
|
|
return function() {
|
|
var or__3943__auto__ = cljs.core._sorted_seq[goog.typeOf(x__2906__auto__)];
|
|
if(or__3943__auto__) {
|
|
return or__3943__auto__
|
|
}else {
|
|
var or__3943__auto____$1 = cljs.core._sorted_seq["_"];
|
|
if(or__3943__auto____$1) {
|
|
return or__3943__auto____$1
|
|
}else {
|
|
throw cljs.core.missing_protocol.call(null, "ISorted.-sorted-seq", coll);
|
|
}
|
|
}
|
|
}().call(null, coll, ascending_QMARK_)
|
|
}
|
|
};
|
|
cljs.core._sorted_seq_from = function _sorted_seq_from(coll, k, ascending_QMARK_) {
|
|
if(function() {
|
|
var and__3941__auto__ = coll;
|
|
if(and__3941__auto__) {
|
|
return coll.cljs$core$ISorted$_sorted_seq_from$arity$3
|
|
}else {
|
|
return and__3941__auto__
|
|
}
|
|
}()) {
|
|
return coll.cljs$core$ISorted$_sorted_seq_from$arity$3(coll, k, ascending_QMARK_)
|
|
}else {
|
|
var x__2906__auto__ = coll == null ? null : coll;
|
|
return function() {
|
|
var or__3943__auto__ = cljs.core._sorted_seq_from[goog.typeOf(x__2906__auto__)];
|
|
if(or__3943__auto__) {
|
|
return or__3943__auto__
|
|
}else {
|
|
var or__3943__auto____$1 = cljs.core._sorted_seq_from["_"];
|
|
if(or__3943__auto____$1) {
|
|
return or__3943__auto____$1
|
|
}else {
|
|
throw cljs.core.missing_protocol.call(null, "ISorted.-sorted-seq-from", coll);
|
|
}
|
|
}
|
|
}().call(null, coll, k, ascending_QMARK_)
|
|
}
|
|
};
|
|
cljs.core._entry_key = function _entry_key(coll, entry) {
|
|
if(function() {
|
|
var and__3941__auto__ = coll;
|
|
if(and__3941__auto__) {
|
|
return coll.cljs$core$ISorted$_entry_key$arity$2
|
|
}else {
|
|
return and__3941__auto__
|
|
}
|
|
}()) {
|
|
return coll.cljs$core$ISorted$_entry_key$arity$2(coll, entry)
|
|
}else {
|
|
var x__2906__auto__ = coll == null ? null : coll;
|
|
return function() {
|
|
var or__3943__auto__ = cljs.core._entry_key[goog.typeOf(x__2906__auto__)];
|
|
if(or__3943__auto__) {
|
|
return or__3943__auto__
|
|
}else {
|
|
var or__3943__auto____$1 = cljs.core._entry_key["_"];
|
|
if(or__3943__auto____$1) {
|
|
return or__3943__auto____$1
|
|
}else {
|
|
throw cljs.core.missing_protocol.call(null, "ISorted.-entry-key", coll);
|
|
}
|
|
}
|
|
}().call(null, coll, entry)
|
|
}
|
|
};
|
|
cljs.core._comparator = function _comparator(coll) {
|
|
if(function() {
|
|
var and__3941__auto__ = coll;
|
|
if(and__3941__auto__) {
|
|
return coll.cljs$core$ISorted$_comparator$arity$1
|
|
}else {
|
|
return and__3941__auto__
|
|
}
|
|
}()) {
|
|
return coll.cljs$core$ISorted$_comparator$arity$1(coll)
|
|
}else {
|
|
var x__2906__auto__ = coll == null ? null : coll;
|
|
return function() {
|
|
var or__3943__auto__ = cljs.core._comparator[goog.typeOf(x__2906__auto__)];
|
|
if(or__3943__auto__) {
|
|
return or__3943__auto__
|
|
}else {
|
|
var or__3943__auto____$1 = cljs.core._comparator["_"];
|
|
if(or__3943__auto____$1) {
|
|
return or__3943__auto____$1
|
|
}else {
|
|
throw cljs.core.missing_protocol.call(null, "ISorted.-comparator", coll);
|
|
}
|
|
}
|
|
}().call(null, coll)
|
|
}
|
|
};
|
|
cljs.core.IWriter = {};
|
|
cljs.core._write = function _write(writer, s) {
|
|
if(function() {
|
|
var and__3941__auto__ = writer;
|
|
if(and__3941__auto__) {
|
|
return writer.cljs$core$IWriter$_write$arity$2
|
|
}else {
|
|
return and__3941__auto__
|
|
}
|
|
}()) {
|
|
return writer.cljs$core$IWriter$_write$arity$2(writer, s)
|
|
}else {
|
|
var x__2906__auto__ = writer == null ? null : writer;
|
|
return function() {
|
|
var or__3943__auto__ = cljs.core._write[goog.typeOf(x__2906__auto__)];
|
|
if(or__3943__auto__) {
|
|
return or__3943__auto__
|
|
}else {
|
|
var or__3943__auto____$1 = cljs.core._write["_"];
|
|
if(or__3943__auto____$1) {
|
|
return or__3943__auto____$1
|
|
}else {
|
|
throw cljs.core.missing_protocol.call(null, "IWriter.-write", writer);
|
|
}
|
|
}
|
|
}().call(null, writer, s)
|
|
}
|
|
};
|
|
cljs.core._flush = function _flush(writer) {
|
|
if(function() {
|
|
var and__3941__auto__ = writer;
|
|
if(and__3941__auto__) {
|
|
return writer.cljs$core$IWriter$_flush$arity$1
|
|
}else {
|
|
return and__3941__auto__
|
|
}
|
|
}()) {
|
|
return writer.cljs$core$IWriter$_flush$arity$1(writer)
|
|
}else {
|
|
var x__2906__auto__ = writer == null ? null : writer;
|
|
return function() {
|
|
var or__3943__auto__ = cljs.core._flush[goog.typeOf(x__2906__auto__)];
|
|
if(or__3943__auto__) {
|
|
return or__3943__auto__
|
|
}else {
|
|
var or__3943__auto____$1 = cljs.core._flush["_"];
|
|
if(or__3943__auto____$1) {
|
|
return or__3943__auto____$1
|
|
}else {
|
|
throw cljs.core.missing_protocol.call(null, "IWriter.-flush", writer);
|
|
}
|
|
}
|
|
}().call(null, writer)
|
|
}
|
|
};
|
|
cljs.core.IPrintWithWriter = {};
|
|
cljs.core._pr_writer = function _pr_writer(o, writer, opts) {
|
|
if(function() {
|
|
var and__3941__auto__ = o;
|
|
if(and__3941__auto__) {
|
|
return o.cljs$core$IPrintWithWriter$_pr_writer$arity$3
|
|
}else {
|
|
return and__3941__auto__
|
|
}
|
|
}()) {
|
|
return o.cljs$core$IPrintWithWriter$_pr_writer$arity$3(o, writer, opts)
|
|
}else {
|
|
var x__2906__auto__ = o == null ? null : o;
|
|
return function() {
|
|
var or__3943__auto__ = cljs.core._pr_writer[goog.typeOf(x__2906__auto__)];
|
|
if(or__3943__auto__) {
|
|
return or__3943__auto__
|
|
}else {
|
|
var or__3943__auto____$1 = cljs.core._pr_writer["_"];
|
|
if(or__3943__auto____$1) {
|
|
return or__3943__auto____$1
|
|
}else {
|
|
throw cljs.core.missing_protocol.call(null, "IPrintWithWriter.-pr-writer", o);
|
|
}
|
|
}
|
|
}().call(null, o, writer, opts)
|
|
}
|
|
};
|
|
cljs.core.IPending = {};
|
|
cljs.core._realized_QMARK_ = function _realized_QMARK_(d) {
|
|
if(function() {
|
|
var and__3941__auto__ = d;
|
|
if(and__3941__auto__) {
|
|
return d.cljs$core$IPending$_realized_QMARK_$arity$1
|
|
}else {
|
|
return and__3941__auto__
|
|
}
|
|
}()) {
|
|
return d.cljs$core$IPending$_realized_QMARK_$arity$1(d)
|
|
}else {
|
|
var x__2906__auto__ = d == null ? null : d;
|
|
return function() {
|
|
var or__3943__auto__ = cljs.core._realized_QMARK_[goog.typeOf(x__2906__auto__)];
|
|
if(or__3943__auto__) {
|
|
return or__3943__auto__
|
|
}else {
|
|
var or__3943__auto____$1 = cljs.core._realized_QMARK_["_"];
|
|
if(or__3943__auto____$1) {
|
|
return or__3943__auto____$1
|
|
}else {
|
|
throw cljs.core.missing_protocol.call(null, "IPending.-realized?", d);
|
|
}
|
|
}
|
|
}().call(null, d)
|
|
}
|
|
};
|
|
cljs.core.IWatchable = {};
|
|
cljs.core._notify_watches = function _notify_watches(this$, oldval, newval) {
|
|
if(function() {
|
|
var and__3941__auto__ = this$;
|
|
if(and__3941__auto__) {
|
|
return this$.cljs$core$IWatchable$_notify_watches$arity$3
|
|
}else {
|
|
return and__3941__auto__
|
|
}
|
|
}()) {
|
|
return this$.cljs$core$IWatchable$_notify_watches$arity$3(this$, oldval, newval)
|
|
}else {
|
|
var x__2906__auto__ = this$ == null ? null : this$;
|
|
return function() {
|
|
var or__3943__auto__ = cljs.core._notify_watches[goog.typeOf(x__2906__auto__)];
|
|
if(or__3943__auto__) {
|
|
return or__3943__auto__
|
|
}else {
|
|
var or__3943__auto____$1 = cljs.core._notify_watches["_"];
|
|
if(or__3943__auto____$1) {
|
|
return or__3943__auto____$1
|
|
}else {
|
|
throw cljs.core.missing_protocol.call(null, "IWatchable.-notify-watches", this$);
|
|
}
|
|
}
|
|
}().call(null, this$, oldval, newval)
|
|
}
|
|
};
|
|
cljs.core._add_watch = function _add_watch(this$, key, f) {
|
|
if(function() {
|
|
var and__3941__auto__ = this$;
|
|
if(and__3941__auto__) {
|
|
return this$.cljs$core$IWatchable$_add_watch$arity$3
|
|
}else {
|
|
return and__3941__auto__
|
|
}
|
|
}()) {
|
|
return this$.cljs$core$IWatchable$_add_watch$arity$3(this$, key, f)
|
|
}else {
|
|
var x__2906__auto__ = this$ == null ? null : this$;
|
|
return function() {
|
|
var or__3943__auto__ = cljs.core._add_watch[goog.typeOf(x__2906__auto__)];
|
|
if(or__3943__auto__) {
|
|
return or__3943__auto__
|
|
}else {
|
|
var or__3943__auto____$1 = cljs.core._add_watch["_"];
|
|
if(or__3943__auto____$1) {
|
|
return or__3943__auto____$1
|
|
}else {
|
|
throw cljs.core.missing_protocol.call(null, "IWatchable.-add-watch", this$);
|
|
}
|
|
}
|
|
}().call(null, this$, key, f)
|
|
}
|
|
};
|
|
cljs.core._remove_watch = function _remove_watch(this$, key) {
|
|
if(function() {
|
|
var and__3941__auto__ = this$;
|
|
if(and__3941__auto__) {
|
|
return this$.cljs$core$IWatchable$_remove_watch$arity$2
|
|
}else {
|
|
return and__3941__auto__
|
|
}
|
|
}()) {
|
|
return this$.cljs$core$IWatchable$_remove_watch$arity$2(this$, key)
|
|
}else {
|
|
var x__2906__auto__ = this$ == null ? null : this$;
|
|
return function() {
|
|
var or__3943__auto__ = cljs.core._remove_watch[goog.typeOf(x__2906__auto__)];
|
|
if(or__3943__auto__) {
|
|
return or__3943__auto__
|
|
}else {
|
|
var or__3943__auto____$1 = cljs.core._remove_watch["_"];
|
|
if(or__3943__auto____$1) {
|
|
return or__3943__auto____$1
|
|
}else {
|
|
throw cljs.core.missing_protocol.call(null, "IWatchable.-remove-watch", this$);
|
|
}
|
|
}
|
|
}().call(null, this$, key)
|
|
}
|
|
};
|
|
cljs.core.IEditableCollection = {};
|
|
cljs.core._as_transient = function _as_transient(coll) {
|
|
if(function() {
|
|
var and__3941__auto__ = coll;
|
|
if(and__3941__auto__) {
|
|
return coll.cljs$core$IEditableCollection$_as_transient$arity$1
|
|
}else {
|
|
return and__3941__auto__
|
|
}
|
|
}()) {
|
|
return coll.cljs$core$IEditableCollection$_as_transient$arity$1(coll)
|
|
}else {
|
|
var x__2906__auto__ = coll == null ? null : coll;
|
|
return function() {
|
|
var or__3943__auto__ = cljs.core._as_transient[goog.typeOf(x__2906__auto__)];
|
|
if(or__3943__auto__) {
|
|
return or__3943__auto__
|
|
}else {
|
|
var or__3943__auto____$1 = cljs.core._as_transient["_"];
|
|
if(or__3943__auto____$1) {
|
|
return or__3943__auto____$1
|
|
}else {
|
|
throw cljs.core.missing_protocol.call(null, "IEditableCollection.-as-transient", coll);
|
|
}
|
|
}
|
|
}().call(null, coll)
|
|
}
|
|
};
|
|
cljs.core.ITransientCollection = {};
|
|
cljs.core._conj_BANG_ = function _conj_BANG_(tcoll, val) {
|
|
if(function() {
|
|
var and__3941__auto__ = tcoll;
|
|
if(and__3941__auto__) {
|
|
return tcoll.cljs$core$ITransientCollection$_conj_BANG_$arity$2
|
|
}else {
|
|
return and__3941__auto__
|
|
}
|
|
}()) {
|
|
return tcoll.cljs$core$ITransientCollection$_conj_BANG_$arity$2(tcoll, val)
|
|
}else {
|
|
var x__2906__auto__ = tcoll == null ? null : tcoll;
|
|
return function() {
|
|
var or__3943__auto__ = cljs.core._conj_BANG_[goog.typeOf(x__2906__auto__)];
|
|
if(or__3943__auto__) {
|
|
return or__3943__auto__
|
|
}else {
|
|
var or__3943__auto____$1 = cljs.core._conj_BANG_["_"];
|
|
if(or__3943__auto____$1) {
|
|
return or__3943__auto____$1
|
|
}else {
|
|
throw cljs.core.missing_protocol.call(null, "ITransientCollection.-conj!", tcoll);
|
|
}
|
|
}
|
|
}().call(null, tcoll, val)
|
|
}
|
|
};
|
|
cljs.core._persistent_BANG_ = function _persistent_BANG_(tcoll) {
|
|
if(function() {
|
|
var and__3941__auto__ = tcoll;
|
|
if(and__3941__auto__) {
|
|
return tcoll.cljs$core$ITransientCollection$_persistent_BANG_$arity$1
|
|
}else {
|
|
return and__3941__auto__
|
|
}
|
|
}()) {
|
|
return tcoll.cljs$core$ITransientCollection$_persistent_BANG_$arity$1(tcoll)
|
|
}else {
|
|
var x__2906__auto__ = tcoll == null ? null : tcoll;
|
|
return function() {
|
|
var or__3943__auto__ = cljs.core._persistent_BANG_[goog.typeOf(x__2906__auto__)];
|
|
if(or__3943__auto__) {
|
|
return or__3943__auto__
|
|
}else {
|
|
var or__3943__auto____$1 = cljs.core._persistent_BANG_["_"];
|
|
if(or__3943__auto____$1) {
|
|
return or__3943__auto____$1
|
|
}else {
|
|
throw cljs.core.missing_protocol.call(null, "ITransientCollection.-persistent!", tcoll);
|
|
}
|
|
}
|
|
}().call(null, tcoll)
|
|
}
|
|
};
|
|
cljs.core.ITransientAssociative = {};
|
|
cljs.core._assoc_BANG_ = function _assoc_BANG_(tcoll, key, val) {
|
|
if(function() {
|
|
var and__3941__auto__ = tcoll;
|
|
if(and__3941__auto__) {
|
|
return tcoll.cljs$core$ITransientAssociative$_assoc_BANG_$arity$3
|
|
}else {
|
|
return and__3941__auto__
|
|
}
|
|
}()) {
|
|
return tcoll.cljs$core$ITransientAssociative$_assoc_BANG_$arity$3(tcoll, key, val)
|
|
}else {
|
|
var x__2906__auto__ = tcoll == null ? null : tcoll;
|
|
return function() {
|
|
var or__3943__auto__ = cljs.core._assoc_BANG_[goog.typeOf(x__2906__auto__)];
|
|
if(or__3943__auto__) {
|
|
return or__3943__auto__
|
|
}else {
|
|
var or__3943__auto____$1 = cljs.core._assoc_BANG_["_"];
|
|
if(or__3943__auto____$1) {
|
|
return or__3943__auto____$1
|
|
}else {
|
|
throw cljs.core.missing_protocol.call(null, "ITransientAssociative.-assoc!", tcoll);
|
|
}
|
|
}
|
|
}().call(null, tcoll, key, val)
|
|
}
|
|
};
|
|
cljs.core.ITransientMap = {};
|
|
cljs.core._dissoc_BANG_ = function _dissoc_BANG_(tcoll, key) {
|
|
if(function() {
|
|
var and__3941__auto__ = tcoll;
|
|
if(and__3941__auto__) {
|
|
return tcoll.cljs$core$ITransientMap$_dissoc_BANG_$arity$2
|
|
}else {
|
|
return and__3941__auto__
|
|
}
|
|
}()) {
|
|
return tcoll.cljs$core$ITransientMap$_dissoc_BANG_$arity$2(tcoll, key)
|
|
}else {
|
|
var x__2906__auto__ = tcoll == null ? null : tcoll;
|
|
return function() {
|
|
var or__3943__auto__ = cljs.core._dissoc_BANG_[goog.typeOf(x__2906__auto__)];
|
|
if(or__3943__auto__) {
|
|
return or__3943__auto__
|
|
}else {
|
|
var or__3943__auto____$1 = cljs.core._dissoc_BANG_["_"];
|
|
if(or__3943__auto____$1) {
|
|
return or__3943__auto____$1
|
|
}else {
|
|
throw cljs.core.missing_protocol.call(null, "ITransientMap.-dissoc!", tcoll);
|
|
}
|
|
}
|
|
}().call(null, tcoll, key)
|
|
}
|
|
};
|
|
cljs.core.ITransientVector = {};
|
|
cljs.core._assoc_n_BANG_ = function _assoc_n_BANG_(tcoll, n, val) {
|
|
if(function() {
|
|
var and__3941__auto__ = tcoll;
|
|
if(and__3941__auto__) {
|
|
return tcoll.cljs$core$ITransientVector$_assoc_n_BANG_$arity$3
|
|
}else {
|
|
return and__3941__auto__
|
|
}
|
|
}()) {
|
|
return tcoll.cljs$core$ITransientVector$_assoc_n_BANG_$arity$3(tcoll, n, val)
|
|
}else {
|
|
var x__2906__auto__ = tcoll == null ? null : tcoll;
|
|
return function() {
|
|
var or__3943__auto__ = cljs.core._assoc_n_BANG_[goog.typeOf(x__2906__auto__)];
|
|
if(or__3943__auto__) {
|
|
return or__3943__auto__
|
|
}else {
|
|
var or__3943__auto____$1 = cljs.core._assoc_n_BANG_["_"];
|
|
if(or__3943__auto____$1) {
|
|
return or__3943__auto____$1
|
|
}else {
|
|
throw cljs.core.missing_protocol.call(null, "ITransientVector.-assoc-n!", tcoll);
|
|
}
|
|
}
|
|
}().call(null, tcoll, n, val)
|
|
}
|
|
};
|
|
cljs.core._pop_BANG_ = function _pop_BANG_(tcoll) {
|
|
if(function() {
|
|
var and__3941__auto__ = tcoll;
|
|
if(and__3941__auto__) {
|
|
return tcoll.cljs$core$ITransientVector$_pop_BANG_$arity$1
|
|
}else {
|
|
return and__3941__auto__
|
|
}
|
|
}()) {
|
|
return tcoll.cljs$core$ITransientVector$_pop_BANG_$arity$1(tcoll)
|
|
}else {
|
|
var x__2906__auto__ = tcoll == null ? null : tcoll;
|
|
return function() {
|
|
var or__3943__auto__ = cljs.core._pop_BANG_[goog.typeOf(x__2906__auto__)];
|
|
if(or__3943__auto__) {
|
|
return or__3943__auto__
|
|
}else {
|
|
var or__3943__auto____$1 = cljs.core._pop_BANG_["_"];
|
|
if(or__3943__auto____$1) {
|
|
return or__3943__auto____$1
|
|
}else {
|
|
throw cljs.core.missing_protocol.call(null, "ITransientVector.-pop!", tcoll);
|
|
}
|
|
}
|
|
}().call(null, tcoll)
|
|
}
|
|
};
|
|
cljs.core.ITransientSet = {};
|
|
cljs.core._disjoin_BANG_ = function _disjoin_BANG_(tcoll, v) {
|
|
if(function() {
|
|
var and__3941__auto__ = tcoll;
|
|
if(and__3941__auto__) {
|
|
return tcoll.cljs$core$ITransientSet$_disjoin_BANG_$arity$2
|
|
}else {
|
|
return and__3941__auto__
|
|
}
|
|
}()) {
|
|
return tcoll.cljs$core$ITransientSet$_disjoin_BANG_$arity$2(tcoll, v)
|
|
}else {
|
|
var x__2906__auto__ = tcoll == null ? null : tcoll;
|
|
return function() {
|
|
var or__3943__auto__ = cljs.core._disjoin_BANG_[goog.typeOf(x__2906__auto__)];
|
|
if(or__3943__auto__) {
|
|
return or__3943__auto__
|
|
}else {
|
|
var or__3943__auto____$1 = cljs.core._disjoin_BANG_["_"];
|
|
if(or__3943__auto____$1) {
|
|
return or__3943__auto____$1
|
|
}else {
|
|
throw cljs.core.missing_protocol.call(null, "ITransientSet.-disjoin!", tcoll);
|
|
}
|
|
}
|
|
}().call(null, tcoll, v)
|
|
}
|
|
};
|
|
cljs.core.IComparable = {};
|
|
cljs.core._compare = function _compare(x, y) {
|
|
if(function() {
|
|
var and__3941__auto__ = x;
|
|
if(and__3941__auto__) {
|
|
return x.cljs$core$IComparable$_compare$arity$2
|
|
}else {
|
|
return and__3941__auto__
|
|
}
|
|
}()) {
|
|
return x.cljs$core$IComparable$_compare$arity$2(x, y)
|
|
}else {
|
|
var x__2906__auto__ = x == null ? null : x;
|
|
return function() {
|
|
var or__3943__auto__ = cljs.core._compare[goog.typeOf(x__2906__auto__)];
|
|
if(or__3943__auto__) {
|
|
return or__3943__auto__
|
|
}else {
|
|
var or__3943__auto____$1 = cljs.core._compare["_"];
|
|
if(or__3943__auto____$1) {
|
|
return or__3943__auto____$1
|
|
}else {
|
|
throw cljs.core.missing_protocol.call(null, "IComparable.-compare", x);
|
|
}
|
|
}
|
|
}().call(null, x, y)
|
|
}
|
|
};
|
|
cljs.core.IChunk = {};
|
|
cljs.core._drop_first = function _drop_first(coll) {
|
|
if(function() {
|
|
var and__3941__auto__ = coll;
|
|
if(and__3941__auto__) {
|
|
return coll.cljs$core$IChunk$_drop_first$arity$1
|
|
}else {
|
|
return and__3941__auto__
|
|
}
|
|
}()) {
|
|
return coll.cljs$core$IChunk$_drop_first$arity$1(coll)
|
|
}else {
|
|
var x__2906__auto__ = coll == null ? null : coll;
|
|
return function() {
|
|
var or__3943__auto__ = cljs.core._drop_first[goog.typeOf(x__2906__auto__)];
|
|
if(or__3943__auto__) {
|
|
return or__3943__auto__
|
|
}else {
|
|
var or__3943__auto____$1 = cljs.core._drop_first["_"];
|
|
if(or__3943__auto____$1) {
|
|
return or__3943__auto____$1
|
|
}else {
|
|
throw cljs.core.missing_protocol.call(null, "IChunk.-drop-first", coll);
|
|
}
|
|
}
|
|
}().call(null, coll)
|
|
}
|
|
};
|
|
cljs.core.IChunkedSeq = {};
|
|
cljs.core._chunked_first = function _chunked_first(coll) {
|
|
if(function() {
|
|
var and__3941__auto__ = coll;
|
|
if(and__3941__auto__) {
|
|
return coll.cljs$core$IChunkedSeq$_chunked_first$arity$1
|
|
}else {
|
|
return and__3941__auto__
|
|
}
|
|
}()) {
|
|
return coll.cljs$core$IChunkedSeq$_chunked_first$arity$1(coll)
|
|
}else {
|
|
var x__2906__auto__ = coll == null ? null : coll;
|
|
return function() {
|
|
var or__3943__auto__ = cljs.core._chunked_first[goog.typeOf(x__2906__auto__)];
|
|
if(or__3943__auto__) {
|
|
return or__3943__auto__
|
|
}else {
|
|
var or__3943__auto____$1 = cljs.core._chunked_first["_"];
|
|
if(or__3943__auto____$1) {
|
|
return or__3943__auto____$1
|
|
}else {
|
|
throw cljs.core.missing_protocol.call(null, "IChunkedSeq.-chunked-first", coll);
|
|
}
|
|
}
|
|
}().call(null, coll)
|
|
}
|
|
};
|
|
cljs.core._chunked_rest = function _chunked_rest(coll) {
|
|
if(function() {
|
|
var and__3941__auto__ = coll;
|
|
if(and__3941__auto__) {
|
|
return coll.cljs$core$IChunkedSeq$_chunked_rest$arity$1
|
|
}else {
|
|
return and__3941__auto__
|
|
}
|
|
}()) {
|
|
return coll.cljs$core$IChunkedSeq$_chunked_rest$arity$1(coll)
|
|
}else {
|
|
var x__2906__auto__ = coll == null ? null : coll;
|
|
return function() {
|
|
var or__3943__auto__ = cljs.core._chunked_rest[goog.typeOf(x__2906__auto__)];
|
|
if(or__3943__auto__) {
|
|
return or__3943__auto__
|
|
}else {
|
|
var or__3943__auto____$1 = cljs.core._chunked_rest["_"];
|
|
if(or__3943__auto____$1) {
|
|
return or__3943__auto____$1
|
|
}else {
|
|
throw cljs.core.missing_protocol.call(null, "IChunkedSeq.-chunked-rest", coll);
|
|
}
|
|
}
|
|
}().call(null, coll)
|
|
}
|
|
};
|
|
cljs.core.IChunkedNext = {};
|
|
cljs.core._chunked_next = function _chunked_next(coll) {
|
|
if(function() {
|
|
var and__3941__auto__ = coll;
|
|
if(and__3941__auto__) {
|
|
return coll.cljs$core$IChunkedNext$_chunked_next$arity$1
|
|
}else {
|
|
return and__3941__auto__
|
|
}
|
|
}()) {
|
|
return coll.cljs$core$IChunkedNext$_chunked_next$arity$1(coll)
|
|
}else {
|
|
var x__2906__auto__ = coll == null ? null : coll;
|
|
return function() {
|
|
var or__3943__auto__ = cljs.core._chunked_next[goog.typeOf(x__2906__auto__)];
|
|
if(or__3943__auto__) {
|
|
return or__3943__auto__
|
|
}else {
|
|
var or__3943__auto____$1 = cljs.core._chunked_next["_"];
|
|
if(or__3943__auto____$1) {
|
|
return or__3943__auto____$1
|
|
}else {
|
|
throw cljs.core.missing_protocol.call(null, "IChunkedNext.-chunked-next", coll);
|
|
}
|
|
}
|
|
}().call(null, coll)
|
|
}
|
|
};
|
|
cljs.core.INamed = {};
|
|
cljs.core._name = function _name(x) {
|
|
if(function() {
|
|
var and__3941__auto__ = x;
|
|
if(and__3941__auto__) {
|
|
return x.cljs$core$INamed$_name$arity$1
|
|
}else {
|
|
return and__3941__auto__
|
|
}
|
|
}()) {
|
|
return x.cljs$core$INamed$_name$arity$1(x)
|
|
}else {
|
|
var x__2906__auto__ = x == null ? null : x;
|
|
return function() {
|
|
var or__3943__auto__ = cljs.core._name[goog.typeOf(x__2906__auto__)];
|
|
if(or__3943__auto__) {
|
|
return or__3943__auto__
|
|
}else {
|
|
var or__3943__auto____$1 = cljs.core._name["_"];
|
|
if(or__3943__auto____$1) {
|
|
return or__3943__auto____$1
|
|
}else {
|
|
throw cljs.core.missing_protocol.call(null, "INamed.-name", x);
|
|
}
|
|
}
|
|
}().call(null, x)
|
|
}
|
|
};
|
|
cljs.core._namespace = function _namespace(x) {
|
|
if(function() {
|
|
var and__3941__auto__ = x;
|
|
if(and__3941__auto__) {
|
|
return x.cljs$core$INamed$_namespace$arity$1
|
|
}else {
|
|
return and__3941__auto__
|
|
}
|
|
}()) {
|
|
return x.cljs$core$INamed$_namespace$arity$1(x)
|
|
}else {
|
|
var x__2906__auto__ = x == null ? null : x;
|
|
return function() {
|
|
var or__3943__auto__ = cljs.core._namespace[goog.typeOf(x__2906__auto__)];
|
|
if(or__3943__auto__) {
|
|
return or__3943__auto__
|
|
}else {
|
|
var or__3943__auto____$1 = cljs.core._namespace["_"];
|
|
if(or__3943__auto____$1) {
|
|
return or__3943__auto____$1
|
|
}else {
|
|
throw cljs.core.missing_protocol.call(null, "INamed.-namespace", x);
|
|
}
|
|
}
|
|
}().call(null, x)
|
|
}
|
|
};
|
|
goog.provide("cljs.core.StringBufferWriter");
|
|
cljs.core.StringBufferWriter = function(sb) {
|
|
this.sb = sb;
|
|
this.cljs$lang$protocol_mask$partition1$ = 0;
|
|
this.cljs$lang$protocol_mask$partition0$ = 1073741824
|
|
};
|
|
cljs.core.StringBufferWriter.cljs$lang$type = true;
|
|
cljs.core.StringBufferWriter.cljs$lang$ctorStr = "cljs.core/StringBufferWriter";
|
|
cljs.core.StringBufferWriter.cljs$lang$ctorPrWriter = function(this__2847__auto__, writer__2848__auto__, opt__2849__auto__) {
|
|
return cljs.core._write.call(null, writer__2848__auto__, "cljs.core/StringBufferWriter")
|
|
};
|
|
cljs.core.StringBufferWriter.prototype.cljs$core$IWriter$_write$arity$2 = function(_, s) {
|
|
var self__ = this;
|
|
return self__.sb.append(s)
|
|
};
|
|
cljs.core.StringBufferWriter.prototype.cljs$core$IWriter$_flush$arity$1 = function(_) {
|
|
var self__ = this;
|
|
return null
|
|
};
|
|
cljs.core.__GT_StringBufferWriter = function __GT_StringBufferWriter(sb) {
|
|
return new cljs.core.StringBufferWriter(sb)
|
|
};
|
|
cljs.core.pr_str_STAR_ = function pr_str_STAR_(obj) {
|
|
var sb = new goog.string.StringBuffer;
|
|
var writer = new cljs.core.StringBufferWriter(sb);
|
|
cljs.core._pr_writer.call(null, obj, writer, cljs.core.pr_opts.call(null));
|
|
cljs.core._flush.call(null, writer);
|
|
return[cljs.core.str(sb)].join("")
|
|
};
|
|
cljs.core.instance_QMARK_ = function instance_QMARK_(t, o) {
|
|
return o instanceof t
|
|
};
|
|
cljs.core.symbol_QMARK_ = function symbol_QMARK_(x) {
|
|
return x instanceof cljs.core.Symbol
|
|
};
|
|
goog.provide("cljs.core.Symbol");
|
|
cljs.core.Symbol = function(ns, name, str, _hash, _meta) {
|
|
this.ns = ns;
|
|
this.name = name;
|
|
this.str = str;
|
|
this._hash = _hash;
|
|
this._meta = _meta;
|
|
this.cljs$lang$protocol_mask$partition0$ = 2154168321;
|
|
this.cljs$lang$protocol_mask$partition1$ = 4096
|
|
};
|
|
cljs.core.Symbol.cljs$lang$type = true;
|
|
cljs.core.Symbol.cljs$lang$ctorStr = "cljs.core/Symbol";
|
|
cljs.core.Symbol.cljs$lang$ctorPrWriter = function(this__2847__auto__, writer__2848__auto__, opt__2849__auto__) {
|
|
return cljs.core._write.call(null, writer__2848__auto__, "cljs.core/Symbol")
|
|
};
|
|
cljs.core.Symbol.prototype.cljs$core$IPrintWithWriter$_pr_writer$arity$3 = function(o, writer, _) {
|
|
var self__ = this;
|
|
return cljs.core._write.call(null, writer, self__.str)
|
|
};
|
|
cljs.core.Symbol.prototype.cljs$core$INamed$_name$arity$1 = function(_) {
|
|
var self__ = this;
|
|
return self__.name
|
|
};
|
|
cljs.core.Symbol.prototype.cljs$core$INamed$_namespace$arity$1 = function(_) {
|
|
var self__ = this;
|
|
return self__.ns
|
|
};
|
|
cljs.core.Symbol.prototype.cljs$core$IHash$_hash$arity$1 = function(_) {
|
|
var self__ = this;
|
|
if(self__._hash === -1) {
|
|
self__._hash = cljs.core.hash_combine.call(null, cljs.core.hash.call(null, self__.ns), cljs.core.hash.call(null, self__.name));
|
|
return self__._hash
|
|
}else {
|
|
return self__._hash
|
|
}
|
|
};
|
|
cljs.core.Symbol.prototype.cljs$core$IWithMeta$_with_meta$arity$2 = function(_, new_meta) {
|
|
var self__ = this;
|
|
return new cljs.core.Symbol(self__.ns, self__.name, self__.str, self__._hash, new_meta)
|
|
};
|
|
cljs.core.Symbol.prototype.cljs$core$IMeta$_meta$arity$1 = function(_) {
|
|
var self__ = this;
|
|
return self__._meta
|
|
};
|
|
cljs.core.Symbol.prototype.call = function() {
|
|
var G__13507 = null;
|
|
var G__13507__2 = function(self__, coll) {
|
|
var self__ = this;
|
|
var self____$1 = this;
|
|
var sym = self____$1;
|
|
return cljs.core._lookup.call(null, coll, sym, null)
|
|
};
|
|
var G__13507__3 = function(self__, coll, not_found) {
|
|
var self__ = this;
|
|
var self____$1 = this;
|
|
var sym = self____$1;
|
|
return cljs.core._lookup.call(null, coll, sym, not_found)
|
|
};
|
|
G__13507 = function(self__, coll, not_found) {
|
|
switch(arguments.length) {
|
|
case 2:
|
|
return G__13507__2.call(this, self__, coll);
|
|
case 3:
|
|
return G__13507__3.call(this, self__, coll, not_found)
|
|
}
|
|
throw new Error("Invalid arity: " + arguments.length);
|
|
};
|
|
return G__13507
|
|
}();
|
|
cljs.core.Symbol.prototype.apply = function(self__, args13506) {
|
|
var self__ = this;
|
|
return self__.call.apply(self__, [self__].concat(args13506.slice()))
|
|
};
|
|
cljs.core.Symbol.prototype.cljs$core$IEquiv$_equiv$arity$2 = function(_, other) {
|
|
var self__ = this;
|
|
if(other instanceof cljs.core.Symbol) {
|
|
return self__.str === other.str
|
|
}else {
|
|
return false
|
|
}
|
|
};
|
|
cljs.core.Symbol.prototype.toString = function() {
|
|
var self__ = this;
|
|
var _ = this;
|
|
return self__.str
|
|
};
|
|
cljs.core.__GT_Symbol = function __GT_Symbol(ns, name, str, _hash, _meta) {
|
|
return new cljs.core.Symbol(ns, name, str, _hash, _meta)
|
|
};
|
|
cljs.core.symbol = function() {
|
|
var symbol = null;
|
|
var symbol__1 = function(name) {
|
|
if(name instanceof cljs.core.Symbol) {
|
|
return name
|
|
}else {
|
|
return symbol.call(null, null, name)
|
|
}
|
|
};
|
|
var symbol__2 = function(ns, name) {
|
|
var sym_str = !(ns == null) ? [cljs.core.str(ns), cljs.core.str("/"), cljs.core.str(name)].join("") : name;
|
|
return new cljs.core.Symbol(ns, name, sym_str, -1, null)
|
|
};
|
|
symbol = function(ns, name) {
|
|
switch(arguments.length) {
|
|
case 1:
|
|
return symbol__1.call(this, ns);
|
|
case 2:
|
|
return symbol__2.call(this, ns, name)
|
|
}
|
|
throw new Error("Invalid arity: " + arguments.length);
|
|
};
|
|
symbol.cljs$core$IFn$_invoke$arity$1 = symbol__1;
|
|
symbol.cljs$core$IFn$_invoke$arity$2 = symbol__2;
|
|
return symbol
|
|
}();
|
|
cljs.core.seq = function seq(coll) {
|
|
if(coll == null) {
|
|
return null
|
|
}else {
|
|
if(function() {
|
|
var G__13509 = coll;
|
|
if(G__13509) {
|
|
if(function() {
|
|
var or__3943__auto__ = G__13509.cljs$lang$protocol_mask$partition0$ & 8388608;
|
|
if(or__3943__auto__) {
|
|
return or__3943__auto__
|
|
}else {
|
|
return G__13509.cljs$core$ISeqable$
|
|
}
|
|
}()) {
|
|
return true
|
|
}else {
|
|
return false
|
|
}
|
|
}else {
|
|
return false
|
|
}
|
|
}()) {
|
|
return cljs.core._seq.call(null, coll)
|
|
}else {
|
|
if(coll instanceof Array) {
|
|
if(coll.length === 0) {
|
|
return null
|
|
}else {
|
|
return new cljs.core.IndexedSeq(coll, 0)
|
|
}
|
|
}else {
|
|
if(cljs.core.string_QMARK_.call(null, coll)) {
|
|
if(coll.length === 0) {
|
|
return null
|
|
}else {
|
|
return new cljs.core.IndexedSeq(coll, 0)
|
|
}
|
|
}else {
|
|
if(cljs.core.type_satisfies_.call(null, cljs.core.ILookup, coll)) {
|
|
return cljs.core._seq.call(null, coll)
|
|
}else {
|
|
if("\ufdd0:else") {
|
|
throw new Error([cljs.core.str(coll), cljs.core.str("is not ISeqable")].join(""));
|
|
}else {
|
|
return null
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
};
|
|
cljs.core.first = function first(coll) {
|
|
if(coll == null) {
|
|
return null
|
|
}else {
|
|
if(function() {
|
|
var G__13511 = coll;
|
|
if(G__13511) {
|
|
if(function() {
|
|
var or__3943__auto__ = G__13511.cljs$lang$protocol_mask$partition0$ & 64;
|
|
if(or__3943__auto__) {
|
|
return or__3943__auto__
|
|
}else {
|
|
return G__13511.cljs$core$ISeq$
|
|
}
|
|
}()) {
|
|
return true
|
|
}else {
|
|
return false
|
|
}
|
|
}else {
|
|
return false
|
|
}
|
|
}()) {
|
|
return cljs.core._first.call(null, coll)
|
|
}else {
|
|
var s = cljs.core.seq.call(null, coll);
|
|
if(s == null) {
|
|
return null
|
|
}else {
|
|
return cljs.core._first.call(null, s)
|
|
}
|
|
}
|
|
}
|
|
};
|
|
cljs.core.rest = function rest(coll) {
|
|
if(!(coll == null)) {
|
|
if(function() {
|
|
var G__13513 = coll;
|
|
if(G__13513) {
|
|
if(function() {
|
|
var or__3943__auto__ = G__13513.cljs$lang$protocol_mask$partition0$ & 64;
|
|
if(or__3943__auto__) {
|
|
return or__3943__auto__
|
|
}else {
|
|
return G__13513.cljs$core$ISeq$
|
|
}
|
|
}()) {
|
|
return true
|
|
}else {
|
|
return false
|
|
}
|
|
}else {
|
|
return false
|
|
}
|
|
}()) {
|
|
return cljs.core._rest.call(null, coll)
|
|
}else {
|
|
var s = cljs.core.seq.call(null, coll);
|
|
if(!(s == null)) {
|
|
return cljs.core._rest.call(null, s)
|
|
}else {
|
|
return cljs.core.List.EMPTY
|
|
}
|
|
}
|
|
}else {
|
|
return cljs.core.List.EMPTY
|
|
}
|
|
};
|
|
cljs.core.next = function next(coll) {
|
|
if(coll == null) {
|
|
return null
|
|
}else {
|
|
if(function() {
|
|
var G__13515 = coll;
|
|
if(G__13515) {
|
|
if(function() {
|
|
var or__3943__auto__ = G__13515.cljs$lang$protocol_mask$partition0$ & 128;
|
|
if(or__3943__auto__) {
|
|
return or__3943__auto__
|
|
}else {
|
|
return G__13515.cljs$core$INext$
|
|
}
|
|
}()) {
|
|
return true
|
|
}else {
|
|
return false
|
|
}
|
|
}else {
|
|
return false
|
|
}
|
|
}()) {
|
|
return cljs.core._next.call(null, coll)
|
|
}else {
|
|
return cljs.core.seq.call(null, cljs.core.rest.call(null, coll))
|
|
}
|
|
}
|
|
};
|
|
cljs.core._EQ_ = function() {
|
|
var _EQ_ = null;
|
|
var _EQ___1 = function(x) {
|
|
return true
|
|
};
|
|
var _EQ___2 = function(x, y) {
|
|
var or__3943__auto__ = x === y;
|
|
if(or__3943__auto__) {
|
|
return or__3943__auto__
|
|
}else {
|
|
return cljs.core._equiv.call(null, x, y)
|
|
}
|
|
};
|
|
var _EQ___3 = function() {
|
|
var G__13516__delegate = function(x, y, more) {
|
|
while(true) {
|
|
if(cljs.core.truth_(_EQ_.call(null, x, y))) {
|
|
if(cljs.core.next.call(null, more)) {
|
|
var G__13517 = y;
|
|
var G__13518 = cljs.core.first.call(null, more);
|
|
var G__13519 = cljs.core.next.call(null, more);
|
|
x = G__13517;
|
|
y = G__13518;
|
|
more = G__13519;
|
|
continue
|
|
}else {
|
|
return _EQ_.call(null, y, cljs.core.first.call(null, more))
|
|
}
|
|
}else {
|
|
return false
|
|
}
|
|
break
|
|
}
|
|
};
|
|
var G__13516 = function(x, y, var_args) {
|
|
var more = null;
|
|
if(arguments.length > 2) {
|
|
more = cljs.core.array_seq(Array.prototype.slice.call(arguments, 2), 0)
|
|
}
|
|
return G__13516__delegate.call(this, x, y, more)
|
|
};
|
|
G__13516.cljs$lang$maxFixedArity = 2;
|
|
G__13516.cljs$lang$applyTo = function(arglist__13520) {
|
|
var x = cljs.core.first(arglist__13520);
|
|
arglist__13520 = cljs.core.next(arglist__13520);
|
|
var y = cljs.core.first(arglist__13520);
|
|
var more = cljs.core.rest(arglist__13520);
|
|
return G__13516__delegate(x, y, more)
|
|
};
|
|
G__13516.cljs$core$IFn$_invoke$arity$variadic = G__13516__delegate;
|
|
return G__13516
|
|
}();
|
|
_EQ_ = function(x, y, var_args) {
|
|
var more = var_args;
|
|
switch(arguments.length) {
|
|
case 1:
|
|
return _EQ___1.call(this, x);
|
|
case 2:
|
|
return _EQ___2.call(this, x, y);
|
|
default:
|
|
return _EQ___3.cljs$core$IFn$_invoke$arity$variadic(x, y, cljs.core.array_seq(arguments, 2))
|
|
}
|
|
throw new Error("Invalid arity: " + arguments.length);
|
|
};
|
|
_EQ_.cljs$lang$maxFixedArity = 2;
|
|
_EQ_.cljs$lang$applyTo = _EQ___3.cljs$lang$applyTo;
|
|
_EQ_.cljs$core$IFn$_invoke$arity$1 = _EQ___1;
|
|
_EQ_.cljs$core$IFn$_invoke$arity$2 = _EQ___2;
|
|
_EQ_.cljs$core$IFn$_invoke$arity$variadic = _EQ___3.cljs$core$IFn$_invoke$arity$variadic;
|
|
return _EQ_
|
|
}();
|
|
cljs.core.IHash["null"] = true;
|
|
cljs.core._hash["null"] = function(o) {
|
|
return 0
|
|
};
|
|
cljs.core.INext["null"] = true;
|
|
cljs.core._next["null"] = function(_) {
|
|
return null
|
|
};
|
|
cljs.core.IKVReduce["null"] = true;
|
|
cljs.core._kv_reduce["null"] = function(_, f, init) {
|
|
return init
|
|
};
|
|
cljs.core.ISet["null"] = true;
|
|
cljs.core._disjoin["null"] = function(_, v) {
|
|
return null
|
|
};
|
|
cljs.core.ICounted["null"] = true;
|
|
cljs.core._count["null"] = function(_) {
|
|
return 0
|
|
};
|
|
cljs.core.IStack["null"] = true;
|
|
cljs.core._peek["null"] = function(_) {
|
|
return null
|
|
};
|
|
cljs.core._pop["null"] = function(_) {
|
|
return null
|
|
};
|
|
cljs.core.IEquiv["null"] = true;
|
|
cljs.core._equiv["null"] = function(_, o) {
|
|
return o == null
|
|
};
|
|
cljs.core.IWithMeta["null"] = true;
|
|
cljs.core._with_meta["null"] = function(_, meta) {
|
|
return null
|
|
};
|
|
cljs.core.IMeta["null"] = true;
|
|
cljs.core._meta["null"] = function(_) {
|
|
return null
|
|
};
|
|
cljs.core.IEmptyableCollection["null"] = true;
|
|
cljs.core._empty["null"] = function(_) {
|
|
return null
|
|
};
|
|
cljs.core.IMap["null"] = true;
|
|
cljs.core._dissoc["null"] = function(_, k) {
|
|
return null
|
|
};
|
|
Date.prototype.cljs$core$IEquiv$ = true;
|
|
Date.prototype.cljs$core$IEquiv$_equiv$arity$2 = function(o, other) {
|
|
var and__3941__auto__ = other instanceof Date;
|
|
if(and__3941__auto__) {
|
|
return o.toString() === other.toString()
|
|
}else {
|
|
return and__3941__auto__
|
|
}
|
|
};
|
|
cljs.core.IHash["number"] = true;
|
|
cljs.core._hash["number"] = function(o) {
|
|
return Math.floor(o) % 2147483647
|
|
};
|
|
cljs.core.IEquiv["number"] = true;
|
|
cljs.core._equiv["number"] = function(x, o) {
|
|
return x === o
|
|
};
|
|
cljs.core.IHash["boolean"] = true;
|
|
cljs.core._hash["boolean"] = function(o) {
|
|
if(o === true) {
|
|
return 1
|
|
}else {
|
|
return 0
|
|
}
|
|
};
|
|
cljs.core.IMeta["function"] = true;
|
|
cljs.core._meta["function"] = function(_) {
|
|
return null
|
|
};
|
|
cljs.core.Fn["function"] = true;
|
|
cljs.core.IHash["_"] = true;
|
|
cljs.core._hash["_"] = function(o) {
|
|
return goog.getUid(o)
|
|
};
|
|
cljs.core.inc = function inc(x) {
|
|
return x + 1
|
|
};
|
|
goog.provide("cljs.core.Reduced");
|
|
cljs.core.Reduced = function(val) {
|
|
this.val = val;
|
|
this.cljs$lang$protocol_mask$partition1$ = 0;
|
|
this.cljs$lang$protocol_mask$partition0$ = 32768
|
|
};
|
|
cljs.core.Reduced.cljs$lang$type = true;
|
|
cljs.core.Reduced.cljs$lang$ctorStr = "cljs.core/Reduced";
|
|
cljs.core.Reduced.cljs$lang$ctorPrWriter = function(this__2847__auto__, writer__2848__auto__, opt__2849__auto__) {
|
|
return cljs.core._write.call(null, writer__2848__auto__, "cljs.core/Reduced")
|
|
};
|
|
cljs.core.Reduced.prototype.cljs$core$IDeref$_deref$arity$1 = function(o) {
|
|
var self__ = this;
|
|
return self__.val
|
|
};
|
|
cljs.core.__GT_Reduced = function __GT_Reduced(val) {
|
|
return new cljs.core.Reduced(val)
|
|
};
|
|
cljs.core.reduced = function reduced(x) {
|
|
return new cljs.core.Reduced(x)
|
|
};
|
|
cljs.core.reduced_QMARK_ = function reduced_QMARK_(r) {
|
|
return r instanceof cljs.core.Reduced
|
|
};
|
|
cljs.core.ci_reduce = function() {
|
|
var ci_reduce = null;
|
|
var ci_reduce__2 = function(cicoll, f) {
|
|
var cnt = cljs.core._count.call(null, cicoll);
|
|
if(cnt === 0) {
|
|
return f.call(null)
|
|
}else {
|
|
var val = cljs.core._nth.call(null, cicoll, 0);
|
|
var n = 1;
|
|
while(true) {
|
|
if(n < cnt) {
|
|
var nval = f.call(null, val, cljs.core._nth.call(null, cicoll, n));
|
|
if(cljs.core.reduced_QMARK_.call(null, nval)) {
|
|
return cljs.core.deref.call(null, nval)
|
|
}else {
|
|
var G__13521 = nval;
|
|
var G__13522 = n + 1;
|
|
val = G__13521;
|
|
n = G__13522;
|
|
continue
|
|
}
|
|
}else {
|
|
return val
|
|
}
|
|
break
|
|
}
|
|
}
|
|
};
|
|
var ci_reduce__3 = function(cicoll, f, val) {
|
|
var cnt = cljs.core._count.call(null, cicoll);
|
|
var val__$1 = val;
|
|
var n = 0;
|
|
while(true) {
|
|
if(n < cnt) {
|
|
var nval = f.call(null, val__$1, cljs.core._nth.call(null, cicoll, n));
|
|
if(cljs.core.reduced_QMARK_.call(null, nval)) {
|
|
return cljs.core.deref.call(null, nval)
|
|
}else {
|
|
var G__13523 = nval;
|
|
var G__13524 = n + 1;
|
|
val__$1 = G__13523;
|
|
n = G__13524;
|
|
continue
|
|
}
|
|
}else {
|
|
return val__$1
|
|
}
|
|
break
|
|
}
|
|
};
|
|
var ci_reduce__4 = function(cicoll, f, val, idx) {
|
|
var cnt = cljs.core._count.call(null, cicoll);
|
|
var val__$1 = val;
|
|
var n = idx;
|
|
while(true) {
|
|
if(n < cnt) {
|
|
var nval = f.call(null, val__$1, cljs.core._nth.call(null, cicoll, n));
|
|
if(cljs.core.reduced_QMARK_.call(null, nval)) {
|
|
return cljs.core.deref.call(null, nval)
|
|
}else {
|
|
var G__13525 = nval;
|
|
var G__13526 = n + 1;
|
|
val__$1 = G__13525;
|
|
n = G__13526;
|
|
continue
|
|
}
|
|
}else {
|
|
return val__$1
|
|
}
|
|
break
|
|
}
|
|
};
|
|
ci_reduce = function(cicoll, f, val, idx) {
|
|
switch(arguments.length) {
|
|
case 2:
|
|
return ci_reduce__2.call(this, cicoll, f);
|
|
case 3:
|
|
return ci_reduce__3.call(this, cicoll, f, val);
|
|
case 4:
|
|
return ci_reduce__4.call(this, cicoll, f, val, idx)
|
|
}
|
|
throw new Error("Invalid arity: " + arguments.length);
|
|
};
|
|
ci_reduce.cljs$core$IFn$_invoke$arity$2 = ci_reduce__2;
|
|
ci_reduce.cljs$core$IFn$_invoke$arity$3 = ci_reduce__3;
|
|
ci_reduce.cljs$core$IFn$_invoke$arity$4 = ci_reduce__4;
|
|
return ci_reduce
|
|
}();
|
|
cljs.core.array_reduce = function() {
|
|
var array_reduce = null;
|
|
var array_reduce__2 = function(arr, f) {
|
|
var cnt = arr.length;
|
|
if(arr.length === 0) {
|
|
return f.call(null)
|
|
}else {
|
|
var val = arr[0];
|
|
var n = 1;
|
|
while(true) {
|
|
if(n < cnt) {
|
|
var nval = f.call(null, val, arr[n]);
|
|
if(cljs.core.reduced_QMARK_.call(null, nval)) {
|
|
return cljs.core.deref.call(null, nval)
|
|
}else {
|
|
var G__13527 = nval;
|
|
var G__13528 = n + 1;
|
|
val = G__13527;
|
|
n = G__13528;
|
|
continue
|
|
}
|
|
}else {
|
|
return val
|
|
}
|
|
break
|
|
}
|
|
}
|
|
};
|
|
var array_reduce__3 = function(arr, f, val) {
|
|
var cnt = arr.length;
|
|
var val__$1 = val;
|
|
var n = 0;
|
|
while(true) {
|
|
if(n < cnt) {
|
|
var nval = f.call(null, val__$1, arr[n]);
|
|
if(cljs.core.reduced_QMARK_.call(null, nval)) {
|
|
return cljs.core.deref.call(null, nval)
|
|
}else {
|
|
var G__13529 = nval;
|
|
var G__13530 = n + 1;
|
|
val__$1 = G__13529;
|
|
n = G__13530;
|
|
continue
|
|
}
|
|
}else {
|
|
return val__$1
|
|
}
|
|
break
|
|
}
|
|
};
|
|
var array_reduce__4 = function(arr, f, val, idx) {
|
|
var cnt = arr.length;
|
|
var val__$1 = val;
|
|
var n = idx;
|
|
while(true) {
|
|
if(n < cnt) {
|
|
var nval = f.call(null, val__$1, arr[n]);
|
|
if(cljs.core.reduced_QMARK_.call(null, nval)) {
|
|
return cljs.core.deref.call(null, nval)
|
|
}else {
|
|
var G__13531 = nval;
|
|
var G__13532 = n + 1;
|
|
val__$1 = G__13531;
|
|
n = G__13532;
|
|
continue
|
|
}
|
|
}else {
|
|
return val__$1
|
|
}
|
|
break
|
|
}
|
|
};
|
|
array_reduce = function(arr, f, val, idx) {
|
|
switch(arguments.length) {
|
|
case 2:
|
|
return array_reduce__2.call(this, arr, f);
|
|
case 3:
|
|
return array_reduce__3.call(this, arr, f, val);
|
|
case 4:
|
|
return array_reduce__4.call(this, arr, f, val, idx)
|
|
}
|
|
throw new Error("Invalid arity: " + arguments.length);
|
|
};
|
|
array_reduce.cljs$core$IFn$_invoke$arity$2 = array_reduce__2;
|
|
array_reduce.cljs$core$IFn$_invoke$arity$3 = array_reduce__3;
|
|
array_reduce.cljs$core$IFn$_invoke$arity$4 = array_reduce__4;
|
|
return array_reduce
|
|
}();
|
|
cljs.core.counted_QMARK_ = function counted_QMARK_(x) {
|
|
var G__13534 = x;
|
|
if(G__13534) {
|
|
if(function() {
|
|
var or__3943__auto__ = G__13534.cljs$lang$protocol_mask$partition0$ & 2;
|
|
if(or__3943__auto__) {
|
|
return or__3943__auto__
|
|
}else {
|
|
return G__13534.cljs$core$ICounted$
|
|
}
|
|
}()) {
|
|
return true
|
|
}else {
|
|
if(!G__13534.cljs$lang$protocol_mask$partition0$) {
|
|
return cljs.core.type_satisfies_.call(null, cljs.core.ICounted, G__13534)
|
|
}else {
|
|
return false
|
|
}
|
|
}
|
|
}else {
|
|
return cljs.core.type_satisfies_.call(null, cljs.core.ICounted, G__13534)
|
|
}
|
|
};
|
|
cljs.core.indexed_QMARK_ = function indexed_QMARK_(x) {
|
|
var G__13536 = x;
|
|
if(G__13536) {
|
|
if(function() {
|
|
var or__3943__auto__ = G__13536.cljs$lang$protocol_mask$partition0$ & 16;
|
|
if(or__3943__auto__) {
|
|
return or__3943__auto__
|
|
}else {
|
|
return G__13536.cljs$core$IIndexed$
|
|
}
|
|
}()) {
|
|
return true
|
|
}else {
|
|
if(!G__13536.cljs$lang$protocol_mask$partition0$) {
|
|
return cljs.core.type_satisfies_.call(null, cljs.core.IIndexed, G__13536)
|
|
}else {
|
|
return false
|
|
}
|
|
}
|
|
}else {
|
|
return cljs.core.type_satisfies_.call(null, cljs.core.IIndexed, G__13536)
|
|
}
|
|
};
|
|
goog.provide("cljs.core.IndexedSeq");
|
|
cljs.core.IndexedSeq = function(arr, i) {
|
|
this.arr = arr;
|
|
this.i = i;
|
|
this.cljs$lang$protocol_mask$partition1$ = 0;
|
|
this.cljs$lang$protocol_mask$partition0$ = 166199550
|
|
};
|
|
cljs.core.IndexedSeq.cljs$lang$type = true;
|
|
cljs.core.IndexedSeq.cljs$lang$ctorStr = "cljs.core/IndexedSeq";
|
|
cljs.core.IndexedSeq.cljs$lang$ctorPrWriter = function(this__2847__auto__, writer__2848__auto__, opt__2849__auto__) {
|
|
return cljs.core._write.call(null, writer__2848__auto__, "cljs.core/IndexedSeq")
|
|
};
|
|
cljs.core.IndexedSeq.prototype.cljs$core$IHash$_hash$arity$1 = function(coll) {
|
|
var self__ = this;
|
|
return cljs.core.hash_coll.call(null, coll)
|
|
};
|
|
cljs.core.IndexedSeq.prototype.cljs$core$INext$_next$arity$1 = function(_) {
|
|
var self__ = this;
|
|
if(self__.i + 1 < self__.arr.length) {
|
|
return new cljs.core.IndexedSeq(self__.arr, self__.i + 1)
|
|
}else {
|
|
return null
|
|
}
|
|
};
|
|
cljs.core.IndexedSeq.prototype.cljs$core$ICollection$_conj$arity$2 = function(coll, o) {
|
|
var self__ = this;
|
|
return cljs.core.cons.call(null, o, coll)
|
|
};
|
|
cljs.core.IndexedSeq.prototype.cljs$core$IReversible$_rseq$arity$1 = function(coll) {
|
|
var self__ = this;
|
|
var c = coll.cljs$core$ICounted$_count$arity$1(coll);
|
|
if(c > 0) {
|
|
return new cljs.core.RSeq(coll, c - 1, null)
|
|
}else {
|
|
return cljs.core.List.EMPTY
|
|
}
|
|
};
|
|
cljs.core.IndexedSeq.prototype.toString = function() {
|
|
var self__ = this;
|
|
var coll = this;
|
|
return cljs.core.pr_str_STAR_.call(null, coll)
|
|
};
|
|
cljs.core.IndexedSeq.prototype.cljs$core$IReduce$_reduce$arity$2 = function(coll, f) {
|
|
var self__ = this;
|
|
return cljs.core.array_reduce.call(null, self__.arr, f, self__.arr[self__.i], self__.i + 1)
|
|
};
|
|
cljs.core.IndexedSeq.prototype.cljs$core$IReduce$_reduce$arity$3 = function(coll, f, start) {
|
|
var self__ = this;
|
|
return cljs.core.array_reduce.call(null, self__.arr, f, start, self__.i)
|
|
};
|
|
cljs.core.IndexedSeq.prototype.cljs$core$ISeqable$_seq$arity$1 = function(this$) {
|
|
var self__ = this;
|
|
return this$
|
|
};
|
|
cljs.core.IndexedSeq.prototype.cljs$core$ICounted$_count$arity$1 = function(_) {
|
|
var self__ = this;
|
|
return self__.arr.length - self__.i
|
|
};
|
|
cljs.core.IndexedSeq.prototype.cljs$core$ISeq$_first$arity$1 = function(_) {
|
|
var self__ = this;
|
|
return self__.arr[self__.i]
|
|
};
|
|
cljs.core.IndexedSeq.prototype.cljs$core$ISeq$_rest$arity$1 = function(_) {
|
|
var self__ = this;
|
|
if(self__.i + 1 < self__.arr.length) {
|
|
return new cljs.core.IndexedSeq(self__.arr, self__.i + 1)
|
|
}else {
|
|
return cljs.core.list.call(null)
|
|
}
|
|
};
|
|
cljs.core.IndexedSeq.prototype.cljs$core$IEquiv$_equiv$arity$2 = function(coll, other) {
|
|
var self__ = this;
|
|
return cljs.core.equiv_sequential.call(null, coll, other)
|
|
};
|
|
cljs.core.IndexedSeq.prototype.cljs$core$IIndexed$_nth$arity$2 = function(coll, n) {
|
|
var self__ = this;
|
|
var i__$1 = n + self__.i;
|
|
if(i__$1 < self__.arr.length) {
|
|
return self__.arr[i__$1]
|
|
}else {
|
|
return null
|
|
}
|
|
};
|
|
cljs.core.IndexedSeq.prototype.cljs$core$IIndexed$_nth$arity$3 = function(coll, n, not_found) {
|
|
var self__ = this;
|
|
var i__$1 = n + self__.i;
|
|
if(i__$1 < self__.arr.length) {
|
|
return self__.arr[i__$1]
|
|
}else {
|
|
return not_found
|
|
}
|
|
};
|
|
cljs.core.IndexedSeq.prototype.cljs$core$IEmptyableCollection$_empty$arity$1 = function(coll) {
|
|
var self__ = this;
|
|
return cljs.core.List.EMPTY
|
|
};
|
|
cljs.core.__GT_IndexedSeq = function __GT_IndexedSeq(arr, i) {
|
|
return new cljs.core.IndexedSeq(arr, i)
|
|
};
|
|
cljs.core.prim_seq = function() {
|
|
var prim_seq = null;
|
|
var prim_seq__1 = function(prim) {
|
|
return prim_seq.call(null, prim, 0)
|
|
};
|
|
var prim_seq__2 = function(prim, i) {
|
|
if(i < prim.length) {
|
|
return new cljs.core.IndexedSeq(prim, i)
|
|
}else {
|
|
return null
|
|
}
|
|
};
|
|
prim_seq = function(prim, i) {
|
|
switch(arguments.length) {
|
|
case 1:
|
|
return prim_seq__1.call(this, prim);
|
|
case 2:
|
|
return prim_seq__2.call(this, prim, i)
|
|
}
|
|
throw new Error("Invalid arity: " + arguments.length);
|
|
};
|
|
prim_seq.cljs$core$IFn$_invoke$arity$1 = prim_seq__1;
|
|
prim_seq.cljs$core$IFn$_invoke$arity$2 = prim_seq__2;
|
|
return prim_seq
|
|
}();
|
|
cljs.core.array_seq = function() {
|
|
var array_seq = null;
|
|
var array_seq__1 = function(array) {
|
|
return cljs.core.prim_seq.call(null, array, 0)
|
|
};
|
|
var array_seq__2 = function(array, i) {
|
|
return cljs.core.prim_seq.call(null, array, i)
|
|
};
|
|
array_seq = function(array, i) {
|
|
switch(arguments.length) {
|
|
case 1:
|
|
return array_seq__1.call(this, array);
|
|
case 2:
|
|
return array_seq__2.call(this, array, i)
|
|
}
|
|
throw new Error("Invalid arity: " + arguments.length);
|
|
};
|
|
array_seq.cljs$core$IFn$_invoke$arity$1 = array_seq__1;
|
|
array_seq.cljs$core$IFn$_invoke$arity$2 = array_seq__2;
|
|
return array_seq
|
|
}();
|
|
cljs.core.IReduce["array"] = true;
|
|
cljs.core._reduce["array"] = function(col, f) {
|
|
return cljs.core.array_reduce.call(null, col, f)
|
|
};
|
|
cljs.core._reduce["array"] = function(col, f, start) {
|
|
return cljs.core.array_reduce.call(null, col, f, start)
|
|
};
|
|
goog.provide("cljs.core.RSeq");
|
|
cljs.core.RSeq = function(ci, i, meta) {
|
|
this.ci = ci;
|
|
this.i = i;
|
|
this.meta = meta;
|
|
this.cljs$lang$protocol_mask$partition1$ = 0;
|
|
this.cljs$lang$protocol_mask$partition0$ = 31850574
|
|
};
|
|
cljs.core.RSeq.cljs$lang$type = true;
|
|
cljs.core.RSeq.cljs$lang$ctorStr = "cljs.core/RSeq";
|
|
cljs.core.RSeq.cljs$lang$ctorPrWriter = function(this__2847__auto__, writer__2848__auto__, opt__2849__auto__) {
|
|
return cljs.core._write.call(null, writer__2848__auto__, "cljs.core/RSeq")
|
|
};
|
|
cljs.core.RSeq.prototype.cljs$core$IHash$_hash$arity$1 = function(coll) {
|
|
var self__ = this;
|
|
return cljs.core.hash_coll.call(null, coll)
|
|
};
|
|
cljs.core.RSeq.prototype.cljs$core$ICollection$_conj$arity$2 = function(coll, o) {
|
|
var self__ = this;
|
|
return cljs.core.cons.call(null, o, coll)
|
|
};
|
|
cljs.core.RSeq.prototype.toString = function() {
|
|
var self__ = this;
|
|
var coll = this;
|
|
return cljs.core.pr_str_STAR_.call(null, coll)
|
|
};
|
|
cljs.core.RSeq.prototype.cljs$core$ISeqable$_seq$arity$1 = function(coll) {
|
|
var self__ = this;
|
|
return coll
|
|
};
|
|
cljs.core.RSeq.prototype.cljs$core$ICounted$_count$arity$1 = function(coll) {
|
|
var self__ = this;
|
|
return self__.i + 1
|
|
};
|
|
cljs.core.RSeq.prototype.cljs$core$ISeq$_first$arity$1 = function(coll) {
|
|
var self__ = this;
|
|
return cljs.core._nth.call(null, self__.ci, self__.i)
|
|
};
|
|
cljs.core.RSeq.prototype.cljs$core$ISeq$_rest$arity$1 = function(coll) {
|
|
var self__ = this;
|
|
if(self__.i > 0) {
|
|
return new cljs.core.RSeq(self__.ci, self__.i - 1, null)
|
|
}else {
|
|
return cljs.core.List.EMPTY
|
|
}
|
|
};
|
|
cljs.core.RSeq.prototype.cljs$core$IEquiv$_equiv$arity$2 = function(coll, other) {
|
|
var self__ = this;
|
|
return cljs.core.equiv_sequential.call(null, coll, other)
|
|
};
|
|
cljs.core.RSeq.prototype.cljs$core$IWithMeta$_with_meta$arity$2 = function(coll, new_meta) {
|
|
var self__ = this;
|
|
return new cljs.core.RSeq(self__.ci, self__.i, new_meta)
|
|
};
|
|
cljs.core.RSeq.prototype.cljs$core$IMeta$_meta$arity$1 = function(coll) {
|
|
var self__ = this;
|
|
return self__.meta
|
|
};
|
|
cljs.core.RSeq.prototype.cljs$core$IEmptyableCollection$_empty$arity$1 = function(coll) {
|
|
var self__ = this;
|
|
return cljs.core.with_meta.call(null, cljs.core.List.EMPTY, self__.meta)
|
|
};
|
|
cljs.core.__GT_RSeq = function __GT_RSeq(ci, i, meta) {
|
|
return new cljs.core.RSeq(ci, i, meta)
|
|
};
|
|
cljs.core.second = function second(coll) {
|
|
return cljs.core.first.call(null, cljs.core.next.call(null, coll))
|
|
};
|
|
cljs.core.ffirst = function ffirst(coll) {
|
|
return cljs.core.first.call(null, cljs.core.first.call(null, coll))
|
|
};
|
|
cljs.core.nfirst = function nfirst(coll) {
|
|
return cljs.core.next.call(null, cljs.core.first.call(null, coll))
|
|
};
|
|
cljs.core.fnext = function fnext(coll) {
|
|
return cljs.core.first.call(null, cljs.core.next.call(null, coll))
|
|
};
|
|
cljs.core.nnext = function nnext(coll) {
|
|
return cljs.core.next.call(null, cljs.core.next.call(null, coll))
|
|
};
|
|
cljs.core.last = function last(s) {
|
|
while(true) {
|
|
var sn = cljs.core.next.call(null, s);
|
|
if(!(sn == null)) {
|
|
var G__13537 = sn;
|
|
s = G__13537;
|
|
continue
|
|
}else {
|
|
return cljs.core.first.call(null, s)
|
|
}
|
|
break
|
|
}
|
|
};
|
|
cljs.core.IEquiv["_"] = true;
|
|
cljs.core._equiv["_"] = function(x, o) {
|
|
return x === o
|
|
};
|
|
cljs.core.conj = function() {
|
|
var conj = null;
|
|
var conj__2 = function(coll, x) {
|
|
if(!(coll == null)) {
|
|
return cljs.core._conj.call(null, coll, x)
|
|
}else {
|
|
return cljs.core.list.call(null, x)
|
|
}
|
|
};
|
|
var conj__3 = function() {
|
|
var G__13538__delegate = function(coll, x, xs) {
|
|
while(true) {
|
|
if(cljs.core.truth_(xs)) {
|
|
var G__13539 = conj.call(null, coll, x);
|
|
var G__13540 = cljs.core.first.call(null, xs);
|
|
var G__13541 = cljs.core.next.call(null, xs);
|
|
coll = G__13539;
|
|
x = G__13540;
|
|
xs = G__13541;
|
|
continue
|
|
}else {
|
|
return conj.call(null, coll, x)
|
|
}
|
|
break
|
|
}
|
|
};
|
|
var G__13538 = function(coll, x, var_args) {
|
|
var xs = null;
|
|
if(arguments.length > 2) {
|
|
xs = cljs.core.array_seq(Array.prototype.slice.call(arguments, 2), 0)
|
|
}
|
|
return G__13538__delegate.call(this, coll, x, xs)
|
|
};
|
|
G__13538.cljs$lang$maxFixedArity = 2;
|
|
G__13538.cljs$lang$applyTo = function(arglist__13542) {
|
|
var coll = cljs.core.first(arglist__13542);
|
|
arglist__13542 = cljs.core.next(arglist__13542);
|
|
var x = cljs.core.first(arglist__13542);
|
|
var xs = cljs.core.rest(arglist__13542);
|
|
return G__13538__delegate(coll, x, xs)
|
|
};
|
|
G__13538.cljs$core$IFn$_invoke$arity$variadic = G__13538__delegate;
|
|
return G__13538
|
|
}();
|
|
conj = function(coll, x, var_args) {
|
|
var xs = var_args;
|
|
switch(arguments.length) {
|
|
case 2:
|
|
return conj__2.call(this, coll, x);
|
|
default:
|
|
return conj__3.cljs$core$IFn$_invoke$arity$variadic(coll, x, cljs.core.array_seq(arguments, 2))
|
|
}
|
|
throw new Error("Invalid arity: " + arguments.length);
|
|
};
|
|
conj.cljs$lang$maxFixedArity = 2;
|
|
conj.cljs$lang$applyTo = conj__3.cljs$lang$applyTo;
|
|
conj.cljs$core$IFn$_invoke$arity$2 = conj__2;
|
|
conj.cljs$core$IFn$_invoke$arity$variadic = conj__3.cljs$core$IFn$_invoke$arity$variadic;
|
|
return conj
|
|
}();
|
|
cljs.core.empty = function empty(coll) {
|
|
return cljs.core._empty.call(null, coll)
|
|
};
|
|
cljs.core.accumulating_seq_count = function accumulating_seq_count(coll) {
|
|
var s = cljs.core.seq.call(null, coll);
|
|
var acc = 0;
|
|
while(true) {
|
|
if(cljs.core.counted_QMARK_.call(null, s)) {
|
|
return acc + cljs.core._count.call(null, s)
|
|
}else {
|
|
var G__13543 = cljs.core.next.call(null, s);
|
|
var G__13544 = acc + 1;
|
|
s = G__13543;
|
|
acc = G__13544;
|
|
continue
|
|
}
|
|
break
|
|
}
|
|
};
|
|
cljs.core.count = function count(coll) {
|
|
if(!(coll == null)) {
|
|
if(function() {
|
|
var G__13546 = coll;
|
|
if(G__13546) {
|
|
if(function() {
|
|
var or__3943__auto__ = G__13546.cljs$lang$protocol_mask$partition0$ & 2;
|
|
if(or__3943__auto__) {
|
|
return or__3943__auto__
|
|
}else {
|
|
return G__13546.cljs$core$ICounted$
|
|
}
|
|
}()) {
|
|
return true
|
|
}else {
|
|
return false
|
|
}
|
|
}else {
|
|
return false
|
|
}
|
|
}()) {
|
|
return cljs.core._count.call(null, coll)
|
|
}else {
|
|
if(coll instanceof Array) {
|
|
return coll.length
|
|
}else {
|
|
if(cljs.core.string_QMARK_.call(null, coll)) {
|
|
return coll.length
|
|
}else {
|
|
if(cljs.core.type_satisfies_.call(null, cljs.core.ICounted, coll)) {
|
|
return cljs.core._count.call(null, coll)
|
|
}else {
|
|
if("\ufdd0:else") {
|
|
return cljs.core.accumulating_seq_count.call(null, coll)
|
|
}else {
|
|
return null
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}else {
|
|
return 0
|
|
}
|
|
};
|
|
cljs.core.linear_traversal_nth = function() {
|
|
var linear_traversal_nth = null;
|
|
var linear_traversal_nth__2 = function(coll, n) {
|
|
while(true) {
|
|
if(coll == null) {
|
|
throw new Error("Index out of bounds");
|
|
}else {
|
|
if(n === 0) {
|
|
if(cljs.core.seq.call(null, coll)) {
|
|
return cljs.core.first.call(null, coll)
|
|
}else {
|
|
throw new Error("Index out of bounds");
|
|
}
|
|
}else {
|
|
if(cljs.core.indexed_QMARK_.call(null, coll)) {
|
|
return cljs.core._nth.call(null, coll, n)
|
|
}else {
|
|
if(cljs.core.seq.call(null, coll)) {
|
|
var G__13547 = cljs.core.next.call(null, coll);
|
|
var G__13548 = n - 1;
|
|
coll = G__13547;
|
|
n = G__13548;
|
|
continue
|
|
}else {
|
|
if("\ufdd0:else") {
|
|
throw new Error("Index out of bounds");
|
|
}else {
|
|
return null
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
break
|
|
}
|
|
};
|
|
var linear_traversal_nth__3 = function(coll, n, not_found) {
|
|
while(true) {
|
|
if(coll == null) {
|
|
return not_found
|
|
}else {
|
|
if(n === 0) {
|
|
if(cljs.core.seq.call(null, coll)) {
|
|
return cljs.core.first.call(null, coll)
|
|
}else {
|
|
return not_found
|
|
}
|
|
}else {
|
|
if(cljs.core.indexed_QMARK_.call(null, coll)) {
|
|
return cljs.core._nth.call(null, coll, n, not_found)
|
|
}else {
|
|
if(cljs.core.seq.call(null, coll)) {
|
|
var G__13549 = cljs.core.next.call(null, coll);
|
|
var G__13550 = n - 1;
|
|
var G__13551 = not_found;
|
|
coll = G__13549;
|
|
n = G__13550;
|
|
not_found = G__13551;
|
|
continue
|
|
}else {
|
|
if("\ufdd0:else") {
|
|
return not_found
|
|
}else {
|
|
return null
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
break
|
|
}
|
|
};
|
|
linear_traversal_nth = function(coll, n, not_found) {
|
|
switch(arguments.length) {
|
|
case 2:
|
|
return linear_traversal_nth__2.call(this, coll, n);
|
|
case 3:
|
|
return linear_traversal_nth__3.call(this, coll, n, not_found)
|
|
}
|
|
throw new Error("Invalid arity: " + arguments.length);
|
|
};
|
|
linear_traversal_nth.cljs$core$IFn$_invoke$arity$2 = linear_traversal_nth__2;
|
|
linear_traversal_nth.cljs$core$IFn$_invoke$arity$3 = linear_traversal_nth__3;
|
|
return linear_traversal_nth
|
|
}();
|
|
cljs.core.nth = function() {
|
|
var nth = null;
|
|
var nth__2 = function(coll, n) {
|
|
if(coll == null) {
|
|
return null
|
|
}else {
|
|
if(function() {
|
|
var G__13554 = coll;
|
|
if(G__13554) {
|
|
if(function() {
|
|
var or__3943__auto__ = G__13554.cljs$lang$protocol_mask$partition0$ & 16;
|
|
if(or__3943__auto__) {
|
|
return or__3943__auto__
|
|
}else {
|
|
return G__13554.cljs$core$IIndexed$
|
|
}
|
|
}()) {
|
|
return true
|
|
}else {
|
|
return false
|
|
}
|
|
}else {
|
|
return false
|
|
}
|
|
}()) {
|
|
return cljs.core._nth.call(null, coll, Math.floor(n))
|
|
}else {
|
|
if(coll instanceof Array) {
|
|
if(n < coll.length) {
|
|
return coll[n]
|
|
}else {
|
|
return null
|
|
}
|
|
}else {
|
|
if(cljs.core.string_QMARK_.call(null, coll)) {
|
|
if(n < coll.length) {
|
|
return coll[n]
|
|
}else {
|
|
return null
|
|
}
|
|
}else {
|
|
if(cljs.core.type_satisfies_.call(null, cljs.core.IIndexed, coll)) {
|
|
return cljs.core._nth.call(null, coll, n)
|
|
}else {
|
|
if("\ufdd0:else") {
|
|
return cljs.core.linear_traversal_nth.call(null, coll, Math.floor(n))
|
|
}else {
|
|
return null
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
};
|
|
var nth__3 = function(coll, n, not_found) {
|
|
if(!(coll == null)) {
|
|
if(function() {
|
|
var G__13555 = coll;
|
|
if(G__13555) {
|
|
if(function() {
|
|
var or__3943__auto__ = G__13555.cljs$lang$protocol_mask$partition0$ & 16;
|
|
if(or__3943__auto__) {
|
|
return or__3943__auto__
|
|
}else {
|
|
return G__13555.cljs$core$IIndexed$
|
|
}
|
|
}()) {
|
|
return true
|
|
}else {
|
|
return false
|
|
}
|
|
}else {
|
|
return false
|
|
}
|
|
}()) {
|
|
return cljs.core._nth.call(null, coll, Math.floor(n), not_found)
|
|
}else {
|
|
if(coll instanceof Array) {
|
|
if(n < coll.length) {
|
|
return coll[n]
|
|
}else {
|
|
return not_found
|
|
}
|
|
}else {
|
|
if(cljs.core.string_QMARK_.call(null, coll)) {
|
|
if(n < coll.length) {
|
|
return coll[n]
|
|
}else {
|
|
return not_found
|
|
}
|
|
}else {
|
|
if(cljs.core.type_satisfies_.call(null, cljs.core.IIndexed, coll)) {
|
|
return cljs.core._nth.call(null, coll, n)
|
|
}else {
|
|
if("\ufdd0:else") {
|
|
return cljs.core.linear_traversal_nth.call(null, coll, Math.floor(n), not_found)
|
|
}else {
|
|
return null
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}else {
|
|
return not_found
|
|
}
|
|
};
|
|
nth = function(coll, n, not_found) {
|
|
switch(arguments.length) {
|
|
case 2:
|
|
return nth__2.call(this, coll, n);
|
|
case 3:
|
|
return nth__3.call(this, coll, n, not_found)
|
|
}
|
|
throw new Error("Invalid arity: " + arguments.length);
|
|
};
|
|
nth.cljs$core$IFn$_invoke$arity$2 = nth__2;
|
|
nth.cljs$core$IFn$_invoke$arity$3 = nth__3;
|
|
return nth
|
|
}();
|
|
cljs.core.get = function() {
|
|
var get = null;
|
|
var get__2 = function(o, k) {
|
|
if(o == null) {
|
|
return null
|
|
}else {
|
|
if(function() {
|
|
var G__13558 = o;
|
|
if(G__13558) {
|
|
if(function() {
|
|
var or__3943__auto__ = G__13558.cljs$lang$protocol_mask$partition0$ & 256;
|
|
if(or__3943__auto__) {
|
|
return or__3943__auto__
|
|
}else {
|
|
return G__13558.cljs$core$ILookup$
|
|
}
|
|
}()) {
|
|
return true
|
|
}else {
|
|
return false
|
|
}
|
|
}else {
|
|
return false
|
|
}
|
|
}()) {
|
|
return cljs.core._lookup.call(null, o, k)
|
|
}else {
|
|
if(o instanceof Array) {
|
|
if(k < o.length) {
|
|
return o[k]
|
|
}else {
|
|
return null
|
|
}
|
|
}else {
|
|
if(cljs.core.string_QMARK_.call(null, o)) {
|
|
if(k < o.length) {
|
|
return o[k]
|
|
}else {
|
|
return null
|
|
}
|
|
}else {
|
|
if(cljs.core.type_satisfies_.call(null, cljs.core.ILookup, o)) {
|
|
return cljs.core._lookup.call(null, o, k)
|
|
}else {
|
|
if("\ufdd0:else") {
|
|
return null
|
|
}else {
|
|
return null
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
};
|
|
var get__3 = function(o, k, not_found) {
|
|
if(!(o == null)) {
|
|
if(function() {
|
|
var G__13559 = o;
|
|
if(G__13559) {
|
|
if(function() {
|
|
var or__3943__auto__ = G__13559.cljs$lang$protocol_mask$partition0$ & 256;
|
|
if(or__3943__auto__) {
|
|
return or__3943__auto__
|
|
}else {
|
|
return G__13559.cljs$core$ILookup$
|
|
}
|
|
}()) {
|
|
return true
|
|
}else {
|
|
return false
|
|
}
|
|
}else {
|
|
return false
|
|
}
|
|
}()) {
|
|
return cljs.core._lookup.call(null, o, k, not_found)
|
|
}else {
|
|
if(o instanceof Array) {
|
|
if(k < o.length) {
|
|
return o[k]
|
|
}else {
|
|
return not_found
|
|
}
|
|
}else {
|
|
if(cljs.core.string_QMARK_.call(null, o)) {
|
|
if(k < o.length) {
|
|
return o[k]
|
|
}else {
|
|
return not_found
|
|
}
|
|
}else {
|
|
if(cljs.core.type_satisfies_.call(null, cljs.core.ILookup, o)) {
|
|
return cljs.core._lookup.call(null, o, k, not_found)
|
|
}else {
|
|
if("\ufdd0:else") {
|
|
return not_found
|
|
}else {
|
|
return null
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}else {
|
|
return not_found
|
|
}
|
|
};
|
|
get = function(o, k, not_found) {
|
|
switch(arguments.length) {
|
|
case 2:
|
|
return get__2.call(this, o, k);
|
|
case 3:
|
|
return get__3.call(this, o, k, not_found)
|
|
}
|
|
throw new Error("Invalid arity: " + arguments.length);
|
|
};
|
|
get.cljs$core$IFn$_invoke$arity$2 = get__2;
|
|
get.cljs$core$IFn$_invoke$arity$3 = get__3;
|
|
return get
|
|
}();
|
|
cljs.core.assoc = function() {
|
|
var assoc = null;
|
|
var assoc__3 = function(coll, k, v) {
|
|
if(!(coll == null)) {
|
|
return cljs.core._assoc.call(null, coll, k, v)
|
|
}else {
|
|
return cljs.core.hash_map.call(null, k, v)
|
|
}
|
|
};
|
|
var assoc__4 = function() {
|
|
var G__13560__delegate = function(coll, k, v, kvs) {
|
|
while(true) {
|
|
var ret = assoc.call(null, coll, k, v);
|
|
if(cljs.core.truth_(kvs)) {
|
|
var G__13561 = ret;
|
|
var G__13562 = cljs.core.first.call(null, kvs);
|
|
var G__13563 = cljs.core.second.call(null, kvs);
|
|
var G__13564 = cljs.core.nnext.call(null, kvs);
|
|
coll = G__13561;
|
|
k = G__13562;
|
|
v = G__13563;
|
|
kvs = G__13564;
|
|
continue
|
|
}else {
|
|
return ret
|
|
}
|
|
break
|
|
}
|
|
};
|
|
var G__13560 = function(coll, k, v, var_args) {
|
|
var kvs = null;
|
|
if(arguments.length > 3) {
|
|
kvs = cljs.core.array_seq(Array.prototype.slice.call(arguments, 3), 0)
|
|
}
|
|
return G__13560__delegate.call(this, coll, k, v, kvs)
|
|
};
|
|
G__13560.cljs$lang$maxFixedArity = 3;
|
|
G__13560.cljs$lang$applyTo = function(arglist__13565) {
|
|
var coll = cljs.core.first(arglist__13565);
|
|
arglist__13565 = cljs.core.next(arglist__13565);
|
|
var k = cljs.core.first(arglist__13565);
|
|
arglist__13565 = cljs.core.next(arglist__13565);
|
|
var v = cljs.core.first(arglist__13565);
|
|
var kvs = cljs.core.rest(arglist__13565);
|
|
return G__13560__delegate(coll, k, v, kvs)
|
|
};
|
|
G__13560.cljs$core$IFn$_invoke$arity$variadic = G__13560__delegate;
|
|
return G__13560
|
|
}();
|
|
assoc = function(coll, k, v, var_args) {
|
|
var kvs = var_args;
|
|
switch(arguments.length) {
|
|
case 3:
|
|
return assoc__3.call(this, coll, k, v);
|
|
default:
|
|
return assoc__4.cljs$core$IFn$_invoke$arity$variadic(coll, k, v, cljs.core.array_seq(arguments, 3))
|
|
}
|
|
throw new Error("Invalid arity: " + arguments.length);
|
|
};
|
|
assoc.cljs$lang$maxFixedArity = 3;
|
|
assoc.cljs$lang$applyTo = assoc__4.cljs$lang$applyTo;
|
|
assoc.cljs$core$IFn$_invoke$arity$3 = assoc__3;
|
|
assoc.cljs$core$IFn$_invoke$arity$variadic = assoc__4.cljs$core$IFn$_invoke$arity$variadic;
|
|
return assoc
|
|
}();
|
|
cljs.core.dissoc = function() {
|
|
var dissoc = null;
|
|
var dissoc__1 = function(coll) {
|
|
return coll
|
|
};
|
|
var dissoc__2 = function(coll, k) {
|
|
return cljs.core._dissoc.call(null, coll, k)
|
|
};
|
|
var dissoc__3 = function() {
|
|
var G__13566__delegate = function(coll, k, ks) {
|
|
while(true) {
|
|
var ret = dissoc.call(null, coll, k);
|
|
if(cljs.core.truth_(ks)) {
|
|
var G__13567 = ret;
|
|
var G__13568 = cljs.core.first.call(null, ks);
|
|
var G__13569 = cljs.core.next.call(null, ks);
|
|
coll = G__13567;
|
|
k = G__13568;
|
|
ks = G__13569;
|
|
continue
|
|
}else {
|
|
return ret
|
|
}
|
|
break
|
|
}
|
|
};
|
|
var G__13566 = function(coll, k, var_args) {
|
|
var ks = null;
|
|
if(arguments.length > 2) {
|
|
ks = cljs.core.array_seq(Array.prototype.slice.call(arguments, 2), 0)
|
|
}
|
|
return G__13566__delegate.call(this, coll, k, ks)
|
|
};
|
|
G__13566.cljs$lang$maxFixedArity = 2;
|
|
G__13566.cljs$lang$applyTo = function(arglist__13570) {
|
|
var coll = cljs.core.first(arglist__13570);
|
|
arglist__13570 = cljs.core.next(arglist__13570);
|
|
var k = cljs.core.first(arglist__13570);
|
|
var ks = cljs.core.rest(arglist__13570);
|
|
return G__13566__delegate(coll, k, ks)
|
|
};
|
|
G__13566.cljs$core$IFn$_invoke$arity$variadic = G__13566__delegate;
|
|
return G__13566
|
|
}();
|
|
dissoc = function(coll, k, var_args) {
|
|
var ks = var_args;
|
|
switch(arguments.length) {
|
|
case 1:
|
|
return dissoc__1.call(this, coll);
|
|
case 2:
|
|
return dissoc__2.call(this, coll, k);
|
|
default:
|
|
return dissoc__3.cljs$core$IFn$_invoke$arity$variadic(coll, k, cljs.core.array_seq(arguments, 2))
|
|
}
|
|
throw new Error("Invalid arity: " + arguments.length);
|
|
};
|
|
dissoc.cljs$lang$maxFixedArity = 2;
|
|
dissoc.cljs$lang$applyTo = dissoc__3.cljs$lang$applyTo;
|
|
dissoc.cljs$core$IFn$_invoke$arity$1 = dissoc__1;
|
|
dissoc.cljs$core$IFn$_invoke$arity$2 = dissoc__2;
|
|
dissoc.cljs$core$IFn$_invoke$arity$variadic = dissoc__3.cljs$core$IFn$_invoke$arity$variadic;
|
|
return dissoc
|
|
}();
|
|
cljs.core.fn_QMARK_ = function fn_QMARK_(f) {
|
|
var or__3943__auto__ = goog.isFunction(f);
|
|
if(or__3943__auto__) {
|
|
return or__3943__auto__
|
|
}else {
|
|
var G__13572 = f;
|
|
if(G__13572) {
|
|
if(cljs.core.truth_(function() {
|
|
var or__3943__auto____$1 = null;
|
|
if(cljs.core.truth_(or__3943__auto____$1)) {
|
|
return or__3943__auto____$1
|
|
}else {
|
|
return G__13572.cljs$core$Fn$
|
|
}
|
|
}())) {
|
|
return true
|
|
}else {
|
|
if(!G__13572.cljs$lang$protocol_mask$partition$) {
|
|
return cljs.core.type_satisfies_.call(null, cljs.core.Fn, G__13572)
|
|
}else {
|
|
return false
|
|
}
|
|
}
|
|
}else {
|
|
return cljs.core.type_satisfies_.call(null, cljs.core.Fn, G__13572)
|
|
}
|
|
}
|
|
};
|
|
cljs.core.with_meta = function with_meta(o, meta) {
|
|
if(function() {
|
|
var and__3941__auto__ = cljs.core.fn_QMARK_.call(null, o);
|
|
if(and__3941__auto__) {
|
|
return!function() {
|
|
var G__13578 = o;
|
|
if(G__13578) {
|
|
if(function() {
|
|
var or__3943__auto__ = G__13578.cljs$lang$protocol_mask$partition0$ & 262144;
|
|
if(or__3943__auto__) {
|
|
return or__3943__auto__
|
|
}else {
|
|
return G__13578.cljs$core$IWithMeta$
|
|
}
|
|
}()) {
|
|
return true
|
|
}else {
|
|
if(!G__13578.cljs$lang$protocol_mask$partition0$) {
|
|
return cljs.core.type_satisfies_.call(null, cljs.core.IWithMeta, G__13578)
|
|
}else {
|
|
return false
|
|
}
|
|
}
|
|
}else {
|
|
return cljs.core.type_satisfies_.call(null, cljs.core.IWithMeta, G__13578)
|
|
}
|
|
}()
|
|
}else {
|
|
return and__3941__auto__
|
|
}
|
|
}()) {
|
|
return with_meta.call(null, function() {
|
|
if(void 0 === cljs.core.t13579) {
|
|
goog.provide("cljs.core.t13579");
|
|
cljs.core.t13579 = function(meta, o, with_meta, meta13580) {
|
|
this.meta = meta;
|
|
this.o = o;
|
|
this.with_meta = with_meta;
|
|
this.meta13580 = meta13580;
|
|
this.cljs$lang$protocol_mask$partition1$ = 0;
|
|
this.cljs$lang$protocol_mask$partition0$ = 393217
|
|
};
|
|
cljs.core.t13579.cljs$lang$type = true;
|
|
cljs.core.t13579.cljs$lang$ctorStr = "cljs.core/t13579";
|
|
cljs.core.t13579.cljs$lang$ctorPrWriter = function(this__2847__auto__, writer__2848__auto__, opt__2849__auto__) {
|
|
return cljs.core._write.call(null, writer__2848__auto__, "cljs.core/t13579")
|
|
};
|
|
cljs.core.t13579.prototype.call = function() {
|
|
var G__13583__delegate = function(self__, args) {
|
|
var self____$1 = this;
|
|
var _ = self____$1;
|
|
return cljs.core.apply.call(null, self__.o, args)
|
|
};
|
|
var G__13583 = function(self__, var_args) {
|
|
var self__ = this;
|
|
var args = null;
|
|
if(arguments.length > 1) {
|
|
args = cljs.core.array_seq(Array.prototype.slice.call(arguments, 1), 0)
|
|
}
|
|
return G__13583__delegate.call(this, self__, args)
|
|
};
|
|
G__13583.cljs$lang$maxFixedArity = 1;
|
|
G__13583.cljs$lang$applyTo = function(arglist__13584) {
|
|
var self__ = cljs.core.first(arglist__13584);
|
|
var args = cljs.core.rest(arglist__13584);
|
|
return G__13583__delegate(self__, args)
|
|
};
|
|
G__13583.cljs$core$IFn$_invoke$arity$variadic = G__13583__delegate;
|
|
return G__13583
|
|
}();
|
|
cljs.core.t13579.prototype.apply = function(self__, args13582) {
|
|
var self__ = this;
|
|
return self__.call.apply(self__, [self__].concat(args13582.slice()))
|
|
};
|
|
cljs.core.t13579.prototype.cljs$core$Fn$ = true;
|
|
cljs.core.t13579.prototype.cljs$core$IMeta$_meta$arity$1 = function(_13581) {
|
|
var self__ = this;
|
|
return self__.meta13580
|
|
};
|
|
cljs.core.t13579.prototype.cljs$core$IWithMeta$_with_meta$arity$2 = function(_13581, meta13580__$1) {
|
|
var self__ = this;
|
|
return new cljs.core.t13579(self__.meta, self__.o, self__.with_meta, meta13580__$1)
|
|
};
|
|
cljs.core.__GT_t13579 = function __GT_t13579(meta__$1, o__$1, with_meta__$1, meta13580) {
|
|
return new cljs.core.t13579(meta__$1, o__$1, with_meta__$1, meta13580)
|
|
}
|
|
}else {
|
|
}
|
|
return new cljs.core.t13579(meta, o, with_meta, null)
|
|
}(), meta)
|
|
}else {
|
|
return cljs.core._with_meta.call(null, o, meta)
|
|
}
|
|
};
|
|
cljs.core.meta = function meta(o) {
|
|
if(function() {
|
|
var G__13586 = o;
|
|
if(G__13586) {
|
|
if(function() {
|
|
var or__3943__auto__ = G__13586.cljs$lang$protocol_mask$partition0$ & 131072;
|
|
if(or__3943__auto__) {
|
|
return or__3943__auto__
|
|
}else {
|
|
return G__13586.cljs$core$IMeta$
|
|
}
|
|
}()) {
|
|
return true
|
|
}else {
|
|
if(!G__13586.cljs$lang$protocol_mask$partition0$) {
|
|
return cljs.core.type_satisfies_.call(null, cljs.core.IMeta, G__13586)
|
|
}else {
|
|
return false
|
|
}
|
|
}
|
|
}else {
|
|
return cljs.core.type_satisfies_.call(null, cljs.core.IMeta, G__13586)
|
|
}
|
|
}()) {
|
|
return cljs.core._meta.call(null, o)
|
|
}else {
|
|
return null
|
|
}
|
|
};
|
|
cljs.core.peek = function peek(coll) {
|
|
return cljs.core._peek.call(null, coll)
|
|
};
|
|
cljs.core.pop = function pop(coll) {
|
|
return cljs.core._pop.call(null, coll)
|
|
};
|
|
cljs.core.disj = function() {
|
|
var disj = null;
|
|
var disj__1 = function(coll) {
|
|
return coll
|
|
};
|
|
var disj__2 = function(coll, k) {
|
|
return cljs.core._disjoin.call(null, coll, k)
|
|
};
|
|
var disj__3 = function() {
|
|
var G__13587__delegate = function(coll, k, ks) {
|
|
while(true) {
|
|
var ret = disj.call(null, coll, k);
|
|
if(cljs.core.truth_(ks)) {
|
|
var G__13588 = ret;
|
|
var G__13589 = cljs.core.first.call(null, ks);
|
|
var G__13590 = cljs.core.next.call(null, ks);
|
|
coll = G__13588;
|
|
k = G__13589;
|
|
ks = G__13590;
|
|
continue
|
|
}else {
|
|
return ret
|
|
}
|
|
break
|
|
}
|
|
};
|
|
var G__13587 = function(coll, k, var_args) {
|
|
var ks = null;
|
|
if(arguments.length > 2) {
|
|
ks = cljs.core.array_seq(Array.prototype.slice.call(arguments, 2), 0)
|
|
}
|
|
return G__13587__delegate.call(this, coll, k, ks)
|
|
};
|
|
G__13587.cljs$lang$maxFixedArity = 2;
|
|
G__13587.cljs$lang$applyTo = function(arglist__13591) {
|
|
var coll = cljs.core.first(arglist__13591);
|
|
arglist__13591 = cljs.core.next(arglist__13591);
|
|
var k = cljs.core.first(arglist__13591);
|
|
var ks = cljs.core.rest(arglist__13591);
|
|
return G__13587__delegate(coll, k, ks)
|
|
};
|
|
G__13587.cljs$core$IFn$_invoke$arity$variadic = G__13587__delegate;
|
|
return G__13587
|
|
}();
|
|
disj = function(coll, k, var_args) {
|
|
var ks = var_args;
|
|
switch(arguments.length) {
|
|
case 1:
|
|
return disj__1.call(this, coll);
|
|
case 2:
|
|
return disj__2.call(this, coll, k);
|
|
default:
|
|
return disj__3.cljs$core$IFn$_invoke$arity$variadic(coll, k, cljs.core.array_seq(arguments, 2))
|
|
}
|
|
throw new Error("Invalid arity: " + arguments.length);
|
|
};
|
|
disj.cljs$lang$maxFixedArity = 2;
|
|
disj.cljs$lang$applyTo = disj__3.cljs$lang$applyTo;
|
|
disj.cljs$core$IFn$_invoke$arity$1 = disj__1;
|
|
disj.cljs$core$IFn$_invoke$arity$2 = disj__2;
|
|
disj.cljs$core$IFn$_invoke$arity$variadic = disj__3.cljs$core$IFn$_invoke$arity$variadic;
|
|
return disj
|
|
}();
|
|
cljs.core.string_hash_cache = {};
|
|
cljs.core.string_hash_cache_count = 0;
|
|
cljs.core.add_to_string_hash_cache = function add_to_string_hash_cache(k) {
|
|
var h = goog.string.hashCode(k);
|
|
cljs.core.string_hash_cache[k] = h;
|
|
cljs.core.string_hash_cache_count = cljs.core.string_hash_cache_count + 1;
|
|
return h
|
|
};
|
|
cljs.core.check_string_hash_cache = function check_string_hash_cache(k) {
|
|
if(cljs.core.string_hash_cache_count > 255) {
|
|
cljs.core.string_hash_cache = {};
|
|
cljs.core.string_hash_cache_count = 0
|
|
}else {
|
|
}
|
|
var h = cljs.core.string_hash_cache[k];
|
|
if(typeof h === "number") {
|
|
return h
|
|
}else {
|
|
return cljs.core.add_to_string_hash_cache.call(null, k)
|
|
}
|
|
};
|
|
cljs.core.hash = function() {
|
|
var hash = null;
|
|
var hash__1 = function(o) {
|
|
return hash.call(null, o, true)
|
|
};
|
|
var hash__2 = function(o, check_cache) {
|
|
if(function() {
|
|
var and__3941__auto__ = goog.isString(o);
|
|
if(and__3941__auto__) {
|
|
return check_cache
|
|
}else {
|
|
return and__3941__auto__
|
|
}
|
|
}()) {
|
|
return cljs.core.check_string_hash_cache.call(null, o)
|
|
}else {
|
|
return cljs.core._hash.call(null, o)
|
|
}
|
|
};
|
|
hash = function(o, check_cache) {
|
|
switch(arguments.length) {
|
|
case 1:
|
|
return hash__1.call(this, o);
|
|
case 2:
|
|
return hash__2.call(this, o, check_cache)
|
|
}
|
|
throw new Error("Invalid arity: " + arguments.length);
|
|
};
|
|
hash.cljs$core$IFn$_invoke$arity$1 = hash__1;
|
|
hash.cljs$core$IFn$_invoke$arity$2 = hash__2;
|
|
return hash
|
|
}();
|
|
cljs.core.empty_QMARK_ = function empty_QMARK_(coll) {
|
|
var or__3943__auto__ = coll == null;
|
|
if(or__3943__auto__) {
|
|
return or__3943__auto__
|
|
}else {
|
|
return cljs.core.not.call(null, cljs.core.seq.call(null, coll))
|
|
}
|
|
};
|
|
cljs.core.coll_QMARK_ = function coll_QMARK_(x) {
|
|
if(x == null) {
|
|
return false
|
|
}else {
|
|
var G__13593 = x;
|
|
if(G__13593) {
|
|
if(function() {
|
|
var or__3943__auto__ = G__13593.cljs$lang$protocol_mask$partition0$ & 8;
|
|
if(or__3943__auto__) {
|
|
return or__3943__auto__
|
|
}else {
|
|
return G__13593.cljs$core$ICollection$
|
|
}
|
|
}()) {
|
|
return true
|
|
}else {
|
|
if(!G__13593.cljs$lang$protocol_mask$partition0$) {
|
|
return cljs.core.type_satisfies_.call(null, cljs.core.ICollection, G__13593)
|
|
}else {
|
|
return false
|
|
}
|
|
}
|
|
}else {
|
|
return cljs.core.type_satisfies_.call(null, cljs.core.ICollection, G__13593)
|
|
}
|
|
}
|
|
};
|
|
cljs.core.set_QMARK_ = function set_QMARK_(x) {
|
|
if(x == null) {
|
|
return false
|
|
}else {
|
|
var G__13595 = x;
|
|
if(G__13595) {
|
|
if(function() {
|
|
var or__3943__auto__ = G__13595.cljs$lang$protocol_mask$partition0$ & 4096;
|
|
if(or__3943__auto__) {
|
|
return or__3943__auto__
|
|
}else {
|
|
return G__13595.cljs$core$ISet$
|
|
}
|
|
}()) {
|
|
return true
|
|
}else {
|
|
if(!G__13595.cljs$lang$protocol_mask$partition0$) {
|
|
return cljs.core.type_satisfies_.call(null, cljs.core.ISet, G__13595)
|
|
}else {
|
|
return false
|
|
}
|
|
}
|
|
}else {
|
|
return cljs.core.type_satisfies_.call(null, cljs.core.ISet, G__13595)
|
|
}
|
|
}
|
|
};
|
|
cljs.core.associative_QMARK_ = function associative_QMARK_(x) {
|
|
var G__13597 = x;
|
|
if(G__13597) {
|
|
if(function() {
|
|
var or__3943__auto__ = G__13597.cljs$lang$protocol_mask$partition0$ & 512;
|
|
if(or__3943__auto__) {
|
|
return or__3943__auto__
|
|
}else {
|
|
return G__13597.cljs$core$IAssociative$
|
|
}
|
|
}()) {
|
|
return true
|
|
}else {
|
|
if(!G__13597.cljs$lang$protocol_mask$partition0$) {
|
|
return cljs.core.type_satisfies_.call(null, cljs.core.IAssociative, G__13597)
|
|
}else {
|
|
return false
|
|
}
|
|
}
|
|
}else {
|
|
return cljs.core.type_satisfies_.call(null, cljs.core.IAssociative, G__13597)
|
|
}
|
|
};
|
|
cljs.core.sequential_QMARK_ = function sequential_QMARK_(x) {
|
|
var G__13599 = x;
|
|
if(G__13599) {
|
|
if(function() {
|
|
var or__3943__auto__ = G__13599.cljs$lang$protocol_mask$partition0$ & 16777216;
|
|
if(or__3943__auto__) {
|
|
return or__3943__auto__
|
|
}else {
|
|
return G__13599.cljs$core$ISequential$
|
|
}
|
|
}()) {
|
|
return true
|
|
}else {
|
|
if(!G__13599.cljs$lang$protocol_mask$partition0$) {
|
|
return cljs.core.type_satisfies_.call(null, cljs.core.ISequential, G__13599)
|
|
}else {
|
|
return false
|
|
}
|
|
}
|
|
}else {
|
|
return cljs.core.type_satisfies_.call(null, cljs.core.ISequential, G__13599)
|
|
}
|
|
};
|
|
cljs.core.reduceable_QMARK_ = function reduceable_QMARK_(x) {
|
|
var G__13601 = x;
|
|
if(G__13601) {
|
|
if(function() {
|
|
var or__3943__auto__ = G__13601.cljs$lang$protocol_mask$partition0$ & 524288;
|
|
if(or__3943__auto__) {
|
|
return or__3943__auto__
|
|
}else {
|
|
return G__13601.cljs$core$IReduce$
|
|
}
|
|
}()) {
|
|
return true
|
|
}else {
|
|
if(!G__13601.cljs$lang$protocol_mask$partition0$) {
|
|
return cljs.core.type_satisfies_.call(null, cljs.core.IReduce, G__13601)
|
|
}else {
|
|
return false
|
|
}
|
|
}
|
|
}else {
|
|
return cljs.core.type_satisfies_.call(null, cljs.core.IReduce, G__13601)
|
|
}
|
|
};
|
|
cljs.core.map_QMARK_ = function map_QMARK_(x) {
|
|
if(x == null) {
|
|
return false
|
|
}else {
|
|
var G__13603 = x;
|
|
if(G__13603) {
|
|
if(function() {
|
|
var or__3943__auto__ = G__13603.cljs$lang$protocol_mask$partition0$ & 1024;
|
|
if(or__3943__auto__) {
|
|
return or__3943__auto__
|
|
}else {
|
|
return G__13603.cljs$core$IMap$
|
|
}
|
|
}()) {
|
|
return true
|
|
}else {
|
|
if(!G__13603.cljs$lang$protocol_mask$partition0$) {
|
|
return cljs.core.type_satisfies_.call(null, cljs.core.IMap, G__13603)
|
|
}else {
|
|
return false
|
|
}
|
|
}
|
|
}else {
|
|
return cljs.core.type_satisfies_.call(null, cljs.core.IMap, G__13603)
|
|
}
|
|
}
|
|
};
|
|
cljs.core.vector_QMARK_ = function vector_QMARK_(x) {
|
|
var G__13605 = x;
|
|
if(G__13605) {
|
|
if(function() {
|
|
var or__3943__auto__ = G__13605.cljs$lang$protocol_mask$partition0$ & 16384;
|
|
if(or__3943__auto__) {
|
|
return or__3943__auto__
|
|
}else {
|
|
return G__13605.cljs$core$IVector$
|
|
}
|
|
}()) {
|
|
return true
|
|
}else {
|
|
if(!G__13605.cljs$lang$protocol_mask$partition0$) {
|
|
return cljs.core.type_satisfies_.call(null, cljs.core.IVector, G__13605)
|
|
}else {
|
|
return false
|
|
}
|
|
}
|
|
}else {
|
|
return cljs.core.type_satisfies_.call(null, cljs.core.IVector, G__13605)
|
|
}
|
|
};
|
|
cljs.core.chunked_seq_QMARK_ = function chunked_seq_QMARK_(x) {
|
|
var G__13607 = x;
|
|
if(G__13607) {
|
|
if(function() {
|
|
var or__3943__auto__ = G__13607.cljs$lang$protocol_mask$partition1$ & 512;
|
|
if(or__3943__auto__) {
|
|
return or__3943__auto__
|
|
}else {
|
|
return G__13607.cljs$core$IChunkedSeq$
|
|
}
|
|
}()) {
|
|
return true
|
|
}else {
|
|
return false
|
|
}
|
|
}else {
|
|
return false
|
|
}
|
|
};
|
|
cljs.core.js_obj = function() {
|
|
var js_obj = null;
|
|
var js_obj__0 = function() {
|
|
return{}
|
|
};
|
|
var js_obj__1 = function() {
|
|
var G__13608__delegate = function(keyvals) {
|
|
return cljs.core.apply.call(null, goog.object.create, keyvals)
|
|
};
|
|
var G__13608 = function(var_args) {
|
|
var keyvals = null;
|
|
if(arguments.length > 0) {
|
|
keyvals = cljs.core.array_seq(Array.prototype.slice.call(arguments, 0), 0)
|
|
}
|
|
return G__13608__delegate.call(this, keyvals)
|
|
};
|
|
G__13608.cljs$lang$maxFixedArity = 0;
|
|
G__13608.cljs$lang$applyTo = function(arglist__13609) {
|
|
var keyvals = cljs.core.seq(arglist__13609);
|
|
return G__13608__delegate(keyvals)
|
|
};
|
|
G__13608.cljs$core$IFn$_invoke$arity$variadic = G__13608__delegate;
|
|
return G__13608
|
|
}();
|
|
js_obj = function(var_args) {
|
|
var keyvals = var_args;
|
|
switch(arguments.length) {
|
|
case 0:
|
|
return js_obj__0.call(this);
|
|
default:
|
|
return js_obj__1.cljs$core$IFn$_invoke$arity$variadic(cljs.core.array_seq(arguments, 0))
|
|
}
|
|
throw new Error("Invalid arity: " + arguments.length);
|
|
};
|
|
js_obj.cljs$lang$maxFixedArity = 0;
|
|
js_obj.cljs$lang$applyTo = js_obj__1.cljs$lang$applyTo;
|
|
js_obj.cljs$core$IFn$_invoke$arity$0 = js_obj__0;
|
|
js_obj.cljs$core$IFn$_invoke$arity$variadic = js_obj__1.cljs$core$IFn$_invoke$arity$variadic;
|
|
return js_obj
|
|
}();
|
|
cljs.core.js_keys = function js_keys(obj) {
|
|
var keys = [];
|
|
goog.object.forEach(obj, function(val, key, obj__$1) {
|
|
return keys.push(key)
|
|
});
|
|
return keys
|
|
};
|
|
cljs.core.js_delete = function js_delete(obj, key) {
|
|
return delete obj[key]
|
|
};
|
|
cljs.core.array_copy = function array_copy(from, i, to, j, len) {
|
|
var i__$1 = i;
|
|
var j__$1 = j;
|
|
var len__$1 = len;
|
|
while(true) {
|
|
if(len__$1 === 0) {
|
|
return to
|
|
}else {
|
|
to[j__$1] = from[i__$1];
|
|
var G__13610 = i__$1 + 1;
|
|
var G__13611 = j__$1 + 1;
|
|
var G__13612 = len__$1 - 1;
|
|
i__$1 = G__13610;
|
|
j__$1 = G__13611;
|
|
len__$1 = G__13612;
|
|
continue
|
|
}
|
|
break
|
|
}
|
|
};
|
|
cljs.core.array_copy_downward = function array_copy_downward(from, i, to, j, len) {
|
|
var i__$1 = i + (len - 1);
|
|
var j__$1 = j + (len - 1);
|
|
var len__$1 = len;
|
|
while(true) {
|
|
if(len__$1 === 0) {
|
|
return to
|
|
}else {
|
|
to[j__$1] = from[i__$1];
|
|
var G__13613 = i__$1 - 1;
|
|
var G__13614 = j__$1 - 1;
|
|
var G__13615 = len__$1 - 1;
|
|
i__$1 = G__13613;
|
|
j__$1 = G__13614;
|
|
len__$1 = G__13615;
|
|
continue
|
|
}
|
|
break
|
|
}
|
|
};
|
|
cljs.core.lookup_sentinel = {};
|
|
cljs.core.false_QMARK_ = function false_QMARK_(x) {
|
|
return x === false
|
|
};
|
|
cljs.core.true_QMARK_ = function true_QMARK_(x) {
|
|
return x === true
|
|
};
|
|
cljs.core.undefined_QMARK_ = function undefined_QMARK_(x) {
|
|
return void 0 === x
|
|
};
|
|
cljs.core.seq_QMARK_ = function seq_QMARK_(s) {
|
|
if(s == null) {
|
|
return false
|
|
}else {
|
|
var G__13617 = s;
|
|
if(G__13617) {
|
|
if(function() {
|
|
var or__3943__auto__ = G__13617.cljs$lang$protocol_mask$partition0$ & 64;
|
|
if(or__3943__auto__) {
|
|
return or__3943__auto__
|
|
}else {
|
|
return G__13617.cljs$core$ISeq$
|
|
}
|
|
}()) {
|
|
return true
|
|
}else {
|
|
if(!G__13617.cljs$lang$protocol_mask$partition0$) {
|
|
return cljs.core.type_satisfies_.call(null, cljs.core.ISeq, G__13617)
|
|
}else {
|
|
return false
|
|
}
|
|
}
|
|
}else {
|
|
return cljs.core.type_satisfies_.call(null, cljs.core.ISeq, G__13617)
|
|
}
|
|
}
|
|
};
|
|
cljs.core.seqable_QMARK_ = function seqable_QMARK_(s) {
|
|
var G__13619 = s;
|
|
if(G__13619) {
|
|
if(function() {
|
|
var or__3943__auto__ = G__13619.cljs$lang$protocol_mask$partition0$ & 8388608;
|
|
if(or__3943__auto__) {
|
|
return or__3943__auto__
|
|
}else {
|
|
return G__13619.cljs$core$ISeqable$
|
|
}
|
|
}()) {
|
|
return true
|
|
}else {
|
|
if(!G__13619.cljs$lang$protocol_mask$partition0$) {
|
|
return cljs.core.type_satisfies_.call(null, cljs.core.ISeqable, G__13619)
|
|
}else {
|
|
return false
|
|
}
|
|
}
|
|
}else {
|
|
return cljs.core.type_satisfies_.call(null, cljs.core.ISeqable, G__13619)
|
|
}
|
|
};
|
|
cljs.core.boolean$ = function boolean$(x) {
|
|
if(cljs.core.truth_(x)) {
|
|
return true
|
|
}else {
|
|
return false
|
|
}
|
|
};
|
|
cljs.core.keyword_QMARK_ = function keyword_QMARK_(x) {
|
|
var and__3941__auto__ = goog.isString(x);
|
|
if(and__3941__auto__) {
|
|
return x.charAt(0) === "\ufdd0"
|
|
}else {
|
|
return and__3941__auto__
|
|
}
|
|
};
|
|
cljs.core.ifn_QMARK_ = function ifn_QMARK_(f) {
|
|
var or__3943__auto__ = cljs.core.fn_QMARK_.call(null, f);
|
|
if(or__3943__auto__) {
|
|
return or__3943__auto__
|
|
}else {
|
|
var G__13621 = f;
|
|
if(G__13621) {
|
|
if(function() {
|
|
var or__3943__auto____$1 = G__13621.cljs$lang$protocol_mask$partition0$ & 1;
|
|
if(or__3943__auto____$1) {
|
|
return or__3943__auto____$1
|
|
}else {
|
|
return G__13621.cljs$core$IFn$
|
|
}
|
|
}()) {
|
|
return true
|
|
}else {
|
|
if(!G__13621.cljs$lang$protocol_mask$partition0$) {
|
|
return cljs.core.type_satisfies_.call(null, cljs.core.IFn, G__13621)
|
|
}else {
|
|
return false
|
|
}
|
|
}
|
|
}else {
|
|
return cljs.core.type_satisfies_.call(null, cljs.core.IFn, G__13621)
|
|
}
|
|
}
|
|
};
|
|
cljs.core.integer_QMARK_ = function integer_QMARK_(n) {
|
|
var and__3941__auto__ = typeof n === "number";
|
|
if(and__3941__auto__) {
|
|
var and__3941__auto____$1 = !isNaN(n);
|
|
if(and__3941__auto____$1) {
|
|
var and__3941__auto____$2 = !(n === Infinity);
|
|
if(and__3941__auto____$2) {
|
|
return parseFloat(n) === parseInt(n, 10)
|
|
}else {
|
|
return and__3941__auto____$2
|
|
}
|
|
}else {
|
|
return and__3941__auto____$1
|
|
}
|
|
}else {
|
|
return and__3941__auto__
|
|
}
|
|
};
|
|
cljs.core.contains_QMARK_ = function contains_QMARK_(coll, v) {
|
|
if(cljs.core.get.call(null, coll, v, cljs.core.lookup_sentinel) === cljs.core.lookup_sentinel) {
|
|
return false
|
|
}else {
|
|
return true
|
|
}
|
|
};
|
|
cljs.core.find = function find(coll, k) {
|
|
if(function() {
|
|
var and__3941__auto__ = !(coll == null);
|
|
if(and__3941__auto__) {
|
|
var and__3941__auto____$1 = cljs.core.associative_QMARK_.call(null, coll);
|
|
if(and__3941__auto____$1) {
|
|
return cljs.core.contains_QMARK_.call(null, coll, k)
|
|
}else {
|
|
return and__3941__auto____$1
|
|
}
|
|
}else {
|
|
return and__3941__auto__
|
|
}
|
|
}()) {
|
|
return cljs.core.PersistentVector.fromArray([k, cljs.core.get.call(null, coll, k)], true)
|
|
}else {
|
|
return null
|
|
}
|
|
};
|
|
cljs.core.distinct_QMARK_ = function() {
|
|
var distinct_QMARK_ = null;
|
|
var distinct_QMARK___1 = function(x) {
|
|
return true
|
|
};
|
|
var distinct_QMARK___2 = function(x, y) {
|
|
return!cljs.core._EQ_.call(null, x, y)
|
|
};
|
|
var distinct_QMARK___3 = function() {
|
|
var G__13622__delegate = function(x, y, more) {
|
|
if(!cljs.core._EQ_.call(null, x, y)) {
|
|
var s = cljs.core.PersistentHashSet.fromArray([y, null, x, null], true);
|
|
var xs = more;
|
|
while(true) {
|
|
var x__$1 = cljs.core.first.call(null, xs);
|
|
var etc = cljs.core.next.call(null, xs);
|
|
if(cljs.core.truth_(xs)) {
|
|
if(cljs.core.contains_QMARK_.call(null, s, x__$1)) {
|
|
return false
|
|
}else {
|
|
var G__13623 = cljs.core.conj.call(null, s, x__$1);
|
|
var G__13624 = etc;
|
|
s = G__13623;
|
|
xs = G__13624;
|
|
continue
|
|
}
|
|
}else {
|
|
return true
|
|
}
|
|
break
|
|
}
|
|
}else {
|
|
return false
|
|
}
|
|
};
|
|
var G__13622 = function(x, y, var_args) {
|
|
var more = null;
|
|
if(arguments.length > 2) {
|
|
more = cljs.core.array_seq(Array.prototype.slice.call(arguments, 2), 0)
|
|
}
|
|
return G__13622__delegate.call(this, x, y, more)
|
|
};
|
|
G__13622.cljs$lang$maxFixedArity = 2;
|
|
G__13622.cljs$lang$applyTo = function(arglist__13625) {
|
|
var x = cljs.core.first(arglist__13625);
|
|
arglist__13625 = cljs.core.next(arglist__13625);
|
|
var y = cljs.core.first(arglist__13625);
|
|
var more = cljs.core.rest(arglist__13625);
|
|
return G__13622__delegate(x, y, more)
|
|
};
|
|
G__13622.cljs$core$IFn$_invoke$arity$variadic = G__13622__delegate;
|
|
return G__13622
|
|
}();
|
|
distinct_QMARK_ = function(x, y, var_args) {
|
|
var more = var_args;
|
|
switch(arguments.length) {
|
|
case 1:
|
|
return distinct_QMARK___1.call(this, x);
|
|
case 2:
|
|
return distinct_QMARK___2.call(this, x, y);
|
|
default:
|
|
return distinct_QMARK___3.cljs$core$IFn$_invoke$arity$variadic(x, y, cljs.core.array_seq(arguments, 2))
|
|
}
|
|
throw new Error("Invalid arity: " + arguments.length);
|
|
};
|
|
distinct_QMARK_.cljs$lang$maxFixedArity = 2;
|
|
distinct_QMARK_.cljs$lang$applyTo = distinct_QMARK___3.cljs$lang$applyTo;
|
|
distinct_QMARK_.cljs$core$IFn$_invoke$arity$1 = distinct_QMARK___1;
|
|
distinct_QMARK_.cljs$core$IFn$_invoke$arity$2 = distinct_QMARK___2;
|
|
distinct_QMARK_.cljs$core$IFn$_invoke$arity$variadic = distinct_QMARK___3.cljs$core$IFn$_invoke$arity$variadic;
|
|
return distinct_QMARK_
|
|
}();
|
|
cljs.core.compare = function compare(x, y) {
|
|
if(x === y) {
|
|
return 0
|
|
}else {
|
|
if(x == null) {
|
|
return-1
|
|
}else {
|
|
if(y == null) {
|
|
return 1
|
|
}else {
|
|
if(cljs.core.type.call(null, x) === cljs.core.type.call(null, y)) {
|
|
if(function() {
|
|
var G__13627 = x;
|
|
if(G__13627) {
|
|
if(function() {
|
|
var or__3943__auto__ = G__13627.cljs$lang$protocol_mask$partition1$ & 2048;
|
|
if(or__3943__auto__) {
|
|
return or__3943__auto__
|
|
}else {
|
|
return G__13627.cljs$core$IComparable$
|
|
}
|
|
}()) {
|
|
return true
|
|
}else {
|
|
return false
|
|
}
|
|
}else {
|
|
return false
|
|
}
|
|
}()) {
|
|
return cljs.core._compare.call(null, x, y)
|
|
}else {
|
|
return goog.array.defaultCompare(x, y)
|
|
}
|
|
}else {
|
|
if("\ufdd0:else") {
|
|
throw new Error("compare on non-nil objects of different types");
|
|
}else {
|
|
return null
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
};
|
|
cljs.core.compare_indexed = function() {
|
|
var compare_indexed = null;
|
|
var compare_indexed__2 = function(xs, ys) {
|
|
var xl = cljs.core.count.call(null, xs);
|
|
var yl = cljs.core.count.call(null, ys);
|
|
if(xl < yl) {
|
|
return-1
|
|
}else {
|
|
if(xl > yl) {
|
|
return 1
|
|
}else {
|
|
if("\ufdd0:else") {
|
|
return compare_indexed.call(null, xs, ys, xl, 0)
|
|
}else {
|
|
return null
|
|
}
|
|
}
|
|
}
|
|
};
|
|
var compare_indexed__4 = function(xs, ys, len, n) {
|
|
while(true) {
|
|
var d = cljs.core.compare.call(null, cljs.core.nth.call(null, xs, n), cljs.core.nth.call(null, ys, n));
|
|
if(function() {
|
|
var and__3941__auto__ = d === 0;
|
|
if(and__3941__auto__) {
|
|
return n + 1 < len
|
|
}else {
|
|
return and__3941__auto__
|
|
}
|
|
}()) {
|
|
var G__13628 = xs;
|
|
var G__13629 = ys;
|
|
var G__13630 = len;
|
|
var G__13631 = n + 1;
|
|
xs = G__13628;
|
|
ys = G__13629;
|
|
len = G__13630;
|
|
n = G__13631;
|
|
continue
|
|
}else {
|
|
return d
|
|
}
|
|
break
|
|
}
|
|
};
|
|
compare_indexed = function(xs, ys, len, n) {
|
|
switch(arguments.length) {
|
|
case 2:
|
|
return compare_indexed__2.call(this, xs, ys);
|
|
case 4:
|
|
return compare_indexed__4.call(this, xs, ys, len, n)
|
|
}
|
|
throw new Error("Invalid arity: " + arguments.length);
|
|
};
|
|
compare_indexed.cljs$core$IFn$_invoke$arity$2 = compare_indexed__2;
|
|
compare_indexed.cljs$core$IFn$_invoke$arity$4 = compare_indexed__4;
|
|
return compare_indexed
|
|
}();
|
|
cljs.core.fn__GT_comparator = function fn__GT_comparator(f) {
|
|
if(cljs.core._EQ_.call(null, f, cljs.core.compare)) {
|
|
return cljs.core.compare
|
|
}else {
|
|
return function(x, y) {
|
|
var r = f.call(null, x, y);
|
|
if(typeof r === "number") {
|
|
return r
|
|
}else {
|
|
if(cljs.core.truth_(r)) {
|
|
return-1
|
|
}else {
|
|
if(cljs.core.truth_(f.call(null, y, x))) {
|
|
return 1
|
|
}else {
|
|
return 0
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
};
|
|
cljs.core.sort = function() {
|
|
var sort = null;
|
|
var sort__1 = function(coll) {
|
|
return sort.call(null, cljs.core.compare, coll)
|
|
};
|
|
var sort__2 = function(comp, coll) {
|
|
if(cljs.core.seq.call(null, coll)) {
|
|
var a = cljs.core.to_array.call(null, coll);
|
|
goog.array.stableSort(a, cljs.core.fn__GT_comparator.call(null, comp));
|
|
return cljs.core.seq.call(null, a)
|
|
}else {
|
|
return cljs.core.List.EMPTY
|
|
}
|
|
};
|
|
sort = function(comp, coll) {
|
|
switch(arguments.length) {
|
|
case 1:
|
|
return sort__1.call(this, comp);
|
|
case 2:
|
|
return sort__2.call(this, comp, coll)
|
|
}
|
|
throw new Error("Invalid arity: " + arguments.length);
|
|
};
|
|
sort.cljs$core$IFn$_invoke$arity$1 = sort__1;
|
|
sort.cljs$core$IFn$_invoke$arity$2 = sort__2;
|
|
return sort
|
|
}();
|
|
cljs.core.sort_by = function() {
|
|
var sort_by = null;
|
|
var sort_by__2 = function(keyfn, coll) {
|
|
return sort_by.call(null, keyfn, cljs.core.compare, coll)
|
|
};
|
|
var sort_by__3 = function(keyfn, comp, coll) {
|
|
return cljs.core.sort.call(null, function(x, y) {
|
|
return cljs.core.fn__GT_comparator.call(null, comp).call(null, keyfn.call(null, x), keyfn.call(null, y))
|
|
}, coll)
|
|
};
|
|
sort_by = function(keyfn, comp, coll) {
|
|
switch(arguments.length) {
|
|
case 2:
|
|
return sort_by__2.call(this, keyfn, comp);
|
|
case 3:
|
|
return sort_by__3.call(this, keyfn, comp, coll)
|
|
}
|
|
throw new Error("Invalid arity: " + arguments.length);
|
|
};
|
|
sort_by.cljs$core$IFn$_invoke$arity$2 = sort_by__2;
|
|
sort_by.cljs$core$IFn$_invoke$arity$3 = sort_by__3;
|
|
return sort_by
|
|
}();
|
|
cljs.core.seq_reduce = function() {
|
|
var seq_reduce = null;
|
|
var seq_reduce__2 = function(f, coll) {
|
|
var temp__4090__auto__ = cljs.core.seq.call(null, coll);
|
|
if(temp__4090__auto__) {
|
|
var s = temp__4090__auto__;
|
|
return cljs.core.reduce.call(null, f, cljs.core.first.call(null, s), cljs.core.next.call(null, s))
|
|
}else {
|
|
return f.call(null)
|
|
}
|
|
};
|
|
var seq_reduce__3 = function(f, val, coll) {
|
|
var val__$1 = val;
|
|
var coll__$1 = cljs.core.seq.call(null, coll);
|
|
while(true) {
|
|
if(coll__$1) {
|
|
var nval = f.call(null, val__$1, cljs.core.first.call(null, coll__$1));
|
|
if(cljs.core.reduced_QMARK_.call(null, nval)) {
|
|
return cljs.core.deref.call(null, nval)
|
|
}else {
|
|
var G__13632 = nval;
|
|
var G__13633 = cljs.core.next.call(null, coll__$1);
|
|
val__$1 = G__13632;
|
|
coll__$1 = G__13633;
|
|
continue
|
|
}
|
|
}else {
|
|
return val__$1
|
|
}
|
|
break
|
|
}
|
|
};
|
|
seq_reduce = function(f, val, coll) {
|
|
switch(arguments.length) {
|
|
case 2:
|
|
return seq_reduce__2.call(this, f, val);
|
|
case 3:
|
|
return seq_reduce__3.call(this, f, val, coll)
|
|
}
|
|
throw new Error("Invalid arity: " + arguments.length);
|
|
};
|
|
seq_reduce.cljs$core$IFn$_invoke$arity$2 = seq_reduce__2;
|
|
seq_reduce.cljs$core$IFn$_invoke$arity$3 = seq_reduce__3;
|
|
return seq_reduce
|
|
}();
|
|
cljs.core.shuffle = function shuffle(coll) {
|
|
var a = cljs.core.to_array.call(null, coll);
|
|
goog.array.shuffle(a);
|
|
return cljs.core.vec.call(null, a)
|
|
};
|
|
cljs.core.reduce = function() {
|
|
var reduce = null;
|
|
var reduce__2 = function(f, coll) {
|
|
if(function() {
|
|
var G__13636 = coll;
|
|
if(G__13636) {
|
|
if(function() {
|
|
var or__3943__auto__ = G__13636.cljs$lang$protocol_mask$partition0$ & 524288;
|
|
if(or__3943__auto__) {
|
|
return or__3943__auto__
|
|
}else {
|
|
return G__13636.cljs$core$IReduce$
|
|
}
|
|
}()) {
|
|
return true
|
|
}else {
|
|
return false
|
|
}
|
|
}else {
|
|
return false
|
|
}
|
|
}()) {
|
|
return cljs.core._reduce.call(null, coll, f)
|
|
}else {
|
|
if(coll instanceof Array) {
|
|
return cljs.core.array_reduce.call(null, coll, f)
|
|
}else {
|
|
if(cljs.core.string_QMARK_.call(null, coll)) {
|
|
return cljs.core.array_reduce.call(null, coll, f)
|
|
}else {
|
|
if(cljs.core.type_satisfies_.call(null, cljs.core.IReduce, coll)) {
|
|
return cljs.core._reduce.call(null, coll, f)
|
|
}else {
|
|
if("\ufdd0:else") {
|
|
return cljs.core.seq_reduce.call(null, f, coll)
|
|
}else {
|
|
return null
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
};
|
|
var reduce__3 = function(f, val, coll) {
|
|
if(function() {
|
|
var G__13637 = coll;
|
|
if(G__13637) {
|
|
if(function() {
|
|
var or__3943__auto__ = G__13637.cljs$lang$protocol_mask$partition0$ & 524288;
|
|
if(or__3943__auto__) {
|
|
return or__3943__auto__
|
|
}else {
|
|
return G__13637.cljs$core$IReduce$
|
|
}
|
|
}()) {
|
|
return true
|
|
}else {
|
|
return false
|
|
}
|
|
}else {
|
|
return false
|
|
}
|
|
}()) {
|
|
return cljs.core._reduce.call(null, coll, f, val)
|
|
}else {
|
|
if(coll instanceof Array) {
|
|
return cljs.core.array_reduce.call(null, coll, f, val)
|
|
}else {
|
|
if(cljs.core.string_QMARK_.call(null, coll)) {
|
|
return cljs.core.array_reduce.call(null, coll, f, val)
|
|
}else {
|
|
if(cljs.core.type_satisfies_.call(null, cljs.core.IReduce, coll)) {
|
|
return cljs.core._reduce.call(null, coll, f, val)
|
|
}else {
|
|
if("\ufdd0:else") {
|
|
return cljs.core.seq_reduce.call(null, f, val, coll)
|
|
}else {
|
|
return null
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
};
|
|
reduce = function(f, val, coll) {
|
|
switch(arguments.length) {
|
|
case 2:
|
|
return reduce__2.call(this, f, val);
|
|
case 3:
|
|
return reduce__3.call(this, f, val, coll)
|
|
}
|
|
throw new Error("Invalid arity: " + arguments.length);
|
|
};
|
|
reduce.cljs$core$IFn$_invoke$arity$2 = reduce__2;
|
|
reduce.cljs$core$IFn$_invoke$arity$3 = reduce__3;
|
|
return reduce
|
|
}();
|
|
cljs.core.reduce_kv = function reduce_kv(f, init, coll) {
|
|
return cljs.core._kv_reduce.call(null, coll, f, init)
|
|
};
|
|
cljs.core._PLUS_ = function() {
|
|
var _PLUS_ = null;
|
|
var _PLUS___0 = function() {
|
|
return 0
|
|
};
|
|
var _PLUS___1 = function(x) {
|
|
return x
|
|
};
|
|
var _PLUS___2 = function(x, y) {
|
|
return x + y
|
|
};
|
|
var _PLUS___3 = function() {
|
|
var G__13638__delegate = function(x, y, more) {
|
|
return cljs.core.reduce.call(null, _PLUS_, x + y, more)
|
|
};
|
|
var G__13638 = function(x, y, var_args) {
|
|
var more = null;
|
|
if(arguments.length > 2) {
|
|
more = cljs.core.array_seq(Array.prototype.slice.call(arguments, 2), 0)
|
|
}
|
|
return G__13638__delegate.call(this, x, y, more)
|
|
};
|
|
G__13638.cljs$lang$maxFixedArity = 2;
|
|
G__13638.cljs$lang$applyTo = function(arglist__13639) {
|
|
var x = cljs.core.first(arglist__13639);
|
|
arglist__13639 = cljs.core.next(arglist__13639);
|
|
var y = cljs.core.first(arglist__13639);
|
|
var more = cljs.core.rest(arglist__13639);
|
|
return G__13638__delegate(x, y, more)
|
|
};
|
|
G__13638.cljs$core$IFn$_invoke$arity$variadic = G__13638__delegate;
|
|
return G__13638
|
|
}();
|
|
_PLUS_ = function(x, y, var_args) {
|
|
var more = var_args;
|
|
switch(arguments.length) {
|
|
case 0:
|
|
return _PLUS___0.call(this);
|
|
case 1:
|
|
return _PLUS___1.call(this, x);
|
|
case 2:
|
|
return _PLUS___2.call(this, x, y);
|
|
default:
|
|
return _PLUS___3.cljs$core$IFn$_invoke$arity$variadic(x, y, cljs.core.array_seq(arguments, 2))
|
|
}
|
|
throw new Error("Invalid arity: " + arguments.length);
|
|
};
|
|
_PLUS_.cljs$lang$maxFixedArity = 2;
|
|
_PLUS_.cljs$lang$applyTo = _PLUS___3.cljs$lang$applyTo;
|
|
_PLUS_.cljs$core$IFn$_invoke$arity$0 = _PLUS___0;
|
|
_PLUS_.cljs$core$IFn$_invoke$arity$1 = _PLUS___1;
|
|
_PLUS_.cljs$core$IFn$_invoke$arity$2 = _PLUS___2;
|
|
_PLUS_.cljs$core$IFn$_invoke$arity$variadic = _PLUS___3.cljs$core$IFn$_invoke$arity$variadic;
|
|
return _PLUS_
|
|
}();
|
|
cljs.core._ = function() {
|
|
var _ = null;
|
|
var ___1 = function(x) {
|
|
return-x
|
|
};
|
|
var ___2 = function(x, y) {
|
|
return x - y
|
|
};
|
|
var ___3 = function() {
|
|
var G__13640__delegate = function(x, y, more) {
|
|
return cljs.core.reduce.call(null, _, x - y, more)
|
|
};
|
|
var G__13640 = function(x, y, var_args) {
|
|
var more = null;
|
|
if(arguments.length > 2) {
|
|
more = cljs.core.array_seq(Array.prototype.slice.call(arguments, 2), 0)
|
|
}
|
|
return G__13640__delegate.call(this, x, y, more)
|
|
};
|
|
G__13640.cljs$lang$maxFixedArity = 2;
|
|
G__13640.cljs$lang$applyTo = function(arglist__13641) {
|
|
var x = cljs.core.first(arglist__13641);
|
|
arglist__13641 = cljs.core.next(arglist__13641);
|
|
var y = cljs.core.first(arglist__13641);
|
|
var more = cljs.core.rest(arglist__13641);
|
|
return G__13640__delegate(x, y, more)
|
|
};
|
|
G__13640.cljs$core$IFn$_invoke$arity$variadic = G__13640__delegate;
|
|
return G__13640
|
|
}();
|
|
_ = function(x, y, var_args) {
|
|
var more = var_args;
|
|
switch(arguments.length) {
|
|
case 1:
|
|
return ___1.call(this, x);
|
|
case 2:
|
|
return ___2.call(this, x, y);
|
|
default:
|
|
return ___3.cljs$core$IFn$_invoke$arity$variadic(x, y, cljs.core.array_seq(arguments, 2))
|
|
}
|
|
throw new Error("Invalid arity: " + arguments.length);
|
|
};
|
|
_.cljs$lang$maxFixedArity = 2;
|
|
_.cljs$lang$applyTo = ___3.cljs$lang$applyTo;
|
|
_.cljs$core$IFn$_invoke$arity$1 = ___1;
|
|
_.cljs$core$IFn$_invoke$arity$2 = ___2;
|
|
_.cljs$core$IFn$_invoke$arity$variadic = ___3.cljs$core$IFn$_invoke$arity$variadic;
|
|
return _
|
|
}();
|
|
cljs.core._STAR_ = function() {
|
|
var _STAR_ = null;
|
|
var _STAR___0 = function() {
|
|
return 1
|
|
};
|
|
var _STAR___1 = function(x) {
|
|
return x
|
|
};
|
|
var _STAR___2 = function(x, y) {
|
|
return x * y
|
|
};
|
|
var _STAR___3 = function() {
|
|
var G__13642__delegate = function(x, y, more) {
|
|
return cljs.core.reduce.call(null, _STAR_, x * y, more)
|
|
};
|
|
var G__13642 = function(x, y, var_args) {
|
|
var more = null;
|
|
if(arguments.length > 2) {
|
|
more = cljs.core.array_seq(Array.prototype.slice.call(arguments, 2), 0)
|
|
}
|
|
return G__13642__delegate.call(this, x, y, more)
|
|
};
|
|
G__13642.cljs$lang$maxFixedArity = 2;
|
|
G__13642.cljs$lang$applyTo = function(arglist__13643) {
|
|
var x = cljs.core.first(arglist__13643);
|
|
arglist__13643 = cljs.core.next(arglist__13643);
|
|
var y = cljs.core.first(arglist__13643);
|
|
var more = cljs.core.rest(arglist__13643);
|
|
return G__13642__delegate(x, y, more)
|
|
};
|
|
G__13642.cljs$core$IFn$_invoke$arity$variadic = G__13642__delegate;
|
|
return G__13642
|
|
}();
|
|
_STAR_ = function(x, y, var_args) {
|
|
var more = var_args;
|
|
switch(arguments.length) {
|
|
case 0:
|
|
return _STAR___0.call(this);
|
|
case 1:
|
|
return _STAR___1.call(this, x);
|
|
case 2:
|
|
return _STAR___2.call(this, x, y);
|
|
default:
|
|
return _STAR___3.cljs$core$IFn$_invoke$arity$variadic(x, y, cljs.core.array_seq(arguments, 2))
|
|
}
|
|
throw new Error("Invalid arity: " + arguments.length);
|
|
};
|
|
_STAR_.cljs$lang$maxFixedArity = 2;
|
|
_STAR_.cljs$lang$applyTo = _STAR___3.cljs$lang$applyTo;
|
|
_STAR_.cljs$core$IFn$_invoke$arity$0 = _STAR___0;
|
|
_STAR_.cljs$core$IFn$_invoke$arity$1 = _STAR___1;
|
|
_STAR_.cljs$core$IFn$_invoke$arity$2 = _STAR___2;
|
|
_STAR_.cljs$core$IFn$_invoke$arity$variadic = _STAR___3.cljs$core$IFn$_invoke$arity$variadic;
|
|
return _STAR_
|
|
}();
|
|
cljs.core._SLASH_ = function() {
|
|
var _SLASH_ = null;
|
|
var _SLASH___1 = function(x) {
|
|
return _SLASH_.call(null, 1, x)
|
|
};
|
|
var _SLASH___2 = function(x, y) {
|
|
return x / y
|
|
};
|
|
var _SLASH___3 = function() {
|
|
var G__13644__delegate = function(x, y, more) {
|
|
return cljs.core.reduce.call(null, _SLASH_, _SLASH_.call(null, x, y), more)
|
|
};
|
|
var G__13644 = function(x, y, var_args) {
|
|
var more = null;
|
|
if(arguments.length > 2) {
|
|
more = cljs.core.array_seq(Array.prototype.slice.call(arguments, 2), 0)
|
|
}
|
|
return G__13644__delegate.call(this, x, y, more)
|
|
};
|
|
G__13644.cljs$lang$maxFixedArity = 2;
|
|
G__13644.cljs$lang$applyTo = function(arglist__13645) {
|
|
var x = cljs.core.first(arglist__13645);
|
|
arglist__13645 = cljs.core.next(arglist__13645);
|
|
var y = cljs.core.first(arglist__13645);
|
|
var more = cljs.core.rest(arglist__13645);
|
|
return G__13644__delegate(x, y, more)
|
|
};
|
|
G__13644.cljs$core$IFn$_invoke$arity$variadic = G__13644__delegate;
|
|
return G__13644
|
|
}();
|
|
_SLASH_ = function(x, y, var_args) {
|
|
var more = var_args;
|
|
switch(arguments.length) {
|
|
case 1:
|
|
return _SLASH___1.call(this, x);
|
|
case 2:
|
|
return _SLASH___2.call(this, x, y);
|
|
default:
|
|
return _SLASH___3.cljs$core$IFn$_invoke$arity$variadic(x, y, cljs.core.array_seq(arguments, 2))
|
|
}
|
|
throw new Error("Invalid arity: " + arguments.length);
|
|
};
|
|
_SLASH_.cljs$lang$maxFixedArity = 2;
|
|
_SLASH_.cljs$lang$applyTo = _SLASH___3.cljs$lang$applyTo;
|
|
_SLASH_.cljs$core$IFn$_invoke$arity$1 = _SLASH___1;
|
|
_SLASH_.cljs$core$IFn$_invoke$arity$2 = _SLASH___2;
|
|
_SLASH_.cljs$core$IFn$_invoke$arity$variadic = _SLASH___3.cljs$core$IFn$_invoke$arity$variadic;
|
|
return _SLASH_
|
|
}();
|
|
cljs.core._LT_ = function() {
|
|
var _LT_ = null;
|
|
var _LT___1 = function(x) {
|
|
return true
|
|
};
|
|
var _LT___2 = function(x, y) {
|
|
return x < y
|
|
};
|
|
var _LT___3 = function() {
|
|
var G__13646__delegate = function(x, y, more) {
|
|
while(true) {
|
|
if(x < y) {
|
|
if(cljs.core.next.call(null, more)) {
|
|
var G__13647 = y;
|
|
var G__13648 = cljs.core.first.call(null, more);
|
|
var G__13649 = cljs.core.next.call(null, more);
|
|
x = G__13647;
|
|
y = G__13648;
|
|
more = G__13649;
|
|
continue
|
|
}else {
|
|
return y < cljs.core.first.call(null, more)
|
|
}
|
|
}else {
|
|
return false
|
|
}
|
|
break
|
|
}
|
|
};
|
|
var G__13646 = function(x, y, var_args) {
|
|
var more = null;
|
|
if(arguments.length > 2) {
|
|
more = cljs.core.array_seq(Array.prototype.slice.call(arguments, 2), 0)
|
|
}
|
|
return G__13646__delegate.call(this, x, y, more)
|
|
};
|
|
G__13646.cljs$lang$maxFixedArity = 2;
|
|
G__13646.cljs$lang$applyTo = function(arglist__13650) {
|
|
var x = cljs.core.first(arglist__13650);
|
|
arglist__13650 = cljs.core.next(arglist__13650);
|
|
var y = cljs.core.first(arglist__13650);
|
|
var more = cljs.core.rest(arglist__13650);
|
|
return G__13646__delegate(x, y, more)
|
|
};
|
|
G__13646.cljs$core$IFn$_invoke$arity$variadic = G__13646__delegate;
|
|
return G__13646
|
|
}();
|
|
_LT_ = function(x, y, var_args) {
|
|
var more = var_args;
|
|
switch(arguments.length) {
|
|
case 1:
|
|
return _LT___1.call(this, x);
|
|
case 2:
|
|
return _LT___2.call(this, x, y);
|
|
default:
|
|
return _LT___3.cljs$core$IFn$_invoke$arity$variadic(x, y, cljs.core.array_seq(arguments, 2))
|
|
}
|
|
throw new Error("Invalid arity: " + arguments.length);
|
|
};
|
|
_LT_.cljs$lang$maxFixedArity = 2;
|
|
_LT_.cljs$lang$applyTo = _LT___3.cljs$lang$applyTo;
|
|
_LT_.cljs$core$IFn$_invoke$arity$1 = _LT___1;
|
|
_LT_.cljs$core$IFn$_invoke$arity$2 = _LT___2;
|
|
_LT_.cljs$core$IFn$_invoke$arity$variadic = _LT___3.cljs$core$IFn$_invoke$arity$variadic;
|
|
return _LT_
|
|
}();
|
|
cljs.core._LT__EQ_ = function() {
|
|
var _LT__EQ_ = null;
|
|
var _LT__EQ___1 = function(x) {
|
|
return true
|
|
};
|
|
var _LT__EQ___2 = function(x, y) {
|
|
return x <= y
|
|
};
|
|
var _LT__EQ___3 = function() {
|
|
var G__13651__delegate = function(x, y, more) {
|
|
while(true) {
|
|
if(x <= y) {
|
|
if(cljs.core.next.call(null, more)) {
|
|
var G__13652 = y;
|
|
var G__13653 = cljs.core.first.call(null, more);
|
|
var G__13654 = cljs.core.next.call(null, more);
|
|
x = G__13652;
|
|
y = G__13653;
|
|
more = G__13654;
|
|
continue
|
|
}else {
|
|
return y <= cljs.core.first.call(null, more)
|
|
}
|
|
}else {
|
|
return false
|
|
}
|
|
break
|
|
}
|
|
};
|
|
var G__13651 = function(x, y, var_args) {
|
|
var more = null;
|
|
if(arguments.length > 2) {
|
|
more = cljs.core.array_seq(Array.prototype.slice.call(arguments, 2), 0)
|
|
}
|
|
return G__13651__delegate.call(this, x, y, more)
|
|
};
|
|
G__13651.cljs$lang$maxFixedArity = 2;
|
|
G__13651.cljs$lang$applyTo = function(arglist__13655) {
|
|
var x = cljs.core.first(arglist__13655);
|
|
arglist__13655 = cljs.core.next(arglist__13655);
|
|
var y = cljs.core.first(arglist__13655);
|
|
var more = cljs.core.rest(arglist__13655);
|
|
return G__13651__delegate(x, y, more)
|
|
};
|
|
G__13651.cljs$core$IFn$_invoke$arity$variadic = G__13651__delegate;
|
|
return G__13651
|
|
}();
|
|
_LT__EQ_ = function(x, y, var_args) {
|
|
var more = var_args;
|
|
switch(arguments.length) {
|
|
case 1:
|
|
return _LT__EQ___1.call(this, x);
|
|
case 2:
|
|
return _LT__EQ___2.call(this, x, y);
|
|
default:
|
|
return _LT__EQ___3.cljs$core$IFn$_invoke$arity$variadic(x, y, cljs.core.array_seq(arguments, 2))
|
|
}
|
|
throw new Error("Invalid arity: " + arguments.length);
|
|
};
|
|
_LT__EQ_.cljs$lang$maxFixedArity = 2;
|
|
_LT__EQ_.cljs$lang$applyTo = _LT__EQ___3.cljs$lang$applyTo;
|
|
_LT__EQ_.cljs$core$IFn$_invoke$arity$1 = _LT__EQ___1;
|
|
_LT__EQ_.cljs$core$IFn$_invoke$arity$2 = _LT__EQ___2;
|
|
_LT__EQ_.cljs$core$IFn$_invoke$arity$variadic = _LT__EQ___3.cljs$core$IFn$_invoke$arity$variadic;
|
|
return _LT__EQ_
|
|
}();
|
|
cljs.core._GT_ = function() {
|
|
var _GT_ = null;
|
|
var _GT___1 = function(x) {
|
|
return true
|
|
};
|
|
var _GT___2 = function(x, y) {
|
|
return x > y
|
|
};
|
|
var _GT___3 = function() {
|
|
var G__13656__delegate = function(x, y, more) {
|
|
while(true) {
|
|
if(x > y) {
|
|
if(cljs.core.next.call(null, more)) {
|
|
var G__13657 = y;
|
|
var G__13658 = cljs.core.first.call(null, more);
|
|
var G__13659 = cljs.core.next.call(null, more);
|
|
x = G__13657;
|
|
y = G__13658;
|
|
more = G__13659;
|
|
continue
|
|
}else {
|
|
return y > cljs.core.first.call(null, more)
|
|
}
|
|
}else {
|
|
return false
|
|
}
|
|
break
|
|
}
|
|
};
|
|
var G__13656 = function(x, y, var_args) {
|
|
var more = null;
|
|
if(arguments.length > 2) {
|
|
more = cljs.core.array_seq(Array.prototype.slice.call(arguments, 2), 0)
|
|
}
|
|
return G__13656__delegate.call(this, x, y, more)
|
|
};
|
|
G__13656.cljs$lang$maxFixedArity = 2;
|
|
G__13656.cljs$lang$applyTo = function(arglist__13660) {
|
|
var x = cljs.core.first(arglist__13660);
|
|
arglist__13660 = cljs.core.next(arglist__13660);
|
|
var y = cljs.core.first(arglist__13660);
|
|
var more = cljs.core.rest(arglist__13660);
|
|
return G__13656__delegate(x, y, more)
|
|
};
|
|
G__13656.cljs$core$IFn$_invoke$arity$variadic = G__13656__delegate;
|
|
return G__13656
|
|
}();
|
|
_GT_ = function(x, y, var_args) {
|
|
var more = var_args;
|
|
switch(arguments.length) {
|
|
case 1:
|
|
return _GT___1.call(this, x);
|
|
case 2:
|
|
return _GT___2.call(this, x, y);
|
|
default:
|
|
return _GT___3.cljs$core$IFn$_invoke$arity$variadic(x, y, cljs.core.array_seq(arguments, 2))
|
|
}
|
|
throw new Error("Invalid arity: " + arguments.length);
|
|
};
|
|
_GT_.cljs$lang$maxFixedArity = 2;
|
|
_GT_.cljs$lang$applyTo = _GT___3.cljs$lang$applyTo;
|
|
_GT_.cljs$core$IFn$_invoke$arity$1 = _GT___1;
|
|
_GT_.cljs$core$IFn$_invoke$arity$2 = _GT___2;
|
|
_GT_.cljs$core$IFn$_invoke$arity$variadic = _GT___3.cljs$core$IFn$_invoke$arity$variadic;
|
|
return _GT_
|
|
}();
|
|
cljs.core._GT__EQ_ = function() {
|
|
var _GT__EQ_ = null;
|
|
var _GT__EQ___1 = function(x) {
|
|
return true
|
|
};
|
|
var _GT__EQ___2 = function(x, y) {
|
|
return x >= y
|
|
};
|
|
var _GT__EQ___3 = function() {
|
|
var G__13661__delegate = function(x, y, more) {
|
|
while(true) {
|
|
if(x >= y) {
|
|
if(cljs.core.next.call(null, more)) {
|
|
var G__13662 = y;
|
|
var G__13663 = cljs.core.first.call(null, more);
|
|
var G__13664 = cljs.core.next.call(null, more);
|
|
x = G__13662;
|
|
y = G__13663;
|
|
more = G__13664;
|
|
continue
|
|
}else {
|
|
return y >= cljs.core.first.call(null, more)
|
|
}
|
|
}else {
|
|
return false
|
|
}
|
|
break
|
|
}
|
|
};
|
|
var G__13661 = function(x, y, var_args) {
|
|
var more = null;
|
|
if(arguments.length > 2) {
|
|
more = cljs.core.array_seq(Array.prototype.slice.call(arguments, 2), 0)
|
|
}
|
|
return G__13661__delegate.call(this, x, y, more)
|
|
};
|
|
G__13661.cljs$lang$maxFixedArity = 2;
|
|
G__13661.cljs$lang$applyTo = function(arglist__13665) {
|
|
var x = cljs.core.first(arglist__13665);
|
|
arglist__13665 = cljs.core.next(arglist__13665);
|
|
var y = cljs.core.first(arglist__13665);
|
|
var more = cljs.core.rest(arglist__13665);
|
|
return G__13661__delegate(x, y, more)
|
|
};
|
|
G__13661.cljs$core$IFn$_invoke$arity$variadic = G__13661__delegate;
|
|
return G__13661
|
|
}();
|
|
_GT__EQ_ = function(x, y, var_args) {
|
|
var more = var_args;
|
|
switch(arguments.length) {
|
|
case 1:
|
|
return _GT__EQ___1.call(this, x);
|
|
case 2:
|
|
return _GT__EQ___2.call(this, x, y);
|
|
default:
|
|
return _GT__EQ___3.cljs$core$IFn$_invoke$arity$variadic(x, y, cljs.core.array_seq(arguments, 2))
|
|
}
|
|
throw new Error("Invalid arity: " + arguments.length);
|
|
};
|
|
_GT__EQ_.cljs$lang$maxFixedArity = 2;
|
|
_GT__EQ_.cljs$lang$applyTo = _GT__EQ___3.cljs$lang$applyTo;
|
|
_GT__EQ_.cljs$core$IFn$_invoke$arity$1 = _GT__EQ___1;
|
|
_GT__EQ_.cljs$core$IFn$_invoke$arity$2 = _GT__EQ___2;
|
|
_GT__EQ_.cljs$core$IFn$_invoke$arity$variadic = _GT__EQ___3.cljs$core$IFn$_invoke$arity$variadic;
|
|
return _GT__EQ_
|
|
}();
|
|
cljs.core.dec = function dec(x) {
|
|
return x - 1
|
|
};
|
|
cljs.core.max = function() {
|
|
var max = null;
|
|
var max__1 = function(x) {
|
|
return x
|
|
};
|
|
var max__2 = function(x, y) {
|
|
var x__2633__auto__ = x;
|
|
var y__2634__auto__ = y;
|
|
return x__2633__auto__ > y__2634__auto__ ? x__2633__auto__ : y__2634__auto__
|
|
};
|
|
var max__3 = function() {
|
|
var G__13666__delegate = function(x, y, more) {
|
|
return cljs.core.reduce.call(null, max, function() {
|
|
var x__2633__auto__ = x;
|
|
var y__2634__auto__ = y;
|
|
return x__2633__auto__ > y__2634__auto__ ? x__2633__auto__ : y__2634__auto__
|
|
}(), more)
|
|
};
|
|
var G__13666 = function(x, y, var_args) {
|
|
var more = null;
|
|
if(arguments.length > 2) {
|
|
more = cljs.core.array_seq(Array.prototype.slice.call(arguments, 2), 0)
|
|
}
|
|
return G__13666__delegate.call(this, x, y, more)
|
|
};
|
|
G__13666.cljs$lang$maxFixedArity = 2;
|
|
G__13666.cljs$lang$applyTo = function(arglist__13667) {
|
|
var x = cljs.core.first(arglist__13667);
|
|
arglist__13667 = cljs.core.next(arglist__13667);
|
|
var y = cljs.core.first(arglist__13667);
|
|
var more = cljs.core.rest(arglist__13667);
|
|
return G__13666__delegate(x, y, more)
|
|
};
|
|
G__13666.cljs$core$IFn$_invoke$arity$variadic = G__13666__delegate;
|
|
return G__13666
|
|
}();
|
|
max = function(x, y, var_args) {
|
|
var more = var_args;
|
|
switch(arguments.length) {
|
|
case 1:
|
|
return max__1.call(this, x);
|
|
case 2:
|
|
return max__2.call(this, x, y);
|
|
default:
|
|
return max__3.cljs$core$IFn$_invoke$arity$variadic(x, y, cljs.core.array_seq(arguments, 2))
|
|
}
|
|
throw new Error("Invalid arity: " + arguments.length);
|
|
};
|
|
max.cljs$lang$maxFixedArity = 2;
|
|
max.cljs$lang$applyTo = max__3.cljs$lang$applyTo;
|
|
max.cljs$core$IFn$_invoke$arity$1 = max__1;
|
|
max.cljs$core$IFn$_invoke$arity$2 = max__2;
|
|
max.cljs$core$IFn$_invoke$arity$variadic = max__3.cljs$core$IFn$_invoke$arity$variadic;
|
|
return max
|
|
}();
|
|
cljs.core.min = function() {
|
|
var min = null;
|
|
var min__1 = function(x) {
|
|
return x
|
|
};
|
|
var min__2 = function(x, y) {
|
|
var x__2640__auto__ = x;
|
|
var y__2641__auto__ = y;
|
|
return x__2640__auto__ < y__2641__auto__ ? x__2640__auto__ : y__2641__auto__
|
|
};
|
|
var min__3 = function() {
|
|
var G__13668__delegate = function(x, y, more) {
|
|
return cljs.core.reduce.call(null, min, function() {
|
|
var x__2640__auto__ = x;
|
|
var y__2641__auto__ = y;
|
|
return x__2640__auto__ < y__2641__auto__ ? x__2640__auto__ : y__2641__auto__
|
|
}(), more)
|
|
};
|
|
var G__13668 = function(x, y, var_args) {
|
|
var more = null;
|
|
if(arguments.length > 2) {
|
|
more = cljs.core.array_seq(Array.prototype.slice.call(arguments, 2), 0)
|
|
}
|
|
return G__13668__delegate.call(this, x, y, more)
|
|
};
|
|
G__13668.cljs$lang$maxFixedArity = 2;
|
|
G__13668.cljs$lang$applyTo = function(arglist__13669) {
|
|
var x = cljs.core.first(arglist__13669);
|
|
arglist__13669 = cljs.core.next(arglist__13669);
|
|
var y = cljs.core.first(arglist__13669);
|
|
var more = cljs.core.rest(arglist__13669);
|
|
return G__13668__delegate(x, y, more)
|
|
};
|
|
G__13668.cljs$core$IFn$_invoke$arity$variadic = G__13668__delegate;
|
|
return G__13668
|
|
}();
|
|
min = function(x, y, var_args) {
|
|
var more = var_args;
|
|
switch(arguments.length) {
|
|
case 1:
|
|
return min__1.call(this, x);
|
|
case 2:
|
|
return min__2.call(this, x, y);
|
|
default:
|
|
return min__3.cljs$core$IFn$_invoke$arity$variadic(x, y, cljs.core.array_seq(arguments, 2))
|
|
}
|
|
throw new Error("Invalid arity: " + arguments.length);
|
|
};
|
|
min.cljs$lang$maxFixedArity = 2;
|
|
min.cljs$lang$applyTo = min__3.cljs$lang$applyTo;
|
|
min.cljs$core$IFn$_invoke$arity$1 = min__1;
|
|
min.cljs$core$IFn$_invoke$arity$2 = min__2;
|
|
min.cljs$core$IFn$_invoke$arity$variadic = min__3.cljs$core$IFn$_invoke$arity$variadic;
|
|
return min
|
|
}();
|
|
cljs.core.byte$ = function byte$(x) {
|
|
return x
|
|
};
|
|
cljs.core.char$ = function char$(x) {
|
|
if(typeof x === "number") {
|
|
return String.fromCharCode(x)
|
|
}else {
|
|
if(function() {
|
|
var and__3941__auto__ = cljs.core.string_QMARK_.call(null, x);
|
|
if(and__3941__auto__) {
|
|
return x.length === 1
|
|
}else {
|
|
return and__3941__auto__
|
|
}
|
|
}()) {
|
|
return x
|
|
}else {
|
|
if("\ufdd0:else") {
|
|
throw new Error("Argument to char must be a character or number");
|
|
}else {
|
|
return null
|
|
}
|
|
}
|
|
}
|
|
};
|
|
cljs.core.short$ = function short$(x) {
|
|
return x
|
|
};
|
|
cljs.core.float$ = function float$(x) {
|
|
return x
|
|
};
|
|
cljs.core.double$ = function double$(x) {
|
|
return x
|
|
};
|
|
cljs.core.unchecked_byte = function unchecked_byte(x) {
|
|
return x
|
|
};
|
|
cljs.core.unchecked_char = function unchecked_char(x) {
|
|
return x
|
|
};
|
|
cljs.core.unchecked_short = function unchecked_short(x) {
|
|
return x
|
|
};
|
|
cljs.core.unchecked_float = function unchecked_float(x) {
|
|
return x
|
|
};
|
|
cljs.core.unchecked_double = function unchecked_double(x) {
|
|
return x
|
|
};
|
|
cljs.core.unchecked_add = function() {
|
|
var unchecked_add = null;
|
|
var unchecked_add__0 = function() {
|
|
return 0
|
|
};
|
|
var unchecked_add__1 = function(x) {
|
|
return x
|
|
};
|
|
var unchecked_add__2 = function(x, y) {
|
|
return x + y
|
|
};
|
|
var unchecked_add__3 = function() {
|
|
var G__13670__delegate = function(x, y, more) {
|
|
return cljs.core.reduce.call(null, unchecked_add, x + y, more)
|
|
};
|
|
var G__13670 = function(x, y, var_args) {
|
|
var more = null;
|
|
if(arguments.length > 2) {
|
|
more = cljs.core.array_seq(Array.prototype.slice.call(arguments, 2), 0)
|
|
}
|
|
return G__13670__delegate.call(this, x, y, more)
|
|
};
|
|
G__13670.cljs$lang$maxFixedArity = 2;
|
|
G__13670.cljs$lang$applyTo = function(arglist__13671) {
|
|
var x = cljs.core.first(arglist__13671);
|
|
arglist__13671 = cljs.core.next(arglist__13671);
|
|
var y = cljs.core.first(arglist__13671);
|
|
var more = cljs.core.rest(arglist__13671);
|
|
return G__13670__delegate(x, y, more)
|
|
};
|
|
G__13670.cljs$core$IFn$_invoke$arity$variadic = G__13670__delegate;
|
|
return G__13670
|
|
}();
|
|
unchecked_add = function(x, y, var_args) {
|
|
var more = var_args;
|
|
switch(arguments.length) {
|
|
case 0:
|
|
return unchecked_add__0.call(this);
|
|
case 1:
|
|
return unchecked_add__1.call(this, x);
|
|
case 2:
|
|
return unchecked_add__2.call(this, x, y);
|
|
default:
|
|
return unchecked_add__3.cljs$core$IFn$_invoke$arity$variadic(x, y, cljs.core.array_seq(arguments, 2))
|
|
}
|
|
throw new Error("Invalid arity: " + arguments.length);
|
|
};
|
|
unchecked_add.cljs$lang$maxFixedArity = 2;
|
|
unchecked_add.cljs$lang$applyTo = unchecked_add__3.cljs$lang$applyTo;
|
|
unchecked_add.cljs$core$IFn$_invoke$arity$0 = unchecked_add__0;
|
|
unchecked_add.cljs$core$IFn$_invoke$arity$1 = unchecked_add__1;
|
|
unchecked_add.cljs$core$IFn$_invoke$arity$2 = unchecked_add__2;
|
|
unchecked_add.cljs$core$IFn$_invoke$arity$variadic = unchecked_add__3.cljs$core$IFn$_invoke$arity$variadic;
|
|
return unchecked_add
|
|
}();
|
|
cljs.core.unchecked_add_int = function() {
|
|
var unchecked_add_int = null;
|
|
var unchecked_add_int__0 = function() {
|
|
return 0
|
|
};
|
|
var unchecked_add_int__1 = function(x) {
|
|
return x
|
|
};
|
|
var unchecked_add_int__2 = function(x, y) {
|
|
return x + y
|
|
};
|
|
var unchecked_add_int__3 = function() {
|
|
var G__13672__delegate = function(x, y, more) {
|
|
return cljs.core.reduce.call(null, unchecked_add_int, x + y, more)
|
|
};
|
|
var G__13672 = function(x, y, var_args) {
|
|
var more = null;
|
|
if(arguments.length > 2) {
|
|
more = cljs.core.array_seq(Array.prototype.slice.call(arguments, 2), 0)
|
|
}
|
|
return G__13672__delegate.call(this, x, y, more)
|
|
};
|
|
G__13672.cljs$lang$maxFixedArity = 2;
|
|
G__13672.cljs$lang$applyTo = function(arglist__13673) {
|
|
var x = cljs.core.first(arglist__13673);
|
|
arglist__13673 = cljs.core.next(arglist__13673);
|
|
var y = cljs.core.first(arglist__13673);
|
|
var more = cljs.core.rest(arglist__13673);
|
|
return G__13672__delegate(x, y, more)
|
|
};
|
|
G__13672.cljs$core$IFn$_invoke$arity$variadic = G__13672__delegate;
|
|
return G__13672
|
|
}();
|
|
unchecked_add_int = function(x, y, var_args) {
|
|
var more = var_args;
|
|
switch(arguments.length) {
|
|
case 0:
|
|
return unchecked_add_int__0.call(this);
|
|
case 1:
|
|
return unchecked_add_int__1.call(this, x);
|
|
case 2:
|
|
return unchecked_add_int__2.call(this, x, y);
|
|
default:
|
|
return unchecked_add_int__3.cljs$core$IFn$_invoke$arity$variadic(x, y, cljs.core.array_seq(arguments, 2))
|
|
}
|
|
throw new Error("Invalid arity: " + arguments.length);
|
|
};
|
|
unchecked_add_int.cljs$lang$maxFixedArity = 2;
|
|
unchecked_add_int.cljs$lang$applyTo = unchecked_add_int__3.cljs$lang$applyTo;
|
|
unchecked_add_int.cljs$core$IFn$_invoke$arity$0 = unchecked_add_int__0;
|
|
unchecked_add_int.cljs$core$IFn$_invoke$arity$1 = unchecked_add_int__1;
|
|
unchecked_add_int.cljs$core$IFn$_invoke$arity$2 = unchecked_add_int__2;
|
|
unchecked_add_int.cljs$core$IFn$_invoke$arity$variadic = unchecked_add_int__3.cljs$core$IFn$_invoke$arity$variadic;
|
|
return unchecked_add_int
|
|
}();
|
|
cljs.core.unchecked_dec = function unchecked_dec(x) {
|
|
return x - 1
|
|
};
|
|
cljs.core.unchecked_dec_int = function unchecked_dec_int(x) {
|
|
return x - 1
|
|
};
|
|
cljs.core.unchecked_divide_int = function() {
|
|
var unchecked_divide_int = null;
|
|
var unchecked_divide_int__1 = function(x) {
|
|
return unchecked_divide_int.call(null, 1, x)
|
|
};
|
|
var unchecked_divide_int__2 = function(x, y) {
|
|
return x / y
|
|
};
|
|
var unchecked_divide_int__3 = function() {
|
|
var G__13674__delegate = function(x, y, more) {
|
|
return cljs.core.reduce.call(null, unchecked_divide_int, unchecked_divide_int.call(null, x, y), more)
|
|
};
|
|
var G__13674 = function(x, y, var_args) {
|
|
var more = null;
|
|
if(arguments.length > 2) {
|
|
more = cljs.core.array_seq(Array.prototype.slice.call(arguments, 2), 0)
|
|
}
|
|
return G__13674__delegate.call(this, x, y, more)
|
|
};
|
|
G__13674.cljs$lang$maxFixedArity = 2;
|
|
G__13674.cljs$lang$applyTo = function(arglist__13675) {
|
|
var x = cljs.core.first(arglist__13675);
|
|
arglist__13675 = cljs.core.next(arglist__13675);
|
|
var y = cljs.core.first(arglist__13675);
|
|
var more = cljs.core.rest(arglist__13675);
|
|
return G__13674__delegate(x, y, more)
|
|
};
|
|
G__13674.cljs$core$IFn$_invoke$arity$variadic = G__13674__delegate;
|
|
return G__13674
|
|
}();
|
|
unchecked_divide_int = function(x, y, var_args) {
|
|
var more = var_args;
|
|
switch(arguments.length) {
|
|
case 1:
|
|
return unchecked_divide_int__1.call(this, x);
|
|
case 2:
|
|
return unchecked_divide_int__2.call(this, x, y);
|
|
default:
|
|
return unchecked_divide_int__3.cljs$core$IFn$_invoke$arity$variadic(x, y, cljs.core.array_seq(arguments, 2))
|
|
}
|
|
throw new Error("Invalid arity: " + arguments.length);
|
|
};
|
|
unchecked_divide_int.cljs$lang$maxFixedArity = 2;
|
|
unchecked_divide_int.cljs$lang$applyTo = unchecked_divide_int__3.cljs$lang$applyTo;
|
|
unchecked_divide_int.cljs$core$IFn$_invoke$arity$1 = unchecked_divide_int__1;
|
|
unchecked_divide_int.cljs$core$IFn$_invoke$arity$2 = unchecked_divide_int__2;
|
|
unchecked_divide_int.cljs$core$IFn$_invoke$arity$variadic = unchecked_divide_int__3.cljs$core$IFn$_invoke$arity$variadic;
|
|
return unchecked_divide_int
|
|
}();
|
|
cljs.core.unchecked_inc = function unchecked_inc(x) {
|
|
return x + 1
|
|
};
|
|
cljs.core.unchecked_inc_int = function unchecked_inc_int(x) {
|
|
return x + 1
|
|
};
|
|
cljs.core.unchecked_multiply = function() {
|
|
var unchecked_multiply = null;
|
|
var unchecked_multiply__0 = function() {
|
|
return 1
|
|
};
|
|
var unchecked_multiply__1 = function(x) {
|
|
return x
|
|
};
|
|
var unchecked_multiply__2 = function(x, y) {
|
|
return x * y
|
|
};
|
|
var unchecked_multiply__3 = function() {
|
|
var G__13676__delegate = function(x, y, more) {
|
|
return cljs.core.reduce.call(null, unchecked_multiply, x * y, more)
|
|
};
|
|
var G__13676 = function(x, y, var_args) {
|
|
var more = null;
|
|
if(arguments.length > 2) {
|
|
more = cljs.core.array_seq(Array.prototype.slice.call(arguments, 2), 0)
|
|
}
|
|
return G__13676__delegate.call(this, x, y, more)
|
|
};
|
|
G__13676.cljs$lang$maxFixedArity = 2;
|
|
G__13676.cljs$lang$applyTo = function(arglist__13677) {
|
|
var x = cljs.core.first(arglist__13677);
|
|
arglist__13677 = cljs.core.next(arglist__13677);
|
|
var y = cljs.core.first(arglist__13677);
|
|
var more = cljs.core.rest(arglist__13677);
|
|
return G__13676__delegate(x, y, more)
|
|
};
|
|
G__13676.cljs$core$IFn$_invoke$arity$variadic = G__13676__delegate;
|
|
return G__13676
|
|
}();
|
|
unchecked_multiply = function(x, y, var_args) {
|
|
var more = var_args;
|
|
switch(arguments.length) {
|
|
case 0:
|
|
return unchecked_multiply__0.call(this);
|
|
case 1:
|
|
return unchecked_multiply__1.call(this, x);
|
|
case 2:
|
|
return unchecked_multiply__2.call(this, x, y);
|
|
default:
|
|
return unchecked_multiply__3.cljs$core$IFn$_invoke$arity$variadic(x, y, cljs.core.array_seq(arguments, 2))
|
|
}
|
|
throw new Error("Invalid arity: " + arguments.length);
|
|
};
|
|
unchecked_multiply.cljs$lang$maxFixedArity = 2;
|
|
unchecked_multiply.cljs$lang$applyTo = unchecked_multiply__3.cljs$lang$applyTo;
|
|
unchecked_multiply.cljs$core$IFn$_invoke$arity$0 = unchecked_multiply__0;
|
|
unchecked_multiply.cljs$core$IFn$_invoke$arity$1 = unchecked_multiply__1;
|
|
unchecked_multiply.cljs$core$IFn$_invoke$arity$2 = unchecked_multiply__2;
|
|
unchecked_multiply.cljs$core$IFn$_invoke$arity$variadic = unchecked_multiply__3.cljs$core$IFn$_invoke$arity$variadic;
|
|
return unchecked_multiply
|
|
}();
|
|
cljs.core.unchecked_multiply_int = function() {
|
|
var unchecked_multiply_int = null;
|
|
var unchecked_multiply_int__0 = function() {
|
|
return 1
|
|
};
|
|
var unchecked_multiply_int__1 = function(x) {
|
|
return x
|
|
};
|
|
var unchecked_multiply_int__2 = function(x, y) {
|
|
return x * y
|
|
};
|
|
var unchecked_multiply_int__3 = function() {
|
|
var G__13678__delegate = function(x, y, more) {
|
|
return cljs.core.reduce.call(null, unchecked_multiply_int, x * y, more)
|
|
};
|
|
var G__13678 = function(x, y, var_args) {
|
|
var more = null;
|
|
if(arguments.length > 2) {
|
|
more = cljs.core.array_seq(Array.prototype.slice.call(arguments, 2), 0)
|
|
}
|
|
return G__13678__delegate.call(this, x, y, more)
|
|
};
|
|
G__13678.cljs$lang$maxFixedArity = 2;
|
|
G__13678.cljs$lang$applyTo = function(arglist__13679) {
|
|
var x = cljs.core.first(arglist__13679);
|
|
arglist__13679 = cljs.core.next(arglist__13679);
|
|
var y = cljs.core.first(arglist__13679);
|
|
var more = cljs.core.rest(arglist__13679);
|
|
return G__13678__delegate(x, y, more)
|
|
};
|
|
G__13678.cljs$core$IFn$_invoke$arity$variadic = G__13678__delegate;
|
|
return G__13678
|
|
}();
|
|
unchecked_multiply_int = function(x, y, var_args) {
|
|
var more = var_args;
|
|
switch(arguments.length) {
|
|
case 0:
|
|
return unchecked_multiply_int__0.call(this);
|
|
case 1:
|
|
return unchecked_multiply_int__1.call(this, x);
|
|
case 2:
|
|
return unchecked_multiply_int__2.call(this, x, y);
|
|
default:
|
|
return unchecked_multiply_int__3.cljs$core$IFn$_invoke$arity$variadic(x, y, cljs.core.array_seq(arguments, 2))
|
|
}
|
|
throw new Error("Invalid arity: " + arguments.length);
|
|
};
|
|
unchecked_multiply_int.cljs$lang$maxFixedArity = 2;
|
|
unchecked_multiply_int.cljs$lang$applyTo = unchecked_multiply_int__3.cljs$lang$applyTo;
|
|
unchecked_multiply_int.cljs$core$IFn$_invoke$arity$0 = unchecked_multiply_int__0;
|
|
unchecked_multiply_int.cljs$core$IFn$_invoke$arity$1 = unchecked_multiply_int__1;
|
|
unchecked_multiply_int.cljs$core$IFn$_invoke$arity$2 = unchecked_multiply_int__2;
|
|
unchecked_multiply_int.cljs$core$IFn$_invoke$arity$variadic = unchecked_multiply_int__3.cljs$core$IFn$_invoke$arity$variadic;
|
|
return unchecked_multiply_int
|
|
}();
|
|
cljs.core.unchecked_negate = function unchecked_negate(x) {
|
|
return-x
|
|
};
|
|
cljs.core.unchecked_negate_int = function unchecked_negate_int(x) {
|
|
return-x
|
|
};
|
|
cljs.core.unchecked_remainder_int = function unchecked_remainder_int(x, n) {
|
|
return cljs.core.mod.call(null, x, n)
|
|
};
|
|
cljs.core.unchecked_substract = function() {
|
|
var unchecked_substract = null;
|
|
var unchecked_substract__1 = function(x) {
|
|
return-x
|
|
};
|
|
var unchecked_substract__2 = function(x, y) {
|
|
return x - y
|
|
};
|
|
var unchecked_substract__3 = function() {
|
|
var G__13680__delegate = function(x, y, more) {
|
|
return cljs.core.reduce.call(null, unchecked_substract, x - y, more)
|
|
};
|
|
var G__13680 = function(x, y, var_args) {
|
|
var more = null;
|
|
if(arguments.length > 2) {
|
|
more = cljs.core.array_seq(Array.prototype.slice.call(arguments, 2), 0)
|
|
}
|
|
return G__13680__delegate.call(this, x, y, more)
|
|
};
|
|
G__13680.cljs$lang$maxFixedArity = 2;
|
|
G__13680.cljs$lang$applyTo = function(arglist__13681) {
|
|
var x = cljs.core.first(arglist__13681);
|
|
arglist__13681 = cljs.core.next(arglist__13681);
|
|
var y = cljs.core.first(arglist__13681);
|
|
var more = cljs.core.rest(arglist__13681);
|
|
return G__13680__delegate(x, y, more)
|
|
};
|
|
G__13680.cljs$core$IFn$_invoke$arity$variadic = G__13680__delegate;
|
|
return G__13680
|
|
}();
|
|
unchecked_substract = function(x, y, var_args) {
|
|
var more = var_args;
|
|
switch(arguments.length) {
|
|
case 1:
|
|
return unchecked_substract__1.call(this, x);
|
|
case 2:
|
|
return unchecked_substract__2.call(this, x, y);
|
|
default:
|
|
return unchecked_substract__3.cljs$core$IFn$_invoke$arity$variadic(x, y, cljs.core.array_seq(arguments, 2))
|
|
}
|
|
throw new Error("Invalid arity: " + arguments.length);
|
|
};
|
|
unchecked_substract.cljs$lang$maxFixedArity = 2;
|
|
unchecked_substract.cljs$lang$applyTo = unchecked_substract__3.cljs$lang$applyTo;
|
|
unchecked_substract.cljs$core$IFn$_invoke$arity$1 = unchecked_substract__1;
|
|
unchecked_substract.cljs$core$IFn$_invoke$arity$2 = unchecked_substract__2;
|
|
unchecked_substract.cljs$core$IFn$_invoke$arity$variadic = unchecked_substract__3.cljs$core$IFn$_invoke$arity$variadic;
|
|
return unchecked_substract
|
|
}();
|
|
cljs.core.unchecked_substract_int = function() {
|
|
var unchecked_substract_int = null;
|
|
var unchecked_substract_int__1 = function(x) {
|
|
return-x
|
|
};
|
|
var unchecked_substract_int__2 = function(x, y) {
|
|
return x - y
|
|
};
|
|
var unchecked_substract_int__3 = function() {
|
|
var G__13682__delegate = function(x, y, more) {
|
|
return cljs.core.reduce.call(null, unchecked_substract_int, x - y, more)
|
|
};
|
|
var G__13682 = function(x, y, var_args) {
|
|
var more = null;
|
|
if(arguments.length > 2) {
|
|
more = cljs.core.array_seq(Array.prototype.slice.call(arguments, 2), 0)
|
|
}
|
|
return G__13682__delegate.call(this, x, y, more)
|
|
};
|
|
G__13682.cljs$lang$maxFixedArity = 2;
|
|
G__13682.cljs$lang$applyTo = function(arglist__13683) {
|
|
var x = cljs.core.first(arglist__13683);
|
|
arglist__13683 = cljs.core.next(arglist__13683);
|
|
var y = cljs.core.first(arglist__13683);
|
|
var more = cljs.core.rest(arglist__13683);
|
|
return G__13682__delegate(x, y, more)
|
|
};
|
|
G__13682.cljs$core$IFn$_invoke$arity$variadic = G__13682__delegate;
|
|
return G__13682
|
|
}();
|
|
unchecked_substract_int = function(x, y, var_args) {
|
|
var more = var_args;
|
|
switch(arguments.length) {
|
|
case 1:
|
|
return unchecked_substract_int__1.call(this, x);
|
|
case 2:
|
|
return unchecked_substract_int__2.call(this, x, y);
|
|
default:
|
|
return unchecked_substract_int__3.cljs$core$IFn$_invoke$arity$variadic(x, y, cljs.core.array_seq(arguments, 2))
|
|
}
|
|
throw new Error("Invalid arity: " + arguments.length);
|
|
};
|
|
unchecked_substract_int.cljs$lang$maxFixedArity = 2;
|
|
unchecked_substract_int.cljs$lang$applyTo = unchecked_substract_int__3.cljs$lang$applyTo;
|
|
unchecked_substract_int.cljs$core$IFn$_invoke$arity$1 = unchecked_substract_int__1;
|
|
unchecked_substract_int.cljs$core$IFn$_invoke$arity$2 = unchecked_substract_int__2;
|
|
unchecked_substract_int.cljs$core$IFn$_invoke$arity$variadic = unchecked_substract_int__3.cljs$core$IFn$_invoke$arity$variadic;
|
|
return unchecked_substract_int
|
|
}();
|
|
cljs.core.fix = function fix(q) {
|
|
if(q >= 0) {
|
|
return Math.floor.call(null, q)
|
|
}else {
|
|
return Math.ceil.call(null, q)
|
|
}
|
|
};
|
|
cljs.core.int$ = function int$(x) {
|
|
return x | 0
|
|
};
|
|
cljs.core.unchecked_int = function unchecked_int(x) {
|
|
return cljs.core.fix.call(null, x)
|
|
};
|
|
cljs.core.long$ = function long$(x) {
|
|
return cljs.core.fix.call(null, x)
|
|
};
|
|
cljs.core.unchecked_long = function unchecked_long(x) {
|
|
return cljs.core.fix.call(null, x)
|
|
};
|
|
cljs.core.booleans = function booleans(x) {
|
|
return x
|
|
};
|
|
cljs.core.bytes = function bytes(x) {
|
|
return x
|
|
};
|
|
cljs.core.chars = function chars(x) {
|
|
return x
|
|
};
|
|
cljs.core.shorts = function shorts(x) {
|
|
return x
|
|
};
|
|
cljs.core.ints = function ints(x) {
|
|
return x
|
|
};
|
|
cljs.core.floats = function floats(x) {
|
|
return x
|
|
};
|
|
cljs.core.doubles = function doubles(x) {
|
|
return x
|
|
};
|
|
cljs.core.longs = function longs(x) {
|
|
return x
|
|
};
|
|
cljs.core.js_mod = function js_mod(n, d) {
|
|
return n % d
|
|
};
|
|
cljs.core.mod = function mod(n, d) {
|
|
return(n % d + d) % d
|
|
};
|
|
cljs.core.quot = function quot(n, d) {
|
|
var rem = n % d;
|
|
return cljs.core.fix.call(null, (n - rem) / d)
|
|
};
|
|
cljs.core.rem = function rem(n, d) {
|
|
var q = cljs.core.quot.call(null, n, d);
|
|
return n - d * q
|
|
};
|
|
cljs.core.rand = function() {
|
|
var rand = null;
|
|
var rand__0 = function() {
|
|
return Math.random.call(null)
|
|
};
|
|
var rand__1 = function(n) {
|
|
return n * rand.call(null)
|
|
};
|
|
rand = function(n) {
|
|
switch(arguments.length) {
|
|
case 0:
|
|
return rand__0.call(this);
|
|
case 1:
|
|
return rand__1.call(this, n)
|
|
}
|
|
throw new Error("Invalid arity: " + arguments.length);
|
|
};
|
|
rand.cljs$core$IFn$_invoke$arity$0 = rand__0;
|
|
rand.cljs$core$IFn$_invoke$arity$1 = rand__1;
|
|
return rand
|
|
}();
|
|
cljs.core.rand_int = function rand_int(n) {
|
|
return cljs.core.fix.call(null, cljs.core.rand.call(null, n))
|
|
};
|
|
cljs.core.bit_xor = function bit_xor(x, y) {
|
|
return x ^ y
|
|
};
|
|
cljs.core.bit_and = function bit_and(x, y) {
|
|
return x & y
|
|
};
|
|
cljs.core.bit_or = function bit_or(x, y) {
|
|
return x | y
|
|
};
|
|
cljs.core.bit_and_not = function bit_and_not(x, y) {
|
|
return x & ~y
|
|
};
|
|
cljs.core.bit_clear = function bit_clear(x, n) {
|
|
return x & ~(1 << n)
|
|
};
|
|
cljs.core.bit_flip = function bit_flip(x, n) {
|
|
return x ^ 1 << n
|
|
};
|
|
cljs.core.bit_not = function bit_not(x) {
|
|
return~x
|
|
};
|
|
cljs.core.bit_set = function bit_set(x, n) {
|
|
return x | 1 << n
|
|
};
|
|
cljs.core.bit_test = function bit_test(x, n) {
|
|
return(x & 1 << n) != 0
|
|
};
|
|
cljs.core.bit_shift_left = function bit_shift_left(x, n) {
|
|
return x << n
|
|
};
|
|
cljs.core.bit_shift_right = function bit_shift_right(x, n) {
|
|
return x >> n
|
|
};
|
|
cljs.core.bit_shift_right_zero_fill = function bit_shift_right_zero_fill(x, n) {
|
|
return x >>> n
|
|
};
|
|
cljs.core.bit_count = function bit_count(v) {
|
|
var v__$1 = v - (v >> 1 & 1431655765);
|
|
var v__$2 = (v__$1 & 858993459) + (v__$1 >> 2 & 858993459);
|
|
return(v__$2 + (v__$2 >> 4) & 252645135) * 16843009 >> 24
|
|
};
|
|
cljs.core._EQ__EQ_ = function() {
|
|
var _EQ__EQ_ = null;
|
|
var _EQ__EQ___1 = function(x) {
|
|
return true
|
|
};
|
|
var _EQ__EQ___2 = function(x, y) {
|
|
return cljs.core._equiv.call(null, x, y)
|
|
};
|
|
var _EQ__EQ___3 = function() {
|
|
var G__13684__delegate = function(x, y, more) {
|
|
while(true) {
|
|
if(cljs.core.truth_(_EQ__EQ_.call(null, x, y))) {
|
|
if(cljs.core.next.call(null, more)) {
|
|
var G__13685 = y;
|
|
var G__13686 = cljs.core.first.call(null, more);
|
|
var G__13687 = cljs.core.next.call(null, more);
|
|
x = G__13685;
|
|
y = G__13686;
|
|
more = G__13687;
|
|
continue
|
|
}else {
|
|
return _EQ__EQ_.call(null, y, cljs.core.first.call(null, more))
|
|
}
|
|
}else {
|
|
return false
|
|
}
|
|
break
|
|
}
|
|
};
|
|
var G__13684 = function(x, y, var_args) {
|
|
var more = null;
|
|
if(arguments.length > 2) {
|
|
more = cljs.core.array_seq(Array.prototype.slice.call(arguments, 2), 0)
|
|
}
|
|
return G__13684__delegate.call(this, x, y, more)
|
|
};
|
|
G__13684.cljs$lang$maxFixedArity = 2;
|
|
G__13684.cljs$lang$applyTo = function(arglist__13688) {
|
|
var x = cljs.core.first(arglist__13688);
|
|
arglist__13688 = cljs.core.next(arglist__13688);
|
|
var y = cljs.core.first(arglist__13688);
|
|
var more = cljs.core.rest(arglist__13688);
|
|
return G__13684__delegate(x, y, more)
|
|
};
|
|
G__13684.cljs$core$IFn$_invoke$arity$variadic = G__13684__delegate;
|
|
return G__13684
|
|
}();
|
|
_EQ__EQ_ = function(x, y, var_args) {
|
|
var more = var_args;
|
|
switch(arguments.length) {
|
|
case 1:
|
|
return _EQ__EQ___1.call(this, x);
|
|
case 2:
|
|
return _EQ__EQ___2.call(this, x, y);
|
|
default:
|
|
return _EQ__EQ___3.cljs$core$IFn$_invoke$arity$variadic(x, y, cljs.core.array_seq(arguments, 2))
|
|
}
|
|
throw new Error("Invalid arity: " + arguments.length);
|
|
};
|
|
_EQ__EQ_.cljs$lang$maxFixedArity = 2;
|
|
_EQ__EQ_.cljs$lang$applyTo = _EQ__EQ___3.cljs$lang$applyTo;
|
|
_EQ__EQ_.cljs$core$IFn$_invoke$arity$1 = _EQ__EQ___1;
|
|
_EQ__EQ_.cljs$core$IFn$_invoke$arity$2 = _EQ__EQ___2;
|
|
_EQ__EQ_.cljs$core$IFn$_invoke$arity$variadic = _EQ__EQ___3.cljs$core$IFn$_invoke$arity$variadic;
|
|
return _EQ__EQ_
|
|
}();
|
|
cljs.core.pos_QMARK_ = function pos_QMARK_(n) {
|
|
return n > 0
|
|
};
|
|
cljs.core.zero_QMARK_ = function zero_QMARK_(n) {
|
|
return n === 0
|
|
};
|
|
cljs.core.neg_QMARK_ = function neg_QMARK_(x) {
|
|
return x < 0
|
|
};
|
|
cljs.core.nthnext = function nthnext(coll, n) {
|
|
var n__$1 = n;
|
|
var xs = cljs.core.seq.call(null, coll);
|
|
while(true) {
|
|
if(cljs.core.truth_(function() {
|
|
var and__3941__auto__ = xs;
|
|
if(and__3941__auto__) {
|
|
return n__$1 > 0
|
|
}else {
|
|
return and__3941__auto__
|
|
}
|
|
}())) {
|
|
var G__13689 = n__$1 - 1;
|
|
var G__13690 = cljs.core.next.call(null, xs);
|
|
n__$1 = G__13689;
|
|
xs = G__13690;
|
|
continue
|
|
}else {
|
|
return xs
|
|
}
|
|
break
|
|
}
|
|
};
|
|
cljs.core.str_STAR_ = function() {
|
|
var str_STAR_ = null;
|
|
var str_STAR___0 = function() {
|
|
return""
|
|
};
|
|
var str_STAR___1 = function(x) {
|
|
if(x == null) {
|
|
return""
|
|
}else {
|
|
if("\ufdd0:else") {
|
|
return x.toString()
|
|
}else {
|
|
return null
|
|
}
|
|
}
|
|
};
|
|
var str_STAR___2 = function() {
|
|
var G__13691__delegate = function(x, ys) {
|
|
return function(sb, more) {
|
|
while(true) {
|
|
if(cljs.core.truth_(more)) {
|
|
var G__13692 = sb.append(str_STAR_.call(null, cljs.core.first.call(null, more)));
|
|
var G__13693 = cljs.core.next.call(null, more);
|
|
sb = G__13692;
|
|
more = G__13693;
|
|
continue
|
|
}else {
|
|
return str_STAR_.call(null, sb)
|
|
}
|
|
break
|
|
}
|
|
}.call(null, new goog.string.StringBuffer(str_STAR_.call(null, x)), ys)
|
|
};
|
|
var G__13691 = function(x, var_args) {
|
|
var ys = null;
|
|
if(arguments.length > 1) {
|
|
ys = cljs.core.array_seq(Array.prototype.slice.call(arguments, 1), 0)
|
|
}
|
|
return G__13691__delegate.call(this, x, ys)
|
|
};
|
|
G__13691.cljs$lang$maxFixedArity = 1;
|
|
G__13691.cljs$lang$applyTo = function(arglist__13694) {
|
|
var x = cljs.core.first(arglist__13694);
|
|
var ys = cljs.core.rest(arglist__13694);
|
|
return G__13691__delegate(x, ys)
|
|
};
|
|
G__13691.cljs$core$IFn$_invoke$arity$variadic = G__13691__delegate;
|
|
return G__13691
|
|
}();
|
|
str_STAR_ = function(x, var_args) {
|
|
var ys = var_args;
|
|
switch(arguments.length) {
|
|
case 0:
|
|
return str_STAR___0.call(this);
|
|
case 1:
|
|
return str_STAR___1.call(this, x);
|
|
default:
|
|
return str_STAR___2.cljs$core$IFn$_invoke$arity$variadic(x, cljs.core.array_seq(arguments, 1))
|
|
}
|
|
throw new Error("Invalid arity: " + arguments.length);
|
|
};
|
|
str_STAR_.cljs$lang$maxFixedArity = 1;
|
|
str_STAR_.cljs$lang$applyTo = str_STAR___2.cljs$lang$applyTo;
|
|
str_STAR_.cljs$core$IFn$_invoke$arity$0 = str_STAR___0;
|
|
str_STAR_.cljs$core$IFn$_invoke$arity$1 = str_STAR___1;
|
|
str_STAR_.cljs$core$IFn$_invoke$arity$variadic = str_STAR___2.cljs$core$IFn$_invoke$arity$variadic;
|
|
return str_STAR_
|
|
}();
|
|
cljs.core.str = function() {
|
|
var str = null;
|
|
var str__0 = function() {
|
|
return""
|
|
};
|
|
var str__1 = function(x) {
|
|
if(cljs.core.keyword_QMARK_.call(null, x)) {
|
|
return cljs.core.str_STAR_.call(null, ":", x.substring(2, x.length))
|
|
}else {
|
|
if(x == null) {
|
|
return""
|
|
}else {
|
|
if("\ufdd0:else") {
|
|
return x.toString()
|
|
}else {
|
|
return null
|
|
}
|
|
}
|
|
}
|
|
};
|
|
var str__2 = function() {
|
|
var G__13695__delegate = function(x, ys) {
|
|
return function(sb, more) {
|
|
while(true) {
|
|
if(cljs.core.truth_(more)) {
|
|
var G__13696 = sb.append(str.call(null, cljs.core.first.call(null, more)));
|
|
var G__13697 = cljs.core.next.call(null, more);
|
|
sb = G__13696;
|
|
more = G__13697;
|
|
continue
|
|
}else {
|
|
return cljs.core.str_STAR_.call(null, sb)
|
|
}
|
|
break
|
|
}
|
|
}.call(null, new goog.string.StringBuffer(str.call(null, x)), ys)
|
|
};
|
|
var G__13695 = function(x, var_args) {
|
|
var ys = null;
|
|
if(arguments.length > 1) {
|
|
ys = cljs.core.array_seq(Array.prototype.slice.call(arguments, 1), 0)
|
|
}
|
|
return G__13695__delegate.call(this, x, ys)
|
|
};
|
|
G__13695.cljs$lang$maxFixedArity = 1;
|
|
G__13695.cljs$lang$applyTo = function(arglist__13698) {
|
|
var x = cljs.core.first(arglist__13698);
|
|
var ys = cljs.core.rest(arglist__13698);
|
|
return G__13695__delegate(x, ys)
|
|
};
|
|
G__13695.cljs$core$IFn$_invoke$arity$variadic = G__13695__delegate;
|
|
return G__13695
|
|
}();
|
|
str = function(x, var_args) {
|
|
var ys = var_args;
|
|
switch(arguments.length) {
|
|
case 0:
|
|
return str__0.call(this);
|
|
case 1:
|
|
return str__1.call(this, x);
|
|
default:
|
|
return str__2.cljs$core$IFn$_invoke$arity$variadic(x, cljs.core.array_seq(arguments, 1))
|
|
}
|
|
throw new Error("Invalid arity: " + arguments.length);
|
|
};
|
|
str.cljs$lang$maxFixedArity = 1;
|
|
str.cljs$lang$applyTo = str__2.cljs$lang$applyTo;
|
|
str.cljs$core$IFn$_invoke$arity$0 = str__0;
|
|
str.cljs$core$IFn$_invoke$arity$1 = str__1;
|
|
str.cljs$core$IFn$_invoke$arity$variadic = str__2.cljs$core$IFn$_invoke$arity$variadic;
|
|
return str
|
|
}();
|
|
cljs.core.subs = function() {
|
|
var subs = null;
|
|
var subs__2 = function(s, start) {
|
|
return s.substring(start)
|
|
};
|
|
var subs__3 = function(s, start, end) {
|
|
return s.substring(start, end)
|
|
};
|
|
subs = function(s, start, end) {
|
|
switch(arguments.length) {
|
|
case 2:
|
|
return subs__2.call(this, s, start);
|
|
case 3:
|
|
return subs__3.call(this, s, start, end)
|
|
}
|
|
throw new Error("Invalid arity: " + arguments.length);
|
|
};
|
|
subs.cljs$core$IFn$_invoke$arity$2 = subs__2;
|
|
subs.cljs$core$IFn$_invoke$arity$3 = subs__3;
|
|
return subs
|
|
}();
|
|
cljs.core.format = function() {
|
|
var format__delegate = function(fmt, args) {
|
|
var args__$1 = cljs.core.map.call(null, function(x) {
|
|
if(function() {
|
|
var or__3943__auto__ = cljs.core.keyword_QMARK_.call(null, x);
|
|
if(or__3943__auto__) {
|
|
return or__3943__auto__
|
|
}else {
|
|
return x instanceof cljs.core.Symbol
|
|
}
|
|
}()) {
|
|
return[cljs.core.str(x)].join("")
|
|
}else {
|
|
return x
|
|
}
|
|
}, args);
|
|
return cljs.core.apply.call(null, goog.string.format, fmt, args__$1)
|
|
};
|
|
var format = function(fmt, var_args) {
|
|
var args = null;
|
|
if(arguments.length > 1) {
|
|
args = cljs.core.array_seq(Array.prototype.slice.call(arguments, 1), 0)
|
|
}
|
|
return format__delegate.call(this, fmt, args)
|
|
};
|
|
format.cljs$lang$maxFixedArity = 1;
|
|
format.cljs$lang$applyTo = function(arglist__13699) {
|
|
var fmt = cljs.core.first(arglist__13699);
|
|
var args = cljs.core.rest(arglist__13699);
|
|
return format__delegate(fmt, args)
|
|
};
|
|
format.cljs$core$IFn$_invoke$arity$variadic = format__delegate;
|
|
return format
|
|
}();
|
|
cljs.core.keyword = function() {
|
|
var keyword = null;
|
|
var keyword__1 = function(name) {
|
|
if(cljs.core.keyword_QMARK_.call(null, name)) {
|
|
return name
|
|
}else {
|
|
if(name instanceof cljs.core.Symbol) {
|
|
return cljs.core.str_STAR_.call(null, "\ufdd0", ":", cljs.core.name.call(null, name))
|
|
}else {
|
|
if("\ufdd0:else") {
|
|
return cljs.core.str_STAR_.call(null, "\ufdd0", ":", name)
|
|
}else {
|
|
return null
|
|
}
|
|
}
|
|
}
|
|
};
|
|
var keyword__2 = function(ns, name) {
|
|
return keyword.call(null, cljs.core.str_STAR_.call(null, ns, "/", name))
|
|
};
|
|
keyword = function(ns, name) {
|
|
switch(arguments.length) {
|
|
case 1:
|
|
return keyword__1.call(this, ns);
|
|
case 2:
|
|
return keyword__2.call(this, ns, name)
|
|
}
|
|
throw new Error("Invalid arity: " + arguments.length);
|
|
};
|
|
keyword.cljs$core$IFn$_invoke$arity$1 = keyword__1;
|
|
keyword.cljs$core$IFn$_invoke$arity$2 = keyword__2;
|
|
return keyword
|
|
}();
|
|
cljs.core.equiv_sequential = function equiv_sequential(x, y) {
|
|
return cljs.core.boolean$.call(null, cljs.core.sequential_QMARK_.call(null, y) ? function() {
|
|
var xs = cljs.core.seq.call(null, x);
|
|
var ys = cljs.core.seq.call(null, y);
|
|
while(true) {
|
|
if(xs == null) {
|
|
return ys == null
|
|
}else {
|
|
if(ys == null) {
|
|
return false
|
|
}else {
|
|
if(cljs.core._EQ_.call(null, cljs.core.first.call(null, xs), cljs.core.first.call(null, ys))) {
|
|
var G__13700 = cljs.core.next.call(null, xs);
|
|
var G__13701 = cljs.core.next.call(null, ys);
|
|
xs = G__13700;
|
|
ys = G__13701;
|
|
continue
|
|
}else {
|
|
if("\ufdd0:else") {
|
|
return false
|
|
}else {
|
|
return null
|
|
}
|
|
}
|
|
}
|
|
}
|
|
break
|
|
}
|
|
}() : null)
|
|
};
|
|
cljs.core.hash_combine = function hash_combine(seed, hash) {
|
|
return seed ^ hash + 2654435769 + (seed << 6) + (seed >> 2)
|
|
};
|
|
cljs.core.hash_coll = function hash_coll(coll) {
|
|
return cljs.core.reduce.call(null, function(p1__13702_SHARP_, p2__13703_SHARP_) {
|
|
return cljs.core.hash_combine.call(null, p1__13702_SHARP_, cljs.core.hash.call(null, p2__13703_SHARP_, false))
|
|
}, cljs.core.hash.call(null, cljs.core.first.call(null, coll), false), cljs.core.next.call(null, coll))
|
|
};
|
|
cljs.core.hash_imap = function hash_imap(m) {
|
|
var h = 0;
|
|
var s = cljs.core.seq.call(null, m);
|
|
while(true) {
|
|
if(s) {
|
|
var e = cljs.core.first.call(null, s);
|
|
var G__13704 = (h + (cljs.core.hash.call(null, cljs.core.key.call(null, e)) ^ cljs.core.hash.call(null, cljs.core.val.call(null, e)))) % 4503599627370496;
|
|
var G__13705 = cljs.core.next.call(null, s);
|
|
h = G__13704;
|
|
s = G__13705;
|
|
continue
|
|
}else {
|
|
return h
|
|
}
|
|
break
|
|
}
|
|
};
|
|
cljs.core.hash_iset = function hash_iset(s) {
|
|
var h = 0;
|
|
var s__$1 = cljs.core.seq.call(null, s);
|
|
while(true) {
|
|
if(s__$1) {
|
|
var e = cljs.core.first.call(null, s__$1);
|
|
var G__13706 = (h + cljs.core.hash.call(null, e)) % 4503599627370496;
|
|
var G__13707 = cljs.core.next.call(null, s__$1);
|
|
h = G__13706;
|
|
s__$1 = G__13707;
|
|
continue
|
|
}else {
|
|
return h
|
|
}
|
|
break
|
|
}
|
|
};
|
|
cljs.core.extend_object_BANG_ = function extend_object_BANG_(obj, fn_map) {
|
|
var seq__13714_13720 = cljs.core.seq.call(null, fn_map);
|
|
var chunk__13715_13721 = null;
|
|
var count__13716_13722 = 0;
|
|
var i__13717_13723 = 0;
|
|
while(true) {
|
|
if(i__13717_13723 < count__13716_13722) {
|
|
var vec__13718_13724 = cljs.core._nth.call(null, chunk__13715_13721, i__13717_13723);
|
|
var key_name_13725 = cljs.core.nth.call(null, vec__13718_13724, 0, null);
|
|
var f_13726 = cljs.core.nth.call(null, vec__13718_13724, 1, null);
|
|
var str_name_13727 = cljs.core.name.call(null, key_name_13725);
|
|
obj[str_name_13727] = f_13726;
|
|
var G__13728 = seq__13714_13720;
|
|
var G__13729 = chunk__13715_13721;
|
|
var G__13730 = count__13716_13722;
|
|
var G__13731 = i__13717_13723 + 1;
|
|
seq__13714_13720 = G__13728;
|
|
chunk__13715_13721 = G__13729;
|
|
count__13716_13722 = G__13730;
|
|
i__13717_13723 = G__13731;
|
|
continue
|
|
}else {
|
|
var temp__4092__auto___13732 = cljs.core.seq.call(null, seq__13714_13720);
|
|
if(temp__4092__auto___13732) {
|
|
var seq__13714_13733__$1 = temp__4092__auto___13732;
|
|
if(cljs.core.chunked_seq_QMARK_.call(null, seq__13714_13733__$1)) {
|
|
var c__3037__auto___13734 = cljs.core.chunk_first.call(null, seq__13714_13733__$1);
|
|
var G__13735 = cljs.core.chunk_rest.call(null, seq__13714_13733__$1);
|
|
var G__13736 = c__3037__auto___13734;
|
|
var G__13737 = cljs.core.count.call(null, c__3037__auto___13734);
|
|
var G__13738 = 0;
|
|
seq__13714_13720 = G__13735;
|
|
chunk__13715_13721 = G__13736;
|
|
count__13716_13722 = G__13737;
|
|
i__13717_13723 = G__13738;
|
|
continue
|
|
}else {
|
|
var vec__13719_13739 = cljs.core.first.call(null, seq__13714_13733__$1);
|
|
var key_name_13740 = cljs.core.nth.call(null, vec__13719_13739, 0, null);
|
|
var f_13741 = cljs.core.nth.call(null, vec__13719_13739, 1, null);
|
|
var str_name_13742 = cljs.core.name.call(null, key_name_13740);
|
|
obj[str_name_13742] = f_13741;
|
|
var G__13743 = cljs.core.next.call(null, seq__13714_13733__$1);
|
|
var G__13744 = null;
|
|
var G__13745 = 0;
|
|
var G__13746 = 0;
|
|
seq__13714_13720 = G__13743;
|
|
chunk__13715_13721 = G__13744;
|
|
count__13716_13722 = G__13745;
|
|
i__13717_13723 = G__13746;
|
|
continue
|
|
}
|
|
}else {
|
|
}
|
|
}
|
|
break
|
|
}
|
|
return obj
|
|
};
|
|
goog.provide("cljs.core.List");
|
|
cljs.core.List = function(meta, first, rest, count, __hash) {
|
|
this.meta = meta;
|
|
this.first = first;
|
|
this.rest = rest;
|
|
this.count = count;
|
|
this.__hash = __hash;
|
|
this.cljs$lang$protocol_mask$partition1$ = 0;
|
|
this.cljs$lang$protocol_mask$partition0$ = 65937646
|
|
};
|
|
cljs.core.List.cljs$lang$type = true;
|
|
cljs.core.List.cljs$lang$ctorStr = "cljs.core/List";
|
|
cljs.core.List.cljs$lang$ctorPrWriter = function(this__2847__auto__, writer__2848__auto__, opt__2849__auto__) {
|
|
return cljs.core._write.call(null, writer__2848__auto__, "cljs.core/List")
|
|
};
|
|
cljs.core.List.prototype.cljs$core$IHash$_hash$arity$1 = function(coll) {
|
|
var self__ = this;
|
|
var h__2732__auto__ = self__.__hash;
|
|
if(!(h__2732__auto__ == null)) {
|
|
return h__2732__auto__
|
|
}else {
|
|
var h__2732__auto____$1 = cljs.core.hash_coll.call(null, coll);
|
|
self__.__hash = h__2732__auto____$1;
|
|
return h__2732__auto____$1
|
|
}
|
|
};
|
|
cljs.core.List.prototype.cljs$core$INext$_next$arity$1 = function(coll) {
|
|
var self__ = this;
|
|
if(self__.count === 1) {
|
|
return null
|
|
}else {
|
|
return self__.rest
|
|
}
|
|
};
|
|
cljs.core.List.prototype.cljs$core$ICollection$_conj$arity$2 = function(coll, o) {
|
|
var self__ = this;
|
|
return new cljs.core.List(self__.meta, o, coll, self__.count + 1, null)
|
|
};
|
|
cljs.core.List.prototype.toString = function() {
|
|
var self__ = this;
|
|
var coll = this;
|
|
return cljs.core.pr_str_STAR_.call(null, coll)
|
|
};
|
|
cljs.core.List.prototype.cljs$core$IReduce$_reduce$arity$2 = function(col, f) {
|
|
var self__ = this;
|
|
return cljs.core.seq_reduce.call(null, f, col)
|
|
};
|
|
cljs.core.List.prototype.cljs$core$IReduce$_reduce$arity$3 = function(col, f, start) {
|
|
var self__ = this;
|
|
return cljs.core.seq_reduce.call(null, f, start, col)
|
|
};
|
|
cljs.core.List.prototype.cljs$core$ISeqable$_seq$arity$1 = function(coll) {
|
|
var self__ = this;
|
|
return coll
|
|
};
|
|
cljs.core.List.prototype.cljs$core$ICounted$_count$arity$1 = function(coll) {
|
|
var self__ = this;
|
|
return self__.count
|
|
};
|
|
cljs.core.List.prototype.cljs$core$IStack$_peek$arity$1 = function(coll) {
|
|
var self__ = this;
|
|
return self__.first
|
|
};
|
|
cljs.core.List.prototype.cljs$core$IStack$_pop$arity$1 = function(coll) {
|
|
var self__ = this;
|
|
return coll.cljs$core$ISeq$_rest$arity$1(coll)
|
|
};
|
|
cljs.core.List.prototype.cljs$core$ISeq$_first$arity$1 = function(coll) {
|
|
var self__ = this;
|
|
return self__.first
|
|
};
|
|
cljs.core.List.prototype.cljs$core$ISeq$_rest$arity$1 = function(coll) {
|
|
var self__ = this;
|
|
if(self__.count === 1) {
|
|
return cljs.core.List.EMPTY
|
|
}else {
|
|
return self__.rest
|
|
}
|
|
};
|
|
cljs.core.List.prototype.cljs$core$IEquiv$_equiv$arity$2 = function(coll, other) {
|
|
var self__ = this;
|
|
return cljs.core.equiv_sequential.call(null, coll, other)
|
|
};
|
|
cljs.core.List.prototype.cljs$core$IWithMeta$_with_meta$arity$2 = function(coll, meta__$1) {
|
|
var self__ = this;
|
|
return new cljs.core.List(meta__$1, self__.first, self__.rest, self__.count, self__.__hash)
|
|
};
|
|
cljs.core.List.prototype.cljs$core$IMeta$_meta$arity$1 = function(coll) {
|
|
var self__ = this;
|
|
return self__.meta
|
|
};
|
|
cljs.core.List.prototype.cljs$core$IEmptyableCollection$_empty$arity$1 = function(coll) {
|
|
var self__ = this;
|
|
return cljs.core.List.EMPTY
|
|
};
|
|
cljs.core.__GT_List = function __GT_List(meta, first, rest, count, __hash) {
|
|
return new cljs.core.List(meta, first, rest, count, __hash)
|
|
};
|
|
goog.provide("cljs.core.EmptyList");
|
|
cljs.core.EmptyList = function(meta) {
|
|
this.meta = meta;
|
|
this.cljs$lang$protocol_mask$partition1$ = 0;
|
|
this.cljs$lang$protocol_mask$partition0$ = 65413326
|
|
};
|
|
cljs.core.EmptyList.cljs$lang$type = true;
|
|
cljs.core.EmptyList.cljs$lang$ctorStr = "cljs.core/EmptyList";
|
|
cljs.core.EmptyList.cljs$lang$ctorPrWriter = function(this__2847__auto__, writer__2848__auto__, opt__2849__auto__) {
|
|
return cljs.core._write.call(null, writer__2848__auto__, "cljs.core/EmptyList")
|
|
};
|
|
cljs.core.EmptyList.prototype.cljs$core$IHash$_hash$arity$1 = function(coll) {
|
|
var self__ = this;
|
|
return 0
|
|
};
|
|
cljs.core.EmptyList.prototype.cljs$core$INext$_next$arity$1 = function(coll) {
|
|
var self__ = this;
|
|
return null
|
|
};
|
|
cljs.core.EmptyList.prototype.cljs$core$ICollection$_conj$arity$2 = function(coll, o) {
|
|
var self__ = this;
|
|
return new cljs.core.List(self__.meta, o, null, 1, null)
|
|
};
|
|
cljs.core.EmptyList.prototype.toString = function() {
|
|
var self__ = this;
|
|
var coll = this;
|
|
return cljs.core.pr_str_STAR_.call(null, coll)
|
|
};
|
|
cljs.core.EmptyList.prototype.cljs$core$ISeqable$_seq$arity$1 = function(coll) {
|
|
var self__ = this;
|
|
return null
|
|
};
|
|
cljs.core.EmptyList.prototype.cljs$core$ICounted$_count$arity$1 = function(coll) {
|
|
var self__ = this;
|
|
return 0
|
|
};
|
|
cljs.core.EmptyList.prototype.cljs$core$IStack$_peek$arity$1 = function(coll) {
|
|
var self__ = this;
|
|
return null
|
|
};
|
|
cljs.core.EmptyList.prototype.cljs$core$IStack$_pop$arity$1 = function(coll) {
|
|
var self__ = this;
|
|
throw new Error("Can't pop empty list");
|
|
};
|
|
cljs.core.EmptyList.prototype.cljs$core$ISeq$_first$arity$1 = function(coll) {
|
|
var self__ = this;
|
|
return null
|
|
};
|
|
cljs.core.EmptyList.prototype.cljs$core$ISeq$_rest$arity$1 = function(coll) {
|
|
var self__ = this;
|
|
return cljs.core.List.EMPTY
|
|
};
|
|
cljs.core.EmptyList.prototype.cljs$core$IEquiv$_equiv$arity$2 = function(coll, other) {
|
|
var self__ = this;
|
|
return cljs.core.equiv_sequential.call(null, coll, other)
|
|
};
|
|
cljs.core.EmptyList.prototype.cljs$core$IWithMeta$_with_meta$arity$2 = function(coll, meta__$1) {
|
|
var self__ = this;
|
|
return new cljs.core.EmptyList(meta__$1)
|
|
};
|
|
cljs.core.EmptyList.prototype.cljs$core$IMeta$_meta$arity$1 = function(coll) {
|
|
var self__ = this;
|
|
return self__.meta
|
|
};
|
|
cljs.core.EmptyList.prototype.cljs$core$IEmptyableCollection$_empty$arity$1 = function(coll) {
|
|
var self__ = this;
|
|
return coll
|
|
};
|
|
cljs.core.__GT_EmptyList = function __GT_EmptyList(meta) {
|
|
return new cljs.core.EmptyList(meta)
|
|
};
|
|
cljs.core.List.EMPTY = new cljs.core.EmptyList(null);
|
|
cljs.core.reversible_QMARK_ = function reversible_QMARK_(coll) {
|
|
var G__13748 = coll;
|
|
if(G__13748) {
|
|
if(function() {
|
|
var or__3943__auto__ = G__13748.cljs$lang$protocol_mask$partition0$ & 134217728;
|
|
if(or__3943__auto__) {
|
|
return or__3943__auto__
|
|
}else {
|
|
return G__13748.cljs$core$IReversible$
|
|
}
|
|
}()) {
|
|
return true
|
|
}else {
|
|
if(!G__13748.cljs$lang$protocol_mask$partition0$) {
|
|
return cljs.core.type_satisfies_.call(null, cljs.core.IReversible, G__13748)
|
|
}else {
|
|
return false
|
|
}
|
|
}
|
|
}else {
|
|
return cljs.core.type_satisfies_.call(null, cljs.core.IReversible, G__13748)
|
|
}
|
|
};
|
|
cljs.core.rseq = function rseq(coll) {
|
|
return cljs.core._rseq.call(null, coll)
|
|
};
|
|
cljs.core.reverse = function reverse(coll) {
|
|
if(cljs.core.reversible_QMARK_.call(null, coll)) {
|
|
return cljs.core.rseq.call(null, coll)
|
|
}else {
|
|
return cljs.core.reduce.call(null, cljs.core.conj, cljs.core.List.EMPTY, coll)
|
|
}
|
|
};
|
|
cljs.core.list = function() {
|
|
var list__delegate = function(xs) {
|
|
var arr = xs instanceof cljs.core.IndexedSeq ? xs.arr : function() {
|
|
var arr = [];
|
|
var xs__$1 = xs;
|
|
while(true) {
|
|
if(!(xs__$1 == null)) {
|
|
arr.push(cljs.core._first.call(null, xs__$1));
|
|
var G__13749 = cljs.core._next.call(null, xs__$1);
|
|
xs__$1 = G__13749;
|
|
continue
|
|
}else {
|
|
return arr
|
|
}
|
|
break
|
|
}
|
|
}();
|
|
var i = arr.length;
|
|
var r = cljs.core.List.EMPTY;
|
|
while(true) {
|
|
if(i > 0) {
|
|
var G__13750 = i - 1;
|
|
var G__13751 = cljs.core._conj.call(null, r, arr[i - 1]);
|
|
i = G__13750;
|
|
r = G__13751;
|
|
continue
|
|
}else {
|
|
return r
|
|
}
|
|
break
|
|
}
|
|
};
|
|
var list = function(var_args) {
|
|
var xs = null;
|
|
if(arguments.length > 0) {
|
|
xs = cljs.core.array_seq(Array.prototype.slice.call(arguments, 0), 0)
|
|
}
|
|
return list__delegate.call(this, xs)
|
|
};
|
|
list.cljs$lang$maxFixedArity = 0;
|
|
list.cljs$lang$applyTo = function(arglist__13752) {
|
|
var xs = cljs.core.seq(arglist__13752);
|
|
return list__delegate(xs)
|
|
};
|
|
list.cljs$core$IFn$_invoke$arity$variadic = list__delegate;
|
|
return list
|
|
}();
|
|
goog.provide("cljs.core.Cons");
|
|
cljs.core.Cons = function(meta, first, rest, __hash) {
|
|
this.meta = meta;
|
|
this.first = first;
|
|
this.rest = rest;
|
|
this.__hash = __hash;
|
|
this.cljs$lang$protocol_mask$partition1$ = 0;
|
|
this.cljs$lang$protocol_mask$partition0$ = 65405164
|
|
};
|
|
cljs.core.Cons.cljs$lang$type = true;
|
|
cljs.core.Cons.cljs$lang$ctorStr = "cljs.core/Cons";
|
|
cljs.core.Cons.cljs$lang$ctorPrWriter = function(this__2847__auto__, writer__2848__auto__, opt__2849__auto__) {
|
|
return cljs.core._write.call(null, writer__2848__auto__, "cljs.core/Cons")
|
|
};
|
|
cljs.core.Cons.prototype.cljs$core$IHash$_hash$arity$1 = function(coll) {
|
|
var self__ = this;
|
|
var h__2732__auto__ = self__.__hash;
|
|
if(!(h__2732__auto__ == null)) {
|
|
return h__2732__auto__
|
|
}else {
|
|
var h__2732__auto____$1 = cljs.core.hash_coll.call(null, coll);
|
|
self__.__hash = h__2732__auto____$1;
|
|
return h__2732__auto____$1
|
|
}
|
|
};
|
|
cljs.core.Cons.prototype.cljs$core$INext$_next$arity$1 = function(coll) {
|
|
var self__ = this;
|
|
if(self__.rest == null) {
|
|
return null
|
|
}else {
|
|
return cljs.core._seq.call(null, self__.rest)
|
|
}
|
|
};
|
|
cljs.core.Cons.prototype.cljs$core$ICollection$_conj$arity$2 = function(coll, o) {
|
|
var self__ = this;
|
|
return new cljs.core.Cons(null, o, coll, self__.__hash)
|
|
};
|
|
cljs.core.Cons.prototype.toString = function() {
|
|
var self__ = this;
|
|
var coll = this;
|
|
return cljs.core.pr_str_STAR_.call(null, coll)
|
|
};
|
|
cljs.core.Cons.prototype.cljs$core$ISeqable$_seq$arity$1 = function(coll) {
|
|
var self__ = this;
|
|
return coll
|
|
};
|
|
cljs.core.Cons.prototype.cljs$core$ISeq$_first$arity$1 = function(coll) {
|
|
var self__ = this;
|
|
return self__.first
|
|
};
|
|
cljs.core.Cons.prototype.cljs$core$ISeq$_rest$arity$1 = function(coll) {
|
|
var self__ = this;
|
|
if(self__.rest == null) {
|
|
return cljs.core.List.EMPTY
|
|
}else {
|
|
return self__.rest
|
|
}
|
|
};
|
|
cljs.core.Cons.prototype.cljs$core$IEquiv$_equiv$arity$2 = function(coll, other) {
|
|
var self__ = this;
|
|
return cljs.core.equiv_sequential.call(null, coll, other)
|
|
};
|
|
cljs.core.Cons.prototype.cljs$core$IWithMeta$_with_meta$arity$2 = function(coll, meta__$1) {
|
|
var self__ = this;
|
|
return new cljs.core.Cons(meta__$1, self__.first, self__.rest, self__.__hash)
|
|
};
|
|
cljs.core.Cons.prototype.cljs$core$IMeta$_meta$arity$1 = function(coll) {
|
|
var self__ = this;
|
|
return self__.meta
|
|
};
|
|
cljs.core.Cons.prototype.cljs$core$IEmptyableCollection$_empty$arity$1 = function(coll) {
|
|
var self__ = this;
|
|
return cljs.core.with_meta.call(null, cljs.core.List.EMPTY, self__.meta)
|
|
};
|
|
cljs.core.__GT_Cons = function __GT_Cons(meta, first, rest, __hash) {
|
|
return new cljs.core.Cons(meta, first, rest, __hash)
|
|
};
|
|
cljs.core.cons = function cons(x, coll) {
|
|
if(function() {
|
|
var or__3943__auto__ = coll == null;
|
|
if(or__3943__auto__) {
|
|
return or__3943__auto__
|
|
}else {
|
|
var G__13754 = coll;
|
|
if(G__13754) {
|
|
if(function() {
|
|
var or__3943__auto____$1 = G__13754.cljs$lang$protocol_mask$partition0$ & 64;
|
|
if(or__3943__auto____$1) {
|
|
return or__3943__auto____$1
|
|
}else {
|
|
return G__13754.cljs$core$ISeq$
|
|
}
|
|
}()) {
|
|
return true
|
|
}else {
|
|
return false
|
|
}
|
|
}else {
|
|
return false
|
|
}
|
|
}
|
|
}()) {
|
|
return new cljs.core.Cons(null, x, coll, null)
|
|
}else {
|
|
return new cljs.core.Cons(null, x, cljs.core.seq.call(null, coll), null)
|
|
}
|
|
};
|
|
cljs.core.list_QMARK_ = function list_QMARK_(x) {
|
|
var G__13756 = x;
|
|
if(G__13756) {
|
|
if(function() {
|
|
var or__3943__auto__ = G__13756.cljs$lang$protocol_mask$partition0$ & 33554432;
|
|
if(or__3943__auto__) {
|
|
return or__3943__auto__
|
|
}else {
|
|
return G__13756.cljs$core$IList$
|
|
}
|
|
}()) {
|
|
return true
|
|
}else {
|
|
if(!G__13756.cljs$lang$protocol_mask$partition0$) {
|
|
return cljs.core.type_satisfies_.call(null, cljs.core.IList, G__13756)
|
|
}else {
|
|
return false
|
|
}
|
|
}
|
|
}else {
|
|
return cljs.core.type_satisfies_.call(null, cljs.core.IList, G__13756)
|
|
}
|
|
};
|
|
cljs.core.IHash["string"] = true;
|
|
cljs.core._hash["string"] = function(o) {
|
|
return goog.string.hashCode(o)
|
|
};
|
|
goog.provide("cljs.core.Keyword");
|
|
cljs.core.Keyword = function(k) {
|
|
this.k = k;
|
|
this.cljs$lang$protocol_mask$partition1$ = 0;
|
|
this.cljs$lang$protocol_mask$partition0$ = 1
|
|
};
|
|
cljs.core.Keyword.cljs$lang$type = true;
|
|
cljs.core.Keyword.cljs$lang$ctorStr = "cljs.core/Keyword";
|
|
cljs.core.Keyword.cljs$lang$ctorPrWriter = function(this__2847__auto__, writer__2848__auto__, opt__2849__auto__) {
|
|
return cljs.core._write.call(null, writer__2848__auto__, "cljs.core/Keyword")
|
|
};
|
|
cljs.core.Keyword.prototype.call = function() {
|
|
var G__13760 = null;
|
|
var G__13760__2 = function(self__, coll) {
|
|
var self__ = this;
|
|
var self____$1 = this;
|
|
var _ = self____$1;
|
|
if(coll == null) {
|
|
return null
|
|
}else {
|
|
if(function() {
|
|
var G__13758 = coll;
|
|
if(G__13758) {
|
|
if(function() {
|
|
var or__3943__auto__ = G__13758.cljs$lang$protocol_mask$partition0$ & 256;
|
|
if(or__3943__auto__) {
|
|
return or__3943__auto__
|
|
}else {
|
|
return G__13758.cljs$core$ILookup$
|
|
}
|
|
}()) {
|
|
return true
|
|
}else {
|
|
if(!G__13758.cljs$lang$protocol_mask$partition0$) {
|
|
return cljs.core.type_satisfies_.call(null, cljs.core.ILookup, G__13758)
|
|
}else {
|
|
return false
|
|
}
|
|
}
|
|
}else {
|
|
return cljs.core.type_satisfies_.call(null, cljs.core.ILookup, G__13758)
|
|
}
|
|
}()) {
|
|
return cljs.core._lookup.call(null, coll, self__.k, null)
|
|
}else {
|
|
return null
|
|
}
|
|
}
|
|
};
|
|
var G__13760__3 = function(self__, coll, not_found) {
|
|
var self__ = this;
|
|
var self____$1 = this;
|
|
var _ = self____$1;
|
|
if(coll == null) {
|
|
return not_found
|
|
}else {
|
|
if(function() {
|
|
var G__13759 = coll;
|
|
if(G__13759) {
|
|
if(function() {
|
|
var or__3943__auto__ = G__13759.cljs$lang$protocol_mask$partition0$ & 256;
|
|
if(or__3943__auto__) {
|
|
return or__3943__auto__
|
|
}else {
|
|
return G__13759.cljs$core$ILookup$
|
|
}
|
|
}()) {
|
|
return true
|
|
}else {
|
|
if(!G__13759.cljs$lang$protocol_mask$partition0$) {
|
|
return cljs.core.type_satisfies_.call(null, cljs.core.ILookup, G__13759)
|
|
}else {
|
|
return false
|
|
}
|
|
}
|
|
}else {
|
|
return cljs.core.type_satisfies_.call(null, cljs.core.ILookup, G__13759)
|
|
}
|
|
}()) {
|
|
return cljs.core._lookup.call(null, coll, self__.k, not_found)
|
|
}else {
|
|
return null
|
|
}
|
|
}
|
|
};
|
|
G__13760 = function(self__, coll, not_found) {
|
|
switch(arguments.length) {
|
|
case 2:
|
|
return G__13760__2.call(this, self__, coll);
|
|
case 3:
|
|
return G__13760__3.call(this, self__, coll, not_found)
|
|
}
|
|
throw new Error("Invalid arity: " + arguments.length);
|
|
};
|
|
return G__13760
|
|
}();
|
|
cljs.core.Keyword.prototype.apply = function(self__, args13757) {
|
|
var self__ = this;
|
|
return self__.call.apply(self__, [self__].concat(args13757.slice()))
|
|
};
|
|
cljs.core.__GT_Keyword = function __GT_Keyword(k) {
|
|
return new cljs.core.Keyword(k)
|
|
};
|
|
String.prototype.cljs$core$IFn$ = true;
|
|
String.prototype.call = function() {
|
|
var G__13762 = null;
|
|
var G__13762__2 = function(self__, coll) {
|
|
var self____$1 = this;
|
|
var this$ = self____$1;
|
|
return cljs.core.get.call(null, coll, this$.toString())
|
|
};
|
|
var G__13762__3 = function(self__, coll, not_found) {
|
|
var self____$1 = this;
|
|
var this$ = self____$1;
|
|
return cljs.core.get.call(null, coll, this$.toString(), not_found)
|
|
};
|
|
G__13762 = function(self__, coll, not_found) {
|
|
switch(arguments.length) {
|
|
case 2:
|
|
return G__13762__2.call(this, self__, coll);
|
|
case 3:
|
|
return G__13762__3.call(this, self__, coll, not_found)
|
|
}
|
|
throw new Error("Invalid arity: " + arguments.length);
|
|
};
|
|
return G__13762
|
|
}();
|
|
String.prototype.apply = function(self__, args13761) {
|
|
return self__.call.apply(self__, [self__].concat(args13761.slice()))
|
|
};
|
|
String.prototype.apply = function(s, args) {
|
|
if(args.length < 2) {
|
|
return cljs.core.get.call(null, args[0], s)
|
|
}else {
|
|
return cljs.core.get.call(null, args[0], s, args[1])
|
|
}
|
|
};
|
|
cljs.core.lazy_seq_value = function lazy_seq_value(lazy_seq) {
|
|
var x = lazy_seq.x;
|
|
if(lazy_seq.realized) {
|
|
return x
|
|
}else {
|
|
lazy_seq.x = x.call(null);
|
|
lazy_seq.realized = true;
|
|
return lazy_seq.x
|
|
}
|
|
};
|
|
goog.provide("cljs.core.LazySeq");
|
|
cljs.core.LazySeq = function(meta, realized, x, __hash) {
|
|
this.meta = meta;
|
|
this.realized = realized;
|
|
this.x = x;
|
|
this.__hash = __hash;
|
|
this.cljs$lang$protocol_mask$partition1$ = 0;
|
|
this.cljs$lang$protocol_mask$partition0$ = 31850700
|
|
};
|
|
cljs.core.LazySeq.cljs$lang$type = true;
|
|
cljs.core.LazySeq.cljs$lang$ctorStr = "cljs.core/LazySeq";
|
|
cljs.core.LazySeq.cljs$lang$ctorPrWriter = function(this__2847__auto__, writer__2848__auto__, opt__2849__auto__) {
|
|
return cljs.core._write.call(null, writer__2848__auto__, "cljs.core/LazySeq")
|
|
};
|
|
cljs.core.LazySeq.prototype.cljs$core$IHash$_hash$arity$1 = function(coll) {
|
|
var self__ = this;
|
|
var h__2732__auto__ = self__.__hash;
|
|
if(!(h__2732__auto__ == null)) {
|
|
return h__2732__auto__
|
|
}else {
|
|
var h__2732__auto____$1 = cljs.core.hash_coll.call(null, coll);
|
|
self__.__hash = h__2732__auto____$1;
|
|
return h__2732__auto____$1
|
|
}
|
|
};
|
|
cljs.core.LazySeq.prototype.cljs$core$INext$_next$arity$1 = function(coll) {
|
|
var self__ = this;
|
|
return cljs.core._seq.call(null, coll.cljs$core$ISeq$_rest$arity$1(coll))
|
|
};
|
|
cljs.core.LazySeq.prototype.cljs$core$ICollection$_conj$arity$2 = function(coll, o) {
|
|
var self__ = this;
|
|
return cljs.core.cons.call(null, o, coll)
|
|
};
|
|
cljs.core.LazySeq.prototype.toString = function() {
|
|
var self__ = this;
|
|
var coll = this;
|
|
return cljs.core.pr_str_STAR_.call(null, coll)
|
|
};
|
|
cljs.core.LazySeq.prototype.cljs$core$ISeqable$_seq$arity$1 = function(coll) {
|
|
var self__ = this;
|
|
return cljs.core.seq.call(null, cljs.core.lazy_seq_value.call(null, coll))
|
|
};
|
|
cljs.core.LazySeq.prototype.cljs$core$ISeq$_first$arity$1 = function(coll) {
|
|
var self__ = this;
|
|
return cljs.core.first.call(null, cljs.core.lazy_seq_value.call(null, coll))
|
|
};
|
|
cljs.core.LazySeq.prototype.cljs$core$ISeq$_rest$arity$1 = function(coll) {
|
|
var self__ = this;
|
|
return cljs.core.rest.call(null, cljs.core.lazy_seq_value.call(null, coll))
|
|
};
|
|
cljs.core.LazySeq.prototype.cljs$core$IEquiv$_equiv$arity$2 = function(coll, other) {
|
|
var self__ = this;
|
|
return cljs.core.equiv_sequential.call(null, coll, other)
|
|
};
|
|
cljs.core.LazySeq.prototype.cljs$core$IWithMeta$_with_meta$arity$2 = function(coll, meta__$1) {
|
|
var self__ = this;
|
|
return new cljs.core.LazySeq(meta__$1, self__.realized, self__.x, self__.__hash)
|
|
};
|
|
cljs.core.LazySeq.prototype.cljs$core$IMeta$_meta$arity$1 = function(coll) {
|
|
var self__ = this;
|
|
return self__.meta
|
|
};
|
|
cljs.core.LazySeq.prototype.cljs$core$IEmptyableCollection$_empty$arity$1 = function(coll) {
|
|
var self__ = this;
|
|
return cljs.core.with_meta.call(null, cljs.core.List.EMPTY, self__.meta)
|
|
};
|
|
cljs.core.__GT_LazySeq = function __GT_LazySeq(meta, realized, x, __hash) {
|
|
return new cljs.core.LazySeq(meta, realized, x, __hash)
|
|
};
|
|
goog.provide("cljs.core.ChunkBuffer");
|
|
cljs.core.ChunkBuffer = function(buf, end) {
|
|
this.buf = buf;
|
|
this.end = end;
|
|
this.cljs$lang$protocol_mask$partition1$ = 0;
|
|
this.cljs$lang$protocol_mask$partition0$ = 2
|
|
};
|
|
cljs.core.ChunkBuffer.cljs$lang$type = true;
|
|
cljs.core.ChunkBuffer.cljs$lang$ctorStr = "cljs.core/ChunkBuffer";
|
|
cljs.core.ChunkBuffer.cljs$lang$ctorPrWriter = function(this__2847__auto__, writer__2848__auto__, opt__2849__auto__) {
|
|
return cljs.core._write.call(null, writer__2848__auto__, "cljs.core/ChunkBuffer")
|
|
};
|
|
cljs.core.ChunkBuffer.prototype.cljs$core$ICounted$_count$arity$1 = function(_) {
|
|
var self__ = this;
|
|
return self__.end
|
|
};
|
|
cljs.core.ChunkBuffer.prototype.add = function(o) {
|
|
var self__ = this;
|
|
var _ = this;
|
|
self__.buf[self__.end] = o;
|
|
return self__.end = self__.end + 1
|
|
};
|
|
cljs.core.ChunkBuffer.prototype.chunk = function(o) {
|
|
var self__ = this;
|
|
var _ = this;
|
|
var ret = new cljs.core.ArrayChunk(self__.buf, 0, self__.end);
|
|
self__.buf = null;
|
|
return ret
|
|
};
|
|
cljs.core.__GT_ChunkBuffer = function __GT_ChunkBuffer(buf, end) {
|
|
return new cljs.core.ChunkBuffer(buf, end)
|
|
};
|
|
cljs.core.chunk_buffer = function chunk_buffer(capacity) {
|
|
return new cljs.core.ChunkBuffer(new Array(capacity), 0)
|
|
};
|
|
goog.provide("cljs.core.ArrayChunk");
|
|
cljs.core.ArrayChunk = function(arr, off, end) {
|
|
this.arr = arr;
|
|
this.off = off;
|
|
this.end = end;
|
|
this.cljs$lang$protocol_mask$partition1$ = 0;
|
|
this.cljs$lang$protocol_mask$partition0$ = 524306
|
|
};
|
|
cljs.core.ArrayChunk.cljs$lang$type = true;
|
|
cljs.core.ArrayChunk.cljs$lang$ctorStr = "cljs.core/ArrayChunk";
|
|
cljs.core.ArrayChunk.cljs$lang$ctorPrWriter = function(this__2847__auto__, writer__2848__auto__, opt__2849__auto__) {
|
|
return cljs.core._write.call(null, writer__2848__auto__, "cljs.core/ArrayChunk")
|
|
};
|
|
cljs.core.ArrayChunk.prototype.cljs$core$IReduce$_reduce$arity$2 = function(coll, f) {
|
|
var self__ = this;
|
|
return cljs.core.array_reduce.call(null, self__.arr, f, self__.arr[self__.off], self__.off + 1)
|
|
};
|
|
cljs.core.ArrayChunk.prototype.cljs$core$IReduce$_reduce$arity$3 = function(coll, f, start) {
|
|
var self__ = this;
|
|
return cljs.core.array_reduce.call(null, self__.arr, f, start, self__.off)
|
|
};
|
|
cljs.core.ArrayChunk.prototype.cljs$core$IChunk$ = true;
|
|
cljs.core.ArrayChunk.prototype.cljs$core$IChunk$_drop_first$arity$1 = function(coll) {
|
|
var self__ = this;
|
|
if(self__.off === self__.end) {
|
|
throw new Error("-drop-first of empty chunk");
|
|
}else {
|
|
return new cljs.core.ArrayChunk(self__.arr, self__.off + 1, self__.end)
|
|
}
|
|
};
|
|
cljs.core.ArrayChunk.prototype.cljs$core$IIndexed$_nth$arity$2 = function(coll, i) {
|
|
var self__ = this;
|
|
return self__.arr[self__.off + i]
|
|
};
|
|
cljs.core.ArrayChunk.prototype.cljs$core$IIndexed$_nth$arity$3 = function(coll, i, not_found) {
|
|
var self__ = this;
|
|
if(function() {
|
|
var and__3941__auto__ = i >= 0;
|
|
if(and__3941__auto__) {
|
|
return i < self__.end - self__.off
|
|
}else {
|
|
return and__3941__auto__
|
|
}
|
|
}()) {
|
|
return self__.arr[self__.off + i]
|
|
}else {
|
|
return not_found
|
|
}
|
|
};
|
|
cljs.core.ArrayChunk.prototype.cljs$core$ICounted$_count$arity$1 = function(_) {
|
|
var self__ = this;
|
|
return self__.end - self__.off
|
|
};
|
|
cljs.core.__GT_ArrayChunk = function __GT_ArrayChunk(arr, off, end) {
|
|
return new cljs.core.ArrayChunk(arr, off, end)
|
|
};
|
|
cljs.core.array_chunk = function() {
|
|
var array_chunk = null;
|
|
var array_chunk__1 = function(arr) {
|
|
return new cljs.core.ArrayChunk(arr, 0, arr.length)
|
|
};
|
|
var array_chunk__2 = function(arr, off) {
|
|
return new cljs.core.ArrayChunk(arr, off, arr.length)
|
|
};
|
|
var array_chunk__3 = function(arr, off, end) {
|
|
return new cljs.core.ArrayChunk(arr, off, end)
|
|
};
|
|
array_chunk = function(arr, off, end) {
|
|
switch(arguments.length) {
|
|
case 1:
|
|
return array_chunk__1.call(this, arr);
|
|
case 2:
|
|
return array_chunk__2.call(this, arr, off);
|
|
case 3:
|
|
return array_chunk__3.call(this, arr, off, end)
|
|
}
|
|
throw new Error("Invalid arity: " + arguments.length);
|
|
};
|
|
array_chunk.cljs$core$IFn$_invoke$arity$1 = array_chunk__1;
|
|
array_chunk.cljs$core$IFn$_invoke$arity$2 = array_chunk__2;
|
|
array_chunk.cljs$core$IFn$_invoke$arity$3 = array_chunk__3;
|
|
return array_chunk
|
|
}();
|
|
goog.provide("cljs.core.ChunkedCons");
|
|
cljs.core.ChunkedCons = function(chunk, more, meta, __hash) {
|
|
this.chunk = chunk;
|
|
this.more = more;
|
|
this.meta = meta;
|
|
this.__hash = __hash;
|
|
this.cljs$lang$protocol_mask$partition0$ = 31850604;
|
|
this.cljs$lang$protocol_mask$partition1$ = 1536
|
|
};
|
|
cljs.core.ChunkedCons.cljs$lang$type = true;
|
|
cljs.core.ChunkedCons.cljs$lang$ctorStr = "cljs.core/ChunkedCons";
|
|
cljs.core.ChunkedCons.cljs$lang$ctorPrWriter = function(this__2847__auto__, writer__2848__auto__, opt__2849__auto__) {
|
|
return cljs.core._write.call(null, writer__2848__auto__, "cljs.core/ChunkedCons")
|
|
};
|
|
cljs.core.ChunkedCons.prototype.cljs$core$IHash$_hash$arity$1 = function(coll) {
|
|
var self__ = this;
|
|
var h__2732__auto__ = self__.__hash;
|
|
if(!(h__2732__auto__ == null)) {
|
|
return h__2732__auto__
|
|
}else {
|
|
var h__2732__auto____$1 = cljs.core.hash_coll.call(null, coll);
|
|
self__.__hash = h__2732__auto____$1;
|
|
return h__2732__auto____$1
|
|
}
|
|
};
|
|
cljs.core.ChunkedCons.prototype.cljs$core$ICollection$_conj$arity$2 = function(this$, o) {
|
|
var self__ = this;
|
|
return cljs.core.cons.call(null, o, this$)
|
|
};
|
|
cljs.core.ChunkedCons.prototype.toString = function() {
|
|
var self__ = this;
|
|
var coll = this;
|
|
return cljs.core.pr_str_STAR_.call(null, coll)
|
|
};
|
|
cljs.core.ChunkedCons.prototype.cljs$core$ISeqable$_seq$arity$1 = function(coll) {
|
|
var self__ = this;
|
|
return coll
|
|
};
|
|
cljs.core.ChunkedCons.prototype.cljs$core$ISeq$_first$arity$1 = function(coll) {
|
|
var self__ = this;
|
|
return cljs.core._nth.call(null, self__.chunk, 0)
|
|
};
|
|
cljs.core.ChunkedCons.prototype.cljs$core$ISeq$_rest$arity$1 = function(coll) {
|
|
var self__ = this;
|
|
if(cljs.core._count.call(null, self__.chunk) > 1) {
|
|
return new cljs.core.ChunkedCons(cljs.core._drop_first.call(null, self__.chunk), self__.more, self__.meta, null)
|
|
}else {
|
|
if(self__.more == null) {
|
|
return cljs.core.List.EMPTY
|
|
}else {
|
|
return self__.more
|
|
}
|
|
}
|
|
};
|
|
cljs.core.ChunkedCons.prototype.cljs$core$IChunkedNext$_chunked_next$arity$1 = function(coll) {
|
|
var self__ = this;
|
|
if(self__.more == null) {
|
|
return null
|
|
}else {
|
|
return self__.more
|
|
}
|
|
};
|
|
cljs.core.ChunkedCons.prototype.cljs$core$IEquiv$_equiv$arity$2 = function(coll, other) {
|
|
var self__ = this;
|
|
return cljs.core.equiv_sequential.call(null, coll, other)
|
|
};
|
|
cljs.core.ChunkedCons.prototype.cljs$core$IWithMeta$_with_meta$arity$2 = function(coll, m) {
|
|
var self__ = this;
|
|
return new cljs.core.ChunkedCons(self__.chunk, self__.more, m, self__.__hash)
|
|
};
|
|
cljs.core.ChunkedCons.prototype.cljs$core$IMeta$_meta$arity$1 = function(coll) {
|
|
var self__ = this;
|
|
return self__.meta
|
|
};
|
|
cljs.core.ChunkedCons.prototype.cljs$core$IEmptyableCollection$_empty$arity$1 = function(coll) {
|
|
var self__ = this;
|
|
return cljs.core.with_meta.call(null, cljs.core.List.EMPTY, self__.meta)
|
|
};
|
|
cljs.core.ChunkedCons.prototype.cljs$core$IChunkedSeq$_chunked_first$arity$1 = function(coll) {
|
|
var self__ = this;
|
|
return self__.chunk
|
|
};
|
|
cljs.core.ChunkedCons.prototype.cljs$core$IChunkedSeq$_chunked_rest$arity$1 = function(coll) {
|
|
var self__ = this;
|
|
if(self__.more == null) {
|
|
return cljs.core.List.EMPTY
|
|
}else {
|
|
return self__.more
|
|
}
|
|
};
|
|
cljs.core.__GT_ChunkedCons = function __GT_ChunkedCons(chunk, more, meta, __hash) {
|
|
return new cljs.core.ChunkedCons(chunk, more, meta, __hash)
|
|
};
|
|
cljs.core.chunk_cons = function chunk_cons(chunk, rest) {
|
|
if(cljs.core._count.call(null, chunk) === 0) {
|
|
return rest
|
|
}else {
|
|
return new cljs.core.ChunkedCons(chunk, rest, null, null)
|
|
}
|
|
};
|
|
cljs.core.chunk_append = function chunk_append(b, x) {
|
|
return b.add(x)
|
|
};
|
|
cljs.core.chunk = function chunk(b) {
|
|
return b.chunk()
|
|
};
|
|
cljs.core.chunk_first = function chunk_first(s) {
|
|
return cljs.core._chunked_first.call(null, s)
|
|
};
|
|
cljs.core.chunk_rest = function chunk_rest(s) {
|
|
return cljs.core._chunked_rest.call(null, s)
|
|
};
|
|
cljs.core.chunk_next = function chunk_next(s) {
|
|
if(function() {
|
|
var G__13764 = s;
|
|
if(G__13764) {
|
|
if(function() {
|
|
var or__3943__auto__ = G__13764.cljs$lang$protocol_mask$partition1$ & 1024;
|
|
if(or__3943__auto__) {
|
|
return or__3943__auto__
|
|
}else {
|
|
return G__13764.cljs$core$IChunkedNext$
|
|
}
|
|
}()) {
|
|
return true
|
|
}else {
|
|
return false
|
|
}
|
|
}else {
|
|
return false
|
|
}
|
|
}()) {
|
|
return cljs.core._chunked_next.call(null, s)
|
|
}else {
|
|
return cljs.core.seq.call(null, cljs.core._chunked_rest.call(null, s))
|
|
}
|
|
};
|
|
cljs.core.to_array = function to_array(s) {
|
|
var ary = [];
|
|
var s__$1 = s;
|
|
while(true) {
|
|
if(cljs.core.seq.call(null, s__$1)) {
|
|
ary.push(cljs.core.first.call(null, s__$1));
|
|
var G__13765 = cljs.core.next.call(null, s__$1);
|
|
s__$1 = G__13765;
|
|
continue
|
|
}else {
|
|
return ary
|
|
}
|
|
break
|
|
}
|
|
};
|
|
cljs.core.to_array_2d = function to_array_2d(coll) {
|
|
var ret = new Array(cljs.core.count.call(null, coll));
|
|
var i_13766 = 0;
|
|
var xs_13767 = cljs.core.seq.call(null, coll);
|
|
while(true) {
|
|
if(xs_13767) {
|
|
ret[i_13766] = cljs.core.to_array.call(null, cljs.core.first.call(null, xs_13767));
|
|
var G__13768 = i_13766 + 1;
|
|
var G__13769 = cljs.core.next.call(null, xs_13767);
|
|
i_13766 = G__13768;
|
|
xs_13767 = G__13769;
|
|
continue
|
|
}else {
|
|
}
|
|
break
|
|
}
|
|
return ret
|
|
};
|
|
cljs.core.int_array = function() {
|
|
var int_array = null;
|
|
var int_array__1 = function(size_or_seq) {
|
|
if(typeof size_or_seq === "number") {
|
|
return int_array.call(null, size_or_seq, null)
|
|
}else {
|
|
return cljs.core.into_array.call(null, size_or_seq)
|
|
}
|
|
};
|
|
var int_array__2 = function(size, init_val_or_seq) {
|
|
var a = new Array(size);
|
|
if(cljs.core.seq_QMARK_.call(null, init_val_or_seq)) {
|
|
var s = cljs.core.seq.call(null, init_val_or_seq);
|
|
var i = 0;
|
|
var s__$1 = s;
|
|
while(true) {
|
|
if(cljs.core.truth_(function() {
|
|
var and__3941__auto__ = s__$1;
|
|
if(and__3941__auto__) {
|
|
return i < size
|
|
}else {
|
|
return and__3941__auto__
|
|
}
|
|
}())) {
|
|
a[i] = cljs.core.first.call(null, s__$1);
|
|
var G__13770 = i + 1;
|
|
var G__13771 = cljs.core.next.call(null, s__$1);
|
|
i = G__13770;
|
|
s__$1 = G__13771;
|
|
continue
|
|
}else {
|
|
return a
|
|
}
|
|
break
|
|
}
|
|
}else {
|
|
var n__3084__auto___13772 = size;
|
|
var i_13773 = 0;
|
|
while(true) {
|
|
if(i_13773 < n__3084__auto___13772) {
|
|
a[i_13773] = init_val_or_seq;
|
|
var G__13774 = i_13773 + 1;
|
|
i_13773 = G__13774;
|
|
continue
|
|
}else {
|
|
}
|
|
break
|
|
}
|
|
return a
|
|
}
|
|
};
|
|
int_array = function(size, init_val_or_seq) {
|
|
switch(arguments.length) {
|
|
case 1:
|
|
return int_array__1.call(this, size);
|
|
case 2:
|
|
return int_array__2.call(this, size, init_val_or_seq)
|
|
}
|
|
throw new Error("Invalid arity: " + arguments.length);
|
|
};
|
|
int_array.cljs$core$IFn$_invoke$arity$1 = int_array__1;
|
|
int_array.cljs$core$IFn$_invoke$arity$2 = int_array__2;
|
|
return int_array
|
|
}();
|
|
cljs.core.long_array = function() {
|
|
var long_array = null;
|
|
var long_array__1 = function(size_or_seq) {
|
|
if(typeof size_or_seq === "number") {
|
|
return long_array.call(null, size_or_seq, null)
|
|
}else {
|
|
return cljs.core.into_array.call(null, size_or_seq)
|
|
}
|
|
};
|
|
var long_array__2 = function(size, init_val_or_seq) {
|
|
var a = new Array(size);
|
|
if(cljs.core.seq_QMARK_.call(null, init_val_or_seq)) {
|
|
var s = cljs.core.seq.call(null, init_val_or_seq);
|
|
var i = 0;
|
|
var s__$1 = s;
|
|
while(true) {
|
|
if(cljs.core.truth_(function() {
|
|
var and__3941__auto__ = s__$1;
|
|
if(and__3941__auto__) {
|
|
return i < size
|
|
}else {
|
|
return and__3941__auto__
|
|
}
|
|
}())) {
|
|
a[i] = cljs.core.first.call(null, s__$1);
|
|
var G__13775 = i + 1;
|
|
var G__13776 = cljs.core.next.call(null, s__$1);
|
|
i = G__13775;
|
|
s__$1 = G__13776;
|
|
continue
|
|
}else {
|
|
return a
|
|
}
|
|
break
|
|
}
|
|
}else {
|
|
var n__3084__auto___13777 = size;
|
|
var i_13778 = 0;
|
|
while(true) {
|
|
if(i_13778 < n__3084__auto___13777) {
|
|
a[i_13778] = init_val_or_seq;
|
|
var G__13779 = i_13778 + 1;
|
|
i_13778 = G__13779;
|
|
continue
|
|
}else {
|
|
}
|
|
break
|
|
}
|
|
return a
|
|
}
|
|
};
|
|
long_array = function(size, init_val_or_seq) {
|
|
switch(arguments.length) {
|
|
case 1:
|
|
return long_array__1.call(this, size);
|
|
case 2:
|
|
return long_array__2.call(this, size, init_val_or_seq)
|
|
}
|
|
throw new Error("Invalid arity: " + arguments.length);
|
|
};
|
|
long_array.cljs$core$IFn$_invoke$arity$1 = long_array__1;
|
|
long_array.cljs$core$IFn$_invoke$arity$2 = long_array__2;
|
|
return long_array
|
|
}();
|
|
cljs.core.double_array = function() {
|
|
var double_array = null;
|
|
var double_array__1 = function(size_or_seq) {
|
|
if(typeof size_or_seq === "number") {
|
|
return double_array.call(null, size_or_seq, null)
|
|
}else {
|
|
return cljs.core.into_array.call(null, size_or_seq)
|
|
}
|
|
};
|
|
var double_array__2 = function(size, init_val_or_seq) {
|
|
var a = new Array(size);
|
|
if(cljs.core.seq_QMARK_.call(null, init_val_or_seq)) {
|
|
var s = cljs.core.seq.call(null, init_val_or_seq);
|
|
var i = 0;
|
|
var s__$1 = s;
|
|
while(true) {
|
|
if(cljs.core.truth_(function() {
|
|
var and__3941__auto__ = s__$1;
|
|
if(and__3941__auto__) {
|
|
return i < size
|
|
}else {
|
|
return and__3941__auto__
|
|
}
|
|
}())) {
|
|
a[i] = cljs.core.first.call(null, s__$1);
|
|
var G__13780 = i + 1;
|
|
var G__13781 = cljs.core.next.call(null, s__$1);
|
|
i = G__13780;
|
|
s__$1 = G__13781;
|
|
continue
|
|
}else {
|
|
return a
|
|
}
|
|
break
|
|
}
|
|
}else {
|
|
var n__3084__auto___13782 = size;
|
|
var i_13783 = 0;
|
|
while(true) {
|
|
if(i_13783 < n__3084__auto___13782) {
|
|
a[i_13783] = init_val_or_seq;
|
|
var G__13784 = i_13783 + 1;
|
|
i_13783 = G__13784;
|
|
continue
|
|
}else {
|
|
}
|
|
break
|
|
}
|
|
return a
|
|
}
|
|
};
|
|
double_array = function(size, init_val_or_seq) {
|
|
switch(arguments.length) {
|
|
case 1:
|
|
return double_array__1.call(this, size);
|
|
case 2:
|
|
return double_array__2.call(this, size, init_val_or_seq)
|
|
}
|
|
throw new Error("Invalid arity: " + arguments.length);
|
|
};
|
|
double_array.cljs$core$IFn$_invoke$arity$1 = double_array__1;
|
|
double_array.cljs$core$IFn$_invoke$arity$2 = double_array__2;
|
|
return double_array
|
|
}();
|
|
cljs.core.object_array = function() {
|
|
var object_array = null;
|
|
var object_array__1 = function(size_or_seq) {
|
|
if(typeof size_or_seq === "number") {
|
|
return object_array.call(null, size_or_seq, null)
|
|
}else {
|
|
return cljs.core.into_array.call(null, size_or_seq)
|
|
}
|
|
};
|
|
var object_array__2 = function(size, init_val_or_seq) {
|
|
var a = new Array(size);
|
|
if(cljs.core.seq_QMARK_.call(null, init_val_or_seq)) {
|
|
var s = cljs.core.seq.call(null, init_val_or_seq);
|
|
var i = 0;
|
|
var s__$1 = s;
|
|
while(true) {
|
|
if(cljs.core.truth_(function() {
|
|
var and__3941__auto__ = s__$1;
|
|
if(and__3941__auto__) {
|
|
return i < size
|
|
}else {
|
|
return and__3941__auto__
|
|
}
|
|
}())) {
|
|
a[i] = cljs.core.first.call(null, s__$1);
|
|
var G__13785 = i + 1;
|
|
var G__13786 = cljs.core.next.call(null, s__$1);
|
|
i = G__13785;
|
|
s__$1 = G__13786;
|
|
continue
|
|
}else {
|
|
return a
|
|
}
|
|
break
|
|
}
|
|
}else {
|
|
var n__3084__auto___13787 = size;
|
|
var i_13788 = 0;
|
|
while(true) {
|
|
if(i_13788 < n__3084__auto___13787) {
|
|
a[i_13788] = init_val_or_seq;
|
|
var G__13789 = i_13788 + 1;
|
|
i_13788 = G__13789;
|
|
continue
|
|
}else {
|
|
}
|
|
break
|
|
}
|
|
return a
|
|
}
|
|
};
|
|
object_array = function(size, init_val_or_seq) {
|
|
switch(arguments.length) {
|
|
case 1:
|
|
return object_array__1.call(this, size);
|
|
case 2:
|
|
return object_array__2.call(this, size, init_val_or_seq)
|
|
}
|
|
throw new Error("Invalid arity: " + arguments.length);
|
|
};
|
|
object_array.cljs$core$IFn$_invoke$arity$1 = object_array__1;
|
|
object_array.cljs$core$IFn$_invoke$arity$2 = object_array__2;
|
|
return object_array
|
|
}();
|
|
cljs.core.bounded_count = function bounded_count(s, n) {
|
|
if(cljs.core.counted_QMARK_.call(null, s)) {
|
|
return cljs.core.count.call(null, s)
|
|
}else {
|
|
var s__$1 = s;
|
|
var i = n;
|
|
var sum = 0;
|
|
while(true) {
|
|
if(cljs.core.truth_(function() {
|
|
var and__3941__auto__ = i > 0;
|
|
if(and__3941__auto__) {
|
|
return cljs.core.seq.call(null, s__$1)
|
|
}else {
|
|
return and__3941__auto__
|
|
}
|
|
}())) {
|
|
var G__13790 = cljs.core.next.call(null, s__$1);
|
|
var G__13791 = i - 1;
|
|
var G__13792 = sum + 1;
|
|
s__$1 = G__13790;
|
|
i = G__13791;
|
|
sum = G__13792;
|
|
continue
|
|
}else {
|
|
return sum
|
|
}
|
|
break
|
|
}
|
|
}
|
|
};
|
|
cljs.core.spread = function spread(arglist) {
|
|
if(arglist == null) {
|
|
return null
|
|
}else {
|
|
if(cljs.core.next.call(null, arglist) == null) {
|
|
return cljs.core.seq.call(null, cljs.core.first.call(null, arglist))
|
|
}else {
|
|
if("\ufdd0:else") {
|
|
return cljs.core.cons.call(null, cljs.core.first.call(null, arglist), spread.call(null, cljs.core.next.call(null, arglist)))
|
|
}else {
|
|
return null
|
|
}
|
|
}
|
|
}
|
|
};
|
|
cljs.core.concat = function() {
|
|
var concat = null;
|
|
var concat__0 = function() {
|
|
return new cljs.core.LazySeq(null, false, function() {
|
|
return null
|
|
}, null)
|
|
};
|
|
var concat__1 = function(x) {
|
|
return new cljs.core.LazySeq(null, false, function() {
|
|
return x
|
|
}, null)
|
|
};
|
|
var concat__2 = function(x, y) {
|
|
return new cljs.core.LazySeq(null, false, function() {
|
|
var s = cljs.core.seq.call(null, x);
|
|
if(s) {
|
|
if(cljs.core.chunked_seq_QMARK_.call(null, s)) {
|
|
return cljs.core.chunk_cons.call(null, cljs.core.chunk_first.call(null, s), concat.call(null, cljs.core.chunk_rest.call(null, s), y))
|
|
}else {
|
|
return cljs.core.cons.call(null, cljs.core.first.call(null, s), concat.call(null, cljs.core.rest.call(null, s), y))
|
|
}
|
|
}else {
|
|
return y
|
|
}
|
|
}, null)
|
|
};
|
|
var concat__3 = function() {
|
|
var G__13793__delegate = function(x, y, zs) {
|
|
var cat = function cat(xys, zs__$1) {
|
|
return new cljs.core.LazySeq(null, false, function() {
|
|
var xys__$1 = cljs.core.seq.call(null, xys);
|
|
if(xys__$1) {
|
|
if(cljs.core.chunked_seq_QMARK_.call(null, xys__$1)) {
|
|
return cljs.core.chunk_cons.call(null, cljs.core.chunk_first.call(null, xys__$1), cat.call(null, cljs.core.chunk_rest.call(null, xys__$1), zs__$1))
|
|
}else {
|
|
return cljs.core.cons.call(null, cljs.core.first.call(null, xys__$1), cat.call(null, cljs.core.rest.call(null, xys__$1), zs__$1))
|
|
}
|
|
}else {
|
|
if(cljs.core.truth_(zs__$1)) {
|
|
return cat.call(null, cljs.core.first.call(null, zs__$1), cljs.core.next.call(null, zs__$1))
|
|
}else {
|
|
return null
|
|
}
|
|
}
|
|
}, null)
|
|
};
|
|
return cat.call(null, concat.call(null, x, y), zs)
|
|
};
|
|
var G__13793 = function(x, y, var_args) {
|
|
var zs = null;
|
|
if(arguments.length > 2) {
|
|
zs = cljs.core.array_seq(Array.prototype.slice.call(arguments, 2), 0)
|
|
}
|
|
return G__13793__delegate.call(this, x, y, zs)
|
|
};
|
|
G__13793.cljs$lang$maxFixedArity = 2;
|
|
G__13793.cljs$lang$applyTo = function(arglist__13794) {
|
|
var x = cljs.core.first(arglist__13794);
|
|
arglist__13794 = cljs.core.next(arglist__13794);
|
|
var y = cljs.core.first(arglist__13794);
|
|
var zs = cljs.core.rest(arglist__13794);
|
|
return G__13793__delegate(x, y, zs)
|
|
};
|
|
G__13793.cljs$core$IFn$_invoke$arity$variadic = G__13793__delegate;
|
|
return G__13793
|
|
}();
|
|
concat = function(x, y, var_args) {
|
|
var zs = var_args;
|
|
switch(arguments.length) {
|
|
case 0:
|
|
return concat__0.call(this);
|
|
case 1:
|
|
return concat__1.call(this, x);
|
|
case 2:
|
|
return concat__2.call(this, x, y);
|
|
default:
|
|
return concat__3.cljs$core$IFn$_invoke$arity$variadic(x, y, cljs.core.array_seq(arguments, 2))
|
|
}
|
|
throw new Error("Invalid arity: " + arguments.length);
|
|
};
|
|
concat.cljs$lang$maxFixedArity = 2;
|
|
concat.cljs$lang$applyTo = concat__3.cljs$lang$applyTo;
|
|
concat.cljs$core$IFn$_invoke$arity$0 = concat__0;
|
|
concat.cljs$core$IFn$_invoke$arity$1 = concat__1;
|
|
concat.cljs$core$IFn$_invoke$arity$2 = concat__2;
|
|
concat.cljs$core$IFn$_invoke$arity$variadic = concat__3.cljs$core$IFn$_invoke$arity$variadic;
|
|
return concat
|
|
}();
|
|
cljs.core.list_STAR_ = function() {
|
|
var list_STAR_ = null;
|
|
var list_STAR___1 = function(args) {
|
|
return cljs.core.seq.call(null, args)
|
|
};
|
|
var list_STAR___2 = function(a, args) {
|
|
return cljs.core.cons.call(null, a, args)
|
|
};
|
|
var list_STAR___3 = function(a, b, args) {
|
|
return cljs.core.cons.call(null, a, cljs.core.cons.call(null, b, args))
|
|
};
|
|
var list_STAR___4 = function(a, b, c, args) {
|
|
return cljs.core.cons.call(null, a, cljs.core.cons.call(null, b, cljs.core.cons.call(null, c, args)))
|
|
};
|
|
var list_STAR___5 = function() {
|
|
var G__13795__delegate = function(a, b, c, d, more) {
|
|
return cljs.core.cons.call(null, a, cljs.core.cons.call(null, b, cljs.core.cons.call(null, c, cljs.core.cons.call(null, d, cljs.core.spread.call(null, more)))))
|
|
};
|
|
var G__13795 = function(a, b, c, d, var_args) {
|
|
var more = null;
|
|
if(arguments.length > 4) {
|
|
more = cljs.core.array_seq(Array.prototype.slice.call(arguments, 4), 0)
|
|
}
|
|
return G__13795__delegate.call(this, a, b, c, d, more)
|
|
};
|
|
G__13795.cljs$lang$maxFixedArity = 4;
|
|
G__13795.cljs$lang$applyTo = function(arglist__13796) {
|
|
var a = cljs.core.first(arglist__13796);
|
|
arglist__13796 = cljs.core.next(arglist__13796);
|
|
var b = cljs.core.first(arglist__13796);
|
|
arglist__13796 = cljs.core.next(arglist__13796);
|
|
var c = cljs.core.first(arglist__13796);
|
|
arglist__13796 = cljs.core.next(arglist__13796);
|
|
var d = cljs.core.first(arglist__13796);
|
|
var more = cljs.core.rest(arglist__13796);
|
|
return G__13795__delegate(a, b, c, d, more)
|
|
};
|
|
G__13795.cljs$core$IFn$_invoke$arity$variadic = G__13795__delegate;
|
|
return G__13795
|
|
}();
|
|
list_STAR_ = function(a, b, c, d, var_args) {
|
|
var more = var_args;
|
|
switch(arguments.length) {
|
|
case 1:
|
|
return list_STAR___1.call(this, a);
|
|
case 2:
|
|
return list_STAR___2.call(this, a, b);
|
|
case 3:
|
|
return list_STAR___3.call(this, a, b, c);
|
|
case 4:
|
|
return list_STAR___4.call(this, a, b, c, d);
|
|
default:
|
|
return list_STAR___5.cljs$core$IFn$_invoke$arity$variadic(a, b, c, d, cljs.core.array_seq(arguments, 4))
|
|
}
|
|
throw new Error("Invalid arity: " + arguments.length);
|
|
};
|
|
list_STAR_.cljs$lang$maxFixedArity = 4;
|
|
list_STAR_.cljs$lang$applyTo = list_STAR___5.cljs$lang$applyTo;
|
|
list_STAR_.cljs$core$IFn$_invoke$arity$1 = list_STAR___1;
|
|
list_STAR_.cljs$core$IFn$_invoke$arity$2 = list_STAR___2;
|
|
list_STAR_.cljs$core$IFn$_invoke$arity$3 = list_STAR___3;
|
|
list_STAR_.cljs$core$IFn$_invoke$arity$4 = list_STAR___4;
|
|
list_STAR_.cljs$core$IFn$_invoke$arity$variadic = list_STAR___5.cljs$core$IFn$_invoke$arity$variadic;
|
|
return list_STAR_
|
|
}();
|
|
cljs.core.transient$ = function transient$(coll) {
|
|
return cljs.core._as_transient.call(null, coll)
|
|
};
|
|
cljs.core.persistent_BANG_ = function persistent_BANG_(tcoll) {
|
|
return cljs.core._persistent_BANG_.call(null, tcoll)
|
|
};
|
|
cljs.core.conj_BANG_ = function conj_BANG_(tcoll, val) {
|
|
return cljs.core._conj_BANG_.call(null, tcoll, val)
|
|
};
|
|
cljs.core.assoc_BANG_ = function assoc_BANG_(tcoll, key, val) {
|
|
return cljs.core._assoc_BANG_.call(null, tcoll, key, val)
|
|
};
|
|
cljs.core.dissoc_BANG_ = function dissoc_BANG_(tcoll, key) {
|
|
return cljs.core._dissoc_BANG_.call(null, tcoll, key)
|
|
};
|
|
cljs.core.pop_BANG_ = function pop_BANG_(tcoll) {
|
|
return cljs.core._pop_BANG_.call(null, tcoll)
|
|
};
|
|
cljs.core.disj_BANG_ = function disj_BANG_(tcoll, val) {
|
|
return cljs.core._disjoin_BANG_.call(null, tcoll, val)
|
|
};
|
|
cljs.core.apply_to = function apply_to(f, argc, args) {
|
|
var args__$1 = cljs.core.seq.call(null, args);
|
|
if(argc === 0) {
|
|
return f.call(null)
|
|
}else {
|
|
var a = cljs.core._first.call(null, args__$1);
|
|
var args__$2 = cljs.core._rest.call(null, args__$1);
|
|
if(argc === 1) {
|
|
if(f.cljs$core$IFn$_invoke$arity$1) {
|
|
return f.cljs$core$IFn$_invoke$arity$1(a)
|
|
}else {
|
|
return f.call(null, a)
|
|
}
|
|
}else {
|
|
var b = cljs.core._first.call(null, args__$2);
|
|
var args__$3 = cljs.core._rest.call(null, args__$2);
|
|
if(argc === 2) {
|
|
if(f.cljs$core$IFn$_invoke$arity$2) {
|
|
return f.cljs$core$IFn$_invoke$arity$2(a, b)
|
|
}else {
|
|
return f.call(null, a, b)
|
|
}
|
|
}else {
|
|
var c = cljs.core._first.call(null, args__$3);
|
|
var args__$4 = cljs.core._rest.call(null, args__$3);
|
|
if(argc === 3) {
|
|
if(f.cljs$core$IFn$_invoke$arity$3) {
|
|
return f.cljs$core$IFn$_invoke$arity$3(a, b, c)
|
|
}else {
|
|
return f.call(null, a, b, c)
|
|
}
|
|
}else {
|
|
var d = cljs.core._first.call(null, args__$4);
|
|
var args__$5 = cljs.core._rest.call(null, args__$4);
|
|
if(argc === 4) {
|
|
if(f.cljs$core$IFn$_invoke$arity$4) {
|
|
return f.cljs$core$IFn$_invoke$arity$4(a, b, c, d)
|
|
}else {
|
|
return f.call(null, a, b, c, d)
|
|
}
|
|
}else {
|
|
var e = cljs.core._first.call(null, args__$5);
|
|
var args__$6 = cljs.core._rest.call(null, args__$5);
|
|
if(argc === 5) {
|
|
if(f.cljs$core$IFn$_invoke$arity$5) {
|
|
return f.cljs$core$IFn$_invoke$arity$5(a, b, c, d, e)
|
|
}else {
|
|
return f.call(null, a, b, c, d, e)
|
|
}
|
|
}else {
|
|
var f__$1 = cljs.core._first.call(null, args__$6);
|
|
var args__$7 = cljs.core._rest.call(null, args__$6);
|
|
if(argc === 6) {
|
|
if(f__$1.cljs$core$IFn$_invoke$arity$6) {
|
|
return f__$1.cljs$core$IFn$_invoke$arity$6(a, b, c, d, e, f__$1)
|
|
}else {
|
|
return f__$1.call(null, a, b, c, d, e, f__$1)
|
|
}
|
|
}else {
|
|
var g = cljs.core._first.call(null, args__$7);
|
|
var args__$8 = cljs.core._rest.call(null, args__$7);
|
|
if(argc === 7) {
|
|
if(f__$1.cljs$core$IFn$_invoke$arity$7) {
|
|
return f__$1.cljs$core$IFn$_invoke$arity$7(a, b, c, d, e, f__$1, g)
|
|
}else {
|
|
return f__$1.call(null, a, b, c, d, e, f__$1, g)
|
|
}
|
|
}else {
|
|
var h = cljs.core._first.call(null, args__$8);
|
|
var args__$9 = cljs.core._rest.call(null, args__$8);
|
|
if(argc === 8) {
|
|
if(f__$1.cljs$core$IFn$_invoke$arity$8) {
|
|
return f__$1.cljs$core$IFn$_invoke$arity$8(a, b, c, d, e, f__$1, g, h)
|
|
}else {
|
|
return f__$1.call(null, a, b, c, d, e, f__$1, g, h)
|
|
}
|
|
}else {
|
|
var i = cljs.core._first.call(null, args__$9);
|
|
var args__$10 = cljs.core._rest.call(null, args__$9);
|
|
if(argc === 9) {
|
|
if(f__$1.cljs$core$IFn$_invoke$arity$9) {
|
|
return f__$1.cljs$core$IFn$_invoke$arity$9(a, b, c, d, e, f__$1, g, h, i)
|
|
}else {
|
|
return f__$1.call(null, a, b, c, d, e, f__$1, g, h, i)
|
|
}
|
|
}else {
|
|
var j = cljs.core._first.call(null, args__$10);
|
|
var args__$11 = cljs.core._rest.call(null, args__$10);
|
|
if(argc === 10) {
|
|
if(f__$1.cljs$core$IFn$_invoke$arity$10) {
|
|
return f__$1.cljs$core$IFn$_invoke$arity$10(a, b, c, d, e, f__$1, g, h, i, j)
|
|
}else {
|
|
return f__$1.call(null, a, b, c, d, e, f__$1, g, h, i, j)
|
|
}
|
|
}else {
|
|
var k = cljs.core._first.call(null, args__$11);
|
|
var args__$12 = cljs.core._rest.call(null, args__$11);
|
|
if(argc === 11) {
|
|
if(f__$1.cljs$core$IFn$_invoke$arity$11) {
|
|
return f__$1.cljs$core$IFn$_invoke$arity$11(a, b, c, d, e, f__$1, g, h, i, j, k)
|
|
}else {
|
|
return f__$1.call(null, a, b, c, d, e, f__$1, g, h, i, j, k)
|
|
}
|
|
}else {
|
|
var l = cljs.core._first.call(null, args__$12);
|
|
var args__$13 = cljs.core._rest.call(null, args__$12);
|
|
if(argc === 12) {
|
|
if(f__$1.cljs$core$IFn$_invoke$arity$12) {
|
|
return f__$1.cljs$core$IFn$_invoke$arity$12(a, b, c, d, e, f__$1, g, h, i, j, k, l)
|
|
}else {
|
|
return f__$1.call(null, a, b, c, d, e, f__$1, g, h, i, j, k, l)
|
|
}
|
|
}else {
|
|
var m = cljs.core._first.call(null, args__$13);
|
|
var args__$14 = cljs.core._rest.call(null, args__$13);
|
|
if(argc === 13) {
|
|
if(f__$1.cljs$core$IFn$_invoke$arity$13) {
|
|
return f__$1.cljs$core$IFn$_invoke$arity$13(a, b, c, d, e, f__$1, g, h, i, j, k, l, m)
|
|
}else {
|
|
return f__$1.call(null, a, b, c, d, e, f__$1, g, h, i, j, k, l, m)
|
|
}
|
|
}else {
|
|
var n = cljs.core._first.call(null, args__$14);
|
|
var args__$15 = cljs.core._rest.call(null, args__$14);
|
|
if(argc === 14) {
|
|
if(f__$1.cljs$core$IFn$_invoke$arity$14) {
|
|
return f__$1.cljs$core$IFn$_invoke$arity$14(a, b, c, d, e, f__$1, g, h, i, j, k, l, m, n)
|
|
}else {
|
|
return f__$1.call(null, a, b, c, d, e, f__$1, g, h, i, j, k, l, m, n)
|
|
}
|
|
}else {
|
|
var o = cljs.core._first.call(null, args__$15);
|
|
var args__$16 = cljs.core._rest.call(null, args__$15);
|
|
if(argc === 15) {
|
|
if(f__$1.cljs$core$IFn$_invoke$arity$15) {
|
|
return f__$1.cljs$core$IFn$_invoke$arity$15(a, b, c, d, e, f__$1, g, h, i, j, k, l, m, n, o)
|
|
}else {
|
|
return f__$1.call(null, a, b, c, d, e, f__$1, g, h, i, j, k, l, m, n, o)
|
|
}
|
|
}else {
|
|
var p = cljs.core._first.call(null, args__$16);
|
|
var args__$17 = cljs.core._rest.call(null, args__$16);
|
|
if(argc === 16) {
|
|
if(f__$1.cljs$core$IFn$_invoke$arity$16) {
|
|
return f__$1.cljs$core$IFn$_invoke$arity$16(a, b, c, d, e, f__$1, g, h, i, j, k, l, m, n, o, p)
|
|
}else {
|
|
return f__$1.call(null, a, b, c, d, e, f__$1, g, h, i, j, k, l, m, n, o, p)
|
|
}
|
|
}else {
|
|
var q = cljs.core._first.call(null, args__$17);
|
|
var args__$18 = cljs.core._rest.call(null, args__$17);
|
|
if(argc === 17) {
|
|
if(f__$1.cljs$core$IFn$_invoke$arity$17) {
|
|
return f__$1.cljs$core$IFn$_invoke$arity$17(a, b, c, d, e, f__$1, g, h, i, j, k, l, m, n, o, p, q)
|
|
}else {
|
|
return f__$1.call(null, a, b, c, d, e, f__$1, g, h, i, j, k, l, m, n, o, p, q)
|
|
}
|
|
}else {
|
|
var r = cljs.core._first.call(null, args__$18);
|
|
var args__$19 = cljs.core._rest.call(null, args__$18);
|
|
if(argc === 18) {
|
|
if(f__$1.cljs$core$IFn$_invoke$arity$18) {
|
|
return f__$1.cljs$core$IFn$_invoke$arity$18(a, b, c, d, e, f__$1, g, h, i, j, k, l, m, n, o, p, q, r)
|
|
}else {
|
|
return f__$1.call(null, a, b, c, d, e, f__$1, g, h, i, j, k, l, m, n, o, p, q, r)
|
|
}
|
|
}else {
|
|
var s = cljs.core._first.call(null, args__$19);
|
|
var args__$20 = cljs.core._rest.call(null, args__$19);
|
|
if(argc === 19) {
|
|
if(f__$1.cljs$core$IFn$_invoke$arity$19) {
|
|
return f__$1.cljs$core$IFn$_invoke$arity$19(a, b, c, d, e, f__$1, g, h, i, j, k, l, m, n, o, p, q, r, s)
|
|
}else {
|
|
return f__$1.call(null, a, b, c, d, e, f__$1, g, h, i, j, k, l, m, n, o, p, q, r, s)
|
|
}
|
|
}else {
|
|
var t = cljs.core._first.call(null, args__$20);
|
|
var args__$21 = cljs.core._rest.call(null, args__$20);
|
|
if(argc === 20) {
|
|
if(f__$1.cljs$core$IFn$_invoke$arity$20) {
|
|
return f__$1.cljs$core$IFn$_invoke$arity$20(a, b, c, d, e, f__$1, g, h, i, j, k, l, m, n, o, p, q, r, s, t)
|
|
}else {
|
|
return f__$1.call(null, a, b, c, d, e, f__$1, g, h, i, j, k, l, m, n, o, p, q, r, s, t)
|
|
}
|
|
}else {
|
|
throw new Error("Only up to 20 arguments supported on functions");
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
};
|
|
cljs.core.apply = function() {
|
|
var apply = null;
|
|
var apply__2 = function(f, args) {
|
|
var fixed_arity = f.cljs$lang$maxFixedArity;
|
|
if(f.cljs$lang$applyTo) {
|
|
var bc = cljs.core.bounded_count.call(null, args, fixed_arity + 1);
|
|
if(bc <= fixed_arity) {
|
|
return cljs.core.apply_to.call(null, f, bc, args)
|
|
}else {
|
|
return f.cljs$lang$applyTo(args)
|
|
}
|
|
}else {
|
|
return f.apply(f, cljs.core.to_array.call(null, args))
|
|
}
|
|
};
|
|
var apply__3 = function(f, x, args) {
|
|
var arglist = cljs.core.list_STAR_.call(null, x, args);
|
|
var fixed_arity = f.cljs$lang$maxFixedArity;
|
|
if(f.cljs$lang$applyTo) {
|
|
var bc = cljs.core.bounded_count.call(null, arglist, fixed_arity + 1);
|
|
if(bc <= fixed_arity) {
|
|
return cljs.core.apply_to.call(null, f, bc, arglist)
|
|
}else {
|
|
return f.cljs$lang$applyTo(arglist)
|
|
}
|
|
}else {
|
|
return f.apply(f, cljs.core.to_array.call(null, arglist))
|
|
}
|
|
};
|
|
var apply__4 = function(f, x, y, args) {
|
|
var arglist = cljs.core.list_STAR_.call(null, x, y, args);
|
|
var fixed_arity = f.cljs$lang$maxFixedArity;
|
|
if(f.cljs$lang$applyTo) {
|
|
var bc = cljs.core.bounded_count.call(null, arglist, fixed_arity + 1);
|
|
if(bc <= fixed_arity) {
|
|
return cljs.core.apply_to.call(null, f, bc, arglist)
|
|
}else {
|
|
return f.cljs$lang$applyTo(arglist)
|
|
}
|
|
}else {
|
|
return f.apply(f, cljs.core.to_array.call(null, arglist))
|
|
}
|
|
};
|
|
var apply__5 = function(f, x, y, z, args) {
|
|
var arglist = cljs.core.list_STAR_.call(null, x, y, z, args);
|
|
var fixed_arity = f.cljs$lang$maxFixedArity;
|
|
if(f.cljs$lang$applyTo) {
|
|
var bc = cljs.core.bounded_count.call(null, arglist, fixed_arity + 1);
|
|
if(bc <= fixed_arity) {
|
|
return cljs.core.apply_to.call(null, f, bc, arglist)
|
|
}else {
|
|
return f.cljs$lang$applyTo(arglist)
|
|
}
|
|
}else {
|
|
return f.apply(f, cljs.core.to_array.call(null, arglist))
|
|
}
|
|
};
|
|
var apply__6 = function() {
|
|
var G__13797__delegate = function(f, a, b, c, d, args) {
|
|
var arglist = cljs.core.cons.call(null, a, cljs.core.cons.call(null, b, cljs.core.cons.call(null, c, cljs.core.cons.call(null, d, cljs.core.spread.call(null, args)))));
|
|
var fixed_arity = f.cljs$lang$maxFixedArity;
|
|
if(f.cljs$lang$applyTo) {
|
|
var bc = cljs.core.bounded_count.call(null, arglist, fixed_arity + 1);
|
|
if(bc <= fixed_arity) {
|
|
return cljs.core.apply_to.call(null, f, bc, arglist)
|
|
}else {
|
|
return f.cljs$lang$applyTo(arglist)
|
|
}
|
|
}else {
|
|
return f.apply(f, cljs.core.to_array.call(null, arglist))
|
|
}
|
|
};
|
|
var G__13797 = function(f, a, b, c, d, var_args) {
|
|
var args = null;
|
|
if(arguments.length > 5) {
|
|
args = cljs.core.array_seq(Array.prototype.slice.call(arguments, 5), 0)
|
|
}
|
|
return G__13797__delegate.call(this, f, a, b, c, d, args)
|
|
};
|
|
G__13797.cljs$lang$maxFixedArity = 5;
|
|
G__13797.cljs$lang$applyTo = function(arglist__13798) {
|
|
var f = cljs.core.first(arglist__13798);
|
|
arglist__13798 = cljs.core.next(arglist__13798);
|
|
var a = cljs.core.first(arglist__13798);
|
|
arglist__13798 = cljs.core.next(arglist__13798);
|
|
var b = cljs.core.first(arglist__13798);
|
|
arglist__13798 = cljs.core.next(arglist__13798);
|
|
var c = cljs.core.first(arglist__13798);
|
|
arglist__13798 = cljs.core.next(arglist__13798);
|
|
var d = cljs.core.first(arglist__13798);
|
|
var args = cljs.core.rest(arglist__13798);
|
|
return G__13797__delegate(f, a, b, c, d, args)
|
|
};
|
|
G__13797.cljs$core$IFn$_invoke$arity$variadic = G__13797__delegate;
|
|
return G__13797
|
|
}();
|
|
apply = function(f, a, b, c, d, var_args) {
|
|
var args = var_args;
|
|
switch(arguments.length) {
|
|
case 2:
|
|
return apply__2.call(this, f, a);
|
|
case 3:
|
|
return apply__3.call(this, f, a, b);
|
|
case 4:
|
|
return apply__4.call(this, f, a, b, c);
|
|
case 5:
|
|
return apply__5.call(this, f, a, b, c, d);
|
|
default:
|
|
return apply__6.cljs$core$IFn$_invoke$arity$variadic(f, a, b, c, d, cljs.core.array_seq(arguments, 5))
|
|
}
|
|
throw new Error("Invalid arity: " + arguments.length);
|
|
};
|
|
apply.cljs$lang$maxFixedArity = 5;
|
|
apply.cljs$lang$applyTo = apply__6.cljs$lang$applyTo;
|
|
apply.cljs$core$IFn$_invoke$arity$2 = apply__2;
|
|
apply.cljs$core$IFn$_invoke$arity$3 = apply__3;
|
|
apply.cljs$core$IFn$_invoke$arity$4 = apply__4;
|
|
apply.cljs$core$IFn$_invoke$arity$5 = apply__5;
|
|
apply.cljs$core$IFn$_invoke$arity$variadic = apply__6.cljs$core$IFn$_invoke$arity$variadic;
|
|
return apply
|
|
}();
|
|
cljs.core.vary_meta = function() {
|
|
var vary_meta__delegate = function(obj, f, args) {
|
|
return cljs.core.with_meta.call(null, obj, cljs.core.apply.call(null, f, cljs.core.meta.call(null, obj), args))
|
|
};
|
|
var vary_meta = function(obj, f, var_args) {
|
|
var args = null;
|
|
if(arguments.length > 2) {
|
|
args = cljs.core.array_seq(Array.prototype.slice.call(arguments, 2), 0)
|
|
}
|
|
return vary_meta__delegate.call(this, obj, f, args)
|
|
};
|
|
vary_meta.cljs$lang$maxFixedArity = 2;
|
|
vary_meta.cljs$lang$applyTo = function(arglist__13799) {
|
|
var obj = cljs.core.first(arglist__13799);
|
|
arglist__13799 = cljs.core.next(arglist__13799);
|
|
var f = cljs.core.first(arglist__13799);
|
|
var args = cljs.core.rest(arglist__13799);
|
|
return vary_meta__delegate(obj, f, args)
|
|
};
|
|
vary_meta.cljs$core$IFn$_invoke$arity$variadic = vary_meta__delegate;
|
|
return vary_meta
|
|
}();
|
|
cljs.core.not_EQ_ = function() {
|
|
var not_EQ_ = null;
|
|
var not_EQ___1 = function(x) {
|
|
return false
|
|
};
|
|
var not_EQ___2 = function(x, y) {
|
|
return!cljs.core._EQ_.call(null, x, y)
|
|
};
|
|
var not_EQ___3 = function() {
|
|
var G__13800__delegate = function(x, y, more) {
|
|
return cljs.core.not.call(null, cljs.core.apply.call(null, cljs.core._EQ_, x, y, more))
|
|
};
|
|
var G__13800 = function(x, y, var_args) {
|
|
var more = null;
|
|
if(arguments.length > 2) {
|
|
more = cljs.core.array_seq(Array.prototype.slice.call(arguments, 2), 0)
|
|
}
|
|
return G__13800__delegate.call(this, x, y, more)
|
|
};
|
|
G__13800.cljs$lang$maxFixedArity = 2;
|
|
G__13800.cljs$lang$applyTo = function(arglist__13801) {
|
|
var x = cljs.core.first(arglist__13801);
|
|
arglist__13801 = cljs.core.next(arglist__13801);
|
|
var y = cljs.core.first(arglist__13801);
|
|
var more = cljs.core.rest(arglist__13801);
|
|
return G__13800__delegate(x, y, more)
|
|
};
|
|
G__13800.cljs$core$IFn$_invoke$arity$variadic = G__13800__delegate;
|
|
return G__13800
|
|
}();
|
|
not_EQ_ = function(x, y, var_args) {
|
|
var more = var_args;
|
|
switch(arguments.length) {
|
|
case 1:
|
|
return not_EQ___1.call(this, x);
|
|
case 2:
|
|
return not_EQ___2.call(this, x, y);
|
|
default:
|
|
return not_EQ___3.cljs$core$IFn$_invoke$arity$variadic(x, y, cljs.core.array_seq(arguments, 2))
|
|
}
|
|
throw new Error("Invalid arity: " + arguments.length);
|
|
};
|
|
not_EQ_.cljs$lang$maxFixedArity = 2;
|
|
not_EQ_.cljs$lang$applyTo = not_EQ___3.cljs$lang$applyTo;
|
|
not_EQ_.cljs$core$IFn$_invoke$arity$1 = not_EQ___1;
|
|
not_EQ_.cljs$core$IFn$_invoke$arity$2 = not_EQ___2;
|
|
not_EQ_.cljs$core$IFn$_invoke$arity$variadic = not_EQ___3.cljs$core$IFn$_invoke$arity$variadic;
|
|
return not_EQ_
|
|
}();
|
|
cljs.core.not_empty = function not_empty(coll) {
|
|
if(cljs.core.seq.call(null, coll)) {
|
|
return coll
|
|
}else {
|
|
return null
|
|
}
|
|
};
|
|
cljs.core.every_QMARK_ = function every_QMARK_(pred, coll) {
|
|
while(true) {
|
|
if(cljs.core.seq.call(null, coll) == null) {
|
|
return true
|
|
}else {
|
|
if(cljs.core.truth_(pred.call(null, cljs.core.first.call(null, coll)))) {
|
|
var G__13802 = pred;
|
|
var G__13803 = cljs.core.next.call(null, coll);
|
|
pred = G__13802;
|
|
coll = G__13803;
|
|
continue
|
|
}else {
|
|
if("\ufdd0:else") {
|
|
return false
|
|
}else {
|
|
return null
|
|
}
|
|
}
|
|
}
|
|
break
|
|
}
|
|
};
|
|
cljs.core.not_every_QMARK_ = function not_every_QMARK_(pred, coll) {
|
|
return!cljs.core.every_QMARK_.call(null, pred, coll)
|
|
};
|
|
cljs.core.some = function some(pred, coll) {
|
|
while(true) {
|
|
if(cljs.core.seq.call(null, coll)) {
|
|
var or__3943__auto__ = pred.call(null, cljs.core.first.call(null, coll));
|
|
if(cljs.core.truth_(or__3943__auto__)) {
|
|
return or__3943__auto__
|
|
}else {
|
|
var G__13804 = pred;
|
|
var G__13805 = cljs.core.next.call(null, coll);
|
|
pred = G__13804;
|
|
coll = G__13805;
|
|
continue
|
|
}
|
|
}else {
|
|
return null
|
|
}
|
|
break
|
|
}
|
|
};
|
|
cljs.core.not_any_QMARK_ = function not_any_QMARK_(pred, coll) {
|
|
return cljs.core.not.call(null, cljs.core.some.call(null, pred, coll))
|
|
};
|
|
cljs.core.even_QMARK_ = function even_QMARK_(n) {
|
|
if(cljs.core.integer_QMARK_.call(null, n)) {
|
|
return(n & 1) === 0
|
|
}else {
|
|
throw new Error([cljs.core.str("Argument must be an integer: "), cljs.core.str(n)].join(""));
|
|
}
|
|
};
|
|
cljs.core.odd_QMARK_ = function odd_QMARK_(n) {
|
|
return!cljs.core.even_QMARK_.call(null, n)
|
|
};
|
|
cljs.core.identity = function identity(x) {
|
|
return x
|
|
};
|
|
cljs.core.complement = function complement(f) {
|
|
return function() {
|
|
var G__13806 = null;
|
|
var G__13806__0 = function() {
|
|
return cljs.core.not.call(null, f.call(null))
|
|
};
|
|
var G__13806__1 = function(x) {
|
|
return cljs.core.not.call(null, f.call(null, x))
|
|
};
|
|
var G__13806__2 = function(x, y) {
|
|
return cljs.core.not.call(null, f.call(null, x, y))
|
|
};
|
|
var G__13806__3 = function() {
|
|
var G__13807__delegate = function(x, y, zs) {
|
|
return cljs.core.not.call(null, cljs.core.apply.call(null, f, x, y, zs))
|
|
};
|
|
var G__13807 = function(x, y, var_args) {
|
|
var zs = null;
|
|
if(arguments.length > 2) {
|
|
zs = cljs.core.array_seq(Array.prototype.slice.call(arguments, 2), 0)
|
|
}
|
|
return G__13807__delegate.call(this, x, y, zs)
|
|
};
|
|
G__13807.cljs$lang$maxFixedArity = 2;
|
|
G__13807.cljs$lang$applyTo = function(arglist__13808) {
|
|
var x = cljs.core.first(arglist__13808);
|
|
arglist__13808 = cljs.core.next(arglist__13808);
|
|
var y = cljs.core.first(arglist__13808);
|
|
var zs = cljs.core.rest(arglist__13808);
|
|
return G__13807__delegate(x, y, zs)
|
|
};
|
|
G__13807.cljs$core$IFn$_invoke$arity$variadic = G__13807__delegate;
|
|
return G__13807
|
|
}();
|
|
G__13806 = function(x, y, var_args) {
|
|
var zs = var_args;
|
|
switch(arguments.length) {
|
|
case 0:
|
|
return G__13806__0.call(this);
|
|
case 1:
|
|
return G__13806__1.call(this, x);
|
|
case 2:
|
|
return G__13806__2.call(this, x, y);
|
|
default:
|
|
return G__13806__3.cljs$core$IFn$_invoke$arity$variadic(x, y, cljs.core.array_seq(arguments, 2))
|
|
}
|
|
throw new Error("Invalid arity: " + arguments.length);
|
|
};
|
|
G__13806.cljs$lang$maxFixedArity = 2;
|
|
G__13806.cljs$lang$applyTo = G__13806__3.cljs$lang$applyTo;
|
|
return G__13806
|
|
}()
|
|
};
|
|
cljs.core.constantly = function constantly(x) {
|
|
return function() {
|
|
var G__13809__delegate = function(args) {
|
|
return x
|
|
};
|
|
var G__13809 = function(var_args) {
|
|
var args = null;
|
|
if(arguments.length > 0) {
|
|
args = cljs.core.array_seq(Array.prototype.slice.call(arguments, 0), 0)
|
|
}
|
|
return G__13809__delegate.call(this, args)
|
|
};
|
|
G__13809.cljs$lang$maxFixedArity = 0;
|
|
G__13809.cljs$lang$applyTo = function(arglist__13810) {
|
|
var args = cljs.core.seq(arglist__13810);
|
|
return G__13809__delegate(args)
|
|
};
|
|
G__13809.cljs$core$IFn$_invoke$arity$variadic = G__13809__delegate;
|
|
return G__13809
|
|
}()
|
|
};
|
|
cljs.core.comp = function() {
|
|
var comp = null;
|
|
var comp__0 = function() {
|
|
return cljs.core.identity
|
|
};
|
|
var comp__1 = function(f) {
|
|
return f
|
|
};
|
|
var comp__2 = function(f, g) {
|
|
return function() {
|
|
var G__13811 = null;
|
|
var G__13811__0 = function() {
|
|
return f.call(null, g.call(null))
|
|
};
|
|
var G__13811__1 = function(x) {
|
|
return f.call(null, g.call(null, x))
|
|
};
|
|
var G__13811__2 = function(x, y) {
|
|
return f.call(null, g.call(null, x, y))
|
|
};
|
|
var G__13811__3 = function(x, y, z) {
|
|
return f.call(null, g.call(null, x, y, z))
|
|
};
|
|
var G__13811__4 = function() {
|
|
var G__13812__delegate = function(x, y, z, args) {
|
|
return f.call(null, cljs.core.apply.call(null, g, x, y, z, args))
|
|
};
|
|
var G__13812 = function(x, y, z, var_args) {
|
|
var args = null;
|
|
if(arguments.length > 3) {
|
|
args = cljs.core.array_seq(Array.prototype.slice.call(arguments, 3), 0)
|
|
}
|
|
return G__13812__delegate.call(this, x, y, z, args)
|
|
};
|
|
G__13812.cljs$lang$maxFixedArity = 3;
|
|
G__13812.cljs$lang$applyTo = function(arglist__13813) {
|
|
var x = cljs.core.first(arglist__13813);
|
|
arglist__13813 = cljs.core.next(arglist__13813);
|
|
var y = cljs.core.first(arglist__13813);
|
|
arglist__13813 = cljs.core.next(arglist__13813);
|
|
var z = cljs.core.first(arglist__13813);
|
|
var args = cljs.core.rest(arglist__13813);
|
|
return G__13812__delegate(x, y, z, args)
|
|
};
|
|
G__13812.cljs$core$IFn$_invoke$arity$variadic = G__13812__delegate;
|
|
return G__13812
|
|
}();
|
|
G__13811 = function(x, y, z, var_args) {
|
|
var args = var_args;
|
|
switch(arguments.length) {
|
|
case 0:
|
|
return G__13811__0.call(this);
|
|
case 1:
|
|
return G__13811__1.call(this, x);
|
|
case 2:
|
|
return G__13811__2.call(this, x, y);
|
|
case 3:
|
|
return G__13811__3.call(this, x, y, z);
|
|
default:
|
|
return G__13811__4.cljs$core$IFn$_invoke$arity$variadic(x, y, z, cljs.core.array_seq(arguments, 3))
|
|
}
|
|
throw new Error("Invalid arity: " + arguments.length);
|
|
};
|
|
G__13811.cljs$lang$maxFixedArity = 3;
|
|
G__13811.cljs$lang$applyTo = G__13811__4.cljs$lang$applyTo;
|
|
return G__13811
|
|
}()
|
|
};
|
|
var comp__3 = function(f, g, h) {
|
|
return function() {
|
|
var G__13814 = null;
|
|
var G__13814__0 = function() {
|
|
return f.call(null, g.call(null, h.call(null)))
|
|
};
|
|
var G__13814__1 = function(x) {
|
|
return f.call(null, g.call(null, h.call(null, x)))
|
|
};
|
|
var G__13814__2 = function(x, y) {
|
|
return f.call(null, g.call(null, h.call(null, x, y)))
|
|
};
|
|
var G__13814__3 = function(x, y, z) {
|
|
return f.call(null, g.call(null, h.call(null, x, y, z)))
|
|
};
|
|
var G__13814__4 = function() {
|
|
var G__13815__delegate = function(x, y, z, args) {
|
|
return f.call(null, g.call(null, cljs.core.apply.call(null, h, x, y, z, args)))
|
|
};
|
|
var G__13815 = function(x, y, z, var_args) {
|
|
var args = null;
|
|
if(arguments.length > 3) {
|
|
args = cljs.core.array_seq(Array.prototype.slice.call(arguments, 3), 0)
|
|
}
|
|
return G__13815__delegate.call(this, x, y, z, args)
|
|
};
|
|
G__13815.cljs$lang$maxFixedArity = 3;
|
|
G__13815.cljs$lang$applyTo = function(arglist__13816) {
|
|
var x = cljs.core.first(arglist__13816);
|
|
arglist__13816 = cljs.core.next(arglist__13816);
|
|
var y = cljs.core.first(arglist__13816);
|
|
arglist__13816 = cljs.core.next(arglist__13816);
|
|
var z = cljs.core.first(arglist__13816);
|
|
var args = cljs.core.rest(arglist__13816);
|
|
return G__13815__delegate(x, y, z, args)
|
|
};
|
|
G__13815.cljs$core$IFn$_invoke$arity$variadic = G__13815__delegate;
|
|
return G__13815
|
|
}();
|
|
G__13814 = function(x, y, z, var_args) {
|
|
var args = var_args;
|
|
switch(arguments.length) {
|
|
case 0:
|
|
return G__13814__0.call(this);
|
|
case 1:
|
|
return G__13814__1.call(this, x);
|
|
case 2:
|
|
return G__13814__2.call(this, x, y);
|
|
case 3:
|
|
return G__13814__3.call(this, x, y, z);
|
|
default:
|
|
return G__13814__4.cljs$core$IFn$_invoke$arity$variadic(x, y, z, cljs.core.array_seq(arguments, 3))
|
|
}
|
|
throw new Error("Invalid arity: " + arguments.length);
|
|
};
|
|
G__13814.cljs$lang$maxFixedArity = 3;
|
|
G__13814.cljs$lang$applyTo = G__13814__4.cljs$lang$applyTo;
|
|
return G__13814
|
|
}()
|
|
};
|
|
var comp__4 = function() {
|
|
var G__13817__delegate = function(f1, f2, f3, fs) {
|
|
var fs__$1 = cljs.core.reverse.call(null, cljs.core.list_STAR_.call(null, f1, f2, f3, fs));
|
|
return function() {
|
|
var G__13818__delegate = function(args) {
|
|
var ret = cljs.core.apply.call(null, cljs.core.first.call(null, fs__$1), args);
|
|
var fs__$2 = cljs.core.next.call(null, fs__$1);
|
|
while(true) {
|
|
if(fs__$2) {
|
|
var G__13819 = cljs.core.first.call(null, fs__$2).call(null, ret);
|
|
var G__13820 = cljs.core.next.call(null, fs__$2);
|
|
ret = G__13819;
|
|
fs__$2 = G__13820;
|
|
continue
|
|
}else {
|
|
return ret
|
|
}
|
|
break
|
|
}
|
|
};
|
|
var G__13818 = function(var_args) {
|
|
var args = null;
|
|
if(arguments.length > 0) {
|
|
args = cljs.core.array_seq(Array.prototype.slice.call(arguments, 0), 0)
|
|
}
|
|
return G__13818__delegate.call(this, args)
|
|
};
|
|
G__13818.cljs$lang$maxFixedArity = 0;
|
|
G__13818.cljs$lang$applyTo = function(arglist__13821) {
|
|
var args = cljs.core.seq(arglist__13821);
|
|
return G__13818__delegate(args)
|
|
};
|
|
G__13818.cljs$core$IFn$_invoke$arity$variadic = G__13818__delegate;
|
|
return G__13818
|
|
}()
|
|
};
|
|
var G__13817 = function(f1, f2, f3, var_args) {
|
|
var fs = null;
|
|
if(arguments.length > 3) {
|
|
fs = cljs.core.array_seq(Array.prototype.slice.call(arguments, 3), 0)
|
|
}
|
|
return G__13817__delegate.call(this, f1, f2, f3, fs)
|
|
};
|
|
G__13817.cljs$lang$maxFixedArity = 3;
|
|
G__13817.cljs$lang$applyTo = function(arglist__13822) {
|
|
var f1 = cljs.core.first(arglist__13822);
|
|
arglist__13822 = cljs.core.next(arglist__13822);
|
|
var f2 = cljs.core.first(arglist__13822);
|
|
arglist__13822 = cljs.core.next(arglist__13822);
|
|
var f3 = cljs.core.first(arglist__13822);
|
|
var fs = cljs.core.rest(arglist__13822);
|
|
return G__13817__delegate(f1, f2, f3, fs)
|
|
};
|
|
G__13817.cljs$core$IFn$_invoke$arity$variadic = G__13817__delegate;
|
|
return G__13817
|
|
}();
|
|
comp = function(f1, f2, f3, var_args) {
|
|
var fs = var_args;
|
|
switch(arguments.length) {
|
|
case 0:
|
|
return comp__0.call(this);
|
|
case 1:
|
|
return comp__1.call(this, f1);
|
|
case 2:
|
|
return comp__2.call(this, f1, f2);
|
|
case 3:
|
|
return comp__3.call(this, f1, f2, f3);
|
|
default:
|
|
return comp__4.cljs$core$IFn$_invoke$arity$variadic(f1, f2, f3, cljs.core.array_seq(arguments, 3))
|
|
}
|
|
throw new Error("Invalid arity: " + arguments.length);
|
|
};
|
|
comp.cljs$lang$maxFixedArity = 3;
|
|
comp.cljs$lang$applyTo = comp__4.cljs$lang$applyTo;
|
|
comp.cljs$core$IFn$_invoke$arity$0 = comp__0;
|
|
comp.cljs$core$IFn$_invoke$arity$1 = comp__1;
|
|
comp.cljs$core$IFn$_invoke$arity$2 = comp__2;
|
|
comp.cljs$core$IFn$_invoke$arity$3 = comp__3;
|
|
comp.cljs$core$IFn$_invoke$arity$variadic = comp__4.cljs$core$IFn$_invoke$arity$variadic;
|
|
return comp
|
|
}();
|
|
cljs.core.partial = function() {
|
|
var partial = null;
|
|
var partial__2 = function(f, arg1) {
|
|
return function() {
|
|
var G__13823__delegate = function(args) {
|
|
return cljs.core.apply.call(null, f, arg1, args)
|
|
};
|
|
var G__13823 = function(var_args) {
|
|
var args = null;
|
|
if(arguments.length > 0) {
|
|
args = cljs.core.array_seq(Array.prototype.slice.call(arguments, 0), 0)
|
|
}
|
|
return G__13823__delegate.call(this, args)
|
|
};
|
|
G__13823.cljs$lang$maxFixedArity = 0;
|
|
G__13823.cljs$lang$applyTo = function(arglist__13824) {
|
|
var args = cljs.core.seq(arglist__13824);
|
|
return G__13823__delegate(args)
|
|
};
|
|
G__13823.cljs$core$IFn$_invoke$arity$variadic = G__13823__delegate;
|
|
return G__13823
|
|
}()
|
|
};
|
|
var partial__3 = function(f, arg1, arg2) {
|
|
return function() {
|
|
var G__13825__delegate = function(args) {
|
|
return cljs.core.apply.call(null, f, arg1, arg2, args)
|
|
};
|
|
var G__13825 = function(var_args) {
|
|
var args = null;
|
|
if(arguments.length > 0) {
|
|
args = cljs.core.array_seq(Array.prototype.slice.call(arguments, 0), 0)
|
|
}
|
|
return G__13825__delegate.call(this, args)
|
|
};
|
|
G__13825.cljs$lang$maxFixedArity = 0;
|
|
G__13825.cljs$lang$applyTo = function(arglist__13826) {
|
|
var args = cljs.core.seq(arglist__13826);
|
|
return G__13825__delegate(args)
|
|
};
|
|
G__13825.cljs$core$IFn$_invoke$arity$variadic = G__13825__delegate;
|
|
return G__13825
|
|
}()
|
|
};
|
|
var partial__4 = function(f, arg1, arg2, arg3) {
|
|
return function() {
|
|
var G__13827__delegate = function(args) {
|
|
return cljs.core.apply.call(null, f, arg1, arg2, arg3, args)
|
|
};
|
|
var G__13827 = function(var_args) {
|
|
var args = null;
|
|
if(arguments.length > 0) {
|
|
args = cljs.core.array_seq(Array.prototype.slice.call(arguments, 0), 0)
|
|
}
|
|
return G__13827__delegate.call(this, args)
|
|
};
|
|
G__13827.cljs$lang$maxFixedArity = 0;
|
|
G__13827.cljs$lang$applyTo = function(arglist__13828) {
|
|
var args = cljs.core.seq(arglist__13828);
|
|
return G__13827__delegate(args)
|
|
};
|
|
G__13827.cljs$core$IFn$_invoke$arity$variadic = G__13827__delegate;
|
|
return G__13827
|
|
}()
|
|
};
|
|
var partial__5 = function() {
|
|
var G__13829__delegate = function(f, arg1, arg2, arg3, more) {
|
|
return function() {
|
|
var G__13830__delegate = function(args) {
|
|
return cljs.core.apply.call(null, f, arg1, arg2, arg3, cljs.core.concat.call(null, more, args))
|
|
};
|
|
var G__13830 = function(var_args) {
|
|
var args = null;
|
|
if(arguments.length > 0) {
|
|
args = cljs.core.array_seq(Array.prototype.slice.call(arguments, 0), 0)
|
|
}
|
|
return G__13830__delegate.call(this, args)
|
|
};
|
|
G__13830.cljs$lang$maxFixedArity = 0;
|
|
G__13830.cljs$lang$applyTo = function(arglist__13831) {
|
|
var args = cljs.core.seq(arglist__13831);
|
|
return G__13830__delegate(args)
|
|
};
|
|
G__13830.cljs$core$IFn$_invoke$arity$variadic = G__13830__delegate;
|
|
return G__13830
|
|
}()
|
|
};
|
|
var G__13829 = function(f, arg1, arg2, arg3, var_args) {
|
|
var more = null;
|
|
if(arguments.length > 4) {
|
|
more = cljs.core.array_seq(Array.prototype.slice.call(arguments, 4), 0)
|
|
}
|
|
return G__13829__delegate.call(this, f, arg1, arg2, arg3, more)
|
|
};
|
|
G__13829.cljs$lang$maxFixedArity = 4;
|
|
G__13829.cljs$lang$applyTo = function(arglist__13832) {
|
|
var f = cljs.core.first(arglist__13832);
|
|
arglist__13832 = cljs.core.next(arglist__13832);
|
|
var arg1 = cljs.core.first(arglist__13832);
|
|
arglist__13832 = cljs.core.next(arglist__13832);
|
|
var arg2 = cljs.core.first(arglist__13832);
|
|
arglist__13832 = cljs.core.next(arglist__13832);
|
|
var arg3 = cljs.core.first(arglist__13832);
|
|
var more = cljs.core.rest(arglist__13832);
|
|
return G__13829__delegate(f, arg1, arg2, arg3, more)
|
|
};
|
|
G__13829.cljs$core$IFn$_invoke$arity$variadic = G__13829__delegate;
|
|
return G__13829
|
|
}();
|
|
partial = function(f, arg1, arg2, arg3, var_args) {
|
|
var more = var_args;
|
|
switch(arguments.length) {
|
|
case 2:
|
|
return partial__2.call(this, f, arg1);
|
|
case 3:
|
|
return partial__3.call(this, f, arg1, arg2);
|
|
case 4:
|
|
return partial__4.call(this, f, arg1, arg2, arg3);
|
|
default:
|
|
return partial__5.cljs$core$IFn$_invoke$arity$variadic(f, arg1, arg2, arg3, cljs.core.array_seq(arguments, 4))
|
|
}
|
|
throw new Error("Invalid arity: " + arguments.length);
|
|
};
|
|
partial.cljs$lang$maxFixedArity = 4;
|
|
partial.cljs$lang$applyTo = partial__5.cljs$lang$applyTo;
|
|
partial.cljs$core$IFn$_invoke$arity$2 = partial__2;
|
|
partial.cljs$core$IFn$_invoke$arity$3 = partial__3;
|
|
partial.cljs$core$IFn$_invoke$arity$4 = partial__4;
|
|
partial.cljs$core$IFn$_invoke$arity$variadic = partial__5.cljs$core$IFn$_invoke$arity$variadic;
|
|
return partial
|
|
}();
|
|
cljs.core.fnil = function() {
|
|
var fnil = null;
|
|
var fnil__2 = function(f, x) {
|
|
return function() {
|
|
var G__13833 = null;
|
|
var G__13833__1 = function(a) {
|
|
return f.call(null, a == null ? x : a)
|
|
};
|
|
var G__13833__2 = function(a, b) {
|
|
return f.call(null, a == null ? x : a, b)
|
|
};
|
|
var G__13833__3 = function(a, b, c) {
|
|
return f.call(null, a == null ? x : a, b, c)
|
|
};
|
|
var G__13833__4 = function() {
|
|
var G__13834__delegate = function(a, b, c, ds) {
|
|
return cljs.core.apply.call(null, f, a == null ? x : a, b, c, ds)
|
|
};
|
|
var G__13834 = function(a, b, c, var_args) {
|
|
var ds = null;
|
|
if(arguments.length > 3) {
|
|
ds = cljs.core.array_seq(Array.prototype.slice.call(arguments, 3), 0)
|
|
}
|
|
return G__13834__delegate.call(this, a, b, c, ds)
|
|
};
|
|
G__13834.cljs$lang$maxFixedArity = 3;
|
|
G__13834.cljs$lang$applyTo = function(arglist__13835) {
|
|
var a = cljs.core.first(arglist__13835);
|
|
arglist__13835 = cljs.core.next(arglist__13835);
|
|
var b = cljs.core.first(arglist__13835);
|
|
arglist__13835 = cljs.core.next(arglist__13835);
|
|
var c = cljs.core.first(arglist__13835);
|
|
var ds = cljs.core.rest(arglist__13835);
|
|
return G__13834__delegate(a, b, c, ds)
|
|
};
|
|
G__13834.cljs$core$IFn$_invoke$arity$variadic = G__13834__delegate;
|
|
return G__13834
|
|
}();
|
|
G__13833 = function(a, b, c, var_args) {
|
|
var ds = var_args;
|
|
switch(arguments.length) {
|
|
case 1:
|
|
return G__13833__1.call(this, a);
|
|
case 2:
|
|
return G__13833__2.call(this, a, b);
|
|
case 3:
|
|
return G__13833__3.call(this, a, b, c);
|
|
default:
|
|
return G__13833__4.cljs$core$IFn$_invoke$arity$variadic(a, b, c, cljs.core.array_seq(arguments, 3))
|
|
}
|
|
throw new Error("Invalid arity: " + arguments.length);
|
|
};
|
|
G__13833.cljs$lang$maxFixedArity = 3;
|
|
G__13833.cljs$lang$applyTo = G__13833__4.cljs$lang$applyTo;
|
|
return G__13833
|
|
}()
|
|
};
|
|
var fnil__3 = function(f, x, y) {
|
|
return function() {
|
|
var G__13836 = null;
|
|
var G__13836__2 = function(a, b) {
|
|
return f.call(null, a == null ? x : a, b == null ? y : b)
|
|
};
|
|
var G__13836__3 = function(a, b, c) {
|
|
return f.call(null, a == null ? x : a, b == null ? y : b, c)
|
|
};
|
|
var G__13836__4 = function() {
|
|
var G__13837__delegate = function(a, b, c, ds) {
|
|
return cljs.core.apply.call(null, f, a == null ? x : a, b == null ? y : b, c, ds)
|
|
};
|
|
var G__13837 = function(a, b, c, var_args) {
|
|
var ds = null;
|
|
if(arguments.length > 3) {
|
|
ds = cljs.core.array_seq(Array.prototype.slice.call(arguments, 3), 0)
|
|
}
|
|
return G__13837__delegate.call(this, a, b, c, ds)
|
|
};
|
|
G__13837.cljs$lang$maxFixedArity = 3;
|
|
G__13837.cljs$lang$applyTo = function(arglist__13838) {
|
|
var a = cljs.core.first(arglist__13838);
|
|
arglist__13838 = cljs.core.next(arglist__13838);
|
|
var b = cljs.core.first(arglist__13838);
|
|
arglist__13838 = cljs.core.next(arglist__13838);
|
|
var c = cljs.core.first(arglist__13838);
|
|
var ds = cljs.core.rest(arglist__13838);
|
|
return G__13837__delegate(a, b, c, ds)
|
|
};
|
|
G__13837.cljs$core$IFn$_invoke$arity$variadic = G__13837__delegate;
|
|
return G__13837
|
|
}();
|
|
G__13836 = function(a, b, c, var_args) {
|
|
var ds = var_args;
|
|
switch(arguments.length) {
|
|
case 2:
|
|
return G__13836__2.call(this, a, b);
|
|
case 3:
|
|
return G__13836__3.call(this, a, b, c);
|
|
default:
|
|
return G__13836__4.cljs$core$IFn$_invoke$arity$variadic(a, b, c, cljs.core.array_seq(arguments, 3))
|
|
}
|
|
throw new Error("Invalid arity: " + arguments.length);
|
|
};
|
|
G__13836.cljs$lang$maxFixedArity = 3;
|
|
G__13836.cljs$lang$applyTo = G__13836__4.cljs$lang$applyTo;
|
|
return G__13836
|
|
}()
|
|
};
|
|
var fnil__4 = function(f, x, y, z) {
|
|
return function() {
|
|
var G__13839 = null;
|
|
var G__13839__2 = function(a, b) {
|
|
return f.call(null, a == null ? x : a, b == null ? y : b)
|
|
};
|
|
var G__13839__3 = function(a, b, c) {
|
|
return f.call(null, a == null ? x : a, b == null ? y : b, c == null ? z : c)
|
|
};
|
|
var G__13839__4 = function() {
|
|
var G__13840__delegate = function(a, b, c, ds) {
|
|
return cljs.core.apply.call(null, f, a == null ? x : a, b == null ? y : b, c == null ? z : c, ds)
|
|
};
|
|
var G__13840 = function(a, b, c, var_args) {
|
|
var ds = null;
|
|
if(arguments.length > 3) {
|
|
ds = cljs.core.array_seq(Array.prototype.slice.call(arguments, 3), 0)
|
|
}
|
|
return G__13840__delegate.call(this, a, b, c, ds)
|
|
};
|
|
G__13840.cljs$lang$maxFixedArity = 3;
|
|
G__13840.cljs$lang$applyTo = function(arglist__13841) {
|
|
var a = cljs.core.first(arglist__13841);
|
|
arglist__13841 = cljs.core.next(arglist__13841);
|
|
var b = cljs.core.first(arglist__13841);
|
|
arglist__13841 = cljs.core.next(arglist__13841);
|
|
var c = cljs.core.first(arglist__13841);
|
|
var ds = cljs.core.rest(arglist__13841);
|
|
return G__13840__delegate(a, b, c, ds)
|
|
};
|
|
G__13840.cljs$core$IFn$_invoke$arity$variadic = G__13840__delegate;
|
|
return G__13840
|
|
}();
|
|
G__13839 = function(a, b, c, var_args) {
|
|
var ds = var_args;
|
|
switch(arguments.length) {
|
|
case 2:
|
|
return G__13839__2.call(this, a, b);
|
|
case 3:
|
|
return G__13839__3.call(this, a, b, c);
|
|
default:
|
|
return G__13839__4.cljs$core$IFn$_invoke$arity$variadic(a, b, c, cljs.core.array_seq(arguments, 3))
|
|
}
|
|
throw new Error("Invalid arity: " + arguments.length);
|
|
};
|
|
G__13839.cljs$lang$maxFixedArity = 3;
|
|
G__13839.cljs$lang$applyTo = G__13839__4.cljs$lang$applyTo;
|
|
return G__13839
|
|
}()
|
|
};
|
|
fnil = function(f, x, y, z) {
|
|
switch(arguments.length) {
|
|
case 2:
|
|
return fnil__2.call(this, f, x);
|
|
case 3:
|
|
return fnil__3.call(this, f, x, y);
|
|
case 4:
|
|
return fnil__4.call(this, f, x, y, z)
|
|
}
|
|
throw new Error("Invalid arity: " + arguments.length);
|
|
};
|
|
fnil.cljs$core$IFn$_invoke$arity$2 = fnil__2;
|
|
fnil.cljs$core$IFn$_invoke$arity$3 = fnil__3;
|
|
fnil.cljs$core$IFn$_invoke$arity$4 = fnil__4;
|
|
return fnil
|
|
}();
|
|
cljs.core.map_indexed = function map_indexed(f, coll) {
|
|
var mapi = function mapi(idx, coll__$1) {
|
|
return new cljs.core.LazySeq(null, false, function() {
|
|
var temp__4092__auto__ = cljs.core.seq.call(null, coll__$1);
|
|
if(temp__4092__auto__) {
|
|
var s = temp__4092__auto__;
|
|
if(cljs.core.chunked_seq_QMARK_.call(null, s)) {
|
|
var c = cljs.core.chunk_first.call(null, s);
|
|
var size = cljs.core.count.call(null, c);
|
|
var b = cljs.core.chunk_buffer.call(null, size);
|
|
var n__3084__auto___13842 = size;
|
|
var i_13843 = 0;
|
|
while(true) {
|
|
if(i_13843 < n__3084__auto___13842) {
|
|
cljs.core.chunk_append.call(null, b, f.call(null, idx + i_13843, cljs.core._nth.call(null, c, i_13843)));
|
|
var G__13844 = i_13843 + 1;
|
|
i_13843 = G__13844;
|
|
continue
|
|
}else {
|
|
}
|
|
break
|
|
}
|
|
return cljs.core.chunk_cons.call(null, cljs.core.chunk.call(null, b), mapi.call(null, idx + size, cljs.core.chunk_rest.call(null, s)))
|
|
}else {
|
|
return cljs.core.cons.call(null, f.call(null, idx, cljs.core.first.call(null, s)), mapi.call(null, idx + 1, cljs.core.rest.call(null, s)))
|
|
}
|
|
}else {
|
|
return null
|
|
}
|
|
}, null)
|
|
};
|
|
return mapi.call(null, 0, coll)
|
|
};
|
|
cljs.core.keep = function keep(f, coll) {
|
|
return new cljs.core.LazySeq(null, false, function() {
|
|
var temp__4092__auto__ = cljs.core.seq.call(null, coll);
|
|
if(temp__4092__auto__) {
|
|
var s = temp__4092__auto__;
|
|
if(cljs.core.chunked_seq_QMARK_.call(null, s)) {
|
|
var c = cljs.core.chunk_first.call(null, s);
|
|
var size = cljs.core.count.call(null, c);
|
|
var b = cljs.core.chunk_buffer.call(null, size);
|
|
var n__3084__auto___13845 = size;
|
|
var i_13846 = 0;
|
|
while(true) {
|
|
if(i_13846 < n__3084__auto___13845) {
|
|
var x_13847 = f.call(null, cljs.core._nth.call(null, c, i_13846));
|
|
if(x_13847 == null) {
|
|
}else {
|
|
cljs.core.chunk_append.call(null, b, x_13847)
|
|
}
|
|
var G__13848 = i_13846 + 1;
|
|
i_13846 = G__13848;
|
|
continue
|
|
}else {
|
|
}
|
|
break
|
|
}
|
|
return cljs.core.chunk_cons.call(null, cljs.core.chunk.call(null, b), keep.call(null, f, cljs.core.chunk_rest.call(null, s)))
|
|
}else {
|
|
var x = f.call(null, cljs.core.first.call(null, s));
|
|
if(x == null) {
|
|
return keep.call(null, f, cljs.core.rest.call(null, s))
|
|
}else {
|
|
return cljs.core.cons.call(null, x, keep.call(null, f, cljs.core.rest.call(null, s)))
|
|
}
|
|
}
|
|
}else {
|
|
return null
|
|
}
|
|
}, null)
|
|
};
|
|
cljs.core.keep_indexed = function keep_indexed(f, coll) {
|
|
var keepi = function keepi(idx, coll__$1) {
|
|
return new cljs.core.LazySeq(null, false, function() {
|
|
var temp__4092__auto__ = cljs.core.seq.call(null, coll__$1);
|
|
if(temp__4092__auto__) {
|
|
var s = temp__4092__auto__;
|
|
if(cljs.core.chunked_seq_QMARK_.call(null, s)) {
|
|
var c = cljs.core.chunk_first.call(null, s);
|
|
var size = cljs.core.count.call(null, c);
|
|
var b = cljs.core.chunk_buffer.call(null, size);
|
|
var n__3084__auto___13849 = size;
|
|
var i_13850 = 0;
|
|
while(true) {
|
|
if(i_13850 < n__3084__auto___13849) {
|
|
var x_13851 = f.call(null, idx + i_13850, cljs.core._nth.call(null, c, i_13850));
|
|
if(x_13851 == null) {
|
|
}else {
|
|
cljs.core.chunk_append.call(null, b, x_13851)
|
|
}
|
|
var G__13852 = i_13850 + 1;
|
|
i_13850 = G__13852;
|
|
continue
|
|
}else {
|
|
}
|
|
break
|
|
}
|
|
return cljs.core.chunk_cons.call(null, cljs.core.chunk.call(null, b), keepi.call(null, idx + size, cljs.core.chunk_rest.call(null, s)))
|
|
}else {
|
|
var x = f.call(null, idx, cljs.core.first.call(null, s));
|
|
if(x == null) {
|
|
return keepi.call(null, idx + 1, cljs.core.rest.call(null, s))
|
|
}else {
|
|
return cljs.core.cons.call(null, x, keepi.call(null, idx + 1, cljs.core.rest.call(null, s)))
|
|
}
|
|
}
|
|
}else {
|
|
return null
|
|
}
|
|
}, null)
|
|
};
|
|
return keepi.call(null, 0, coll)
|
|
};
|
|
cljs.core.every_pred = function() {
|
|
var every_pred = null;
|
|
var every_pred__1 = function(p) {
|
|
return function() {
|
|
var ep1 = null;
|
|
var ep1__0 = function() {
|
|
return true
|
|
};
|
|
var ep1__1 = function(x) {
|
|
return cljs.core.boolean$.call(null, p.call(null, x))
|
|
};
|
|
var ep1__2 = function(x, y) {
|
|
return cljs.core.boolean$.call(null, function() {
|
|
var and__3941__auto__ = p.call(null, x);
|
|
if(cljs.core.truth_(and__3941__auto__)) {
|
|
return p.call(null, y)
|
|
}else {
|
|
return and__3941__auto__
|
|
}
|
|
}())
|
|
};
|
|
var ep1__3 = function(x, y, z) {
|
|
return cljs.core.boolean$.call(null, function() {
|
|
var and__3941__auto__ = p.call(null, x);
|
|
if(cljs.core.truth_(and__3941__auto__)) {
|
|
var and__3941__auto____$1 = p.call(null, y);
|
|
if(cljs.core.truth_(and__3941__auto____$1)) {
|
|
return p.call(null, z)
|
|
}else {
|
|
return and__3941__auto____$1
|
|
}
|
|
}else {
|
|
return and__3941__auto__
|
|
}
|
|
}())
|
|
};
|
|
var ep1__4 = function() {
|
|
var G__13859__delegate = function(x, y, z, args) {
|
|
return cljs.core.boolean$.call(null, function() {
|
|
var and__3941__auto__ = ep1.call(null, x, y, z);
|
|
if(cljs.core.truth_(and__3941__auto__)) {
|
|
return cljs.core.every_QMARK_.call(null, p, args)
|
|
}else {
|
|
return and__3941__auto__
|
|
}
|
|
}())
|
|
};
|
|
var G__13859 = function(x, y, z, var_args) {
|
|
var args = null;
|
|
if(arguments.length > 3) {
|
|
args = cljs.core.array_seq(Array.prototype.slice.call(arguments, 3), 0)
|
|
}
|
|
return G__13859__delegate.call(this, x, y, z, args)
|
|
};
|
|
G__13859.cljs$lang$maxFixedArity = 3;
|
|
G__13859.cljs$lang$applyTo = function(arglist__13860) {
|
|
var x = cljs.core.first(arglist__13860);
|
|
arglist__13860 = cljs.core.next(arglist__13860);
|
|
var y = cljs.core.first(arglist__13860);
|
|
arglist__13860 = cljs.core.next(arglist__13860);
|
|
var z = cljs.core.first(arglist__13860);
|
|
var args = cljs.core.rest(arglist__13860);
|
|
return G__13859__delegate(x, y, z, args)
|
|
};
|
|
G__13859.cljs$core$IFn$_invoke$arity$variadic = G__13859__delegate;
|
|
return G__13859
|
|
}();
|
|
ep1 = function(x, y, z, var_args) {
|
|
var args = var_args;
|
|
switch(arguments.length) {
|
|
case 0:
|
|
return ep1__0.call(this);
|
|
case 1:
|
|
return ep1__1.call(this, x);
|
|
case 2:
|
|
return ep1__2.call(this, x, y);
|
|
case 3:
|
|
return ep1__3.call(this, x, y, z);
|
|
default:
|
|
return ep1__4.cljs$core$IFn$_invoke$arity$variadic(x, y, z, cljs.core.array_seq(arguments, 3))
|
|
}
|
|
throw new Error("Invalid arity: " + arguments.length);
|
|
};
|
|
ep1.cljs$lang$maxFixedArity = 3;
|
|
ep1.cljs$lang$applyTo = ep1__4.cljs$lang$applyTo;
|
|
ep1.cljs$core$IFn$_invoke$arity$0 = ep1__0;
|
|
ep1.cljs$core$IFn$_invoke$arity$1 = ep1__1;
|
|
ep1.cljs$core$IFn$_invoke$arity$2 = ep1__2;
|
|
ep1.cljs$core$IFn$_invoke$arity$3 = ep1__3;
|
|
ep1.cljs$core$IFn$_invoke$arity$variadic = ep1__4.cljs$core$IFn$_invoke$arity$variadic;
|
|
return ep1
|
|
}()
|
|
};
|
|
var every_pred__2 = function(p1, p2) {
|
|
return function() {
|
|
var ep2 = null;
|
|
var ep2__0 = function() {
|
|
return true
|
|
};
|
|
var ep2__1 = function(x) {
|
|
return cljs.core.boolean$.call(null, function() {
|
|
var and__3941__auto__ = p1.call(null, x);
|
|
if(cljs.core.truth_(and__3941__auto__)) {
|
|
return p2.call(null, x)
|
|
}else {
|
|
return and__3941__auto__
|
|
}
|
|
}())
|
|
};
|
|
var ep2__2 = function(x, y) {
|
|
return cljs.core.boolean$.call(null, function() {
|
|
var and__3941__auto__ = p1.call(null, x);
|
|
if(cljs.core.truth_(and__3941__auto__)) {
|
|
var and__3941__auto____$1 = p1.call(null, y);
|
|
if(cljs.core.truth_(and__3941__auto____$1)) {
|
|
var and__3941__auto____$2 = p2.call(null, x);
|
|
if(cljs.core.truth_(and__3941__auto____$2)) {
|
|
return p2.call(null, y)
|
|
}else {
|
|
return and__3941__auto____$2
|
|
}
|
|
}else {
|
|
return and__3941__auto____$1
|
|
}
|
|
}else {
|
|
return and__3941__auto__
|
|
}
|
|
}())
|
|
};
|
|
var ep2__3 = function(x, y, z) {
|
|
return cljs.core.boolean$.call(null, function() {
|
|
var and__3941__auto__ = p1.call(null, x);
|
|
if(cljs.core.truth_(and__3941__auto__)) {
|
|
var and__3941__auto____$1 = p1.call(null, y);
|
|
if(cljs.core.truth_(and__3941__auto____$1)) {
|
|
var and__3941__auto____$2 = p1.call(null, z);
|
|
if(cljs.core.truth_(and__3941__auto____$2)) {
|
|
var and__3941__auto____$3 = p2.call(null, x);
|
|
if(cljs.core.truth_(and__3941__auto____$3)) {
|
|
var and__3941__auto____$4 = p2.call(null, y);
|
|
if(cljs.core.truth_(and__3941__auto____$4)) {
|
|
return p2.call(null, z)
|
|
}else {
|
|
return and__3941__auto____$4
|
|
}
|
|
}else {
|
|
return and__3941__auto____$3
|
|
}
|
|
}else {
|
|
return and__3941__auto____$2
|
|
}
|
|
}else {
|
|
return and__3941__auto____$1
|
|
}
|
|
}else {
|
|
return and__3941__auto__
|
|
}
|
|
}())
|
|
};
|
|
var ep2__4 = function() {
|
|
var G__13861__delegate = function(x, y, z, args) {
|
|
return cljs.core.boolean$.call(null, function() {
|
|
var and__3941__auto__ = ep2.call(null, x, y, z);
|
|
if(cljs.core.truth_(and__3941__auto__)) {
|
|
return cljs.core.every_QMARK_.call(null, function(p1__13853_SHARP_) {
|
|
var and__3941__auto____$1 = p1.call(null, p1__13853_SHARP_);
|
|
if(cljs.core.truth_(and__3941__auto____$1)) {
|
|
return p2.call(null, p1__13853_SHARP_)
|
|
}else {
|
|
return and__3941__auto____$1
|
|
}
|
|
}, args)
|
|
}else {
|
|
return and__3941__auto__
|
|
}
|
|
}())
|
|
};
|
|
var G__13861 = function(x, y, z, var_args) {
|
|
var args = null;
|
|
if(arguments.length > 3) {
|
|
args = cljs.core.array_seq(Array.prototype.slice.call(arguments, 3), 0)
|
|
}
|
|
return G__13861__delegate.call(this, x, y, z, args)
|
|
};
|
|
G__13861.cljs$lang$maxFixedArity = 3;
|
|
G__13861.cljs$lang$applyTo = function(arglist__13862) {
|
|
var x = cljs.core.first(arglist__13862);
|
|
arglist__13862 = cljs.core.next(arglist__13862);
|
|
var y = cljs.core.first(arglist__13862);
|
|
arglist__13862 = cljs.core.next(arglist__13862);
|
|
var z = cljs.core.first(arglist__13862);
|
|
var args = cljs.core.rest(arglist__13862);
|
|
return G__13861__delegate(x, y, z, args)
|
|
};
|
|
G__13861.cljs$core$IFn$_invoke$arity$variadic = G__13861__delegate;
|
|
return G__13861
|
|
}();
|
|
ep2 = function(x, y, z, var_args) {
|
|
var args = var_args;
|
|
switch(arguments.length) {
|
|
case 0:
|
|
return ep2__0.call(this);
|
|
case 1:
|
|
return ep2__1.call(this, x);
|
|
case 2:
|
|
return ep2__2.call(this, x, y);
|
|
case 3:
|
|
return ep2__3.call(this, x, y, z);
|
|
default:
|
|
return ep2__4.cljs$core$IFn$_invoke$arity$variadic(x, y, z, cljs.core.array_seq(arguments, 3))
|
|
}
|
|
throw new Error("Invalid arity: " + arguments.length);
|
|
};
|
|
ep2.cljs$lang$maxFixedArity = 3;
|
|
ep2.cljs$lang$applyTo = ep2__4.cljs$lang$applyTo;
|
|
ep2.cljs$core$IFn$_invoke$arity$0 = ep2__0;
|
|
ep2.cljs$core$IFn$_invoke$arity$1 = ep2__1;
|
|
ep2.cljs$core$IFn$_invoke$arity$2 = ep2__2;
|
|
ep2.cljs$core$IFn$_invoke$arity$3 = ep2__3;
|
|
ep2.cljs$core$IFn$_invoke$arity$variadic = ep2__4.cljs$core$IFn$_invoke$arity$variadic;
|
|
return ep2
|
|
}()
|
|
};
|
|
var every_pred__3 = function(p1, p2, p3) {
|
|
return function() {
|
|
var ep3 = null;
|
|
var ep3__0 = function() {
|
|
return true
|
|
};
|
|
var ep3__1 = function(x) {
|
|
return cljs.core.boolean$.call(null, function() {
|
|
var and__3941__auto__ = p1.call(null, x);
|
|
if(cljs.core.truth_(and__3941__auto__)) {
|
|
var and__3941__auto____$1 = p2.call(null, x);
|
|
if(cljs.core.truth_(and__3941__auto____$1)) {
|
|
return p3.call(null, x)
|
|
}else {
|
|
return and__3941__auto____$1
|
|
}
|
|
}else {
|
|
return and__3941__auto__
|
|
}
|
|
}())
|
|
};
|
|
var ep3__2 = function(x, y) {
|
|
return cljs.core.boolean$.call(null, function() {
|
|
var and__3941__auto__ = p1.call(null, x);
|
|
if(cljs.core.truth_(and__3941__auto__)) {
|
|
var and__3941__auto____$1 = p2.call(null, x);
|
|
if(cljs.core.truth_(and__3941__auto____$1)) {
|
|
var and__3941__auto____$2 = p3.call(null, x);
|
|
if(cljs.core.truth_(and__3941__auto____$2)) {
|
|
var and__3941__auto____$3 = p1.call(null, y);
|
|
if(cljs.core.truth_(and__3941__auto____$3)) {
|
|
var and__3941__auto____$4 = p2.call(null, y);
|
|
if(cljs.core.truth_(and__3941__auto____$4)) {
|
|
return p3.call(null, y)
|
|
}else {
|
|
return and__3941__auto____$4
|
|
}
|
|
}else {
|
|
return and__3941__auto____$3
|
|
}
|
|
}else {
|
|
return and__3941__auto____$2
|
|
}
|
|
}else {
|
|
return and__3941__auto____$1
|
|
}
|
|
}else {
|
|
return and__3941__auto__
|
|
}
|
|
}())
|
|
};
|
|
var ep3__3 = function(x, y, z) {
|
|
return cljs.core.boolean$.call(null, function() {
|
|
var and__3941__auto__ = p1.call(null, x);
|
|
if(cljs.core.truth_(and__3941__auto__)) {
|
|
var and__3941__auto____$1 = p2.call(null, x);
|
|
if(cljs.core.truth_(and__3941__auto____$1)) {
|
|
var and__3941__auto____$2 = p3.call(null, x);
|
|
if(cljs.core.truth_(and__3941__auto____$2)) {
|
|
var and__3941__auto____$3 = p1.call(null, y);
|
|
if(cljs.core.truth_(and__3941__auto____$3)) {
|
|
var and__3941__auto____$4 = p2.call(null, y);
|
|
if(cljs.core.truth_(and__3941__auto____$4)) {
|
|
var and__3941__auto____$5 = p3.call(null, y);
|
|
if(cljs.core.truth_(and__3941__auto____$5)) {
|
|
var and__3941__auto____$6 = p1.call(null, z);
|
|
if(cljs.core.truth_(and__3941__auto____$6)) {
|
|
var and__3941__auto____$7 = p2.call(null, z);
|
|
if(cljs.core.truth_(and__3941__auto____$7)) {
|
|
return p3.call(null, z)
|
|
}else {
|
|
return and__3941__auto____$7
|
|
}
|
|
}else {
|
|
return and__3941__auto____$6
|
|
}
|
|
}else {
|
|
return and__3941__auto____$5
|
|
}
|
|
}else {
|
|
return and__3941__auto____$4
|
|
}
|
|
}else {
|
|
return and__3941__auto____$3
|
|
}
|
|
}else {
|
|
return and__3941__auto____$2
|
|
}
|
|
}else {
|
|
return and__3941__auto____$1
|
|
}
|
|
}else {
|
|
return and__3941__auto__
|
|
}
|
|
}())
|
|
};
|
|
var ep3__4 = function() {
|
|
var G__13863__delegate = function(x, y, z, args) {
|
|
return cljs.core.boolean$.call(null, function() {
|
|
var and__3941__auto__ = ep3.call(null, x, y, z);
|
|
if(cljs.core.truth_(and__3941__auto__)) {
|
|
return cljs.core.every_QMARK_.call(null, function(p1__13854_SHARP_) {
|
|
var and__3941__auto____$1 = p1.call(null, p1__13854_SHARP_);
|
|
if(cljs.core.truth_(and__3941__auto____$1)) {
|
|
var and__3941__auto____$2 = p2.call(null, p1__13854_SHARP_);
|
|
if(cljs.core.truth_(and__3941__auto____$2)) {
|
|
return p3.call(null, p1__13854_SHARP_)
|
|
}else {
|
|
return and__3941__auto____$2
|
|
}
|
|
}else {
|
|
return and__3941__auto____$1
|
|
}
|
|
}, args)
|
|
}else {
|
|
return and__3941__auto__
|
|
}
|
|
}())
|
|
};
|
|
var G__13863 = function(x, y, z, var_args) {
|
|
var args = null;
|
|
if(arguments.length > 3) {
|
|
args = cljs.core.array_seq(Array.prototype.slice.call(arguments, 3), 0)
|
|
}
|
|
return G__13863__delegate.call(this, x, y, z, args)
|
|
};
|
|
G__13863.cljs$lang$maxFixedArity = 3;
|
|
G__13863.cljs$lang$applyTo = function(arglist__13864) {
|
|
var x = cljs.core.first(arglist__13864);
|
|
arglist__13864 = cljs.core.next(arglist__13864);
|
|
var y = cljs.core.first(arglist__13864);
|
|
arglist__13864 = cljs.core.next(arglist__13864);
|
|
var z = cljs.core.first(arglist__13864);
|
|
var args = cljs.core.rest(arglist__13864);
|
|
return G__13863__delegate(x, y, z, args)
|
|
};
|
|
G__13863.cljs$core$IFn$_invoke$arity$variadic = G__13863__delegate;
|
|
return G__13863
|
|
}();
|
|
ep3 = function(x, y, z, var_args) {
|
|
var args = var_args;
|
|
switch(arguments.length) {
|
|
case 0:
|
|
return ep3__0.call(this);
|
|
case 1:
|
|
return ep3__1.call(this, x);
|
|
case 2:
|
|
return ep3__2.call(this, x, y);
|
|
case 3:
|
|
return ep3__3.call(this, x, y, z);
|
|
default:
|
|
return ep3__4.cljs$core$IFn$_invoke$arity$variadic(x, y, z, cljs.core.array_seq(arguments, 3))
|
|
}
|
|
throw new Error("Invalid arity: " + arguments.length);
|
|
};
|
|
ep3.cljs$lang$maxFixedArity = 3;
|
|
ep3.cljs$lang$applyTo = ep3__4.cljs$lang$applyTo;
|
|
ep3.cljs$core$IFn$_invoke$arity$0 = ep3__0;
|
|
ep3.cljs$core$IFn$_invoke$arity$1 = ep3__1;
|
|
ep3.cljs$core$IFn$_invoke$arity$2 = ep3__2;
|
|
ep3.cljs$core$IFn$_invoke$arity$3 = ep3__3;
|
|
ep3.cljs$core$IFn$_invoke$arity$variadic = ep3__4.cljs$core$IFn$_invoke$arity$variadic;
|
|
return ep3
|
|
}()
|
|
};
|
|
var every_pred__4 = function() {
|
|
var G__13865__delegate = function(p1, p2, p3, ps) {
|
|
var ps__$1 = cljs.core.list_STAR_.call(null, p1, p2, p3, ps);
|
|
return function() {
|
|
var epn = null;
|
|
var epn__0 = function() {
|
|
return true
|
|
};
|
|
var epn__1 = function(x) {
|
|
return cljs.core.every_QMARK_.call(null, function(p1__13855_SHARP_) {
|
|
return p1__13855_SHARP_.call(null, x)
|
|
}, ps__$1)
|
|
};
|
|
var epn__2 = function(x, y) {
|
|
return cljs.core.every_QMARK_.call(null, function(p1__13856_SHARP_) {
|
|
var and__3941__auto__ = p1__13856_SHARP_.call(null, x);
|
|
if(cljs.core.truth_(and__3941__auto__)) {
|
|
return p1__13856_SHARP_.call(null, y)
|
|
}else {
|
|
return and__3941__auto__
|
|
}
|
|
}, ps__$1)
|
|
};
|
|
var epn__3 = function(x, y, z) {
|
|
return cljs.core.every_QMARK_.call(null, function(p1__13857_SHARP_) {
|
|
var and__3941__auto__ = p1__13857_SHARP_.call(null, x);
|
|
if(cljs.core.truth_(and__3941__auto__)) {
|
|
var and__3941__auto____$1 = p1__13857_SHARP_.call(null, y);
|
|
if(cljs.core.truth_(and__3941__auto____$1)) {
|
|
return p1__13857_SHARP_.call(null, z)
|
|
}else {
|
|
return and__3941__auto____$1
|
|
}
|
|
}else {
|
|
return and__3941__auto__
|
|
}
|
|
}, ps__$1)
|
|
};
|
|
var epn__4 = function() {
|
|
var G__13866__delegate = function(x, y, z, args) {
|
|
return cljs.core.boolean$.call(null, function() {
|
|
var and__3941__auto__ = epn.call(null, x, y, z);
|
|
if(cljs.core.truth_(and__3941__auto__)) {
|
|
return cljs.core.every_QMARK_.call(null, function(p1__13858_SHARP_) {
|
|
return cljs.core.every_QMARK_.call(null, p1__13858_SHARP_, args)
|
|
}, ps__$1)
|
|
}else {
|
|
return and__3941__auto__
|
|
}
|
|
}())
|
|
};
|
|
var G__13866 = function(x, y, z, var_args) {
|
|
var args = null;
|
|
if(arguments.length > 3) {
|
|
args = cljs.core.array_seq(Array.prototype.slice.call(arguments, 3), 0)
|
|
}
|
|
return G__13866__delegate.call(this, x, y, z, args)
|
|
};
|
|
G__13866.cljs$lang$maxFixedArity = 3;
|
|
G__13866.cljs$lang$applyTo = function(arglist__13867) {
|
|
var x = cljs.core.first(arglist__13867);
|
|
arglist__13867 = cljs.core.next(arglist__13867);
|
|
var y = cljs.core.first(arglist__13867);
|
|
arglist__13867 = cljs.core.next(arglist__13867);
|
|
var z = cljs.core.first(arglist__13867);
|
|
var args = cljs.core.rest(arglist__13867);
|
|
return G__13866__delegate(x, y, z, args)
|
|
};
|
|
G__13866.cljs$core$IFn$_invoke$arity$variadic = G__13866__delegate;
|
|
return G__13866
|
|
}();
|
|
epn = function(x, y, z, var_args) {
|
|
var args = var_args;
|
|
switch(arguments.length) {
|
|
case 0:
|
|
return epn__0.call(this);
|
|
case 1:
|
|
return epn__1.call(this, x);
|
|
case 2:
|
|
return epn__2.call(this, x, y);
|
|
case 3:
|
|
return epn__3.call(this, x, y, z);
|
|
default:
|
|
return epn__4.cljs$core$IFn$_invoke$arity$variadic(x, y, z, cljs.core.array_seq(arguments, 3))
|
|
}
|
|
throw new Error("Invalid arity: " + arguments.length);
|
|
};
|
|
epn.cljs$lang$maxFixedArity = 3;
|
|
epn.cljs$lang$applyTo = epn__4.cljs$lang$applyTo;
|
|
epn.cljs$core$IFn$_invoke$arity$0 = epn__0;
|
|
epn.cljs$core$IFn$_invoke$arity$1 = epn__1;
|
|
epn.cljs$core$IFn$_invoke$arity$2 = epn__2;
|
|
epn.cljs$core$IFn$_invoke$arity$3 = epn__3;
|
|
epn.cljs$core$IFn$_invoke$arity$variadic = epn__4.cljs$core$IFn$_invoke$arity$variadic;
|
|
return epn
|
|
}()
|
|
};
|
|
var G__13865 = function(p1, p2, p3, var_args) {
|
|
var ps = null;
|
|
if(arguments.length > 3) {
|
|
ps = cljs.core.array_seq(Array.prototype.slice.call(arguments, 3), 0)
|
|
}
|
|
return G__13865__delegate.call(this, p1, p2, p3, ps)
|
|
};
|
|
G__13865.cljs$lang$maxFixedArity = 3;
|
|
G__13865.cljs$lang$applyTo = function(arglist__13868) {
|
|
var p1 = cljs.core.first(arglist__13868);
|
|
arglist__13868 = cljs.core.next(arglist__13868);
|
|
var p2 = cljs.core.first(arglist__13868);
|
|
arglist__13868 = cljs.core.next(arglist__13868);
|
|
var p3 = cljs.core.first(arglist__13868);
|
|
var ps = cljs.core.rest(arglist__13868);
|
|
return G__13865__delegate(p1, p2, p3, ps)
|
|
};
|
|
G__13865.cljs$core$IFn$_invoke$arity$variadic = G__13865__delegate;
|
|
return G__13865
|
|
}();
|
|
every_pred = function(p1, p2, p3, var_args) {
|
|
var ps = var_args;
|
|
switch(arguments.length) {
|
|
case 1:
|
|
return every_pred__1.call(this, p1);
|
|
case 2:
|
|
return every_pred__2.call(this, p1, p2);
|
|
case 3:
|
|
return every_pred__3.call(this, p1, p2, p3);
|
|
default:
|
|
return every_pred__4.cljs$core$IFn$_invoke$arity$variadic(p1, p2, p3, cljs.core.array_seq(arguments, 3))
|
|
}
|
|
throw new Error("Invalid arity: " + arguments.length);
|
|
};
|
|
every_pred.cljs$lang$maxFixedArity = 3;
|
|
every_pred.cljs$lang$applyTo = every_pred__4.cljs$lang$applyTo;
|
|
every_pred.cljs$core$IFn$_invoke$arity$1 = every_pred__1;
|
|
every_pred.cljs$core$IFn$_invoke$arity$2 = every_pred__2;
|
|
every_pred.cljs$core$IFn$_invoke$arity$3 = every_pred__3;
|
|
every_pred.cljs$core$IFn$_invoke$arity$variadic = every_pred__4.cljs$core$IFn$_invoke$arity$variadic;
|
|
return every_pred
|
|
}();
|
|
cljs.core.some_fn = function() {
|
|
var some_fn = null;
|
|
var some_fn__1 = function(p) {
|
|
return function() {
|
|
var sp1 = null;
|
|
var sp1__0 = function() {
|
|
return null
|
|
};
|
|
var sp1__1 = function(x) {
|
|
return p.call(null, x)
|
|
};
|
|
var sp1__2 = function(x, y) {
|
|
var or__3943__auto__ = p.call(null, x);
|
|
if(cljs.core.truth_(or__3943__auto__)) {
|
|
return or__3943__auto__
|
|
}else {
|
|
return p.call(null, y)
|
|
}
|
|
};
|
|
var sp1__3 = function(x, y, z) {
|
|
var or__3943__auto__ = p.call(null, x);
|
|
if(cljs.core.truth_(or__3943__auto__)) {
|
|
return or__3943__auto__
|
|
}else {
|
|
var or__3943__auto____$1 = p.call(null, y);
|
|
if(cljs.core.truth_(or__3943__auto____$1)) {
|
|
return or__3943__auto____$1
|
|
}else {
|
|
return p.call(null, z)
|
|
}
|
|
}
|
|
};
|
|
var sp1__4 = function() {
|
|
var G__13875__delegate = function(x, y, z, args) {
|
|
var or__3943__auto__ = sp1.call(null, x, y, z);
|
|
if(cljs.core.truth_(or__3943__auto__)) {
|
|
return or__3943__auto__
|
|
}else {
|
|
return cljs.core.some.call(null, p, args)
|
|
}
|
|
};
|
|
var G__13875 = function(x, y, z, var_args) {
|
|
var args = null;
|
|
if(arguments.length > 3) {
|
|
args = cljs.core.array_seq(Array.prototype.slice.call(arguments, 3), 0)
|
|
}
|
|
return G__13875__delegate.call(this, x, y, z, args)
|
|
};
|
|
G__13875.cljs$lang$maxFixedArity = 3;
|
|
G__13875.cljs$lang$applyTo = function(arglist__13876) {
|
|
var x = cljs.core.first(arglist__13876);
|
|
arglist__13876 = cljs.core.next(arglist__13876);
|
|
var y = cljs.core.first(arglist__13876);
|
|
arglist__13876 = cljs.core.next(arglist__13876);
|
|
var z = cljs.core.first(arglist__13876);
|
|
var args = cljs.core.rest(arglist__13876);
|
|
return G__13875__delegate(x, y, z, args)
|
|
};
|
|
G__13875.cljs$core$IFn$_invoke$arity$variadic = G__13875__delegate;
|
|
return G__13875
|
|
}();
|
|
sp1 = function(x, y, z, var_args) {
|
|
var args = var_args;
|
|
switch(arguments.length) {
|
|
case 0:
|
|
return sp1__0.call(this);
|
|
case 1:
|
|
return sp1__1.call(this, x);
|
|
case 2:
|
|
return sp1__2.call(this, x, y);
|
|
case 3:
|
|
return sp1__3.call(this, x, y, z);
|
|
default:
|
|
return sp1__4.cljs$core$IFn$_invoke$arity$variadic(x, y, z, cljs.core.array_seq(arguments, 3))
|
|
}
|
|
throw new Error("Invalid arity: " + arguments.length);
|
|
};
|
|
sp1.cljs$lang$maxFixedArity = 3;
|
|
sp1.cljs$lang$applyTo = sp1__4.cljs$lang$applyTo;
|
|
sp1.cljs$core$IFn$_invoke$arity$0 = sp1__0;
|
|
sp1.cljs$core$IFn$_invoke$arity$1 = sp1__1;
|
|
sp1.cljs$core$IFn$_invoke$arity$2 = sp1__2;
|
|
sp1.cljs$core$IFn$_invoke$arity$3 = sp1__3;
|
|
sp1.cljs$core$IFn$_invoke$arity$variadic = sp1__4.cljs$core$IFn$_invoke$arity$variadic;
|
|
return sp1
|
|
}()
|
|
};
|
|
var some_fn__2 = function(p1, p2) {
|
|
return function() {
|
|
var sp2 = null;
|
|
var sp2__0 = function() {
|
|
return null
|
|
};
|
|
var sp2__1 = function(x) {
|
|
var or__3943__auto__ = p1.call(null, x);
|
|
if(cljs.core.truth_(or__3943__auto__)) {
|
|
return or__3943__auto__
|
|
}else {
|
|
return p2.call(null, x)
|
|
}
|
|
};
|
|
var sp2__2 = function(x, y) {
|
|
var or__3943__auto__ = p1.call(null, x);
|
|
if(cljs.core.truth_(or__3943__auto__)) {
|
|
return or__3943__auto__
|
|
}else {
|
|
var or__3943__auto____$1 = p1.call(null, y);
|
|
if(cljs.core.truth_(or__3943__auto____$1)) {
|
|
return or__3943__auto____$1
|
|
}else {
|
|
var or__3943__auto____$2 = p2.call(null, x);
|
|
if(cljs.core.truth_(or__3943__auto____$2)) {
|
|
return or__3943__auto____$2
|
|
}else {
|
|
return p2.call(null, y)
|
|
}
|
|
}
|
|
}
|
|
};
|
|
var sp2__3 = function(x, y, z) {
|
|
var or__3943__auto__ = p1.call(null, x);
|
|
if(cljs.core.truth_(or__3943__auto__)) {
|
|
return or__3943__auto__
|
|
}else {
|
|
var or__3943__auto____$1 = p1.call(null, y);
|
|
if(cljs.core.truth_(or__3943__auto____$1)) {
|
|
return or__3943__auto____$1
|
|
}else {
|
|
var or__3943__auto____$2 = p1.call(null, z);
|
|
if(cljs.core.truth_(or__3943__auto____$2)) {
|
|
return or__3943__auto____$2
|
|
}else {
|
|
var or__3943__auto____$3 = p2.call(null, x);
|
|
if(cljs.core.truth_(or__3943__auto____$3)) {
|
|
return or__3943__auto____$3
|
|
}else {
|
|
var or__3943__auto____$4 = p2.call(null, y);
|
|
if(cljs.core.truth_(or__3943__auto____$4)) {
|
|
return or__3943__auto____$4
|
|
}else {
|
|
return p2.call(null, z)
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
};
|
|
var sp2__4 = function() {
|
|
var G__13877__delegate = function(x, y, z, args) {
|
|
var or__3943__auto__ = sp2.call(null, x, y, z);
|
|
if(cljs.core.truth_(or__3943__auto__)) {
|
|
return or__3943__auto__
|
|
}else {
|
|
return cljs.core.some.call(null, function(p1__13869_SHARP_) {
|
|
var or__3943__auto____$1 = p1.call(null, p1__13869_SHARP_);
|
|
if(cljs.core.truth_(or__3943__auto____$1)) {
|
|
return or__3943__auto____$1
|
|
}else {
|
|
return p2.call(null, p1__13869_SHARP_)
|
|
}
|
|
}, args)
|
|
}
|
|
};
|
|
var G__13877 = function(x, y, z, var_args) {
|
|
var args = null;
|
|
if(arguments.length > 3) {
|
|
args = cljs.core.array_seq(Array.prototype.slice.call(arguments, 3), 0)
|
|
}
|
|
return G__13877__delegate.call(this, x, y, z, args)
|
|
};
|
|
G__13877.cljs$lang$maxFixedArity = 3;
|
|
G__13877.cljs$lang$applyTo = function(arglist__13878) {
|
|
var x = cljs.core.first(arglist__13878);
|
|
arglist__13878 = cljs.core.next(arglist__13878);
|
|
var y = cljs.core.first(arglist__13878);
|
|
arglist__13878 = cljs.core.next(arglist__13878);
|
|
var z = cljs.core.first(arglist__13878);
|
|
var args = cljs.core.rest(arglist__13878);
|
|
return G__13877__delegate(x, y, z, args)
|
|
};
|
|
G__13877.cljs$core$IFn$_invoke$arity$variadic = G__13877__delegate;
|
|
return G__13877
|
|
}();
|
|
sp2 = function(x, y, z, var_args) {
|
|
var args = var_args;
|
|
switch(arguments.length) {
|
|
case 0:
|
|
return sp2__0.call(this);
|
|
case 1:
|
|
return sp2__1.call(this, x);
|
|
case 2:
|
|
return sp2__2.call(this, x, y);
|
|
case 3:
|
|
return sp2__3.call(this, x, y, z);
|
|
default:
|
|
return sp2__4.cljs$core$IFn$_invoke$arity$variadic(x, y, z, cljs.core.array_seq(arguments, 3))
|
|
}
|
|
throw new Error("Invalid arity: " + arguments.length);
|
|
};
|
|
sp2.cljs$lang$maxFixedArity = 3;
|
|
sp2.cljs$lang$applyTo = sp2__4.cljs$lang$applyTo;
|
|
sp2.cljs$core$IFn$_invoke$arity$0 = sp2__0;
|
|
sp2.cljs$core$IFn$_invoke$arity$1 = sp2__1;
|
|
sp2.cljs$core$IFn$_invoke$arity$2 = sp2__2;
|
|
sp2.cljs$core$IFn$_invoke$arity$3 = sp2__3;
|
|
sp2.cljs$core$IFn$_invoke$arity$variadic = sp2__4.cljs$core$IFn$_invoke$arity$variadic;
|
|
return sp2
|
|
}()
|
|
};
|
|
var some_fn__3 = function(p1, p2, p3) {
|
|
return function() {
|
|
var sp3 = null;
|
|
var sp3__0 = function() {
|
|
return null
|
|
};
|
|
var sp3__1 = function(x) {
|
|
var or__3943__auto__ = p1.call(null, x);
|
|
if(cljs.core.truth_(or__3943__auto__)) {
|
|
return or__3943__auto__
|
|
}else {
|
|
var or__3943__auto____$1 = p2.call(null, x);
|
|
if(cljs.core.truth_(or__3943__auto____$1)) {
|
|
return or__3943__auto____$1
|
|
}else {
|
|
return p3.call(null, x)
|
|
}
|
|
}
|
|
};
|
|
var sp3__2 = function(x, y) {
|
|
var or__3943__auto__ = p1.call(null, x);
|
|
if(cljs.core.truth_(or__3943__auto__)) {
|
|
return or__3943__auto__
|
|
}else {
|
|
var or__3943__auto____$1 = p2.call(null, x);
|
|
if(cljs.core.truth_(or__3943__auto____$1)) {
|
|
return or__3943__auto____$1
|
|
}else {
|
|
var or__3943__auto____$2 = p3.call(null, x);
|
|
if(cljs.core.truth_(or__3943__auto____$2)) {
|
|
return or__3943__auto____$2
|
|
}else {
|
|
var or__3943__auto____$3 = p1.call(null, y);
|
|
if(cljs.core.truth_(or__3943__auto____$3)) {
|
|
return or__3943__auto____$3
|
|
}else {
|
|
var or__3943__auto____$4 = p2.call(null, y);
|
|
if(cljs.core.truth_(or__3943__auto____$4)) {
|
|
return or__3943__auto____$4
|
|
}else {
|
|
return p3.call(null, y)
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
};
|
|
var sp3__3 = function(x, y, z) {
|
|
var or__3943__auto__ = p1.call(null, x);
|
|
if(cljs.core.truth_(or__3943__auto__)) {
|
|
return or__3943__auto__
|
|
}else {
|
|
var or__3943__auto____$1 = p2.call(null, x);
|
|
if(cljs.core.truth_(or__3943__auto____$1)) {
|
|
return or__3943__auto____$1
|
|
}else {
|
|
var or__3943__auto____$2 = p3.call(null, x);
|
|
if(cljs.core.truth_(or__3943__auto____$2)) {
|
|
return or__3943__auto____$2
|
|
}else {
|
|
var or__3943__auto____$3 = p1.call(null, y);
|
|
if(cljs.core.truth_(or__3943__auto____$3)) {
|
|
return or__3943__auto____$3
|
|
}else {
|
|
var or__3943__auto____$4 = p2.call(null, y);
|
|
if(cljs.core.truth_(or__3943__auto____$4)) {
|
|
return or__3943__auto____$4
|
|
}else {
|
|
var or__3943__auto____$5 = p3.call(null, y);
|
|
if(cljs.core.truth_(or__3943__auto____$5)) {
|
|
return or__3943__auto____$5
|
|
}else {
|
|
var or__3943__auto____$6 = p1.call(null, z);
|
|
if(cljs.core.truth_(or__3943__auto____$6)) {
|
|
return or__3943__auto____$6
|
|
}else {
|
|
var or__3943__auto____$7 = p2.call(null, z);
|
|
if(cljs.core.truth_(or__3943__auto____$7)) {
|
|
return or__3943__auto____$7
|
|
}else {
|
|
return p3.call(null, z)
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
};
|
|
var sp3__4 = function() {
|
|
var G__13879__delegate = function(x, y, z, args) {
|
|
var or__3943__auto__ = sp3.call(null, x, y, z);
|
|
if(cljs.core.truth_(or__3943__auto__)) {
|
|
return or__3943__auto__
|
|
}else {
|
|
return cljs.core.some.call(null, function(p1__13870_SHARP_) {
|
|
var or__3943__auto____$1 = p1.call(null, p1__13870_SHARP_);
|
|
if(cljs.core.truth_(or__3943__auto____$1)) {
|
|
return or__3943__auto____$1
|
|
}else {
|
|
var or__3943__auto____$2 = p2.call(null, p1__13870_SHARP_);
|
|
if(cljs.core.truth_(or__3943__auto____$2)) {
|
|
return or__3943__auto____$2
|
|
}else {
|
|
return p3.call(null, p1__13870_SHARP_)
|
|
}
|
|
}
|
|
}, args)
|
|
}
|
|
};
|
|
var G__13879 = function(x, y, z, var_args) {
|
|
var args = null;
|
|
if(arguments.length > 3) {
|
|
args = cljs.core.array_seq(Array.prototype.slice.call(arguments, 3), 0)
|
|
}
|
|
return G__13879__delegate.call(this, x, y, z, args)
|
|
};
|
|
G__13879.cljs$lang$maxFixedArity = 3;
|
|
G__13879.cljs$lang$applyTo = function(arglist__13880) {
|
|
var x = cljs.core.first(arglist__13880);
|
|
arglist__13880 = cljs.core.next(arglist__13880);
|
|
var y = cljs.core.first(arglist__13880);
|
|
arglist__13880 = cljs.core.next(arglist__13880);
|
|
var z = cljs.core.first(arglist__13880);
|
|
var args = cljs.core.rest(arglist__13880);
|
|
return G__13879__delegate(x, y, z, args)
|
|
};
|
|
G__13879.cljs$core$IFn$_invoke$arity$variadic = G__13879__delegate;
|
|
return G__13879
|
|
}();
|
|
sp3 = function(x, y, z, var_args) {
|
|
var args = var_args;
|
|
switch(arguments.length) {
|
|
case 0:
|
|
return sp3__0.call(this);
|
|
case 1:
|
|
return sp3__1.call(this, x);
|
|
case 2:
|
|
return sp3__2.call(this, x, y);
|
|
case 3:
|
|
return sp3__3.call(this, x, y, z);
|
|
default:
|
|
return sp3__4.cljs$core$IFn$_invoke$arity$variadic(x, y, z, cljs.core.array_seq(arguments, 3))
|
|
}
|
|
throw new Error("Invalid arity: " + arguments.length);
|
|
};
|
|
sp3.cljs$lang$maxFixedArity = 3;
|
|
sp3.cljs$lang$applyTo = sp3__4.cljs$lang$applyTo;
|
|
sp3.cljs$core$IFn$_invoke$arity$0 = sp3__0;
|
|
sp3.cljs$core$IFn$_invoke$arity$1 = sp3__1;
|
|
sp3.cljs$core$IFn$_invoke$arity$2 = sp3__2;
|
|
sp3.cljs$core$IFn$_invoke$arity$3 = sp3__3;
|
|
sp3.cljs$core$IFn$_invoke$arity$variadic = sp3__4.cljs$core$IFn$_invoke$arity$variadic;
|
|
return sp3
|
|
}()
|
|
};
|
|
var some_fn__4 = function() {
|
|
var G__13881__delegate = function(p1, p2, p3, ps) {
|
|
var ps__$1 = cljs.core.list_STAR_.call(null, p1, p2, p3, ps);
|
|
return function() {
|
|
var spn = null;
|
|
var spn__0 = function() {
|
|
return null
|
|
};
|
|
var spn__1 = function(x) {
|
|
return cljs.core.some.call(null, function(p1__13871_SHARP_) {
|
|
return p1__13871_SHARP_.call(null, x)
|
|
}, ps__$1)
|
|
};
|
|
var spn__2 = function(x, y) {
|
|
return cljs.core.some.call(null, function(p1__13872_SHARP_) {
|
|
var or__3943__auto__ = p1__13872_SHARP_.call(null, x);
|
|
if(cljs.core.truth_(or__3943__auto__)) {
|
|
return or__3943__auto__
|
|
}else {
|
|
return p1__13872_SHARP_.call(null, y)
|
|
}
|
|
}, ps__$1)
|
|
};
|
|
var spn__3 = function(x, y, z) {
|
|
return cljs.core.some.call(null, function(p1__13873_SHARP_) {
|
|
var or__3943__auto__ = p1__13873_SHARP_.call(null, x);
|
|
if(cljs.core.truth_(or__3943__auto__)) {
|
|
return or__3943__auto__
|
|
}else {
|
|
var or__3943__auto____$1 = p1__13873_SHARP_.call(null, y);
|
|
if(cljs.core.truth_(or__3943__auto____$1)) {
|
|
return or__3943__auto____$1
|
|
}else {
|
|
return p1__13873_SHARP_.call(null, z)
|
|
}
|
|
}
|
|
}, ps__$1)
|
|
};
|
|
var spn__4 = function() {
|
|
var G__13882__delegate = function(x, y, z, args) {
|
|
var or__3943__auto__ = spn.call(null, x, y, z);
|
|
if(cljs.core.truth_(or__3943__auto__)) {
|
|
return or__3943__auto__
|
|
}else {
|
|
return cljs.core.some.call(null, function(p1__13874_SHARP_) {
|
|
return cljs.core.some.call(null, p1__13874_SHARP_, args)
|
|
}, ps__$1)
|
|
}
|
|
};
|
|
var G__13882 = function(x, y, z, var_args) {
|
|
var args = null;
|
|
if(arguments.length > 3) {
|
|
args = cljs.core.array_seq(Array.prototype.slice.call(arguments, 3), 0)
|
|
}
|
|
return G__13882__delegate.call(this, x, y, z, args)
|
|
};
|
|
G__13882.cljs$lang$maxFixedArity = 3;
|
|
G__13882.cljs$lang$applyTo = function(arglist__13883) {
|
|
var x = cljs.core.first(arglist__13883);
|
|
arglist__13883 = cljs.core.next(arglist__13883);
|
|
var y = cljs.core.first(arglist__13883);
|
|
arglist__13883 = cljs.core.next(arglist__13883);
|
|
var z = cljs.core.first(arglist__13883);
|
|
var args = cljs.core.rest(arglist__13883);
|
|
return G__13882__delegate(x, y, z, args)
|
|
};
|
|
G__13882.cljs$core$IFn$_invoke$arity$variadic = G__13882__delegate;
|
|
return G__13882
|
|
}();
|
|
spn = function(x, y, z, var_args) {
|
|
var args = var_args;
|
|
switch(arguments.length) {
|
|
case 0:
|
|
return spn__0.call(this);
|
|
case 1:
|
|
return spn__1.call(this, x);
|
|
case 2:
|
|
return spn__2.call(this, x, y);
|
|
case 3:
|
|
return spn__3.call(this, x, y, z);
|
|
default:
|
|
return spn__4.cljs$core$IFn$_invoke$arity$variadic(x, y, z, cljs.core.array_seq(arguments, 3))
|
|
}
|
|
throw new Error("Invalid arity: " + arguments.length);
|
|
};
|
|
spn.cljs$lang$maxFixedArity = 3;
|
|
spn.cljs$lang$applyTo = spn__4.cljs$lang$applyTo;
|
|
spn.cljs$core$IFn$_invoke$arity$0 = spn__0;
|
|
spn.cljs$core$IFn$_invoke$arity$1 = spn__1;
|
|
spn.cljs$core$IFn$_invoke$arity$2 = spn__2;
|
|
spn.cljs$core$IFn$_invoke$arity$3 = spn__3;
|
|
spn.cljs$core$IFn$_invoke$arity$variadic = spn__4.cljs$core$IFn$_invoke$arity$variadic;
|
|
return spn
|
|
}()
|
|
};
|
|
var G__13881 = function(p1, p2, p3, var_args) {
|
|
var ps = null;
|
|
if(arguments.length > 3) {
|
|
ps = cljs.core.array_seq(Array.prototype.slice.call(arguments, 3), 0)
|
|
}
|
|
return G__13881__delegate.call(this, p1, p2, p3, ps)
|
|
};
|
|
G__13881.cljs$lang$maxFixedArity = 3;
|
|
G__13881.cljs$lang$applyTo = function(arglist__13884) {
|
|
var p1 = cljs.core.first(arglist__13884);
|
|
arglist__13884 = cljs.core.next(arglist__13884);
|
|
var p2 = cljs.core.first(arglist__13884);
|
|
arglist__13884 = cljs.core.next(arglist__13884);
|
|
var p3 = cljs.core.first(arglist__13884);
|
|
var ps = cljs.core.rest(arglist__13884);
|
|
return G__13881__delegate(p1, p2, p3, ps)
|
|
};
|
|
G__13881.cljs$core$IFn$_invoke$arity$variadic = G__13881__delegate;
|
|
return G__13881
|
|
}();
|
|
some_fn = function(p1, p2, p3, var_args) {
|
|
var ps = var_args;
|
|
switch(arguments.length) {
|
|
case 1:
|
|
return some_fn__1.call(this, p1);
|
|
case 2:
|
|
return some_fn__2.call(this, p1, p2);
|
|
case 3:
|
|
return some_fn__3.call(this, p1, p2, p3);
|
|
default:
|
|
return some_fn__4.cljs$core$IFn$_invoke$arity$variadic(p1, p2, p3, cljs.core.array_seq(arguments, 3))
|
|
}
|
|
throw new Error("Invalid arity: " + arguments.length);
|
|
};
|
|
some_fn.cljs$lang$maxFixedArity = 3;
|
|
some_fn.cljs$lang$applyTo = some_fn__4.cljs$lang$applyTo;
|
|
some_fn.cljs$core$IFn$_invoke$arity$1 = some_fn__1;
|
|
some_fn.cljs$core$IFn$_invoke$arity$2 = some_fn__2;
|
|
some_fn.cljs$core$IFn$_invoke$arity$3 = some_fn__3;
|
|
some_fn.cljs$core$IFn$_invoke$arity$variadic = some_fn__4.cljs$core$IFn$_invoke$arity$variadic;
|
|
return some_fn
|
|
}();
|
|
cljs.core.map = function() {
|
|
var map = null;
|
|
var map__2 = function(f, coll) {
|
|
return new cljs.core.LazySeq(null, false, function() {
|
|
var temp__4092__auto__ = cljs.core.seq.call(null, coll);
|
|
if(temp__4092__auto__) {
|
|
var s = temp__4092__auto__;
|
|
if(cljs.core.chunked_seq_QMARK_.call(null, s)) {
|
|
var c = cljs.core.chunk_first.call(null, s);
|
|
var size = cljs.core.count.call(null, c);
|
|
var b = cljs.core.chunk_buffer.call(null, size);
|
|
var n__3084__auto___13886 = size;
|
|
var i_13887 = 0;
|
|
while(true) {
|
|
if(i_13887 < n__3084__auto___13886) {
|
|
cljs.core.chunk_append.call(null, b, f.call(null, cljs.core._nth.call(null, c, i_13887)));
|
|
var G__13888 = i_13887 + 1;
|
|
i_13887 = G__13888;
|
|
continue
|
|
}else {
|
|
}
|
|
break
|
|
}
|
|
return cljs.core.chunk_cons.call(null, cljs.core.chunk.call(null, b), map.call(null, f, cljs.core.chunk_rest.call(null, s)))
|
|
}else {
|
|
return cljs.core.cons.call(null, f.call(null, cljs.core.first.call(null, s)), map.call(null, f, cljs.core.rest.call(null, s)))
|
|
}
|
|
}else {
|
|
return null
|
|
}
|
|
}, null)
|
|
};
|
|
var map__3 = function(f, c1, c2) {
|
|
return new cljs.core.LazySeq(null, false, function() {
|
|
var s1 = cljs.core.seq.call(null, c1);
|
|
var s2 = cljs.core.seq.call(null, c2);
|
|
if(function() {
|
|
var and__3941__auto__ = s1;
|
|
if(and__3941__auto__) {
|
|
return s2
|
|
}else {
|
|
return and__3941__auto__
|
|
}
|
|
}()) {
|
|
return cljs.core.cons.call(null, f.call(null, cljs.core.first.call(null, s1), cljs.core.first.call(null, s2)), map.call(null, f, cljs.core.rest.call(null, s1), cljs.core.rest.call(null, s2)))
|
|
}else {
|
|
return null
|
|
}
|
|
}, null)
|
|
};
|
|
var map__4 = function(f, c1, c2, c3) {
|
|
return new cljs.core.LazySeq(null, false, function() {
|
|
var s1 = cljs.core.seq.call(null, c1);
|
|
var s2 = cljs.core.seq.call(null, c2);
|
|
var s3 = cljs.core.seq.call(null, c3);
|
|
if(function() {
|
|
var and__3941__auto__ = s1;
|
|
if(and__3941__auto__) {
|
|
var and__3941__auto____$1 = s2;
|
|
if(and__3941__auto____$1) {
|
|
return s3
|
|
}else {
|
|
return and__3941__auto____$1
|
|
}
|
|
}else {
|
|
return and__3941__auto__
|
|
}
|
|
}()) {
|
|
return cljs.core.cons.call(null, f.call(null, cljs.core.first.call(null, s1), cljs.core.first.call(null, s2), cljs.core.first.call(null, s3)), map.call(null, f, cljs.core.rest.call(null, s1), cljs.core.rest.call(null, s2), cljs.core.rest.call(null, s3)))
|
|
}else {
|
|
return null
|
|
}
|
|
}, null)
|
|
};
|
|
var map__5 = function() {
|
|
var G__13889__delegate = function(f, c1, c2, c3, colls) {
|
|
var step = function step(cs) {
|
|
return new cljs.core.LazySeq(null, false, function() {
|
|
var ss = map.call(null, cljs.core.seq, cs);
|
|
if(cljs.core.every_QMARK_.call(null, cljs.core.identity, ss)) {
|
|
return cljs.core.cons.call(null, map.call(null, cljs.core.first, ss), step.call(null, map.call(null, cljs.core.rest, ss)))
|
|
}else {
|
|
return null
|
|
}
|
|
}, null)
|
|
};
|
|
return map.call(null, function(p1__13885_SHARP_) {
|
|
return cljs.core.apply.call(null, f, p1__13885_SHARP_)
|
|
}, step.call(null, cljs.core.conj.call(null, colls, c3, c2, c1)))
|
|
};
|
|
var G__13889 = function(f, c1, c2, c3, var_args) {
|
|
var colls = null;
|
|
if(arguments.length > 4) {
|
|
colls = cljs.core.array_seq(Array.prototype.slice.call(arguments, 4), 0)
|
|
}
|
|
return G__13889__delegate.call(this, f, c1, c2, c3, colls)
|
|
};
|
|
G__13889.cljs$lang$maxFixedArity = 4;
|
|
G__13889.cljs$lang$applyTo = function(arglist__13890) {
|
|
var f = cljs.core.first(arglist__13890);
|
|
arglist__13890 = cljs.core.next(arglist__13890);
|
|
var c1 = cljs.core.first(arglist__13890);
|
|
arglist__13890 = cljs.core.next(arglist__13890);
|
|
var c2 = cljs.core.first(arglist__13890);
|
|
arglist__13890 = cljs.core.next(arglist__13890);
|
|
var c3 = cljs.core.first(arglist__13890);
|
|
var colls = cljs.core.rest(arglist__13890);
|
|
return G__13889__delegate(f, c1, c2, c3, colls)
|
|
};
|
|
G__13889.cljs$core$IFn$_invoke$arity$variadic = G__13889__delegate;
|
|
return G__13889
|
|
}();
|
|
map = function(f, c1, c2, c3, var_args) {
|
|
var colls = var_args;
|
|
switch(arguments.length) {
|
|
case 2:
|
|
return map__2.call(this, f, c1);
|
|
case 3:
|
|
return map__3.call(this, f, c1, c2);
|
|
case 4:
|
|
return map__4.call(this, f, c1, c2, c3);
|
|
default:
|
|
return map__5.cljs$core$IFn$_invoke$arity$variadic(f, c1, c2, c3, cljs.core.array_seq(arguments, 4))
|
|
}
|
|
throw new Error("Invalid arity: " + arguments.length);
|
|
};
|
|
map.cljs$lang$maxFixedArity = 4;
|
|
map.cljs$lang$applyTo = map__5.cljs$lang$applyTo;
|
|
map.cljs$core$IFn$_invoke$arity$2 = map__2;
|
|
map.cljs$core$IFn$_invoke$arity$3 = map__3;
|
|
map.cljs$core$IFn$_invoke$arity$4 = map__4;
|
|
map.cljs$core$IFn$_invoke$arity$variadic = map__5.cljs$core$IFn$_invoke$arity$variadic;
|
|
return map
|
|
}();
|
|
cljs.core.take = function take(n, coll) {
|
|
return new cljs.core.LazySeq(null, false, function() {
|
|
if(n > 0) {
|
|
var temp__4092__auto__ = cljs.core.seq.call(null, coll);
|
|
if(temp__4092__auto__) {
|
|
var s = temp__4092__auto__;
|
|
return cljs.core.cons.call(null, cljs.core.first.call(null, s), take.call(null, n - 1, cljs.core.rest.call(null, s)))
|
|
}else {
|
|
return null
|
|
}
|
|
}else {
|
|
return null
|
|
}
|
|
}, null)
|
|
};
|
|
cljs.core.drop = function drop(n, coll) {
|
|
var step = function(n__$1, coll__$1) {
|
|
while(true) {
|
|
var s = cljs.core.seq.call(null, coll__$1);
|
|
if(cljs.core.truth_(function() {
|
|
var and__3941__auto__ = n__$1 > 0;
|
|
if(and__3941__auto__) {
|
|
return s
|
|
}else {
|
|
return and__3941__auto__
|
|
}
|
|
}())) {
|
|
var G__13891 = n__$1 - 1;
|
|
var G__13892 = cljs.core.rest.call(null, s);
|
|
n__$1 = G__13891;
|
|
coll__$1 = G__13892;
|
|
continue
|
|
}else {
|
|
return s
|
|
}
|
|
break
|
|
}
|
|
};
|
|
return new cljs.core.LazySeq(null, false, function() {
|
|
return step.call(null, n, coll)
|
|
}, null)
|
|
};
|
|
cljs.core.drop_last = function() {
|
|
var drop_last = null;
|
|
var drop_last__1 = function(s) {
|
|
return drop_last.call(null, 1, s)
|
|
};
|
|
var drop_last__2 = function(n, s) {
|
|
return cljs.core.map.call(null, function(x, _) {
|
|
return x
|
|
}, s, cljs.core.drop.call(null, n, s))
|
|
};
|
|
drop_last = function(n, s) {
|
|
switch(arguments.length) {
|
|
case 1:
|
|
return drop_last__1.call(this, n);
|
|
case 2:
|
|
return drop_last__2.call(this, n, s)
|
|
}
|
|
throw new Error("Invalid arity: " + arguments.length);
|
|
};
|
|
drop_last.cljs$core$IFn$_invoke$arity$1 = drop_last__1;
|
|
drop_last.cljs$core$IFn$_invoke$arity$2 = drop_last__2;
|
|
return drop_last
|
|
}();
|
|
cljs.core.take_last = function take_last(n, coll) {
|
|
var s = cljs.core.seq.call(null, coll);
|
|
var lead = cljs.core.seq.call(null, cljs.core.drop.call(null, n, coll));
|
|
while(true) {
|
|
if(lead) {
|
|
var G__13893 = cljs.core.next.call(null, s);
|
|
var G__13894 = cljs.core.next.call(null, lead);
|
|
s = G__13893;
|
|
lead = G__13894;
|
|
continue
|
|
}else {
|
|
return s
|
|
}
|
|
break
|
|
}
|
|
};
|
|
cljs.core.drop_while = function drop_while(pred, coll) {
|
|
var step = function(pred__$1, coll__$1) {
|
|
while(true) {
|
|
var s = cljs.core.seq.call(null, coll__$1);
|
|
if(cljs.core.truth_(function() {
|
|
var and__3941__auto__ = s;
|
|
if(and__3941__auto__) {
|
|
return pred__$1.call(null, cljs.core.first.call(null, s))
|
|
}else {
|
|
return and__3941__auto__
|
|
}
|
|
}())) {
|
|
var G__13895 = pred__$1;
|
|
var G__13896 = cljs.core.rest.call(null, s);
|
|
pred__$1 = G__13895;
|
|
coll__$1 = G__13896;
|
|
continue
|
|
}else {
|
|
return s
|
|
}
|
|
break
|
|
}
|
|
};
|
|
return new cljs.core.LazySeq(null, false, function() {
|
|
return step.call(null, pred, coll)
|
|
}, null)
|
|
};
|
|
cljs.core.cycle = function cycle(coll) {
|
|
return new cljs.core.LazySeq(null, false, function() {
|
|
var temp__4092__auto__ = cljs.core.seq.call(null, coll);
|
|
if(temp__4092__auto__) {
|
|
var s = temp__4092__auto__;
|
|
return cljs.core.concat.call(null, s, cycle.call(null, s))
|
|
}else {
|
|
return null
|
|
}
|
|
}, null)
|
|
};
|
|
cljs.core.split_at = function split_at(n, coll) {
|
|
return cljs.core.PersistentVector.fromArray([cljs.core.take.call(null, n, coll), cljs.core.drop.call(null, n, coll)], true)
|
|
};
|
|
cljs.core.repeat = function() {
|
|
var repeat = null;
|
|
var repeat__1 = function(x) {
|
|
return new cljs.core.LazySeq(null, false, function() {
|
|
return cljs.core.cons.call(null, x, repeat.call(null, x))
|
|
}, null)
|
|
};
|
|
var repeat__2 = function(n, x) {
|
|
return cljs.core.take.call(null, n, repeat.call(null, x))
|
|
};
|
|
repeat = function(n, x) {
|
|
switch(arguments.length) {
|
|
case 1:
|
|
return repeat__1.call(this, n);
|
|
case 2:
|
|
return repeat__2.call(this, n, x)
|
|
}
|
|
throw new Error("Invalid arity: " + arguments.length);
|
|
};
|
|
repeat.cljs$core$IFn$_invoke$arity$1 = repeat__1;
|
|
repeat.cljs$core$IFn$_invoke$arity$2 = repeat__2;
|
|
return repeat
|
|
}();
|
|
cljs.core.replicate = function replicate(n, x) {
|
|
return cljs.core.take.call(null, n, cljs.core.repeat.call(null, x))
|
|
};
|
|
cljs.core.repeatedly = function() {
|
|
var repeatedly = null;
|
|
var repeatedly__1 = function(f) {
|
|
return new cljs.core.LazySeq(null, false, function() {
|
|
return cljs.core.cons.call(null, f.call(null), repeatedly.call(null, f))
|
|
}, null)
|
|
};
|
|
var repeatedly__2 = function(n, f) {
|
|
return cljs.core.take.call(null, n, repeatedly.call(null, f))
|
|
};
|
|
repeatedly = function(n, f) {
|
|
switch(arguments.length) {
|
|
case 1:
|
|
return repeatedly__1.call(this, n);
|
|
case 2:
|
|
return repeatedly__2.call(this, n, f)
|
|
}
|
|
throw new Error("Invalid arity: " + arguments.length);
|
|
};
|
|
repeatedly.cljs$core$IFn$_invoke$arity$1 = repeatedly__1;
|
|
repeatedly.cljs$core$IFn$_invoke$arity$2 = repeatedly__2;
|
|
return repeatedly
|
|
}();
|
|
cljs.core.iterate = function iterate(f, x) {
|
|
return cljs.core.cons.call(null, x, new cljs.core.LazySeq(null, false, function() {
|
|
return iterate.call(null, f, f.call(null, x))
|
|
}, null))
|
|
};
|
|
cljs.core.interleave = function() {
|
|
var interleave = null;
|
|
var interleave__2 = function(c1, c2) {
|
|
return new cljs.core.LazySeq(null, false, function() {
|
|
var s1 = cljs.core.seq.call(null, c1);
|
|
var s2 = cljs.core.seq.call(null, c2);
|
|
if(function() {
|
|
var and__3941__auto__ = s1;
|
|
if(and__3941__auto__) {
|
|
return s2
|
|
}else {
|
|
return and__3941__auto__
|
|
}
|
|
}()) {
|
|
return cljs.core.cons.call(null, cljs.core.first.call(null, s1), cljs.core.cons.call(null, cljs.core.first.call(null, s2), interleave.call(null, cljs.core.rest.call(null, s1), cljs.core.rest.call(null, s2))))
|
|
}else {
|
|
return null
|
|
}
|
|
}, null)
|
|
};
|
|
var interleave__3 = function() {
|
|
var G__13897__delegate = function(c1, c2, colls) {
|
|
return new cljs.core.LazySeq(null, false, function() {
|
|
var ss = cljs.core.map.call(null, cljs.core.seq, cljs.core.conj.call(null, colls, c2, c1));
|
|
if(cljs.core.every_QMARK_.call(null, cljs.core.identity, ss)) {
|
|
return cljs.core.concat.call(null, cljs.core.map.call(null, cljs.core.first, ss), cljs.core.apply.call(null, interleave, cljs.core.map.call(null, cljs.core.rest, ss)))
|
|
}else {
|
|
return null
|
|
}
|
|
}, null)
|
|
};
|
|
var G__13897 = function(c1, c2, var_args) {
|
|
var colls = null;
|
|
if(arguments.length > 2) {
|
|
colls = cljs.core.array_seq(Array.prototype.slice.call(arguments, 2), 0)
|
|
}
|
|
return G__13897__delegate.call(this, c1, c2, colls)
|
|
};
|
|
G__13897.cljs$lang$maxFixedArity = 2;
|
|
G__13897.cljs$lang$applyTo = function(arglist__13898) {
|
|
var c1 = cljs.core.first(arglist__13898);
|
|
arglist__13898 = cljs.core.next(arglist__13898);
|
|
var c2 = cljs.core.first(arglist__13898);
|
|
var colls = cljs.core.rest(arglist__13898);
|
|
return G__13897__delegate(c1, c2, colls)
|
|
};
|
|
G__13897.cljs$core$IFn$_invoke$arity$variadic = G__13897__delegate;
|
|
return G__13897
|
|
}();
|
|
interleave = function(c1, c2, var_args) {
|
|
var colls = var_args;
|
|
switch(arguments.length) {
|
|
case 2:
|
|
return interleave__2.call(this, c1, c2);
|
|
default:
|
|
return interleave__3.cljs$core$IFn$_invoke$arity$variadic(c1, c2, cljs.core.array_seq(arguments, 2))
|
|
}
|
|
throw new Error("Invalid arity: " + arguments.length);
|
|
};
|
|
interleave.cljs$lang$maxFixedArity = 2;
|
|
interleave.cljs$lang$applyTo = interleave__3.cljs$lang$applyTo;
|
|
interleave.cljs$core$IFn$_invoke$arity$2 = interleave__2;
|
|
interleave.cljs$core$IFn$_invoke$arity$variadic = interleave__3.cljs$core$IFn$_invoke$arity$variadic;
|
|
return interleave
|
|
}();
|
|
cljs.core.interpose = function interpose(sep, coll) {
|
|
return cljs.core.drop.call(null, 1, cljs.core.interleave.call(null, cljs.core.repeat.call(null, sep), coll))
|
|
};
|
|
cljs.core.flatten1 = function flatten1(colls) {
|
|
var cat = function cat(coll, colls__$1) {
|
|
return new cljs.core.LazySeq(null, false, function() {
|
|
var temp__4090__auto__ = cljs.core.seq.call(null, coll);
|
|
if(temp__4090__auto__) {
|
|
var coll__$1 = temp__4090__auto__;
|
|
return cljs.core.cons.call(null, cljs.core.first.call(null, coll__$1), cat.call(null, cljs.core.rest.call(null, coll__$1), colls__$1))
|
|
}else {
|
|
if(cljs.core.seq.call(null, colls__$1)) {
|
|
return cat.call(null, cljs.core.first.call(null, colls__$1), cljs.core.rest.call(null, colls__$1))
|
|
}else {
|
|
return null
|
|
}
|
|
}
|
|
}, null)
|
|
};
|
|
return cat.call(null, null, colls)
|
|
};
|
|
cljs.core.mapcat = function() {
|
|
var mapcat = null;
|
|
var mapcat__2 = function(f, coll) {
|
|
return cljs.core.flatten1.call(null, cljs.core.map.call(null, f, coll))
|
|
};
|
|
var mapcat__3 = function() {
|
|
var G__13899__delegate = function(f, coll, colls) {
|
|
return cljs.core.flatten1.call(null, cljs.core.apply.call(null, cljs.core.map, f, coll, colls))
|
|
};
|
|
var G__13899 = function(f, coll, var_args) {
|
|
var colls = null;
|
|
if(arguments.length > 2) {
|
|
colls = cljs.core.array_seq(Array.prototype.slice.call(arguments, 2), 0)
|
|
}
|
|
return G__13899__delegate.call(this, f, coll, colls)
|
|
};
|
|
G__13899.cljs$lang$maxFixedArity = 2;
|
|
G__13899.cljs$lang$applyTo = function(arglist__13900) {
|
|
var f = cljs.core.first(arglist__13900);
|
|
arglist__13900 = cljs.core.next(arglist__13900);
|
|
var coll = cljs.core.first(arglist__13900);
|
|
var colls = cljs.core.rest(arglist__13900);
|
|
return G__13899__delegate(f, coll, colls)
|
|
};
|
|
G__13899.cljs$core$IFn$_invoke$arity$variadic = G__13899__delegate;
|
|
return G__13899
|
|
}();
|
|
mapcat = function(f, coll, var_args) {
|
|
var colls = var_args;
|
|
switch(arguments.length) {
|
|
case 2:
|
|
return mapcat__2.call(this, f, coll);
|
|
default:
|
|
return mapcat__3.cljs$core$IFn$_invoke$arity$variadic(f, coll, cljs.core.array_seq(arguments, 2))
|
|
}
|
|
throw new Error("Invalid arity: " + arguments.length);
|
|
};
|
|
mapcat.cljs$lang$maxFixedArity = 2;
|
|
mapcat.cljs$lang$applyTo = mapcat__3.cljs$lang$applyTo;
|
|
mapcat.cljs$core$IFn$_invoke$arity$2 = mapcat__2;
|
|
mapcat.cljs$core$IFn$_invoke$arity$variadic = mapcat__3.cljs$core$IFn$_invoke$arity$variadic;
|
|
return mapcat
|
|
}();
|
|
cljs.core.filter = function filter(pred, coll) {
|
|
return new cljs.core.LazySeq(null, false, function() {
|
|
var temp__4092__auto__ = cljs.core.seq.call(null, coll);
|
|
if(temp__4092__auto__) {
|
|
var s = temp__4092__auto__;
|
|
if(cljs.core.chunked_seq_QMARK_.call(null, s)) {
|
|
var c = cljs.core.chunk_first.call(null, s);
|
|
var size = cljs.core.count.call(null, c);
|
|
var b = cljs.core.chunk_buffer.call(null, size);
|
|
var n__3084__auto___13901 = size;
|
|
var i_13902 = 0;
|
|
while(true) {
|
|
if(i_13902 < n__3084__auto___13901) {
|
|
if(cljs.core.truth_(pred.call(null, cljs.core._nth.call(null, c, i_13902)))) {
|
|
cljs.core.chunk_append.call(null, b, cljs.core._nth.call(null, c, i_13902))
|
|
}else {
|
|
}
|
|
var G__13903 = i_13902 + 1;
|
|
i_13902 = G__13903;
|
|
continue
|
|
}else {
|
|
}
|
|
break
|
|
}
|
|
return cljs.core.chunk_cons.call(null, cljs.core.chunk.call(null, b), filter.call(null, pred, cljs.core.chunk_rest.call(null, s)))
|
|
}else {
|
|
var f = cljs.core.first.call(null, s);
|
|
var r = cljs.core.rest.call(null, s);
|
|
if(cljs.core.truth_(pred.call(null, f))) {
|
|
return cljs.core.cons.call(null, f, filter.call(null, pred, r))
|
|
}else {
|
|
return filter.call(null, pred, r)
|
|
}
|
|
}
|
|
}else {
|
|
return null
|
|
}
|
|
}, null)
|
|
};
|
|
cljs.core.remove = function remove(pred, coll) {
|
|
return cljs.core.filter.call(null, cljs.core.complement.call(null, pred), coll)
|
|
};
|
|
cljs.core.tree_seq = function tree_seq(branch_QMARK_, children, root) {
|
|
var walk = function walk(node) {
|
|
return new cljs.core.LazySeq(null, false, function() {
|
|
return cljs.core.cons.call(null, node, cljs.core.truth_(branch_QMARK_.call(null, node)) ? cljs.core.mapcat.call(null, walk, children.call(null, node)) : null)
|
|
}, null)
|
|
};
|
|
return walk.call(null, root)
|
|
};
|
|
cljs.core.flatten = function flatten(x) {
|
|
return cljs.core.filter.call(null, function(p1__13904_SHARP_) {
|
|
return!cljs.core.sequential_QMARK_.call(null, p1__13904_SHARP_)
|
|
}, cljs.core.rest.call(null, cljs.core.tree_seq.call(null, cljs.core.sequential_QMARK_, cljs.core.seq, x)))
|
|
};
|
|
cljs.core.into = function into(to, from) {
|
|
if(!(to == null)) {
|
|
if(function() {
|
|
var G__13906 = to;
|
|
if(G__13906) {
|
|
if(function() {
|
|
var or__3943__auto__ = G__13906.cljs$lang$protocol_mask$partition1$ & 4;
|
|
if(or__3943__auto__) {
|
|
return or__3943__auto__
|
|
}else {
|
|
return G__13906.cljs$core$IEditableCollection$
|
|
}
|
|
}()) {
|
|
return true
|
|
}else {
|
|
return false
|
|
}
|
|
}else {
|
|
return false
|
|
}
|
|
}()) {
|
|
return cljs.core.persistent_BANG_.call(null, cljs.core.reduce.call(null, cljs.core._conj_BANG_, cljs.core.transient$.call(null, to), from))
|
|
}else {
|
|
return cljs.core.reduce.call(null, cljs.core._conj, to, from)
|
|
}
|
|
}else {
|
|
return cljs.core.reduce.call(null, cljs.core.conj, cljs.core.List.EMPTY, from)
|
|
}
|
|
};
|
|
cljs.core.mapv = function() {
|
|
var mapv = null;
|
|
var mapv__2 = function(f, coll) {
|
|
return cljs.core.persistent_BANG_.call(null, cljs.core.reduce.call(null, function(v, o) {
|
|
return cljs.core.conj_BANG_.call(null, v, f.call(null, o))
|
|
}, cljs.core.transient$.call(null, cljs.core.PersistentVector.EMPTY), coll))
|
|
};
|
|
var mapv__3 = function(f, c1, c2) {
|
|
return cljs.core.into.call(null, cljs.core.PersistentVector.EMPTY, cljs.core.map.call(null, f, c1, c2))
|
|
};
|
|
var mapv__4 = function(f, c1, c2, c3) {
|
|
return cljs.core.into.call(null, cljs.core.PersistentVector.EMPTY, cljs.core.map.call(null, f, c1, c2, c3))
|
|
};
|
|
var mapv__5 = function() {
|
|
var G__13907__delegate = function(f, c1, c2, c3, colls) {
|
|
return cljs.core.into.call(null, cljs.core.PersistentVector.EMPTY, cljs.core.apply.call(null, cljs.core.map, f, c1, c2, c3, colls))
|
|
};
|
|
var G__13907 = function(f, c1, c2, c3, var_args) {
|
|
var colls = null;
|
|
if(arguments.length > 4) {
|
|
colls = cljs.core.array_seq(Array.prototype.slice.call(arguments, 4), 0)
|
|
}
|
|
return G__13907__delegate.call(this, f, c1, c2, c3, colls)
|
|
};
|
|
G__13907.cljs$lang$maxFixedArity = 4;
|
|
G__13907.cljs$lang$applyTo = function(arglist__13908) {
|
|
var f = cljs.core.first(arglist__13908);
|
|
arglist__13908 = cljs.core.next(arglist__13908);
|
|
var c1 = cljs.core.first(arglist__13908);
|
|
arglist__13908 = cljs.core.next(arglist__13908);
|
|
var c2 = cljs.core.first(arglist__13908);
|
|
arglist__13908 = cljs.core.next(arglist__13908);
|
|
var c3 = cljs.core.first(arglist__13908);
|
|
var colls = cljs.core.rest(arglist__13908);
|
|
return G__13907__delegate(f, c1, c2, c3, colls)
|
|
};
|
|
G__13907.cljs$core$IFn$_invoke$arity$variadic = G__13907__delegate;
|
|
return G__13907
|
|
}();
|
|
mapv = function(f, c1, c2, c3, var_args) {
|
|
var colls = var_args;
|
|
switch(arguments.length) {
|
|
case 2:
|
|
return mapv__2.call(this, f, c1);
|
|
case 3:
|
|
return mapv__3.call(this, f, c1, c2);
|
|
case 4:
|
|
return mapv__4.call(this, f, c1, c2, c3);
|
|
default:
|
|
return mapv__5.cljs$core$IFn$_invoke$arity$variadic(f, c1, c2, c3, cljs.core.array_seq(arguments, 4))
|
|
}
|
|
throw new Error("Invalid arity: " + arguments.length);
|
|
};
|
|
mapv.cljs$lang$maxFixedArity = 4;
|
|
mapv.cljs$lang$applyTo = mapv__5.cljs$lang$applyTo;
|
|
mapv.cljs$core$IFn$_invoke$arity$2 = mapv__2;
|
|
mapv.cljs$core$IFn$_invoke$arity$3 = mapv__3;
|
|
mapv.cljs$core$IFn$_invoke$arity$4 = mapv__4;
|
|
mapv.cljs$core$IFn$_invoke$arity$variadic = mapv__5.cljs$core$IFn$_invoke$arity$variadic;
|
|
return mapv
|
|
}();
|
|
cljs.core.filterv = function filterv(pred, coll) {
|
|
return cljs.core.persistent_BANG_.call(null, cljs.core.reduce.call(null, function(v, o) {
|
|
if(cljs.core.truth_(pred.call(null, o))) {
|
|
return cljs.core.conj_BANG_.call(null, v, o)
|
|
}else {
|
|
return v
|
|
}
|
|
}, cljs.core.transient$.call(null, cljs.core.PersistentVector.EMPTY), coll))
|
|
};
|
|
cljs.core.partition = function() {
|
|
var partition = null;
|
|
var partition__2 = function(n, coll) {
|
|
return partition.call(null, n, n, coll)
|
|
};
|
|
var partition__3 = function(n, step, coll) {
|
|
return new cljs.core.LazySeq(null, false, function() {
|
|
var temp__4092__auto__ = cljs.core.seq.call(null, coll);
|
|
if(temp__4092__auto__) {
|
|
var s = temp__4092__auto__;
|
|
var p = cljs.core.take.call(null, n, s);
|
|
if(n === cljs.core.count.call(null, p)) {
|
|
return cljs.core.cons.call(null, p, partition.call(null, n, step, cljs.core.drop.call(null, step, s)))
|
|
}else {
|
|
return null
|
|
}
|
|
}else {
|
|
return null
|
|
}
|
|
}, null)
|
|
};
|
|
var partition__4 = function(n, step, pad, coll) {
|
|
return new cljs.core.LazySeq(null, false, function() {
|
|
var temp__4092__auto__ = cljs.core.seq.call(null, coll);
|
|
if(temp__4092__auto__) {
|
|
var s = temp__4092__auto__;
|
|
var p = cljs.core.take.call(null, n, s);
|
|
if(n === cljs.core.count.call(null, p)) {
|
|
return cljs.core.cons.call(null, p, partition.call(null, n, step, pad, cljs.core.drop.call(null, step, s)))
|
|
}else {
|
|
return cljs.core.list.call(null, cljs.core.take.call(null, n, cljs.core.concat.call(null, p, pad)))
|
|
}
|
|
}else {
|
|
return null
|
|
}
|
|
}, null)
|
|
};
|
|
partition = function(n, step, pad, coll) {
|
|
switch(arguments.length) {
|
|
case 2:
|
|
return partition__2.call(this, n, step);
|
|
case 3:
|
|
return partition__3.call(this, n, step, pad);
|
|
case 4:
|
|
return partition__4.call(this, n, step, pad, coll)
|
|
}
|
|
throw new Error("Invalid arity: " + arguments.length);
|
|
};
|
|
partition.cljs$core$IFn$_invoke$arity$2 = partition__2;
|
|
partition.cljs$core$IFn$_invoke$arity$3 = partition__3;
|
|
partition.cljs$core$IFn$_invoke$arity$4 = partition__4;
|
|
return partition
|
|
}();
|
|
cljs.core.get_in = function() {
|
|
var get_in = null;
|
|
var get_in__2 = function(m, ks) {
|
|
return get_in.call(null, m, ks, null)
|
|
};
|
|
var get_in__3 = function(m, ks, not_found) {
|
|
var sentinel = cljs.core.lookup_sentinel;
|
|
var m__$1 = m;
|
|
var ks__$1 = cljs.core.seq.call(null, ks);
|
|
while(true) {
|
|
if(ks__$1) {
|
|
if(!function() {
|
|
var G__13910 = m__$1;
|
|
if(G__13910) {
|
|
if(function() {
|
|
var or__3943__auto__ = G__13910.cljs$lang$protocol_mask$partition0$ & 256;
|
|
if(or__3943__auto__) {
|
|
return or__3943__auto__
|
|
}else {
|
|
return G__13910.cljs$core$ILookup$
|
|
}
|
|
}()) {
|
|
return true
|
|
}else {
|
|
if(!G__13910.cljs$lang$protocol_mask$partition0$) {
|
|
return cljs.core.type_satisfies_.call(null, cljs.core.ILookup, G__13910)
|
|
}else {
|
|
return false
|
|
}
|
|
}
|
|
}else {
|
|
return cljs.core.type_satisfies_.call(null, cljs.core.ILookup, G__13910)
|
|
}
|
|
}()) {
|
|
return not_found
|
|
}else {
|
|
var m__$2 = cljs.core.get.call(null, m__$1, cljs.core.first.call(null, ks__$1), sentinel);
|
|
if(sentinel === m__$2) {
|
|
return not_found
|
|
}else {
|
|
var G__13911 = sentinel;
|
|
var G__13912 = m__$2;
|
|
var G__13913 = cljs.core.next.call(null, ks__$1);
|
|
sentinel = G__13911;
|
|
m__$1 = G__13912;
|
|
ks__$1 = G__13913;
|
|
continue
|
|
}
|
|
}
|
|
}else {
|
|
return m__$1
|
|
}
|
|
break
|
|
}
|
|
};
|
|
get_in = function(m, ks, not_found) {
|
|
switch(arguments.length) {
|
|
case 2:
|
|
return get_in__2.call(this, m, ks);
|
|
case 3:
|
|
return get_in__3.call(this, m, ks, not_found)
|
|
}
|
|
throw new Error("Invalid arity: " + arguments.length);
|
|
};
|
|
get_in.cljs$core$IFn$_invoke$arity$2 = get_in__2;
|
|
get_in.cljs$core$IFn$_invoke$arity$3 = get_in__3;
|
|
return get_in
|
|
}();
|
|
cljs.core.assoc_in = function assoc_in(m, p__13914, v) {
|
|
var vec__13916 = p__13914;
|
|
var k = cljs.core.nth.call(null, vec__13916, 0, null);
|
|
var ks = cljs.core.nthnext.call(null, vec__13916, 1);
|
|
if(cljs.core.truth_(ks)) {
|
|
return cljs.core.assoc.call(null, m, k, assoc_in.call(null, cljs.core.get.call(null, m, k), ks, v))
|
|
}else {
|
|
return cljs.core.assoc.call(null, m, k, v)
|
|
}
|
|
};
|
|
cljs.core.update_in = function() {
|
|
var update_in = null;
|
|
var update_in__3 = function(m, p__13917, f) {
|
|
var vec__13927 = p__13917;
|
|
var k = cljs.core.nth.call(null, vec__13927, 0, null);
|
|
var ks = cljs.core.nthnext.call(null, vec__13927, 1);
|
|
if(cljs.core.truth_(ks)) {
|
|
return cljs.core.assoc.call(null, m, k, update_in.call(null, cljs.core.get.call(null, m, k), ks, f))
|
|
}else {
|
|
return cljs.core.assoc.call(null, m, k, f.call(null, cljs.core.get.call(null, m, k)))
|
|
}
|
|
};
|
|
var update_in__4 = function(m, p__13918, f, a) {
|
|
var vec__13928 = p__13918;
|
|
var k = cljs.core.nth.call(null, vec__13928, 0, null);
|
|
var ks = cljs.core.nthnext.call(null, vec__13928, 1);
|
|
if(cljs.core.truth_(ks)) {
|
|
return cljs.core.assoc.call(null, m, k, update_in.call(null, cljs.core.get.call(null, m, k), ks, f, a))
|
|
}else {
|
|
return cljs.core.assoc.call(null, m, k, f.call(null, cljs.core.get.call(null, m, k), a))
|
|
}
|
|
};
|
|
var update_in__5 = function(m, p__13919, f, a, b) {
|
|
var vec__13929 = p__13919;
|
|
var k = cljs.core.nth.call(null, vec__13929, 0, null);
|
|
var ks = cljs.core.nthnext.call(null, vec__13929, 1);
|
|
if(cljs.core.truth_(ks)) {
|
|
return cljs.core.assoc.call(null, m, k, update_in.call(null, cljs.core.get.call(null, m, k), ks, f, a, b))
|
|
}else {
|
|
return cljs.core.assoc.call(null, m, k, f.call(null, cljs.core.get.call(null, m, k), a, b))
|
|
}
|
|
};
|
|
var update_in__6 = function(m, p__13920, f, a, b, c) {
|
|
var vec__13930 = p__13920;
|
|
var k = cljs.core.nth.call(null, vec__13930, 0, null);
|
|
var ks = cljs.core.nthnext.call(null, vec__13930, 1);
|
|
if(cljs.core.truth_(ks)) {
|
|
return cljs.core.assoc.call(null, m, k, update_in.call(null, cljs.core.get.call(null, m, k), ks, f, a, b, c))
|
|
}else {
|
|
return cljs.core.assoc.call(null, m, k, f.call(null, cljs.core.get.call(null, m, k), a, b, c))
|
|
}
|
|
};
|
|
var update_in__7 = function() {
|
|
var G__13932__delegate = function(m, p__13921, f, a, b, c, args) {
|
|
var vec__13931 = p__13921;
|
|
var k = cljs.core.nth.call(null, vec__13931, 0, null);
|
|
var ks = cljs.core.nthnext.call(null, vec__13931, 1);
|
|
if(cljs.core.truth_(ks)) {
|
|
return cljs.core.assoc.call(null, m, k, cljs.core.apply.call(null, update_in, cljs.core.get.call(null, m, k), ks, f, a, b, c, args))
|
|
}else {
|
|
return cljs.core.assoc.call(null, m, k, cljs.core.apply.call(null, f, cljs.core.get.call(null, m, k), a, b, c, args))
|
|
}
|
|
};
|
|
var G__13932 = function(m, p__13921, f, a, b, c, var_args) {
|
|
var args = null;
|
|
if(arguments.length > 6) {
|
|
args = cljs.core.array_seq(Array.prototype.slice.call(arguments, 6), 0)
|
|
}
|
|
return G__13932__delegate.call(this, m, p__13921, f, a, b, c, args)
|
|
};
|
|
G__13932.cljs$lang$maxFixedArity = 6;
|
|
G__13932.cljs$lang$applyTo = function(arglist__13933) {
|
|
var m = cljs.core.first(arglist__13933);
|
|
arglist__13933 = cljs.core.next(arglist__13933);
|
|
var p__13921 = cljs.core.first(arglist__13933);
|
|
arglist__13933 = cljs.core.next(arglist__13933);
|
|
var f = cljs.core.first(arglist__13933);
|
|
arglist__13933 = cljs.core.next(arglist__13933);
|
|
var a = cljs.core.first(arglist__13933);
|
|
arglist__13933 = cljs.core.next(arglist__13933);
|
|
var b = cljs.core.first(arglist__13933);
|
|
arglist__13933 = cljs.core.next(arglist__13933);
|
|
var c = cljs.core.first(arglist__13933);
|
|
var args = cljs.core.rest(arglist__13933);
|
|
return G__13932__delegate(m, p__13921, f, a, b, c, args)
|
|
};
|
|
G__13932.cljs$core$IFn$_invoke$arity$variadic = G__13932__delegate;
|
|
return G__13932
|
|
}();
|
|
update_in = function(m, p__13921, f, a, b, c, var_args) {
|
|
var args = var_args;
|
|
switch(arguments.length) {
|
|
case 3:
|
|
return update_in__3.call(this, m, p__13921, f);
|
|
case 4:
|
|
return update_in__4.call(this, m, p__13921, f, a);
|
|
case 5:
|
|
return update_in__5.call(this, m, p__13921, f, a, b);
|
|
case 6:
|
|
return update_in__6.call(this, m, p__13921, f, a, b, c);
|
|
default:
|
|
return update_in__7.cljs$core$IFn$_invoke$arity$variadic(m, p__13921, f, a, b, c, cljs.core.array_seq(arguments, 6))
|
|
}
|
|
throw new Error("Invalid arity: " + arguments.length);
|
|
};
|
|
update_in.cljs$lang$maxFixedArity = 6;
|
|
update_in.cljs$lang$applyTo = update_in__7.cljs$lang$applyTo;
|
|
update_in.cljs$core$IFn$_invoke$arity$3 = update_in__3;
|
|
update_in.cljs$core$IFn$_invoke$arity$4 = update_in__4;
|
|
update_in.cljs$core$IFn$_invoke$arity$5 = update_in__5;
|
|
update_in.cljs$core$IFn$_invoke$arity$6 = update_in__6;
|
|
update_in.cljs$core$IFn$_invoke$arity$variadic = update_in__7.cljs$core$IFn$_invoke$arity$variadic;
|
|
return update_in
|
|
}();
|
|
goog.provide("cljs.core.VectorNode");
|
|
cljs.core.VectorNode = function(edit, arr) {
|
|
this.edit = edit;
|
|
this.arr = arr
|
|
};
|
|
cljs.core.VectorNode.cljs$lang$type = true;
|
|
cljs.core.VectorNode.cljs$lang$ctorStr = "cljs.core/VectorNode";
|
|
cljs.core.VectorNode.cljs$lang$ctorPrWriter = function(this__2850__auto__, writer__2851__auto__, opts__2852__auto__) {
|
|
return cljs.core._write.call(null, writer__2851__auto__, "cljs.core/VectorNode")
|
|
};
|
|
cljs.core.__GT_VectorNode = function __GT_VectorNode(edit, arr) {
|
|
return new cljs.core.VectorNode(edit, arr)
|
|
};
|
|
cljs.core.pv_fresh_node = function pv_fresh_node(edit) {
|
|
return new cljs.core.VectorNode(edit, new Array(32))
|
|
};
|
|
cljs.core.pv_aget = function pv_aget(node, idx) {
|
|
return node.arr[idx]
|
|
};
|
|
cljs.core.pv_aset = function pv_aset(node, idx, val) {
|
|
return node.arr[idx] = val
|
|
};
|
|
cljs.core.pv_clone_node = function pv_clone_node(node) {
|
|
return new cljs.core.VectorNode(node.edit, node.arr.slice())
|
|
};
|
|
cljs.core.tail_off = function tail_off(pv) {
|
|
var cnt = pv.cnt;
|
|
if(cnt < 32) {
|
|
return 0
|
|
}else {
|
|
return cnt - 1 >>> 5 << 5
|
|
}
|
|
};
|
|
cljs.core.new_path = function new_path(edit, level, node) {
|
|
var ll = level;
|
|
var ret = node;
|
|
while(true) {
|
|
if(ll === 0) {
|
|
return ret
|
|
}else {
|
|
var embed = ret;
|
|
var r = cljs.core.pv_fresh_node.call(null, edit);
|
|
var _ = cljs.core.pv_aset.call(null, r, 0, embed);
|
|
var G__13934 = ll - 5;
|
|
var G__13935 = r;
|
|
ll = G__13934;
|
|
ret = G__13935;
|
|
continue
|
|
}
|
|
break
|
|
}
|
|
};
|
|
cljs.core.push_tail = function push_tail(pv, level, parent, tailnode) {
|
|
var ret = cljs.core.pv_clone_node.call(null, parent);
|
|
var subidx = pv.cnt - 1 >>> level & 31;
|
|
if(5 === level) {
|
|
cljs.core.pv_aset.call(null, ret, subidx, tailnode);
|
|
return ret
|
|
}else {
|
|
var child = cljs.core.pv_aget.call(null, parent, subidx);
|
|
if(!(child == null)) {
|
|
var node_to_insert = push_tail.call(null, pv, level - 5, child, tailnode);
|
|
cljs.core.pv_aset.call(null, ret, subidx, node_to_insert);
|
|
return ret
|
|
}else {
|
|
var node_to_insert = cljs.core.new_path.call(null, null, level - 5, tailnode);
|
|
cljs.core.pv_aset.call(null, ret, subidx, node_to_insert);
|
|
return ret
|
|
}
|
|
}
|
|
};
|
|
cljs.core.vector_index_out_of_bounds = function vector_index_out_of_bounds(i, cnt) {
|
|
throw new Error([cljs.core.str("No item "), cljs.core.str(i), cljs.core.str(" in vector of length "), cljs.core.str(cnt)].join(""));
|
|
};
|
|
cljs.core.array_for = function array_for(pv, i) {
|
|
if(function() {
|
|
var and__3941__auto__ = 0 <= i;
|
|
if(and__3941__auto__) {
|
|
return i < pv.cnt
|
|
}else {
|
|
return and__3941__auto__
|
|
}
|
|
}()) {
|
|
if(i >= cljs.core.tail_off.call(null, pv)) {
|
|
return pv.tail
|
|
}else {
|
|
var node = pv.root;
|
|
var level = pv.shift;
|
|
while(true) {
|
|
if(level > 0) {
|
|
var G__13936 = cljs.core.pv_aget.call(null, node, i >>> level & 31);
|
|
var G__13937 = level - 5;
|
|
node = G__13936;
|
|
level = G__13937;
|
|
continue
|
|
}else {
|
|
return node.arr
|
|
}
|
|
break
|
|
}
|
|
}
|
|
}else {
|
|
return cljs.core.vector_index_out_of_bounds.call(null, i, pv.cnt)
|
|
}
|
|
};
|
|
cljs.core.do_assoc = function do_assoc(pv, level, node, i, val) {
|
|
var ret = cljs.core.pv_clone_node.call(null, node);
|
|
if(level === 0) {
|
|
cljs.core.pv_aset.call(null, ret, i & 31, val);
|
|
return ret
|
|
}else {
|
|
var subidx = i >>> level & 31;
|
|
cljs.core.pv_aset.call(null, ret, subidx, do_assoc.call(null, pv, level - 5, cljs.core.pv_aget.call(null, node, subidx), i, val));
|
|
return ret
|
|
}
|
|
};
|
|
cljs.core.pop_tail = function pop_tail(pv, level, node) {
|
|
var subidx = pv.cnt - 2 >>> level & 31;
|
|
if(level > 5) {
|
|
var new_child = pop_tail.call(null, pv, level - 5, cljs.core.pv_aget.call(null, node, subidx));
|
|
if(function() {
|
|
var and__3941__auto__ = new_child == null;
|
|
if(and__3941__auto__) {
|
|
return subidx === 0
|
|
}else {
|
|
return and__3941__auto__
|
|
}
|
|
}()) {
|
|
return null
|
|
}else {
|
|
var ret = cljs.core.pv_clone_node.call(null, node);
|
|
cljs.core.pv_aset.call(null, ret, subidx, new_child);
|
|
return ret
|
|
}
|
|
}else {
|
|
if(subidx === 0) {
|
|
return null
|
|
}else {
|
|
if("\ufdd0:else") {
|
|
var ret = cljs.core.pv_clone_node.call(null, node);
|
|
cljs.core.pv_aset.call(null, ret, subidx, null);
|
|
return ret
|
|
}else {
|
|
return null
|
|
}
|
|
}
|
|
}
|
|
};
|
|
goog.provide("cljs.core.PersistentVector");
|
|
cljs.core.PersistentVector = function(meta, cnt, shift, root, tail, __hash) {
|
|
this.meta = meta;
|
|
this.cnt = cnt;
|
|
this.shift = shift;
|
|
this.root = root;
|
|
this.tail = tail;
|
|
this.__hash = __hash;
|
|
this.cljs$lang$protocol_mask$partition1$ = 4;
|
|
this.cljs$lang$protocol_mask$partition0$ = 167668511
|
|
};
|
|
cljs.core.PersistentVector.cljs$lang$type = true;
|
|
cljs.core.PersistentVector.cljs$lang$ctorStr = "cljs.core/PersistentVector";
|
|
cljs.core.PersistentVector.cljs$lang$ctorPrWriter = function(this__2847__auto__, writer__2848__auto__, opt__2849__auto__) {
|
|
return cljs.core._write.call(null, writer__2848__auto__, "cljs.core/PersistentVector")
|
|
};
|
|
cljs.core.PersistentVector.prototype.cljs$core$IEditableCollection$_as_transient$arity$1 = function(coll) {
|
|
var self__ = this;
|
|
return new cljs.core.TransientVector(self__.cnt, self__.shift, cljs.core.tv_editable_root.call(null, self__.root), cljs.core.tv_editable_tail.call(null, self__.tail))
|
|
};
|
|
cljs.core.PersistentVector.prototype.cljs$core$IHash$_hash$arity$1 = function(coll) {
|
|
var self__ = this;
|
|
var h__2732__auto__ = self__.__hash;
|
|
if(!(h__2732__auto__ == null)) {
|
|
return h__2732__auto__
|
|
}else {
|
|
var h__2732__auto____$1 = cljs.core.hash_coll.call(null, coll);
|
|
self__.__hash = h__2732__auto____$1;
|
|
return h__2732__auto____$1
|
|
}
|
|
};
|
|
cljs.core.PersistentVector.prototype.cljs$core$ILookup$_lookup$arity$2 = function(coll, k) {
|
|
var self__ = this;
|
|
return coll.cljs$core$IIndexed$_nth$arity$3(coll, k, null)
|
|
};
|
|
cljs.core.PersistentVector.prototype.cljs$core$ILookup$_lookup$arity$3 = function(coll, k, not_found) {
|
|
var self__ = this;
|
|
return coll.cljs$core$IIndexed$_nth$arity$3(coll, k, not_found)
|
|
};
|
|
cljs.core.PersistentVector.prototype.cljs$core$IAssociative$_assoc$arity$3 = function(coll, k, v) {
|
|
var self__ = this;
|
|
if(function() {
|
|
var and__3941__auto__ = 0 <= k;
|
|
if(and__3941__auto__) {
|
|
return k < self__.cnt
|
|
}else {
|
|
return and__3941__auto__
|
|
}
|
|
}()) {
|
|
if(cljs.core.tail_off.call(null, coll) <= k) {
|
|
var new_tail = self__.tail.slice();
|
|
new_tail[k & 31] = v;
|
|
return new cljs.core.PersistentVector(self__.meta, self__.cnt, self__.shift, self__.root, new_tail, null)
|
|
}else {
|
|
return new cljs.core.PersistentVector(self__.meta, self__.cnt, self__.shift, cljs.core.do_assoc.call(null, coll, self__.shift, self__.root, k, v), self__.tail, null)
|
|
}
|
|
}else {
|
|
if(k === self__.cnt) {
|
|
return coll.cljs$core$ICollection$_conj$arity$2(coll, v)
|
|
}else {
|
|
if("\ufdd0:else") {
|
|
throw new Error([cljs.core.str("Index "), cljs.core.str(k), cljs.core.str(" out of bounds [0,"), cljs.core.str(self__.cnt), cljs.core.str("]")].join(""));
|
|
}else {
|
|
return null
|
|
}
|
|
}
|
|
}
|
|
};
|
|
cljs.core.PersistentVector.prototype.call = function() {
|
|
var G__13939 = null;
|
|
var G__13939__2 = function(self__, k) {
|
|
var self__ = this;
|
|
var self____$1 = this;
|
|
var coll = self____$1;
|
|
return coll.cljs$core$IIndexed$_nth$arity$2(coll, k)
|
|
};
|
|
var G__13939__3 = function(self__, k, not_found) {
|
|
var self__ = this;
|
|
var self____$1 = this;
|
|
var coll = self____$1;
|
|
return coll.cljs$core$IIndexed$_nth$arity$3(coll, k, not_found)
|
|
};
|
|
G__13939 = function(self__, k, not_found) {
|
|
switch(arguments.length) {
|
|
case 2:
|
|
return G__13939__2.call(this, self__, k);
|
|
case 3:
|
|
return G__13939__3.call(this, self__, k, not_found)
|
|
}
|
|
throw new Error("Invalid arity: " + arguments.length);
|
|
};
|
|
return G__13939
|
|
}();
|
|
cljs.core.PersistentVector.prototype.apply = function(self__, args13938) {
|
|
var self__ = this;
|
|
return self__.call.apply(self__, [self__].concat(args13938.slice()))
|
|
};
|
|
cljs.core.PersistentVector.prototype.cljs$core$IKVReduce$_kv_reduce$arity$3 = function(v, f, init) {
|
|
var self__ = this;
|
|
var step_init = [0, init];
|
|
var i = 0;
|
|
while(true) {
|
|
if(i < self__.cnt) {
|
|
var arr = cljs.core.array_for.call(null, v, i);
|
|
var len = arr.length;
|
|
var init__$1 = function() {
|
|
var j = 0;
|
|
var init__$1 = step_init[1];
|
|
while(true) {
|
|
if(j < len) {
|
|
var init__$2 = f.call(null, init__$1, j + i, arr[j]);
|
|
if(cljs.core.reduced_QMARK_.call(null, init__$2)) {
|
|
return init__$2
|
|
}else {
|
|
var G__13940 = j + 1;
|
|
var G__13941 = init__$2;
|
|
j = G__13940;
|
|
init__$1 = G__13941;
|
|
continue
|
|
}
|
|
}else {
|
|
step_init[0] = len;
|
|
step_init[1] = init__$1;
|
|
return init__$1
|
|
}
|
|
break
|
|
}
|
|
}();
|
|
if(cljs.core.reduced_QMARK_.call(null, init__$1)) {
|
|
return cljs.core.deref.call(null, init__$1)
|
|
}else {
|
|
var G__13942 = i + step_init[0];
|
|
i = G__13942;
|
|
continue
|
|
}
|
|
}else {
|
|
return step_init[1]
|
|
}
|
|
break
|
|
}
|
|
};
|
|
cljs.core.PersistentVector.prototype.cljs$core$ICollection$_conj$arity$2 = function(coll, o) {
|
|
var self__ = this;
|
|
if(self__.cnt - cljs.core.tail_off.call(null, coll) < 32) {
|
|
var new_tail = self__.tail.slice();
|
|
new_tail.push(o);
|
|
return new cljs.core.PersistentVector(self__.meta, self__.cnt + 1, self__.shift, self__.root, new_tail, null)
|
|
}else {
|
|
var root_overflow_QMARK_ = self__.cnt >>> 5 > 1 << self__.shift;
|
|
var new_shift = root_overflow_QMARK_ ? self__.shift + 5 : self__.shift;
|
|
var new_root = root_overflow_QMARK_ ? function() {
|
|
var n_r = cljs.core.pv_fresh_node.call(null, null);
|
|
cljs.core.pv_aset.call(null, n_r, 0, self__.root);
|
|
cljs.core.pv_aset.call(null, n_r, 1, cljs.core.new_path.call(null, null, self__.shift, new cljs.core.VectorNode(null, self__.tail)));
|
|
return n_r
|
|
}() : cljs.core.push_tail.call(null, coll, self__.shift, self__.root, new cljs.core.VectorNode(null, self__.tail));
|
|
return new cljs.core.PersistentVector(self__.meta, self__.cnt + 1, new_shift, new_root, [o], null)
|
|
}
|
|
};
|
|
cljs.core.PersistentVector.prototype.cljs$core$IReversible$_rseq$arity$1 = function(coll) {
|
|
var self__ = this;
|
|
if(self__.cnt > 0) {
|
|
return new cljs.core.RSeq(coll, self__.cnt - 1, null)
|
|
}else {
|
|
return cljs.core.List.EMPTY
|
|
}
|
|
};
|
|
cljs.core.PersistentVector.prototype.cljs$core$IMapEntry$_key$arity$1 = function(coll) {
|
|
var self__ = this;
|
|
return coll.cljs$core$IIndexed$_nth$arity$2(coll, 0)
|
|
};
|
|
cljs.core.PersistentVector.prototype.cljs$core$IMapEntry$_val$arity$1 = function(coll) {
|
|
var self__ = this;
|
|
return coll.cljs$core$IIndexed$_nth$arity$2(coll, 1)
|
|
};
|
|
cljs.core.PersistentVector.prototype.toString = function() {
|
|
var self__ = this;
|
|
var coll = this;
|
|
return cljs.core.pr_str_STAR_.call(null, coll)
|
|
};
|
|
cljs.core.PersistentVector.prototype.cljs$core$IReduce$_reduce$arity$2 = function(v, f) {
|
|
var self__ = this;
|
|
return cljs.core.ci_reduce.call(null, v, f)
|
|
};
|
|
cljs.core.PersistentVector.prototype.cljs$core$IReduce$_reduce$arity$3 = function(v, f, start) {
|
|
var self__ = this;
|
|
return cljs.core.ci_reduce.call(null, v, f, start)
|
|
};
|
|
cljs.core.PersistentVector.prototype.cljs$core$ISeqable$_seq$arity$1 = function(coll) {
|
|
var self__ = this;
|
|
if(self__.cnt === 0) {
|
|
return null
|
|
}else {
|
|
if(self__.cnt < 32) {
|
|
return cljs.core.array_seq.call(null, self__.tail)
|
|
}else {
|
|
if("\ufdd0:else") {
|
|
return cljs.core.chunked_seq.call(null, coll, 0, 0)
|
|
}else {
|
|
return null
|
|
}
|
|
}
|
|
}
|
|
};
|
|
cljs.core.PersistentVector.prototype.cljs$core$ICounted$_count$arity$1 = function(coll) {
|
|
var self__ = this;
|
|
return self__.cnt
|
|
};
|
|
cljs.core.PersistentVector.prototype.cljs$core$IStack$_peek$arity$1 = function(coll) {
|
|
var self__ = this;
|
|
if(self__.cnt > 0) {
|
|
return coll.cljs$core$IIndexed$_nth$arity$2(coll, self__.cnt - 1)
|
|
}else {
|
|
return null
|
|
}
|
|
};
|
|
cljs.core.PersistentVector.prototype.cljs$core$IStack$_pop$arity$1 = function(coll) {
|
|
var self__ = this;
|
|
if(self__.cnt === 0) {
|
|
throw new Error("Can't pop empty vector");
|
|
}else {
|
|
if(1 === self__.cnt) {
|
|
return cljs.core._with_meta.call(null, cljs.core.PersistentVector.EMPTY, self__.meta)
|
|
}else {
|
|
if(1 < self__.cnt - cljs.core.tail_off.call(null, coll)) {
|
|
return new cljs.core.PersistentVector(self__.meta, self__.cnt - 1, self__.shift, self__.root, self__.tail.slice(0, -1), null)
|
|
}else {
|
|
if("\ufdd0:else") {
|
|
var new_tail = cljs.core.array_for.call(null, coll, self__.cnt - 2);
|
|
var nr = cljs.core.pop_tail.call(null, coll, self__.shift, self__.root);
|
|
var new_root = nr == null ? cljs.core.PersistentVector.EMPTY_NODE : nr;
|
|
var cnt_1 = self__.cnt - 1;
|
|
if(function() {
|
|
var and__3941__auto__ = 5 < self__.shift;
|
|
if(and__3941__auto__) {
|
|
return cljs.core.pv_aget.call(null, new_root, 1) == null
|
|
}else {
|
|
return and__3941__auto__
|
|
}
|
|
}()) {
|
|
return new cljs.core.PersistentVector(self__.meta, cnt_1, self__.shift - 5, cljs.core.pv_aget.call(null, new_root, 0), new_tail, null)
|
|
}else {
|
|
return new cljs.core.PersistentVector(self__.meta, cnt_1, self__.shift, new_root, new_tail, null)
|
|
}
|
|
}else {
|
|
return null
|
|
}
|
|
}
|
|
}
|
|
}
|
|
};
|
|
cljs.core.PersistentVector.prototype.cljs$core$IVector$_assoc_n$arity$3 = function(coll, n, val) {
|
|
var self__ = this;
|
|
return coll.cljs$core$IAssociative$_assoc$arity$3(coll, n, val)
|
|
};
|
|
cljs.core.PersistentVector.prototype.cljs$core$IEquiv$_equiv$arity$2 = function(coll, other) {
|
|
var self__ = this;
|
|
return cljs.core.equiv_sequential.call(null, coll, other)
|
|
};
|
|
cljs.core.PersistentVector.prototype.cljs$core$IWithMeta$_with_meta$arity$2 = function(coll, meta__$1) {
|
|
var self__ = this;
|
|
return new cljs.core.PersistentVector(meta__$1, self__.cnt, self__.shift, self__.root, self__.tail, self__.__hash)
|
|
};
|
|
cljs.core.PersistentVector.prototype.cljs$core$IMeta$_meta$arity$1 = function(coll) {
|
|
var self__ = this;
|
|
return self__.meta
|
|
};
|
|
cljs.core.PersistentVector.prototype.cljs$core$IIndexed$_nth$arity$2 = function(coll, n) {
|
|
var self__ = this;
|
|
return cljs.core.array_for.call(null, coll, n)[n & 31]
|
|
};
|
|
cljs.core.PersistentVector.prototype.cljs$core$IIndexed$_nth$arity$3 = function(coll, n, not_found) {
|
|
var self__ = this;
|
|
if(function() {
|
|
var and__3941__auto__ = 0 <= n;
|
|
if(and__3941__auto__) {
|
|
return n < self__.cnt
|
|
}else {
|
|
return and__3941__auto__
|
|
}
|
|
}()) {
|
|
return coll.cljs$core$IIndexed$_nth$arity$2(coll, n)
|
|
}else {
|
|
return not_found
|
|
}
|
|
};
|
|
cljs.core.PersistentVector.prototype.cljs$core$IEmptyableCollection$_empty$arity$1 = function(coll) {
|
|
var self__ = this;
|
|
return cljs.core.with_meta.call(null, cljs.core.PersistentVector.EMPTY, self__.meta)
|
|
};
|
|
cljs.core.__GT_PersistentVector = function __GT_PersistentVector(meta, cnt, shift, root, tail, __hash) {
|
|
return new cljs.core.PersistentVector(meta, cnt, shift, root, tail, __hash)
|
|
};
|
|
cljs.core.PersistentVector.EMPTY_NODE = new cljs.core.VectorNode(null, new Array(32));
|
|
cljs.core.PersistentVector.EMPTY = new cljs.core.PersistentVector(null, 0, 5, cljs.core.PersistentVector.EMPTY_NODE, [], 0);
|
|
cljs.core.PersistentVector.fromArray = function(xs, no_clone) {
|
|
var l = xs.length;
|
|
var xs__$1 = no_clone ? xs : xs.slice();
|
|
if(l < 32) {
|
|
return new cljs.core.PersistentVector(null, l, 5, cljs.core.PersistentVector.EMPTY_NODE, xs__$1, null)
|
|
}else {
|
|
var node = xs__$1.slice(0, 32);
|
|
var v = new cljs.core.PersistentVector(null, 32, 5, cljs.core.PersistentVector.EMPTY_NODE, node, null);
|
|
var i = 32;
|
|
var out = cljs.core._as_transient.call(null, v);
|
|
while(true) {
|
|
if(i < l) {
|
|
var G__13943 = i + 1;
|
|
var G__13944 = cljs.core.conj_BANG_.call(null, out, xs__$1[i]);
|
|
i = G__13943;
|
|
out = G__13944;
|
|
continue
|
|
}else {
|
|
return cljs.core.persistent_BANG_.call(null, out)
|
|
}
|
|
break
|
|
}
|
|
}
|
|
};
|
|
cljs.core.vec = function vec(coll) {
|
|
return cljs.core._persistent_BANG_.call(null, cljs.core.reduce.call(null, cljs.core._conj_BANG_, cljs.core._as_transient.call(null, cljs.core.PersistentVector.EMPTY), coll))
|
|
};
|
|
cljs.core.vector = function() {
|
|
var vector__delegate = function(args) {
|
|
return cljs.core.vec.call(null, args)
|
|
};
|
|
var vector = function(var_args) {
|
|
var args = null;
|
|
if(arguments.length > 0) {
|
|
args = cljs.core.array_seq(Array.prototype.slice.call(arguments, 0), 0)
|
|
}
|
|
return vector__delegate.call(this, args)
|
|
};
|
|
vector.cljs$lang$maxFixedArity = 0;
|
|
vector.cljs$lang$applyTo = function(arglist__13945) {
|
|
var args = cljs.core.seq(arglist__13945);
|
|
return vector__delegate(args)
|
|
};
|
|
vector.cljs$core$IFn$_invoke$arity$variadic = vector__delegate;
|
|
return vector
|
|
}();
|
|
goog.provide("cljs.core.ChunkedSeq");
|
|
cljs.core.ChunkedSeq = function(vec, node, i, off, meta, __hash) {
|
|
this.vec = vec;
|
|
this.node = node;
|
|
this.i = i;
|
|
this.off = off;
|
|
this.meta = meta;
|
|
this.__hash = __hash;
|
|
this.cljs$lang$protocol_mask$partition0$ = 32243948;
|
|
this.cljs$lang$protocol_mask$partition1$ = 1536
|
|
};
|
|
cljs.core.ChunkedSeq.cljs$lang$type = true;
|
|
cljs.core.ChunkedSeq.cljs$lang$ctorStr = "cljs.core/ChunkedSeq";
|
|
cljs.core.ChunkedSeq.cljs$lang$ctorPrWriter = function(this__2847__auto__, writer__2848__auto__, opt__2849__auto__) {
|
|
return cljs.core._write.call(null, writer__2848__auto__, "cljs.core/ChunkedSeq")
|
|
};
|
|
cljs.core.ChunkedSeq.prototype.cljs$core$IHash$_hash$arity$1 = function(coll) {
|
|
var self__ = this;
|
|
var h__2732__auto__ = self__.__hash;
|
|
if(!(h__2732__auto__ == null)) {
|
|
return h__2732__auto__
|
|
}else {
|
|
var h__2732__auto____$1 = cljs.core.hash_coll.call(null, coll);
|
|
self__.__hash = h__2732__auto____$1;
|
|
return h__2732__auto____$1
|
|
}
|
|
};
|
|
cljs.core.ChunkedSeq.prototype.cljs$core$INext$_next$arity$1 = function(coll) {
|
|
var self__ = this;
|
|
if(self__.off + 1 < self__.node.length) {
|
|
var s = cljs.core.chunked_seq.call(null, self__.vec, self__.node, self__.i, self__.off + 1);
|
|
if(s == null) {
|
|
return null
|
|
}else {
|
|
return s
|
|
}
|
|
}else {
|
|
return coll.cljs$core$IChunkedNext$_chunked_next$arity$1(coll)
|
|
}
|
|
};
|
|
cljs.core.ChunkedSeq.prototype.cljs$core$ICollection$_conj$arity$2 = function(coll, o) {
|
|
var self__ = this;
|
|
return cljs.core.cons.call(null, o, coll)
|
|
};
|
|
cljs.core.ChunkedSeq.prototype.toString = function() {
|
|
var self__ = this;
|
|
var coll = this;
|
|
return cljs.core.pr_str_STAR_.call(null, coll)
|
|
};
|
|
cljs.core.ChunkedSeq.prototype.cljs$core$IReduce$_reduce$arity$2 = function(coll, f) {
|
|
var self__ = this;
|
|
return cljs.core.ci_reduce.call(null, cljs.core.subvec.call(null, self__.vec, self__.i + self__.off, cljs.core.count.call(null, self__.vec)), f)
|
|
};
|
|
cljs.core.ChunkedSeq.prototype.cljs$core$IReduce$_reduce$arity$3 = function(coll, f, start) {
|
|
var self__ = this;
|
|
return cljs.core.ci_reduce.call(null, cljs.core.subvec.call(null, self__.vec, self__.i + self__.off, cljs.core.count.call(null, self__.vec)), f, start)
|
|
};
|
|
cljs.core.ChunkedSeq.prototype.cljs$core$ISeqable$_seq$arity$1 = function(coll) {
|
|
var self__ = this;
|
|
return coll
|
|
};
|
|
cljs.core.ChunkedSeq.prototype.cljs$core$ISeq$_first$arity$1 = function(coll) {
|
|
var self__ = this;
|
|
return self__.node[self__.off]
|
|
};
|
|
cljs.core.ChunkedSeq.prototype.cljs$core$ISeq$_rest$arity$1 = function(coll) {
|
|
var self__ = this;
|
|
if(self__.off + 1 < self__.node.length) {
|
|
var s = cljs.core.chunked_seq.call(null, self__.vec, self__.node, self__.i, self__.off + 1);
|
|
if(s == null) {
|
|
return cljs.core.List.EMPTY
|
|
}else {
|
|
return s
|
|
}
|
|
}else {
|
|
return coll.cljs$core$IChunkedSeq$_chunked_rest$arity$1(coll)
|
|
}
|
|
};
|
|
cljs.core.ChunkedSeq.prototype.cljs$core$IChunkedNext$_chunked_next$arity$1 = function(coll) {
|
|
var self__ = this;
|
|
var l = self__.node.length;
|
|
var s = self__.i + l < cljs.core._count.call(null, self__.vec) ? cljs.core.chunked_seq.call(null, self__.vec, self__.i + l, 0) : null;
|
|
if(s == null) {
|
|
return null
|
|
}else {
|
|
return s
|
|
}
|
|
};
|
|
cljs.core.ChunkedSeq.prototype.cljs$core$IEquiv$_equiv$arity$2 = function(coll, other) {
|
|
var self__ = this;
|
|
return cljs.core.equiv_sequential.call(null, coll, other)
|
|
};
|
|
cljs.core.ChunkedSeq.prototype.cljs$core$IWithMeta$_with_meta$arity$2 = function(coll, m) {
|
|
var self__ = this;
|
|
return cljs.core.chunked_seq.call(null, self__.vec, self__.node, self__.i, self__.off, m)
|
|
};
|
|
cljs.core.ChunkedSeq.prototype.cljs$core$IWithMeta$_meta$arity$1 = function(coll) {
|
|
var self__ = this;
|
|
return self__.meta
|
|
};
|
|
cljs.core.ChunkedSeq.prototype.cljs$core$IEmptyableCollection$_empty$arity$1 = function(coll) {
|
|
var self__ = this;
|
|
return cljs.core.with_meta.call(null, cljs.core.PersistentVector.EMPTY, self__.meta)
|
|
};
|
|
cljs.core.ChunkedSeq.prototype.cljs$core$IChunkedSeq$_chunked_first$arity$1 = function(coll) {
|
|
var self__ = this;
|
|
return cljs.core.array_chunk.call(null, self__.node, self__.off)
|
|
};
|
|
cljs.core.ChunkedSeq.prototype.cljs$core$IChunkedSeq$_chunked_rest$arity$1 = function(coll) {
|
|
var self__ = this;
|
|
var l = self__.node.length;
|
|
var s = self__.i + l < cljs.core._count.call(null, self__.vec) ? cljs.core.chunked_seq.call(null, self__.vec, self__.i + l, 0) : null;
|
|
if(s == null) {
|
|
return cljs.core.List.EMPTY
|
|
}else {
|
|
return s
|
|
}
|
|
};
|
|
cljs.core.__GT_ChunkedSeq = function __GT_ChunkedSeq(vec, node, i, off, meta, __hash) {
|
|
return new cljs.core.ChunkedSeq(vec, node, i, off, meta, __hash)
|
|
};
|
|
cljs.core.chunked_seq = function() {
|
|
var chunked_seq = null;
|
|
var chunked_seq__3 = function(vec, i, off) {
|
|
return new cljs.core.ChunkedSeq(vec, cljs.core.array_for.call(null, vec, i), i, off, null, null)
|
|
};
|
|
var chunked_seq__4 = function(vec, node, i, off) {
|
|
return new cljs.core.ChunkedSeq(vec, node, i, off, null, null)
|
|
};
|
|
var chunked_seq__5 = function(vec, node, i, off, meta) {
|
|
return new cljs.core.ChunkedSeq(vec, node, i, off, meta, null)
|
|
};
|
|
chunked_seq = function(vec, node, i, off, meta) {
|
|
switch(arguments.length) {
|
|
case 3:
|
|
return chunked_seq__3.call(this, vec, node, i);
|
|
case 4:
|
|
return chunked_seq__4.call(this, vec, node, i, off);
|
|
case 5:
|
|
return chunked_seq__5.call(this, vec, node, i, off, meta)
|
|
}
|
|
throw new Error("Invalid arity: " + arguments.length);
|
|
};
|
|
chunked_seq.cljs$core$IFn$_invoke$arity$3 = chunked_seq__3;
|
|
chunked_seq.cljs$core$IFn$_invoke$arity$4 = chunked_seq__4;
|
|
chunked_seq.cljs$core$IFn$_invoke$arity$5 = chunked_seq__5;
|
|
return chunked_seq
|
|
}();
|
|
goog.provide("cljs.core.Subvec");
|
|
cljs.core.Subvec = function(meta, v, start, end, __hash) {
|
|
this.meta = meta;
|
|
this.v = v;
|
|
this.start = start;
|
|
this.end = end;
|
|
this.__hash = __hash;
|
|
this.cljs$lang$protocol_mask$partition1$ = 0;
|
|
this.cljs$lang$protocol_mask$partition0$ = 32400159
|
|
};
|
|
cljs.core.Subvec.cljs$lang$type = true;
|
|
cljs.core.Subvec.cljs$lang$ctorStr = "cljs.core/Subvec";
|
|
cljs.core.Subvec.cljs$lang$ctorPrWriter = function(this__2847__auto__, writer__2848__auto__, opt__2849__auto__) {
|
|
return cljs.core._write.call(null, writer__2848__auto__, "cljs.core/Subvec")
|
|
};
|
|
cljs.core.Subvec.prototype.cljs$core$IHash$_hash$arity$1 = function(coll) {
|
|
var self__ = this;
|
|
var h__2732__auto__ = self__.__hash;
|
|
if(!(h__2732__auto__ == null)) {
|
|
return h__2732__auto__
|
|
}else {
|
|
var h__2732__auto____$1 = cljs.core.hash_coll.call(null, coll);
|
|
self__.__hash = h__2732__auto____$1;
|
|
return h__2732__auto____$1
|
|
}
|
|
};
|
|
cljs.core.Subvec.prototype.cljs$core$ILookup$_lookup$arity$2 = function(coll, k) {
|
|
var self__ = this;
|
|
return coll.cljs$core$IIndexed$_nth$arity$3(coll, k, null)
|
|
};
|
|
cljs.core.Subvec.prototype.cljs$core$ILookup$_lookup$arity$3 = function(coll, k, not_found) {
|
|
var self__ = this;
|
|
return coll.cljs$core$IIndexed$_nth$arity$3(coll, k, not_found)
|
|
};
|
|
cljs.core.Subvec.prototype.cljs$core$IAssociative$_assoc$arity$3 = function(coll, key, val) {
|
|
var self__ = this;
|
|
var v_pos = self__.start + key;
|
|
return cljs.core.build_subvec.call(null, self__.meta, cljs.core.assoc.call(null, self__.v, v_pos, val), self__.start, function() {
|
|
var x__2633__auto__ = self__.end;
|
|
var y__2634__auto__ = v_pos + 1;
|
|
return x__2633__auto__ > y__2634__auto__ ? x__2633__auto__ : y__2634__auto__
|
|
}(), null)
|
|
};
|
|
cljs.core.Subvec.prototype.call = function() {
|
|
var G__13947 = null;
|
|
var G__13947__2 = function(self__, k) {
|
|
var self__ = this;
|
|
var self____$1 = this;
|
|
var coll = self____$1;
|
|
return coll.cljs$core$IIndexed$_nth$arity$2(coll, k)
|
|
};
|
|
var G__13947__3 = function(self__, k, not_found) {
|
|
var self__ = this;
|
|
var self____$1 = this;
|
|
var coll = self____$1;
|
|
return coll.cljs$core$IIndexed$_nth$arity$3(coll, k, not_found)
|
|
};
|
|
G__13947 = function(self__, k, not_found) {
|
|
switch(arguments.length) {
|
|
case 2:
|
|
return G__13947__2.call(this, self__, k);
|
|
case 3:
|
|
return G__13947__3.call(this, self__, k, not_found)
|
|
}
|
|
throw new Error("Invalid arity: " + arguments.length);
|
|
};
|
|
return G__13947
|
|
}();
|
|
cljs.core.Subvec.prototype.apply = function(self__, args13946) {
|
|
var self__ = this;
|
|
return self__.call.apply(self__, [self__].concat(args13946.slice()))
|
|
};
|
|
cljs.core.Subvec.prototype.cljs$core$ICollection$_conj$arity$2 = function(coll, o) {
|
|
var self__ = this;
|
|
return cljs.core.build_subvec.call(null, self__.meta, cljs.core._assoc_n.call(null, self__.v, self__.end, o), self__.start, self__.end + 1, null)
|
|
};
|
|
cljs.core.Subvec.prototype.toString = function() {
|
|
var self__ = this;
|
|
var coll = this;
|
|
return cljs.core.pr_str_STAR_.call(null, coll)
|
|
};
|
|
cljs.core.Subvec.prototype.cljs$core$IReduce$_reduce$arity$2 = function(coll, f) {
|
|
var self__ = this;
|
|
return cljs.core.ci_reduce.call(null, coll, f)
|
|
};
|
|
cljs.core.Subvec.prototype.cljs$core$IReduce$_reduce$arity$3 = function(coll, f, start__$1) {
|
|
var self__ = this;
|
|
return cljs.core.ci_reduce.call(null, coll, f, start__$1)
|
|
};
|
|
cljs.core.Subvec.prototype.cljs$core$ISeqable$_seq$arity$1 = function(coll) {
|
|
var self__ = this;
|
|
var subvec_seq = function subvec_seq(i) {
|
|
if(i === self__.end) {
|
|
return null
|
|
}else {
|
|
return cljs.core.cons.call(null, cljs.core._nth.call(null, self__.v, i), new cljs.core.LazySeq(null, false, function() {
|
|
return subvec_seq.call(null, i + 1)
|
|
}, null))
|
|
}
|
|
};
|
|
return subvec_seq.call(null, self__.start)
|
|
};
|
|
cljs.core.Subvec.prototype.cljs$core$ICounted$_count$arity$1 = function(coll) {
|
|
var self__ = this;
|
|
return self__.end - self__.start
|
|
};
|
|
cljs.core.Subvec.prototype.cljs$core$IStack$_peek$arity$1 = function(coll) {
|
|
var self__ = this;
|
|
return cljs.core._nth.call(null, self__.v, self__.end - 1)
|
|
};
|
|
cljs.core.Subvec.prototype.cljs$core$IStack$_pop$arity$1 = function(coll) {
|
|
var self__ = this;
|
|
if(self__.start === self__.end) {
|
|
throw new Error("Can't pop empty vector");
|
|
}else {
|
|
return cljs.core.build_subvec.call(null, self__.meta, self__.v, self__.start, self__.end - 1, null)
|
|
}
|
|
};
|
|
cljs.core.Subvec.prototype.cljs$core$IVector$_assoc_n$arity$3 = function(coll, n, val) {
|
|
var self__ = this;
|
|
return coll.cljs$core$IAssociative$_assoc$arity$3(coll, n, val)
|
|
};
|
|
cljs.core.Subvec.prototype.cljs$core$IEquiv$_equiv$arity$2 = function(coll, other) {
|
|
var self__ = this;
|
|
return cljs.core.equiv_sequential.call(null, coll, other)
|
|
};
|
|
cljs.core.Subvec.prototype.cljs$core$IWithMeta$_with_meta$arity$2 = function(coll, meta__$1) {
|
|
var self__ = this;
|
|
return cljs.core.build_subvec.call(null, meta__$1, self__.v, self__.start, self__.end, self__.__hash)
|
|
};
|
|
cljs.core.Subvec.prototype.cljs$core$IMeta$_meta$arity$1 = function(coll) {
|
|
var self__ = this;
|
|
return self__.meta
|
|
};
|
|
cljs.core.Subvec.prototype.cljs$core$IIndexed$_nth$arity$2 = function(coll, n) {
|
|
var self__ = this;
|
|
if(function() {
|
|
var or__3943__auto__ = n < 0;
|
|
if(or__3943__auto__) {
|
|
return or__3943__auto__
|
|
}else {
|
|
return self__.end <= self__.start + n
|
|
}
|
|
}()) {
|
|
return cljs.core.vector_index_out_of_bounds.call(null, n, self__.end - self__.start)
|
|
}else {
|
|
return cljs.core._nth.call(null, self__.v, self__.start + n)
|
|
}
|
|
};
|
|
cljs.core.Subvec.prototype.cljs$core$IIndexed$_nth$arity$3 = function(coll, n, not_found) {
|
|
var self__ = this;
|
|
if(function() {
|
|
var or__3943__auto__ = n < 0;
|
|
if(or__3943__auto__) {
|
|
return or__3943__auto__
|
|
}else {
|
|
return self__.end <= self__.start + n
|
|
}
|
|
}()) {
|
|
return not_found
|
|
}else {
|
|
return cljs.core._nth.call(null, self__.v, self__.start + n, not_found)
|
|
}
|
|
};
|
|
cljs.core.Subvec.prototype.cljs$core$IEmptyableCollection$_empty$arity$1 = function(coll) {
|
|
var self__ = this;
|
|
return cljs.core.with_meta.call(null, cljs.core.PersistentVector.EMPTY, self__.meta)
|
|
};
|
|
cljs.core.__GT_Subvec = function __GT_Subvec(meta, v, start, end, __hash) {
|
|
return new cljs.core.Subvec(meta, v, start, end, __hash)
|
|
};
|
|
cljs.core.build_subvec = function build_subvec(meta, v, start, end, __hash) {
|
|
while(true) {
|
|
if(v instanceof cljs.core.Subvec) {
|
|
var G__13948 = meta;
|
|
var G__13949 = v.v;
|
|
var G__13950 = v.start + start;
|
|
var G__13951 = v.start + end;
|
|
var G__13952 = __hash;
|
|
meta = G__13948;
|
|
v = G__13949;
|
|
start = G__13950;
|
|
end = G__13951;
|
|
__hash = G__13952;
|
|
continue
|
|
}else {
|
|
var c = cljs.core.count.call(null, v);
|
|
if(function() {
|
|
var or__3943__auto__ = start < 0;
|
|
if(or__3943__auto__) {
|
|
return or__3943__auto__
|
|
}else {
|
|
var or__3943__auto____$1 = end < 0;
|
|
if(or__3943__auto____$1) {
|
|
return or__3943__auto____$1
|
|
}else {
|
|
var or__3943__auto____$2 = start > c;
|
|
if(or__3943__auto____$2) {
|
|
return or__3943__auto____$2
|
|
}else {
|
|
return end > c
|
|
}
|
|
}
|
|
}
|
|
}()) {
|
|
throw new Error("Index out of bounds");
|
|
}else {
|
|
}
|
|
return new cljs.core.Subvec(meta, v, start, end, __hash)
|
|
}
|
|
break
|
|
}
|
|
};
|
|
cljs.core.subvec = function() {
|
|
var subvec = null;
|
|
var subvec__2 = function(v, start) {
|
|
return subvec.call(null, v, start, cljs.core.count.call(null, v))
|
|
};
|
|
var subvec__3 = function(v, start, end) {
|
|
return cljs.core.build_subvec.call(null, null, v, start, end, null)
|
|
};
|
|
subvec = function(v, start, end) {
|
|
switch(arguments.length) {
|
|
case 2:
|
|
return subvec__2.call(this, v, start);
|
|
case 3:
|
|
return subvec__3.call(this, v, start, end)
|
|
}
|
|
throw new Error("Invalid arity: " + arguments.length);
|
|
};
|
|
subvec.cljs$core$IFn$_invoke$arity$2 = subvec__2;
|
|
subvec.cljs$core$IFn$_invoke$arity$3 = subvec__3;
|
|
return subvec
|
|
}();
|
|
cljs.core.tv_ensure_editable = function tv_ensure_editable(edit, node) {
|
|
if(edit === node.edit) {
|
|
return node
|
|
}else {
|
|
return new cljs.core.VectorNode(edit, node.arr.slice())
|
|
}
|
|
};
|
|
cljs.core.tv_editable_root = function tv_editable_root(node) {
|
|
return new cljs.core.VectorNode({}, node.arr.slice())
|
|
};
|
|
cljs.core.tv_editable_tail = function tv_editable_tail(tl) {
|
|
var ret = new Array(32);
|
|
cljs.core.array_copy.call(null, tl, 0, ret, 0, tl.length);
|
|
return ret
|
|
};
|
|
cljs.core.tv_push_tail = function tv_push_tail(tv, level, parent, tail_node) {
|
|
var ret = cljs.core.tv_ensure_editable.call(null, tv.root.edit, parent);
|
|
var subidx = tv.cnt - 1 >>> level & 31;
|
|
cljs.core.pv_aset.call(null, ret, subidx, level === 5 ? tail_node : function() {
|
|
var child = cljs.core.pv_aget.call(null, ret, subidx);
|
|
if(!(child == null)) {
|
|
return tv_push_tail.call(null, tv, level - 5, child, tail_node)
|
|
}else {
|
|
return cljs.core.new_path.call(null, tv.root.edit, level - 5, tail_node)
|
|
}
|
|
}());
|
|
return ret
|
|
};
|
|
cljs.core.tv_pop_tail = function tv_pop_tail(tv, level, node) {
|
|
var node__$1 = cljs.core.tv_ensure_editable.call(null, tv.root.edit, node);
|
|
var subidx = tv.cnt - 2 >>> level & 31;
|
|
if(level > 5) {
|
|
var new_child = tv_pop_tail.call(null, tv, level - 5, cljs.core.pv_aget.call(null, node__$1, subidx));
|
|
if(function() {
|
|
var and__3941__auto__ = new_child == null;
|
|
if(and__3941__auto__) {
|
|
return subidx === 0
|
|
}else {
|
|
return and__3941__auto__
|
|
}
|
|
}()) {
|
|
return null
|
|
}else {
|
|
cljs.core.pv_aset.call(null, node__$1, subidx, new_child);
|
|
return node__$1
|
|
}
|
|
}else {
|
|
if(subidx === 0) {
|
|
return null
|
|
}else {
|
|
if("\ufdd0:else") {
|
|
cljs.core.pv_aset.call(null, node__$1, subidx, null);
|
|
return node__$1
|
|
}else {
|
|
return null
|
|
}
|
|
}
|
|
}
|
|
};
|
|
cljs.core.editable_array_for = function editable_array_for(tv, i) {
|
|
if(function() {
|
|
var and__3941__auto__ = 0 <= i;
|
|
if(and__3941__auto__) {
|
|
return i < tv.cnt
|
|
}else {
|
|
return and__3941__auto__
|
|
}
|
|
}()) {
|
|
if(i >= cljs.core.tail_off.call(null, tv)) {
|
|
return tv.tail
|
|
}else {
|
|
var root = tv.root;
|
|
var node = root;
|
|
var level = tv.shift;
|
|
while(true) {
|
|
if(level > 0) {
|
|
var G__13953 = cljs.core.tv_ensure_editable.call(null, root.edit, cljs.core.pv_aget.call(null, node, i >>> level & 31));
|
|
var G__13954 = level - 5;
|
|
node = G__13953;
|
|
level = G__13954;
|
|
continue
|
|
}else {
|
|
return node.arr
|
|
}
|
|
break
|
|
}
|
|
}
|
|
}else {
|
|
throw new Error([cljs.core.str("No item "), cljs.core.str(i), cljs.core.str(" in transient vector of length "), cljs.core.str(tv.cnt)].join(""));
|
|
}
|
|
};
|
|
goog.provide("cljs.core.TransientVector");
|
|
cljs.core.TransientVector = function(cnt, shift, root, tail) {
|
|
this.cnt = cnt;
|
|
this.shift = shift;
|
|
this.root = root;
|
|
this.tail = tail;
|
|
this.cljs$lang$protocol_mask$partition0$ = 275;
|
|
this.cljs$lang$protocol_mask$partition1$ = 88
|
|
};
|
|
cljs.core.TransientVector.cljs$lang$type = true;
|
|
cljs.core.TransientVector.cljs$lang$ctorStr = "cljs.core/TransientVector";
|
|
cljs.core.TransientVector.cljs$lang$ctorPrWriter = function(this__2847__auto__, writer__2848__auto__, opt__2849__auto__) {
|
|
return cljs.core._write.call(null, writer__2848__auto__, "cljs.core/TransientVector")
|
|
};
|
|
cljs.core.TransientVector.prototype.call = function() {
|
|
var G__13956 = null;
|
|
var G__13956__2 = function(self__, k) {
|
|
var self__ = this;
|
|
var self____$1 = this;
|
|
var coll = self____$1;
|
|
return coll.cljs$core$ILookup$_lookup$arity$2(coll, k)
|
|
};
|
|
var G__13956__3 = function(self__, k, not_found) {
|
|
var self__ = this;
|
|
var self____$1 = this;
|
|
var coll = self____$1;
|
|
return coll.cljs$core$ILookup$_lookup$arity$3(coll, k, not_found)
|
|
};
|
|
G__13956 = function(self__, k, not_found) {
|
|
switch(arguments.length) {
|
|
case 2:
|
|
return G__13956__2.call(this, self__, k);
|
|
case 3:
|
|
return G__13956__3.call(this, self__, k, not_found)
|
|
}
|
|
throw new Error("Invalid arity: " + arguments.length);
|
|
};
|
|
return G__13956
|
|
}();
|
|
cljs.core.TransientVector.prototype.apply = function(self__, args13955) {
|
|
var self__ = this;
|
|
return self__.call.apply(self__, [self__].concat(args13955.slice()))
|
|
};
|
|
cljs.core.TransientVector.prototype.cljs$core$ILookup$_lookup$arity$2 = function(coll, k) {
|
|
var self__ = this;
|
|
return coll.cljs$core$IIndexed$_nth$arity$3(coll, k, null)
|
|
};
|
|
cljs.core.TransientVector.prototype.cljs$core$ILookup$_lookup$arity$3 = function(coll, k, not_found) {
|
|
var self__ = this;
|
|
return coll.cljs$core$IIndexed$_nth$arity$3(coll, k, not_found)
|
|
};
|
|
cljs.core.TransientVector.prototype.cljs$core$IIndexed$_nth$arity$2 = function(coll, n) {
|
|
var self__ = this;
|
|
if(self__.root.edit) {
|
|
return cljs.core.array_for.call(null, coll, n)[n & 31]
|
|
}else {
|
|
throw new Error("nth after persistent!");
|
|
}
|
|
};
|
|
cljs.core.TransientVector.prototype.cljs$core$IIndexed$_nth$arity$3 = function(coll, n, not_found) {
|
|
var self__ = this;
|
|
if(function() {
|
|
var and__3941__auto__ = 0 <= n;
|
|
if(and__3941__auto__) {
|
|
return n < self__.cnt
|
|
}else {
|
|
return and__3941__auto__
|
|
}
|
|
}()) {
|
|
return coll.cljs$core$IIndexed$_nth$arity$2(coll, n)
|
|
}else {
|
|
return not_found
|
|
}
|
|
};
|
|
cljs.core.TransientVector.prototype.cljs$core$ICounted$_count$arity$1 = function(coll) {
|
|
var self__ = this;
|
|
if(self__.root.edit) {
|
|
return self__.cnt
|
|
}else {
|
|
throw new Error("count after persistent!");
|
|
}
|
|
};
|
|
cljs.core.TransientVector.prototype.cljs$core$ITransientVector$_assoc_n_BANG_$arity$3 = function(tcoll, n, val) {
|
|
var self__ = this;
|
|
if(self__.root.edit) {
|
|
if(function() {
|
|
var and__3941__auto__ = 0 <= n;
|
|
if(and__3941__auto__) {
|
|
return n < self__.cnt
|
|
}else {
|
|
return and__3941__auto__
|
|
}
|
|
}()) {
|
|
if(cljs.core.tail_off.call(null, tcoll) <= n) {
|
|
self__.tail[n & 31] = val;
|
|
return tcoll
|
|
}else {
|
|
var new_root = function go(level, node) {
|
|
var node__$1 = cljs.core.tv_ensure_editable.call(null, self__.root.edit, node);
|
|
if(level === 0) {
|
|
cljs.core.pv_aset.call(null, node__$1, n & 31, val);
|
|
return node__$1
|
|
}else {
|
|
var subidx = n >>> level & 31;
|
|
cljs.core.pv_aset.call(null, node__$1, subidx, go.call(null, level - 5, cljs.core.pv_aget.call(null, node__$1, subidx)));
|
|
return node__$1
|
|
}
|
|
}.call(null, self__.shift, self__.root);
|
|
self__.root = new_root;
|
|
return tcoll
|
|
}
|
|
}else {
|
|
if(n === self__.cnt) {
|
|
return tcoll.cljs$core$ITransientCollection$_conj_BANG_$arity$2(tcoll, val)
|
|
}else {
|
|
if("\ufdd0:else") {
|
|
throw new Error([cljs.core.str("Index "), cljs.core.str(n), cljs.core.str(" out of bounds for TransientVector of length"), cljs.core.str(self__.cnt)].join(""));
|
|
}else {
|
|
return null
|
|
}
|
|
}
|
|
}
|
|
}else {
|
|
throw new Error("assoc! after persistent!");
|
|
}
|
|
};
|
|
cljs.core.TransientVector.prototype.cljs$core$ITransientVector$_pop_BANG_$arity$1 = function(tcoll) {
|
|
var self__ = this;
|
|
if(self__.root.edit) {
|
|
if(self__.cnt === 0) {
|
|
throw new Error("Can't pop empty vector");
|
|
}else {
|
|
if(1 === self__.cnt) {
|
|
self__.cnt = 0;
|
|
return tcoll
|
|
}else {
|
|
if((self__.cnt - 1 & 31) > 0) {
|
|
self__.cnt = self__.cnt - 1;
|
|
return tcoll
|
|
}else {
|
|
if("\ufdd0:else") {
|
|
var new_tail = cljs.core.editable_array_for.call(null, tcoll, self__.cnt - 2);
|
|
var new_root = function() {
|
|
var nr = cljs.core.tv_pop_tail.call(null, tcoll, self__.shift, self__.root);
|
|
if(!(nr == null)) {
|
|
return nr
|
|
}else {
|
|
return new cljs.core.VectorNode(self__.root.edit, new Array(32))
|
|
}
|
|
}();
|
|
if(function() {
|
|
var and__3941__auto__ = 5 < self__.shift;
|
|
if(and__3941__auto__) {
|
|
return cljs.core.pv_aget.call(null, new_root, 1) == null
|
|
}else {
|
|
return and__3941__auto__
|
|
}
|
|
}()) {
|
|
var new_root__$1 = cljs.core.tv_ensure_editable.call(null, self__.root.edit, cljs.core.pv_aget.call(null, new_root, 0));
|
|
self__.root = new_root__$1;
|
|
self__.shift = self__.shift - 5;
|
|
self__.cnt = self__.cnt - 1;
|
|
self__.tail = new_tail;
|
|
return tcoll
|
|
}else {
|
|
self__.root = new_root;
|
|
self__.cnt = self__.cnt - 1;
|
|
self__.tail = new_tail;
|
|
return tcoll
|
|
}
|
|
}else {
|
|
return null
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}else {
|
|
throw new Error("pop! after persistent!");
|
|
}
|
|
};
|
|
cljs.core.TransientVector.prototype.cljs$core$ITransientAssociative$_assoc_BANG_$arity$3 = function(tcoll, key, val) {
|
|
var self__ = this;
|
|
return tcoll.cljs$core$ITransientVector$_assoc_n_BANG_$arity$3(tcoll, key, val)
|
|
};
|
|
cljs.core.TransientVector.prototype.cljs$core$ITransientCollection$_conj_BANG_$arity$2 = function(tcoll, o) {
|
|
var self__ = this;
|
|
if(self__.root.edit) {
|
|
if(self__.cnt - cljs.core.tail_off.call(null, tcoll) < 32) {
|
|
self__.tail[self__.cnt & 31] = o;
|
|
self__.cnt = self__.cnt + 1;
|
|
return tcoll
|
|
}else {
|
|
var tail_node = new cljs.core.VectorNode(self__.root.edit, self__.tail);
|
|
var new_tail = new Array(32);
|
|
new_tail[0] = o;
|
|
self__.tail = new_tail;
|
|
if(self__.cnt >>> 5 > 1 << self__.shift) {
|
|
var new_root_array = new Array(32);
|
|
var new_shift = self__.shift + 5;
|
|
new_root_array[0] = self__.root;
|
|
new_root_array[1] = cljs.core.new_path.call(null, self__.root.edit, self__.shift, tail_node);
|
|
self__.root = new cljs.core.VectorNode(self__.root.edit, new_root_array);
|
|
self__.shift = new_shift;
|
|
self__.cnt = self__.cnt + 1;
|
|
return tcoll
|
|
}else {
|
|
var new_root = cljs.core.tv_push_tail.call(null, tcoll, self__.shift, self__.root, tail_node);
|
|
self__.root = new_root;
|
|
self__.cnt = self__.cnt + 1;
|
|
return tcoll
|
|
}
|
|
}
|
|
}else {
|
|
throw new Error("conj! after persistent!");
|
|
}
|
|
};
|
|
cljs.core.TransientVector.prototype.cljs$core$ITransientCollection$_persistent_BANG_$arity$1 = function(tcoll) {
|
|
var self__ = this;
|
|
if(self__.root.edit) {
|
|
self__.root.edit = null;
|
|
var len = self__.cnt - cljs.core.tail_off.call(null, tcoll);
|
|
var trimmed_tail = new Array(len);
|
|
cljs.core.array_copy.call(null, self__.tail, 0, trimmed_tail, 0, len);
|
|
return new cljs.core.PersistentVector(null, self__.cnt, self__.shift, self__.root, trimmed_tail, null)
|
|
}else {
|
|
throw new Error("persistent! called twice");
|
|
}
|
|
};
|
|
cljs.core.__GT_TransientVector = function __GT_TransientVector(cnt, shift, root, tail) {
|
|
return new cljs.core.TransientVector(cnt, shift, root, tail)
|
|
};
|
|
goog.provide("cljs.core.PersistentQueueSeq");
|
|
cljs.core.PersistentQueueSeq = function(meta, front, rear, __hash) {
|
|
this.meta = meta;
|
|
this.front = front;
|
|
this.rear = rear;
|
|
this.__hash = __hash;
|
|
this.cljs$lang$protocol_mask$partition1$ = 0;
|
|
this.cljs$lang$protocol_mask$partition0$ = 31850572
|
|
};
|
|
cljs.core.PersistentQueueSeq.cljs$lang$type = true;
|
|
cljs.core.PersistentQueueSeq.cljs$lang$ctorStr = "cljs.core/PersistentQueueSeq";
|
|
cljs.core.PersistentQueueSeq.cljs$lang$ctorPrWriter = function(this__2847__auto__, writer__2848__auto__, opt__2849__auto__) {
|
|
return cljs.core._write.call(null, writer__2848__auto__, "cljs.core/PersistentQueueSeq")
|
|
};
|
|
cljs.core.PersistentQueueSeq.prototype.cljs$core$IHash$_hash$arity$1 = function(coll) {
|
|
var self__ = this;
|
|
var h__2732__auto__ = self__.__hash;
|
|
if(!(h__2732__auto__ == null)) {
|
|
return h__2732__auto__
|
|
}else {
|
|
var h__2732__auto____$1 = cljs.core.hash_coll.call(null, coll);
|
|
self__.__hash = h__2732__auto____$1;
|
|
return h__2732__auto____$1
|
|
}
|
|
};
|
|
cljs.core.PersistentQueueSeq.prototype.cljs$core$ICollection$_conj$arity$2 = function(coll, o) {
|
|
var self__ = this;
|
|
return cljs.core.cons.call(null, o, coll)
|
|
};
|
|
cljs.core.PersistentQueueSeq.prototype.toString = function() {
|
|
var self__ = this;
|
|
var coll = this;
|
|
return cljs.core.pr_str_STAR_.call(null, coll)
|
|
};
|
|
cljs.core.PersistentQueueSeq.prototype.cljs$core$ISeqable$_seq$arity$1 = function(coll) {
|
|
var self__ = this;
|
|
return coll
|
|
};
|
|
cljs.core.PersistentQueueSeq.prototype.cljs$core$ISeq$_first$arity$1 = function(coll) {
|
|
var self__ = this;
|
|
return cljs.core.first.call(null, self__.front)
|
|
};
|
|
cljs.core.PersistentQueueSeq.prototype.cljs$core$ISeq$_rest$arity$1 = function(coll) {
|
|
var self__ = this;
|
|
var temp__4090__auto__ = cljs.core.next.call(null, self__.front);
|
|
if(temp__4090__auto__) {
|
|
var f1 = temp__4090__auto__;
|
|
return new cljs.core.PersistentQueueSeq(self__.meta, f1, self__.rear, null)
|
|
}else {
|
|
if(self__.rear == null) {
|
|
return coll.cljs$core$IEmptyableCollection$_empty$arity$1(coll)
|
|
}else {
|
|
return new cljs.core.PersistentQueueSeq(self__.meta, self__.rear, null, null)
|
|
}
|
|
}
|
|
};
|
|
cljs.core.PersistentQueueSeq.prototype.cljs$core$IEquiv$_equiv$arity$2 = function(coll, other) {
|
|
var self__ = this;
|
|
return cljs.core.equiv_sequential.call(null, coll, other)
|
|
};
|
|
cljs.core.PersistentQueueSeq.prototype.cljs$core$IWithMeta$_with_meta$arity$2 = function(coll, meta__$1) {
|
|
var self__ = this;
|
|
return new cljs.core.PersistentQueueSeq(meta__$1, self__.front, self__.rear, self__.__hash)
|
|
};
|
|
cljs.core.PersistentQueueSeq.prototype.cljs$core$IMeta$_meta$arity$1 = function(coll) {
|
|
var self__ = this;
|
|
return self__.meta
|
|
};
|
|
cljs.core.PersistentQueueSeq.prototype.cljs$core$IEmptyableCollection$_empty$arity$1 = function(coll) {
|
|
var self__ = this;
|
|
return cljs.core.with_meta.call(null, cljs.core.List.EMPTY, self__.meta)
|
|
};
|
|
cljs.core.__GT_PersistentQueueSeq = function __GT_PersistentQueueSeq(meta, front, rear, __hash) {
|
|
return new cljs.core.PersistentQueueSeq(meta, front, rear, __hash)
|
|
};
|
|
goog.provide("cljs.core.PersistentQueue");
|
|
cljs.core.PersistentQueue = function(meta, count, front, rear, __hash) {
|
|
this.meta = meta;
|
|
this.count = count;
|
|
this.front = front;
|
|
this.rear = rear;
|
|
this.__hash = __hash;
|
|
this.cljs$lang$protocol_mask$partition1$ = 0;
|
|
this.cljs$lang$protocol_mask$partition0$ = 31858766
|
|
};
|
|
cljs.core.PersistentQueue.cljs$lang$type = true;
|
|
cljs.core.PersistentQueue.cljs$lang$ctorStr = "cljs.core/PersistentQueue";
|
|
cljs.core.PersistentQueue.cljs$lang$ctorPrWriter = function(this__2847__auto__, writer__2848__auto__, opt__2849__auto__) {
|
|
return cljs.core._write.call(null, writer__2848__auto__, "cljs.core/PersistentQueue")
|
|
};
|
|
cljs.core.PersistentQueue.prototype.cljs$core$IHash$_hash$arity$1 = function(coll) {
|
|
var self__ = this;
|
|
var h__2732__auto__ = self__.__hash;
|
|
if(!(h__2732__auto__ == null)) {
|
|
return h__2732__auto__
|
|
}else {
|
|
var h__2732__auto____$1 = cljs.core.hash_coll.call(null, coll);
|
|
self__.__hash = h__2732__auto____$1;
|
|
return h__2732__auto____$1
|
|
}
|
|
};
|
|
cljs.core.PersistentQueue.prototype.cljs$core$ICollection$_conj$arity$2 = function(coll, o) {
|
|
var self__ = this;
|
|
if(cljs.core.truth_(self__.front)) {
|
|
return new cljs.core.PersistentQueue(self__.meta, self__.count + 1, self__.front, cljs.core.conj.call(null, function() {
|
|
var or__3943__auto__ = self__.rear;
|
|
if(cljs.core.truth_(or__3943__auto__)) {
|
|
return or__3943__auto__
|
|
}else {
|
|
return cljs.core.PersistentVector.EMPTY
|
|
}
|
|
}(), o), null)
|
|
}else {
|
|
return new cljs.core.PersistentQueue(self__.meta, self__.count + 1, cljs.core.conj.call(null, self__.front, o), cljs.core.PersistentVector.EMPTY, null)
|
|
}
|
|
};
|
|
cljs.core.PersistentQueue.prototype.toString = function() {
|
|
var self__ = this;
|
|
var coll = this;
|
|
return cljs.core.pr_str_STAR_.call(null, coll)
|
|
};
|
|
cljs.core.PersistentQueue.prototype.cljs$core$ISeqable$_seq$arity$1 = function(coll) {
|
|
var self__ = this;
|
|
var rear__$1 = cljs.core.seq.call(null, self__.rear);
|
|
if(cljs.core.truth_(function() {
|
|
var or__3943__auto__ = self__.front;
|
|
if(cljs.core.truth_(or__3943__auto__)) {
|
|
return or__3943__auto__
|
|
}else {
|
|
return rear__$1
|
|
}
|
|
}())) {
|
|
return new cljs.core.PersistentQueueSeq(null, self__.front, cljs.core.seq.call(null, rear__$1), null)
|
|
}else {
|
|
return null
|
|
}
|
|
};
|
|
cljs.core.PersistentQueue.prototype.cljs$core$ICounted$_count$arity$1 = function(coll) {
|
|
var self__ = this;
|
|
return self__.count
|
|
};
|
|
cljs.core.PersistentQueue.prototype.cljs$core$IStack$_peek$arity$1 = function(coll) {
|
|
var self__ = this;
|
|
return cljs.core.first.call(null, self__.front)
|
|
};
|
|
cljs.core.PersistentQueue.prototype.cljs$core$IStack$_pop$arity$1 = function(coll) {
|
|
var self__ = this;
|
|
if(cljs.core.truth_(self__.front)) {
|
|
var temp__4090__auto__ = cljs.core.next.call(null, self__.front);
|
|
if(temp__4090__auto__) {
|
|
var f1 = temp__4090__auto__;
|
|
return new cljs.core.PersistentQueue(self__.meta, self__.count - 1, f1, self__.rear, null)
|
|
}else {
|
|
return new cljs.core.PersistentQueue(self__.meta, self__.count - 1, cljs.core.seq.call(null, self__.rear), cljs.core.PersistentVector.EMPTY, null)
|
|
}
|
|
}else {
|
|
return coll
|
|
}
|
|
};
|
|
cljs.core.PersistentQueue.prototype.cljs$core$ISeq$_first$arity$1 = function(coll) {
|
|
var self__ = this;
|
|
return cljs.core.first.call(null, self__.front)
|
|
};
|
|
cljs.core.PersistentQueue.prototype.cljs$core$ISeq$_rest$arity$1 = function(coll) {
|
|
var self__ = this;
|
|
return cljs.core.rest.call(null, cljs.core.seq.call(null, coll))
|
|
};
|
|
cljs.core.PersistentQueue.prototype.cljs$core$IEquiv$_equiv$arity$2 = function(coll, other) {
|
|
var self__ = this;
|
|
return cljs.core.equiv_sequential.call(null, coll, other)
|
|
};
|
|
cljs.core.PersistentQueue.prototype.cljs$core$IWithMeta$_with_meta$arity$2 = function(coll, meta__$1) {
|
|
var self__ = this;
|
|
return new cljs.core.PersistentQueue(meta__$1, self__.count, self__.front, self__.rear, self__.__hash)
|
|
};
|
|
cljs.core.PersistentQueue.prototype.cljs$core$IMeta$_meta$arity$1 = function(coll) {
|
|
var self__ = this;
|
|
return self__.meta
|
|
};
|
|
cljs.core.PersistentQueue.prototype.cljs$core$IEmptyableCollection$_empty$arity$1 = function(coll) {
|
|
var self__ = this;
|
|
return cljs.core.PersistentQueue.EMPTY
|
|
};
|
|
cljs.core.__GT_PersistentQueue = function __GT_PersistentQueue(meta, count, front, rear, __hash) {
|
|
return new cljs.core.PersistentQueue(meta, count, front, rear, __hash)
|
|
};
|
|
cljs.core.PersistentQueue.EMPTY = new cljs.core.PersistentQueue(null, 0, null, cljs.core.PersistentVector.EMPTY, 0);
|
|
goog.provide("cljs.core.NeverEquiv");
|
|
cljs.core.NeverEquiv = function() {
|
|
this.cljs$lang$protocol_mask$partition1$ = 0;
|
|
this.cljs$lang$protocol_mask$partition0$ = 2097152
|
|
};
|
|
cljs.core.NeverEquiv.cljs$lang$type = true;
|
|
cljs.core.NeverEquiv.cljs$lang$ctorStr = "cljs.core/NeverEquiv";
|
|
cljs.core.NeverEquiv.cljs$lang$ctorPrWriter = function(this__2847__auto__, writer__2848__auto__, opt__2849__auto__) {
|
|
return cljs.core._write.call(null, writer__2848__auto__, "cljs.core/NeverEquiv")
|
|
};
|
|
cljs.core.NeverEquiv.prototype.cljs$core$IEquiv$_equiv$arity$2 = function(o, other) {
|
|
var self__ = this;
|
|
return false
|
|
};
|
|
cljs.core.__GT_NeverEquiv = function __GT_NeverEquiv() {
|
|
return new cljs.core.NeverEquiv
|
|
};
|
|
cljs.core.never_equiv = new cljs.core.NeverEquiv;
|
|
cljs.core.equiv_map = function equiv_map(x, y) {
|
|
return cljs.core.boolean$.call(null, cljs.core.map_QMARK_.call(null, y) ? cljs.core.count.call(null, x) === cljs.core.count.call(null, y) ? cljs.core.every_QMARK_.call(null, cljs.core.identity, cljs.core.map.call(null, function(xkv) {
|
|
return cljs.core._EQ_.call(null, cljs.core.get.call(null, y, cljs.core.first.call(null, xkv), cljs.core.never_equiv), cljs.core.second.call(null, xkv))
|
|
}, x)) : null : null)
|
|
};
|
|
cljs.core.scan_array = function scan_array(incr, k, array) {
|
|
var len = array.length;
|
|
var i = 0;
|
|
while(true) {
|
|
if(i < len) {
|
|
if(k === array[i]) {
|
|
return i
|
|
}else {
|
|
var G__13957 = i + incr;
|
|
i = G__13957;
|
|
continue
|
|
}
|
|
}else {
|
|
return null
|
|
}
|
|
break
|
|
}
|
|
};
|
|
cljs.core.obj_map_compare_keys = function obj_map_compare_keys(a, b) {
|
|
var a__$1 = cljs.core.hash.call(null, a);
|
|
var b__$1 = cljs.core.hash.call(null, b);
|
|
if(a__$1 < b__$1) {
|
|
return-1
|
|
}else {
|
|
if(a__$1 > b__$1) {
|
|
return 1
|
|
}else {
|
|
if("\ufdd0:else") {
|
|
return 0
|
|
}else {
|
|
return null
|
|
}
|
|
}
|
|
}
|
|
};
|
|
cljs.core.obj_map__GT_hash_map = function obj_map__GT_hash_map(m, k, v) {
|
|
var ks = m.keys;
|
|
var len = ks.length;
|
|
var so = m.strobj;
|
|
var mm = cljs.core.meta.call(null, m);
|
|
var i = 0;
|
|
var out = cljs.core.transient$.call(null, cljs.core.PersistentHashMap.EMPTY);
|
|
while(true) {
|
|
if(i < len) {
|
|
var k__$1 = ks[i];
|
|
var G__13958 = i + 1;
|
|
var G__13959 = cljs.core.assoc_BANG_.call(null, out, k__$1, so[k__$1]);
|
|
i = G__13958;
|
|
out = G__13959;
|
|
continue
|
|
}else {
|
|
return cljs.core.with_meta.call(null, cljs.core.persistent_BANG_.call(null, cljs.core.assoc_BANG_.call(null, out, k, v)), mm)
|
|
}
|
|
break
|
|
}
|
|
};
|
|
cljs.core.obj_clone = function obj_clone(obj, ks) {
|
|
var new_obj = {};
|
|
var l = ks.length;
|
|
var i_13960 = 0;
|
|
while(true) {
|
|
if(i_13960 < l) {
|
|
var k_13961 = ks[i_13960];
|
|
new_obj[k_13961] = obj[k_13961];
|
|
var G__13962 = i_13960 + 1;
|
|
i_13960 = G__13962;
|
|
continue
|
|
}else {
|
|
}
|
|
break
|
|
}
|
|
return new_obj
|
|
};
|
|
goog.provide("cljs.core.ObjMap");
|
|
cljs.core.ObjMap = function(meta, keys, strobj, update_count, __hash) {
|
|
this.meta = meta;
|
|
this.keys = keys;
|
|
this.strobj = strobj;
|
|
this.update_count = update_count;
|
|
this.__hash = __hash;
|
|
this.cljs$lang$protocol_mask$partition1$ = 4;
|
|
this.cljs$lang$protocol_mask$partition0$ = 16123663
|
|
};
|
|
cljs.core.ObjMap.cljs$lang$type = true;
|
|
cljs.core.ObjMap.cljs$lang$ctorStr = "cljs.core/ObjMap";
|
|
cljs.core.ObjMap.cljs$lang$ctorPrWriter = function(this__2847__auto__, writer__2848__auto__, opt__2849__auto__) {
|
|
return cljs.core._write.call(null, writer__2848__auto__, "cljs.core/ObjMap")
|
|
};
|
|
cljs.core.ObjMap.prototype.cljs$core$IEditableCollection$_as_transient$arity$1 = function(coll) {
|
|
var self__ = this;
|
|
return cljs.core.transient$.call(null, cljs.core.into.call(null, cljs.core.hash_map.call(null), coll))
|
|
};
|
|
cljs.core.ObjMap.prototype.cljs$core$IHash$_hash$arity$1 = function(coll) {
|
|
var self__ = this;
|
|
var h__2732__auto__ = self__.__hash;
|
|
if(!(h__2732__auto__ == null)) {
|
|
return h__2732__auto__
|
|
}else {
|
|
var h__2732__auto____$1 = cljs.core.hash_imap.call(null, coll);
|
|
self__.__hash = h__2732__auto____$1;
|
|
return h__2732__auto____$1
|
|
}
|
|
};
|
|
cljs.core.ObjMap.prototype.cljs$core$ILookup$_lookup$arity$2 = function(coll, k) {
|
|
var self__ = this;
|
|
return coll.cljs$core$ILookup$_lookup$arity$3(coll, k, null)
|
|
};
|
|
cljs.core.ObjMap.prototype.cljs$core$ILookup$_lookup$arity$3 = function(coll, k, not_found) {
|
|
var self__ = this;
|
|
if(function() {
|
|
var and__3941__auto__ = goog.isString(k);
|
|
if(and__3941__auto__) {
|
|
return!(cljs.core.scan_array.call(null, 1, k, self__.keys) == null)
|
|
}else {
|
|
return and__3941__auto__
|
|
}
|
|
}()) {
|
|
return self__.strobj[k]
|
|
}else {
|
|
return not_found
|
|
}
|
|
};
|
|
cljs.core.ObjMap.prototype.cljs$core$IAssociative$_assoc$arity$3 = function(coll, k, v) {
|
|
var self__ = this;
|
|
if(goog.isString(k)) {
|
|
if(function() {
|
|
var or__3943__auto__ = self__.update_count > cljs.core.ObjMap.HASHMAP_THRESHOLD;
|
|
if(or__3943__auto__) {
|
|
return or__3943__auto__
|
|
}else {
|
|
return self__.keys.length >= cljs.core.ObjMap.HASHMAP_THRESHOLD
|
|
}
|
|
}()) {
|
|
return cljs.core.obj_map__GT_hash_map.call(null, coll, k, v)
|
|
}else {
|
|
if(!(cljs.core.scan_array.call(null, 1, k, self__.keys) == null)) {
|
|
var new_strobj = cljs.core.obj_clone.call(null, self__.strobj, self__.keys);
|
|
new_strobj[k] = v;
|
|
return new cljs.core.ObjMap(self__.meta, self__.keys, new_strobj, self__.update_count + 1, null)
|
|
}else {
|
|
var new_strobj = cljs.core.obj_clone.call(null, self__.strobj, self__.keys);
|
|
var new_keys = self__.keys.slice();
|
|
new_strobj[k] = v;
|
|
new_keys.push(k);
|
|
return new cljs.core.ObjMap(self__.meta, new_keys, new_strobj, self__.update_count + 1, null)
|
|
}
|
|
}
|
|
}else {
|
|
return cljs.core.obj_map__GT_hash_map.call(null, coll, k, v)
|
|
}
|
|
};
|
|
cljs.core.ObjMap.prototype.cljs$core$IAssociative$_contains_key_QMARK_$arity$2 = function(coll, k) {
|
|
var self__ = this;
|
|
if(function() {
|
|
var and__3941__auto__ = goog.isString(k);
|
|
if(and__3941__auto__) {
|
|
return!(cljs.core.scan_array.call(null, 1, k, self__.keys) == null)
|
|
}else {
|
|
return and__3941__auto__
|
|
}
|
|
}()) {
|
|
return true
|
|
}else {
|
|
return false
|
|
}
|
|
};
|
|
cljs.core.ObjMap.prototype.call = function() {
|
|
var G__13965 = null;
|
|
var G__13965__2 = function(self__, k) {
|
|
var self__ = this;
|
|
var self____$1 = this;
|
|
var coll = self____$1;
|
|
return coll.cljs$core$ILookup$_lookup$arity$2(coll, k)
|
|
};
|
|
var G__13965__3 = function(self__, k, not_found) {
|
|
var self__ = this;
|
|
var self____$1 = this;
|
|
var coll = self____$1;
|
|
return coll.cljs$core$ILookup$_lookup$arity$3(coll, k, not_found)
|
|
};
|
|
G__13965 = function(self__, k, not_found) {
|
|
switch(arguments.length) {
|
|
case 2:
|
|
return G__13965__2.call(this, self__, k);
|
|
case 3:
|
|
return G__13965__3.call(this, self__, k, not_found)
|
|
}
|
|
throw new Error("Invalid arity: " + arguments.length);
|
|
};
|
|
return G__13965
|
|
}();
|
|
cljs.core.ObjMap.prototype.apply = function(self__, args13964) {
|
|
var self__ = this;
|
|
return self__.call.apply(self__, [self__].concat(args13964.slice()))
|
|
};
|
|
cljs.core.ObjMap.prototype.cljs$core$IKVReduce$_kv_reduce$arity$3 = function(coll, f, init) {
|
|
var self__ = this;
|
|
var len = self__.keys.length;
|
|
var keys__$1 = self__.keys.sort(cljs.core.obj_map_compare_keys);
|
|
var init__$1 = init;
|
|
while(true) {
|
|
if(cljs.core.seq.call(null, keys__$1)) {
|
|
var k = cljs.core.first.call(null, keys__$1);
|
|
var init__$2 = f.call(null, init__$1, k, self__.strobj[k]);
|
|
if(cljs.core.reduced_QMARK_.call(null, init__$2)) {
|
|
return cljs.core.deref.call(null, init__$2)
|
|
}else {
|
|
var G__13966 = cljs.core.rest.call(null, keys__$1);
|
|
var G__13967 = init__$2;
|
|
keys__$1 = G__13966;
|
|
init__$1 = G__13967;
|
|
continue
|
|
}
|
|
}else {
|
|
return init__$1
|
|
}
|
|
break
|
|
}
|
|
};
|
|
cljs.core.ObjMap.prototype.cljs$core$ICollection$_conj$arity$2 = function(coll, entry) {
|
|
var self__ = this;
|
|
if(cljs.core.vector_QMARK_.call(null, entry)) {
|
|
return coll.cljs$core$IAssociative$_assoc$arity$3(coll, cljs.core._nth.call(null, entry, 0), cljs.core._nth.call(null, entry, 1))
|
|
}else {
|
|
return cljs.core.reduce.call(null, cljs.core._conj, coll, entry)
|
|
}
|
|
};
|
|
cljs.core.ObjMap.prototype.toString = function() {
|
|
var self__ = this;
|
|
var coll = this;
|
|
return cljs.core.pr_str_STAR_.call(null, coll)
|
|
};
|
|
cljs.core.ObjMap.prototype.cljs$core$ISeqable$_seq$arity$1 = function(coll) {
|
|
var self__ = this;
|
|
if(self__.keys.length > 0) {
|
|
return cljs.core.map.call(null, function(p1__13963_SHARP_) {
|
|
return cljs.core.vector.call(null, p1__13963_SHARP_, self__.strobj[p1__13963_SHARP_])
|
|
}, self__.keys.sort(cljs.core.obj_map_compare_keys))
|
|
}else {
|
|
return null
|
|
}
|
|
};
|
|
cljs.core.ObjMap.prototype.cljs$core$ICounted$_count$arity$1 = function(coll) {
|
|
var self__ = this;
|
|
return self__.keys.length
|
|
};
|
|
cljs.core.ObjMap.prototype.cljs$core$IEquiv$_equiv$arity$2 = function(coll, other) {
|
|
var self__ = this;
|
|
return cljs.core.equiv_map.call(null, coll, other)
|
|
};
|
|
cljs.core.ObjMap.prototype.cljs$core$IWithMeta$_with_meta$arity$2 = function(coll, meta__$1) {
|
|
var self__ = this;
|
|
return new cljs.core.ObjMap(meta__$1, self__.keys, self__.strobj, self__.update_count, self__.__hash)
|
|
};
|
|
cljs.core.ObjMap.prototype.cljs$core$IMeta$_meta$arity$1 = function(coll) {
|
|
var self__ = this;
|
|
return self__.meta
|
|
};
|
|
cljs.core.ObjMap.prototype.cljs$core$IEmptyableCollection$_empty$arity$1 = function(coll) {
|
|
var self__ = this;
|
|
return cljs.core.with_meta.call(null, cljs.core.ObjMap.EMPTY, self__.meta)
|
|
};
|
|
cljs.core.ObjMap.prototype.cljs$core$IMap$_dissoc$arity$2 = function(coll, k) {
|
|
var self__ = this;
|
|
if(function() {
|
|
var and__3941__auto__ = goog.isString(k);
|
|
if(and__3941__auto__) {
|
|
return!(cljs.core.scan_array.call(null, 1, k, self__.keys) == null)
|
|
}else {
|
|
return and__3941__auto__
|
|
}
|
|
}()) {
|
|
var new_keys = self__.keys.slice();
|
|
var new_strobj = cljs.core.obj_clone.call(null, self__.strobj, self__.keys);
|
|
new_keys.splice(cljs.core.scan_array.call(null, 1, k, new_keys), 1);
|
|
delete new_strobj[k];
|
|
return new cljs.core.ObjMap(self__.meta, new_keys, new_strobj, self__.update_count + 1, null)
|
|
}else {
|
|
return coll
|
|
}
|
|
};
|
|
cljs.core.__GT_ObjMap = function __GT_ObjMap(meta, keys, strobj, update_count, __hash) {
|
|
return new cljs.core.ObjMap(meta, keys, strobj, update_count, __hash)
|
|
};
|
|
cljs.core.ObjMap.EMPTY = new cljs.core.ObjMap(null, [], {}, 0, 0);
|
|
cljs.core.ObjMap.HASHMAP_THRESHOLD = 8;
|
|
cljs.core.ObjMap.fromObject = function(ks, obj) {
|
|
return new cljs.core.ObjMap(null, ks, obj, 0, null)
|
|
};
|
|
cljs.core.array_map_index_of_nil_QMARK_ = function array_map_index_of_nil_QMARK_(arr, m, k) {
|
|
var len = arr.length;
|
|
var i = 0;
|
|
while(true) {
|
|
if(len <= i) {
|
|
return-1
|
|
}else {
|
|
if(arr[i] == null) {
|
|
return i
|
|
}else {
|
|
if("\ufdd0:else") {
|
|
var G__13968 = i + 2;
|
|
i = G__13968;
|
|
continue
|
|
}else {
|
|
return null
|
|
}
|
|
}
|
|
}
|
|
break
|
|
}
|
|
};
|
|
cljs.core.array_map_index_of_symbol_QMARK_ = function array_map_index_of_symbol_QMARK_(arr, m, k) {
|
|
var len = arr.length;
|
|
var kstr = k.str;
|
|
var i = 0;
|
|
while(true) {
|
|
if(len <= i) {
|
|
return-1
|
|
}else {
|
|
if(function() {
|
|
var k_SINGLEQUOTE_ = arr[i];
|
|
var and__3941__auto__ = k_SINGLEQUOTE_ instanceof cljs.core.Symbol;
|
|
if(and__3941__auto__) {
|
|
return kstr === k_SINGLEQUOTE_.str
|
|
}else {
|
|
return and__3941__auto__
|
|
}
|
|
}()) {
|
|
return i
|
|
}else {
|
|
if("\ufdd0:else") {
|
|
var G__13969 = i + 2;
|
|
i = G__13969;
|
|
continue
|
|
}else {
|
|
return null
|
|
}
|
|
}
|
|
}
|
|
break
|
|
}
|
|
};
|
|
cljs.core.array_map_index_of_identical_QMARK_ = function array_map_index_of_identical_QMARK_(arr, m, k) {
|
|
var len = arr.length;
|
|
var i = 0;
|
|
while(true) {
|
|
if(len <= i) {
|
|
return-1
|
|
}else {
|
|
if(k === arr[i]) {
|
|
return i
|
|
}else {
|
|
if("\ufdd0:else") {
|
|
var G__13970 = i + 2;
|
|
i = G__13970;
|
|
continue
|
|
}else {
|
|
return null
|
|
}
|
|
}
|
|
}
|
|
break
|
|
}
|
|
};
|
|
cljs.core.array_map_index_of_equiv_QMARK_ = function array_map_index_of_equiv_QMARK_(arr, m, k) {
|
|
var len = arr.length;
|
|
var i = 0;
|
|
while(true) {
|
|
if(len <= i) {
|
|
return-1
|
|
}else {
|
|
if(cljs.core._EQ_.call(null, k, arr[i])) {
|
|
return i
|
|
}else {
|
|
if("\ufdd0:else") {
|
|
var G__13971 = i + 2;
|
|
i = G__13971;
|
|
continue
|
|
}else {
|
|
return null
|
|
}
|
|
}
|
|
}
|
|
break
|
|
}
|
|
};
|
|
cljs.core.array_map_index_of = function array_map_index_of(m, k) {
|
|
var arr = m.arr;
|
|
if(function() {
|
|
var or__3943__auto__ = goog.isString(k);
|
|
if(or__3943__auto__) {
|
|
return or__3943__auto__
|
|
}else {
|
|
return typeof k === "number"
|
|
}
|
|
}()) {
|
|
return cljs.core.array_map_index_of_identical_QMARK_.call(null, arr, m, k)
|
|
}else {
|
|
if(k instanceof cljs.core.Symbol) {
|
|
return cljs.core.array_map_index_of_symbol_QMARK_.call(null, arr, m, k)
|
|
}else {
|
|
if(k == null) {
|
|
return cljs.core.array_map_index_of_nil_QMARK_.call(null, arr, m, k)
|
|
}else {
|
|
if("\ufdd0:else") {
|
|
return cljs.core.array_map_index_of_equiv_QMARK_.call(null, arr, m, k)
|
|
}else {
|
|
return null
|
|
}
|
|
}
|
|
}
|
|
}
|
|
};
|
|
cljs.core.array_map_extend_kv = function array_map_extend_kv(m, k, v) {
|
|
var arr = m.arr;
|
|
var l = arr.length;
|
|
var narr = new Array(l + 2);
|
|
var i_13972 = 0;
|
|
while(true) {
|
|
if(i_13972 < l) {
|
|
narr[i_13972] = arr[i_13972];
|
|
var G__13973 = i_13972 + 1;
|
|
i_13972 = G__13973;
|
|
continue
|
|
}else {
|
|
}
|
|
break
|
|
}
|
|
narr[l] = k;
|
|
narr[l + 1] = v;
|
|
return narr
|
|
};
|
|
goog.provide("cljs.core.PersistentArrayMapSeq");
|
|
cljs.core.PersistentArrayMapSeq = function(arr, i, _meta) {
|
|
this.arr = arr;
|
|
this.i = i;
|
|
this._meta = _meta;
|
|
this.cljs$lang$protocol_mask$partition1$ = 0;
|
|
this.cljs$lang$protocol_mask$partition0$ = 31850702
|
|
};
|
|
cljs.core.PersistentArrayMapSeq.cljs$lang$type = true;
|
|
cljs.core.PersistentArrayMapSeq.cljs$lang$ctorStr = "cljs.core/PersistentArrayMapSeq";
|
|
cljs.core.PersistentArrayMapSeq.cljs$lang$ctorPrWriter = function(this__2847__auto__, writer__2848__auto__, opt__2849__auto__) {
|
|
return cljs.core._write.call(null, writer__2848__auto__, "cljs.core/PersistentArrayMapSeq")
|
|
};
|
|
cljs.core.PersistentArrayMapSeq.prototype.cljs$core$IHash$_hash$arity$1 = function(coll) {
|
|
var self__ = this;
|
|
return cljs.core.hash_coll.call(null, coll)
|
|
};
|
|
cljs.core.PersistentArrayMapSeq.prototype.cljs$core$INext$_next$arity$1 = function(coll) {
|
|
var self__ = this;
|
|
if(self__.i < self__.arr.length - 2) {
|
|
return new cljs.core.PersistentArrayMapSeq(self__.arr, self__.i + 2, self__._meta)
|
|
}else {
|
|
return null
|
|
}
|
|
};
|
|
cljs.core.PersistentArrayMapSeq.prototype.cljs$core$ICollection$_conj$arity$2 = function(coll, o) {
|
|
var self__ = this;
|
|
return cljs.core.cons.call(null, o, coll)
|
|
};
|
|
cljs.core.PersistentArrayMapSeq.prototype.toString = function() {
|
|
var self__ = this;
|
|
var coll = this;
|
|
return cljs.core.pr_str_STAR_.call(null, coll)
|
|
};
|
|
cljs.core.PersistentArrayMapSeq.prototype.cljs$core$ISeqable$_seq$arity$1 = function(coll) {
|
|
var self__ = this;
|
|
return coll
|
|
};
|
|
cljs.core.PersistentArrayMapSeq.prototype.cljs$core$ICounted$_count$arity$1 = function(coll) {
|
|
var self__ = this;
|
|
return(self__.arr.length - self__.i) / 2
|
|
};
|
|
cljs.core.PersistentArrayMapSeq.prototype.cljs$core$ISeq$_first$arity$1 = function(coll) {
|
|
var self__ = this;
|
|
return cljs.core.PersistentVector.fromArray([self__.arr[self__.i], self__.arr[self__.i + 1]], true)
|
|
};
|
|
cljs.core.PersistentArrayMapSeq.prototype.cljs$core$ISeq$_rest$arity$1 = function(coll) {
|
|
var self__ = this;
|
|
if(self__.i < self__.arr.length - 2) {
|
|
return new cljs.core.PersistentArrayMapSeq(self__.arr, self__.i + 2, self__._meta)
|
|
}else {
|
|
return cljs.core.List.EMPTY
|
|
}
|
|
};
|
|
cljs.core.PersistentArrayMapSeq.prototype.cljs$core$IEquiv$_equiv$arity$2 = function(coll, other) {
|
|
var self__ = this;
|
|
return cljs.core.equiv_sequential.call(null, coll, other)
|
|
};
|
|
cljs.core.PersistentArrayMapSeq.prototype.cljs$core$IWithMeta$_with_meta$arity$2 = function(coll, new_meta) {
|
|
var self__ = this;
|
|
return new cljs.core.PersistentArrayMapSeq(self__.arr, self__.i, new_meta)
|
|
};
|
|
cljs.core.PersistentArrayMapSeq.prototype.cljs$core$IMeta$_meta$arity$1 = function(coll) {
|
|
var self__ = this;
|
|
return self__._meta
|
|
};
|
|
cljs.core.PersistentArrayMapSeq.prototype.cljs$core$IEmptyableCollection$_empty$arity$1 = function(coll) {
|
|
var self__ = this;
|
|
return cljs.core.with_meta.call(null, cljs.core.List.EMPTY, self__._meta)
|
|
};
|
|
cljs.core.__GT_PersistentArrayMapSeq = function __GT_PersistentArrayMapSeq(arr, i, _meta) {
|
|
return new cljs.core.PersistentArrayMapSeq(arr, i, _meta)
|
|
};
|
|
cljs.core.persistent_array_map_seq = function persistent_array_map_seq(arr, i, _meta) {
|
|
if(i <= arr.length - 2) {
|
|
return new cljs.core.PersistentArrayMapSeq(arr, i, _meta)
|
|
}else {
|
|
return null
|
|
}
|
|
};
|
|
goog.provide("cljs.core.PersistentArrayMap");
|
|
cljs.core.PersistentArrayMap = function(meta, cnt, arr, __hash) {
|
|
this.meta = meta;
|
|
this.cnt = cnt;
|
|
this.arr = arr;
|
|
this.__hash = __hash;
|
|
this.cljs$lang$protocol_mask$partition1$ = 4;
|
|
this.cljs$lang$protocol_mask$partition0$ = 16123663
|
|
};
|
|
cljs.core.PersistentArrayMap.cljs$lang$type = true;
|
|
cljs.core.PersistentArrayMap.cljs$lang$ctorStr = "cljs.core/PersistentArrayMap";
|
|
cljs.core.PersistentArrayMap.cljs$lang$ctorPrWriter = function(this__2847__auto__, writer__2848__auto__, opt__2849__auto__) {
|
|
return cljs.core._write.call(null, writer__2848__auto__, "cljs.core/PersistentArrayMap")
|
|
};
|
|
cljs.core.PersistentArrayMap.prototype.cljs$core$IEditableCollection$_as_transient$arity$1 = function(coll) {
|
|
var self__ = this;
|
|
return new cljs.core.TransientArrayMap({}, self__.arr.length, self__.arr.slice())
|
|
};
|
|
cljs.core.PersistentArrayMap.prototype.cljs$core$IHash$_hash$arity$1 = function(coll) {
|
|
var self__ = this;
|
|
var h__2732__auto__ = self__.__hash;
|
|
if(!(h__2732__auto__ == null)) {
|
|
return h__2732__auto__
|
|
}else {
|
|
var h__2732__auto____$1 = cljs.core.hash_imap.call(null, coll);
|
|
self__.__hash = h__2732__auto____$1;
|
|
return h__2732__auto____$1
|
|
}
|
|
};
|
|
cljs.core.PersistentArrayMap.prototype.cljs$core$ILookup$_lookup$arity$2 = function(coll, k) {
|
|
var self__ = this;
|
|
return coll.cljs$core$ILookup$_lookup$arity$3(coll, k, null)
|
|
};
|
|
cljs.core.PersistentArrayMap.prototype.cljs$core$ILookup$_lookup$arity$3 = function(coll, k, not_found) {
|
|
var self__ = this;
|
|
var idx = cljs.core.array_map_index_of.call(null, coll, k);
|
|
if(idx === -1) {
|
|
return not_found
|
|
}else {
|
|
return self__.arr[idx + 1]
|
|
}
|
|
};
|
|
cljs.core.PersistentArrayMap.prototype.cljs$core$IAssociative$_assoc$arity$3 = function(coll, k, v) {
|
|
var self__ = this;
|
|
var idx = cljs.core.array_map_index_of.call(null, coll, k);
|
|
if(idx === -1) {
|
|
if(self__.cnt < cljs.core.PersistentArrayMap.HASHMAP_THRESHOLD) {
|
|
var arr__$1 = cljs.core.array_map_extend_kv.call(null, coll, k, v);
|
|
return new cljs.core.PersistentArrayMap(self__.meta, self__.cnt + 1, arr__$1, null)
|
|
}else {
|
|
return cljs.core._with_meta.call(null, cljs.core._assoc.call(null, cljs.core.into.call(null, cljs.core.PersistentHashMap.EMPTY, coll), k, v), self__.meta)
|
|
}
|
|
}else {
|
|
if(v === self__.arr[idx + 1]) {
|
|
return coll
|
|
}else {
|
|
if("\ufdd0:else") {
|
|
var arr__$1 = function() {
|
|
var G__13975 = self__.arr.slice();
|
|
G__13975[idx + 1] = v;
|
|
return G__13975
|
|
}();
|
|
return new cljs.core.PersistentArrayMap(self__.meta, self__.cnt, arr__$1, null)
|
|
}else {
|
|
return null
|
|
}
|
|
}
|
|
}
|
|
};
|
|
cljs.core.PersistentArrayMap.prototype.cljs$core$IAssociative$_contains_key_QMARK_$arity$2 = function(coll, k) {
|
|
var self__ = this;
|
|
return!(cljs.core.array_map_index_of.call(null, coll, k) === -1)
|
|
};
|
|
cljs.core.PersistentArrayMap.prototype.call = function() {
|
|
var G__13976 = null;
|
|
var G__13976__2 = function(self__, k) {
|
|
var self__ = this;
|
|
var self____$1 = this;
|
|
var coll = self____$1;
|
|
return coll.cljs$core$ILookup$_lookup$arity$2(coll, k)
|
|
};
|
|
var G__13976__3 = function(self__, k, not_found) {
|
|
var self__ = this;
|
|
var self____$1 = this;
|
|
var coll = self____$1;
|
|
return coll.cljs$core$ILookup$_lookup$arity$3(coll, k, not_found)
|
|
};
|
|
G__13976 = function(self__, k, not_found) {
|
|
switch(arguments.length) {
|
|
case 2:
|
|
return G__13976__2.call(this, self__, k);
|
|
case 3:
|
|
return G__13976__3.call(this, self__, k, not_found)
|
|
}
|
|
throw new Error("Invalid arity: " + arguments.length);
|
|
};
|
|
return G__13976
|
|
}();
|
|
cljs.core.PersistentArrayMap.prototype.apply = function(self__, args13974) {
|
|
var self__ = this;
|
|
return self__.call.apply(self__, [self__].concat(args13974.slice()))
|
|
};
|
|
cljs.core.PersistentArrayMap.prototype.cljs$core$IKVReduce$_kv_reduce$arity$3 = function(coll, f, init) {
|
|
var self__ = this;
|
|
var len = self__.arr.length;
|
|
var i = 0;
|
|
var init__$1 = init;
|
|
while(true) {
|
|
if(i < len) {
|
|
var init__$2 = f.call(null, init__$1, self__.arr[i], self__.arr[i + 1]);
|
|
if(cljs.core.reduced_QMARK_.call(null, init__$2)) {
|
|
return cljs.core.deref.call(null, init__$2)
|
|
}else {
|
|
var G__13977 = i + 2;
|
|
var G__13978 = init__$2;
|
|
i = G__13977;
|
|
init__$1 = G__13978;
|
|
continue
|
|
}
|
|
}else {
|
|
return init__$1
|
|
}
|
|
break
|
|
}
|
|
};
|
|
cljs.core.PersistentArrayMap.prototype.cljs$core$ICollection$_conj$arity$2 = function(coll, entry) {
|
|
var self__ = this;
|
|
if(cljs.core.vector_QMARK_.call(null, entry)) {
|
|
return coll.cljs$core$IAssociative$_assoc$arity$3(coll, cljs.core._nth.call(null, entry, 0), cljs.core._nth.call(null, entry, 1))
|
|
}else {
|
|
return cljs.core.reduce.call(null, cljs.core._conj, coll, entry)
|
|
}
|
|
};
|
|
cljs.core.PersistentArrayMap.prototype.toString = function() {
|
|
var self__ = this;
|
|
var coll = this;
|
|
return cljs.core.pr_str_STAR_.call(null, coll)
|
|
};
|
|
cljs.core.PersistentArrayMap.prototype.cljs$core$ISeqable$_seq$arity$1 = function(coll) {
|
|
var self__ = this;
|
|
return cljs.core.persistent_array_map_seq.call(null, self__.arr, 0, null)
|
|
};
|
|
cljs.core.PersistentArrayMap.prototype.cljs$core$ICounted$_count$arity$1 = function(coll) {
|
|
var self__ = this;
|
|
return self__.cnt
|
|
};
|
|
cljs.core.PersistentArrayMap.prototype.cljs$core$IEquiv$_equiv$arity$2 = function(coll, other) {
|
|
var self__ = this;
|
|
return cljs.core.equiv_map.call(null, coll, other)
|
|
};
|
|
cljs.core.PersistentArrayMap.prototype.cljs$core$IWithMeta$_with_meta$arity$2 = function(coll, meta__$1) {
|
|
var self__ = this;
|
|
return new cljs.core.PersistentArrayMap(meta__$1, self__.cnt, self__.arr, self__.__hash)
|
|
};
|
|
cljs.core.PersistentArrayMap.prototype.cljs$core$IMeta$_meta$arity$1 = function(coll) {
|
|
var self__ = this;
|
|
return self__.meta
|
|
};
|
|
cljs.core.PersistentArrayMap.prototype.cljs$core$IEmptyableCollection$_empty$arity$1 = function(coll) {
|
|
var self__ = this;
|
|
return cljs.core._with_meta.call(null, cljs.core.PersistentArrayMap.EMPTY, self__.meta)
|
|
};
|
|
cljs.core.PersistentArrayMap.prototype.cljs$core$IMap$_dissoc$arity$2 = function(coll, k) {
|
|
var self__ = this;
|
|
var idx = cljs.core.array_map_index_of.call(null, coll, k);
|
|
if(idx >= 0) {
|
|
var len = self__.arr.length;
|
|
var new_len = len - 2;
|
|
if(new_len === 0) {
|
|
return coll.cljs$core$IEmptyableCollection$_empty$arity$1(coll)
|
|
}else {
|
|
var new_arr = new Array(new_len);
|
|
var s = 0;
|
|
var d = 0;
|
|
while(true) {
|
|
if(s >= len) {
|
|
return new cljs.core.PersistentArrayMap(self__.meta, self__.cnt - 1, new_arr, null)
|
|
}else {
|
|
if(cljs.core._EQ_.call(null, k, self__.arr[s])) {
|
|
var G__13979 = s + 2;
|
|
var G__13980 = d;
|
|
s = G__13979;
|
|
d = G__13980;
|
|
continue
|
|
}else {
|
|
if("\ufdd0:else") {
|
|
new_arr[d] = self__.arr[s];
|
|
new_arr[d + 1] = self__.arr[s + 1];
|
|
var G__13981 = s + 2;
|
|
var G__13982 = d + 2;
|
|
s = G__13981;
|
|
d = G__13982;
|
|
continue
|
|
}else {
|
|
return null
|
|
}
|
|
}
|
|
}
|
|
break
|
|
}
|
|
}
|
|
}else {
|
|
return coll
|
|
}
|
|
};
|
|
cljs.core.__GT_PersistentArrayMap = function __GT_PersistentArrayMap(meta, cnt, arr, __hash) {
|
|
return new cljs.core.PersistentArrayMap(meta, cnt, arr, __hash)
|
|
};
|
|
cljs.core.PersistentArrayMap.EMPTY = new cljs.core.PersistentArrayMap(null, 0, [], null);
|
|
cljs.core.PersistentArrayMap.HASHMAP_THRESHOLD = 8;
|
|
cljs.core.PersistentArrayMap.fromArray = function(arr, no_clone) {
|
|
var arr__$1 = no_clone ? arr : arr.slice();
|
|
var cnt = arr__$1.length / 2;
|
|
return new cljs.core.PersistentArrayMap(null, cnt, arr__$1, null)
|
|
};
|
|
goog.provide("cljs.core.TransientArrayMap");
|
|
cljs.core.TransientArrayMap = function(editable_QMARK_, len, arr) {
|
|
this.editable_QMARK_ = editable_QMARK_;
|
|
this.len = len;
|
|
this.arr = arr;
|
|
this.cljs$lang$protocol_mask$partition1$ = 56;
|
|
this.cljs$lang$protocol_mask$partition0$ = 258
|
|
};
|
|
cljs.core.TransientArrayMap.cljs$lang$type = true;
|
|
cljs.core.TransientArrayMap.cljs$lang$ctorStr = "cljs.core/TransientArrayMap";
|
|
cljs.core.TransientArrayMap.cljs$lang$ctorPrWriter = function(this__2847__auto__, writer__2848__auto__, opt__2849__auto__) {
|
|
return cljs.core._write.call(null, writer__2848__auto__, "cljs.core/TransientArrayMap")
|
|
};
|
|
cljs.core.TransientArrayMap.prototype.cljs$core$ITransientMap$_dissoc_BANG_$arity$2 = function(tcoll, key) {
|
|
var self__ = this;
|
|
if(cljs.core.truth_(self__.editable_QMARK_)) {
|
|
var idx = cljs.core.array_map_index_of.call(null, tcoll, key);
|
|
if(idx >= 0) {
|
|
self__.arr[idx] = self__.arr[self__.len - 2];
|
|
self__.arr[idx + 1] = self__.arr[self__.len - 1];
|
|
var G__13983_13985 = self__.arr;
|
|
G__13983_13985.pop();
|
|
G__13983_13985.pop();
|
|
self__.len = self__.len - 2
|
|
}else {
|
|
}
|
|
return tcoll
|
|
}else {
|
|
throw new Error("dissoc! after persistent!");
|
|
}
|
|
};
|
|
cljs.core.TransientArrayMap.prototype.cljs$core$ITransientAssociative$_assoc_BANG_$arity$3 = function(tcoll, key, val) {
|
|
var self__ = this;
|
|
if(cljs.core.truth_(self__.editable_QMARK_)) {
|
|
var idx = cljs.core.array_map_index_of.call(null, tcoll, key);
|
|
if(idx === -1) {
|
|
if(self__.len + 2 <= 2 * cljs.core.PersistentArrayMap.HASHMAP_THRESHOLD) {
|
|
self__.len = self__.len + 2;
|
|
self__.arr.push(key);
|
|
self__.arr.push(val);
|
|
return tcoll
|
|
}else {
|
|
return cljs.core.assoc_BANG_.call(null, cljs.core.array__GT_transient_hash_map.call(null, self__.len, self__.arr), key, val)
|
|
}
|
|
}else {
|
|
if(val === self__.arr[idx + 1]) {
|
|
return tcoll
|
|
}else {
|
|
self__.arr[idx + 1] = val;
|
|
return tcoll
|
|
}
|
|
}
|
|
}else {
|
|
throw new Error("assoc! after persistent!");
|
|
}
|
|
};
|
|
cljs.core.TransientArrayMap.prototype.cljs$core$ITransientCollection$_conj_BANG_$arity$2 = function(tcoll, o) {
|
|
var self__ = this;
|
|
if(cljs.core.truth_(self__.editable_QMARK_)) {
|
|
if(function() {
|
|
var G__13984 = o;
|
|
if(G__13984) {
|
|
if(function() {
|
|
var or__3943__auto__ = G__13984.cljs$lang$protocol_mask$partition0$ & 2048;
|
|
if(or__3943__auto__) {
|
|
return or__3943__auto__
|
|
}else {
|
|
return G__13984.cljs$core$IMapEntry$
|
|
}
|
|
}()) {
|
|
return true
|
|
}else {
|
|
if(!G__13984.cljs$lang$protocol_mask$partition0$) {
|
|
return cljs.core.type_satisfies_.call(null, cljs.core.IMapEntry, G__13984)
|
|
}else {
|
|
return false
|
|
}
|
|
}
|
|
}else {
|
|
return cljs.core.type_satisfies_.call(null, cljs.core.IMapEntry, G__13984)
|
|
}
|
|
}()) {
|
|
return tcoll.cljs$core$ITransientAssociative$_assoc_BANG_$arity$3(tcoll, cljs.core.key.call(null, o), cljs.core.val.call(null, o))
|
|
}else {
|
|
var es = cljs.core.seq.call(null, o);
|
|
var tcoll__$1 = tcoll;
|
|
while(true) {
|
|
var temp__4090__auto__ = cljs.core.first.call(null, es);
|
|
if(cljs.core.truth_(temp__4090__auto__)) {
|
|
var e = temp__4090__auto__;
|
|
var G__13986 = cljs.core.next.call(null, es);
|
|
var G__13987 = tcoll__$1.cljs$core$ITransientAssociative$_assoc_BANG_$arity$3(tcoll__$1, cljs.core.key.call(null, e), cljs.core.val.call(null, e));
|
|
es = G__13986;
|
|
tcoll__$1 = G__13987;
|
|
continue
|
|
}else {
|
|
return tcoll__$1
|
|
}
|
|
break
|
|
}
|
|
}
|
|
}else {
|
|
throw new Error("conj! after persistent!");
|
|
}
|
|
};
|
|
cljs.core.TransientArrayMap.prototype.cljs$core$ITransientCollection$_persistent_BANG_$arity$1 = function(tcoll) {
|
|
var self__ = this;
|
|
if(cljs.core.truth_(self__.editable_QMARK_)) {
|
|
self__.editable_QMARK_ = false;
|
|
return new cljs.core.PersistentArrayMap(null, cljs.core.quot.call(null, self__.len, 2), self__.arr, null)
|
|
}else {
|
|
throw new Error("persistent! called twice");
|
|
}
|
|
};
|
|
cljs.core.TransientArrayMap.prototype.cljs$core$ILookup$_lookup$arity$2 = function(tcoll, k) {
|
|
var self__ = this;
|
|
return tcoll.cljs$core$ILookup$_lookup$arity$3(tcoll, k, null)
|
|
};
|
|
cljs.core.TransientArrayMap.prototype.cljs$core$ILookup$_lookup$arity$3 = function(tcoll, k, not_found) {
|
|
var self__ = this;
|
|
if(cljs.core.truth_(self__.editable_QMARK_)) {
|
|
var idx = cljs.core.array_map_index_of.call(null, tcoll, k);
|
|
if(idx === -1) {
|
|
return not_found
|
|
}else {
|
|
return self__.arr[idx + 1]
|
|
}
|
|
}else {
|
|
throw new Error("lookup after persistent!");
|
|
}
|
|
};
|
|
cljs.core.TransientArrayMap.prototype.cljs$core$ICounted$_count$arity$1 = function(tcoll) {
|
|
var self__ = this;
|
|
if(cljs.core.truth_(self__.editable_QMARK_)) {
|
|
return cljs.core.quot.call(null, self__.len, 2)
|
|
}else {
|
|
throw new Error("count after persistent!");
|
|
}
|
|
};
|
|
cljs.core.__GT_TransientArrayMap = function __GT_TransientArrayMap(editable_QMARK_, len, arr) {
|
|
return new cljs.core.TransientArrayMap(editable_QMARK_, len, arr)
|
|
};
|
|
cljs.core.array__GT_transient_hash_map = function array__GT_transient_hash_map(len, arr) {
|
|
var out = cljs.core.transient$.call(null, cljs.core.PersistentHashMap.EMPTY);
|
|
var i = 0;
|
|
while(true) {
|
|
if(i < len) {
|
|
var G__13988 = cljs.core.assoc_BANG_.call(null, out, arr[i], arr[i + 1]);
|
|
var G__13989 = i + 2;
|
|
out = G__13988;
|
|
i = G__13989;
|
|
continue
|
|
}else {
|
|
return out
|
|
}
|
|
break
|
|
}
|
|
};
|
|
goog.provide("cljs.core.Box");
|
|
cljs.core.Box = function(val) {
|
|
this.val = val
|
|
};
|
|
cljs.core.Box.cljs$lang$type = true;
|
|
cljs.core.Box.cljs$lang$ctorStr = "cljs.core/Box";
|
|
cljs.core.Box.cljs$lang$ctorPrWriter = function(this__2850__auto__, writer__2851__auto__, opts__2852__auto__) {
|
|
return cljs.core._write.call(null, writer__2851__auto__, "cljs.core/Box")
|
|
};
|
|
cljs.core.__GT_Box = function __GT_Box(val) {
|
|
return new cljs.core.Box(val)
|
|
};
|
|
cljs.core.key_test = function key_test(key, other) {
|
|
if(goog.isString(key)) {
|
|
return key === other
|
|
}else {
|
|
return cljs.core._EQ_.call(null, key, other)
|
|
}
|
|
};
|
|
cljs.core.mask = function mask(hash, shift) {
|
|
return hash >>> shift & 31
|
|
};
|
|
cljs.core.clone_and_set = function() {
|
|
var clone_and_set = null;
|
|
var clone_and_set__3 = function(arr, i, a) {
|
|
var G__13992 = arr.slice();
|
|
G__13992[i] = a;
|
|
return G__13992
|
|
};
|
|
var clone_and_set__5 = function(arr, i, a, j, b) {
|
|
var G__13993 = arr.slice();
|
|
G__13993[i] = a;
|
|
G__13993[j] = b;
|
|
return G__13993
|
|
};
|
|
clone_and_set = function(arr, i, a, j, b) {
|
|
switch(arguments.length) {
|
|
case 3:
|
|
return clone_and_set__3.call(this, arr, i, a);
|
|
case 5:
|
|
return clone_and_set__5.call(this, arr, i, a, j, b)
|
|
}
|
|
throw new Error("Invalid arity: " + arguments.length);
|
|
};
|
|
clone_and_set.cljs$core$IFn$_invoke$arity$3 = clone_and_set__3;
|
|
clone_and_set.cljs$core$IFn$_invoke$arity$5 = clone_and_set__5;
|
|
return clone_and_set
|
|
}();
|
|
cljs.core.remove_pair = function remove_pair(arr, i) {
|
|
var new_arr = new Array(arr.length - 2);
|
|
cljs.core.array_copy.call(null, arr, 0, new_arr, 0, 2 * i);
|
|
cljs.core.array_copy.call(null, arr, 2 * (i + 1), new_arr, 2 * i, new_arr.length - 2 * i);
|
|
return new_arr
|
|
};
|
|
cljs.core.bitmap_indexed_node_index = function bitmap_indexed_node_index(bitmap, bit) {
|
|
return cljs.core.bit_count.call(null, bitmap & bit - 1)
|
|
};
|
|
cljs.core.bitpos = function bitpos(hash, shift) {
|
|
return 1 << (hash >>> shift & 31)
|
|
};
|
|
cljs.core.edit_and_set = function() {
|
|
var edit_and_set = null;
|
|
var edit_and_set__4 = function(inode, edit, i, a) {
|
|
var editable = inode.ensure_editable(edit);
|
|
editable.arr[i] = a;
|
|
return editable
|
|
};
|
|
var edit_and_set__6 = function(inode, edit, i, a, j, b) {
|
|
var editable = inode.ensure_editable(edit);
|
|
editable.arr[i] = a;
|
|
editable.arr[j] = b;
|
|
return editable
|
|
};
|
|
edit_and_set = function(inode, edit, i, a, j, b) {
|
|
switch(arguments.length) {
|
|
case 4:
|
|
return edit_and_set__4.call(this, inode, edit, i, a);
|
|
case 6:
|
|
return edit_and_set__6.call(this, inode, edit, i, a, j, b)
|
|
}
|
|
throw new Error("Invalid arity: " + arguments.length);
|
|
};
|
|
edit_and_set.cljs$core$IFn$_invoke$arity$4 = edit_and_set__4;
|
|
edit_and_set.cljs$core$IFn$_invoke$arity$6 = edit_and_set__6;
|
|
return edit_and_set
|
|
}();
|
|
cljs.core.inode_kv_reduce = function inode_kv_reduce(arr, f, init) {
|
|
var len = arr.length;
|
|
var i = 0;
|
|
var init__$1 = init;
|
|
while(true) {
|
|
if(i < len) {
|
|
var init__$2 = function() {
|
|
var k = arr[i];
|
|
if(!(k == null)) {
|
|
return f.call(null, init__$1, k, arr[i + 1])
|
|
}else {
|
|
var node = arr[i + 1];
|
|
if(!(node == null)) {
|
|
return node.kv_reduce(f, init__$1)
|
|
}else {
|
|
return init__$1
|
|
}
|
|
}
|
|
}();
|
|
if(cljs.core.reduced_QMARK_.call(null, init__$2)) {
|
|
return cljs.core.deref.call(null, init__$2)
|
|
}else {
|
|
var G__13994 = i + 2;
|
|
var G__13995 = init__$2;
|
|
i = G__13994;
|
|
init__$1 = G__13995;
|
|
continue
|
|
}
|
|
}else {
|
|
return init__$1
|
|
}
|
|
break
|
|
}
|
|
};
|
|
goog.provide("cljs.core.BitmapIndexedNode");
|
|
cljs.core.BitmapIndexedNode = function(edit, bitmap, arr) {
|
|
this.edit = edit;
|
|
this.bitmap = bitmap;
|
|
this.arr = arr
|
|
};
|
|
cljs.core.BitmapIndexedNode.cljs$lang$type = true;
|
|
cljs.core.BitmapIndexedNode.cljs$lang$ctorStr = "cljs.core/BitmapIndexedNode";
|
|
cljs.core.BitmapIndexedNode.cljs$lang$ctorPrWriter = function(this__2847__auto__, writer__2848__auto__, opt__2849__auto__) {
|
|
return cljs.core._write.call(null, writer__2848__auto__, "cljs.core/BitmapIndexedNode")
|
|
};
|
|
cljs.core.BitmapIndexedNode.prototype.edit_and_remove_pair = function(e, bit, i) {
|
|
var self__ = this;
|
|
var inode = this;
|
|
if(self__.bitmap === bit) {
|
|
return null
|
|
}else {
|
|
var editable = inode.ensure_editable(e);
|
|
var earr = editable.arr;
|
|
var len = earr.length;
|
|
editable.bitmap = bit ^ editable.bitmap;
|
|
cljs.core.array_copy.call(null, earr, 2 * (i + 1), earr, 2 * i, len - 2 * (i + 1));
|
|
earr[len - 2] = null;
|
|
earr[len - 1] = null;
|
|
return editable
|
|
}
|
|
};
|
|
cljs.core.BitmapIndexedNode.prototype.inode_assoc_BANG_ = function(edit__$1, shift, hash, key, val, added_leaf_QMARK_) {
|
|
var self__ = this;
|
|
var inode = this;
|
|
var bit = 1 << (hash >>> shift & 31);
|
|
var idx = cljs.core.bitmap_indexed_node_index.call(null, self__.bitmap, bit);
|
|
if((self__.bitmap & bit) === 0) {
|
|
var n = cljs.core.bit_count.call(null, self__.bitmap);
|
|
if(2 * n < self__.arr.length) {
|
|
var editable = inode.ensure_editable(edit__$1);
|
|
var earr = editable.arr;
|
|
added_leaf_QMARK_.val = true;
|
|
cljs.core.array_copy_downward.call(null, earr, 2 * idx, earr, 2 * (idx + 1), 2 * (n - idx));
|
|
earr[2 * idx] = key;
|
|
earr[2 * idx + 1] = val;
|
|
editable.bitmap = editable.bitmap | bit;
|
|
return editable
|
|
}else {
|
|
if(n >= 16) {
|
|
var nodes = new Array(32);
|
|
var jdx = hash >>> shift & 31;
|
|
nodes[jdx] = cljs.core.BitmapIndexedNode.EMPTY.inode_assoc_BANG_(edit__$1, shift + 5, hash, key, val, added_leaf_QMARK_);
|
|
var i_13996 = 0;
|
|
var j_13997 = 0;
|
|
while(true) {
|
|
if(i_13996 < 32) {
|
|
if((self__.bitmap >>> i_13996 & 1) === 0) {
|
|
var G__13998 = i_13996 + 1;
|
|
var G__13999 = j_13997;
|
|
i_13996 = G__13998;
|
|
j_13997 = G__13999;
|
|
continue
|
|
}else {
|
|
nodes[i_13996] = !(self__.arr[j_13997] == null) ? cljs.core.BitmapIndexedNode.EMPTY.inode_assoc_BANG_(edit__$1, shift + 5, cljs.core.hash.call(null, self__.arr[j_13997]), self__.arr[j_13997], self__.arr[j_13997 + 1], added_leaf_QMARK_) : self__.arr[j_13997 + 1];
|
|
var G__14000 = i_13996 + 1;
|
|
var G__14001 = j_13997 + 2;
|
|
i_13996 = G__14000;
|
|
j_13997 = G__14001;
|
|
continue
|
|
}
|
|
}else {
|
|
}
|
|
break
|
|
}
|
|
return new cljs.core.ArrayNode(edit__$1, n + 1, nodes)
|
|
}else {
|
|
if("\ufdd0:else") {
|
|
var new_arr = new Array(2 * (n + 4));
|
|
cljs.core.array_copy.call(null, self__.arr, 0, new_arr, 0, 2 * idx);
|
|
new_arr[2 * idx] = key;
|
|
new_arr[2 * idx + 1] = val;
|
|
cljs.core.array_copy.call(null, self__.arr, 2 * idx, new_arr, 2 * (idx + 1), 2 * (n - idx));
|
|
added_leaf_QMARK_.val = true;
|
|
var editable = inode.ensure_editable(edit__$1);
|
|
editable.arr = new_arr;
|
|
editable.bitmap = editable.bitmap | bit;
|
|
return editable
|
|
}else {
|
|
return null
|
|
}
|
|
}
|
|
}
|
|
}else {
|
|
var key_or_nil = self__.arr[2 * idx];
|
|
var val_or_node = self__.arr[2 * idx + 1];
|
|
if(key_or_nil == null) {
|
|
var n = val_or_node.inode_assoc_BANG_(edit__$1, shift + 5, hash, key, val, added_leaf_QMARK_);
|
|
if(n === val_or_node) {
|
|
return inode
|
|
}else {
|
|
return cljs.core.edit_and_set.call(null, inode, edit__$1, 2 * idx + 1, n)
|
|
}
|
|
}else {
|
|
if(cljs.core.key_test.call(null, key, key_or_nil)) {
|
|
if(val === val_or_node) {
|
|
return inode
|
|
}else {
|
|
return cljs.core.edit_and_set.call(null, inode, edit__$1, 2 * idx + 1, val)
|
|
}
|
|
}else {
|
|
if("\ufdd0:else") {
|
|
added_leaf_QMARK_.val = true;
|
|
return cljs.core.edit_and_set.call(null, inode, edit__$1, 2 * idx, null, 2 * idx + 1, cljs.core.create_node.call(null, edit__$1, shift + 5, key_or_nil, val_or_node, hash, key, val))
|
|
}else {
|
|
return null
|
|
}
|
|
}
|
|
}
|
|
}
|
|
};
|
|
cljs.core.BitmapIndexedNode.prototype.inode_seq = function() {
|
|
var self__ = this;
|
|
var inode = this;
|
|
return cljs.core.create_inode_seq.call(null, self__.arr)
|
|
};
|
|
cljs.core.BitmapIndexedNode.prototype.inode_without_BANG_ = function(edit__$1, shift, hash, key, removed_leaf_QMARK_) {
|
|
var self__ = this;
|
|
var inode = this;
|
|
var bit = 1 << (hash >>> shift & 31);
|
|
if((self__.bitmap & bit) === 0) {
|
|
return inode
|
|
}else {
|
|
var idx = cljs.core.bitmap_indexed_node_index.call(null, self__.bitmap, bit);
|
|
var key_or_nil = self__.arr[2 * idx];
|
|
var val_or_node = self__.arr[2 * idx + 1];
|
|
if(key_or_nil == null) {
|
|
var n = val_or_node.inode_without_BANG_(edit__$1, shift + 5, hash, key, removed_leaf_QMARK_);
|
|
if(n === val_or_node) {
|
|
return inode
|
|
}else {
|
|
if(!(n == null)) {
|
|
return cljs.core.edit_and_set.call(null, inode, edit__$1, 2 * idx + 1, n)
|
|
}else {
|
|
if(self__.bitmap === bit) {
|
|
return null
|
|
}else {
|
|
if("\ufdd0:else") {
|
|
return inode.edit_and_remove_pair(edit__$1, bit, idx)
|
|
}else {
|
|
return null
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}else {
|
|
if(cljs.core.key_test.call(null, key, key_or_nil)) {
|
|
removed_leaf_QMARK_[0] = true;
|
|
return inode.edit_and_remove_pair(edit__$1, bit, idx)
|
|
}else {
|
|
if("\ufdd0:else") {
|
|
return inode
|
|
}else {
|
|
return null
|
|
}
|
|
}
|
|
}
|
|
}
|
|
};
|
|
cljs.core.BitmapIndexedNode.prototype.ensure_editable = function(e) {
|
|
var self__ = this;
|
|
var inode = this;
|
|
if(e === self__.edit) {
|
|
return inode
|
|
}else {
|
|
var n = cljs.core.bit_count.call(null, self__.bitmap);
|
|
var new_arr = new Array(n < 0 ? 4 : 2 * (n + 1));
|
|
cljs.core.array_copy.call(null, self__.arr, 0, new_arr, 0, 2 * n);
|
|
return new cljs.core.BitmapIndexedNode(e, self__.bitmap, new_arr)
|
|
}
|
|
};
|
|
cljs.core.BitmapIndexedNode.prototype.kv_reduce = function(f, init) {
|
|
var self__ = this;
|
|
var inode = this;
|
|
return cljs.core.inode_kv_reduce.call(null, self__.arr, f, init)
|
|
};
|
|
cljs.core.BitmapIndexedNode.prototype.inode_find = function(shift, hash, key, not_found) {
|
|
var self__ = this;
|
|
var inode = this;
|
|
var bit = 1 << (hash >>> shift & 31);
|
|
if((self__.bitmap & bit) === 0) {
|
|
return not_found
|
|
}else {
|
|
var idx = cljs.core.bitmap_indexed_node_index.call(null, self__.bitmap, bit);
|
|
var key_or_nil = self__.arr[2 * idx];
|
|
var val_or_node = self__.arr[2 * idx + 1];
|
|
if(key_or_nil == null) {
|
|
return val_or_node.inode_find(shift + 5, hash, key, not_found)
|
|
}else {
|
|
if(cljs.core.key_test.call(null, key, key_or_nil)) {
|
|
return cljs.core.PersistentVector.fromArray([key_or_nil, val_or_node], true)
|
|
}else {
|
|
if("\ufdd0:else") {
|
|
return not_found
|
|
}else {
|
|
return null
|
|
}
|
|
}
|
|
}
|
|
}
|
|
};
|
|
cljs.core.BitmapIndexedNode.prototype.inode_without = function(shift, hash, key) {
|
|
var self__ = this;
|
|
var inode = this;
|
|
var bit = 1 << (hash >>> shift & 31);
|
|
if((self__.bitmap & bit) === 0) {
|
|
return inode
|
|
}else {
|
|
var idx = cljs.core.bitmap_indexed_node_index.call(null, self__.bitmap, bit);
|
|
var key_or_nil = self__.arr[2 * idx];
|
|
var val_or_node = self__.arr[2 * idx + 1];
|
|
if(key_or_nil == null) {
|
|
var n = val_or_node.inode_without(shift + 5, hash, key);
|
|
if(n === val_or_node) {
|
|
return inode
|
|
}else {
|
|
if(!(n == null)) {
|
|
return new cljs.core.BitmapIndexedNode(null, self__.bitmap, cljs.core.clone_and_set.call(null, self__.arr, 2 * idx + 1, n))
|
|
}else {
|
|
if(self__.bitmap === bit) {
|
|
return null
|
|
}else {
|
|
if("\ufdd0:else") {
|
|
return new cljs.core.BitmapIndexedNode(null, self__.bitmap ^ bit, cljs.core.remove_pair.call(null, self__.arr, idx))
|
|
}else {
|
|
return null
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}else {
|
|
if(cljs.core.key_test.call(null, key, key_or_nil)) {
|
|
return new cljs.core.BitmapIndexedNode(null, self__.bitmap ^ bit, cljs.core.remove_pair.call(null, self__.arr, idx))
|
|
}else {
|
|
if("\ufdd0:else") {
|
|
return inode
|
|
}else {
|
|
return null
|
|
}
|
|
}
|
|
}
|
|
}
|
|
};
|
|
cljs.core.BitmapIndexedNode.prototype.inode_assoc = function(shift, hash, key, val, added_leaf_QMARK_) {
|
|
var self__ = this;
|
|
var inode = this;
|
|
var bit = 1 << (hash >>> shift & 31);
|
|
var idx = cljs.core.bitmap_indexed_node_index.call(null, self__.bitmap, bit);
|
|
if((self__.bitmap & bit) === 0) {
|
|
var n = cljs.core.bit_count.call(null, self__.bitmap);
|
|
if(n >= 16) {
|
|
var nodes = new Array(32);
|
|
var jdx = hash >>> shift & 31;
|
|
nodes[jdx] = cljs.core.BitmapIndexedNode.EMPTY.inode_assoc(shift + 5, hash, key, val, added_leaf_QMARK_);
|
|
var i_14002 = 0;
|
|
var j_14003 = 0;
|
|
while(true) {
|
|
if(i_14002 < 32) {
|
|
if((self__.bitmap >>> i_14002 & 1) === 0) {
|
|
var G__14004 = i_14002 + 1;
|
|
var G__14005 = j_14003;
|
|
i_14002 = G__14004;
|
|
j_14003 = G__14005;
|
|
continue
|
|
}else {
|
|
nodes[i_14002] = !(self__.arr[j_14003] == null) ? cljs.core.BitmapIndexedNode.EMPTY.inode_assoc(shift + 5, cljs.core.hash.call(null, self__.arr[j_14003]), self__.arr[j_14003], self__.arr[j_14003 + 1], added_leaf_QMARK_) : self__.arr[j_14003 + 1];
|
|
var G__14006 = i_14002 + 1;
|
|
var G__14007 = j_14003 + 2;
|
|
i_14002 = G__14006;
|
|
j_14003 = G__14007;
|
|
continue
|
|
}
|
|
}else {
|
|
}
|
|
break
|
|
}
|
|
return new cljs.core.ArrayNode(null, n + 1, nodes)
|
|
}else {
|
|
var new_arr = new Array(2 * (n + 1));
|
|
cljs.core.array_copy.call(null, self__.arr, 0, new_arr, 0, 2 * idx);
|
|
new_arr[2 * idx] = key;
|
|
new_arr[2 * idx + 1] = val;
|
|
cljs.core.array_copy.call(null, self__.arr, 2 * idx, new_arr, 2 * (idx + 1), 2 * (n - idx));
|
|
added_leaf_QMARK_.val = true;
|
|
return new cljs.core.BitmapIndexedNode(null, self__.bitmap | bit, new_arr)
|
|
}
|
|
}else {
|
|
var key_or_nil = self__.arr[2 * idx];
|
|
var val_or_node = self__.arr[2 * idx + 1];
|
|
if(key_or_nil == null) {
|
|
var n = val_or_node.inode_assoc(shift + 5, hash, key, val, added_leaf_QMARK_);
|
|
if(n === val_or_node) {
|
|
return inode
|
|
}else {
|
|
return new cljs.core.BitmapIndexedNode(null, self__.bitmap, cljs.core.clone_and_set.call(null, self__.arr, 2 * idx + 1, n))
|
|
}
|
|
}else {
|
|
if(cljs.core.key_test.call(null, key, key_or_nil)) {
|
|
if(val === val_or_node) {
|
|
return inode
|
|
}else {
|
|
return new cljs.core.BitmapIndexedNode(null, self__.bitmap, cljs.core.clone_and_set.call(null, self__.arr, 2 * idx + 1, val))
|
|
}
|
|
}else {
|
|
if("\ufdd0:else") {
|
|
added_leaf_QMARK_.val = true;
|
|
return new cljs.core.BitmapIndexedNode(null, self__.bitmap, cljs.core.clone_and_set.call(null, self__.arr, 2 * idx, null, 2 * idx + 1, cljs.core.create_node.call(null, shift + 5, key_or_nil, val_or_node, hash, key, val)))
|
|
}else {
|
|
return null
|
|
}
|
|
}
|
|
}
|
|
}
|
|
};
|
|
cljs.core.BitmapIndexedNode.prototype.inode_lookup = function(shift, hash, key, not_found) {
|
|
var self__ = this;
|
|
var inode = this;
|
|
var bit = 1 << (hash >>> shift & 31);
|
|
if((self__.bitmap & bit) === 0) {
|
|
return not_found
|
|
}else {
|
|
var idx = cljs.core.bitmap_indexed_node_index.call(null, self__.bitmap, bit);
|
|
var key_or_nil = self__.arr[2 * idx];
|
|
var val_or_node = self__.arr[2 * idx + 1];
|
|
if(key_or_nil == null) {
|
|
return val_or_node.inode_lookup(shift + 5, hash, key, not_found)
|
|
}else {
|
|
if(cljs.core.key_test.call(null, key, key_or_nil)) {
|
|
return val_or_node
|
|
}else {
|
|
if("\ufdd0:else") {
|
|
return not_found
|
|
}else {
|
|
return null
|
|
}
|
|
}
|
|
}
|
|
}
|
|
};
|
|
cljs.core.__GT_BitmapIndexedNode = function __GT_BitmapIndexedNode(edit, bitmap, arr) {
|
|
return new cljs.core.BitmapIndexedNode(edit, bitmap, arr)
|
|
};
|
|
cljs.core.BitmapIndexedNode.EMPTY = new cljs.core.BitmapIndexedNode(null, 0, new Array(0));
|
|
cljs.core.pack_array_node = function pack_array_node(array_node, edit, idx) {
|
|
var arr = array_node.arr;
|
|
var len = 2 * (array_node.cnt - 1);
|
|
var new_arr = new Array(len);
|
|
var i = 0;
|
|
var j = 1;
|
|
var bitmap = 0;
|
|
while(true) {
|
|
if(i < len) {
|
|
if(function() {
|
|
var and__3941__auto__ = !(i === idx);
|
|
if(and__3941__auto__) {
|
|
return!(arr[i] == null)
|
|
}else {
|
|
return and__3941__auto__
|
|
}
|
|
}()) {
|
|
new_arr[j] = arr[i];
|
|
var G__14008 = i + 1;
|
|
var G__14009 = j + 2;
|
|
var G__14010 = bitmap | 1 << i;
|
|
i = G__14008;
|
|
j = G__14009;
|
|
bitmap = G__14010;
|
|
continue
|
|
}else {
|
|
var G__14011 = i + 1;
|
|
var G__14012 = j;
|
|
var G__14013 = bitmap;
|
|
i = G__14011;
|
|
j = G__14012;
|
|
bitmap = G__14013;
|
|
continue
|
|
}
|
|
}else {
|
|
return new cljs.core.BitmapIndexedNode(edit, bitmap, new_arr)
|
|
}
|
|
break
|
|
}
|
|
};
|
|
goog.provide("cljs.core.ArrayNode");
|
|
cljs.core.ArrayNode = function(edit, cnt, arr) {
|
|
this.edit = edit;
|
|
this.cnt = cnt;
|
|
this.arr = arr
|
|
};
|
|
cljs.core.ArrayNode.cljs$lang$type = true;
|
|
cljs.core.ArrayNode.cljs$lang$ctorStr = "cljs.core/ArrayNode";
|
|
cljs.core.ArrayNode.cljs$lang$ctorPrWriter = function(this__2847__auto__, writer__2848__auto__, opt__2849__auto__) {
|
|
return cljs.core._write.call(null, writer__2848__auto__, "cljs.core/ArrayNode")
|
|
};
|
|
cljs.core.ArrayNode.prototype.inode_assoc_BANG_ = function(edit__$1, shift, hash, key, val, added_leaf_QMARK_) {
|
|
var self__ = this;
|
|
var inode = this;
|
|
var idx = hash >>> shift & 31;
|
|
var node = self__.arr[idx];
|
|
if(node == null) {
|
|
var editable = cljs.core.edit_and_set.call(null, inode, edit__$1, idx, cljs.core.BitmapIndexedNode.EMPTY.inode_assoc_BANG_(edit__$1, shift + 5, hash, key, val, added_leaf_QMARK_));
|
|
editable.cnt = editable.cnt + 1;
|
|
return editable
|
|
}else {
|
|
var n = node.inode_assoc_BANG_(edit__$1, shift + 5, hash, key, val, added_leaf_QMARK_);
|
|
if(n === node) {
|
|
return inode
|
|
}else {
|
|
return cljs.core.edit_and_set.call(null, inode, edit__$1, idx, n)
|
|
}
|
|
}
|
|
};
|
|
cljs.core.ArrayNode.prototype.inode_seq = function() {
|
|
var self__ = this;
|
|
var inode = this;
|
|
return cljs.core.create_array_node_seq.call(null, self__.arr)
|
|
};
|
|
cljs.core.ArrayNode.prototype.inode_without_BANG_ = function(edit__$1, shift, hash, key, removed_leaf_QMARK_) {
|
|
var self__ = this;
|
|
var inode = this;
|
|
var idx = hash >>> shift & 31;
|
|
var node = self__.arr[idx];
|
|
if(node == null) {
|
|
return inode
|
|
}else {
|
|
var n = node.inode_without_BANG_(edit__$1, shift + 5, hash, key, removed_leaf_QMARK_);
|
|
if(n === node) {
|
|
return inode
|
|
}else {
|
|
if(n == null) {
|
|
if(self__.cnt <= 8) {
|
|
return cljs.core.pack_array_node.call(null, inode, edit__$1, idx)
|
|
}else {
|
|
var editable = cljs.core.edit_and_set.call(null, inode, edit__$1, idx, n);
|
|
editable.cnt = editable.cnt - 1;
|
|
return editable
|
|
}
|
|
}else {
|
|
if("\ufdd0:else") {
|
|
return cljs.core.edit_and_set.call(null, inode, edit__$1, idx, n)
|
|
}else {
|
|
return null
|
|
}
|
|
}
|
|
}
|
|
}
|
|
};
|
|
cljs.core.ArrayNode.prototype.ensure_editable = function(e) {
|
|
var self__ = this;
|
|
var inode = this;
|
|
if(e === self__.edit) {
|
|
return inode
|
|
}else {
|
|
return new cljs.core.ArrayNode(e, self__.cnt, self__.arr.slice())
|
|
}
|
|
};
|
|
cljs.core.ArrayNode.prototype.kv_reduce = function(f, init) {
|
|
var self__ = this;
|
|
var inode = this;
|
|
var len = self__.arr.length;
|
|
var i = 0;
|
|
var init__$1 = init;
|
|
while(true) {
|
|
if(i < len) {
|
|
var node = self__.arr[i];
|
|
if(!(node == null)) {
|
|
var init__$2 = node.kv_reduce(f, init__$1);
|
|
if(cljs.core.reduced_QMARK_.call(null, init__$2)) {
|
|
return cljs.core.deref.call(null, init__$2)
|
|
}else {
|
|
var G__14014 = i + 1;
|
|
var G__14015 = init__$2;
|
|
i = G__14014;
|
|
init__$1 = G__14015;
|
|
continue
|
|
}
|
|
}else {
|
|
var G__14016 = i + 1;
|
|
var G__14017 = init__$1;
|
|
i = G__14016;
|
|
init__$1 = G__14017;
|
|
continue
|
|
}
|
|
}else {
|
|
return init__$1
|
|
}
|
|
break
|
|
}
|
|
};
|
|
cljs.core.ArrayNode.prototype.inode_find = function(shift, hash, key, not_found) {
|
|
var self__ = this;
|
|
var inode = this;
|
|
var idx = hash >>> shift & 31;
|
|
var node = self__.arr[idx];
|
|
if(!(node == null)) {
|
|
return node.inode_find(shift + 5, hash, key, not_found)
|
|
}else {
|
|
return not_found
|
|
}
|
|
};
|
|
cljs.core.ArrayNode.prototype.inode_without = function(shift, hash, key) {
|
|
var self__ = this;
|
|
var inode = this;
|
|
var idx = hash >>> shift & 31;
|
|
var node = self__.arr[idx];
|
|
if(!(node == null)) {
|
|
var n = node.inode_without(shift + 5, hash, key);
|
|
if(n === node) {
|
|
return inode
|
|
}else {
|
|
if(n == null) {
|
|
if(self__.cnt <= 8) {
|
|
return cljs.core.pack_array_node.call(null, inode, null, idx)
|
|
}else {
|
|
return new cljs.core.ArrayNode(null, self__.cnt - 1, cljs.core.clone_and_set.call(null, self__.arr, idx, n))
|
|
}
|
|
}else {
|
|
if("\ufdd0:else") {
|
|
return new cljs.core.ArrayNode(null, self__.cnt, cljs.core.clone_and_set.call(null, self__.arr, idx, n))
|
|
}else {
|
|
return null
|
|
}
|
|
}
|
|
}
|
|
}else {
|
|
return inode
|
|
}
|
|
};
|
|
cljs.core.ArrayNode.prototype.inode_assoc = function(shift, hash, key, val, added_leaf_QMARK_) {
|
|
var self__ = this;
|
|
var inode = this;
|
|
var idx = hash >>> shift & 31;
|
|
var node = self__.arr[idx];
|
|
if(node == null) {
|
|
return new cljs.core.ArrayNode(null, self__.cnt + 1, cljs.core.clone_and_set.call(null, self__.arr, idx, cljs.core.BitmapIndexedNode.EMPTY.inode_assoc(shift + 5, hash, key, val, added_leaf_QMARK_)))
|
|
}else {
|
|
var n = node.inode_assoc(shift + 5, hash, key, val, added_leaf_QMARK_);
|
|
if(n === node) {
|
|
return inode
|
|
}else {
|
|
return new cljs.core.ArrayNode(null, self__.cnt, cljs.core.clone_and_set.call(null, self__.arr, idx, n))
|
|
}
|
|
}
|
|
};
|
|
cljs.core.ArrayNode.prototype.inode_lookup = function(shift, hash, key, not_found) {
|
|
var self__ = this;
|
|
var inode = this;
|
|
var idx = hash >>> shift & 31;
|
|
var node = self__.arr[idx];
|
|
if(!(node == null)) {
|
|
return node.inode_lookup(shift + 5, hash, key, not_found)
|
|
}else {
|
|
return not_found
|
|
}
|
|
};
|
|
cljs.core.__GT_ArrayNode = function __GT_ArrayNode(edit, cnt, arr) {
|
|
return new cljs.core.ArrayNode(edit, cnt, arr)
|
|
};
|
|
cljs.core.hash_collision_node_find_index = function hash_collision_node_find_index(arr, cnt, key) {
|
|
var lim = 2 * cnt;
|
|
var i = 0;
|
|
while(true) {
|
|
if(i < lim) {
|
|
if(cljs.core.key_test.call(null, key, arr[i])) {
|
|
return i
|
|
}else {
|
|
var G__14018 = i + 2;
|
|
i = G__14018;
|
|
continue
|
|
}
|
|
}else {
|
|
return-1
|
|
}
|
|
break
|
|
}
|
|
};
|
|
goog.provide("cljs.core.HashCollisionNode");
|
|
cljs.core.HashCollisionNode = function(edit, collision_hash, cnt, arr) {
|
|
this.edit = edit;
|
|
this.collision_hash = collision_hash;
|
|
this.cnt = cnt;
|
|
this.arr = arr
|
|
};
|
|
cljs.core.HashCollisionNode.cljs$lang$type = true;
|
|
cljs.core.HashCollisionNode.cljs$lang$ctorStr = "cljs.core/HashCollisionNode";
|
|
cljs.core.HashCollisionNode.cljs$lang$ctorPrWriter = function(this__2847__auto__, writer__2848__auto__, opt__2849__auto__) {
|
|
return cljs.core._write.call(null, writer__2848__auto__, "cljs.core/HashCollisionNode")
|
|
};
|
|
cljs.core.HashCollisionNode.prototype.inode_assoc_BANG_ = function(edit__$1, shift, hash, key, val, added_leaf_QMARK_) {
|
|
var self__ = this;
|
|
var inode = this;
|
|
if(hash === self__.collision_hash) {
|
|
var idx = cljs.core.hash_collision_node_find_index.call(null, self__.arr, self__.cnt, key);
|
|
if(idx === -1) {
|
|
if(self__.arr.length > 2 * self__.cnt) {
|
|
var editable = cljs.core.edit_and_set.call(null, inode, edit__$1, 2 * self__.cnt, key, 2 * self__.cnt + 1, val);
|
|
added_leaf_QMARK_.val = true;
|
|
editable.cnt = editable.cnt + 1;
|
|
return editable
|
|
}else {
|
|
var len = self__.arr.length;
|
|
var new_arr = new Array(len + 2);
|
|
cljs.core.array_copy.call(null, self__.arr, 0, new_arr, 0, len);
|
|
new_arr[len] = key;
|
|
new_arr[len + 1] = val;
|
|
added_leaf_QMARK_.val = true;
|
|
return inode.ensure_editable_array(edit__$1, self__.cnt + 1, new_arr)
|
|
}
|
|
}else {
|
|
if(self__.arr[idx + 1] === val) {
|
|
return inode
|
|
}else {
|
|
return cljs.core.edit_and_set.call(null, inode, edit__$1, idx + 1, val)
|
|
}
|
|
}
|
|
}else {
|
|
return(new cljs.core.BitmapIndexedNode(edit__$1, 1 << (self__.collision_hash >>> shift & 31), [null, inode, null, null])).inode_assoc_BANG_(edit__$1, shift, hash, key, val, added_leaf_QMARK_)
|
|
}
|
|
};
|
|
cljs.core.HashCollisionNode.prototype.inode_seq = function() {
|
|
var self__ = this;
|
|
var inode = this;
|
|
return cljs.core.create_inode_seq.call(null, self__.arr)
|
|
};
|
|
cljs.core.HashCollisionNode.prototype.inode_without_BANG_ = function(edit__$1, shift, hash, key, removed_leaf_QMARK_) {
|
|
var self__ = this;
|
|
var inode = this;
|
|
var idx = cljs.core.hash_collision_node_find_index.call(null, self__.arr, self__.cnt, key);
|
|
if(idx === -1) {
|
|
return inode
|
|
}else {
|
|
removed_leaf_QMARK_[0] = true;
|
|
if(self__.cnt === 1) {
|
|
return null
|
|
}else {
|
|
var editable = inode.ensure_editable(edit__$1);
|
|
var earr = editable.arr;
|
|
earr[idx] = earr[2 * self__.cnt - 2];
|
|
earr[idx + 1] = earr[2 * self__.cnt - 1];
|
|
earr[2 * self__.cnt - 1] = null;
|
|
earr[2 * self__.cnt - 2] = null;
|
|
editable.cnt = editable.cnt - 1;
|
|
return editable
|
|
}
|
|
}
|
|
};
|
|
cljs.core.HashCollisionNode.prototype.ensure_editable = function(e) {
|
|
var self__ = this;
|
|
var inode = this;
|
|
if(e === self__.edit) {
|
|
return inode
|
|
}else {
|
|
var new_arr = new Array(2 * (self__.cnt + 1));
|
|
cljs.core.array_copy.call(null, self__.arr, 0, new_arr, 0, 2 * self__.cnt);
|
|
return new cljs.core.HashCollisionNode(e, self__.collision_hash, self__.cnt, new_arr)
|
|
}
|
|
};
|
|
cljs.core.HashCollisionNode.prototype.kv_reduce = function(f, init) {
|
|
var self__ = this;
|
|
var inode = this;
|
|
return cljs.core.inode_kv_reduce.call(null, self__.arr, f, init)
|
|
};
|
|
cljs.core.HashCollisionNode.prototype.inode_find = function(shift, hash, key, not_found) {
|
|
var self__ = this;
|
|
var inode = this;
|
|
var idx = cljs.core.hash_collision_node_find_index.call(null, self__.arr, self__.cnt, key);
|
|
if(idx < 0) {
|
|
return not_found
|
|
}else {
|
|
if(cljs.core.key_test.call(null, key, self__.arr[idx])) {
|
|
return cljs.core.PersistentVector.fromArray([self__.arr[idx], self__.arr[idx + 1]], true)
|
|
}else {
|
|
if("\ufdd0:else") {
|
|
return not_found
|
|
}else {
|
|
return null
|
|
}
|
|
}
|
|
}
|
|
};
|
|
cljs.core.HashCollisionNode.prototype.inode_without = function(shift, hash, key) {
|
|
var self__ = this;
|
|
var inode = this;
|
|
var idx = cljs.core.hash_collision_node_find_index.call(null, self__.arr, self__.cnt, key);
|
|
if(idx === -1) {
|
|
return inode
|
|
}else {
|
|
if(self__.cnt === 1) {
|
|
return null
|
|
}else {
|
|
if("\ufdd0:else") {
|
|
return new cljs.core.HashCollisionNode(null, self__.collision_hash, self__.cnt - 1, cljs.core.remove_pair.call(null, self__.arr, cljs.core.quot.call(null, idx, 2)))
|
|
}else {
|
|
return null
|
|
}
|
|
}
|
|
}
|
|
};
|
|
cljs.core.HashCollisionNode.prototype.inode_assoc = function(shift, hash, key, val, added_leaf_QMARK_) {
|
|
var self__ = this;
|
|
var inode = this;
|
|
if(hash === self__.collision_hash) {
|
|
var idx = cljs.core.hash_collision_node_find_index.call(null, self__.arr, self__.cnt, key);
|
|
if(idx === -1) {
|
|
var len = self__.arr.length;
|
|
var new_arr = new Array(len + 2);
|
|
cljs.core.array_copy.call(null, self__.arr, 0, new_arr, 0, len);
|
|
new_arr[len] = key;
|
|
new_arr[len + 1] = val;
|
|
added_leaf_QMARK_.val = true;
|
|
return new cljs.core.HashCollisionNode(null, self__.collision_hash, self__.cnt + 1, new_arr)
|
|
}else {
|
|
if(cljs.core._EQ_.call(null, self__.arr[idx], val)) {
|
|
return inode
|
|
}else {
|
|
return new cljs.core.HashCollisionNode(null, self__.collision_hash, self__.cnt, cljs.core.clone_and_set.call(null, self__.arr, idx + 1, val))
|
|
}
|
|
}
|
|
}else {
|
|
return(new cljs.core.BitmapIndexedNode(null, 1 << (self__.collision_hash >>> shift & 31), [null, inode])).inode_assoc(shift, hash, key, val, added_leaf_QMARK_)
|
|
}
|
|
};
|
|
cljs.core.HashCollisionNode.prototype.inode_lookup = function(shift, hash, key, not_found) {
|
|
var self__ = this;
|
|
var inode = this;
|
|
var idx = cljs.core.hash_collision_node_find_index.call(null, self__.arr, self__.cnt, key);
|
|
if(idx < 0) {
|
|
return not_found
|
|
}else {
|
|
if(cljs.core.key_test.call(null, key, self__.arr[idx])) {
|
|
return self__.arr[idx + 1]
|
|
}else {
|
|
if("\ufdd0:else") {
|
|
return not_found
|
|
}else {
|
|
return null
|
|
}
|
|
}
|
|
}
|
|
};
|
|
cljs.core.HashCollisionNode.prototype.ensure_editable_array = function(e, count, array) {
|
|
var self__ = this;
|
|
var inode = this;
|
|
if(e === self__.edit) {
|
|
self__.arr = array;
|
|
self__.cnt = count;
|
|
return inode
|
|
}else {
|
|
return new cljs.core.HashCollisionNode(self__.edit, self__.collision_hash, count, array)
|
|
}
|
|
};
|
|
cljs.core.__GT_HashCollisionNode = function __GT_HashCollisionNode(edit, collision_hash, cnt, arr) {
|
|
return new cljs.core.HashCollisionNode(edit, collision_hash, cnt, arr)
|
|
};
|
|
cljs.core.create_node = function() {
|
|
var create_node = null;
|
|
var create_node__6 = function(shift, key1, val1, key2hash, key2, val2) {
|
|
var key1hash = cljs.core.hash.call(null, key1);
|
|
if(key1hash === key2hash) {
|
|
return new cljs.core.HashCollisionNode(null, key1hash, 2, [key1, val1, key2, val2])
|
|
}else {
|
|
var added_leaf_QMARK_ = new cljs.core.Box(false);
|
|
return cljs.core.BitmapIndexedNode.EMPTY.inode_assoc(shift, key1hash, key1, val1, added_leaf_QMARK_).inode_assoc(shift, key2hash, key2, val2, added_leaf_QMARK_)
|
|
}
|
|
};
|
|
var create_node__7 = function(edit, shift, key1, val1, key2hash, key2, val2) {
|
|
var key1hash = cljs.core.hash.call(null, key1);
|
|
if(key1hash === key2hash) {
|
|
return new cljs.core.HashCollisionNode(null, key1hash, 2, [key1, val1, key2, val2])
|
|
}else {
|
|
var added_leaf_QMARK_ = new cljs.core.Box(false);
|
|
return cljs.core.BitmapIndexedNode.EMPTY.inode_assoc_BANG_(edit, shift, key1hash, key1, val1, added_leaf_QMARK_).inode_assoc_BANG_(edit, shift, key2hash, key2, val2, added_leaf_QMARK_)
|
|
}
|
|
};
|
|
create_node = function(edit, shift, key1, val1, key2hash, key2, val2) {
|
|
switch(arguments.length) {
|
|
case 6:
|
|
return create_node__6.call(this, edit, shift, key1, val1, key2hash, key2);
|
|
case 7:
|
|
return create_node__7.call(this, edit, shift, key1, val1, key2hash, key2, val2)
|
|
}
|
|
throw new Error("Invalid arity: " + arguments.length);
|
|
};
|
|
create_node.cljs$core$IFn$_invoke$arity$6 = create_node__6;
|
|
create_node.cljs$core$IFn$_invoke$arity$7 = create_node__7;
|
|
return create_node
|
|
}();
|
|
goog.provide("cljs.core.NodeSeq");
|
|
cljs.core.NodeSeq = function(meta, nodes, i, s, __hash) {
|
|
this.meta = meta;
|
|
this.nodes = nodes;
|
|
this.i = i;
|
|
this.s = s;
|
|
this.__hash = __hash;
|
|
this.cljs$lang$protocol_mask$partition1$ = 0;
|
|
this.cljs$lang$protocol_mask$partition0$ = 31850572
|
|
};
|
|
cljs.core.NodeSeq.cljs$lang$type = true;
|
|
cljs.core.NodeSeq.cljs$lang$ctorStr = "cljs.core/NodeSeq";
|
|
cljs.core.NodeSeq.cljs$lang$ctorPrWriter = function(this__2847__auto__, writer__2848__auto__, opt__2849__auto__) {
|
|
return cljs.core._write.call(null, writer__2848__auto__, "cljs.core/NodeSeq")
|
|
};
|
|
cljs.core.NodeSeq.prototype.cljs$core$IHash$_hash$arity$1 = function(coll) {
|
|
var self__ = this;
|
|
var h__2732__auto__ = self__.__hash;
|
|
if(!(h__2732__auto__ == null)) {
|
|
return h__2732__auto__
|
|
}else {
|
|
var h__2732__auto____$1 = cljs.core.hash_coll.call(null, coll);
|
|
self__.__hash = h__2732__auto____$1;
|
|
return h__2732__auto____$1
|
|
}
|
|
};
|
|
cljs.core.NodeSeq.prototype.cljs$core$ICollection$_conj$arity$2 = function(coll, o) {
|
|
var self__ = this;
|
|
return cljs.core.cons.call(null, o, coll)
|
|
};
|
|
cljs.core.NodeSeq.prototype.toString = function() {
|
|
var self__ = this;
|
|
var coll = this;
|
|
return cljs.core.pr_str_STAR_.call(null, coll)
|
|
};
|
|
cljs.core.NodeSeq.prototype.cljs$core$ISeqable$_seq$arity$1 = function(this$) {
|
|
var self__ = this;
|
|
return this$
|
|
};
|
|
cljs.core.NodeSeq.prototype.cljs$core$ISeq$_first$arity$1 = function(coll) {
|
|
var self__ = this;
|
|
if(self__.s == null) {
|
|
return cljs.core.PersistentVector.fromArray([self__.nodes[self__.i], self__.nodes[self__.i + 1]], true)
|
|
}else {
|
|
return cljs.core.first.call(null, self__.s)
|
|
}
|
|
};
|
|
cljs.core.NodeSeq.prototype.cljs$core$ISeq$_rest$arity$1 = function(coll) {
|
|
var self__ = this;
|
|
if(self__.s == null) {
|
|
return cljs.core.create_inode_seq.call(null, self__.nodes, self__.i + 2, null)
|
|
}else {
|
|
return cljs.core.create_inode_seq.call(null, self__.nodes, self__.i, cljs.core.next.call(null, self__.s))
|
|
}
|
|
};
|
|
cljs.core.NodeSeq.prototype.cljs$core$IEquiv$_equiv$arity$2 = function(coll, other) {
|
|
var self__ = this;
|
|
return cljs.core.equiv_sequential.call(null, coll, other)
|
|
};
|
|
cljs.core.NodeSeq.prototype.cljs$core$IWithMeta$_with_meta$arity$2 = function(coll, meta__$1) {
|
|
var self__ = this;
|
|
return new cljs.core.NodeSeq(meta__$1, self__.nodes, self__.i, self__.s, self__.__hash)
|
|
};
|
|
cljs.core.NodeSeq.prototype.cljs$core$IMeta$_meta$arity$1 = function(coll) {
|
|
var self__ = this;
|
|
return self__.meta
|
|
};
|
|
cljs.core.NodeSeq.prototype.cljs$core$IEmptyableCollection$_empty$arity$1 = function(coll) {
|
|
var self__ = this;
|
|
return cljs.core.with_meta.call(null, cljs.core.List.EMPTY, self__.meta)
|
|
};
|
|
cljs.core.__GT_NodeSeq = function __GT_NodeSeq(meta, nodes, i, s, __hash) {
|
|
return new cljs.core.NodeSeq(meta, nodes, i, s, __hash)
|
|
};
|
|
cljs.core.create_inode_seq = function() {
|
|
var create_inode_seq = null;
|
|
var create_inode_seq__1 = function(nodes) {
|
|
return create_inode_seq.call(null, nodes, 0, null)
|
|
};
|
|
var create_inode_seq__3 = function(nodes, i, s) {
|
|
if(s == null) {
|
|
var len = nodes.length;
|
|
var j = i;
|
|
while(true) {
|
|
if(j < len) {
|
|
if(!(nodes[j] == null)) {
|
|
return new cljs.core.NodeSeq(null, nodes, j, null, null)
|
|
}else {
|
|
var temp__4090__auto__ = nodes[j + 1];
|
|
if(cljs.core.truth_(temp__4090__auto__)) {
|
|
var node = temp__4090__auto__;
|
|
var temp__4090__auto____$1 = node.inode_seq();
|
|
if(cljs.core.truth_(temp__4090__auto____$1)) {
|
|
var node_seq = temp__4090__auto____$1;
|
|
return new cljs.core.NodeSeq(null, nodes, j + 2, node_seq, null)
|
|
}else {
|
|
var G__14019 = j + 2;
|
|
j = G__14019;
|
|
continue
|
|
}
|
|
}else {
|
|
var G__14020 = j + 2;
|
|
j = G__14020;
|
|
continue
|
|
}
|
|
}
|
|
}else {
|
|
return null
|
|
}
|
|
break
|
|
}
|
|
}else {
|
|
return new cljs.core.NodeSeq(null, nodes, i, s, null)
|
|
}
|
|
};
|
|
create_inode_seq = function(nodes, i, s) {
|
|
switch(arguments.length) {
|
|
case 1:
|
|
return create_inode_seq__1.call(this, nodes);
|
|
case 3:
|
|
return create_inode_seq__3.call(this, nodes, i, s)
|
|
}
|
|
throw new Error("Invalid arity: " + arguments.length);
|
|
};
|
|
create_inode_seq.cljs$core$IFn$_invoke$arity$1 = create_inode_seq__1;
|
|
create_inode_seq.cljs$core$IFn$_invoke$arity$3 = create_inode_seq__3;
|
|
return create_inode_seq
|
|
}();
|
|
goog.provide("cljs.core.ArrayNodeSeq");
|
|
cljs.core.ArrayNodeSeq = function(meta, nodes, i, s, __hash) {
|
|
this.meta = meta;
|
|
this.nodes = nodes;
|
|
this.i = i;
|
|
this.s = s;
|
|
this.__hash = __hash;
|
|
this.cljs$lang$protocol_mask$partition1$ = 0;
|
|
this.cljs$lang$protocol_mask$partition0$ = 31850572
|
|
};
|
|
cljs.core.ArrayNodeSeq.cljs$lang$type = true;
|
|
cljs.core.ArrayNodeSeq.cljs$lang$ctorStr = "cljs.core/ArrayNodeSeq";
|
|
cljs.core.ArrayNodeSeq.cljs$lang$ctorPrWriter = function(this__2847__auto__, writer__2848__auto__, opt__2849__auto__) {
|
|
return cljs.core._write.call(null, writer__2848__auto__, "cljs.core/ArrayNodeSeq")
|
|
};
|
|
cljs.core.ArrayNodeSeq.prototype.cljs$core$IHash$_hash$arity$1 = function(coll) {
|
|
var self__ = this;
|
|
var h__2732__auto__ = self__.__hash;
|
|
if(!(h__2732__auto__ == null)) {
|
|
return h__2732__auto__
|
|
}else {
|
|
var h__2732__auto____$1 = cljs.core.hash_coll.call(null, coll);
|
|
self__.__hash = h__2732__auto____$1;
|
|
return h__2732__auto____$1
|
|
}
|
|
};
|
|
cljs.core.ArrayNodeSeq.prototype.cljs$core$ICollection$_conj$arity$2 = function(coll, o) {
|
|
var self__ = this;
|
|
return cljs.core.cons.call(null, o, coll)
|
|
};
|
|
cljs.core.ArrayNodeSeq.prototype.toString = function() {
|
|
var self__ = this;
|
|
var coll = this;
|
|
return cljs.core.pr_str_STAR_.call(null, coll)
|
|
};
|
|
cljs.core.ArrayNodeSeq.prototype.cljs$core$ISeqable$_seq$arity$1 = function(this$) {
|
|
var self__ = this;
|
|
return this$
|
|
};
|
|
cljs.core.ArrayNodeSeq.prototype.cljs$core$ISeq$_first$arity$1 = function(coll) {
|
|
var self__ = this;
|
|
return cljs.core.first.call(null, self__.s)
|
|
};
|
|
cljs.core.ArrayNodeSeq.prototype.cljs$core$ISeq$_rest$arity$1 = function(coll) {
|
|
var self__ = this;
|
|
return cljs.core.create_array_node_seq.call(null, null, self__.nodes, self__.i, cljs.core.next.call(null, self__.s))
|
|
};
|
|
cljs.core.ArrayNodeSeq.prototype.cljs$core$IEquiv$_equiv$arity$2 = function(coll, other) {
|
|
var self__ = this;
|
|
return cljs.core.equiv_sequential.call(null, coll, other)
|
|
};
|
|
cljs.core.ArrayNodeSeq.prototype.cljs$core$IWithMeta$_with_meta$arity$2 = function(coll, meta__$1) {
|
|
var self__ = this;
|
|
return new cljs.core.ArrayNodeSeq(meta__$1, self__.nodes, self__.i, self__.s, self__.__hash)
|
|
};
|
|
cljs.core.ArrayNodeSeq.prototype.cljs$core$IMeta$_meta$arity$1 = function(coll) {
|
|
var self__ = this;
|
|
return self__.meta
|
|
};
|
|
cljs.core.ArrayNodeSeq.prototype.cljs$core$IEmptyableCollection$_empty$arity$1 = function(coll) {
|
|
var self__ = this;
|
|
return cljs.core.with_meta.call(null, cljs.core.List.EMPTY, self__.meta)
|
|
};
|
|
cljs.core.__GT_ArrayNodeSeq = function __GT_ArrayNodeSeq(meta, nodes, i, s, __hash) {
|
|
return new cljs.core.ArrayNodeSeq(meta, nodes, i, s, __hash)
|
|
};
|
|
cljs.core.create_array_node_seq = function() {
|
|
var create_array_node_seq = null;
|
|
var create_array_node_seq__1 = function(nodes) {
|
|
return create_array_node_seq.call(null, null, nodes, 0, null)
|
|
};
|
|
var create_array_node_seq__4 = function(meta, nodes, i, s) {
|
|
if(s == null) {
|
|
var len = nodes.length;
|
|
var j = i;
|
|
while(true) {
|
|
if(j < len) {
|
|
var temp__4090__auto__ = nodes[j];
|
|
if(cljs.core.truth_(temp__4090__auto__)) {
|
|
var nj = temp__4090__auto__;
|
|
var temp__4090__auto____$1 = nj.inode_seq();
|
|
if(cljs.core.truth_(temp__4090__auto____$1)) {
|
|
var ns = temp__4090__auto____$1;
|
|
return new cljs.core.ArrayNodeSeq(meta, nodes, j + 1, ns, null)
|
|
}else {
|
|
var G__14021 = j + 1;
|
|
j = G__14021;
|
|
continue
|
|
}
|
|
}else {
|
|
var G__14022 = j + 1;
|
|
j = G__14022;
|
|
continue
|
|
}
|
|
}else {
|
|
return null
|
|
}
|
|
break
|
|
}
|
|
}else {
|
|
return new cljs.core.ArrayNodeSeq(meta, nodes, i, s, null)
|
|
}
|
|
};
|
|
create_array_node_seq = function(meta, nodes, i, s) {
|
|
switch(arguments.length) {
|
|
case 1:
|
|
return create_array_node_seq__1.call(this, meta);
|
|
case 4:
|
|
return create_array_node_seq__4.call(this, meta, nodes, i, s)
|
|
}
|
|
throw new Error("Invalid arity: " + arguments.length);
|
|
};
|
|
create_array_node_seq.cljs$core$IFn$_invoke$arity$1 = create_array_node_seq__1;
|
|
create_array_node_seq.cljs$core$IFn$_invoke$arity$4 = create_array_node_seq__4;
|
|
return create_array_node_seq
|
|
}();
|
|
goog.provide("cljs.core.PersistentHashMap");
|
|
cljs.core.PersistentHashMap = function(meta, cnt, root, has_nil_QMARK_, nil_val, __hash) {
|
|
this.meta = meta;
|
|
this.cnt = cnt;
|
|
this.root = root;
|
|
this.has_nil_QMARK_ = has_nil_QMARK_;
|
|
this.nil_val = nil_val;
|
|
this.__hash = __hash;
|
|
this.cljs$lang$protocol_mask$partition1$ = 4;
|
|
this.cljs$lang$protocol_mask$partition0$ = 16123663
|
|
};
|
|
cljs.core.PersistentHashMap.cljs$lang$type = true;
|
|
cljs.core.PersistentHashMap.cljs$lang$ctorStr = "cljs.core/PersistentHashMap";
|
|
cljs.core.PersistentHashMap.cljs$lang$ctorPrWriter = function(this__2847__auto__, writer__2848__auto__, opt__2849__auto__) {
|
|
return cljs.core._write.call(null, writer__2848__auto__, "cljs.core/PersistentHashMap")
|
|
};
|
|
cljs.core.PersistentHashMap.prototype.cljs$core$IEditableCollection$_as_transient$arity$1 = function(coll) {
|
|
var self__ = this;
|
|
return new cljs.core.TransientHashMap({}, self__.root, self__.cnt, self__.has_nil_QMARK_, self__.nil_val)
|
|
};
|
|
cljs.core.PersistentHashMap.prototype.cljs$core$IHash$_hash$arity$1 = function(coll) {
|
|
var self__ = this;
|
|
var h__2732__auto__ = self__.__hash;
|
|
if(!(h__2732__auto__ == null)) {
|
|
return h__2732__auto__
|
|
}else {
|
|
var h__2732__auto____$1 = cljs.core.hash_imap.call(null, coll);
|
|
self__.__hash = h__2732__auto____$1;
|
|
return h__2732__auto____$1
|
|
}
|
|
};
|
|
cljs.core.PersistentHashMap.prototype.cljs$core$ILookup$_lookup$arity$2 = function(coll, k) {
|
|
var self__ = this;
|
|
return coll.cljs$core$ILookup$_lookup$arity$3(coll, k, null)
|
|
};
|
|
cljs.core.PersistentHashMap.prototype.cljs$core$ILookup$_lookup$arity$3 = function(coll, k, not_found) {
|
|
var self__ = this;
|
|
if(k == null) {
|
|
if(self__.has_nil_QMARK_) {
|
|
return self__.nil_val
|
|
}else {
|
|
return not_found
|
|
}
|
|
}else {
|
|
if(self__.root == null) {
|
|
return not_found
|
|
}else {
|
|
if("\ufdd0:else") {
|
|
return self__.root.inode_lookup(0, cljs.core.hash.call(null, k), k, not_found)
|
|
}else {
|
|
return null
|
|
}
|
|
}
|
|
}
|
|
};
|
|
cljs.core.PersistentHashMap.prototype.cljs$core$IAssociative$_assoc$arity$3 = function(coll, k, v) {
|
|
var self__ = this;
|
|
if(k == null) {
|
|
if(function() {
|
|
var and__3941__auto__ = self__.has_nil_QMARK_;
|
|
if(and__3941__auto__) {
|
|
return v === self__.nil_val
|
|
}else {
|
|
return and__3941__auto__
|
|
}
|
|
}()) {
|
|
return coll
|
|
}else {
|
|
return new cljs.core.PersistentHashMap(self__.meta, self__.has_nil_QMARK_ ? self__.cnt : self__.cnt + 1, self__.root, true, v, null)
|
|
}
|
|
}else {
|
|
var added_leaf_QMARK_ = new cljs.core.Box(false);
|
|
var new_root = (self__.root == null ? cljs.core.BitmapIndexedNode.EMPTY : self__.root).inode_assoc(0, cljs.core.hash.call(null, k), k, v, added_leaf_QMARK_);
|
|
if(new_root === self__.root) {
|
|
return coll
|
|
}else {
|
|
return new cljs.core.PersistentHashMap(self__.meta, added_leaf_QMARK_.val ? self__.cnt + 1 : self__.cnt, new_root, self__.has_nil_QMARK_, self__.nil_val, null)
|
|
}
|
|
}
|
|
};
|
|
cljs.core.PersistentHashMap.prototype.cljs$core$IAssociative$_contains_key_QMARK_$arity$2 = function(coll, k) {
|
|
var self__ = this;
|
|
if(k == null) {
|
|
return self__.has_nil_QMARK_
|
|
}else {
|
|
if(self__.root == null) {
|
|
return false
|
|
}else {
|
|
if("\ufdd0:else") {
|
|
return!(self__.root.inode_lookup(0, cljs.core.hash.call(null, k), k, cljs.core.lookup_sentinel) === cljs.core.lookup_sentinel)
|
|
}else {
|
|
return null
|
|
}
|
|
}
|
|
}
|
|
};
|
|
cljs.core.PersistentHashMap.prototype.call = function() {
|
|
var G__14024 = null;
|
|
var G__14024__2 = function(self__, k) {
|
|
var self__ = this;
|
|
var self____$1 = this;
|
|
var coll = self____$1;
|
|
return coll.cljs$core$ILookup$_lookup$arity$2(coll, k)
|
|
};
|
|
var G__14024__3 = function(self__, k, not_found) {
|
|
var self__ = this;
|
|
var self____$1 = this;
|
|
var coll = self____$1;
|
|
return coll.cljs$core$ILookup$_lookup$arity$3(coll, k, not_found)
|
|
};
|
|
G__14024 = function(self__, k, not_found) {
|
|
switch(arguments.length) {
|
|
case 2:
|
|
return G__14024__2.call(this, self__, k);
|
|
case 3:
|
|
return G__14024__3.call(this, self__, k, not_found)
|
|
}
|
|
throw new Error("Invalid arity: " + arguments.length);
|
|
};
|
|
return G__14024
|
|
}();
|
|
cljs.core.PersistentHashMap.prototype.apply = function(self__, args14023) {
|
|
var self__ = this;
|
|
return self__.call.apply(self__, [self__].concat(args14023.slice()))
|
|
};
|
|
cljs.core.PersistentHashMap.prototype.cljs$core$IKVReduce$_kv_reduce$arity$3 = function(coll, f, init) {
|
|
var self__ = this;
|
|
var init__$1 = self__.has_nil_QMARK_ ? f.call(null, init, null, self__.nil_val) : init;
|
|
if(cljs.core.reduced_QMARK_.call(null, init__$1)) {
|
|
return cljs.core.deref.call(null, init__$1)
|
|
}else {
|
|
if(!(self__.root == null)) {
|
|
return self__.root.kv_reduce(f, init__$1)
|
|
}else {
|
|
if("\ufdd0:else") {
|
|
return init__$1
|
|
}else {
|
|
return null
|
|
}
|
|
}
|
|
}
|
|
};
|
|
cljs.core.PersistentHashMap.prototype.cljs$core$ICollection$_conj$arity$2 = function(coll, entry) {
|
|
var self__ = this;
|
|
if(cljs.core.vector_QMARK_.call(null, entry)) {
|
|
return coll.cljs$core$IAssociative$_assoc$arity$3(coll, cljs.core._nth.call(null, entry, 0), cljs.core._nth.call(null, entry, 1))
|
|
}else {
|
|
return cljs.core.reduce.call(null, cljs.core._conj, coll, entry)
|
|
}
|
|
};
|
|
cljs.core.PersistentHashMap.prototype.toString = function() {
|
|
var self__ = this;
|
|
var coll = this;
|
|
return cljs.core.pr_str_STAR_.call(null, coll)
|
|
};
|
|
cljs.core.PersistentHashMap.prototype.cljs$core$ISeqable$_seq$arity$1 = function(coll) {
|
|
var self__ = this;
|
|
if(self__.cnt > 0) {
|
|
var s = !(self__.root == null) ? self__.root.inode_seq() : null;
|
|
if(self__.has_nil_QMARK_) {
|
|
return cljs.core.cons.call(null, cljs.core.PersistentVector.fromArray([null, self__.nil_val], true), s)
|
|
}else {
|
|
return s
|
|
}
|
|
}else {
|
|
return null
|
|
}
|
|
};
|
|
cljs.core.PersistentHashMap.prototype.cljs$core$ICounted$_count$arity$1 = function(coll) {
|
|
var self__ = this;
|
|
return self__.cnt
|
|
};
|
|
cljs.core.PersistentHashMap.prototype.cljs$core$IEquiv$_equiv$arity$2 = function(coll, other) {
|
|
var self__ = this;
|
|
return cljs.core.equiv_map.call(null, coll, other)
|
|
};
|
|
cljs.core.PersistentHashMap.prototype.cljs$core$IWithMeta$_with_meta$arity$2 = function(coll, meta__$1) {
|
|
var self__ = this;
|
|
return new cljs.core.PersistentHashMap(meta__$1, self__.cnt, self__.root, self__.has_nil_QMARK_, self__.nil_val, self__.__hash)
|
|
};
|
|
cljs.core.PersistentHashMap.prototype.cljs$core$IMeta$_meta$arity$1 = function(coll) {
|
|
var self__ = this;
|
|
return self__.meta
|
|
};
|
|
cljs.core.PersistentHashMap.prototype.cljs$core$IEmptyableCollection$_empty$arity$1 = function(coll) {
|
|
var self__ = this;
|
|
return cljs.core._with_meta.call(null, cljs.core.PersistentHashMap.EMPTY, self__.meta)
|
|
};
|
|
cljs.core.PersistentHashMap.prototype.cljs$core$IMap$_dissoc$arity$2 = function(coll, k) {
|
|
var self__ = this;
|
|
if(k == null) {
|
|
if(self__.has_nil_QMARK_) {
|
|
return new cljs.core.PersistentHashMap(self__.meta, self__.cnt - 1, self__.root, false, null, null)
|
|
}else {
|
|
return coll
|
|
}
|
|
}else {
|
|
if(self__.root == null) {
|
|
return coll
|
|
}else {
|
|
if("\ufdd0:else") {
|
|
var new_root = self__.root.inode_without(0, cljs.core.hash.call(null, k), k);
|
|
if(new_root === self__.root) {
|
|
return coll
|
|
}else {
|
|
return new cljs.core.PersistentHashMap(self__.meta, self__.cnt - 1, new_root, self__.has_nil_QMARK_, self__.nil_val, null)
|
|
}
|
|
}else {
|
|
return null
|
|
}
|
|
}
|
|
}
|
|
};
|
|
cljs.core.__GT_PersistentHashMap = function __GT_PersistentHashMap(meta, cnt, root, has_nil_QMARK_, nil_val, __hash) {
|
|
return new cljs.core.PersistentHashMap(meta, cnt, root, has_nil_QMARK_, nil_val, __hash)
|
|
};
|
|
cljs.core.PersistentHashMap.EMPTY = new cljs.core.PersistentHashMap(null, 0, null, false, null, 0);
|
|
cljs.core.PersistentHashMap.fromArrays = function(ks, vs) {
|
|
var len = ks.length;
|
|
var i = 0;
|
|
var out = cljs.core.transient$.call(null, cljs.core.PersistentHashMap.EMPTY);
|
|
while(true) {
|
|
if(i < len) {
|
|
var G__14025 = i + 1;
|
|
var G__14026 = cljs.core.assoc_BANG_.call(null, out, ks[i], vs[i]);
|
|
i = G__14025;
|
|
out = G__14026;
|
|
continue
|
|
}else {
|
|
return cljs.core.persistent_BANG_.call(null, out)
|
|
}
|
|
break
|
|
}
|
|
};
|
|
goog.provide("cljs.core.TransientHashMap");
|
|
cljs.core.TransientHashMap = function(edit, root, count, has_nil_QMARK_, nil_val) {
|
|
this.edit = edit;
|
|
this.root = root;
|
|
this.count = count;
|
|
this.has_nil_QMARK_ = has_nil_QMARK_;
|
|
this.nil_val = nil_val;
|
|
this.cljs$lang$protocol_mask$partition1$ = 56;
|
|
this.cljs$lang$protocol_mask$partition0$ = 258
|
|
};
|
|
cljs.core.TransientHashMap.cljs$lang$type = true;
|
|
cljs.core.TransientHashMap.cljs$lang$ctorStr = "cljs.core/TransientHashMap";
|
|
cljs.core.TransientHashMap.cljs$lang$ctorPrWriter = function(this__2847__auto__, writer__2848__auto__, opt__2849__auto__) {
|
|
return cljs.core._write.call(null, writer__2848__auto__, "cljs.core/TransientHashMap")
|
|
};
|
|
cljs.core.TransientHashMap.prototype.cljs$core$ITransientMap$_dissoc_BANG_$arity$2 = function(tcoll, key) {
|
|
var self__ = this;
|
|
return tcoll.without_BANG_(key)
|
|
};
|
|
cljs.core.TransientHashMap.prototype.cljs$core$ITransientAssociative$_assoc_BANG_$arity$3 = function(tcoll, key, val) {
|
|
var self__ = this;
|
|
return tcoll.assoc_BANG_(key, val)
|
|
};
|
|
cljs.core.TransientHashMap.prototype.cljs$core$ITransientCollection$_conj_BANG_$arity$2 = function(tcoll, val) {
|
|
var self__ = this;
|
|
return tcoll.conj_BANG_(val)
|
|
};
|
|
cljs.core.TransientHashMap.prototype.cljs$core$ITransientCollection$_persistent_BANG_$arity$1 = function(tcoll) {
|
|
var self__ = this;
|
|
return tcoll.persistent_BANG_()
|
|
};
|
|
cljs.core.TransientHashMap.prototype.cljs$core$ILookup$_lookup$arity$2 = function(tcoll, k) {
|
|
var self__ = this;
|
|
if(k == null) {
|
|
if(self__.has_nil_QMARK_) {
|
|
return self__.nil_val
|
|
}else {
|
|
return null
|
|
}
|
|
}else {
|
|
if(self__.root == null) {
|
|
return null
|
|
}else {
|
|
return self__.root.inode_lookup(0, cljs.core.hash.call(null, k), k)
|
|
}
|
|
}
|
|
};
|
|
cljs.core.TransientHashMap.prototype.cljs$core$ILookup$_lookup$arity$3 = function(tcoll, k, not_found) {
|
|
var self__ = this;
|
|
if(k == null) {
|
|
if(self__.has_nil_QMARK_) {
|
|
return self__.nil_val
|
|
}else {
|
|
return not_found
|
|
}
|
|
}else {
|
|
if(self__.root == null) {
|
|
return not_found
|
|
}else {
|
|
return self__.root.inode_lookup(0, cljs.core.hash.call(null, k), k, not_found)
|
|
}
|
|
}
|
|
};
|
|
cljs.core.TransientHashMap.prototype.cljs$core$ICounted$_count$arity$1 = function(coll) {
|
|
var self__ = this;
|
|
if(self__.edit) {
|
|
return self__.count
|
|
}else {
|
|
throw new Error("count after persistent!");
|
|
}
|
|
};
|
|
cljs.core.TransientHashMap.prototype.conj_BANG_ = function(o) {
|
|
var self__ = this;
|
|
var tcoll = this;
|
|
if(self__.edit) {
|
|
if(function() {
|
|
var G__14027 = o;
|
|
if(G__14027) {
|
|
if(function() {
|
|
var or__3943__auto__ = G__14027.cljs$lang$protocol_mask$partition0$ & 2048;
|
|
if(or__3943__auto__) {
|
|
return or__3943__auto__
|
|
}else {
|
|
return G__14027.cljs$core$IMapEntry$
|
|
}
|
|
}()) {
|
|
return true
|
|
}else {
|
|
if(!G__14027.cljs$lang$protocol_mask$partition0$) {
|
|
return cljs.core.type_satisfies_.call(null, cljs.core.IMapEntry, G__14027)
|
|
}else {
|
|
return false
|
|
}
|
|
}
|
|
}else {
|
|
return cljs.core.type_satisfies_.call(null, cljs.core.IMapEntry, G__14027)
|
|
}
|
|
}()) {
|
|
return tcoll.assoc_BANG_(cljs.core.key.call(null, o), cljs.core.val.call(null, o))
|
|
}else {
|
|
var es = cljs.core.seq.call(null, o);
|
|
var tcoll__$1 = tcoll;
|
|
while(true) {
|
|
var temp__4090__auto__ = cljs.core.first.call(null, es);
|
|
if(cljs.core.truth_(temp__4090__auto__)) {
|
|
var e = temp__4090__auto__;
|
|
var G__14028 = cljs.core.next.call(null, es);
|
|
var G__14029 = tcoll__$1.assoc_BANG_(cljs.core.key.call(null, e), cljs.core.val.call(null, e));
|
|
es = G__14028;
|
|
tcoll__$1 = G__14029;
|
|
continue
|
|
}else {
|
|
return tcoll__$1
|
|
}
|
|
break
|
|
}
|
|
}
|
|
}else {
|
|
throw new Error("conj! after persistent");
|
|
}
|
|
};
|
|
cljs.core.TransientHashMap.prototype.assoc_BANG_ = function(k, v) {
|
|
var self__ = this;
|
|
var tcoll = this;
|
|
if(self__.edit) {
|
|
if(k == null) {
|
|
if(self__.nil_val === v) {
|
|
}else {
|
|
self__.nil_val = v
|
|
}
|
|
if(self__.has_nil_QMARK_) {
|
|
}else {
|
|
self__.count = self__.count + 1;
|
|
self__.has_nil_QMARK_ = true
|
|
}
|
|
return tcoll
|
|
}else {
|
|
var added_leaf_QMARK_ = new cljs.core.Box(false);
|
|
var node = (self__.root == null ? cljs.core.BitmapIndexedNode.EMPTY : self__.root).inode_assoc_BANG_(self__.edit, 0, cljs.core.hash.call(null, k), k, v, added_leaf_QMARK_);
|
|
if(node === self__.root) {
|
|
}else {
|
|
self__.root = node
|
|
}
|
|
if(added_leaf_QMARK_.val) {
|
|
self__.count = self__.count + 1
|
|
}else {
|
|
}
|
|
return tcoll
|
|
}
|
|
}else {
|
|
throw new Error("assoc! after persistent!");
|
|
}
|
|
};
|
|
cljs.core.TransientHashMap.prototype.without_BANG_ = function(k) {
|
|
var self__ = this;
|
|
var tcoll = this;
|
|
if(self__.edit) {
|
|
if(k == null) {
|
|
if(self__.has_nil_QMARK_) {
|
|
self__.has_nil_QMARK_ = false;
|
|
self__.nil_val = null;
|
|
self__.count = self__.count - 1;
|
|
return tcoll
|
|
}else {
|
|
return tcoll
|
|
}
|
|
}else {
|
|
if(self__.root == null) {
|
|
return tcoll
|
|
}else {
|
|
var removed_leaf_QMARK_ = new cljs.core.Box(false);
|
|
var node = self__.root.inode_without_BANG_(self__.edit, 0, cljs.core.hash.call(null, k), k, removed_leaf_QMARK_);
|
|
if(node === self__.root) {
|
|
}else {
|
|
self__.root = node
|
|
}
|
|
if(cljs.core.truth_(removed_leaf_QMARK_[0])) {
|
|
self__.count = self__.count - 1
|
|
}else {
|
|
}
|
|
return tcoll
|
|
}
|
|
}
|
|
}else {
|
|
throw new Error("dissoc! after persistent!");
|
|
}
|
|
};
|
|
cljs.core.TransientHashMap.prototype.persistent_BANG_ = function() {
|
|
var self__ = this;
|
|
var tcoll = this;
|
|
if(self__.edit) {
|
|
self__.edit = null;
|
|
return new cljs.core.PersistentHashMap(null, self__.count, self__.root, self__.has_nil_QMARK_, self__.nil_val, null)
|
|
}else {
|
|
throw new Error("persistent! called twice");
|
|
}
|
|
};
|
|
cljs.core.__GT_TransientHashMap = function __GT_TransientHashMap(edit, root, count, has_nil_QMARK_, nil_val) {
|
|
return new cljs.core.TransientHashMap(edit, root, count, has_nil_QMARK_, nil_val)
|
|
};
|
|
cljs.core.tree_map_seq_push = function tree_map_seq_push(node, stack, ascending_QMARK_) {
|
|
var t = node;
|
|
var stack__$1 = stack;
|
|
while(true) {
|
|
if(!(t == null)) {
|
|
var G__14030 = ascending_QMARK_ ? t.left : t.right;
|
|
var G__14031 = cljs.core.conj.call(null, stack__$1, t);
|
|
t = G__14030;
|
|
stack__$1 = G__14031;
|
|
continue
|
|
}else {
|
|
return stack__$1
|
|
}
|
|
break
|
|
}
|
|
};
|
|
goog.provide("cljs.core.PersistentTreeMapSeq");
|
|
cljs.core.PersistentTreeMapSeq = function(meta, stack, ascending_QMARK_, cnt, __hash) {
|
|
this.meta = meta;
|
|
this.stack = stack;
|
|
this.ascending_QMARK_ = ascending_QMARK_;
|
|
this.cnt = cnt;
|
|
this.__hash = __hash;
|
|
this.cljs$lang$protocol_mask$partition1$ = 0;
|
|
this.cljs$lang$protocol_mask$partition0$ = 31850574
|
|
};
|
|
cljs.core.PersistentTreeMapSeq.cljs$lang$type = true;
|
|
cljs.core.PersistentTreeMapSeq.cljs$lang$ctorStr = "cljs.core/PersistentTreeMapSeq";
|
|
cljs.core.PersistentTreeMapSeq.cljs$lang$ctorPrWriter = function(this__2847__auto__, writer__2848__auto__, opt__2849__auto__) {
|
|
return cljs.core._write.call(null, writer__2848__auto__, "cljs.core/PersistentTreeMapSeq")
|
|
};
|
|
cljs.core.PersistentTreeMapSeq.prototype.cljs$core$IHash$_hash$arity$1 = function(coll) {
|
|
var self__ = this;
|
|
var h__2732__auto__ = self__.__hash;
|
|
if(!(h__2732__auto__ == null)) {
|
|
return h__2732__auto__
|
|
}else {
|
|
var h__2732__auto____$1 = cljs.core.hash_coll.call(null, coll);
|
|
self__.__hash = h__2732__auto____$1;
|
|
return h__2732__auto____$1
|
|
}
|
|
};
|
|
cljs.core.PersistentTreeMapSeq.prototype.cljs$core$ICollection$_conj$arity$2 = function(coll, o) {
|
|
var self__ = this;
|
|
return cljs.core.cons.call(null, o, coll)
|
|
};
|
|
cljs.core.PersistentTreeMapSeq.prototype.toString = function() {
|
|
var self__ = this;
|
|
var coll = this;
|
|
return cljs.core.pr_str_STAR_.call(null, coll)
|
|
};
|
|
cljs.core.PersistentTreeMapSeq.prototype.cljs$core$ISeqable$_seq$arity$1 = function(this$) {
|
|
var self__ = this;
|
|
return this$
|
|
};
|
|
cljs.core.PersistentTreeMapSeq.prototype.cljs$core$ICounted$_count$arity$1 = function(coll) {
|
|
var self__ = this;
|
|
if(self__.cnt < 0) {
|
|
return cljs.core.count.call(null, cljs.core.next.call(null, coll)) + 1
|
|
}else {
|
|
return self__.cnt
|
|
}
|
|
};
|
|
cljs.core.PersistentTreeMapSeq.prototype.cljs$core$ISeq$_first$arity$1 = function(this$) {
|
|
var self__ = this;
|
|
return cljs.core.peek.call(null, self__.stack)
|
|
};
|
|
cljs.core.PersistentTreeMapSeq.prototype.cljs$core$ISeq$_rest$arity$1 = function(this$) {
|
|
var self__ = this;
|
|
var t = cljs.core.first.call(null, self__.stack);
|
|
var next_stack = cljs.core.tree_map_seq_push.call(null, self__.ascending_QMARK_ ? t.right : t.left, cljs.core.next.call(null, self__.stack), self__.ascending_QMARK_);
|
|
if(!(next_stack == null)) {
|
|
return new cljs.core.PersistentTreeMapSeq(null, next_stack, self__.ascending_QMARK_, self__.cnt - 1, null)
|
|
}else {
|
|
return cljs.core.List.EMPTY
|
|
}
|
|
};
|
|
cljs.core.PersistentTreeMapSeq.prototype.cljs$core$IEquiv$_equiv$arity$2 = function(coll, other) {
|
|
var self__ = this;
|
|
return cljs.core.equiv_sequential.call(null, coll, other)
|
|
};
|
|
cljs.core.PersistentTreeMapSeq.prototype.cljs$core$IWithMeta$_with_meta$arity$2 = function(coll, meta__$1) {
|
|
var self__ = this;
|
|
return new cljs.core.PersistentTreeMapSeq(meta__$1, self__.stack, self__.ascending_QMARK_, self__.cnt, self__.__hash)
|
|
};
|
|
cljs.core.PersistentTreeMapSeq.prototype.cljs$core$IMeta$_meta$arity$1 = function(coll) {
|
|
var self__ = this;
|
|
return self__.meta
|
|
};
|
|
cljs.core.PersistentTreeMapSeq.prototype.cljs$core$IEmptyableCollection$_empty$arity$1 = function(coll) {
|
|
var self__ = this;
|
|
return cljs.core.with_meta.call(null, cljs.core.List.EMPTY, self__.meta)
|
|
};
|
|
cljs.core.__GT_PersistentTreeMapSeq = function __GT_PersistentTreeMapSeq(meta, stack, ascending_QMARK_, cnt, __hash) {
|
|
return new cljs.core.PersistentTreeMapSeq(meta, stack, ascending_QMARK_, cnt, __hash)
|
|
};
|
|
cljs.core.create_tree_map_seq = function create_tree_map_seq(tree, ascending_QMARK_, cnt) {
|
|
return new cljs.core.PersistentTreeMapSeq(null, cljs.core.tree_map_seq_push.call(null, tree, null, ascending_QMARK_), ascending_QMARK_, cnt, null)
|
|
};
|
|
cljs.core.balance_left = function balance_left(key, val, ins, right) {
|
|
if(ins instanceof cljs.core.RedNode) {
|
|
if(ins.left instanceof cljs.core.RedNode) {
|
|
return new cljs.core.RedNode(ins.key, ins.val, ins.left.blacken(), new cljs.core.BlackNode(key, val, ins.right, right, null), null)
|
|
}else {
|
|
if(ins.right instanceof cljs.core.RedNode) {
|
|
return new cljs.core.RedNode(ins.right.key, ins.right.val, new cljs.core.BlackNode(ins.key, ins.val, ins.left, ins.right.left, null), new cljs.core.BlackNode(key, val, ins.right.right, right, null), null)
|
|
}else {
|
|
if("\ufdd0:else") {
|
|
return new cljs.core.BlackNode(key, val, ins, right, null)
|
|
}else {
|
|
return null
|
|
}
|
|
}
|
|
}
|
|
}else {
|
|
return new cljs.core.BlackNode(key, val, ins, right, null)
|
|
}
|
|
};
|
|
cljs.core.balance_right = function balance_right(key, val, left, ins) {
|
|
if(ins instanceof cljs.core.RedNode) {
|
|
if(ins.right instanceof cljs.core.RedNode) {
|
|
return new cljs.core.RedNode(ins.key, ins.val, new cljs.core.BlackNode(key, val, left, ins.left, null), ins.right.blacken(), null)
|
|
}else {
|
|
if(ins.left instanceof cljs.core.RedNode) {
|
|
return new cljs.core.RedNode(ins.left.key, ins.left.val, new cljs.core.BlackNode(key, val, left, ins.left.left, null), new cljs.core.BlackNode(ins.key, ins.val, ins.left.right, ins.right, null), null)
|
|
}else {
|
|
if("\ufdd0:else") {
|
|
return new cljs.core.BlackNode(key, val, left, ins, null)
|
|
}else {
|
|
return null
|
|
}
|
|
}
|
|
}
|
|
}else {
|
|
return new cljs.core.BlackNode(key, val, left, ins, null)
|
|
}
|
|
};
|
|
cljs.core.balance_left_del = function balance_left_del(key, val, del, right) {
|
|
if(del instanceof cljs.core.RedNode) {
|
|
return new cljs.core.RedNode(key, val, del.blacken(), right, null)
|
|
}else {
|
|
if(right instanceof cljs.core.BlackNode) {
|
|
return cljs.core.balance_right.call(null, key, val, del, right.redden())
|
|
}else {
|
|
if(function() {
|
|
var and__3941__auto__ = right instanceof cljs.core.RedNode;
|
|
if(and__3941__auto__) {
|
|
return right.left instanceof cljs.core.BlackNode
|
|
}else {
|
|
return and__3941__auto__
|
|
}
|
|
}()) {
|
|
return new cljs.core.RedNode(right.left.key, right.left.val, new cljs.core.BlackNode(key, val, del, right.left.left, null), cljs.core.balance_right.call(null, right.key, right.val, right.left.right, right.right.redden()), null)
|
|
}else {
|
|
if("\ufdd0:else") {
|
|
throw new Error("red-black tree invariant violation");
|
|
}else {
|
|
return null
|
|
}
|
|
}
|
|
}
|
|
}
|
|
};
|
|
cljs.core.balance_right_del = function balance_right_del(key, val, left, del) {
|
|
if(del instanceof cljs.core.RedNode) {
|
|
return new cljs.core.RedNode(key, val, left, del.blacken(), null)
|
|
}else {
|
|
if(left instanceof cljs.core.BlackNode) {
|
|
return cljs.core.balance_left.call(null, key, val, left.redden(), del)
|
|
}else {
|
|
if(function() {
|
|
var and__3941__auto__ = left instanceof cljs.core.RedNode;
|
|
if(and__3941__auto__) {
|
|
return left.right instanceof cljs.core.BlackNode
|
|
}else {
|
|
return and__3941__auto__
|
|
}
|
|
}()) {
|
|
return new cljs.core.RedNode(left.right.key, left.right.val, cljs.core.balance_left.call(null, left.key, left.val, left.left.redden(), left.right.left), new cljs.core.BlackNode(key, val, left.right.right, del, null), null)
|
|
}else {
|
|
if("\ufdd0:else") {
|
|
throw new Error("red-black tree invariant violation");
|
|
}else {
|
|
return null
|
|
}
|
|
}
|
|
}
|
|
}
|
|
};
|
|
cljs.core.tree_map_kv_reduce = function tree_map_kv_reduce(node, f, init) {
|
|
var init__$1 = !(node.left == null) ? tree_map_kv_reduce.call(null, node.left, f, init) : init;
|
|
if(cljs.core.reduced_QMARK_.call(null, init__$1)) {
|
|
return cljs.core.deref.call(null, init__$1)
|
|
}else {
|
|
var init__$2 = f.call(null, init__$1, node.key, node.val);
|
|
if(cljs.core.reduced_QMARK_.call(null, init__$2)) {
|
|
return cljs.core.deref.call(null, init__$2)
|
|
}else {
|
|
var init__$3 = !(node.right == null) ? tree_map_kv_reduce.call(null, node.right, f, init__$2) : init__$2;
|
|
if(cljs.core.reduced_QMARK_.call(null, init__$3)) {
|
|
return cljs.core.deref.call(null, init__$3)
|
|
}else {
|
|
return init__$3
|
|
}
|
|
}
|
|
}
|
|
};
|
|
goog.provide("cljs.core.BlackNode");
|
|
cljs.core.BlackNode = function(key, val, left, right, __hash) {
|
|
this.key = key;
|
|
this.val = val;
|
|
this.left = left;
|
|
this.right = right;
|
|
this.__hash = __hash;
|
|
this.cljs$lang$protocol_mask$partition1$ = 0;
|
|
this.cljs$lang$protocol_mask$partition0$ = 32402207
|
|
};
|
|
cljs.core.BlackNode.cljs$lang$type = true;
|
|
cljs.core.BlackNode.cljs$lang$ctorStr = "cljs.core/BlackNode";
|
|
cljs.core.BlackNode.cljs$lang$ctorPrWriter = function(this__2847__auto__, writer__2848__auto__, opt__2849__auto__) {
|
|
return cljs.core._write.call(null, writer__2848__auto__, "cljs.core/BlackNode")
|
|
};
|
|
cljs.core.BlackNode.prototype.cljs$core$IHash$_hash$arity$1 = function(coll) {
|
|
var self__ = this;
|
|
var h__2732__auto__ = self__.__hash;
|
|
if(!(h__2732__auto__ == null)) {
|
|
return h__2732__auto__
|
|
}else {
|
|
var h__2732__auto____$1 = cljs.core.hash_coll.call(null, coll);
|
|
self__.__hash = h__2732__auto____$1;
|
|
return h__2732__auto____$1
|
|
}
|
|
};
|
|
cljs.core.BlackNode.prototype.cljs$core$ILookup$_lookup$arity$2 = function(node, k) {
|
|
var self__ = this;
|
|
return node.cljs$core$IIndexed$_nth$arity$3(node, k, null)
|
|
};
|
|
cljs.core.BlackNode.prototype.cljs$core$ILookup$_lookup$arity$3 = function(node, k, not_found) {
|
|
var self__ = this;
|
|
return node.cljs$core$IIndexed$_nth$arity$3(node, k, not_found)
|
|
};
|
|
cljs.core.BlackNode.prototype.cljs$core$IAssociative$_assoc$arity$3 = function(node, k, v) {
|
|
var self__ = this;
|
|
return cljs.core.assoc.call(null, cljs.core.PersistentVector.fromArray([self__.key, self__.val], true), k, v)
|
|
};
|
|
cljs.core.BlackNode.prototype.call = function() {
|
|
var G__14033 = null;
|
|
var G__14033__2 = function(self__, k) {
|
|
var self__ = this;
|
|
var self____$1 = this;
|
|
var node = self____$1;
|
|
return node.cljs$core$ILookup$_lookup$arity$2(node, k)
|
|
};
|
|
var G__14033__3 = function(self__, k, not_found) {
|
|
var self__ = this;
|
|
var self____$1 = this;
|
|
var node = self____$1;
|
|
return node.cljs$core$ILookup$_lookup$arity$3(node, k, not_found)
|
|
};
|
|
G__14033 = function(self__, k, not_found) {
|
|
switch(arguments.length) {
|
|
case 2:
|
|
return G__14033__2.call(this, self__, k);
|
|
case 3:
|
|
return G__14033__3.call(this, self__, k, not_found)
|
|
}
|
|
throw new Error("Invalid arity: " + arguments.length);
|
|
};
|
|
return G__14033
|
|
}();
|
|
cljs.core.BlackNode.prototype.apply = function(self__, args14032) {
|
|
var self__ = this;
|
|
return self__.call.apply(self__, [self__].concat(args14032.slice()))
|
|
};
|
|
cljs.core.BlackNode.prototype.cljs$core$ICollection$_conj$arity$2 = function(node, o) {
|
|
var self__ = this;
|
|
return cljs.core.PersistentVector.fromArray([self__.key, self__.val, o], true)
|
|
};
|
|
cljs.core.BlackNode.prototype.cljs$core$IMapEntry$_key$arity$1 = function(node) {
|
|
var self__ = this;
|
|
return self__.key
|
|
};
|
|
cljs.core.BlackNode.prototype.cljs$core$IMapEntry$_val$arity$1 = function(node) {
|
|
var self__ = this;
|
|
return self__.val
|
|
};
|
|
cljs.core.BlackNode.prototype.add_right = function(ins) {
|
|
var self__ = this;
|
|
var node = this;
|
|
return ins.balance_right(node)
|
|
};
|
|
cljs.core.BlackNode.prototype.redden = function() {
|
|
var self__ = this;
|
|
var node = this;
|
|
return new cljs.core.RedNode(self__.key, self__.val, self__.left, self__.right, null)
|
|
};
|
|
cljs.core.BlackNode.prototype.remove_right = function(del) {
|
|
var self__ = this;
|
|
var node = this;
|
|
return cljs.core.balance_right_del.call(null, self__.key, self__.val, self__.left, del)
|
|
};
|
|
cljs.core.BlackNode.prototype.replace = function(key__$1, val__$1, left__$1, right__$1) {
|
|
var self__ = this;
|
|
var node = this;
|
|
return new cljs.core.BlackNode(key__$1, val__$1, left__$1, right__$1, null)
|
|
};
|
|
cljs.core.BlackNode.prototype.kv_reduce = function(f, init) {
|
|
var self__ = this;
|
|
var node = this;
|
|
return cljs.core.tree_map_kv_reduce.call(null, node, f, init)
|
|
};
|
|
cljs.core.BlackNode.prototype.remove_left = function(del) {
|
|
var self__ = this;
|
|
var node = this;
|
|
return cljs.core.balance_left_del.call(null, self__.key, self__.val, del, self__.right)
|
|
};
|
|
cljs.core.BlackNode.prototype.add_left = function(ins) {
|
|
var self__ = this;
|
|
var node = this;
|
|
return ins.balance_left(node)
|
|
};
|
|
cljs.core.BlackNode.prototype.balance_left = function(parent) {
|
|
var self__ = this;
|
|
var node = this;
|
|
return new cljs.core.BlackNode(parent.key, parent.val, node, parent.right, null)
|
|
};
|
|
cljs.core.BlackNode.prototype.balance_right = function(parent) {
|
|
var self__ = this;
|
|
var node = this;
|
|
return new cljs.core.BlackNode(parent.key, parent.val, parent.left, node, null)
|
|
};
|
|
cljs.core.BlackNode.prototype.blacken = function() {
|
|
var self__ = this;
|
|
var node = this;
|
|
return node
|
|
};
|
|
cljs.core.BlackNode.prototype.cljs$core$IReduce$_reduce$arity$2 = function(node, f) {
|
|
var self__ = this;
|
|
return cljs.core.ci_reduce.call(null, node, f)
|
|
};
|
|
cljs.core.BlackNode.prototype.cljs$core$IReduce$_reduce$arity$3 = function(node, f, start) {
|
|
var self__ = this;
|
|
return cljs.core.ci_reduce.call(null, node, f, start)
|
|
};
|
|
cljs.core.BlackNode.prototype.cljs$core$ISeqable$_seq$arity$1 = function(node) {
|
|
var self__ = this;
|
|
return cljs.core.list.call(null, self__.key, self__.val)
|
|
};
|
|
cljs.core.BlackNode.prototype.cljs$core$ICounted$_count$arity$1 = function(node) {
|
|
var self__ = this;
|
|
return 2
|
|
};
|
|
cljs.core.BlackNode.prototype.cljs$core$IStack$_peek$arity$1 = function(node) {
|
|
var self__ = this;
|
|
return self__.val
|
|
};
|
|
cljs.core.BlackNode.prototype.cljs$core$IStack$_pop$arity$1 = function(node) {
|
|
var self__ = this;
|
|
return cljs.core.PersistentVector.fromArray([self__.key], true)
|
|
};
|
|
cljs.core.BlackNode.prototype.cljs$core$IVector$_assoc_n$arity$3 = function(node, n, v) {
|
|
var self__ = this;
|
|
return cljs.core._assoc_n.call(null, cljs.core.PersistentVector.fromArray([self__.key, self__.val], true), n, v)
|
|
};
|
|
cljs.core.BlackNode.prototype.cljs$core$IEquiv$_equiv$arity$2 = function(coll, other) {
|
|
var self__ = this;
|
|
return cljs.core.equiv_sequential.call(null, coll, other)
|
|
};
|
|
cljs.core.BlackNode.prototype.cljs$core$IWithMeta$_with_meta$arity$2 = function(node, meta) {
|
|
var self__ = this;
|
|
return cljs.core.with_meta.call(null, cljs.core.PersistentVector.fromArray([self__.key, self__.val], true), meta)
|
|
};
|
|
cljs.core.BlackNode.prototype.cljs$core$IMeta$_meta$arity$1 = function(node) {
|
|
var self__ = this;
|
|
return null
|
|
};
|
|
cljs.core.BlackNode.prototype.cljs$core$IIndexed$_nth$arity$2 = function(node, n) {
|
|
var self__ = this;
|
|
if(n === 0) {
|
|
return self__.key
|
|
}else {
|
|
if(n === 1) {
|
|
return self__.val
|
|
}else {
|
|
if("\ufdd0:else") {
|
|
return null
|
|
}else {
|
|
return null
|
|
}
|
|
}
|
|
}
|
|
};
|
|
cljs.core.BlackNode.prototype.cljs$core$IIndexed$_nth$arity$3 = function(node, n, not_found) {
|
|
var self__ = this;
|
|
if(n === 0) {
|
|
return self__.key
|
|
}else {
|
|
if(n === 1) {
|
|
return self__.val
|
|
}else {
|
|
if("\ufdd0:else") {
|
|
return not_found
|
|
}else {
|
|
return null
|
|
}
|
|
}
|
|
}
|
|
};
|
|
cljs.core.BlackNode.prototype.cljs$core$IEmptyableCollection$_empty$arity$1 = function(node) {
|
|
var self__ = this;
|
|
return cljs.core.PersistentVector.EMPTY
|
|
};
|
|
cljs.core.__GT_BlackNode = function __GT_BlackNode(key, val, left, right, __hash) {
|
|
return new cljs.core.BlackNode(key, val, left, right, __hash)
|
|
};
|
|
goog.provide("cljs.core.RedNode");
|
|
cljs.core.RedNode = function(key, val, left, right, __hash) {
|
|
this.key = key;
|
|
this.val = val;
|
|
this.left = left;
|
|
this.right = right;
|
|
this.__hash = __hash;
|
|
this.cljs$lang$protocol_mask$partition1$ = 0;
|
|
this.cljs$lang$protocol_mask$partition0$ = 32402207
|
|
};
|
|
cljs.core.RedNode.cljs$lang$type = true;
|
|
cljs.core.RedNode.cljs$lang$ctorStr = "cljs.core/RedNode";
|
|
cljs.core.RedNode.cljs$lang$ctorPrWriter = function(this__2847__auto__, writer__2848__auto__, opt__2849__auto__) {
|
|
return cljs.core._write.call(null, writer__2848__auto__, "cljs.core/RedNode")
|
|
};
|
|
cljs.core.RedNode.prototype.cljs$core$IHash$_hash$arity$1 = function(coll) {
|
|
var self__ = this;
|
|
var h__2732__auto__ = self__.__hash;
|
|
if(!(h__2732__auto__ == null)) {
|
|
return h__2732__auto__
|
|
}else {
|
|
var h__2732__auto____$1 = cljs.core.hash_coll.call(null, coll);
|
|
self__.__hash = h__2732__auto____$1;
|
|
return h__2732__auto____$1
|
|
}
|
|
};
|
|
cljs.core.RedNode.prototype.cljs$core$ILookup$_lookup$arity$2 = function(node, k) {
|
|
var self__ = this;
|
|
return node.cljs$core$IIndexed$_nth$arity$3(node, k, null)
|
|
};
|
|
cljs.core.RedNode.prototype.cljs$core$ILookup$_lookup$arity$3 = function(node, k, not_found) {
|
|
var self__ = this;
|
|
return node.cljs$core$IIndexed$_nth$arity$3(node, k, not_found)
|
|
};
|
|
cljs.core.RedNode.prototype.cljs$core$IAssociative$_assoc$arity$3 = function(node, k, v) {
|
|
var self__ = this;
|
|
return cljs.core.assoc.call(null, cljs.core.PersistentVector.fromArray([self__.key, self__.val], true), k, v)
|
|
};
|
|
cljs.core.RedNode.prototype.call = function() {
|
|
var G__14035 = null;
|
|
var G__14035__2 = function(self__, k) {
|
|
var self__ = this;
|
|
var self____$1 = this;
|
|
var node = self____$1;
|
|
return node.cljs$core$ILookup$_lookup$arity$2(node, k)
|
|
};
|
|
var G__14035__3 = function(self__, k, not_found) {
|
|
var self__ = this;
|
|
var self____$1 = this;
|
|
var node = self____$1;
|
|
return node.cljs$core$ILookup$_lookup$arity$3(node, k, not_found)
|
|
};
|
|
G__14035 = function(self__, k, not_found) {
|
|
switch(arguments.length) {
|
|
case 2:
|
|
return G__14035__2.call(this, self__, k);
|
|
case 3:
|
|
return G__14035__3.call(this, self__, k, not_found)
|
|
}
|
|
throw new Error("Invalid arity: " + arguments.length);
|
|
};
|
|
return G__14035
|
|
}();
|
|
cljs.core.RedNode.prototype.apply = function(self__, args14034) {
|
|
var self__ = this;
|
|
return self__.call.apply(self__, [self__].concat(args14034.slice()))
|
|
};
|
|
cljs.core.RedNode.prototype.cljs$core$ICollection$_conj$arity$2 = function(node, o) {
|
|
var self__ = this;
|
|
return cljs.core.PersistentVector.fromArray([self__.key, self__.val, o], true)
|
|
};
|
|
cljs.core.RedNode.prototype.cljs$core$IMapEntry$_key$arity$1 = function(node) {
|
|
var self__ = this;
|
|
return self__.key
|
|
};
|
|
cljs.core.RedNode.prototype.cljs$core$IMapEntry$_val$arity$1 = function(node) {
|
|
var self__ = this;
|
|
return self__.val
|
|
};
|
|
cljs.core.RedNode.prototype.add_right = function(ins) {
|
|
var self__ = this;
|
|
var node = this;
|
|
return new cljs.core.RedNode(self__.key, self__.val, self__.left, ins, null)
|
|
};
|
|
cljs.core.RedNode.prototype.redden = function() {
|
|
var self__ = this;
|
|
var node = this;
|
|
throw new Error("red-black tree invariant violation");
|
|
};
|
|
cljs.core.RedNode.prototype.remove_right = function(del) {
|
|
var self__ = this;
|
|
var node = this;
|
|
return new cljs.core.RedNode(self__.key, self__.val, self__.left, del, null)
|
|
};
|
|
cljs.core.RedNode.prototype.replace = function(key__$1, val__$1, left__$1, right__$1) {
|
|
var self__ = this;
|
|
var node = this;
|
|
return new cljs.core.RedNode(key__$1, val__$1, left__$1, right__$1, null)
|
|
};
|
|
cljs.core.RedNode.prototype.kv_reduce = function(f, init) {
|
|
var self__ = this;
|
|
var node = this;
|
|
return cljs.core.tree_map_kv_reduce.call(null, node, f, init)
|
|
};
|
|
cljs.core.RedNode.prototype.remove_left = function(del) {
|
|
var self__ = this;
|
|
var node = this;
|
|
return new cljs.core.RedNode(self__.key, self__.val, del, self__.right, null)
|
|
};
|
|
cljs.core.RedNode.prototype.add_left = function(ins) {
|
|
var self__ = this;
|
|
var node = this;
|
|
return new cljs.core.RedNode(self__.key, self__.val, ins, self__.right, null)
|
|
};
|
|
cljs.core.RedNode.prototype.balance_left = function(parent) {
|
|
var self__ = this;
|
|
var node = this;
|
|
if(self__.left instanceof cljs.core.RedNode) {
|
|
return new cljs.core.RedNode(self__.key, self__.val, self__.left.blacken(), new cljs.core.BlackNode(parent.key, parent.val, self__.right, parent.right, null), null)
|
|
}else {
|
|
if(self__.right instanceof cljs.core.RedNode) {
|
|
return new cljs.core.RedNode(self__.right.key, self__.right.val, new cljs.core.BlackNode(self__.key, self__.val, self__.left, self__.right.left, null), new cljs.core.BlackNode(parent.key, parent.val, self__.right.right, parent.right, null), null)
|
|
}else {
|
|
if("\ufdd0:else") {
|
|
return new cljs.core.BlackNode(parent.key, parent.val, node, parent.right, null)
|
|
}else {
|
|
return null
|
|
}
|
|
}
|
|
}
|
|
};
|
|
cljs.core.RedNode.prototype.balance_right = function(parent) {
|
|
var self__ = this;
|
|
var node = this;
|
|
if(self__.right instanceof cljs.core.RedNode) {
|
|
return new cljs.core.RedNode(self__.key, self__.val, new cljs.core.BlackNode(parent.key, parent.val, parent.left, self__.left, null), self__.right.blacken(), null)
|
|
}else {
|
|
if(self__.left instanceof cljs.core.RedNode) {
|
|
return new cljs.core.RedNode(self__.left.key, self__.left.val, new cljs.core.BlackNode(parent.key, parent.val, parent.left, self__.left.left, null), new cljs.core.BlackNode(self__.key, self__.val, self__.left.right, self__.right, null), null)
|
|
}else {
|
|
if("\ufdd0:else") {
|
|
return new cljs.core.BlackNode(parent.key, parent.val, parent.left, node, null)
|
|
}else {
|
|
return null
|
|
}
|
|
}
|
|
}
|
|
};
|
|
cljs.core.RedNode.prototype.blacken = function() {
|
|
var self__ = this;
|
|
var node = this;
|
|
return new cljs.core.BlackNode(self__.key, self__.val, self__.left, self__.right, null)
|
|
};
|
|
cljs.core.RedNode.prototype.cljs$core$IReduce$_reduce$arity$2 = function(node, f) {
|
|
var self__ = this;
|
|
return cljs.core.ci_reduce.call(null, node, f)
|
|
};
|
|
cljs.core.RedNode.prototype.cljs$core$IReduce$_reduce$arity$3 = function(node, f, start) {
|
|
var self__ = this;
|
|
return cljs.core.ci_reduce.call(null, node, f, start)
|
|
};
|
|
cljs.core.RedNode.prototype.cljs$core$ISeqable$_seq$arity$1 = function(node) {
|
|
var self__ = this;
|
|
return cljs.core.list.call(null, self__.key, self__.val)
|
|
};
|
|
cljs.core.RedNode.prototype.cljs$core$ICounted$_count$arity$1 = function(node) {
|
|
var self__ = this;
|
|
return 2
|
|
};
|
|
cljs.core.RedNode.prototype.cljs$core$IStack$_peek$arity$1 = function(node) {
|
|
var self__ = this;
|
|
return self__.val
|
|
};
|
|
cljs.core.RedNode.prototype.cljs$core$IStack$_pop$arity$1 = function(node) {
|
|
var self__ = this;
|
|
return cljs.core.PersistentVector.fromArray([self__.key], true)
|
|
};
|
|
cljs.core.RedNode.prototype.cljs$core$IVector$_assoc_n$arity$3 = function(node, n, v) {
|
|
var self__ = this;
|
|
return cljs.core._assoc_n.call(null, cljs.core.PersistentVector.fromArray([self__.key, self__.val], true), n, v)
|
|
};
|
|
cljs.core.RedNode.prototype.cljs$core$IEquiv$_equiv$arity$2 = function(coll, other) {
|
|
var self__ = this;
|
|
return cljs.core.equiv_sequential.call(null, coll, other)
|
|
};
|
|
cljs.core.RedNode.prototype.cljs$core$IWithMeta$_with_meta$arity$2 = function(node, meta) {
|
|
var self__ = this;
|
|
return cljs.core.with_meta.call(null, cljs.core.PersistentVector.fromArray([self__.key, self__.val], true), meta)
|
|
};
|
|
cljs.core.RedNode.prototype.cljs$core$IMeta$_meta$arity$1 = function(node) {
|
|
var self__ = this;
|
|
return null
|
|
};
|
|
cljs.core.RedNode.prototype.cljs$core$IIndexed$_nth$arity$2 = function(node, n) {
|
|
var self__ = this;
|
|
if(n === 0) {
|
|
return self__.key
|
|
}else {
|
|
if(n === 1) {
|
|
return self__.val
|
|
}else {
|
|
if("\ufdd0:else") {
|
|
return null
|
|
}else {
|
|
return null
|
|
}
|
|
}
|
|
}
|
|
};
|
|
cljs.core.RedNode.prototype.cljs$core$IIndexed$_nth$arity$3 = function(node, n, not_found) {
|
|
var self__ = this;
|
|
if(n === 0) {
|
|
return self__.key
|
|
}else {
|
|
if(n === 1) {
|
|
return self__.val
|
|
}else {
|
|
if("\ufdd0:else") {
|
|
return not_found
|
|
}else {
|
|
return null
|
|
}
|
|
}
|
|
}
|
|
};
|
|
cljs.core.RedNode.prototype.cljs$core$IEmptyableCollection$_empty$arity$1 = function(node) {
|
|
var self__ = this;
|
|
return cljs.core.PersistentVector.EMPTY
|
|
};
|
|
cljs.core.__GT_RedNode = function __GT_RedNode(key, val, left, right, __hash) {
|
|
return new cljs.core.RedNode(key, val, left, right, __hash)
|
|
};
|
|
cljs.core.tree_map_add = function tree_map_add(comp, tree, k, v, found) {
|
|
if(tree == null) {
|
|
return new cljs.core.RedNode(k, v, null, null, null)
|
|
}else {
|
|
var c = comp.call(null, k, tree.key);
|
|
if(c === 0) {
|
|
found[0] = tree;
|
|
return null
|
|
}else {
|
|
if(c < 0) {
|
|
var ins = tree_map_add.call(null, comp, tree.left, k, v, found);
|
|
if(!(ins == null)) {
|
|
return tree.add_left(ins)
|
|
}else {
|
|
return null
|
|
}
|
|
}else {
|
|
if("\ufdd0:else") {
|
|
var ins = tree_map_add.call(null, comp, tree.right, k, v, found);
|
|
if(!(ins == null)) {
|
|
return tree.add_right(ins)
|
|
}else {
|
|
return null
|
|
}
|
|
}else {
|
|
return null
|
|
}
|
|
}
|
|
}
|
|
}
|
|
};
|
|
cljs.core.tree_map_append = function tree_map_append(left, right) {
|
|
if(left == null) {
|
|
return right
|
|
}else {
|
|
if(right == null) {
|
|
return left
|
|
}else {
|
|
if(left instanceof cljs.core.RedNode) {
|
|
if(right instanceof cljs.core.RedNode) {
|
|
var app = tree_map_append.call(null, left.right, right.left);
|
|
if(app instanceof cljs.core.RedNode) {
|
|
return new cljs.core.RedNode(app.key, app.val, new cljs.core.RedNode(left.key, left.val, left.left, app.left, null), new cljs.core.RedNode(right.key, right.val, app.right, right.right, null), null)
|
|
}else {
|
|
return new cljs.core.RedNode(left.key, left.val, left.left, new cljs.core.RedNode(right.key, right.val, app, right.right, null), null)
|
|
}
|
|
}else {
|
|
return new cljs.core.RedNode(left.key, left.val, left.left, tree_map_append.call(null, left.right, right), null)
|
|
}
|
|
}else {
|
|
if(right instanceof cljs.core.RedNode) {
|
|
return new cljs.core.RedNode(right.key, right.val, tree_map_append.call(null, left, right.left), right.right, null)
|
|
}else {
|
|
if("\ufdd0:else") {
|
|
var app = tree_map_append.call(null, left.right, right.left);
|
|
if(app instanceof cljs.core.RedNode) {
|
|
return new cljs.core.RedNode(app.key, app.val, new cljs.core.BlackNode(left.key, left.val, left.left, app.left, null), new cljs.core.BlackNode(right.key, right.val, app.right, right.right, null), null)
|
|
}else {
|
|
return cljs.core.balance_left_del.call(null, left.key, left.val, left.left, new cljs.core.BlackNode(right.key, right.val, app, right.right, null))
|
|
}
|
|
}else {
|
|
return null
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
};
|
|
cljs.core.tree_map_remove = function tree_map_remove(comp, tree, k, found) {
|
|
if(!(tree == null)) {
|
|
var c = comp.call(null, k, tree.key);
|
|
if(c === 0) {
|
|
found[0] = tree;
|
|
return cljs.core.tree_map_append.call(null, tree.left, tree.right)
|
|
}else {
|
|
if(c < 0) {
|
|
var del = tree_map_remove.call(null, comp, tree.left, k, found);
|
|
if(function() {
|
|
var or__3943__auto__ = !(del == null);
|
|
if(or__3943__auto__) {
|
|
return or__3943__auto__
|
|
}else {
|
|
return!(found[0] == null)
|
|
}
|
|
}()) {
|
|
if(tree.left instanceof cljs.core.BlackNode) {
|
|
return cljs.core.balance_left_del.call(null, tree.key, tree.val, del, tree.right)
|
|
}else {
|
|
return new cljs.core.RedNode(tree.key, tree.val, del, tree.right, null)
|
|
}
|
|
}else {
|
|
return null
|
|
}
|
|
}else {
|
|
if("\ufdd0:else") {
|
|
var del = tree_map_remove.call(null, comp, tree.right, k, found);
|
|
if(function() {
|
|
var or__3943__auto__ = !(del == null);
|
|
if(or__3943__auto__) {
|
|
return or__3943__auto__
|
|
}else {
|
|
return!(found[0] == null)
|
|
}
|
|
}()) {
|
|
if(tree.right instanceof cljs.core.BlackNode) {
|
|
return cljs.core.balance_right_del.call(null, tree.key, tree.val, tree.left, del)
|
|
}else {
|
|
return new cljs.core.RedNode(tree.key, tree.val, tree.left, del, null)
|
|
}
|
|
}else {
|
|
return null
|
|
}
|
|
}else {
|
|
return null
|
|
}
|
|
}
|
|
}
|
|
}else {
|
|
return null
|
|
}
|
|
};
|
|
cljs.core.tree_map_replace = function tree_map_replace(comp, tree, k, v) {
|
|
var tk = tree.key;
|
|
var c = comp.call(null, k, tk);
|
|
if(c === 0) {
|
|
return tree.replace(tk, v, tree.left, tree.right)
|
|
}else {
|
|
if(c < 0) {
|
|
return tree.replace(tk, tree.val, tree_map_replace.call(null, comp, tree.left, k, v), tree.right)
|
|
}else {
|
|
if("\ufdd0:else") {
|
|
return tree.replace(tk, tree.val, tree.left, tree_map_replace.call(null, comp, tree.right, k, v))
|
|
}else {
|
|
return null
|
|
}
|
|
}
|
|
}
|
|
};
|
|
goog.provide("cljs.core.PersistentTreeMap");
|
|
cljs.core.PersistentTreeMap = function(comp, tree, cnt, meta, __hash) {
|
|
this.comp = comp;
|
|
this.tree = tree;
|
|
this.cnt = cnt;
|
|
this.meta = meta;
|
|
this.__hash = __hash;
|
|
this.cljs$lang$protocol_mask$partition1$ = 0;
|
|
this.cljs$lang$protocol_mask$partition0$ = 418776847
|
|
};
|
|
cljs.core.PersistentTreeMap.cljs$lang$type = true;
|
|
cljs.core.PersistentTreeMap.cljs$lang$ctorStr = "cljs.core/PersistentTreeMap";
|
|
cljs.core.PersistentTreeMap.cljs$lang$ctorPrWriter = function(this__2847__auto__, writer__2848__auto__, opt__2849__auto__) {
|
|
return cljs.core._write.call(null, writer__2848__auto__, "cljs.core/PersistentTreeMap")
|
|
};
|
|
cljs.core.PersistentTreeMap.prototype.cljs$core$IHash$_hash$arity$1 = function(coll) {
|
|
var self__ = this;
|
|
var h__2732__auto__ = self__.__hash;
|
|
if(!(h__2732__auto__ == null)) {
|
|
return h__2732__auto__
|
|
}else {
|
|
var h__2732__auto____$1 = cljs.core.hash_imap.call(null, coll);
|
|
self__.__hash = h__2732__auto____$1;
|
|
return h__2732__auto____$1
|
|
}
|
|
};
|
|
cljs.core.PersistentTreeMap.prototype.cljs$core$ILookup$_lookup$arity$2 = function(coll, k) {
|
|
var self__ = this;
|
|
return coll.cljs$core$ILookup$_lookup$arity$3(coll, k, null)
|
|
};
|
|
cljs.core.PersistentTreeMap.prototype.cljs$core$ILookup$_lookup$arity$3 = function(coll, k, not_found) {
|
|
var self__ = this;
|
|
var n = coll.entry_at(k);
|
|
if(!(n == null)) {
|
|
return n.val
|
|
}else {
|
|
return not_found
|
|
}
|
|
};
|
|
cljs.core.PersistentTreeMap.prototype.cljs$core$IAssociative$_assoc$arity$3 = function(coll, k, v) {
|
|
var self__ = this;
|
|
var found = [null];
|
|
var t = cljs.core.tree_map_add.call(null, self__.comp, self__.tree, k, v, found);
|
|
if(t == null) {
|
|
var found_node = cljs.core.nth.call(null, found, 0);
|
|
if(cljs.core._EQ_.call(null, v, found_node.val)) {
|
|
return coll
|
|
}else {
|
|
return new cljs.core.PersistentTreeMap(self__.comp, cljs.core.tree_map_replace.call(null, self__.comp, self__.tree, k, v), self__.cnt, self__.meta, null)
|
|
}
|
|
}else {
|
|
return new cljs.core.PersistentTreeMap(self__.comp, t.blacken(), self__.cnt + 1, self__.meta, null)
|
|
}
|
|
};
|
|
cljs.core.PersistentTreeMap.prototype.cljs$core$IAssociative$_contains_key_QMARK_$arity$2 = function(coll, k) {
|
|
var self__ = this;
|
|
return!(coll.entry_at(k) == null)
|
|
};
|
|
cljs.core.PersistentTreeMap.prototype.call = function() {
|
|
var G__14037 = null;
|
|
var G__14037__2 = function(self__, k) {
|
|
var self__ = this;
|
|
var self____$1 = this;
|
|
var coll = self____$1;
|
|
return coll.cljs$core$ILookup$_lookup$arity$2(coll, k)
|
|
};
|
|
var G__14037__3 = function(self__, k, not_found) {
|
|
var self__ = this;
|
|
var self____$1 = this;
|
|
var coll = self____$1;
|
|
return coll.cljs$core$ILookup$_lookup$arity$3(coll, k, not_found)
|
|
};
|
|
G__14037 = function(self__, k, not_found) {
|
|
switch(arguments.length) {
|
|
case 2:
|
|
return G__14037__2.call(this, self__, k);
|
|
case 3:
|
|
return G__14037__3.call(this, self__, k, not_found)
|
|
}
|
|
throw new Error("Invalid arity: " + arguments.length);
|
|
};
|
|
return G__14037
|
|
}();
|
|
cljs.core.PersistentTreeMap.prototype.apply = function(self__, args14036) {
|
|
var self__ = this;
|
|
return self__.call.apply(self__, [self__].concat(args14036.slice()))
|
|
};
|
|
cljs.core.PersistentTreeMap.prototype.cljs$core$IKVReduce$_kv_reduce$arity$3 = function(coll, f, init) {
|
|
var self__ = this;
|
|
if(!(self__.tree == null)) {
|
|
return cljs.core.tree_map_kv_reduce.call(null, self__.tree, f, init)
|
|
}else {
|
|
return init
|
|
}
|
|
};
|
|
cljs.core.PersistentTreeMap.prototype.cljs$core$ICollection$_conj$arity$2 = function(coll, entry) {
|
|
var self__ = this;
|
|
if(cljs.core.vector_QMARK_.call(null, entry)) {
|
|
return coll.cljs$core$IAssociative$_assoc$arity$3(coll, cljs.core._nth.call(null, entry, 0), cljs.core._nth.call(null, entry, 1))
|
|
}else {
|
|
return cljs.core.reduce.call(null, cljs.core._conj, coll, entry)
|
|
}
|
|
};
|
|
cljs.core.PersistentTreeMap.prototype.cljs$core$IReversible$_rseq$arity$1 = function(coll) {
|
|
var self__ = this;
|
|
if(self__.cnt > 0) {
|
|
return cljs.core.create_tree_map_seq.call(null, self__.tree, false, self__.cnt)
|
|
}else {
|
|
return null
|
|
}
|
|
};
|
|
cljs.core.PersistentTreeMap.prototype.entry_at = function(k) {
|
|
var self__ = this;
|
|
var coll = this;
|
|
var t = self__.tree;
|
|
while(true) {
|
|
if(!(t == null)) {
|
|
var c = self__.comp.call(null, k, t.key);
|
|
if(c === 0) {
|
|
return t
|
|
}else {
|
|
if(c < 0) {
|
|
var G__14038 = t.left;
|
|
t = G__14038;
|
|
continue
|
|
}else {
|
|
if("\ufdd0:else") {
|
|
var G__14039 = t.right;
|
|
t = G__14039;
|
|
continue
|
|
}else {
|
|
return null
|
|
}
|
|
}
|
|
}
|
|
}else {
|
|
return null
|
|
}
|
|
break
|
|
}
|
|
};
|
|
cljs.core.PersistentTreeMap.prototype.cljs$core$ISorted$_sorted_seq$arity$2 = function(coll, ascending_QMARK_) {
|
|
var self__ = this;
|
|
if(self__.cnt > 0) {
|
|
return cljs.core.create_tree_map_seq.call(null, self__.tree, ascending_QMARK_, self__.cnt)
|
|
}else {
|
|
return null
|
|
}
|
|
};
|
|
cljs.core.PersistentTreeMap.prototype.cljs$core$ISorted$_sorted_seq_from$arity$3 = function(coll, k, ascending_QMARK_) {
|
|
var self__ = this;
|
|
if(self__.cnt > 0) {
|
|
var stack = null;
|
|
var t = self__.tree;
|
|
while(true) {
|
|
if(!(t == null)) {
|
|
var c = self__.comp.call(null, k, t.key);
|
|
if(c === 0) {
|
|
return new cljs.core.PersistentTreeMapSeq(null, cljs.core.conj.call(null, stack, t), ascending_QMARK_, -1, null)
|
|
}else {
|
|
if(cljs.core.truth_(ascending_QMARK_)) {
|
|
if(c < 0) {
|
|
var G__14040 = cljs.core.conj.call(null, stack, t);
|
|
var G__14041 = t.left;
|
|
stack = G__14040;
|
|
t = G__14041;
|
|
continue
|
|
}else {
|
|
var G__14042 = stack;
|
|
var G__14043 = t.right;
|
|
stack = G__14042;
|
|
t = G__14043;
|
|
continue
|
|
}
|
|
}else {
|
|
if("\ufdd0:else") {
|
|
if(c > 0) {
|
|
var G__14044 = cljs.core.conj.call(null, stack, t);
|
|
var G__14045 = t.right;
|
|
stack = G__14044;
|
|
t = G__14045;
|
|
continue
|
|
}else {
|
|
var G__14046 = stack;
|
|
var G__14047 = t.left;
|
|
stack = G__14046;
|
|
t = G__14047;
|
|
continue
|
|
}
|
|
}else {
|
|
return null
|
|
}
|
|
}
|
|
}
|
|
}else {
|
|
if(stack == null) {
|
|
return null
|
|
}else {
|
|
return new cljs.core.PersistentTreeMapSeq(null, stack, ascending_QMARK_, -1, null)
|
|
}
|
|
}
|
|
break
|
|
}
|
|
}else {
|
|
return null
|
|
}
|
|
};
|
|
cljs.core.PersistentTreeMap.prototype.cljs$core$ISorted$_entry_key$arity$2 = function(coll, entry) {
|
|
var self__ = this;
|
|
return cljs.core.key.call(null, entry)
|
|
};
|
|
cljs.core.PersistentTreeMap.prototype.cljs$core$ISorted$_comparator$arity$1 = function(coll) {
|
|
var self__ = this;
|
|
return self__.comp
|
|
};
|
|
cljs.core.PersistentTreeMap.prototype.cljs$core$ISeqable$_seq$arity$1 = function(coll) {
|
|
var self__ = this;
|
|
if(self__.cnt > 0) {
|
|
return cljs.core.create_tree_map_seq.call(null, self__.tree, true, self__.cnt)
|
|
}else {
|
|
return null
|
|
}
|
|
};
|
|
cljs.core.PersistentTreeMap.prototype.cljs$core$ICounted$_count$arity$1 = function(coll) {
|
|
var self__ = this;
|
|
return self__.cnt
|
|
};
|
|
cljs.core.PersistentTreeMap.prototype.cljs$core$IEquiv$_equiv$arity$2 = function(coll, other) {
|
|
var self__ = this;
|
|
return cljs.core.equiv_map.call(null, coll, other)
|
|
};
|
|
cljs.core.PersistentTreeMap.prototype.cljs$core$IWithMeta$_with_meta$arity$2 = function(coll, meta__$1) {
|
|
var self__ = this;
|
|
return new cljs.core.PersistentTreeMap(self__.comp, self__.tree, self__.cnt, meta__$1, self__.__hash)
|
|
};
|
|
cljs.core.PersistentTreeMap.prototype.cljs$core$IMeta$_meta$arity$1 = function(coll) {
|
|
var self__ = this;
|
|
return self__.meta
|
|
};
|
|
cljs.core.PersistentTreeMap.prototype.cljs$core$IEmptyableCollection$_empty$arity$1 = function(coll) {
|
|
var self__ = this;
|
|
return cljs.core.with_meta.call(null, cljs.core.PersistentTreeMap.EMPTY, self__.meta)
|
|
};
|
|
cljs.core.PersistentTreeMap.prototype.cljs$core$IMap$_dissoc$arity$2 = function(coll, k) {
|
|
var self__ = this;
|
|
var found = [null];
|
|
var t = cljs.core.tree_map_remove.call(null, self__.comp, self__.tree, k, found);
|
|
if(t == null) {
|
|
if(cljs.core.nth.call(null, found, 0) == null) {
|
|
return coll
|
|
}else {
|
|
return new cljs.core.PersistentTreeMap(self__.comp, null, 0, self__.meta, null)
|
|
}
|
|
}else {
|
|
return new cljs.core.PersistentTreeMap(self__.comp, t.blacken(), self__.cnt - 1, self__.meta, null)
|
|
}
|
|
};
|
|
cljs.core.__GT_PersistentTreeMap = function __GT_PersistentTreeMap(comp, tree, cnt, meta, __hash) {
|
|
return new cljs.core.PersistentTreeMap(comp, tree, cnt, meta, __hash)
|
|
};
|
|
cljs.core.PersistentTreeMap.EMPTY = new cljs.core.PersistentTreeMap(cljs.core.compare, null, 0, null, 0);
|
|
cljs.core.hash_map = function() {
|
|
var hash_map__delegate = function(keyvals) {
|
|
var in$ = cljs.core.seq.call(null, keyvals);
|
|
var out = cljs.core.transient$.call(null, cljs.core.PersistentHashMap.EMPTY);
|
|
while(true) {
|
|
if(in$) {
|
|
var G__14048 = cljs.core.nnext.call(null, in$);
|
|
var G__14049 = cljs.core.assoc_BANG_.call(null, out, cljs.core.first.call(null, in$), cljs.core.second.call(null, in$));
|
|
in$ = G__14048;
|
|
out = G__14049;
|
|
continue
|
|
}else {
|
|
return cljs.core.persistent_BANG_.call(null, out)
|
|
}
|
|
break
|
|
}
|
|
};
|
|
var hash_map = function(var_args) {
|
|
var keyvals = null;
|
|
if(arguments.length > 0) {
|
|
keyvals = cljs.core.array_seq(Array.prototype.slice.call(arguments, 0), 0)
|
|
}
|
|
return hash_map__delegate.call(this, keyvals)
|
|
};
|
|
hash_map.cljs$lang$maxFixedArity = 0;
|
|
hash_map.cljs$lang$applyTo = function(arglist__14050) {
|
|
var keyvals = cljs.core.seq(arglist__14050);
|
|
return hash_map__delegate(keyvals)
|
|
};
|
|
hash_map.cljs$core$IFn$_invoke$arity$variadic = hash_map__delegate;
|
|
return hash_map
|
|
}();
|
|
cljs.core.array_map = function() {
|
|
var array_map__delegate = function(keyvals) {
|
|
return new cljs.core.PersistentArrayMap(null, cljs.core.quot.call(null, cljs.core.count.call(null, keyvals), 2), cljs.core.apply.call(null, cljs.core.array, keyvals), null)
|
|
};
|
|
var array_map = function(var_args) {
|
|
var keyvals = null;
|
|
if(arguments.length > 0) {
|
|
keyvals = cljs.core.array_seq(Array.prototype.slice.call(arguments, 0), 0)
|
|
}
|
|
return array_map__delegate.call(this, keyvals)
|
|
};
|
|
array_map.cljs$lang$maxFixedArity = 0;
|
|
array_map.cljs$lang$applyTo = function(arglist__14051) {
|
|
var keyvals = cljs.core.seq(arglist__14051);
|
|
return array_map__delegate(keyvals)
|
|
};
|
|
array_map.cljs$core$IFn$_invoke$arity$variadic = array_map__delegate;
|
|
return array_map
|
|
}();
|
|
cljs.core.obj_map = function() {
|
|
var obj_map__delegate = function(keyvals) {
|
|
var ks = [];
|
|
var obj = {};
|
|
var kvs = cljs.core.seq.call(null, keyvals);
|
|
while(true) {
|
|
if(kvs) {
|
|
ks.push(cljs.core.first.call(null, kvs));
|
|
obj[cljs.core.first.call(null, kvs)] = cljs.core.second.call(null, kvs);
|
|
var G__14052 = cljs.core.nnext.call(null, kvs);
|
|
kvs = G__14052;
|
|
continue
|
|
}else {
|
|
return cljs.core.ObjMap.fromObject.call(null, ks, obj)
|
|
}
|
|
break
|
|
}
|
|
};
|
|
var obj_map = function(var_args) {
|
|
var keyvals = null;
|
|
if(arguments.length > 0) {
|
|
keyvals = cljs.core.array_seq(Array.prototype.slice.call(arguments, 0), 0)
|
|
}
|
|
return obj_map__delegate.call(this, keyvals)
|
|
};
|
|
obj_map.cljs$lang$maxFixedArity = 0;
|
|
obj_map.cljs$lang$applyTo = function(arglist__14053) {
|
|
var keyvals = cljs.core.seq(arglist__14053);
|
|
return obj_map__delegate(keyvals)
|
|
};
|
|
obj_map.cljs$core$IFn$_invoke$arity$variadic = obj_map__delegate;
|
|
return obj_map
|
|
}();
|
|
cljs.core.sorted_map = function() {
|
|
var sorted_map__delegate = function(keyvals) {
|
|
var in$ = cljs.core.seq.call(null, keyvals);
|
|
var out = cljs.core.PersistentTreeMap.EMPTY;
|
|
while(true) {
|
|
if(in$) {
|
|
var G__14054 = cljs.core.nnext.call(null, in$);
|
|
var G__14055 = cljs.core.assoc.call(null, out, cljs.core.first.call(null, in$), cljs.core.second.call(null, in$));
|
|
in$ = G__14054;
|
|
out = G__14055;
|
|
continue
|
|
}else {
|
|
return out
|
|
}
|
|
break
|
|
}
|
|
};
|
|
var sorted_map = function(var_args) {
|
|
var keyvals = null;
|
|
if(arguments.length > 0) {
|
|
keyvals = cljs.core.array_seq(Array.prototype.slice.call(arguments, 0), 0)
|
|
}
|
|
return sorted_map__delegate.call(this, keyvals)
|
|
};
|
|
sorted_map.cljs$lang$maxFixedArity = 0;
|
|
sorted_map.cljs$lang$applyTo = function(arglist__14056) {
|
|
var keyvals = cljs.core.seq(arglist__14056);
|
|
return sorted_map__delegate(keyvals)
|
|
};
|
|
sorted_map.cljs$core$IFn$_invoke$arity$variadic = sorted_map__delegate;
|
|
return sorted_map
|
|
}();
|
|
cljs.core.sorted_map_by = function() {
|
|
var sorted_map_by__delegate = function(comparator, keyvals) {
|
|
var in$ = cljs.core.seq.call(null, keyvals);
|
|
var out = new cljs.core.PersistentTreeMap(cljs.core.fn__GT_comparator.call(null, comparator), null, 0, null, 0);
|
|
while(true) {
|
|
if(in$) {
|
|
var G__14057 = cljs.core.nnext.call(null, in$);
|
|
var G__14058 = cljs.core.assoc.call(null, out, cljs.core.first.call(null, in$), cljs.core.second.call(null, in$));
|
|
in$ = G__14057;
|
|
out = G__14058;
|
|
continue
|
|
}else {
|
|
return out
|
|
}
|
|
break
|
|
}
|
|
};
|
|
var sorted_map_by = function(comparator, var_args) {
|
|
var keyvals = null;
|
|
if(arguments.length > 1) {
|
|
keyvals = cljs.core.array_seq(Array.prototype.slice.call(arguments, 1), 0)
|
|
}
|
|
return sorted_map_by__delegate.call(this, comparator, keyvals)
|
|
};
|
|
sorted_map_by.cljs$lang$maxFixedArity = 1;
|
|
sorted_map_by.cljs$lang$applyTo = function(arglist__14059) {
|
|
var comparator = cljs.core.first(arglist__14059);
|
|
var keyvals = cljs.core.rest(arglist__14059);
|
|
return sorted_map_by__delegate(comparator, keyvals)
|
|
};
|
|
sorted_map_by.cljs$core$IFn$_invoke$arity$variadic = sorted_map_by__delegate;
|
|
return sorted_map_by
|
|
}();
|
|
goog.provide("cljs.core.KeySeq");
|
|
cljs.core.KeySeq = function(mseq, _meta) {
|
|
this.mseq = mseq;
|
|
this._meta = _meta;
|
|
this.cljs$lang$protocol_mask$partition1$ = 0;
|
|
this.cljs$lang$protocol_mask$partition0$ = 31850700
|
|
};
|
|
cljs.core.KeySeq.cljs$lang$type = true;
|
|
cljs.core.KeySeq.cljs$lang$ctorStr = "cljs.core/KeySeq";
|
|
cljs.core.KeySeq.cljs$lang$ctorPrWriter = function(this__2847__auto__, writer__2848__auto__, opt__2849__auto__) {
|
|
return cljs.core._write.call(null, writer__2848__auto__, "cljs.core/KeySeq")
|
|
};
|
|
cljs.core.KeySeq.prototype.cljs$core$IHash$_hash$arity$1 = function(coll) {
|
|
var self__ = this;
|
|
return cljs.core.hash_coll.call(null, coll)
|
|
};
|
|
cljs.core.KeySeq.prototype.cljs$core$INext$_next$arity$1 = function(coll) {
|
|
var self__ = this;
|
|
var nseq = function() {
|
|
var G__14060 = self__.mseq;
|
|
if(G__14060) {
|
|
if(function() {
|
|
var or__3943__auto__ = G__14060.cljs$lang$protocol_mask$partition0$ & 128;
|
|
if(or__3943__auto__) {
|
|
return or__3943__auto__
|
|
}else {
|
|
return G__14060.cljs$core$INext$
|
|
}
|
|
}()) {
|
|
return true
|
|
}else {
|
|
if(!G__14060.cljs$lang$protocol_mask$partition0$) {
|
|
return cljs.core.type_satisfies_.call(null, cljs.core.INext, G__14060)
|
|
}else {
|
|
return false
|
|
}
|
|
}
|
|
}else {
|
|
return cljs.core.type_satisfies_.call(null, cljs.core.INext, G__14060)
|
|
}
|
|
}() ? cljs.core._next.call(null, self__.mseq) : cljs.core.next.call(null, self__.mseq);
|
|
if(nseq == null) {
|
|
return null
|
|
}else {
|
|
return new cljs.core.KeySeq(nseq, self__._meta)
|
|
}
|
|
};
|
|
cljs.core.KeySeq.prototype.cljs$core$ICollection$_conj$arity$2 = function(coll, o) {
|
|
var self__ = this;
|
|
return cljs.core.cons.call(null, o, coll)
|
|
};
|
|
cljs.core.KeySeq.prototype.toString = function() {
|
|
var self__ = this;
|
|
var coll = this;
|
|
return cljs.core.pr_str_STAR_.call(null, coll)
|
|
};
|
|
cljs.core.KeySeq.prototype.cljs$core$ISeqable$_seq$arity$1 = function(coll) {
|
|
var self__ = this;
|
|
return coll
|
|
};
|
|
cljs.core.KeySeq.prototype.cljs$core$ISeq$_first$arity$1 = function(coll) {
|
|
var self__ = this;
|
|
var me = cljs.core._first.call(null, self__.mseq);
|
|
return cljs.core._key.call(null, me)
|
|
};
|
|
cljs.core.KeySeq.prototype.cljs$core$ISeq$_rest$arity$1 = function(coll) {
|
|
var self__ = this;
|
|
var nseq = function() {
|
|
var G__14061 = self__.mseq;
|
|
if(G__14061) {
|
|
if(function() {
|
|
var or__3943__auto__ = G__14061.cljs$lang$protocol_mask$partition0$ & 128;
|
|
if(or__3943__auto__) {
|
|
return or__3943__auto__
|
|
}else {
|
|
return G__14061.cljs$core$INext$
|
|
}
|
|
}()) {
|
|
return true
|
|
}else {
|
|
if(!G__14061.cljs$lang$protocol_mask$partition0$) {
|
|
return cljs.core.type_satisfies_.call(null, cljs.core.INext, G__14061)
|
|
}else {
|
|
return false
|
|
}
|
|
}
|
|
}else {
|
|
return cljs.core.type_satisfies_.call(null, cljs.core.INext, G__14061)
|
|
}
|
|
}() ? cljs.core._next.call(null, self__.mseq) : cljs.core.next.call(null, self__.mseq);
|
|
if(!(nseq == null)) {
|
|
return new cljs.core.KeySeq(nseq, self__._meta)
|
|
}else {
|
|
return cljs.core.List.EMPTY
|
|
}
|
|
};
|
|
cljs.core.KeySeq.prototype.cljs$core$IEquiv$_equiv$arity$2 = function(coll, other) {
|
|
var self__ = this;
|
|
return cljs.core.equiv_sequential.call(null, coll, other)
|
|
};
|
|
cljs.core.KeySeq.prototype.cljs$core$IWithMeta$_with_meta$arity$2 = function(coll, new_meta) {
|
|
var self__ = this;
|
|
return new cljs.core.KeySeq(self__.mseq, new_meta)
|
|
};
|
|
cljs.core.KeySeq.prototype.cljs$core$IMeta$_meta$arity$1 = function(coll) {
|
|
var self__ = this;
|
|
return self__._meta
|
|
};
|
|
cljs.core.KeySeq.prototype.cljs$core$IEmptyableCollection$_empty$arity$1 = function(coll) {
|
|
var self__ = this;
|
|
return cljs.core.with_meta.call(null, cljs.core.List.EMPTY, self__._meta)
|
|
};
|
|
cljs.core.__GT_KeySeq = function __GT_KeySeq(mseq, _meta) {
|
|
return new cljs.core.KeySeq(mseq, _meta)
|
|
};
|
|
cljs.core.keys = function keys(hash_map) {
|
|
var temp__4092__auto__ = cljs.core.seq.call(null, hash_map);
|
|
if(temp__4092__auto__) {
|
|
var mseq = temp__4092__auto__;
|
|
return new cljs.core.KeySeq(mseq, null)
|
|
}else {
|
|
return null
|
|
}
|
|
};
|
|
cljs.core.key = function key(map_entry) {
|
|
return cljs.core._key.call(null, map_entry)
|
|
};
|
|
goog.provide("cljs.core.ValSeq");
|
|
cljs.core.ValSeq = function(mseq, _meta) {
|
|
this.mseq = mseq;
|
|
this._meta = _meta;
|
|
this.cljs$lang$protocol_mask$partition1$ = 0;
|
|
this.cljs$lang$protocol_mask$partition0$ = 31850700
|
|
};
|
|
cljs.core.ValSeq.cljs$lang$type = true;
|
|
cljs.core.ValSeq.cljs$lang$ctorStr = "cljs.core/ValSeq";
|
|
cljs.core.ValSeq.cljs$lang$ctorPrWriter = function(this__2847__auto__, writer__2848__auto__, opt__2849__auto__) {
|
|
return cljs.core._write.call(null, writer__2848__auto__, "cljs.core/ValSeq")
|
|
};
|
|
cljs.core.ValSeq.prototype.cljs$core$IHash$_hash$arity$1 = function(coll) {
|
|
var self__ = this;
|
|
return cljs.core.hash_coll.call(null, coll)
|
|
};
|
|
cljs.core.ValSeq.prototype.cljs$core$INext$_next$arity$1 = function(coll) {
|
|
var self__ = this;
|
|
var nseq = function() {
|
|
var G__14062 = self__.mseq;
|
|
if(G__14062) {
|
|
if(function() {
|
|
var or__3943__auto__ = G__14062.cljs$lang$protocol_mask$partition0$ & 128;
|
|
if(or__3943__auto__) {
|
|
return or__3943__auto__
|
|
}else {
|
|
return G__14062.cljs$core$INext$
|
|
}
|
|
}()) {
|
|
return true
|
|
}else {
|
|
if(!G__14062.cljs$lang$protocol_mask$partition0$) {
|
|
return cljs.core.type_satisfies_.call(null, cljs.core.INext, G__14062)
|
|
}else {
|
|
return false
|
|
}
|
|
}
|
|
}else {
|
|
return cljs.core.type_satisfies_.call(null, cljs.core.INext, G__14062)
|
|
}
|
|
}() ? cljs.core._next.call(null, self__.mseq) : cljs.core.next.call(null, self__.mseq);
|
|
if(nseq == null) {
|
|
return null
|
|
}else {
|
|
return new cljs.core.ValSeq(nseq, self__._meta)
|
|
}
|
|
};
|
|
cljs.core.ValSeq.prototype.cljs$core$ICollection$_conj$arity$2 = function(coll, o) {
|
|
var self__ = this;
|
|
return cljs.core.cons.call(null, o, coll)
|
|
};
|
|
cljs.core.ValSeq.prototype.toString = function() {
|
|
var self__ = this;
|
|
var coll = this;
|
|
return cljs.core.pr_str_STAR_.call(null, coll)
|
|
};
|
|
cljs.core.ValSeq.prototype.cljs$core$ISeqable$_seq$arity$1 = function(coll) {
|
|
var self__ = this;
|
|
return coll
|
|
};
|
|
cljs.core.ValSeq.prototype.cljs$core$ISeq$_first$arity$1 = function(coll) {
|
|
var self__ = this;
|
|
var me = cljs.core._first.call(null, self__.mseq);
|
|
return cljs.core._val.call(null, me)
|
|
};
|
|
cljs.core.ValSeq.prototype.cljs$core$ISeq$_rest$arity$1 = function(coll) {
|
|
var self__ = this;
|
|
var nseq = function() {
|
|
var G__14063 = self__.mseq;
|
|
if(G__14063) {
|
|
if(function() {
|
|
var or__3943__auto__ = G__14063.cljs$lang$protocol_mask$partition0$ & 128;
|
|
if(or__3943__auto__) {
|
|
return or__3943__auto__
|
|
}else {
|
|
return G__14063.cljs$core$INext$
|
|
}
|
|
}()) {
|
|
return true
|
|
}else {
|
|
if(!G__14063.cljs$lang$protocol_mask$partition0$) {
|
|
return cljs.core.type_satisfies_.call(null, cljs.core.INext, G__14063)
|
|
}else {
|
|
return false
|
|
}
|
|
}
|
|
}else {
|
|
return cljs.core.type_satisfies_.call(null, cljs.core.INext, G__14063)
|
|
}
|
|
}() ? cljs.core._next.call(null, self__.mseq) : cljs.core.next.call(null, self__.mseq);
|
|
if(!(nseq == null)) {
|
|
return new cljs.core.ValSeq(nseq, self__._meta)
|
|
}else {
|
|
return cljs.core.List.EMPTY
|
|
}
|
|
};
|
|
cljs.core.ValSeq.prototype.cljs$core$IEquiv$_equiv$arity$2 = function(coll, other) {
|
|
var self__ = this;
|
|
return cljs.core.equiv_sequential.call(null, coll, other)
|
|
};
|
|
cljs.core.ValSeq.prototype.cljs$core$IWithMeta$_with_meta$arity$2 = function(coll, new_meta) {
|
|
var self__ = this;
|
|
return new cljs.core.ValSeq(self__.mseq, new_meta)
|
|
};
|
|
cljs.core.ValSeq.prototype.cljs$core$IMeta$_meta$arity$1 = function(coll) {
|
|
var self__ = this;
|
|
return self__._meta
|
|
};
|
|
cljs.core.ValSeq.prototype.cljs$core$IEmptyableCollection$_empty$arity$1 = function(coll) {
|
|
var self__ = this;
|
|
return cljs.core.with_meta.call(null, cljs.core.List.EMPTY, self__._meta)
|
|
};
|
|
cljs.core.__GT_ValSeq = function __GT_ValSeq(mseq, _meta) {
|
|
return new cljs.core.ValSeq(mseq, _meta)
|
|
};
|
|
cljs.core.vals = function vals(hash_map) {
|
|
var temp__4092__auto__ = cljs.core.seq.call(null, hash_map);
|
|
if(temp__4092__auto__) {
|
|
var mseq = temp__4092__auto__;
|
|
return new cljs.core.ValSeq(mseq, null)
|
|
}else {
|
|
return null
|
|
}
|
|
};
|
|
cljs.core.val = function val(map_entry) {
|
|
return cljs.core._val.call(null, map_entry)
|
|
};
|
|
cljs.core.merge = function() {
|
|
var merge__delegate = function(maps) {
|
|
if(cljs.core.truth_(cljs.core.some.call(null, cljs.core.identity, maps))) {
|
|
return cljs.core.reduce.call(null, function(p1__14064_SHARP_, p2__14065_SHARP_) {
|
|
return cljs.core.conj.call(null, function() {
|
|
var or__3943__auto__ = p1__14064_SHARP_;
|
|
if(cljs.core.truth_(or__3943__auto__)) {
|
|
return or__3943__auto__
|
|
}else {
|
|
return cljs.core.PersistentArrayMap.EMPTY
|
|
}
|
|
}(), p2__14065_SHARP_)
|
|
}, maps)
|
|
}else {
|
|
return null
|
|
}
|
|
};
|
|
var merge = function(var_args) {
|
|
var maps = null;
|
|
if(arguments.length > 0) {
|
|
maps = cljs.core.array_seq(Array.prototype.slice.call(arguments, 0), 0)
|
|
}
|
|
return merge__delegate.call(this, maps)
|
|
};
|
|
merge.cljs$lang$maxFixedArity = 0;
|
|
merge.cljs$lang$applyTo = function(arglist__14066) {
|
|
var maps = cljs.core.seq(arglist__14066);
|
|
return merge__delegate(maps)
|
|
};
|
|
merge.cljs$core$IFn$_invoke$arity$variadic = merge__delegate;
|
|
return merge
|
|
}();
|
|
cljs.core.merge_with = function() {
|
|
var merge_with__delegate = function(f, maps) {
|
|
if(cljs.core.truth_(cljs.core.some.call(null, cljs.core.identity, maps))) {
|
|
var merge_entry = function(m, e) {
|
|
var k = cljs.core.first.call(null, e);
|
|
var v = cljs.core.second.call(null, e);
|
|
if(cljs.core.contains_QMARK_.call(null, m, k)) {
|
|
return cljs.core.assoc.call(null, m, k, f.call(null, cljs.core.get.call(null, m, k), v))
|
|
}else {
|
|
return cljs.core.assoc.call(null, m, k, v)
|
|
}
|
|
};
|
|
var merge2 = function(merge_entry) {
|
|
return function(m1, m2) {
|
|
return cljs.core.reduce.call(null, merge_entry, function() {
|
|
var or__3943__auto__ = m1;
|
|
if(cljs.core.truth_(or__3943__auto__)) {
|
|
return or__3943__auto__
|
|
}else {
|
|
return cljs.core.PersistentArrayMap.EMPTY
|
|
}
|
|
}(), cljs.core.seq.call(null, m2))
|
|
}
|
|
}(merge_entry);
|
|
return cljs.core.reduce.call(null, merge2, maps)
|
|
}else {
|
|
return null
|
|
}
|
|
};
|
|
var merge_with = function(f, var_args) {
|
|
var maps = null;
|
|
if(arguments.length > 1) {
|
|
maps = cljs.core.array_seq(Array.prototype.slice.call(arguments, 1), 0)
|
|
}
|
|
return merge_with__delegate.call(this, f, maps)
|
|
};
|
|
merge_with.cljs$lang$maxFixedArity = 1;
|
|
merge_with.cljs$lang$applyTo = function(arglist__14067) {
|
|
var f = cljs.core.first(arglist__14067);
|
|
var maps = cljs.core.rest(arglist__14067);
|
|
return merge_with__delegate(f, maps)
|
|
};
|
|
merge_with.cljs$core$IFn$_invoke$arity$variadic = merge_with__delegate;
|
|
return merge_with
|
|
}();
|
|
cljs.core.select_keys = function select_keys(map, keyseq) {
|
|
var ret = cljs.core.PersistentArrayMap.EMPTY;
|
|
var keys = cljs.core.seq.call(null, keyseq);
|
|
while(true) {
|
|
if(keys) {
|
|
var key = cljs.core.first.call(null, keys);
|
|
var entry = cljs.core.get.call(null, map, key, "\ufdd0:cljs.core/not-found");
|
|
var G__14068 = cljs.core.not_EQ_.call(null, entry, "\ufdd0:cljs.core/not-found") ? cljs.core.assoc.call(null, ret, key, entry) : ret;
|
|
var G__14069 = cljs.core.next.call(null, keys);
|
|
ret = G__14068;
|
|
keys = G__14069;
|
|
continue
|
|
}else {
|
|
return ret
|
|
}
|
|
break
|
|
}
|
|
};
|
|
goog.provide("cljs.core.PersistentHashSet");
|
|
cljs.core.PersistentHashSet = function(meta, hash_map, __hash) {
|
|
this.meta = meta;
|
|
this.hash_map = hash_map;
|
|
this.__hash = __hash;
|
|
this.cljs$lang$protocol_mask$partition1$ = 4;
|
|
this.cljs$lang$protocol_mask$partition0$ = 15077647
|
|
};
|
|
cljs.core.PersistentHashSet.cljs$lang$type = true;
|
|
cljs.core.PersistentHashSet.cljs$lang$ctorStr = "cljs.core/PersistentHashSet";
|
|
cljs.core.PersistentHashSet.cljs$lang$ctorPrWriter = function(this__2847__auto__, writer__2848__auto__, opt__2849__auto__) {
|
|
return cljs.core._write.call(null, writer__2848__auto__, "cljs.core/PersistentHashSet")
|
|
};
|
|
cljs.core.PersistentHashSet.prototype.cljs$core$IEditableCollection$_as_transient$arity$1 = function(coll) {
|
|
var self__ = this;
|
|
return new cljs.core.TransientHashSet(cljs.core._as_transient.call(null, self__.hash_map))
|
|
};
|
|
cljs.core.PersistentHashSet.prototype.cljs$core$IHash$_hash$arity$1 = function(coll) {
|
|
var self__ = this;
|
|
var h__2732__auto__ = self__.__hash;
|
|
if(!(h__2732__auto__ == null)) {
|
|
return h__2732__auto__
|
|
}else {
|
|
var h__2732__auto____$1 = cljs.core.hash_iset.call(null, coll);
|
|
self__.__hash = h__2732__auto____$1;
|
|
return h__2732__auto____$1
|
|
}
|
|
};
|
|
cljs.core.PersistentHashSet.prototype.cljs$core$ILookup$_lookup$arity$2 = function(coll, v) {
|
|
var self__ = this;
|
|
return coll.cljs$core$ILookup$_lookup$arity$3(coll, v, null)
|
|
};
|
|
cljs.core.PersistentHashSet.prototype.cljs$core$ILookup$_lookup$arity$3 = function(coll, v, not_found) {
|
|
var self__ = this;
|
|
if(cljs.core.truth_(cljs.core._contains_key_QMARK_.call(null, self__.hash_map, v))) {
|
|
return v
|
|
}else {
|
|
return not_found
|
|
}
|
|
};
|
|
cljs.core.PersistentHashSet.prototype.call = function() {
|
|
var G__14072 = null;
|
|
var G__14072__2 = function(self__, k) {
|
|
var self__ = this;
|
|
var self____$1 = this;
|
|
var coll = self____$1;
|
|
return coll.cljs$core$ILookup$_lookup$arity$2(coll, k)
|
|
};
|
|
var G__14072__3 = function(self__, k, not_found) {
|
|
var self__ = this;
|
|
var self____$1 = this;
|
|
var coll = self____$1;
|
|
return coll.cljs$core$ILookup$_lookup$arity$3(coll, k, not_found)
|
|
};
|
|
G__14072 = function(self__, k, not_found) {
|
|
switch(arguments.length) {
|
|
case 2:
|
|
return G__14072__2.call(this, self__, k);
|
|
case 3:
|
|
return G__14072__3.call(this, self__, k, not_found)
|
|
}
|
|
throw new Error("Invalid arity: " + arguments.length);
|
|
};
|
|
return G__14072
|
|
}();
|
|
cljs.core.PersistentHashSet.prototype.apply = function(self__, args14071) {
|
|
var self__ = this;
|
|
return self__.call.apply(self__, [self__].concat(args14071.slice()))
|
|
};
|
|
cljs.core.PersistentHashSet.prototype.cljs$core$ICollection$_conj$arity$2 = function(coll, o) {
|
|
var self__ = this;
|
|
return new cljs.core.PersistentHashSet(self__.meta, cljs.core.assoc.call(null, self__.hash_map, o, null), null)
|
|
};
|
|
cljs.core.PersistentHashSet.prototype.toString = function() {
|
|
var self__ = this;
|
|
var coll = this;
|
|
return cljs.core.pr_str_STAR_.call(null, coll)
|
|
};
|
|
cljs.core.PersistentHashSet.prototype.cljs$core$ISeqable$_seq$arity$1 = function(coll) {
|
|
var self__ = this;
|
|
return cljs.core.keys.call(null, self__.hash_map)
|
|
};
|
|
cljs.core.PersistentHashSet.prototype.cljs$core$ISet$_disjoin$arity$2 = function(coll, v) {
|
|
var self__ = this;
|
|
return new cljs.core.PersistentHashSet(self__.meta, cljs.core._dissoc.call(null, self__.hash_map, v), null)
|
|
};
|
|
cljs.core.PersistentHashSet.prototype.cljs$core$ICounted$_count$arity$1 = function(coll) {
|
|
var self__ = this;
|
|
return cljs.core._count.call(null, self__.hash_map)
|
|
};
|
|
cljs.core.PersistentHashSet.prototype.cljs$core$IEquiv$_equiv$arity$2 = function(coll, other) {
|
|
var self__ = this;
|
|
var and__3941__auto__ = cljs.core.set_QMARK_.call(null, other);
|
|
if(and__3941__auto__) {
|
|
var and__3941__auto____$1 = cljs.core.count.call(null, coll) === cljs.core.count.call(null, other);
|
|
if(and__3941__auto____$1) {
|
|
return cljs.core.every_QMARK_.call(null, function(p1__14070_SHARP_) {
|
|
return cljs.core.contains_QMARK_.call(null, coll, p1__14070_SHARP_)
|
|
}, other)
|
|
}else {
|
|
return and__3941__auto____$1
|
|
}
|
|
}else {
|
|
return and__3941__auto__
|
|
}
|
|
};
|
|
cljs.core.PersistentHashSet.prototype.cljs$core$IWithMeta$_with_meta$arity$2 = function(coll, meta__$1) {
|
|
var self__ = this;
|
|
return new cljs.core.PersistentHashSet(meta__$1, self__.hash_map, self__.__hash)
|
|
};
|
|
cljs.core.PersistentHashSet.prototype.cljs$core$IMeta$_meta$arity$1 = function(coll) {
|
|
var self__ = this;
|
|
return self__.meta
|
|
};
|
|
cljs.core.PersistentHashSet.prototype.cljs$core$IEmptyableCollection$_empty$arity$1 = function(coll) {
|
|
var self__ = this;
|
|
return cljs.core.with_meta.call(null, cljs.core.PersistentHashSet.EMPTY, self__.meta)
|
|
};
|
|
cljs.core.__GT_PersistentHashSet = function __GT_PersistentHashSet(meta, hash_map, __hash) {
|
|
return new cljs.core.PersistentHashSet(meta, hash_map, __hash)
|
|
};
|
|
cljs.core.PersistentHashSet.EMPTY = new cljs.core.PersistentHashSet(null, cljs.core.PersistentArrayMap.EMPTY, 0);
|
|
cljs.core.PersistentHashSet.fromArray = function(items, no_clone) {
|
|
var len = items.length;
|
|
if(len / 2 <= cljs.core.PersistentArrayMap.HASHMAP_THRESHOLD) {
|
|
var arr = no_clone ? items : items.slice();
|
|
return new cljs.core.PersistentHashSet(null, cljs.core.PersistentArrayMap.fromArray.call(null, arr, true), null)
|
|
}else {
|
|
var i = 0;
|
|
var out = cljs.core.transient$.call(null, cljs.core.PersistentHashSet.EMPTY);
|
|
while(true) {
|
|
if(i < len) {
|
|
var G__14073 = i + 2;
|
|
var G__14074 = cljs.core.conj_BANG_.call(null, out, items[i]);
|
|
i = G__14073;
|
|
out = G__14074;
|
|
continue
|
|
}else {
|
|
return cljs.core.persistent_BANG_.call(null, out)
|
|
}
|
|
break
|
|
}
|
|
}
|
|
};
|
|
goog.provide("cljs.core.TransientHashSet");
|
|
cljs.core.TransientHashSet = function(transient_map) {
|
|
this.transient_map = transient_map;
|
|
this.cljs$lang$protocol_mask$partition0$ = 259;
|
|
this.cljs$lang$protocol_mask$partition1$ = 136
|
|
};
|
|
cljs.core.TransientHashSet.cljs$lang$type = true;
|
|
cljs.core.TransientHashSet.cljs$lang$ctorStr = "cljs.core/TransientHashSet";
|
|
cljs.core.TransientHashSet.cljs$lang$ctorPrWriter = function(this__2847__auto__, writer__2848__auto__, opt__2849__auto__) {
|
|
return cljs.core._write.call(null, writer__2848__auto__, "cljs.core/TransientHashSet")
|
|
};
|
|
cljs.core.TransientHashSet.prototype.call = function() {
|
|
var G__14076 = null;
|
|
var G__14076__2 = function(self__, k) {
|
|
var self__ = this;
|
|
var self____$1 = this;
|
|
var tcoll = self____$1;
|
|
if(cljs.core._lookup.call(null, self__.transient_map, k, cljs.core.lookup_sentinel) === cljs.core.lookup_sentinel) {
|
|
return null
|
|
}else {
|
|
return k
|
|
}
|
|
};
|
|
var G__14076__3 = function(self__, k, not_found) {
|
|
var self__ = this;
|
|
var self____$1 = this;
|
|
var tcoll = self____$1;
|
|
if(cljs.core._lookup.call(null, self__.transient_map, k, cljs.core.lookup_sentinel) === cljs.core.lookup_sentinel) {
|
|
return not_found
|
|
}else {
|
|
return k
|
|
}
|
|
};
|
|
G__14076 = function(self__, k, not_found) {
|
|
switch(arguments.length) {
|
|
case 2:
|
|
return G__14076__2.call(this, self__, k);
|
|
case 3:
|
|
return G__14076__3.call(this, self__, k, not_found)
|
|
}
|
|
throw new Error("Invalid arity: " + arguments.length);
|
|
};
|
|
return G__14076
|
|
}();
|
|
cljs.core.TransientHashSet.prototype.apply = function(self__, args14075) {
|
|
var self__ = this;
|
|
return self__.call.apply(self__, [self__].concat(args14075.slice()))
|
|
};
|
|
cljs.core.TransientHashSet.prototype.cljs$core$ILookup$_lookup$arity$2 = function(tcoll, v) {
|
|
var self__ = this;
|
|
return tcoll.cljs$core$ILookup$_lookup$arity$3(tcoll, v, null)
|
|
};
|
|
cljs.core.TransientHashSet.prototype.cljs$core$ILookup$_lookup$arity$3 = function(tcoll, v, not_found) {
|
|
var self__ = this;
|
|
if(cljs.core._lookup.call(null, self__.transient_map, v, cljs.core.lookup_sentinel) === cljs.core.lookup_sentinel) {
|
|
return not_found
|
|
}else {
|
|
return v
|
|
}
|
|
};
|
|
cljs.core.TransientHashSet.prototype.cljs$core$ICounted$_count$arity$1 = function(tcoll) {
|
|
var self__ = this;
|
|
return cljs.core.count.call(null, self__.transient_map)
|
|
};
|
|
cljs.core.TransientHashSet.prototype.cljs$core$ITransientSet$_disjoin_BANG_$arity$2 = function(tcoll, v) {
|
|
var self__ = this;
|
|
self__.transient_map = cljs.core.dissoc_BANG_.call(null, self__.transient_map, v);
|
|
return tcoll
|
|
};
|
|
cljs.core.TransientHashSet.prototype.cljs$core$ITransientCollection$_conj_BANG_$arity$2 = function(tcoll, o) {
|
|
var self__ = this;
|
|
self__.transient_map = cljs.core.assoc_BANG_.call(null, self__.transient_map, o, null);
|
|
return tcoll
|
|
};
|
|
cljs.core.TransientHashSet.prototype.cljs$core$ITransientCollection$_persistent_BANG_$arity$1 = function(tcoll) {
|
|
var self__ = this;
|
|
return new cljs.core.PersistentHashSet(null, cljs.core.persistent_BANG_.call(null, self__.transient_map), null)
|
|
};
|
|
cljs.core.__GT_TransientHashSet = function __GT_TransientHashSet(transient_map) {
|
|
return new cljs.core.TransientHashSet(transient_map)
|
|
};
|
|
goog.provide("cljs.core.PersistentTreeSet");
|
|
cljs.core.PersistentTreeSet = function(meta, tree_map, __hash) {
|
|
this.meta = meta;
|
|
this.tree_map = tree_map;
|
|
this.__hash = __hash;
|
|
this.cljs$lang$protocol_mask$partition1$ = 0;
|
|
this.cljs$lang$protocol_mask$partition0$ = 417730831
|
|
};
|
|
cljs.core.PersistentTreeSet.cljs$lang$type = true;
|
|
cljs.core.PersistentTreeSet.cljs$lang$ctorStr = "cljs.core/PersistentTreeSet";
|
|
cljs.core.PersistentTreeSet.cljs$lang$ctorPrWriter = function(this__2847__auto__, writer__2848__auto__, opt__2849__auto__) {
|
|
return cljs.core._write.call(null, writer__2848__auto__, "cljs.core/PersistentTreeSet")
|
|
};
|
|
cljs.core.PersistentTreeSet.prototype.cljs$core$IHash$_hash$arity$1 = function(coll) {
|
|
var self__ = this;
|
|
var h__2732__auto__ = self__.__hash;
|
|
if(!(h__2732__auto__ == null)) {
|
|
return h__2732__auto__
|
|
}else {
|
|
var h__2732__auto____$1 = cljs.core.hash_iset.call(null, coll);
|
|
self__.__hash = h__2732__auto____$1;
|
|
return h__2732__auto____$1
|
|
}
|
|
};
|
|
cljs.core.PersistentTreeSet.prototype.cljs$core$ILookup$_lookup$arity$2 = function(coll, v) {
|
|
var self__ = this;
|
|
return coll.cljs$core$ILookup$_lookup$arity$3(coll, v, null)
|
|
};
|
|
cljs.core.PersistentTreeSet.prototype.cljs$core$ILookup$_lookup$arity$3 = function(coll, v, not_found) {
|
|
var self__ = this;
|
|
var n = self__.tree_map.entry_at(v);
|
|
if(!(n == null)) {
|
|
return n.key
|
|
}else {
|
|
return not_found
|
|
}
|
|
};
|
|
cljs.core.PersistentTreeSet.prototype.call = function() {
|
|
var G__14079 = null;
|
|
var G__14079__2 = function(self__, k) {
|
|
var self__ = this;
|
|
var self____$1 = this;
|
|
var coll = self____$1;
|
|
return coll.cljs$core$ILookup$_lookup$arity$2(coll, k)
|
|
};
|
|
var G__14079__3 = function(self__, k, not_found) {
|
|
var self__ = this;
|
|
var self____$1 = this;
|
|
var coll = self____$1;
|
|
return coll.cljs$core$ILookup$_lookup$arity$3(coll, k, not_found)
|
|
};
|
|
G__14079 = function(self__, k, not_found) {
|
|
switch(arguments.length) {
|
|
case 2:
|
|
return G__14079__2.call(this, self__, k);
|
|
case 3:
|
|
return G__14079__3.call(this, self__, k, not_found)
|
|
}
|
|
throw new Error("Invalid arity: " + arguments.length);
|
|
};
|
|
return G__14079
|
|
}();
|
|
cljs.core.PersistentTreeSet.prototype.apply = function(self__, args14078) {
|
|
var self__ = this;
|
|
return self__.call.apply(self__, [self__].concat(args14078.slice()))
|
|
};
|
|
cljs.core.PersistentTreeSet.prototype.cljs$core$ICollection$_conj$arity$2 = function(coll, o) {
|
|
var self__ = this;
|
|
return new cljs.core.PersistentTreeSet(self__.meta, cljs.core.assoc.call(null, self__.tree_map, o, null), null)
|
|
};
|
|
cljs.core.PersistentTreeSet.prototype.cljs$core$IReversible$_rseq$arity$1 = function(coll) {
|
|
var self__ = this;
|
|
return cljs.core.map.call(null, cljs.core.key, cljs.core.rseq.call(null, self__.tree_map))
|
|
};
|
|
cljs.core.PersistentTreeSet.prototype.toString = function() {
|
|
var self__ = this;
|
|
var coll = this;
|
|
return cljs.core.pr_str_STAR_.call(null, coll)
|
|
};
|
|
cljs.core.PersistentTreeSet.prototype.cljs$core$ISorted$_sorted_seq$arity$2 = function(coll, ascending_QMARK_) {
|
|
var self__ = this;
|
|
return cljs.core.map.call(null, cljs.core.key, cljs.core._sorted_seq.call(null, self__.tree_map, ascending_QMARK_))
|
|
};
|
|
cljs.core.PersistentTreeSet.prototype.cljs$core$ISorted$_sorted_seq_from$arity$3 = function(coll, k, ascending_QMARK_) {
|
|
var self__ = this;
|
|
return cljs.core.map.call(null, cljs.core.key, cljs.core._sorted_seq_from.call(null, self__.tree_map, k, ascending_QMARK_))
|
|
};
|
|
cljs.core.PersistentTreeSet.prototype.cljs$core$ISorted$_entry_key$arity$2 = function(coll, entry) {
|
|
var self__ = this;
|
|
return entry
|
|
};
|
|
cljs.core.PersistentTreeSet.prototype.cljs$core$ISorted$_comparator$arity$1 = function(coll) {
|
|
var self__ = this;
|
|
return cljs.core._comparator.call(null, self__.tree_map)
|
|
};
|
|
cljs.core.PersistentTreeSet.prototype.cljs$core$ISeqable$_seq$arity$1 = function(coll) {
|
|
var self__ = this;
|
|
return cljs.core.keys.call(null, self__.tree_map)
|
|
};
|
|
cljs.core.PersistentTreeSet.prototype.cljs$core$ISet$_disjoin$arity$2 = function(coll, v) {
|
|
var self__ = this;
|
|
return new cljs.core.PersistentTreeSet(self__.meta, cljs.core.dissoc.call(null, self__.tree_map, v), null)
|
|
};
|
|
cljs.core.PersistentTreeSet.prototype.cljs$core$ICounted$_count$arity$1 = function(coll) {
|
|
var self__ = this;
|
|
return cljs.core.count.call(null, self__.tree_map)
|
|
};
|
|
cljs.core.PersistentTreeSet.prototype.cljs$core$IEquiv$_equiv$arity$2 = function(coll, other) {
|
|
var self__ = this;
|
|
var and__3941__auto__ = cljs.core.set_QMARK_.call(null, other);
|
|
if(and__3941__auto__) {
|
|
var and__3941__auto____$1 = cljs.core.count.call(null, coll) === cljs.core.count.call(null, other);
|
|
if(and__3941__auto____$1) {
|
|
return cljs.core.every_QMARK_.call(null, function(p1__14077_SHARP_) {
|
|
return cljs.core.contains_QMARK_.call(null, coll, p1__14077_SHARP_)
|
|
}, other)
|
|
}else {
|
|
return and__3941__auto____$1
|
|
}
|
|
}else {
|
|
return and__3941__auto__
|
|
}
|
|
};
|
|
cljs.core.PersistentTreeSet.prototype.cljs$core$IWithMeta$_with_meta$arity$2 = function(coll, meta__$1) {
|
|
var self__ = this;
|
|
return new cljs.core.PersistentTreeSet(meta__$1, self__.tree_map, self__.__hash)
|
|
};
|
|
cljs.core.PersistentTreeSet.prototype.cljs$core$IMeta$_meta$arity$1 = function(coll) {
|
|
var self__ = this;
|
|
return self__.meta
|
|
};
|
|
cljs.core.PersistentTreeSet.prototype.cljs$core$IEmptyableCollection$_empty$arity$1 = function(coll) {
|
|
var self__ = this;
|
|
return cljs.core.with_meta.call(null, cljs.core.PersistentTreeSet.EMPTY, self__.meta)
|
|
};
|
|
cljs.core.__GT_PersistentTreeSet = function __GT_PersistentTreeSet(meta, tree_map, __hash) {
|
|
return new cljs.core.PersistentTreeSet(meta, tree_map, __hash)
|
|
};
|
|
cljs.core.PersistentTreeSet.EMPTY = new cljs.core.PersistentTreeSet(null, cljs.core.PersistentTreeMap.EMPTY, 0);
|
|
cljs.core.hash_set = function() {
|
|
var hash_set = null;
|
|
var hash_set__0 = function() {
|
|
return cljs.core.PersistentHashSet.EMPTY
|
|
};
|
|
var hash_set__1 = function() {
|
|
var G__14080__delegate = function(keys) {
|
|
if(function() {
|
|
var and__3941__auto__ = keys instanceof cljs.core.IndexedSeq;
|
|
if(and__3941__auto__) {
|
|
return keys.arr.length < cljs.core.PersistentArrayMap.HASHMAP_THRESHOLD
|
|
}else {
|
|
return and__3941__auto__
|
|
}
|
|
}()) {
|
|
var karr = keys.arr;
|
|
var klen = karr.length;
|
|
var alen = 2 * klen;
|
|
var arr = new Array(alen);
|
|
var ki = 0;
|
|
while(true) {
|
|
if(ki < klen) {
|
|
var ai = 2 * ki;
|
|
arr[ai] = karr[ki];
|
|
arr[ai + 1] = null;
|
|
var G__14081 = ki + 1;
|
|
ki = G__14081;
|
|
continue
|
|
}else {
|
|
return cljs.core.PersistentHashSet.fromArray.call(null, arr, true)
|
|
}
|
|
break
|
|
}
|
|
}else {
|
|
var in$ = keys;
|
|
var out = cljs.core._as_transient.call(null, cljs.core.PersistentHashSet.EMPTY);
|
|
while(true) {
|
|
if(!(in$ == null)) {
|
|
var G__14082 = cljs.core._next.call(null, in$);
|
|
var G__14083 = cljs.core._conj_BANG_.call(null, out, cljs.core._first.call(null, in$));
|
|
in$ = G__14082;
|
|
out = G__14083;
|
|
continue
|
|
}else {
|
|
return cljs.core._persistent_BANG_.call(null, out)
|
|
}
|
|
break
|
|
}
|
|
}
|
|
};
|
|
var G__14080 = function(var_args) {
|
|
var keys = null;
|
|
if(arguments.length > 0) {
|
|
keys = cljs.core.array_seq(Array.prototype.slice.call(arguments, 0), 0)
|
|
}
|
|
return G__14080__delegate.call(this, keys)
|
|
};
|
|
G__14080.cljs$lang$maxFixedArity = 0;
|
|
G__14080.cljs$lang$applyTo = function(arglist__14084) {
|
|
var keys = cljs.core.seq(arglist__14084);
|
|
return G__14080__delegate(keys)
|
|
};
|
|
G__14080.cljs$core$IFn$_invoke$arity$variadic = G__14080__delegate;
|
|
return G__14080
|
|
}();
|
|
hash_set = function(var_args) {
|
|
var keys = var_args;
|
|
switch(arguments.length) {
|
|
case 0:
|
|
return hash_set__0.call(this);
|
|
default:
|
|
return hash_set__1.cljs$core$IFn$_invoke$arity$variadic(cljs.core.array_seq(arguments, 0))
|
|
}
|
|
throw new Error("Invalid arity: " + arguments.length);
|
|
};
|
|
hash_set.cljs$lang$maxFixedArity = 0;
|
|
hash_set.cljs$lang$applyTo = hash_set__1.cljs$lang$applyTo;
|
|
hash_set.cljs$core$IFn$_invoke$arity$0 = hash_set__0;
|
|
hash_set.cljs$core$IFn$_invoke$arity$variadic = hash_set__1.cljs$core$IFn$_invoke$arity$variadic;
|
|
return hash_set
|
|
}();
|
|
cljs.core.set = function set(coll) {
|
|
return cljs.core.apply.call(null, cljs.core.hash_set, coll)
|
|
};
|
|
cljs.core.sorted_set = function() {
|
|
var sorted_set__delegate = function(keys) {
|
|
return cljs.core.reduce.call(null, cljs.core._conj, cljs.core.PersistentTreeSet.EMPTY, keys)
|
|
};
|
|
var sorted_set = function(var_args) {
|
|
var keys = null;
|
|
if(arguments.length > 0) {
|
|
keys = cljs.core.array_seq(Array.prototype.slice.call(arguments, 0), 0)
|
|
}
|
|
return sorted_set__delegate.call(this, keys)
|
|
};
|
|
sorted_set.cljs$lang$maxFixedArity = 0;
|
|
sorted_set.cljs$lang$applyTo = function(arglist__14085) {
|
|
var keys = cljs.core.seq(arglist__14085);
|
|
return sorted_set__delegate(keys)
|
|
};
|
|
sorted_set.cljs$core$IFn$_invoke$arity$variadic = sorted_set__delegate;
|
|
return sorted_set
|
|
}();
|
|
cljs.core.sorted_set_by = function() {
|
|
var sorted_set_by__delegate = function(comparator, keys) {
|
|
return cljs.core.reduce.call(null, cljs.core._conj, new cljs.core.PersistentTreeSet(null, cljs.core.sorted_map_by.call(null, comparator), 0), keys)
|
|
};
|
|
var sorted_set_by = function(comparator, var_args) {
|
|
var keys = null;
|
|
if(arguments.length > 1) {
|
|
keys = cljs.core.array_seq(Array.prototype.slice.call(arguments, 1), 0)
|
|
}
|
|
return sorted_set_by__delegate.call(this, comparator, keys)
|
|
};
|
|
sorted_set_by.cljs$lang$maxFixedArity = 1;
|
|
sorted_set_by.cljs$lang$applyTo = function(arglist__14086) {
|
|
var comparator = cljs.core.first(arglist__14086);
|
|
var keys = cljs.core.rest(arglist__14086);
|
|
return sorted_set_by__delegate(comparator, keys)
|
|
};
|
|
sorted_set_by.cljs$core$IFn$_invoke$arity$variadic = sorted_set_by__delegate;
|
|
return sorted_set_by
|
|
}();
|
|
cljs.core.replace = function replace(smap, coll) {
|
|
if(cljs.core.vector_QMARK_.call(null, coll)) {
|
|
var n = cljs.core.count.call(null, coll);
|
|
return cljs.core.reduce.call(null, function(v, i) {
|
|
var temp__4090__auto__ = cljs.core.find.call(null, smap, cljs.core.nth.call(null, v, i));
|
|
if(cljs.core.truth_(temp__4090__auto__)) {
|
|
var e = temp__4090__auto__;
|
|
return cljs.core.assoc.call(null, v, i, cljs.core.second.call(null, e))
|
|
}else {
|
|
return v
|
|
}
|
|
}, coll, cljs.core.take.call(null, n, cljs.core.iterate.call(null, cljs.core.inc, 0)))
|
|
}else {
|
|
return cljs.core.map.call(null, function(p1__14087_SHARP_) {
|
|
var temp__4090__auto__ = cljs.core.find.call(null, smap, p1__14087_SHARP_);
|
|
if(cljs.core.truth_(temp__4090__auto__)) {
|
|
var e = temp__4090__auto__;
|
|
return cljs.core.second.call(null, e)
|
|
}else {
|
|
return p1__14087_SHARP_
|
|
}
|
|
}, coll)
|
|
}
|
|
};
|
|
cljs.core.distinct = function distinct(coll) {
|
|
var step = function step(xs, seen) {
|
|
return new cljs.core.LazySeq(null, false, function() {
|
|
return function(p__14094, seen__$1) {
|
|
while(true) {
|
|
var vec__14095 = p__14094;
|
|
var f = cljs.core.nth.call(null, vec__14095, 0, null);
|
|
var xs__$1 = vec__14095;
|
|
var temp__4092__auto__ = cljs.core.seq.call(null, xs__$1);
|
|
if(temp__4092__auto__) {
|
|
var s = temp__4092__auto__;
|
|
if(cljs.core.contains_QMARK_.call(null, seen__$1, f)) {
|
|
var G__14096 = cljs.core.rest.call(null, s);
|
|
var G__14097 = seen__$1;
|
|
p__14094 = G__14096;
|
|
seen__$1 = G__14097;
|
|
continue
|
|
}else {
|
|
return cljs.core.cons.call(null, f, step.call(null, cljs.core.rest.call(null, s), cljs.core.conj.call(null, seen__$1, f)))
|
|
}
|
|
}else {
|
|
return null
|
|
}
|
|
break
|
|
}
|
|
}.call(null, xs, seen)
|
|
}, null)
|
|
};
|
|
return step.call(null, coll, cljs.core.PersistentHashSet.EMPTY)
|
|
};
|
|
cljs.core.butlast = function butlast(s) {
|
|
var ret = cljs.core.PersistentVector.EMPTY;
|
|
var s__$1 = s;
|
|
while(true) {
|
|
if(cljs.core.next.call(null, s__$1)) {
|
|
var G__14098 = cljs.core.conj.call(null, ret, cljs.core.first.call(null, s__$1));
|
|
var G__14099 = cljs.core.next.call(null, s__$1);
|
|
ret = G__14098;
|
|
s__$1 = G__14099;
|
|
continue
|
|
}else {
|
|
return cljs.core.seq.call(null, ret)
|
|
}
|
|
break
|
|
}
|
|
};
|
|
cljs.core.name = function name(x) {
|
|
if(function() {
|
|
var G__14101 = x;
|
|
if(G__14101) {
|
|
if(function() {
|
|
var or__3943__auto__ = G__14101.cljs$lang$protocol_mask$partition1$ & 4096;
|
|
if(or__3943__auto__) {
|
|
return or__3943__auto__
|
|
}else {
|
|
return G__14101.cljs$core$INamed$
|
|
}
|
|
}()) {
|
|
return true
|
|
}else {
|
|
return false
|
|
}
|
|
}else {
|
|
return false
|
|
}
|
|
}()) {
|
|
return cljs.core._name.call(null, x)
|
|
}else {
|
|
if(cljs.core.string_QMARK_.call(null, x)) {
|
|
return x
|
|
}else {
|
|
if(cljs.core.keyword_QMARK_.call(null, x)) {
|
|
var i = x.lastIndexOf("/", x.length - 2);
|
|
if(i < 0) {
|
|
return cljs.core.subs.call(null, x, 2)
|
|
}else {
|
|
return cljs.core.subs.call(null, x, i + 1)
|
|
}
|
|
}else {
|
|
if("\ufdd0:else") {
|
|
throw new Error([cljs.core.str("Doesn't support name: "), cljs.core.str(x)].join(""));
|
|
}else {
|
|
return null
|
|
}
|
|
}
|
|
}
|
|
}
|
|
};
|
|
cljs.core.namespace = function namespace(x) {
|
|
if(function() {
|
|
var G__14103 = x;
|
|
if(G__14103) {
|
|
if(function() {
|
|
var or__3943__auto__ = G__14103.cljs$lang$protocol_mask$partition1$ & 4096;
|
|
if(or__3943__auto__) {
|
|
return or__3943__auto__
|
|
}else {
|
|
return G__14103.cljs$core$INamed$
|
|
}
|
|
}()) {
|
|
return true
|
|
}else {
|
|
return false
|
|
}
|
|
}else {
|
|
return false
|
|
}
|
|
}()) {
|
|
return cljs.core._namespace.call(null, x)
|
|
}else {
|
|
if(cljs.core.keyword_QMARK_.call(null, x)) {
|
|
var i = x.lastIndexOf("/", x.length - 2);
|
|
if(i > -1) {
|
|
return cljs.core.subs.call(null, x, 2, i)
|
|
}else {
|
|
return null
|
|
}
|
|
}else {
|
|
throw new Error([cljs.core.str("Doesn't support namespace: "), cljs.core.str(x)].join(""));
|
|
}
|
|
}
|
|
};
|
|
cljs.core.zipmap = function zipmap(keys, vals) {
|
|
var map = cljs.core.transient$.call(null, cljs.core.PersistentArrayMap.EMPTY);
|
|
var ks = cljs.core.seq.call(null, keys);
|
|
var vs = cljs.core.seq.call(null, vals);
|
|
while(true) {
|
|
if(function() {
|
|
var and__3941__auto__ = ks;
|
|
if(and__3941__auto__) {
|
|
return vs
|
|
}else {
|
|
return and__3941__auto__
|
|
}
|
|
}()) {
|
|
var G__14104 = cljs.core.assoc_BANG_.call(null, map, cljs.core.first.call(null, ks), cljs.core.first.call(null, vs));
|
|
var G__14105 = cljs.core.next.call(null, ks);
|
|
var G__14106 = cljs.core.next.call(null, vs);
|
|
map = G__14104;
|
|
ks = G__14105;
|
|
vs = G__14106;
|
|
continue
|
|
}else {
|
|
return cljs.core.persistent_BANG_.call(null, map)
|
|
}
|
|
break
|
|
}
|
|
};
|
|
cljs.core.max_key = function() {
|
|
var max_key = null;
|
|
var max_key__2 = function(k, x) {
|
|
return x
|
|
};
|
|
var max_key__3 = function(k, x, y) {
|
|
if(k.call(null, x) > k.call(null, y)) {
|
|
return x
|
|
}else {
|
|
return y
|
|
}
|
|
};
|
|
var max_key__4 = function() {
|
|
var G__14109__delegate = function(k, x, y, more) {
|
|
return cljs.core.reduce.call(null, function(p1__14107_SHARP_, p2__14108_SHARP_) {
|
|
return max_key.call(null, k, p1__14107_SHARP_, p2__14108_SHARP_)
|
|
}, max_key.call(null, k, x, y), more)
|
|
};
|
|
var G__14109 = function(k, x, y, var_args) {
|
|
var more = null;
|
|
if(arguments.length > 3) {
|
|
more = cljs.core.array_seq(Array.prototype.slice.call(arguments, 3), 0)
|
|
}
|
|
return G__14109__delegate.call(this, k, x, y, more)
|
|
};
|
|
G__14109.cljs$lang$maxFixedArity = 3;
|
|
G__14109.cljs$lang$applyTo = function(arglist__14110) {
|
|
var k = cljs.core.first(arglist__14110);
|
|
arglist__14110 = cljs.core.next(arglist__14110);
|
|
var x = cljs.core.first(arglist__14110);
|
|
arglist__14110 = cljs.core.next(arglist__14110);
|
|
var y = cljs.core.first(arglist__14110);
|
|
var more = cljs.core.rest(arglist__14110);
|
|
return G__14109__delegate(k, x, y, more)
|
|
};
|
|
G__14109.cljs$core$IFn$_invoke$arity$variadic = G__14109__delegate;
|
|
return G__14109
|
|
}();
|
|
max_key = function(k, x, y, var_args) {
|
|
var more = var_args;
|
|
switch(arguments.length) {
|
|
case 2:
|
|
return max_key__2.call(this, k, x);
|
|
case 3:
|
|
return max_key__3.call(this, k, x, y);
|
|
default:
|
|
return max_key__4.cljs$core$IFn$_invoke$arity$variadic(k, x, y, cljs.core.array_seq(arguments, 3))
|
|
}
|
|
throw new Error("Invalid arity: " + arguments.length);
|
|
};
|
|
max_key.cljs$lang$maxFixedArity = 3;
|
|
max_key.cljs$lang$applyTo = max_key__4.cljs$lang$applyTo;
|
|
max_key.cljs$core$IFn$_invoke$arity$2 = max_key__2;
|
|
max_key.cljs$core$IFn$_invoke$arity$3 = max_key__3;
|
|
max_key.cljs$core$IFn$_invoke$arity$variadic = max_key__4.cljs$core$IFn$_invoke$arity$variadic;
|
|
return max_key
|
|
}();
|
|
cljs.core.min_key = function() {
|
|
var min_key = null;
|
|
var min_key__2 = function(k, x) {
|
|
return x
|
|
};
|
|
var min_key__3 = function(k, x, y) {
|
|
if(k.call(null, x) < k.call(null, y)) {
|
|
return x
|
|
}else {
|
|
return y
|
|
}
|
|
};
|
|
var min_key__4 = function() {
|
|
var G__14113__delegate = function(k, x, y, more) {
|
|
return cljs.core.reduce.call(null, function(p1__14111_SHARP_, p2__14112_SHARP_) {
|
|
return min_key.call(null, k, p1__14111_SHARP_, p2__14112_SHARP_)
|
|
}, min_key.call(null, k, x, y), more)
|
|
};
|
|
var G__14113 = function(k, x, y, var_args) {
|
|
var more = null;
|
|
if(arguments.length > 3) {
|
|
more = cljs.core.array_seq(Array.prototype.slice.call(arguments, 3), 0)
|
|
}
|
|
return G__14113__delegate.call(this, k, x, y, more)
|
|
};
|
|
G__14113.cljs$lang$maxFixedArity = 3;
|
|
G__14113.cljs$lang$applyTo = function(arglist__14114) {
|
|
var k = cljs.core.first(arglist__14114);
|
|
arglist__14114 = cljs.core.next(arglist__14114);
|
|
var x = cljs.core.first(arglist__14114);
|
|
arglist__14114 = cljs.core.next(arglist__14114);
|
|
var y = cljs.core.first(arglist__14114);
|
|
var more = cljs.core.rest(arglist__14114);
|
|
return G__14113__delegate(k, x, y, more)
|
|
};
|
|
G__14113.cljs$core$IFn$_invoke$arity$variadic = G__14113__delegate;
|
|
return G__14113
|
|
}();
|
|
min_key = function(k, x, y, var_args) {
|
|
var more = var_args;
|
|
switch(arguments.length) {
|
|
case 2:
|
|
return min_key__2.call(this, k, x);
|
|
case 3:
|
|
return min_key__3.call(this, k, x, y);
|
|
default:
|
|
return min_key__4.cljs$core$IFn$_invoke$arity$variadic(k, x, y, cljs.core.array_seq(arguments, 3))
|
|
}
|
|
throw new Error("Invalid arity: " + arguments.length);
|
|
};
|
|
min_key.cljs$lang$maxFixedArity = 3;
|
|
min_key.cljs$lang$applyTo = min_key__4.cljs$lang$applyTo;
|
|
min_key.cljs$core$IFn$_invoke$arity$2 = min_key__2;
|
|
min_key.cljs$core$IFn$_invoke$arity$3 = min_key__3;
|
|
min_key.cljs$core$IFn$_invoke$arity$variadic = min_key__4.cljs$core$IFn$_invoke$arity$variadic;
|
|
return min_key
|
|
}();
|
|
cljs.core.partition_all = function() {
|
|
var partition_all = null;
|
|
var partition_all__2 = function(n, coll) {
|
|
return partition_all.call(null, n, n, coll)
|
|
};
|
|
var partition_all__3 = function(n, step, coll) {
|
|
return new cljs.core.LazySeq(null, false, function() {
|
|
var temp__4092__auto__ = cljs.core.seq.call(null, coll);
|
|
if(temp__4092__auto__) {
|
|
var s = temp__4092__auto__;
|
|
return cljs.core.cons.call(null, cljs.core.take.call(null, n, s), partition_all.call(null, n, step, cljs.core.drop.call(null, step, s)))
|
|
}else {
|
|
return null
|
|
}
|
|
}, null)
|
|
};
|
|
partition_all = function(n, step, coll) {
|
|
switch(arguments.length) {
|
|
case 2:
|
|
return partition_all__2.call(this, n, step);
|
|
case 3:
|
|
return partition_all__3.call(this, n, step, coll)
|
|
}
|
|
throw new Error("Invalid arity: " + arguments.length);
|
|
};
|
|
partition_all.cljs$core$IFn$_invoke$arity$2 = partition_all__2;
|
|
partition_all.cljs$core$IFn$_invoke$arity$3 = partition_all__3;
|
|
return partition_all
|
|
}();
|
|
cljs.core.take_while = function take_while(pred, coll) {
|
|
return new cljs.core.LazySeq(null, false, function() {
|
|
var temp__4092__auto__ = cljs.core.seq.call(null, coll);
|
|
if(temp__4092__auto__) {
|
|
var s = temp__4092__auto__;
|
|
if(cljs.core.truth_(pred.call(null, cljs.core.first.call(null, s)))) {
|
|
return cljs.core.cons.call(null, cljs.core.first.call(null, s), take_while.call(null, pred, cljs.core.rest.call(null, s)))
|
|
}else {
|
|
return null
|
|
}
|
|
}else {
|
|
return null
|
|
}
|
|
}, null)
|
|
};
|
|
cljs.core.mk_bound_fn = function mk_bound_fn(sc, test, key) {
|
|
return function(e) {
|
|
var comp = cljs.core._comparator.call(null, sc);
|
|
return test.call(null, comp.call(null, cljs.core._entry_key.call(null, sc, e), key), 0)
|
|
}
|
|
};
|
|
cljs.core.subseq = function() {
|
|
var subseq = null;
|
|
var subseq__3 = function(sc, test, key) {
|
|
var include = cljs.core.mk_bound_fn.call(null, sc, test, key);
|
|
if(cljs.core.truth_(cljs.core.PersistentHashSet.fromArray([cljs.core._GT_, null, cljs.core._GT__EQ_, null], true).call(null, test))) {
|
|
var temp__4092__auto__ = cljs.core._sorted_seq_from.call(null, sc, key, true);
|
|
if(cljs.core.truth_(temp__4092__auto__)) {
|
|
var vec__14117 = temp__4092__auto__;
|
|
var e = cljs.core.nth.call(null, vec__14117, 0, null);
|
|
var s = vec__14117;
|
|
if(cljs.core.truth_(include.call(null, e))) {
|
|
return s
|
|
}else {
|
|
return cljs.core.next.call(null, s)
|
|
}
|
|
}else {
|
|
return null
|
|
}
|
|
}else {
|
|
return cljs.core.take_while.call(null, include, cljs.core._sorted_seq.call(null, sc, true))
|
|
}
|
|
};
|
|
var subseq__5 = function(sc, start_test, start_key, end_test, end_key) {
|
|
var temp__4092__auto__ = cljs.core._sorted_seq_from.call(null, sc, start_key, true);
|
|
if(cljs.core.truth_(temp__4092__auto__)) {
|
|
var vec__14118 = temp__4092__auto__;
|
|
var e = cljs.core.nth.call(null, vec__14118, 0, null);
|
|
var s = vec__14118;
|
|
return cljs.core.take_while.call(null, cljs.core.mk_bound_fn.call(null, sc, end_test, end_key), cljs.core.truth_(cljs.core.mk_bound_fn.call(null, sc, start_test, start_key).call(null, e)) ? s : cljs.core.next.call(null, s))
|
|
}else {
|
|
return null
|
|
}
|
|
};
|
|
subseq = function(sc, start_test, start_key, end_test, end_key) {
|
|
switch(arguments.length) {
|
|
case 3:
|
|
return subseq__3.call(this, sc, start_test, start_key);
|
|
case 5:
|
|
return subseq__5.call(this, sc, start_test, start_key, end_test, end_key)
|
|
}
|
|
throw new Error("Invalid arity: " + arguments.length);
|
|
};
|
|
subseq.cljs$core$IFn$_invoke$arity$3 = subseq__3;
|
|
subseq.cljs$core$IFn$_invoke$arity$5 = subseq__5;
|
|
return subseq
|
|
}();
|
|
cljs.core.rsubseq = function() {
|
|
var rsubseq = null;
|
|
var rsubseq__3 = function(sc, test, key) {
|
|
var include = cljs.core.mk_bound_fn.call(null, sc, test, key);
|
|
if(cljs.core.truth_(cljs.core.PersistentHashSet.fromArray([cljs.core._LT_, null, cljs.core._LT__EQ_, null], true).call(null, test))) {
|
|
var temp__4092__auto__ = cljs.core._sorted_seq_from.call(null, sc, key, false);
|
|
if(cljs.core.truth_(temp__4092__auto__)) {
|
|
var vec__14121 = temp__4092__auto__;
|
|
var e = cljs.core.nth.call(null, vec__14121, 0, null);
|
|
var s = vec__14121;
|
|
if(cljs.core.truth_(include.call(null, e))) {
|
|
return s
|
|
}else {
|
|
return cljs.core.next.call(null, s)
|
|
}
|
|
}else {
|
|
return null
|
|
}
|
|
}else {
|
|
return cljs.core.take_while.call(null, include, cljs.core._sorted_seq.call(null, sc, false))
|
|
}
|
|
};
|
|
var rsubseq__5 = function(sc, start_test, start_key, end_test, end_key) {
|
|
var temp__4092__auto__ = cljs.core._sorted_seq_from.call(null, sc, end_key, false);
|
|
if(cljs.core.truth_(temp__4092__auto__)) {
|
|
var vec__14122 = temp__4092__auto__;
|
|
var e = cljs.core.nth.call(null, vec__14122, 0, null);
|
|
var s = vec__14122;
|
|
return cljs.core.take_while.call(null, cljs.core.mk_bound_fn.call(null, sc, start_test, start_key), cljs.core.truth_(cljs.core.mk_bound_fn.call(null, sc, end_test, end_key).call(null, e)) ? s : cljs.core.next.call(null, s))
|
|
}else {
|
|
return null
|
|
}
|
|
};
|
|
rsubseq = function(sc, start_test, start_key, end_test, end_key) {
|
|
switch(arguments.length) {
|
|
case 3:
|
|
return rsubseq__3.call(this, sc, start_test, start_key);
|
|
case 5:
|
|
return rsubseq__5.call(this, sc, start_test, start_key, end_test, end_key)
|
|
}
|
|
throw new Error("Invalid arity: " + arguments.length);
|
|
};
|
|
rsubseq.cljs$core$IFn$_invoke$arity$3 = rsubseq__3;
|
|
rsubseq.cljs$core$IFn$_invoke$arity$5 = rsubseq__5;
|
|
return rsubseq
|
|
}();
|
|
goog.provide("cljs.core.Range");
|
|
cljs.core.Range = function(meta, start, end, step, __hash) {
|
|
this.meta = meta;
|
|
this.start = start;
|
|
this.end = end;
|
|
this.step = step;
|
|
this.__hash = __hash;
|
|
this.cljs$lang$protocol_mask$partition1$ = 0;
|
|
this.cljs$lang$protocol_mask$partition0$ = 32375006
|
|
};
|
|
cljs.core.Range.cljs$lang$type = true;
|
|
cljs.core.Range.cljs$lang$ctorStr = "cljs.core/Range";
|
|
cljs.core.Range.cljs$lang$ctorPrWriter = function(this__2847__auto__, writer__2848__auto__, opt__2849__auto__) {
|
|
return cljs.core._write.call(null, writer__2848__auto__, "cljs.core/Range")
|
|
};
|
|
cljs.core.Range.prototype.cljs$core$IHash$_hash$arity$1 = function(rng) {
|
|
var self__ = this;
|
|
var h__2732__auto__ = self__.__hash;
|
|
if(!(h__2732__auto__ == null)) {
|
|
return h__2732__auto__
|
|
}else {
|
|
var h__2732__auto____$1 = cljs.core.hash_coll.call(null, rng);
|
|
self__.__hash = h__2732__auto____$1;
|
|
return h__2732__auto____$1
|
|
}
|
|
};
|
|
cljs.core.Range.prototype.cljs$core$INext$_next$arity$1 = function(rng) {
|
|
var self__ = this;
|
|
if(self__.step > 0) {
|
|
if(self__.start + self__.step < self__.end) {
|
|
return new cljs.core.Range(self__.meta, self__.start + self__.step, self__.end, self__.step, null)
|
|
}else {
|
|
return null
|
|
}
|
|
}else {
|
|
if(self__.start + self__.step > self__.end) {
|
|
return new cljs.core.Range(self__.meta, self__.start + self__.step, self__.end, self__.step, null)
|
|
}else {
|
|
return null
|
|
}
|
|
}
|
|
};
|
|
cljs.core.Range.prototype.cljs$core$ICollection$_conj$arity$2 = function(rng, o) {
|
|
var self__ = this;
|
|
return cljs.core.cons.call(null, o, rng)
|
|
};
|
|
cljs.core.Range.prototype.toString = function() {
|
|
var self__ = this;
|
|
var coll = this;
|
|
return cljs.core.pr_str_STAR_.call(null, coll)
|
|
};
|
|
cljs.core.Range.prototype.cljs$core$IReduce$_reduce$arity$2 = function(rng, f) {
|
|
var self__ = this;
|
|
return cljs.core.ci_reduce.call(null, rng, f)
|
|
};
|
|
cljs.core.Range.prototype.cljs$core$IReduce$_reduce$arity$3 = function(rng, f, s) {
|
|
var self__ = this;
|
|
return cljs.core.ci_reduce.call(null, rng, f, s)
|
|
};
|
|
cljs.core.Range.prototype.cljs$core$ISeqable$_seq$arity$1 = function(rng) {
|
|
var self__ = this;
|
|
if(self__.step > 0) {
|
|
if(self__.start < self__.end) {
|
|
return rng
|
|
}else {
|
|
return null
|
|
}
|
|
}else {
|
|
if(self__.start > self__.end) {
|
|
return rng
|
|
}else {
|
|
return null
|
|
}
|
|
}
|
|
};
|
|
cljs.core.Range.prototype.cljs$core$ICounted$_count$arity$1 = function(rng) {
|
|
var self__ = this;
|
|
if(cljs.core.not.call(null, rng.cljs$core$ISeqable$_seq$arity$1(rng))) {
|
|
return 0
|
|
}else {
|
|
return Math.ceil((self__.end - self__.start) / self__.step)
|
|
}
|
|
};
|
|
cljs.core.Range.prototype.cljs$core$ISeq$_first$arity$1 = function(rng) {
|
|
var self__ = this;
|
|
return self__.start
|
|
};
|
|
cljs.core.Range.prototype.cljs$core$ISeq$_rest$arity$1 = function(rng) {
|
|
var self__ = this;
|
|
if(!(rng.cljs$core$ISeqable$_seq$arity$1(rng) == null)) {
|
|
return new cljs.core.Range(self__.meta, self__.start + self__.step, self__.end, self__.step, null)
|
|
}else {
|
|
return cljs.core.List.EMPTY
|
|
}
|
|
};
|
|
cljs.core.Range.prototype.cljs$core$IEquiv$_equiv$arity$2 = function(rng, other) {
|
|
var self__ = this;
|
|
return cljs.core.equiv_sequential.call(null, rng, other)
|
|
};
|
|
cljs.core.Range.prototype.cljs$core$IWithMeta$_with_meta$arity$2 = function(rng, meta__$1) {
|
|
var self__ = this;
|
|
return new cljs.core.Range(meta__$1, self__.start, self__.end, self__.step, self__.__hash)
|
|
};
|
|
cljs.core.Range.prototype.cljs$core$IMeta$_meta$arity$1 = function(rng) {
|
|
var self__ = this;
|
|
return self__.meta
|
|
};
|
|
cljs.core.Range.prototype.cljs$core$IIndexed$_nth$arity$2 = function(rng, n) {
|
|
var self__ = this;
|
|
if(n < rng.cljs$core$ICounted$_count$arity$1(rng)) {
|
|
return self__.start + n * self__.step
|
|
}else {
|
|
if(function() {
|
|
var and__3941__auto__ = self__.start > self__.end;
|
|
if(and__3941__auto__) {
|
|
return self__.step === 0
|
|
}else {
|
|
return and__3941__auto__
|
|
}
|
|
}()) {
|
|
return self__.start
|
|
}else {
|
|
throw new Error("Index out of bounds");
|
|
}
|
|
}
|
|
};
|
|
cljs.core.Range.prototype.cljs$core$IIndexed$_nth$arity$3 = function(rng, n, not_found) {
|
|
var self__ = this;
|
|
if(n < rng.cljs$core$ICounted$_count$arity$1(rng)) {
|
|
return self__.start + n * self__.step
|
|
}else {
|
|
if(function() {
|
|
var and__3941__auto__ = self__.start > self__.end;
|
|
if(and__3941__auto__) {
|
|
return self__.step === 0
|
|
}else {
|
|
return and__3941__auto__
|
|
}
|
|
}()) {
|
|
return self__.start
|
|
}else {
|
|
return not_found
|
|
}
|
|
}
|
|
};
|
|
cljs.core.Range.prototype.cljs$core$IEmptyableCollection$_empty$arity$1 = function(rng) {
|
|
var self__ = this;
|
|
return cljs.core.with_meta.call(null, cljs.core.List.EMPTY, self__.meta)
|
|
};
|
|
cljs.core.__GT_Range = function __GT_Range(meta, start, end, step, __hash) {
|
|
return new cljs.core.Range(meta, start, end, step, __hash)
|
|
};
|
|
cljs.core.range = function() {
|
|
var range = null;
|
|
var range__0 = function() {
|
|
return range.call(null, 0, Number.MAX_VALUE, 1)
|
|
};
|
|
var range__1 = function(end) {
|
|
return range.call(null, 0, end, 1)
|
|
};
|
|
var range__2 = function(start, end) {
|
|
return range.call(null, start, end, 1)
|
|
};
|
|
var range__3 = function(start, end, step) {
|
|
return new cljs.core.Range(null, start, end, step, null)
|
|
};
|
|
range = function(start, end, step) {
|
|
switch(arguments.length) {
|
|
case 0:
|
|
return range__0.call(this);
|
|
case 1:
|
|
return range__1.call(this, start);
|
|
case 2:
|
|
return range__2.call(this, start, end);
|
|
case 3:
|
|
return range__3.call(this, start, end, step)
|
|
}
|
|
throw new Error("Invalid arity: " + arguments.length);
|
|
};
|
|
range.cljs$core$IFn$_invoke$arity$0 = range__0;
|
|
range.cljs$core$IFn$_invoke$arity$1 = range__1;
|
|
range.cljs$core$IFn$_invoke$arity$2 = range__2;
|
|
range.cljs$core$IFn$_invoke$arity$3 = range__3;
|
|
return range
|
|
}();
|
|
cljs.core.take_nth = function take_nth(n, coll) {
|
|
return new cljs.core.LazySeq(null, false, function() {
|
|
var temp__4092__auto__ = cljs.core.seq.call(null, coll);
|
|
if(temp__4092__auto__) {
|
|
var s = temp__4092__auto__;
|
|
return cljs.core.cons.call(null, cljs.core.first.call(null, s), take_nth.call(null, n, cljs.core.drop.call(null, n, s)))
|
|
}else {
|
|
return null
|
|
}
|
|
}, null)
|
|
};
|
|
cljs.core.split_with = function split_with(pred, coll) {
|
|
return cljs.core.PersistentVector.fromArray([cljs.core.take_while.call(null, pred, coll), cljs.core.drop_while.call(null, pred, coll)], true)
|
|
};
|
|
cljs.core.partition_by = function partition_by(f, coll) {
|
|
return new cljs.core.LazySeq(null, false, function() {
|
|
var temp__4092__auto__ = cljs.core.seq.call(null, coll);
|
|
if(temp__4092__auto__) {
|
|
var s = temp__4092__auto__;
|
|
var fst = cljs.core.first.call(null, s);
|
|
var fv = f.call(null, fst);
|
|
var run = cljs.core.cons.call(null, fst, cljs.core.take_while.call(null, function(fst, fv) {
|
|
return function(p1__14123_SHARP_) {
|
|
return cljs.core._EQ_.call(null, fv, f.call(null, p1__14123_SHARP_))
|
|
}
|
|
}(fst, fv), cljs.core.next.call(null, s)));
|
|
return cljs.core.cons.call(null, run, partition_by.call(null, f, cljs.core.seq.call(null, cljs.core.drop.call(null, cljs.core.count.call(null, run), s))))
|
|
}else {
|
|
return null
|
|
}
|
|
}, null)
|
|
};
|
|
cljs.core.frequencies = function frequencies(coll) {
|
|
return cljs.core.persistent_BANG_.call(null, cljs.core.reduce.call(null, function(counts, x) {
|
|
return cljs.core.assoc_BANG_.call(null, counts, x, cljs.core.get.call(null, counts, x, 0) + 1)
|
|
}, cljs.core.transient$.call(null, cljs.core.PersistentArrayMap.EMPTY), coll))
|
|
};
|
|
cljs.core.reductions = function() {
|
|
var reductions = null;
|
|
var reductions__2 = function(f, coll) {
|
|
return new cljs.core.LazySeq(null, false, function() {
|
|
var temp__4090__auto__ = cljs.core.seq.call(null, coll);
|
|
if(temp__4090__auto__) {
|
|
var s = temp__4090__auto__;
|
|
return reductions.call(null, f, cljs.core.first.call(null, s), cljs.core.rest.call(null, s))
|
|
}else {
|
|
return cljs.core.list.call(null, f.call(null))
|
|
}
|
|
}, null)
|
|
};
|
|
var reductions__3 = function(f, init, coll) {
|
|
return cljs.core.cons.call(null, init, new cljs.core.LazySeq(null, false, function() {
|
|
var temp__4092__auto__ = cljs.core.seq.call(null, coll);
|
|
if(temp__4092__auto__) {
|
|
var s = temp__4092__auto__;
|
|
return reductions.call(null, f, f.call(null, init, cljs.core.first.call(null, s)), cljs.core.rest.call(null, s))
|
|
}else {
|
|
return null
|
|
}
|
|
}, null))
|
|
};
|
|
reductions = function(f, init, coll) {
|
|
switch(arguments.length) {
|
|
case 2:
|
|
return reductions__2.call(this, f, init);
|
|
case 3:
|
|
return reductions__3.call(this, f, init, coll)
|
|
}
|
|
throw new Error("Invalid arity: " + arguments.length);
|
|
};
|
|
reductions.cljs$core$IFn$_invoke$arity$2 = reductions__2;
|
|
reductions.cljs$core$IFn$_invoke$arity$3 = reductions__3;
|
|
return reductions
|
|
}();
|
|
cljs.core.juxt = function() {
|
|
var juxt = null;
|
|
var juxt__1 = function(f) {
|
|
return function() {
|
|
var G__14134 = null;
|
|
var G__14134__0 = function() {
|
|
return cljs.core.vector.call(null, f.call(null))
|
|
};
|
|
var G__14134__1 = function(x) {
|
|
return cljs.core.vector.call(null, f.call(null, x))
|
|
};
|
|
var G__14134__2 = function(x, y) {
|
|
return cljs.core.vector.call(null, f.call(null, x, y))
|
|
};
|
|
var G__14134__3 = function(x, y, z) {
|
|
return cljs.core.vector.call(null, f.call(null, x, y, z))
|
|
};
|
|
var G__14134__4 = function() {
|
|
var G__14135__delegate = function(x, y, z, args) {
|
|
return cljs.core.vector.call(null, cljs.core.apply.call(null, f, x, y, z, args))
|
|
};
|
|
var G__14135 = function(x, y, z, var_args) {
|
|
var args = null;
|
|
if(arguments.length > 3) {
|
|
args = cljs.core.array_seq(Array.prototype.slice.call(arguments, 3), 0)
|
|
}
|
|
return G__14135__delegate.call(this, x, y, z, args)
|
|
};
|
|
G__14135.cljs$lang$maxFixedArity = 3;
|
|
G__14135.cljs$lang$applyTo = function(arglist__14136) {
|
|
var x = cljs.core.first(arglist__14136);
|
|
arglist__14136 = cljs.core.next(arglist__14136);
|
|
var y = cljs.core.first(arglist__14136);
|
|
arglist__14136 = cljs.core.next(arglist__14136);
|
|
var z = cljs.core.first(arglist__14136);
|
|
var args = cljs.core.rest(arglist__14136);
|
|
return G__14135__delegate(x, y, z, args)
|
|
};
|
|
G__14135.cljs$core$IFn$_invoke$arity$variadic = G__14135__delegate;
|
|
return G__14135
|
|
}();
|
|
G__14134 = function(x, y, z, var_args) {
|
|
var args = var_args;
|
|
switch(arguments.length) {
|
|
case 0:
|
|
return G__14134__0.call(this);
|
|
case 1:
|
|
return G__14134__1.call(this, x);
|
|
case 2:
|
|
return G__14134__2.call(this, x, y);
|
|
case 3:
|
|
return G__14134__3.call(this, x, y, z);
|
|
default:
|
|
return G__14134__4.cljs$core$IFn$_invoke$arity$variadic(x, y, z, cljs.core.array_seq(arguments, 3))
|
|
}
|
|
throw new Error("Invalid arity: " + arguments.length);
|
|
};
|
|
G__14134.cljs$lang$maxFixedArity = 3;
|
|
G__14134.cljs$lang$applyTo = G__14134__4.cljs$lang$applyTo;
|
|
return G__14134
|
|
}()
|
|
};
|
|
var juxt__2 = function(f, g) {
|
|
return function() {
|
|
var G__14137 = null;
|
|
var G__14137__0 = function() {
|
|
return cljs.core.vector.call(null, f.call(null), g.call(null))
|
|
};
|
|
var G__14137__1 = function(x) {
|
|
return cljs.core.vector.call(null, f.call(null, x), g.call(null, x))
|
|
};
|
|
var G__14137__2 = function(x, y) {
|
|
return cljs.core.vector.call(null, f.call(null, x, y), g.call(null, x, y))
|
|
};
|
|
var G__14137__3 = function(x, y, z) {
|
|
return cljs.core.vector.call(null, f.call(null, x, y, z), g.call(null, x, y, z))
|
|
};
|
|
var G__14137__4 = function() {
|
|
var G__14138__delegate = function(x, y, z, args) {
|
|
return cljs.core.vector.call(null, cljs.core.apply.call(null, f, x, y, z, args), cljs.core.apply.call(null, g, x, y, z, args))
|
|
};
|
|
var G__14138 = function(x, y, z, var_args) {
|
|
var args = null;
|
|
if(arguments.length > 3) {
|
|
args = cljs.core.array_seq(Array.prototype.slice.call(arguments, 3), 0)
|
|
}
|
|
return G__14138__delegate.call(this, x, y, z, args)
|
|
};
|
|
G__14138.cljs$lang$maxFixedArity = 3;
|
|
G__14138.cljs$lang$applyTo = function(arglist__14139) {
|
|
var x = cljs.core.first(arglist__14139);
|
|
arglist__14139 = cljs.core.next(arglist__14139);
|
|
var y = cljs.core.first(arglist__14139);
|
|
arglist__14139 = cljs.core.next(arglist__14139);
|
|
var z = cljs.core.first(arglist__14139);
|
|
var args = cljs.core.rest(arglist__14139);
|
|
return G__14138__delegate(x, y, z, args)
|
|
};
|
|
G__14138.cljs$core$IFn$_invoke$arity$variadic = G__14138__delegate;
|
|
return G__14138
|
|
}();
|
|
G__14137 = function(x, y, z, var_args) {
|
|
var args = var_args;
|
|
switch(arguments.length) {
|
|
case 0:
|
|
return G__14137__0.call(this);
|
|
case 1:
|
|
return G__14137__1.call(this, x);
|
|
case 2:
|
|
return G__14137__2.call(this, x, y);
|
|
case 3:
|
|
return G__14137__3.call(this, x, y, z);
|
|
default:
|
|
return G__14137__4.cljs$core$IFn$_invoke$arity$variadic(x, y, z, cljs.core.array_seq(arguments, 3))
|
|
}
|
|
throw new Error("Invalid arity: " + arguments.length);
|
|
};
|
|
G__14137.cljs$lang$maxFixedArity = 3;
|
|
G__14137.cljs$lang$applyTo = G__14137__4.cljs$lang$applyTo;
|
|
return G__14137
|
|
}()
|
|
};
|
|
var juxt__3 = function(f, g, h) {
|
|
return function() {
|
|
var G__14140 = null;
|
|
var G__14140__0 = function() {
|
|
return cljs.core.vector.call(null, f.call(null), g.call(null), h.call(null))
|
|
};
|
|
var G__14140__1 = function(x) {
|
|
return cljs.core.vector.call(null, f.call(null, x), g.call(null, x), h.call(null, x))
|
|
};
|
|
var G__14140__2 = function(x, y) {
|
|
return cljs.core.vector.call(null, f.call(null, x, y), g.call(null, x, y), h.call(null, x, y))
|
|
};
|
|
var G__14140__3 = function(x, y, z) {
|
|
return cljs.core.vector.call(null, f.call(null, x, y, z), g.call(null, x, y, z), h.call(null, x, y, z))
|
|
};
|
|
var G__14140__4 = function() {
|
|
var G__14141__delegate = function(x, y, z, args) {
|
|
return cljs.core.vector.call(null, cljs.core.apply.call(null, f, x, y, z, args), cljs.core.apply.call(null, g, x, y, z, args), cljs.core.apply.call(null, h, x, y, z, args))
|
|
};
|
|
var G__14141 = function(x, y, z, var_args) {
|
|
var args = null;
|
|
if(arguments.length > 3) {
|
|
args = cljs.core.array_seq(Array.prototype.slice.call(arguments, 3), 0)
|
|
}
|
|
return G__14141__delegate.call(this, x, y, z, args)
|
|
};
|
|
G__14141.cljs$lang$maxFixedArity = 3;
|
|
G__14141.cljs$lang$applyTo = function(arglist__14142) {
|
|
var x = cljs.core.first(arglist__14142);
|
|
arglist__14142 = cljs.core.next(arglist__14142);
|
|
var y = cljs.core.first(arglist__14142);
|
|
arglist__14142 = cljs.core.next(arglist__14142);
|
|
var z = cljs.core.first(arglist__14142);
|
|
var args = cljs.core.rest(arglist__14142);
|
|
return G__14141__delegate(x, y, z, args)
|
|
};
|
|
G__14141.cljs$core$IFn$_invoke$arity$variadic = G__14141__delegate;
|
|
return G__14141
|
|
}();
|
|
G__14140 = function(x, y, z, var_args) {
|
|
var args = var_args;
|
|
switch(arguments.length) {
|
|
case 0:
|
|
return G__14140__0.call(this);
|
|
case 1:
|
|
return G__14140__1.call(this, x);
|
|
case 2:
|
|
return G__14140__2.call(this, x, y);
|
|
case 3:
|
|
return G__14140__3.call(this, x, y, z);
|
|
default:
|
|
return G__14140__4.cljs$core$IFn$_invoke$arity$variadic(x, y, z, cljs.core.array_seq(arguments, 3))
|
|
}
|
|
throw new Error("Invalid arity: " + arguments.length);
|
|
};
|
|
G__14140.cljs$lang$maxFixedArity = 3;
|
|
G__14140.cljs$lang$applyTo = G__14140__4.cljs$lang$applyTo;
|
|
return G__14140
|
|
}()
|
|
};
|
|
var juxt__4 = function() {
|
|
var G__14143__delegate = function(f, g, h, fs) {
|
|
var fs__$1 = cljs.core.list_STAR_.call(null, f, g, h, fs);
|
|
return function() {
|
|
var G__14144 = null;
|
|
var G__14144__0 = function() {
|
|
return cljs.core.reduce.call(null, function(p1__14124_SHARP_, p2__14125_SHARP_) {
|
|
return cljs.core.conj.call(null, p1__14124_SHARP_, p2__14125_SHARP_.call(null))
|
|
}, cljs.core.PersistentVector.EMPTY, fs__$1)
|
|
};
|
|
var G__14144__1 = function(x) {
|
|
return cljs.core.reduce.call(null, function(p1__14126_SHARP_, p2__14127_SHARP_) {
|
|
return cljs.core.conj.call(null, p1__14126_SHARP_, p2__14127_SHARP_.call(null, x))
|
|
}, cljs.core.PersistentVector.EMPTY, fs__$1)
|
|
};
|
|
var G__14144__2 = function(x, y) {
|
|
return cljs.core.reduce.call(null, function(p1__14128_SHARP_, p2__14129_SHARP_) {
|
|
return cljs.core.conj.call(null, p1__14128_SHARP_, p2__14129_SHARP_.call(null, x, y))
|
|
}, cljs.core.PersistentVector.EMPTY, fs__$1)
|
|
};
|
|
var G__14144__3 = function(x, y, z) {
|
|
return cljs.core.reduce.call(null, function(p1__14130_SHARP_, p2__14131_SHARP_) {
|
|
return cljs.core.conj.call(null, p1__14130_SHARP_, p2__14131_SHARP_.call(null, x, y, z))
|
|
}, cljs.core.PersistentVector.EMPTY, fs__$1)
|
|
};
|
|
var G__14144__4 = function() {
|
|
var G__14145__delegate = function(x, y, z, args) {
|
|
return cljs.core.reduce.call(null, function(p1__14132_SHARP_, p2__14133_SHARP_) {
|
|
return cljs.core.conj.call(null, p1__14132_SHARP_, cljs.core.apply.call(null, p2__14133_SHARP_, x, y, z, args))
|
|
}, cljs.core.PersistentVector.EMPTY, fs__$1)
|
|
};
|
|
var G__14145 = function(x, y, z, var_args) {
|
|
var args = null;
|
|
if(arguments.length > 3) {
|
|
args = cljs.core.array_seq(Array.prototype.slice.call(arguments, 3), 0)
|
|
}
|
|
return G__14145__delegate.call(this, x, y, z, args)
|
|
};
|
|
G__14145.cljs$lang$maxFixedArity = 3;
|
|
G__14145.cljs$lang$applyTo = function(arglist__14146) {
|
|
var x = cljs.core.first(arglist__14146);
|
|
arglist__14146 = cljs.core.next(arglist__14146);
|
|
var y = cljs.core.first(arglist__14146);
|
|
arglist__14146 = cljs.core.next(arglist__14146);
|
|
var z = cljs.core.first(arglist__14146);
|
|
var args = cljs.core.rest(arglist__14146);
|
|
return G__14145__delegate(x, y, z, args)
|
|
};
|
|
G__14145.cljs$core$IFn$_invoke$arity$variadic = G__14145__delegate;
|
|
return G__14145
|
|
}();
|
|
G__14144 = function(x, y, z, var_args) {
|
|
var args = var_args;
|
|
switch(arguments.length) {
|
|
case 0:
|
|
return G__14144__0.call(this);
|
|
case 1:
|
|
return G__14144__1.call(this, x);
|
|
case 2:
|
|
return G__14144__2.call(this, x, y);
|
|
case 3:
|
|
return G__14144__3.call(this, x, y, z);
|
|
default:
|
|
return G__14144__4.cljs$core$IFn$_invoke$arity$variadic(x, y, z, cljs.core.array_seq(arguments, 3))
|
|
}
|
|
throw new Error("Invalid arity: " + arguments.length);
|
|
};
|
|
G__14144.cljs$lang$maxFixedArity = 3;
|
|
G__14144.cljs$lang$applyTo = G__14144__4.cljs$lang$applyTo;
|
|
return G__14144
|
|
}()
|
|
};
|
|
var G__14143 = function(f, g, h, var_args) {
|
|
var fs = null;
|
|
if(arguments.length > 3) {
|
|
fs = cljs.core.array_seq(Array.prototype.slice.call(arguments, 3), 0)
|
|
}
|
|
return G__14143__delegate.call(this, f, g, h, fs)
|
|
};
|
|
G__14143.cljs$lang$maxFixedArity = 3;
|
|
G__14143.cljs$lang$applyTo = function(arglist__14147) {
|
|
var f = cljs.core.first(arglist__14147);
|
|
arglist__14147 = cljs.core.next(arglist__14147);
|
|
var g = cljs.core.first(arglist__14147);
|
|
arglist__14147 = cljs.core.next(arglist__14147);
|
|
var h = cljs.core.first(arglist__14147);
|
|
var fs = cljs.core.rest(arglist__14147);
|
|
return G__14143__delegate(f, g, h, fs)
|
|
};
|
|
G__14143.cljs$core$IFn$_invoke$arity$variadic = G__14143__delegate;
|
|
return G__14143
|
|
}();
|
|
juxt = function(f, g, h, var_args) {
|
|
var fs = var_args;
|
|
switch(arguments.length) {
|
|
case 1:
|
|
return juxt__1.call(this, f);
|
|
case 2:
|
|
return juxt__2.call(this, f, g);
|
|
case 3:
|
|
return juxt__3.call(this, f, g, h);
|
|
default:
|
|
return juxt__4.cljs$core$IFn$_invoke$arity$variadic(f, g, h, cljs.core.array_seq(arguments, 3))
|
|
}
|
|
throw new Error("Invalid arity: " + arguments.length);
|
|
};
|
|
juxt.cljs$lang$maxFixedArity = 3;
|
|
juxt.cljs$lang$applyTo = juxt__4.cljs$lang$applyTo;
|
|
juxt.cljs$core$IFn$_invoke$arity$1 = juxt__1;
|
|
juxt.cljs$core$IFn$_invoke$arity$2 = juxt__2;
|
|
juxt.cljs$core$IFn$_invoke$arity$3 = juxt__3;
|
|
juxt.cljs$core$IFn$_invoke$arity$variadic = juxt__4.cljs$core$IFn$_invoke$arity$variadic;
|
|
return juxt
|
|
}();
|
|
cljs.core.dorun = function() {
|
|
var dorun = null;
|
|
var dorun__1 = function(coll) {
|
|
while(true) {
|
|
if(cljs.core.seq.call(null, coll)) {
|
|
var G__14148 = cljs.core.next.call(null, coll);
|
|
coll = G__14148;
|
|
continue
|
|
}else {
|
|
return null
|
|
}
|
|
break
|
|
}
|
|
};
|
|
var dorun__2 = function(n, coll) {
|
|
while(true) {
|
|
if(cljs.core.truth_(function() {
|
|
var and__3941__auto__ = cljs.core.seq.call(null, coll);
|
|
if(and__3941__auto__) {
|
|
return n > 0
|
|
}else {
|
|
return and__3941__auto__
|
|
}
|
|
}())) {
|
|
var G__14149 = n - 1;
|
|
var G__14150 = cljs.core.next.call(null, coll);
|
|
n = G__14149;
|
|
coll = G__14150;
|
|
continue
|
|
}else {
|
|
return null
|
|
}
|
|
break
|
|
}
|
|
};
|
|
dorun = function(n, coll) {
|
|
switch(arguments.length) {
|
|
case 1:
|
|
return dorun__1.call(this, n);
|
|
case 2:
|
|
return dorun__2.call(this, n, coll)
|
|
}
|
|
throw new Error("Invalid arity: " + arguments.length);
|
|
};
|
|
dorun.cljs$core$IFn$_invoke$arity$1 = dorun__1;
|
|
dorun.cljs$core$IFn$_invoke$arity$2 = dorun__2;
|
|
return dorun
|
|
}();
|
|
cljs.core.doall = function() {
|
|
var doall = null;
|
|
var doall__1 = function(coll) {
|
|
cljs.core.dorun.call(null, coll);
|
|
return coll
|
|
};
|
|
var doall__2 = function(n, coll) {
|
|
cljs.core.dorun.call(null, n, coll);
|
|
return coll
|
|
};
|
|
doall = function(n, coll) {
|
|
switch(arguments.length) {
|
|
case 1:
|
|
return doall__1.call(this, n);
|
|
case 2:
|
|
return doall__2.call(this, n, coll)
|
|
}
|
|
throw new Error("Invalid arity: " + arguments.length);
|
|
};
|
|
doall.cljs$core$IFn$_invoke$arity$1 = doall__1;
|
|
doall.cljs$core$IFn$_invoke$arity$2 = doall__2;
|
|
return doall
|
|
}();
|
|
cljs.core.regexp_QMARK_ = function regexp_QMARK_(o) {
|
|
return o instanceof RegExp
|
|
};
|
|
cljs.core.re_matches = function re_matches(re, s) {
|
|
var matches = re.exec(s);
|
|
if(cljs.core._EQ_.call(null, cljs.core.first.call(null, matches), s)) {
|
|
if(cljs.core.count.call(null, matches) === 1) {
|
|
return cljs.core.first.call(null, matches)
|
|
}else {
|
|
return cljs.core.vec.call(null, matches)
|
|
}
|
|
}else {
|
|
return null
|
|
}
|
|
};
|
|
cljs.core.re_find = function re_find(re, s) {
|
|
var matches = re.exec(s);
|
|
if(matches == null) {
|
|
return null
|
|
}else {
|
|
if(cljs.core.count.call(null, matches) === 1) {
|
|
return cljs.core.first.call(null, matches)
|
|
}else {
|
|
return cljs.core.vec.call(null, matches)
|
|
}
|
|
}
|
|
};
|
|
cljs.core.re_seq = function re_seq(re, s) {
|
|
var match_data = cljs.core.re_find.call(null, re, s);
|
|
var match_idx = s.search(re);
|
|
var match_str = cljs.core.coll_QMARK_.call(null, match_data) ? cljs.core.first.call(null, match_data) : match_data;
|
|
var post_match = cljs.core.subs.call(null, s, match_idx + cljs.core.count.call(null, match_str));
|
|
if(cljs.core.truth_(match_data)) {
|
|
return new cljs.core.LazySeq(null, false, function() {
|
|
return cljs.core.cons.call(null, match_data, re_seq.call(null, re, post_match))
|
|
}, null)
|
|
}else {
|
|
return null
|
|
}
|
|
};
|
|
cljs.core.re_pattern = function re_pattern(s) {
|
|
var vec__14152 = cljs.core.re_find.call(null, /^(?:\(\?([idmsux]*)\))?(.*)/, s);
|
|
var _ = cljs.core.nth.call(null, vec__14152, 0, null);
|
|
var flags = cljs.core.nth.call(null, vec__14152, 1, null);
|
|
var pattern = cljs.core.nth.call(null, vec__14152, 2, null);
|
|
return new RegExp(pattern, flags)
|
|
};
|
|
cljs.core.pr_sequential_writer = function pr_sequential_writer(writer, print_one, begin, sep, end, opts, coll) {
|
|
cljs.core._write.call(null, writer, begin);
|
|
if(cljs.core.seq.call(null, coll)) {
|
|
print_one.call(null, cljs.core.first.call(null, coll), writer, opts)
|
|
}else {
|
|
}
|
|
var seq__14157_14161 = cljs.core.seq.call(null, cljs.core.next.call(null, coll));
|
|
var chunk__14158_14162 = null;
|
|
var count__14159_14163 = 0;
|
|
var i__14160_14164 = 0;
|
|
while(true) {
|
|
if(i__14160_14164 < count__14159_14163) {
|
|
var o_14165 = cljs.core._nth.call(null, chunk__14158_14162, i__14160_14164);
|
|
cljs.core._write.call(null, writer, sep);
|
|
print_one.call(null, o_14165, writer, opts);
|
|
var G__14166 = seq__14157_14161;
|
|
var G__14167 = chunk__14158_14162;
|
|
var G__14168 = count__14159_14163;
|
|
var G__14169 = i__14160_14164 + 1;
|
|
seq__14157_14161 = G__14166;
|
|
chunk__14158_14162 = G__14167;
|
|
count__14159_14163 = G__14168;
|
|
i__14160_14164 = G__14169;
|
|
continue
|
|
}else {
|
|
var temp__4092__auto___14170 = cljs.core.seq.call(null, seq__14157_14161);
|
|
if(temp__4092__auto___14170) {
|
|
var seq__14157_14171__$1 = temp__4092__auto___14170;
|
|
if(cljs.core.chunked_seq_QMARK_.call(null, seq__14157_14171__$1)) {
|
|
var c__3037__auto___14172 = cljs.core.chunk_first.call(null, seq__14157_14171__$1);
|
|
var G__14173 = cljs.core.chunk_rest.call(null, seq__14157_14171__$1);
|
|
var G__14174 = c__3037__auto___14172;
|
|
var G__14175 = cljs.core.count.call(null, c__3037__auto___14172);
|
|
var G__14176 = 0;
|
|
seq__14157_14161 = G__14173;
|
|
chunk__14158_14162 = G__14174;
|
|
count__14159_14163 = G__14175;
|
|
i__14160_14164 = G__14176;
|
|
continue
|
|
}else {
|
|
var o_14177 = cljs.core.first.call(null, seq__14157_14171__$1);
|
|
cljs.core._write.call(null, writer, sep);
|
|
print_one.call(null, o_14177, writer, opts);
|
|
var G__14178 = cljs.core.next.call(null, seq__14157_14171__$1);
|
|
var G__14179 = null;
|
|
var G__14180 = 0;
|
|
var G__14181 = 0;
|
|
seq__14157_14161 = G__14178;
|
|
chunk__14158_14162 = G__14179;
|
|
count__14159_14163 = G__14180;
|
|
i__14160_14164 = G__14181;
|
|
continue
|
|
}
|
|
}else {
|
|
}
|
|
}
|
|
break
|
|
}
|
|
return cljs.core._write.call(null, writer, end)
|
|
};
|
|
cljs.core.write_all = function() {
|
|
var write_all__delegate = function(writer, ss) {
|
|
var seq__14186 = cljs.core.seq.call(null, ss);
|
|
var chunk__14187 = null;
|
|
var count__14188 = 0;
|
|
var i__14189 = 0;
|
|
while(true) {
|
|
if(i__14189 < count__14188) {
|
|
var s = cljs.core._nth.call(null, chunk__14187, i__14189);
|
|
cljs.core._write.call(null, writer, s);
|
|
var G__14190 = seq__14186;
|
|
var G__14191 = chunk__14187;
|
|
var G__14192 = count__14188;
|
|
var G__14193 = i__14189 + 1;
|
|
seq__14186 = G__14190;
|
|
chunk__14187 = G__14191;
|
|
count__14188 = G__14192;
|
|
i__14189 = G__14193;
|
|
continue
|
|
}else {
|
|
var temp__4092__auto__ = cljs.core.seq.call(null, seq__14186);
|
|
if(temp__4092__auto__) {
|
|
var seq__14186__$1 = temp__4092__auto__;
|
|
if(cljs.core.chunked_seq_QMARK_.call(null, seq__14186__$1)) {
|
|
var c__3037__auto__ = cljs.core.chunk_first.call(null, seq__14186__$1);
|
|
var G__14194 = cljs.core.chunk_rest.call(null, seq__14186__$1);
|
|
var G__14195 = c__3037__auto__;
|
|
var G__14196 = cljs.core.count.call(null, c__3037__auto__);
|
|
var G__14197 = 0;
|
|
seq__14186 = G__14194;
|
|
chunk__14187 = G__14195;
|
|
count__14188 = G__14196;
|
|
i__14189 = G__14197;
|
|
continue
|
|
}else {
|
|
var s = cljs.core.first.call(null, seq__14186__$1);
|
|
cljs.core._write.call(null, writer, s);
|
|
var G__14198 = cljs.core.next.call(null, seq__14186__$1);
|
|
var G__14199 = null;
|
|
var G__14200 = 0;
|
|
var G__14201 = 0;
|
|
seq__14186 = G__14198;
|
|
chunk__14187 = G__14199;
|
|
count__14188 = G__14200;
|
|
i__14189 = G__14201;
|
|
continue
|
|
}
|
|
}else {
|
|
return null
|
|
}
|
|
}
|
|
break
|
|
}
|
|
};
|
|
var write_all = function(writer, var_args) {
|
|
var ss = null;
|
|
if(arguments.length > 1) {
|
|
ss = cljs.core.array_seq(Array.prototype.slice.call(arguments, 1), 0)
|
|
}
|
|
return write_all__delegate.call(this, writer, ss)
|
|
};
|
|
write_all.cljs$lang$maxFixedArity = 1;
|
|
write_all.cljs$lang$applyTo = function(arglist__14202) {
|
|
var writer = cljs.core.first(arglist__14202);
|
|
var ss = cljs.core.rest(arglist__14202);
|
|
return write_all__delegate(writer, ss)
|
|
};
|
|
write_all.cljs$core$IFn$_invoke$arity$variadic = write_all__delegate;
|
|
return write_all
|
|
}();
|
|
cljs.core.string_print = function string_print(x) {
|
|
cljs.core._STAR_print_fn_STAR_.call(null, x);
|
|
return null
|
|
};
|
|
cljs.core.flush = function flush() {
|
|
return null
|
|
};
|
|
cljs.core.char_escapes = {'"':'\\"', "\\":"\\\\", "\b":"\\b", "\f":"\\f", "\n":"\\n", "\r":"\\r", "\t":"\\t"};
|
|
cljs.core.quote_string = function quote_string(s) {
|
|
return[cljs.core.str('"'), cljs.core.str(s.replace(RegExp('[\\\\"\b\f\n\r\t]', "g"), function(match) {
|
|
return cljs.core.char_escapes[match]
|
|
})), cljs.core.str('"')].join("")
|
|
};
|
|
cljs.core.pr_writer = function pr_writer(obj, writer, opts) {
|
|
if(obj == null) {
|
|
return cljs.core._write.call(null, writer, "nil")
|
|
}else {
|
|
if(void 0 === obj) {
|
|
return cljs.core._write.call(null, writer, "#<undefined>")
|
|
}else {
|
|
if("\ufdd0:else") {
|
|
if(cljs.core.truth_(function() {
|
|
var and__3941__auto__ = cljs.core.get.call(null, opts, "\ufdd0:meta");
|
|
if(cljs.core.truth_(and__3941__auto__)) {
|
|
var and__3941__auto____$1 = function() {
|
|
var G__14206 = obj;
|
|
if(G__14206) {
|
|
if(function() {
|
|
var or__3943__auto__ = G__14206.cljs$lang$protocol_mask$partition0$ & 131072;
|
|
if(or__3943__auto__) {
|
|
return or__3943__auto__
|
|
}else {
|
|
return G__14206.cljs$core$IMeta$
|
|
}
|
|
}()) {
|
|
return true
|
|
}else {
|
|
if(!G__14206.cljs$lang$protocol_mask$partition0$) {
|
|
return cljs.core.type_satisfies_.call(null, cljs.core.IMeta, G__14206)
|
|
}else {
|
|
return false
|
|
}
|
|
}
|
|
}else {
|
|
return cljs.core.type_satisfies_.call(null, cljs.core.IMeta, G__14206)
|
|
}
|
|
}();
|
|
if(cljs.core.truth_(and__3941__auto____$1)) {
|
|
return cljs.core.meta.call(null, obj)
|
|
}else {
|
|
return and__3941__auto____$1
|
|
}
|
|
}else {
|
|
return and__3941__auto__
|
|
}
|
|
}())) {
|
|
cljs.core._write.call(null, writer, "^");
|
|
pr_writer.call(null, cljs.core.meta.call(null, obj), writer, opts);
|
|
cljs.core._write.call(null, writer, " ")
|
|
}else {
|
|
}
|
|
if(obj == null) {
|
|
return cljs.core._write.call(null, writer, "nil")
|
|
}else {
|
|
if(obj.cljs$lang$type) {
|
|
return obj.cljs$lang$ctorPrWriter(obj, writer, opts)
|
|
}else {
|
|
if(function() {
|
|
var G__14207 = obj;
|
|
if(G__14207) {
|
|
if(function() {
|
|
var or__3943__auto__ = G__14207.cljs$lang$protocol_mask$partition0$ & 2147483648;
|
|
if(or__3943__auto__) {
|
|
return or__3943__auto__
|
|
}else {
|
|
return G__14207.cljs$core$IPrintWithWriter$
|
|
}
|
|
}()) {
|
|
return true
|
|
}else {
|
|
return false
|
|
}
|
|
}else {
|
|
return false
|
|
}
|
|
}()) {
|
|
return cljs.core._pr_writer.call(null, obj, writer, opts)
|
|
}else {
|
|
if(function() {
|
|
var or__3943__auto__ = cljs.core.type.call(null, obj) === Boolean;
|
|
if(or__3943__auto__) {
|
|
return or__3943__auto__
|
|
}else {
|
|
return typeof obj === "number"
|
|
}
|
|
}()) {
|
|
return cljs.core._write.call(null, writer, [cljs.core.str(obj)].join(""))
|
|
}else {
|
|
if(obj instanceof Array) {
|
|
return cljs.core.pr_sequential_writer.call(null, writer, pr_writer, "#<Array [", ", ", "]>", opts, obj)
|
|
}else {
|
|
if(goog.isString(obj)) {
|
|
if(cljs.core.keyword_QMARK_.call(null, obj)) {
|
|
cljs.core._write.call(null, writer, ":");
|
|
var temp__4092__auto___14209 = cljs.core.namespace.call(null, obj);
|
|
if(cljs.core.truth_(temp__4092__auto___14209)) {
|
|
var nspc_14210 = temp__4092__auto___14209;
|
|
cljs.core.write_all.call(null, writer, [cljs.core.str(nspc_14210)].join(""), "/")
|
|
}else {
|
|
}
|
|
return cljs.core._write.call(null, writer, cljs.core.name.call(null, obj))
|
|
}else {
|
|
if(obj instanceof cljs.core.Symbol) {
|
|
var temp__4092__auto___14211 = cljs.core.namespace.call(null, obj);
|
|
if(cljs.core.truth_(temp__4092__auto___14211)) {
|
|
var nspc_14212 = temp__4092__auto___14211;
|
|
cljs.core.write_all.call(null, writer, [cljs.core.str(nspc_14212)].join(""), "/")
|
|
}else {
|
|
}
|
|
return cljs.core._write.call(null, writer, cljs.core.name.call(null, obj))
|
|
}else {
|
|
if("\ufdd0:else") {
|
|
if(cljs.core.truth_((new cljs.core.Keyword("\ufdd0:readably")).call(null, opts))) {
|
|
return cljs.core._write.call(null, writer, cljs.core.quote_string.call(null, obj))
|
|
}else {
|
|
return cljs.core._write.call(null, writer, obj)
|
|
}
|
|
}else {
|
|
return null
|
|
}
|
|
}
|
|
}
|
|
}else {
|
|
if(cljs.core.fn_QMARK_.call(null, obj)) {
|
|
return cljs.core.write_all.call(null, writer, "#<", [cljs.core.str(obj)].join(""), ">")
|
|
}else {
|
|
if(obj instanceof Date) {
|
|
var normalize = function(n, len) {
|
|
var ns = [cljs.core.str(n)].join("");
|
|
while(true) {
|
|
if(cljs.core.count.call(null, ns) < len) {
|
|
var G__14213 = [cljs.core.str("0"), cljs.core.str(ns)].join("");
|
|
ns = G__14213;
|
|
continue
|
|
}else {
|
|
return ns
|
|
}
|
|
break
|
|
}
|
|
};
|
|
return cljs.core.write_all.call(null, writer, '#inst "', [cljs.core.str(obj.getUTCFullYear())].join(""), "-", normalize.call(null, obj.getUTCMonth() + 1, 2), "-", normalize.call(null, obj.getUTCDate(), 2), "T", normalize.call(null, obj.getUTCHours(), 2), ":", normalize.call(null, obj.getUTCMinutes(), 2), ":", normalize.call(null, obj.getUTCSeconds(), 2), ".", normalize.call(null, obj.getUTCMilliseconds(), 3), "-", '00:00"')
|
|
}else {
|
|
if(cljs.core.truth_(cljs.core.regexp_QMARK_.call(null, obj))) {
|
|
return cljs.core.write_all.call(null, writer, '#"', obj.source, '"')
|
|
}else {
|
|
if(function() {
|
|
var G__14208 = obj;
|
|
if(G__14208) {
|
|
if(function() {
|
|
var or__3943__auto__ = G__14208.cljs$lang$protocol_mask$partition0$ & 2147483648;
|
|
if(or__3943__auto__) {
|
|
return or__3943__auto__
|
|
}else {
|
|
return G__14208.cljs$core$IPrintWithWriter$
|
|
}
|
|
}()) {
|
|
return true
|
|
}else {
|
|
if(!G__14208.cljs$lang$protocol_mask$partition0$) {
|
|
return cljs.core.type_satisfies_.call(null, cljs.core.IPrintWithWriter, G__14208)
|
|
}else {
|
|
return false
|
|
}
|
|
}
|
|
}else {
|
|
return cljs.core.type_satisfies_.call(null, cljs.core.IPrintWithWriter, G__14208)
|
|
}
|
|
}()) {
|
|
return cljs.core._pr_writer.call(null, obj, writer, opts)
|
|
}else {
|
|
if("\ufdd0:else") {
|
|
return cljs.core.write_all.call(null, writer, "#<", [cljs.core.str(obj)].join(""), ">")
|
|
}else {
|
|
return null
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}else {
|
|
return null
|
|
}
|
|
}
|
|
}
|
|
};
|
|
cljs.core.pr_seq_writer = function pr_seq_writer(objs, writer, opts) {
|
|
cljs.core.pr_writer.call(null, cljs.core.first.call(null, objs), writer, opts);
|
|
var seq__14218 = cljs.core.seq.call(null, cljs.core.next.call(null, objs));
|
|
var chunk__14219 = null;
|
|
var count__14220 = 0;
|
|
var i__14221 = 0;
|
|
while(true) {
|
|
if(i__14221 < count__14220) {
|
|
var obj = cljs.core._nth.call(null, chunk__14219, i__14221);
|
|
cljs.core._write.call(null, writer, " ");
|
|
cljs.core.pr_writer.call(null, obj, writer, opts);
|
|
var G__14222 = seq__14218;
|
|
var G__14223 = chunk__14219;
|
|
var G__14224 = count__14220;
|
|
var G__14225 = i__14221 + 1;
|
|
seq__14218 = G__14222;
|
|
chunk__14219 = G__14223;
|
|
count__14220 = G__14224;
|
|
i__14221 = G__14225;
|
|
continue
|
|
}else {
|
|
var temp__4092__auto__ = cljs.core.seq.call(null, seq__14218);
|
|
if(temp__4092__auto__) {
|
|
var seq__14218__$1 = temp__4092__auto__;
|
|
if(cljs.core.chunked_seq_QMARK_.call(null, seq__14218__$1)) {
|
|
var c__3037__auto__ = cljs.core.chunk_first.call(null, seq__14218__$1);
|
|
var G__14226 = cljs.core.chunk_rest.call(null, seq__14218__$1);
|
|
var G__14227 = c__3037__auto__;
|
|
var G__14228 = cljs.core.count.call(null, c__3037__auto__);
|
|
var G__14229 = 0;
|
|
seq__14218 = G__14226;
|
|
chunk__14219 = G__14227;
|
|
count__14220 = G__14228;
|
|
i__14221 = G__14229;
|
|
continue
|
|
}else {
|
|
var obj = cljs.core.first.call(null, seq__14218__$1);
|
|
cljs.core._write.call(null, writer, " ");
|
|
cljs.core.pr_writer.call(null, obj, writer, opts);
|
|
var G__14230 = cljs.core.next.call(null, seq__14218__$1);
|
|
var G__14231 = null;
|
|
var G__14232 = 0;
|
|
var G__14233 = 0;
|
|
seq__14218 = G__14230;
|
|
chunk__14219 = G__14231;
|
|
count__14220 = G__14232;
|
|
i__14221 = G__14233;
|
|
continue
|
|
}
|
|
}else {
|
|
return null
|
|
}
|
|
}
|
|
break
|
|
}
|
|
};
|
|
cljs.core.pr_sb_with_opts = function pr_sb_with_opts(objs, opts) {
|
|
var sb = new goog.string.StringBuffer;
|
|
var writer = new cljs.core.StringBufferWriter(sb);
|
|
cljs.core.pr_seq_writer.call(null, objs, writer, opts);
|
|
cljs.core._flush.call(null, writer);
|
|
return sb
|
|
};
|
|
cljs.core.pr_str_with_opts = function pr_str_with_opts(objs, opts) {
|
|
if(cljs.core.empty_QMARK_.call(null, objs)) {
|
|
return""
|
|
}else {
|
|
return[cljs.core.str(cljs.core.pr_sb_with_opts.call(null, objs, opts))].join("")
|
|
}
|
|
};
|
|
cljs.core.prn_str_with_opts = function prn_str_with_opts(objs, opts) {
|
|
if(cljs.core.empty_QMARK_.call(null, objs)) {
|
|
return"\n"
|
|
}else {
|
|
var sb = cljs.core.pr_sb_with_opts.call(null, objs, opts);
|
|
sb.append("\n");
|
|
return[cljs.core.str(sb)].join("")
|
|
}
|
|
};
|
|
cljs.core.pr_with_opts = function pr_with_opts(objs, opts) {
|
|
return cljs.core.string_print.call(null, cljs.core.pr_str_with_opts.call(null, objs, opts))
|
|
};
|
|
cljs.core.newline = function newline(opts) {
|
|
cljs.core.string_print.call(null, "\n");
|
|
if(cljs.core.truth_(cljs.core.get.call(null, opts, "\ufdd0:flush-on-newline"))) {
|
|
return cljs.core.flush.call(null)
|
|
}else {
|
|
return null
|
|
}
|
|
};
|
|
cljs.core.pr_str = function() {
|
|
var pr_str__delegate = function(objs) {
|
|
return cljs.core.pr_str_with_opts.call(null, objs, cljs.core.pr_opts.call(null))
|
|
};
|
|
var pr_str = function(var_args) {
|
|
var objs = null;
|
|
if(arguments.length > 0) {
|
|
objs = cljs.core.array_seq(Array.prototype.slice.call(arguments, 0), 0)
|
|
}
|
|
return pr_str__delegate.call(this, objs)
|
|
};
|
|
pr_str.cljs$lang$maxFixedArity = 0;
|
|
pr_str.cljs$lang$applyTo = function(arglist__14234) {
|
|
var objs = cljs.core.seq(arglist__14234);
|
|
return pr_str__delegate(objs)
|
|
};
|
|
pr_str.cljs$core$IFn$_invoke$arity$variadic = pr_str__delegate;
|
|
return pr_str
|
|
}();
|
|
cljs.core.prn_str = function() {
|
|
var prn_str__delegate = function(objs) {
|
|
return cljs.core.prn_str_with_opts.call(null, objs, cljs.core.pr_opts.call(null))
|
|
};
|
|
var prn_str = function(var_args) {
|
|
var objs = null;
|
|
if(arguments.length > 0) {
|
|
objs = cljs.core.array_seq(Array.prototype.slice.call(arguments, 0), 0)
|
|
}
|
|
return prn_str__delegate.call(this, objs)
|
|
};
|
|
prn_str.cljs$lang$maxFixedArity = 0;
|
|
prn_str.cljs$lang$applyTo = function(arglist__14235) {
|
|
var objs = cljs.core.seq(arglist__14235);
|
|
return prn_str__delegate(objs)
|
|
};
|
|
prn_str.cljs$core$IFn$_invoke$arity$variadic = prn_str__delegate;
|
|
return prn_str
|
|
}();
|
|
cljs.core.pr = function() {
|
|
var pr__delegate = function(objs) {
|
|
return cljs.core.pr_with_opts.call(null, objs, cljs.core.pr_opts.call(null))
|
|
};
|
|
var pr = function(var_args) {
|
|
var objs = null;
|
|
if(arguments.length > 0) {
|
|
objs = cljs.core.array_seq(Array.prototype.slice.call(arguments, 0), 0)
|
|
}
|
|
return pr__delegate.call(this, objs)
|
|
};
|
|
pr.cljs$lang$maxFixedArity = 0;
|
|
pr.cljs$lang$applyTo = function(arglist__14236) {
|
|
var objs = cljs.core.seq(arglist__14236);
|
|
return pr__delegate(objs)
|
|
};
|
|
pr.cljs$core$IFn$_invoke$arity$variadic = pr__delegate;
|
|
return pr
|
|
}();
|
|
cljs.core.print = function() {
|
|
var cljs_core_print__delegate = function(objs) {
|
|
return cljs.core.pr_with_opts.call(null, objs, cljs.core.assoc.call(null, cljs.core.pr_opts.call(null), "\ufdd0:readably", false))
|
|
};
|
|
var cljs_core_print = function(var_args) {
|
|
var objs = null;
|
|
if(arguments.length > 0) {
|
|
objs = cljs.core.array_seq(Array.prototype.slice.call(arguments, 0), 0)
|
|
}
|
|
return cljs_core_print__delegate.call(this, objs)
|
|
};
|
|
cljs_core_print.cljs$lang$maxFixedArity = 0;
|
|
cljs_core_print.cljs$lang$applyTo = function(arglist__14237) {
|
|
var objs = cljs.core.seq(arglist__14237);
|
|
return cljs_core_print__delegate(objs)
|
|
};
|
|
cljs_core_print.cljs$core$IFn$_invoke$arity$variadic = cljs_core_print__delegate;
|
|
return cljs_core_print
|
|
}();
|
|
cljs.core.print_str = function() {
|
|
var print_str__delegate = function(objs) {
|
|
return cljs.core.pr_str_with_opts.call(null, objs, cljs.core.assoc.call(null, cljs.core.pr_opts.call(null), "\ufdd0:readably", false))
|
|
};
|
|
var print_str = function(var_args) {
|
|
var objs = null;
|
|
if(arguments.length > 0) {
|
|
objs = cljs.core.array_seq(Array.prototype.slice.call(arguments, 0), 0)
|
|
}
|
|
return print_str__delegate.call(this, objs)
|
|
};
|
|
print_str.cljs$lang$maxFixedArity = 0;
|
|
print_str.cljs$lang$applyTo = function(arglist__14238) {
|
|
var objs = cljs.core.seq(arglist__14238);
|
|
return print_str__delegate(objs)
|
|
};
|
|
print_str.cljs$core$IFn$_invoke$arity$variadic = print_str__delegate;
|
|
return print_str
|
|
}();
|
|
cljs.core.println = function() {
|
|
var println__delegate = function(objs) {
|
|
cljs.core.pr_with_opts.call(null, objs, cljs.core.assoc.call(null, cljs.core.pr_opts.call(null), "\ufdd0:readably", false));
|
|
return cljs.core.newline.call(null, cljs.core.pr_opts.call(null))
|
|
};
|
|
var println = function(var_args) {
|
|
var objs = null;
|
|
if(arguments.length > 0) {
|
|
objs = cljs.core.array_seq(Array.prototype.slice.call(arguments, 0), 0)
|
|
}
|
|
return println__delegate.call(this, objs)
|
|
};
|
|
println.cljs$lang$maxFixedArity = 0;
|
|
println.cljs$lang$applyTo = function(arglist__14239) {
|
|
var objs = cljs.core.seq(arglist__14239);
|
|
return println__delegate(objs)
|
|
};
|
|
println.cljs$core$IFn$_invoke$arity$variadic = println__delegate;
|
|
return println
|
|
}();
|
|
cljs.core.println_str = function() {
|
|
var println_str__delegate = function(objs) {
|
|
return cljs.core.prn_str_with_opts.call(null, objs, cljs.core.assoc.call(null, cljs.core.pr_opts.call(null), "\ufdd0:readably", false))
|
|
};
|
|
var println_str = function(var_args) {
|
|
var objs = null;
|
|
if(arguments.length > 0) {
|
|
objs = cljs.core.array_seq(Array.prototype.slice.call(arguments, 0), 0)
|
|
}
|
|
return println_str__delegate.call(this, objs)
|
|
};
|
|
println_str.cljs$lang$maxFixedArity = 0;
|
|
println_str.cljs$lang$applyTo = function(arglist__14240) {
|
|
var objs = cljs.core.seq(arglist__14240);
|
|
return println_str__delegate(objs)
|
|
};
|
|
println_str.cljs$core$IFn$_invoke$arity$variadic = println_str__delegate;
|
|
return println_str
|
|
}();
|
|
cljs.core.prn = function() {
|
|
var prn__delegate = function(objs) {
|
|
cljs.core.pr_with_opts.call(null, objs, cljs.core.pr_opts.call(null));
|
|
return cljs.core.newline.call(null, cljs.core.pr_opts.call(null))
|
|
};
|
|
var prn = function(var_args) {
|
|
var objs = null;
|
|
if(arguments.length > 0) {
|
|
objs = cljs.core.array_seq(Array.prototype.slice.call(arguments, 0), 0)
|
|
}
|
|
return prn__delegate.call(this, objs)
|
|
};
|
|
prn.cljs$lang$maxFixedArity = 0;
|
|
prn.cljs$lang$applyTo = function(arglist__14241) {
|
|
var objs = cljs.core.seq(arglist__14241);
|
|
return prn__delegate(objs)
|
|
};
|
|
prn.cljs$core$IFn$_invoke$arity$variadic = prn__delegate;
|
|
return prn
|
|
}();
|
|
cljs.core.printf = function() {
|
|
var printf__delegate = function(fmt, args) {
|
|
return cljs.core.print.call(null, cljs.core.apply.call(null, cljs.core.format, fmt, args))
|
|
};
|
|
var printf = function(fmt, var_args) {
|
|
var args = null;
|
|
if(arguments.length > 1) {
|
|
args = cljs.core.array_seq(Array.prototype.slice.call(arguments, 1), 0)
|
|
}
|
|
return printf__delegate.call(this, fmt, args)
|
|
};
|
|
printf.cljs$lang$maxFixedArity = 1;
|
|
printf.cljs$lang$applyTo = function(arglist__14242) {
|
|
var fmt = cljs.core.first(arglist__14242);
|
|
var args = cljs.core.rest(arglist__14242);
|
|
return printf__delegate(fmt, args)
|
|
};
|
|
printf.cljs$core$IFn$_invoke$arity$variadic = printf__delegate;
|
|
return printf
|
|
}();
|
|
cljs.core.KeySeq.prototype.cljs$core$IPrintWithWriter$ = true;
|
|
cljs.core.KeySeq.prototype.cljs$core$IPrintWithWriter$_pr_writer$arity$3 = function(coll, writer, opts) {
|
|
return cljs.core.pr_sequential_writer.call(null, writer, cljs.core.pr_writer, "(", " ", ")", opts, coll)
|
|
};
|
|
cljs.core.IndexedSeq.prototype.cljs$core$IPrintWithWriter$ = true;
|
|
cljs.core.IndexedSeq.prototype.cljs$core$IPrintWithWriter$_pr_writer$arity$3 = function(coll, writer, opts) {
|
|
return cljs.core.pr_sequential_writer.call(null, writer, cljs.core.pr_writer, "(", " ", ")", opts, coll)
|
|
};
|
|
cljs.core.Subvec.prototype.cljs$core$IPrintWithWriter$ = true;
|
|
cljs.core.Subvec.prototype.cljs$core$IPrintWithWriter$_pr_writer$arity$3 = function(coll, writer, opts) {
|
|
return cljs.core.pr_sequential_writer.call(null, writer, cljs.core.pr_writer, "[", " ", "]", opts, coll)
|
|
};
|
|
cljs.core.ChunkedCons.prototype.cljs$core$IPrintWithWriter$ = true;
|
|
cljs.core.ChunkedCons.prototype.cljs$core$IPrintWithWriter$_pr_writer$arity$3 = function(coll, writer, opts) {
|
|
return cljs.core.pr_sequential_writer.call(null, writer, cljs.core.pr_writer, "(", " ", ")", opts, coll)
|
|
};
|
|
cljs.core.PersistentTreeMap.prototype.cljs$core$IPrintWithWriter$ = true;
|
|
cljs.core.PersistentTreeMap.prototype.cljs$core$IPrintWithWriter$_pr_writer$arity$3 = function(coll, writer, opts) {
|
|
var pr_pair = function(keyval) {
|
|
return cljs.core.pr_sequential_writer.call(null, writer, cljs.core.pr_writer, "", " ", "", opts, keyval)
|
|
};
|
|
return cljs.core.pr_sequential_writer.call(null, writer, pr_pair, "{", ", ", "}", opts, coll)
|
|
};
|
|
cljs.core.PersistentArrayMap.prototype.cljs$core$IPrintWithWriter$ = true;
|
|
cljs.core.PersistentArrayMap.prototype.cljs$core$IPrintWithWriter$_pr_writer$arity$3 = function(coll, writer, opts) {
|
|
var pr_pair = function(keyval) {
|
|
return cljs.core.pr_sequential_writer.call(null, writer, cljs.core.pr_writer, "", " ", "", opts, keyval)
|
|
};
|
|
return cljs.core.pr_sequential_writer.call(null, writer, pr_pair, "{", ", ", "}", opts, coll)
|
|
};
|
|
cljs.core.PersistentQueue.prototype.cljs$core$IPrintWithWriter$ = true;
|
|
cljs.core.PersistentQueue.prototype.cljs$core$IPrintWithWriter$_pr_writer$arity$3 = function(coll, writer, opts) {
|
|
return cljs.core.pr_sequential_writer.call(null, writer, cljs.core.pr_writer, "#queue [", " ", "]", opts, cljs.core.seq.call(null, coll))
|
|
};
|
|
cljs.core.LazySeq.prototype.cljs$core$IPrintWithWriter$ = true;
|
|
cljs.core.LazySeq.prototype.cljs$core$IPrintWithWriter$_pr_writer$arity$3 = function(coll, writer, opts) {
|
|
return cljs.core.pr_sequential_writer.call(null, writer, cljs.core.pr_writer, "(", " ", ")", opts, coll)
|
|
};
|
|
cljs.core.RSeq.prototype.cljs$core$IPrintWithWriter$ = true;
|
|
cljs.core.RSeq.prototype.cljs$core$IPrintWithWriter$_pr_writer$arity$3 = function(coll, writer, opts) {
|
|
return cljs.core.pr_sequential_writer.call(null, writer, cljs.core.pr_writer, "(", " ", ")", opts, coll)
|
|
};
|
|
cljs.core.PersistentTreeSet.prototype.cljs$core$IPrintWithWriter$ = true;
|
|
cljs.core.PersistentTreeSet.prototype.cljs$core$IPrintWithWriter$_pr_writer$arity$3 = function(coll, writer, opts) {
|
|
return cljs.core.pr_sequential_writer.call(null, writer, cljs.core.pr_writer, "#{", " ", "}", opts, coll)
|
|
};
|
|
cljs.core.NodeSeq.prototype.cljs$core$IPrintWithWriter$ = true;
|
|
cljs.core.NodeSeq.prototype.cljs$core$IPrintWithWriter$_pr_writer$arity$3 = function(coll, writer, opts) {
|
|
return cljs.core.pr_sequential_writer.call(null, writer, cljs.core.pr_writer, "(", " ", ")", opts, coll)
|
|
};
|
|
cljs.core.RedNode.prototype.cljs$core$IPrintWithWriter$ = true;
|
|
cljs.core.RedNode.prototype.cljs$core$IPrintWithWriter$_pr_writer$arity$3 = function(coll, writer, opts) {
|
|
return cljs.core.pr_sequential_writer.call(null, writer, cljs.core.pr_writer, "[", " ", "]", opts, coll)
|
|
};
|
|
cljs.core.ChunkedSeq.prototype.cljs$core$IPrintWithWriter$ = true;
|
|
cljs.core.ChunkedSeq.prototype.cljs$core$IPrintWithWriter$_pr_writer$arity$3 = function(coll, writer, opts) {
|
|
return cljs.core.pr_sequential_writer.call(null, writer, cljs.core.pr_writer, "(", " ", ")", opts, coll)
|
|
};
|
|
cljs.core.PersistentHashMap.prototype.cljs$core$IPrintWithWriter$ = true;
|
|
cljs.core.PersistentHashMap.prototype.cljs$core$IPrintWithWriter$_pr_writer$arity$3 = function(coll, writer, opts) {
|
|
var pr_pair = function(keyval) {
|
|
return cljs.core.pr_sequential_writer.call(null, writer, cljs.core.pr_writer, "", " ", "", opts, keyval)
|
|
};
|
|
return cljs.core.pr_sequential_writer.call(null, writer, pr_pair, "{", ", ", "}", opts, coll)
|
|
};
|
|
cljs.core.PersistentHashSet.prototype.cljs$core$IPrintWithWriter$ = true;
|
|
cljs.core.PersistentHashSet.prototype.cljs$core$IPrintWithWriter$_pr_writer$arity$3 = function(coll, writer, opts) {
|
|
return cljs.core.pr_sequential_writer.call(null, writer, cljs.core.pr_writer, "#{", " ", "}", opts, coll)
|
|
};
|
|
cljs.core.PersistentVector.prototype.cljs$core$IPrintWithWriter$ = true;
|
|
cljs.core.PersistentVector.prototype.cljs$core$IPrintWithWriter$_pr_writer$arity$3 = function(coll, writer, opts) {
|
|
return cljs.core.pr_sequential_writer.call(null, writer, cljs.core.pr_writer, "[", " ", "]", opts, coll)
|
|
};
|
|
cljs.core.List.prototype.cljs$core$IPrintWithWriter$ = true;
|
|
cljs.core.List.prototype.cljs$core$IPrintWithWriter$_pr_writer$arity$3 = function(coll, writer, opts) {
|
|
return cljs.core.pr_sequential_writer.call(null, writer, cljs.core.pr_writer, "(", " ", ")", opts, coll)
|
|
};
|
|
cljs.core.PersistentArrayMapSeq.prototype.cljs$core$IPrintWithWriter$ = true;
|
|
cljs.core.PersistentArrayMapSeq.prototype.cljs$core$IPrintWithWriter$_pr_writer$arity$3 = function(coll, writer, opts) {
|
|
return cljs.core.pr_sequential_writer.call(null, writer, cljs.core.pr_writer, "(", " ", ")", opts, coll)
|
|
};
|
|
cljs.core.EmptyList.prototype.cljs$core$IPrintWithWriter$ = true;
|
|
cljs.core.EmptyList.prototype.cljs$core$IPrintWithWriter$_pr_writer$arity$3 = function(coll, writer, opts) {
|
|
return cljs.core._write.call(null, writer, "()")
|
|
};
|
|
cljs.core.BlackNode.prototype.cljs$core$IPrintWithWriter$ = true;
|
|
cljs.core.BlackNode.prototype.cljs$core$IPrintWithWriter$_pr_writer$arity$3 = function(coll, writer, opts) {
|
|
return cljs.core.pr_sequential_writer.call(null, writer, cljs.core.pr_writer, "[", " ", "]", opts, coll)
|
|
};
|
|
cljs.core.Cons.prototype.cljs$core$IPrintWithWriter$ = true;
|
|
cljs.core.Cons.prototype.cljs$core$IPrintWithWriter$_pr_writer$arity$3 = function(coll, writer, opts) {
|
|
return cljs.core.pr_sequential_writer.call(null, writer, cljs.core.pr_writer, "(", " ", ")", opts, coll)
|
|
};
|
|
cljs.core.Range.prototype.cljs$core$IPrintWithWriter$ = true;
|
|
cljs.core.Range.prototype.cljs$core$IPrintWithWriter$_pr_writer$arity$3 = function(coll, writer, opts) {
|
|
return cljs.core.pr_sequential_writer.call(null, writer, cljs.core.pr_writer, "(", " ", ")", opts, coll)
|
|
};
|
|
cljs.core.ArrayNodeSeq.prototype.cljs$core$IPrintWithWriter$ = true;
|
|
cljs.core.ArrayNodeSeq.prototype.cljs$core$IPrintWithWriter$_pr_writer$arity$3 = function(coll, writer, opts) {
|
|
return cljs.core.pr_sequential_writer.call(null, writer, cljs.core.pr_writer, "(", " ", ")", opts, coll)
|
|
};
|
|
cljs.core.ValSeq.prototype.cljs$core$IPrintWithWriter$ = true;
|
|
cljs.core.ValSeq.prototype.cljs$core$IPrintWithWriter$_pr_writer$arity$3 = function(coll, writer, opts) {
|
|
return cljs.core.pr_sequential_writer.call(null, writer, cljs.core.pr_writer, "(", " ", ")", opts, coll)
|
|
};
|
|
cljs.core.ObjMap.prototype.cljs$core$IPrintWithWriter$ = true;
|
|
cljs.core.ObjMap.prototype.cljs$core$IPrintWithWriter$_pr_writer$arity$3 = function(coll, writer, opts) {
|
|
var pr_pair = function(keyval) {
|
|
return cljs.core.pr_sequential_writer.call(null, writer, cljs.core.pr_writer, "", " ", "", opts, keyval)
|
|
};
|
|
return cljs.core.pr_sequential_writer.call(null, writer, pr_pair, "{", ", ", "}", opts, coll)
|
|
};
|
|
cljs.core.PersistentTreeMapSeq.prototype.cljs$core$IPrintWithWriter$ = true;
|
|
cljs.core.PersistentTreeMapSeq.prototype.cljs$core$IPrintWithWriter$_pr_writer$arity$3 = function(coll, writer, opts) {
|
|
return cljs.core.pr_sequential_writer.call(null, writer, cljs.core.pr_writer, "(", " ", ")", opts, coll)
|
|
};
|
|
cljs.core.PersistentVector.prototype.cljs$core$IComparable$ = true;
|
|
cljs.core.PersistentVector.prototype.cljs$core$IComparable$_compare$arity$2 = function(x, y) {
|
|
return cljs.core.compare_indexed.call(null, x, y)
|
|
};
|
|
cljs.core.Subvec.prototype.cljs$core$IComparable$ = true;
|
|
cljs.core.Subvec.prototype.cljs$core$IComparable$_compare$arity$2 = function(x, y) {
|
|
return cljs.core.compare_indexed.call(null, x, y)
|
|
};
|
|
goog.provide("cljs.core.Atom");
|
|
cljs.core.Atom = function(state, meta, validator, watches) {
|
|
this.state = state;
|
|
this.meta = meta;
|
|
this.validator = validator;
|
|
this.watches = watches;
|
|
this.cljs$lang$protocol_mask$partition0$ = 2153938944;
|
|
this.cljs$lang$protocol_mask$partition1$ = 2
|
|
};
|
|
cljs.core.Atom.cljs$lang$type = true;
|
|
cljs.core.Atom.cljs$lang$ctorStr = "cljs.core/Atom";
|
|
cljs.core.Atom.cljs$lang$ctorPrWriter = function(this__2847__auto__, writer__2848__auto__, opt__2849__auto__) {
|
|
return cljs.core._write.call(null, writer__2848__auto__, "cljs.core/Atom")
|
|
};
|
|
cljs.core.Atom.prototype.cljs$core$IHash$_hash$arity$1 = function(this$) {
|
|
var self__ = this;
|
|
return goog.getUid(this$)
|
|
};
|
|
cljs.core.Atom.prototype.cljs$core$IWatchable$_notify_watches$arity$3 = function(this$, oldval, newval) {
|
|
var self__ = this;
|
|
var seq__14243 = cljs.core.seq.call(null, self__.watches);
|
|
var chunk__14244 = null;
|
|
var count__14245 = 0;
|
|
var i__14246 = 0;
|
|
while(true) {
|
|
if(i__14246 < count__14245) {
|
|
var vec__14247 = cljs.core._nth.call(null, chunk__14244, i__14246);
|
|
var key = cljs.core.nth.call(null, vec__14247, 0, null);
|
|
var f = cljs.core.nth.call(null, vec__14247, 1, null);
|
|
f.call(null, key, this$, oldval, newval);
|
|
var G__14249 = seq__14243;
|
|
var G__14250 = chunk__14244;
|
|
var G__14251 = count__14245;
|
|
var G__14252 = i__14246 + 1;
|
|
seq__14243 = G__14249;
|
|
chunk__14244 = G__14250;
|
|
count__14245 = G__14251;
|
|
i__14246 = G__14252;
|
|
continue
|
|
}else {
|
|
var temp__4092__auto__ = cljs.core.seq.call(null, seq__14243);
|
|
if(temp__4092__auto__) {
|
|
var seq__14243__$1 = temp__4092__auto__;
|
|
if(cljs.core.chunked_seq_QMARK_.call(null, seq__14243__$1)) {
|
|
var c__3037__auto__ = cljs.core.chunk_first.call(null, seq__14243__$1);
|
|
var G__14253 = cljs.core.chunk_rest.call(null, seq__14243__$1);
|
|
var G__14254 = c__3037__auto__;
|
|
var G__14255 = cljs.core.count.call(null, c__3037__auto__);
|
|
var G__14256 = 0;
|
|
seq__14243 = G__14253;
|
|
chunk__14244 = G__14254;
|
|
count__14245 = G__14255;
|
|
i__14246 = G__14256;
|
|
continue
|
|
}else {
|
|
var vec__14248 = cljs.core.first.call(null, seq__14243__$1);
|
|
var key = cljs.core.nth.call(null, vec__14248, 0, null);
|
|
var f = cljs.core.nth.call(null, vec__14248, 1, null);
|
|
f.call(null, key, this$, oldval, newval);
|
|
var G__14257 = cljs.core.next.call(null, seq__14243__$1);
|
|
var G__14258 = null;
|
|
var G__14259 = 0;
|
|
var G__14260 = 0;
|
|
seq__14243 = G__14257;
|
|
chunk__14244 = G__14258;
|
|
count__14245 = G__14259;
|
|
i__14246 = G__14260;
|
|
continue
|
|
}
|
|
}else {
|
|
return null
|
|
}
|
|
}
|
|
break
|
|
}
|
|
};
|
|
cljs.core.Atom.prototype.cljs$core$IWatchable$_add_watch$arity$3 = function(this$, key, f) {
|
|
var self__ = this;
|
|
return this$.watches = cljs.core.assoc.call(null, self__.watches, key, f)
|
|
};
|
|
cljs.core.Atom.prototype.cljs$core$IWatchable$_remove_watch$arity$2 = function(this$, key) {
|
|
var self__ = this;
|
|
return this$.watches = cljs.core.dissoc.call(null, self__.watches, key)
|
|
};
|
|
cljs.core.Atom.prototype.cljs$core$IPrintWithWriter$_pr_writer$arity$3 = function(a, writer, opts) {
|
|
var self__ = this;
|
|
cljs.core._write.call(null, writer, "#<Atom: ");
|
|
cljs.core.pr_writer.call(null, self__.state, writer, opts);
|
|
return cljs.core._write.call(null, writer, ">")
|
|
};
|
|
cljs.core.Atom.prototype.cljs$core$IMeta$_meta$arity$1 = function(_) {
|
|
var self__ = this;
|
|
return self__.meta
|
|
};
|
|
cljs.core.Atom.prototype.cljs$core$IDeref$_deref$arity$1 = function(_) {
|
|
var self__ = this;
|
|
return self__.state
|
|
};
|
|
cljs.core.Atom.prototype.cljs$core$IEquiv$_equiv$arity$2 = function(o, other) {
|
|
var self__ = this;
|
|
return o === other
|
|
};
|
|
cljs.core.__GT_Atom = function __GT_Atom(state, meta, validator, watches) {
|
|
return new cljs.core.Atom(state, meta, validator, watches)
|
|
};
|
|
cljs.core.atom = function() {
|
|
var atom = null;
|
|
var atom__1 = function(x) {
|
|
return new cljs.core.Atom(x, null, null, null)
|
|
};
|
|
var atom__2 = function() {
|
|
var G__14264__delegate = function(x, p__14261) {
|
|
var map__14263 = p__14261;
|
|
var map__14263__$1 = cljs.core.seq_QMARK_.call(null, map__14263) ? cljs.core.apply.call(null, cljs.core.hash_map, map__14263) : map__14263;
|
|
var validator = cljs.core.get.call(null, map__14263__$1, "\ufdd0:validator");
|
|
var meta = cljs.core.get.call(null, map__14263__$1, "\ufdd0:meta");
|
|
return new cljs.core.Atom(x, meta, validator, null)
|
|
};
|
|
var G__14264 = function(x, var_args) {
|
|
var p__14261 = null;
|
|
if(arguments.length > 1) {
|
|
p__14261 = cljs.core.array_seq(Array.prototype.slice.call(arguments, 1), 0)
|
|
}
|
|
return G__14264__delegate.call(this, x, p__14261)
|
|
};
|
|
G__14264.cljs$lang$maxFixedArity = 1;
|
|
G__14264.cljs$lang$applyTo = function(arglist__14265) {
|
|
var x = cljs.core.first(arglist__14265);
|
|
var p__14261 = cljs.core.rest(arglist__14265);
|
|
return G__14264__delegate(x, p__14261)
|
|
};
|
|
G__14264.cljs$core$IFn$_invoke$arity$variadic = G__14264__delegate;
|
|
return G__14264
|
|
}();
|
|
atom = function(x, var_args) {
|
|
var p__14261 = var_args;
|
|
switch(arguments.length) {
|
|
case 1:
|
|
return atom__1.call(this, x);
|
|
default:
|
|
return atom__2.cljs$core$IFn$_invoke$arity$variadic(x, cljs.core.array_seq(arguments, 1))
|
|
}
|
|
throw new Error("Invalid arity: " + arguments.length);
|
|
};
|
|
atom.cljs$lang$maxFixedArity = 1;
|
|
atom.cljs$lang$applyTo = atom__2.cljs$lang$applyTo;
|
|
atom.cljs$core$IFn$_invoke$arity$1 = atom__1;
|
|
atom.cljs$core$IFn$_invoke$arity$variadic = atom__2.cljs$core$IFn$_invoke$arity$variadic;
|
|
return atom
|
|
}();
|
|
cljs.core.reset_BANG_ = function reset_BANG_(a, new_value) {
|
|
var temp__4092__auto___14266 = a.validator;
|
|
if(cljs.core.truth_(temp__4092__auto___14266)) {
|
|
var validate_14267 = temp__4092__auto___14266;
|
|
if(cljs.core.truth_(validate_14267.call(null, new_value))) {
|
|
}else {
|
|
throw new Error([cljs.core.str("Assert failed: "), cljs.core.str("Validator rejected reference state"), cljs.core.str("\n"), cljs.core.str(cljs.core.pr_str.call(null, cljs.core.list(new cljs.core.Symbol(null, "validate", "validate", 1233162959, null), new cljs.core.Symbol(null, "new-value", "new-value", 972165309, null))))].join(""));
|
|
}
|
|
}else {
|
|
}
|
|
var old_value_14268 = a.state;
|
|
a.state = new_value;
|
|
cljs.core._notify_watches.call(null, a, old_value_14268, new_value);
|
|
return new_value
|
|
};
|
|
cljs.core.swap_BANG_ = function() {
|
|
var swap_BANG_ = null;
|
|
var swap_BANG___2 = function(a, f) {
|
|
return cljs.core.reset_BANG_.call(null, a, f.call(null, a.state))
|
|
};
|
|
var swap_BANG___3 = function(a, f, x) {
|
|
return cljs.core.reset_BANG_.call(null, a, f.call(null, a.state, x))
|
|
};
|
|
var swap_BANG___4 = function(a, f, x, y) {
|
|
return cljs.core.reset_BANG_.call(null, a, f.call(null, a.state, x, y))
|
|
};
|
|
var swap_BANG___5 = function(a, f, x, y, z) {
|
|
return cljs.core.reset_BANG_.call(null, a, f.call(null, a.state, x, y, z))
|
|
};
|
|
var swap_BANG___6 = function() {
|
|
var G__14269__delegate = function(a, f, x, y, z, more) {
|
|
return cljs.core.reset_BANG_.call(null, a, cljs.core.apply.call(null, f, a.state, x, y, z, more))
|
|
};
|
|
var G__14269 = function(a, f, x, y, z, var_args) {
|
|
var more = null;
|
|
if(arguments.length > 5) {
|
|
more = cljs.core.array_seq(Array.prototype.slice.call(arguments, 5), 0)
|
|
}
|
|
return G__14269__delegate.call(this, a, f, x, y, z, more)
|
|
};
|
|
G__14269.cljs$lang$maxFixedArity = 5;
|
|
G__14269.cljs$lang$applyTo = function(arglist__14270) {
|
|
var a = cljs.core.first(arglist__14270);
|
|
arglist__14270 = cljs.core.next(arglist__14270);
|
|
var f = cljs.core.first(arglist__14270);
|
|
arglist__14270 = cljs.core.next(arglist__14270);
|
|
var x = cljs.core.first(arglist__14270);
|
|
arglist__14270 = cljs.core.next(arglist__14270);
|
|
var y = cljs.core.first(arglist__14270);
|
|
arglist__14270 = cljs.core.next(arglist__14270);
|
|
var z = cljs.core.first(arglist__14270);
|
|
var more = cljs.core.rest(arglist__14270);
|
|
return G__14269__delegate(a, f, x, y, z, more)
|
|
};
|
|
G__14269.cljs$core$IFn$_invoke$arity$variadic = G__14269__delegate;
|
|
return G__14269
|
|
}();
|
|
swap_BANG_ = function(a, f, x, y, z, var_args) {
|
|
var more = var_args;
|
|
switch(arguments.length) {
|
|
case 2:
|
|
return swap_BANG___2.call(this, a, f);
|
|
case 3:
|
|
return swap_BANG___3.call(this, a, f, x);
|
|
case 4:
|
|
return swap_BANG___4.call(this, a, f, x, y);
|
|
case 5:
|
|
return swap_BANG___5.call(this, a, f, x, y, z);
|
|
default:
|
|
return swap_BANG___6.cljs$core$IFn$_invoke$arity$variadic(a, f, x, y, z, cljs.core.array_seq(arguments, 5))
|
|
}
|
|
throw new Error("Invalid arity: " + arguments.length);
|
|
};
|
|
swap_BANG_.cljs$lang$maxFixedArity = 5;
|
|
swap_BANG_.cljs$lang$applyTo = swap_BANG___6.cljs$lang$applyTo;
|
|
swap_BANG_.cljs$core$IFn$_invoke$arity$2 = swap_BANG___2;
|
|
swap_BANG_.cljs$core$IFn$_invoke$arity$3 = swap_BANG___3;
|
|
swap_BANG_.cljs$core$IFn$_invoke$arity$4 = swap_BANG___4;
|
|
swap_BANG_.cljs$core$IFn$_invoke$arity$5 = swap_BANG___5;
|
|
swap_BANG_.cljs$core$IFn$_invoke$arity$variadic = swap_BANG___6.cljs$core$IFn$_invoke$arity$variadic;
|
|
return swap_BANG_
|
|
}();
|
|
cljs.core.compare_and_set_BANG_ = function compare_and_set_BANG_(a, oldval, newval) {
|
|
if(cljs.core._EQ_.call(null, a.state, oldval)) {
|
|
cljs.core.reset_BANG_.call(null, a, newval);
|
|
return true
|
|
}else {
|
|
return false
|
|
}
|
|
};
|
|
cljs.core.deref = function deref(o) {
|
|
return cljs.core._deref.call(null, o)
|
|
};
|
|
cljs.core.set_validator_BANG_ = function set_validator_BANG_(iref, val) {
|
|
return iref.validator = val
|
|
};
|
|
cljs.core.get_validator = function get_validator(iref) {
|
|
return iref.validator
|
|
};
|
|
cljs.core.alter_meta_BANG_ = function() {
|
|
var alter_meta_BANG___delegate = function(iref, f, args) {
|
|
return iref.meta = cljs.core.apply.call(null, f, iref.meta, args)
|
|
};
|
|
var alter_meta_BANG_ = function(iref, f, var_args) {
|
|
var args = null;
|
|
if(arguments.length > 2) {
|
|
args = cljs.core.array_seq(Array.prototype.slice.call(arguments, 2), 0)
|
|
}
|
|
return alter_meta_BANG___delegate.call(this, iref, f, args)
|
|
};
|
|
alter_meta_BANG_.cljs$lang$maxFixedArity = 2;
|
|
alter_meta_BANG_.cljs$lang$applyTo = function(arglist__14271) {
|
|
var iref = cljs.core.first(arglist__14271);
|
|
arglist__14271 = cljs.core.next(arglist__14271);
|
|
var f = cljs.core.first(arglist__14271);
|
|
var args = cljs.core.rest(arglist__14271);
|
|
return alter_meta_BANG___delegate(iref, f, args)
|
|
};
|
|
alter_meta_BANG_.cljs$core$IFn$_invoke$arity$variadic = alter_meta_BANG___delegate;
|
|
return alter_meta_BANG_
|
|
}();
|
|
cljs.core.reset_meta_BANG_ = function reset_meta_BANG_(iref, m) {
|
|
return iref.meta = m
|
|
};
|
|
cljs.core.add_watch = function add_watch(iref, key, f) {
|
|
return cljs.core._add_watch.call(null, iref, key, f)
|
|
};
|
|
cljs.core.remove_watch = function remove_watch(iref, key) {
|
|
return cljs.core._remove_watch.call(null, iref, key)
|
|
};
|
|
cljs.core.gensym_counter = null;
|
|
cljs.core.gensym = function() {
|
|
var gensym = null;
|
|
var gensym__0 = function() {
|
|
return gensym.call(null, "G__")
|
|
};
|
|
var gensym__1 = function(prefix_string) {
|
|
if(cljs.core.gensym_counter == null) {
|
|
cljs.core.gensym_counter = cljs.core.atom.call(null, 0)
|
|
}else {
|
|
}
|
|
return cljs.core.symbol.call(null, [cljs.core.str(prefix_string), cljs.core.str(cljs.core.swap_BANG_.call(null, cljs.core.gensym_counter, cljs.core.inc))].join(""))
|
|
};
|
|
gensym = function(prefix_string) {
|
|
switch(arguments.length) {
|
|
case 0:
|
|
return gensym__0.call(this);
|
|
case 1:
|
|
return gensym__1.call(this, prefix_string)
|
|
}
|
|
throw new Error("Invalid arity: " + arguments.length);
|
|
};
|
|
gensym.cljs$core$IFn$_invoke$arity$0 = gensym__0;
|
|
gensym.cljs$core$IFn$_invoke$arity$1 = gensym__1;
|
|
return gensym
|
|
}();
|
|
cljs.core.fixture1 = 1;
|
|
cljs.core.fixture2 = 2;
|
|
goog.provide("cljs.core.Delay");
|
|
cljs.core.Delay = function(state, f) {
|
|
this.state = state;
|
|
this.f = f;
|
|
this.cljs$lang$protocol_mask$partition1$ = 1;
|
|
this.cljs$lang$protocol_mask$partition0$ = 32768
|
|
};
|
|
cljs.core.Delay.cljs$lang$type = true;
|
|
cljs.core.Delay.cljs$lang$ctorStr = "cljs.core/Delay";
|
|
cljs.core.Delay.cljs$lang$ctorPrWriter = function(this__2847__auto__, writer__2848__auto__, opt__2849__auto__) {
|
|
return cljs.core._write.call(null, writer__2848__auto__, "cljs.core/Delay")
|
|
};
|
|
cljs.core.Delay.prototype.cljs$core$IPending$_realized_QMARK_$arity$1 = function(d) {
|
|
var self__ = this;
|
|
return(new cljs.core.Keyword("\ufdd0:done")).call(null, cljs.core.deref.call(null, self__.state))
|
|
};
|
|
cljs.core.Delay.prototype.cljs$core$IDeref$_deref$arity$1 = function(_) {
|
|
var self__ = this;
|
|
return(new cljs.core.Keyword("\ufdd0:value")).call(null, cljs.core.swap_BANG_.call(null, self__.state, function(p__14272) {
|
|
var map__14273 = p__14272;
|
|
var map__14273__$1 = cljs.core.seq_QMARK_.call(null, map__14273) ? cljs.core.apply.call(null, cljs.core.hash_map, map__14273) : map__14273;
|
|
var curr_state = map__14273__$1;
|
|
var done = cljs.core.get.call(null, map__14273__$1, "\ufdd0:done");
|
|
if(cljs.core.truth_(done)) {
|
|
return curr_state
|
|
}else {
|
|
return cljs.core.PersistentArrayMap.fromArray(["\ufdd0:done", true, "\ufdd0:value", self__.f.call(null)], true)
|
|
}
|
|
}))
|
|
};
|
|
cljs.core.__GT_Delay = function __GT_Delay(state, f) {
|
|
return new cljs.core.Delay(state, f)
|
|
};
|
|
cljs.core.delay_QMARK_ = function delay_QMARK_(x) {
|
|
return x instanceof cljs.core.Delay
|
|
};
|
|
cljs.core.force = function force(x) {
|
|
if(cljs.core.delay_QMARK_.call(null, x)) {
|
|
return cljs.core.deref.call(null, x)
|
|
}else {
|
|
return x
|
|
}
|
|
};
|
|
cljs.core.realized_QMARK_ = function realized_QMARK_(d) {
|
|
return cljs.core._realized_QMARK_.call(null, d)
|
|
};
|
|
cljs.core.IEncodeJS = {};
|
|
cljs.core._clj__GT_js = function _clj__GT_js(x) {
|
|
if(function() {
|
|
var and__3941__auto__ = x;
|
|
if(and__3941__auto__) {
|
|
return x.cljs$core$IEncodeJS$_clj__GT_js$arity$1
|
|
}else {
|
|
return and__3941__auto__
|
|
}
|
|
}()) {
|
|
return x.cljs$core$IEncodeJS$_clj__GT_js$arity$1(x)
|
|
}else {
|
|
var x__2906__auto__ = x == null ? null : x;
|
|
return function() {
|
|
var or__3943__auto__ = cljs.core._clj__GT_js[goog.typeOf(x__2906__auto__)];
|
|
if(or__3943__auto__) {
|
|
return or__3943__auto__
|
|
}else {
|
|
var or__3943__auto____$1 = cljs.core._clj__GT_js["_"];
|
|
if(or__3943__auto____$1) {
|
|
return or__3943__auto____$1
|
|
}else {
|
|
throw cljs.core.missing_protocol.call(null, "IEncodeJS.-clj->js", x);
|
|
}
|
|
}
|
|
}().call(null, x)
|
|
}
|
|
};
|
|
cljs.core._key__GT_js = function _key__GT_js(x) {
|
|
if(function() {
|
|
var and__3941__auto__ = x;
|
|
if(and__3941__auto__) {
|
|
return x.cljs$core$IEncodeJS$_key__GT_js$arity$1
|
|
}else {
|
|
return and__3941__auto__
|
|
}
|
|
}()) {
|
|
return x.cljs$core$IEncodeJS$_key__GT_js$arity$1(x)
|
|
}else {
|
|
var x__2906__auto__ = x == null ? null : x;
|
|
return function() {
|
|
var or__3943__auto__ = cljs.core._key__GT_js[goog.typeOf(x__2906__auto__)];
|
|
if(or__3943__auto__) {
|
|
return or__3943__auto__
|
|
}else {
|
|
var or__3943__auto____$1 = cljs.core._key__GT_js["_"];
|
|
if(or__3943__auto____$1) {
|
|
return or__3943__auto____$1
|
|
}else {
|
|
throw cljs.core.missing_protocol.call(null, "IEncodeJS.-key->js", x);
|
|
}
|
|
}
|
|
}().call(null, x)
|
|
}
|
|
};
|
|
cljs.core.key__GT_js = function key__GT_js(k) {
|
|
if(function() {
|
|
var G__14275 = k;
|
|
if(G__14275) {
|
|
if(cljs.core.truth_(function() {
|
|
var or__3943__auto__ = null;
|
|
if(cljs.core.truth_(or__3943__auto__)) {
|
|
return or__3943__auto__
|
|
}else {
|
|
return G__14275.cljs$core$IEncodeJS$
|
|
}
|
|
}())) {
|
|
return true
|
|
}else {
|
|
if(!G__14275.cljs$lang$protocol_mask$partition$) {
|
|
return cljs.core.type_satisfies_.call(null, cljs.core.IEncodeJS, G__14275)
|
|
}else {
|
|
return false
|
|
}
|
|
}
|
|
}else {
|
|
return cljs.core.type_satisfies_.call(null, cljs.core.IEncodeJS, G__14275)
|
|
}
|
|
}()) {
|
|
return cljs.core._clj__GT_js.call(null, k)
|
|
}else {
|
|
if(function() {
|
|
var or__3943__auto__ = cljs.core.string_QMARK_.call(null, k);
|
|
if(or__3943__auto__) {
|
|
return or__3943__auto__
|
|
}else {
|
|
var or__3943__auto____$1 = typeof k === "number";
|
|
if(or__3943__auto____$1) {
|
|
return or__3943__auto____$1
|
|
}else {
|
|
var or__3943__auto____$2 = cljs.core.keyword_QMARK_.call(null, k);
|
|
if(or__3943__auto____$2) {
|
|
return or__3943__auto____$2
|
|
}else {
|
|
return k instanceof cljs.core.Symbol
|
|
}
|
|
}
|
|
}
|
|
}()) {
|
|
return cljs.core.clj__GT_js.call(null, k)
|
|
}else {
|
|
return cljs.core.pr_str.call(null, k)
|
|
}
|
|
}
|
|
};
|
|
cljs.core.clj__GT_js = function clj__GT_js(x) {
|
|
if(x == null) {
|
|
return null
|
|
}else {
|
|
if(function() {
|
|
var G__14283 = x;
|
|
if(G__14283) {
|
|
if(cljs.core.truth_(function() {
|
|
var or__3943__auto__ = null;
|
|
if(cljs.core.truth_(or__3943__auto__)) {
|
|
return or__3943__auto__
|
|
}else {
|
|
return G__14283.cljs$core$IEncodeJS$
|
|
}
|
|
}())) {
|
|
return true
|
|
}else {
|
|
if(!G__14283.cljs$lang$protocol_mask$partition$) {
|
|
return cljs.core.type_satisfies_.call(null, cljs.core.IEncodeJS, G__14283)
|
|
}else {
|
|
return false
|
|
}
|
|
}
|
|
}else {
|
|
return cljs.core.type_satisfies_.call(null, cljs.core.IEncodeJS, G__14283)
|
|
}
|
|
}()) {
|
|
return cljs.core._clj__GT_js.call(null, x)
|
|
}else {
|
|
if(cljs.core.keyword_QMARK_.call(null, x)) {
|
|
return cljs.core.name.call(null, x)
|
|
}else {
|
|
if(x instanceof cljs.core.Symbol) {
|
|
return[cljs.core.str(x)].join("")
|
|
}else {
|
|
if(cljs.core.map_QMARK_.call(null, x)) {
|
|
var m = {};
|
|
var seq__14284_14290 = cljs.core.seq.call(null, x);
|
|
var chunk__14285_14291 = null;
|
|
var count__14286_14292 = 0;
|
|
var i__14287_14293 = 0;
|
|
while(true) {
|
|
if(i__14287_14293 < count__14286_14292) {
|
|
var vec__14288_14294 = cljs.core._nth.call(null, chunk__14285_14291, i__14287_14293);
|
|
var k_14295 = cljs.core.nth.call(null, vec__14288_14294, 0, null);
|
|
var v_14296 = cljs.core.nth.call(null, vec__14288_14294, 1, null);
|
|
m[cljs.core.key__GT_js.call(null, k_14295)] = clj__GT_js.call(null, v_14296);
|
|
var G__14297 = seq__14284_14290;
|
|
var G__14298 = chunk__14285_14291;
|
|
var G__14299 = count__14286_14292;
|
|
var G__14300 = i__14287_14293 + 1;
|
|
seq__14284_14290 = G__14297;
|
|
chunk__14285_14291 = G__14298;
|
|
count__14286_14292 = G__14299;
|
|
i__14287_14293 = G__14300;
|
|
continue
|
|
}else {
|
|
var temp__4092__auto___14301 = cljs.core.seq.call(null, seq__14284_14290);
|
|
if(temp__4092__auto___14301) {
|
|
var seq__14284_14302__$1 = temp__4092__auto___14301;
|
|
if(cljs.core.chunked_seq_QMARK_.call(null, seq__14284_14302__$1)) {
|
|
var c__3037__auto___14303 = cljs.core.chunk_first.call(null, seq__14284_14302__$1);
|
|
var G__14304 = cljs.core.chunk_rest.call(null, seq__14284_14302__$1);
|
|
var G__14305 = c__3037__auto___14303;
|
|
var G__14306 = cljs.core.count.call(null, c__3037__auto___14303);
|
|
var G__14307 = 0;
|
|
seq__14284_14290 = G__14304;
|
|
chunk__14285_14291 = G__14305;
|
|
count__14286_14292 = G__14306;
|
|
i__14287_14293 = G__14307;
|
|
continue
|
|
}else {
|
|
var vec__14289_14308 = cljs.core.first.call(null, seq__14284_14302__$1);
|
|
var k_14309 = cljs.core.nth.call(null, vec__14289_14308, 0, null);
|
|
var v_14310 = cljs.core.nth.call(null, vec__14289_14308, 1, null);
|
|
m[cljs.core.key__GT_js.call(null, k_14309)] = clj__GT_js.call(null, v_14310);
|
|
var G__14311 = cljs.core.next.call(null, seq__14284_14302__$1);
|
|
var G__14312 = null;
|
|
var G__14313 = 0;
|
|
var G__14314 = 0;
|
|
seq__14284_14290 = G__14311;
|
|
chunk__14285_14291 = G__14312;
|
|
count__14286_14292 = G__14313;
|
|
i__14287_14293 = G__14314;
|
|
continue
|
|
}
|
|
}else {
|
|
}
|
|
}
|
|
break
|
|
}
|
|
return m
|
|
}else {
|
|
if(cljs.core.coll_QMARK_.call(null, x)) {
|
|
return cljs.core.apply.call(null, cljs.core.array, cljs.core.map.call(null, clj__GT_js, x))
|
|
}else {
|
|
if("\ufdd0:else") {
|
|
return x
|
|
}else {
|
|
return null
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
};
|
|
cljs.core.IEncodeClojure = {};
|
|
cljs.core._js__GT_clj = function _js__GT_clj(x, options) {
|
|
if(function() {
|
|
var and__3941__auto__ = x;
|
|
if(and__3941__auto__) {
|
|
return x.cljs$core$IEncodeClojure$_js__GT_clj$arity$2
|
|
}else {
|
|
return and__3941__auto__
|
|
}
|
|
}()) {
|
|
return x.cljs$core$IEncodeClojure$_js__GT_clj$arity$2(x, options)
|
|
}else {
|
|
var x__2906__auto__ = x == null ? null : x;
|
|
return function() {
|
|
var or__3943__auto__ = cljs.core._js__GT_clj[goog.typeOf(x__2906__auto__)];
|
|
if(or__3943__auto__) {
|
|
return or__3943__auto__
|
|
}else {
|
|
var or__3943__auto____$1 = cljs.core._js__GT_clj["_"];
|
|
if(or__3943__auto____$1) {
|
|
return or__3943__auto____$1
|
|
}else {
|
|
throw cljs.core.missing_protocol.call(null, "IEncodeClojure.-js->clj", x);
|
|
}
|
|
}
|
|
}().call(null, x, options)
|
|
}
|
|
};
|
|
cljs.core.js__GT_clj = function() {
|
|
var js__GT_clj = null;
|
|
var js__GT_clj__1 = function(x) {
|
|
return js__GT_clj.call(null, x, cljs.core.PersistentArrayMap.fromArray(["\ufdd0:keywordize-keys", false], true))
|
|
};
|
|
var js__GT_clj__2 = function() {
|
|
var G__14335__delegate = function(x, opts) {
|
|
if(function() {
|
|
var G__14325 = cljs.core.IEncodeClojure;
|
|
if(G__14325) {
|
|
if(cljs.core.truth_(function() {
|
|
var or__3943__auto__ = null;
|
|
if(cljs.core.truth_(or__3943__auto__)) {
|
|
return or__3943__auto__
|
|
}else {
|
|
return G__14325.cljs$core$x$
|
|
}
|
|
}())) {
|
|
return true
|
|
}else {
|
|
if(!G__14325.cljs$lang$protocol_mask$partition$) {
|
|
return cljs.core.type_satisfies_.call(null, x, G__14325)
|
|
}else {
|
|
return false
|
|
}
|
|
}
|
|
}else {
|
|
return cljs.core.type_satisfies_.call(null, x, G__14325)
|
|
}
|
|
}()) {
|
|
return cljs.core._js__GT_clj.call(null, x, cljs.core.apply.call(null, cljs.core.array_map, opts))
|
|
}else {
|
|
if(cljs.core.seq.call(null, opts)) {
|
|
var map__14326 = opts;
|
|
var map__14326__$1 = cljs.core.seq_QMARK_.call(null, map__14326) ? cljs.core.apply.call(null, cljs.core.hash_map, map__14326) : map__14326;
|
|
var keywordize_keys = cljs.core.get.call(null, map__14326__$1, "\ufdd0:keywordize-keys");
|
|
var keyfn = cljs.core.truth_(keywordize_keys) ? cljs.core.keyword : cljs.core.str;
|
|
var f = function(map__14326, map__14326__$1, keywordize_keys, keyfn) {
|
|
return function thisfn(x__$1) {
|
|
if(cljs.core.seq_QMARK_.call(null, x__$1)) {
|
|
return cljs.core.doall.call(null, cljs.core.map.call(null, thisfn, x__$1))
|
|
}else {
|
|
if(cljs.core.coll_QMARK_.call(null, x__$1)) {
|
|
return cljs.core.into.call(null, cljs.core.empty.call(null, x__$1), cljs.core.map.call(null, thisfn, x__$1))
|
|
}else {
|
|
if(x__$1 instanceof Array) {
|
|
return cljs.core.vec.call(null, cljs.core.map.call(null, thisfn, x__$1))
|
|
}else {
|
|
if(cljs.core.type.call(null, x__$1) === Object) {
|
|
return cljs.core.into.call(null, cljs.core.PersistentArrayMap.EMPTY, function() {
|
|
var iter__3006__auto__ = function(map__14326, map__14326__$1, keywordize_keys, keyfn) {
|
|
return function iter__14331(s__14332) {
|
|
return new cljs.core.LazySeq(null, false, function(map__14326, map__14326__$1, keywordize_keys, keyfn) {
|
|
return function() {
|
|
var s__14332__$1 = s__14332;
|
|
while(true) {
|
|
var temp__4092__auto__ = cljs.core.seq.call(null, s__14332__$1);
|
|
if(temp__4092__auto__) {
|
|
var s__14332__$2 = temp__4092__auto__;
|
|
if(cljs.core.chunked_seq_QMARK_.call(null, s__14332__$2)) {
|
|
var c__3004__auto__ = cljs.core.chunk_first.call(null, s__14332__$2);
|
|
var size__3005__auto__ = cljs.core.count.call(null, c__3004__auto__);
|
|
var b__14334 = cljs.core.chunk_buffer.call(null, size__3005__auto__);
|
|
if(function() {
|
|
var i__14333 = 0;
|
|
while(true) {
|
|
if(i__14333 < size__3005__auto__) {
|
|
var k = cljs.core._nth.call(null, c__3004__auto__, i__14333);
|
|
cljs.core.chunk_append.call(null, b__14334, cljs.core.PersistentVector.fromArray([keyfn.call(null, k), thisfn.call(null, x__$1[k])], true));
|
|
var G__14336 = i__14333 + 1;
|
|
i__14333 = G__14336;
|
|
continue
|
|
}else {
|
|
return true
|
|
}
|
|
break
|
|
}
|
|
}()) {
|
|
return cljs.core.chunk_cons.call(null, cljs.core.chunk.call(null, b__14334), iter__14331.call(null, cljs.core.chunk_rest.call(null, s__14332__$2)))
|
|
}else {
|
|
return cljs.core.chunk_cons.call(null, cljs.core.chunk.call(null, b__14334), null)
|
|
}
|
|
}else {
|
|
var k = cljs.core.first.call(null, s__14332__$2);
|
|
return cljs.core.cons.call(null, cljs.core.PersistentVector.fromArray([keyfn.call(null, k), thisfn.call(null, x__$1[k])], true), iter__14331.call(null, cljs.core.rest.call(null, s__14332__$2)))
|
|
}
|
|
}else {
|
|
return null
|
|
}
|
|
break
|
|
}
|
|
}
|
|
}(map__14326, map__14326__$1, keywordize_keys, keyfn), null)
|
|
}
|
|
}(map__14326, map__14326__$1, keywordize_keys, keyfn);
|
|
return iter__3006__auto__.call(null, cljs.core.js_keys.call(null, x__$1))
|
|
}())
|
|
}else {
|
|
if("\ufdd0:else") {
|
|
return x__$1
|
|
}else {
|
|
return null
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}(map__14326, map__14326__$1, keywordize_keys, keyfn);
|
|
return f.call(null, x)
|
|
}else {
|
|
return null
|
|
}
|
|
}
|
|
};
|
|
var G__14335 = function(x, var_args) {
|
|
var opts = null;
|
|
if(arguments.length > 1) {
|
|
opts = cljs.core.array_seq(Array.prototype.slice.call(arguments, 1), 0)
|
|
}
|
|
return G__14335__delegate.call(this, x, opts)
|
|
};
|
|
G__14335.cljs$lang$maxFixedArity = 1;
|
|
G__14335.cljs$lang$applyTo = function(arglist__14337) {
|
|
var x = cljs.core.first(arglist__14337);
|
|
var opts = cljs.core.rest(arglist__14337);
|
|
return G__14335__delegate(x, opts)
|
|
};
|
|
G__14335.cljs$core$IFn$_invoke$arity$variadic = G__14335__delegate;
|
|
return G__14335
|
|
}();
|
|
js__GT_clj = function(x, var_args) {
|
|
var opts = var_args;
|
|
switch(arguments.length) {
|
|
case 1:
|
|
return js__GT_clj__1.call(this, x);
|
|
default:
|
|
return js__GT_clj__2.cljs$core$IFn$_invoke$arity$variadic(x, cljs.core.array_seq(arguments, 1))
|
|
}
|
|
throw new Error("Invalid arity: " + arguments.length);
|
|
};
|
|
js__GT_clj.cljs$lang$maxFixedArity = 1;
|
|
js__GT_clj.cljs$lang$applyTo = js__GT_clj__2.cljs$lang$applyTo;
|
|
js__GT_clj.cljs$core$IFn$_invoke$arity$1 = js__GT_clj__1;
|
|
js__GT_clj.cljs$core$IFn$_invoke$arity$variadic = js__GT_clj__2.cljs$core$IFn$_invoke$arity$variadic;
|
|
return js__GT_clj
|
|
}();
|
|
cljs.core.memoize = function memoize(f) {
|
|
var mem = cljs.core.atom.call(null, cljs.core.PersistentArrayMap.EMPTY);
|
|
return function() {
|
|
var G__14338__delegate = function(args) {
|
|
var temp__4090__auto__ = cljs.core.get.call(null, cljs.core.deref.call(null, mem), args);
|
|
if(cljs.core.truth_(temp__4090__auto__)) {
|
|
var v = temp__4090__auto__;
|
|
return v
|
|
}else {
|
|
var ret = cljs.core.apply.call(null, f, args);
|
|
cljs.core.swap_BANG_.call(null, mem, cljs.core.assoc, args, ret);
|
|
return ret
|
|
}
|
|
};
|
|
var G__14338 = function(var_args) {
|
|
var args = null;
|
|
if(arguments.length > 0) {
|
|
args = cljs.core.array_seq(Array.prototype.slice.call(arguments, 0), 0)
|
|
}
|
|
return G__14338__delegate.call(this, args)
|
|
};
|
|
G__14338.cljs$lang$maxFixedArity = 0;
|
|
G__14338.cljs$lang$applyTo = function(arglist__14339) {
|
|
var args = cljs.core.seq(arglist__14339);
|
|
return G__14338__delegate(args)
|
|
};
|
|
G__14338.cljs$core$IFn$_invoke$arity$variadic = G__14338__delegate;
|
|
return G__14338
|
|
}()
|
|
};
|
|
cljs.core.trampoline = function() {
|
|
var trampoline = null;
|
|
var trampoline__1 = function(f) {
|
|
while(true) {
|
|
var ret = f.call(null);
|
|
if(cljs.core.fn_QMARK_.call(null, ret)) {
|
|
var G__14340 = ret;
|
|
f = G__14340;
|
|
continue
|
|
}else {
|
|
return ret
|
|
}
|
|
break
|
|
}
|
|
};
|
|
var trampoline__2 = function() {
|
|
var G__14341__delegate = function(f, args) {
|
|
return trampoline.call(null, function() {
|
|
return cljs.core.apply.call(null, f, args)
|
|
})
|
|
};
|
|
var G__14341 = function(f, var_args) {
|
|
var args = null;
|
|
if(arguments.length > 1) {
|
|
args = cljs.core.array_seq(Array.prototype.slice.call(arguments, 1), 0)
|
|
}
|
|
return G__14341__delegate.call(this, f, args)
|
|
};
|
|
G__14341.cljs$lang$maxFixedArity = 1;
|
|
G__14341.cljs$lang$applyTo = function(arglist__14342) {
|
|
var f = cljs.core.first(arglist__14342);
|
|
var args = cljs.core.rest(arglist__14342);
|
|
return G__14341__delegate(f, args)
|
|
};
|
|
G__14341.cljs$core$IFn$_invoke$arity$variadic = G__14341__delegate;
|
|
return G__14341
|
|
}();
|
|
trampoline = function(f, var_args) {
|
|
var args = var_args;
|
|
switch(arguments.length) {
|
|
case 1:
|
|
return trampoline__1.call(this, f);
|
|
default:
|
|
return trampoline__2.cljs$core$IFn$_invoke$arity$variadic(f, cljs.core.array_seq(arguments, 1))
|
|
}
|
|
throw new Error("Invalid arity: " + arguments.length);
|
|
};
|
|
trampoline.cljs$lang$maxFixedArity = 1;
|
|
trampoline.cljs$lang$applyTo = trampoline__2.cljs$lang$applyTo;
|
|
trampoline.cljs$core$IFn$_invoke$arity$1 = trampoline__1;
|
|
trampoline.cljs$core$IFn$_invoke$arity$variadic = trampoline__2.cljs$core$IFn$_invoke$arity$variadic;
|
|
return trampoline
|
|
}();
|
|
cljs.core.rand = function() {
|
|
var rand = null;
|
|
var rand__0 = function() {
|
|
return rand.call(null, 1)
|
|
};
|
|
var rand__1 = function(n) {
|
|
return Math.random.call(null) * n
|
|
};
|
|
rand = function(n) {
|
|
switch(arguments.length) {
|
|
case 0:
|
|
return rand__0.call(this);
|
|
case 1:
|
|
return rand__1.call(this, n)
|
|
}
|
|
throw new Error("Invalid arity: " + arguments.length);
|
|
};
|
|
rand.cljs$core$IFn$_invoke$arity$0 = rand__0;
|
|
rand.cljs$core$IFn$_invoke$arity$1 = rand__1;
|
|
return rand
|
|
}();
|
|
cljs.core.rand_int = function rand_int(n) {
|
|
return Math.floor.call(null, Math.random.call(null) * n)
|
|
};
|
|
cljs.core.rand_nth = function rand_nth(coll) {
|
|
return cljs.core.nth.call(null, coll, cljs.core.rand_int.call(null, cljs.core.count.call(null, coll)))
|
|
};
|
|
cljs.core.group_by = function group_by(f, coll) {
|
|
return cljs.core.reduce.call(null, function(ret, x) {
|
|
var k = f.call(null, x);
|
|
return cljs.core.assoc.call(null, ret, k, cljs.core.conj.call(null, cljs.core.get.call(null, ret, k, cljs.core.PersistentVector.EMPTY), x))
|
|
}, cljs.core.PersistentArrayMap.EMPTY, coll)
|
|
};
|
|
cljs.core.make_hierarchy = function make_hierarchy() {
|
|
return cljs.core.PersistentArrayMap.fromArray(["\ufdd0:parents", cljs.core.PersistentArrayMap.EMPTY, "\ufdd0:descendants", cljs.core.PersistentArrayMap.EMPTY, "\ufdd0:ancestors", cljs.core.PersistentArrayMap.EMPTY], true)
|
|
};
|
|
cljs.core._global_hierarchy = null;
|
|
cljs.core.get_global_hierarchy = function get_global_hierarchy() {
|
|
if(cljs.core._global_hierarchy == null) {
|
|
cljs.core._global_hierarchy = cljs.core.atom.call(null, cljs.core.make_hierarchy.call(null))
|
|
}else {
|
|
}
|
|
return cljs.core._global_hierarchy
|
|
};
|
|
cljs.core.swap_global_hierarchy_BANG_ = function() {
|
|
var swap_global_hierarchy_BANG___delegate = function(f, args) {
|
|
return cljs.core.apply.call(null, cljs.core.swap_BANG_, cljs.core.get_global_hierarchy.call(null), f, args)
|
|
};
|
|
var swap_global_hierarchy_BANG_ = function(f, var_args) {
|
|
var args = null;
|
|
if(arguments.length > 1) {
|
|
args = cljs.core.array_seq(Array.prototype.slice.call(arguments, 1), 0)
|
|
}
|
|
return swap_global_hierarchy_BANG___delegate.call(this, f, args)
|
|
};
|
|
swap_global_hierarchy_BANG_.cljs$lang$maxFixedArity = 1;
|
|
swap_global_hierarchy_BANG_.cljs$lang$applyTo = function(arglist__14343) {
|
|
var f = cljs.core.first(arglist__14343);
|
|
var args = cljs.core.rest(arglist__14343);
|
|
return swap_global_hierarchy_BANG___delegate(f, args)
|
|
};
|
|
swap_global_hierarchy_BANG_.cljs$core$IFn$_invoke$arity$variadic = swap_global_hierarchy_BANG___delegate;
|
|
return swap_global_hierarchy_BANG_
|
|
}();
|
|
cljs.core.isa_QMARK_ = function() {
|
|
var isa_QMARK_ = null;
|
|
var isa_QMARK___2 = function(child, parent) {
|
|
return isa_QMARK_.call(null, cljs.core.deref.call(null, cljs.core.get_global_hierarchy.call(null)), child, parent)
|
|
};
|
|
var isa_QMARK___3 = function(h, child, parent) {
|
|
var or__3943__auto__ = cljs.core._EQ_.call(null, child, parent);
|
|
if(or__3943__auto__) {
|
|
return or__3943__auto__
|
|
}else {
|
|
var or__3943__auto____$1 = cljs.core.contains_QMARK_.call(null, (new cljs.core.Keyword("\ufdd0:ancestors")).call(null, h).call(null, child), parent);
|
|
if(or__3943__auto____$1) {
|
|
return or__3943__auto____$1
|
|
}else {
|
|
var and__3941__auto__ = cljs.core.vector_QMARK_.call(null, parent);
|
|
if(and__3941__auto__) {
|
|
var and__3941__auto____$1 = cljs.core.vector_QMARK_.call(null, child);
|
|
if(and__3941__auto____$1) {
|
|
var and__3941__auto____$2 = cljs.core.count.call(null, parent) === cljs.core.count.call(null, child);
|
|
if(and__3941__auto____$2) {
|
|
var ret = true;
|
|
var i = 0;
|
|
while(true) {
|
|
if(function() {
|
|
var or__3943__auto____$2 = cljs.core.not.call(null, ret);
|
|
if(or__3943__auto____$2) {
|
|
return or__3943__auto____$2
|
|
}else {
|
|
return i === cljs.core.count.call(null, parent)
|
|
}
|
|
}()) {
|
|
return ret
|
|
}else {
|
|
var G__14344 = isa_QMARK_.call(null, h, child.call(null, i), parent.call(null, i));
|
|
var G__14345 = i + 1;
|
|
ret = G__14344;
|
|
i = G__14345;
|
|
continue
|
|
}
|
|
break
|
|
}
|
|
}else {
|
|
return and__3941__auto____$2
|
|
}
|
|
}else {
|
|
return and__3941__auto____$1
|
|
}
|
|
}else {
|
|
return and__3941__auto__
|
|
}
|
|
}
|
|
}
|
|
};
|
|
isa_QMARK_ = function(h, child, parent) {
|
|
switch(arguments.length) {
|
|
case 2:
|
|
return isa_QMARK___2.call(this, h, child);
|
|
case 3:
|
|
return isa_QMARK___3.call(this, h, child, parent)
|
|
}
|
|
throw new Error("Invalid arity: " + arguments.length);
|
|
};
|
|
isa_QMARK_.cljs$core$IFn$_invoke$arity$2 = isa_QMARK___2;
|
|
isa_QMARK_.cljs$core$IFn$_invoke$arity$3 = isa_QMARK___3;
|
|
return isa_QMARK_
|
|
}();
|
|
cljs.core.parents = function() {
|
|
var parents = null;
|
|
var parents__1 = function(tag) {
|
|
return parents.call(null, cljs.core.deref.call(null, cljs.core.get_global_hierarchy.call(null)), tag)
|
|
};
|
|
var parents__2 = function(h, tag) {
|
|
return cljs.core.not_empty.call(null, cljs.core.get.call(null, (new cljs.core.Keyword("\ufdd0:parents")).call(null, h), tag))
|
|
};
|
|
parents = function(h, tag) {
|
|
switch(arguments.length) {
|
|
case 1:
|
|
return parents__1.call(this, h);
|
|
case 2:
|
|
return parents__2.call(this, h, tag)
|
|
}
|
|
throw new Error("Invalid arity: " + arguments.length);
|
|
};
|
|
parents.cljs$core$IFn$_invoke$arity$1 = parents__1;
|
|
parents.cljs$core$IFn$_invoke$arity$2 = parents__2;
|
|
return parents
|
|
}();
|
|
cljs.core.ancestors = function() {
|
|
var ancestors = null;
|
|
var ancestors__1 = function(tag) {
|
|
return ancestors.call(null, cljs.core.deref.call(null, cljs.core.get_global_hierarchy.call(null)), tag)
|
|
};
|
|
var ancestors__2 = function(h, tag) {
|
|
return cljs.core.not_empty.call(null, cljs.core.get.call(null, (new cljs.core.Keyword("\ufdd0:ancestors")).call(null, h), tag))
|
|
};
|
|
ancestors = function(h, tag) {
|
|
switch(arguments.length) {
|
|
case 1:
|
|
return ancestors__1.call(this, h);
|
|
case 2:
|
|
return ancestors__2.call(this, h, tag)
|
|
}
|
|
throw new Error("Invalid arity: " + arguments.length);
|
|
};
|
|
ancestors.cljs$core$IFn$_invoke$arity$1 = ancestors__1;
|
|
ancestors.cljs$core$IFn$_invoke$arity$2 = ancestors__2;
|
|
return ancestors
|
|
}();
|
|
cljs.core.descendants = function() {
|
|
var descendants = null;
|
|
var descendants__1 = function(tag) {
|
|
return descendants.call(null, cljs.core.deref.call(null, cljs.core.get_global_hierarchy.call(null)), tag)
|
|
};
|
|
var descendants__2 = function(h, tag) {
|
|
return cljs.core.not_empty.call(null, cljs.core.get.call(null, (new cljs.core.Keyword("\ufdd0:descendants")).call(null, h), tag))
|
|
};
|
|
descendants = function(h, tag) {
|
|
switch(arguments.length) {
|
|
case 1:
|
|
return descendants__1.call(this, h);
|
|
case 2:
|
|
return descendants__2.call(this, h, tag)
|
|
}
|
|
throw new Error("Invalid arity: " + arguments.length);
|
|
};
|
|
descendants.cljs$core$IFn$_invoke$arity$1 = descendants__1;
|
|
descendants.cljs$core$IFn$_invoke$arity$2 = descendants__2;
|
|
return descendants
|
|
}();
|
|
cljs.core.derive = function() {
|
|
var derive = null;
|
|
var derive__2 = function(tag, parent) {
|
|
if(cljs.core.truth_(cljs.core.namespace.call(null, parent))) {
|
|
}else {
|
|
throw new Error([cljs.core.str("Assert failed: "), cljs.core.str(cljs.core.pr_str.call(null, cljs.core.list(new cljs.core.Symbol(null, "namespace", "namespace", -388313324, null), new cljs.core.Symbol(null, "parent", "parent", 1659011683, null))))].join(""));
|
|
}
|
|
cljs.core.swap_global_hierarchy_BANG_.call(null, derive, tag, parent);
|
|
return null
|
|
};
|
|
var derive__3 = function(h, tag, parent) {
|
|
if(cljs.core.not_EQ_.call(null, tag, parent)) {
|
|
}else {
|
|
throw new Error([cljs.core.str("Assert failed: "), cljs.core.str(cljs.core.pr_str.call(null, cljs.core.list(new cljs.core.Symbol(null, "not=", "not=", -1637144189, null), new cljs.core.Symbol(null, "tag", "tag", -1640416941, null), new cljs.core.Symbol(null, "parent", "parent", 1659011683, null))))].join(""));
|
|
}
|
|
var tp = (new cljs.core.Keyword("\ufdd0:parents")).call(null, h);
|
|
var td = (new cljs.core.Keyword("\ufdd0:descendants")).call(null, h);
|
|
var ta = (new cljs.core.Keyword("\ufdd0:ancestors")).call(null, h);
|
|
var tf = function(tp, td, ta) {
|
|
return function(m, source, sources, target, targets) {
|
|
return cljs.core.reduce.call(null, function(tp, td, ta) {
|
|
return function(ret, k) {
|
|
return cljs.core.assoc.call(null, ret, k, cljs.core.reduce.call(null, cljs.core.conj, cljs.core.get.call(null, targets, k, cljs.core.PersistentHashSet.EMPTY), cljs.core.cons.call(null, target, targets.call(null, target))))
|
|
}
|
|
}(tp, td, ta), m, cljs.core.cons.call(null, source, sources.call(null, source)))
|
|
}
|
|
}(tp, td, ta);
|
|
var or__3943__auto__ = cljs.core.contains_QMARK_.call(null, tp.call(null, tag), parent) ? null : function() {
|
|
if(cljs.core.contains_QMARK_.call(null, ta.call(null, tag), parent)) {
|
|
throw new Error([cljs.core.str(tag), cljs.core.str("already has"), cljs.core.str(parent), cljs.core.str("as ancestor")].join(""));
|
|
}else {
|
|
}
|
|
if(cljs.core.contains_QMARK_.call(null, ta.call(null, parent), tag)) {
|
|
throw new Error([cljs.core.str("Cyclic derivation:"), cljs.core.str(parent), cljs.core.str("has"), cljs.core.str(tag), cljs.core.str("as ancestor")].join(""));
|
|
}else {
|
|
}
|
|
return cljs.core.PersistentArrayMap.fromArray(["\ufdd0:parents", cljs.core.assoc.call(null, (new cljs.core.Keyword("\ufdd0:parents")).call(null, h), tag, cljs.core.conj.call(null, cljs.core.get.call(null, tp, tag, cljs.core.PersistentHashSet.EMPTY), parent)), "\ufdd0:ancestors", tf.call(null, (new cljs.core.Keyword("\ufdd0:ancestors")).call(null, h), tag, td, parent, ta), "\ufdd0:descendants", tf.call(null, (new cljs.core.Keyword("\ufdd0:descendants")).call(null, h), parent, ta, tag, td)],
|
|
true)
|
|
}();
|
|
if(cljs.core.truth_(or__3943__auto__)) {
|
|
return or__3943__auto__
|
|
}else {
|
|
return h
|
|
}
|
|
};
|
|
derive = function(h, tag, parent) {
|
|
switch(arguments.length) {
|
|
case 2:
|
|
return derive__2.call(this, h, tag);
|
|
case 3:
|
|
return derive__3.call(this, h, tag, parent)
|
|
}
|
|
throw new Error("Invalid arity: " + arguments.length);
|
|
};
|
|
derive.cljs$core$IFn$_invoke$arity$2 = derive__2;
|
|
derive.cljs$core$IFn$_invoke$arity$3 = derive__3;
|
|
return derive
|
|
}();
|
|
cljs.core.underive = function() {
|
|
var underive = null;
|
|
var underive__2 = function(tag, parent) {
|
|
cljs.core.swap_global_hierarchy_BANG_.call(null, underive, tag, parent);
|
|
return null
|
|
};
|
|
var underive__3 = function(h, tag, parent) {
|
|
var parentMap = (new cljs.core.Keyword("\ufdd0:parents")).call(null, h);
|
|
var childsParents = cljs.core.truth_(parentMap.call(null, tag)) ? cljs.core.disj.call(null, parentMap.call(null, tag), parent) : cljs.core.PersistentHashSet.EMPTY;
|
|
var newParents = cljs.core.truth_(cljs.core.not_empty.call(null, childsParents)) ? cljs.core.assoc.call(null, parentMap, tag, childsParents) : cljs.core.dissoc.call(null, parentMap, tag);
|
|
var deriv_seq = cljs.core.flatten.call(null, cljs.core.map.call(null, function(parentMap, childsParents, newParents) {
|
|
return function(p1__14346_SHARP_) {
|
|
return cljs.core.cons.call(null, cljs.core.first.call(null, p1__14346_SHARP_), cljs.core.interpose.call(null, cljs.core.first.call(null, p1__14346_SHARP_), cljs.core.second.call(null, p1__14346_SHARP_)))
|
|
}
|
|
}(parentMap, childsParents, newParents), cljs.core.seq.call(null, newParents)));
|
|
if(cljs.core.contains_QMARK_.call(null, parentMap.call(null, tag), parent)) {
|
|
return cljs.core.reduce.call(null, function(p1__14347_SHARP_, p2__14348_SHARP_) {
|
|
return cljs.core.apply.call(null, cljs.core.derive, p1__14347_SHARP_, p2__14348_SHARP_)
|
|
}, cljs.core.make_hierarchy.call(null), cljs.core.partition.call(null, 2, deriv_seq))
|
|
}else {
|
|
return h
|
|
}
|
|
};
|
|
underive = function(h, tag, parent) {
|
|
switch(arguments.length) {
|
|
case 2:
|
|
return underive__2.call(this, h, tag);
|
|
case 3:
|
|
return underive__3.call(this, h, tag, parent)
|
|
}
|
|
throw new Error("Invalid arity: " + arguments.length);
|
|
};
|
|
underive.cljs$core$IFn$_invoke$arity$2 = underive__2;
|
|
underive.cljs$core$IFn$_invoke$arity$3 = underive__3;
|
|
return underive
|
|
}();
|
|
cljs.core.reset_cache = function reset_cache(method_cache, method_table, cached_hierarchy, hierarchy) {
|
|
cljs.core.swap_BANG_.call(null, method_cache, function(_) {
|
|
return cljs.core.deref.call(null, method_table)
|
|
});
|
|
return cljs.core.swap_BANG_.call(null, cached_hierarchy, function(_) {
|
|
return cljs.core.deref.call(null, hierarchy)
|
|
})
|
|
};
|
|
cljs.core.prefers_STAR_ = function prefers_STAR_(x, y, prefer_table) {
|
|
var xprefs = cljs.core.deref.call(null, prefer_table).call(null, x);
|
|
var or__3943__auto__ = cljs.core.truth_(function() {
|
|
var and__3941__auto__ = xprefs;
|
|
if(cljs.core.truth_(and__3941__auto__)) {
|
|
return xprefs.call(null, y)
|
|
}else {
|
|
return and__3941__auto__
|
|
}
|
|
}()) ? true : null;
|
|
if(cljs.core.truth_(or__3943__auto__)) {
|
|
return or__3943__auto__
|
|
}else {
|
|
var or__3943__auto____$1 = function() {
|
|
var ps = cljs.core.parents.call(null, y);
|
|
while(true) {
|
|
if(cljs.core.count.call(null, ps) > 0) {
|
|
if(cljs.core.truth_(prefers_STAR_.call(null, x, cljs.core.first.call(null, ps), prefer_table))) {
|
|
}else {
|
|
}
|
|
var G__14349 = cljs.core.rest.call(null, ps);
|
|
ps = G__14349;
|
|
continue
|
|
}else {
|
|
return null
|
|
}
|
|
break
|
|
}
|
|
}();
|
|
if(cljs.core.truth_(or__3943__auto____$1)) {
|
|
return or__3943__auto____$1
|
|
}else {
|
|
var or__3943__auto____$2 = function() {
|
|
var ps = cljs.core.parents.call(null, x);
|
|
while(true) {
|
|
if(cljs.core.count.call(null, ps) > 0) {
|
|
if(cljs.core.truth_(prefers_STAR_.call(null, cljs.core.first.call(null, ps), y, prefer_table))) {
|
|
}else {
|
|
}
|
|
var G__14350 = cljs.core.rest.call(null, ps);
|
|
ps = G__14350;
|
|
continue
|
|
}else {
|
|
return null
|
|
}
|
|
break
|
|
}
|
|
}();
|
|
if(cljs.core.truth_(or__3943__auto____$2)) {
|
|
return or__3943__auto____$2
|
|
}else {
|
|
return false
|
|
}
|
|
}
|
|
}
|
|
};
|
|
cljs.core.dominates = function dominates(x, y, prefer_table) {
|
|
var or__3943__auto__ = cljs.core.prefers_STAR_.call(null, x, y, prefer_table);
|
|
if(cljs.core.truth_(or__3943__auto__)) {
|
|
return or__3943__auto__
|
|
}else {
|
|
return cljs.core.isa_QMARK_.call(null, x, y)
|
|
}
|
|
};
|
|
cljs.core.find_and_cache_best_method = function find_and_cache_best_method(name, dispatch_val, hierarchy, method_table, prefer_table, method_cache, cached_hierarchy) {
|
|
var best_entry = cljs.core.reduce.call(null, function(be, p__14353) {
|
|
var vec__14354 = p__14353;
|
|
var k = cljs.core.nth.call(null, vec__14354, 0, null);
|
|
var _ = cljs.core.nth.call(null, vec__14354, 1, null);
|
|
var e = vec__14354;
|
|
if(cljs.core.isa_QMARK_.call(null, cljs.core.deref.call(null, hierarchy), dispatch_val, k)) {
|
|
var be2 = cljs.core.truth_(function() {
|
|
var or__3943__auto__ = be == null;
|
|
if(or__3943__auto__) {
|
|
return or__3943__auto__
|
|
}else {
|
|
return cljs.core.dominates.call(null, k, cljs.core.first.call(null, be), prefer_table)
|
|
}
|
|
}()) ? e : be;
|
|
if(cljs.core.truth_(cljs.core.dominates.call(null, cljs.core.first.call(null, be2), k, prefer_table))) {
|
|
}else {
|
|
throw new Error([cljs.core.str("Multiple methods in multimethod '"), cljs.core.str(name), cljs.core.str("' match dispatch value: "), cljs.core.str(dispatch_val), cljs.core.str(" -> "), cljs.core.str(k), cljs.core.str(" and "), cljs.core.str(cljs.core.first.call(null, be2)), cljs.core.str(", and neither is preferred")].join(""));
|
|
}
|
|
return be2
|
|
}else {
|
|
return be
|
|
}
|
|
}, null, cljs.core.deref.call(null, method_table));
|
|
if(cljs.core.truth_(best_entry)) {
|
|
if(cljs.core._EQ_.call(null, cljs.core.deref.call(null, cached_hierarchy), cljs.core.deref.call(null, hierarchy))) {
|
|
cljs.core.swap_BANG_.call(null, method_cache, cljs.core.assoc, dispatch_val, cljs.core.second.call(null, best_entry));
|
|
return cljs.core.second.call(null, best_entry)
|
|
}else {
|
|
cljs.core.reset_cache.call(null, method_cache, method_table, cached_hierarchy, hierarchy);
|
|
return find_and_cache_best_method.call(null, name, dispatch_val, hierarchy, method_table, prefer_table, method_cache, cached_hierarchy)
|
|
}
|
|
}else {
|
|
return null
|
|
}
|
|
};
|
|
cljs.core.IMultiFn = {};
|
|
cljs.core._reset = function _reset(mf) {
|
|
if(function() {
|
|
var and__3941__auto__ = mf;
|
|
if(and__3941__auto__) {
|
|
return mf.cljs$core$IMultiFn$_reset$arity$1
|
|
}else {
|
|
return and__3941__auto__
|
|
}
|
|
}()) {
|
|
return mf.cljs$core$IMultiFn$_reset$arity$1(mf)
|
|
}else {
|
|
var x__2906__auto__ = mf == null ? null : mf;
|
|
return function() {
|
|
var or__3943__auto__ = cljs.core._reset[goog.typeOf(x__2906__auto__)];
|
|
if(or__3943__auto__) {
|
|
return or__3943__auto__
|
|
}else {
|
|
var or__3943__auto____$1 = cljs.core._reset["_"];
|
|
if(or__3943__auto____$1) {
|
|
return or__3943__auto____$1
|
|
}else {
|
|
throw cljs.core.missing_protocol.call(null, "IMultiFn.-reset", mf);
|
|
}
|
|
}
|
|
}().call(null, mf)
|
|
}
|
|
};
|
|
cljs.core._add_method = function _add_method(mf, dispatch_val, method) {
|
|
if(function() {
|
|
var and__3941__auto__ = mf;
|
|
if(and__3941__auto__) {
|
|
return mf.cljs$core$IMultiFn$_add_method$arity$3
|
|
}else {
|
|
return and__3941__auto__
|
|
}
|
|
}()) {
|
|
return mf.cljs$core$IMultiFn$_add_method$arity$3(mf, dispatch_val, method)
|
|
}else {
|
|
var x__2906__auto__ = mf == null ? null : mf;
|
|
return function() {
|
|
var or__3943__auto__ = cljs.core._add_method[goog.typeOf(x__2906__auto__)];
|
|
if(or__3943__auto__) {
|
|
return or__3943__auto__
|
|
}else {
|
|
var or__3943__auto____$1 = cljs.core._add_method["_"];
|
|
if(or__3943__auto____$1) {
|
|
return or__3943__auto____$1
|
|
}else {
|
|
throw cljs.core.missing_protocol.call(null, "IMultiFn.-add-method", mf);
|
|
}
|
|
}
|
|
}().call(null, mf, dispatch_val, method)
|
|
}
|
|
};
|
|
cljs.core._remove_method = function _remove_method(mf, dispatch_val) {
|
|
if(function() {
|
|
var and__3941__auto__ = mf;
|
|
if(and__3941__auto__) {
|
|
return mf.cljs$core$IMultiFn$_remove_method$arity$2
|
|
}else {
|
|
return and__3941__auto__
|
|
}
|
|
}()) {
|
|
return mf.cljs$core$IMultiFn$_remove_method$arity$2(mf, dispatch_val)
|
|
}else {
|
|
var x__2906__auto__ = mf == null ? null : mf;
|
|
return function() {
|
|
var or__3943__auto__ = cljs.core._remove_method[goog.typeOf(x__2906__auto__)];
|
|
if(or__3943__auto__) {
|
|
return or__3943__auto__
|
|
}else {
|
|
var or__3943__auto____$1 = cljs.core._remove_method["_"];
|
|
if(or__3943__auto____$1) {
|
|
return or__3943__auto____$1
|
|
}else {
|
|
throw cljs.core.missing_protocol.call(null, "IMultiFn.-remove-method", mf);
|
|
}
|
|
}
|
|
}().call(null, mf, dispatch_val)
|
|
}
|
|
};
|
|
cljs.core._prefer_method = function _prefer_method(mf, dispatch_val, dispatch_val_y) {
|
|
if(function() {
|
|
var and__3941__auto__ = mf;
|
|
if(and__3941__auto__) {
|
|
return mf.cljs$core$IMultiFn$_prefer_method$arity$3
|
|
}else {
|
|
return and__3941__auto__
|
|
}
|
|
}()) {
|
|
return mf.cljs$core$IMultiFn$_prefer_method$arity$3(mf, dispatch_val, dispatch_val_y)
|
|
}else {
|
|
var x__2906__auto__ = mf == null ? null : mf;
|
|
return function() {
|
|
var or__3943__auto__ = cljs.core._prefer_method[goog.typeOf(x__2906__auto__)];
|
|
if(or__3943__auto__) {
|
|
return or__3943__auto__
|
|
}else {
|
|
var or__3943__auto____$1 = cljs.core._prefer_method["_"];
|
|
if(or__3943__auto____$1) {
|
|
return or__3943__auto____$1
|
|
}else {
|
|
throw cljs.core.missing_protocol.call(null, "IMultiFn.-prefer-method", mf);
|
|
}
|
|
}
|
|
}().call(null, mf, dispatch_val, dispatch_val_y)
|
|
}
|
|
};
|
|
cljs.core._get_method = function _get_method(mf, dispatch_val) {
|
|
if(function() {
|
|
var and__3941__auto__ = mf;
|
|
if(and__3941__auto__) {
|
|
return mf.cljs$core$IMultiFn$_get_method$arity$2
|
|
}else {
|
|
return and__3941__auto__
|
|
}
|
|
}()) {
|
|
return mf.cljs$core$IMultiFn$_get_method$arity$2(mf, dispatch_val)
|
|
}else {
|
|
var x__2906__auto__ = mf == null ? null : mf;
|
|
return function() {
|
|
var or__3943__auto__ = cljs.core._get_method[goog.typeOf(x__2906__auto__)];
|
|
if(or__3943__auto__) {
|
|
return or__3943__auto__
|
|
}else {
|
|
var or__3943__auto____$1 = cljs.core._get_method["_"];
|
|
if(or__3943__auto____$1) {
|
|
return or__3943__auto____$1
|
|
}else {
|
|
throw cljs.core.missing_protocol.call(null, "IMultiFn.-get-method", mf);
|
|
}
|
|
}
|
|
}().call(null, mf, dispatch_val)
|
|
}
|
|
};
|
|
cljs.core._methods = function _methods(mf) {
|
|
if(function() {
|
|
var and__3941__auto__ = mf;
|
|
if(and__3941__auto__) {
|
|
return mf.cljs$core$IMultiFn$_methods$arity$1
|
|
}else {
|
|
return and__3941__auto__
|
|
}
|
|
}()) {
|
|
return mf.cljs$core$IMultiFn$_methods$arity$1(mf)
|
|
}else {
|
|
var x__2906__auto__ = mf == null ? null : mf;
|
|
return function() {
|
|
var or__3943__auto__ = cljs.core._methods[goog.typeOf(x__2906__auto__)];
|
|
if(or__3943__auto__) {
|
|
return or__3943__auto__
|
|
}else {
|
|
var or__3943__auto____$1 = cljs.core._methods["_"];
|
|
if(or__3943__auto____$1) {
|
|
return or__3943__auto____$1
|
|
}else {
|
|
throw cljs.core.missing_protocol.call(null, "IMultiFn.-methods", mf);
|
|
}
|
|
}
|
|
}().call(null, mf)
|
|
}
|
|
};
|
|
cljs.core._prefers = function _prefers(mf) {
|
|
if(function() {
|
|
var and__3941__auto__ = mf;
|
|
if(and__3941__auto__) {
|
|
return mf.cljs$core$IMultiFn$_prefers$arity$1
|
|
}else {
|
|
return and__3941__auto__
|
|
}
|
|
}()) {
|
|
return mf.cljs$core$IMultiFn$_prefers$arity$1(mf)
|
|
}else {
|
|
var x__2906__auto__ = mf == null ? null : mf;
|
|
return function() {
|
|
var or__3943__auto__ = cljs.core._prefers[goog.typeOf(x__2906__auto__)];
|
|
if(or__3943__auto__) {
|
|
return or__3943__auto__
|
|
}else {
|
|
var or__3943__auto____$1 = cljs.core._prefers["_"];
|
|
if(or__3943__auto____$1) {
|
|
return or__3943__auto____$1
|
|
}else {
|
|
throw cljs.core.missing_protocol.call(null, "IMultiFn.-prefers", mf);
|
|
}
|
|
}
|
|
}().call(null, mf)
|
|
}
|
|
};
|
|
cljs.core._dispatch = function _dispatch(mf, args) {
|
|
if(function() {
|
|
var and__3941__auto__ = mf;
|
|
if(and__3941__auto__) {
|
|
return mf.cljs$core$IMultiFn$_dispatch$arity$2
|
|
}else {
|
|
return and__3941__auto__
|
|
}
|
|
}()) {
|
|
return mf.cljs$core$IMultiFn$_dispatch$arity$2(mf, args)
|
|
}else {
|
|
var x__2906__auto__ = mf == null ? null : mf;
|
|
return function() {
|
|
var or__3943__auto__ = cljs.core._dispatch[goog.typeOf(x__2906__auto__)];
|
|
if(or__3943__auto__) {
|
|
return or__3943__auto__
|
|
}else {
|
|
var or__3943__auto____$1 = cljs.core._dispatch["_"];
|
|
if(or__3943__auto____$1) {
|
|
return or__3943__auto____$1
|
|
}else {
|
|
throw cljs.core.missing_protocol.call(null, "IMultiFn.-dispatch", mf);
|
|
}
|
|
}
|
|
}().call(null, mf, args)
|
|
}
|
|
};
|
|
cljs.core.do_dispatch = function do_dispatch(mf, dispatch_fn, args) {
|
|
var dispatch_val = cljs.core.apply.call(null, dispatch_fn, args);
|
|
var target_fn = cljs.core._get_method.call(null, mf, dispatch_val);
|
|
if(cljs.core.truth_(target_fn)) {
|
|
}else {
|
|
throw new Error([cljs.core.str("No method in multimethod '"), cljs.core.str(cljs.core.name), cljs.core.str("' for dispatch value: "), cljs.core.str(dispatch_val)].join(""));
|
|
}
|
|
return cljs.core.apply.call(null, target_fn, args)
|
|
};
|
|
goog.provide("cljs.core.MultiFn");
|
|
cljs.core.MultiFn = function(name, dispatch_fn, default_dispatch_val, hierarchy, method_table, prefer_table, method_cache, cached_hierarchy) {
|
|
this.name = name;
|
|
this.dispatch_fn = dispatch_fn;
|
|
this.default_dispatch_val = default_dispatch_val;
|
|
this.hierarchy = hierarchy;
|
|
this.method_table = method_table;
|
|
this.prefer_table = prefer_table;
|
|
this.method_cache = method_cache;
|
|
this.cached_hierarchy = cached_hierarchy;
|
|
this.cljs$lang$protocol_mask$partition0$ = 4194304;
|
|
this.cljs$lang$protocol_mask$partition1$ = 256
|
|
};
|
|
cljs.core.MultiFn.cljs$lang$type = true;
|
|
cljs.core.MultiFn.cljs$lang$ctorStr = "cljs.core/MultiFn";
|
|
cljs.core.MultiFn.cljs$lang$ctorPrWriter = function(this__2847__auto__, writer__2848__auto__, opt__2849__auto__) {
|
|
return cljs.core._write.call(null, writer__2848__auto__, "cljs.core/MultiFn")
|
|
};
|
|
cljs.core.MultiFn.prototype.cljs$core$IHash$_hash$arity$1 = function(this$) {
|
|
var self__ = this;
|
|
return goog.getUid(this$)
|
|
};
|
|
cljs.core.MultiFn.prototype.cljs$core$IMultiFn$_reset$arity$1 = function(mf) {
|
|
var self__ = this;
|
|
cljs.core.swap_BANG_.call(null, self__.method_table, function(mf__$1) {
|
|
return cljs.core.PersistentArrayMap.EMPTY
|
|
});
|
|
cljs.core.swap_BANG_.call(null, self__.method_cache, function(mf__$1) {
|
|
return cljs.core.PersistentArrayMap.EMPTY
|
|
});
|
|
cljs.core.swap_BANG_.call(null, self__.prefer_table, function(mf__$1) {
|
|
return cljs.core.PersistentArrayMap.EMPTY
|
|
});
|
|
cljs.core.swap_BANG_.call(null, self__.cached_hierarchy, function(mf__$1) {
|
|
return null
|
|
});
|
|
return mf
|
|
};
|
|
cljs.core.MultiFn.prototype.cljs$core$IMultiFn$_add_method$arity$3 = function(mf, dispatch_val, method) {
|
|
var self__ = this;
|
|
cljs.core.swap_BANG_.call(null, self__.method_table, cljs.core.assoc, dispatch_val, method);
|
|
cljs.core.reset_cache.call(null, self__.method_cache, self__.method_table, self__.cached_hierarchy, self__.hierarchy);
|
|
return mf
|
|
};
|
|
cljs.core.MultiFn.prototype.cljs$core$IMultiFn$_remove_method$arity$2 = function(mf, dispatch_val) {
|
|
var self__ = this;
|
|
cljs.core.swap_BANG_.call(null, self__.method_table, cljs.core.dissoc, dispatch_val);
|
|
cljs.core.reset_cache.call(null, self__.method_cache, self__.method_table, self__.cached_hierarchy, self__.hierarchy);
|
|
return mf
|
|
};
|
|
cljs.core.MultiFn.prototype.cljs$core$IMultiFn$_get_method$arity$2 = function(mf, dispatch_val) {
|
|
var self__ = this;
|
|
if(cljs.core._EQ_.call(null, cljs.core.deref.call(null, self__.cached_hierarchy), cljs.core.deref.call(null, self__.hierarchy))) {
|
|
}else {
|
|
cljs.core.reset_cache.call(null, self__.method_cache, self__.method_table, self__.cached_hierarchy, self__.hierarchy)
|
|
}
|
|
var temp__4090__auto__ = cljs.core.deref.call(null, self__.method_cache).call(null, dispatch_val);
|
|
if(cljs.core.truth_(temp__4090__auto__)) {
|
|
var target_fn = temp__4090__auto__;
|
|
return target_fn
|
|
}else {
|
|
var temp__4090__auto____$1 = cljs.core.find_and_cache_best_method.call(null, self__.name, dispatch_val, self__.hierarchy, self__.method_table, self__.prefer_table, self__.method_cache, self__.cached_hierarchy);
|
|
if(cljs.core.truth_(temp__4090__auto____$1)) {
|
|
var target_fn = temp__4090__auto____$1;
|
|
return target_fn
|
|
}else {
|
|
return cljs.core.deref.call(null, self__.method_table).call(null, self__.default_dispatch_val)
|
|
}
|
|
}
|
|
};
|
|
cljs.core.MultiFn.prototype.cljs$core$IMultiFn$_prefer_method$arity$3 = function(mf, dispatch_val_x, dispatch_val_y) {
|
|
var self__ = this;
|
|
if(cljs.core.truth_(cljs.core.prefers_STAR_.call(null, dispatch_val_x, dispatch_val_y, self__.prefer_table))) {
|
|
throw new Error([cljs.core.str("Preference conflict in multimethod '"), cljs.core.str(self__.name), cljs.core.str("': "), cljs.core.str(dispatch_val_y), cljs.core.str(" is already preferred to "), cljs.core.str(dispatch_val_x)].join(""));
|
|
}else {
|
|
}
|
|
cljs.core.swap_BANG_.call(null, self__.prefer_table, function(old) {
|
|
return cljs.core.assoc.call(null, old, dispatch_val_x, cljs.core.conj.call(null, cljs.core.get.call(null, old, dispatch_val_x, cljs.core.PersistentHashSet.EMPTY), dispatch_val_y))
|
|
});
|
|
return cljs.core.reset_cache.call(null, self__.method_cache, self__.method_table, self__.cached_hierarchy, self__.hierarchy)
|
|
};
|
|
cljs.core.MultiFn.prototype.cljs$core$IMultiFn$_methods$arity$1 = function(mf) {
|
|
var self__ = this;
|
|
return cljs.core.deref.call(null, self__.method_table)
|
|
};
|
|
cljs.core.MultiFn.prototype.cljs$core$IMultiFn$_prefers$arity$1 = function(mf) {
|
|
var self__ = this;
|
|
return cljs.core.deref.call(null, self__.prefer_table)
|
|
};
|
|
cljs.core.MultiFn.prototype.cljs$core$IMultiFn$_dispatch$arity$2 = function(mf, args) {
|
|
var self__ = this;
|
|
return cljs.core.do_dispatch.call(null, mf, self__.dispatch_fn, args)
|
|
};
|
|
cljs.core.__GT_MultiFn = function __GT_MultiFn(name, dispatch_fn, default_dispatch_val, hierarchy, method_table, prefer_table, method_cache, cached_hierarchy) {
|
|
return new cljs.core.MultiFn(name, dispatch_fn, default_dispatch_val, hierarchy, method_table, prefer_table, method_cache, cached_hierarchy)
|
|
};
|
|
cljs.core.MultiFn.prototype.call = function() {
|
|
var G__14355__delegate = function(_, args) {
|
|
var self = this;
|
|
return cljs.core._dispatch.call(null, self, args)
|
|
};
|
|
var G__14355 = function(_, var_args) {
|
|
var args = null;
|
|
if(arguments.length > 1) {
|
|
args = cljs.core.array_seq(Array.prototype.slice.call(arguments, 1), 0)
|
|
}
|
|
return G__14355__delegate.call(this, _, args)
|
|
};
|
|
G__14355.cljs$lang$maxFixedArity = 1;
|
|
G__14355.cljs$lang$applyTo = function(arglist__14356) {
|
|
var _ = cljs.core.first(arglist__14356);
|
|
var args = cljs.core.rest(arglist__14356);
|
|
return G__14355__delegate(_, args)
|
|
};
|
|
G__14355.cljs$core$IFn$_invoke$arity$variadic = G__14355__delegate;
|
|
return G__14355
|
|
}();
|
|
cljs.core.MultiFn.prototype.apply = function(_, args) {
|
|
var self = this;
|
|
return cljs.core._dispatch.call(null, self, args)
|
|
};
|
|
cljs.core.remove_all_methods = function remove_all_methods(multifn) {
|
|
return cljs.core._reset.call(null, multifn)
|
|
};
|
|
cljs.core.remove_method = function remove_method(multifn, dispatch_val) {
|
|
return cljs.core._remove_method.call(null, multifn, dispatch_val)
|
|
};
|
|
cljs.core.prefer_method = function prefer_method(multifn, dispatch_val_x, dispatch_val_y) {
|
|
return cljs.core._prefer_method.call(null, multifn, dispatch_val_x, dispatch_val_y)
|
|
};
|
|
cljs.core.methods$ = function methods$(multifn) {
|
|
return cljs.core._methods.call(null, multifn)
|
|
};
|
|
cljs.core.get_method = function get_method(multifn, dispatch_val) {
|
|
return cljs.core._get_method.call(null, multifn, dispatch_val)
|
|
};
|
|
cljs.core.prefers = function prefers(multifn) {
|
|
return cljs.core._prefers.call(null, multifn)
|
|
};
|
|
goog.provide("cljs.core.UUID");
|
|
cljs.core.UUID = function(uuid) {
|
|
this.uuid = uuid;
|
|
this.cljs$lang$protocol_mask$partition1$ = 0;
|
|
this.cljs$lang$protocol_mask$partition0$ = 2153775104
|
|
};
|
|
cljs.core.UUID.cljs$lang$type = true;
|
|
cljs.core.UUID.cljs$lang$ctorStr = "cljs.core/UUID";
|
|
cljs.core.UUID.cljs$lang$ctorPrWriter = function(this__2847__auto__, writer__2848__auto__, opt__2849__auto__) {
|
|
return cljs.core._write.call(null, writer__2848__auto__, "cljs.core/UUID")
|
|
};
|
|
cljs.core.UUID.prototype.cljs$core$IHash$_hash$arity$1 = function(this$) {
|
|
var self__ = this;
|
|
return goog.string.hashCode(cljs.core.pr_str.call(null, this$))
|
|
};
|
|
cljs.core.UUID.prototype.cljs$core$IPrintWithWriter$_pr_writer$arity$3 = function(_, writer, ___$1) {
|
|
var self__ = this;
|
|
return cljs.core._write.call(null, writer, [cljs.core.str('#uuid "'), cljs.core.str(self__.uuid), cljs.core.str('"')].join(""))
|
|
};
|
|
cljs.core.UUID.prototype.cljs$core$IEquiv$_equiv$arity$2 = function(_, other) {
|
|
var self__ = this;
|
|
var and__3941__auto__ = other instanceof cljs.core.UUID;
|
|
if(and__3941__auto__) {
|
|
return self__.uuid === other.uuid
|
|
}else {
|
|
return and__3941__auto__
|
|
}
|
|
};
|
|
cljs.core.__GT_UUID = function __GT_UUID(uuid) {
|
|
return new cljs.core.UUID(uuid)
|
|
};
|
|
goog.provide("cljs.core.ExceptionInfo");
|
|
cljs.core.ExceptionInfo = function(message, data, cause) {
|
|
this.message = message;
|
|
this.data = data;
|
|
this.cause = cause
|
|
};
|
|
cljs.core.ExceptionInfo.cljs$lang$type = true;
|
|
cljs.core.ExceptionInfo.cljs$lang$ctorStr = "cljs.core/ExceptionInfo";
|
|
cljs.core.ExceptionInfo.cljs$lang$ctorPrWriter = function(this__2850__auto__, writer__2851__auto__, opts__2852__auto__) {
|
|
return cljs.core._write.call(null, writer__2851__auto__, "cljs.core/ExceptionInfo")
|
|
};
|
|
cljs.core.__GT_ExceptionInfo = function __GT_ExceptionInfo(message, data, cause) {
|
|
return new cljs.core.ExceptionInfo(message, data, cause)
|
|
};
|
|
cljs.core.ExceptionInfo.prototype = new Error;
|
|
cljs.core.ExceptionInfo.prototype.constructor = cljs.core.ExceptionInfo;
|
|
cljs.core.ex_info = function() {
|
|
var ex_info = null;
|
|
var ex_info__2 = function(msg, map) {
|
|
return new cljs.core.ExceptionInfo(msg, map, null)
|
|
};
|
|
var ex_info__3 = function(msg, map, cause) {
|
|
return new cljs.core.ExceptionInfo(msg, map, cause)
|
|
};
|
|
ex_info = function(msg, map, cause) {
|
|
switch(arguments.length) {
|
|
case 2:
|
|
return ex_info__2.call(this, msg, map);
|
|
case 3:
|
|
return ex_info__3.call(this, msg, map, cause)
|
|
}
|
|
throw new Error("Invalid arity: " + arguments.length);
|
|
};
|
|
ex_info.cljs$core$IFn$_invoke$arity$2 = ex_info__2;
|
|
ex_info.cljs$core$IFn$_invoke$arity$3 = ex_info__3;
|
|
return ex_info
|
|
}();
|
|
cljs.core.ex_data = function ex_data(ex) {
|
|
if(ex instanceof cljs.core.ExceptionInfo) {
|
|
return ex.data
|
|
}else {
|
|
return null
|
|
}
|
|
};
|
|
cljs.core.ex_message = function ex_message(ex) {
|
|
if(ex instanceof Error) {
|
|
return ex.message
|
|
}else {
|
|
return null
|
|
}
|
|
};
|
|
cljs.core.ex_cause = function ex_cause(ex) {
|
|
if(ex instanceof cljs.core.ExceptionInfo) {
|
|
return ex.cause
|
|
}else {
|
|
return null
|
|
}
|
|
};
|
|
cljs.core.comparator = function comparator(pred) {
|
|
return function(x, y) {
|
|
if(cljs.core.truth_(pred.call(null, x, y))) {
|
|
return-1
|
|
}else {
|
|
if(cljs.core.truth_(pred.call(null, y, x))) {
|
|
return 1
|
|
}else {
|
|
if("\ufdd0:else") {
|
|
return 0
|
|
}else {
|
|
return null
|
|
}
|
|
}
|
|
}
|
|
}
|
|
};
|
|
cljs.core.special_symbol_QMARK_ = function special_symbol_QMARK_(x) {
|
|
return cljs.core.contains_QMARK_.call(null, cljs.core.PersistentHashSet.fromArray([new cljs.core.Symbol(null, "deftype*", "deftype*", -978581244, null), null, new cljs.core.Symbol(null, "new", "new", -1640422567, null), null, new cljs.core.Symbol(null, "try*", "try*", -1636962424, null), null, new cljs.core.Symbol(null, "quote", "quote", -1532577739, null), null, new cljs.core.Symbol(null, "&", "&", -1640531489, null), null, new cljs.core.Symbol(null, "set!", "set!", -1637004872, null), null, new cljs.core.Symbol(null,
|
|
"recur", "recur", -1532142362, null), null, new cljs.core.Symbol(null, ".", ".", -1640531481, null), null, new cljs.core.Symbol(null, "ns", "ns", -1640528002, null), null, new cljs.core.Symbol(null, "do", "do", -1640528316, null), null, new cljs.core.Symbol(null, "fn*", "fn*", -1640430053, null), null, new cljs.core.Symbol(null, "throw", "throw", -1530191713, null), null, new cljs.core.Symbol(null, "letfn*", "letfn*", 1548249632, null), null, new cljs.core.Symbol(null, "js*", "js*", -1640426054,
|
|
null), null, new cljs.core.Symbol(null, "defrecord*", "defrecord*", 774272013, null), null, new cljs.core.Symbol(null, "let*", "let*", -1637213400, null), null, new cljs.core.Symbol(null, "loop*", "loop*", -1537374273, null), null, new cljs.core.Symbol(null, "if", "if", -1640528170, null), null, new cljs.core.Symbol(null, "def", "def", -1640432194, null), null], true), x)
|
|
};
|
|
goog.provide("specljs.results");
|
|
goog.require("cljs.core");
|
|
goog.provide("specljs.results.PassResult");
|
|
specljs.results.PassResult = function(characteristic, seconds) {
|
|
this.characteristic = characteristic;
|
|
this.seconds = seconds
|
|
};
|
|
specljs.results.PassResult.cljs$lang$type = true;
|
|
specljs.results.PassResult.cljs$lang$ctorStr = "specljs.results/PassResult";
|
|
specljs.results.PassResult.cljs$lang$ctorPrWriter = function(this__2850__auto__, writer__2851__auto__, opts__2852__auto__) {
|
|
return cljs.core._write.call(null, writer__2851__auto__, "specljs.results/PassResult")
|
|
};
|
|
specljs.results.__GT_PassResult = function __GT_PassResult(characteristic, seconds) {
|
|
return new specljs.results.PassResult(characteristic, seconds)
|
|
};
|
|
goog.provide("specljs.results.FailResult");
|
|
specljs.results.FailResult = function(characteristic, seconds, failure) {
|
|
this.characteristic = characteristic;
|
|
this.seconds = seconds;
|
|
this.failure = failure
|
|
};
|
|
specljs.results.FailResult.cljs$lang$type = true;
|
|
specljs.results.FailResult.cljs$lang$ctorStr = "specljs.results/FailResult";
|
|
specljs.results.FailResult.cljs$lang$ctorPrWriter = function(this__2850__auto__, writer__2851__auto__, opts__2852__auto__) {
|
|
return cljs.core._write.call(null, writer__2851__auto__, "specljs.results/FailResult")
|
|
};
|
|
specljs.results.__GT_FailResult = function __GT_FailResult(characteristic, seconds, failure) {
|
|
return new specljs.results.FailResult(characteristic, seconds, failure)
|
|
};
|
|
goog.provide("specljs.results.PendingResult");
|
|
specljs.results.PendingResult = function(characteristic, seconds, exception) {
|
|
this.characteristic = characteristic;
|
|
this.seconds = seconds;
|
|
this.exception = exception
|
|
};
|
|
specljs.results.PendingResult.cljs$lang$type = true;
|
|
specljs.results.PendingResult.cljs$lang$ctorStr = "specljs.results/PendingResult";
|
|
specljs.results.PendingResult.cljs$lang$ctorPrWriter = function(this__2850__auto__, writer__2851__auto__, opts__2852__auto__) {
|
|
return cljs.core._write.call(null, writer__2851__auto__, "specljs.results/PendingResult")
|
|
};
|
|
specljs.results.__GT_PendingResult = function __GT_PendingResult(characteristic, seconds, exception) {
|
|
return new specljs.results.PendingResult(characteristic, seconds, exception)
|
|
};
|
|
goog.provide("specljs.results.ErrorResult");
|
|
specljs.results.ErrorResult = function(characteristic, seconds, exception) {
|
|
this.characteristic = characteristic;
|
|
this.seconds = seconds;
|
|
this.exception = exception
|
|
};
|
|
specljs.results.ErrorResult.cljs$lang$type = true;
|
|
specljs.results.ErrorResult.cljs$lang$ctorStr = "specljs.results/ErrorResult";
|
|
specljs.results.ErrorResult.cljs$lang$ctorPrWriter = function(this__2850__auto__, writer__2851__auto__, opts__2852__auto__) {
|
|
return cljs.core._write.call(null, writer__2851__auto__, "specljs.results/ErrorResult")
|
|
};
|
|
specljs.results.__GT_ErrorResult = function __GT_ErrorResult(characteristic, seconds, exception) {
|
|
return new specljs.results.ErrorResult(characteristic, seconds, exception)
|
|
};
|
|
specljs.results.pass_result = function pass_result(characteristic, seconds) {
|
|
return new specljs.results.PassResult(characteristic, seconds)
|
|
};
|
|
specljs.results.fail_result = function fail_result(characteristic, seconds, failure) {
|
|
return new specljs.results.FailResult(characteristic, seconds, failure)
|
|
};
|
|
specljs.results.pending_result = function pending_result(characteristic, seconds, exception) {
|
|
return new specljs.results.PendingResult(characteristic, seconds, exception)
|
|
};
|
|
specljs.results.error_result = function error_result(exception) {
|
|
return new specljs.results.ErrorResult(null, 0, exception)
|
|
};
|
|
specljs.results.pass_QMARK_ = function pass_QMARK_(result) {
|
|
return cljs.core._EQ_.call(null, cljs.core.type.call(null, result), specljs.results.PassResult)
|
|
};
|
|
specljs.results.fail_QMARK_ = function fail_QMARK_(result) {
|
|
return cljs.core._EQ_.call(null, cljs.core.type.call(null, result), specljs.results.FailResult)
|
|
};
|
|
specljs.results.pending_QMARK_ = function pending_QMARK_(result) {
|
|
return cljs.core._EQ_.call(null, cljs.core.type.call(null, result), specljs.results.PendingResult)
|
|
};
|
|
specljs.results.error_QMARK_ = function error_QMARK_(result) {
|
|
return cljs.core._EQ_.call(null, cljs.core.type.call(null, result), specljs.results.ErrorResult)
|
|
};
|
|
specljs.results.fail_count = function fail_count(results) {
|
|
return cljs.core.reduce.call(null, function(p1__15854_SHARP_, p2__15853_SHARP_) {
|
|
if(cljs.core.truth_(function() {
|
|
var or__3943__auto__ = specljs.results.fail_QMARK_.call(null, p2__15853_SHARP_);
|
|
if(cljs.core.truth_(or__3943__auto__)) {
|
|
return or__3943__auto__
|
|
}else {
|
|
return specljs.results.error_QMARK_.call(null, p2__15853_SHARP_)
|
|
}
|
|
}())) {
|
|
return p1__15854_SHARP_ + 1
|
|
}else {
|
|
return p1__15854_SHARP_
|
|
}
|
|
}, 0, results)
|
|
};
|
|
specljs.results.categorize = function categorize(results) {
|
|
return cljs.core.reduce.call(null, function(tally, result) {
|
|
if(cljs.core.truth_(specljs.results.pending_QMARK_.call(null, result))) {
|
|
return cljs.core.update_in.call(null, tally, cljs.core.PersistentVector.fromArray(["\ufdd0:pending"], true), cljs.core.conj, result)
|
|
}else {
|
|
if(cljs.core.truth_(specljs.results.error_QMARK_.call(null, result))) {
|
|
return cljs.core.update_in.call(null, tally, cljs.core.PersistentVector.fromArray(["\ufdd0:error"], true), cljs.core.conj, result)
|
|
}else {
|
|
if(cljs.core.truth_(specljs.results.fail_QMARK_.call(null, result))) {
|
|
return cljs.core.update_in.call(null, tally, cljs.core.PersistentVector.fromArray(["\ufdd0:fail"], true), cljs.core.conj, result)
|
|
}else {
|
|
if("\ufdd0:else") {
|
|
return cljs.core.update_in.call(null, tally, cljs.core.PersistentVector.fromArray(["\ufdd0:pass"], true), cljs.core.conj, result)
|
|
}else {
|
|
return null
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}, cljs.core.PersistentArrayMap.fromArray(["\ufdd0:pending", cljs.core.PersistentVector.EMPTY, "\ufdd0:fail", cljs.core.PersistentVector.EMPTY, "\ufdd0:pass", cljs.core.PersistentVector.EMPTY, "\ufdd0:error", cljs.core.PersistentVector.EMPTY], true), results)
|
|
};
|
|
goog.provide("clojure.string");
|
|
goog.require("cljs.core");
|
|
goog.require("goog.string.StringBuffer");
|
|
goog.require("goog.string");
|
|
clojure.string.seq_reverse = function seq_reverse(coll) {
|
|
return cljs.core.reduce.call(null, cljs.core.conj, cljs.core.List.EMPTY, coll)
|
|
};
|
|
clojure.string.reverse = function reverse(s) {
|
|
return s.split("").reverse().join("")
|
|
};
|
|
clojure.string.replace = function replace(s, match, replacement) {
|
|
if(cljs.core.string_QMARK_.call(null, match)) {
|
|
return s.replace(new RegExp(goog.string.regExpEscape(match), "g"), replacement)
|
|
}else {
|
|
if(cljs.core.truth_(match.hasOwnProperty("source"))) {
|
|
return s.replace(new RegExp(match.source, "g"), replacement)
|
|
}else {
|
|
if("\ufdd0:else") {
|
|
throw[cljs.core.str("Invalid match arg: "), cljs.core.str(match)].join("");
|
|
}else {
|
|
return null
|
|
}
|
|
}
|
|
}
|
|
};
|
|
clojure.string.replace_first = function replace_first(s, match, replacement) {
|
|
return s.replace(match, replacement)
|
|
};
|
|
clojure.string.join = function() {
|
|
var join = null;
|
|
var join__1 = function(coll) {
|
|
return cljs.core.apply.call(null, cljs.core.str, coll)
|
|
};
|
|
var join__2 = function(separator, coll) {
|
|
return cljs.core.apply.call(null, cljs.core.str, cljs.core.interpose.call(null, separator, coll))
|
|
};
|
|
join = function(separator, coll) {
|
|
switch(arguments.length) {
|
|
case 1:
|
|
return join__1.call(this, separator);
|
|
case 2:
|
|
return join__2.call(this, separator, coll)
|
|
}
|
|
throw new Error("Invalid arity: " + arguments.length);
|
|
};
|
|
join.cljs$core$IFn$_invoke$arity$1 = join__1;
|
|
join.cljs$core$IFn$_invoke$arity$2 = join__2;
|
|
return join
|
|
}();
|
|
clojure.string.upper_case = function upper_case(s) {
|
|
return s.toUpperCase()
|
|
};
|
|
clojure.string.lower_case = function lower_case(s) {
|
|
return s.toLowerCase()
|
|
};
|
|
clojure.string.capitalize = function capitalize(s) {
|
|
if(cljs.core.count.call(null, s) < 2) {
|
|
return clojure.string.upper_case.call(null, s)
|
|
}else {
|
|
return[cljs.core.str(clojure.string.upper_case.call(null, cljs.core.subs.call(null, s, 0, 1))), cljs.core.str(clojure.string.lower_case.call(null, cljs.core.subs.call(null, s, 1)))].join("")
|
|
}
|
|
};
|
|
clojure.string.split = function() {
|
|
var split = null;
|
|
var split__2 = function(s, re) {
|
|
return cljs.core.vec.call(null, [cljs.core.str(s)].join("").split(re))
|
|
};
|
|
var split__3 = function(s, re, limit) {
|
|
if(limit < 1) {
|
|
return cljs.core.vec.call(null, [cljs.core.str(s)].join("").split(re))
|
|
}else {
|
|
var s__$1 = s;
|
|
var limit__$1 = limit;
|
|
var parts = cljs.core.PersistentVector.EMPTY;
|
|
while(true) {
|
|
if(cljs.core._EQ_.call(null, limit__$1, 1)) {
|
|
return cljs.core.conj.call(null, parts, s__$1)
|
|
}else {
|
|
var temp__4090__auto__ = cljs.core.re_find.call(null, re, s__$1);
|
|
if(cljs.core.truth_(temp__4090__auto__)) {
|
|
var m = temp__4090__auto__;
|
|
var index = s__$1.indexOf(m);
|
|
var G__14893 = s__$1.substring(index + cljs.core.count.call(null, m));
|
|
var G__14894 = limit__$1 - 1;
|
|
var G__14895 = cljs.core.conj.call(null, parts, s__$1.substring(0, index));
|
|
s__$1 = G__14893;
|
|
limit__$1 = G__14894;
|
|
parts = G__14895;
|
|
continue
|
|
}else {
|
|
return cljs.core.conj.call(null, parts, s__$1)
|
|
}
|
|
}
|
|
break
|
|
}
|
|
}
|
|
};
|
|
split = function(s, re, limit) {
|
|
switch(arguments.length) {
|
|
case 2:
|
|
return split__2.call(this, s, re);
|
|
case 3:
|
|
return split__3.call(this, s, re, limit)
|
|
}
|
|
throw new Error("Invalid arity: " + arguments.length);
|
|
};
|
|
split.cljs$core$IFn$_invoke$arity$2 = split__2;
|
|
split.cljs$core$IFn$_invoke$arity$3 = split__3;
|
|
return split
|
|
}();
|
|
clojure.string.split_lines = function split_lines(s) {
|
|
return clojure.string.split.call(null, s, /\n|\r\n/)
|
|
};
|
|
clojure.string.trim = function trim(s) {
|
|
return goog.string.trim(s)
|
|
};
|
|
clojure.string.triml = function triml(s) {
|
|
return goog.string.trimLeft(s)
|
|
};
|
|
clojure.string.trimr = function trimr(s) {
|
|
return goog.string.trimRight(s)
|
|
};
|
|
clojure.string.trim_newline = function trim_newline(s) {
|
|
var index = s.length;
|
|
while(true) {
|
|
if(index === 0) {
|
|
return""
|
|
}else {
|
|
var ch = cljs.core.get.call(null, s, index - 1);
|
|
if(function() {
|
|
var or__3943__auto__ = cljs.core._EQ_.call(null, ch, "\n");
|
|
if(or__3943__auto__) {
|
|
return or__3943__auto__
|
|
}else {
|
|
return cljs.core._EQ_.call(null, ch, "\r")
|
|
}
|
|
}()) {
|
|
var G__14896 = index - 1;
|
|
index = G__14896;
|
|
continue
|
|
}else {
|
|
return s.substring(0, index)
|
|
}
|
|
}
|
|
break
|
|
}
|
|
};
|
|
clojure.string.blank_QMARK_ = function blank_QMARK_(s) {
|
|
return goog.string.isEmptySafe(s)
|
|
};
|
|
clojure.string.escape = function escape(s, cmap) {
|
|
var buffer = new goog.string.StringBuffer;
|
|
var length = s.length;
|
|
var index = 0;
|
|
while(true) {
|
|
if(cljs.core._EQ_.call(null, length, index)) {
|
|
return buffer.toString()
|
|
}else {
|
|
var ch = s.charAt(index);
|
|
var temp__4090__auto___14897 = cljs.core.get.call(null, cmap, ch);
|
|
if(cljs.core.truth_(temp__4090__auto___14897)) {
|
|
var replacement_14898 = temp__4090__auto___14897;
|
|
buffer.append([cljs.core.str(replacement_14898)].join(""))
|
|
}else {
|
|
buffer.append(ch)
|
|
}
|
|
var G__14899 = index + 1;
|
|
index = G__14899;
|
|
continue
|
|
}
|
|
break
|
|
}
|
|
};
|
|
goog.provide("specljs.platform");
|
|
goog.require("cljs.core");
|
|
goog.require("clojure.string");
|
|
specljs.platform.endl = "\n";
|
|
specljs.platform.file_separator = "/";
|
|
specljs.platform.re_type = cljs.core.type.call(null, /./);
|
|
specljs.platform.re_QMARK_ = function re_QMARK_(obj) {
|
|
return cljs.core._EQ_.call(null, specljs.platform.re_type, cljs.core.type.call(null, obj))
|
|
};
|
|
goog.provide("specljs.platform.SpecFailure");
|
|
specljs.platform.SpecFailure = function(message) {
|
|
this.message = message
|
|
};
|
|
specljs.platform.SpecFailure.cljs$lang$type = true;
|
|
specljs.platform.SpecFailure.cljs$lang$ctorStr = "specljs.platform/SpecFailure";
|
|
specljs.platform.SpecFailure.cljs$lang$ctorPrWriter = function(this__2850__auto__, writer__2851__auto__, opts__2852__auto__) {
|
|
return cljs.core._write.call(null, writer__2851__auto__, "specljs.platform/SpecFailure")
|
|
};
|
|
specljs.platform.__GT_SpecFailure = function __GT_SpecFailure(message) {
|
|
return new specljs.platform.SpecFailure(message)
|
|
};
|
|
specljs.platform.SpecFailure.prototype = new Error;
|
|
specljs.platform.SpecFailure.prototype.constructor = specljs.platform.SpecFailure;
|
|
goog.provide("specljs.platform.SpecPending");
|
|
specljs.platform.SpecPending = function(message) {
|
|
this.message = message
|
|
};
|
|
specljs.platform.SpecPending.cljs$lang$type = true;
|
|
specljs.platform.SpecPending.cljs$lang$ctorStr = "specljs.platform/SpecPending";
|
|
specljs.platform.SpecPending.cljs$lang$ctorPrWriter = function(this__2850__auto__, writer__2851__auto__, opts__2852__auto__) {
|
|
return cljs.core._write.call(null, writer__2851__auto__, "specljs.platform/SpecPending")
|
|
};
|
|
specljs.platform.__GT_SpecPending = function __GT_SpecPending(message) {
|
|
return new specljs.platform.SpecPending(message)
|
|
};
|
|
specljs.platform.throwable = Object;
|
|
specljs.platform.exception = Error;
|
|
specljs.platform.failure = specljs.platform.SpecFailure;
|
|
specljs.platform.pending = specljs.platform.SpecPending;
|
|
specljs.platform.pending_QMARK_ = function pending_QMARK_(e) {
|
|
return cljs.core.isa_QMARK_.call(null, cljs.core.type.call(null, e), specljs.platform.SpecPending)
|
|
};
|
|
specljs.platform.failure_QMARK_ = function failure_QMARK_(e) {
|
|
return cljs.core.isa_QMARK_.call(null, cljs.core.type.call(null, e), specljs.platform.SpecFailure)
|
|
};
|
|
specljs.platform.error_message = function error_message(e) {
|
|
return e.message
|
|
};
|
|
specljs.platform.failure_source = function failure_source(e) {
|
|
if(cljs.core.truth_(e.fileName)) {
|
|
return[cljs.core.str(e.fileName), cljs.core.str(":"), cljs.core.str(function() {
|
|
var or__3943__auto__ = e.lineNumber;
|
|
if(cljs.core.truth_(or__3943__auto__)) {
|
|
return or__3943__auto__
|
|
}else {
|
|
return"?"
|
|
}
|
|
}())].join("")
|
|
}else {
|
|
if(cljs.core.truth_(e.stack)) {
|
|
return clojure.string.trim.call(null, cljs.core.nth.call(null, clojure.string.split_lines.call(null, e.stack), cljs.core.count.call(null, clojure.string.split_lines.call(null, e.message))))
|
|
}else {
|
|
if("\ufdd0:else") {
|
|
return"unkown-file:?"
|
|
}else {
|
|
return null
|
|
}
|
|
}
|
|
}
|
|
};
|
|
specljs.platform.stack_trace = function stack_trace(e) {
|
|
return cljs.core.rest.call(null, clojure.string.split_lines.call(null, function() {
|
|
var or__3943__auto__ = e.stack;
|
|
if(cljs.core.truth_(or__3943__auto__)) {
|
|
return or__3943__auto__
|
|
}else {
|
|
return e.toString()
|
|
}
|
|
}()))
|
|
};
|
|
specljs.platform.cause = function cause(e) {
|
|
return null
|
|
};
|
|
specljs.platform.print_stack_trace = function print_stack_trace(e) {
|
|
return cljs.core.println.call(null, function() {
|
|
var or__3943__auto__ = e.stack;
|
|
if(cljs.core.truth_(or__3943__auto__)) {
|
|
return or__3943__auto__
|
|
}else {
|
|
return"missing stack trace"
|
|
}
|
|
}())
|
|
};
|
|
specljs.platform.elide_level_QMARK_ = function elide_level_QMARK_(stack_element) {
|
|
return false
|
|
};
|
|
specljs.platform.type_name = function type_name(t) {
|
|
if(cljs.core.truth_(t)) {
|
|
return t.name
|
|
}else {
|
|
return"nil"
|
|
}
|
|
};
|
|
specljs.platform.format_seconds = function format_seconds(secs) {
|
|
return secs.toFixed(5)
|
|
};
|
|
specljs.platform.current_time = function current_time() {
|
|
return(new Date).getTime()
|
|
};
|
|
specljs.platform.secs_since = function secs_since(start) {
|
|
return((new Date).getTime() - start) / 1E3
|
|
};
|
|
cljs.core._STAR_print_fn_STAR_ = function(thing) {
|
|
return console.log(thing)
|
|
};
|
|
specljs.platform.dynamically_invoke = function dynamically_invoke(ns_name, fn_name) {
|
|
var code = cljs.core.format.call(null, "%s.%s();", clojure.string.replace.call(null, ns_name, "-", "_"), clojure.string.replace.call(null, fn_name, "-", "_"));
|
|
return eval(code)
|
|
};
|
|
goog.provide("specljs.config");
|
|
goog.require("cljs.core");
|
|
goog.require("specljs.platform");
|
|
goog.require("specljs.platform");
|
|
specljs.config.default_reporters = cljs.core.atom.call(null, null);
|
|
specljs.config.active_reporters = function active_reporters() {
|
|
if(cljs.core.truth_(specljs.config._STAR_reporters_STAR_)) {
|
|
return specljs.config._STAR_reporters_STAR_
|
|
}else {
|
|
var temp__4090__auto__ = cljs.core.deref.call(null, specljs.config.default_reporters);
|
|
if(cljs.core.truth_(temp__4090__auto__)) {
|
|
var reporters = temp__4090__auto__;
|
|
return reporters
|
|
}else {
|
|
throw new Error("*reporters* is unbound and no default value has been provided");
|
|
}
|
|
}
|
|
};
|
|
specljs.config.default_runner = cljs.core.atom.call(null, null);
|
|
specljs.config.default_runner_fn = cljs.core.atom.call(null, null);
|
|
specljs.config.active_runner = function active_runner() {
|
|
if(cljs.core.truth_(specljs.config._STAR_runner_STAR_)) {
|
|
return specljs.config._STAR_runner_STAR_
|
|
}else {
|
|
var temp__4090__auto__ = cljs.core.deref.call(null, specljs.config.default_runner);
|
|
if(cljs.core.truth_(temp__4090__auto__)) {
|
|
var runner = temp__4090__auto__;
|
|
return runner
|
|
}else {
|
|
throw new Error("*runner* is unbound and no default value has been provided");
|
|
}
|
|
}
|
|
};
|
|
specljs.config._STAR_color_QMARK__STAR_ = false;
|
|
specljs.config._STAR_full_stack_trace_QMARK__STAR_ = false;
|
|
specljs.config._STAR_tag_filter_STAR_ = cljs.core.PersistentArrayMap.fromArray(["\ufdd0:include", cljs.core.PersistentHashSet.EMPTY, "\ufdd0:exclude", cljs.core.PersistentHashSet.EMPTY], true);
|
|
specljs.config.default_config = cljs.core.PersistentArrayMap.fromArray(["\ufdd0:specs", cljs.core.PersistentVector.fromArray(["spec"], true), "\ufdd0:runner", "standard", "\ufdd0:reporters", cljs.core.PersistentVector.fromArray(["progress"], true), "\ufdd0:tags", cljs.core.PersistentVector.EMPTY], true);
|
|
specljs.config.load_runner = function load_runner(name) {
|
|
try {
|
|
return specljs.platform.dynamically_invoke.call(null, [cljs.core.str("specljs.run."), cljs.core.str(name)].join(""), [cljs.core.str("new-"), cljs.core.str(name), cljs.core.str("-runner")].join(""))
|
|
}catch(e15832) {
|
|
if(e15832 instanceof Error) {
|
|
var e = e15832;
|
|
throw new Error([cljs.core.str("Failed to load runner: "), cljs.core.str(name)].join(""), e);
|
|
}else {
|
|
if("\ufdd0:else") {
|
|
throw e15832;
|
|
}else {
|
|
return null
|
|
}
|
|
}
|
|
}
|
|
};
|
|
specljs.config.load_reporter = function load_reporter(name) {
|
|
try {
|
|
return specljs.platform.dynamically_invoke.call(null, [cljs.core.str("specljs.report."), cljs.core.str(name)].join(""), [cljs.core.str("new-"), cljs.core.str(name), cljs.core.str("-reporter")].join(""))
|
|
}catch(e15834) {
|
|
if(e15834 instanceof Error) {
|
|
var e = e15834;
|
|
throw new Error([cljs.core.str("Failed to load reporter: "), cljs.core.str(name)].join(""), e);
|
|
}else {
|
|
if("\ufdd0:else") {
|
|
throw e15834;
|
|
}else {
|
|
return null
|
|
}
|
|
}
|
|
}
|
|
};
|
|
specljs.config.parse_tags = function parse_tags(values) {
|
|
var result = cljs.core.PersistentArrayMap.fromArray(["\ufdd0:includes", cljs.core.PersistentHashSet.EMPTY, "\ufdd0:excludes", cljs.core.PersistentHashSet.EMPTY], true);
|
|
var values__$1 = values;
|
|
while(true) {
|
|
if(cljs.core.seq.call(null, values__$1)) {
|
|
var value = cljs.core.name.call(null, cljs.core.first.call(null, values__$1));
|
|
if(cljs.core._EQ_.call(null, "~", cljs.core.first.call(null, value))) {
|
|
var G__15835 = cljs.core.update_in.call(null, result, cljs.core.PersistentVector.fromArray(["\ufdd0:excludes"], true), cljs.core.conj, cljs.core.keyword.call(null, cljs.core.apply.call(null, cljs.core.str, cljs.core.rest.call(null, value))));
|
|
var G__15836 = cljs.core.rest.call(null, values__$1);
|
|
result = G__15835;
|
|
values__$1 = G__15836;
|
|
continue
|
|
}else {
|
|
var G__15837 = cljs.core.update_in.call(null, result, cljs.core.PersistentVector.fromArray(["\ufdd0:includes"], true), cljs.core.conj, cljs.core.keyword.call(null, value));
|
|
var G__15838 = cljs.core.rest.call(null, values__$1);
|
|
result = G__15837;
|
|
values__$1 = G__15838;
|
|
continue
|
|
}
|
|
}else {
|
|
return result
|
|
}
|
|
break
|
|
}
|
|
};
|
|
specljs.config.with_config = function with_config(config, action) {
|
|
var _STAR_runner_STAR_15846 = specljs.config._STAR_runner_STAR_;
|
|
var _STAR_reporters_STAR_15847 = specljs.config._STAR_reporters_STAR_;
|
|
var _STAR_specs_STAR_15848 = specljs.config._STAR_specs_STAR_;
|
|
var _STAR_color_QMARK__STAR_15849 = specljs.config._STAR_color_QMARK__STAR_;
|
|
var _STAR_full_stack_trace_QMARK__STAR_15850 = specljs.config._STAR_full_stack_trace_QMARK__STAR_;
|
|
var _STAR_tag_filter_STAR_15851 = specljs.config._STAR_tag_filter_STAR_;
|
|
try {
|
|
specljs.config._STAR_runner_STAR_ = cljs.core.truth_((new cljs.core.Keyword("\ufdd0:runner")).call(null, config)) ? function() {
|
|
cljs.core.println.call(null, "loading runner in config");
|
|
return specljs.config.load_runner.call(null, (new cljs.core.Keyword("\ufdd0:runner")).call(null, config))
|
|
}() : specljs.config.active_runner.call(null);
|
|
specljs.config._STAR_reporters_STAR_ = cljs.core.truth_((new cljs.core.Keyword("\ufdd0:reporters")).call(null, config)) ? cljs.core.mapv.call(null, specljs.config.load_reporter, (new cljs.core.Keyword("\ufdd0:reporters")).call(null, config)) : specljs.config.active_reporters.call(null);
|
|
specljs.config._STAR_specs_STAR_ = (new cljs.core.Keyword("\ufdd0:specs")).call(null, config);
|
|
specljs.config._STAR_color_QMARK__STAR_ = (new cljs.core.Keyword("\ufdd0:color")).call(null, config);
|
|
specljs.config._STAR_full_stack_trace_QMARK__STAR_ = !((new cljs.core.Keyword("\ufdd0:stacktrace")).call(null, config) == null);
|
|
specljs.config._STAR_tag_filter_STAR_ = specljs.config.parse_tags.call(null, (new cljs.core.Keyword("\ufdd0:tags")).call(null, config));
|
|
return action.call(null)
|
|
}finally {
|
|
specljs.config._STAR_tag_filter_STAR_ = _STAR_tag_filter_STAR_15851;
|
|
specljs.config._STAR_full_stack_trace_QMARK__STAR_ = _STAR_full_stack_trace_QMARK__STAR_15850;
|
|
specljs.config._STAR_color_QMARK__STAR_ = _STAR_color_QMARK__STAR_15849;
|
|
specljs.config._STAR_specs_STAR_ = _STAR_specs_STAR_15848;
|
|
specljs.config._STAR_reporters_STAR_ = _STAR_reporters_STAR_15847;
|
|
specljs.config._STAR_runner_STAR_ = _STAR_runner_STAR_15846
|
|
}
|
|
};
|
|
goog.provide("specljs.reporting");
|
|
goog.require("cljs.core");
|
|
goog.require("clojure.string");
|
|
goog.require("specljs.results");
|
|
goog.require("specljs.config");
|
|
goog.require("specljs.platform");
|
|
goog.require("specljs.results");
|
|
goog.require("specljs.platform");
|
|
goog.require("specljs.config");
|
|
goog.require("clojure.string");
|
|
specljs.reporting.tally_time = function tally_time(results) {
|
|
return cljs.core.apply.call(null, cljs.core._PLUS_, cljs.core.map.call(null, function(p1__15643_SHARP_) {
|
|
return p1__15643_SHARP_.seconds
|
|
}, results))
|
|
};
|
|
specljs.reporting.Reporter = {};
|
|
specljs.reporting.report_message = function report_message(reporter, message) {
|
|
if(function() {
|
|
var and__3941__auto__ = reporter;
|
|
if(and__3941__auto__) {
|
|
return reporter.specljs$reporting$Reporter$report_message$arity$2
|
|
}else {
|
|
return and__3941__auto__
|
|
}
|
|
}()) {
|
|
return reporter.specljs$reporting$Reporter$report_message$arity$2(reporter, message)
|
|
}else {
|
|
var x__2906__auto__ = reporter == null ? null : reporter;
|
|
return function() {
|
|
var or__3943__auto__ = specljs.reporting.report_message[goog.typeOf(x__2906__auto__)];
|
|
if(or__3943__auto__) {
|
|
return or__3943__auto__
|
|
}else {
|
|
var or__3943__auto____$1 = specljs.reporting.report_message["_"];
|
|
if(or__3943__auto____$1) {
|
|
return or__3943__auto____$1
|
|
}else {
|
|
throw cljs.core.missing_protocol.call(null, "Reporter.report-message", reporter);
|
|
}
|
|
}
|
|
}().call(null, reporter, message)
|
|
}
|
|
};
|
|
specljs.reporting.report_description = function report_description(this$, description) {
|
|
if(function() {
|
|
var and__3941__auto__ = this$;
|
|
if(and__3941__auto__) {
|
|
return this$.specljs$reporting$Reporter$report_description$arity$2
|
|
}else {
|
|
return and__3941__auto__
|
|
}
|
|
}()) {
|
|
return this$.specljs$reporting$Reporter$report_description$arity$2(this$, description)
|
|
}else {
|
|
var x__2906__auto__ = this$ == null ? null : this$;
|
|
return function() {
|
|
var or__3943__auto__ = specljs.reporting.report_description[goog.typeOf(x__2906__auto__)];
|
|
if(or__3943__auto__) {
|
|
return or__3943__auto__
|
|
}else {
|
|
var or__3943__auto____$1 = specljs.reporting.report_description["_"];
|
|
if(or__3943__auto____$1) {
|
|
return or__3943__auto____$1
|
|
}else {
|
|
throw cljs.core.missing_protocol.call(null, "Reporter.report-description", this$);
|
|
}
|
|
}
|
|
}().call(null, this$, description)
|
|
}
|
|
};
|
|
specljs.reporting.report_pass = function report_pass(this$, result) {
|
|
if(function() {
|
|
var and__3941__auto__ = this$;
|
|
if(and__3941__auto__) {
|
|
return this$.specljs$reporting$Reporter$report_pass$arity$2
|
|
}else {
|
|
return and__3941__auto__
|
|
}
|
|
}()) {
|
|
return this$.specljs$reporting$Reporter$report_pass$arity$2(this$, result)
|
|
}else {
|
|
var x__2906__auto__ = this$ == null ? null : this$;
|
|
return function() {
|
|
var or__3943__auto__ = specljs.reporting.report_pass[goog.typeOf(x__2906__auto__)];
|
|
if(or__3943__auto__) {
|
|
return or__3943__auto__
|
|
}else {
|
|
var or__3943__auto____$1 = specljs.reporting.report_pass["_"];
|
|
if(or__3943__auto____$1) {
|
|
return or__3943__auto____$1
|
|
}else {
|
|
throw cljs.core.missing_protocol.call(null, "Reporter.report-pass", this$);
|
|
}
|
|
}
|
|
}().call(null, this$, result)
|
|
}
|
|
};
|
|
specljs.reporting.report_pending = function report_pending(this$, result) {
|
|
if(function() {
|
|
var and__3941__auto__ = this$;
|
|
if(and__3941__auto__) {
|
|
return this$.specljs$reporting$Reporter$report_pending$arity$2
|
|
}else {
|
|
return and__3941__auto__
|
|
}
|
|
}()) {
|
|
return this$.specljs$reporting$Reporter$report_pending$arity$2(this$, result)
|
|
}else {
|
|
var x__2906__auto__ = this$ == null ? null : this$;
|
|
return function() {
|
|
var or__3943__auto__ = specljs.reporting.report_pending[goog.typeOf(x__2906__auto__)];
|
|
if(or__3943__auto__) {
|
|
return or__3943__auto__
|
|
}else {
|
|
var or__3943__auto____$1 = specljs.reporting.report_pending["_"];
|
|
if(or__3943__auto____$1) {
|
|
return or__3943__auto____$1
|
|
}else {
|
|
throw cljs.core.missing_protocol.call(null, "Reporter.report-pending", this$);
|
|
}
|
|
}
|
|
}().call(null, this$, result)
|
|
}
|
|
};
|
|
specljs.reporting.report_fail = function report_fail(this$, result) {
|
|
if(function() {
|
|
var and__3941__auto__ = this$;
|
|
if(and__3941__auto__) {
|
|
return this$.specljs$reporting$Reporter$report_fail$arity$2
|
|
}else {
|
|
return and__3941__auto__
|
|
}
|
|
}()) {
|
|
return this$.specljs$reporting$Reporter$report_fail$arity$2(this$, result)
|
|
}else {
|
|
var x__2906__auto__ = this$ == null ? null : this$;
|
|
return function() {
|
|
var or__3943__auto__ = specljs.reporting.report_fail[goog.typeOf(x__2906__auto__)];
|
|
if(or__3943__auto__) {
|
|
return or__3943__auto__
|
|
}else {
|
|
var or__3943__auto____$1 = specljs.reporting.report_fail["_"];
|
|
if(or__3943__auto____$1) {
|
|
return or__3943__auto____$1
|
|
}else {
|
|
throw cljs.core.missing_protocol.call(null, "Reporter.report-fail", this$);
|
|
}
|
|
}
|
|
}().call(null, this$, result)
|
|
}
|
|
};
|
|
specljs.reporting.report_runs = function report_runs(this$, results) {
|
|
if(function() {
|
|
var and__3941__auto__ = this$;
|
|
if(and__3941__auto__) {
|
|
return this$.specljs$reporting$Reporter$report_runs$arity$2
|
|
}else {
|
|
return and__3941__auto__
|
|
}
|
|
}()) {
|
|
return this$.specljs$reporting$Reporter$report_runs$arity$2(this$, results)
|
|
}else {
|
|
var x__2906__auto__ = this$ == null ? null : this$;
|
|
return function() {
|
|
var or__3943__auto__ = specljs.reporting.report_runs[goog.typeOf(x__2906__auto__)];
|
|
if(or__3943__auto__) {
|
|
return or__3943__auto__
|
|
}else {
|
|
var or__3943__auto____$1 = specljs.reporting.report_runs["_"];
|
|
if(or__3943__auto____$1) {
|
|
return or__3943__auto____$1
|
|
}else {
|
|
throw cljs.core.missing_protocol.call(null, "Reporter.report-runs", this$);
|
|
}
|
|
}
|
|
}().call(null, this$, results)
|
|
}
|
|
};
|
|
specljs.reporting.report_error = function report_error(this$, exception) {
|
|
if(function() {
|
|
var and__3941__auto__ = this$;
|
|
if(and__3941__auto__) {
|
|
return this$.specljs$reporting$Reporter$report_error$arity$2
|
|
}else {
|
|
return and__3941__auto__
|
|
}
|
|
}()) {
|
|
return this$.specljs$reporting$Reporter$report_error$arity$2(this$, exception)
|
|
}else {
|
|
var x__2906__auto__ = this$ == null ? null : this$;
|
|
return function() {
|
|
var or__3943__auto__ = specljs.reporting.report_error[goog.typeOf(x__2906__auto__)];
|
|
if(or__3943__auto__) {
|
|
return or__3943__auto__
|
|
}else {
|
|
var or__3943__auto____$1 = specljs.reporting.report_error["_"];
|
|
if(or__3943__auto____$1) {
|
|
return or__3943__auto____$1
|
|
}else {
|
|
throw cljs.core.missing_protocol.call(null, "Reporter.report-error", this$);
|
|
}
|
|
}
|
|
}().call(null, this$, exception)
|
|
}
|
|
};
|
|
specljs.reporting.report_run = function() {
|
|
var method_table__3094__auto__ = cljs.core.atom.call(null, cljs.core.PersistentArrayMap.EMPTY);
|
|
var prefer_table__3095__auto__ = cljs.core.atom.call(null, cljs.core.PersistentArrayMap.EMPTY);
|
|
var method_cache__3096__auto__ = cljs.core.atom.call(null, cljs.core.PersistentArrayMap.EMPTY);
|
|
var cached_hierarchy__3097__auto__ = cljs.core.atom.call(null, cljs.core.PersistentArrayMap.EMPTY);
|
|
var hierarchy__3098__auto__ = cljs.core.get.call(null, cljs.core.PersistentArrayMap.EMPTY, "\ufdd0:hierarchy", cljs.core.get_global_hierarchy.call(null));
|
|
return new cljs.core.MultiFn("report-run", function(result, reporters) {
|
|
return cljs.core.type.call(null, result)
|
|
}, "\ufdd0:default", hierarchy__3098__auto__, method_table__3094__auto__, prefer_table__3095__auto__, method_cache__3096__auto__, cached_hierarchy__3097__auto__)
|
|
}();
|
|
cljs.core._add_method.call(null, specljs.reporting.report_run, specljs.results.PassResult, function(result, reporters) {
|
|
var seq__15644 = cljs.core.seq.call(null, reporters);
|
|
var chunk__15645 = null;
|
|
var count__15646 = 0;
|
|
var i__15647 = 0;
|
|
while(true) {
|
|
if(i__15647 < count__15646) {
|
|
var reporter = cljs.core._nth.call(null, chunk__15645, i__15647);
|
|
specljs.reporting.report_pass.call(null, reporter, result);
|
|
var G__15648 = seq__15644;
|
|
var G__15649 = chunk__15645;
|
|
var G__15650 = count__15646;
|
|
var G__15651 = i__15647 + 1;
|
|
seq__15644 = G__15648;
|
|
chunk__15645 = G__15649;
|
|
count__15646 = G__15650;
|
|
i__15647 = G__15651;
|
|
continue
|
|
}else {
|
|
var temp__4092__auto__ = cljs.core.seq.call(null, seq__15644);
|
|
if(temp__4092__auto__) {
|
|
var seq__15644__$1 = temp__4092__auto__;
|
|
if(cljs.core.chunked_seq_QMARK_.call(null, seq__15644__$1)) {
|
|
var c__3037__auto__ = cljs.core.chunk_first.call(null, seq__15644__$1);
|
|
var G__15652 = cljs.core.chunk_rest.call(null, seq__15644__$1);
|
|
var G__15653 = c__3037__auto__;
|
|
var G__15654 = cljs.core.count.call(null, c__3037__auto__);
|
|
var G__15655 = 0;
|
|
seq__15644 = G__15652;
|
|
chunk__15645 = G__15653;
|
|
count__15646 = G__15654;
|
|
i__15647 = G__15655;
|
|
continue
|
|
}else {
|
|
var reporter = cljs.core.first.call(null, seq__15644__$1);
|
|
specljs.reporting.report_pass.call(null, reporter, result);
|
|
var G__15656 = cljs.core.next.call(null, seq__15644__$1);
|
|
var G__15657 = null;
|
|
var G__15658 = 0;
|
|
var G__15659 = 0;
|
|
seq__15644 = G__15656;
|
|
chunk__15645 = G__15657;
|
|
count__15646 = G__15658;
|
|
i__15647 = G__15659;
|
|
continue
|
|
}
|
|
}else {
|
|
return null
|
|
}
|
|
}
|
|
break
|
|
}
|
|
});
|
|
cljs.core._add_method.call(null, specljs.reporting.report_run, specljs.results.FailResult, function(result, reporters) {
|
|
var seq__15660 = cljs.core.seq.call(null, reporters);
|
|
var chunk__15661 = null;
|
|
var count__15662 = 0;
|
|
var i__15663 = 0;
|
|
while(true) {
|
|
if(i__15663 < count__15662) {
|
|
var reporter = cljs.core._nth.call(null, chunk__15661, i__15663);
|
|
specljs.reporting.report_fail.call(null, reporter, result);
|
|
var G__15664 = seq__15660;
|
|
var G__15665 = chunk__15661;
|
|
var G__15666 = count__15662;
|
|
var G__15667 = i__15663 + 1;
|
|
seq__15660 = G__15664;
|
|
chunk__15661 = G__15665;
|
|
count__15662 = G__15666;
|
|
i__15663 = G__15667;
|
|
continue
|
|
}else {
|
|
var temp__4092__auto__ = cljs.core.seq.call(null, seq__15660);
|
|
if(temp__4092__auto__) {
|
|
var seq__15660__$1 = temp__4092__auto__;
|
|
if(cljs.core.chunked_seq_QMARK_.call(null, seq__15660__$1)) {
|
|
var c__3037__auto__ = cljs.core.chunk_first.call(null, seq__15660__$1);
|
|
var G__15668 = cljs.core.chunk_rest.call(null, seq__15660__$1);
|
|
var G__15669 = c__3037__auto__;
|
|
var G__15670 = cljs.core.count.call(null, c__3037__auto__);
|
|
var G__15671 = 0;
|
|
seq__15660 = G__15668;
|
|
chunk__15661 = G__15669;
|
|
count__15662 = G__15670;
|
|
i__15663 = G__15671;
|
|
continue
|
|
}else {
|
|
var reporter = cljs.core.first.call(null, seq__15660__$1);
|
|
specljs.reporting.report_fail.call(null, reporter, result);
|
|
var G__15672 = cljs.core.next.call(null, seq__15660__$1);
|
|
var G__15673 = null;
|
|
var G__15674 = 0;
|
|
var G__15675 = 0;
|
|
seq__15660 = G__15672;
|
|
chunk__15661 = G__15673;
|
|
count__15662 = G__15674;
|
|
i__15663 = G__15675;
|
|
continue
|
|
}
|
|
}else {
|
|
return null
|
|
}
|
|
}
|
|
break
|
|
}
|
|
});
|
|
cljs.core._add_method.call(null, specljs.reporting.report_run, specljs.results.PendingResult, function(result, reporters) {
|
|
var seq__15676 = cljs.core.seq.call(null, reporters);
|
|
var chunk__15677 = null;
|
|
var count__15678 = 0;
|
|
var i__15679 = 0;
|
|
while(true) {
|
|
if(i__15679 < count__15678) {
|
|
var reporter = cljs.core._nth.call(null, chunk__15677, i__15679);
|
|
specljs.reporting.report_pending.call(null, reporter, result);
|
|
var G__15680 = seq__15676;
|
|
var G__15681 = chunk__15677;
|
|
var G__15682 = count__15678;
|
|
var G__15683 = i__15679 + 1;
|
|
seq__15676 = G__15680;
|
|
chunk__15677 = G__15681;
|
|
count__15678 = G__15682;
|
|
i__15679 = G__15683;
|
|
continue
|
|
}else {
|
|
var temp__4092__auto__ = cljs.core.seq.call(null, seq__15676);
|
|
if(temp__4092__auto__) {
|
|
var seq__15676__$1 = temp__4092__auto__;
|
|
if(cljs.core.chunked_seq_QMARK_.call(null, seq__15676__$1)) {
|
|
var c__3037__auto__ = cljs.core.chunk_first.call(null, seq__15676__$1);
|
|
var G__15684 = cljs.core.chunk_rest.call(null, seq__15676__$1);
|
|
var G__15685 = c__3037__auto__;
|
|
var G__15686 = cljs.core.count.call(null, c__3037__auto__);
|
|
var G__15687 = 0;
|
|
seq__15676 = G__15684;
|
|
chunk__15677 = G__15685;
|
|
count__15678 = G__15686;
|
|
i__15679 = G__15687;
|
|
continue
|
|
}else {
|
|
var reporter = cljs.core.first.call(null, seq__15676__$1);
|
|
specljs.reporting.report_pending.call(null, reporter, result);
|
|
var G__15688 = cljs.core.next.call(null, seq__15676__$1);
|
|
var G__15689 = null;
|
|
var G__15690 = 0;
|
|
var G__15691 = 0;
|
|
seq__15676 = G__15688;
|
|
chunk__15677 = G__15689;
|
|
count__15678 = G__15690;
|
|
i__15679 = G__15691;
|
|
continue
|
|
}
|
|
}else {
|
|
return null
|
|
}
|
|
}
|
|
break
|
|
}
|
|
});
|
|
cljs.core._add_method.call(null, specljs.reporting.report_run, specljs.results.ErrorResult, function(result, reporters) {
|
|
var seq__15692 = cljs.core.seq.call(null, reporters);
|
|
var chunk__15693 = null;
|
|
var count__15694 = 0;
|
|
var i__15695 = 0;
|
|
while(true) {
|
|
if(i__15695 < count__15694) {
|
|
var reporter = cljs.core._nth.call(null, chunk__15693, i__15695);
|
|
specljs.reporting.report_error.call(null, reporter, result);
|
|
var G__15696 = seq__15692;
|
|
var G__15697 = chunk__15693;
|
|
var G__15698 = count__15694;
|
|
var G__15699 = i__15695 + 1;
|
|
seq__15692 = G__15696;
|
|
chunk__15693 = G__15697;
|
|
count__15694 = G__15698;
|
|
i__15695 = G__15699;
|
|
continue
|
|
}else {
|
|
var temp__4092__auto__ = cljs.core.seq.call(null, seq__15692);
|
|
if(temp__4092__auto__) {
|
|
var seq__15692__$1 = temp__4092__auto__;
|
|
if(cljs.core.chunked_seq_QMARK_.call(null, seq__15692__$1)) {
|
|
var c__3037__auto__ = cljs.core.chunk_first.call(null, seq__15692__$1);
|
|
var G__15700 = cljs.core.chunk_rest.call(null, seq__15692__$1);
|
|
var G__15701 = c__3037__auto__;
|
|
var G__15702 = cljs.core.count.call(null, c__3037__auto__);
|
|
var G__15703 = 0;
|
|
seq__15692 = G__15700;
|
|
chunk__15693 = G__15701;
|
|
count__15694 = G__15702;
|
|
i__15695 = G__15703;
|
|
continue
|
|
}else {
|
|
var reporter = cljs.core.first.call(null, seq__15692__$1);
|
|
specljs.reporting.report_error.call(null, reporter, result);
|
|
var G__15704 = cljs.core.next.call(null, seq__15692__$1);
|
|
var G__15705 = null;
|
|
var G__15706 = 0;
|
|
var G__15707 = 0;
|
|
seq__15692 = G__15704;
|
|
chunk__15693 = G__15705;
|
|
count__15694 = G__15706;
|
|
i__15695 = G__15707;
|
|
continue
|
|
}
|
|
}else {
|
|
return null
|
|
}
|
|
}
|
|
break
|
|
}
|
|
});
|
|
specljs.reporting.stylizer = function stylizer(code) {
|
|
return function(text) {
|
|
if(cljs.core.truth_(specljs.config._STAR_color_QMARK__STAR_)) {
|
|
return[cljs.core.str("\u001b["), cljs.core.str(code), cljs.core.str("m"), cljs.core.str(text), cljs.core.str("\u001b[0m")].join("")
|
|
}else {
|
|
return text
|
|
}
|
|
}
|
|
};
|
|
specljs.reporting.red = specljs.reporting.stylizer.call(null, "31");
|
|
specljs.reporting.green = specljs.reporting.stylizer.call(null, "32");
|
|
specljs.reporting.yellow = specljs.reporting.stylizer.call(null, "33");
|
|
specljs.reporting.grey = specljs.reporting.stylizer.call(null, "90");
|
|
specljs.reporting.print_elides = function print_elides(n) {
|
|
if(n > 0) {
|
|
return cljs.core.println.call(null, "\t...", n, "stack levels elided ...")
|
|
}else {
|
|
return null
|
|
}
|
|
};
|
|
specljs.reporting.print_stack_levels = function print_stack_levels(exception) {
|
|
var levels_15708 = specljs.platform.stack_trace.call(null, exception);
|
|
var elides_15709 = 0;
|
|
while(true) {
|
|
if(cljs.core.seq.call(null, levels_15708)) {
|
|
var level_15710 = cljs.core.first.call(null, levels_15708);
|
|
if(cljs.core.truth_(specljs.platform.elide_level_QMARK_.call(null, level_15710))) {
|
|
var G__15711 = cljs.core.rest.call(null, levels_15708);
|
|
var G__15712 = elides_15709 + 1;
|
|
levels_15708 = G__15711;
|
|
elides_15709 = G__15712;
|
|
continue
|
|
}else {
|
|
specljs.reporting.print_elides.call(null, elides_15709);
|
|
cljs.core.println.call(null, [cljs.core.str(level_15710)].join(""));
|
|
var G__15713 = cljs.core.rest.call(null, levels_15708);
|
|
var G__15714 = 0;
|
|
levels_15708 = G__15713;
|
|
elides_15709 = G__15714;
|
|
continue
|
|
}
|
|
}else {
|
|
specljs.reporting.print_elides.call(null, elides_15709)
|
|
}
|
|
break
|
|
}
|
|
var temp__4090__auto__ = specljs.platform.cause.call(null, exception);
|
|
if(cljs.core.truth_(temp__4090__auto__)) {
|
|
var cause = temp__4090__auto__;
|
|
return specljs.reporting.print_exception.call(null, "Caused by:", cause)
|
|
}else {
|
|
return null
|
|
}
|
|
};
|
|
specljs.reporting.print_exception = function print_exception(prefix, exception) {
|
|
if(cljs.core.truth_(prefix)) {
|
|
cljs.core.println.call(null, prefix, [cljs.core.str(exception)].join(""))
|
|
}else {
|
|
cljs.core.println.call(null, [cljs.core.str(exception)].join(""))
|
|
}
|
|
return specljs.reporting.print_stack_levels.call(null, exception)
|
|
};
|
|
specljs.reporting.stack_trace_str = function stack_trace_str(exception) {
|
|
var sb__3134__auto__ = new goog.string.StringBuffer;
|
|
var _STAR_print_fn_STAR_15717_15719 = cljs.core._STAR_print_fn_STAR_;
|
|
try {
|
|
cljs.core._STAR_print_fn_STAR_ = function(x__3135__auto__) {
|
|
return sb__3134__auto__.append(x__3135__auto__)
|
|
};
|
|
if(cljs.core.truth_(specljs.config._STAR_full_stack_trace_QMARK__STAR_)) {
|
|
specljs.platform.print_stack_trace.call(null, exception)
|
|
}else {
|
|
specljs.reporting.print_exception.call(null, null, exception)
|
|
}
|
|
}finally {
|
|
cljs.core._STAR_print_fn_STAR_ = _STAR_print_fn_STAR_15717_15719
|
|
}
|
|
return[cljs.core.str(sb__3134__auto__)].join("")
|
|
};
|
|
specljs.reporting.prefix = function() {
|
|
var prefix__delegate = function(pre, args) {
|
|
var value = cljs.core.apply.call(null, cljs.core.str, args);
|
|
var lines = clojure.string.split.call(null, value, /[\r\n]+/);
|
|
var prefixed_lines = cljs.core.map.call(null, function(value, lines) {
|
|
return function(p1__15720_SHARP_) {
|
|
return[cljs.core.str(pre), cljs.core.str(p1__15720_SHARP_)].join("")
|
|
}
|
|
}(value, lines), lines);
|
|
return clojure.string.join.call(null, specljs.platform.endl, prefixed_lines)
|
|
};
|
|
var prefix = function(pre, var_args) {
|
|
var args = null;
|
|
if(arguments.length > 1) {
|
|
args = cljs.core.array_seq(Array.prototype.slice.call(arguments, 1), 0)
|
|
}
|
|
return prefix__delegate.call(this, pre, args)
|
|
};
|
|
prefix.cljs$lang$maxFixedArity = 1;
|
|
prefix.cljs$lang$applyTo = function(arglist__15721) {
|
|
var pre = cljs.core.first(arglist__15721);
|
|
var args = cljs.core.rest(arglist__15721);
|
|
return prefix__delegate(pre, args)
|
|
};
|
|
prefix.cljs$core$IFn$_invoke$arity$variadic = prefix__delegate;
|
|
return prefix
|
|
}();
|
|
specljs.reporting.indent = function() {
|
|
var indent__delegate = function(n, args) {
|
|
var spaces = n * 2 | 0;
|
|
var indention = cljs.core.reduce.call(null, function(spaces) {
|
|
return function(p, _) {
|
|
return[cljs.core.str(" "), cljs.core.str(p)].join("")
|
|
}
|
|
}(spaces), "", cljs.core.range.call(null, spaces));
|
|
return cljs.core.apply.call(null, specljs.reporting.prefix, indention, args)
|
|
};
|
|
var indent = function(n, var_args) {
|
|
var args = null;
|
|
if(arguments.length > 1) {
|
|
args = cljs.core.array_seq(Array.prototype.slice.call(arguments, 1), 0)
|
|
}
|
|
return indent__delegate.call(this, n, args)
|
|
};
|
|
indent.cljs$lang$maxFixedArity = 1;
|
|
indent.cljs$lang$applyTo = function(arglist__15722) {
|
|
var n = cljs.core.first(arglist__15722);
|
|
var args = cljs.core.rest(arglist__15722);
|
|
return indent__delegate(n, args)
|
|
};
|
|
indent.cljs$core$IFn$_invoke$arity$variadic = indent__delegate;
|
|
return indent
|
|
}();
|
|
specljs.reporting.report_description_STAR_ = function report_description_STAR_(reporters, description) {
|
|
var seq__15727 = cljs.core.seq.call(null, reporters);
|
|
var chunk__15728 = null;
|
|
var count__15729 = 0;
|
|
var i__15730 = 0;
|
|
while(true) {
|
|
if(i__15730 < count__15729) {
|
|
var reporter = cljs.core._nth.call(null, chunk__15728, i__15730);
|
|
specljs.reporting.report_description.call(null, reporter, description);
|
|
var G__15731 = seq__15727;
|
|
var G__15732 = chunk__15728;
|
|
var G__15733 = count__15729;
|
|
var G__15734 = i__15730 + 1;
|
|
seq__15727 = G__15731;
|
|
chunk__15728 = G__15732;
|
|
count__15729 = G__15733;
|
|
i__15730 = G__15734;
|
|
continue
|
|
}else {
|
|
var temp__4092__auto__ = cljs.core.seq.call(null, seq__15727);
|
|
if(temp__4092__auto__) {
|
|
var seq__15727__$1 = temp__4092__auto__;
|
|
if(cljs.core.chunked_seq_QMARK_.call(null, seq__15727__$1)) {
|
|
var c__3037__auto__ = cljs.core.chunk_first.call(null, seq__15727__$1);
|
|
var G__15735 = cljs.core.chunk_rest.call(null, seq__15727__$1);
|
|
var G__15736 = c__3037__auto__;
|
|
var G__15737 = cljs.core.count.call(null, c__3037__auto__);
|
|
var G__15738 = 0;
|
|
seq__15727 = G__15735;
|
|
chunk__15728 = G__15736;
|
|
count__15729 = G__15737;
|
|
i__15730 = G__15738;
|
|
continue
|
|
}else {
|
|
var reporter = cljs.core.first.call(null, seq__15727__$1);
|
|
specljs.reporting.report_description.call(null, reporter, description);
|
|
var G__15739 = cljs.core.next.call(null, seq__15727__$1);
|
|
var G__15740 = null;
|
|
var G__15741 = 0;
|
|
var G__15742 = 0;
|
|
seq__15727 = G__15739;
|
|
chunk__15728 = G__15740;
|
|
count__15729 = G__15741;
|
|
i__15730 = G__15742;
|
|
continue
|
|
}
|
|
}else {
|
|
return null
|
|
}
|
|
}
|
|
break
|
|
}
|
|
};
|
|
specljs.reporting.report_runs_STAR_ = function report_runs_STAR_(reporters, results) {
|
|
var seq__15747 = cljs.core.seq.call(null, reporters);
|
|
var chunk__15748 = null;
|
|
var count__15749 = 0;
|
|
var i__15750 = 0;
|
|
while(true) {
|
|
if(i__15750 < count__15749) {
|
|
var reporter = cljs.core._nth.call(null, chunk__15748, i__15750);
|
|
specljs.reporting.report_runs.call(null, reporter, results);
|
|
var G__15751 = seq__15747;
|
|
var G__15752 = chunk__15748;
|
|
var G__15753 = count__15749;
|
|
var G__15754 = i__15750 + 1;
|
|
seq__15747 = G__15751;
|
|
chunk__15748 = G__15752;
|
|
count__15749 = G__15753;
|
|
i__15750 = G__15754;
|
|
continue
|
|
}else {
|
|
var temp__4092__auto__ = cljs.core.seq.call(null, seq__15747);
|
|
if(temp__4092__auto__) {
|
|
var seq__15747__$1 = temp__4092__auto__;
|
|
if(cljs.core.chunked_seq_QMARK_.call(null, seq__15747__$1)) {
|
|
var c__3037__auto__ = cljs.core.chunk_first.call(null, seq__15747__$1);
|
|
var G__15755 = cljs.core.chunk_rest.call(null, seq__15747__$1);
|
|
var G__15756 = c__3037__auto__;
|
|
var G__15757 = cljs.core.count.call(null, c__3037__auto__);
|
|
var G__15758 = 0;
|
|
seq__15747 = G__15755;
|
|
chunk__15748 = G__15756;
|
|
count__15749 = G__15757;
|
|
i__15750 = G__15758;
|
|
continue
|
|
}else {
|
|
var reporter = cljs.core.first.call(null, seq__15747__$1);
|
|
specljs.reporting.report_runs.call(null, reporter, results);
|
|
var G__15759 = cljs.core.next.call(null, seq__15747__$1);
|
|
var G__15760 = null;
|
|
var G__15761 = 0;
|
|
var G__15762 = 0;
|
|
seq__15747 = G__15759;
|
|
chunk__15748 = G__15760;
|
|
count__15749 = G__15761;
|
|
i__15750 = G__15762;
|
|
continue
|
|
}
|
|
}else {
|
|
return null
|
|
}
|
|
}
|
|
break
|
|
}
|
|
};
|
|
specljs.reporting.report_message_STAR_ = function report_message_STAR_(reporters, message) {
|
|
var seq__15767 = cljs.core.seq.call(null, reporters);
|
|
var chunk__15768 = null;
|
|
var count__15769 = 0;
|
|
var i__15770 = 0;
|
|
while(true) {
|
|
if(i__15770 < count__15769) {
|
|
var reporter = cljs.core._nth.call(null, chunk__15768, i__15770);
|
|
specljs.reporting.report_message.call(null, reporter, message);
|
|
var G__15771 = seq__15767;
|
|
var G__15772 = chunk__15768;
|
|
var G__15773 = count__15769;
|
|
var G__15774 = i__15770 + 1;
|
|
seq__15767 = G__15771;
|
|
chunk__15768 = G__15772;
|
|
count__15769 = G__15773;
|
|
i__15770 = G__15774;
|
|
continue
|
|
}else {
|
|
var temp__4092__auto__ = cljs.core.seq.call(null, seq__15767);
|
|
if(temp__4092__auto__) {
|
|
var seq__15767__$1 = temp__4092__auto__;
|
|
if(cljs.core.chunked_seq_QMARK_.call(null, seq__15767__$1)) {
|
|
var c__3037__auto__ = cljs.core.chunk_first.call(null, seq__15767__$1);
|
|
var G__15775 = cljs.core.chunk_rest.call(null, seq__15767__$1);
|
|
var G__15776 = c__3037__auto__;
|
|
var G__15777 = cljs.core.count.call(null, c__3037__auto__);
|
|
var G__15778 = 0;
|
|
seq__15767 = G__15775;
|
|
chunk__15768 = G__15776;
|
|
count__15769 = G__15777;
|
|
i__15770 = G__15778;
|
|
continue
|
|
}else {
|
|
var reporter = cljs.core.first.call(null, seq__15767__$1);
|
|
specljs.reporting.report_message.call(null, reporter, message);
|
|
var G__15779 = cljs.core.next.call(null, seq__15767__$1);
|
|
var G__15780 = null;
|
|
var G__15781 = 0;
|
|
var G__15782 = 0;
|
|
seq__15767 = G__15779;
|
|
chunk__15768 = G__15780;
|
|
count__15769 = G__15781;
|
|
i__15770 = G__15782;
|
|
continue
|
|
}
|
|
}else {
|
|
return null
|
|
}
|
|
}
|
|
break
|
|
}
|
|
};
|
|
specljs.reporting.report_error_STAR_ = function report_error_STAR_(reporters, exception) {
|
|
var seq__15787 = cljs.core.seq.call(null, reporters);
|
|
var chunk__15788 = null;
|
|
var count__15789 = 0;
|
|
var i__15790 = 0;
|
|
while(true) {
|
|
if(i__15790 < count__15789) {
|
|
var reporter = cljs.core._nth.call(null, chunk__15788, i__15790);
|
|
specljs.reporting.report_error.call(null, reporter, exception);
|
|
var G__15791 = seq__15787;
|
|
var G__15792 = chunk__15788;
|
|
var G__15793 = count__15789;
|
|
var G__15794 = i__15790 + 1;
|
|
seq__15787 = G__15791;
|
|
chunk__15788 = G__15792;
|
|
count__15789 = G__15793;
|
|
i__15790 = G__15794;
|
|
continue
|
|
}else {
|
|
var temp__4092__auto__ = cljs.core.seq.call(null, seq__15787);
|
|
if(temp__4092__auto__) {
|
|
var seq__15787__$1 = temp__4092__auto__;
|
|
if(cljs.core.chunked_seq_QMARK_.call(null, seq__15787__$1)) {
|
|
var c__3037__auto__ = cljs.core.chunk_first.call(null, seq__15787__$1);
|
|
var G__15795 = cljs.core.chunk_rest.call(null, seq__15787__$1);
|
|
var G__15796 = c__3037__auto__;
|
|
var G__15797 = cljs.core.count.call(null, c__3037__auto__);
|
|
var G__15798 = 0;
|
|
seq__15787 = G__15795;
|
|
chunk__15788 = G__15796;
|
|
count__15789 = G__15797;
|
|
i__15790 = G__15798;
|
|
continue
|
|
}else {
|
|
var reporter = cljs.core.first.call(null, seq__15787__$1);
|
|
specljs.reporting.report_error.call(null, reporter, exception);
|
|
var G__15799 = cljs.core.next.call(null, seq__15787__$1);
|
|
var G__15800 = null;
|
|
var G__15801 = 0;
|
|
var G__15802 = 0;
|
|
seq__15787 = G__15799;
|
|
chunk__15788 = G__15800;
|
|
count__15789 = G__15801;
|
|
i__15790 = G__15802;
|
|
continue
|
|
}
|
|
}else {
|
|
return null
|
|
}
|
|
}
|
|
break
|
|
}
|
|
};
|
|
goog.provide("specljs.components");
|
|
goog.require("cljs.core");
|
|
specljs.components.SpecComponent = {};
|
|
specljs.components.install = function install(this$, description) {
|
|
if(function() {
|
|
var and__3941__auto__ = this$;
|
|
if(and__3941__auto__) {
|
|
return this$.specljs$components$SpecComponent$install$arity$2
|
|
}else {
|
|
return and__3941__auto__
|
|
}
|
|
}()) {
|
|
return this$.specljs$components$SpecComponent$install$arity$2(this$, description)
|
|
}else {
|
|
var x__2906__auto__ = this$ == null ? null : this$;
|
|
return function() {
|
|
var or__3943__auto__ = specljs.components.install[goog.typeOf(x__2906__auto__)];
|
|
if(or__3943__auto__) {
|
|
return or__3943__auto__
|
|
}else {
|
|
var or__3943__auto____$1 = specljs.components.install["_"];
|
|
if(or__3943__auto____$1) {
|
|
return or__3943__auto____$1
|
|
}else {
|
|
throw cljs.core.missing_protocol.call(null, "SpecComponent.install", this$);
|
|
}
|
|
}
|
|
}().call(null, this$, description)
|
|
}
|
|
};
|
|
specljs.components.SpecComponent["object"] = true;
|
|
specljs.components.install["object"] = function(this$, description) {
|
|
return null
|
|
};
|
|
cljs.core.PersistentVector.prototype.specljs$components$SpecComponent$ = true;
|
|
cljs.core.PersistentVector.prototype.specljs$components$SpecComponent$install$arity$2 = function(this$, description) {
|
|
var seq__15435 = cljs.core.seq.call(null, cljs.core.seq.call(null, this$));
|
|
var chunk__15436 = null;
|
|
var count__15437 = 0;
|
|
var i__15438 = 0;
|
|
while(true) {
|
|
if(i__15438 < count__15437) {
|
|
var component = cljs.core._nth.call(null, chunk__15436, i__15438);
|
|
specljs.components.install.call(null, component, description);
|
|
var G__15451 = seq__15435;
|
|
var G__15452 = chunk__15436;
|
|
var G__15453 = count__15437;
|
|
var G__15454 = i__15438 + 1;
|
|
seq__15435 = G__15451;
|
|
chunk__15436 = G__15452;
|
|
count__15437 = G__15453;
|
|
i__15438 = G__15454;
|
|
continue
|
|
}else {
|
|
var temp__4092__auto__ = cljs.core.seq.call(null, seq__15435);
|
|
if(temp__4092__auto__) {
|
|
var seq__15435__$1 = temp__4092__auto__;
|
|
if(cljs.core.chunked_seq_QMARK_.call(null, seq__15435__$1)) {
|
|
var c__3037__auto__ = cljs.core.chunk_first.call(null, seq__15435__$1);
|
|
var G__15455 = cljs.core.chunk_rest.call(null, seq__15435__$1);
|
|
var G__15456 = c__3037__auto__;
|
|
var G__15457 = cljs.core.count.call(null, c__3037__auto__);
|
|
var G__15458 = 0;
|
|
seq__15435 = G__15455;
|
|
chunk__15436 = G__15456;
|
|
count__15437 = G__15457;
|
|
i__15438 = G__15458;
|
|
continue
|
|
}else {
|
|
var component = cljs.core.first.call(null, seq__15435__$1);
|
|
specljs.components.install.call(null, component, description);
|
|
var G__15459 = cljs.core.next.call(null, seq__15435__$1);
|
|
var G__15460 = null;
|
|
var G__15461 = 0;
|
|
var G__15462 = 0;
|
|
seq__15435 = G__15459;
|
|
chunk__15436 = G__15460;
|
|
count__15437 = G__15461;
|
|
i__15438 = G__15462;
|
|
continue
|
|
}
|
|
}else {
|
|
return null
|
|
}
|
|
}
|
|
break
|
|
}
|
|
};
|
|
cljs.core.EmptyList.prototype.specljs$components$SpecComponent$ = true;
|
|
cljs.core.EmptyList.prototype.specljs$components$SpecComponent$install$arity$2 = function(this$, description) {
|
|
var seq__15439 = cljs.core.seq.call(null, cljs.core.seq.call(null, this$));
|
|
var chunk__15440 = null;
|
|
var count__15441 = 0;
|
|
var i__15442 = 0;
|
|
while(true) {
|
|
if(i__15442 < count__15441) {
|
|
var component = cljs.core._nth.call(null, chunk__15440, i__15442);
|
|
specljs.components.install.call(null, component, description);
|
|
var G__15463 = seq__15439;
|
|
var G__15464 = chunk__15440;
|
|
var G__15465 = count__15441;
|
|
var G__15466 = i__15442 + 1;
|
|
seq__15439 = G__15463;
|
|
chunk__15440 = G__15464;
|
|
count__15441 = G__15465;
|
|
i__15442 = G__15466;
|
|
continue
|
|
}else {
|
|
var temp__4092__auto__ = cljs.core.seq.call(null, seq__15439);
|
|
if(temp__4092__auto__) {
|
|
var seq__15439__$1 = temp__4092__auto__;
|
|
if(cljs.core.chunked_seq_QMARK_.call(null, seq__15439__$1)) {
|
|
var c__3037__auto__ = cljs.core.chunk_first.call(null, seq__15439__$1);
|
|
var G__15467 = cljs.core.chunk_rest.call(null, seq__15439__$1);
|
|
var G__15468 = c__3037__auto__;
|
|
var G__15469 = cljs.core.count.call(null, c__3037__auto__);
|
|
var G__15470 = 0;
|
|
seq__15439 = G__15467;
|
|
chunk__15440 = G__15468;
|
|
count__15441 = G__15469;
|
|
i__15442 = G__15470;
|
|
continue
|
|
}else {
|
|
var component = cljs.core.first.call(null, seq__15439__$1);
|
|
specljs.components.install.call(null, component, description);
|
|
var G__15471 = cljs.core.next.call(null, seq__15439__$1);
|
|
var G__15472 = null;
|
|
var G__15473 = 0;
|
|
var G__15474 = 0;
|
|
seq__15439 = G__15471;
|
|
chunk__15440 = G__15472;
|
|
count__15441 = G__15473;
|
|
i__15442 = G__15474;
|
|
continue
|
|
}
|
|
}else {
|
|
return null
|
|
}
|
|
}
|
|
break
|
|
}
|
|
};
|
|
cljs.core.List.prototype.specljs$components$SpecComponent$ = true;
|
|
cljs.core.List.prototype.specljs$components$SpecComponent$install$arity$2 = function(this$, description) {
|
|
var seq__15443 = cljs.core.seq.call(null, cljs.core.seq.call(null, this$));
|
|
var chunk__15444 = null;
|
|
var count__15445 = 0;
|
|
var i__15446 = 0;
|
|
while(true) {
|
|
if(i__15446 < count__15445) {
|
|
var component = cljs.core._nth.call(null, chunk__15444, i__15446);
|
|
specljs.components.install.call(null, component, description);
|
|
var G__15475 = seq__15443;
|
|
var G__15476 = chunk__15444;
|
|
var G__15477 = count__15445;
|
|
var G__15478 = i__15446 + 1;
|
|
seq__15443 = G__15475;
|
|
chunk__15444 = G__15476;
|
|
count__15445 = G__15477;
|
|
i__15446 = G__15478;
|
|
continue
|
|
}else {
|
|
var temp__4092__auto__ = cljs.core.seq.call(null, seq__15443);
|
|
if(temp__4092__auto__) {
|
|
var seq__15443__$1 = temp__4092__auto__;
|
|
if(cljs.core.chunked_seq_QMARK_.call(null, seq__15443__$1)) {
|
|
var c__3037__auto__ = cljs.core.chunk_first.call(null, seq__15443__$1);
|
|
var G__15479 = cljs.core.chunk_rest.call(null, seq__15443__$1);
|
|
var G__15480 = c__3037__auto__;
|
|
var G__15481 = cljs.core.count.call(null, c__3037__auto__);
|
|
var G__15482 = 0;
|
|
seq__15443 = G__15479;
|
|
chunk__15444 = G__15480;
|
|
count__15445 = G__15481;
|
|
i__15446 = G__15482;
|
|
continue
|
|
}else {
|
|
var component = cljs.core.first.call(null, seq__15443__$1);
|
|
specljs.components.install.call(null, component, description);
|
|
var G__15483 = cljs.core.next.call(null, seq__15443__$1);
|
|
var G__15484 = null;
|
|
var G__15485 = 0;
|
|
var G__15486 = 0;
|
|
seq__15443 = G__15483;
|
|
chunk__15444 = G__15484;
|
|
count__15445 = G__15485;
|
|
i__15446 = G__15486;
|
|
continue
|
|
}
|
|
}else {
|
|
return null
|
|
}
|
|
}
|
|
break
|
|
}
|
|
};
|
|
cljs.core.LazySeq.prototype.specljs$components$SpecComponent$ = true;
|
|
cljs.core.LazySeq.prototype.specljs$components$SpecComponent$install$arity$2 = function(this$, description) {
|
|
var seq__15447 = cljs.core.seq.call(null, cljs.core.seq.call(null, this$));
|
|
var chunk__15448 = null;
|
|
var count__15449 = 0;
|
|
var i__15450 = 0;
|
|
while(true) {
|
|
if(i__15450 < count__15449) {
|
|
var component = cljs.core._nth.call(null, chunk__15448, i__15450);
|
|
specljs.components.install.call(null, component, description);
|
|
var G__15487 = seq__15447;
|
|
var G__15488 = chunk__15448;
|
|
var G__15489 = count__15449;
|
|
var G__15490 = i__15450 + 1;
|
|
seq__15447 = G__15487;
|
|
chunk__15448 = G__15488;
|
|
count__15449 = G__15489;
|
|
i__15450 = G__15490;
|
|
continue
|
|
}else {
|
|
var temp__4092__auto__ = cljs.core.seq.call(null, seq__15447);
|
|
if(temp__4092__auto__) {
|
|
var seq__15447__$1 = temp__4092__auto__;
|
|
if(cljs.core.chunked_seq_QMARK_.call(null, seq__15447__$1)) {
|
|
var c__3037__auto__ = cljs.core.chunk_first.call(null, seq__15447__$1);
|
|
var G__15491 = cljs.core.chunk_rest.call(null, seq__15447__$1);
|
|
var G__15492 = c__3037__auto__;
|
|
var G__15493 = cljs.core.count.call(null, c__3037__auto__);
|
|
var G__15494 = 0;
|
|
seq__15447 = G__15491;
|
|
chunk__15448 = G__15492;
|
|
count__15449 = G__15493;
|
|
i__15450 = G__15494;
|
|
continue
|
|
}else {
|
|
var component = cljs.core.first.call(null, seq__15447__$1);
|
|
specljs.components.install.call(null, component, description);
|
|
var G__15495 = cljs.core.next.call(null, seq__15447__$1);
|
|
var G__15496 = null;
|
|
var G__15497 = 0;
|
|
var G__15498 = 0;
|
|
seq__15447 = G__15495;
|
|
chunk__15448 = G__15496;
|
|
count__15449 = G__15497;
|
|
i__15450 = G__15498;
|
|
continue
|
|
}
|
|
}else {
|
|
return null
|
|
}
|
|
}
|
|
break
|
|
}
|
|
};
|
|
goog.provide("specljs.components.Description");
|
|
specljs.components.Description = function(name, ns, parent, children, charcteristics, tags, befores, before_alls, afters, after_alls, withs, with_alls, arounds) {
|
|
this.name = name;
|
|
this.ns = ns;
|
|
this.parent = parent;
|
|
this.children = children;
|
|
this.charcteristics = charcteristics;
|
|
this.tags = tags;
|
|
this.befores = befores;
|
|
this.before_alls = before_alls;
|
|
this.afters = afters;
|
|
this.after_alls = after_alls;
|
|
this.withs = withs;
|
|
this.with_alls = with_alls;
|
|
this.arounds = arounds
|
|
};
|
|
specljs.components.Description.cljs$lang$type = true;
|
|
specljs.components.Description.cljs$lang$ctorStr = "specljs.components/Description";
|
|
specljs.components.Description.cljs$lang$ctorPrWriter = function(this__2847__auto__, writer__2848__auto__, opt__2849__auto__) {
|
|
return cljs.core._write.call(null, writer__2848__auto__, "specljs.components/Description")
|
|
};
|
|
specljs.components.Description.prototype.toString = function() {
|
|
var self__ = this;
|
|
var this$ = this;
|
|
return[cljs.core.str("Description: "), cljs.core.str('"'), cljs.core.str(self__.name), cljs.core.str('"')].join("")
|
|
};
|
|
specljs.components.Description.prototype.specljs$components$SpecComponent$ = true;
|
|
specljs.components.Description.prototype.specljs$components$SpecComponent$install$arity$2 = function(this$, description) {
|
|
var self__ = this;
|
|
cljs.core.reset_BANG_.call(null, this$.parent, description);
|
|
return cljs.core.swap_BANG_.call(null, description.children, cljs.core.conj, this$)
|
|
};
|
|
specljs.components.__GT_Description = function __GT_Description(name, ns, parent, children, charcteristics, tags, befores, before_alls, afters, after_alls, withs, with_alls, arounds) {
|
|
return new specljs.components.Description(name, ns, parent, children, charcteristics, tags, befores, before_alls, afters, after_alls, withs, with_alls, arounds)
|
|
};
|
|
specljs.components.new_description = function new_description(name, ns) {
|
|
return new specljs.components.Description(name, ns, cljs.core.atom.call(null, null), cljs.core.atom.call(null, cljs.core.PersistentVector.EMPTY), cljs.core.atom.call(null, cljs.core.PersistentVector.EMPTY), cljs.core.atom.call(null, cljs.core.PersistentHashSet.EMPTY), cljs.core.atom.call(null, cljs.core.PersistentVector.EMPTY), cljs.core.atom.call(null, cljs.core.PersistentVector.EMPTY), cljs.core.atom.call(null, cljs.core.PersistentVector.EMPTY), cljs.core.atom.call(null, cljs.core.PersistentVector.EMPTY),
|
|
cljs.core.atom.call(null, cljs.core.PersistentVector.EMPTY), cljs.core.atom.call(null, cljs.core.PersistentVector.EMPTY), cljs.core.atom.call(null, cljs.core.PersistentVector.EMPTY))
|
|
};
|
|
goog.provide("specljs.components.Characteristic");
|
|
specljs.components.Characteristic = function(name, parent, body) {
|
|
this.name = name;
|
|
this.parent = parent;
|
|
this.body = body
|
|
};
|
|
specljs.components.Characteristic.cljs$lang$type = true;
|
|
specljs.components.Characteristic.cljs$lang$ctorStr = "specljs.components/Characteristic";
|
|
specljs.components.Characteristic.cljs$lang$ctorPrWriter = function(this__2847__auto__, writer__2848__auto__, opt__2849__auto__) {
|
|
return cljs.core._write.call(null, writer__2848__auto__, "specljs.components/Characteristic")
|
|
};
|
|
specljs.components.Characteristic.prototype.toString = function() {
|
|
var self__ = this;
|
|
var this$ = this;
|
|
return[cljs.core.str('"'), cljs.core.str(self__.name), cljs.core.str('"')].join("")
|
|
};
|
|
specljs.components.Characteristic.prototype.specljs$components$SpecComponent$ = true;
|
|
specljs.components.Characteristic.prototype.specljs$components$SpecComponent$install$arity$2 = function(this$, description) {
|
|
var self__ = this;
|
|
cljs.core.reset_BANG_.call(null, this$.parent, description);
|
|
return cljs.core.swap_BANG_.call(null, description.charcteristics, cljs.core.conj, this$)
|
|
};
|
|
specljs.components.__GT_Characteristic = function __GT_Characteristic(name, parent, body) {
|
|
return new specljs.components.Characteristic(name, parent, body)
|
|
};
|
|
specljs.components.new_characteristic = function() {
|
|
var new_characteristic = null;
|
|
var new_characteristic__2 = function(name, body) {
|
|
return new specljs.components.Characteristic(name, cljs.core.atom.call(null, null), body)
|
|
};
|
|
var new_characteristic__3 = function(name, description, body) {
|
|
return new specljs.components.Characteristic(name, cljs.core.atom.call(null, description), body)
|
|
};
|
|
new_characteristic = function(name, description, body) {
|
|
switch(arguments.length) {
|
|
case 2:
|
|
return new_characteristic__2.call(this, name, description);
|
|
case 3:
|
|
return new_characteristic__3.call(this, name, description, body)
|
|
}
|
|
throw new Error("Invalid arity: " + arguments.length);
|
|
};
|
|
new_characteristic.cljs$core$IFn$_invoke$arity$2 = new_characteristic__2;
|
|
new_characteristic.cljs$core$IFn$_invoke$arity$3 = new_characteristic__3;
|
|
return new_characteristic
|
|
}();
|
|
goog.provide("specljs.components.Before");
|
|
specljs.components.Before = function(body) {
|
|
this.body = body
|
|
};
|
|
specljs.components.Before.cljs$lang$type = true;
|
|
specljs.components.Before.cljs$lang$ctorStr = "specljs.components/Before";
|
|
specljs.components.Before.cljs$lang$ctorPrWriter = function(this__2847__auto__, writer__2848__auto__, opt__2849__auto__) {
|
|
return cljs.core._write.call(null, writer__2848__auto__, "specljs.components/Before")
|
|
};
|
|
specljs.components.Before.prototype.specljs$components$SpecComponent$ = true;
|
|
specljs.components.Before.prototype.specljs$components$SpecComponent$install$arity$2 = function(this$, description) {
|
|
var self__ = this;
|
|
return cljs.core.swap_BANG_.call(null, description.befores, cljs.core.conj, this$)
|
|
};
|
|
specljs.components.__GT_Before = function __GT_Before(body) {
|
|
return new specljs.components.Before(body)
|
|
};
|
|
specljs.components.new_before = function new_before(body) {
|
|
return new specljs.components.Before(body)
|
|
};
|
|
goog.provide("specljs.components.After");
|
|
specljs.components.After = function(body) {
|
|
this.body = body
|
|
};
|
|
specljs.components.After.cljs$lang$type = true;
|
|
specljs.components.After.cljs$lang$ctorStr = "specljs.components/After";
|
|
specljs.components.After.cljs$lang$ctorPrWriter = function(this__2847__auto__, writer__2848__auto__, opt__2849__auto__) {
|
|
return cljs.core._write.call(null, writer__2848__auto__, "specljs.components/After")
|
|
};
|
|
specljs.components.After.prototype.specljs$components$SpecComponent$ = true;
|
|
specljs.components.After.prototype.specljs$components$SpecComponent$install$arity$2 = function(this$, description) {
|
|
var self__ = this;
|
|
return cljs.core.swap_BANG_.call(null, description.afters, cljs.core.conj, this$)
|
|
};
|
|
specljs.components.__GT_After = function __GT_After(body) {
|
|
return new specljs.components.After(body)
|
|
};
|
|
specljs.components.new_after = function new_after(body) {
|
|
return new specljs.components.After(body)
|
|
};
|
|
goog.provide("specljs.components.Around");
|
|
specljs.components.Around = function(body) {
|
|
this.body = body
|
|
};
|
|
specljs.components.Around.cljs$lang$type = true;
|
|
specljs.components.Around.cljs$lang$ctorStr = "specljs.components/Around";
|
|
specljs.components.Around.cljs$lang$ctorPrWriter = function(this__2847__auto__, writer__2848__auto__, opt__2849__auto__) {
|
|
return cljs.core._write.call(null, writer__2848__auto__, "specljs.components/Around")
|
|
};
|
|
specljs.components.Around.prototype.specljs$components$SpecComponent$ = true;
|
|
specljs.components.Around.prototype.specljs$components$SpecComponent$install$arity$2 = function(this$, description) {
|
|
var self__ = this;
|
|
return cljs.core.swap_BANG_.call(null, description.arounds, cljs.core.conj, this$)
|
|
};
|
|
specljs.components.__GT_Around = function __GT_Around(body) {
|
|
return new specljs.components.Around(body)
|
|
};
|
|
specljs.components.new_around = function new_around(body) {
|
|
return new specljs.components.Around(body)
|
|
};
|
|
goog.provide("specljs.components.BeforeAll");
|
|
specljs.components.BeforeAll = function(body) {
|
|
this.body = body
|
|
};
|
|
specljs.components.BeforeAll.cljs$lang$type = true;
|
|
specljs.components.BeforeAll.cljs$lang$ctorStr = "specljs.components/BeforeAll";
|
|
specljs.components.BeforeAll.cljs$lang$ctorPrWriter = function(this__2847__auto__, writer__2848__auto__, opt__2849__auto__) {
|
|
return cljs.core._write.call(null, writer__2848__auto__, "specljs.components/BeforeAll")
|
|
};
|
|
specljs.components.BeforeAll.prototype.specljs$components$SpecComponent$ = true;
|
|
specljs.components.BeforeAll.prototype.specljs$components$SpecComponent$install$arity$2 = function(this$, description) {
|
|
var self__ = this;
|
|
return cljs.core.swap_BANG_.call(null, description.before_alls, cljs.core.conj, this$)
|
|
};
|
|
specljs.components.__GT_BeforeAll = function __GT_BeforeAll(body) {
|
|
return new specljs.components.BeforeAll(body)
|
|
};
|
|
specljs.components.new_before_all = function new_before_all(body) {
|
|
return new specljs.components.BeforeAll(body)
|
|
};
|
|
goog.provide("specljs.components.AfterAll");
|
|
specljs.components.AfterAll = function(body) {
|
|
this.body = body
|
|
};
|
|
specljs.components.AfterAll.cljs$lang$type = true;
|
|
specljs.components.AfterAll.cljs$lang$ctorStr = "specljs.components/AfterAll";
|
|
specljs.components.AfterAll.cljs$lang$ctorPrWriter = function(this__2847__auto__, writer__2848__auto__, opt__2849__auto__) {
|
|
return cljs.core._write.call(null, writer__2848__auto__, "specljs.components/AfterAll")
|
|
};
|
|
specljs.components.AfterAll.prototype.specljs$components$SpecComponent$ = true;
|
|
specljs.components.AfterAll.prototype.specljs$components$SpecComponent$install$arity$2 = function(this$, description) {
|
|
var self__ = this;
|
|
return cljs.core.swap_BANG_.call(null, description.after_alls, cljs.core.conj, this$)
|
|
};
|
|
specljs.components.__GT_AfterAll = function __GT_AfterAll(body) {
|
|
return new specljs.components.AfterAll(body)
|
|
};
|
|
specljs.components.new_after_all = function new_after_all(body) {
|
|
return new specljs.components.AfterAll(body)
|
|
};
|
|
goog.provide("specljs.components.With");
|
|
specljs.components.With = function(name, unique_name, body, value, bang) {
|
|
this.name = name;
|
|
this.unique_name = unique_name;
|
|
this.body = body;
|
|
this.value = value;
|
|
this.bang = bang;
|
|
this.cljs$lang$protocol_mask$partition1$ = 0;
|
|
this.cljs$lang$protocol_mask$partition0$ = 32768
|
|
};
|
|
specljs.components.With.cljs$lang$type = true;
|
|
specljs.components.With.cljs$lang$ctorStr = "specljs.components/With";
|
|
specljs.components.With.cljs$lang$ctorPrWriter = function(this__2847__auto__, writer__2848__auto__, opt__2849__auto__) {
|
|
return cljs.core._write.call(null, writer__2848__auto__, "specljs.components/With")
|
|
};
|
|
specljs.components.With.prototype.cljs$core$IDeref$_deref$arity$1 = function(this$) {
|
|
var self__ = this;
|
|
if(cljs.core._EQ_.call(null, "\ufdd0:specljs.components/none", cljs.core.deref.call(null, self__.value))) {
|
|
cljs.core.reset_BANG_.call(null, self__.value, self__.body.call(null))
|
|
}else {
|
|
}
|
|
return cljs.core.deref.call(null, self__.value)
|
|
};
|
|
specljs.components.With.prototype.specljs$components$SpecComponent$ = true;
|
|
specljs.components.With.prototype.specljs$components$SpecComponent$install$arity$2 = function(this$, description) {
|
|
var self__ = this;
|
|
return cljs.core.swap_BANG_.call(null, description.withs, cljs.core.conj, this$)
|
|
};
|
|
specljs.components.__GT_With = function __GT_With(name, unique_name, body, value, bang) {
|
|
return new specljs.components.With(name, unique_name, body, value, bang)
|
|
};
|
|
specljs.components.reset_with = function reset_with(with$) {
|
|
cljs.core.reset_BANG_.call(null, with$.value, "\ufdd0:specljs.components/none");
|
|
if(cljs.core.truth_(with$.bang)) {
|
|
return cljs.core.deref.call(null, with$)
|
|
}else {
|
|
return null
|
|
}
|
|
};
|
|
specljs.components.new_with = function new_with(name, unique_name, body, bang) {
|
|
var with$ = new specljs.components.With(name, unique_name, body, cljs.core.atom.call(null, "\ufdd0:specljs.components/none"), bang);
|
|
if(cljs.core.truth_(bang)) {
|
|
cljs.core.deref.call(null, with$)
|
|
}else {
|
|
}
|
|
return with$
|
|
};
|
|
goog.provide("specljs.components.WithAll");
|
|
specljs.components.WithAll = function(name, unique_name, body, value, bang) {
|
|
this.name = name;
|
|
this.unique_name = unique_name;
|
|
this.body = body;
|
|
this.value = value;
|
|
this.bang = bang;
|
|
this.cljs$lang$protocol_mask$partition1$ = 0;
|
|
this.cljs$lang$protocol_mask$partition0$ = 32768
|
|
};
|
|
specljs.components.WithAll.cljs$lang$type = true;
|
|
specljs.components.WithAll.cljs$lang$ctorStr = "specljs.components/WithAll";
|
|
specljs.components.WithAll.cljs$lang$ctorPrWriter = function(this__2847__auto__, writer__2848__auto__, opt__2849__auto__) {
|
|
return cljs.core._write.call(null, writer__2848__auto__, "specljs.components/WithAll")
|
|
};
|
|
specljs.components.WithAll.prototype.cljs$core$IDeref$_deref$arity$1 = function(this$) {
|
|
var self__ = this;
|
|
if(cljs.core._EQ_.call(null, "\ufdd0:specljs.components/none", cljs.core.deref.call(null, self__.value))) {
|
|
cljs.core.reset_BANG_.call(null, self__.value, self__.body.call(null))
|
|
}else {
|
|
}
|
|
return cljs.core.deref.call(null, self__.value)
|
|
};
|
|
specljs.components.WithAll.prototype.specljs$components$SpecComponent$ = true;
|
|
specljs.components.WithAll.prototype.specljs$components$SpecComponent$install$arity$2 = function(this$, description) {
|
|
var self__ = this;
|
|
return cljs.core.swap_BANG_.call(null, description.with_alls, cljs.core.conj, this$)
|
|
};
|
|
specljs.components.__GT_WithAll = function __GT_WithAll(name, unique_name, body, value, bang) {
|
|
return new specljs.components.WithAll(name, unique_name, body, value, bang)
|
|
};
|
|
specljs.components.new_with_all = function new_with_all(name, unique_name, body, bang) {
|
|
var with_all = new specljs.components.WithAll(name, unique_name, body, cljs.core.atom.call(null, "\ufdd0:specljs.components/none"), bang);
|
|
if(cljs.core.truth_(bang)) {
|
|
cljs.core.deref.call(null, with_all)
|
|
}else {
|
|
}
|
|
return with_all
|
|
};
|
|
goog.provide("specljs.components.Tag");
|
|
specljs.components.Tag = function(name) {
|
|
this.name = name
|
|
};
|
|
specljs.components.Tag.cljs$lang$type = true;
|
|
specljs.components.Tag.cljs$lang$ctorStr = "specljs.components/Tag";
|
|
specljs.components.Tag.cljs$lang$ctorPrWriter = function(this__2847__auto__, writer__2848__auto__, opt__2849__auto__) {
|
|
return cljs.core._write.call(null, writer__2848__auto__, "specljs.components/Tag")
|
|
};
|
|
specljs.components.Tag.prototype.specljs$components$SpecComponent$ = true;
|
|
specljs.components.Tag.prototype.specljs$components$SpecComponent$install$arity$2 = function(this$, description) {
|
|
var self__ = this;
|
|
return cljs.core.swap_BANG_.call(null, description.tags, cljs.core.conj, self__.name)
|
|
};
|
|
specljs.components.__GT_Tag = function __GT_Tag(name) {
|
|
return new specljs.components.Tag(name)
|
|
};
|
|
specljs.components.new_tag = function new_tag(name) {
|
|
return new specljs.components.Tag(name)
|
|
};
|
|
goog.provide("clojure.set");
|
|
goog.require("cljs.core");
|
|
clojure.set.bubble_max_key = function bubble_max_key(k, coll) {
|
|
var max = cljs.core.apply.call(null, cljs.core.max_key, k, coll);
|
|
return cljs.core.cons.call(null, max, cljs.core.remove.call(null, function(p1__15405_SHARP_) {
|
|
return max === p1__15405_SHARP_
|
|
}, coll))
|
|
};
|
|
clojure.set.union = function() {
|
|
var union = null;
|
|
var union__0 = function() {
|
|
return cljs.core.PersistentHashSet.EMPTY
|
|
};
|
|
var union__1 = function(s1) {
|
|
return s1
|
|
};
|
|
var union__2 = function(s1, s2) {
|
|
if(cljs.core.count.call(null, s1) < cljs.core.count.call(null, s2)) {
|
|
return cljs.core.reduce.call(null, cljs.core.conj, s2, s1)
|
|
}else {
|
|
return cljs.core.reduce.call(null, cljs.core.conj, s1, s2)
|
|
}
|
|
};
|
|
var union__3 = function() {
|
|
var G__15406__delegate = function(s1, s2, sets) {
|
|
var bubbled_sets = clojure.set.bubble_max_key.call(null, cljs.core.count, cljs.core.conj.call(null, sets, s2, s1));
|
|
return cljs.core.reduce.call(null, cljs.core.into, cljs.core.first.call(null, bubbled_sets), cljs.core.rest.call(null, bubbled_sets))
|
|
};
|
|
var G__15406 = function(s1, s2, var_args) {
|
|
var sets = null;
|
|
if(arguments.length > 2) {
|
|
sets = cljs.core.array_seq(Array.prototype.slice.call(arguments, 2), 0)
|
|
}
|
|
return G__15406__delegate.call(this, s1, s2, sets)
|
|
};
|
|
G__15406.cljs$lang$maxFixedArity = 2;
|
|
G__15406.cljs$lang$applyTo = function(arglist__15407) {
|
|
var s1 = cljs.core.first(arglist__15407);
|
|
arglist__15407 = cljs.core.next(arglist__15407);
|
|
var s2 = cljs.core.first(arglist__15407);
|
|
var sets = cljs.core.rest(arglist__15407);
|
|
return G__15406__delegate(s1, s2, sets)
|
|
};
|
|
G__15406.cljs$core$IFn$_invoke$arity$variadic = G__15406__delegate;
|
|
return G__15406
|
|
}();
|
|
union = function(s1, s2, var_args) {
|
|
var sets = var_args;
|
|
switch(arguments.length) {
|
|
case 0:
|
|
return union__0.call(this);
|
|
case 1:
|
|
return union__1.call(this, s1);
|
|
case 2:
|
|
return union__2.call(this, s1, s2);
|
|
default:
|
|
return union__3.cljs$core$IFn$_invoke$arity$variadic(s1, s2, cljs.core.array_seq(arguments, 2))
|
|
}
|
|
throw new Error("Invalid arity: " + arguments.length);
|
|
};
|
|
union.cljs$lang$maxFixedArity = 2;
|
|
union.cljs$lang$applyTo = union__3.cljs$lang$applyTo;
|
|
union.cljs$core$IFn$_invoke$arity$0 = union__0;
|
|
union.cljs$core$IFn$_invoke$arity$1 = union__1;
|
|
union.cljs$core$IFn$_invoke$arity$2 = union__2;
|
|
union.cljs$core$IFn$_invoke$arity$variadic = union__3.cljs$core$IFn$_invoke$arity$variadic;
|
|
return union
|
|
}();
|
|
clojure.set.intersection = function() {
|
|
var intersection = null;
|
|
var intersection__1 = function(s1) {
|
|
return s1
|
|
};
|
|
var intersection__2 = function(s1, s2) {
|
|
while(true) {
|
|
if(cljs.core.count.call(null, s2) < cljs.core.count.call(null, s1)) {
|
|
var G__15409 = s2;
|
|
var G__15410 = s1;
|
|
s1 = G__15409;
|
|
s2 = G__15410;
|
|
continue
|
|
}else {
|
|
return cljs.core.reduce.call(null, function(s1, s2) {
|
|
return function(result, item) {
|
|
if(cljs.core.contains_QMARK_.call(null, s2, item)) {
|
|
return result
|
|
}else {
|
|
return cljs.core.disj.call(null, result, item)
|
|
}
|
|
}
|
|
}(s1, s2), s1, s1)
|
|
}
|
|
break
|
|
}
|
|
};
|
|
var intersection__3 = function() {
|
|
var G__15411__delegate = function(s1, s2, sets) {
|
|
var bubbled_sets = clojure.set.bubble_max_key.call(null, function(p1__15408_SHARP_) {
|
|
return-cljs.core.count.call(null, p1__15408_SHARP_)
|
|
}, cljs.core.conj.call(null, sets, s2, s1));
|
|
return cljs.core.reduce.call(null, intersection, cljs.core.first.call(null, bubbled_sets), cljs.core.rest.call(null, bubbled_sets))
|
|
};
|
|
var G__15411 = function(s1, s2, var_args) {
|
|
var sets = null;
|
|
if(arguments.length > 2) {
|
|
sets = cljs.core.array_seq(Array.prototype.slice.call(arguments, 2), 0)
|
|
}
|
|
return G__15411__delegate.call(this, s1, s2, sets)
|
|
};
|
|
G__15411.cljs$lang$maxFixedArity = 2;
|
|
G__15411.cljs$lang$applyTo = function(arglist__15412) {
|
|
var s1 = cljs.core.first(arglist__15412);
|
|
arglist__15412 = cljs.core.next(arglist__15412);
|
|
var s2 = cljs.core.first(arglist__15412);
|
|
var sets = cljs.core.rest(arglist__15412);
|
|
return G__15411__delegate(s1, s2, sets)
|
|
};
|
|
G__15411.cljs$core$IFn$_invoke$arity$variadic = G__15411__delegate;
|
|
return G__15411
|
|
}();
|
|
intersection = function(s1, s2, var_args) {
|
|
var sets = var_args;
|
|
switch(arguments.length) {
|
|
case 1:
|
|
return intersection__1.call(this, s1);
|
|
case 2:
|
|
return intersection__2.call(this, s1, s2);
|
|
default:
|
|
return intersection__3.cljs$core$IFn$_invoke$arity$variadic(s1, s2, cljs.core.array_seq(arguments, 2))
|
|
}
|
|
throw new Error("Invalid arity: " + arguments.length);
|
|
};
|
|
intersection.cljs$lang$maxFixedArity = 2;
|
|
intersection.cljs$lang$applyTo = intersection__3.cljs$lang$applyTo;
|
|
intersection.cljs$core$IFn$_invoke$arity$1 = intersection__1;
|
|
intersection.cljs$core$IFn$_invoke$arity$2 = intersection__2;
|
|
intersection.cljs$core$IFn$_invoke$arity$variadic = intersection__3.cljs$core$IFn$_invoke$arity$variadic;
|
|
return intersection
|
|
}();
|
|
clojure.set.difference = function() {
|
|
var difference = null;
|
|
var difference__1 = function(s1) {
|
|
return s1
|
|
};
|
|
var difference__2 = function(s1, s2) {
|
|
if(cljs.core.count.call(null, s1) < cljs.core.count.call(null, s2)) {
|
|
return cljs.core.reduce.call(null, function(result, item) {
|
|
if(cljs.core.contains_QMARK_.call(null, s2, item)) {
|
|
return cljs.core.disj.call(null, result, item)
|
|
}else {
|
|
return result
|
|
}
|
|
}, s1, s1)
|
|
}else {
|
|
return cljs.core.reduce.call(null, cljs.core.disj, s1, s2)
|
|
}
|
|
};
|
|
var difference__3 = function() {
|
|
var G__15413__delegate = function(s1, s2, sets) {
|
|
return cljs.core.reduce.call(null, difference, s1, cljs.core.conj.call(null, sets, s2))
|
|
};
|
|
var G__15413 = function(s1, s2, var_args) {
|
|
var sets = null;
|
|
if(arguments.length > 2) {
|
|
sets = cljs.core.array_seq(Array.prototype.slice.call(arguments, 2), 0)
|
|
}
|
|
return G__15413__delegate.call(this, s1, s2, sets)
|
|
};
|
|
G__15413.cljs$lang$maxFixedArity = 2;
|
|
G__15413.cljs$lang$applyTo = function(arglist__15414) {
|
|
var s1 = cljs.core.first(arglist__15414);
|
|
arglist__15414 = cljs.core.next(arglist__15414);
|
|
var s2 = cljs.core.first(arglist__15414);
|
|
var sets = cljs.core.rest(arglist__15414);
|
|
return G__15413__delegate(s1, s2, sets)
|
|
};
|
|
G__15413.cljs$core$IFn$_invoke$arity$variadic = G__15413__delegate;
|
|
return G__15413
|
|
}();
|
|
difference = function(s1, s2, var_args) {
|
|
var sets = var_args;
|
|
switch(arguments.length) {
|
|
case 1:
|
|
return difference__1.call(this, s1);
|
|
case 2:
|
|
return difference__2.call(this, s1, s2);
|
|
default:
|
|
return difference__3.cljs$core$IFn$_invoke$arity$variadic(s1, s2, cljs.core.array_seq(arguments, 2))
|
|
}
|
|
throw new Error("Invalid arity: " + arguments.length);
|
|
};
|
|
difference.cljs$lang$maxFixedArity = 2;
|
|
difference.cljs$lang$applyTo = difference__3.cljs$lang$applyTo;
|
|
difference.cljs$core$IFn$_invoke$arity$1 = difference__1;
|
|
difference.cljs$core$IFn$_invoke$arity$2 = difference__2;
|
|
difference.cljs$core$IFn$_invoke$arity$variadic = difference__3.cljs$core$IFn$_invoke$arity$variadic;
|
|
return difference
|
|
}();
|
|
clojure.set.select = function select(pred, xset) {
|
|
return cljs.core.reduce.call(null, function(s, k) {
|
|
if(cljs.core.truth_(pred.call(null, k))) {
|
|
return s
|
|
}else {
|
|
return cljs.core.disj.call(null, s, k)
|
|
}
|
|
}, xset, xset)
|
|
};
|
|
clojure.set.project = function project(xrel, ks) {
|
|
return cljs.core.set.call(null, cljs.core.map.call(null, function(p1__15415_SHARP_) {
|
|
return cljs.core.select_keys.call(null, p1__15415_SHARP_, ks)
|
|
}, xrel))
|
|
};
|
|
clojure.set.rename_keys = function rename_keys(map, kmap) {
|
|
return cljs.core.reduce.call(null, function(m, p__15418) {
|
|
var vec__15419 = p__15418;
|
|
var old = cljs.core.nth.call(null, vec__15419, 0, null);
|
|
var new$ = cljs.core.nth.call(null, vec__15419, 1, null);
|
|
if(function() {
|
|
var and__3941__auto__ = cljs.core.not_EQ_.call(null, old, new$);
|
|
if(and__3941__auto__) {
|
|
return cljs.core.contains_QMARK_.call(null, m, old)
|
|
}else {
|
|
return and__3941__auto__
|
|
}
|
|
}()) {
|
|
return cljs.core.dissoc.call(null, cljs.core.assoc.call(null, m, new$, cljs.core.get.call(null, m, old)), old)
|
|
}else {
|
|
return m
|
|
}
|
|
}, map, kmap)
|
|
};
|
|
clojure.set.rename = function rename(xrel, kmap) {
|
|
return cljs.core.set.call(null, cljs.core.map.call(null, function(p1__15420_SHARP_) {
|
|
return clojure.set.rename_keys.call(null, p1__15420_SHARP_, kmap)
|
|
}, xrel))
|
|
};
|
|
clojure.set.index = function index(xrel, ks) {
|
|
return cljs.core.reduce.call(null, function(m, x) {
|
|
var ik = cljs.core.select_keys.call(null, x, ks);
|
|
return cljs.core.assoc.call(null, m, ik, cljs.core.conj.call(null, cljs.core.get.call(null, m, ik, cljs.core.PersistentHashSet.EMPTY), x))
|
|
}, cljs.core.PersistentArrayMap.EMPTY, xrel)
|
|
};
|
|
clojure.set.map_invert = function map_invert(m) {
|
|
return cljs.core.reduce.call(null, function(m__$1, p__15423) {
|
|
var vec__15424 = p__15423;
|
|
var k = cljs.core.nth.call(null, vec__15424, 0, null);
|
|
var v = cljs.core.nth.call(null, vec__15424, 1, null);
|
|
return cljs.core.assoc.call(null, m__$1, v, k)
|
|
}, cljs.core.PersistentArrayMap.EMPTY, m)
|
|
};
|
|
clojure.set.join = function() {
|
|
var join = null;
|
|
var join__2 = function(xrel, yrel) {
|
|
if(function() {
|
|
var and__3941__auto__ = cljs.core.seq.call(null, xrel);
|
|
if(and__3941__auto__) {
|
|
return cljs.core.seq.call(null, yrel)
|
|
}else {
|
|
return and__3941__auto__
|
|
}
|
|
}()) {
|
|
var ks = clojure.set.intersection.call(null, cljs.core.set.call(null, cljs.core.keys.call(null, cljs.core.first.call(null, xrel))), cljs.core.set.call(null, cljs.core.keys.call(null, cljs.core.first.call(null, yrel))));
|
|
var vec__15431 = cljs.core.count.call(null, xrel) <= cljs.core.count.call(null, yrel) ? cljs.core.PersistentVector.fromArray([xrel, yrel], true) : cljs.core.PersistentVector.fromArray([yrel, xrel], true);
|
|
var r = cljs.core.nth.call(null, vec__15431, 0, null);
|
|
var s = cljs.core.nth.call(null, vec__15431, 1, null);
|
|
var idx = clojure.set.index.call(null, r, ks);
|
|
return cljs.core.reduce.call(null, function(ret, x) {
|
|
var found = idx.call(null, cljs.core.select_keys.call(null, x, ks));
|
|
if(cljs.core.truth_(found)) {
|
|
return cljs.core.reduce.call(null, function(p1__15425_SHARP_, p2__15426_SHARP_) {
|
|
return cljs.core.conj.call(null, p1__15425_SHARP_, cljs.core.merge.call(null, p2__15426_SHARP_, x))
|
|
}, ret, found)
|
|
}else {
|
|
return ret
|
|
}
|
|
}, cljs.core.PersistentHashSet.EMPTY, s)
|
|
}else {
|
|
return cljs.core.PersistentHashSet.EMPTY
|
|
}
|
|
};
|
|
var join__3 = function(xrel, yrel, km) {
|
|
var vec__15432 = cljs.core.count.call(null, xrel) <= cljs.core.count.call(null, yrel) ? cljs.core.PersistentVector.fromArray([xrel, yrel, clojure.set.map_invert.call(null, km)], true) : cljs.core.PersistentVector.fromArray([yrel, xrel, km], true);
|
|
var r = cljs.core.nth.call(null, vec__15432, 0, null);
|
|
var s = cljs.core.nth.call(null, vec__15432, 1, null);
|
|
var k = cljs.core.nth.call(null, vec__15432, 2, null);
|
|
var idx = clojure.set.index.call(null, r, cljs.core.vals.call(null, k));
|
|
return cljs.core.reduce.call(null, function(ret, x) {
|
|
var found = idx.call(null, clojure.set.rename_keys.call(null, cljs.core.select_keys.call(null, x, cljs.core.keys.call(null, k)), k));
|
|
if(cljs.core.truth_(found)) {
|
|
return cljs.core.reduce.call(null, function(p1__15427_SHARP_, p2__15428_SHARP_) {
|
|
return cljs.core.conj.call(null, p1__15427_SHARP_, cljs.core.merge.call(null, p2__15428_SHARP_, x))
|
|
}, ret, found)
|
|
}else {
|
|
return ret
|
|
}
|
|
}, cljs.core.PersistentHashSet.EMPTY, s)
|
|
};
|
|
join = function(xrel, yrel, km) {
|
|
switch(arguments.length) {
|
|
case 2:
|
|
return join__2.call(this, xrel, yrel);
|
|
case 3:
|
|
return join__3.call(this, xrel, yrel, km)
|
|
}
|
|
throw new Error("Invalid arity: " + arguments.length);
|
|
};
|
|
join.cljs$core$IFn$_invoke$arity$2 = join__2;
|
|
join.cljs$core$IFn$_invoke$arity$3 = join__3;
|
|
return join
|
|
}();
|
|
clojure.set.subset_QMARK_ = function subset_QMARK_(set1, set2) {
|
|
var and__3941__auto__ = cljs.core.count.call(null, set1) <= cljs.core.count.call(null, set2);
|
|
if(and__3941__auto__) {
|
|
return cljs.core.every_QMARK_.call(null, function(p1__15433_SHARP_) {
|
|
return cljs.core.contains_QMARK_.call(null, set2, p1__15433_SHARP_)
|
|
}, set1)
|
|
}else {
|
|
return and__3941__auto__
|
|
}
|
|
};
|
|
clojure.set.superset_QMARK_ = function superset_QMARK_(set1, set2) {
|
|
var and__3941__auto__ = cljs.core.count.call(null, set1) >= cljs.core.count.call(null, set2);
|
|
if(and__3941__auto__) {
|
|
return cljs.core.every_QMARK_.call(null, function(p1__15434_SHARP_) {
|
|
return cljs.core.contains_QMARK_.call(null, set1, p1__15434_SHARP_)
|
|
}, set2)
|
|
}else {
|
|
return and__3941__auto__
|
|
}
|
|
};
|
|
goog.provide("specljs.tags");
|
|
goog.require("cljs.core");
|
|
goog.require("specljs.config");
|
|
goog.require("clojure.string");
|
|
goog.require("clojure.set");
|
|
goog.require("specljs.config");
|
|
goog.require("clojure.string");
|
|
goog.require("clojure.set");
|
|
specljs.tags.pass_includes_QMARK_ = function pass_includes_QMARK_(includes, tags) {
|
|
if(cljs.core.empty_QMARK_.call(null, includes)) {
|
|
return true
|
|
}else {
|
|
return cljs.core._EQ_.call(null, includes, clojure.set.intersection.call(null, includes, cljs.core.set.call(null, tags)))
|
|
}
|
|
};
|
|
specljs.tags.pass_excludes_QMARK_ = function pass_excludes_QMARK_(excludes, tags) {
|
|
if(cljs.core.empty_QMARK_.call(null, excludes)) {
|
|
return true
|
|
}else {
|
|
return cljs.core.not.call(null, cljs.core.some.call(null, function(p1__15399_SHARP_) {
|
|
return cljs.core.contains_QMARK_.call(null, excludes, p1__15399_SHARP_)
|
|
}, tags))
|
|
}
|
|
};
|
|
specljs.tags.pass_tag_filter_QMARK_ = function() {
|
|
var pass_tag_filter_QMARK_ = null;
|
|
var pass_tag_filter_QMARK___1 = function(tags) {
|
|
return pass_tag_filter_QMARK_.call(null, specljs.config._STAR_tag_filter_STAR_, tags)
|
|
};
|
|
var pass_tag_filter_QMARK___2 = function(filter, tags) {
|
|
var and__3941__auto__ = specljs.tags.pass_includes_QMARK_.call(null, (new cljs.core.Keyword("\ufdd0:includes")).call(null, filter), tags);
|
|
if(cljs.core.truth_(and__3941__auto__)) {
|
|
return specljs.tags.pass_excludes_QMARK_.call(null, (new cljs.core.Keyword("\ufdd0:excludes")).call(null, filter), tags)
|
|
}else {
|
|
return and__3941__auto__
|
|
}
|
|
};
|
|
pass_tag_filter_QMARK_ = function(filter, tags) {
|
|
switch(arguments.length) {
|
|
case 1:
|
|
return pass_tag_filter_QMARK___1.call(this, filter);
|
|
case 2:
|
|
return pass_tag_filter_QMARK___2.call(this, filter, tags)
|
|
}
|
|
throw new Error("Invalid arity: " + arguments.length);
|
|
};
|
|
pass_tag_filter_QMARK_.cljs$core$IFn$_invoke$arity$1 = pass_tag_filter_QMARK___1;
|
|
pass_tag_filter_QMARK_.cljs$core$IFn$_invoke$arity$2 = pass_tag_filter_QMARK___2;
|
|
return pass_tag_filter_QMARK_
|
|
}();
|
|
specljs.tags.tags_for = function tags_for(context) {
|
|
if(cljs.core.truth_(context)) {
|
|
return clojure.set.union.call(null, tags_for.call(null, cljs.core.deref.call(null, context.parent)), cljs.core.deref.call(null, context.tags))
|
|
}else {
|
|
return cljs.core.PersistentHashSet.EMPTY
|
|
}
|
|
};
|
|
specljs.tags.tag_sets_for = function tag_sets_for(context) {
|
|
var context_seq = cljs.core.tree_seq.call(null, function(p1__15400_SHARP_) {
|
|
return!(p1__15400_SHARP_ == null)
|
|
}, function(p1__15401_SHARP_) {
|
|
return cljs.core.deref.call(null, p1__15401_SHARP_.children)
|
|
}, context);
|
|
return cljs.core.map.call(null, specljs.tags.tags_for, context_seq)
|
|
};
|
|
specljs.tags.context_with_tags_seq = function context_with_tags_seq(context) {
|
|
var context_seq = cljs.core.tree_seq.call(null, function(p1__15402_SHARP_) {
|
|
return!(p1__15402_SHARP_ == null)
|
|
}, function(p1__15403_SHARP_) {
|
|
return cljs.core.deref.call(null, p1__15403_SHARP_.children)
|
|
}, context);
|
|
return cljs.core.map.call(null, function(p1__15404_SHARP_) {
|
|
return cljs.core.hash_map.call(null, "\ufdd0:context", p1__15404_SHARP_, "\ufdd0:tag-set", specljs.tags.tags_for.call(null, p1__15404_SHARP_))
|
|
}, context_seq)
|
|
};
|
|
specljs.tags.describe_filter = function() {
|
|
var describe_filter = null;
|
|
var describe_filter__0 = function() {
|
|
return describe_filter.call(null, specljs.config._STAR_tag_filter_STAR_)
|
|
};
|
|
var describe_filter__1 = function(filter) {
|
|
var includes = cljs.core.seq.call(null, cljs.core.map.call(null, cljs.core.name, (new cljs.core.Keyword("\ufdd0:includes")).call(null, filter)));
|
|
var excludes = cljs.core.seq.call(null, cljs.core.map.call(null, cljs.core.name, (new cljs.core.Keyword("\ufdd0:excludes")).call(null, filter)));
|
|
if(function() {
|
|
var or__3943__auto__ = includes;
|
|
if(or__3943__auto__) {
|
|
return or__3943__auto__
|
|
}else {
|
|
return excludes
|
|
}
|
|
}()) {
|
|
return[cljs.core.str("Filtering tags."), cljs.core.str(includes ? [cljs.core.str(" Including: "), cljs.core.str(clojure.string.join.call(null, ", ", includes)), cljs.core.str(".")].join("") : null), cljs.core.str(excludes ? [cljs.core.str(" Excluding: "), cljs.core.str(clojure.string.join.call(null, ", ", excludes)), cljs.core.str(".")].join("") : null)].join("")
|
|
}else {
|
|
return null
|
|
}
|
|
};
|
|
describe_filter = function(filter) {
|
|
switch(arguments.length) {
|
|
case 0:
|
|
return describe_filter__0.call(this);
|
|
case 1:
|
|
return describe_filter__1.call(this, filter)
|
|
}
|
|
throw new Error("Invalid arity: " + arguments.length);
|
|
};
|
|
describe_filter.cljs$core$IFn$_invoke$arity$0 = describe_filter__0;
|
|
describe_filter.cljs$core$IFn$_invoke$arity$1 = describe_filter__1;
|
|
return describe_filter
|
|
}();
|
|
goog.provide("specljs.running");
|
|
goog.require("cljs.core");
|
|
goog.require("specljs.components");
|
|
goog.require("specljs.config");
|
|
goog.require("specljs.results");
|
|
goog.require("specljs.reporting");
|
|
goog.require("specljs.tags");
|
|
goog.require("specljs.platform");
|
|
goog.require("specljs.tags");
|
|
goog.require("specljs.results");
|
|
goog.require("specljs.reporting");
|
|
goog.require("specljs.platform");
|
|
goog.require("specljs.config");
|
|
goog.require("specljs.components");
|
|
goog.require("clojure.string");
|
|
specljs.running.eval_components = function eval_components(components) {
|
|
var seq__15503 = cljs.core.seq.call(null, components);
|
|
var chunk__15504 = null;
|
|
var count__15505 = 0;
|
|
var i__15506 = 0;
|
|
while(true) {
|
|
if(i__15506 < count__15505) {
|
|
var component = cljs.core._nth.call(null, chunk__15504, i__15506);
|
|
component.body.call(null);
|
|
var G__15507 = seq__15503;
|
|
var G__15508 = chunk__15504;
|
|
var G__15509 = count__15505;
|
|
var G__15510 = i__15506 + 1;
|
|
seq__15503 = G__15507;
|
|
chunk__15504 = G__15508;
|
|
count__15505 = G__15509;
|
|
i__15506 = G__15510;
|
|
continue
|
|
}else {
|
|
var temp__4092__auto__ = cljs.core.seq.call(null, seq__15503);
|
|
if(temp__4092__auto__) {
|
|
var seq__15503__$1 = temp__4092__auto__;
|
|
if(cljs.core.chunked_seq_QMARK_.call(null, seq__15503__$1)) {
|
|
var c__3037__auto__ = cljs.core.chunk_first.call(null, seq__15503__$1);
|
|
var G__15511 = cljs.core.chunk_rest.call(null, seq__15503__$1);
|
|
var G__15512 = c__3037__auto__;
|
|
var G__15513 = cljs.core.count.call(null, c__3037__auto__);
|
|
var G__15514 = 0;
|
|
seq__15503 = G__15511;
|
|
chunk__15504 = G__15512;
|
|
count__15505 = G__15513;
|
|
i__15506 = G__15514;
|
|
continue
|
|
}else {
|
|
var component = cljs.core.first.call(null, seq__15503__$1);
|
|
component.body.call(null);
|
|
var G__15515 = cljs.core.next.call(null, seq__15503__$1);
|
|
var G__15516 = null;
|
|
var G__15517 = 0;
|
|
var G__15518 = 0;
|
|
seq__15503 = G__15515;
|
|
chunk__15504 = G__15516;
|
|
count__15505 = G__15517;
|
|
i__15506 = G__15518;
|
|
continue
|
|
}
|
|
}else {
|
|
return null
|
|
}
|
|
}
|
|
break
|
|
}
|
|
};
|
|
specljs.running.nested_fns = function nested_fns(base, fns) {
|
|
if(cljs.core.seq.call(null, fns)) {
|
|
return cljs.core.partial.call(null, cljs.core.first.call(null, fns), nested_fns.call(null, base, cljs.core.rest.call(null, fns)))
|
|
}else {
|
|
return base
|
|
}
|
|
};
|
|
specljs.running.eval_characteristic = function eval_characteristic(befores, body, afters) {
|
|
specljs.running.eval_components.call(null, befores);
|
|
try {
|
|
return body.call(null)
|
|
}finally {
|
|
specljs.running.eval_components.call(null, afters)
|
|
}
|
|
};
|
|
specljs.running.reset_withs = function reset_withs(withs) {
|
|
var seq__15525 = cljs.core.seq.call(null, withs);
|
|
var chunk__15526 = null;
|
|
var count__15527 = 0;
|
|
var i__15528 = 0;
|
|
while(true) {
|
|
if(i__15528 < count__15527) {
|
|
var with$ = cljs.core._nth.call(null, chunk__15526, i__15528);
|
|
specljs.components.reset_with.call(null, with$);
|
|
var G__15529 = seq__15525;
|
|
var G__15530 = chunk__15526;
|
|
var G__15531 = count__15527;
|
|
var G__15532 = i__15528 + 1;
|
|
seq__15525 = G__15529;
|
|
chunk__15526 = G__15530;
|
|
count__15527 = G__15531;
|
|
i__15528 = G__15532;
|
|
continue
|
|
}else {
|
|
var temp__4092__auto__ = cljs.core.seq.call(null, seq__15525);
|
|
if(temp__4092__auto__) {
|
|
var seq__15525__$1 = temp__4092__auto__;
|
|
if(cljs.core.chunked_seq_QMARK_.call(null, seq__15525__$1)) {
|
|
var c__3037__auto__ = cljs.core.chunk_first.call(null, seq__15525__$1);
|
|
var G__15533 = cljs.core.chunk_rest.call(null, seq__15525__$1);
|
|
var G__15534 = c__3037__auto__;
|
|
var G__15535 = cljs.core.count.call(null, c__3037__auto__);
|
|
var G__15536 = 0;
|
|
seq__15525 = G__15533;
|
|
chunk__15526 = G__15534;
|
|
count__15527 = G__15535;
|
|
i__15528 = G__15536;
|
|
continue
|
|
}else {
|
|
var with$ = cljs.core.first.call(null, seq__15525__$1);
|
|
specljs.components.reset_with.call(null, with$);
|
|
var G__15537 = cljs.core.next.call(null, seq__15525__$1);
|
|
var G__15538 = null;
|
|
var G__15539 = 0;
|
|
var G__15540 = 0;
|
|
seq__15525 = G__15537;
|
|
chunk__15526 = G__15538;
|
|
count__15527 = G__15539;
|
|
i__15528 = G__15540;
|
|
continue
|
|
}
|
|
}else {
|
|
return null
|
|
}
|
|
}
|
|
break
|
|
}
|
|
};
|
|
specljs.running.collect_components = function collect_components(getter, description) {
|
|
var description__$1 = description;
|
|
var components = cljs.core.PersistentVector.EMPTY;
|
|
while(true) {
|
|
if(cljs.core.truth_(description__$1)) {
|
|
var G__15541 = cljs.core.deref.call(null, description__$1.parent);
|
|
var G__15542 = cljs.core.concat.call(null, getter.call(null, description__$1), components);
|
|
description__$1 = G__15541;
|
|
components = G__15542;
|
|
continue
|
|
}else {
|
|
return components
|
|
}
|
|
break
|
|
}
|
|
};
|
|
specljs.running.report_result = function report_result(result_constructor, characteristic, start_time, reporters, failure) {
|
|
var present_args = cljs.core.filter.call(null, cljs.core.identity, cljs.core.PersistentVector.fromArray([characteristic, specljs.platform.secs_since.call(null, start_time), failure], true));
|
|
var result = cljs.core.apply.call(null, result_constructor, present_args);
|
|
specljs.reporting.report_run.call(null, result, reporters);
|
|
return result
|
|
};
|
|
specljs.running.do_characteristic = function do_characteristic(characteristic, reporters) {
|
|
var description = cljs.core.deref.call(null, characteristic.parent);
|
|
var befores = specljs.running.collect_components.call(null, function(description) {
|
|
return function(p1__15543_SHARP_) {
|
|
return cljs.core.deref.call(null, p1__15543_SHARP_.befores)
|
|
}
|
|
}(description), description);
|
|
var afters = specljs.running.collect_components.call(null, function(description, befores) {
|
|
return function(p1__15544_SHARP_) {
|
|
return cljs.core.deref.call(null, p1__15544_SHARP_.afters)
|
|
}
|
|
}(description, befores), description);
|
|
var core_body = characteristic.body;
|
|
var before_and_after_body = function(description, befores, afters, core_body) {
|
|
return function() {
|
|
return specljs.running.eval_characteristic.call(null, befores, core_body, afters)
|
|
}
|
|
}(description, befores, afters, core_body);
|
|
var arounds = specljs.running.collect_components.call(null, function(description, befores, afters, core_body, before_and_after_body) {
|
|
return function(p1__15545_SHARP_) {
|
|
return cljs.core.deref.call(null, p1__15545_SHARP_.arounds)
|
|
}
|
|
}(description, befores, afters, core_body, before_and_after_body), description);
|
|
var full_body = specljs.running.nested_fns.call(null, before_and_after_body, cljs.core.map.call(null, function(description, befores, afters, core_body, before_and_after_body, arounds) {
|
|
return function(p1__15546_SHARP_) {
|
|
return p1__15546_SHARP_.body
|
|
}
|
|
}(description, befores, afters, core_body, before_and_after_body, arounds), arounds));
|
|
var withs = specljs.running.collect_components.call(null, function(description, befores, afters, core_body, before_and_after_body, arounds, full_body) {
|
|
return function(p1__15547_SHARP_) {
|
|
return cljs.core.deref.call(null, p1__15547_SHARP_.withs)
|
|
}
|
|
}(description, befores, afters, core_body, before_and_after_body, arounds, full_body), description);
|
|
var start_time = specljs.platform.current_time.call(null);
|
|
try {
|
|
full_body.call(null);
|
|
return specljs.running.report_result.call(null, specljs.results.pass_result, characteristic, start_time, reporters, null)
|
|
}catch(e15549) {
|
|
if(e15549 instanceof Object) {
|
|
var e = e15549;
|
|
if(cljs.core.truth_(specljs.platform.pending_QMARK_.call(null, e))) {
|
|
return specljs.running.report_result.call(null, specljs.results.pending_result, characteristic, start_time, reporters, e)
|
|
}else {
|
|
return specljs.running.report_result.call(null, specljs.results.fail_result, characteristic, start_time, reporters, e)
|
|
}
|
|
}else {
|
|
if("\ufdd0:else") {
|
|
throw e15549;
|
|
}else {
|
|
return null
|
|
}
|
|
}
|
|
}finally {
|
|
specljs.running.reset_withs.call(null, withs)
|
|
}
|
|
};
|
|
specljs.running.do_characteristics = function do_characteristics(characteristics, reporters) {
|
|
return cljs.core.doall.call(null, function() {
|
|
var iter__3006__auto__ = function iter__15554(s__15555) {
|
|
return new cljs.core.LazySeq(null, false, function() {
|
|
var s__15555__$1 = s__15555;
|
|
while(true) {
|
|
var temp__4092__auto__ = cljs.core.seq.call(null, s__15555__$1);
|
|
if(temp__4092__auto__) {
|
|
var s__15555__$2 = temp__4092__auto__;
|
|
if(cljs.core.chunked_seq_QMARK_.call(null, s__15555__$2)) {
|
|
var c__3004__auto__ = cljs.core.chunk_first.call(null, s__15555__$2);
|
|
var size__3005__auto__ = cljs.core.count.call(null, c__3004__auto__);
|
|
var b__15557 = cljs.core.chunk_buffer.call(null, size__3005__auto__);
|
|
if(function() {
|
|
var i__15556 = 0;
|
|
while(true) {
|
|
if(i__15556 < size__3005__auto__) {
|
|
var characteristic = cljs.core._nth.call(null, c__3004__auto__, i__15556);
|
|
cljs.core.chunk_append.call(null, b__15557, specljs.running.do_characteristic.call(null, characteristic, reporters));
|
|
var G__15558 = i__15556 + 1;
|
|
i__15556 = G__15558;
|
|
continue
|
|
}else {
|
|
return true
|
|
}
|
|
break
|
|
}
|
|
}()) {
|
|
return cljs.core.chunk_cons.call(null, cljs.core.chunk.call(null, b__15557), iter__15554.call(null, cljs.core.chunk_rest.call(null, s__15555__$2)))
|
|
}else {
|
|
return cljs.core.chunk_cons.call(null, cljs.core.chunk.call(null, b__15557), null)
|
|
}
|
|
}else {
|
|
var characteristic = cljs.core.first.call(null, s__15555__$2);
|
|
return cljs.core.cons.call(null, specljs.running.do_characteristic.call(null, characteristic, reporters), iter__15554.call(null, cljs.core.rest.call(null, s__15555__$2)))
|
|
}
|
|
}else {
|
|
return null
|
|
}
|
|
break
|
|
}
|
|
}, null)
|
|
};
|
|
return iter__3006__auto__.call(null, characteristics)
|
|
}())
|
|
};
|
|
specljs.running.do_child_contexts = function do_child_contexts(context, results, reporters) {
|
|
var results__$1 = results;
|
|
var contexts = cljs.core.deref.call(null, context.children);
|
|
while(true) {
|
|
if(cljs.core.seq.call(null, contexts)) {
|
|
var G__15559 = cljs.core.concat.call(null, results__$1, specljs.running.do_description.call(null, cljs.core.first.call(null, contexts), reporters));
|
|
var G__15560 = cljs.core.rest.call(null, contexts);
|
|
results__$1 = G__15559;
|
|
contexts = G__15560;
|
|
continue
|
|
}else {
|
|
specljs.running.eval_components.call(null, cljs.core.deref.call(null, context.after_alls));
|
|
return results__$1
|
|
}
|
|
break
|
|
}
|
|
};
|
|
specljs.running.results_for_context = function results_for_context(context, reporters) {
|
|
if(cljs.core.truth_(specljs.tags.pass_tag_filter_QMARK_.call(null, specljs.tags.tags_for.call(null, context)))) {
|
|
return specljs.running.do_characteristics.call(null, cljs.core.deref.call(null, context.charcteristics), reporters)
|
|
}else {
|
|
return cljs.core.PersistentVector.EMPTY
|
|
}
|
|
};
|
|
specljs.running.with_withs_bound = function with_withs_bound(description, body) {
|
|
var withs = cljs.core.concat.call(null, cljs.core.deref.call(null, description.withs), cljs.core.deref.call(null, description.with_alls));
|
|
var ns = clojure.string.replace.call(null, description.ns, "-", "_");
|
|
var var_names = cljs.core.map.call(null, function(withs, ns) {
|
|
return function(p1__15561_SHARP_) {
|
|
return[cljs.core.str(ns), cljs.core.str("."), cljs.core.str(cljs.core.name.call(null, p1__15561_SHARP_.name))].join("")
|
|
}
|
|
}(withs, ns), withs);
|
|
var unique_names = cljs.core.map.call(null, function(withs, ns, var_names) {
|
|
return function(p1__15562_SHARP_) {
|
|
return[cljs.core.str(ns), cljs.core.str("."), cljs.core.str(cljs.core.name.call(null, p1__15562_SHARP_.unique_name))].join("")
|
|
}
|
|
}(withs, ns, var_names), withs);
|
|
var seq__15576_15589 = cljs.core.seq.call(null, cljs.core.partition.call(null, 2, cljs.core.interleave.call(null, var_names, unique_names)));
|
|
var chunk__15577_15590 = null;
|
|
var count__15578_15591 = 0;
|
|
var i__15579_15592 = 0;
|
|
while(true) {
|
|
if(i__15579_15592 < count__15578_15591) {
|
|
var vec__15580_15593 = cljs.core._nth.call(null, chunk__15577_15590, i__15579_15592);
|
|
var n_15594 = cljs.core.nth.call(null, vec__15580_15593, 0, null);
|
|
var un_15595 = cljs.core.nth.call(null, vec__15580_15593, 1, null);
|
|
var code_15596 = [cljs.core.str(n_15594), cljs.core.str(" = "), cljs.core.str(un_15595), cljs.core.str(";")].join("");
|
|
eval(code_15596);
|
|
var G__15597 = seq__15576_15589;
|
|
var G__15598 = chunk__15577_15590;
|
|
var G__15599 = count__15578_15591;
|
|
var G__15600 = i__15579_15592 + 1;
|
|
seq__15576_15589 = G__15597;
|
|
chunk__15577_15590 = G__15598;
|
|
count__15578_15591 = G__15599;
|
|
i__15579_15592 = G__15600;
|
|
continue
|
|
}else {
|
|
var temp__4092__auto___15601 = cljs.core.seq.call(null, seq__15576_15589);
|
|
if(temp__4092__auto___15601) {
|
|
var seq__15576_15602__$1 = temp__4092__auto___15601;
|
|
if(cljs.core.chunked_seq_QMARK_.call(null, seq__15576_15602__$1)) {
|
|
var c__3037__auto___15603 = cljs.core.chunk_first.call(null, seq__15576_15602__$1);
|
|
var G__15604 = cljs.core.chunk_rest.call(null, seq__15576_15602__$1);
|
|
var G__15605 = c__3037__auto___15603;
|
|
var G__15606 = cljs.core.count.call(null, c__3037__auto___15603);
|
|
var G__15607 = 0;
|
|
seq__15576_15589 = G__15604;
|
|
chunk__15577_15590 = G__15605;
|
|
count__15578_15591 = G__15606;
|
|
i__15579_15592 = G__15607;
|
|
continue
|
|
}else {
|
|
var vec__15581_15608 = cljs.core.first.call(null, seq__15576_15602__$1);
|
|
var n_15609 = cljs.core.nth.call(null, vec__15581_15608, 0, null);
|
|
var un_15610 = cljs.core.nth.call(null, vec__15581_15608, 1, null);
|
|
var code_15611 = [cljs.core.str(n_15609), cljs.core.str(" = "), cljs.core.str(un_15610), cljs.core.str(";")].join("");
|
|
eval(code_15611);
|
|
var G__15612 = cljs.core.next.call(null, seq__15576_15602__$1);
|
|
var G__15613 = null;
|
|
var G__15614 = 0;
|
|
var G__15615 = 0;
|
|
seq__15576_15589 = G__15612;
|
|
chunk__15577_15590 = G__15613;
|
|
count__15578_15591 = G__15614;
|
|
i__15579_15592 = G__15615;
|
|
continue
|
|
}
|
|
}else {
|
|
}
|
|
}
|
|
break
|
|
}
|
|
try {
|
|
return body.call(null)
|
|
}finally {
|
|
var seq__15583_15616 = cljs.core.seq.call(null, var_names);
|
|
var chunk__15584_15617 = null;
|
|
var count__15585_15618 = 0;
|
|
var i__15586_15619 = 0;
|
|
while(true) {
|
|
if(i__15586_15619 < count__15585_15618) {
|
|
var vec__15587_15620 = cljs.core._nth.call(null, chunk__15584_15617, i__15586_15619);
|
|
var n_15621 = cljs.core.nth.call(null, vec__15587_15620, 0, null);
|
|
var code_15622 = [cljs.core.str(n_15621), cljs.core.str(" = null;")].join("");
|
|
eval(code_15622);
|
|
var G__15623 = seq__15583_15616;
|
|
var G__15624 = chunk__15584_15617;
|
|
var G__15625 = count__15585_15618;
|
|
var G__15626 = i__15586_15619 + 1;
|
|
seq__15583_15616 = G__15623;
|
|
chunk__15584_15617 = G__15624;
|
|
count__15585_15618 = G__15625;
|
|
i__15586_15619 = G__15626;
|
|
continue
|
|
}else {
|
|
var temp__4092__auto___15627 = cljs.core.seq.call(null, seq__15583_15616);
|
|
if(temp__4092__auto___15627) {
|
|
var seq__15583_15628__$1 = temp__4092__auto___15627;
|
|
if(cljs.core.chunked_seq_QMARK_.call(null, seq__15583_15628__$1)) {
|
|
var c__3037__auto___15629 = cljs.core.chunk_first.call(null, seq__15583_15628__$1);
|
|
var G__15630 = cljs.core.chunk_rest.call(null, seq__15583_15628__$1);
|
|
var G__15631 = c__3037__auto___15629;
|
|
var G__15632 = cljs.core.count.call(null, c__3037__auto___15629);
|
|
var G__15633 = 0;
|
|
seq__15583_15616 = G__15630;
|
|
chunk__15584_15617 = G__15631;
|
|
count__15585_15618 = G__15632;
|
|
i__15586_15619 = G__15633;
|
|
continue
|
|
}else {
|
|
var vec__15588_15634 = cljs.core.first.call(null, seq__15583_15628__$1);
|
|
var n_15635 = cljs.core.nth.call(null, vec__15588_15634, 0, null);
|
|
var code_15636 = [cljs.core.str(n_15635), cljs.core.str(" = null;")].join("");
|
|
eval(code_15636);
|
|
var G__15637 = cljs.core.next.call(null, seq__15583_15628__$1);
|
|
var G__15638 = null;
|
|
var G__15639 = 0;
|
|
var G__15640 = 0;
|
|
seq__15583_15616 = G__15637;
|
|
chunk__15584_15617 = G__15638;
|
|
count__15585_15618 = G__15639;
|
|
i__15586_15619 = G__15640;
|
|
continue
|
|
}
|
|
}else {
|
|
}
|
|
}
|
|
break
|
|
}
|
|
}
|
|
};
|
|
specljs.running.do_description = function do_description(description, reporters) {
|
|
var tag_sets = specljs.tags.tag_sets_for.call(null, description);
|
|
if(cljs.core.truth_(cljs.core.some.call(null, specljs.tags.pass_tag_filter_QMARK_, tag_sets))) {
|
|
specljs.reporting.report_description_STAR_.call(null, reporters, description);
|
|
return specljs.running.with_withs_bound.call(null, description, function() {
|
|
specljs.running.eval_components.call(null, cljs.core.deref.call(null, description.before_alls));
|
|
try {
|
|
var results = specljs.running.results_for_context.call(null, description, reporters);
|
|
return specljs.running.do_child_contexts.call(null, description, results, reporters)
|
|
}finally {
|
|
specljs.running.reset_withs.call(null, cljs.core.deref.call(null, description.with_alls))
|
|
}
|
|
})
|
|
}else {
|
|
return null
|
|
}
|
|
};
|
|
specljs.running.process_compile_error = function process_compile_error(runner, e) {
|
|
var error_result = specljs.results.error_result.call(null, e);
|
|
cljs.core.swap_BANG_.call(null, runner.results, cljs.core.conj, error_result);
|
|
return specljs.reporting.report_run.call(null, error_result, specljs.config.active_reporters.call(null))
|
|
};
|
|
specljs.running.Runner = {};
|
|
specljs.running.run_directories = function run_directories(this$, directories, reporters) {
|
|
if(function() {
|
|
var and__3941__auto__ = this$;
|
|
if(and__3941__auto__) {
|
|
return this$.specljs$running$Runner$run_directories$arity$3
|
|
}else {
|
|
return and__3941__auto__
|
|
}
|
|
}()) {
|
|
return this$.specljs$running$Runner$run_directories$arity$3(this$, directories, reporters)
|
|
}else {
|
|
var x__2906__auto__ = this$ == null ? null : this$;
|
|
return function() {
|
|
var or__3943__auto__ = specljs.running.run_directories[goog.typeOf(x__2906__auto__)];
|
|
if(or__3943__auto__) {
|
|
return or__3943__auto__
|
|
}else {
|
|
var or__3943__auto____$1 = specljs.running.run_directories["_"];
|
|
if(or__3943__auto____$1) {
|
|
return or__3943__auto____$1
|
|
}else {
|
|
throw cljs.core.missing_protocol.call(null, "Runner.run-directories", this$);
|
|
}
|
|
}
|
|
}().call(null, this$, directories, reporters)
|
|
}
|
|
};
|
|
specljs.running.submit_description = function submit_description(this$, description) {
|
|
if(function() {
|
|
var and__3941__auto__ = this$;
|
|
if(and__3941__auto__) {
|
|
return this$.specljs$running$Runner$submit_description$arity$2
|
|
}else {
|
|
return and__3941__auto__
|
|
}
|
|
}()) {
|
|
return this$.specljs$running$Runner$submit_description$arity$2(this$, description)
|
|
}else {
|
|
var x__2906__auto__ = this$ == null ? null : this$;
|
|
return function() {
|
|
var or__3943__auto__ = specljs.running.submit_description[goog.typeOf(x__2906__auto__)];
|
|
if(or__3943__auto__) {
|
|
return or__3943__auto__
|
|
}else {
|
|
var or__3943__auto____$1 = specljs.running.submit_description["_"];
|
|
if(or__3943__auto____$1) {
|
|
return or__3943__auto____$1
|
|
}else {
|
|
throw cljs.core.missing_protocol.call(null, "Runner.submit-description", this$);
|
|
}
|
|
}
|
|
}().call(null, this$, description)
|
|
}
|
|
};
|
|
specljs.running.run_description = function run_description(this$, description, reporters) {
|
|
if(function() {
|
|
var and__3941__auto__ = this$;
|
|
if(and__3941__auto__) {
|
|
return this$.specljs$running$Runner$run_description$arity$3
|
|
}else {
|
|
return and__3941__auto__
|
|
}
|
|
}()) {
|
|
return this$.specljs$running$Runner$run_description$arity$3(this$, description, reporters)
|
|
}else {
|
|
var x__2906__auto__ = this$ == null ? null : this$;
|
|
return function() {
|
|
var or__3943__auto__ = specljs.running.run_description[goog.typeOf(x__2906__auto__)];
|
|
if(or__3943__auto__) {
|
|
return or__3943__auto__
|
|
}else {
|
|
var or__3943__auto____$1 = specljs.running.run_description["_"];
|
|
if(or__3943__auto____$1) {
|
|
return or__3943__auto____$1
|
|
}else {
|
|
throw cljs.core.missing_protocol.call(null, "Runner.run-description", this$);
|
|
}
|
|
}
|
|
}().call(null, this$, description, reporters)
|
|
}
|
|
};
|
|
specljs.running.run_and_report = function run_and_report(this$, reporters) {
|
|
if(function() {
|
|
var and__3941__auto__ = this$;
|
|
if(and__3941__auto__) {
|
|
return this$.specljs$running$Runner$run_and_report$arity$2
|
|
}else {
|
|
return and__3941__auto__
|
|
}
|
|
}()) {
|
|
return this$.specljs$running$Runner$run_and_report$arity$2(this$, reporters)
|
|
}else {
|
|
var x__2906__auto__ = this$ == null ? null : this$;
|
|
return function() {
|
|
var or__3943__auto__ = specljs.running.run_and_report[goog.typeOf(x__2906__auto__)];
|
|
if(or__3943__auto__) {
|
|
return or__3943__auto__
|
|
}else {
|
|
var or__3943__auto____$1 = specljs.running.run_and_report["_"];
|
|
if(or__3943__auto____$1) {
|
|
return or__3943__auto____$1
|
|
}else {
|
|
throw cljs.core.missing_protocol.call(null, "Runner.run-and-report", this$);
|
|
}
|
|
}
|
|
}().call(null, this$, reporters)
|
|
}
|
|
};
|
|
goog.provide("specljs.report.progress");
|
|
goog.require("cljs.core");
|
|
goog.require("specljs.platform");
|
|
goog.require("specljs.config");
|
|
goog.require("specljs.reporting");
|
|
goog.require("specljs.results");
|
|
goog.require("clojure.string");
|
|
goog.require("specljs.results");
|
|
goog.require("specljs.reporting");
|
|
goog.require("specljs.platform");
|
|
goog.require("specljs.config");
|
|
specljs.report.progress.full_name = function full_name(characteristic) {
|
|
var context = cljs.core.deref.call(null, characteristic.parent);
|
|
var name = characteristic.name;
|
|
while(true) {
|
|
if(cljs.core.truth_(context)) {
|
|
var G__15337 = cljs.core.deref.call(null, context.parent);
|
|
var G__15338 = [cljs.core.str(context.name), cljs.core.str(" "), cljs.core.str(name)].join("");
|
|
context = G__15337;
|
|
name = G__15338;
|
|
continue
|
|
}else {
|
|
return name
|
|
}
|
|
break
|
|
}
|
|
};
|
|
specljs.report.progress.print_failure = function print_failure(id, result) {
|
|
var characteristic = result.characteristic;
|
|
var failure = result.failure;
|
|
cljs.core.println.call(null);
|
|
cljs.core.println.call(null, specljs.reporting.indent.call(null, 1, id, ") ", specljs.report.progress.full_name.call(null, characteristic)));
|
|
cljs.core.println.call(null, specljs.reporting.red.call(null, specljs.reporting.indent.call(null, 2.5, specljs.platform.error_message.call(null, failure))));
|
|
if(cljs.core.isa_QMARK_.call(null, cljs.core.type.call(null, failure), specljs.platform.failure)) {
|
|
return cljs.core.println.call(null, specljs.reporting.grey.call(null, specljs.reporting.indent.call(null, 2.5, specljs.platform.failure_source.call(null, failure))))
|
|
}else {
|
|
return cljs.core.println.call(null, specljs.reporting.grey.call(null, specljs.reporting.indent.call(null, 2.5, specljs.reporting.stack_trace_str.call(null, failure))))
|
|
}
|
|
};
|
|
specljs.report.progress.print_failures = function print_failures(failures) {
|
|
if(cljs.core.seq.call(null, failures)) {
|
|
cljs.core.println.call(null);
|
|
cljs.core.println.call(null, "Failures:")
|
|
}else {
|
|
}
|
|
var n__3084__auto__ = cljs.core.count.call(null, failures);
|
|
var i = 0;
|
|
while(true) {
|
|
if(i < n__3084__auto__) {
|
|
specljs.report.progress.print_failure.call(null, i + 1, cljs.core.nth.call(null, failures, i));
|
|
var G__15339 = i + 1;
|
|
i = G__15339;
|
|
continue
|
|
}else {
|
|
return null
|
|
}
|
|
break
|
|
}
|
|
};
|
|
specljs.report.progress.print_pendings = function print_pendings(pending_results) {
|
|
if(cljs.core.seq.call(null, pending_results)) {
|
|
cljs.core.println.call(null);
|
|
cljs.core.println.call(null, "Pending:")
|
|
}else {
|
|
}
|
|
var seq__15344 = cljs.core.seq.call(null, pending_results);
|
|
var chunk__15345 = null;
|
|
var count__15346 = 0;
|
|
var i__15347 = 0;
|
|
while(true) {
|
|
if(i__15347 < count__15346) {
|
|
var result = cljs.core._nth.call(null, chunk__15345, i__15347);
|
|
cljs.core.println.call(null);
|
|
cljs.core.println.call(null, specljs.reporting.yellow.call(null, [cljs.core.str(" "), cljs.core.str(specljs.report.progress.full_name.call(null, result.characteristic))].join("")));
|
|
cljs.core.println.call(null, specljs.reporting.grey.call(null, [cljs.core.str(" ; "), cljs.core.str(specljs.platform.error_message.call(null, result.exception))].join("")));
|
|
cljs.core.println.call(null, specljs.reporting.grey.call(null, [cljs.core.str(" ; "), cljs.core.str(specljs.platform.failure_source.call(null, result.exception))].join("")));
|
|
var G__15348 = seq__15344;
|
|
var G__15349 = chunk__15345;
|
|
var G__15350 = count__15346;
|
|
var G__15351 = i__15347 + 1;
|
|
seq__15344 = G__15348;
|
|
chunk__15345 = G__15349;
|
|
count__15346 = G__15350;
|
|
i__15347 = G__15351;
|
|
continue
|
|
}else {
|
|
var temp__4092__auto__ = cljs.core.seq.call(null, seq__15344);
|
|
if(temp__4092__auto__) {
|
|
var seq__15344__$1 = temp__4092__auto__;
|
|
if(cljs.core.chunked_seq_QMARK_.call(null, seq__15344__$1)) {
|
|
var c__3037__auto__ = cljs.core.chunk_first.call(null, seq__15344__$1);
|
|
var G__15352 = cljs.core.chunk_rest.call(null, seq__15344__$1);
|
|
var G__15353 = c__3037__auto__;
|
|
var G__15354 = cljs.core.count.call(null, c__3037__auto__);
|
|
var G__15355 = 0;
|
|
seq__15344 = G__15352;
|
|
chunk__15345 = G__15353;
|
|
count__15346 = G__15354;
|
|
i__15347 = G__15355;
|
|
continue
|
|
}else {
|
|
var result = cljs.core.first.call(null, seq__15344__$1);
|
|
cljs.core.println.call(null);
|
|
cljs.core.println.call(null, specljs.reporting.yellow.call(null, [cljs.core.str(" "), cljs.core.str(specljs.report.progress.full_name.call(null, result.characteristic))].join("")));
|
|
cljs.core.println.call(null, specljs.reporting.grey.call(null, [cljs.core.str(" ; "), cljs.core.str(specljs.platform.error_message.call(null, result.exception))].join("")));
|
|
cljs.core.println.call(null, specljs.reporting.grey.call(null, [cljs.core.str(" ; "), cljs.core.str(specljs.platform.failure_source.call(null, result.exception))].join("")));
|
|
var G__15356 = cljs.core.next.call(null, seq__15344__$1);
|
|
var G__15357 = null;
|
|
var G__15358 = 0;
|
|
var G__15359 = 0;
|
|
seq__15344 = G__15356;
|
|
chunk__15345 = G__15357;
|
|
count__15346 = G__15358;
|
|
i__15347 = G__15359;
|
|
continue
|
|
}
|
|
}else {
|
|
return null
|
|
}
|
|
}
|
|
break
|
|
}
|
|
};
|
|
specljs.report.progress.print_errors = function print_errors(error_results) {
|
|
if(cljs.core.seq.call(null, error_results)) {
|
|
cljs.core.println.call(null);
|
|
cljs.core.println.call(null, "Errors:")
|
|
}else {
|
|
}
|
|
var seq__15366_15372 = cljs.core.seq.call(null, cljs.core.partition.call(null, 2, cljs.core.interleave.call(null, cljs.core.iterate.call(null, cljs.core.inc, 1), error_results)));
|
|
var chunk__15367_15373 = null;
|
|
var count__15368_15374 = 0;
|
|
var i__15369_15375 = 0;
|
|
while(true) {
|
|
if(i__15369_15375 < count__15368_15374) {
|
|
var vec__15370_15376 = cljs.core._nth.call(null, chunk__15367_15373, i__15369_15375);
|
|
var number_15377 = cljs.core.nth.call(null, vec__15370_15376, 0, null);
|
|
var result_15378 = cljs.core.nth.call(null, vec__15370_15376, 1, null);
|
|
cljs.core.println.call(null);
|
|
cljs.core.println.call(null, specljs.reporting.indent.call(null, 1, number_15377, ") ", specljs.reporting.red.call(null, [cljs.core.str(result_15378.exception)].join(""))));
|
|
cljs.core.println.call(null, specljs.reporting.grey.call(null, specljs.reporting.indent.call(null, 2.5, specljs.reporting.stack_trace_str.call(null, result_15378.exception))));
|
|
var G__15379 = seq__15366_15372;
|
|
var G__15380 = chunk__15367_15373;
|
|
var G__15381 = count__15368_15374;
|
|
var G__15382 = i__15369_15375 + 1;
|
|
seq__15366_15372 = G__15379;
|
|
chunk__15367_15373 = G__15380;
|
|
count__15368_15374 = G__15381;
|
|
i__15369_15375 = G__15382;
|
|
continue
|
|
}else {
|
|
var temp__4092__auto___15383 = cljs.core.seq.call(null, seq__15366_15372);
|
|
if(temp__4092__auto___15383) {
|
|
var seq__15366_15384__$1 = temp__4092__auto___15383;
|
|
if(cljs.core.chunked_seq_QMARK_.call(null, seq__15366_15384__$1)) {
|
|
var c__3037__auto___15385 = cljs.core.chunk_first.call(null, seq__15366_15384__$1);
|
|
var G__15386 = cljs.core.chunk_rest.call(null, seq__15366_15384__$1);
|
|
var G__15387 = c__3037__auto___15385;
|
|
var G__15388 = cljs.core.count.call(null, c__3037__auto___15385);
|
|
var G__15389 = 0;
|
|
seq__15366_15372 = G__15386;
|
|
chunk__15367_15373 = G__15387;
|
|
count__15368_15374 = G__15388;
|
|
i__15369_15375 = G__15389;
|
|
continue
|
|
}else {
|
|
var vec__15371_15390 = cljs.core.first.call(null, seq__15366_15384__$1);
|
|
var number_15391 = cljs.core.nth.call(null, vec__15371_15390, 0, null);
|
|
var result_15392 = cljs.core.nth.call(null, vec__15371_15390, 1, null);
|
|
cljs.core.println.call(null);
|
|
cljs.core.println.call(null, specljs.reporting.indent.call(null, 1, number_15391, ") ", specljs.reporting.red.call(null, [cljs.core.str(result_15392.exception)].join(""))));
|
|
cljs.core.println.call(null, specljs.reporting.grey.call(null, specljs.reporting.indent.call(null, 2.5, specljs.reporting.stack_trace_str.call(null, result_15392.exception))));
|
|
var G__15393 = cljs.core.next.call(null, seq__15366_15384__$1);
|
|
var G__15394 = null;
|
|
var G__15395 = 0;
|
|
var G__15396 = 0;
|
|
seq__15366_15372 = G__15393;
|
|
chunk__15367_15373 = G__15394;
|
|
count__15368_15374 = G__15395;
|
|
i__15369_15375 = G__15396;
|
|
continue
|
|
}
|
|
}else {
|
|
}
|
|
}
|
|
break
|
|
}
|
|
return cljs.core.flush.call(null)
|
|
};
|
|
specljs.report.progress.print_duration = function print_duration(results) {
|
|
cljs.core.println.call(null);
|
|
return cljs.core.println.call(null, "Finished in", specljs.platform.format_seconds.call(null, specljs.reporting.tally_time.call(null, results)), "seconds")
|
|
};
|
|
specljs.report.progress.color_fn_for = function color_fn_for(result_map) {
|
|
if(cljs.core.not_EQ_.call(null, 0, cljs.core.count.call(null, cljs.core.concat.call(null, (new cljs.core.Keyword("\ufdd0:fail")).call(null, result_map), (new cljs.core.Keyword("\ufdd0:error")).call(null, result_map))))) {
|
|
return specljs.reporting.red
|
|
}else {
|
|
if(cljs.core.not_EQ_.call(null, 0, cljs.core.count.call(null, (new cljs.core.Keyword("\ufdd0:pending")).call(null, result_map)))) {
|
|
return specljs.reporting.yellow
|
|
}else {
|
|
if("\ufdd0:else") {
|
|
return specljs.reporting.green
|
|
}else {
|
|
return null
|
|
}
|
|
}
|
|
}
|
|
};
|
|
specljs.report.progress.apply_pending_tally = function apply_pending_tally(report, tally) {
|
|
if((new cljs.core.Keyword("\ufdd0:pending")).call(null, tally) > 0) {
|
|
return cljs.core.conj.call(null, report, [cljs.core.str((new cljs.core.Keyword("\ufdd0:pending")).call(null, tally)), cljs.core.str(" pending")].join(""))
|
|
}else {
|
|
return report
|
|
}
|
|
};
|
|
specljs.report.progress.apply_error_tally = function apply_error_tally(report, tally) {
|
|
if((new cljs.core.Keyword("\ufdd0:error")).call(null, tally) > 0) {
|
|
return cljs.core.conj.call(null, report, [cljs.core.str((new cljs.core.Keyword("\ufdd0:error")).call(null, tally)), cljs.core.str(" errors")].join(""))
|
|
}else {
|
|
return report
|
|
}
|
|
};
|
|
specljs.report.progress.describe_counts_for = function describe_counts_for(result_map) {
|
|
var tally = cljs.core.zipmap.call(null, cljs.core.keys.call(null, result_map), cljs.core.map.call(null, cljs.core.count, cljs.core.vals.call(null, result_map)));
|
|
var always_on_counts = cljs.core.PersistentVector.fromArray([[cljs.core.str(cljs.core.apply.call(null, cljs.core._PLUS_, cljs.core.vals.call(null, tally))), cljs.core.str(" examples")].join(""), [cljs.core.str((new cljs.core.Keyword("\ufdd0:fail")).call(null, tally)), cljs.core.str(" failures")].join("")], true);
|
|
return clojure.string.join.call(null, ", ", specljs.report.progress.apply_error_tally.call(null, specljs.report.progress.apply_pending_tally.call(null, always_on_counts, tally), tally))
|
|
};
|
|
specljs.report.progress.print_tally = function print_tally(result_map) {
|
|
var color_fn = specljs.report.progress.color_fn_for.call(null, result_map);
|
|
return cljs.core.println.call(null, color_fn.call(null, specljs.report.progress.describe_counts_for.call(null, result_map)))
|
|
};
|
|
specljs.report.progress.print_summary = function print_summary(results) {
|
|
var result_map = specljs.results.categorize.call(null, results);
|
|
specljs.report.progress.print_failures.call(null, (new cljs.core.Keyword("\ufdd0:fail")).call(null, result_map));
|
|
specljs.report.progress.print_pendings.call(null, (new cljs.core.Keyword("\ufdd0:pending")).call(null, result_map));
|
|
specljs.report.progress.print_errors.call(null, (new cljs.core.Keyword("\ufdd0:error")).call(null, result_map));
|
|
specljs.report.progress.print_duration.call(null, results);
|
|
return specljs.report.progress.print_tally.call(null, result_map)
|
|
};
|
|
goog.provide("specljs.report.progress.ProgressReporter");
|
|
specljs.report.progress.ProgressReporter = function() {
|
|
};
|
|
specljs.report.progress.ProgressReporter.cljs$lang$type = true;
|
|
specljs.report.progress.ProgressReporter.cljs$lang$ctorStr = "specljs.report.progress/ProgressReporter";
|
|
specljs.report.progress.ProgressReporter.cljs$lang$ctorPrWriter = function(this__2847__auto__, writer__2848__auto__, opt__2849__auto__) {
|
|
return cljs.core._write.call(null, writer__2848__auto__, "specljs.report.progress/ProgressReporter")
|
|
};
|
|
specljs.report.progress.ProgressReporter.prototype.specljs$reporting$Reporter$ = true;
|
|
specljs.report.progress.ProgressReporter.prototype.specljs$reporting$Reporter$report_message$arity$2 = function(this$, message) {
|
|
var self__ = this;
|
|
cljs.core.println.call(null, message);
|
|
return cljs.core.flush.call(null)
|
|
};
|
|
specljs.report.progress.ProgressReporter.prototype.specljs$reporting$Reporter$report_description$arity$2 = function(this$, description) {
|
|
var self__ = this;
|
|
return null
|
|
};
|
|
specljs.report.progress.ProgressReporter.prototype.specljs$reporting$Reporter$report_pass$arity$2 = function(this$, result) {
|
|
var self__ = this;
|
|
cljs.core.print.call(null, specljs.reporting.green.call(null, "."));
|
|
return cljs.core.flush.call(null)
|
|
};
|
|
specljs.report.progress.ProgressReporter.prototype.specljs$reporting$Reporter$report_pending$arity$2 = function(this$, result) {
|
|
var self__ = this;
|
|
cljs.core.print.call(null, specljs.reporting.yellow.call(null, "*"));
|
|
return cljs.core.flush.call(null)
|
|
};
|
|
specljs.report.progress.ProgressReporter.prototype.specljs$reporting$Reporter$report_fail$arity$2 = function(this$, result) {
|
|
var self__ = this;
|
|
cljs.core.print.call(null, specljs.reporting.red.call(null, "F"));
|
|
return cljs.core.flush.call(null)
|
|
};
|
|
specljs.report.progress.ProgressReporter.prototype.specljs$reporting$Reporter$report_error$arity$2 = function(this$, result) {
|
|
var self__ = this;
|
|
cljs.core.print.call(null, specljs.reporting.red.call(null, "E"));
|
|
return cljs.core.flush.call(null)
|
|
};
|
|
specljs.report.progress.ProgressReporter.prototype.specljs$reporting$Reporter$report_runs$arity$2 = function(this$, results) {
|
|
var self__ = this;
|
|
cljs.core.println.call(null);
|
|
return specljs.report.progress.print_summary.call(null, results)
|
|
};
|
|
specljs.report.progress.__GT_ProgressReporter = function __GT_ProgressReporter() {
|
|
return new specljs.report.progress.ProgressReporter
|
|
};
|
|
specljs.report.progress.new_progress_reporter = function new_progress_reporter() {
|
|
return new specljs.report.progress.ProgressReporter
|
|
};
|
|
cljs.core.reset_BANG_.call(null, specljs.config.default_reporters, cljs.core.PersistentVector.fromArray([specljs.report.progress.new_progress_reporter.call(null)], true));
|
|
goog.provide("specljs.run.standard");
|
|
goog.require("cljs.core");
|
|
goog.require("specljs.tags");
|
|
goog.require("specljs.running");
|
|
goog.require("specljs.reporting");
|
|
goog.require("specljs.config");
|
|
goog.require("specljs.results");
|
|
goog.require("specljs.tags");
|
|
goog.require("specljs.running");
|
|
goog.require("specljs.results");
|
|
goog.require("specljs.reporting");
|
|
goog.require("specljs.report.progress");
|
|
goog.require("specljs.config");
|
|
goog.require("specljs.components");
|
|
specljs.run.standard.counter = cljs.core.atom.call(null, 0);
|
|
goog.provide("specljs.run.standard.StandardRunner");
|
|
specljs.run.standard.StandardRunner = function(num, descriptions, results) {
|
|
this.num = num;
|
|
this.descriptions = descriptions;
|
|
this.results = results
|
|
};
|
|
specljs.run.standard.StandardRunner.cljs$lang$type = true;
|
|
specljs.run.standard.StandardRunner.cljs$lang$ctorStr = "specljs.run.standard/StandardRunner";
|
|
specljs.run.standard.StandardRunner.cljs$lang$ctorPrWriter = function(this__2847__auto__, writer__2848__auto__, opt__2849__auto__) {
|
|
return cljs.core._write.call(null, writer__2848__auto__, "specljs.run.standard/StandardRunner")
|
|
};
|
|
specljs.run.standard.StandardRunner.prototype.specljs$running$Runner$ = true;
|
|
specljs.run.standard.StandardRunner.prototype.specljs$running$Runner$run_directories$arity$3 = function(this$, directories, reporters) {
|
|
var self__ = this;
|
|
return alert("StandardRunner.run-directories: I don't know how to do this.")
|
|
};
|
|
specljs.run.standard.StandardRunner.prototype.specljs$running$Runner$submit_description$arity$2 = function(this$, description) {
|
|
var self__ = this;
|
|
return cljs.core.swap_BANG_.call(null, self__.descriptions, cljs.core.conj, description)
|
|
};
|
|
specljs.run.standard.StandardRunner.prototype.specljs$running$Runner$run_description$arity$3 = function(this$, description, reporters) {
|
|
var self__ = this;
|
|
var run_results = specljs.running.do_description.call(null, description, reporters);
|
|
return cljs.core.swap_BANG_.call(null, self__.results, cljs.core.into, run_results)
|
|
};
|
|
specljs.run.standard.StandardRunner.prototype.specljs$running$Runner$run_and_report$arity$2 = function(this$, reporters) {
|
|
var self__ = this;
|
|
var seq__15803_15807 = cljs.core.seq.call(null, cljs.core.deref.call(null, self__.descriptions));
|
|
var chunk__15804_15808 = null;
|
|
var count__15805_15809 = 0;
|
|
var i__15806_15810 = 0;
|
|
while(true) {
|
|
if(i__15806_15810 < count__15805_15809) {
|
|
var description_15811 = cljs.core._nth.call(null, chunk__15804_15808, i__15806_15810);
|
|
this$.specljs$running$Runner$run_description$arity$3(this$, description_15811, reporters);
|
|
var G__15812 = seq__15803_15807;
|
|
var G__15813 = chunk__15804_15808;
|
|
var G__15814 = count__15805_15809;
|
|
var G__15815 = i__15806_15810 + 1;
|
|
seq__15803_15807 = G__15812;
|
|
chunk__15804_15808 = G__15813;
|
|
count__15805_15809 = G__15814;
|
|
i__15806_15810 = G__15815;
|
|
continue
|
|
}else {
|
|
var temp__4092__auto___15816 = cljs.core.seq.call(null, seq__15803_15807);
|
|
if(temp__4092__auto___15816) {
|
|
var seq__15803_15817__$1 = temp__4092__auto___15816;
|
|
if(cljs.core.chunked_seq_QMARK_.call(null, seq__15803_15817__$1)) {
|
|
var c__3037__auto___15818 = cljs.core.chunk_first.call(null, seq__15803_15817__$1);
|
|
var G__15819 = cljs.core.chunk_rest.call(null, seq__15803_15817__$1);
|
|
var G__15820 = c__3037__auto___15818;
|
|
var G__15821 = cljs.core.count.call(null, c__3037__auto___15818);
|
|
var G__15822 = 0;
|
|
seq__15803_15807 = G__15819;
|
|
chunk__15804_15808 = G__15820;
|
|
count__15805_15809 = G__15821;
|
|
i__15806_15810 = G__15822;
|
|
continue
|
|
}else {
|
|
var description_15823 = cljs.core.first.call(null, seq__15803_15817__$1);
|
|
this$.specljs$running$Runner$run_description$arity$3(this$, description_15823, reporters);
|
|
var G__15824 = cljs.core.next.call(null, seq__15803_15817__$1);
|
|
var G__15825 = null;
|
|
var G__15826 = 0;
|
|
var G__15827 = 0;
|
|
seq__15803_15807 = G__15824;
|
|
chunk__15804_15808 = G__15825;
|
|
count__15805_15809 = G__15826;
|
|
i__15806_15810 = G__15827;
|
|
continue
|
|
}
|
|
}else {
|
|
}
|
|
}
|
|
break
|
|
}
|
|
return specljs.reporting.report_runs_STAR_.call(null, reporters, cljs.core.deref.call(null, self__.results))
|
|
};
|
|
specljs.run.standard.__GT_StandardRunner = function __GT_StandardRunner(num, descriptions, results) {
|
|
return new specljs.run.standard.StandardRunner(num, descriptions, results)
|
|
};
|
|
specljs.components.Description.prototype.cljs$core$IPrintWithWriter$ = true;
|
|
specljs.components.Description.prototype.cljs$core$IPrintWithWriter$_pr_writer$arity$3 = function(x, writer, opts) {
|
|
return cljs.core._write.call(null, writer, cljs.core.format.call(null, "#<specljs.component.Description(name: %s)>", x.name))
|
|
};
|
|
specljs.run.standard.StandardRunner.prototype.cljs$core$IPrintWithWriter$ = true;
|
|
specljs.run.standard.StandardRunner.prototype.cljs$core$IPrintWithWriter$_pr_writer$arity$3 = function(x, writer, opts) {
|
|
cljs.core._write.call(null, writer, [cljs.core.str("#<specljs.run.standard.StandardRunner(num: "), cljs.core.str(x.num), cljs.core.str(", descriptions: ")].join(""));
|
|
cljs.core._pr_writer.call(null, cljs.core.deref.call(null, x.descriptions), writer, opts);
|
|
return cljs.core._write.call(null, writer, ")>")
|
|
};
|
|
specljs.run.standard.new_standard_runner = function new_standard_runner() {
|
|
return new specljs.run.standard.StandardRunner(cljs.core.swap_BANG_.call(null, specljs.run.standard.counter, cljs.core.inc), cljs.core.atom.call(null, cljs.core.PersistentVector.EMPTY), cljs.core.atom.call(null, cljs.core.PersistentVector.EMPTY))
|
|
};
|
|
cljs.core.reset_BANG_.call(null, specljs.config.default_runner_fn, specljs.run.standard.new_standard_runner);
|
|
cljs.core.reset_BANG_.call(null, specljs.config.default_runner, specljs.run.standard.new_standard_runner.call(null));
|
|
specljs.run.standard.armed = false;
|
|
specljs.run.standard.run_specs = function() {
|
|
var run_specs__delegate = function(configurations) {
|
|
if(cljs.core.truth_(specljs.run.standard.armed)) {
|
|
var config = cljs.core.apply.call(null, cljs.core.hash_map, configurations);
|
|
var config__$1 = cljs.core.merge.call(null, cljs.core.dissoc.call(null, specljs.config.default_config, "\ufdd0:runner"), config);
|
|
return specljs.config.with_config.call(null, config__$1, function() {
|
|
var temp__4090__auto___15828 = specljs.tags.describe_filter.call(null);
|
|
if(cljs.core.truth_(temp__4090__auto___15828)) {
|
|
var filter_msg_15829 = temp__4090__auto___15828;
|
|
specljs.reporting.report_message_STAR_.call(null, specljs.config.active_reporters.call(null), filter_msg_15829)
|
|
}else {
|
|
}
|
|
specljs.running.run_and_report.call(null, specljs.config.active_runner.call(null), specljs.config.active_reporters.call(null));
|
|
return specljs.results.fail_count.call(null, cljs.core.deref.call(null, specljs.config.active_runner.call(null).results))
|
|
})
|
|
}else {
|
|
return null
|
|
}
|
|
};
|
|
var run_specs = function(var_args) {
|
|
var configurations = null;
|
|
if(arguments.length > 0) {
|
|
configurations = cljs.core.array_seq(Array.prototype.slice.call(arguments, 0), 0)
|
|
}
|
|
return run_specs__delegate.call(this, configurations)
|
|
};
|
|
run_specs.cljs$lang$maxFixedArity = 0;
|
|
run_specs.cljs$lang$applyTo = function(arglist__15830) {
|
|
var configurations = cljs.core.seq(arglist__15830);
|
|
return run_specs__delegate(configurations)
|
|
};
|
|
run_specs.cljs$core$IFn$_invoke$arity$variadic = run_specs__delegate;
|
|
return run_specs
|
|
}();
|
|
goog.provide("specljs.report.silent");
|
|
goog.require("cljs.core");
|
|
goog.require("specljs.reporting");
|
|
goog.provide("specljs.report.silent.SilentReporter");
|
|
specljs.report.silent.SilentReporter = function(passes, fails, results) {
|
|
this.passes = passes;
|
|
this.fails = fails;
|
|
this.results = results
|
|
};
|
|
specljs.report.silent.SilentReporter.cljs$lang$type = true;
|
|
specljs.report.silent.SilentReporter.cljs$lang$ctorStr = "specljs.report.silent/SilentReporter";
|
|
specljs.report.silent.SilentReporter.cljs$lang$ctorPrWriter = function(this__2847__auto__, writer__2848__auto__, opt__2849__auto__) {
|
|
return cljs.core._write.call(null, writer__2848__auto__, "specljs.report.silent/SilentReporter")
|
|
};
|
|
specljs.report.silent.SilentReporter.prototype.specljs$reporting$Reporter$ = true;
|
|
specljs.report.silent.SilentReporter.prototype.specljs$reporting$Reporter$report_message$arity$2 = function(this$, message) {
|
|
var self__ = this;
|
|
return null
|
|
};
|
|
specljs.report.silent.SilentReporter.prototype.specljs$reporting$Reporter$report_description$arity$2 = function(this$, description) {
|
|
var self__ = this;
|
|
return null
|
|
};
|
|
specljs.report.silent.SilentReporter.prototype.specljs$reporting$Reporter$report_pass$arity$2 = function(this$, result) {
|
|
var self__ = this;
|
|
return null
|
|
};
|
|
specljs.report.silent.SilentReporter.prototype.specljs$reporting$Reporter$report_pending$arity$2 = function(this$, result) {
|
|
var self__ = this;
|
|
return null
|
|
};
|
|
specljs.report.silent.SilentReporter.prototype.specljs$reporting$Reporter$report_fail$arity$2 = function(this$, result) {
|
|
var self__ = this;
|
|
return null
|
|
};
|
|
specljs.report.silent.SilentReporter.prototype.specljs$reporting$Reporter$report_runs$arity$2 = function(this$, results__$1) {
|
|
var self__ = this;
|
|
return null
|
|
};
|
|
specljs.report.silent.SilentReporter.prototype.specljs$reporting$Reporter$report_error$arity$2 = function(this$, exception) {
|
|
var self__ = this;
|
|
return null
|
|
};
|
|
specljs.report.silent.__GT_SilentReporter = function __GT_SilentReporter(passes, fails, results) {
|
|
return new specljs.report.silent.SilentReporter(passes, fails, results)
|
|
};
|
|
specljs.report.silent.new_silent_reporter = function new_silent_reporter() {
|
|
return new specljs.report.silent.SilentReporter(cljs.core.atom.call(null, 0), cljs.core.atom.call(null, 0), cljs.core.atom.call(null, null))
|
|
};
|
|
goog.provide("specljs.report.documentation");
|
|
goog.require("cljs.core");
|
|
goog.require("specljs.report.progress");
|
|
goog.require("specljs.config");
|
|
goog.require("specljs.platform");
|
|
goog.require("specljs.reporting");
|
|
goog.require("specljs.results");
|
|
goog.require("specljs.results");
|
|
goog.require("specljs.reporting");
|
|
goog.require("specljs.report.progress");
|
|
goog.require("specljs.platform");
|
|
goog.require("specljs.config");
|
|
specljs.report.documentation.level_of = function level_of(component) {
|
|
var component__$1 = cljs.core.deref.call(null, component.parent);
|
|
var level = 0;
|
|
while(true) {
|
|
if(cljs.core.truth_(component__$1)) {
|
|
var G__15397 = cljs.core.deref.call(null, component__$1.parent);
|
|
var G__15398 = level + 1;
|
|
component__$1 = G__15397;
|
|
level = G__15398;
|
|
continue
|
|
}else {
|
|
return level
|
|
}
|
|
break
|
|
}
|
|
};
|
|
goog.provide("specljs.report.documentation.DocumentationReporter");
|
|
specljs.report.documentation.DocumentationReporter = function() {
|
|
};
|
|
specljs.report.documentation.DocumentationReporter.cljs$lang$type = true;
|
|
specljs.report.documentation.DocumentationReporter.cljs$lang$ctorStr = "specljs.report.documentation/DocumentationReporter";
|
|
specljs.report.documentation.DocumentationReporter.cljs$lang$ctorPrWriter = function(this__2847__auto__, writer__2848__auto__, opt__2849__auto__) {
|
|
return cljs.core._write.call(null, writer__2848__auto__, "specljs.report.documentation/DocumentationReporter")
|
|
};
|
|
specljs.report.documentation.DocumentationReporter.prototype.specljs$reporting$Reporter$ = true;
|
|
specljs.report.documentation.DocumentationReporter.prototype.specljs$reporting$Reporter$report_message$arity$2 = function(this$, message) {
|
|
var self__ = this;
|
|
cljs.core.println.call(null, message);
|
|
return cljs.core.flush.call(null)
|
|
};
|
|
specljs.report.documentation.DocumentationReporter.prototype.specljs$reporting$Reporter$report_description$arity$2 = function(this$, description) {
|
|
var self__ = this;
|
|
var level = specljs.report.documentation.level_of.call(null, description);
|
|
if(level === 0) {
|
|
cljs.core.println.call(null)
|
|
}else {
|
|
}
|
|
cljs.core.println.call(null, [cljs.core.str(specljs.reporting.indent.call(null, level)), cljs.core.str(description.name)].join(""));
|
|
return cljs.core.flush.call(null)
|
|
};
|
|
specljs.report.documentation.DocumentationReporter.prototype.specljs$reporting$Reporter$report_pass$arity$2 = function(this$, result) {
|
|
var self__ = this;
|
|
var characteristic = result.characteristic;
|
|
var level = specljs.report.documentation.level_of.call(null, characteristic);
|
|
cljs.core.println.call(null, specljs.reporting.green.call(null, specljs.reporting.indent.call(null, level - 1, "- ", characteristic.name)));
|
|
return cljs.core.flush.call(null)
|
|
};
|
|
specljs.report.documentation.DocumentationReporter.prototype.specljs$reporting$Reporter$report_pending$arity$2 = function(this$, result) {
|
|
var self__ = this;
|
|
var characteristic = result.characteristic;
|
|
var level = specljs.report.documentation.level_of.call(null, characteristic);
|
|
cljs.core.println.call(null, specljs.reporting.yellow.call(null, specljs.reporting.indent.call(null, level - 1, "- ", characteristic.name, " (PENDING: ", specljs.platform.error_message.call(null, result.exception), ")")));
|
|
return cljs.core.flush.call(null)
|
|
};
|
|
specljs.report.documentation.DocumentationReporter.prototype.specljs$reporting$Reporter$report_fail$arity$2 = function(this$, result) {
|
|
var self__ = this;
|
|
var characteristic = result.characteristic;
|
|
var level = specljs.report.documentation.level_of.call(null, characteristic);
|
|
cljs.core.println.call(null, specljs.reporting.red.call(null, specljs.reporting.indent.call(null, level - 1, "- ", characteristic.name, " (FAILED)")));
|
|
return cljs.core.flush.call(null)
|
|
};
|
|
specljs.report.documentation.DocumentationReporter.prototype.specljs$reporting$Reporter$report_error$arity$2 = function(this$, result) {
|
|
var self__ = this;
|
|
return cljs.core.println.call(null, specljs.reporting.red.call(null, result.exception.toString()))
|
|
};
|
|
specljs.report.documentation.DocumentationReporter.prototype.specljs$reporting$Reporter$report_runs$arity$2 = function(this$, results) {
|
|
var self__ = this;
|
|
return specljs.report.progress.print_summary.call(null, results)
|
|
};
|
|
specljs.report.documentation.__GT_DocumentationReporter = function __GT_DocumentationReporter() {
|
|
return new specljs.report.documentation.DocumentationReporter
|
|
};
|
|
specljs.report.documentation.new_documentation_reporter = function new_documentation_reporter() {
|
|
return new specljs.report.documentation.DocumentationReporter
|
|
};
|
|
goog.provide("specljs.version");
|
|
goog.require("cljs.core");
|
|
goog.require("clojure.string");
|
|
specljs.version.major = 2;
|
|
specljs.version.minor = 7;
|
|
specljs.version.tiny = 3;
|
|
specljs.version.snapshot = false;
|
|
specljs.version.string = [cljs.core.str(clojure.string.join.call(null, ".", cljs.core.filter.call(null, cljs.core.identity, cljs.core.PersistentVector.fromArray([specljs.version.major, specljs.version.minor, specljs.version.tiny], true)))), cljs.core.str(cljs.core.truth_(specljs.version.snapshot) ? "-SNAPSHOT" : "")].join("");
|
|
specljs.version.summary = [cljs.core.str("specljs "), cljs.core.str(specljs.version.string)].join("");
|
|
goog.provide("specljs.core");
|
|
goog.require("cljs.core");
|
|
goog.require("specljs.results");
|
|
goog.require("specljs.config");
|
|
goog.require("specljs.run.standard");
|
|
goog.require("specljs.report.silent");
|
|
goog.require("specljs.platform");
|
|
goog.require("specljs.reporting");
|
|
goog.require("specljs.running");
|
|
goog.require("specljs.components");
|
|
goog.require("specljs.tags");
|
|
goog.require("specljs.report.documentation");
|
|
goog.require("specljs.report.progress");
|
|
goog.require("specljs.version");
|
|
goog.provide("grub.state");
|
|
goog.require("cljs.core");
|
|
grub.state.grubs = cljs.core.atom.call(null, cljs.core.PersistentVector.EMPTY);
|
|
grub.state.get_grub_with_index = function get_grub_with_index(grubs, id) {
|
|
var grub_index = cljs.core.first.call(null, cljs.core.first.call(null, cljs.core.filter.call(null, function(p1__19446_SHARP_) {
|
|
return cljs.core._EQ_.call(null, (new cljs.core.Keyword("\ufdd0:_id")).call(null, cljs.core.second.call(null, p1__19446_SHARP_)), id)
|
|
}, cljs.core.map_indexed.call(null, cljs.core.vector, grubs))));
|
|
var grub__$1 = grubs.call(null, grub_index);
|
|
return cljs.core.PersistentVector.fromArray([grub_index, grub__$1], true)
|
|
};
|
|
grub.state.handle_event = function() {
|
|
var method_table__3094__auto__ = cljs.core.atom.call(null, cljs.core.PersistentArrayMap.EMPTY);
|
|
var prefer_table__3095__auto__ = cljs.core.atom.call(null, cljs.core.PersistentArrayMap.EMPTY);
|
|
var method_cache__3096__auto__ = cljs.core.atom.call(null, cljs.core.PersistentArrayMap.EMPTY);
|
|
var cached_hierarchy__3097__auto__ = cljs.core.atom.call(null, cljs.core.PersistentArrayMap.EMPTY);
|
|
var hierarchy__3098__auto__ = cljs.core.get.call(null, cljs.core.PersistentArrayMap.fromArray(["\ufdd0:default", "\ufdd0:unknown-event"], true), "\ufdd0:hierarchy", cljs.core.get_global_hierarchy.call(null));
|
|
return new cljs.core.MultiFn("handle-event", "\ufdd0:event", "\ufdd0:unknown-event", hierarchy__3098__auto__, method_table__3094__auto__, prefer_table__3095__auto__, method_cache__3096__auto__, cached_hierarchy__3097__auto__)
|
|
}();
|
|
cljs.core._add_method.call(null, grub.state.handle_event, "\ufdd0:add", function(event) {
|
|
var grub__$1 = cljs.core.select_keys.call(null, event, cljs.core.PersistentVector.fromArray(["\ufdd0:_id", "\ufdd0:grub", "\ufdd0:completed"], true));
|
|
return cljs.core.swap_BANG_.call(null, grub.state.grubs, function(current) {
|
|
return cljs.core.conj.call(null, current, grub__$1)
|
|
})
|
|
});
|
|
cljs.core._add_method.call(null, grub.state.handle_event, "\ufdd0:create", function(event) {
|
|
var grub__$1 = cljs.core.assoc.call(null, cljs.core.select_keys.call(null, event, cljs.core.PersistentVector.fromArray(["\ufdd0:_id", "\ufdd0:grub"], true)), "\ufdd0:completed", false);
|
|
return cljs.core.swap_BANG_.call(null, grub.state.grubs, function(current) {
|
|
return cljs.core.conj.call(null, current, grub__$1)
|
|
})
|
|
});
|
|
cljs.core._add_method.call(null, grub.state.handle_event, "\ufdd0:complete", function(event) {
|
|
return cljs.core.swap_BANG_.call(null, grub.state.grubs, function(current) {
|
|
var vec__19447 = grub.state.get_grub_with_index.call(null, current, (new cljs.core.Keyword("\ufdd0:_id")).call(null, event));
|
|
var grub_index = cljs.core.nth.call(null, vec__19447, 0, null);
|
|
var grub__$1 = cljs.core.nth.call(null, vec__19447, 1, null);
|
|
var completed_grub = cljs.core.assoc.call(null, grub__$1, "\ufdd0:completed", true);
|
|
return cljs.core.assoc.call(null, current, grub_index, completed_grub)
|
|
})
|
|
});
|
|
cljs.core._add_method.call(null, grub.state.handle_event, "\ufdd0:uncomplete", function(event) {
|
|
return cljs.core.swap_BANG_.call(null, grub.state.grubs, function(current) {
|
|
var vec__19448 = grub.state.get_grub_with_index.call(null, current, (new cljs.core.Keyword("\ufdd0:_id")).call(null, event));
|
|
var grub_index = cljs.core.nth.call(null, vec__19448, 0, null);
|
|
var grub__$1 = cljs.core.nth.call(null, vec__19448, 1, null);
|
|
var incomplete_grub = cljs.core.assoc.call(null, grub__$1, "\ufdd0:completed", false);
|
|
return cljs.core.assoc.call(null, current, grub_index, incomplete_grub)
|
|
})
|
|
});
|
|
cljs.core._add_method.call(null, grub.state.handle_event, "\ufdd0:delete", function(event) {
|
|
return cljs.core.swap_BANG_.call(null, grub.state.grubs, function(current) {
|
|
return cljs.core.vec.call(null, cljs.core.remove.call(null, function(p1__19449_SHARP_) {
|
|
return cljs.core._EQ_.call(null, (new cljs.core.Keyword("\ufdd0:_id")).call(null, p1__19449_SHARP_), (new cljs.core.Keyword("\ufdd0:_id")).call(null, event))
|
|
}, current))
|
|
})
|
|
});
|
|
cljs.core._add_method.call(null, grub.state.handle_event, "\ufdd0:unknown-event", function(event) {
|
|
return console.log(cljs.core.pr_str.call(null, "Cannot handle unknown event:"), cljs.core.pr_str.call(null, event))
|
|
});
|
|
goog.provide("cljs.core.async.impl.protocols");
|
|
goog.require("cljs.core");
|
|
cljs.core.async.impl.protocols.ReadPort = {};
|
|
cljs.core.async.impl.protocols.take_BANG_ = function take_BANG_(port, fn1_handler) {
|
|
if(function() {
|
|
var and__3941__auto__ = port;
|
|
if(and__3941__auto__) {
|
|
return port.cljs$core$async$impl$protocols$ReadPort$take_BANG_$arity$2
|
|
}else {
|
|
return and__3941__auto__
|
|
}
|
|
}()) {
|
|
return port.cljs$core$async$impl$protocols$ReadPort$take_BANG_$arity$2(port, fn1_handler)
|
|
}else {
|
|
var x__2906__auto__ = port == null ? null : port;
|
|
return function() {
|
|
var or__3943__auto__ = cljs.core.async.impl.protocols.take_BANG_[goog.typeOf(x__2906__auto__)];
|
|
if(or__3943__auto__) {
|
|
return or__3943__auto__
|
|
}else {
|
|
var or__3943__auto____$1 = cljs.core.async.impl.protocols.take_BANG_["_"];
|
|
if(or__3943__auto____$1) {
|
|
return or__3943__auto____$1
|
|
}else {
|
|
throw cljs.core.missing_protocol.call(null, "ReadPort.take!", port);
|
|
}
|
|
}
|
|
}().call(null, port, fn1_handler)
|
|
}
|
|
};
|
|
cljs.core.async.impl.protocols.WritePort = {};
|
|
cljs.core.async.impl.protocols.put_BANG_ = function put_BANG_(port, val, fn0_handler) {
|
|
if(function() {
|
|
var and__3941__auto__ = port;
|
|
if(and__3941__auto__) {
|
|
return port.cljs$core$async$impl$protocols$WritePort$put_BANG_$arity$3
|
|
}else {
|
|
return and__3941__auto__
|
|
}
|
|
}()) {
|
|
return port.cljs$core$async$impl$protocols$WritePort$put_BANG_$arity$3(port, val, fn0_handler)
|
|
}else {
|
|
var x__2906__auto__ = port == null ? null : port;
|
|
return function() {
|
|
var or__3943__auto__ = cljs.core.async.impl.protocols.put_BANG_[goog.typeOf(x__2906__auto__)];
|
|
if(or__3943__auto__) {
|
|
return or__3943__auto__
|
|
}else {
|
|
var or__3943__auto____$1 = cljs.core.async.impl.protocols.put_BANG_["_"];
|
|
if(or__3943__auto____$1) {
|
|
return or__3943__auto____$1
|
|
}else {
|
|
throw cljs.core.missing_protocol.call(null, "WritePort.put!", port);
|
|
}
|
|
}
|
|
}().call(null, port, val, fn0_handler)
|
|
}
|
|
};
|
|
cljs.core.async.impl.protocols.Channel = {};
|
|
cljs.core.async.impl.protocols.close_BANG_ = function close_BANG_(chan) {
|
|
if(function() {
|
|
var and__3941__auto__ = chan;
|
|
if(and__3941__auto__) {
|
|
return chan.cljs$core$async$impl$protocols$Channel$close_BANG_$arity$1
|
|
}else {
|
|
return and__3941__auto__
|
|
}
|
|
}()) {
|
|
return chan.cljs$core$async$impl$protocols$Channel$close_BANG_$arity$1(chan)
|
|
}else {
|
|
var x__2906__auto__ = chan == null ? null : chan;
|
|
return function() {
|
|
var or__3943__auto__ = cljs.core.async.impl.protocols.close_BANG_[goog.typeOf(x__2906__auto__)];
|
|
if(or__3943__auto__) {
|
|
return or__3943__auto__
|
|
}else {
|
|
var or__3943__auto____$1 = cljs.core.async.impl.protocols.close_BANG_["_"];
|
|
if(or__3943__auto____$1) {
|
|
return or__3943__auto____$1
|
|
}else {
|
|
throw cljs.core.missing_protocol.call(null, "Channel.close!", chan);
|
|
}
|
|
}
|
|
}().call(null, chan)
|
|
}
|
|
};
|
|
cljs.core.async.impl.protocols.Handler = {};
|
|
cljs.core.async.impl.protocols.active_QMARK_ = function active_QMARK_(h) {
|
|
if(function() {
|
|
var and__3941__auto__ = h;
|
|
if(and__3941__auto__) {
|
|
return h.cljs$core$async$impl$protocols$Handler$active_QMARK_$arity$1
|
|
}else {
|
|
return and__3941__auto__
|
|
}
|
|
}()) {
|
|
return h.cljs$core$async$impl$protocols$Handler$active_QMARK_$arity$1(h)
|
|
}else {
|
|
var x__2906__auto__ = h == null ? null : h;
|
|
return function() {
|
|
var or__3943__auto__ = cljs.core.async.impl.protocols.active_QMARK_[goog.typeOf(x__2906__auto__)];
|
|
if(or__3943__auto__) {
|
|
return or__3943__auto__
|
|
}else {
|
|
var or__3943__auto____$1 = cljs.core.async.impl.protocols.active_QMARK_["_"];
|
|
if(or__3943__auto____$1) {
|
|
return or__3943__auto____$1
|
|
}else {
|
|
throw cljs.core.missing_protocol.call(null, "Handler.active?", h);
|
|
}
|
|
}
|
|
}().call(null, h)
|
|
}
|
|
};
|
|
cljs.core.async.impl.protocols.commit = function commit(h) {
|
|
if(function() {
|
|
var and__3941__auto__ = h;
|
|
if(and__3941__auto__) {
|
|
return h.cljs$core$async$impl$protocols$Handler$commit$arity$1
|
|
}else {
|
|
return and__3941__auto__
|
|
}
|
|
}()) {
|
|
return h.cljs$core$async$impl$protocols$Handler$commit$arity$1(h)
|
|
}else {
|
|
var x__2906__auto__ = h == null ? null : h;
|
|
return function() {
|
|
var or__3943__auto__ = cljs.core.async.impl.protocols.commit[goog.typeOf(x__2906__auto__)];
|
|
if(or__3943__auto__) {
|
|
return or__3943__auto__
|
|
}else {
|
|
var or__3943__auto____$1 = cljs.core.async.impl.protocols.commit["_"];
|
|
if(or__3943__auto____$1) {
|
|
return or__3943__auto____$1
|
|
}else {
|
|
throw cljs.core.missing_protocol.call(null, "Handler.commit", h);
|
|
}
|
|
}
|
|
}().call(null, h)
|
|
}
|
|
};
|
|
cljs.core.async.impl.protocols.Buffer = {};
|
|
cljs.core.async.impl.protocols.full_QMARK_ = function full_QMARK_(b) {
|
|
if(function() {
|
|
var and__3941__auto__ = b;
|
|
if(and__3941__auto__) {
|
|
return b.cljs$core$async$impl$protocols$Buffer$full_QMARK_$arity$1
|
|
}else {
|
|
return and__3941__auto__
|
|
}
|
|
}()) {
|
|
return b.cljs$core$async$impl$protocols$Buffer$full_QMARK_$arity$1(b)
|
|
}else {
|
|
var x__2906__auto__ = b == null ? null : b;
|
|
return function() {
|
|
var or__3943__auto__ = cljs.core.async.impl.protocols.full_QMARK_[goog.typeOf(x__2906__auto__)];
|
|
if(or__3943__auto__) {
|
|
return or__3943__auto__
|
|
}else {
|
|
var or__3943__auto____$1 = cljs.core.async.impl.protocols.full_QMARK_["_"];
|
|
if(or__3943__auto____$1) {
|
|
return or__3943__auto____$1
|
|
}else {
|
|
throw cljs.core.missing_protocol.call(null, "Buffer.full?", b);
|
|
}
|
|
}
|
|
}().call(null, b)
|
|
}
|
|
};
|
|
cljs.core.async.impl.protocols.remove_BANG_ = function remove_BANG_(b) {
|
|
if(function() {
|
|
var and__3941__auto__ = b;
|
|
if(and__3941__auto__) {
|
|
return b.cljs$core$async$impl$protocols$Buffer$remove_BANG_$arity$1
|
|
}else {
|
|
return and__3941__auto__
|
|
}
|
|
}()) {
|
|
return b.cljs$core$async$impl$protocols$Buffer$remove_BANG_$arity$1(b)
|
|
}else {
|
|
var x__2906__auto__ = b == null ? null : b;
|
|
return function() {
|
|
var or__3943__auto__ = cljs.core.async.impl.protocols.remove_BANG_[goog.typeOf(x__2906__auto__)];
|
|
if(or__3943__auto__) {
|
|
return or__3943__auto__
|
|
}else {
|
|
var or__3943__auto____$1 = cljs.core.async.impl.protocols.remove_BANG_["_"];
|
|
if(or__3943__auto____$1) {
|
|
return or__3943__auto____$1
|
|
}else {
|
|
throw cljs.core.missing_protocol.call(null, "Buffer.remove!", b);
|
|
}
|
|
}
|
|
}().call(null, b)
|
|
}
|
|
};
|
|
cljs.core.async.impl.protocols.add_BANG_ = function add_BANG_(b, itm) {
|
|
if(function() {
|
|
var and__3941__auto__ = b;
|
|
if(and__3941__auto__) {
|
|
return b.cljs$core$async$impl$protocols$Buffer$add_BANG_$arity$2
|
|
}else {
|
|
return and__3941__auto__
|
|
}
|
|
}()) {
|
|
return b.cljs$core$async$impl$protocols$Buffer$add_BANG_$arity$2(b, itm)
|
|
}else {
|
|
var x__2906__auto__ = b == null ? null : b;
|
|
return function() {
|
|
var or__3943__auto__ = cljs.core.async.impl.protocols.add_BANG_[goog.typeOf(x__2906__auto__)];
|
|
if(or__3943__auto__) {
|
|
return or__3943__auto__
|
|
}else {
|
|
var or__3943__auto____$1 = cljs.core.async.impl.protocols.add_BANG_["_"];
|
|
if(or__3943__auto____$1) {
|
|
return or__3943__auto____$1
|
|
}else {
|
|
throw cljs.core.missing_protocol.call(null, "Buffer.add!", b);
|
|
}
|
|
}
|
|
}().call(null, b, itm)
|
|
}
|
|
};
|
|
goog.provide("cljs.core.async.impl.ioc_helpers");
|
|
goog.require("cljs.core");
|
|
goog.require("cljs.core.async.impl.protocols");
|
|
cljs.core.async.impl.ioc_helpers.FN_IDX = 0;
|
|
cljs.core.async.impl.ioc_helpers.STATE_IDX = 1;
|
|
cljs.core.async.impl.ioc_helpers.VALUE_IDX = 2;
|
|
cljs.core.async.impl.ioc_helpers.BINDINGS_IDX = 3;
|
|
cljs.core.async.impl.ioc_helpers.USER_START_IDX = 4;
|
|
cljs.core.async.impl.ioc_helpers.aset_object = function aset_object(arr, idx, o) {
|
|
return arr[idx][o]
|
|
};
|
|
cljs.core.async.impl.ioc_helpers.aget_object = function aget_object(arr, idx) {
|
|
return arr[idx]
|
|
};
|
|
cljs.core.async.impl.ioc_helpers.finished_QMARK_ = function finished_QMARK_(state_array) {
|
|
return state_array[cljs.core.async.impl.ioc_helpers.STATE_IDX] === "\ufdd0:finished"
|
|
};
|
|
cljs.core.async.impl.ioc_helpers.fn_handler = function fn_handler(f) {
|
|
if(void 0 === cljs.core.async.impl.ioc_helpers.t14438) {
|
|
goog.provide("cljs.core.async.impl.ioc_helpers.t14438");
|
|
cljs.core.async.impl.ioc_helpers.t14438 = function(f, fn_handler, meta14439) {
|
|
this.f = f;
|
|
this.fn_handler = fn_handler;
|
|
this.meta14439 = meta14439;
|
|
this.cljs$lang$protocol_mask$partition1$ = 0;
|
|
this.cljs$lang$protocol_mask$partition0$ = 393216
|
|
};
|
|
cljs.core.async.impl.ioc_helpers.t14438.cljs$lang$type = true;
|
|
cljs.core.async.impl.ioc_helpers.t14438.cljs$lang$ctorStr = "cljs.core.async.impl.ioc-helpers/t14438";
|
|
cljs.core.async.impl.ioc_helpers.t14438.cljs$lang$ctorPrWriter = function(this__2847__auto__, writer__2848__auto__, opt__2849__auto__) {
|
|
return cljs.core._write.call(null, writer__2848__auto__, "cljs.core.async.impl.ioc-helpers/t14438")
|
|
};
|
|
cljs.core.async.impl.ioc_helpers.t14438.prototype.cljs$core$async$impl$protocols$Handler$ = true;
|
|
cljs.core.async.impl.ioc_helpers.t14438.prototype.cljs$core$async$impl$protocols$Handler$active_QMARK_$arity$1 = function(_) {
|
|
var self__ = this;
|
|
return true
|
|
};
|
|
cljs.core.async.impl.ioc_helpers.t14438.prototype.cljs$core$async$impl$protocols$Handler$commit$arity$1 = function(_) {
|
|
var self__ = this;
|
|
return self__.f
|
|
};
|
|
cljs.core.async.impl.ioc_helpers.t14438.prototype.cljs$core$IMeta$_meta$arity$1 = function(_14440) {
|
|
var self__ = this;
|
|
return self__.meta14439
|
|
};
|
|
cljs.core.async.impl.ioc_helpers.t14438.prototype.cljs$core$IWithMeta$_with_meta$arity$2 = function(_14440, meta14439__$1) {
|
|
var self__ = this;
|
|
return new cljs.core.async.impl.ioc_helpers.t14438(self__.f, self__.fn_handler, meta14439__$1)
|
|
};
|
|
cljs.core.async.impl.ioc_helpers.__GT_t14438 = function __GT_t14438(f__$1, fn_handler__$1, meta14439) {
|
|
return new cljs.core.async.impl.ioc_helpers.t14438(f__$1, fn_handler__$1, meta14439)
|
|
}
|
|
}else {
|
|
}
|
|
return new cljs.core.async.impl.ioc_helpers.t14438(f, fn_handler, null)
|
|
};
|
|
cljs.core.async.impl.ioc_helpers.run_state_machine = function run_state_machine(state) {
|
|
return cljs.core.async.impl.ioc_helpers.aget_object.call(null, state, cljs.core.async.impl.ioc_helpers.FN_IDX).call(null, state)
|
|
};
|
|
cljs.core.async.impl.ioc_helpers.take_BANG_ = function take_BANG_(state, blk, c) {
|
|
var temp__4090__auto__ = cljs.core.async.impl.protocols.take_BANG_.call(null, c, cljs.core.async.impl.ioc_helpers.fn_handler.call(null, function(x) {
|
|
var statearr_14443_14445 = state;
|
|
statearr_14443_14445[cljs.core.async.impl.ioc_helpers.VALUE_IDX] = x;
|
|
statearr_14443_14445[cljs.core.async.impl.ioc_helpers.STATE_IDX] = blk;
|
|
return cljs.core.async.impl.ioc_helpers.run_state_machine.call(null, state)
|
|
}));
|
|
if(cljs.core.truth_(temp__4090__auto__)) {
|
|
var cb = temp__4090__auto__;
|
|
var statearr_14444_14446 = state;
|
|
statearr_14444_14446[cljs.core.async.impl.ioc_helpers.VALUE_IDX] = cljs.core.deref.call(null, cb);
|
|
statearr_14444_14446[cljs.core.async.impl.ioc_helpers.STATE_IDX] = blk;
|
|
return"\ufdd0:recur"
|
|
}else {
|
|
return null
|
|
}
|
|
};
|
|
cljs.core.async.impl.ioc_helpers.put_BANG_ = function put_BANG_(state, blk, c, val) {
|
|
var temp__4090__auto__ = cljs.core.async.impl.protocols.put_BANG_.call(null, c, val, cljs.core.async.impl.ioc_helpers.fn_handler.call(null, function() {
|
|
var statearr_14449_14451 = state;
|
|
statearr_14449_14451[cljs.core.async.impl.ioc_helpers.VALUE_IDX] = null;
|
|
statearr_14449_14451[cljs.core.async.impl.ioc_helpers.STATE_IDX] = blk;
|
|
return cljs.core.async.impl.ioc_helpers.run_state_machine.call(null, state)
|
|
}));
|
|
if(cljs.core.truth_(temp__4090__auto__)) {
|
|
var cb = temp__4090__auto__;
|
|
var statearr_14450_14452 = state;
|
|
statearr_14450_14452[cljs.core.async.impl.ioc_helpers.VALUE_IDX] = cljs.core.deref.call(null, cb);
|
|
statearr_14450_14452[cljs.core.async.impl.ioc_helpers.STATE_IDX] = blk;
|
|
return"\ufdd0:recur"
|
|
}else {
|
|
return null
|
|
}
|
|
};
|
|
cljs.core.async.impl.ioc_helpers.ioc_alts_BANG_ = function() {
|
|
var ioc_alts_BANG___delegate = function(state, cont_block, ports, p__14453) {
|
|
var map__14458 = p__14453;
|
|
var map__14458__$1 = cljs.core.seq_QMARK_.call(null, map__14458) ? cljs.core.apply.call(null, cljs.core.hash_map, map__14458) : map__14458;
|
|
var opts = map__14458__$1;
|
|
var statearr_14459_14462 = state;
|
|
statearr_14459_14462[cljs.core.async.impl.ioc_helpers.STATE_IDX] = cont_block;
|
|
var temp__4092__auto__ = cljs.core.async.do_alts.call(null, function(val) {
|
|
var statearr_14460_14463 = state;
|
|
statearr_14460_14463[cljs.core.async.impl.ioc_helpers.VALUE_IDX] = val;
|
|
return cljs.core.async.impl.ioc_helpers.run_state_machine.call(null, state)
|
|
}, ports, opts);
|
|
if(cljs.core.truth_(temp__4092__auto__)) {
|
|
var cb = temp__4092__auto__;
|
|
var statearr_14461_14464 = state;
|
|
statearr_14461_14464[cljs.core.async.impl.ioc_helpers.VALUE_IDX] = cljs.core.deref.call(null, cb);
|
|
return"\ufdd0:recur"
|
|
}else {
|
|
return null
|
|
}
|
|
};
|
|
var ioc_alts_BANG_ = function(state, cont_block, ports, var_args) {
|
|
var p__14453 = null;
|
|
if(arguments.length > 3) {
|
|
p__14453 = cljs.core.array_seq(Array.prototype.slice.call(arguments, 3), 0)
|
|
}
|
|
return ioc_alts_BANG___delegate.call(this, state, cont_block, ports, p__14453)
|
|
};
|
|
ioc_alts_BANG_.cljs$lang$maxFixedArity = 3;
|
|
ioc_alts_BANG_.cljs$lang$applyTo = function(arglist__14465) {
|
|
var state = cljs.core.first(arglist__14465);
|
|
arglist__14465 = cljs.core.next(arglist__14465);
|
|
var cont_block = cljs.core.first(arglist__14465);
|
|
arglist__14465 = cljs.core.next(arglist__14465);
|
|
var ports = cljs.core.first(arglist__14465);
|
|
var p__14453 = cljs.core.rest(arglist__14465);
|
|
return ioc_alts_BANG___delegate(state, cont_block, ports, p__14453)
|
|
};
|
|
ioc_alts_BANG_.cljs$core$IFn$_invoke$arity$variadic = ioc_alts_BANG___delegate;
|
|
return ioc_alts_BANG_
|
|
}();
|
|
cljs.core.async.impl.ioc_helpers.return_chan = function return_chan(state, value) {
|
|
var c = state[cljs.core.async.impl.ioc_helpers.USER_START_IDX];
|
|
if(value == null) {
|
|
}else {
|
|
cljs.core.async.impl.protocols.put_BANG_.call(null, c, value, cljs.core.async.impl.ioc_helpers.fn_handler.call(null, function() {
|
|
return null
|
|
}))
|
|
}
|
|
cljs.core.async.impl.protocols.close_BANG_.call(null, c);
|
|
return c
|
|
};
|
|
goog.provide("cljs.core.async.impl.buffers");
|
|
goog.require("cljs.core");
|
|
goog.require("cljs.core.async.impl.protocols");
|
|
goog.provide("cljs.core.async.impl.buffers.FixedBuffer");
|
|
cljs.core.async.impl.buffers.FixedBuffer = function(buf, n) {
|
|
this.buf = buf;
|
|
this.n = n;
|
|
this.cljs$lang$protocol_mask$partition1$ = 0;
|
|
this.cljs$lang$protocol_mask$partition0$ = 2
|
|
};
|
|
cljs.core.async.impl.buffers.FixedBuffer.cljs$lang$type = true;
|
|
cljs.core.async.impl.buffers.FixedBuffer.cljs$lang$ctorStr = "cljs.core.async.impl.buffers/FixedBuffer";
|
|
cljs.core.async.impl.buffers.FixedBuffer.cljs$lang$ctorPrWriter = function(this__2847__auto__, writer__2848__auto__, opt__2849__auto__) {
|
|
return cljs.core._write.call(null, writer__2848__auto__, "cljs.core.async.impl.buffers/FixedBuffer")
|
|
};
|
|
cljs.core.async.impl.buffers.FixedBuffer.prototype.cljs$core$ICounted$_count$arity$1 = function(this$) {
|
|
var self__ = this;
|
|
return self__.buf.length
|
|
};
|
|
cljs.core.async.impl.buffers.FixedBuffer.prototype.cljs$core$async$impl$protocols$Buffer$ = true;
|
|
cljs.core.async.impl.buffers.FixedBuffer.prototype.cljs$core$async$impl$protocols$Buffer$full_QMARK_$arity$1 = function(this$) {
|
|
var self__ = this;
|
|
return cljs.core._EQ_.call(null, self__.buf.length, self__.n)
|
|
};
|
|
cljs.core.async.impl.buffers.FixedBuffer.prototype.cljs$core$async$impl$protocols$Buffer$remove_BANG_$arity$1 = function(this$) {
|
|
var self__ = this;
|
|
return self__.buf.pop()
|
|
};
|
|
cljs.core.async.impl.buffers.FixedBuffer.prototype.cljs$core$async$impl$protocols$Buffer$add_BANG_$arity$2 = function(this$, itm) {
|
|
var self__ = this;
|
|
if(cljs.core.not.call(null, this$.cljs$core$async$impl$protocols$Buffer$full_QMARK_$arity$1(this$))) {
|
|
}else {
|
|
throw new Error([cljs.core.str("Assert failed: "), cljs.core.str("Can't add to a full buffer"), cljs.core.str("\n"), cljs.core.str(cljs.core.pr_str.call(null, cljs.core.list(new cljs.core.Symbol(null, "not", "not", -1640422260, null), cljs.core.list(new cljs.core.Symbol("impl", "full?", "impl/full?", -1337857039, null), new cljs.core.Symbol(null, "this", "this", -1636972457, null)))))].join(""));
|
|
}
|
|
return self__.buf.unshift(itm)
|
|
};
|
|
cljs.core.async.impl.buffers.__GT_FixedBuffer = function __GT_FixedBuffer(buf, n) {
|
|
return new cljs.core.async.impl.buffers.FixedBuffer(buf, n)
|
|
};
|
|
cljs.core.async.impl.buffers.fixed_buffer = function fixed_buffer(n) {
|
|
return new cljs.core.async.impl.buffers.FixedBuffer(new Array(0), n)
|
|
};
|
|
goog.provide("cljs.core.async.impl.buffers.DroppingBuffer");
|
|
cljs.core.async.impl.buffers.DroppingBuffer = function(buf, n) {
|
|
this.buf = buf;
|
|
this.n = n;
|
|
this.cljs$lang$protocol_mask$partition1$ = 0;
|
|
this.cljs$lang$protocol_mask$partition0$ = 2
|
|
};
|
|
cljs.core.async.impl.buffers.DroppingBuffer.cljs$lang$type = true;
|
|
cljs.core.async.impl.buffers.DroppingBuffer.cljs$lang$ctorStr = "cljs.core.async.impl.buffers/DroppingBuffer";
|
|
cljs.core.async.impl.buffers.DroppingBuffer.cljs$lang$ctorPrWriter = function(this__2847__auto__, writer__2848__auto__, opt__2849__auto__) {
|
|
return cljs.core._write.call(null, writer__2848__auto__, "cljs.core.async.impl.buffers/DroppingBuffer")
|
|
};
|
|
cljs.core.async.impl.buffers.DroppingBuffer.prototype.cljs$core$ICounted$_count$arity$1 = function(this$) {
|
|
var self__ = this;
|
|
return self__.buf.length
|
|
};
|
|
cljs.core.async.impl.buffers.DroppingBuffer.prototype.cljs$core$async$impl$protocols$Buffer$ = true;
|
|
cljs.core.async.impl.buffers.DroppingBuffer.prototype.cljs$core$async$impl$protocols$Buffer$full_QMARK_$arity$1 = function(this$) {
|
|
var self__ = this;
|
|
return false
|
|
};
|
|
cljs.core.async.impl.buffers.DroppingBuffer.prototype.cljs$core$async$impl$protocols$Buffer$remove_BANG_$arity$1 = function(this$) {
|
|
var self__ = this;
|
|
return self__.buf.pop()
|
|
};
|
|
cljs.core.async.impl.buffers.DroppingBuffer.prototype.cljs$core$async$impl$protocols$Buffer$add_BANG_$arity$2 = function(this$, itm) {
|
|
var self__ = this;
|
|
if(cljs.core._EQ_.call(null, self__.buf.length, self__.n)) {
|
|
return null
|
|
}else {
|
|
return self__.buf.unshift(itm)
|
|
}
|
|
};
|
|
cljs.core.async.impl.buffers.__GT_DroppingBuffer = function __GT_DroppingBuffer(buf, n) {
|
|
return new cljs.core.async.impl.buffers.DroppingBuffer(buf, n)
|
|
};
|
|
cljs.core.async.impl.buffers.dropping_buffer = function dropping_buffer(n) {
|
|
return new cljs.core.async.impl.buffers.DroppingBuffer(new Array(0), n)
|
|
};
|
|
goog.provide("cljs.core.async.impl.buffers.SlidingBuffer");
|
|
cljs.core.async.impl.buffers.SlidingBuffer = function(buf, n) {
|
|
this.buf = buf;
|
|
this.n = n;
|
|
this.cljs$lang$protocol_mask$partition1$ = 0;
|
|
this.cljs$lang$protocol_mask$partition0$ = 2
|
|
};
|
|
cljs.core.async.impl.buffers.SlidingBuffer.cljs$lang$type = true;
|
|
cljs.core.async.impl.buffers.SlidingBuffer.cljs$lang$ctorStr = "cljs.core.async.impl.buffers/SlidingBuffer";
|
|
cljs.core.async.impl.buffers.SlidingBuffer.cljs$lang$ctorPrWriter = function(this__2847__auto__, writer__2848__auto__, opt__2849__auto__) {
|
|
return cljs.core._write.call(null, writer__2848__auto__, "cljs.core.async.impl.buffers/SlidingBuffer")
|
|
};
|
|
cljs.core.async.impl.buffers.SlidingBuffer.prototype.cljs$core$ICounted$_count$arity$1 = function(this$) {
|
|
var self__ = this;
|
|
return self__.buf.length
|
|
};
|
|
cljs.core.async.impl.buffers.SlidingBuffer.prototype.cljs$core$async$impl$protocols$Buffer$ = true;
|
|
cljs.core.async.impl.buffers.SlidingBuffer.prototype.cljs$core$async$impl$protocols$Buffer$full_QMARK_$arity$1 = function(this$) {
|
|
var self__ = this;
|
|
return false
|
|
};
|
|
cljs.core.async.impl.buffers.SlidingBuffer.prototype.cljs$core$async$impl$protocols$Buffer$remove_BANG_$arity$1 = function(this$) {
|
|
var self__ = this;
|
|
return self__.buf.pop()
|
|
};
|
|
cljs.core.async.impl.buffers.SlidingBuffer.prototype.cljs$core$async$impl$protocols$Buffer$add_BANG_$arity$2 = function(this$, itm) {
|
|
var self__ = this;
|
|
if(cljs.core._EQ_.call(null, self__.buf.length, self__.n)) {
|
|
this$.cljs$core$async$impl$protocols$Buffer$remove_BANG_$arity$1(this$)
|
|
}else {
|
|
}
|
|
return self__.buf.unshift(itm)
|
|
};
|
|
cljs.core.async.impl.buffers.__GT_SlidingBuffer = function __GT_SlidingBuffer(buf, n) {
|
|
return new cljs.core.async.impl.buffers.SlidingBuffer(buf, n)
|
|
};
|
|
cljs.core.async.impl.buffers.sliding_buffer = function sliding_buffer(n) {
|
|
return new cljs.core.async.impl.buffers.SlidingBuffer(new Array(0), n)
|
|
};
|
|
goog.provide("cljs.core.async.impl.dispatch");
|
|
goog.require("cljs.core");
|
|
cljs.core.async.impl.dispatch.message_channel = null;
|
|
cljs.core.async.impl.dispatch.tasks = null;
|
|
if(typeof MessageChannel !== "undefined") {
|
|
cljs.core.async.impl.dispatch.message_channel = new MessageChannel;
|
|
cljs.core.async.impl.dispatch.tasks = [];
|
|
cljs.core.async.impl.dispatch.message_channel.port1.onmessage = function(msg) {
|
|
return cljs.core.async.impl.dispatch.tasks.shift().call(null)
|
|
}
|
|
}else {
|
|
}
|
|
cljs.core.async.impl.dispatch.queue_task = function queue_task(f) {
|
|
cljs.core.async.impl.dispatch.tasks.push(f);
|
|
return cljs.core.async.impl.dispatch.message_channel.port2.postMessage(0)
|
|
};
|
|
cljs.core.async.impl.dispatch.run = function run(f) {
|
|
if(typeof MessageChannel !== "undefined") {
|
|
return cljs.core.async.impl.dispatch.queue_task.call(null, f)
|
|
}else {
|
|
if(typeof setImmediate !== "undefined") {
|
|
return setImmediate(f)
|
|
}else {
|
|
if("\ufdd0:else") {
|
|
return setTimeout(f, 0)
|
|
}else {
|
|
return null
|
|
}
|
|
}
|
|
}
|
|
};
|
|
cljs.core.async.impl.dispatch.queue_delay = function queue_delay(f, delay) {
|
|
return setTimeout(f, delay)
|
|
};
|
|
goog.provide("cljs.core.async.impl.channels");
|
|
goog.require("cljs.core");
|
|
goog.require("cljs.core.async.impl.dispatch");
|
|
goog.require("cljs.core.async.impl.protocols");
|
|
cljs.core.async.impl.channels.box = function box(val) {
|
|
if(void 0 === cljs.core.async.impl.channels.t14413) {
|
|
goog.provide("cljs.core.async.impl.channels.t14413");
|
|
cljs.core.async.impl.channels.t14413 = function(val, box, meta14414) {
|
|
this.val = val;
|
|
this.box = box;
|
|
this.meta14414 = meta14414;
|
|
this.cljs$lang$protocol_mask$partition1$ = 0;
|
|
this.cljs$lang$protocol_mask$partition0$ = 425984
|
|
};
|
|
cljs.core.async.impl.channels.t14413.cljs$lang$type = true;
|
|
cljs.core.async.impl.channels.t14413.cljs$lang$ctorStr = "cljs.core.async.impl.channels/t14413";
|
|
cljs.core.async.impl.channels.t14413.cljs$lang$ctorPrWriter = function(this__2847__auto__, writer__2848__auto__, opt__2849__auto__) {
|
|
return cljs.core._write.call(null, writer__2848__auto__, "cljs.core.async.impl.channels/t14413")
|
|
};
|
|
cljs.core.async.impl.channels.t14413.prototype.cljs$core$IDeref$_deref$arity$1 = function(_) {
|
|
var self__ = this;
|
|
return self__.val
|
|
};
|
|
cljs.core.async.impl.channels.t14413.prototype.cljs$core$IMeta$_meta$arity$1 = function(_14415) {
|
|
var self__ = this;
|
|
return self__.meta14414
|
|
};
|
|
cljs.core.async.impl.channels.t14413.prototype.cljs$core$IWithMeta$_with_meta$arity$2 = function(_14415, meta14414__$1) {
|
|
var self__ = this;
|
|
return new cljs.core.async.impl.channels.t14413(self__.val, self__.box, meta14414__$1)
|
|
};
|
|
cljs.core.async.impl.channels.__GT_t14413 = function __GT_t14413(val__$1, box__$1, meta14414) {
|
|
return new cljs.core.async.impl.channels.t14413(val__$1, box__$1, meta14414)
|
|
}
|
|
}else {
|
|
}
|
|
return new cljs.core.async.impl.channels.t14413(val, box, null)
|
|
};
|
|
cljs.core.async.impl.channels.MMC = {};
|
|
cljs.core.async.impl.channels.cleanup = function cleanup(_) {
|
|
if(function() {
|
|
var and__3941__auto__ = _;
|
|
if(and__3941__auto__) {
|
|
return _.cljs$core$async$impl$channels$MMC$cleanup$arity$1
|
|
}else {
|
|
return and__3941__auto__
|
|
}
|
|
}()) {
|
|
return _.cljs$core$async$impl$channels$MMC$cleanup$arity$1(_)
|
|
}else {
|
|
var x__2906__auto__ = _ == null ? null : _;
|
|
return function() {
|
|
var or__3943__auto__ = cljs.core.async.impl.channels.cleanup[goog.typeOf(x__2906__auto__)];
|
|
if(or__3943__auto__) {
|
|
return or__3943__auto__
|
|
}else {
|
|
var or__3943__auto____$1 = cljs.core.async.impl.channels.cleanup["_"];
|
|
if(or__3943__auto____$1) {
|
|
return or__3943__auto____$1
|
|
}else {
|
|
throw cljs.core.missing_protocol.call(null, "MMC.cleanup", _);
|
|
}
|
|
}
|
|
}().call(null, _)
|
|
}
|
|
};
|
|
goog.provide("cljs.core.async.impl.channels.ManyToManyChannel");
|
|
cljs.core.async.impl.channels.ManyToManyChannel = function(takes, puts, buf, closed) {
|
|
this.takes = takes;
|
|
this.puts = puts;
|
|
this.buf = buf;
|
|
this.closed = closed
|
|
};
|
|
cljs.core.async.impl.channels.ManyToManyChannel.cljs$lang$type = true;
|
|
cljs.core.async.impl.channels.ManyToManyChannel.cljs$lang$ctorStr = "cljs.core.async.impl.channels/ManyToManyChannel";
|
|
cljs.core.async.impl.channels.ManyToManyChannel.cljs$lang$ctorPrWriter = function(this__2847__auto__, writer__2848__auto__, opt__2849__auto__) {
|
|
return cljs.core._write.call(null, writer__2848__auto__, "cljs.core.async.impl.channels/ManyToManyChannel")
|
|
};
|
|
cljs.core.async.impl.channels.ManyToManyChannel.prototype.cljs$core$async$impl$protocols$Channel$ = true;
|
|
cljs.core.async.impl.channels.ManyToManyChannel.prototype.cljs$core$async$impl$protocols$Channel$close_BANG_$arity$1 = function(this$) {
|
|
var self__ = this;
|
|
this$.cljs$core$async$impl$channels$MMC$cleanup$arity$1(this$);
|
|
if(cljs.core.truth_(cljs.core.deref.call(null, self__.closed))) {
|
|
return null
|
|
}else {
|
|
cljs.core.reset_BANG_.call(null, self__.closed, true);
|
|
var n__3084__auto___14420 = self__.takes.length;
|
|
var idx_14421 = 0;
|
|
while(true) {
|
|
if(idx_14421 < n__3084__auto___14420) {
|
|
var taker_14422 = self__.takes[idx_14421];
|
|
var take_cb_14423 = function() {
|
|
var and__3941__auto__ = cljs.core.async.impl.protocols.active_QMARK_.call(null, taker_14422);
|
|
if(cljs.core.truth_(and__3941__auto__)) {
|
|
return cljs.core.async.impl.protocols.commit.call(null, taker_14422)
|
|
}else {
|
|
return and__3941__auto__
|
|
}
|
|
}();
|
|
if(cljs.core.truth_(take_cb_14423)) {
|
|
cljs.core.async.impl.dispatch.run.call(null, function(idx_14421, taker_14422, take_cb_14423) {
|
|
return function() {
|
|
return take_cb_14423.call(null, null)
|
|
}
|
|
}(idx_14421, taker_14422, take_cb_14423))
|
|
}else {
|
|
}
|
|
var G__14424 = idx_14421 + 1;
|
|
idx_14421 = G__14424;
|
|
continue
|
|
}else {
|
|
}
|
|
break
|
|
}
|
|
return null
|
|
}
|
|
};
|
|
cljs.core.async.impl.channels.ManyToManyChannel.prototype.cljs$core$async$impl$protocols$ReadPort$ = true;
|
|
cljs.core.async.impl.channels.ManyToManyChannel.prototype.cljs$core$async$impl$protocols$ReadPort$take_BANG_$arity$2 = function(this$, handler) {
|
|
var self__ = this;
|
|
this$.cljs$core$async$impl$channels$MMC$cleanup$arity$1(this$);
|
|
if(cljs.core.truth_(function() {
|
|
var and__3941__auto__ = self__.buf;
|
|
if(cljs.core.truth_(and__3941__auto__)) {
|
|
return cljs.core.count.call(null, self__.buf) > 0
|
|
}else {
|
|
return and__3941__auto__
|
|
}
|
|
}())) {
|
|
var temp__4090__auto__ = function() {
|
|
var and__3941__auto__ = cljs.core.async.impl.protocols.active_QMARK_.call(null, handler);
|
|
if(cljs.core.truth_(and__3941__auto__)) {
|
|
return cljs.core.async.impl.protocols.commit.call(null, handler)
|
|
}else {
|
|
return and__3941__auto__
|
|
}
|
|
}();
|
|
if(cljs.core.truth_(temp__4090__auto__)) {
|
|
var take_cb = temp__4090__auto__;
|
|
return cljs.core.async.impl.channels.box.call(null, cljs.core.async.impl.protocols.remove_BANG_.call(null, self__.buf))
|
|
}else {
|
|
return null
|
|
}
|
|
}else {
|
|
var vec__14416 = function() {
|
|
var put_idx = 0;
|
|
while(true) {
|
|
if(put_idx < self__.puts.length) {
|
|
var vec__14417 = self__.puts[put_idx];
|
|
var putter = cljs.core.nth.call(null, vec__14417, 0, null);
|
|
var val = cljs.core.nth.call(null, vec__14417, 1, null);
|
|
var temp__4090__auto__ = cljs.core.truth_(function() {
|
|
var and__3941__auto__ = cljs.core.async.impl.protocols.active_QMARK_.call(null, handler);
|
|
if(cljs.core.truth_(and__3941__auto__)) {
|
|
return cljs.core.async.impl.protocols.active_QMARK_.call(null, putter)
|
|
}else {
|
|
return and__3941__auto__
|
|
}
|
|
}()) ? cljs.core.PersistentVector.fromArray([cljs.core.async.impl.protocols.commit.call(null, handler), cljs.core.async.impl.protocols.commit.call(null, putter), val], true) : null;
|
|
if(cljs.core.truth_(temp__4090__auto__)) {
|
|
var ret = temp__4090__auto__;
|
|
self__.puts.splice(put_idx, 1);
|
|
return ret
|
|
}else {
|
|
var G__14425 = put_idx + 1;
|
|
put_idx = G__14425;
|
|
continue
|
|
}
|
|
}else {
|
|
return null
|
|
}
|
|
break
|
|
}
|
|
}();
|
|
var take_cb = cljs.core.nth.call(null, vec__14416, 0, null);
|
|
var put_cb = cljs.core.nth.call(null, vec__14416, 1, null);
|
|
var val = cljs.core.nth.call(null, vec__14416, 2, null);
|
|
if(cljs.core.truth_(function() {
|
|
var and__3941__auto__ = put_cb;
|
|
if(cljs.core.truth_(and__3941__auto__)) {
|
|
return take_cb
|
|
}else {
|
|
return and__3941__auto__
|
|
}
|
|
}())) {
|
|
cljs.core.async.impl.dispatch.run.call(null, put_cb);
|
|
return cljs.core.async.impl.channels.box.call(null, val)
|
|
}else {
|
|
if(cljs.core.truth_(cljs.core.deref.call(null, self__.closed))) {
|
|
var temp__4090__auto__ = function() {
|
|
var and__3941__auto__ = cljs.core.async.impl.protocols.active_QMARK_.call(null, handler);
|
|
if(cljs.core.truth_(and__3941__auto__)) {
|
|
return cljs.core.async.impl.protocols.commit.call(null, handler)
|
|
}else {
|
|
return and__3941__auto__
|
|
}
|
|
}();
|
|
if(cljs.core.truth_(temp__4090__auto__)) {
|
|
var take_cb__$1 = temp__4090__auto__;
|
|
return cljs.core.async.impl.channels.box.call(null, null)
|
|
}else {
|
|
return null
|
|
}
|
|
}else {
|
|
self__.takes.unshift(handler);
|
|
return null
|
|
}
|
|
}
|
|
}
|
|
};
|
|
cljs.core.async.impl.channels.ManyToManyChannel.prototype.cljs$core$async$impl$protocols$WritePort$ = true;
|
|
cljs.core.async.impl.channels.ManyToManyChannel.prototype.cljs$core$async$impl$protocols$WritePort$put_BANG_$arity$3 = function(this$, val, handler) {
|
|
var self__ = this;
|
|
if(!(val == null)) {
|
|
}else {
|
|
throw new Error([cljs.core.str("Assert failed: "), cljs.core.str("Can't put nil in on a channel"), cljs.core.str("\n"), cljs.core.str(cljs.core.pr_str.call(null, cljs.core.list(new cljs.core.Symbol(null, "not", "not", -1640422260, null), cljs.core.list(new cljs.core.Symbol(null, "nil?", "nil?", -1637150201, null), new cljs.core.Symbol(null, "val", "val", -1640415014, null)))))].join(""));
|
|
}
|
|
this$.cljs$core$async$impl$channels$MMC$cleanup$arity$1(this$);
|
|
if(cljs.core.truth_(cljs.core.deref.call(null, self__.closed))) {
|
|
return cljs.core.async.impl.channels.box.call(null, null)
|
|
}else {
|
|
var vec__14418 = function() {
|
|
var taker_idx = 0;
|
|
while(true) {
|
|
if(taker_idx < self__.takes.length) {
|
|
var taker = self__.takes[taker_idx];
|
|
if(cljs.core.truth_(function() {
|
|
var and__3941__auto__ = cljs.core.async.impl.protocols.active_QMARK_.call(null, taker);
|
|
if(cljs.core.truth_(and__3941__auto__)) {
|
|
return cljs.core.async.impl.protocols.active_QMARK_.call(null, handler)
|
|
}else {
|
|
return and__3941__auto__
|
|
}
|
|
}())) {
|
|
self__.takes.splice(taker_idx, 1);
|
|
return cljs.core.PersistentVector.fromArray([cljs.core.async.impl.protocols.commit.call(null, handler), cljs.core.async.impl.protocols.commit.call(null, taker)], true)
|
|
}else {
|
|
var G__14426 = taker_idx + 1;
|
|
taker_idx = G__14426;
|
|
continue
|
|
}
|
|
}else {
|
|
return null
|
|
}
|
|
break
|
|
}
|
|
}();
|
|
var put_cb = cljs.core.nth.call(null, vec__14418, 0, null);
|
|
var take_cb = cljs.core.nth.call(null, vec__14418, 1, null);
|
|
if(cljs.core.truth_(function() {
|
|
var and__3941__auto__ = put_cb;
|
|
if(cljs.core.truth_(and__3941__auto__)) {
|
|
return take_cb
|
|
}else {
|
|
return and__3941__auto__
|
|
}
|
|
}())) {
|
|
cljs.core.async.impl.dispatch.run.call(null, function() {
|
|
return take_cb.call(null, val)
|
|
});
|
|
return cljs.core.async.impl.channels.box.call(null, null)
|
|
}else {
|
|
if(cljs.core.truth_(function() {
|
|
var and__3941__auto__ = self__.buf;
|
|
if(cljs.core.truth_(and__3941__auto__)) {
|
|
return cljs.core.not.call(null, cljs.core.async.impl.protocols.full_QMARK_.call(null, self__.buf))
|
|
}else {
|
|
return and__3941__auto__
|
|
}
|
|
}())) {
|
|
var put_cb__$1 = function() {
|
|
var and__3941__auto__ = cljs.core.async.impl.protocols.active_QMARK_.call(null, handler);
|
|
if(cljs.core.truth_(and__3941__auto__)) {
|
|
return cljs.core.async.impl.protocols.commit.call(null, handler)
|
|
}else {
|
|
return and__3941__auto__
|
|
}
|
|
}();
|
|
if(cljs.core.truth_(put_cb__$1)) {
|
|
cljs.core.async.impl.protocols.add_BANG_.call(null, self__.buf, val);
|
|
return cljs.core.async.impl.channels.box.call(null, null)
|
|
}else {
|
|
return null
|
|
}
|
|
}else {
|
|
self__.puts.unshift(cljs.core.PersistentVector.fromArray([handler, val], true));
|
|
return null
|
|
}
|
|
}
|
|
}
|
|
};
|
|
cljs.core.async.impl.channels.ManyToManyChannel.prototype.cljs$core$async$impl$channels$MMC$ = true;
|
|
cljs.core.async.impl.channels.ManyToManyChannel.prototype.cljs$core$async$impl$channels$MMC$cleanup$arity$1 = function(_) {
|
|
var self__ = this;
|
|
var idx_14427 = 0;
|
|
while(true) {
|
|
if(idx_14427 < self__.puts.length) {
|
|
var vec__14419_14428 = self__.puts[idx_14427];
|
|
var itm_14429 = cljs.core.nth.call(null, vec__14419_14428, 0, null);
|
|
var val_14430 = cljs.core.nth.call(null, vec__14419_14428, 1, null);
|
|
if(cljs.core.truth_(cljs.core.async.impl.protocols.active_QMARK_.call(null, itm_14429))) {
|
|
var G__14431 = idx_14427 + 1;
|
|
idx_14427 = G__14431;
|
|
continue
|
|
}else {
|
|
self__.puts.splice(idx_14427, 1);
|
|
var G__14432 = idx_14427;
|
|
idx_14427 = G__14432;
|
|
continue
|
|
}
|
|
}else {
|
|
}
|
|
break
|
|
}
|
|
var idx = 0;
|
|
while(true) {
|
|
if(idx < self__.takes.length) {
|
|
var itm = self__.takes[idx];
|
|
if(cljs.core.truth_(cljs.core.async.impl.protocols.active_QMARK_.call(null, itm))) {
|
|
var G__14433 = idx + 1;
|
|
idx = G__14433;
|
|
continue
|
|
}else {
|
|
self__.takes.splice(idx, 1);
|
|
var G__14434 = idx;
|
|
idx = G__14434;
|
|
continue
|
|
}
|
|
}else {
|
|
return null
|
|
}
|
|
break
|
|
}
|
|
};
|
|
cljs.core.async.impl.channels.__GT_ManyToManyChannel = function __GT_ManyToManyChannel(takes, puts, buf, closed) {
|
|
return new cljs.core.async.impl.channels.ManyToManyChannel(takes, puts, buf, closed)
|
|
};
|
|
cljs.core.async.impl.channels.chan = function chan(buf) {
|
|
return new cljs.core.async.impl.channels.ManyToManyChannel(new Array(0), new Array(0), buf, cljs.core.atom.call(null, null))
|
|
};
|
|
goog.provide("cljs.core.async.impl.timers");
|
|
goog.require("cljs.core");
|
|
goog.require("cljs.core.async.impl.dispatch");
|
|
goog.require("cljs.core.async.impl.channels");
|
|
goog.require("cljs.core.async.impl.protocols");
|
|
cljs.core.async.impl.timers.MAX_LEVEL = 15;
|
|
cljs.core.async.impl.timers.P = 1 / 2;
|
|
cljs.core.async.impl.timers.random_level = function() {
|
|
var random_level = null;
|
|
var random_level__0 = function() {
|
|
return random_level.call(null, 0)
|
|
};
|
|
var random_level__1 = function(level) {
|
|
while(true) {
|
|
if(function() {
|
|
var and__3941__auto__ = Math.random() < cljs.core.async.impl.timers.P;
|
|
if(and__3941__auto__) {
|
|
return level < cljs.core.async.impl.timers.MAX_LEVEL
|
|
}else {
|
|
return and__3941__auto__
|
|
}
|
|
}()) {
|
|
var G__14386 = level + 1;
|
|
level = G__14386;
|
|
continue
|
|
}else {
|
|
return level
|
|
}
|
|
break
|
|
}
|
|
};
|
|
random_level = function(level) {
|
|
switch(arguments.length) {
|
|
case 0:
|
|
return random_level__0.call(this);
|
|
case 1:
|
|
return random_level__1.call(this, level)
|
|
}
|
|
throw new Error("Invalid arity: " + arguments.length);
|
|
};
|
|
random_level.cljs$core$IFn$_invoke$arity$0 = random_level__0;
|
|
random_level.cljs$core$IFn$_invoke$arity$1 = random_level__1;
|
|
return random_level
|
|
}();
|
|
goog.provide("cljs.core.async.impl.timers.SkipListNode");
|
|
cljs.core.async.impl.timers.SkipListNode = function(key, val, forward) {
|
|
this.key = key;
|
|
this.val = val;
|
|
this.forward = forward;
|
|
this.cljs$lang$protocol_mask$partition1$ = 0;
|
|
this.cljs$lang$protocol_mask$partition0$ = 2155872256
|
|
};
|
|
cljs.core.async.impl.timers.SkipListNode.cljs$lang$type = true;
|
|
cljs.core.async.impl.timers.SkipListNode.cljs$lang$ctorStr = "cljs.core.async.impl.timers/SkipListNode";
|
|
cljs.core.async.impl.timers.SkipListNode.cljs$lang$ctorPrWriter = function(this__2847__auto__, writer__2848__auto__, opt__2849__auto__) {
|
|
return cljs.core._write.call(null, writer__2848__auto__, "cljs.core.async.impl.timers/SkipListNode")
|
|
};
|
|
cljs.core.async.impl.timers.SkipListNode.prototype.cljs$core$IPrintWithWriter$_pr_writer$arity$3 = function(coll, writer, opts) {
|
|
var self__ = this;
|
|
return cljs.core.pr_sequential_writer.call(null, writer, cljs.core.pr_writer, "[", " ", "]", opts, coll)
|
|
};
|
|
cljs.core.async.impl.timers.SkipListNode.prototype.cljs$core$ISeqable$_seq$arity$1 = function(coll) {
|
|
var self__ = this;
|
|
return cljs.core.list.call(null, self__.key, self__.val)
|
|
};
|
|
cljs.core.async.impl.timers.__GT_SkipListNode = function __GT_SkipListNode(key, val, forward) {
|
|
return new cljs.core.async.impl.timers.SkipListNode(key, val, forward)
|
|
};
|
|
cljs.core.async.impl.timers.skip_list_node = function() {
|
|
var skip_list_node = null;
|
|
var skip_list_node__1 = function(level) {
|
|
return skip_list_node.call(null, null, null, level)
|
|
};
|
|
var skip_list_node__3 = function(k, v, level) {
|
|
var arr = new Array(level + 1);
|
|
var i_14387 = 0;
|
|
while(true) {
|
|
if(i_14387 < arr.length) {
|
|
arr[i_14387] = null;
|
|
var G__14388 = i_14387 + 1;
|
|
i_14387 = G__14388;
|
|
continue
|
|
}else {
|
|
}
|
|
break
|
|
}
|
|
return new cljs.core.async.impl.timers.SkipListNode(k, v, arr)
|
|
};
|
|
skip_list_node = function(k, v, level) {
|
|
switch(arguments.length) {
|
|
case 1:
|
|
return skip_list_node__1.call(this, k);
|
|
case 3:
|
|
return skip_list_node__3.call(this, k, v, level)
|
|
}
|
|
throw new Error("Invalid arity: " + arguments.length);
|
|
};
|
|
skip_list_node.cljs$core$IFn$_invoke$arity$1 = skip_list_node__1;
|
|
skip_list_node.cljs$core$IFn$_invoke$arity$3 = skip_list_node__3;
|
|
return skip_list_node
|
|
}();
|
|
cljs.core.async.impl.timers.least_greater_node = function() {
|
|
var least_greater_node = null;
|
|
var least_greater_node__3 = function(x, k, level) {
|
|
return least_greater_node.call(null, x, k, level, null)
|
|
};
|
|
var least_greater_node__4 = function(x, k, level, update) {
|
|
while(true) {
|
|
if(!(level < 0)) {
|
|
var x__$1 = function() {
|
|
var x__$1 = x;
|
|
while(true) {
|
|
var temp__4090__auto__ = x__$1.forward[level];
|
|
if(cljs.core.truth_(temp__4090__auto__)) {
|
|
var x_SINGLEQUOTE_ = temp__4090__auto__;
|
|
if(x_SINGLEQUOTE_.key < k) {
|
|
var G__14389 = x_SINGLEQUOTE_;
|
|
x__$1 = G__14389;
|
|
continue
|
|
}else {
|
|
return x__$1
|
|
}
|
|
}else {
|
|
return x__$1
|
|
}
|
|
break
|
|
}
|
|
}();
|
|
if(update == null) {
|
|
}else {
|
|
update[level] = x__$1
|
|
}
|
|
var G__14390 = x__$1;
|
|
var G__14391 = k;
|
|
var G__14392 = level - 1;
|
|
var G__14393 = update;
|
|
x = G__14390;
|
|
k = G__14391;
|
|
level = G__14392;
|
|
update = G__14393;
|
|
continue
|
|
}else {
|
|
return x
|
|
}
|
|
break
|
|
}
|
|
};
|
|
least_greater_node = function(x, k, level, update) {
|
|
switch(arguments.length) {
|
|
case 3:
|
|
return least_greater_node__3.call(this, x, k, level);
|
|
case 4:
|
|
return least_greater_node__4.call(this, x, k, level, update)
|
|
}
|
|
throw new Error("Invalid arity: " + arguments.length);
|
|
};
|
|
least_greater_node.cljs$core$IFn$_invoke$arity$3 = least_greater_node__3;
|
|
least_greater_node.cljs$core$IFn$_invoke$arity$4 = least_greater_node__4;
|
|
return least_greater_node
|
|
}();
|
|
goog.provide("cljs.core.async.impl.timers.SkipList");
|
|
cljs.core.async.impl.timers.SkipList = function(header, level) {
|
|
this.header = header;
|
|
this.level = level;
|
|
this.cljs$lang$protocol_mask$partition1$ = 0;
|
|
this.cljs$lang$protocol_mask$partition0$ = 2155872256
|
|
};
|
|
cljs.core.async.impl.timers.SkipList.cljs$lang$type = true;
|
|
cljs.core.async.impl.timers.SkipList.cljs$lang$ctorStr = "cljs.core.async.impl.timers/SkipList";
|
|
cljs.core.async.impl.timers.SkipList.cljs$lang$ctorPrWriter = function(this__2847__auto__, writer__2848__auto__, opt__2849__auto__) {
|
|
return cljs.core._write.call(null, writer__2848__auto__, "cljs.core.async.impl.timers/SkipList")
|
|
};
|
|
cljs.core.async.impl.timers.SkipList.prototype.cljs$core$IPrintWithWriter$_pr_writer$arity$3 = function(coll, writer, opts) {
|
|
var self__ = this;
|
|
var pr_pair = function(keyval) {
|
|
return cljs.core.pr_sequential_writer.call(null, writer, cljs.core.pr_writer, "", " ", "", opts, keyval)
|
|
};
|
|
return cljs.core.pr_sequential_writer.call(null, writer, pr_pair, "{", ", ", "}", opts, coll)
|
|
};
|
|
cljs.core.async.impl.timers.SkipList.prototype.cljs$core$ISeqable$_seq$arity$1 = function(coll) {
|
|
var self__ = this;
|
|
var iter = function iter(node) {
|
|
return new cljs.core.LazySeq(null, false, function() {
|
|
if(node == null) {
|
|
return null
|
|
}else {
|
|
return cljs.core.cons.call(null, cljs.core.PersistentVector.fromArray([node.key, node.val], true), iter.call(null, node.forward[0]))
|
|
}
|
|
}, null)
|
|
};
|
|
return iter.call(null, self__.header.forward[0])
|
|
};
|
|
cljs.core.async.impl.timers.SkipList.prototype.put = function(k, v) {
|
|
var self__ = this;
|
|
var coll = this;
|
|
var update = new Array(cljs.core.async.impl.timers.MAX_LEVEL);
|
|
var x = cljs.core.async.impl.timers.least_greater_node.call(null, self__.header, k, self__.level, update);
|
|
var x__$1 = x.forward[0];
|
|
if(function() {
|
|
var and__3941__auto__ = !(x__$1 == null);
|
|
if(and__3941__auto__) {
|
|
return x__$1.key === k
|
|
}else {
|
|
return and__3941__auto__
|
|
}
|
|
}()) {
|
|
return x__$1.val = v
|
|
}else {
|
|
var new_level = cljs.core.async.impl.timers.random_level.call(null);
|
|
if(new_level > self__.level) {
|
|
var i_14394 = self__.level + 1;
|
|
while(true) {
|
|
if(i_14394 <= new_level + 1) {
|
|
update[i_14394] = self__.header;
|
|
var G__14395 = i_14394 + 1;
|
|
i_14394 = G__14395;
|
|
continue
|
|
}else {
|
|
}
|
|
break
|
|
}
|
|
self__.level = new_level
|
|
}else {
|
|
}
|
|
var x__$2 = cljs.core.async.impl.timers.skip_list_node.call(null, k, v, new Array(new_level));
|
|
var i = 0;
|
|
while(true) {
|
|
if(i <= self__.level) {
|
|
var links = update[i].forward;
|
|
x__$2.forward[i] = links[i];
|
|
return links[i] = x__$2
|
|
}else {
|
|
return null
|
|
}
|
|
break
|
|
}
|
|
}
|
|
};
|
|
cljs.core.async.impl.timers.SkipList.prototype.remove = function(k) {
|
|
var self__ = this;
|
|
var coll = this;
|
|
var update = new Array(cljs.core.async.impl.timers.MAX_LEVEL);
|
|
var x = cljs.core.async.impl.timers.least_greater_node.call(null, self__.header, k, self__.level, update);
|
|
var x__$1 = x.forward[0];
|
|
if(function() {
|
|
var and__3941__auto__ = !(x__$1 == null);
|
|
if(and__3941__auto__) {
|
|
return x__$1.key === k
|
|
}else {
|
|
return and__3941__auto__
|
|
}
|
|
}()) {
|
|
var i_14396 = 0;
|
|
while(true) {
|
|
if(i_14396 <= self__.level) {
|
|
var links_14397 = update[i_14396].forward;
|
|
if(links_14397[i_14396] === x__$1) {
|
|
links_14397[i_14396] = x__$1.forward[i_14396];
|
|
var G__14398 = i_14396 + 1;
|
|
i_14396 = G__14398;
|
|
continue
|
|
}else {
|
|
var G__14399 = i_14396 + 1;
|
|
i_14396 = G__14399;
|
|
continue
|
|
}
|
|
}else {
|
|
}
|
|
break
|
|
}
|
|
while(true) {
|
|
if(function() {
|
|
var and__3941__auto__ = self__.level > 0;
|
|
if(and__3941__auto__) {
|
|
return self__.header.forward[self__.level] == null
|
|
}else {
|
|
return and__3941__auto__
|
|
}
|
|
}()) {
|
|
self__.level = self__.level - 1;
|
|
continue
|
|
}else {
|
|
return null
|
|
}
|
|
break
|
|
}
|
|
}else {
|
|
return null
|
|
}
|
|
};
|
|
cljs.core.async.impl.timers.SkipList.prototype.ceilingEntry = function(k) {
|
|
var self__ = this;
|
|
var coll = this;
|
|
var x = self__.header;
|
|
var level__$1 = self__.level;
|
|
while(true) {
|
|
if(!(level__$1 < 0)) {
|
|
var nx = function() {
|
|
var x__$1 = x;
|
|
while(true) {
|
|
var x_SINGLEQUOTE_ = x__$1.forward[level__$1];
|
|
if(x_SINGLEQUOTE_ == null) {
|
|
return null
|
|
}else {
|
|
if(x_SINGLEQUOTE_.key >= k) {
|
|
return x_SINGLEQUOTE_
|
|
}else {
|
|
var G__14400 = x_SINGLEQUOTE_;
|
|
x__$1 = G__14400;
|
|
continue
|
|
}
|
|
}
|
|
break
|
|
}
|
|
}();
|
|
if(!(nx == null)) {
|
|
var G__14401 = nx;
|
|
var G__14402 = level__$1 - 1;
|
|
x = G__14401;
|
|
level__$1 = G__14402;
|
|
continue
|
|
}else {
|
|
var G__14403 = x;
|
|
var G__14404 = level__$1 - 1;
|
|
x = G__14403;
|
|
level__$1 = G__14404;
|
|
continue
|
|
}
|
|
}else {
|
|
if(x === self__.header) {
|
|
return null
|
|
}else {
|
|
return x
|
|
}
|
|
}
|
|
break
|
|
}
|
|
};
|
|
cljs.core.async.impl.timers.SkipList.prototype.floorEntry = function(k) {
|
|
var self__ = this;
|
|
var coll = this;
|
|
var x = self__.header;
|
|
var level__$1 = self__.level;
|
|
while(true) {
|
|
if(!(level__$1 < 0)) {
|
|
var nx = function() {
|
|
var x__$1 = x;
|
|
while(true) {
|
|
var x_SINGLEQUOTE_ = x__$1.forward[level__$1];
|
|
if(!(x_SINGLEQUOTE_ == null)) {
|
|
if(x_SINGLEQUOTE_.key > k) {
|
|
return x__$1
|
|
}else {
|
|
var G__14405 = x_SINGLEQUOTE_;
|
|
x__$1 = G__14405;
|
|
continue
|
|
}
|
|
}else {
|
|
if(level__$1 === 0) {
|
|
return x__$1
|
|
}else {
|
|
return null
|
|
}
|
|
}
|
|
break
|
|
}
|
|
}();
|
|
if(cljs.core.truth_(nx)) {
|
|
var G__14406 = nx;
|
|
var G__14407 = level__$1 - 1;
|
|
x = G__14406;
|
|
level__$1 = G__14407;
|
|
continue
|
|
}else {
|
|
var G__14408 = x;
|
|
var G__14409 = level__$1 - 1;
|
|
x = G__14408;
|
|
level__$1 = G__14409;
|
|
continue
|
|
}
|
|
}else {
|
|
if(x === self__.header) {
|
|
return null
|
|
}else {
|
|
return x
|
|
}
|
|
}
|
|
break
|
|
}
|
|
};
|
|
cljs.core.async.impl.timers.__GT_SkipList = function __GT_SkipList(header, level) {
|
|
return new cljs.core.async.impl.timers.SkipList(header, level)
|
|
};
|
|
cljs.core.async.impl.timers.skip_list = function skip_list() {
|
|
return new cljs.core.async.impl.timers.SkipList(cljs.core.async.impl.timers.skip_list_node.call(null, 0), 0)
|
|
};
|
|
cljs.core.async.impl.timers.timeouts_map = cljs.core.async.impl.timers.skip_list.call(null);
|
|
cljs.core.async.impl.timers.TIMEOUT_RESOLUTION_MS = 10;
|
|
cljs.core.async.impl.timers.timeout = function timeout(msecs) {
|
|
var timeout__$1 = (new Date).valueOf() + msecs;
|
|
var me = cljs.core.async.impl.timers.timeouts_map.ceilingEntry(timeout__$1);
|
|
var or__3943__auto__ = cljs.core.truth_(function() {
|
|
var and__3941__auto__ = me;
|
|
if(cljs.core.truth_(and__3941__auto__)) {
|
|
return me.key < timeout__$1 + cljs.core.async.impl.timers.TIMEOUT_RESOLUTION_MS
|
|
}else {
|
|
return and__3941__auto__
|
|
}
|
|
}()) ? me.val : null;
|
|
if(cljs.core.truth_(or__3943__auto__)) {
|
|
return or__3943__auto__
|
|
}else {
|
|
var timeout_channel = cljs.core.async.impl.channels.chan.call(null, null);
|
|
cljs.core.async.impl.timers.timeouts_map.put(timeout__$1, timeout_channel);
|
|
cljs.core.async.impl.dispatch.queue_delay.call(null, function() {
|
|
cljs.core.async.impl.timers.timeouts_map.remove(timeout__$1);
|
|
return cljs.core.async.impl.protocols.close_BANG_.call(null, timeout_channel)
|
|
}, msecs);
|
|
return timeout_channel
|
|
}
|
|
};
|
|
goog.provide("cljs.core.async");
|
|
goog.require("cljs.core");
|
|
goog.require("cljs.core.async.impl.ioc_helpers");
|
|
goog.require("cljs.core.async.impl.dispatch");
|
|
goog.require("cljs.core.async.impl.timers");
|
|
goog.require("cljs.core.async.impl.buffers");
|
|
goog.require("cljs.core.async.impl.channels");
|
|
goog.require("cljs.core.async.impl.protocols");
|
|
cljs.core.async.fn_handler = function fn_handler(f) {
|
|
if(void 0 === cljs.core.async.t14360) {
|
|
goog.provide("cljs.core.async.t14360");
|
|
cljs.core.async.t14360 = function(f, fn_handler, meta14361) {
|
|
this.f = f;
|
|
this.fn_handler = fn_handler;
|
|
this.meta14361 = meta14361;
|
|
this.cljs$lang$protocol_mask$partition1$ = 0;
|
|
this.cljs$lang$protocol_mask$partition0$ = 393216
|
|
};
|
|
cljs.core.async.t14360.cljs$lang$type = true;
|
|
cljs.core.async.t14360.cljs$lang$ctorStr = "cljs.core.async/t14360";
|
|
cljs.core.async.t14360.cljs$lang$ctorPrWriter = function(this__2847__auto__, writer__2848__auto__, opt__2849__auto__) {
|
|
return cljs.core._write.call(null, writer__2848__auto__, "cljs.core.async/t14360")
|
|
};
|
|
cljs.core.async.t14360.prototype.cljs$core$async$impl$protocols$Handler$ = true;
|
|
cljs.core.async.t14360.prototype.cljs$core$async$impl$protocols$Handler$active_QMARK_$arity$1 = function(_) {
|
|
var self__ = this;
|
|
return true
|
|
};
|
|
cljs.core.async.t14360.prototype.cljs$core$async$impl$protocols$Handler$commit$arity$1 = function(_) {
|
|
var self__ = this;
|
|
return self__.f
|
|
};
|
|
cljs.core.async.t14360.prototype.cljs$core$IMeta$_meta$arity$1 = function(_14362) {
|
|
var self__ = this;
|
|
return self__.meta14361
|
|
};
|
|
cljs.core.async.t14360.prototype.cljs$core$IWithMeta$_with_meta$arity$2 = function(_14362, meta14361__$1) {
|
|
var self__ = this;
|
|
return new cljs.core.async.t14360(self__.f, self__.fn_handler, meta14361__$1)
|
|
};
|
|
cljs.core.async.__GT_t14360 = function __GT_t14360(f__$1, fn_handler__$1, meta14361) {
|
|
return new cljs.core.async.t14360(f__$1, fn_handler__$1, meta14361)
|
|
}
|
|
}else {
|
|
}
|
|
return new cljs.core.async.t14360(f, fn_handler, null)
|
|
};
|
|
cljs.core.async.buffer = function buffer(n) {
|
|
return cljs.core.async.impl.buffers.fixed_buffer.call(null, n)
|
|
};
|
|
cljs.core.async.dropping_buffer = function dropping_buffer(n) {
|
|
return cljs.core.async.impl.buffers.dropping_buffer.call(null, n)
|
|
};
|
|
cljs.core.async.sliding_buffer = function sliding_buffer(n) {
|
|
return cljs.core.async.impl.buffers.sliding_buffer.call(null, n)
|
|
};
|
|
cljs.core.async.chan = function() {
|
|
var chan = null;
|
|
var chan__0 = function() {
|
|
return chan.call(null, null)
|
|
};
|
|
var chan__1 = function(buf_or_n) {
|
|
return cljs.core.async.impl.channels.chan.call(null, typeof buf_or_n === "number" ? cljs.core.async.buffer.call(null, buf_or_n) : buf_or_n)
|
|
};
|
|
chan = function(buf_or_n) {
|
|
switch(arguments.length) {
|
|
case 0:
|
|
return chan__0.call(this);
|
|
case 1:
|
|
return chan__1.call(this, buf_or_n)
|
|
}
|
|
throw new Error("Invalid arity: " + arguments.length);
|
|
};
|
|
chan.cljs$core$IFn$_invoke$arity$0 = chan__0;
|
|
chan.cljs$core$IFn$_invoke$arity$1 = chan__1;
|
|
return chan
|
|
}();
|
|
cljs.core.async.timeout = function timeout(msecs) {
|
|
return cljs.core.async.impl.timers.timeout.call(null, msecs)
|
|
};
|
|
cljs.core.async._LT__BANG_ = function _LT__BANG_(port) {
|
|
if(null) {
|
|
return null
|
|
}else {
|
|
throw new Error([cljs.core.str("Assert failed: "), cljs.core.str("<! used not in (go ...) block"), cljs.core.str("\n"), cljs.core.str(cljs.core.pr_str.call(null, null))].join(""));
|
|
}
|
|
};
|
|
cljs.core.async.take_BANG_ = function() {
|
|
var take_BANG_ = null;
|
|
var take_BANG___2 = function(port, fn1) {
|
|
return take_BANG_.call(null, port, fn1, true)
|
|
};
|
|
var take_BANG___3 = function(port, fn1, on_caller_QMARK_) {
|
|
var ret = cljs.core.async.impl.protocols.take_BANG_.call(null, port, cljs.core.async.fn_handler.call(null, fn1));
|
|
if(cljs.core.truth_(ret)) {
|
|
var val_14363 = cljs.core.deref.call(null, ret);
|
|
if(cljs.core.truth_(on_caller_QMARK_)) {
|
|
fn1.call(null, val_14363)
|
|
}else {
|
|
cljs.core.async.impl.dispatch.run.call(null, function() {
|
|
return fn1.call(null, val_14363)
|
|
})
|
|
}
|
|
}else {
|
|
}
|
|
return null
|
|
};
|
|
take_BANG_ = function(port, fn1, on_caller_QMARK_) {
|
|
switch(arguments.length) {
|
|
case 2:
|
|
return take_BANG___2.call(this, port, fn1);
|
|
case 3:
|
|
return take_BANG___3.call(this, port, fn1, on_caller_QMARK_)
|
|
}
|
|
throw new Error("Invalid arity: " + arguments.length);
|
|
};
|
|
take_BANG_.cljs$core$IFn$_invoke$arity$2 = take_BANG___2;
|
|
take_BANG_.cljs$core$IFn$_invoke$arity$3 = take_BANG___3;
|
|
return take_BANG_
|
|
}();
|
|
cljs.core.async.nop = function nop() {
|
|
return null
|
|
};
|
|
cljs.core.async._GT__BANG_ = function _GT__BANG_(port, val) {
|
|
if(null) {
|
|
return null
|
|
}else {
|
|
throw new Error([cljs.core.str("Assert failed: "), cljs.core.str(">! used not in (go ...) block"), cljs.core.str("\n"), cljs.core.str(cljs.core.pr_str.call(null, null))].join(""));
|
|
}
|
|
};
|
|
cljs.core.async.put_BANG_ = function() {
|
|
var put_BANG_ = null;
|
|
var put_BANG___2 = function(port, val) {
|
|
return put_BANG_.call(null, port, val, cljs.core.async.nop)
|
|
};
|
|
var put_BANG___3 = function(port, val, fn0) {
|
|
return put_BANG_.call(null, port, val, fn0, true)
|
|
};
|
|
var put_BANG___4 = function(port, val, fn0, on_caller_QMARK_) {
|
|
var ret = cljs.core.async.impl.protocols.put_BANG_.call(null, port, val, cljs.core.async.fn_handler.call(null, fn0));
|
|
if(cljs.core.truth_(function() {
|
|
var and__3941__auto__ = ret;
|
|
if(cljs.core.truth_(and__3941__auto__)) {
|
|
return cljs.core.not_EQ_.call(null, fn0, cljs.core.async.nop)
|
|
}else {
|
|
return and__3941__auto__
|
|
}
|
|
}())) {
|
|
if(cljs.core.truth_(on_caller_QMARK_)) {
|
|
fn0.call(null)
|
|
}else {
|
|
cljs.core.async.impl.dispatch.run.call(null, fn0)
|
|
}
|
|
}else {
|
|
}
|
|
return null
|
|
};
|
|
put_BANG_ = function(port, val, fn0, on_caller_QMARK_) {
|
|
switch(arguments.length) {
|
|
case 2:
|
|
return put_BANG___2.call(this, port, val);
|
|
case 3:
|
|
return put_BANG___3.call(this, port, val, fn0);
|
|
case 4:
|
|
return put_BANG___4.call(this, port, val, fn0, on_caller_QMARK_)
|
|
}
|
|
throw new Error("Invalid arity: " + arguments.length);
|
|
};
|
|
put_BANG_.cljs$core$IFn$_invoke$arity$2 = put_BANG___2;
|
|
put_BANG_.cljs$core$IFn$_invoke$arity$3 = put_BANG___3;
|
|
put_BANG_.cljs$core$IFn$_invoke$arity$4 = put_BANG___4;
|
|
return put_BANG_
|
|
}();
|
|
cljs.core.async.close_BANG_ = function close_BANG_(port) {
|
|
return cljs.core.async.impl.protocols.close_BANG_.call(null, port)
|
|
};
|
|
cljs.core.async.random_array = function random_array(n) {
|
|
var a = new Array(n);
|
|
var n__3084__auto___14364 = n;
|
|
var x_14365 = 0;
|
|
while(true) {
|
|
if(x_14365 < n__3084__auto___14364) {
|
|
a[x_14365] = 0;
|
|
var G__14366 = x_14365 + 1;
|
|
x_14365 = G__14366;
|
|
continue
|
|
}else {
|
|
}
|
|
break
|
|
}
|
|
var i = 1;
|
|
while(true) {
|
|
if(cljs.core._EQ_.call(null, i, n)) {
|
|
return a
|
|
}else {
|
|
var j = cljs.core.rand_int.call(null, i);
|
|
a[i] = a[j];
|
|
a[j] = i;
|
|
var G__14367 = i + 1;
|
|
i = G__14367;
|
|
continue
|
|
}
|
|
break
|
|
}
|
|
};
|
|
cljs.core.async.alt_flag = function alt_flag() {
|
|
var flag = cljs.core.atom.call(null, true);
|
|
if(void 0 === cljs.core.async.t14371) {
|
|
goog.provide("cljs.core.async.t14371");
|
|
cljs.core.async.t14371 = function(flag, alt_flag, meta14372) {
|
|
this.flag = flag;
|
|
this.alt_flag = alt_flag;
|
|
this.meta14372 = meta14372;
|
|
this.cljs$lang$protocol_mask$partition1$ = 0;
|
|
this.cljs$lang$protocol_mask$partition0$ = 393216
|
|
};
|
|
cljs.core.async.t14371.cljs$lang$type = true;
|
|
cljs.core.async.t14371.cljs$lang$ctorStr = "cljs.core.async/t14371";
|
|
cljs.core.async.t14371.cljs$lang$ctorPrWriter = function(this__2847__auto__, writer__2848__auto__, opt__2849__auto__) {
|
|
return cljs.core._write.call(null, writer__2848__auto__, "cljs.core.async/t14371")
|
|
};
|
|
cljs.core.async.t14371.prototype.cljs$core$async$impl$protocols$Handler$ = true;
|
|
cljs.core.async.t14371.prototype.cljs$core$async$impl$protocols$Handler$active_QMARK_$arity$1 = function(_) {
|
|
var self__ = this;
|
|
return cljs.core.deref.call(null, self__.flag)
|
|
};
|
|
cljs.core.async.t14371.prototype.cljs$core$async$impl$protocols$Handler$commit$arity$1 = function(_) {
|
|
var self__ = this;
|
|
cljs.core.reset_BANG_.call(null, self__.flag, null);
|
|
return true
|
|
};
|
|
cljs.core.async.t14371.prototype.cljs$core$IMeta$_meta$arity$1 = function(_14373) {
|
|
var self__ = this;
|
|
return self__.meta14372
|
|
};
|
|
cljs.core.async.t14371.prototype.cljs$core$IWithMeta$_with_meta$arity$2 = function(_14373, meta14372__$1) {
|
|
var self__ = this;
|
|
return new cljs.core.async.t14371(self__.flag, self__.alt_flag, meta14372__$1)
|
|
};
|
|
cljs.core.async.__GT_t14371 = function __GT_t14371(flag__$1, alt_flag__$1, meta14372) {
|
|
return new cljs.core.async.t14371(flag__$1, alt_flag__$1, meta14372)
|
|
}
|
|
}else {
|
|
}
|
|
return new cljs.core.async.t14371(flag, alt_flag, null)
|
|
};
|
|
cljs.core.async.alt_handler = function alt_handler(flag, cb) {
|
|
if(void 0 === cljs.core.async.t14377) {
|
|
goog.provide("cljs.core.async.t14377");
|
|
cljs.core.async.t14377 = function(cb, flag, alt_handler, meta14378) {
|
|
this.cb = cb;
|
|
this.flag = flag;
|
|
this.alt_handler = alt_handler;
|
|
this.meta14378 = meta14378;
|
|
this.cljs$lang$protocol_mask$partition1$ = 0;
|
|
this.cljs$lang$protocol_mask$partition0$ = 393216
|
|
};
|
|
cljs.core.async.t14377.cljs$lang$type = true;
|
|
cljs.core.async.t14377.cljs$lang$ctorStr = "cljs.core.async/t14377";
|
|
cljs.core.async.t14377.cljs$lang$ctorPrWriter = function(this__2847__auto__, writer__2848__auto__, opt__2849__auto__) {
|
|
return cljs.core._write.call(null, writer__2848__auto__, "cljs.core.async/t14377")
|
|
};
|
|
cljs.core.async.t14377.prototype.cljs$core$async$impl$protocols$Handler$ = true;
|
|
cljs.core.async.t14377.prototype.cljs$core$async$impl$protocols$Handler$active_QMARK_$arity$1 = function(_) {
|
|
var self__ = this;
|
|
return cljs.core.async.impl.protocols.active_QMARK_.call(null, self__.flag)
|
|
};
|
|
cljs.core.async.t14377.prototype.cljs$core$async$impl$protocols$Handler$commit$arity$1 = function(_) {
|
|
var self__ = this;
|
|
cljs.core.async.impl.protocols.commit.call(null, self__.flag);
|
|
return self__.cb
|
|
};
|
|
cljs.core.async.t14377.prototype.cljs$core$IMeta$_meta$arity$1 = function(_14379) {
|
|
var self__ = this;
|
|
return self__.meta14378
|
|
};
|
|
cljs.core.async.t14377.prototype.cljs$core$IWithMeta$_with_meta$arity$2 = function(_14379, meta14378__$1) {
|
|
var self__ = this;
|
|
return new cljs.core.async.t14377(self__.cb, self__.flag, self__.alt_handler, meta14378__$1)
|
|
};
|
|
cljs.core.async.__GT_t14377 = function __GT_t14377(cb__$1, flag__$1, alt_handler__$1, meta14378) {
|
|
return new cljs.core.async.t14377(cb__$1, flag__$1, alt_handler__$1, meta14378)
|
|
}
|
|
}else {
|
|
}
|
|
return new cljs.core.async.t14377(cb, flag, alt_handler, null)
|
|
};
|
|
cljs.core.async.do_alts = function do_alts(fret, ports, opts) {
|
|
var flag = cljs.core.async.alt_flag.call(null);
|
|
var n = cljs.core.count.call(null, ports);
|
|
var idxs = cljs.core.async.random_array.call(null, n);
|
|
var priority = (new cljs.core.Keyword("\ufdd0:priority")).call(null, opts);
|
|
var ret = function() {
|
|
var i = 0;
|
|
while(true) {
|
|
if(i < n) {
|
|
var idx = cljs.core.truth_(priority) ? i : idxs[i];
|
|
var port = cljs.core.nth.call(null, ports, idx);
|
|
var wport = cljs.core.vector_QMARK_.call(null, port) ? port.call(null, 0) : null;
|
|
var vbox = cljs.core.truth_(wport) ? function() {
|
|
var val = port.call(null, 1);
|
|
return cljs.core.async.impl.protocols.put_BANG_.call(null, wport, val, cljs.core.async.alt_handler.call(null, flag, function(i, val, idx, port, wport, flag, n, idxs, priority) {
|
|
return function() {
|
|
return fret.call(null, cljs.core.PersistentVector.fromArray([null, wport], true))
|
|
}
|
|
}(i, val, idx, port, wport, flag, n, idxs, priority)))
|
|
}() : cljs.core.async.impl.protocols.take_BANG_.call(null, port, cljs.core.async.alt_handler.call(null, flag, function(i, idx, port, wport, flag, n, idxs, priority) {
|
|
return function(p1__14380_SHARP_) {
|
|
return fret.call(null, cljs.core.PersistentVector.fromArray([p1__14380_SHARP_, port], true))
|
|
}
|
|
}(i, idx, port, wport, flag, n, idxs, priority)));
|
|
if(cljs.core.truth_(vbox)) {
|
|
return cljs.core.async.impl.channels.box.call(null, cljs.core.PersistentVector.fromArray([cljs.core.deref.call(null, vbox), function() {
|
|
var or__3943__auto__ = wport;
|
|
if(cljs.core.truth_(or__3943__auto__)) {
|
|
return or__3943__auto__
|
|
}else {
|
|
return port
|
|
}
|
|
}()], true))
|
|
}else {
|
|
var G__14381 = i + 1;
|
|
i = G__14381;
|
|
continue
|
|
}
|
|
}else {
|
|
return null
|
|
}
|
|
break
|
|
}
|
|
}();
|
|
var or__3943__auto__ = ret;
|
|
if(cljs.core.truth_(or__3943__auto__)) {
|
|
return or__3943__auto__
|
|
}else {
|
|
if(cljs.core.contains_QMARK_.call(null, opts, "\ufdd0:default")) {
|
|
var temp__4092__auto__ = function() {
|
|
var and__3941__auto__ = cljs.core.async.impl.protocols.active_QMARK_.call(null, flag);
|
|
if(cljs.core.truth_(and__3941__auto__)) {
|
|
return cljs.core.async.impl.protocols.commit.call(null, flag)
|
|
}else {
|
|
return and__3941__auto__
|
|
}
|
|
}();
|
|
if(cljs.core.truth_(temp__4092__auto__)) {
|
|
var got = temp__4092__auto__;
|
|
return cljs.core.async.impl.channels.box.call(null, cljs.core.PersistentVector.fromArray([(new cljs.core.Keyword("\ufdd0:default")).call(null, opts), "\ufdd0:default"], true))
|
|
}else {
|
|
return null
|
|
}
|
|
}else {
|
|
return null
|
|
}
|
|
}
|
|
};
|
|
cljs.core.async.alts_BANG_ = function() {
|
|
var alts_BANG___delegate = function(ports, p__14382) {
|
|
var map__14384 = p__14382;
|
|
var map__14384__$1 = cljs.core.seq_QMARK_.call(null, map__14384) ? cljs.core.apply.call(null, cljs.core.hash_map, map__14384) : map__14384;
|
|
var opts = map__14384__$1;
|
|
if(null) {
|
|
return null
|
|
}else {
|
|
throw new Error([cljs.core.str("Assert failed: "), cljs.core.str("alts! used not in (go ...) block"), cljs.core.str("\n"), cljs.core.str(cljs.core.pr_str.call(null, null))].join(""));
|
|
}
|
|
};
|
|
var alts_BANG_ = function(ports, var_args) {
|
|
var p__14382 = null;
|
|
if(arguments.length > 1) {
|
|
p__14382 = cljs.core.array_seq(Array.prototype.slice.call(arguments, 1), 0)
|
|
}
|
|
return alts_BANG___delegate.call(this, ports, p__14382)
|
|
};
|
|
alts_BANG_.cljs$lang$maxFixedArity = 1;
|
|
alts_BANG_.cljs$lang$applyTo = function(arglist__14385) {
|
|
var ports = cljs.core.first(arglist__14385);
|
|
var p__14382 = cljs.core.rest(arglist__14385);
|
|
return alts_BANG___delegate(ports, p__14382)
|
|
};
|
|
alts_BANG_.cljs$core$IFn$_invoke$arity$variadic = alts_BANG___delegate;
|
|
return alts_BANG_
|
|
}();
|
|
goog.provide("grub.async_utils");
|
|
goog.require("cljs.core");
|
|
goog.require("cljs.core.async");
|
|
goog.require("cljs.core.async");
|
|
grub.async_utils.put_all_BANG_ = function put_all_BANG_(cs, x) {
|
|
var seq__12282 = cljs.core.seq.call(null, cs);
|
|
var chunk__12283 = null;
|
|
var count__12284 = 0;
|
|
var i__12285 = 0;
|
|
while(true) {
|
|
if(i__12285 < count__12284) {
|
|
var c = cljs.core._nth.call(null, chunk__12283, i__12285);
|
|
cljs.core.async.put_BANG_.call(null, c, x);
|
|
var G__12286 = seq__12282;
|
|
var G__12287 = chunk__12283;
|
|
var G__12288 = count__12284;
|
|
var G__12289 = i__12285 + 1;
|
|
seq__12282 = G__12286;
|
|
chunk__12283 = G__12287;
|
|
count__12284 = G__12288;
|
|
i__12285 = G__12289;
|
|
continue
|
|
}else {
|
|
var temp__4092__auto__ = cljs.core.seq.call(null, seq__12282);
|
|
if(temp__4092__auto__) {
|
|
var seq__12282__$1 = temp__4092__auto__;
|
|
if(cljs.core.chunked_seq_QMARK_.call(null, seq__12282__$1)) {
|
|
var c__3037__auto__ = cljs.core.chunk_first.call(null, seq__12282__$1);
|
|
var G__12290 = cljs.core.chunk_rest.call(null, seq__12282__$1);
|
|
var G__12291 = c__3037__auto__;
|
|
var G__12292 = cljs.core.count.call(null, c__3037__auto__);
|
|
var G__12293 = 0;
|
|
seq__12282 = G__12290;
|
|
chunk__12283 = G__12291;
|
|
count__12284 = G__12292;
|
|
i__12285 = G__12293;
|
|
continue
|
|
}else {
|
|
var c = cljs.core.first.call(null, seq__12282__$1);
|
|
cljs.core.async.put_BANG_.call(null, c, x);
|
|
var G__12294 = cljs.core.next.call(null, seq__12282__$1);
|
|
var G__12295 = null;
|
|
var G__12296 = 0;
|
|
var G__12297 = 0;
|
|
seq__12282 = G__12294;
|
|
chunk__12283 = G__12295;
|
|
count__12284 = G__12296;
|
|
i__12285 = G__12297;
|
|
continue
|
|
}
|
|
}else {
|
|
return null
|
|
}
|
|
}
|
|
break
|
|
}
|
|
};
|
|
grub.async_utils.fan_out = function fan_out(in$, cs_or_n) {
|
|
var cs = typeof cs_or_n === "number" ? cljs.core.repeatedly.call(null, cs_or_n, cljs.core.async.chan) : cs_or_n;
|
|
var c__4545__auto___12350 = cljs.core.async.chan.call(null, 1);
|
|
cljs.core.async.impl.dispatch.run.call(null, function() {
|
|
var f__4546__auto__ = function() {
|
|
var switch__4471__auto__ = function(state_12337) {
|
|
var state_val_12338 = state_12337[1];
|
|
if(state_val_12338 === 7) {
|
|
var inst_12333 = state_12337[2];
|
|
var state_12337__$1 = state_12337;
|
|
var statearr_12339_12351 = state_12337__$1;
|
|
statearr_12339_12351[2] = inst_12333;
|
|
statearr_12339_12351[1] = 3;
|
|
return"\ufdd0:recur"
|
|
}else {
|
|
if(state_val_12338 === 6) {
|
|
var state_12337__$1 = state_12337;
|
|
var statearr_12340_12352 = state_12337__$1;
|
|
statearr_12340_12352[2] = "\ufdd0:done";
|
|
statearr_12340_12352[1] = 7;
|
|
return"\ufdd0:recur"
|
|
}else {
|
|
if(state_val_12338 === 5) {
|
|
var inst_12326 = state_12337[5];
|
|
var inst_12330 = grub.async_utils.put_all_BANG_.call(null, cs, inst_12326);
|
|
var state_12337__$1 = function() {
|
|
var statearr_12341 = state_12337;
|
|
statearr_12341[6] = inst_12330;
|
|
return statearr_12341
|
|
}();
|
|
var statearr_12342_12353 = state_12337__$1;
|
|
statearr_12342_12353[2] = null;
|
|
statearr_12342_12353[1] = 2;
|
|
return"\ufdd0:recur"
|
|
}else {
|
|
if(state_val_12338 === 4) {
|
|
var inst_12326 = state_12337[5];
|
|
var inst_12326__$1 = state_12337[2];
|
|
var inst_12327 = inst_12326__$1 == null;
|
|
var inst_12328 = cljs.core.not.call(null, inst_12327);
|
|
var state_12337__$1 = function() {
|
|
var statearr_12343 = state_12337;
|
|
statearr_12343[5] = inst_12326__$1;
|
|
return statearr_12343
|
|
}();
|
|
if(inst_12328) {
|
|
var statearr_12344_12354 = state_12337__$1;
|
|
statearr_12344_12354[1] = 5
|
|
}else {
|
|
var statearr_12345_12355 = state_12337__$1;
|
|
statearr_12345_12355[1] = 6
|
|
}
|
|
return"\ufdd0:recur"
|
|
}else {
|
|
if(state_val_12338 === 3) {
|
|
var inst_12335 = state_12337[2];
|
|
var state_12337__$1 = state_12337;
|
|
return cljs.core.async.impl.ioc_helpers.return_chan.call(null, state_12337__$1, inst_12335)
|
|
}else {
|
|
if(state_val_12338 === 2) {
|
|
var state_12337__$1 = state_12337;
|
|
return cljs.core.async.impl.ioc_helpers.take_BANG_.call(null, state_12337__$1, 4, in$)
|
|
}else {
|
|
if(state_val_12338 === 1) {
|
|
var state_12337__$1 = state_12337;
|
|
var statearr_12346_12356 = state_12337__$1;
|
|
statearr_12346_12356[2] = null;
|
|
statearr_12346_12356[1] = 2;
|
|
return"\ufdd0:recur"
|
|
}else {
|
|
return null
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
};
|
|
return function(switch__4471__auto__) {
|
|
return function() {
|
|
var state_machine__4472__auto__ = null;
|
|
var state_machine__4472__auto____0 = function() {
|
|
var statearr_12348 = new Array(7);
|
|
statearr_12348[0] = state_machine__4472__auto__;
|
|
statearr_12348[1] = 1;
|
|
return statearr_12348
|
|
};
|
|
var state_machine__4472__auto____1 = function(state_12337) {
|
|
while(true) {
|
|
var result__4473__auto__ = switch__4471__auto__.call(null, state_12337);
|
|
if(result__4473__auto__ === "\ufdd0:recur") {
|
|
continue
|
|
}else {
|
|
return result__4473__auto__
|
|
}
|
|
break
|
|
}
|
|
};
|
|
state_machine__4472__auto__ = function(state_12337) {
|
|
switch(arguments.length) {
|
|
case 0:
|
|
return state_machine__4472__auto____0.call(this);
|
|
case 1:
|
|
return state_machine__4472__auto____1.call(this, state_12337)
|
|
}
|
|
throw new Error("Invalid arity: " + arguments.length);
|
|
};
|
|
state_machine__4472__auto__.cljs$core$IFn$_invoke$arity$0 = state_machine__4472__auto____0;
|
|
state_machine__4472__auto__.cljs$core$IFn$_invoke$arity$1 = state_machine__4472__auto____1;
|
|
return state_machine__4472__auto__
|
|
}()
|
|
}(switch__4471__auto__)
|
|
}();
|
|
var state__4547__auto__ = function() {
|
|
var statearr_12349 = f__4546__auto__.call(null);
|
|
statearr_12349[cljs.core.async.impl.ioc_helpers.USER_START_IDX] = c__4545__auto___12350;
|
|
return statearr_12349
|
|
}();
|
|
return cljs.core.async.impl.ioc_helpers.run_state_machine.call(null, state__4547__auto__)
|
|
});
|
|
return cs
|
|
};
|
|
grub.async_utils.fan_in = function() {
|
|
var fan_in = null;
|
|
var fan_in__1 = function(ins) {
|
|
return fan_in.call(null, cljs.core.async.chan.call(null), ins)
|
|
};
|
|
var fan_in__2 = function(c, ins) {
|
|
var c__4545__auto___12409 = cljs.core.async.chan.call(null, 1);
|
|
cljs.core.async.impl.dispatch.run.call(null, function() {
|
|
var f__4546__auto__ = function() {
|
|
var switch__4471__auto__ = function(state_12397) {
|
|
var state_val_12398 = state_12397[1];
|
|
if(state_val_12398 === 8) {
|
|
var inst_12390 = state_12397[2];
|
|
var state_12397__$1 = function() {
|
|
var statearr_12399 = state_12397;
|
|
statearr_12399[5] = inst_12390;
|
|
return statearr_12399
|
|
}();
|
|
var statearr_12400_12410 = state_12397__$1;
|
|
statearr_12400_12410[2] = null;
|
|
statearr_12400_12410[1] = 2;
|
|
return"\ufdd0:recur"
|
|
}else {
|
|
if(state_val_12398 === 7) {
|
|
var inst_12387 = state_12397[2];
|
|
var inst_12388 = cljs.core.nth.call(null, inst_12387, 0, null);
|
|
var state_12397__$1 = state_12397;
|
|
return cljs.core.async.impl.ioc_helpers.put_BANG_.call(null, state_12397__$1, 8, c, inst_12388)
|
|
}else {
|
|
if(state_val_12398 === 6) {
|
|
var inst_12393 = state_12397[2];
|
|
var state_12397__$1 = state_12397;
|
|
var statearr_12401_12411 = state_12397__$1;
|
|
statearr_12401_12411[2] = inst_12393;
|
|
statearr_12401_12411[1] = 3;
|
|
return"\ufdd0:recur"
|
|
}else {
|
|
if(state_val_12398 === 5) {
|
|
var state_12397__$1 = state_12397;
|
|
var statearr_12402_12412 = state_12397__$1;
|
|
statearr_12402_12412[2] = null;
|
|
statearr_12402_12412[1] = 6;
|
|
return"\ufdd0:recur"
|
|
}else {
|
|
if(state_val_12398 === 4) {
|
|
var state_12397__$1 = state_12397;
|
|
return cljs.core.async.impl.ioc_helpers.ioc_alts_BANG_.call(null, state_12397__$1, 7, ins)
|
|
}else {
|
|
if(state_val_12398 === 3) {
|
|
var inst_12395 = state_12397[2];
|
|
var state_12397__$1 = state_12397;
|
|
return cljs.core.async.impl.ioc_helpers.return_chan.call(null, state_12397__$1, inst_12395)
|
|
}else {
|
|
if(state_val_12398 === 2) {
|
|
var state_12397__$1 = state_12397;
|
|
if(true) {
|
|
var statearr_12403_12413 = state_12397__$1;
|
|
statearr_12403_12413[1] = 4
|
|
}else {
|
|
var statearr_12404_12414 = state_12397__$1;
|
|
statearr_12404_12414[1] = 5
|
|
}
|
|
return"\ufdd0:recur"
|
|
}else {
|
|
if(state_val_12398 === 1) {
|
|
var state_12397__$1 = state_12397;
|
|
var statearr_12405_12415 = state_12397__$1;
|
|
statearr_12405_12415[2] = null;
|
|
statearr_12405_12415[1] = 2;
|
|
return"\ufdd0:recur"
|
|
}else {
|
|
return null
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
};
|
|
return function(switch__4471__auto__) {
|
|
return function() {
|
|
var state_machine__4472__auto__ = null;
|
|
var state_machine__4472__auto____0 = function() {
|
|
var statearr_12407 = new Array(6);
|
|
statearr_12407[0] = state_machine__4472__auto__;
|
|
statearr_12407[1] = 1;
|
|
return statearr_12407
|
|
};
|
|
var state_machine__4472__auto____1 = function(state_12397) {
|
|
while(true) {
|
|
var result__4473__auto__ = switch__4471__auto__.call(null, state_12397);
|
|
if(result__4473__auto__ === "\ufdd0:recur") {
|
|
continue
|
|
}else {
|
|
return result__4473__auto__
|
|
}
|
|
break
|
|
}
|
|
};
|
|
state_machine__4472__auto__ = function(state_12397) {
|
|
switch(arguments.length) {
|
|
case 0:
|
|
return state_machine__4472__auto____0.call(this);
|
|
case 1:
|
|
return state_machine__4472__auto____1.call(this, state_12397)
|
|
}
|
|
throw new Error("Invalid arity: " + arguments.length);
|
|
};
|
|
state_machine__4472__auto__.cljs$core$IFn$_invoke$arity$0 = state_machine__4472__auto____0;
|
|
state_machine__4472__auto__.cljs$core$IFn$_invoke$arity$1 = state_machine__4472__auto____1;
|
|
return state_machine__4472__auto__
|
|
}()
|
|
}(switch__4471__auto__)
|
|
}();
|
|
var state__4547__auto__ = function() {
|
|
var statearr_12408 = f__4546__auto__.call(null);
|
|
statearr_12408[cljs.core.async.impl.ioc_helpers.USER_START_IDX] = c__4545__auto___12409;
|
|
return statearr_12408
|
|
}();
|
|
return cljs.core.async.impl.ioc_helpers.run_state_machine.call(null, state__4547__auto__)
|
|
});
|
|
return c
|
|
};
|
|
fan_in = function(c, ins) {
|
|
switch(arguments.length) {
|
|
case 1:
|
|
return fan_in__1.call(this, c);
|
|
case 2:
|
|
return fan_in__2.call(this, c, ins)
|
|
}
|
|
throw new Error("Invalid arity: " + arguments.length);
|
|
};
|
|
fan_in.cljs$core$IFn$_invoke$arity$1 = fan_in__1;
|
|
fan_in.cljs$core$IFn$_invoke$arity$2 = fan_in__2;
|
|
return fan_in
|
|
}();
|
|
grub.async_utils.copy_chan = function() {
|
|
var copy_chan = null;
|
|
var copy_chan__1 = function(c) {
|
|
return cljs.core.first.call(null, grub.async_utils.fan_out.call(null, c, 1))
|
|
};
|
|
var copy_chan__2 = function(out, c) {
|
|
return cljs.core.first.call(null, grub.async_utils.fan_out.call(null, c, cljs.core.PersistentVector.fromArray([out], true)))
|
|
};
|
|
copy_chan = function(out, c) {
|
|
switch(arguments.length) {
|
|
case 1:
|
|
return copy_chan__1.call(this, out);
|
|
case 2:
|
|
return copy_chan__2.call(this, out, c)
|
|
}
|
|
throw new Error("Invalid arity: " + arguments.length);
|
|
};
|
|
copy_chan.cljs$core$IFn$_invoke$arity$1 = copy_chan__1;
|
|
copy_chan.cljs$core$IFn$_invoke$arity$2 = copy_chan__2;
|
|
return copy_chan
|
|
}();
|
|
grub.async_utils.event_chan = function() {
|
|
var event_chan = null;
|
|
var event_chan__1 = function(type) {
|
|
return event_chan.call(null, window, type)
|
|
};
|
|
var event_chan__2 = function(el, type) {
|
|
return event_chan.call(null, cljs.core.async.chan.call(null), el, type)
|
|
};
|
|
var event_chan__3 = function(c, el, type) {
|
|
var writer = function(p1__12416_SHARP_) {
|
|
return cljs.core.async.put_BANG_.call(null, c, p1__12416_SHARP_)
|
|
};
|
|
el.addEventListener(type, writer);
|
|
return cljs.core.PersistentArrayMap.fromArray(["\ufdd0:chan", c, "\ufdd0:unsubscribe", function() {
|
|
return el.removeEventListener(type, writer)
|
|
}], true)
|
|
};
|
|
event_chan = function(c, el, type) {
|
|
switch(arguments.length) {
|
|
case 1:
|
|
return event_chan__1.call(this, c);
|
|
case 2:
|
|
return event_chan__2.call(this, c, el);
|
|
case 3:
|
|
return event_chan__3.call(this, c, el, type)
|
|
}
|
|
throw new Error("Invalid arity: " + arguments.length);
|
|
};
|
|
event_chan.cljs$core$IFn$_invoke$arity$1 = event_chan__1;
|
|
event_chan.cljs$core$IFn$_invoke$arity$2 = event_chan__2;
|
|
event_chan.cljs$core$IFn$_invoke$arity$3 = event_chan__3;
|
|
return event_chan
|
|
}();
|
|
grub.async_utils.map_chan = function() {
|
|
var map_chan = null;
|
|
var map_chan__2 = function(f, source) {
|
|
return map_chan.call(null, cljs.core.async.chan.call(null), f, source)
|
|
};
|
|
var map_chan__3 = function(c, f, source) {
|
|
var c__4545__auto___12467 = cljs.core.async.chan.call(null, 1);
|
|
cljs.core.async.impl.dispatch.run.call(null, function() {
|
|
var f__4546__auto__ = function() {
|
|
var switch__4471__auto__ = function(state_12455) {
|
|
var state_val_12456 = state_12455[1];
|
|
if(state_val_12456 === 8) {
|
|
var inst_12445 = state_12455[2];
|
|
var inst_12446 = f.call(null, inst_12445);
|
|
var state_12455__$1 = state_12455;
|
|
return cljs.core.async.impl.ioc_helpers.put_BANG_.call(null, state_12455__$1, 7, c, inst_12446)
|
|
}else {
|
|
if(state_val_12456 === 7) {
|
|
var inst_12448 = state_12455[2];
|
|
var state_12455__$1 = function() {
|
|
var statearr_12457 = state_12455;
|
|
statearr_12457[5] = inst_12448;
|
|
return statearr_12457
|
|
}();
|
|
var statearr_12458_12468 = state_12455__$1;
|
|
statearr_12458_12468[2] = null;
|
|
statearr_12458_12468[1] = 2;
|
|
return"\ufdd0:recur"
|
|
}else {
|
|
if(state_val_12456 === 6) {
|
|
var inst_12451 = state_12455[2];
|
|
var state_12455__$1 = state_12455;
|
|
var statearr_12459_12469 = state_12455__$1;
|
|
statearr_12459_12469[2] = inst_12451;
|
|
statearr_12459_12469[1] = 3;
|
|
return"\ufdd0:recur"
|
|
}else {
|
|
if(state_val_12456 === 5) {
|
|
var state_12455__$1 = state_12455;
|
|
var statearr_12460_12470 = state_12455__$1;
|
|
statearr_12460_12470[2] = null;
|
|
statearr_12460_12470[1] = 6;
|
|
return"\ufdd0:recur"
|
|
}else {
|
|
if(state_val_12456 === 4) {
|
|
var state_12455__$1 = state_12455;
|
|
return cljs.core.async.impl.ioc_helpers.take_BANG_.call(null, state_12455__$1, 8, source)
|
|
}else {
|
|
if(state_val_12456 === 3) {
|
|
var inst_12453 = state_12455[2];
|
|
var state_12455__$1 = state_12455;
|
|
return cljs.core.async.impl.ioc_helpers.return_chan.call(null, state_12455__$1, inst_12453)
|
|
}else {
|
|
if(state_val_12456 === 2) {
|
|
var state_12455__$1 = state_12455;
|
|
if(true) {
|
|
var statearr_12461_12471 = state_12455__$1;
|
|
statearr_12461_12471[1] = 4
|
|
}else {
|
|
var statearr_12462_12472 = state_12455__$1;
|
|
statearr_12462_12472[1] = 5
|
|
}
|
|
return"\ufdd0:recur"
|
|
}else {
|
|
if(state_val_12456 === 1) {
|
|
var state_12455__$1 = state_12455;
|
|
var statearr_12463_12473 = state_12455__$1;
|
|
statearr_12463_12473[2] = null;
|
|
statearr_12463_12473[1] = 2;
|
|
return"\ufdd0:recur"
|
|
}else {
|
|
return null
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
};
|
|
return function(switch__4471__auto__) {
|
|
return function() {
|
|
var state_machine__4472__auto__ = null;
|
|
var state_machine__4472__auto____0 = function() {
|
|
var statearr_12465 = new Array(6);
|
|
statearr_12465[0] = state_machine__4472__auto__;
|
|
statearr_12465[1] = 1;
|
|
return statearr_12465
|
|
};
|
|
var state_machine__4472__auto____1 = function(state_12455) {
|
|
while(true) {
|
|
var result__4473__auto__ = switch__4471__auto__.call(null, state_12455);
|
|
if(result__4473__auto__ === "\ufdd0:recur") {
|
|
continue
|
|
}else {
|
|
return result__4473__auto__
|
|
}
|
|
break
|
|
}
|
|
};
|
|
state_machine__4472__auto__ = function(state_12455) {
|
|
switch(arguments.length) {
|
|
case 0:
|
|
return state_machine__4472__auto____0.call(this);
|
|
case 1:
|
|
return state_machine__4472__auto____1.call(this, state_12455)
|
|
}
|
|
throw new Error("Invalid arity: " + arguments.length);
|
|
};
|
|
state_machine__4472__auto__.cljs$core$IFn$_invoke$arity$0 = state_machine__4472__auto____0;
|
|
state_machine__4472__auto__.cljs$core$IFn$_invoke$arity$1 = state_machine__4472__auto____1;
|
|
return state_machine__4472__auto__
|
|
}()
|
|
}(switch__4471__auto__)
|
|
}();
|
|
var state__4547__auto__ = function() {
|
|
var statearr_12466 = f__4546__auto__.call(null);
|
|
statearr_12466[cljs.core.async.impl.ioc_helpers.USER_START_IDX] = c__4545__auto___12467;
|
|
return statearr_12466
|
|
}();
|
|
return cljs.core.async.impl.ioc_helpers.run_state_machine.call(null, state__4547__auto__)
|
|
});
|
|
return c
|
|
};
|
|
map_chan = function(c, f, source) {
|
|
switch(arguments.length) {
|
|
case 2:
|
|
return map_chan__2.call(this, c, f);
|
|
case 3:
|
|
return map_chan__3.call(this, c, f, source)
|
|
}
|
|
throw new Error("Invalid arity: " + arguments.length);
|
|
};
|
|
map_chan.cljs$core$IFn$_invoke$arity$2 = map_chan__2;
|
|
map_chan.cljs$core$IFn$_invoke$arity$3 = map_chan__3;
|
|
return map_chan
|
|
}();
|
|
grub.async_utils.filter_chan = function() {
|
|
var filter_chan = null;
|
|
var filter_chan__2 = function(f, source) {
|
|
return filter_chan.call(null, cljs.core.async.chan.call(null), f, source)
|
|
};
|
|
var filter_chan__3 = function(c, f, source) {
|
|
var c__4545__auto___12542 = cljs.core.async.chan.call(null, 1);
|
|
cljs.core.async.impl.dispatch.run.call(null, function() {
|
|
var f__4546__auto__ = function() {
|
|
var switch__4471__auto__ = function(state_12525) {
|
|
var state_val_12526 = state_12525[1];
|
|
if(state_val_12526 === 1) {
|
|
var state_12525__$1 = state_12525;
|
|
var statearr_12527_12543 = state_12525__$1;
|
|
statearr_12527_12543[2] = null;
|
|
statearr_12527_12543[1] = 2;
|
|
return"\ufdd0:recur"
|
|
}else {
|
|
if(state_val_12526 === 2) {
|
|
var state_12525__$1 = state_12525;
|
|
if(true) {
|
|
var statearr_12528_12544 = state_12525__$1;
|
|
statearr_12528_12544[1] = 4
|
|
}else {
|
|
var statearr_12529_12545 = state_12525__$1;
|
|
statearr_12529_12545[1] = 5
|
|
}
|
|
return"\ufdd0:recur"
|
|
}else {
|
|
if(state_val_12526 === 3) {
|
|
var inst_12523 = state_12525[2];
|
|
var state_12525__$1 = state_12525;
|
|
return cljs.core.async.impl.ioc_helpers.return_chan.call(null, state_12525__$1, inst_12523)
|
|
}else {
|
|
if(state_val_12526 === 4) {
|
|
var state_12525__$1 = state_12525;
|
|
return cljs.core.async.impl.ioc_helpers.take_BANG_.call(null, state_12525__$1, 7, source)
|
|
}else {
|
|
if(state_val_12526 === 5) {
|
|
var state_12525__$1 = state_12525;
|
|
var statearr_12530_12546 = state_12525__$1;
|
|
statearr_12530_12546[2] = null;
|
|
statearr_12530_12546[1] = 6;
|
|
return"\ufdd0:recur"
|
|
}else {
|
|
if(state_val_12526 === 6) {
|
|
var inst_12521 = state_12525[2];
|
|
var state_12525__$1 = state_12525;
|
|
var statearr_12531_12547 = state_12525__$1;
|
|
statearr_12531_12547[2] = inst_12521;
|
|
statearr_12531_12547[1] = 3;
|
|
return"\ufdd0:recur"
|
|
}else {
|
|
if(state_val_12526 === 7) {
|
|
var inst_12511 = state_12525[5];
|
|
var inst_12511__$1 = state_12525[2];
|
|
var inst_12512 = f.call(null, inst_12511__$1);
|
|
var state_12525__$1 = function() {
|
|
var statearr_12532 = state_12525;
|
|
statearr_12532[5] = inst_12511__$1;
|
|
return statearr_12532
|
|
}();
|
|
if(cljs.core.truth_(inst_12512)) {
|
|
var statearr_12533_12548 = state_12525__$1;
|
|
statearr_12533_12548[1] = 8
|
|
}else {
|
|
var statearr_12534_12549 = state_12525__$1;
|
|
statearr_12534_12549[1] = 9
|
|
}
|
|
return"\ufdd0:recur"
|
|
}else {
|
|
if(state_val_12526 === 8) {
|
|
var inst_12511 = state_12525[5];
|
|
var state_12525__$1 = state_12525;
|
|
return cljs.core.async.impl.ioc_helpers.put_BANG_.call(null, state_12525__$1, 11, c, inst_12511)
|
|
}else {
|
|
if(state_val_12526 === 9) {
|
|
var state_12525__$1 = state_12525;
|
|
var statearr_12535_12550 = state_12525__$1;
|
|
statearr_12535_12550[2] = null;
|
|
statearr_12535_12550[1] = 10;
|
|
return"\ufdd0:recur"
|
|
}else {
|
|
if(state_val_12526 === 10) {
|
|
var inst_12518 = state_12525[2];
|
|
var state_12525__$1 = function() {
|
|
var statearr_12536 = state_12525;
|
|
statearr_12536[6] = inst_12518;
|
|
return statearr_12536
|
|
}();
|
|
var statearr_12537_12551 = state_12525__$1;
|
|
statearr_12537_12551[2] = null;
|
|
statearr_12537_12551[1] = 2;
|
|
return"\ufdd0:recur"
|
|
}else {
|
|
if(state_val_12526 === 11) {
|
|
var inst_12515 = state_12525[2];
|
|
var state_12525__$1 = state_12525;
|
|
var statearr_12538_12552 = state_12525__$1;
|
|
statearr_12538_12552[2] = inst_12515;
|
|
statearr_12538_12552[1] = 10;
|
|
return"\ufdd0:recur"
|
|
}else {
|
|
return null
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
};
|
|
return function(switch__4471__auto__) {
|
|
return function() {
|
|
var state_machine__4472__auto__ = null;
|
|
var state_machine__4472__auto____0 = function() {
|
|
var statearr_12540 = new Array(7);
|
|
statearr_12540[0] = state_machine__4472__auto__;
|
|
statearr_12540[1] = 1;
|
|
return statearr_12540
|
|
};
|
|
var state_machine__4472__auto____1 = function(state_12525) {
|
|
while(true) {
|
|
var result__4473__auto__ = switch__4471__auto__.call(null, state_12525);
|
|
if(result__4473__auto__ === "\ufdd0:recur") {
|
|
continue
|
|
}else {
|
|
return result__4473__auto__
|
|
}
|
|
break
|
|
}
|
|
};
|
|
state_machine__4472__auto__ = function(state_12525) {
|
|
switch(arguments.length) {
|
|
case 0:
|
|
return state_machine__4472__auto____0.call(this);
|
|
case 1:
|
|
return state_machine__4472__auto____1.call(this, state_12525)
|
|
}
|
|
throw new Error("Invalid arity: " + arguments.length);
|
|
};
|
|
state_machine__4472__auto__.cljs$core$IFn$_invoke$arity$0 = state_machine__4472__auto____0;
|
|
state_machine__4472__auto__.cljs$core$IFn$_invoke$arity$1 = state_machine__4472__auto____1;
|
|
return state_machine__4472__auto__
|
|
}()
|
|
}(switch__4471__auto__)
|
|
}();
|
|
var state__4547__auto__ = function() {
|
|
var statearr_12541 = f__4546__auto__.call(null);
|
|
statearr_12541[cljs.core.async.impl.ioc_helpers.USER_START_IDX] = c__4545__auto___12542;
|
|
return statearr_12541
|
|
}();
|
|
return cljs.core.async.impl.ioc_helpers.run_state_machine.call(null, state__4547__auto__)
|
|
});
|
|
return c
|
|
};
|
|
filter_chan = function(c, f, source) {
|
|
switch(arguments.length) {
|
|
case 2:
|
|
return filter_chan__2.call(this, c, f);
|
|
case 3:
|
|
return filter_chan__3.call(this, c, f, source)
|
|
}
|
|
throw new Error("Invalid arity: " + arguments.length);
|
|
};
|
|
filter_chan.cljs$core$IFn$_invoke$arity$2 = filter_chan__2;
|
|
filter_chan.cljs$core$IFn$_invoke$arity$3 = filter_chan__3;
|
|
return filter_chan
|
|
}();
|
|
grub.async_utils.do_chan_BANG_ = function do_chan_BANG_(f, source) {
|
|
var c__4545__auto__ = cljs.core.async.chan.call(null, 1);
|
|
cljs.core.async.impl.dispatch.run.call(null, function() {
|
|
var f__4546__auto__ = function() {
|
|
var switch__4471__auto__ = function(state_12587) {
|
|
var state_val_12588 = state_12587[1];
|
|
if(state_val_12588 === 7) {
|
|
var inst_12579 = state_12587[2];
|
|
var inst_12580 = f.call(null, inst_12579);
|
|
var state_12587__$1 = function() {
|
|
var statearr_12589 = state_12587;
|
|
statearr_12589[5] = inst_12580;
|
|
return statearr_12589
|
|
}();
|
|
var statearr_12590_12599 = state_12587__$1;
|
|
statearr_12590_12599[2] = null;
|
|
statearr_12590_12599[1] = 2;
|
|
return"\ufdd0:recur"
|
|
}else {
|
|
if(state_val_12588 === 6) {
|
|
var inst_12583 = state_12587[2];
|
|
var state_12587__$1 = state_12587;
|
|
var statearr_12591_12600 = state_12587__$1;
|
|
statearr_12591_12600[2] = inst_12583;
|
|
statearr_12591_12600[1] = 3;
|
|
return"\ufdd0:recur"
|
|
}else {
|
|
if(state_val_12588 === 5) {
|
|
var state_12587__$1 = state_12587;
|
|
var statearr_12592_12601 = state_12587__$1;
|
|
statearr_12592_12601[2] = null;
|
|
statearr_12592_12601[1] = 6;
|
|
return"\ufdd0:recur"
|
|
}else {
|
|
if(state_val_12588 === 4) {
|
|
var state_12587__$1 = state_12587;
|
|
return cljs.core.async.impl.ioc_helpers.take_BANG_.call(null, state_12587__$1, 7, source)
|
|
}else {
|
|
if(state_val_12588 === 3) {
|
|
var inst_12585 = state_12587[2];
|
|
var state_12587__$1 = state_12587;
|
|
return cljs.core.async.impl.ioc_helpers.return_chan.call(null, state_12587__$1, inst_12585)
|
|
}else {
|
|
if(state_val_12588 === 2) {
|
|
var state_12587__$1 = state_12587;
|
|
if(true) {
|
|
var statearr_12593_12602 = state_12587__$1;
|
|
statearr_12593_12602[1] = 4
|
|
}else {
|
|
var statearr_12594_12603 = state_12587__$1;
|
|
statearr_12594_12603[1] = 5
|
|
}
|
|
return"\ufdd0:recur"
|
|
}else {
|
|
if(state_val_12588 === 1) {
|
|
var state_12587__$1 = state_12587;
|
|
var statearr_12595_12604 = state_12587__$1;
|
|
statearr_12595_12604[2] = null;
|
|
statearr_12595_12604[1] = 2;
|
|
return"\ufdd0:recur"
|
|
}else {
|
|
return null
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
};
|
|
return function(switch__4471__auto__) {
|
|
return function() {
|
|
var state_machine__4472__auto__ = null;
|
|
var state_machine__4472__auto____0 = function() {
|
|
var statearr_12597 = new Array(6);
|
|
statearr_12597[0] = state_machine__4472__auto__;
|
|
statearr_12597[1] = 1;
|
|
return statearr_12597
|
|
};
|
|
var state_machine__4472__auto____1 = function(state_12587) {
|
|
while(true) {
|
|
var result__4473__auto__ = switch__4471__auto__.call(null, state_12587);
|
|
if(result__4473__auto__ === "\ufdd0:recur") {
|
|
continue
|
|
}else {
|
|
return result__4473__auto__
|
|
}
|
|
break
|
|
}
|
|
};
|
|
state_machine__4472__auto__ = function(state_12587) {
|
|
switch(arguments.length) {
|
|
case 0:
|
|
return state_machine__4472__auto____0.call(this);
|
|
case 1:
|
|
return state_machine__4472__auto____1.call(this, state_12587)
|
|
}
|
|
throw new Error("Invalid arity: " + arguments.length);
|
|
};
|
|
state_machine__4472__auto__.cljs$core$IFn$_invoke$arity$0 = state_machine__4472__auto____0;
|
|
state_machine__4472__auto__.cljs$core$IFn$_invoke$arity$1 = state_machine__4472__auto____1;
|
|
return state_machine__4472__auto__
|
|
}()
|
|
}(switch__4471__auto__)
|
|
}();
|
|
var state__4547__auto__ = function() {
|
|
var statearr_12598 = f__4546__auto__.call(null);
|
|
statearr_12598[cljs.core.async.impl.ioc_helpers.USER_START_IDX] = c__4545__auto__;
|
|
return statearr_12598
|
|
}();
|
|
return cljs.core.async.impl.ioc_helpers.run_state_machine.call(null, state__4547__auto__)
|
|
});
|
|
return c__4545__auto__
|
|
};
|
|
grub.async_utils.do_chan = function do_chan(f, source) {
|
|
var out = cljs.core.async.chan.call(null);
|
|
var c__4545__auto___12657 = cljs.core.async.chan.call(null, 1);
|
|
cljs.core.async.impl.dispatch.run.call(null, function() {
|
|
var f__4546__auto__ = function() {
|
|
var switch__4471__auto__ = function(state_12644) {
|
|
var state_val_12645 = state_12644[1];
|
|
if(state_val_12645 === 8) {
|
|
var inst_12637 = state_12644[2];
|
|
var state_12644__$1 = function() {
|
|
var statearr_12646 = state_12644;
|
|
statearr_12646[5] = inst_12637;
|
|
return statearr_12646
|
|
}();
|
|
var statearr_12647_12658 = state_12644__$1;
|
|
statearr_12647_12658[2] = null;
|
|
statearr_12647_12658[1] = 2;
|
|
return"\ufdd0:recur"
|
|
}else {
|
|
if(state_val_12645 === 7) {
|
|
var inst_12634 = state_12644[2];
|
|
var inst_12635 = f.call(null, inst_12634);
|
|
var state_12644__$1 = function() {
|
|
var statearr_12648 = state_12644;
|
|
statearr_12648[6] = inst_12635;
|
|
return statearr_12648
|
|
}();
|
|
return cljs.core.async.impl.ioc_helpers.put_BANG_.call(null, state_12644__$1, 8, out, inst_12634)
|
|
}else {
|
|
if(state_val_12645 === 6) {
|
|
var inst_12640 = state_12644[2];
|
|
var state_12644__$1 = state_12644;
|
|
var statearr_12649_12659 = state_12644__$1;
|
|
statearr_12649_12659[2] = inst_12640;
|
|
statearr_12649_12659[1] = 3;
|
|
return"\ufdd0:recur"
|
|
}else {
|
|
if(state_val_12645 === 5) {
|
|
var state_12644__$1 = state_12644;
|
|
var statearr_12650_12660 = state_12644__$1;
|
|
statearr_12650_12660[2] = null;
|
|
statearr_12650_12660[1] = 6;
|
|
return"\ufdd0:recur"
|
|
}else {
|
|
if(state_val_12645 === 4) {
|
|
var state_12644__$1 = state_12644;
|
|
return cljs.core.async.impl.ioc_helpers.take_BANG_.call(null, state_12644__$1, 7, source)
|
|
}else {
|
|
if(state_val_12645 === 3) {
|
|
var inst_12642 = state_12644[2];
|
|
var state_12644__$1 = state_12644;
|
|
return cljs.core.async.impl.ioc_helpers.return_chan.call(null, state_12644__$1, inst_12642)
|
|
}else {
|
|
if(state_val_12645 === 2) {
|
|
var state_12644__$1 = state_12644;
|
|
if(true) {
|
|
var statearr_12651_12661 = state_12644__$1;
|
|
statearr_12651_12661[1] = 4
|
|
}else {
|
|
var statearr_12652_12662 = state_12644__$1;
|
|
statearr_12652_12662[1] = 5
|
|
}
|
|
return"\ufdd0:recur"
|
|
}else {
|
|
if(state_val_12645 === 1) {
|
|
var state_12644__$1 = state_12644;
|
|
var statearr_12653_12663 = state_12644__$1;
|
|
statearr_12653_12663[2] = null;
|
|
statearr_12653_12663[1] = 2;
|
|
return"\ufdd0:recur"
|
|
}else {
|
|
return null
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
};
|
|
return function(switch__4471__auto__) {
|
|
return function() {
|
|
var state_machine__4472__auto__ = null;
|
|
var state_machine__4472__auto____0 = function() {
|
|
var statearr_12655 = new Array(7);
|
|
statearr_12655[0] = state_machine__4472__auto__;
|
|
statearr_12655[1] = 1;
|
|
return statearr_12655
|
|
};
|
|
var state_machine__4472__auto____1 = function(state_12644) {
|
|
while(true) {
|
|
var result__4473__auto__ = switch__4471__auto__.call(null, state_12644);
|
|
if(result__4473__auto__ === "\ufdd0:recur") {
|
|
continue
|
|
}else {
|
|
return result__4473__auto__
|
|
}
|
|
break
|
|
}
|
|
};
|
|
state_machine__4472__auto__ = function(state_12644) {
|
|
switch(arguments.length) {
|
|
case 0:
|
|
return state_machine__4472__auto____0.call(this);
|
|
case 1:
|
|
return state_machine__4472__auto____1.call(this, state_12644)
|
|
}
|
|
throw new Error("Invalid arity: " + arguments.length);
|
|
};
|
|
state_machine__4472__auto__.cljs$core$IFn$_invoke$arity$0 = state_machine__4472__auto____0;
|
|
state_machine__4472__auto__.cljs$core$IFn$_invoke$arity$1 = state_machine__4472__auto____1;
|
|
return state_machine__4472__auto__
|
|
}()
|
|
}(switch__4471__auto__)
|
|
}();
|
|
var state__4547__auto__ = function() {
|
|
var statearr_12656 = f__4546__auto__.call(null);
|
|
statearr_12656[cljs.core.async.impl.ioc_helpers.USER_START_IDX] = c__4545__auto___12657;
|
|
return statearr_12656
|
|
}();
|
|
return cljs.core.async.impl.ioc_helpers.run_state_machine.call(null, state__4547__auto__)
|
|
});
|
|
return out
|
|
};
|
|
goog.provide("dommy.attrs");
|
|
goog.require("cljs.core");
|
|
goog.require("clojure.string");
|
|
dommy.attrs.class_match_QMARK_ = function class_match_QMARK_(class_name, class$, idx) {
|
|
var and__3941__auto__ = function() {
|
|
var or__3943__auto__ = idx === 0;
|
|
if(or__3943__auto__) {
|
|
return or__3943__auto__
|
|
}else {
|
|
return" " === class_name.charAt(idx - 1)
|
|
}
|
|
}();
|
|
if(cljs.core.truth_(and__3941__auto__)) {
|
|
var total_len = class_name.length;
|
|
var stop = idx + class$.length;
|
|
if(stop <= total_len) {
|
|
var or__3943__auto__ = stop === total_len;
|
|
if(or__3943__auto__) {
|
|
return or__3943__auto__
|
|
}else {
|
|
return" " === class_name.charAt(stop)
|
|
}
|
|
}else {
|
|
return null
|
|
}
|
|
}else {
|
|
return and__3941__auto__
|
|
}
|
|
};
|
|
dommy.attrs.class_index = function class_index(class_name, class$) {
|
|
var start_from = 0;
|
|
while(true) {
|
|
var i = class_name.indexOf(class$, start_from);
|
|
if(i >= 0) {
|
|
if(dommy.attrs.class_match_QMARK_.call(null, class_name, class$, i)) {
|
|
return i
|
|
}else {
|
|
var G__15053 = i + class$.length;
|
|
start_from = G__15053;
|
|
continue
|
|
}
|
|
}else {
|
|
return null
|
|
}
|
|
break
|
|
}
|
|
};
|
|
dommy.attrs.has_class_QMARK_ = function has_class_QMARK_(elem, class$) {
|
|
var elem__$1 = dommy.template.__GT_node_like.call(null, elem);
|
|
var class$__$1 = cljs.core.name.call(null, class$);
|
|
var temp__4090__auto__ = elem__$1.classList;
|
|
if(cljs.core.truth_(temp__4090__auto__)) {
|
|
var class_list = temp__4090__auto__;
|
|
return class_list.contains(class$__$1)
|
|
}else {
|
|
var temp__4092__auto__ = elem__$1.className;
|
|
if(cljs.core.truth_(temp__4092__auto__)) {
|
|
var class_name = temp__4092__auto__;
|
|
var temp__4092__auto____$1 = dommy.attrs.class_index.call(null, class_name, class$__$1);
|
|
if(cljs.core.truth_(temp__4092__auto____$1)) {
|
|
var i = temp__4092__auto____$1;
|
|
return i >= 0
|
|
}else {
|
|
return null
|
|
}
|
|
}else {
|
|
return null
|
|
}
|
|
}
|
|
};
|
|
dommy.attrs.add_class_BANG_ = function() {
|
|
var add_class_BANG_ = null;
|
|
var add_class_BANG___2 = function(elem, classes) {
|
|
var elem__$1 = dommy.template.__GT_node_like.call(null, elem);
|
|
var classes__$1 = clojure.string.trim.call(null, cljs.core.name.call(null, classes));
|
|
if(cljs.core.seq.call(null, classes__$1)) {
|
|
var temp__4090__auto___15078 = elem__$1.classList;
|
|
if(cljs.core.truth_(temp__4090__auto___15078)) {
|
|
var class_list_15079 = temp__4090__auto___15078;
|
|
var seq__15066_15080 = cljs.core.seq.call(null, classes__$1.split(/\s+/));
|
|
var chunk__15067_15081 = null;
|
|
var count__15068_15082 = 0;
|
|
var i__15069_15083 = 0;
|
|
while(true) {
|
|
if(i__15069_15083 < count__15068_15082) {
|
|
var class_15084 = cljs.core._nth.call(null, chunk__15067_15081, i__15069_15083);
|
|
class_list_15079.add(class_15084);
|
|
var G__15085 = seq__15066_15080;
|
|
var G__15086 = chunk__15067_15081;
|
|
var G__15087 = count__15068_15082;
|
|
var G__15088 = i__15069_15083 + 1;
|
|
seq__15066_15080 = G__15085;
|
|
chunk__15067_15081 = G__15086;
|
|
count__15068_15082 = G__15087;
|
|
i__15069_15083 = G__15088;
|
|
continue
|
|
}else {
|
|
var temp__4092__auto___15089 = cljs.core.seq.call(null, seq__15066_15080);
|
|
if(temp__4092__auto___15089) {
|
|
var seq__15066_15090__$1 = temp__4092__auto___15089;
|
|
if(cljs.core.chunked_seq_QMARK_.call(null, seq__15066_15090__$1)) {
|
|
var c__3037__auto___15091 = cljs.core.chunk_first.call(null, seq__15066_15090__$1);
|
|
var G__15092 = cljs.core.chunk_rest.call(null, seq__15066_15090__$1);
|
|
var G__15093 = c__3037__auto___15091;
|
|
var G__15094 = cljs.core.count.call(null, c__3037__auto___15091);
|
|
var G__15095 = 0;
|
|
seq__15066_15080 = G__15092;
|
|
chunk__15067_15081 = G__15093;
|
|
count__15068_15082 = G__15094;
|
|
i__15069_15083 = G__15095;
|
|
continue
|
|
}else {
|
|
var class_15096 = cljs.core.first.call(null, seq__15066_15090__$1);
|
|
class_list_15079.add(class_15096);
|
|
var G__15097 = cljs.core.next.call(null, seq__15066_15090__$1);
|
|
var G__15098 = null;
|
|
var G__15099 = 0;
|
|
var G__15100 = 0;
|
|
seq__15066_15080 = G__15097;
|
|
chunk__15067_15081 = G__15098;
|
|
count__15068_15082 = G__15099;
|
|
i__15069_15083 = G__15100;
|
|
continue
|
|
}
|
|
}else {
|
|
}
|
|
}
|
|
break
|
|
}
|
|
}else {
|
|
var class_name_15101 = elem__$1.className;
|
|
var seq__15070_15102 = cljs.core.seq.call(null, classes__$1.split(/\s+/));
|
|
var chunk__15071_15103 = null;
|
|
var count__15072_15104 = 0;
|
|
var i__15073_15105 = 0;
|
|
while(true) {
|
|
if(i__15073_15105 < count__15072_15104) {
|
|
var class_15106 = cljs.core._nth.call(null, chunk__15071_15103, i__15073_15105);
|
|
if(cljs.core.truth_(dommy.attrs.class_index.call(null, class_name_15101, class_15106))) {
|
|
}else {
|
|
elem__$1.className = class_name_15101 === "" ? class_15106 : [cljs.core.str(class_name_15101), cljs.core.str(" "), cljs.core.str(class_15106)].join("")
|
|
}
|
|
var G__15107 = seq__15070_15102;
|
|
var G__15108 = chunk__15071_15103;
|
|
var G__15109 = count__15072_15104;
|
|
var G__15110 = i__15073_15105 + 1;
|
|
seq__15070_15102 = G__15107;
|
|
chunk__15071_15103 = G__15108;
|
|
count__15072_15104 = G__15109;
|
|
i__15073_15105 = G__15110;
|
|
continue
|
|
}else {
|
|
var temp__4092__auto___15111 = cljs.core.seq.call(null, seq__15070_15102);
|
|
if(temp__4092__auto___15111) {
|
|
var seq__15070_15112__$1 = temp__4092__auto___15111;
|
|
if(cljs.core.chunked_seq_QMARK_.call(null, seq__15070_15112__$1)) {
|
|
var c__3037__auto___15113 = cljs.core.chunk_first.call(null, seq__15070_15112__$1);
|
|
var G__15114 = cljs.core.chunk_rest.call(null, seq__15070_15112__$1);
|
|
var G__15115 = c__3037__auto___15113;
|
|
var G__15116 = cljs.core.count.call(null, c__3037__auto___15113);
|
|
var G__15117 = 0;
|
|
seq__15070_15102 = G__15114;
|
|
chunk__15071_15103 = G__15115;
|
|
count__15072_15104 = G__15116;
|
|
i__15073_15105 = G__15117;
|
|
continue
|
|
}else {
|
|
var class_15118 = cljs.core.first.call(null, seq__15070_15112__$1);
|
|
if(cljs.core.truth_(dommy.attrs.class_index.call(null, class_name_15101, class_15118))) {
|
|
}else {
|
|
elem__$1.className = class_name_15101 === "" ? class_15118 : [cljs.core.str(class_name_15101), cljs.core.str(" "), cljs.core.str(class_15118)].join("")
|
|
}
|
|
var G__15119 = cljs.core.next.call(null, seq__15070_15112__$1);
|
|
var G__15120 = null;
|
|
var G__15121 = 0;
|
|
var G__15122 = 0;
|
|
seq__15070_15102 = G__15119;
|
|
chunk__15071_15103 = G__15120;
|
|
count__15072_15104 = G__15121;
|
|
i__15073_15105 = G__15122;
|
|
continue
|
|
}
|
|
}else {
|
|
}
|
|
}
|
|
break
|
|
}
|
|
}
|
|
}else {
|
|
}
|
|
return elem__$1
|
|
};
|
|
var add_class_BANG___3 = function() {
|
|
var G__15123__delegate = function(elem, classes, more_classes) {
|
|
var elem__$1 = dommy.template.__GT_node_like.call(null, elem);
|
|
var seq__15074_15124 = cljs.core.seq.call(null, cljs.core.conj.call(null, more_classes, classes));
|
|
var chunk__15075_15125 = null;
|
|
var count__15076_15126 = 0;
|
|
var i__15077_15127 = 0;
|
|
while(true) {
|
|
if(i__15077_15127 < count__15076_15126) {
|
|
var c_15128 = cljs.core._nth.call(null, chunk__15075_15125, i__15077_15127);
|
|
add_class_BANG_.call(null, elem__$1, c_15128);
|
|
var G__15129 = seq__15074_15124;
|
|
var G__15130 = chunk__15075_15125;
|
|
var G__15131 = count__15076_15126;
|
|
var G__15132 = i__15077_15127 + 1;
|
|
seq__15074_15124 = G__15129;
|
|
chunk__15075_15125 = G__15130;
|
|
count__15076_15126 = G__15131;
|
|
i__15077_15127 = G__15132;
|
|
continue
|
|
}else {
|
|
var temp__4092__auto___15133 = cljs.core.seq.call(null, seq__15074_15124);
|
|
if(temp__4092__auto___15133) {
|
|
var seq__15074_15134__$1 = temp__4092__auto___15133;
|
|
if(cljs.core.chunked_seq_QMARK_.call(null, seq__15074_15134__$1)) {
|
|
var c__3037__auto___15135 = cljs.core.chunk_first.call(null, seq__15074_15134__$1);
|
|
var G__15136 = cljs.core.chunk_rest.call(null, seq__15074_15134__$1);
|
|
var G__15137 = c__3037__auto___15135;
|
|
var G__15138 = cljs.core.count.call(null, c__3037__auto___15135);
|
|
var G__15139 = 0;
|
|
seq__15074_15124 = G__15136;
|
|
chunk__15075_15125 = G__15137;
|
|
count__15076_15126 = G__15138;
|
|
i__15077_15127 = G__15139;
|
|
continue
|
|
}else {
|
|
var c_15140 = cljs.core.first.call(null, seq__15074_15134__$1);
|
|
add_class_BANG_.call(null, elem__$1, c_15140);
|
|
var G__15141 = cljs.core.next.call(null, seq__15074_15134__$1);
|
|
var G__15142 = null;
|
|
var G__15143 = 0;
|
|
var G__15144 = 0;
|
|
seq__15074_15124 = G__15141;
|
|
chunk__15075_15125 = G__15142;
|
|
count__15076_15126 = G__15143;
|
|
i__15077_15127 = G__15144;
|
|
continue
|
|
}
|
|
}else {
|
|
}
|
|
}
|
|
break
|
|
}
|
|
return elem__$1
|
|
};
|
|
var G__15123 = function(elem, classes, var_args) {
|
|
var more_classes = null;
|
|
if(arguments.length > 2) {
|
|
more_classes = cljs.core.array_seq(Array.prototype.slice.call(arguments, 2), 0)
|
|
}
|
|
return G__15123__delegate.call(this, elem, classes, more_classes)
|
|
};
|
|
G__15123.cljs$lang$maxFixedArity = 2;
|
|
G__15123.cljs$lang$applyTo = function(arglist__15145) {
|
|
var elem = cljs.core.first(arglist__15145);
|
|
arglist__15145 = cljs.core.next(arglist__15145);
|
|
var classes = cljs.core.first(arglist__15145);
|
|
var more_classes = cljs.core.rest(arglist__15145);
|
|
return G__15123__delegate(elem, classes, more_classes)
|
|
};
|
|
G__15123.cljs$core$IFn$_invoke$arity$variadic = G__15123__delegate;
|
|
return G__15123
|
|
}();
|
|
add_class_BANG_ = function(elem, classes, var_args) {
|
|
var more_classes = var_args;
|
|
switch(arguments.length) {
|
|
case 2:
|
|
return add_class_BANG___2.call(this, elem, classes);
|
|
default:
|
|
return add_class_BANG___3.cljs$core$IFn$_invoke$arity$variadic(elem, classes, cljs.core.array_seq(arguments, 2))
|
|
}
|
|
throw new Error("Invalid arity: " + arguments.length);
|
|
};
|
|
add_class_BANG_.cljs$lang$maxFixedArity = 2;
|
|
add_class_BANG_.cljs$lang$applyTo = add_class_BANG___3.cljs$lang$applyTo;
|
|
add_class_BANG_.cljs$core$IFn$_invoke$arity$2 = add_class_BANG___2;
|
|
add_class_BANG_.cljs$core$IFn$_invoke$arity$variadic = add_class_BANG___3.cljs$core$IFn$_invoke$arity$variadic;
|
|
return add_class_BANG_
|
|
}();
|
|
dommy.attrs.remove_class_str = function remove_class_str(init_class_name, class$) {
|
|
var class_name = init_class_name;
|
|
while(true) {
|
|
var class_len = class_name.length;
|
|
var temp__4090__auto__ = dommy.attrs.class_index.call(null, class_name, class$);
|
|
if(cljs.core.truth_(temp__4090__auto__)) {
|
|
var i = temp__4090__auto__;
|
|
var G__15146 = function() {
|
|
var end = i + class$.length;
|
|
return[cljs.core.str(end < class_len ? [cljs.core.str(class_name.substring(0, i)), cljs.core.str(class_name.substr(end + 1))].join("") : class_name.substring(0, i - 1))].join("")
|
|
}();
|
|
class_name = G__15146;
|
|
continue
|
|
}else {
|
|
return class_name
|
|
}
|
|
break
|
|
}
|
|
};
|
|
dommy.attrs.remove_class_BANG_ = function() {
|
|
var remove_class_BANG_ = null;
|
|
var remove_class_BANG___2 = function(elem, class$) {
|
|
var elem__$1 = dommy.template.__GT_node_like.call(null, elem);
|
|
var class$__$1 = cljs.core.name.call(null, class$);
|
|
var temp__4090__auto___15155 = elem__$1.classList;
|
|
if(cljs.core.truth_(temp__4090__auto___15155)) {
|
|
var class_list_15156 = temp__4090__auto___15155;
|
|
class_list_15156.remove(class$__$1)
|
|
}else {
|
|
var class_name_15157 = elem__$1.className;
|
|
var new_class_name_15158 = dommy.attrs.remove_class_str.call(null, class_name_15157, class$__$1);
|
|
if(class_name_15157 === new_class_name_15158) {
|
|
}else {
|
|
elem__$1.className = new_class_name_15158
|
|
}
|
|
}
|
|
return elem__$1
|
|
};
|
|
var remove_class_BANG___3 = function() {
|
|
var G__15159__delegate = function(elem, class$, classes) {
|
|
var elem__$1 = dommy.template.__GT_node_like.call(null, elem);
|
|
var seq__15151 = cljs.core.seq.call(null, cljs.core.conj.call(null, classes, class$));
|
|
var chunk__15152 = null;
|
|
var count__15153 = 0;
|
|
var i__15154 = 0;
|
|
while(true) {
|
|
if(i__15154 < count__15153) {
|
|
var c = cljs.core._nth.call(null, chunk__15152, i__15154);
|
|
remove_class_BANG_.call(null, elem__$1, c);
|
|
var G__15160 = seq__15151;
|
|
var G__15161 = chunk__15152;
|
|
var G__15162 = count__15153;
|
|
var G__15163 = i__15154 + 1;
|
|
seq__15151 = G__15160;
|
|
chunk__15152 = G__15161;
|
|
count__15153 = G__15162;
|
|
i__15154 = G__15163;
|
|
continue
|
|
}else {
|
|
var temp__4092__auto__ = cljs.core.seq.call(null, seq__15151);
|
|
if(temp__4092__auto__) {
|
|
var seq__15151__$1 = temp__4092__auto__;
|
|
if(cljs.core.chunked_seq_QMARK_.call(null, seq__15151__$1)) {
|
|
var c__3037__auto__ = cljs.core.chunk_first.call(null, seq__15151__$1);
|
|
var G__15164 = cljs.core.chunk_rest.call(null, seq__15151__$1);
|
|
var G__15165 = c__3037__auto__;
|
|
var G__15166 = cljs.core.count.call(null, c__3037__auto__);
|
|
var G__15167 = 0;
|
|
seq__15151 = G__15164;
|
|
chunk__15152 = G__15165;
|
|
count__15153 = G__15166;
|
|
i__15154 = G__15167;
|
|
continue
|
|
}else {
|
|
var c = cljs.core.first.call(null, seq__15151__$1);
|
|
remove_class_BANG_.call(null, elem__$1, c);
|
|
var G__15168 = cljs.core.next.call(null, seq__15151__$1);
|
|
var G__15169 = null;
|
|
var G__15170 = 0;
|
|
var G__15171 = 0;
|
|
seq__15151 = G__15168;
|
|
chunk__15152 = G__15169;
|
|
count__15153 = G__15170;
|
|
i__15154 = G__15171;
|
|
continue
|
|
}
|
|
}else {
|
|
return null
|
|
}
|
|
}
|
|
break
|
|
}
|
|
};
|
|
var G__15159 = function(elem, class$, var_args) {
|
|
var classes = null;
|
|
if(arguments.length > 2) {
|
|
classes = cljs.core.array_seq(Array.prototype.slice.call(arguments, 2), 0)
|
|
}
|
|
return G__15159__delegate.call(this, elem, class$, classes)
|
|
};
|
|
G__15159.cljs$lang$maxFixedArity = 2;
|
|
G__15159.cljs$lang$applyTo = function(arglist__15172) {
|
|
var elem = cljs.core.first(arglist__15172);
|
|
arglist__15172 = cljs.core.next(arglist__15172);
|
|
var class$ = cljs.core.first(arglist__15172);
|
|
var classes = cljs.core.rest(arglist__15172);
|
|
return G__15159__delegate(elem, class$, classes)
|
|
};
|
|
G__15159.cljs$core$IFn$_invoke$arity$variadic = G__15159__delegate;
|
|
return G__15159
|
|
}();
|
|
remove_class_BANG_ = function(elem, class$, var_args) {
|
|
var classes = var_args;
|
|
switch(arguments.length) {
|
|
case 2:
|
|
return remove_class_BANG___2.call(this, elem, class$);
|
|
default:
|
|
return remove_class_BANG___3.cljs$core$IFn$_invoke$arity$variadic(elem, class$, cljs.core.array_seq(arguments, 2))
|
|
}
|
|
throw new Error("Invalid arity: " + arguments.length);
|
|
};
|
|
remove_class_BANG_.cljs$lang$maxFixedArity = 2;
|
|
remove_class_BANG_.cljs$lang$applyTo = remove_class_BANG___3.cljs$lang$applyTo;
|
|
remove_class_BANG_.cljs$core$IFn$_invoke$arity$2 = remove_class_BANG___2;
|
|
remove_class_BANG_.cljs$core$IFn$_invoke$arity$variadic = remove_class_BANG___3.cljs$core$IFn$_invoke$arity$variadic;
|
|
return remove_class_BANG_
|
|
}();
|
|
dommy.attrs.toggle_class_BANG_ = function() {
|
|
var toggle_class_BANG_ = null;
|
|
var toggle_class_BANG___2 = function(elem, class$) {
|
|
var elem__$1 = dommy.template.__GT_node_like.call(null, elem);
|
|
var temp__4090__auto___15173 = elem__$1.classList;
|
|
if(cljs.core.truth_(temp__4090__auto___15173)) {
|
|
var class_list_15174 = temp__4090__auto___15173;
|
|
class_list_15174.toggle(class$)
|
|
}else {
|
|
toggle_class_BANG_.call(null, elem__$1, class$, !dommy.attrs.has_class_QMARK_.call(null, elem__$1, class$))
|
|
}
|
|
return elem__$1
|
|
};
|
|
var toggle_class_BANG___3 = function(elem, class$, add_QMARK_) {
|
|
var elem__$1 = dommy.template.__GT_node_like.call(null, elem);
|
|
if(add_QMARK_) {
|
|
dommy.attrs.add_class_BANG_.call(null, elem__$1, class$)
|
|
}else {
|
|
dommy.attrs.remove_class_BANG_.call(null, elem__$1, class$)
|
|
}
|
|
return elem__$1
|
|
};
|
|
toggle_class_BANG_ = function(elem, class$, add_QMARK_) {
|
|
switch(arguments.length) {
|
|
case 2:
|
|
return toggle_class_BANG___2.call(this, elem, class$);
|
|
case 3:
|
|
return toggle_class_BANG___3.call(this, elem, class$, add_QMARK_)
|
|
}
|
|
throw new Error("Invalid arity: " + arguments.length);
|
|
};
|
|
toggle_class_BANG_.cljs$core$IFn$_invoke$arity$2 = toggle_class_BANG___2;
|
|
toggle_class_BANG_.cljs$core$IFn$_invoke$arity$3 = toggle_class_BANG___3;
|
|
return toggle_class_BANG_
|
|
}();
|
|
dommy.attrs.style_str = function style_str(x) {
|
|
if(cljs.core.string_QMARK_.call(null, x)) {
|
|
return x
|
|
}else {
|
|
return clojure.string.join.call(null, " ", cljs.core.map.call(null, function(p__15177) {
|
|
var vec__15178 = p__15177;
|
|
var k = cljs.core.nth.call(null, vec__15178, 0, null);
|
|
var v = cljs.core.nth.call(null, vec__15178, 1, null);
|
|
return[cljs.core.str(cljs.core.name.call(null, k)), cljs.core.str(":"), cljs.core.str(cljs.core.name.call(null, v)), cljs.core.str(";")].join("")
|
|
}, x))
|
|
}
|
|
};
|
|
dommy.attrs.set_style_BANG_ = function() {
|
|
var set_style_BANG___delegate = function(elem, kvs) {
|
|
if(cljs.core.even_QMARK_.call(null, cljs.core.count.call(null, kvs))) {
|
|
}else {
|
|
throw new Error([cljs.core.str("Assert failed: "), cljs.core.str(cljs.core.pr_str.call(null, cljs.core.list(new cljs.core.Symbol(null, "even?", "even?", -1543640034, null), cljs.core.list(new cljs.core.Symbol(null, "count", "count", -1545680184, null), new cljs.core.Symbol(null, "kvs", "kvs", -1640424927, null)))))].join(""));
|
|
}
|
|
var elem__$1 = dommy.template.__GT_node_like.call(null, elem);
|
|
var style = elem__$1.style;
|
|
var seq__15185_15191 = cljs.core.seq.call(null, cljs.core.partition.call(null, 2, kvs));
|
|
var chunk__15186_15192 = null;
|
|
var count__15187_15193 = 0;
|
|
var i__15188_15194 = 0;
|
|
while(true) {
|
|
if(i__15188_15194 < count__15187_15193) {
|
|
var vec__15189_15195 = cljs.core._nth.call(null, chunk__15186_15192, i__15188_15194);
|
|
var k_15196 = cljs.core.nth.call(null, vec__15189_15195, 0, null);
|
|
var v_15197 = cljs.core.nth.call(null, vec__15189_15195, 1, null);
|
|
style[cljs.core.name.call(null, k_15196)] = v_15197;
|
|
var G__15198 = seq__15185_15191;
|
|
var G__15199 = chunk__15186_15192;
|
|
var G__15200 = count__15187_15193;
|
|
var G__15201 = i__15188_15194 + 1;
|
|
seq__15185_15191 = G__15198;
|
|
chunk__15186_15192 = G__15199;
|
|
count__15187_15193 = G__15200;
|
|
i__15188_15194 = G__15201;
|
|
continue
|
|
}else {
|
|
var temp__4092__auto___15202 = cljs.core.seq.call(null, seq__15185_15191);
|
|
if(temp__4092__auto___15202) {
|
|
var seq__15185_15203__$1 = temp__4092__auto___15202;
|
|
if(cljs.core.chunked_seq_QMARK_.call(null, seq__15185_15203__$1)) {
|
|
var c__3037__auto___15204 = cljs.core.chunk_first.call(null, seq__15185_15203__$1);
|
|
var G__15205 = cljs.core.chunk_rest.call(null, seq__15185_15203__$1);
|
|
var G__15206 = c__3037__auto___15204;
|
|
var G__15207 = cljs.core.count.call(null, c__3037__auto___15204);
|
|
var G__15208 = 0;
|
|
seq__15185_15191 = G__15205;
|
|
chunk__15186_15192 = G__15206;
|
|
count__15187_15193 = G__15207;
|
|
i__15188_15194 = G__15208;
|
|
continue
|
|
}else {
|
|
var vec__15190_15209 = cljs.core.first.call(null, seq__15185_15203__$1);
|
|
var k_15210 = cljs.core.nth.call(null, vec__15190_15209, 0, null);
|
|
var v_15211 = cljs.core.nth.call(null, vec__15190_15209, 1, null);
|
|
style[cljs.core.name.call(null, k_15210)] = v_15211;
|
|
var G__15212 = cljs.core.next.call(null, seq__15185_15203__$1);
|
|
var G__15213 = null;
|
|
var G__15214 = 0;
|
|
var G__15215 = 0;
|
|
seq__15185_15191 = G__15212;
|
|
chunk__15186_15192 = G__15213;
|
|
count__15187_15193 = G__15214;
|
|
i__15188_15194 = G__15215;
|
|
continue
|
|
}
|
|
}else {
|
|
}
|
|
}
|
|
break
|
|
}
|
|
return elem__$1
|
|
};
|
|
var set_style_BANG_ = function(elem, var_args) {
|
|
var kvs = null;
|
|
if(arguments.length > 1) {
|
|
kvs = cljs.core.array_seq(Array.prototype.slice.call(arguments, 1), 0)
|
|
}
|
|
return set_style_BANG___delegate.call(this, elem, kvs)
|
|
};
|
|
set_style_BANG_.cljs$lang$maxFixedArity = 1;
|
|
set_style_BANG_.cljs$lang$applyTo = function(arglist__15216) {
|
|
var elem = cljs.core.first(arglist__15216);
|
|
var kvs = cljs.core.rest(arglist__15216);
|
|
return set_style_BANG___delegate(elem, kvs)
|
|
};
|
|
set_style_BANG_.cljs$core$IFn$_invoke$arity$variadic = set_style_BANG___delegate;
|
|
return set_style_BANG_
|
|
}();
|
|
dommy.attrs.style = function style(elem, k) {
|
|
if(cljs.core.truth_(k)) {
|
|
}else {
|
|
throw new Error([cljs.core.str("Assert failed: "), cljs.core.str(cljs.core.pr_str.call(null, new cljs.core.Symbol(null, "k", "k", -1640531420, null)))].join(""));
|
|
}
|
|
return window.getComputedStyle(dommy.template.__GT_node_like.call(null, elem))[cljs.core.name.call(null, k)]
|
|
};
|
|
dommy.attrs.set_px_BANG_ = function() {
|
|
var set_px_BANG___delegate = function(elem, kvs) {
|
|
if(cljs.core.even_QMARK_.call(null, cljs.core.count.call(null, kvs))) {
|
|
}else {
|
|
throw new Error([cljs.core.str("Assert failed: "), cljs.core.str(cljs.core.pr_str.call(null, cljs.core.list(new cljs.core.Symbol(null, "even?", "even?", -1543640034, null), cljs.core.list(new cljs.core.Symbol(null, "count", "count", -1545680184, null), new cljs.core.Symbol(null, "kvs", "kvs", -1640424927, null)))))].join(""));
|
|
}
|
|
var elem__$1 = dommy.template.__GT_node_like.call(null, elem);
|
|
var seq__15223_15229 = cljs.core.seq.call(null, cljs.core.partition.call(null, 2, kvs));
|
|
var chunk__15224_15230 = null;
|
|
var count__15225_15231 = 0;
|
|
var i__15226_15232 = 0;
|
|
while(true) {
|
|
if(i__15226_15232 < count__15225_15231) {
|
|
var vec__15227_15233 = cljs.core._nth.call(null, chunk__15224_15230, i__15226_15232);
|
|
var k_15234 = cljs.core.nth.call(null, vec__15227_15233, 0, null);
|
|
var v_15235 = cljs.core.nth.call(null, vec__15227_15233, 1, null);
|
|
dommy.attrs.set_style_BANG_.call(null, elem__$1, k_15234, [cljs.core.str(v_15235), cljs.core.str("px")].join(""));
|
|
var G__15236 = seq__15223_15229;
|
|
var G__15237 = chunk__15224_15230;
|
|
var G__15238 = count__15225_15231;
|
|
var G__15239 = i__15226_15232 + 1;
|
|
seq__15223_15229 = G__15236;
|
|
chunk__15224_15230 = G__15237;
|
|
count__15225_15231 = G__15238;
|
|
i__15226_15232 = G__15239;
|
|
continue
|
|
}else {
|
|
var temp__4092__auto___15240 = cljs.core.seq.call(null, seq__15223_15229);
|
|
if(temp__4092__auto___15240) {
|
|
var seq__15223_15241__$1 = temp__4092__auto___15240;
|
|
if(cljs.core.chunked_seq_QMARK_.call(null, seq__15223_15241__$1)) {
|
|
var c__3037__auto___15242 = cljs.core.chunk_first.call(null, seq__15223_15241__$1);
|
|
var G__15243 = cljs.core.chunk_rest.call(null, seq__15223_15241__$1);
|
|
var G__15244 = c__3037__auto___15242;
|
|
var G__15245 = cljs.core.count.call(null, c__3037__auto___15242);
|
|
var G__15246 = 0;
|
|
seq__15223_15229 = G__15243;
|
|
chunk__15224_15230 = G__15244;
|
|
count__15225_15231 = G__15245;
|
|
i__15226_15232 = G__15246;
|
|
continue
|
|
}else {
|
|
var vec__15228_15247 = cljs.core.first.call(null, seq__15223_15241__$1);
|
|
var k_15248 = cljs.core.nth.call(null, vec__15228_15247, 0, null);
|
|
var v_15249 = cljs.core.nth.call(null, vec__15228_15247, 1, null);
|
|
dommy.attrs.set_style_BANG_.call(null, elem__$1, k_15248, [cljs.core.str(v_15249), cljs.core.str("px")].join(""));
|
|
var G__15250 = cljs.core.next.call(null, seq__15223_15241__$1);
|
|
var G__15251 = null;
|
|
var G__15252 = 0;
|
|
var G__15253 = 0;
|
|
seq__15223_15229 = G__15250;
|
|
chunk__15224_15230 = G__15251;
|
|
count__15225_15231 = G__15252;
|
|
i__15226_15232 = G__15253;
|
|
continue
|
|
}
|
|
}else {
|
|
}
|
|
}
|
|
break
|
|
}
|
|
return elem__$1
|
|
};
|
|
var set_px_BANG_ = function(elem, var_args) {
|
|
var kvs = null;
|
|
if(arguments.length > 1) {
|
|
kvs = cljs.core.array_seq(Array.prototype.slice.call(arguments, 1), 0)
|
|
}
|
|
return set_px_BANG___delegate.call(this, elem, kvs)
|
|
};
|
|
set_px_BANG_.cljs$lang$maxFixedArity = 1;
|
|
set_px_BANG_.cljs$lang$applyTo = function(arglist__15254) {
|
|
var elem = cljs.core.first(arglist__15254);
|
|
var kvs = cljs.core.rest(arglist__15254);
|
|
return set_px_BANG___delegate(elem, kvs)
|
|
};
|
|
set_px_BANG_.cljs$core$IFn$_invoke$arity$variadic = set_px_BANG___delegate;
|
|
return set_px_BANG_
|
|
}();
|
|
dommy.attrs.px = function px(elem, k) {
|
|
var pixels = dommy.attrs.style.call(null, dommy.template.__GT_node_like.call(null, elem), k);
|
|
if(cljs.core.seq.call(null, pixels)) {
|
|
return parseInt(pixels)
|
|
}else {
|
|
return null
|
|
}
|
|
};
|
|
dommy.attrs.set_attr_BANG_ = function() {
|
|
var set_attr_BANG_ = null;
|
|
var set_attr_BANG___2 = function(elem, k) {
|
|
return set_attr_BANG_.call(null, dommy.template.__GT_node_like.call(null, elem), k, "true")
|
|
};
|
|
var set_attr_BANG___3 = function(elem, k, v) {
|
|
if(cljs.core.truth_(v)) {
|
|
if(cljs.core.fn_QMARK_.call(null, v)) {
|
|
var G__15263 = dommy.template.__GT_node_like.call(null, elem);
|
|
G__15263[cljs.core.name.call(null, k)] = v;
|
|
return G__15263
|
|
}else {
|
|
var G__15264 = dommy.template.__GT_node_like.call(null, elem);
|
|
G__15264.setAttribute(cljs.core.name.call(null, k), k === "\ufdd0:style" ? dommy.attrs.style_str.call(null, v) : v);
|
|
return G__15264
|
|
}
|
|
}else {
|
|
return null
|
|
}
|
|
};
|
|
var set_attr_BANG___4 = function() {
|
|
var G__15271__delegate = function(elem, k, v, kvs) {
|
|
if(cljs.core.even_QMARK_.call(null, cljs.core.count.call(null, kvs))) {
|
|
}else {
|
|
throw new Error([cljs.core.str("Assert failed: "), cljs.core.str(cljs.core.pr_str.call(null, cljs.core.list(new cljs.core.Symbol(null, "even?", "even?", -1543640034, null), cljs.core.list(new cljs.core.Symbol(null, "count", "count", -1545680184, null), new cljs.core.Symbol(null, "kvs", "kvs", -1640424927, null)))))].join(""));
|
|
}
|
|
var elem__$1 = dommy.template.__GT_node_like.call(null, elem);
|
|
var seq__15265_15272 = cljs.core.seq.call(null, cljs.core.cons.call(null, cljs.core.PersistentVector.fromArray([k, v], true), cljs.core.partition.call(null, 2, kvs)));
|
|
var chunk__15266_15273 = null;
|
|
var count__15267_15274 = 0;
|
|
var i__15268_15275 = 0;
|
|
while(true) {
|
|
if(i__15268_15275 < count__15267_15274) {
|
|
var vec__15269_15276 = cljs.core._nth.call(null, chunk__15266_15273, i__15268_15275);
|
|
var k_15277__$1 = cljs.core.nth.call(null, vec__15269_15276, 0, null);
|
|
var v_15278__$1 = cljs.core.nth.call(null, vec__15269_15276, 1, null);
|
|
set_attr_BANG_.call(null, elem__$1, k_15277__$1, v_15278__$1);
|
|
var G__15279 = seq__15265_15272;
|
|
var G__15280 = chunk__15266_15273;
|
|
var G__15281 = count__15267_15274;
|
|
var G__15282 = i__15268_15275 + 1;
|
|
seq__15265_15272 = G__15279;
|
|
chunk__15266_15273 = G__15280;
|
|
count__15267_15274 = G__15281;
|
|
i__15268_15275 = G__15282;
|
|
continue
|
|
}else {
|
|
var temp__4092__auto___15283 = cljs.core.seq.call(null, seq__15265_15272);
|
|
if(temp__4092__auto___15283) {
|
|
var seq__15265_15284__$1 = temp__4092__auto___15283;
|
|
if(cljs.core.chunked_seq_QMARK_.call(null, seq__15265_15284__$1)) {
|
|
var c__3037__auto___15285 = cljs.core.chunk_first.call(null, seq__15265_15284__$1);
|
|
var G__15286 = cljs.core.chunk_rest.call(null, seq__15265_15284__$1);
|
|
var G__15287 = c__3037__auto___15285;
|
|
var G__15288 = cljs.core.count.call(null, c__3037__auto___15285);
|
|
var G__15289 = 0;
|
|
seq__15265_15272 = G__15286;
|
|
chunk__15266_15273 = G__15287;
|
|
count__15267_15274 = G__15288;
|
|
i__15268_15275 = G__15289;
|
|
continue
|
|
}else {
|
|
var vec__15270_15290 = cljs.core.first.call(null, seq__15265_15284__$1);
|
|
var k_15291__$1 = cljs.core.nth.call(null, vec__15270_15290, 0, null);
|
|
var v_15292__$1 = cljs.core.nth.call(null, vec__15270_15290, 1, null);
|
|
set_attr_BANG_.call(null, elem__$1, k_15291__$1, v_15292__$1);
|
|
var G__15293 = cljs.core.next.call(null, seq__15265_15284__$1);
|
|
var G__15294 = null;
|
|
var G__15295 = 0;
|
|
var G__15296 = 0;
|
|
seq__15265_15272 = G__15293;
|
|
chunk__15266_15273 = G__15294;
|
|
count__15267_15274 = G__15295;
|
|
i__15268_15275 = G__15296;
|
|
continue
|
|
}
|
|
}else {
|
|
}
|
|
}
|
|
break
|
|
}
|
|
return elem__$1
|
|
};
|
|
var G__15271 = function(elem, k, v, var_args) {
|
|
var kvs = null;
|
|
if(arguments.length > 3) {
|
|
kvs = cljs.core.array_seq(Array.prototype.slice.call(arguments, 3), 0)
|
|
}
|
|
return G__15271__delegate.call(this, elem, k, v, kvs)
|
|
};
|
|
G__15271.cljs$lang$maxFixedArity = 3;
|
|
G__15271.cljs$lang$applyTo = function(arglist__15297) {
|
|
var elem = cljs.core.first(arglist__15297);
|
|
arglist__15297 = cljs.core.next(arglist__15297);
|
|
var k = cljs.core.first(arglist__15297);
|
|
arglist__15297 = cljs.core.next(arglist__15297);
|
|
var v = cljs.core.first(arglist__15297);
|
|
var kvs = cljs.core.rest(arglist__15297);
|
|
return G__15271__delegate(elem, k, v, kvs)
|
|
};
|
|
G__15271.cljs$core$IFn$_invoke$arity$variadic = G__15271__delegate;
|
|
return G__15271
|
|
}();
|
|
set_attr_BANG_ = function(elem, k, v, var_args) {
|
|
var kvs = var_args;
|
|
switch(arguments.length) {
|
|
case 2:
|
|
return set_attr_BANG___2.call(this, elem, k);
|
|
case 3:
|
|
return set_attr_BANG___3.call(this, elem, k, v);
|
|
default:
|
|
return set_attr_BANG___4.cljs$core$IFn$_invoke$arity$variadic(elem, k, v, cljs.core.array_seq(arguments, 3))
|
|
}
|
|
throw new Error("Invalid arity: " + arguments.length);
|
|
};
|
|
set_attr_BANG_.cljs$lang$maxFixedArity = 3;
|
|
set_attr_BANG_.cljs$lang$applyTo = set_attr_BANG___4.cljs$lang$applyTo;
|
|
set_attr_BANG_.cljs$core$IFn$_invoke$arity$2 = set_attr_BANG___2;
|
|
set_attr_BANG_.cljs$core$IFn$_invoke$arity$3 = set_attr_BANG___3;
|
|
set_attr_BANG_.cljs$core$IFn$_invoke$arity$variadic = set_attr_BANG___4.cljs$core$IFn$_invoke$arity$variadic;
|
|
return set_attr_BANG_
|
|
}();
|
|
dommy.attrs.remove_attr_BANG_ = function() {
|
|
var remove_attr_BANG_ = null;
|
|
var remove_attr_BANG___2 = function(elem, k) {
|
|
var elem__$1 = dommy.template.__GT_node_like.call(null, elem);
|
|
if(cljs.core.truth_(cljs.core.PersistentHashSet.fromArray(["\ufdd0:class", null, "\ufdd0:classes", null], true).call(null, k))) {
|
|
elem__$1.className = ""
|
|
}else {
|
|
elem__$1.removeAttribute(cljs.core.name.call(null, k))
|
|
}
|
|
return elem__$1
|
|
};
|
|
var remove_attr_BANG___3 = function() {
|
|
var G__15306__delegate = function(elem, k, ks) {
|
|
var elem__$1 = dommy.template.__GT_node_like.call(null, elem);
|
|
var seq__15302_15307 = cljs.core.seq.call(null, cljs.core.cons.call(null, k, ks));
|
|
var chunk__15303_15308 = null;
|
|
var count__15304_15309 = 0;
|
|
var i__15305_15310 = 0;
|
|
while(true) {
|
|
if(i__15305_15310 < count__15304_15309) {
|
|
var k_15311__$1 = cljs.core._nth.call(null, chunk__15303_15308, i__15305_15310);
|
|
remove_attr_BANG_.call(null, elem__$1, k_15311__$1);
|
|
var G__15312 = seq__15302_15307;
|
|
var G__15313 = chunk__15303_15308;
|
|
var G__15314 = count__15304_15309;
|
|
var G__15315 = i__15305_15310 + 1;
|
|
seq__15302_15307 = G__15312;
|
|
chunk__15303_15308 = G__15313;
|
|
count__15304_15309 = G__15314;
|
|
i__15305_15310 = G__15315;
|
|
continue
|
|
}else {
|
|
var temp__4092__auto___15316 = cljs.core.seq.call(null, seq__15302_15307);
|
|
if(temp__4092__auto___15316) {
|
|
var seq__15302_15317__$1 = temp__4092__auto___15316;
|
|
if(cljs.core.chunked_seq_QMARK_.call(null, seq__15302_15317__$1)) {
|
|
var c__3037__auto___15318 = cljs.core.chunk_first.call(null, seq__15302_15317__$1);
|
|
var G__15319 = cljs.core.chunk_rest.call(null, seq__15302_15317__$1);
|
|
var G__15320 = c__3037__auto___15318;
|
|
var G__15321 = cljs.core.count.call(null, c__3037__auto___15318);
|
|
var G__15322 = 0;
|
|
seq__15302_15307 = G__15319;
|
|
chunk__15303_15308 = G__15320;
|
|
count__15304_15309 = G__15321;
|
|
i__15305_15310 = G__15322;
|
|
continue
|
|
}else {
|
|
var k_15323__$1 = cljs.core.first.call(null, seq__15302_15317__$1);
|
|
remove_attr_BANG_.call(null, elem__$1, k_15323__$1);
|
|
var G__15324 = cljs.core.next.call(null, seq__15302_15317__$1);
|
|
var G__15325 = null;
|
|
var G__15326 = 0;
|
|
var G__15327 = 0;
|
|
seq__15302_15307 = G__15324;
|
|
chunk__15303_15308 = G__15325;
|
|
count__15304_15309 = G__15326;
|
|
i__15305_15310 = G__15327;
|
|
continue
|
|
}
|
|
}else {
|
|
}
|
|
}
|
|
break
|
|
}
|
|
return elem__$1
|
|
};
|
|
var G__15306 = function(elem, k, var_args) {
|
|
var ks = null;
|
|
if(arguments.length > 2) {
|
|
ks = cljs.core.array_seq(Array.prototype.slice.call(arguments, 2), 0)
|
|
}
|
|
return G__15306__delegate.call(this, elem, k, ks)
|
|
};
|
|
G__15306.cljs$lang$maxFixedArity = 2;
|
|
G__15306.cljs$lang$applyTo = function(arglist__15328) {
|
|
var elem = cljs.core.first(arglist__15328);
|
|
arglist__15328 = cljs.core.next(arglist__15328);
|
|
var k = cljs.core.first(arglist__15328);
|
|
var ks = cljs.core.rest(arglist__15328);
|
|
return G__15306__delegate(elem, k, ks)
|
|
};
|
|
G__15306.cljs$core$IFn$_invoke$arity$variadic = G__15306__delegate;
|
|
return G__15306
|
|
}();
|
|
remove_attr_BANG_ = function(elem, k, var_args) {
|
|
var ks = var_args;
|
|
switch(arguments.length) {
|
|
case 2:
|
|
return remove_attr_BANG___2.call(this, elem, k);
|
|
default:
|
|
return remove_attr_BANG___3.cljs$core$IFn$_invoke$arity$variadic(elem, k, cljs.core.array_seq(arguments, 2))
|
|
}
|
|
throw new Error("Invalid arity: " + arguments.length);
|
|
};
|
|
remove_attr_BANG_.cljs$lang$maxFixedArity = 2;
|
|
remove_attr_BANG_.cljs$lang$applyTo = remove_attr_BANG___3.cljs$lang$applyTo;
|
|
remove_attr_BANG_.cljs$core$IFn$_invoke$arity$2 = remove_attr_BANG___2;
|
|
remove_attr_BANG_.cljs$core$IFn$_invoke$arity$variadic = remove_attr_BANG___3.cljs$core$IFn$_invoke$arity$variadic;
|
|
return remove_attr_BANG_
|
|
}();
|
|
dommy.attrs.attr = function attr(elem, k) {
|
|
if(cljs.core.truth_(k)) {
|
|
return dommy.template.__GT_node_like.call(null, elem).getAttribute(cljs.core.name.call(null, k))
|
|
}else {
|
|
return null
|
|
}
|
|
};
|
|
dommy.attrs.hidden_QMARK_ = function hidden_QMARK_(elem) {
|
|
return"none" === dommy.template.__GT_node_like.call(null, elem).style.display
|
|
};
|
|
dommy.attrs.toggle_BANG_ = function() {
|
|
var toggle_BANG_ = null;
|
|
var toggle_BANG___1 = function(elem) {
|
|
var elem__$1 = dommy.template.__GT_node_like.call(null, elem);
|
|
toggle_BANG_.call(null, elem__$1, dommy.attrs.hidden_QMARK_.call(null, elem__$1));
|
|
return elem__$1
|
|
};
|
|
var toggle_BANG___2 = function(elem, show_QMARK_) {
|
|
var G__15330 = dommy.template.__GT_node_like.call(null, elem);
|
|
G__15330.style.display = show_QMARK_ ? "" : "none";
|
|
return G__15330
|
|
};
|
|
toggle_BANG_ = function(elem, show_QMARK_) {
|
|
switch(arguments.length) {
|
|
case 1:
|
|
return toggle_BANG___1.call(this, elem);
|
|
case 2:
|
|
return toggle_BANG___2.call(this, elem, show_QMARK_)
|
|
}
|
|
throw new Error("Invalid arity: " + arguments.length);
|
|
};
|
|
toggle_BANG_.cljs$core$IFn$_invoke$arity$1 = toggle_BANG___1;
|
|
toggle_BANG_.cljs$core$IFn$_invoke$arity$2 = toggle_BANG___2;
|
|
return toggle_BANG_
|
|
}();
|
|
dommy.attrs.hide_BANG_ = function hide_BANG_(elem) {
|
|
var G__15332 = dommy.template.__GT_node_like.call(null, elem);
|
|
dommy.attrs.toggle_BANG_.call(null, G__15332, false);
|
|
return G__15332
|
|
};
|
|
dommy.attrs.show_BANG_ = function show_BANG_(elem) {
|
|
var G__15334 = dommy.template.__GT_node_like.call(null, elem);
|
|
dommy.attrs.toggle_BANG_.call(null, G__15334, true);
|
|
return G__15334
|
|
};
|
|
dommy.attrs.bounding_client_rect = function bounding_client_rect(elem) {
|
|
return cljs.core.js__GT_clj.call(null, function() {
|
|
var G__15336 = dommy.template.__GT_node_like.call(null, elem).getBoundingClientRect();
|
|
G__15336["constructor"] = Object;
|
|
return G__15336
|
|
}(), "\ufdd0:keywordize-keys", true)
|
|
};
|
|
goog.provide("dommy.template");
|
|
goog.require("cljs.core");
|
|
goog.require("dommy.attrs");
|
|
goog.require("clojure.string");
|
|
dommy.template.PElement = {};
|
|
dommy.template._elem = function _elem(this$) {
|
|
if(function() {
|
|
var and__3941__auto__ = this$;
|
|
if(and__3941__auto__) {
|
|
return this$.dommy$template$PElement$_elem$arity$1
|
|
}else {
|
|
return and__3941__auto__
|
|
}
|
|
}()) {
|
|
return this$.dommy$template$PElement$_elem$arity$1(this$)
|
|
}else {
|
|
var x__2906__auto__ = this$ == null ? null : this$;
|
|
return function() {
|
|
var or__3943__auto__ = dommy.template._elem[goog.typeOf(x__2906__auto__)];
|
|
if(or__3943__auto__) {
|
|
return or__3943__auto__
|
|
}else {
|
|
var or__3943__auto____$1 = dommy.template._elem["_"];
|
|
if(or__3943__auto____$1) {
|
|
return or__3943__auto____$1
|
|
}else {
|
|
throw cljs.core.missing_protocol.call(null, "PElement.-elem", this$);
|
|
}
|
|
}
|
|
}().call(null, this$)
|
|
}
|
|
};
|
|
dommy.template.next_css_index = function next_css_index(s, start_idx) {
|
|
var id_idx = s.indexOf("#", start_idx);
|
|
var class_idx = s.indexOf(".", start_idx);
|
|
var idx = Math.min(id_idx, class_idx);
|
|
if(idx < 0) {
|
|
return Math.max(id_idx, class_idx)
|
|
}else {
|
|
return idx
|
|
}
|
|
};
|
|
dommy.template.base_element = function base_element(node_key) {
|
|
var node_str = cljs.core.name.call(null, node_key);
|
|
var base_idx = dommy.template.next_css_index.call(null, node_str, 0);
|
|
var tag = base_idx > 0 ? node_str.substring(0, base_idx) : base_idx === 0 ? "div" : "\ufdd0:else" ? node_str : null;
|
|
var node = document.createElement(tag);
|
|
if(base_idx >= 0) {
|
|
var str_14905 = node_str.substring(base_idx);
|
|
while(true) {
|
|
var next_idx_14906 = dommy.template.next_css_index.call(null, str_14905, 1);
|
|
var frag_14907 = next_idx_14906 >= 0 ? str_14905.substring(0, next_idx_14906) : str_14905;
|
|
var G__14904_14908 = frag_14907.charAt(0);
|
|
if(cljs.core._EQ_.call(null, "#", G__14904_14908)) {
|
|
node.setAttribute("id", frag_14907.substring(1))
|
|
}else {
|
|
if(cljs.core._EQ_.call(null, ".", G__14904_14908)) {
|
|
dommy.attrs.add_class_BANG_.call(null, node, frag_14907.substring(1))
|
|
}else {
|
|
if("\ufdd0:else") {
|
|
throw new Error([cljs.core.str("No matching clause: "), cljs.core.str(frag_14907.charAt(0))].join(""));
|
|
}else {
|
|
}
|
|
}
|
|
}
|
|
if(next_idx_14906 >= 0) {
|
|
var G__14909 = str_14905.substring(next_idx_14906);
|
|
str_14905 = G__14909;
|
|
continue
|
|
}else {
|
|
}
|
|
break
|
|
}
|
|
}else {
|
|
}
|
|
return node
|
|
};
|
|
dommy.template.throw_unable_to_make_node = function throw_unable_to_make_node(node_data) {
|
|
throw[cljs.core.str("Don't know how to make node from: "), cljs.core.str(cljs.core.pr_str.call(null, node_data))].join("");
|
|
};
|
|
dommy.template.__GT_document_fragment = function() {
|
|
var __GT_document_fragment = null;
|
|
var __GT_document_fragment__1 = function(data) {
|
|
return __GT_document_fragment.call(null, document.createDocumentFragment(), data)
|
|
};
|
|
var __GT_document_fragment__2 = function(result_frag, data) {
|
|
if(function() {
|
|
var G__14915 = data;
|
|
if(G__14915) {
|
|
if(cljs.core.truth_(function() {
|
|
var or__3943__auto__ = null;
|
|
if(cljs.core.truth_(or__3943__auto__)) {
|
|
return or__3943__auto__
|
|
}else {
|
|
return G__14915.dommy$template$PElement$
|
|
}
|
|
}())) {
|
|
return true
|
|
}else {
|
|
if(!G__14915.cljs$lang$protocol_mask$partition$) {
|
|
return cljs.core.type_satisfies_.call(null, dommy.template.PElement, G__14915)
|
|
}else {
|
|
return false
|
|
}
|
|
}
|
|
}else {
|
|
return cljs.core.type_satisfies_.call(null, dommy.template.PElement, G__14915)
|
|
}
|
|
}()) {
|
|
result_frag.appendChild(dommy.template._elem.call(null, data));
|
|
return result_frag
|
|
}else {
|
|
if(cljs.core.seq_QMARK_.call(null, data)) {
|
|
var seq__14916_14920 = cljs.core.seq.call(null, data);
|
|
var chunk__14917_14921 = null;
|
|
var count__14918_14922 = 0;
|
|
var i__14919_14923 = 0;
|
|
while(true) {
|
|
if(i__14919_14923 < count__14918_14922) {
|
|
var child_14924 = cljs.core._nth.call(null, chunk__14917_14921, i__14919_14923);
|
|
__GT_document_fragment.call(null, result_frag, child_14924);
|
|
var G__14925 = seq__14916_14920;
|
|
var G__14926 = chunk__14917_14921;
|
|
var G__14927 = count__14918_14922;
|
|
var G__14928 = i__14919_14923 + 1;
|
|
seq__14916_14920 = G__14925;
|
|
chunk__14917_14921 = G__14926;
|
|
count__14918_14922 = G__14927;
|
|
i__14919_14923 = G__14928;
|
|
continue
|
|
}else {
|
|
var temp__4092__auto___14929 = cljs.core.seq.call(null, seq__14916_14920);
|
|
if(temp__4092__auto___14929) {
|
|
var seq__14916_14930__$1 = temp__4092__auto___14929;
|
|
if(cljs.core.chunked_seq_QMARK_.call(null, seq__14916_14930__$1)) {
|
|
var c__3037__auto___14931 = cljs.core.chunk_first.call(null, seq__14916_14930__$1);
|
|
var G__14932 = cljs.core.chunk_rest.call(null, seq__14916_14930__$1);
|
|
var G__14933 = c__3037__auto___14931;
|
|
var G__14934 = cljs.core.count.call(null, c__3037__auto___14931);
|
|
var G__14935 = 0;
|
|
seq__14916_14920 = G__14932;
|
|
chunk__14917_14921 = G__14933;
|
|
count__14918_14922 = G__14934;
|
|
i__14919_14923 = G__14935;
|
|
continue
|
|
}else {
|
|
var child_14936 = cljs.core.first.call(null, seq__14916_14930__$1);
|
|
__GT_document_fragment.call(null, result_frag, child_14936);
|
|
var G__14937 = cljs.core.next.call(null, seq__14916_14930__$1);
|
|
var G__14938 = null;
|
|
var G__14939 = 0;
|
|
var G__14940 = 0;
|
|
seq__14916_14920 = G__14937;
|
|
chunk__14917_14921 = G__14938;
|
|
count__14918_14922 = G__14939;
|
|
i__14919_14923 = G__14940;
|
|
continue
|
|
}
|
|
}else {
|
|
}
|
|
}
|
|
break
|
|
}
|
|
return result_frag
|
|
}else {
|
|
if(data == null) {
|
|
return result_frag
|
|
}else {
|
|
if("\ufdd0:else") {
|
|
return dommy.template.throw_unable_to_make_node.call(null, data)
|
|
}else {
|
|
return null
|
|
}
|
|
}
|
|
}
|
|
}
|
|
};
|
|
__GT_document_fragment = function(result_frag, data) {
|
|
switch(arguments.length) {
|
|
case 1:
|
|
return __GT_document_fragment__1.call(this, result_frag);
|
|
case 2:
|
|
return __GT_document_fragment__2.call(this, result_frag, data)
|
|
}
|
|
throw new Error("Invalid arity: " + arguments.length);
|
|
};
|
|
__GT_document_fragment.cljs$core$IFn$_invoke$arity$1 = __GT_document_fragment__1;
|
|
__GT_document_fragment.cljs$core$IFn$_invoke$arity$2 = __GT_document_fragment__2;
|
|
return __GT_document_fragment
|
|
}();
|
|
dommy.template.__GT_node_like = function __GT_node_like(data) {
|
|
if(function() {
|
|
var G__14942 = data;
|
|
if(G__14942) {
|
|
if(cljs.core.truth_(function() {
|
|
var or__3943__auto__ = null;
|
|
if(cljs.core.truth_(or__3943__auto__)) {
|
|
return or__3943__auto__
|
|
}else {
|
|
return G__14942.dommy$template$PElement$
|
|
}
|
|
}())) {
|
|
return true
|
|
}else {
|
|
if(!G__14942.cljs$lang$protocol_mask$partition$) {
|
|
return cljs.core.type_satisfies_.call(null, dommy.template.PElement, G__14942)
|
|
}else {
|
|
return false
|
|
}
|
|
}
|
|
}else {
|
|
return cljs.core.type_satisfies_.call(null, dommy.template.PElement, G__14942)
|
|
}
|
|
}()) {
|
|
return dommy.template._elem.call(null, data)
|
|
}else {
|
|
return dommy.template.__GT_document_fragment.call(null, data)
|
|
}
|
|
};
|
|
dommy.template.compound_element = function compound_element(p__14943) {
|
|
var vec__14962 = p__14943;
|
|
var tag_name = cljs.core.nth.call(null, vec__14962, 0, null);
|
|
var maybe_attrs = cljs.core.nth.call(null, vec__14962, 1, null);
|
|
var children = cljs.core.nthnext.call(null, vec__14962, 2);
|
|
var n = dommy.template.base_element.call(null, tag_name);
|
|
var attrs = function() {
|
|
var and__3941__auto__ = cljs.core.map_QMARK_.call(null, maybe_attrs);
|
|
if(and__3941__auto__) {
|
|
return!function() {
|
|
var G__14963 = maybe_attrs;
|
|
if(G__14963) {
|
|
if(cljs.core.truth_(function() {
|
|
var or__3943__auto__ = null;
|
|
if(cljs.core.truth_(or__3943__auto__)) {
|
|
return or__3943__auto__
|
|
}else {
|
|
return G__14963.dommy$template$PElement$
|
|
}
|
|
}())) {
|
|
return true
|
|
}else {
|
|
if(!G__14963.cljs$lang$protocol_mask$partition$) {
|
|
return cljs.core.type_satisfies_.call(null, dommy.template.PElement, G__14963)
|
|
}else {
|
|
return false
|
|
}
|
|
}
|
|
}else {
|
|
return cljs.core.type_satisfies_.call(null, dommy.template.PElement, G__14963)
|
|
}
|
|
}()
|
|
}else {
|
|
return and__3941__auto__
|
|
}
|
|
}() ? maybe_attrs : null;
|
|
var children__$1 = cljs.core.truth_(attrs) ? children : cljs.core.cons.call(null, maybe_attrs, children);
|
|
var seq__14964_14980 = cljs.core.seq.call(null, attrs);
|
|
var chunk__14965_14981 = null;
|
|
var count__14966_14982 = 0;
|
|
var i__14967_14983 = 0;
|
|
while(true) {
|
|
if(i__14967_14983 < count__14966_14982) {
|
|
var vec__14968_14984 = cljs.core._nth.call(null, chunk__14965_14981, i__14967_14983);
|
|
var k_14985 = cljs.core.nth.call(null, vec__14968_14984, 0, null);
|
|
var v_14986 = cljs.core.nth.call(null, vec__14968_14984, 1, null);
|
|
var G__14969_14987 = k_14985;
|
|
if(cljs.core._EQ_.call(null, "\ufdd0:classes", G__14969_14987)) {
|
|
var seq__14970_14988 = cljs.core.seq.call(null, v_14986);
|
|
var chunk__14971_14989 = null;
|
|
var count__14972_14990 = 0;
|
|
var i__14973_14991 = 0;
|
|
while(true) {
|
|
if(i__14973_14991 < count__14972_14990) {
|
|
var c_14992 = cljs.core._nth.call(null, chunk__14971_14989, i__14973_14991);
|
|
dommy.attrs.add_class_BANG_.call(null, n, c_14992);
|
|
var G__14993 = seq__14970_14988;
|
|
var G__14994 = chunk__14971_14989;
|
|
var G__14995 = count__14972_14990;
|
|
var G__14996 = i__14973_14991 + 1;
|
|
seq__14970_14988 = G__14993;
|
|
chunk__14971_14989 = G__14994;
|
|
count__14972_14990 = G__14995;
|
|
i__14973_14991 = G__14996;
|
|
continue
|
|
}else {
|
|
var temp__4092__auto___14997 = cljs.core.seq.call(null, seq__14970_14988);
|
|
if(temp__4092__auto___14997) {
|
|
var seq__14970_14998__$1 = temp__4092__auto___14997;
|
|
if(cljs.core.chunked_seq_QMARK_.call(null, seq__14970_14998__$1)) {
|
|
var c__3037__auto___14999 = cljs.core.chunk_first.call(null, seq__14970_14998__$1);
|
|
var G__15000 = cljs.core.chunk_rest.call(null, seq__14970_14998__$1);
|
|
var G__15001 = c__3037__auto___14999;
|
|
var G__15002 = cljs.core.count.call(null, c__3037__auto___14999);
|
|
var G__15003 = 0;
|
|
seq__14970_14988 = G__15000;
|
|
chunk__14971_14989 = G__15001;
|
|
count__14972_14990 = G__15002;
|
|
i__14973_14991 = G__15003;
|
|
continue
|
|
}else {
|
|
var c_15004 = cljs.core.first.call(null, seq__14970_14998__$1);
|
|
dommy.attrs.add_class_BANG_.call(null, n, c_15004);
|
|
var G__15005 = cljs.core.next.call(null, seq__14970_14998__$1);
|
|
var G__15006 = null;
|
|
var G__15007 = 0;
|
|
var G__15008 = 0;
|
|
seq__14970_14988 = G__15005;
|
|
chunk__14971_14989 = G__15006;
|
|
count__14972_14990 = G__15007;
|
|
i__14973_14991 = G__15008;
|
|
continue
|
|
}
|
|
}else {
|
|
}
|
|
}
|
|
break
|
|
}
|
|
}else {
|
|
if(cljs.core._EQ_.call(null, "\ufdd0:class", G__14969_14987)) {
|
|
dommy.attrs.add_class_BANG_.call(null, n, v_14986)
|
|
}else {
|
|
if("\ufdd0:else") {
|
|
dommy.attrs.set_attr_BANG_.call(null, n, k_14985, v_14986)
|
|
}else {
|
|
}
|
|
}
|
|
}
|
|
var G__15009 = seq__14964_14980;
|
|
var G__15010 = chunk__14965_14981;
|
|
var G__15011 = count__14966_14982;
|
|
var G__15012 = i__14967_14983 + 1;
|
|
seq__14964_14980 = G__15009;
|
|
chunk__14965_14981 = G__15010;
|
|
count__14966_14982 = G__15011;
|
|
i__14967_14983 = G__15012;
|
|
continue
|
|
}else {
|
|
var temp__4092__auto___15013 = cljs.core.seq.call(null, seq__14964_14980);
|
|
if(temp__4092__auto___15013) {
|
|
var seq__14964_15014__$1 = temp__4092__auto___15013;
|
|
if(cljs.core.chunked_seq_QMARK_.call(null, seq__14964_15014__$1)) {
|
|
var c__3037__auto___15015 = cljs.core.chunk_first.call(null, seq__14964_15014__$1);
|
|
var G__15016 = cljs.core.chunk_rest.call(null, seq__14964_15014__$1);
|
|
var G__15017 = c__3037__auto___15015;
|
|
var G__15018 = cljs.core.count.call(null, c__3037__auto___15015);
|
|
var G__15019 = 0;
|
|
seq__14964_14980 = G__15016;
|
|
chunk__14965_14981 = G__15017;
|
|
count__14966_14982 = G__15018;
|
|
i__14967_14983 = G__15019;
|
|
continue
|
|
}else {
|
|
var vec__14974_15020 = cljs.core.first.call(null, seq__14964_15014__$1);
|
|
var k_15021 = cljs.core.nth.call(null, vec__14974_15020, 0, null);
|
|
var v_15022 = cljs.core.nth.call(null, vec__14974_15020, 1, null);
|
|
var G__14975_15023 = k_15021;
|
|
if(cljs.core._EQ_.call(null, "\ufdd0:classes", G__14975_15023)) {
|
|
var seq__14976_15024 = cljs.core.seq.call(null, v_15022);
|
|
var chunk__14977_15025 = null;
|
|
var count__14978_15026 = 0;
|
|
var i__14979_15027 = 0;
|
|
while(true) {
|
|
if(i__14979_15027 < count__14978_15026) {
|
|
var c_15028 = cljs.core._nth.call(null, chunk__14977_15025, i__14979_15027);
|
|
dommy.attrs.add_class_BANG_.call(null, n, c_15028);
|
|
var G__15029 = seq__14976_15024;
|
|
var G__15030 = chunk__14977_15025;
|
|
var G__15031 = count__14978_15026;
|
|
var G__15032 = i__14979_15027 + 1;
|
|
seq__14976_15024 = G__15029;
|
|
chunk__14977_15025 = G__15030;
|
|
count__14978_15026 = G__15031;
|
|
i__14979_15027 = G__15032;
|
|
continue
|
|
}else {
|
|
var temp__4092__auto___15033__$1 = cljs.core.seq.call(null, seq__14976_15024);
|
|
if(temp__4092__auto___15033__$1) {
|
|
var seq__14976_15034__$1 = temp__4092__auto___15033__$1;
|
|
if(cljs.core.chunked_seq_QMARK_.call(null, seq__14976_15034__$1)) {
|
|
var c__3037__auto___15035 = cljs.core.chunk_first.call(null, seq__14976_15034__$1);
|
|
var G__15036 = cljs.core.chunk_rest.call(null, seq__14976_15034__$1);
|
|
var G__15037 = c__3037__auto___15035;
|
|
var G__15038 = cljs.core.count.call(null, c__3037__auto___15035);
|
|
var G__15039 = 0;
|
|
seq__14976_15024 = G__15036;
|
|
chunk__14977_15025 = G__15037;
|
|
count__14978_15026 = G__15038;
|
|
i__14979_15027 = G__15039;
|
|
continue
|
|
}else {
|
|
var c_15040 = cljs.core.first.call(null, seq__14976_15034__$1);
|
|
dommy.attrs.add_class_BANG_.call(null, n, c_15040);
|
|
var G__15041 = cljs.core.next.call(null, seq__14976_15034__$1);
|
|
var G__15042 = null;
|
|
var G__15043 = 0;
|
|
var G__15044 = 0;
|
|
seq__14976_15024 = G__15041;
|
|
chunk__14977_15025 = G__15042;
|
|
count__14978_15026 = G__15043;
|
|
i__14979_15027 = G__15044;
|
|
continue
|
|
}
|
|
}else {
|
|
}
|
|
}
|
|
break
|
|
}
|
|
}else {
|
|
if(cljs.core._EQ_.call(null, "\ufdd0:class", G__14975_15023)) {
|
|
dommy.attrs.add_class_BANG_.call(null, n, v_15022)
|
|
}else {
|
|
if("\ufdd0:else") {
|
|
dommy.attrs.set_attr_BANG_.call(null, n, k_15021, v_15022)
|
|
}else {
|
|
}
|
|
}
|
|
}
|
|
var G__15045 = cljs.core.next.call(null, seq__14964_15014__$1);
|
|
var G__15046 = null;
|
|
var G__15047 = 0;
|
|
var G__15048 = 0;
|
|
seq__14964_14980 = G__15045;
|
|
chunk__14965_14981 = G__15046;
|
|
count__14966_14982 = G__15047;
|
|
i__14967_14983 = G__15048;
|
|
continue
|
|
}
|
|
}else {
|
|
}
|
|
}
|
|
break
|
|
}
|
|
n.appendChild(dommy.template.__GT_node_like.call(null, children__$1));
|
|
return n
|
|
};
|
|
dommy.template.PElement["string"] = true;
|
|
dommy.template._elem["string"] = function(this$) {
|
|
if(cljs.core.keyword_QMARK_.call(null, this$)) {
|
|
return dommy.template.base_element.call(null, this$)
|
|
}else {
|
|
return document.createTextNode([cljs.core.str(this$)].join(""))
|
|
}
|
|
};
|
|
dommy.template.PElement["number"] = true;
|
|
dommy.template._elem["number"] = function(this$) {
|
|
return document.createTextNode([cljs.core.str(this$)].join(""))
|
|
};
|
|
cljs.core.PersistentVector.prototype.dommy$template$PElement$ = true;
|
|
cljs.core.PersistentVector.prototype.dommy$template$PElement$_elem$arity$1 = function(this$) {
|
|
return dommy.template.compound_element.call(null, this$)
|
|
};
|
|
Document.prototype.dommy$template$PElement$ = true;
|
|
Document.prototype.dommy$template$PElement$_elem$arity$1 = function(this$) {
|
|
return this$
|
|
};
|
|
Text.prototype.dommy$template$PElement$ = true;
|
|
Text.prototype.dommy$template$PElement$_elem$arity$1 = function(this$) {
|
|
return this$
|
|
};
|
|
DocumentFragment.prototype.dommy$template$PElement$ = true;
|
|
DocumentFragment.prototype.dommy$template$PElement$_elem$arity$1 = function(this$) {
|
|
return this$
|
|
};
|
|
HTMLElement.prototype.dommy$template$PElement$ = true;
|
|
HTMLElement.prototype.dommy$template$PElement$_elem$arity$1 = function(this$) {
|
|
return this$
|
|
};
|
|
try {
|
|
Window.prototype.dommy$template$PElement$ = true;
|
|
Window.prototype.dommy$template$PElement$_elem$arity$1 = function(this$) {
|
|
return this$
|
|
}
|
|
}catch(e15049) {
|
|
if(e15049 instanceof ReferenceError) {
|
|
var __15050 = e15049;
|
|
console.log("PElement: js/Window not defined by browser, skipping it... (running on phantomjs?)")
|
|
}else {
|
|
if("\ufdd0:else") {
|
|
throw e15049;
|
|
}else {
|
|
}
|
|
}
|
|
}
|
|
dommy.template.node = function node(data) {
|
|
if(function() {
|
|
var G__15052 = data;
|
|
if(G__15052) {
|
|
if(cljs.core.truth_(function() {
|
|
var or__3943__auto__ = null;
|
|
if(cljs.core.truth_(or__3943__auto__)) {
|
|
return or__3943__auto__
|
|
}else {
|
|
return G__15052.dommy$template$PElement$
|
|
}
|
|
}())) {
|
|
return true
|
|
}else {
|
|
if(!G__15052.cljs$lang$protocol_mask$partition$) {
|
|
return cljs.core.type_satisfies_.call(null, dommy.template.PElement, G__15052)
|
|
}else {
|
|
return false
|
|
}
|
|
}
|
|
}else {
|
|
return cljs.core.type_satisfies_.call(null, dommy.template.PElement, G__15052)
|
|
}
|
|
}()) {
|
|
return dommy.template._elem.call(null, data)
|
|
}else {
|
|
return dommy.template.throw_unable_to_make_node.call(null, data)
|
|
}
|
|
};
|
|
dommy.template.html__GT_nodes = function html__GT_nodes(html) {
|
|
var parent = document.createElement("div");
|
|
parent.insertAdjacentHTML("beforeend", html);
|
|
return cljs.core.seq.call(null, Array.prototype.slice.call(parent.childNodes))
|
|
};
|
|
goog.provide("dommy.utils");
|
|
goog.require("cljs.core");
|
|
dommy.utils.dissoc_in = function dissoc_in(m, p__14900) {
|
|
var vec__14902 = p__14900;
|
|
var k = cljs.core.nth.call(null, vec__14902, 0, null);
|
|
var ks = cljs.core.nthnext.call(null, vec__14902, 1);
|
|
if(cljs.core.truth_(m)) {
|
|
var temp__4090__auto__ = function() {
|
|
var and__3941__auto__ = ks;
|
|
if(cljs.core.truth_(and__3941__auto__)) {
|
|
return dissoc_in.call(null, m.call(null, k), ks)
|
|
}else {
|
|
return and__3941__auto__
|
|
}
|
|
}();
|
|
if(cljs.core.truth_(temp__4090__auto__)) {
|
|
var res = temp__4090__auto__;
|
|
return cljs.core.assoc.call(null, m, k, res)
|
|
}else {
|
|
var res = cljs.core.dissoc.call(null, m, k);
|
|
if(cljs.core.empty_QMARK_.call(null, res)) {
|
|
return null
|
|
}else {
|
|
return res
|
|
}
|
|
}
|
|
}else {
|
|
return null
|
|
}
|
|
};
|
|
dommy.utils.__GT_Array = function __GT_Array(array_like) {
|
|
return Array.prototype.slice.call(array_like)
|
|
};
|
|
goog.provide("dommy.core");
|
|
goog.require("cljs.core");
|
|
goog.require("dommy.template");
|
|
goog.require("dommy.attrs");
|
|
goog.require("dommy.utils");
|
|
goog.require("clojure.string");
|
|
dommy.core.has_class_QMARK_ = dommy.attrs.has_class_QMARK_;
|
|
dommy.core.add_class_BANG_ = dommy.attrs.add_class_BANG_;
|
|
dommy.core.remove_class_BANG_ = dommy.attrs.remove_class_BANG_;
|
|
dommy.core.toggle_class_BANG_ = dommy.attrs.toggle_class_BANG_;
|
|
dommy.core.set_attr_BANG_ = dommy.attrs.set_attr_BANG_;
|
|
dommy.core.set_style_BANG_ = dommy.attrs.set_style_BANG_;
|
|
dommy.core.set_px_BANG_ = dommy.attrs.set_px_BANG_;
|
|
dommy.core.px = dommy.attrs.px;
|
|
dommy.core.style_str = dommy.attrs.style_str;
|
|
dommy.core.style = dommy.attrs.style;
|
|
dommy.core.remove_attr_BANG_ = dommy.attrs.remove_attr_BANG_;
|
|
dommy.core.attr = dommy.attrs.attr;
|
|
dommy.core.hidden_QMARK_ = dommy.attrs.hidden_QMARK_;
|
|
dommy.core.toggle_BANG_ = dommy.attrs.toggle_BANG_;
|
|
dommy.core.hide_BANG_ = dommy.attrs.hide_BANG_;
|
|
dommy.core.show_BANG_ = dommy.attrs.show_BANG_;
|
|
dommy.core.bounding_client_rect = dommy.attrs.bounding_client_rect;
|
|
dommy.core.dissoc_in = dommy.utils.dissoc_in;
|
|
dommy.core.__GT_Array = dommy.utils.__GT_Array;
|
|
dommy.core.set_html_BANG_ = function set_html_BANG_(elem, html) {
|
|
var elem__$1 = dommy.template.__GT_node_like.call(null, elem);
|
|
elem__$1.innerHTML = html;
|
|
return elem__$1
|
|
};
|
|
dommy.core.html = function html(elem) {
|
|
return dommy.template.__GT_node_like.call(null, elem).innerHTML
|
|
};
|
|
dommy.core.set_text_BANG_ = function set_text_BANG_(elem, text) {
|
|
var elem__$1 = dommy.template.__GT_node_like.call(null, elem);
|
|
var prop = cljs.core.truth_(elem__$1.textContent) ? "textContent" : "innerText";
|
|
elem__$1[prop] = text;
|
|
return elem__$1
|
|
};
|
|
dommy.core.text = function text(elem) {
|
|
var elem__$1 = dommy.template.__GT_node_like.call(null, elem);
|
|
var or__3943__auto__ = elem__$1.textContent;
|
|
if(cljs.core.truth_(or__3943__auto__)) {
|
|
return or__3943__auto__
|
|
}else {
|
|
return elem__$1.innerText
|
|
}
|
|
};
|
|
dommy.core.value = function value(elem) {
|
|
return dommy.template.__GT_node_like.call(null, elem).value
|
|
};
|
|
dommy.core.set_value_BANG_ = function set_value_BANG_(elem, value) {
|
|
var elem__$1 = dommy.template.__GT_node_like.call(null, elem);
|
|
elem__$1.value = value;
|
|
return elem__$1
|
|
};
|
|
dommy.core.append_BANG_ = function() {
|
|
var append_BANG_ = null;
|
|
var append_BANG___2 = function(parent, child) {
|
|
var G__14511 = dommy.template.__GT_node_like.call(null, parent);
|
|
G__14511.appendChild(dommy.template.__GT_node_like.call(null, child));
|
|
return G__14511
|
|
};
|
|
var append_BANG___3 = function() {
|
|
var G__14516__delegate = function(parent, child, more_children) {
|
|
var parent__$1 = dommy.template.__GT_node_like.call(null, parent);
|
|
var seq__14512_14517 = cljs.core.seq.call(null, cljs.core.cons.call(null, child, more_children));
|
|
var chunk__14513_14518 = null;
|
|
var count__14514_14519 = 0;
|
|
var i__14515_14520 = 0;
|
|
while(true) {
|
|
if(i__14515_14520 < count__14514_14519) {
|
|
var c_14521 = cljs.core._nth.call(null, chunk__14513_14518, i__14515_14520);
|
|
append_BANG_.call(null, parent__$1, c_14521);
|
|
var G__14522 = seq__14512_14517;
|
|
var G__14523 = chunk__14513_14518;
|
|
var G__14524 = count__14514_14519;
|
|
var G__14525 = i__14515_14520 + 1;
|
|
seq__14512_14517 = G__14522;
|
|
chunk__14513_14518 = G__14523;
|
|
count__14514_14519 = G__14524;
|
|
i__14515_14520 = G__14525;
|
|
continue
|
|
}else {
|
|
var temp__4092__auto___14526 = cljs.core.seq.call(null, seq__14512_14517);
|
|
if(temp__4092__auto___14526) {
|
|
var seq__14512_14527__$1 = temp__4092__auto___14526;
|
|
if(cljs.core.chunked_seq_QMARK_.call(null, seq__14512_14527__$1)) {
|
|
var c__3037__auto___14528 = cljs.core.chunk_first.call(null, seq__14512_14527__$1);
|
|
var G__14529 = cljs.core.chunk_rest.call(null, seq__14512_14527__$1);
|
|
var G__14530 = c__3037__auto___14528;
|
|
var G__14531 = cljs.core.count.call(null, c__3037__auto___14528);
|
|
var G__14532 = 0;
|
|
seq__14512_14517 = G__14529;
|
|
chunk__14513_14518 = G__14530;
|
|
count__14514_14519 = G__14531;
|
|
i__14515_14520 = G__14532;
|
|
continue
|
|
}else {
|
|
var c_14533 = cljs.core.first.call(null, seq__14512_14527__$1);
|
|
append_BANG_.call(null, parent__$1, c_14533);
|
|
var G__14534 = cljs.core.next.call(null, seq__14512_14527__$1);
|
|
var G__14535 = null;
|
|
var G__14536 = 0;
|
|
var G__14537 = 0;
|
|
seq__14512_14517 = G__14534;
|
|
chunk__14513_14518 = G__14535;
|
|
count__14514_14519 = G__14536;
|
|
i__14515_14520 = G__14537;
|
|
continue
|
|
}
|
|
}else {
|
|
}
|
|
}
|
|
break
|
|
}
|
|
return parent__$1
|
|
};
|
|
var G__14516 = function(parent, child, var_args) {
|
|
var more_children = null;
|
|
if(arguments.length > 2) {
|
|
more_children = cljs.core.array_seq(Array.prototype.slice.call(arguments, 2), 0)
|
|
}
|
|
return G__14516__delegate.call(this, parent, child, more_children)
|
|
};
|
|
G__14516.cljs$lang$maxFixedArity = 2;
|
|
G__14516.cljs$lang$applyTo = function(arglist__14538) {
|
|
var parent = cljs.core.first(arglist__14538);
|
|
arglist__14538 = cljs.core.next(arglist__14538);
|
|
var child = cljs.core.first(arglist__14538);
|
|
var more_children = cljs.core.rest(arglist__14538);
|
|
return G__14516__delegate(parent, child, more_children)
|
|
};
|
|
G__14516.cljs$core$IFn$_invoke$arity$variadic = G__14516__delegate;
|
|
return G__14516
|
|
}();
|
|
append_BANG_ = function(parent, child, var_args) {
|
|
var more_children = var_args;
|
|
switch(arguments.length) {
|
|
case 2:
|
|
return append_BANG___2.call(this, parent, child);
|
|
default:
|
|
return append_BANG___3.cljs$core$IFn$_invoke$arity$variadic(parent, child, cljs.core.array_seq(arguments, 2))
|
|
}
|
|
throw new Error("Invalid arity: " + arguments.length);
|
|
};
|
|
append_BANG_.cljs$lang$maxFixedArity = 2;
|
|
append_BANG_.cljs$lang$applyTo = append_BANG___3.cljs$lang$applyTo;
|
|
append_BANG_.cljs$core$IFn$_invoke$arity$2 = append_BANG___2;
|
|
append_BANG_.cljs$core$IFn$_invoke$arity$variadic = append_BANG___3.cljs$core$IFn$_invoke$arity$variadic;
|
|
return append_BANG_
|
|
}();
|
|
dommy.core.prepend_BANG_ = function() {
|
|
var prepend_BANG_ = null;
|
|
var prepend_BANG___2 = function(parent, child) {
|
|
var G__14544 = dommy.template.__GT_node_like.call(null, parent);
|
|
G__14544.insertBefore(dommy.template.__GT_node_like.call(null, child), parent.firstChild);
|
|
return G__14544
|
|
};
|
|
var prepend_BANG___3 = function() {
|
|
var G__14549__delegate = function(parent, child, more_children) {
|
|
var parent__$1 = dommy.template.__GT_node_like.call(null, parent);
|
|
var seq__14545_14550 = cljs.core.seq.call(null, cljs.core.cons.call(null, child, more_children));
|
|
var chunk__14546_14551 = null;
|
|
var count__14547_14552 = 0;
|
|
var i__14548_14553 = 0;
|
|
while(true) {
|
|
if(i__14548_14553 < count__14547_14552) {
|
|
var c_14554 = cljs.core._nth.call(null, chunk__14546_14551, i__14548_14553);
|
|
prepend_BANG_.call(null, parent__$1, c_14554);
|
|
var G__14555 = seq__14545_14550;
|
|
var G__14556 = chunk__14546_14551;
|
|
var G__14557 = count__14547_14552;
|
|
var G__14558 = i__14548_14553 + 1;
|
|
seq__14545_14550 = G__14555;
|
|
chunk__14546_14551 = G__14556;
|
|
count__14547_14552 = G__14557;
|
|
i__14548_14553 = G__14558;
|
|
continue
|
|
}else {
|
|
var temp__4092__auto___14559 = cljs.core.seq.call(null, seq__14545_14550);
|
|
if(temp__4092__auto___14559) {
|
|
var seq__14545_14560__$1 = temp__4092__auto___14559;
|
|
if(cljs.core.chunked_seq_QMARK_.call(null, seq__14545_14560__$1)) {
|
|
var c__3037__auto___14561 = cljs.core.chunk_first.call(null, seq__14545_14560__$1);
|
|
var G__14562 = cljs.core.chunk_rest.call(null, seq__14545_14560__$1);
|
|
var G__14563 = c__3037__auto___14561;
|
|
var G__14564 = cljs.core.count.call(null, c__3037__auto___14561);
|
|
var G__14565 = 0;
|
|
seq__14545_14550 = G__14562;
|
|
chunk__14546_14551 = G__14563;
|
|
count__14547_14552 = G__14564;
|
|
i__14548_14553 = G__14565;
|
|
continue
|
|
}else {
|
|
var c_14566 = cljs.core.first.call(null, seq__14545_14560__$1);
|
|
prepend_BANG_.call(null, parent__$1, c_14566);
|
|
var G__14567 = cljs.core.next.call(null, seq__14545_14560__$1);
|
|
var G__14568 = null;
|
|
var G__14569 = 0;
|
|
var G__14570 = 0;
|
|
seq__14545_14550 = G__14567;
|
|
chunk__14546_14551 = G__14568;
|
|
count__14547_14552 = G__14569;
|
|
i__14548_14553 = G__14570;
|
|
continue
|
|
}
|
|
}else {
|
|
}
|
|
}
|
|
break
|
|
}
|
|
return parent__$1
|
|
};
|
|
var G__14549 = function(parent, child, var_args) {
|
|
var more_children = null;
|
|
if(arguments.length > 2) {
|
|
more_children = cljs.core.array_seq(Array.prototype.slice.call(arguments, 2), 0)
|
|
}
|
|
return G__14549__delegate.call(this, parent, child, more_children)
|
|
};
|
|
G__14549.cljs$lang$maxFixedArity = 2;
|
|
G__14549.cljs$lang$applyTo = function(arglist__14571) {
|
|
var parent = cljs.core.first(arglist__14571);
|
|
arglist__14571 = cljs.core.next(arglist__14571);
|
|
var child = cljs.core.first(arglist__14571);
|
|
var more_children = cljs.core.rest(arglist__14571);
|
|
return G__14549__delegate(parent, child, more_children)
|
|
};
|
|
G__14549.cljs$core$IFn$_invoke$arity$variadic = G__14549__delegate;
|
|
return G__14549
|
|
}();
|
|
prepend_BANG_ = function(parent, child, var_args) {
|
|
var more_children = var_args;
|
|
switch(arguments.length) {
|
|
case 2:
|
|
return prepend_BANG___2.call(this, parent, child);
|
|
default:
|
|
return prepend_BANG___3.cljs$core$IFn$_invoke$arity$variadic(parent, child, cljs.core.array_seq(arguments, 2))
|
|
}
|
|
throw new Error("Invalid arity: " + arguments.length);
|
|
};
|
|
prepend_BANG_.cljs$lang$maxFixedArity = 2;
|
|
prepend_BANG_.cljs$lang$applyTo = prepend_BANG___3.cljs$lang$applyTo;
|
|
prepend_BANG_.cljs$core$IFn$_invoke$arity$2 = prepend_BANG___2;
|
|
prepend_BANG_.cljs$core$IFn$_invoke$arity$variadic = prepend_BANG___3.cljs$core$IFn$_invoke$arity$variadic;
|
|
return prepend_BANG_
|
|
}();
|
|
dommy.core.insert_before_BANG_ = function insert_before_BANG_(elem, other) {
|
|
var actual_node = dommy.template.__GT_node_like.call(null, elem);
|
|
var other__$1 = dommy.template.__GT_node_like.call(null, other);
|
|
if(cljs.core.truth_(other__$1.parentNode)) {
|
|
}else {
|
|
throw new Error([cljs.core.str("Assert failed: "), cljs.core.str(cljs.core.pr_str.call(null, cljs.core.list(new cljs.core.Symbol(null, ".-parentNode", ".-parentNode", 499016324, null), new cljs.core.Symbol(null, "other", "other", -1534461751, null))))].join(""));
|
|
}
|
|
other__$1.parentNode.insertBefore(actual_node, other__$1);
|
|
return actual_node
|
|
};
|
|
dommy.core.insert_after_BANG_ = function insert_after_BANG_(elem, other) {
|
|
var actual_node = dommy.template.__GT_node_like.call(null, elem);
|
|
var other__$1 = dommy.template.__GT_node_like.call(null, other);
|
|
var parent = other__$1.parentNode;
|
|
var temp__4090__auto___14572 = other__$1.nextSibling;
|
|
if(cljs.core.truth_(temp__4090__auto___14572)) {
|
|
var next_14573 = temp__4090__auto___14572;
|
|
parent.insertBefore(actual_node, next_14573)
|
|
}else {
|
|
parent.appendChild(actual_node)
|
|
}
|
|
return actual_node
|
|
};
|
|
dommy.core.replace_BANG_ = function replace_BANG_(elem, new$) {
|
|
var new$__$1 = dommy.template.__GT_node_like.call(null, new$);
|
|
var elem__$1 = dommy.template.__GT_node_like.call(null, elem);
|
|
if(cljs.core.truth_(elem__$1.parentNode)) {
|
|
}else {
|
|
throw new Error([cljs.core.str("Assert failed: "), cljs.core.str(cljs.core.pr_str.call(null, cljs.core.list(new cljs.core.Symbol(null, ".-parentNode", ".-parentNode", 499016324, null), new cljs.core.Symbol(null, "elem", "elem", -1637415608, null))))].join(""));
|
|
}
|
|
elem__$1.parentNode.replaceChild(new$__$1, elem__$1);
|
|
return new$__$1
|
|
};
|
|
dommy.core.replace_contents_BANG_ = function replace_contents_BANG_(parent, node_like) {
|
|
var G__14575 = dommy.template.__GT_node_like.call(null, parent);
|
|
G__14575.innerHTML = "";
|
|
dommy.core.append_BANG_.call(null, G__14575, node_like);
|
|
return G__14575
|
|
};
|
|
dommy.core.remove_BANG_ = function remove_BANG_(elem) {
|
|
var elem__$1 = dommy.template.__GT_node_like.call(null, elem);
|
|
var G__14577 = elem__$1.parentNode;
|
|
G__14577.removeChild(elem__$1);
|
|
return G__14577
|
|
};
|
|
dommy.core.selector = function selector(data) {
|
|
if(cljs.core.coll_QMARK_.call(null, data)) {
|
|
return clojure.string.join.call(null, " ", cljs.core.map.call(null, selector, data))
|
|
}else {
|
|
if(function() {
|
|
var or__3943__auto__ = cljs.core.string_QMARK_.call(null, data);
|
|
if(or__3943__auto__) {
|
|
return or__3943__auto__
|
|
}else {
|
|
return cljs.core.keyword_QMARK_.call(null, data)
|
|
}
|
|
}()) {
|
|
return cljs.core.name.call(null, data)
|
|
}else {
|
|
return null
|
|
}
|
|
}
|
|
};
|
|
dommy.core.ancestor_nodes = function ancestor_nodes(elem) {
|
|
return cljs.core.take_while.call(null, cljs.core.identity, cljs.core.iterate.call(null, function(p1__14578_SHARP_) {
|
|
return p1__14578_SHARP_.parentNode
|
|
}, dommy.template.__GT_node_like.call(null, elem)))
|
|
};
|
|
dommy.core.matches_pred = function() {
|
|
var matches_pred = null;
|
|
var matches_pred__1 = function(selector) {
|
|
return matches_pred.call(null, document, selector)
|
|
};
|
|
var matches_pred__2 = function(base, selector) {
|
|
var matches = dommy.utils.__GT_Array.call(null, dommy.template.__GT_node_like.call(null, dommy.template.__GT_node_like.call(null, base)).querySelectorAll(dommy.core.selector.call(null, selector)));
|
|
return function(elem) {
|
|
return matches.indexOf(elem) >= 0
|
|
}
|
|
};
|
|
matches_pred = function(base, selector) {
|
|
switch(arguments.length) {
|
|
case 1:
|
|
return matches_pred__1.call(this, base);
|
|
case 2:
|
|
return matches_pred__2.call(this, base, selector)
|
|
}
|
|
throw new Error("Invalid arity: " + arguments.length);
|
|
};
|
|
matches_pred.cljs$core$IFn$_invoke$arity$1 = matches_pred__1;
|
|
matches_pred.cljs$core$IFn$_invoke$arity$2 = matches_pred__2;
|
|
return matches_pred
|
|
}();
|
|
dommy.core.closest = function() {
|
|
var closest = null;
|
|
var closest__2 = function(elem, selector) {
|
|
return cljs.core.first.call(null, cljs.core.filter.call(null, dommy.core.matches_pred.call(null, selector), dommy.core.ancestor_nodes.call(null, dommy.template.__GT_node_like.call(null, elem))))
|
|
};
|
|
var closest__3 = function(base, elem, selector) {
|
|
var base__$1 = dommy.template.__GT_node_like.call(null, base);
|
|
var elem__$1 = dommy.template.__GT_node_like.call(null, elem);
|
|
return cljs.core.first.call(null, cljs.core.filter.call(null, dommy.core.matches_pred.call(null, base__$1, selector), cljs.core.take_while.call(null, function(p1__14579_SHARP_) {
|
|
return!(p1__14579_SHARP_ === base__$1)
|
|
}, dommy.core.ancestor_nodes.call(null, elem__$1))))
|
|
};
|
|
closest = function(base, elem, selector) {
|
|
switch(arguments.length) {
|
|
case 2:
|
|
return closest__2.call(this, base, elem);
|
|
case 3:
|
|
return closest__3.call(this, base, elem, selector)
|
|
}
|
|
throw new Error("Invalid arity: " + arguments.length);
|
|
};
|
|
closest.cljs$core$IFn$_invoke$arity$2 = closest__2;
|
|
closest.cljs$core$IFn$_invoke$arity$3 = closest__3;
|
|
return closest
|
|
}();
|
|
dommy.core.descendant_QMARK_ = function descendant_QMARK_(descendant, ancestor) {
|
|
var descendant__$1 = dommy.template.__GT_node_like.call(null, descendant);
|
|
var ancestor__$1 = dommy.template.__GT_node_like.call(null, ancestor);
|
|
if(cljs.core.truth_(ancestor__$1.contains)) {
|
|
return ancestor__$1.contains(descendant__$1)
|
|
}else {
|
|
if(cljs.core.truth_(ancestor__$1.compareDocumentPosition)) {
|
|
return(ancestor__$1.compareDocumentPosition(descendant__$1) & 1 << 4) != 0
|
|
}else {
|
|
return null
|
|
}
|
|
}
|
|
};
|
|
dommy.core.special_listener_makers = cljs.core.into.call(null, cljs.core.PersistentArrayMap.EMPTY, cljs.core.map.call(null, function(p__14580) {
|
|
var vec__14581 = p__14580;
|
|
var special_mouse_event = cljs.core.nth.call(null, vec__14581, 0, null);
|
|
var real_mouse_event = cljs.core.nth.call(null, vec__14581, 1, null);
|
|
return cljs.core.PersistentVector.fromArray([special_mouse_event, cljs.core.PersistentArrayMap.fromArray([real_mouse_event, function(f) {
|
|
return function(event) {
|
|
var related_target = event.relatedTarget;
|
|
var listener_target = function() {
|
|
var or__3943__auto__ = event.selectedTarget;
|
|
if(cljs.core.truth_(or__3943__auto__)) {
|
|
return or__3943__auto__
|
|
}else {
|
|
return event.currentTarget
|
|
}
|
|
}();
|
|
if(cljs.core.truth_(function() {
|
|
var and__3941__auto__ = related_target;
|
|
if(cljs.core.truth_(and__3941__auto__)) {
|
|
return dommy.core.descendant_QMARK_.call(null, related_target, listener_target)
|
|
}else {
|
|
return and__3941__auto__
|
|
}
|
|
}())) {
|
|
return null
|
|
}else {
|
|
return f.call(null, event)
|
|
}
|
|
}
|
|
}], true)], true)
|
|
}, cljs.core.PersistentArrayMap.fromArray(["\ufdd0:mouseenter", "\ufdd0:mouseover", "\ufdd0:mouseleave", "\ufdd0:mouseout"], true)));
|
|
dommy.core.live_listener = function live_listener(elem, selector, f) {
|
|
return function(event) {
|
|
var temp__4092__auto__ = dommy.core.closest.call(null, dommy.template.__GT_node_like.call(null, elem), event.target, selector);
|
|
if(cljs.core.truth_(temp__4092__auto__)) {
|
|
var selected_target = temp__4092__auto__;
|
|
event.selectedTarget = selected_target;
|
|
return f.call(null, event)
|
|
}else {
|
|
return null
|
|
}
|
|
}
|
|
};
|
|
dommy.core.event_listeners = function event_listeners(elem) {
|
|
var or__3943__auto__ = dommy.template.__GT_node_like.call(null, elem).dommyEventListeners;
|
|
if(cljs.core.truth_(or__3943__auto__)) {
|
|
return or__3943__auto__
|
|
}else {
|
|
return cljs.core.PersistentArrayMap.EMPTY
|
|
}
|
|
};
|
|
dommy.core.update_event_listeners_BANG_ = function() {
|
|
var update_event_listeners_BANG___delegate = function(elem, f, args) {
|
|
var elem__$1 = dommy.template.__GT_node_like.call(null, elem);
|
|
return elem__$1.dommyEventListeners = cljs.core.apply.call(null, f, dommy.core.event_listeners.call(null, elem__$1), args)
|
|
};
|
|
var update_event_listeners_BANG_ = function(elem, f, var_args) {
|
|
var args = null;
|
|
if(arguments.length > 2) {
|
|
args = cljs.core.array_seq(Array.prototype.slice.call(arguments, 2), 0)
|
|
}
|
|
return update_event_listeners_BANG___delegate.call(this, elem, f, args)
|
|
};
|
|
update_event_listeners_BANG_.cljs$lang$maxFixedArity = 2;
|
|
update_event_listeners_BANG_.cljs$lang$applyTo = function(arglist__14582) {
|
|
var elem = cljs.core.first(arglist__14582);
|
|
arglist__14582 = cljs.core.next(arglist__14582);
|
|
var f = cljs.core.first(arglist__14582);
|
|
var args = cljs.core.rest(arglist__14582);
|
|
return update_event_listeners_BANG___delegate(elem, f, args)
|
|
};
|
|
update_event_listeners_BANG_.cljs$core$IFn$_invoke$arity$variadic = update_event_listeners_BANG___delegate;
|
|
return update_event_listeners_BANG_
|
|
}();
|
|
dommy.core.elem_and_selector = function elem_and_selector(elem_sel) {
|
|
if(cljs.core.sequential_QMARK_.call(null, elem_sel)) {
|
|
return cljs.core.juxt.call(null, function(p1__14583_SHARP_) {
|
|
return dommy.template.__GT_node_like.call(null, cljs.core.first.call(null, p1__14583_SHARP_))
|
|
}, cljs.core.rest).call(null, elem_sel)
|
|
}else {
|
|
return cljs.core.PersistentVector.fromArray([dommy.template.__GT_node_like.call(null, elem_sel), null], true)
|
|
}
|
|
};
|
|
dommy.core.listen_BANG_ = function() {
|
|
var listen_BANG___delegate = function(elem_sel, type_fs) {
|
|
if(cljs.core.even_QMARK_.call(null, cljs.core.count.call(null, type_fs))) {
|
|
}else {
|
|
throw new Error([cljs.core.str("Assert failed: "), cljs.core.str(cljs.core.pr_str.call(null, cljs.core.list(new cljs.core.Symbol(null, "even?", "even?", -1543640034, null), cljs.core.list(new cljs.core.Symbol(null, "count", "count", -1545680184, null), new cljs.core.Symbol(null, "type-fs", "type-fs", 1801297401, null)))))].join(""));
|
|
}
|
|
var vec__14607_14630 = dommy.core.elem_and_selector.call(null, elem_sel);
|
|
var elem_14631 = cljs.core.nth.call(null, vec__14607_14630, 0, null);
|
|
var selector_14632 = cljs.core.nth.call(null, vec__14607_14630, 1, null);
|
|
var seq__14608_14633 = cljs.core.seq.call(null, cljs.core.partition.call(null, 2, type_fs));
|
|
var chunk__14615_14634 = null;
|
|
var count__14616_14635 = 0;
|
|
var i__14617_14636 = 0;
|
|
while(true) {
|
|
if(i__14617_14636 < count__14616_14635) {
|
|
var vec__14624_14637 = cljs.core._nth.call(null, chunk__14615_14634, i__14617_14636);
|
|
var orig_type_14638 = cljs.core.nth.call(null, vec__14624_14637, 0, null);
|
|
var f_14639 = cljs.core.nth.call(null, vec__14624_14637, 1, null);
|
|
var seq__14618_14640 = cljs.core.seq.call(null, cljs.core.get.call(null, dommy.core.special_listener_makers, orig_type_14638, cljs.core.PersistentArrayMap.fromArray([orig_type_14638, cljs.core.identity], true)));
|
|
var chunk__14620_14641 = null;
|
|
var count__14621_14642 = 0;
|
|
var i__14622_14643 = 0;
|
|
while(true) {
|
|
if(i__14622_14643 < count__14621_14642) {
|
|
var vec__14625_14644 = cljs.core._nth.call(null, chunk__14620_14641, i__14622_14643);
|
|
var actual_type_14645 = cljs.core.nth.call(null, vec__14625_14644, 0, null);
|
|
var factory_14646 = cljs.core.nth.call(null, vec__14625_14644, 1, null);
|
|
var canonical_f_14647 = (cljs.core.truth_(selector_14632) ? cljs.core.partial.call(null, dommy.core.live_listener, elem_14631, selector_14632) : cljs.core.identity).call(null, factory_14646.call(null, f_14639));
|
|
dommy.core.update_event_listeners_BANG_.call(null, elem_14631, cljs.core.assoc_in, cljs.core.PersistentVector.fromArray([selector_14632, actual_type_14645, f_14639], true), canonical_f_14647);
|
|
if(cljs.core.truth_(elem_14631.addEventListener)) {
|
|
elem_14631.addEventListener(cljs.core.name.call(null, actual_type_14645), canonical_f_14647)
|
|
}else {
|
|
elem_14631.attachEvent(cljs.core.name.call(null, actual_type_14645), canonical_f_14647)
|
|
}
|
|
var G__14648 = seq__14618_14640;
|
|
var G__14649 = chunk__14620_14641;
|
|
var G__14650 = count__14621_14642;
|
|
var G__14651 = i__14622_14643 + 1;
|
|
seq__14618_14640 = G__14648;
|
|
chunk__14620_14641 = G__14649;
|
|
count__14621_14642 = G__14650;
|
|
i__14622_14643 = G__14651;
|
|
continue
|
|
}else {
|
|
var temp__4092__auto___14652 = cljs.core.seq.call(null, seq__14618_14640);
|
|
if(temp__4092__auto___14652) {
|
|
var seq__14618_14653__$1 = temp__4092__auto___14652;
|
|
if(cljs.core.chunked_seq_QMARK_.call(null, seq__14618_14653__$1)) {
|
|
var c__3037__auto___14654 = cljs.core.chunk_first.call(null, seq__14618_14653__$1);
|
|
var G__14655 = cljs.core.chunk_rest.call(null, seq__14618_14653__$1);
|
|
var G__14656 = c__3037__auto___14654;
|
|
var G__14657 = cljs.core.count.call(null, c__3037__auto___14654);
|
|
var G__14658 = 0;
|
|
seq__14618_14640 = G__14655;
|
|
chunk__14620_14641 = G__14656;
|
|
count__14621_14642 = G__14657;
|
|
i__14622_14643 = G__14658;
|
|
continue
|
|
}else {
|
|
var vec__14626_14659 = cljs.core.first.call(null, seq__14618_14653__$1);
|
|
var actual_type_14660 = cljs.core.nth.call(null, vec__14626_14659, 0, null);
|
|
var factory_14661 = cljs.core.nth.call(null, vec__14626_14659, 1, null);
|
|
var canonical_f_14662 = (cljs.core.truth_(selector_14632) ? cljs.core.partial.call(null, dommy.core.live_listener, elem_14631, selector_14632) : cljs.core.identity).call(null, factory_14661.call(null, f_14639));
|
|
dommy.core.update_event_listeners_BANG_.call(null, elem_14631, cljs.core.assoc_in, cljs.core.PersistentVector.fromArray([selector_14632, actual_type_14660, f_14639], true), canonical_f_14662);
|
|
if(cljs.core.truth_(elem_14631.addEventListener)) {
|
|
elem_14631.addEventListener(cljs.core.name.call(null, actual_type_14660), canonical_f_14662)
|
|
}else {
|
|
elem_14631.attachEvent(cljs.core.name.call(null, actual_type_14660), canonical_f_14662)
|
|
}
|
|
var G__14663 = cljs.core.next.call(null, seq__14618_14653__$1);
|
|
var G__14664 = null;
|
|
var G__14665 = 0;
|
|
var G__14666 = 0;
|
|
seq__14618_14640 = G__14663;
|
|
chunk__14620_14641 = G__14664;
|
|
count__14621_14642 = G__14665;
|
|
i__14622_14643 = G__14666;
|
|
continue
|
|
}
|
|
}else {
|
|
}
|
|
}
|
|
break
|
|
}
|
|
var G__14667 = seq__14608_14633;
|
|
var G__14668 = chunk__14615_14634;
|
|
var G__14669 = count__14616_14635;
|
|
var G__14670 = i__14617_14636 + 1;
|
|
seq__14608_14633 = G__14667;
|
|
chunk__14615_14634 = G__14668;
|
|
count__14616_14635 = G__14669;
|
|
i__14617_14636 = G__14670;
|
|
continue
|
|
}else {
|
|
var temp__4092__auto___14671 = cljs.core.seq.call(null, seq__14608_14633);
|
|
if(temp__4092__auto___14671) {
|
|
var seq__14608_14672__$1 = temp__4092__auto___14671;
|
|
if(cljs.core.chunked_seq_QMARK_.call(null, seq__14608_14672__$1)) {
|
|
var c__3037__auto___14673 = cljs.core.chunk_first.call(null, seq__14608_14672__$1);
|
|
var G__14674 = cljs.core.chunk_rest.call(null, seq__14608_14672__$1);
|
|
var G__14675 = c__3037__auto___14673;
|
|
var G__14676 = cljs.core.count.call(null, c__3037__auto___14673);
|
|
var G__14677 = 0;
|
|
seq__14608_14633 = G__14674;
|
|
chunk__14615_14634 = G__14675;
|
|
count__14616_14635 = G__14676;
|
|
i__14617_14636 = G__14677;
|
|
continue
|
|
}else {
|
|
var vec__14627_14678 = cljs.core.first.call(null, seq__14608_14672__$1);
|
|
var orig_type_14679 = cljs.core.nth.call(null, vec__14627_14678, 0, null);
|
|
var f_14680 = cljs.core.nth.call(null, vec__14627_14678, 1, null);
|
|
var seq__14609_14681 = cljs.core.seq.call(null, cljs.core.get.call(null, dommy.core.special_listener_makers, orig_type_14679, cljs.core.PersistentArrayMap.fromArray([orig_type_14679, cljs.core.identity], true)));
|
|
var chunk__14611_14682 = null;
|
|
var count__14612_14683 = 0;
|
|
var i__14613_14684 = 0;
|
|
while(true) {
|
|
if(i__14613_14684 < count__14612_14683) {
|
|
var vec__14628_14685 = cljs.core._nth.call(null, chunk__14611_14682, i__14613_14684);
|
|
var actual_type_14686 = cljs.core.nth.call(null, vec__14628_14685, 0, null);
|
|
var factory_14687 = cljs.core.nth.call(null, vec__14628_14685, 1, null);
|
|
var canonical_f_14688 = (cljs.core.truth_(selector_14632) ? cljs.core.partial.call(null, dommy.core.live_listener, elem_14631, selector_14632) : cljs.core.identity).call(null, factory_14687.call(null, f_14680));
|
|
dommy.core.update_event_listeners_BANG_.call(null, elem_14631, cljs.core.assoc_in, cljs.core.PersistentVector.fromArray([selector_14632, actual_type_14686, f_14680], true), canonical_f_14688);
|
|
if(cljs.core.truth_(elem_14631.addEventListener)) {
|
|
elem_14631.addEventListener(cljs.core.name.call(null, actual_type_14686), canonical_f_14688)
|
|
}else {
|
|
elem_14631.attachEvent(cljs.core.name.call(null, actual_type_14686), canonical_f_14688)
|
|
}
|
|
var G__14689 = seq__14609_14681;
|
|
var G__14690 = chunk__14611_14682;
|
|
var G__14691 = count__14612_14683;
|
|
var G__14692 = i__14613_14684 + 1;
|
|
seq__14609_14681 = G__14689;
|
|
chunk__14611_14682 = G__14690;
|
|
count__14612_14683 = G__14691;
|
|
i__14613_14684 = G__14692;
|
|
continue
|
|
}else {
|
|
var temp__4092__auto___14693__$1 = cljs.core.seq.call(null, seq__14609_14681);
|
|
if(temp__4092__auto___14693__$1) {
|
|
var seq__14609_14694__$1 = temp__4092__auto___14693__$1;
|
|
if(cljs.core.chunked_seq_QMARK_.call(null, seq__14609_14694__$1)) {
|
|
var c__3037__auto___14695 = cljs.core.chunk_first.call(null, seq__14609_14694__$1);
|
|
var G__14696 = cljs.core.chunk_rest.call(null, seq__14609_14694__$1);
|
|
var G__14697 = c__3037__auto___14695;
|
|
var G__14698 = cljs.core.count.call(null, c__3037__auto___14695);
|
|
var G__14699 = 0;
|
|
seq__14609_14681 = G__14696;
|
|
chunk__14611_14682 = G__14697;
|
|
count__14612_14683 = G__14698;
|
|
i__14613_14684 = G__14699;
|
|
continue
|
|
}else {
|
|
var vec__14629_14700 = cljs.core.first.call(null, seq__14609_14694__$1);
|
|
var actual_type_14701 = cljs.core.nth.call(null, vec__14629_14700, 0, null);
|
|
var factory_14702 = cljs.core.nth.call(null, vec__14629_14700, 1, null);
|
|
var canonical_f_14703 = (cljs.core.truth_(selector_14632) ? cljs.core.partial.call(null, dommy.core.live_listener, elem_14631, selector_14632) : cljs.core.identity).call(null, factory_14702.call(null, f_14680));
|
|
dommy.core.update_event_listeners_BANG_.call(null, elem_14631, cljs.core.assoc_in, cljs.core.PersistentVector.fromArray([selector_14632, actual_type_14701, f_14680], true), canonical_f_14703);
|
|
if(cljs.core.truth_(elem_14631.addEventListener)) {
|
|
elem_14631.addEventListener(cljs.core.name.call(null, actual_type_14701), canonical_f_14703)
|
|
}else {
|
|
elem_14631.attachEvent(cljs.core.name.call(null, actual_type_14701), canonical_f_14703)
|
|
}
|
|
var G__14704 = cljs.core.next.call(null, seq__14609_14694__$1);
|
|
var G__14705 = null;
|
|
var G__14706 = 0;
|
|
var G__14707 = 0;
|
|
seq__14609_14681 = G__14704;
|
|
chunk__14611_14682 = G__14705;
|
|
count__14612_14683 = G__14706;
|
|
i__14613_14684 = G__14707;
|
|
continue
|
|
}
|
|
}else {
|
|
}
|
|
}
|
|
break
|
|
}
|
|
var G__14708 = cljs.core.next.call(null, seq__14608_14672__$1);
|
|
var G__14709 = null;
|
|
var G__14710 = 0;
|
|
var G__14711 = 0;
|
|
seq__14608_14633 = G__14708;
|
|
chunk__14615_14634 = G__14709;
|
|
count__14616_14635 = G__14710;
|
|
i__14617_14636 = G__14711;
|
|
continue
|
|
}
|
|
}else {
|
|
}
|
|
}
|
|
break
|
|
}
|
|
return elem_sel
|
|
};
|
|
var listen_BANG_ = function(elem_sel, var_args) {
|
|
var type_fs = null;
|
|
if(arguments.length > 1) {
|
|
type_fs = cljs.core.array_seq(Array.prototype.slice.call(arguments, 1), 0)
|
|
}
|
|
return listen_BANG___delegate.call(this, elem_sel, type_fs)
|
|
};
|
|
listen_BANG_.cljs$lang$maxFixedArity = 1;
|
|
listen_BANG_.cljs$lang$applyTo = function(arglist__14712) {
|
|
var elem_sel = cljs.core.first(arglist__14712);
|
|
var type_fs = cljs.core.rest(arglist__14712);
|
|
return listen_BANG___delegate(elem_sel, type_fs)
|
|
};
|
|
listen_BANG_.cljs$core$IFn$_invoke$arity$variadic = listen_BANG___delegate;
|
|
return listen_BANG_
|
|
}();
|
|
dommy.core.unlisten_BANG_ = function() {
|
|
var unlisten_BANG___delegate = function(elem_sel, type_fs) {
|
|
if(cljs.core.even_QMARK_.call(null, cljs.core.count.call(null, type_fs))) {
|
|
}else {
|
|
throw new Error([cljs.core.str("Assert failed: "), cljs.core.str(cljs.core.pr_str.call(null, cljs.core.list(new cljs.core.Symbol(null, "even?", "even?", -1543640034, null), cljs.core.list(new cljs.core.Symbol(null, "count", "count", -1545680184, null), new cljs.core.Symbol(null, "type-fs", "type-fs", 1801297401, null)))))].join(""));
|
|
}
|
|
var vec__14736_14759 = dommy.core.elem_and_selector.call(null, elem_sel);
|
|
var elem_14760 = cljs.core.nth.call(null, vec__14736_14759, 0, null);
|
|
var selector_14761 = cljs.core.nth.call(null, vec__14736_14759, 1, null);
|
|
var seq__14737_14762 = cljs.core.seq.call(null, cljs.core.partition.call(null, 2, type_fs));
|
|
var chunk__14744_14763 = null;
|
|
var count__14745_14764 = 0;
|
|
var i__14746_14765 = 0;
|
|
while(true) {
|
|
if(i__14746_14765 < count__14745_14764) {
|
|
var vec__14753_14766 = cljs.core._nth.call(null, chunk__14744_14763, i__14746_14765);
|
|
var orig_type_14767 = cljs.core.nth.call(null, vec__14753_14766, 0, null);
|
|
var f_14768 = cljs.core.nth.call(null, vec__14753_14766, 1, null);
|
|
var seq__14747_14769 = cljs.core.seq.call(null, cljs.core.get.call(null, dommy.core.special_listener_makers, orig_type_14767, cljs.core.PersistentArrayMap.fromArray([orig_type_14767, cljs.core.identity], true)));
|
|
var chunk__14749_14770 = null;
|
|
var count__14750_14771 = 0;
|
|
var i__14751_14772 = 0;
|
|
while(true) {
|
|
if(i__14751_14772 < count__14750_14771) {
|
|
var vec__14754_14773 = cljs.core._nth.call(null, chunk__14749_14770, i__14751_14772);
|
|
var actual_type_14774 = cljs.core.nth.call(null, vec__14754_14773, 0, null);
|
|
var __14775 = cljs.core.nth.call(null, vec__14754_14773, 1, null);
|
|
var keys_14776 = cljs.core.PersistentVector.fromArray([selector_14761, actual_type_14774, f_14768], true);
|
|
var canonical_f_14777 = cljs.core.get_in.call(null, dommy.core.event_listeners.call(null, elem_14760), keys_14776);
|
|
dommy.core.update_event_listeners_BANG_.call(null, elem_14760, dommy.utils.dissoc_in, keys_14776);
|
|
if(cljs.core.truth_(elem_14760.removeEventListener)) {
|
|
elem_14760.removeEventListener(cljs.core.name.call(null, actual_type_14774), canonical_f_14777)
|
|
}else {
|
|
elem_14760.detachEvent(cljs.core.name.call(null, actual_type_14774), canonical_f_14777)
|
|
}
|
|
var G__14778 = seq__14747_14769;
|
|
var G__14779 = chunk__14749_14770;
|
|
var G__14780 = count__14750_14771;
|
|
var G__14781 = i__14751_14772 + 1;
|
|
seq__14747_14769 = G__14778;
|
|
chunk__14749_14770 = G__14779;
|
|
count__14750_14771 = G__14780;
|
|
i__14751_14772 = G__14781;
|
|
continue
|
|
}else {
|
|
var temp__4092__auto___14782 = cljs.core.seq.call(null, seq__14747_14769);
|
|
if(temp__4092__auto___14782) {
|
|
var seq__14747_14783__$1 = temp__4092__auto___14782;
|
|
if(cljs.core.chunked_seq_QMARK_.call(null, seq__14747_14783__$1)) {
|
|
var c__3037__auto___14784 = cljs.core.chunk_first.call(null, seq__14747_14783__$1);
|
|
var G__14785 = cljs.core.chunk_rest.call(null, seq__14747_14783__$1);
|
|
var G__14786 = c__3037__auto___14784;
|
|
var G__14787 = cljs.core.count.call(null, c__3037__auto___14784);
|
|
var G__14788 = 0;
|
|
seq__14747_14769 = G__14785;
|
|
chunk__14749_14770 = G__14786;
|
|
count__14750_14771 = G__14787;
|
|
i__14751_14772 = G__14788;
|
|
continue
|
|
}else {
|
|
var vec__14755_14789 = cljs.core.first.call(null, seq__14747_14783__$1);
|
|
var actual_type_14790 = cljs.core.nth.call(null, vec__14755_14789, 0, null);
|
|
var __14791 = cljs.core.nth.call(null, vec__14755_14789, 1, null);
|
|
var keys_14792 = cljs.core.PersistentVector.fromArray([selector_14761, actual_type_14790, f_14768], true);
|
|
var canonical_f_14793 = cljs.core.get_in.call(null, dommy.core.event_listeners.call(null, elem_14760), keys_14792);
|
|
dommy.core.update_event_listeners_BANG_.call(null, elem_14760, dommy.utils.dissoc_in, keys_14792);
|
|
if(cljs.core.truth_(elem_14760.removeEventListener)) {
|
|
elem_14760.removeEventListener(cljs.core.name.call(null, actual_type_14790), canonical_f_14793)
|
|
}else {
|
|
elem_14760.detachEvent(cljs.core.name.call(null, actual_type_14790), canonical_f_14793)
|
|
}
|
|
var G__14794 = cljs.core.next.call(null, seq__14747_14783__$1);
|
|
var G__14795 = null;
|
|
var G__14796 = 0;
|
|
var G__14797 = 0;
|
|
seq__14747_14769 = G__14794;
|
|
chunk__14749_14770 = G__14795;
|
|
count__14750_14771 = G__14796;
|
|
i__14751_14772 = G__14797;
|
|
continue
|
|
}
|
|
}else {
|
|
}
|
|
}
|
|
break
|
|
}
|
|
var G__14798 = seq__14737_14762;
|
|
var G__14799 = chunk__14744_14763;
|
|
var G__14800 = count__14745_14764;
|
|
var G__14801 = i__14746_14765 + 1;
|
|
seq__14737_14762 = G__14798;
|
|
chunk__14744_14763 = G__14799;
|
|
count__14745_14764 = G__14800;
|
|
i__14746_14765 = G__14801;
|
|
continue
|
|
}else {
|
|
var temp__4092__auto___14802 = cljs.core.seq.call(null, seq__14737_14762);
|
|
if(temp__4092__auto___14802) {
|
|
var seq__14737_14803__$1 = temp__4092__auto___14802;
|
|
if(cljs.core.chunked_seq_QMARK_.call(null, seq__14737_14803__$1)) {
|
|
var c__3037__auto___14804 = cljs.core.chunk_first.call(null, seq__14737_14803__$1);
|
|
var G__14805 = cljs.core.chunk_rest.call(null, seq__14737_14803__$1);
|
|
var G__14806 = c__3037__auto___14804;
|
|
var G__14807 = cljs.core.count.call(null, c__3037__auto___14804);
|
|
var G__14808 = 0;
|
|
seq__14737_14762 = G__14805;
|
|
chunk__14744_14763 = G__14806;
|
|
count__14745_14764 = G__14807;
|
|
i__14746_14765 = G__14808;
|
|
continue
|
|
}else {
|
|
var vec__14756_14809 = cljs.core.first.call(null, seq__14737_14803__$1);
|
|
var orig_type_14810 = cljs.core.nth.call(null, vec__14756_14809, 0, null);
|
|
var f_14811 = cljs.core.nth.call(null, vec__14756_14809, 1, null);
|
|
var seq__14738_14812 = cljs.core.seq.call(null, cljs.core.get.call(null, dommy.core.special_listener_makers, orig_type_14810, cljs.core.PersistentArrayMap.fromArray([orig_type_14810, cljs.core.identity], true)));
|
|
var chunk__14740_14813 = null;
|
|
var count__14741_14814 = 0;
|
|
var i__14742_14815 = 0;
|
|
while(true) {
|
|
if(i__14742_14815 < count__14741_14814) {
|
|
var vec__14757_14816 = cljs.core._nth.call(null, chunk__14740_14813, i__14742_14815);
|
|
var actual_type_14817 = cljs.core.nth.call(null, vec__14757_14816, 0, null);
|
|
var __14818 = cljs.core.nth.call(null, vec__14757_14816, 1, null);
|
|
var keys_14819 = cljs.core.PersistentVector.fromArray([selector_14761, actual_type_14817, f_14811], true);
|
|
var canonical_f_14820 = cljs.core.get_in.call(null, dommy.core.event_listeners.call(null, elem_14760), keys_14819);
|
|
dommy.core.update_event_listeners_BANG_.call(null, elem_14760, dommy.utils.dissoc_in, keys_14819);
|
|
if(cljs.core.truth_(elem_14760.removeEventListener)) {
|
|
elem_14760.removeEventListener(cljs.core.name.call(null, actual_type_14817), canonical_f_14820)
|
|
}else {
|
|
elem_14760.detachEvent(cljs.core.name.call(null, actual_type_14817), canonical_f_14820)
|
|
}
|
|
var G__14821 = seq__14738_14812;
|
|
var G__14822 = chunk__14740_14813;
|
|
var G__14823 = count__14741_14814;
|
|
var G__14824 = i__14742_14815 + 1;
|
|
seq__14738_14812 = G__14821;
|
|
chunk__14740_14813 = G__14822;
|
|
count__14741_14814 = G__14823;
|
|
i__14742_14815 = G__14824;
|
|
continue
|
|
}else {
|
|
var temp__4092__auto___14825__$1 = cljs.core.seq.call(null, seq__14738_14812);
|
|
if(temp__4092__auto___14825__$1) {
|
|
var seq__14738_14826__$1 = temp__4092__auto___14825__$1;
|
|
if(cljs.core.chunked_seq_QMARK_.call(null, seq__14738_14826__$1)) {
|
|
var c__3037__auto___14827 = cljs.core.chunk_first.call(null, seq__14738_14826__$1);
|
|
var G__14828 = cljs.core.chunk_rest.call(null, seq__14738_14826__$1);
|
|
var G__14829 = c__3037__auto___14827;
|
|
var G__14830 = cljs.core.count.call(null, c__3037__auto___14827);
|
|
var G__14831 = 0;
|
|
seq__14738_14812 = G__14828;
|
|
chunk__14740_14813 = G__14829;
|
|
count__14741_14814 = G__14830;
|
|
i__14742_14815 = G__14831;
|
|
continue
|
|
}else {
|
|
var vec__14758_14832 = cljs.core.first.call(null, seq__14738_14826__$1);
|
|
var actual_type_14833 = cljs.core.nth.call(null, vec__14758_14832, 0, null);
|
|
var __14834 = cljs.core.nth.call(null, vec__14758_14832, 1, null);
|
|
var keys_14835 = cljs.core.PersistentVector.fromArray([selector_14761, actual_type_14833, f_14811], true);
|
|
var canonical_f_14836 = cljs.core.get_in.call(null, dommy.core.event_listeners.call(null, elem_14760), keys_14835);
|
|
dommy.core.update_event_listeners_BANG_.call(null, elem_14760, dommy.utils.dissoc_in, keys_14835);
|
|
if(cljs.core.truth_(elem_14760.removeEventListener)) {
|
|
elem_14760.removeEventListener(cljs.core.name.call(null, actual_type_14833), canonical_f_14836)
|
|
}else {
|
|
elem_14760.detachEvent(cljs.core.name.call(null, actual_type_14833), canonical_f_14836)
|
|
}
|
|
var G__14837 = cljs.core.next.call(null, seq__14738_14826__$1);
|
|
var G__14838 = null;
|
|
var G__14839 = 0;
|
|
var G__14840 = 0;
|
|
seq__14738_14812 = G__14837;
|
|
chunk__14740_14813 = G__14838;
|
|
count__14741_14814 = G__14839;
|
|
i__14742_14815 = G__14840;
|
|
continue
|
|
}
|
|
}else {
|
|
}
|
|
}
|
|
break
|
|
}
|
|
var G__14841 = cljs.core.next.call(null, seq__14737_14803__$1);
|
|
var G__14842 = null;
|
|
var G__14843 = 0;
|
|
var G__14844 = 0;
|
|
seq__14737_14762 = G__14841;
|
|
chunk__14744_14763 = G__14842;
|
|
count__14745_14764 = G__14843;
|
|
i__14746_14765 = G__14844;
|
|
continue
|
|
}
|
|
}else {
|
|
}
|
|
}
|
|
break
|
|
}
|
|
return elem_sel
|
|
};
|
|
var unlisten_BANG_ = function(elem_sel, var_args) {
|
|
var type_fs = null;
|
|
if(arguments.length > 1) {
|
|
type_fs = cljs.core.array_seq(Array.prototype.slice.call(arguments, 1), 0)
|
|
}
|
|
return unlisten_BANG___delegate.call(this, elem_sel, type_fs)
|
|
};
|
|
unlisten_BANG_.cljs$lang$maxFixedArity = 1;
|
|
unlisten_BANG_.cljs$lang$applyTo = function(arglist__14845) {
|
|
var elem_sel = cljs.core.first(arglist__14845);
|
|
var type_fs = cljs.core.rest(arglist__14845);
|
|
return unlisten_BANG___delegate(elem_sel, type_fs)
|
|
};
|
|
unlisten_BANG_.cljs$core$IFn$_invoke$arity$variadic = unlisten_BANG___delegate;
|
|
return unlisten_BANG_
|
|
}();
|
|
dommy.core.listen_once_BANG_ = function() {
|
|
var listen_once_BANG___delegate = function(elem_sel, type_fs) {
|
|
if(cljs.core.even_QMARK_.call(null, cljs.core.count.call(null, type_fs))) {
|
|
}else {
|
|
throw new Error([cljs.core.str("Assert failed: "), cljs.core.str(cljs.core.pr_str.call(null, cljs.core.list(new cljs.core.Symbol(null, "even?", "even?", -1543640034, null), cljs.core.list(new cljs.core.Symbol(null, "count", "count", -1545680184, null), new cljs.core.Symbol(null, "type-fs", "type-fs", 1801297401, null)))))].join(""));
|
|
}
|
|
var vec__14853_14860 = dommy.core.elem_and_selector.call(null, elem_sel);
|
|
var elem_14861 = cljs.core.nth.call(null, vec__14853_14860, 0, null);
|
|
var selector_14862 = cljs.core.nth.call(null, vec__14853_14860, 1, null);
|
|
var seq__14854_14863 = cljs.core.seq.call(null, cljs.core.partition.call(null, 2, type_fs));
|
|
var chunk__14855_14864 = null;
|
|
var count__14856_14865 = 0;
|
|
var i__14857_14866 = 0;
|
|
while(true) {
|
|
if(i__14857_14866 < count__14856_14865) {
|
|
var vec__14858_14867 = cljs.core._nth.call(null, chunk__14855_14864, i__14857_14866);
|
|
var type_14868 = cljs.core.nth.call(null, vec__14858_14867, 0, null);
|
|
var f_14869 = cljs.core.nth.call(null, vec__14858_14867, 1, null);
|
|
dommy.core.listen_BANG_.call(null, elem_sel, type_14868, function(seq__14854_14863, chunk__14855_14864, count__14856_14865, i__14857_14866, vec__14858_14867, type_14868, f_14869) {
|
|
return function this_fn(e) {
|
|
dommy.core.unlisten_BANG_.call(null, elem_sel, type_14868, this_fn);
|
|
return f_14869.call(null, e)
|
|
}
|
|
}(seq__14854_14863, chunk__14855_14864, count__14856_14865, i__14857_14866, vec__14858_14867, type_14868, f_14869));
|
|
var G__14870 = seq__14854_14863;
|
|
var G__14871 = chunk__14855_14864;
|
|
var G__14872 = count__14856_14865;
|
|
var G__14873 = i__14857_14866 + 1;
|
|
seq__14854_14863 = G__14870;
|
|
chunk__14855_14864 = G__14871;
|
|
count__14856_14865 = G__14872;
|
|
i__14857_14866 = G__14873;
|
|
continue
|
|
}else {
|
|
var temp__4092__auto___14874 = cljs.core.seq.call(null, seq__14854_14863);
|
|
if(temp__4092__auto___14874) {
|
|
var seq__14854_14875__$1 = temp__4092__auto___14874;
|
|
if(cljs.core.chunked_seq_QMARK_.call(null, seq__14854_14875__$1)) {
|
|
var c__3037__auto___14876 = cljs.core.chunk_first.call(null, seq__14854_14875__$1);
|
|
var G__14877 = cljs.core.chunk_rest.call(null, seq__14854_14875__$1);
|
|
var G__14878 = c__3037__auto___14876;
|
|
var G__14879 = cljs.core.count.call(null, c__3037__auto___14876);
|
|
var G__14880 = 0;
|
|
seq__14854_14863 = G__14877;
|
|
chunk__14855_14864 = G__14878;
|
|
count__14856_14865 = G__14879;
|
|
i__14857_14866 = G__14880;
|
|
continue
|
|
}else {
|
|
var vec__14859_14881 = cljs.core.first.call(null, seq__14854_14875__$1);
|
|
var type_14882 = cljs.core.nth.call(null, vec__14859_14881, 0, null);
|
|
var f_14883 = cljs.core.nth.call(null, vec__14859_14881, 1, null);
|
|
dommy.core.listen_BANG_.call(null, elem_sel, type_14882, function(seq__14854_14863, chunk__14855_14864, count__14856_14865, i__14857_14866, vec__14859_14881, type_14882, f_14883, seq__14854_14875__$1, temp__4092__auto___14874) {
|
|
return function this_fn(e) {
|
|
dommy.core.unlisten_BANG_.call(null, elem_sel, type_14882, this_fn);
|
|
return f_14883.call(null, e)
|
|
}
|
|
}(seq__14854_14863, chunk__14855_14864, count__14856_14865, i__14857_14866, vec__14859_14881, type_14882, f_14883, seq__14854_14875__$1, temp__4092__auto___14874));
|
|
var G__14884 = cljs.core.next.call(null, seq__14854_14875__$1);
|
|
var G__14885 = null;
|
|
var G__14886 = 0;
|
|
var G__14887 = 0;
|
|
seq__14854_14863 = G__14884;
|
|
chunk__14855_14864 = G__14885;
|
|
count__14856_14865 = G__14886;
|
|
i__14857_14866 = G__14887;
|
|
continue
|
|
}
|
|
}else {
|
|
}
|
|
}
|
|
break
|
|
}
|
|
return elem_sel
|
|
};
|
|
var listen_once_BANG_ = function(elem_sel, var_args) {
|
|
var type_fs = null;
|
|
if(arguments.length > 1) {
|
|
type_fs = cljs.core.array_seq(Array.prototype.slice.call(arguments, 1), 0)
|
|
}
|
|
return listen_once_BANG___delegate.call(this, elem_sel, type_fs)
|
|
};
|
|
listen_once_BANG_.cljs$lang$maxFixedArity = 1;
|
|
listen_once_BANG_.cljs$lang$applyTo = function(arglist__14888) {
|
|
var elem_sel = cljs.core.first(arglist__14888);
|
|
var type_fs = cljs.core.rest(arglist__14888);
|
|
return listen_once_BANG___delegate(elem_sel, type_fs)
|
|
};
|
|
listen_once_BANG_.cljs$core$IFn$_invoke$arity$variadic = listen_once_BANG___delegate;
|
|
return listen_once_BANG_
|
|
}();
|
|
dommy.core.fire_BANG_ = function() {
|
|
var fire_BANG___delegate = function(node, event_type, p__14889) {
|
|
var vec__14891 = p__14889;
|
|
var update_event_BANG_ = cljs.core.nth.call(null, vec__14891, 0, null);
|
|
if(dommy.core.descendant_QMARK_.call(null, node, document.documentElement)) {
|
|
}else {
|
|
throw new Error([cljs.core.str("Assert failed: "), cljs.core.str(cljs.core.pr_str.call(null, cljs.core.list(new cljs.core.Symbol(null, "descendant?", "descendant?", -1886221157, null), new cljs.core.Symbol(null, "node", "node", -1637144645, null), new cljs.core.Symbol("js", "document.documentElement", "js/document.documentElement", -1449696112, null))))].join(""));
|
|
}
|
|
var update_event_BANG___$1 = function() {
|
|
var or__3943__auto__ = update_event_BANG_;
|
|
if(cljs.core.truth_(or__3943__auto__)) {
|
|
return or__3943__auto__
|
|
}else {
|
|
return cljs.core.identity
|
|
}
|
|
}();
|
|
if(cljs.core.truth_(document.createEvent)) {
|
|
var event = document.createEvent("Event");
|
|
event.initEvent(cljs.core.name.call(null, event_type), true, true);
|
|
return node.dispatchEvent(update_event_BANG___$1.call(null, event))
|
|
}else {
|
|
return node.fireEvent([cljs.core.str("on"), cljs.core.str(cljs.core.name.call(null, event_type))].join(""), update_event_BANG___$1.call(null, document.createEventObject()))
|
|
}
|
|
};
|
|
var fire_BANG_ = function(node, event_type, var_args) {
|
|
var p__14889 = null;
|
|
if(arguments.length > 2) {
|
|
p__14889 = cljs.core.array_seq(Array.prototype.slice.call(arguments, 2), 0)
|
|
}
|
|
return fire_BANG___delegate.call(this, node, event_type, p__14889)
|
|
};
|
|
fire_BANG_.cljs$lang$maxFixedArity = 2;
|
|
fire_BANG_.cljs$lang$applyTo = function(arglist__14892) {
|
|
var node = cljs.core.first(arglist__14892);
|
|
arglist__14892 = cljs.core.next(arglist__14892);
|
|
var event_type = cljs.core.first(arglist__14892);
|
|
var p__14889 = cljs.core.rest(arglist__14892);
|
|
return fire_BANG___delegate(node, event_type, p__14889)
|
|
};
|
|
fire_BANG_.cljs$core$IFn$_invoke$arity$variadic = fire_BANG___delegate;
|
|
return fire_BANG_
|
|
}();
|
|
goog.provide("grub.view");
|
|
goog.require("cljs.core");
|
|
goog.require("cljs.core.async");
|
|
goog.require("grub.async_utils");
|
|
goog.require("cljs.core.async");
|
|
goog.require("dommy.core");
|
|
goog.require("grub.state");
|
|
goog.require("grub.async_utils");
|
|
grub.view.add_grub_text = function() {
|
|
var dom24681 = document.createElement("input");
|
|
dom24681.className = "form-control";
|
|
if("text") {
|
|
dom24681.setAttribute("type", "text")
|
|
}else {
|
|
}
|
|
if("2 grubs") {
|
|
dom24681.setAttribute("placeholder", "2 grubs")
|
|
}else {
|
|
}
|
|
return dom24681
|
|
}();
|
|
grub.view.add_grub_btn = function() {
|
|
var dom24682 = document.createElement("button");
|
|
dom24682.className = "btn btn-default";
|
|
if("button") {
|
|
dom24682.setAttribute("type", "button")
|
|
}else {
|
|
}
|
|
dom24682.appendChild(document.createTextNode("Add"));
|
|
return dom24682
|
|
}();
|
|
grub.view.main_template = function main_template() {
|
|
var dom24693 = document.createElement("div");
|
|
dom24693.className = "container";
|
|
dom24693.appendChild(function() {
|
|
var dom24694 = document.createElement("div");
|
|
dom24694.className = "row show-grid";
|
|
dom24694.appendChild(function() {
|
|
var dom24695 = document.createElement("div");
|
|
dom24695.className = "col-lg-4";
|
|
return dom24695
|
|
}());
|
|
dom24694.appendChild(function() {
|
|
var dom24696 = document.createElement("div");
|
|
dom24696.className = "col-lg-4";
|
|
dom24696.appendChild(function() {
|
|
var dom24697 = document.createElement("h3");
|
|
dom24697.appendChild(document.createTextNode("Grub List"));
|
|
return dom24697
|
|
}());
|
|
dom24696.appendChild(function() {
|
|
var dom24698 = document.createElement("div");
|
|
dom24698.className = "input-group";
|
|
dom24698.appendChild(dommy.template.__GT_node_like.call(null, grub.view.add_grub_text));
|
|
dom24698.appendChild(function() {
|
|
var dom24699 = document.createElement("span");
|
|
dom24699.className = "input-group-btn";
|
|
dom24699.appendChild(dommy.template.__GT_node_like.call(null, grub.view.add_grub_btn));
|
|
return dom24699
|
|
}());
|
|
return dom24698
|
|
}());
|
|
dom24696.appendChild(function() {
|
|
var dom24700 = document.createElement("table");
|
|
dom24700.className = "table table-condensed";
|
|
dom24700.appendChild(function() {
|
|
var dom24701 = document.createElement("tbody");
|
|
dom24701.setAttribute("id", "grubList");
|
|
return dom24701
|
|
}());
|
|
return dom24700
|
|
}());
|
|
return dom24696
|
|
}());
|
|
dom24694.appendChild(function() {
|
|
var dom24702 = document.createElement("div");
|
|
dom24702.className = "col-lg-4";
|
|
return dom24702
|
|
}());
|
|
return dom24694
|
|
}());
|
|
return dom24693
|
|
};
|
|
grub.view.grub_template = function grub_template(grub__$1) {
|
|
var dom24710 = document.createElement("tr");
|
|
if(cljs.core.truth_((new cljs.core.Keyword("\ufdd0:_id")).call(null, grub__$1))) {
|
|
dom24710.setAttribute("id", (new cljs.core.Keyword("\ufdd0:_id")).call(null, grub__$1))
|
|
}else {
|
|
}
|
|
dom24710.appendChild(function() {
|
|
var dom24711 = document.createElement("td");
|
|
dom24711.appendChild(function() {
|
|
var dom24712 = document.createElement("div");
|
|
dom24712.className = "checkbox grubCheckbox";
|
|
dom24712.appendChild(function() {
|
|
var dom24713 = document.createElement("label");
|
|
dom24713.appendChild(function() {
|
|
var dom24714 = document.createElement("input");
|
|
if("checkbox") {
|
|
dom24714.setAttribute("type", "checkbox")
|
|
}else {
|
|
}
|
|
if(cljs.core.truth_((new cljs.core.Keyword("\ufdd0:completed")).call(null, grub__$1))) {
|
|
dom24714.setAttribute("checked", (new cljs.core.Keyword("\ufdd0:completed")).call(null, grub__$1))
|
|
}else {
|
|
}
|
|
return dom24714
|
|
}());
|
|
dom24713.appendChild(dommy.template.__GT_node_like.call(null, (new cljs.core.Keyword("\ufdd0:grub")).call(null, grub__$1)));
|
|
return dom24713
|
|
}());
|
|
return dom24712
|
|
}());
|
|
return dom24711
|
|
}());
|
|
dom24710.appendChild(function() {
|
|
var dom24715 = document.createElement("td");
|
|
dom24715.appendChild(function() {
|
|
var dom24716 = document.createElement("button");
|
|
dom24716.className = "grub-close close";
|
|
if("button") {
|
|
dom24716.setAttribute("type", "button")
|
|
}else {
|
|
}
|
|
dom24716.appendChild(document.createTextNode("\u00d7"));
|
|
return dom24716
|
|
}());
|
|
return dom24715
|
|
}());
|
|
return dom24710
|
|
};
|
|
grub.view.render_body = function render_body() {
|
|
return dommy.core.prepend_BANG_.call(null, document.body, grub.view.main_template.call(null))
|
|
};
|
|
grub.view.get_add_grub_text = function get_add_grub_text() {
|
|
var text = dommy.core.value.call(null, grub.view.add_grub_text);
|
|
dommy.core.set_value_BANG_.call(null, grub.view.add_grub_text, "");
|
|
return text
|
|
};
|
|
grub.view.get_grubs_from_clicks = function get_grubs_from_clicks() {
|
|
var out = cljs.core.async.chan.call(null);
|
|
dommy.core.listen_BANG_.call(null, grub.view.add_grub_btn, "\ufdd0:click", function() {
|
|
var c__4545__auto__ = cljs.core.async.chan.call(null, 1);
|
|
cljs.core.async.impl.dispatch.run.call(null, function() {
|
|
var f__4546__auto__ = function() {
|
|
var switch__4471__auto__ = function(state_24730) {
|
|
var state_val_24731 = state_24730[1];
|
|
if(state_val_24731 === 2) {
|
|
var inst_24728 = state_24730[2];
|
|
var state_24730__$1 = state_24730;
|
|
return cljs.core.async.impl.ioc_helpers.return_chan.call(null, state_24730__$1, inst_24728)
|
|
}else {
|
|
if(state_val_24731 === 1) {
|
|
var inst_24726 = grub.view.get_add_grub_text.call(null);
|
|
var state_24730__$1 = state_24730;
|
|
return cljs.core.async.impl.ioc_helpers.put_BANG_.call(null, state_24730__$1, 2, out, inst_24726)
|
|
}else {
|
|
return null
|
|
}
|
|
}
|
|
};
|
|
return function(switch__4471__auto__) {
|
|
return function() {
|
|
var state_machine__4472__auto__ = null;
|
|
var state_machine__4472__auto____0 = function() {
|
|
var statearr_24733 = new Array(5);
|
|
statearr_24733[0] = state_machine__4472__auto__;
|
|
statearr_24733[1] = 1;
|
|
return statearr_24733
|
|
};
|
|
var state_machine__4472__auto____1 = function(state_24730) {
|
|
while(true) {
|
|
var result__4473__auto__ = switch__4471__auto__.call(null, state_24730);
|
|
if(result__4473__auto__ === "\ufdd0:recur") {
|
|
continue
|
|
}else {
|
|
return result__4473__auto__
|
|
}
|
|
break
|
|
}
|
|
};
|
|
state_machine__4472__auto__ = function(state_24730) {
|
|
switch(arguments.length) {
|
|
case 0:
|
|
return state_machine__4472__auto____0.call(this);
|
|
case 1:
|
|
return state_machine__4472__auto____1.call(this, state_24730)
|
|
}
|
|
throw new Error("Invalid arity: " + arguments.length);
|
|
};
|
|
state_machine__4472__auto__.cljs$core$IFn$_invoke$arity$0 = state_machine__4472__auto____0;
|
|
state_machine__4472__auto__.cljs$core$IFn$_invoke$arity$1 = state_machine__4472__auto____1;
|
|
return state_machine__4472__auto__
|
|
}()
|
|
}(switch__4471__auto__)
|
|
}();
|
|
var state__4547__auto__ = function() {
|
|
var statearr_24734 = f__4546__auto__.call(null);
|
|
statearr_24734[cljs.core.async.impl.ioc_helpers.USER_START_IDX] = c__4545__auto__;
|
|
return statearr_24734
|
|
}();
|
|
return cljs.core.async.impl.ioc_helpers.run_state_machine.call(null, state__4547__auto__)
|
|
});
|
|
return c__4545__auto__
|
|
});
|
|
return out
|
|
};
|
|
grub.view.put_grubs_if_enter_pressed = function put_grubs_if_enter_pressed(out, event) {
|
|
if(cljs.core._EQ_.call(null, event.keyIdentifier, "Enter")) {
|
|
var c__4545__auto__ = cljs.core.async.chan.call(null, 1);
|
|
cljs.core.async.impl.dispatch.run.call(null, function() {
|
|
var f__4546__auto__ = function() {
|
|
var switch__4471__auto__ = function(state_24748) {
|
|
var state_val_24749 = state_24748[1];
|
|
if(state_val_24749 === 2) {
|
|
var inst_24746 = state_24748[2];
|
|
var state_24748__$1 = state_24748;
|
|
return cljs.core.async.impl.ioc_helpers.return_chan.call(null, state_24748__$1, inst_24746)
|
|
}else {
|
|
if(state_val_24749 === 1) {
|
|
var inst_24744 = grub.view.get_add_grub_text.call(null);
|
|
var state_24748__$1 = state_24748;
|
|
return cljs.core.async.impl.ioc_helpers.put_BANG_.call(null, state_24748__$1, 2, out, inst_24744)
|
|
}else {
|
|
return null
|
|
}
|
|
}
|
|
};
|
|
return function(switch__4471__auto__) {
|
|
return function() {
|
|
var state_machine__4472__auto__ = null;
|
|
var state_machine__4472__auto____0 = function() {
|
|
var statearr_24751 = new Array(5);
|
|
statearr_24751[0] = state_machine__4472__auto__;
|
|
statearr_24751[1] = 1;
|
|
return statearr_24751
|
|
};
|
|
var state_machine__4472__auto____1 = function(state_24748) {
|
|
while(true) {
|
|
var result__4473__auto__ = switch__4471__auto__.call(null, state_24748);
|
|
if(result__4473__auto__ === "\ufdd0:recur") {
|
|
continue
|
|
}else {
|
|
return result__4473__auto__
|
|
}
|
|
break
|
|
}
|
|
};
|
|
state_machine__4472__auto__ = function(state_24748) {
|
|
switch(arguments.length) {
|
|
case 0:
|
|
return state_machine__4472__auto____0.call(this);
|
|
case 1:
|
|
return state_machine__4472__auto____1.call(this, state_24748)
|
|
}
|
|
throw new Error("Invalid arity: " + arguments.length);
|
|
};
|
|
state_machine__4472__auto__.cljs$core$IFn$_invoke$arity$0 = state_machine__4472__auto____0;
|
|
state_machine__4472__auto__.cljs$core$IFn$_invoke$arity$1 = state_machine__4472__auto____1;
|
|
return state_machine__4472__auto__
|
|
}()
|
|
}(switch__4471__auto__)
|
|
}();
|
|
var state__4547__auto__ = function() {
|
|
var statearr_24752 = f__4546__auto__.call(null);
|
|
statearr_24752[cljs.core.async.impl.ioc_helpers.USER_START_IDX] = c__4545__auto__;
|
|
return statearr_24752
|
|
}();
|
|
return cljs.core.async.impl.ioc_helpers.run_state_machine.call(null, state__4547__auto__)
|
|
});
|
|
return c__4545__auto__
|
|
}else {
|
|
return null
|
|
}
|
|
};
|
|
grub.view.get_grubs_from_enter = function get_grubs_from_enter() {
|
|
var out = cljs.core.async.chan.call(null);
|
|
dommy.core.listen_BANG_.call(null, grub.view.add_grub_text, "\ufdd0:keyup", cljs.core.partial.call(null, grub.view.put_grubs_if_enter_pressed, out));
|
|
return out
|
|
};
|
|
grub.view.get_added_events = function get_added_events() {
|
|
var grubs = grub.async_utils.fan_in.call(null, cljs.core.PersistentVector.fromArray([grub.view.get_grubs_from_clicks.call(null), grub.view.get_grubs_from_enter.call(null)], true));
|
|
return grub.async_utils.map_chan.call(null, function(g) {
|
|
return cljs.core.PersistentArrayMap.fromArray(["\ufdd0:event", "\ufdd0:create", "\ufdd0:grub", g, "\ufdd0:_id", [cljs.core.str("grub-"), cljs.core.str(Date.now())].join("")], true)
|
|
}, grub.async_utils.filter_chan.call(null, function(p1__24753_SHARP_) {
|
|
return!cljs.core.empty_QMARK_.call(null, p1__24753_SHARP_)
|
|
}, grubs))
|
|
};
|
|
grub.view.get_completed_event = function get_completed_event(event) {
|
|
var target = event.target;
|
|
var checked = target.checked;
|
|
var event_type = cljs.core.truth_(checked) ? "\ufdd0:complete" : "\ufdd0:uncomplete";
|
|
var label = event.target.labels[0];
|
|
var grub__$1 = label.textContent;
|
|
var id = target.parentNode.parentNode.parentNode.parentNode.id;
|
|
return cljs.core.PersistentArrayMap.fromArray(["\ufdd0:grub", grub__$1, "\ufdd0:_id", id, "\ufdd0:event", event_type], true)
|
|
};
|
|
grub.view.get_completed_events = function get_completed_events() {
|
|
var events = (new cljs.core.Keyword("\ufdd0:chan")).call(null, grub.async_utils.event_chan.call(null, document.getElementById("grubList"), "change"));
|
|
var grubs = grub.async_utils.map_chan.call(null, function(events) {
|
|
return function(p1__24754_SHARP_) {
|
|
return grub.view.get_completed_event.call(null, p1__24754_SHARP_)
|
|
}
|
|
}(events), events);
|
|
return grubs
|
|
};
|
|
grub.view.get_deleted_events = function get_deleted_events() {
|
|
var click_events = cljs.core.async.chan.call(null);
|
|
dommy.core.listen_BANG_.call(null, cljs.core.PersistentVector.fromArray([document.getElementById("grubList"), ".close"], true), "\ufdd0:click", function(p1__24755_SHARP_) {
|
|
var c__4545__auto__ = cljs.core.async.chan.call(null, 1);
|
|
cljs.core.async.impl.dispatch.run.call(null, function() {
|
|
var f__4546__auto__ = function() {
|
|
var switch__4471__auto__ = function(state_24768) {
|
|
var state_val_24769 = state_24768[1];
|
|
if(state_val_24769 === 2) {
|
|
var inst_24766 = state_24768[2];
|
|
var state_24768__$1 = state_24768;
|
|
return cljs.core.async.impl.ioc_helpers.return_chan.call(null, state_24768__$1, inst_24766)
|
|
}else {
|
|
if(state_val_24769 === 1) {
|
|
var state_24768__$1 = state_24768;
|
|
return cljs.core.async.impl.ioc_helpers.put_BANG_.call(null, state_24768__$1, 2, click_events, p1__24755_SHARP_)
|
|
}else {
|
|
return null
|
|
}
|
|
}
|
|
};
|
|
return function(switch__4471__auto__) {
|
|
return function() {
|
|
var state_machine__4472__auto__ = null;
|
|
var state_machine__4472__auto____0 = function() {
|
|
var statearr_24771 = new Array(5);
|
|
statearr_24771[0] = state_machine__4472__auto__;
|
|
statearr_24771[1] = 1;
|
|
return statearr_24771
|
|
};
|
|
var state_machine__4472__auto____1 = function(state_24768) {
|
|
while(true) {
|
|
var result__4473__auto__ = switch__4471__auto__.call(null, state_24768);
|
|
if(result__4473__auto__ === "\ufdd0:recur") {
|
|
continue
|
|
}else {
|
|
return result__4473__auto__
|
|
}
|
|
break
|
|
}
|
|
};
|
|
state_machine__4472__auto__ = function(state_24768) {
|
|
switch(arguments.length) {
|
|
case 0:
|
|
return state_machine__4472__auto____0.call(this);
|
|
case 1:
|
|
return state_machine__4472__auto____1.call(this, state_24768)
|
|
}
|
|
throw new Error("Invalid arity: " + arguments.length);
|
|
};
|
|
state_machine__4472__auto__.cljs$core$IFn$_invoke$arity$0 = state_machine__4472__auto____0;
|
|
state_machine__4472__auto__.cljs$core$IFn$_invoke$arity$1 = state_machine__4472__auto____1;
|
|
return state_machine__4472__auto__
|
|
}()
|
|
}(switch__4471__auto__)
|
|
}();
|
|
var state__4547__auto__ = function() {
|
|
var statearr_24772 = f__4546__auto__.call(null);
|
|
statearr_24772[cljs.core.async.impl.ioc_helpers.USER_START_IDX] = c__4545__auto__;
|
|
return statearr_24772
|
|
}();
|
|
return cljs.core.async.impl.ioc_helpers.run_state_machine.call(null, state__4547__auto__)
|
|
});
|
|
return c__4545__auto__
|
|
});
|
|
var ids = grub.async_utils.map_chan.call(null, function(p1__24756_SHARP_) {
|
|
return p1__24756_SHARP_.target.parentNode.parentNode.id
|
|
}, click_events);
|
|
var grub_events = grub.async_utils.map_chan.call(null, function(ids) {
|
|
return function(id) {
|
|
return cljs.core.PersistentArrayMap.fromArray(["\ufdd0:event", "\ufdd0:delete", "\ufdd0:_id", id], true)
|
|
}
|
|
}(ids), ids);
|
|
return grub_events
|
|
};
|
|
grub.view.get_local_events = function get_local_events() {
|
|
return grub.async_utils.fan_in.call(null, cljs.core.PersistentVector.fromArray([grub.view.get_added_events.call(null), grub.view.get_completed_events.call(null), grub.view.get_deleted_events.call(null)], true))
|
|
};
|
|
grub.view.render_grub_list = function render_grub_list(grubs) {
|
|
var grub_list = document.getElementById("grubList");
|
|
var sorted_grubs = cljs.core.sort_by.call(null, "\ufdd0:_id", grubs);
|
|
grub_list["innerHTML"] = "";
|
|
var seq__24777 = cljs.core.seq.call(null, sorted_grubs);
|
|
var chunk__24778 = null;
|
|
var count__24779 = 0;
|
|
var i__24780 = 0;
|
|
while(true) {
|
|
if(i__24780 < count__24779) {
|
|
var grub__$1 = cljs.core._nth.call(null, chunk__24778, i__24780);
|
|
dommy.core.append_BANG_.call(null, grub_list, grub.view.grub_template.call(null, grub__$1));
|
|
var G__24781 = seq__24777;
|
|
var G__24782 = chunk__24778;
|
|
var G__24783 = count__24779;
|
|
var G__24784 = i__24780 + 1;
|
|
seq__24777 = G__24781;
|
|
chunk__24778 = G__24782;
|
|
count__24779 = G__24783;
|
|
i__24780 = G__24784;
|
|
continue
|
|
}else {
|
|
var temp__4092__auto__ = cljs.core.seq.call(null, seq__24777);
|
|
if(temp__4092__auto__) {
|
|
var seq__24777__$1 = temp__4092__auto__;
|
|
if(cljs.core.chunked_seq_QMARK_.call(null, seq__24777__$1)) {
|
|
var c__3037__auto__ = cljs.core.chunk_first.call(null, seq__24777__$1);
|
|
var G__24785 = cljs.core.chunk_rest.call(null, seq__24777__$1);
|
|
var G__24786 = c__3037__auto__;
|
|
var G__24787 = cljs.core.count.call(null, c__3037__auto__);
|
|
var G__24788 = 0;
|
|
seq__24777 = G__24785;
|
|
chunk__24778 = G__24786;
|
|
count__24779 = G__24787;
|
|
i__24780 = G__24788;
|
|
continue
|
|
}else {
|
|
var grub__$1 = cljs.core.first.call(null, seq__24777__$1);
|
|
dommy.core.append_BANG_.call(null, grub_list, grub.view.grub_template.call(null, grub__$1));
|
|
var G__24789 = cljs.core.next.call(null, seq__24777__$1);
|
|
var G__24790 = null;
|
|
var G__24791 = 0;
|
|
var G__24792 = 0;
|
|
seq__24777 = G__24789;
|
|
chunk__24778 = G__24790;
|
|
count__24779 = G__24791;
|
|
i__24780 = G__24792;
|
|
continue
|
|
}
|
|
}else {
|
|
return null
|
|
}
|
|
}
|
|
break
|
|
}
|
|
};
|
|
cljs.core.add_watch.call(null, grub.state.grubs, "\ufdd0:grub-add-watch", function(key, ref, old, new$) {
|
|
return grub.view.render_grub_list.call(null, new$)
|
|
});
|
|
goog.provide("cljs.reader");
|
|
goog.require("cljs.core");
|
|
goog.require("goog.string");
|
|
cljs.reader.PushbackReader = {};
|
|
cljs.reader.read_char = function read_char(reader) {
|
|
if(function() {
|
|
var and__3941__auto__ = reader;
|
|
if(and__3941__auto__) {
|
|
return reader.cljs$reader$PushbackReader$read_char$arity$1
|
|
}else {
|
|
return and__3941__auto__
|
|
}
|
|
}()) {
|
|
return reader.cljs$reader$PushbackReader$read_char$arity$1(reader)
|
|
}else {
|
|
var x__2906__auto__ = reader == null ? null : reader;
|
|
return function() {
|
|
var or__3943__auto__ = cljs.reader.read_char[goog.typeOf(x__2906__auto__)];
|
|
if(or__3943__auto__) {
|
|
return or__3943__auto__
|
|
}else {
|
|
var or__3943__auto____$1 = cljs.reader.read_char["_"];
|
|
if(or__3943__auto____$1) {
|
|
return or__3943__auto____$1
|
|
}else {
|
|
throw cljs.core.missing_protocol.call(null, "PushbackReader.read-char", reader);
|
|
}
|
|
}
|
|
}().call(null, reader)
|
|
}
|
|
};
|
|
cljs.reader.unread = function unread(reader, ch) {
|
|
if(function() {
|
|
var and__3941__auto__ = reader;
|
|
if(and__3941__auto__) {
|
|
return reader.cljs$reader$PushbackReader$unread$arity$2
|
|
}else {
|
|
return and__3941__auto__
|
|
}
|
|
}()) {
|
|
return reader.cljs$reader$PushbackReader$unread$arity$2(reader, ch)
|
|
}else {
|
|
var x__2906__auto__ = reader == null ? null : reader;
|
|
return function() {
|
|
var or__3943__auto__ = cljs.reader.unread[goog.typeOf(x__2906__auto__)];
|
|
if(or__3943__auto__) {
|
|
return or__3943__auto__
|
|
}else {
|
|
var or__3943__auto____$1 = cljs.reader.unread["_"];
|
|
if(or__3943__auto____$1) {
|
|
return or__3943__auto____$1
|
|
}else {
|
|
throw cljs.core.missing_protocol.call(null, "PushbackReader.unread", reader);
|
|
}
|
|
}
|
|
}().call(null, reader, ch)
|
|
}
|
|
};
|
|
goog.provide("cljs.reader.StringPushbackReader");
|
|
cljs.reader.StringPushbackReader = function(s, index_atom, buffer_atom) {
|
|
this.s = s;
|
|
this.index_atom = index_atom;
|
|
this.buffer_atom = buffer_atom
|
|
};
|
|
cljs.reader.StringPushbackReader.cljs$lang$type = true;
|
|
cljs.reader.StringPushbackReader.cljs$lang$ctorStr = "cljs.reader/StringPushbackReader";
|
|
cljs.reader.StringPushbackReader.cljs$lang$ctorPrWriter = function(this__2847__auto__, writer__2848__auto__, opt__2849__auto__) {
|
|
return cljs.core._write.call(null, writer__2848__auto__, "cljs.reader/StringPushbackReader")
|
|
};
|
|
cljs.reader.StringPushbackReader.prototype.cljs$reader$PushbackReader$ = true;
|
|
cljs.reader.StringPushbackReader.prototype.cljs$reader$PushbackReader$read_char$arity$1 = function(reader) {
|
|
var self__ = this;
|
|
if(cljs.core.empty_QMARK_.call(null, cljs.core.deref.call(null, self__.buffer_atom))) {
|
|
var idx = cljs.core.deref.call(null, self__.index_atom);
|
|
cljs.core.swap_BANG_.call(null, self__.index_atom, cljs.core.inc);
|
|
return self__.s[idx]
|
|
}else {
|
|
var buf = cljs.core.deref.call(null, self__.buffer_atom);
|
|
cljs.core.swap_BANG_.call(null, self__.buffer_atom, cljs.core.rest);
|
|
return cljs.core.first.call(null, buf)
|
|
}
|
|
};
|
|
cljs.reader.StringPushbackReader.prototype.cljs$reader$PushbackReader$unread$arity$2 = function(reader, ch) {
|
|
var self__ = this;
|
|
return cljs.core.swap_BANG_.call(null, self__.buffer_atom, function(p1__14466_SHARP_) {
|
|
return cljs.core.cons.call(null, ch, p1__14466_SHARP_)
|
|
})
|
|
};
|
|
cljs.reader.__GT_StringPushbackReader = function __GT_StringPushbackReader(s, index_atom, buffer_atom) {
|
|
return new cljs.reader.StringPushbackReader(s, index_atom, buffer_atom)
|
|
};
|
|
cljs.reader.push_back_reader = function push_back_reader(s) {
|
|
return new cljs.reader.StringPushbackReader(s, cljs.core.atom.call(null, 0), cljs.core.atom.call(null, null))
|
|
};
|
|
cljs.reader.whitespace_QMARK_ = function whitespace_QMARK_(ch) {
|
|
var or__3943__auto__ = goog.string.isBreakingWhitespace(ch);
|
|
if(cljs.core.truth_(or__3943__auto__)) {
|
|
return or__3943__auto__
|
|
}else {
|
|
return"," === ch
|
|
}
|
|
};
|
|
cljs.reader.numeric_QMARK_ = function numeric_QMARK_(ch) {
|
|
return goog.string.isNumeric(ch)
|
|
};
|
|
cljs.reader.comment_prefix_QMARK_ = function comment_prefix_QMARK_(ch) {
|
|
return";" === ch
|
|
};
|
|
cljs.reader.number_literal_QMARK_ = function number_literal_QMARK_(reader, initch) {
|
|
var or__3943__auto__ = cljs.reader.numeric_QMARK_.call(null, initch);
|
|
if(or__3943__auto__) {
|
|
return or__3943__auto__
|
|
}else {
|
|
var and__3941__auto__ = function() {
|
|
var or__3943__auto____$1 = "+" === initch;
|
|
if(or__3943__auto____$1) {
|
|
return or__3943__auto____$1
|
|
}else {
|
|
return"-" === initch
|
|
}
|
|
}();
|
|
if(cljs.core.truth_(and__3941__auto__)) {
|
|
return cljs.reader.numeric_QMARK_.call(null, function() {
|
|
var next_ch = cljs.reader.read_char.call(null, reader);
|
|
cljs.reader.unread.call(null, reader, next_ch);
|
|
return next_ch
|
|
}())
|
|
}else {
|
|
return and__3941__auto__
|
|
}
|
|
}
|
|
};
|
|
cljs.reader.reader_error = function() {
|
|
var reader_error__delegate = function(rdr, msg) {
|
|
throw new Error(cljs.core.apply.call(null, cljs.core.str, msg));
|
|
};
|
|
var reader_error = function(rdr, var_args) {
|
|
var msg = null;
|
|
if(arguments.length > 1) {
|
|
msg = cljs.core.array_seq(Array.prototype.slice.call(arguments, 1), 0)
|
|
}
|
|
return reader_error__delegate.call(this, rdr, msg)
|
|
};
|
|
reader_error.cljs$lang$maxFixedArity = 1;
|
|
reader_error.cljs$lang$applyTo = function(arglist__14467) {
|
|
var rdr = cljs.core.first(arglist__14467);
|
|
var msg = cljs.core.rest(arglist__14467);
|
|
return reader_error__delegate(rdr, msg)
|
|
};
|
|
reader_error.cljs$core$IFn$_invoke$arity$variadic = reader_error__delegate;
|
|
return reader_error
|
|
}();
|
|
cljs.reader.macro_terminating_QMARK_ = function macro_terminating_QMARK_(ch) {
|
|
var and__3941__auto__ = !(ch === "#");
|
|
if(and__3941__auto__) {
|
|
var and__3941__auto____$1 = !(ch === "'");
|
|
if(and__3941__auto____$1) {
|
|
var and__3941__auto____$2 = !(ch === ":");
|
|
if(and__3941__auto____$2) {
|
|
return cljs.reader.macros.call(null, ch)
|
|
}else {
|
|
return and__3941__auto____$2
|
|
}
|
|
}else {
|
|
return and__3941__auto____$1
|
|
}
|
|
}else {
|
|
return and__3941__auto__
|
|
}
|
|
};
|
|
cljs.reader.read_token = function read_token(rdr, initch) {
|
|
var sb = new goog.string.StringBuffer(initch);
|
|
var ch = cljs.reader.read_char.call(null, rdr);
|
|
while(true) {
|
|
if(function() {
|
|
var or__3943__auto__ = ch == null;
|
|
if(or__3943__auto__) {
|
|
return or__3943__auto__
|
|
}else {
|
|
var or__3943__auto____$1 = cljs.reader.whitespace_QMARK_.call(null, ch);
|
|
if(or__3943__auto____$1) {
|
|
return or__3943__auto____$1
|
|
}else {
|
|
return cljs.reader.macro_terminating_QMARK_.call(null, ch)
|
|
}
|
|
}
|
|
}()) {
|
|
cljs.reader.unread.call(null, rdr, ch);
|
|
return sb.toString()
|
|
}else {
|
|
var G__14468 = function() {
|
|
sb.append(ch);
|
|
return sb
|
|
}();
|
|
var G__14469 = cljs.reader.read_char.call(null, rdr);
|
|
sb = G__14468;
|
|
ch = G__14469;
|
|
continue
|
|
}
|
|
break
|
|
}
|
|
};
|
|
cljs.reader.skip_line = function skip_line(reader, _) {
|
|
while(true) {
|
|
var ch = cljs.reader.read_char.call(null, reader);
|
|
if(function() {
|
|
var or__3943__auto__ = ch === "n";
|
|
if(or__3943__auto__) {
|
|
return or__3943__auto__
|
|
}else {
|
|
var or__3943__auto____$1 = ch === "r";
|
|
if(or__3943__auto____$1) {
|
|
return or__3943__auto____$1
|
|
}else {
|
|
return ch == null
|
|
}
|
|
}
|
|
}()) {
|
|
return reader
|
|
}else {
|
|
continue
|
|
}
|
|
break
|
|
}
|
|
};
|
|
cljs.reader.int_pattern = cljs.core.re_pattern.call(null, "([-+]?)(?:(0)|([1-9][0-9]*)|0[xX]([0-9A-Fa-f]+)|0([0-7]+)|([1-9][0-9]?)[rR]([0-9A-Za-z]+)|0[0-9]+)(N)?");
|
|
cljs.reader.ratio_pattern = cljs.core.re_pattern.call(null, "([-+]?[0-9]+)/([0-9]+)");
|
|
cljs.reader.float_pattern = cljs.core.re_pattern.call(null, "([-+]?[0-9]+(\\.[0-9]*)?([eE][-+]?[0-9]+)?)(M)?");
|
|
cljs.reader.symbol_pattern = cljs.core.re_pattern.call(null, "[:]?([^0-9/].*/)?([^0-9/][^/]*)");
|
|
cljs.reader.re_find_STAR_ = function re_find_STAR_(re, s) {
|
|
var matches = re.exec(s);
|
|
if(matches == null) {
|
|
return null
|
|
}else {
|
|
if(matches.length === 1) {
|
|
return matches[0]
|
|
}else {
|
|
return matches
|
|
}
|
|
}
|
|
};
|
|
cljs.reader.match_int = function match_int(s) {
|
|
var groups = cljs.reader.re_find_STAR_.call(null, cljs.reader.int_pattern, s);
|
|
var group3 = groups[2];
|
|
if(!function() {
|
|
var or__3943__auto__ = group3 == null;
|
|
if(or__3943__auto__) {
|
|
return or__3943__auto__
|
|
}else {
|
|
return group3.length < 1
|
|
}
|
|
}()) {
|
|
return 0
|
|
}else {
|
|
var negate = "-" === groups[1] ? -1 : 1;
|
|
var a = cljs.core.truth_(groups[3]) ? [groups[3], 10] : cljs.core.truth_(groups[4]) ? [groups[4], 16] : cljs.core.truth_(groups[5]) ? [groups[5], 8] : cljs.core.truth_(groups[7]) ? [groups[7], parseInt(groups[7])] : "\ufdd0:default" ? [null, null] : null;
|
|
var n = a[0];
|
|
var radix = a[1];
|
|
if(n == null) {
|
|
return null
|
|
}else {
|
|
return negate * parseInt(n, radix)
|
|
}
|
|
}
|
|
};
|
|
cljs.reader.match_ratio = function match_ratio(s) {
|
|
var groups = cljs.reader.re_find_STAR_.call(null, cljs.reader.ratio_pattern, s);
|
|
var numinator = groups[1];
|
|
var denominator = groups[2];
|
|
return parseInt(numinator) / parseInt(denominator)
|
|
};
|
|
cljs.reader.match_float = function match_float(s) {
|
|
return parseFloat(s)
|
|
};
|
|
cljs.reader.re_matches_STAR_ = function re_matches_STAR_(re, s) {
|
|
var matches = re.exec(s);
|
|
if(function() {
|
|
var and__3941__auto__ = !(matches == null);
|
|
if(and__3941__auto__) {
|
|
return matches[0] === s
|
|
}else {
|
|
return and__3941__auto__
|
|
}
|
|
}()) {
|
|
if(matches.length === 1) {
|
|
return matches[0]
|
|
}else {
|
|
return matches
|
|
}
|
|
}else {
|
|
return null
|
|
}
|
|
};
|
|
cljs.reader.match_number = function match_number(s) {
|
|
if(cljs.core.truth_(cljs.reader.re_matches_STAR_.call(null, cljs.reader.int_pattern, s))) {
|
|
return cljs.reader.match_int.call(null, s)
|
|
}else {
|
|
if(cljs.core.truth_(cljs.reader.re_matches_STAR_.call(null, cljs.reader.ratio_pattern, s))) {
|
|
return cljs.reader.match_ratio.call(null, s)
|
|
}else {
|
|
if(cljs.core.truth_(cljs.reader.re_matches_STAR_.call(null, cljs.reader.float_pattern, s))) {
|
|
return cljs.reader.match_float.call(null, s)
|
|
}else {
|
|
return null
|
|
}
|
|
}
|
|
}
|
|
};
|
|
cljs.reader.escape_char_map = function escape_char_map(c) {
|
|
if(c === "t") {
|
|
return"\t"
|
|
}else {
|
|
if(c === "r") {
|
|
return"\r"
|
|
}else {
|
|
if(c === "n") {
|
|
return"\n"
|
|
}else {
|
|
if(c === "\\") {
|
|
return"\\"
|
|
}else {
|
|
if(c === '"') {
|
|
return'"'
|
|
}else {
|
|
if(c === "b") {
|
|
return"\b"
|
|
}else {
|
|
if(c === "f") {
|
|
return"\f"
|
|
}else {
|
|
if("\ufdd0:else") {
|
|
return null
|
|
}else {
|
|
return null
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
};
|
|
cljs.reader.read_2_chars = function read_2_chars(reader) {
|
|
return(new goog.string.StringBuffer(cljs.reader.read_char.call(null, reader), cljs.reader.read_char.call(null, reader))).toString()
|
|
};
|
|
cljs.reader.read_4_chars = function read_4_chars(reader) {
|
|
return(new goog.string.StringBuffer(cljs.reader.read_char.call(null, reader), cljs.reader.read_char.call(null, reader), cljs.reader.read_char.call(null, reader), cljs.reader.read_char.call(null, reader))).toString()
|
|
};
|
|
cljs.reader.unicode_2_pattern = cljs.core.re_pattern.call(null, "[0-9A-Fa-f]{2}");
|
|
cljs.reader.unicode_4_pattern = cljs.core.re_pattern.call(null, "[0-9A-Fa-f]{4}");
|
|
cljs.reader.validate_unicode_escape = function validate_unicode_escape(unicode_pattern, reader, escape_char, unicode_str) {
|
|
if(cljs.core.truth_(cljs.core.re_matches.call(null, unicode_pattern, unicode_str))) {
|
|
return unicode_str
|
|
}else {
|
|
return cljs.reader.reader_error.call(null, reader, "Unexpected unicode escape \\", escape_char, unicode_str)
|
|
}
|
|
};
|
|
cljs.reader.make_unicode_char = function make_unicode_char(code_str) {
|
|
var code = parseInt(code_str, 16);
|
|
return String.fromCharCode(code)
|
|
};
|
|
cljs.reader.escape_char = function escape_char(buffer, reader) {
|
|
var ch = cljs.reader.read_char.call(null, reader);
|
|
var mapresult = cljs.reader.escape_char_map.call(null, ch);
|
|
if(cljs.core.truth_(mapresult)) {
|
|
return mapresult
|
|
}else {
|
|
if(ch === "x") {
|
|
return cljs.reader.make_unicode_char.call(null, cljs.reader.validate_unicode_escape.call(null, cljs.reader.unicode_2_pattern, reader, ch, cljs.reader.read_2_chars.call(null, reader)))
|
|
}else {
|
|
if(ch === "u") {
|
|
return cljs.reader.make_unicode_char.call(null, cljs.reader.validate_unicode_escape.call(null, cljs.reader.unicode_4_pattern, reader, ch, cljs.reader.read_4_chars.call(null, reader)))
|
|
}else {
|
|
if(cljs.reader.numeric_QMARK_.call(null, ch)) {
|
|
return String.fromCharCode(ch)
|
|
}else {
|
|
if("\ufdd0:else") {
|
|
return cljs.reader.reader_error.call(null, reader, "Unexpected unicode escape \\", ch)
|
|
}else {
|
|
return null
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
};
|
|
cljs.reader.read_past = function read_past(pred, rdr) {
|
|
var ch = cljs.reader.read_char.call(null, rdr);
|
|
while(true) {
|
|
if(cljs.core.truth_(pred.call(null, ch))) {
|
|
var G__14470 = cljs.reader.read_char.call(null, rdr);
|
|
ch = G__14470;
|
|
continue
|
|
}else {
|
|
return ch
|
|
}
|
|
break
|
|
}
|
|
};
|
|
cljs.reader.read_delimited_list = function read_delimited_list(delim, rdr, recursive_QMARK_) {
|
|
var a = cljs.core.transient$.call(null, cljs.core.PersistentVector.EMPTY);
|
|
while(true) {
|
|
var ch = cljs.reader.read_past.call(null, cljs.reader.whitespace_QMARK_, rdr);
|
|
if(cljs.core.truth_(ch)) {
|
|
}else {
|
|
cljs.reader.reader_error.call(null, rdr, "EOF while reading")
|
|
}
|
|
if(delim === ch) {
|
|
return cljs.core.persistent_BANG_.call(null, a)
|
|
}else {
|
|
var temp__4090__auto__ = cljs.reader.macros.call(null, ch);
|
|
if(cljs.core.truth_(temp__4090__auto__)) {
|
|
var macrofn = temp__4090__auto__;
|
|
var mret = macrofn.call(null, rdr, ch);
|
|
var G__14471 = mret === rdr ? a : cljs.core.conj_BANG_.call(null, a, mret);
|
|
a = G__14471;
|
|
continue
|
|
}else {
|
|
cljs.reader.unread.call(null, rdr, ch);
|
|
var o = cljs.reader.read.call(null, rdr, true, null, recursive_QMARK_);
|
|
var G__14472 = o === rdr ? a : cljs.core.conj_BANG_.call(null, a, o);
|
|
a = G__14472;
|
|
continue
|
|
}
|
|
}
|
|
break
|
|
}
|
|
};
|
|
cljs.reader.not_implemented = function not_implemented(rdr, ch) {
|
|
return cljs.reader.reader_error.call(null, rdr, "Reader for ", ch, " not implemented yet")
|
|
};
|
|
cljs.reader.read_dispatch = function read_dispatch(rdr, _) {
|
|
var ch = cljs.reader.read_char.call(null, rdr);
|
|
var dm = cljs.reader.dispatch_macros.call(null, ch);
|
|
if(cljs.core.truth_(dm)) {
|
|
return dm.call(null, rdr, _)
|
|
}else {
|
|
var temp__4090__auto__ = cljs.reader.maybe_read_tagged_type.call(null, rdr, ch);
|
|
if(cljs.core.truth_(temp__4090__auto__)) {
|
|
var obj = temp__4090__auto__;
|
|
return obj
|
|
}else {
|
|
return cljs.reader.reader_error.call(null, rdr, "No dispatch macro for ", ch)
|
|
}
|
|
}
|
|
};
|
|
cljs.reader.read_unmatched_delimiter = function read_unmatched_delimiter(rdr, ch) {
|
|
return cljs.reader.reader_error.call(null, rdr, "Unmached delimiter ", ch)
|
|
};
|
|
cljs.reader.read_list = function read_list(rdr, _) {
|
|
return cljs.core.apply.call(null, cljs.core.list, cljs.reader.read_delimited_list.call(null, ")", rdr, true))
|
|
};
|
|
cljs.reader.read_comment = cljs.reader.skip_line;
|
|
cljs.reader.read_vector = function read_vector(rdr, _) {
|
|
return cljs.reader.read_delimited_list.call(null, "]", rdr, true)
|
|
};
|
|
cljs.reader.read_map = function read_map(rdr, _) {
|
|
var l = cljs.reader.read_delimited_list.call(null, "}", rdr, true);
|
|
if(cljs.core.odd_QMARK_.call(null, cljs.core.count.call(null, l))) {
|
|
cljs.reader.reader_error.call(null, rdr, "Map literal must contain an even number of forms")
|
|
}else {
|
|
}
|
|
return cljs.core.apply.call(null, cljs.core.hash_map, l)
|
|
};
|
|
cljs.reader.read_number = function read_number(reader, initch) {
|
|
var buffer = new goog.string.StringBuffer(initch);
|
|
var ch = cljs.reader.read_char.call(null, reader);
|
|
while(true) {
|
|
if(cljs.core.truth_(function() {
|
|
var or__3943__auto__ = ch == null;
|
|
if(or__3943__auto__) {
|
|
return or__3943__auto__
|
|
}else {
|
|
var or__3943__auto____$1 = cljs.reader.whitespace_QMARK_.call(null, ch);
|
|
if(or__3943__auto____$1) {
|
|
return or__3943__auto____$1
|
|
}else {
|
|
return cljs.reader.macros.call(null, ch)
|
|
}
|
|
}
|
|
}())) {
|
|
cljs.reader.unread.call(null, reader, ch);
|
|
var s = buffer.toString();
|
|
var or__3943__auto__ = cljs.reader.match_number.call(null, s);
|
|
if(cljs.core.truth_(or__3943__auto__)) {
|
|
return or__3943__auto__
|
|
}else {
|
|
return cljs.reader.reader_error.call(null, reader, "Invalid number format [", s, "]")
|
|
}
|
|
}else {
|
|
var G__14473 = function() {
|
|
buffer.append(ch);
|
|
return buffer
|
|
}();
|
|
var G__14474 = cljs.reader.read_char.call(null, reader);
|
|
buffer = G__14473;
|
|
ch = G__14474;
|
|
continue
|
|
}
|
|
break
|
|
}
|
|
};
|
|
cljs.reader.read_string_STAR_ = function read_string_STAR_(reader, _) {
|
|
var buffer = new goog.string.StringBuffer;
|
|
var ch = cljs.reader.read_char.call(null, reader);
|
|
while(true) {
|
|
if(ch == null) {
|
|
return cljs.reader.reader_error.call(null, reader, "EOF while reading")
|
|
}else {
|
|
if("\\" === ch) {
|
|
var G__14475 = function() {
|
|
buffer.append(cljs.reader.escape_char.call(null, buffer, reader));
|
|
return buffer
|
|
}();
|
|
var G__14476 = cljs.reader.read_char.call(null, reader);
|
|
buffer = G__14475;
|
|
ch = G__14476;
|
|
continue
|
|
}else {
|
|
if('"' === ch) {
|
|
return buffer.toString()
|
|
}else {
|
|
if("\ufdd0:default") {
|
|
var G__14477 = function() {
|
|
buffer.append(ch);
|
|
return buffer
|
|
}();
|
|
var G__14478 = cljs.reader.read_char.call(null, reader);
|
|
buffer = G__14477;
|
|
ch = G__14478;
|
|
continue
|
|
}else {
|
|
return null
|
|
}
|
|
}
|
|
}
|
|
}
|
|
break
|
|
}
|
|
};
|
|
cljs.reader.special_symbols = function special_symbols(t, not_found) {
|
|
if(t === "nil") {
|
|
return null
|
|
}else {
|
|
if(t === "true") {
|
|
return true
|
|
}else {
|
|
if(t === "false") {
|
|
return false
|
|
}else {
|
|
if("\ufdd0:else") {
|
|
return not_found
|
|
}else {
|
|
return null
|
|
}
|
|
}
|
|
}
|
|
}
|
|
};
|
|
cljs.reader.read_symbol = function read_symbol(reader, initch) {
|
|
var token = cljs.reader.read_token.call(null, reader, initch);
|
|
if(cljs.core.truth_(goog.string.contains(token, "/"))) {
|
|
return cljs.core.symbol.call(null, cljs.core.subs.call(null, token, 0, token.indexOf("/")), cljs.core.subs.call(null, token, token.indexOf("/") + 1, token.length))
|
|
}else {
|
|
return cljs.reader.special_symbols.call(null, token, cljs.core.symbol.call(null, token))
|
|
}
|
|
};
|
|
cljs.reader.read_keyword = function read_keyword(reader, initch) {
|
|
var token = cljs.reader.read_token.call(null, reader, cljs.reader.read_char.call(null, reader));
|
|
var a = cljs.reader.re_matches_STAR_.call(null, cljs.reader.symbol_pattern, token);
|
|
var token__$1 = a[0];
|
|
var ns = a[1];
|
|
var name = a[2];
|
|
if(cljs.core.truth_(function() {
|
|
var or__3943__auto__ = function() {
|
|
var and__3941__auto__ = !(void 0 === ns);
|
|
if(and__3941__auto__) {
|
|
return ns.substring(ns.length - 2, ns.length) === ":/"
|
|
}else {
|
|
return and__3941__auto__
|
|
}
|
|
}();
|
|
if(cljs.core.truth_(or__3943__auto__)) {
|
|
return or__3943__auto__
|
|
}else {
|
|
var or__3943__auto____$1 = name[name.length - 1] === ":";
|
|
if(or__3943__auto____$1) {
|
|
return or__3943__auto____$1
|
|
}else {
|
|
return!(token__$1.indexOf("::", 1) === -1)
|
|
}
|
|
}
|
|
}())) {
|
|
return cljs.reader.reader_error.call(null, reader, "Invalid token: ", token__$1)
|
|
}else {
|
|
if(function() {
|
|
var and__3941__auto__ = !(ns == null);
|
|
if(and__3941__auto__) {
|
|
return ns.length > 0
|
|
}else {
|
|
return and__3941__auto__
|
|
}
|
|
}()) {
|
|
return cljs.core.keyword.call(null, ns.substring(0, ns.indexOf("/")), name)
|
|
}else {
|
|
return cljs.core.keyword.call(null, token__$1)
|
|
}
|
|
}
|
|
};
|
|
cljs.reader.desugar_meta = function desugar_meta(f) {
|
|
if(f instanceof cljs.core.Symbol) {
|
|
return cljs.core.PersistentArrayMap.fromArray(["\ufdd0:tag", f], true)
|
|
}else {
|
|
if(cljs.core.string_QMARK_.call(null, f)) {
|
|
return cljs.core.PersistentArrayMap.fromArray(["\ufdd0:tag", f], true)
|
|
}else {
|
|
if(cljs.core.keyword_QMARK_.call(null, f)) {
|
|
return cljs.core.PersistentArrayMap.fromArray([f, true], true)
|
|
}else {
|
|
if("\ufdd0:else") {
|
|
return f
|
|
}else {
|
|
return null
|
|
}
|
|
}
|
|
}
|
|
}
|
|
};
|
|
cljs.reader.wrapping_reader = function wrapping_reader(sym) {
|
|
return function(rdr, _) {
|
|
return cljs.core.list.call(null, sym, cljs.reader.read.call(null, rdr, true, null, true))
|
|
}
|
|
};
|
|
cljs.reader.throwing_reader = function throwing_reader(msg) {
|
|
return function(rdr, _) {
|
|
return cljs.reader.reader_error.call(null, rdr, msg)
|
|
}
|
|
};
|
|
cljs.reader.read_meta = function read_meta(rdr, _) {
|
|
var m = cljs.reader.desugar_meta.call(null, cljs.reader.read.call(null, rdr, true, null, true));
|
|
if(cljs.core.map_QMARK_.call(null, m)) {
|
|
}else {
|
|
cljs.reader.reader_error.call(null, rdr, "Metadata must be Symbol,Keyword,String or Map")
|
|
}
|
|
var o = cljs.reader.read.call(null, rdr, true, null, true);
|
|
if(function() {
|
|
var G__14480 = o;
|
|
if(G__14480) {
|
|
if(function() {
|
|
var or__3943__auto__ = G__14480.cljs$lang$protocol_mask$partition0$ & 262144;
|
|
if(or__3943__auto__) {
|
|
return or__3943__auto__
|
|
}else {
|
|
return G__14480.cljs$core$IWithMeta$
|
|
}
|
|
}()) {
|
|
return true
|
|
}else {
|
|
if(!G__14480.cljs$lang$protocol_mask$partition0$) {
|
|
return cljs.core.type_satisfies_.call(null, cljs.core.IWithMeta, G__14480)
|
|
}else {
|
|
return false
|
|
}
|
|
}
|
|
}else {
|
|
return cljs.core.type_satisfies_.call(null, cljs.core.IWithMeta, G__14480)
|
|
}
|
|
}()) {
|
|
return cljs.core.with_meta.call(null, o, cljs.core.merge.call(null, cljs.core.meta.call(null, o), m))
|
|
}else {
|
|
return cljs.reader.reader_error.call(null, rdr, "Metadata can only be applied to IWithMetas")
|
|
}
|
|
};
|
|
cljs.reader.read_set = function read_set(rdr, _) {
|
|
return cljs.core.set.call(null, cljs.reader.read_delimited_list.call(null, "}", rdr, true))
|
|
};
|
|
cljs.reader.read_regex = function read_regex(rdr, ch) {
|
|
return cljs.core.re_pattern.call(null, cljs.reader.read_string_STAR_.call(null, rdr, ch))
|
|
};
|
|
cljs.reader.read_discard = function read_discard(rdr, _) {
|
|
cljs.reader.read.call(null, rdr, true, null, true);
|
|
return rdr
|
|
};
|
|
cljs.reader.macros = function macros(c) {
|
|
if(c === '"') {
|
|
return cljs.reader.read_string_STAR_
|
|
}else {
|
|
if(c === ":") {
|
|
return cljs.reader.read_keyword
|
|
}else {
|
|
if(c === ";") {
|
|
return cljs.reader.not_implemented
|
|
}else {
|
|
if(c === "'") {
|
|
return cljs.reader.wrapping_reader.call(null, new cljs.core.Symbol(null, "quote", "quote", -1532577739, null))
|
|
}else {
|
|
if(c === "@") {
|
|
return cljs.reader.wrapping_reader.call(null, new cljs.core.Symbol(null, "deref", "deref", -1545057749, null))
|
|
}else {
|
|
if(c === "^") {
|
|
return cljs.reader.read_meta
|
|
}else {
|
|
if(c === "`") {
|
|
return cljs.reader.not_implemented
|
|
}else {
|
|
if(c === "~") {
|
|
return cljs.reader.not_implemented
|
|
}else {
|
|
if(c === "(") {
|
|
return cljs.reader.read_list
|
|
}else {
|
|
if(c === ")") {
|
|
return cljs.reader.read_unmatched_delimiter
|
|
}else {
|
|
if(c === "[") {
|
|
return cljs.reader.read_vector
|
|
}else {
|
|
if(c === "]") {
|
|
return cljs.reader.read_unmatched_delimiter
|
|
}else {
|
|
if(c === "{") {
|
|
return cljs.reader.read_map
|
|
}else {
|
|
if(c === "}") {
|
|
return cljs.reader.read_unmatched_delimiter
|
|
}else {
|
|
if(c === "\\") {
|
|
return cljs.reader.read_char
|
|
}else {
|
|
if(c === "%") {
|
|
return cljs.reader.not_implemented
|
|
}else {
|
|
if(c === "#") {
|
|
return cljs.reader.read_dispatch
|
|
}else {
|
|
if("\ufdd0:else") {
|
|
return null
|
|
}else {
|
|
return null
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
};
|
|
cljs.reader.dispatch_macros = function dispatch_macros(s) {
|
|
if(s === "{") {
|
|
return cljs.reader.read_set
|
|
}else {
|
|
if(s === "<") {
|
|
return cljs.reader.throwing_reader.call(null, "Unreadable form")
|
|
}else {
|
|
if(s === '"') {
|
|
return cljs.reader.read_regex
|
|
}else {
|
|
if(s === "!") {
|
|
return cljs.reader.read_comment
|
|
}else {
|
|
if(s === "_") {
|
|
return cljs.reader.read_discard
|
|
}else {
|
|
if("\ufdd0:else") {
|
|
return null
|
|
}else {
|
|
return null
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
};
|
|
cljs.reader.read = function read(reader, eof_is_error, sentinel, is_recursive) {
|
|
while(true) {
|
|
var ch = cljs.reader.read_char.call(null, reader);
|
|
if(ch == null) {
|
|
if(cljs.core.truth_(eof_is_error)) {
|
|
return cljs.reader.reader_error.call(null, reader, "EOF while reading")
|
|
}else {
|
|
return sentinel
|
|
}
|
|
}else {
|
|
if(cljs.reader.whitespace_QMARK_.call(null, ch)) {
|
|
var G__14481 = reader;
|
|
var G__14482 = eof_is_error;
|
|
var G__14483 = sentinel;
|
|
var G__14484 = is_recursive;
|
|
reader = G__14481;
|
|
eof_is_error = G__14482;
|
|
sentinel = G__14483;
|
|
is_recursive = G__14484;
|
|
continue
|
|
}else {
|
|
if(cljs.reader.comment_prefix_QMARK_.call(null, ch)) {
|
|
var G__14485 = cljs.reader.read_comment.call(null, reader, ch);
|
|
var G__14486 = eof_is_error;
|
|
var G__14487 = sentinel;
|
|
var G__14488 = is_recursive;
|
|
reader = G__14485;
|
|
eof_is_error = G__14486;
|
|
sentinel = G__14487;
|
|
is_recursive = G__14488;
|
|
continue
|
|
}else {
|
|
if("\ufdd0:else") {
|
|
var f = cljs.reader.macros.call(null, ch);
|
|
var res = cljs.core.truth_(f) ? f.call(null, reader, ch) : cljs.reader.number_literal_QMARK_.call(null, reader, ch) ? cljs.reader.read_number.call(null, reader, ch) : "\ufdd0:else" ? cljs.reader.read_symbol.call(null, reader, ch) : null;
|
|
if(res === reader) {
|
|
var G__14489 = reader;
|
|
var G__14490 = eof_is_error;
|
|
var G__14491 = sentinel;
|
|
var G__14492 = is_recursive;
|
|
reader = G__14489;
|
|
eof_is_error = G__14490;
|
|
sentinel = G__14491;
|
|
is_recursive = G__14492;
|
|
continue
|
|
}else {
|
|
return res
|
|
}
|
|
}else {
|
|
return null
|
|
}
|
|
}
|
|
}
|
|
}
|
|
break
|
|
}
|
|
};
|
|
cljs.reader.read_string = function read_string(s) {
|
|
var r = cljs.reader.push_back_reader.call(null, s);
|
|
return cljs.reader.read.call(null, r, true, null, false)
|
|
};
|
|
cljs.reader.zero_fill_right = function zero_fill_right(s, width) {
|
|
if(cljs.core._EQ_.call(null, width, cljs.core.count.call(null, s))) {
|
|
return s
|
|
}else {
|
|
if(width < cljs.core.count.call(null, s)) {
|
|
return s.substring(0, width)
|
|
}else {
|
|
if("\ufdd0:else") {
|
|
var b = new goog.string.StringBuffer(s);
|
|
while(true) {
|
|
if(b.getLength() < width) {
|
|
var G__14493 = b.append("0");
|
|
b = G__14493;
|
|
continue
|
|
}else {
|
|
return b.toString()
|
|
}
|
|
break
|
|
}
|
|
}else {
|
|
return null
|
|
}
|
|
}
|
|
}
|
|
};
|
|
cljs.reader.divisible_QMARK_ = function divisible_QMARK_(num, div) {
|
|
return cljs.core.mod.call(null, num, div) === 0
|
|
};
|
|
cljs.reader.indivisible_QMARK_ = function indivisible_QMARK_(num, div) {
|
|
return cljs.core.not.call(null, cljs.reader.divisible_QMARK_.call(null, num, div))
|
|
};
|
|
cljs.reader.leap_year_QMARK_ = function leap_year_QMARK_(year) {
|
|
var and__3941__auto__ = cljs.reader.divisible_QMARK_.call(null, year, 4);
|
|
if(cljs.core.truth_(and__3941__auto__)) {
|
|
var or__3943__auto__ = cljs.reader.indivisible_QMARK_.call(null, year, 100);
|
|
if(cljs.core.truth_(or__3943__auto__)) {
|
|
return or__3943__auto__
|
|
}else {
|
|
return cljs.reader.divisible_QMARK_.call(null, year, 400)
|
|
}
|
|
}else {
|
|
return and__3941__auto__
|
|
}
|
|
};
|
|
cljs.reader.days_in_month = function() {
|
|
var dim_norm = cljs.core.PersistentVector.fromArray([null, 31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31], true);
|
|
var dim_leap = cljs.core.PersistentVector.fromArray([null, 31, 29, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31], true);
|
|
return function(month, leap_year_QMARK_) {
|
|
return cljs.core.get.call(null, cljs.core.truth_(leap_year_QMARK_) ? dim_leap : dim_norm, month)
|
|
}
|
|
}();
|
|
cljs.reader.parse_and_validate_timestamp = function() {
|
|
var timestamp = /(\d\d\d\d)(?:-(\d\d)(?:-(\d\d)(?:[T](\d\d)(?::(\d\d)(?::(\d\d)(?:[.](\d+))?)?)?)?)?)?(?:[Z]|([-+])(\d\d):(\d\d))?/;
|
|
var check = function(timestamp) {
|
|
return function(low, n, high, msg) {
|
|
if(function() {
|
|
var and__3941__auto__ = low <= n;
|
|
if(and__3941__auto__) {
|
|
return n <= high
|
|
}else {
|
|
return and__3941__auto__
|
|
}
|
|
}()) {
|
|
}else {
|
|
throw new Error([cljs.core.str("Assert failed: "), cljs.core.str([cljs.core.str(msg), cljs.core.str(" Failed: "), cljs.core.str(low), cljs.core.str("<="), cljs.core.str(n), cljs.core.str("<="), cljs.core.str(high)].join("")), cljs.core.str("\n"), cljs.core.str(cljs.core.pr_str.call(null, cljs.core.list(new cljs.core.Symbol(null, "<=", "<=", -1640529606, null), new cljs.core.Symbol(null, "low", "low", -1640424179, null), new cljs.core.Symbol(null, "n", "n", -1640531417, null), new cljs.core.Symbol(null,
|
|
"high", "high", -1637329061, null))))].join(""));
|
|
}
|
|
return n
|
|
}
|
|
}(timestamp);
|
|
return function(ts) {
|
|
var temp__4092__auto__ = cljs.core.map.call(null, cljs.core.vec, cljs.core.split_at.call(null, 8, cljs.core.re_matches.call(null, timestamp, ts)));
|
|
if(cljs.core.truth_(temp__4092__auto__)) {
|
|
var vec__14498 = temp__4092__auto__;
|
|
var vec__14499 = cljs.core.nth.call(null, vec__14498, 0, null);
|
|
var _ = cljs.core.nth.call(null, vec__14499, 0, null);
|
|
var years = cljs.core.nth.call(null, vec__14499, 1, null);
|
|
var months = cljs.core.nth.call(null, vec__14499, 2, null);
|
|
var days = cljs.core.nth.call(null, vec__14499, 3, null);
|
|
var hours = cljs.core.nth.call(null, vec__14499, 4, null);
|
|
var minutes = cljs.core.nth.call(null, vec__14499, 5, null);
|
|
var seconds = cljs.core.nth.call(null, vec__14499, 6, null);
|
|
var milliseconds = cljs.core.nth.call(null, vec__14499, 7, null);
|
|
var vec__14500 = cljs.core.nth.call(null, vec__14498, 1, null);
|
|
var ___$1 = cljs.core.nth.call(null, vec__14500, 0, null);
|
|
var ___$2 = cljs.core.nth.call(null, vec__14500, 1, null);
|
|
var ___$3 = cljs.core.nth.call(null, vec__14500, 2, null);
|
|
var V = vec__14498;
|
|
var vec__14501 = cljs.core.map.call(null, function(v) {
|
|
return cljs.core.map.call(null, function(p1__14497_SHARP_) {
|
|
return parseInt(p1__14497_SHARP_, 10)
|
|
}, v)
|
|
}, cljs.core.map.call(null, function(p1__14495_SHARP_, p2__14494_SHARP_) {
|
|
return cljs.core.update_in.call(null, p2__14494_SHARP_, cljs.core.PersistentVector.fromArray([0], true), p1__14495_SHARP_)
|
|
}, cljs.core.PersistentVector.fromArray([cljs.core.constantly.call(null, null), function(p1__14496_SHARP_) {
|
|
if(cljs.core._EQ_.call(null, p1__14496_SHARP_, "-")) {
|
|
return"-1"
|
|
}else {
|
|
return"1"
|
|
}
|
|
}], true), V));
|
|
var vec__14502 = cljs.core.nth.call(null, vec__14501, 0, null);
|
|
var ___$4 = cljs.core.nth.call(null, vec__14502, 0, null);
|
|
var y = cljs.core.nth.call(null, vec__14502, 1, null);
|
|
var mo = cljs.core.nth.call(null, vec__14502, 2, null);
|
|
var d = cljs.core.nth.call(null, vec__14502, 3, null);
|
|
var h = cljs.core.nth.call(null, vec__14502, 4, null);
|
|
var m = cljs.core.nth.call(null, vec__14502, 5, null);
|
|
var s = cljs.core.nth.call(null, vec__14502, 6, null);
|
|
var ms = cljs.core.nth.call(null, vec__14502, 7, null);
|
|
var vec__14503 = cljs.core.nth.call(null, vec__14501, 1, null);
|
|
var offset_sign = cljs.core.nth.call(null, vec__14503, 0, null);
|
|
var offset_hours = cljs.core.nth.call(null, vec__14503, 1, null);
|
|
var offset_minutes = cljs.core.nth.call(null, vec__14503, 2, null);
|
|
var offset = offset_sign * (offset_hours * 60 + offset_minutes);
|
|
return cljs.core.PersistentVector.fromArray([cljs.core.not.call(null, years) ? 1970 : y, cljs.core.not.call(null, months) ? 1 : check.call(null, 1, mo, 12, "timestamp month field must be in range 1..12"), cljs.core.not.call(null, days) ? 1 : check.call(null, 1, d, cljs.reader.days_in_month.call(null, mo, cljs.reader.leap_year_QMARK_.call(null, y)), "timestamp day field must be in range 1..last day in month"), cljs.core.not.call(null, hours) ? 0 : check.call(null, 0, h, 23, "timestamp hour field must be in range 0..23"),
|
|
cljs.core.not.call(null, minutes) ? 0 : check.call(null, 0, m, 59, "timestamp minute field must be in range 0..59"), cljs.core.not.call(null, seconds) ? 0 : check.call(null, 0, s, cljs.core._EQ_.call(null, m, 59) ? 60 : 59, "timestamp second field must be in range 0..60"), cljs.core.not.call(null, milliseconds) ? 0 : check.call(null, 0, ms, 999, "timestamp millisecond field must be in range 0..999"), offset], true)
|
|
}else {
|
|
return null
|
|
}
|
|
}
|
|
}();
|
|
cljs.reader.parse_timestamp = function parse_timestamp(ts) {
|
|
var temp__4090__auto__ = cljs.reader.parse_and_validate_timestamp.call(null, ts);
|
|
if(cljs.core.truth_(temp__4090__auto__)) {
|
|
var vec__14505 = temp__4090__auto__;
|
|
var years = cljs.core.nth.call(null, vec__14505, 0, null);
|
|
var months = cljs.core.nth.call(null, vec__14505, 1, null);
|
|
var days = cljs.core.nth.call(null, vec__14505, 2, null);
|
|
var hours = cljs.core.nth.call(null, vec__14505, 3, null);
|
|
var minutes = cljs.core.nth.call(null, vec__14505, 4, null);
|
|
var seconds = cljs.core.nth.call(null, vec__14505, 5, null);
|
|
var ms = cljs.core.nth.call(null, vec__14505, 6, null);
|
|
var offset = cljs.core.nth.call(null, vec__14505, 7, null);
|
|
return new Date(Date.UTC(years, months - 1, days, hours, minutes, seconds, ms) - offset * 60 * 1E3)
|
|
}else {
|
|
return cljs.reader.reader_error.call(null, null, [cljs.core.str("Unrecognized date/time syntax: "), cljs.core.str(ts)].join(""))
|
|
}
|
|
};
|
|
cljs.reader.read_date = function read_date(s) {
|
|
if(cljs.core.string_QMARK_.call(null, s)) {
|
|
return cljs.reader.parse_timestamp.call(null, s)
|
|
}else {
|
|
return cljs.reader.reader_error.call(null, null, "Instance literal expects a string for its timestamp.")
|
|
}
|
|
};
|
|
cljs.reader.read_queue = function read_queue(elems) {
|
|
if(cljs.core.vector_QMARK_.call(null, elems)) {
|
|
return cljs.core.into.call(null, cljs.core.PersistentQueue.EMPTY, elems)
|
|
}else {
|
|
return cljs.reader.reader_error.call(null, null, "Queue literal expects a vector for its elements.")
|
|
}
|
|
};
|
|
cljs.reader.read_uuid = function read_uuid(uuid) {
|
|
if(cljs.core.string_QMARK_.call(null, uuid)) {
|
|
return new cljs.core.UUID(uuid)
|
|
}else {
|
|
return cljs.reader.reader_error.call(null, null, "UUID literal expects a string as its representation.")
|
|
}
|
|
};
|
|
cljs.reader._STAR_tag_table_STAR_ = cljs.core.atom.call(null, cljs.core.PersistentArrayMap.fromArray(["inst", cljs.reader.read_date, "uuid", cljs.reader.read_uuid, "queue", cljs.reader.read_queue], true));
|
|
cljs.reader._STAR_default_data_reader_fn_STAR_ = cljs.core.atom.call(null, null);
|
|
cljs.reader.maybe_read_tagged_type = function maybe_read_tagged_type(rdr, initch) {
|
|
var tag = cljs.reader.read_symbol.call(null, rdr, initch);
|
|
var pfn = cljs.core.get.call(null, cljs.core.deref.call(null, cljs.reader._STAR_tag_table_STAR_), [cljs.core.str(tag)].join(""));
|
|
var dfn = cljs.core.deref.call(null, cljs.reader._STAR_default_data_reader_fn_STAR_);
|
|
if(cljs.core.truth_(pfn)) {
|
|
return pfn.call(null, cljs.reader.read.call(null, rdr, true, null, false))
|
|
}else {
|
|
if(cljs.core.truth_(dfn)) {
|
|
return dfn.call(null, tag, cljs.reader.read.call(null, rdr, true, null, false))
|
|
}else {
|
|
if("\ufdd0:else") {
|
|
return cljs.reader.reader_error.call(null, rdr, "Could not find tag parser for ", [cljs.core.str(tag)].join(""), " in ", cljs.core.pr_str.call(null, cljs.core.keys.call(null, cljs.core.deref.call(null, cljs.reader._STAR_tag_table_STAR_))))
|
|
}else {
|
|
return null
|
|
}
|
|
}
|
|
}
|
|
};
|
|
cljs.reader.register_tag_parser_BANG_ = function register_tag_parser_BANG_(tag, f) {
|
|
var tag__$1 = [cljs.core.str(tag)].join("");
|
|
var old_parser = cljs.core.get.call(null, cljs.core.deref.call(null, cljs.reader._STAR_tag_table_STAR_), tag__$1);
|
|
cljs.core.swap_BANG_.call(null, cljs.reader._STAR_tag_table_STAR_, cljs.core.assoc, tag__$1, f);
|
|
return old_parser
|
|
};
|
|
cljs.reader.deregister_tag_parser_BANG_ = function deregister_tag_parser_BANG_(tag) {
|
|
var tag__$1 = [cljs.core.str(tag)].join("");
|
|
var old_parser = cljs.core.get.call(null, cljs.core.deref.call(null, cljs.reader._STAR_tag_table_STAR_), tag__$1);
|
|
cljs.core.swap_BANG_.call(null, cljs.reader._STAR_tag_table_STAR_, cljs.core.dissoc, tag__$1);
|
|
return old_parser
|
|
};
|
|
cljs.reader.register_default_tag_parser_BANG_ = function register_default_tag_parser_BANG_(f) {
|
|
var old_parser = cljs.core.deref.call(null, cljs.reader._STAR_default_data_reader_fn_STAR_);
|
|
cljs.core.swap_BANG_.call(null, cljs.reader._STAR_default_data_reader_fn_STAR_, function(_) {
|
|
return f
|
|
});
|
|
return old_parser
|
|
};
|
|
cljs.reader.deregister_default_tag_parser_BANG_ = function deregister_default_tag_parser_BANG_() {
|
|
var old_parser = cljs.core.deref.call(null, cljs.reader._STAR_default_data_reader_fn_STAR_);
|
|
cljs.core.swap_BANG_.call(null, cljs.reader._STAR_default_data_reader_fn_STAR_, function(_) {
|
|
return null
|
|
});
|
|
return old_parser
|
|
};
|
|
goog.provide("grub.websocket");
|
|
goog.require("cljs.core");
|
|
goog.require("cljs.core.async");
|
|
goog.require("grub.async_utils");
|
|
goog.require("cljs.reader");
|
|
goog.require("cljs.core.async");
|
|
goog.require("grub.async_utils");
|
|
grub.websocket.websocket_STAR_ = cljs.core.atom.call(null, null);
|
|
grub.websocket.connect_to_server = function connect_to_server() {
|
|
return cljs.core.reset_BANG_.call(null, grub.websocket.websocket_STAR_, new WebSocket("ws://localhost:3000/ws"))
|
|
};
|
|
grub.websocket.get_remote_events = function get_remote_events() {
|
|
var out = cljs.core.async.chan.call(null);
|
|
cljs.core.deref.call(null, grub.websocket.websocket_STAR_)["onmessage"] = function(event) {
|
|
var grub_event = cljs.reader.read_string.call(null, event.data);
|
|
console.log(cljs.core.pr_str.call(null, "Received:"), cljs.core.pr_str.call(null, grub_event));
|
|
var c__4545__auto__ = cljs.core.async.chan.call(null, 1);
|
|
cljs.core.async.impl.dispatch.run.call(null, function() {
|
|
var f__4546__auto__ = function() {
|
|
var switch__4471__auto__ = function(state_26623) {
|
|
var state_val_26624 = state_26623[1];
|
|
if(state_val_26624 === 2) {
|
|
var inst_26621 = state_26623[2];
|
|
var state_26623__$1 = state_26623;
|
|
return cljs.core.async.impl.ioc_helpers.return_chan.call(null, state_26623__$1, inst_26621)
|
|
}else {
|
|
if(state_val_26624 === 1) {
|
|
var state_26623__$1 = state_26623;
|
|
return cljs.core.async.impl.ioc_helpers.put_BANG_.call(null, state_26623__$1, 2, out, grub_event)
|
|
}else {
|
|
return null
|
|
}
|
|
}
|
|
};
|
|
return function(switch__4471__auto__) {
|
|
return function() {
|
|
var state_machine__4472__auto__ = null;
|
|
var state_machine__4472__auto____0 = function() {
|
|
var statearr_26626 = new Array(5);
|
|
statearr_26626[0] = state_machine__4472__auto__;
|
|
statearr_26626[1] = 1;
|
|
return statearr_26626
|
|
};
|
|
var state_machine__4472__auto____1 = function(state_26623) {
|
|
while(true) {
|
|
var result__4473__auto__ = switch__4471__auto__.call(null, state_26623);
|
|
if(result__4473__auto__ === "\ufdd0:recur") {
|
|
continue
|
|
}else {
|
|
return result__4473__auto__
|
|
}
|
|
break
|
|
}
|
|
};
|
|
state_machine__4472__auto__ = function(state_26623) {
|
|
switch(arguments.length) {
|
|
case 0:
|
|
return state_machine__4472__auto____0.call(this);
|
|
case 1:
|
|
return state_machine__4472__auto____1.call(this, state_26623)
|
|
}
|
|
throw new Error("Invalid arity: " + arguments.length);
|
|
};
|
|
state_machine__4472__auto__.cljs$core$IFn$_invoke$arity$0 = state_machine__4472__auto____0;
|
|
state_machine__4472__auto__.cljs$core$IFn$_invoke$arity$1 = state_machine__4472__auto____1;
|
|
return state_machine__4472__auto__
|
|
}()
|
|
}(switch__4471__auto__)
|
|
}();
|
|
var state__4547__auto__ = function() {
|
|
var statearr_26627 = f__4546__auto__.call(null);
|
|
statearr_26627[cljs.core.async.impl.ioc_helpers.USER_START_IDX] = c__4545__auto__;
|
|
return statearr_26627
|
|
}();
|
|
return cljs.core.async.impl.ioc_helpers.run_state_machine.call(null, state__4547__auto__)
|
|
});
|
|
return c__4545__auto__
|
|
};
|
|
return out
|
|
};
|
|
grub.websocket.send_to_server = function send_to_server(event) {
|
|
return cljs.core.deref.call(null, grub.websocket.websocket_STAR_).send(event)
|
|
};
|
|
goog.provide("grub.core");
|
|
goog.require("cljs.core");
|
|
goog.require("cljs.core.async");
|
|
goog.require("grub.async_utils");
|
|
goog.require("cljs.reader");
|
|
goog.require("cljs.core.async");
|
|
goog.require("grub.state");
|
|
goog.require("grub.websocket");
|
|
goog.require("grub.view");
|
|
goog.require("grub.async_utils");
|
|
grub.core.handle_grub_events = function handle_grub_events() {
|
|
var local_events = grub.view.get_local_events.call(null);
|
|
var vec__13110 = grub.async_utils.fan_out.call(null, local_events, 2);
|
|
var local_events_SINGLEQUOTE_ = cljs.core.nth.call(null, vec__13110, 0, null);
|
|
var local_events_SINGLEQUOTE__SINGLEQUOTE_ = cljs.core.nth.call(null, vec__13110, 1, null);
|
|
var remote_events = grub.websocket.get_remote_events.call(null);
|
|
var events = grub.async_utils.fan_in.call(null, cljs.core.PersistentVector.fromArray([local_events_SINGLEQUOTE_, remote_events], true));
|
|
grub.async_utils.do_chan_BANG_.call(null, grub.websocket.send_to_server, local_events_SINGLEQUOTE__SINGLEQUOTE_);
|
|
var c__4545__auto__ = cljs.core.async.chan.call(null, 1);
|
|
cljs.core.async.impl.dispatch.run.call(null, function() {
|
|
var f__4546__auto__ = function() {
|
|
var switch__4471__auto__ = function(state_13122) {
|
|
var state_val_13123 = state_13122[1];
|
|
if(state_val_13123 === 7) {
|
|
var inst_13114 = state_13122[2];
|
|
var inst_13115 = grub.state.handle_event.call(null, inst_13114);
|
|
var state_13122__$1 = function() {
|
|
var statearr_13124 = state_13122;
|
|
statearr_13124[5] = inst_13115;
|
|
return statearr_13124
|
|
}();
|
|
var statearr_13125_13134 = state_13122__$1;
|
|
statearr_13125_13134[2] = null;
|
|
statearr_13125_13134[1] = 2;
|
|
return"\ufdd0:recur"
|
|
}else {
|
|
if(state_val_13123 === 6) {
|
|
var inst_13118 = state_13122[2];
|
|
var state_13122__$1 = state_13122;
|
|
var statearr_13126_13135 = state_13122__$1;
|
|
statearr_13126_13135[2] = inst_13118;
|
|
statearr_13126_13135[1] = 3;
|
|
return"\ufdd0:recur"
|
|
}else {
|
|
if(state_val_13123 === 5) {
|
|
var state_13122__$1 = state_13122;
|
|
var statearr_13127_13136 = state_13122__$1;
|
|
statearr_13127_13136[2] = null;
|
|
statearr_13127_13136[1] = 6;
|
|
return"\ufdd0:recur"
|
|
}else {
|
|
if(state_val_13123 === 4) {
|
|
var state_13122__$1 = state_13122;
|
|
return cljs.core.async.impl.ioc_helpers.take_BANG_.call(null, state_13122__$1, 7, events)
|
|
}else {
|
|
if(state_val_13123 === 3) {
|
|
var inst_13120 = state_13122[2];
|
|
var state_13122__$1 = state_13122;
|
|
return cljs.core.async.impl.ioc_helpers.return_chan.call(null, state_13122__$1, inst_13120)
|
|
}else {
|
|
if(state_val_13123 === 2) {
|
|
var state_13122__$1 = state_13122;
|
|
if(true) {
|
|
var statearr_13128_13137 = state_13122__$1;
|
|
statearr_13128_13137[1] = 4
|
|
}else {
|
|
var statearr_13129_13138 = state_13122__$1;
|
|
statearr_13129_13138[1] = 5
|
|
}
|
|
return"\ufdd0:recur"
|
|
}else {
|
|
if(state_val_13123 === 1) {
|
|
var state_13122__$1 = state_13122;
|
|
var statearr_13130_13139 = state_13122__$1;
|
|
statearr_13130_13139[2] = null;
|
|
statearr_13130_13139[1] = 2;
|
|
return"\ufdd0:recur"
|
|
}else {
|
|
return null
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
};
|
|
return function(switch__4471__auto__) {
|
|
return function() {
|
|
var state_machine__4472__auto__ = null;
|
|
var state_machine__4472__auto____0 = function() {
|
|
var statearr_13132 = new Array(6);
|
|
statearr_13132[0] = state_machine__4472__auto__;
|
|
statearr_13132[1] = 1;
|
|
return statearr_13132
|
|
};
|
|
var state_machine__4472__auto____1 = function(state_13122) {
|
|
while(true) {
|
|
var result__4473__auto__ = switch__4471__auto__.call(null, state_13122);
|
|
if(result__4473__auto__ === "\ufdd0:recur") {
|
|
continue
|
|
}else {
|
|
return result__4473__auto__
|
|
}
|
|
break
|
|
}
|
|
};
|
|
state_machine__4472__auto__ = function(state_13122) {
|
|
switch(arguments.length) {
|
|
case 0:
|
|
return state_machine__4472__auto____0.call(this);
|
|
case 1:
|
|
return state_machine__4472__auto____1.call(this, state_13122)
|
|
}
|
|
throw new Error("Invalid arity: " + arguments.length);
|
|
};
|
|
state_machine__4472__auto__.cljs$core$IFn$_invoke$arity$0 = state_machine__4472__auto____0;
|
|
state_machine__4472__auto__.cljs$core$IFn$_invoke$arity$1 = state_machine__4472__auto____1;
|
|
return state_machine__4472__auto__
|
|
}()
|
|
}(switch__4471__auto__)
|
|
}();
|
|
var state__4547__auto__ = function() {
|
|
var statearr_13133 = f__4546__auto__.call(null);
|
|
statearr_13133[cljs.core.async.impl.ioc_helpers.USER_START_IDX] = c__4545__auto__;
|
|
return statearr_13133
|
|
}();
|
|
return cljs.core.async.impl.ioc_helpers.run_state_machine.call(null, state__4547__auto__)
|
|
});
|
|
return c__4545__auto__
|
|
};
|
|
grub.core.init = function init() {
|
|
grub.view.render_body.call(null);
|
|
grub.websocket.connect_to_server.call(null);
|
|
return grub.core.handle_grub_events.call(null)
|
|
};
|
|
grub.core.init.call(null);
|
|
goog.provide("grub.core_spec");
|
|
goog.require("cljs.core");
|
|
goog.require("grub.core");
|
|
goog.require("specljs.core");
|
|
var description__5416__auto___13479 = specljs.components.new_description.call(null, "A ClojureScript test", "grub.core-spec");
|
|
var _STAR_parent_description_STAR_13473_13480 = specljs.config._STAR_parent_description_STAR_;
|
|
try {
|
|
specljs.config._STAR_parent_description_STAR_ = description__5416__auto___13479;
|
|
var seq__13475_13481 = cljs.core.seq.call(null, cljs.core.list.call(null, specljs.components.new_characteristic.call(null, "fails. Fix it!", function() {
|
|
var expected__5496__auto__ = 0;
|
|
var actual__5497__auto__ = 1;
|
|
if(!cljs.core._EQ_.call(null, expected__5496__auto__, actual__5497__auto__)) {
|
|
throw new specljs.platform.SpecFailure([cljs.core.str("Expected: "), cljs.core.str(expected__5496__auto__ == null ? "nil" : cljs.core.pr_str.call(null, expected__5496__auto__)), cljs.core.str(specljs.platform.endl), cljs.core.str(" got: "), cljs.core.str(actual__5497__auto__ == null ? "nil" : cljs.core.pr_str.call(null, actual__5497__auto__)), cljs.core.str(" (using =)")].join(""));
|
|
}else {
|
|
return null
|
|
}
|
|
})));
|
|
var chunk__13476_13482 = null;
|
|
var count__13477_13483 = 0;
|
|
var i__13478_13484 = 0;
|
|
while(true) {
|
|
if(i__13478_13484 < count__13477_13483) {
|
|
var component__5417__auto___13485 = cljs.core._nth.call(null, chunk__13476_13482, i__13478_13484);
|
|
specljs.components.install.call(null, component__5417__auto___13485, description__5416__auto___13479);
|
|
var G__13486 = seq__13475_13481;
|
|
var G__13487 = chunk__13476_13482;
|
|
var G__13488 = count__13477_13483;
|
|
var G__13489 = i__13478_13484 + 1;
|
|
seq__13475_13481 = G__13486;
|
|
chunk__13476_13482 = G__13487;
|
|
count__13477_13483 = G__13488;
|
|
i__13478_13484 = G__13489;
|
|
continue
|
|
}else {
|
|
var temp__4092__auto___13490 = cljs.core.seq.call(null, seq__13475_13481);
|
|
if(temp__4092__auto___13490) {
|
|
var seq__13475_13491__$1 = temp__4092__auto___13490;
|
|
if(cljs.core.chunked_seq_QMARK_.call(null, seq__13475_13491__$1)) {
|
|
var c__3037__auto___13492 = cljs.core.chunk_first.call(null, seq__13475_13491__$1);
|
|
var G__13493 = cljs.core.chunk_rest.call(null, seq__13475_13491__$1);
|
|
var G__13494 = c__3037__auto___13492;
|
|
var G__13495 = cljs.core.count.call(null, c__3037__auto___13492);
|
|
var G__13496 = 0;
|
|
seq__13475_13481 = G__13493;
|
|
chunk__13476_13482 = G__13494;
|
|
count__13477_13483 = G__13495;
|
|
i__13478_13484 = G__13496;
|
|
continue
|
|
}else {
|
|
var component__5417__auto___13497 = cljs.core.first.call(null, seq__13475_13491__$1);
|
|
specljs.components.install.call(null, component__5417__auto___13497, description__5416__auto___13479);
|
|
var G__13498 = cljs.core.next.call(null, seq__13475_13491__$1);
|
|
var G__13499 = null;
|
|
var G__13500 = 0;
|
|
var G__13501 = 0;
|
|
seq__13475_13481 = G__13498;
|
|
chunk__13476_13482 = G__13499;
|
|
count__13477_13483 = G__13500;
|
|
i__13478_13484 = G__13501;
|
|
continue
|
|
}
|
|
}else {
|
|
}
|
|
}
|
|
break
|
|
}
|
|
}finally {
|
|
specljs.config._STAR_parent_description_STAR_ = _STAR_parent_description_STAR_13473_13480
|
|
}
|
|
if(cljs.core.not.call(null, specljs.config._STAR_parent_description_STAR_)) {
|
|
specljs.running.submit_description.call(null, specljs.config.active_runner.call(null), description__5416__auto___13479)
|
|
}else {
|
|
}
|
|
; |