PageSourceSearch

https://enyguide.de/scripts.4e1708e62c8e4130.js

js enyguide.de collected 2026-10-09 22:12:30 UTC 220,463 bytes, 1 lines download raw bytes

1!function A(F,C,T){function x(r,s){if(!C[r]){if(!F[r]){var d="function"==typeof require&&require;if(!s&&d)return d(r,!0);if(E)return E(r,!0);throw new Error("Cannot find module '"+r+"'")}var f=C[r]={exports:{}};F[r][0].call(f.exports,function(u){return x(F[r][1][u]||u)},f,f.exports,A,F,C,T)}return C[r].exports}for(var E="function"==typeof require&&require,w=0;w<T.length;w++)x(T[w]);return x}({1:[function(A,F,C){(function(){"use strict";var T=A("../");"function"!=typeof Object.getPrototypeOf&&(Object.getPrototypeOf="".__proto__===String.prototype?function(x){return x.__proto__}:function(x){return x.constructor.prototype}),"function"==typeof this.define&&this.define.amd?define([],function(){return T}):this.nools=T}).call(typeof window<"u"?window:this)},{"../":2}],2:[function(A,F,C){F.exports=A("./lib")},{"./lib":15}],3:[function(A,F,C){"use strict";var T=A("./extended"),x=T.declare,E=T.AVLTree,w=T.LinkedList,r=T.isPromiseLike,s=A("events").EventEmitter,d=x({instance:{constructor:function(){this.memory={},this.memoryValues=new w},clear:function(){this.memoryValues.clear(),this.memory={}},remove:function(u){var o=u.hashCode,p=this.memory,c=p[o];return c&&(this.memoryValues.remove(c),delete p[o]),c},insert:function(u){var o=u.hashCode;!o in this.memory&&this.memoryValues.push(this.memory[o]=u)}}}),f="main";F.exports=x(s,{instance:{constructor:function(u,o){this.agendaGroups={},this.agendaGroupStack=[f],this.rules={},this.flow=u,this.comparator=o,this.setFocus(f).addAgendaGroup(f)},addAgendaGroup:function(u){T.has(this.agendaGroups,u)||(this.agendaGroups[u]=new E({compare:this.comparator}))},getAgendaGroup:function(u){return this.agendaGroups[u||f]},setFocus:function(u){return u!==this.getFocused()&&this.agendaGroups[u]&&(this.agendaGroupStack.push(u),this.emit("focused",u)),this},getFocused:function(){var u=this.agendaGroupStack;return u[u.length-1]},getFocusedAgenda:function(){return this.agendaGroups[this.getFocused()]},register:function(u){var o=u.rule.agendaGroup;this.rules[u.name]={tree:new E({compare:this.comparator}),factTable:new d},o&&this.addAgendaGroup(o)},isEmpty:function(){for(var u=this.agendaGroupStack,o=!1;this.getFocusedAgenda().isEmpty()&&this.getFocused()!==f;)u.pop(),o=!0;return o&&this.emit("focused",this.getFocused()),this.getFocusedAgenda().isEmpty()},fireNext:function(){for(var u=this.agendaGroupStack,o=!1;this.getFocusedAgenda().isEmpty()&&this.getFocused()!==f;)u.pop();if(!this.getFocusedAgenda().isEmpty()){var p=this.pop();this.emit("fire",p.rule.name,p.match.factHash);var c=p.rule.fire(this.flow,p.match);o=!r(c)||c.then(function(){return!0})}return o},pop:function(){for(var u=this.getFocusedAgenda(),o=u.__root;o.right;)o=o.right;var p=o.data;u.remove(p);var c=this.rules[p.name];return c.tree.remove(p),c.factTable.remove(p),p},peek:function(){for(var o=this.getFocusedAgenda().__root;o.right;)o=o.right;return o.data},modify:function(u,o){this.retract(u,o),this.insert(u,o)},retract:function(u,o){var p=this.rules[u.name];o.rule=u;var c=p.factTable.remove(o);c&&(this.getAgendaGroup(u.rule.agendaGroup).remove(c),p.tree.remove(c))},insert:function(u,o){var p=this.rules[u.name],c=u.rule,h=c.agendaGroup;p.tree.insert(o),this.getAgendaGroup(h).insert(o),c.autoFocus&&this.setFocus(h),p.factTable.insert(o)},dispose:function(){for(var u in this.agendaGroups)this.agendaGroups[u].clear();var o=this.rules;for(u in o)u in o&&(o[u].tree.clear(),o[u].factTable.clear());this.rules={}}}})},{"./extended":12,events:60}],4:[function(require,module,exports){"use strict";var extd=require("../extended"),forEach=extd.forEach,isString=extd.isString;exports.modifiers=["assert","modify","retract","emit","halt","focus","getFacts"];var createFunction=function(body,defined,scope,scopeNames,definedNames){var declares=[];forEach(definedNames,function(A){-1!==body.indexOf(A)&&declares.push("var "+A+"= defined."+A+";")}),forEach(scopeNames,function(A){-1!==body.indexOf(A)&&declares.push("var "+A+"= scope."+A+";")}),body=["((function(){",declares.join(""),"\n\treturn ",body,"\n})())"].join("");try{return eval(body)}catch(A){throw new Error("Invalid action : "+body+"\n"+A.message)}},createDefined=function(F,C,T){return function(F,C,T){if(isString(F)){var x=[];
1extd(C).keys().forEach(function(s){-1!==F.indexOf(s)&&x.push("var "+s+"= defined."+s+";")}),extd(T).keys().forEach(function(s){-1!==F.indexOf(s)&&x.push("var "+s+"= function(){var prop = scope."+s+"; return __objToStr__.call(prop) === '[object Function]' ? prop.apply(void 0, arguments) : prop;};")}),x.length&&x.unshift("var __objToStr__ = Object.prototype.toString;"),F=[x.join(""),"return ",F,";"].join(""),F=new Function("defined","scope",F)(C,T)}var E=F.hasOwnProperty("constructor")&&"function"==typeof F.constructor?F.constructor:function(s){for(var d in s=s||{})d in F&&(this[d]=s[d])},w=E.prototype;for(var r in F)w[r]=F[r];return E}(F.properties,C,T)};exports.createFunction=createFunction,exports.createDefined=createDefined},{"../extended":12}],5:[function(A,F,C){var T=A("__browserify_Buffer").Buffer,x=A("../extended"),E=A("../parser"),w=A("../constraintMatcher.js"),r=x.indexOf,s=x.forEach,d=x.removeDuplicates,f=x.map,o=x.hash.keys,p=x.merge,c=A("../rule"),h=A("./common"),_=h.modifiers,a=h.createDefined,b=h.createFunction,R=function(){var g=function(M,O,U,S,D){var Z=[],V=M[0],J=M[1],$=M[2],I=M[3];if(x.isHash($)&&(I=$,$=null),!V||!(V=S[V]))throw new Error("Invalid class "+M[0]+" for rule "+D);if(Z.push(V),Z.push(J,$,I),U.push(Z),O.push(J),$&&s(w.getIdentifiers(E.parseConstraint($)),function(t){O.push(t)}),x.isObject(I))for(var B in I){var e=I[B];-1===r(O,e)&&O.push(e)}};function k(M,O,U,S,D){if(M.length){var Z=M[0];if("not"===Z||"exists"===Z){var V=[];M.shift(),g(M,U,V,S,D);var J=V[0];J.unshift(Z),O.push(J)}else if("or"===Z){var $=[Z];M.shift(),s(M,function(I){k(I,$,U,S,D)}),O.push($)}else g(M,U,O,S,D),U=d(U)}}return function(M,O,U){var S=M.name;if(x.isEmpty(M))throw new Error("Rule is empty");var D=M.options||{};D.scope=U;var Z=M.constraints||[];Z.length||(Z=["true"]);var J=M.action;if(x.isUndefined(J))throw new Error("No action was defined for rule "+S);var $=[],I=[];return s(Z,function(B){k(B,$,I,O,S)}),c.createRule(S,D,$,function(g,k,M,O){var U=[];s(k,function(D){-1!==g.indexOf(D)&&U.push("var "+D+"= facts."+D+";")}),x(M).keys().forEach(function(D){-1!==g.indexOf(D)&&U.push("var "+D+"= defined."+D+";")}),x(O).keys().forEach(function(D){-1!==g.indexOf(D)&&U.push("var "+D+"= scope."+D+";")}),x(_).forEach(function(D){-1!==g.indexOf(D)&&U.push("if(!"+D+"){ var "+D+"= flow."+D+";}")});var S=["facts","flow"];/next\(.*\)/.test(g)&&S.push("next"),g=U.join("")+g;try{return new Function("defined, scope","return "+new Function(S.join(","),g).toString())(M,O)}catch(D){throw new Error("Invalid action : "+g+"\n"+D.message)}}(J,I,O,U))}}();C.parse=function(g,k){return E.parseRuleSet(g,k)},C.compile=function(g,k,M,O){x.isFunction(k)?(M=k,k={}):k=k||{};var U=g.name||k.name;if(!U)throw new Error("Name must be present in JSON or options");var S=new O(U),D=p({Array,String,Number,Boolean,RegExp,Date,Object},k.define||{});typeof T<"u"&&(D.Buffer=T);var Z=p({console},k.scope);s(g.scope,function(I){Z[I.name]=!0}),s(g.define,function(I){D[I.name]=a(I,D,Z)}),x(D).forEach(function(I,B){S.addDefined(B,I)});var V=x(g.scope).pluck("name").union(x(Z).keys().value()).value(),J=f(o(D),function(I){return I});s(g.scope,function(I){Z[I.name]=b(I.body,D,Z,V,J)});var $=g.rules;return $.length&&s($,function(I){S.__rules=S.__rules.concat(R(I,D,Z))}),M&&M.call(S,S),S},C.transpile=A("./transpile").transpile},{"../constraintMatcher.js":9,"../extended":12,"../parser":44,"../rule":49,"./common":4,"./transpile":6,__browserify_Buffer:63}],6:[function(A,F,C){var T=A("__browserify_Buffer").Buffer,x=A("../extended"),E=x.forEac
1h,w=x.indexOf,r=x.merge,s=x.isString,d=A("./common").modifiers,f=A("../constraintMatcher"),u=A("../parser");function o(a){a=s(a)?new Function("return "+a+";")():a;var N,b=["(function(){"];for(var R in a.hasOwnProperty("constructor")&&"function"==typeof a.constructor?b.push("var Defined = "+a.constructor.toString()+";"):b.push("var Defined = function(opts){ for(var i in opts){if(opts.hasOwnProperty(i)){this[i] = opts[i];}}};"),b.push("var proto = Defined.prototype;"),a)a.hasOwnProperty(R)&&b.push("proto."+R+" = "+(x.isFunction(N=a[R])?N.toString():x.format("%j",N))+";");return b.push("return Defined;"),b.push("}())"),b.join("")}function _(a,b){var N=[];if("or"===(a=a.slice(0))[0])return N.push('["'+a.shift()+'"'),N.push(x.map(a,function(g){return _(g,b)}).join(",")+"]"),N;if(("not"===a[0]||"exists"===a[0])&&N.push('"',a.shift(),'", '),b.push(a[1]),N.push(a[0],', "'+a[1].replace(/\\/g,"\\\\").replace(/"/g,'\\"')+'"'),a.splice(0,2),a.length){var R=a.shift();x.isString(R)&&R?(N.push(',"'+R.replace(/\\/g,"\\\\").replace(/"/g,'\\"'),'"'),E(f.getIdentifiers(u.parseConstraint(R)),function(g){b.push(g)})):(N.push(',"true"'),a.unshift(R))}return function c(a,b){if(a.length&&x.isString(a[0])){var N=a[0].match(" *(from)");if(N){if("from"!==(N=N[0]))throw new Error("Unrecognized modifier "+N);b.push(', "',a.shift(),'"')}}}(a,N),function h(a,b,N){if(a.length&&x.isHash(a[0])){var R=a.shift();
1x(R).values().forEach(function(g){-1===w(N,g)&&N.push(g)}),b.push(","+x.format("%j",[R]))}}(a,N,b),"["+N.join("")+"]"}C.transpile=function(a,b){b=b||{};var N=[];N.push("(function(){"),N.push("return function(options){"),N.push("options = options || {};"),N.push("var bind = function(scope, fn){return function(){return fn.apply(scope, arguments);};}, defined = {Array: Array, String: String, Number: Number, Boolean: Boolean, RegExp: RegExp, Date: Date, Object: Object}, scope = options.scope || {};"),N.push("var optDefined = options.defined || {}; for(var i in optDefined){defined[i] = optDefined[i];}");var R=r({Array,String,Number,Boolean,RegExp,Date,Object},b.define||{});typeof T<"u"&&(R.Buffer=T);var g=r({console},b.scope);return N.push(["return nools.flow('",b.name,"', function(){"].join("")),N.push(x(a.define||[]).map(function(k){var M=k.name;return k[M]={},["var",M,"= defined."+M,"= this.addDefined('"+M+"',",o(k.properties)+");"].join(" ")}).value().join("\n")),N.push(x(a.scope||[]).map(function(k){var M=k.name;return g[M]={},["var",M,"= scope."+M,"= ",k.body,";"].join(" ")}).value().join("\n")),N.push("scope.console = console;\n"),N.push(x(a.rules||[]).map(function(k){var M=[],O=["this.rule('",k.name.replace(/'/g,"\\'"),"'"],U=x.merge(k.options||{},{scope:"scope"});return O.push(",",x.format("%j",[U]).replace(/(:"scope")/,":scope")),k.constraints&&!x.isEmpty(k.constraints)&&(O.push(", ["),O.push(x(k.constraints).map(function(S){return _(S,M)}).value().join(",")),O.push("]")),O.push(",",function p(a,b,N,R){var g=[],k={};E(b,function(O){-1!==a.indexOf(O)&&(k[O]=!0,g.push("var "+O+"= facts."+O+";"))}),x(N).keys().forEach(function(O){-1!==a.indexOf(O)&&!k[O]&&(k[O]=!0,g.push("var "+O+"= defined."+O+";"))}),x(R).keys().forEach(function(O){-1!==a.indexOf(O)&&!k[O]&&(k[O]=!0,g.push("var "+O+"= scope."+O+";"))}),x(d).forEach(function(O){-1!==a.indexOf(O)&&!k[O]&&g.push("var "+O+"= flow."+O+";")});var M=["facts","flow"];/next\(.*\)/.test(a)&&M.push("next"),a=g.join("")+a;try{return["function(",M.join(","),"){",a,"}"].join("")}catch(O){throw new Error("Invalid action : "+a+"\n"+O.message)}}(k.action,M,R,g)),O.push(");"),O.join("")}).value().join("")),N.push("});"),N.push("};"),N.push("}());"),N.join("")}},{"../constraintMatcher":9,"../extended":12,"../parser":44,"./common":4,__browserify_Buffer:63}],7:[function(A,F,C){var T=A("./extended").map,s={salience:function x(d,f){return d.rule.priority-f.rule.priority},bucketCounter:function E(d,f){return d.counter-f.counter},factRecency:function w(d,f){for(var u=0,o=d.match.recency,p=f.match.recency,c=o.length-1,h=p.length-1;o[u]===p[u]&&u<c&&u<h&&u++;);var _=o[u]-p[u];return _||(_=c-h),_},activationRecency:function r(d,f){return d.recency-f.recency}};C.strategies=s,C.strategy=function(d){var f=(d=T(d,function(u){return s[u]})).length;return function(u,o){var p=-1,c=0;if(u!==o&&(u.name!==o.name||u.hashCode!==o.hashCode)){for(;++p<f&&!c;)c=d[p](u,o);c=c>0?1:-1}return c}}},{"./extended":12}],8:[function(A,F,C){"use strict";var d,T=A("./extended"),x=T.deepEqual,E=T.merge,w=T.instanceOf,r=T.filter,f=0,u=(0,T.declare)({type:null,instance:{constructor:function(c){d||(d=A("./constraintMatcher")),this.id=f++,this.constraint=c,T.bindAll(this,["assert"])},assert:function(){throw new Error("not implemented")},getIndexableProperties:function(){return[]},equal:function(c){return w(c,this._static)&&this.get("alias")===c.get("alias")&&T.deepEqual(this.constraint,c.constraint)},getters:{variables:function(){return[this.get("alias")]}}}});u.extend({instance:{type:"object",constructor:function(c){this._super([c])},assert:function(c){return c instanceof this.constraint||c.constructor===this.constraint},equal:function(c){return w(c,this._static)&&this.constraint===c.constraint}}}).as(C,"ObjectConstraint");var o=u.extend({instance:{type:"equality",constructor:function(c,h){this._super([c]),this.pattern=(h=h||{}).pattern,this._matcher=d.getMatcher(c,h,!0)},assert:function(c){return this._matcher(c)}}}).as(C,"EqualityConstraint");o.extend({instance:{type:"inequality"}}).as(C,"InequalityConstraint"),o.extend({instance:{type:"comparison"}}).as(C,"ComparisonConstraint"),u.extend({instance:{type:"equality",constructor:function(){this._super([[!0]])},equal:function(c){return w(c,this._static)&&this.get("alias")===c.get("alias")},assert:function(){return!0}}}).as(C,"TrueConstraint");var p=u.extend({instance:{type:"reference",constructor:function(c,h){this.cache={},this._super([c]),h=h||{},this.values=[],this.pattern=h.pattern,this._options=h,this._matcher=d.getMatcher(c,h,!1)},assert:function(c,h){try{return this._matcher(c,h)}catch(_){throw new Error("Error with evaluating pattern "+this.pattern+" "+_.message)}},merge:function(c){var h=this;return c instanceof p&&((h=new this._static([this.constraint,c.constraint,"and"],E({},this._options,this._options)))._alias=this._alias||c._alias,h.vars=this.vars.c
1oncat(c.vars)),h},equal:function(c){return w(c,this._static)&&T.deepEqual(this.constraint,c.constraint)},getters:{variables:function(){return this.vars},alias:function(){return this._alias}},setters:{alias:function(c){this._alias=c,this.vars=r(d.getIdentifiers(this.constraint),function(h){return h!==c})}}}}).as(C,"ReferenceConstraint");p.extend({instance:{type:"reference_equality",op:"eq",getIndexableProperties:function(){return d.getIndexableProperties(this.constraint)}}}).as(C,"ReferenceEqualityConstraint").extend({instance:{type:"reference_inequality",op:"neq"}}).as(C,"ReferenceInequalityConstraint").extend({instance:{type:"reference_gt",op:"gt"}}).as(C,"ReferenceGTConstraint").extend({instance:{type:"reference_gte",op:"gte"}}).as(C,"ReferenceGTEConstraint").extend({instance:{type:"reference_lt",op:"lt"}}).as(C,"ReferenceLTConstraint").extend({instance:{type:"reference_lte",op:"lte"}}).as(C,"ReferenceLTEConstraint"),u.extend({instance:{type:"hash",constructor:function(c){this._super([c])},equal:function(c){return T.instanceOf(c,this._static)&&this.get("alias")===c.get("alias")&&T.deepEqual(this.constraint,c.constraint)},assert:function(){return!0},getters:{variables:function(){return this.constraint}}}}).as(C,"HashConstraint"),u.extend({instance:{constructor:function(c,h){this.type="from",this.constraints=d.getSourceMatcher(c,h||{},!0),T.bindAll(this,["assert"])},equal:function(c){return w(c,this._static)&&this.get("alias")===c.get("alias")&&x(this.constraints,c.constraints)},assert:function(c,h){return this.constraints(c,h)},getters:{variables:function(){return this.constraint}}}}).as(C,"FromConstraint"),u.extend({instance:{constructor:function(c,h){this.type="custom",this.fn=c,this.options=h,T.bindAll(this,["assert"])},equal:function(c){return w(c,this._static)&&this.fn===c.constraint},assert:function(c,h){return this.fn(c,h)}}}).as(C,"CustomConstraint")},{"./constraintMatcher":9,"./extended":12}],9:[function(A,F,C){"use strict";var T=A("./extended"),x=T.isArray,E=T.forEach,w=T.some,r=T.indexOf,s=T.isNumber,d=T.removeDuplicates,f=A("./constraint");function u(_){return T(_).map(function(b){return x(b)?x(b[0])?u(b).value():b.reverse().join("."):b}).flatten().filter(function(a){return!!a})}var o={indexOf:T.indexOf,now:function(){return new Date},Date:function(_,a,b,N,R,g,k){var M=new Date;return s(_)&&M.setYear(_),s(a)&&M.setMonth(a),s(b)&&M.setDate(b),s(N)&&M.setHours(N),s(R)&&M.setMinutes(R),s(g)&&M.setSeconds(g),s(k)&&M.setMilliseconds(k),M},lengthOf:function(_,a){return _.length===a},isTrue:function(_){return!0===_},isFalse:function(_){return!1===_},isNotNull:function(_){return null!==_},dateCmp:function(_,a){return T.compare(_,a)}};E(["years","days","months","hours","minutes","seconds"],function(_){o[_+"FromNow"]=T[_+"FromNow"],o[_+"Ago"]=T[_+"Ago"]}),E(["isArray","isNumber","isHash","isObject","isDate","isBoolean","isString","isRegExp","isNull","isEmpty","isUndefined","isDefined","isUndefinedOrNull","isPromiseLike","isFunction","deepEqual"],function(_){var a=T[_];o[_]=function(){return a.apply(T,arguments)}});var p={equal:function(_,a){var b=!1;return _===a?b=!0:_[2]===a[2]&&(b=-1!==r(["string","number","boolean","regexp","identifier","null"],_[2])?_[0]===a[0]:"unary"===_[2]||"logicalNot"===_[2]?this.equal(_[0],a[0]):this.equal(_[0],a[0])&&this.equal(_[1],a[1])),b},__getProperties:function(_){var a=[];if(_){var b=_[2];if(!b)return a;"prop"!==b&&"identifier"!==b&&"string"!==b&&"number"!==b&&"boolean"!==b&&"regexp"!==b&&"unary"!==b&&"unary"!==b?(a[0]=this.__getProperties(_[0]),a[1]=this.__getProperties(_[1])):a="identifier"===b?[_[0]]:p.__getProperties(_[1]).concat(p.__getProperties(_[0]))}return a},getIndexableProperties:function(_){return"composite"===_[2]?this.getIndexableProperties(_[0]):/^(\w+(\['[^']*'])*) *([!=]==?|[<>]=?) (\w+(\['[^']*'])*)$/.test(this.parse(_))?u(this.__getProperties(_)).flatten().value():[]},getIdentifiers:function(_){var a=[],b=_[2];if("identifier"===b)return[_[0]];if("function"===b)a=a.concat(this.getIdentifiers(_[0])).concat(this.getIdentifiers(_[1]));else if("string"!==b&&"number"!==b&&"boolean"!==b&&"regexp"!==b&&"unary"!==b&&"unary"!==b)if("prop"===b){if(a=a.concat(this.getIdentifiers(_[0])),_[1])for(var N=_[1];x(N);){if("function"===N[2]){a=a.concat(this.getIdentifiers(N[1]));break}N=N[1]}}else _[0]&&(a=a.concat(this.getIdentifiers(_[0]))),_[1]&&(a=a.concat(this.getIdentifiers(_[1])));return d(a)},toConstraints:function(_,a){var b=[],N=a.alias,R=a.scope||{},g=_[2];if("and"===g)b=b.concat(this.toConstraints(_[0],a)).concat(this.toConstraints(_[1],a));else if("composite"===g||"or"===g||"lt"===g||"gt"===g||"lte"===g||"gte"===g||"like"===g||"notLike"===g||"eq"===g||"neq"===g||"seq"===g||"sneq"===g||"in"===g||"notIn"===g||"prop"===g||"propLookup"===g||"function"===g||"logicalNot"===g){var k=w(this.getIdentifiers(_),function(M){return M!==N&&!(M in o)&&!(M in R)});switch(g){case"eq":case"seq":b.push(new f[k?"ReferenceEqualityConstraint":"EqualityConstraint"](_,a));break;case"neq":case"sneq":b.push(new f[k?"ReferenceInequalityConstraint":"InequalityConstraint"](_,a));break;
1case"gt":b.push(new f[k?"ReferenceGTConstraint":"ComparisonConstraint"](_,a));break;case"gte":b.push(new f[k?"ReferenceGTEConstraint":"ComparisonConstraint"](_,a));break;case"lt":b.push(new f[k?"ReferenceLTConstraint":"ComparisonConstraint"](_,a));break;case"lte":b.push(new f[k?"ReferenceLTEConstraint":"ComparisonConstraint"](_,a));break;default:b.push(new f[k?"ReferenceConstraint":"ComparisonConstraint"](_,a))}}return b},parse:function(_){return this[_[2]](_[0],_[1])},composite:function(_){return this.parse(_)},and:function(_,a){return["(",this.parse(_),"&&",this.parse(a),")"].join(" ")},or:function(_,a){return["(",this.parse(_),"||",this.parse(a),")"].join(" ")},prop:function(_,a){return"function"===a[2]?[this.parse(_),this.parse(a)].join("."):[this.parse(_),"['",this.parse(a),"']"].join("")},propLookup:function(_,a){return"function"===a[2]?[this.parse(_),this.parse(a)].join("."):[this.parse(_),"[",this.parse(a),"]"].join("")},unary:function(_){return-1*this.parse(_)},plus:function(_,a){return[this.parse(_),"+",this.parse(a)].join(" ")},minus:function(_,a){return[this.parse(_),"-",this.parse(a)].join(" ")},mult:function(_,a){return[this.parse(_),"*",this.parse(a)].join(" ")},div:function(_,a){return[this.parse(_),"/",this.parse(a)].join(" ")},mod:function(_,a){return[this.parse(_),"%",this.parse(a)].join(" ")},lt:function(_,a){return[this.parse(_),"<",this.parse(a)].join(" ")},gt:function(_,a){return[this.parse(_),">",this.parse(a)].join(" ")},lte:function(_,a){return[this.parse(_),"<=",this.parse(a)].join(" ")},gte:function(_,a){return[this.parse(_),">=",this.parse(a)].join(" ")},like:function(_,a){return[this.parse(a),".test(",this.parse(_),")"].join("")},notLike:function(_,a){return["!",this.parse(a),".test(",this.parse(_),")"].join("")},eq:function(_,a){return[this.parse(_),"==",this.parse(a)].join(" ")},seq:function(_,a){return[this.parse(_),"===",this.parse(a)].join(" ")},neq:function(_,a){return[this.parse(_),"!=",this.parse(a)].join(" ")},sneq:function(_,a){return[this.parse(_),"!==",this.parse(a)].join(" ")},in:function(_,a){return["(indexOf(",this.parse(a),",",this.parse(_),")) != -1"].join("")},notIn:function(_,a){return["(indexOf(",this.parse(a),",",this.parse(_),")) == -1"].join("")},arguments:function(_,a){var b=[];return _&&b.push(this.parse(_)),a&&b.push(this.parse(a)),b.join(",")},array:function(_){var a=[];return _?(a=this.parse(_),x(a)?a:["[",a,"]"].join("")):["[",a.join(","),"]"].join("")},function:function(_,a){var b=this.parse(a);return[this.parse(_),"(",b,")"].join("")},string:function(_){return"'"+_+"'"},number:function(_){return _},boolean:function(_){return _},regexp:function(_){return _},identifier:function(_){return _},null:function(){return"null"},logicalNot:function(_){return["!(",this.parse(_),")"].join("")}},c=0,h=C.toJs=function(_,a,b,N,R){var g=p.parse(_);a=a||{};var k=p.getIdentifiers(_),M=["var indexOf = definedFuncs.indexOf; var hasOwnProperty = Object.prototype.hasOwnProperty;"],O=[];T(k).filter(function(D){var Z=["var ",D," = "];if(o.hasOwnProperty(D))Z.push("definedFuncs['",D,"']");else{if(!a.hasOwnProperty(D))return!0;Z.push("scope['",D,"']")}return Z.push(";"),M.push(Z.join("")),!1}).forEach(function(D){var Z=["var ",D," = "];N||D!==b?Z.push("fact."+D):D===b&&Z.push("hash.",D,""),Z.push(";"),O.push(Z.join(""))});var U=M.join("")+"return function matcher"+c+++(N?"(fact){":"(fact, hash){")+O.join("")+" return "+(R?R(g):g)+";}";return new Function("definedFuncs, scope",U)(o,a)};C.getMatcher=function(_,a,b){return h(_,(a=a||{}).scope,a.alias,b,function(N){return"!!("+N+")"})},C.getSourceMatcher=function(_,a,b){return h(_,(a=a||{}).scope,a.alias,b,function(N){return N})},C.toConstraints=function(_,a){return"function"==typeof _?[new f.CustomConstraint(_,a)]:p.toConstraints(_,a)},C.equal=function(_,a){return p.equal(_,a)},C.getIdentifiers=function(_){return p.getIdentifiers(_)},C.getIndexableProperties=function(_){return p.getIndexableProperties(_)}},{"./constraint":8,"./extended":12}],10:[function(A,F,C){"use strict";var T=A("./extended"),x=T.isBoolean,E=T.declare,w=T.indexOf,r=Array.prototype.push;function d(p,c,h){for(var b,_=-1,a=h.length;++_<a;)p[b=h[_]]=c[b]}var u=E({instance:{isMatch:!0,hashCode:"",facts:null,factIds:null,factHash:null,recency:null,aliases:null,constructor:function(){this.facts=[],this.factIds=[],this.factHash={},this.recency=[],this.aliases=[]},addFact:function(p){return r.call(this.facts,p),r.call(this.recency,p.recency),r.call(this.factIds,p.id),this.hashCode=this.factIds.join(":"),this},merge:function(p){var c=new u;return c.isMatch=p.isMatch,r.apply(c.facts,this.facts),r.apply(c.facts,p.facts),r.apply(c.aliases,this.aliases),r.apply(c.aliases,p.aliases),c.hashCode=this.hashCode+":"+p.hashCode,d(c.factHash,this.factHash,this.aliases),d(c.factHash,p.factHash,p.aliases),function f(p,c,h){r.apply(p,c);for(var b,_=-1,a=h.length,N=p.length;++_<a;)-1===w(p,b=h[_])&&(p[N++]=b)}(c.recency,this.recency,p.recency),c}}}),o=E({instance:{match:null,factHash:null,aliases:null,fact:null,hashCode:null,paths:null,pathsHash:null,constructor:function(p,c,h){this.fact=p,this.match=h||
1(new u).addFact(p),this.factHash=this.match.factHash,this.aliases=this.match.aliases,this.hashCode=this.match.hashCode,c?(this.paths=c,this.pathsHash=function s(p,c){for(var h="",_=-1,a=p.length;++_<a;)h+=p[_].id+":";return h+c}(c,this.hashCode)):this.pathsHash=this.hashCode},set:function(p,c){return this.factHash[p]=c,this.aliases.push(p),this},isMatch:function(p){return x(p)?(this.match.isMatch=p,this):this.match.isMatch},mergeMatch:function(p){var c=this.match=this.match.merge(p);return this.factHash=c.factHash,this.hashCode=c.hashCode,this.aliases=c.aliases,this},clone:function(p,c,h){return new o(p||this.fact,c||this.path,h||this.match)}}}).as(F)},{"./extended":12}],11:[function(A,F,C){var T=A("./extended"),x=T.Promise,E=A("./nextTick"),w=T.isPromiseLike;x.extend({instance:{looping:!1,constructor:function(r,s){this._super([]),this.flow=r,this.agenda=r.agenda,this.rootNode=r.rootNode,this.matchUntilHalt=!!s,T.bindAll(this,["onAlter","callNext"])},halt:function(){this.__halted=!0,this.looping||this.callback()},onAlter:function(){this.flowAltered=!0,!this.looping&&this.matchUntilHalt&&!this.__halted&&this.callNext()},setup:function(){var r=this.flow;this.rootNode.resetCounter(),r.on("assert",this.onAlter),r.on("modify",this.onAlter),r.on("retract",this.onAlter)},tearDown:function(){var r=this.flow;r.removeListener("assert",this.onAlter),r.removeListener("modify",this.onAlter),r.removeListener("retract",this.onAlter)},__handleAsyncNext:function(r){var s=this,d=s.agenda;return r.then(function(){s.looping=!1,d.isEmpty()?(!s.matchUntilHalt||s.__halted)&&s.callback():(s.flowAltered&&(s.rootNode.incrementCounter(),s.flowAltered=!1),s.__halted?s.callback():s.callNext()),s=null},this.errback)},__handleSyncNext:function(r){return this.looping=!1,this.agenda.isEmpty()||this.flowAltered&&(this.rootNode.incrementCounter(),this.flowAltered=!1),r&&!this.__halted?E(this.callNext):(!this.matchUntilHalt||this.__halted)&&this.callback(),r},callback:function(){this.tearDown(),this._super(arguments)},callNext:function(){this.looping=!0;var r=this.agenda.fireNext();return w(r)?this.__handleAsyncNext(r):this.__handleSyncNext(r)},execute:function(){return this.setup(),this.callNext(),this}}}).as(F)},{"./extended":12,"./nextTick":17}],12:[function(A,F,C){var T=A("array-extended"),x=T.unique,E=T.indexOf,w=T.map,r=Array.prototype.slice,s=Array.prototype.splice;function d(a){var b=a.match(/(\w+)\(\)$/);return b?(a=b[1],function(N){return N[a]()}):function(N){return N[a]}}F.exports=A("extended")().register(A("date-extended")).register(T).register(A("object-extended")).register(A("string-extended")).register(A("promise-extended")).register(A("function-extended")).register(A("is-extended")).register("intersection",function u(a,b){var g,R=-1;for(g=(a=r.call(a)).length;++R<g;)-1===E(b,a[R])&&(s.call(a,R--,1),g--);return a}).register("inPlaceIntersection",function o(a,b){var g,R=-1;for(g=a.length;++R<g;)-1===E(b,a[R])&&(s.call(a,R--,1),g--);return a}).register("inPlaceDifference",function p(a,b){var g,R=-1;for(g=a.length;++R<g;)-1!==E(b,a[R])&&(s.call(a,R--,1),g--);return a}).register("diffArr",function c(a,b){var g,O,U,N=[],R=-1,k=b.length,M=a.length;if(k>M){for(N=a.slice();++R<k;)for(O=b[R],g=-1,M=N.length;++g<M;)if(N[g]===O){N.splice(g,1);break}}else for(;++R<M;){for(O=a[R],g=-1,U=!1;++g<k;)if(b[g]===O){U=!0;break}U||N.push(O)}return N}).register("diffHash",function h(a,b){var N={};for(var R in a)hasOwnProperty.call(b,R)||(N[R]=a[R]);return N}).register("unionArr",function _(a,b){return x(a.concat(b))}).register("plucker",function f(a){if(1===(a=a.split(".")).length)return d(a[0]);var b=w(a,function(R){return d(R)}),N=b.length;return function(R){for(var g=-1,k=R;++g<N;)k=b[g](k);return k}}).register("HashTable",A("ht")).register("declare",A("declare.js")).register(A("leafy")).register("LinkedList",A("./linkedList"))},{"./linkedList":16,"array-extended":52,"date-extended":53,"declare.js":55,extended:56,"function-extended":59,ht:65,"is-extended":66,leafy:67,"object-extended":68,"promise-extended":69,"string-extended":70}],13:[function(A,F,C){"use strict";
1var T=A("./extended"),x=T.bind,E=T.declare,w=A("./nodes"),r=A("events").EventEmitter,d=A("./workingMemory").WorkingMemory,f=A("./executionStrategy"),u=A("./agenda");F.exports=E(r,{instance:{name:null,executionStrategy:null,constructor:function(o,p){this.env=null,this.name=o,this.__rules={},this.conflictResolutionStrategy=p,this.workingMemory=new d,this.agenda=new u(this,p),this.agenda.on("fire",x(this,"emit","fire")),this.agenda.on("focused",x(this,"emit","focused")),this.rootNode=new w.RootNode(this.workingMemory,this.agenda),T.bindAll(this,"halt","assert","retract","modify","focus","emit","getFacts","getFact")},getFacts:function(o){return o?this.workingMemory.getFactsByType(o):this.workingMemory.getFacts()},getFact:function(o){var p;return(p=o?this.workingMemory.getFactsByType(o):this.workingMemory.getFacts())&&p[0]},focus:function(o){return this.agenda.setFocus(o),this},halt:function(){return this.executionStrategy.halt(),this},dispose:function(){this.workingMemory.dispose(),this.agenda.dispose(),this.rootNode.dispose()},assert:function(o){return this.rootNode.assertFact(this.workingMemory.assertFact(o)),this.emit("assert",o),o},retract:function(o){return this.rootNode.retractFact(this.workingMemory.retractFact(o)),this.emit("retract",o),o},modify:function(o,p){return"function"==typeof p&&p.call(o,o),this.rootNode.modifyFact(this.workingMemory.modifyFact(o)),this.emit("modify",o),o},print:function(){this.rootNode.print()},containsRule:function(o){return this.rootNode.containsRule(o)},rule:function(o){this.rootNode.assertRule(o)},matchUntilHalt:function(o){return(this.executionStrategy=new f(this,!0)).execute().classic(o).promise()},match:function(o){return(this.executionStrategy=new f(this)).execute().classic(o).promise()}}})},{"./agenda":3,"./executionStrategy":11,"./extended":12,"./nodes":27,"./workingMemory":50,events:60}],14:[function(A,F,C){"use strict";var T=A("./extended"),x=T.instanceOf,E=T.forEach,w=T.declare,r=A("./pattern").InitialFact,s=A("./conflict"),d=s.strategy(["salience","activationRecency"]),f=A("./rule"),u=A("./flow"),o={},p=w({instance:{constructor:function(c,h){if(this.name=c,this.cb=h,this.__rules=[],this.__defined={},this.conflictResolutionStrategy=d,h&&h.call(this,this),o.hasOwnProperty(c))throw new Error("Flow with "+c+" already defined");o[c]=this},conflictResolution:function(c){return this.conflictResolutionStrategy=s.strategy(c),this},getDefined:function(c){var h=this.__defined[c.toLowerCase()];if(!h)throw new Error(c+" flow class is not defined");return h},addDefined:function(c,h){return this.__defined[c.toLowerCase()]=h,h},rule:function(){return this.__rules=this.__rules.concat(f.createRule.apply(f,arguments)),this},getSession:function(){var c=new u(this.name,this.conflictResolutionStrategy);E(this.__rules,function(a){c.rule(a)}),c.assert(new r);for(var h=0,_=arguments.length;h<_;h++)c.assert(arguments[h]);return c},containsRule:function(c){return T.some(this.__rules,function(h){return h.name===c})}},static:{getFlow:function(c){return o[c]},hasFlow:function(c){return T.has(o,c)},deleteFlow:function(c){return x(c,p)&&(c=c.name),delete o[c],p},deleteFlows:function(){for(var c in o)c in o&&delete o[c];return p},create:function(c,h){return new p(c,h)}}}).as(F)},{"./conflict":7,"./extended":12,"./flow":13,"./pattern":48,"./rule":49}],15:[function(A,F,C){"use strict";var T=A("./extended"),x=A("fs"),E=A("path"),w=A("./compile"),r=A("./flowContainer");function s(f){return/\.nools$/.test(f)}function d(f){return s(f)?w.parse(x.readFileSync(f,"utf8"),f):w.parse(f)}C.Flow=r,C.getFlow=r.getFlow,C.hasFlow=r.hasFlow,C.deleteFlow=function(f){return r.deleteFlow(f),this},C.deleteFlows=function(){return r.deleteFlows(),this},C.flow=r.create,C.compile=function(f,u,o){if(T.isFunction(u)?(o=u,u={}):u=u||{},T.isString(f)&&(u.name=u.name||(s(f)?E.basename(f,E.extname(f)):null),f=d(f)),!u.name)throw new Error("Name required when compiling nools source");return w.compile(f,u,o,r)},C.transpile=function(f,u){return u=u||{},T.isString(f)&&(u.name=u.name||(s(f)?E.basename(f,E.extname(f)):null),f=d(f)),w.transpile(f,u)},C.parse=d},{"./compile":5,"./extended":12,"./flowContainer":14,fs:61,path:62}],16:[function(A,F,C){A("declare.js")({instance:{constructor:function(){this.head=null,this.tail=null,this.length=null},push:function(x){var E=this.tail,w=this.head,r={data:x,prev:E,next:null};return E&&(this.tail.next=r),this.tail=r,w||(this.head=r),this.length++,r},remove:function(x){x.prev?x.prev.next=x.next:this.head=x.next,x.next?x.next.prev=x.prev:this.tail=x.prev,this.length--}
1,forEach:function(x){for(var E={next:this.head};E=E.next;)x(E.data)},toArray:function(){for(var x={next:this.head},E=[];x=x.next;)E.push(x);return E},removeByData:function(x){for(var E={next:this.head};E=E.next;)if(E.data===x){this.remove(E);break}},getByData:function(x){for(var E={next:this.head};E=E.next;)if(E.data===x)return E},clear:function(){this.head=this.tail=null,this.length=0}}}).as(F)},{"declare.js":55}],17:[function(A,F,C){var E,T=A("__browserify_process"),x=A("./extended");if("function"==typeof setImmediate)E=typeof window<"u"?x.bind(window,setImmediate):setImmediate;else if(typeof T<"u")E=T.nextTick;else if(typeof MessageChannel<"u"){var w=new MessageChannel,r={},s=r;w.port1.onmessage=function(){var d=(r=r.next).task;delete r.task,d()},E=function(d){s=s.next={task:d},w.port2.postMessage(0)}}else E=function(d){setTimeout(d,0)};F.exports=E},{"./extended":12,__browserify_process:64}],18:[function(A,F,C){var T=A("./node"),x=A("../extended").intersection;T.extend({instance:{__propagatePaths:function(E,w){for(var d,f,o,r=this.__entrySet,s=r.length;--s>-1;)f=(d=r[s]).key,(o=x(d.value,w.paths)).length&&f[E](w.clone(null,o,null))},__propagateNoPaths:function(E,w){for(var r=this.__entrySet,s=r.length;--s>-1;)r[s].key[E](w)},__propagate:function(E,w){w.paths?this.__propagatePaths(E,w):this.__propagateNoPaths(E,w)}}}).as(F)},{"../extended":12,"./node":37}],19:[function(A,F,C){A("./alphaNode").extend({instance:{constructor:function(){this._super(arguments),this.alias=this.constraint.get("alias")},toString:function(){return"AliasNode"+this.__count},assert:function(x){return this.__propagate("assert",x.set(this.alias,x.fact.object))},modify:function(x){return this.__propagate("modify",x.set(this.alias,x.fact.object))},retract:function(x){return this.__propagate("retract",x.set(this.alias,x.fact.object))},equal:function(x){return x instanceof this._static&&this.alias===x.alias}}}).as(F)},{"./alphaNode":20}],20:[function(A,F,C){"use strict";A("./node").extend({instance:{constructor:function(x){this._super([]),this.constraint=x,this.constraintAssert=this.constraint.assert},toString:function(){return"AlphaNode "+this.__count},equal:function(x){return this.constraint.equal(x.constraint)}}}).as(F)},{"./node":37}],21:[function(A,F,C){var x=A("../extended").hash.keys,E=A("./node"),w=A("./misc/leftMemory"),r=A("./misc/rightMemory");E.extend({instance:{nodeType:"BetaNode",constructor:function(){this._super([]),this.leftMemory={},this.rightMemory={},this.leftTuples=new w,this.rightTuples=new r},__propagate:function(s,d){for(var f=this.__entrySet,u=f.length;--u>-1;)f[u].key[s](d)},dispose:function(){this.leftMemory={},this.rightMemory={},this.leftTuples.clear(),this.rightTuples.clear()},disposeLeft:function(s){this.leftMemory={}
1,this.leftTuples.clear(),this.propagateDispose(s)},disposeRight:function(s){this.rightMemory={},this.rightTuples.clear(),this.propagateDispose(s)},hashCode:function(){return this.nodeType+" "+this.__count},toString:function(){return this.nodeType+" "+this.__count},retractLeft:function(s){for(var d=(s=this.removeFromLeftMemory(s).data).rightMatches,f=x(d),u=-1,o=f.length;++u<o;)this.__propagate("retract",d[f[u]].clone())},retractRight:function(s){for(var d=(s=this.removeFromRightMemory(s).data).leftMatches,f=x(d),u=-1,o=f.length;++u<o;)this.__propagate("retract",d[f[u]].clone())},assertLeft:function(s){this.__addToLeftMemory(s);for(var d=this.rightTuples.getRightMemory(s),f=-1,u=d.length;++f<u;)this.propagateFromLeft(s,d[f].data)},assertRight:function(s){this.__addToRightMemory(s);for(var d=this.leftTuples.getLeftMemory(s),f=-1,u=d.length;++f<u;)this.propagateFromRight(s,d[f].data)},modifyLeft:function(s){var d=this.removeFromLeftMemory(s).data;this.__addToLeftMemory(s);var p,f=this.rightTuples.getRightMemory(s),u=f.length,o=-1;if(u)for(p=d.rightMatches;++o<u;)this.propagateAssertModifyFromLeft(s,p,f[o].data);else this.propagateRetractModifyFromLeft(d)},modifyRight:function(s){var d=this.removeFromRightMemory(s).data;this.__addToRightMemory(s);var f=this.leftTuples.getLeftMemory(s);if(f.length)for(var u=d.leftMatches,o=-1,p=f.length;++o<p;)this.propagateAssertModifyFromRight(s,u,f[o].data);else this.propagateRetractModifyFromRight(d)},propagateFromLeft:function(s,d){this.__propagate("assert",this.__addToMemoryMatches(d,s,s.clone(null,null,s.match.merge(d.match))))},propagateFromRight:function(s,d){this.__propagate("assert",this.__addToMemoryMatches(s,d,d.clone(null,null,d.match.merge(s.match))))},propagateRetractModifyFromLeft:function(s){for(var d=s.rightMatches,f=x(d),u=f.length,o=-1;++o<u;)this.__propagate("retract",d[f[o]].clone())},propagateRetractModifyFromRight:function(s){for(var d=s.leftMatches,f=x(d),u=f.length,o=-1;++o<u;)this.__propagate("retract",d[f[o]].clone())},propagateAssertModifyFromLeft:function(s,d,f){f.hashCode in d?this.__propagate("modify",this.__addToMemoryMatches(f,s,s.clone(null,null,s.match.merge(f.match)))):this.propagateFromLeft(s,f)},propagateAssertModifyFromRight:function(s,d,f){f.hashCode in d?this.__propagate("modify",this.__addToMemoryMatches(s,f,s.clone(null,null,f.match.merge(s.match)))):this.propagateFromRight(s,f)},removeFromRightMemory:function(s){var d=s.hashCode;if(s=this.rightMemory[d]||null){var o=this.leftMemory,p=s.data.leftMatches;this.rightTuples.remove(s);for(var c=x(p),h=-1,_=c.length;++h<_;)delete o[c[h]].data.rightMatches[d];delete this.rightMemory[d]}return s},removeFromLeftMemory:function(s){var d=s.hashCode;if(s=this.leftMemory[d]||null){var f=this.rightMemory,u=s.data.rightMatches;this.leftTuples.remove(s);for(var o=x(u),p=-1,c=o.length;++p<c;)delete f[o[p]].data.leftMatches[d];delete this.leftMemory[d]}return s},getRightMemoryMatches:function(s){var d=this.leftMemory[s.hashCode],f={};return d&&(f=d.rightMatches),f},__addToMemoryMatches:function(s,d,f){var p,u=s.hashCode,o=this.rightMemory[u],c=d.hashCode;if(o){if(c in(o=o.data).leftMatches)throw new Error("Duplicate left fact entry");o.leftMatches[c]=f}if(p=this.leftMemory[c]){if(u in(p=p.data).rightMatches)throw new Error("Duplicate right fact entry");p.rightMatches[u]=f}return f},__addToRightMemory:function(s){var d=s.hashCode,f=this.rightMemory;return!(d in f)&&(f[d]=this.rightTuples.push(s),s.leftMatches={},!0)},__addToLeftMemory:function(s){var d=s.hashCode,f=this.leftMemory;return!(d in f)&&(f[d]=this.leftTuples.push(s),s.rightMatches={},!0)}}}).as(F)},{"../extended":12,"./misc/leftMemory":32,"./misc/rightMemory":34,"./node":37}],22:[function(A,F,C){A("./alphaNode").extend({instance:{constructor:function(){this.memory={},this._super(arguments),this.constraintAssert=this.constraint.assert},assert:function(x){(this.memory[x.pathsHash]=this.constraintAssert(x.factHash))&&this.__propagate("assert",x)},modify:function(x){var E=this.memory,w=x.pathsHash,r=E[w];(E[w]=this.constraintAssert(x.factHash))?this.__propagate(r?"modify":"assert",x):r&&this.__propagate("retract",x)},retract:function(x){var E=x.pathsHash,w=this.memory;w[E]&&this.__propagate("retract",x),delete w[E]},toString:function(){return"EqualityNode"+this.__count}}}).as(F)},{"./alphaNode":20}],23:[function(A,F,C){var T=A("./fromNotNode"),x=A("../extended"),E=A("../context"),w=x.isDefined,r=x.isArray;T.extend({instance:{nodeType:"ExistsFromNode",retractLeft:function(s){var d=this.removeFromLeftMemory(s);d&&(d=d.data).blocked&&this.__propagate("retract",d.clone())},__modify:function(s,d){var f=d.blocked,o=this.from(s.factHash);if(r(o)){for(var p=0,c=o.length;p<c;p++)if(this.__isMatch(s,o[p],!0)){s.blocked=!0;break}}else w(o)&&(s.blocked=this.__isMatch(s,o,!0));s.blocked?this.__propagate(f?"modify":"assert",s.clone()):f&&this.__propagate("retract",s.clone())},__findMatches:function(s){var f=this.from(s.factHash);if(r(f)){for(var o=0,p=f.length;o<p;o++)if(this.__isMatch(s,f[o],!0))return s.blocked=!0,void this.__propagate("assert",s.clone())}else w(f)&&this.__isMatch(s,f,!0)&&(s.blocked=!0,this.__propagate("assert",s.clone()));return!1},__isMatch:function(s,d,f){var u=!1;
1if(this.type(d)){var o=this.workingMemory.getFactHandle(d),p=new E(o,null,null).mergeMatch(s.match).set(this.alias,d);if(f){var c=this.fromMemory[o.id];c||(c=this.fromMemory[o.id]={}),c[s.hashCode]=s}for(var h=p.factHash,_=this.__equalityConstraints,a=0,b=_.length;a<b;a++){if(!_[a](h)){u=!1;break}u=!0}}return u},assertLeft:function(s){this.__addToLeftMemory(s),this.__findMatches(s)}}}).as(F)},{"../context":10,"../extended":12,"./fromNotNode":26}],24:[function(A,F,C){var T=A("./notNode"),x=A("../linkedList");T.extend({instance:{nodeType:"ExistsNode",blockedContext:function(E,w){E.blocker=w,this.removeFromLeftMemory(E),this.addToLeftBlockedMemory(w.blocking.push(E)),this.__propagate("assert",this.__cloneContext(E))},notBlockedContext:function(E,w){this.__addToLeftMemory(E),w&&this.__propagate("retract",this.__cloneContext(E))},propagateFromLeft:function(E){this.notBlockedContext(E,!1)},retractLeft:function(E){var w;if(!this.removeFromLeftMemory(E)){if(!(w=this.removeFromLeftBlockedMemory(E)))throw new Error;this.__propagate("retract",this.__cloneContext(w.data))}},modifyLeft:function(E){var r,o,p,c,w=this.removeFromLeftMemory(E),s=this.constraint,d=this.rightTuples,f=d.length,u=!1;if(w||(w=this.removeFromLeftBlockedMemory(E),u=!0),!w)throw new Error;if((r=w.data)&&r.blocker&&(c=this.rightMemory[r.blocker.hashCode]),c?(s.isMatch(E,p=c.data)&&(this.__propagate(u?"modify":"assert",this.__cloneContext(r)),E.blocker=p,this.addToLeftBlockedMemory(p.blocking.push(E)),E=null),E&&(o={next:c.next})):o={next:d.head},E&&f)for(o={next:d.head};o=o.next;)if(s.isMatch(E,p=o.data)){this.__propagate(u?"modify":"assert",this.__cloneContext(r)),this.addToLeftBlockedMemory(p.blocking.push(E)),E.blocker=p,E=null;break}E&&(this.__addToLeftMemory(E),u&&this.__propagate("retract",this.__cloneContext(E)))},modifyRight:function(E){var w=this.removeFromRightMemory(E);if(!w)throw new Error;var f,o,s=this.leftTuples,d=s.length,u=this.constraint,p=w.data.blocking;if(this.__addToRightMemory(E),E.blocking=new x,d||p.length){if(p.length)for(var c,h={next:p.head};h=h.next;)if((f=h.data).blocker=null,u.isMatch(f,E))f.blocker=E,this.addToLeftBlockedMemory(E.blocking.push(f)),this.__propagate("assert",this.__cloneContext(f)),f=null;else{for(f.blocker=null,o=w;o=o.next;)if(u.isMatch(f,c=o.data)){f.blocker=c,this.addToLeftBlockedMemory(c.blocking.push(f)),this.__propagate("assert",this.__cloneContext(f)),f=null;break}f&&this.__addToLeftMemory(f)}if(d)for(o={next:s.head};o=o.next;)u.isMatch(f=o.data,E)&&(this.__propagate("assert",this.__cloneContext(f)),this.removeFromLeftMemory(f),this.addToLeftBlockedMemory(E.blocking.push(f)),f.blocker=E)}}}}).as(F)},{"../linkedList":16,"./notNode":38}],25:[function(A,F,C){var T=A("./joinNode"),x=A("../extended"),E=A("../constraint"),w=E.EqualityConstraint,r=E.HashConstraint,s=E.ReferenceConstraint,d=A("../context"),f=x.isDefined,u=x.isEmpty,o=x.forEach,p=x.isArray,c={isMatch:function(){return!1}};T.extend({instance:{nodeType:"FromNode",constructor:function(h,_){this._super(arguments),this.workingMemory=_,this.fromMemory={},this.pattern=h,this.type=h.get("constraints")[0].assert,this.alias=h.get("alias"),this.from=h.from.assert;var a=this.__equalityConstraints=[],b=[];o(this.constraints=this.pattern.get("constraints").slice(1),function(N){N instanceof w||N instanceof s?a.push(N.assert):N instanceof r&&(b=b.concat(N.get("variables")))}),this.__variables=b},__createMatches:function(h){var a=this.from(h.factHash);if(p(a))for(var b=0,N=a.length;b<N;b++)this.__checkMatch(h,a[b],!0);else f(a)&&this.__checkMatch(h,a,!0)},__checkMatch:function(h,_,a){var b;return(b=this.__createMatch(h,_)).isMatch()&&a&&this.__propagate("assert",b.clone()),b},__createMatch:function(h,_){if(this.type(_)){var b,a=this.workingMemory.getFactHandle(_,!0),N=new d(a,null,null).set(this.alias,_),R=a.id,g=N.factHash,k=h.factHash;for(var M in k)g[M]=k[M];for(var O=this.__equalityConstraints,U=this.__variables,S=-1,D=O.length;++S<D;)if(!O[S](g,g)){b=c;break}var Z=this.fromMemory[R];if(Z||(Z=this.fromMemory[R]={}),!b){var V;for(S=-1,D=U.length;++S<D;)g[V=U[S]]=_[V];h.fromMatches[a.id]=b=N.clone(a,null,h.match.merge(N.match))}return Z[h.hashCode]=[h,b],b}return c},retractRight:function(){throw new Error("Shouldnt have gotten here")},removeFromFromMemory:function(h){var _=h.fact.id,a=this.fromMemory[_];if(a)for(var N in a)if(a[N][1]===h){delete a[N],u(a)&&delete this.fromMemory[_];break}},retractLeft:function(h){var _=this.removeFromLeftMemory(h);if(_){var a=(_=_.data).fromMatches;for(var b in a)this.removeFromFromMemory(a[b]),this.__propagate("retract",a[b].clone())}},modifyLeft:function(h){var a,b,N,R,g,_=this.removeFromLeftMemory(h);if(_){this.__addToLeftMemory(h);var k=_.data,M=h.fromMatches={},O=k.fromMatches,U=this.from(h.factHash);if(p(U))for(b=0,N=U.length;b<N;b++)(a=this.__checkMatch(h,U[b],!1)).isMatch()&&this.__propagate((R=a.fact.id)in O?"modify":"assert",a.clone());else f(U)&&(a=this.__checkMatch(h,U,!1)).isMatch()&&this.__propagate((R=a.fact.id)in O?"modify":"assert",a.clone());for(b in O)b in M||(this.removeFromFromMemory(O[b]),this.__propagate("retract",O[b].clone()))}else this.assertLeft(h);var S=this.fromMemory[R=(g=h.fact).id];if(this.fromMemory[R]={},S){var D,Z,V,J,$=g.object;for(b in S)D=(Z=S[b])[0],J=(V=Z[1]).isMatch(),D.hashCode!==h.hashCode&&(a=this.__createMatch(D,$,!1),J&&this.__propagate("retract",V.clone()),a.isMatch()&&this.__propagate(J?"modify":"assert",a.clone()))}},assertLeft:function(h){this.__addToLeftMemory(h),h.fromMatches={},this.__createMatches(h)},assertRight:function(){throw new Error("Shouldnt have gotten here")}}}).as(F)},{"../constraint":8,"../context":10,"../extended":12,"./joinNode":28}],26:[function(A,F,C){var T=A("./joinNode"),x=A("../extended"),E=A("../constraint"),w=E.EqualityConstraint,r=E.HashConstraint,
1s=E.ReferenceConstraint,d=A("../context"),f=x.isDefined,u=x.forEach,o=x.isArray;T.extend({instance:{nodeType:"FromNotNode",constructor:function(p,c){this._super(arguments),this.workingMemory=c,this.pattern=p,this.type=p.get("constraints")[0].assert,this.alias=p.get("alias"),this.from=p.from.assert,this.fromMemory={};var h=this.__equalityConstraints=[],_=[];u(this.constraints=this.pattern.get("constraints").slice(1),function(a){a instanceof w||a instanceof s?h.push(a.assert):a instanceof r&&(_=_.concat(a.get("variables")))}),this.__variables=_},retractLeft:function(p){var c=this.removeFromLeftMemory(p);c&&((c=c.data).blocked||this.__propagate("retract",c.clone()))},__modify:function(p,c){var h=c.blocked,a=this.from(p.factHash);if(o(a)){for(var b=0,N=a.length;b<N;b++)if(this.__isMatch(p,a[b],!0)){p.blocked=!0;break}}else f(a)&&(p.blocked=this.__isMatch(p,a,!0));p.blocked?h||this.__propagate("retract",c.clone()):this.__propagate(h?"assert":"modify",p.clone())},modifyLeft:function(p){var c=this.removeFromLeftMemory(p);if(!c)throw new Error;this.__addToLeftMemory(p),this.__modify(p,c.data);var h=this.fromMemory[p.fact.id];if(this.fromMemory[p.fact.id]={},h)for(var _ in h)if(_!==p.hashCode){var a=h[_];(c=this.removeFromLeftMemory(a))&&((a=a.clone()).blocked=!1,this.__addToLeftMemory(a),this.__modify(a,c.data))}},__findMatches:function(p){var h=this.from(p.factHash);if(o(h)){for(var a=0,b=h.length;a<b;a++)if(this.__isMatch(p,h[a],!0))return void(p.blocked=!0);this.__propagate("assert",p.clone())}
1else f(h)&&!(p.blocked=this.__isMatch(p,h,!0))&&this.__propagate("assert",p.clone());return!1},__isMatch:function(p,c,h){var _=!1;if(this.type(c)){var a=this.workingMemory.getFactHandle(c),b=new d(a,null).mergeMatch(p.match).set(this.alias,c);if(h){var N=this.fromMemory[a.id];N||(N=this.fromMemory[a.id]={}),N[p.hashCode]=p}for(var R=b.factHash,g=this.__equalityConstraints,k=0,M=g.length;k<M;k++){if(!g[k](R,R)){_=!1;break}_=!0}}return _},assertLeft:function(p){this.__addToLeftMemory(p),this.__findMatches(p)},assertRight:function(){throw new Error("Shouldnt have gotten here")},retractRight:function(){throw new Error("Shouldnt have gotten here")}}}).as(F)},{"../constraint":8,"../context":10,"../extended":12,"./joinNode":28}],27:[function(A,F,C){"use strict";var T=A("../extended"),x=T.forEach,E=T.some,w=T.declare,r=A("../pattern.js"),s=r.ObjectPattern,d=r.FromPattern,f=r.FromNotPattern,u=r.ExistsPattern,o=r.FromExistsPattern,p=r.NotPattern,c=r.CompositePattern,h=r.InitialFactPattern,_=A("../constraint"),a=_.HashConstraint,b=_.ReferenceConstraint,N=A("./aliasNode"),R=A("./equalityNode"),g=A("./joinNode"),k=A("./betaNode"),M=A("./notNode"),O=A("./fromNode"),U=A("./fromNotNode"),S=A("./existsNode"),D=A("./existsFromNode"),Z=A("./leftAdapterNode"),V=A("./rightAdapterNode"),J=A("./typeNode"),$=A("./terminalNode"),I=A("./propertyNode");function B(e){return E(e.constraints||[],function(t){return t instanceof b})}w({instance:{constructor:function(e,t){this.terminalNodes=[],this.joinNodes=[],this.nodes=[],this.constraints=[],this.typeNodes=[],this.__ruleCount=0,this.bucket={counter:0,recency:0},this.agendaTree=t,this.workingMemory=e},assertRule:function(e){var t=new $(this.bucket,this.__ruleCount++,e,this.agendaTree);this.__addToNetwork(e,e.pattern,t),this.__mergeJoinNodes(),this.terminalNodes.push(t)},resetCounter:function(){this.bucket.counter=0},incrementCounter:function(){this.bucket.counter++},assertFact:function(e){for(var t=this.typeNodes,n=t.length-1;n>=0;n--)t[n].assert(e)},retractFact:function(e){for(var t=this.typeNodes,n=t.length-1;n>=0;n--)t[n].retract(e)},modifyFact:function(e){for(var t=this.typeNodes,n=t.length-1;n>=0;n--)t[n].modify(e)},containsRule:function(e){return E(this.terminalNodes,function(t){return t.rule.name===e})},dispose:function(){for(var e=this.typeNodes,t=e.length-1;t>=0;t--)e[t].dispose()},__mergeJoinNodes:function(){for(var e=this.joinNodes,t=0;t<e.length;t++){var n=e[t],v=e[t+1];n&&v&&n.constraint&&v.constraint&&n.constraint.equal(v.constraint)&&(n.merge(v),e.splice(t+1,1))}},__checkEqual:function(e){for(var t=this.constraints,n=t.length-1;n>=0;n--){var v=t[n];if(e.equal(v))return v}return t.push(e),e},__createTypeNode:function(e,t){for(var n=new J(t.get("constraints")[0]),v=this.typeNodes,y=v.length-1;y>=0;y--){var L=v[y];if(n.equal(L))return L}return v.push(n),n},__createEqualityNode:function(e,t){return this.__checkEqual(new R(t)).addRule(e)},__createPropertyNode:function(e,t){return this.__checkEqual(new I(t)).addRule(e)},__createAliasNode:function(e,t){return this.__checkEqual(new N(t)).addRule(e)},__createAdapterNode:function(e,t){return("left"===t?new Z:new V).addRule(e)},__createJoinNode:function(e,t,n,v){var y;t.rightPattern instanceof p?y=new M:t.rightPattern instanceof o?y=new D(t.rightPattern,this.workingMemory):t.rightPattern instanceof u?y=new S:t.rightPattern instanceof f?y=new U(t.rightPattern,this.workingMemory):t.rightPattern instanceof d?y=new O(t.rightPattern,this.workingMemory):t instanceof c&&!B(t.leftPattern)&&!B(t.rightPattern)?(y=new k,this.joinNodes.push(y)):(y=new g,this.joinNodes.push(y)),y.__rule__=e;var L=y;if(n instanceof k){var H=this.__createAdapterNode(e,v);L.addOutNode(H,t),L=H}return L.addOutNode(n,t),y.addRule(e)},__addToNetwork:function(e,t,n,v){t instanceof s?t instanceof h||v&&"left"!==v?this.__createAlphaNode(e,t,n,v):this.__createBetaNode(e,new c(new h,t),n,v):t instanceof c&&this.__createBetaNode(e,t,n,v)},__createBetaNode:function(e,t,n,v){var y=this.__createJoinNode(e,t,n,v);return this.__addToNetwork(e,t.rightPattern,y,"right"),this.__addToNetwork(e,t.leftPattern,y,"left"),n.addParentNode(y),y},__createAlphaNode:function(e,t,n,v){var y,L;if(!(t instanceof d)){var H=t.get("constraints");y=this.__createTypeNode(e,t);var Q=this.__createAliasNode(e,t);y.addOutNode(Q,t),Q.addParentNode(y),L=Q;for(var fe=H.length-1;fe>0;fe--){var re,z=H[fe];if(z instanceof a)re=this.__createPropertyNode(e,z);else{if(z instanceof b){n.constraint.addConstraint(z);continue}re=this.__createEqualityNode(e,z)}L.addOutNode(re,t),re.addParentNode(L),L=re}if(n instanceof k){var ee=this.__createAdapterNode(e,v);ee.addParentNode(L),L.addOutNode(ee,t),L=ee}return n.addParentNode(L),L.addOutNode(n,t),y}},print:function(){x(this.terminalNodes,function(e){e.print("    ")})}}}).as(C,"RootNode")},{"../constraint":8,"../extended":12,"../pattern.js":48,"./aliasNode":19,"./betaNode":21,"./equalityNode":22,"./existsFromNode":23,"./existsNode":24,"./fromNode":25,"./fromNotNode":26,"./joinNode":28,"./leftAdapterNode":30,"./notNode":38,"./propertyNode":39,"./rightAdapterNode":40,"./terminalNode":41,"./typeNode":42}],28:[function(A,F,C){var T=A("./betaNode"),x=A("./joinReferenceNode");T.extend({instance:{constructor:function(){this._super(arguments),this.constraint=new x(this.leftTuples,this.rightTuples)},nodeType:"JoinNode",propagateFromLeft:function(E,w){var r;return(r=this.constraint.match(E,w)).isMatch&&this.__propagate("assert",this.__addToMemoryMatches(w,E,E.clone(null,null,r))),this},propagateFromRight:function(E,w){var r;return(r=this.constraint.match(w,E)).isMatch&&this.__propagate("assert",this.__addToMemoryMatches(E,w,E.clone(null,null,r))),this},propagateAssertModifyFromLeft:function(E,w,r){var d,s=r.hashCode;s in w?(d=this.constraint.match(E,r)).isMatch?this.__propagate("modify",this.__addToMemoryMatches(r,E,E.clone(null,null,d))):this.__propagate("retract",w[s].clone()):this.prop
1agateFromLeft(E,r)},propagateAssertModifyFromRight:function(E,w,r){var d,s=r.hashCode;s in w?(d=this.constraint.match(r,E)).isMatch?this.__propagate("modify",this.__addToMemoryMatches(E,r,E.clone(null,null,d))):this.__propagate("retract",w[s].clone()):this.propagateFromRight(E,r)}}}).as(F)},{"./betaNode":21,"./joinReferenceNode":29}],29:[function(A,F,C){var T=A("./node"),E=A("../constraint").ReferenceEqualityConstraint,w={isDefault:!0,assert:function(){return!0},equal:function(){return!1}},r={gt:"lte",gte:"lte",lt:"gte",lte:"gte",eq:"eq",neq:"neq"};T.extend({instance:{constraint:w,constructor:function(f,u){this._super(arguments),this.constraint=w,this.constraintAssert=w.assert,this.rightIndexes=[],this.leftIndexes=[],this.constraintLength=0,this.leftMemory=f,this.rightMemory=u},addConstraint:function(f){if(f instanceof E){var u=f.getIndexableProperties(),o=f.get("alias");if(2===u.length&&o){for(var p,c,h=-1,_=[];++h<2;){var a=u[h];null===a.match(new RegExp("^"+o+"(\\.?)"))?(_.push(a),p=a):(_.push(a),c=a)}if(p&&c){var b=function d(f,u,o){return f===u[1]&&(o=r[o]),o}(p,_,f.op),N=function s(f,u,o){return f===u[1]&&(o=r[o]),o}(c,_,f.op);this.rightMemory.addIndex(c,p,N),this.leftMemory.addIndex(p,c,b)}}}this.constraint.isDefault?(this.constraint=f,this.isDefault=!1):this.constraint=this.constraint.merge(f),this.constraintAssert=this.constraint.assert},equal:function(f){return this.constraint.equal(f.constraint)},isMatch:function(f,u){return this.constraintAssert(f.factHash,u.factHash)},match:function(f,u){var o={isMatch:!1};return this.constraintAssert(f.factHash,u.factHash)&&(o=f.match.merge(u.match)),o}}}).as(F)},{"../constraint":8,"./node":37}],30:[function(A,F,C){A("./adapterNode").extend({instance:{propagateAssert:function(x){this.__propagate("assertLeft",x)},propagateRetract:function(x){this.__propagate("retractLeft",x)},propagateResolve:function(x){this.__propagate("retractResolve",x)},propagateModify:function(x){this.__propagate("modifyLeft",x)},retractResolve:function(x){this.__propagate("retractResolve",x)},dispose:function(x){this.propagateDispose(x)},toString:function(){return"LeftAdapterNode "+this.__count}}}).as(F)},{"./adapterNode":18}],31:[function(A,F,C){C.getMemory=function(){var T=Array.prototype.push,x=0,E=[],w={},r={},s=0;function p(_,a,b){var N;return"gt"===_?N=a.findGT(b):"gte"===_?N=a.findGTE(b):"lt"===_?N=a.findLT(b):"lte"===_&&(N=a.findLTE(b)),N}function c(_,a){if(a)for(var N,b=-1;++b<a;)w[N=_[b].hashCode]||(w[N]=!0,x++)}function h(_,a){if(a)for(var N,b=-1;++b<a;)r[N=_[b].hashCode]||(r[N]=!0,s++)}return function(a,b,N){for(var S,D,Z,V,J,$,I,R=-1,g=N.length,k=a.tuples,M=k.length,O=!1,U=a.tables;++R<g&&M;)D=(S=N[R])[3](b),J=U[S[0]],"eq"===(Z=S[4])||"seq"===Z?(V=J.get(D))?(M=(k=(a=V).tuples).length,U=V.tables):M=(k=E).length:"neq"===Z||"sneq"===Z?(V=J.get(D))&&(I=($=V.tuples).length,c($,I)):O?(I=($=p(Z,J,D)).length)?h($,I):(k=$,M=I):(M=(k=p(Z,J,D)).length,O=!0);return function o(_,a){var b=E;return a&&(x||s?(b=[],x?s?function u(_,a,b){if(s===b)c(_,a);else if(x<b)for(var N,k,R=0,g=-1;++g<b;)!w[k=(N=a[g]).hashCode]&&r[k]&&(_[R++]=N);x=0,w={},s=0,r={}}(b,_,a):function f(_,a,b){var N,R=0,g=-1;if(x<b)for(;++g<b;)x?w[(N=a[g]).hashCode]?x--:_[R++]=N:_[R++]=a[g];x=0,w={}}(b,_,a):function d(_,a,b){var N,R=0,g=-1;if(s<b)for(;s&&++g<b;)r[(N=a[g]).hashCode]&&(_[R++]=N,s--);else T.apply(_,a);s=0,r={}}(b,_,a)):b=_),b}(k,M)}}()},{}],32:[function(A,F,C){A("./memory").extend({instance:{getLeftMemory:function(x){return this.getMemory(x)}}}).as(F)},{"./memory":33}],33:[function(A,F,C){var T=A("../../extended"),x=T.plucker,E=T.declare,w=A("./helpers").getMemory,r=A("./table"),s=A("./tupleEntry"),d=0;E({instance:{length:0,constructor:function(){this.head=null,this.tail=null,this.indexes=[],this.tables=new s(null,new r,!1)},push:function(f){var u=this.tail,o=this.head,p={data:f,tuples:[],hashCode:d++,prev:u,next:null};return u&&(this.tail.next=p),this.tail=p,o||(this.head=p),this.length++,this.__index(p),this.tables.addNode(p),p},remove:function(f){f.prev?f.prev.next=f.next:this.head=f.next,f.next?f.next.prev=f.prev:this.tail=f.prev,this.tables.removeNode(f),this.__removeFromIndex(f),this.length--}
1,forEach:function(f){for(var u={next:this.head};u=u.next;)f(u.data)},toArray:function(){return this.tables.tuples.slice()},clear:function(){this.head=this.tail=null,this.length=0,this.clearIndexes()},clearIndexes:function(){this.tables={},this.indexes.length=0},__index:function(f){for(var a,b,N,R,g,k,M,o=f.data.factHash,p=this.indexes,c=this.tables,h=-1,_=p.length;++h<_;)N=(b=p[h])[2](o),(a=(k=(g=c.tables)[R=b[0]]||(g[R]=new r)).get(N))||(a=new s(N,k,!0),k.set(N,a)),k!==M&&f.tuples.push(a.addNode(f)),M=k,"eq"===b[4]&&(c=a)},__removeFromIndex:function(f){for(var u=f.tuples,o=u.length;--o>=0;)u[o].removeNode(f);f.tuples.length=0},getMemory:function(f){return this.length?w(this.tables,f.factHash,this.indexes):[]},__createIndexTree:function(){(this.tables.tables={})[this.indexes[0][0]]=new r},addIndex:function(f,u,o){this.indexes.push([f,u,x(f),x(u),o||"eq"]),this.indexes.sort(function(p,c){var h=p[4],_=c[4];return h===_?0:h>_?1:h===_?0:-1}),this.__createIndexTree()}}}).as(F)},{"../../extended":12,"./helpers":31,"./table":35,"./tupleEntry":36}],34:[function(A,F,C){A("./memory").extend({instance:{getRightMemory:function(x){return this.getMemory(x)}}}).as(F)},{"./memory":33}],35:[function(A,F,C){var T=A("../../extended"),x=Array.prototype.push,E=T.HashTable;function r(_,a){return(_=_.key)==(a=a.key)?0:_>a?1:_<a?-1:1}function s(_,a){return 1===r(_,a)}function d(_,a){return-1!==r(_,a)}function f(_,a){return-1===r(_,a)}function u(_,a){return 1!==r(_,a)}var o=[],p={key:null};function c(_,a,b){p.key=a;for(var k,N=[],R=0,g=_.__root;;)if(g)g=(o[R++]=g).left;else{if(!(R>0))break;if(!b(k=(g=o[--R]).data,p))break;x.apply(N,k.value.tuples),g=g.right}return o.length=0,N}function h(_,a,b){p.key=a;for(var k,N=[],R=0,g=_.__root;;)if(g)g=(o[R++]=g).right;else{if(!(R>0))break;if(!b(k=(g=o[--R]).data,p))break;x.apply(N,k.value.tuples),g=g.left}return o.length=0,N}T.AVLTree.extend({instance:{constructor:function(){this._super([{compare:r}]),this.gtCache=new E,this.gteCache=new E,this.ltCache=new E,this.lteCache=new E,this.hasGTCache=!1,this.hasGTECache=!1,this.hasLTCache=!1,this.hasLTECache=!1},clearCache:function(){this.hasGTCache&&this.gtCache.clear()&&(this.hasGTCache=!1),this.hasGTECache&&this.gteCache.clear()&&(this.hasGTECache=!1),this.hasLTCache&&this.ltCache.clear()&&(this.hasLTCache=!1),this.hasLTECache&&this.lteCache.clear()&&(this.hasLTECache=!1)},contains:function(_){return this._super([{key:_}])},set:function(_,a){this.insert({key:_,value:a}),this.clearCache()},get:function(_){var a=this.find({key:_});return a&&a.value},remove:function(_){return this.clearCache(),this._super([{key:_}])},findGT:function(_){var a=this.gtCache.get(_);return a||(this.hasGTCache=!0,this.gtCache.put(_,a=h(this,_,s))),a},findGTE:function(_){var a=this.gteCache.get(_);return a||(this.hasGTECache=!0,this.gteCache.put(_,a=h(this,_,d))),a},findLT:function(_){var a=this.ltCache.get(_);return a||(this.hasLTCache=!0,this.ltCache.put(_,a=c(this,_,f))),a},findLTE:function(_){var a=this.lteCache.get(_);return a||(this.hasLTECache=!0,this.lteCache.put(_,a=c(this,_,u))),a}}}).as(F)},{"../../extended":12}],36:[function(A,F,C){var T=A("../../extended"),x=T.indexOf,E=0;T.declare({instance:{tuples:null,tupleMap:null,hashCode:null,tables:null,entry:null,constructor:function(w,r,s){this.val=w,this.canRemove=s,this.tuples=[],this.tupleMap={},this.hashCode=E++,this.tables={},this.length=0,this.entry=r},addNode:function(w){return this.tuples[this.length++]=w,this.length>1&&this.entry.clearCache(),this},removeNode:function(w){var r=this.tuples,s=x(r,w);-1!==s&&(r.splice(s,1),this.length--,this.entry.clearCache()),this.canRemove&&!this.length&&this.entry.remove(this.val)}}}).as(F)},{"../../extended":12}],37:[function(A,F,C){var T=A("../extended"),x=T.forEach,E=T.indexOf,w=T.intersection,r=T.declare,s=T.HashTable,d=A("../context"),f=0;r({instance:{constructor:function(){this.nodes=new s,this.rules=[],this.parentNodes=[],this.__count=f++,this.__entrySet=[]},addRule:function(u){return-1===E(this.rules,u)&&this.rules.push(u),this},merge:function(u){u.nodes.forEach(function(_){for(var a=_.value,b=_.key,N=0,R=a.length;N<R;N++)this.addOutNode(b,a[N]);u.nodes.remove(b)},this);for(var o=u.parentNodes,p=0,c=u.parentNodes.l;p<c;p++){var h=o[p];this.addParentNode(h),h.nodes.remove(u)}return this},resolve:function(u,o){return u.hashCode===o.hashCode},print:function(u){console.log(u+this.toString()),x(this.parentNodes,function(o){o.print("    "+u)})},addOutNode:function(u,o){this.nodes.contains(u)||this.nodes.put(u,[]),this.nodes.get(u).push(o),this.__entrySet=this.nodes.entrySet()},addParentNode:function(u){-1===E(this.parentNodes,u)&&this.parentNodes.push(u)},shareable:function(){return!1},__propagate:function(u,o){for(var h,_,b,p=this.__entrySet,c=p.length;--c>-1;)_=(h=p[c]).key,(b=w(h.value,o.paths)).length&&_[u](new d(o.fact,b,o.match))}
1,dispose:function(u){this.propagateDispose(u)},retract:function(u){this.propagateRetract(u)},propagateDispose:function(u,o){o=o||this.nodes;for(var p=this.__entrySet,c=p.length-1;c>=0;c--)p[c].key.dispose(u)},propagateAssert:function(u){this.__propagate("assert",u)},propagateRetract:function(u){this.__propagate("retract",u)},assert:function(u){this.propagateAssert(u)},modify:function(u){this.propagateModify(u)},propagateModify:function(u){this.__propagate("modify",u)}}}).as(F)},{"../context":10,"../extended":12}],38:[function(A,F,C){var T=A("./joinNode"),x=A("../linkedList"),E=A("../context"),w=A("../pattern").InitialFact;T.extend({instance:{nodeType:"NotNode",constructor:function(){this._super(arguments),this.leftTupleMemory={},this.notMatch=new E(new w).match},__cloneContext:function(r){return r.clone(null,null,r.match.merge(this.notMatch))},retractRight:function(r){var f=this.removeFromRightMemory(r).data.blocking;if(f.length){for(var u,c,o=this.constraint,p={next:f.head};p=p.next;){this.removeFromLeftBlockedMemory(u=p.data);var a,h=this.rightTuples.getRightMemory(u),_=h.length;for(a=-1;++a<_;)if(o.isMatch(u,c=h[a].data)){this.blockedContext(u,c),u=null;break}u&&this.notBlockedContext(u,!0)}f.clear()}},blockedContext:function(r,s,d){r.blocker=s,this.removeFromLeftMemory(r),this.addToLeftBlockedMemory(s.blocking.push(r)),d&&this.__propagate("retract",this.__cloneContext(r))},notBlockedContext:function(r,s){this.__addToLeftMemory(r),s&&this.__propagate("assert",this.__cloneContext(r))},propagateFromLeft:function(r){this.notBlockedContext(r,!0)},propagateFromRight:function(r){this.notBlockedContext(r,!0)},blockFromAssertRight:function(r,s){this.blockedContext(r,s,!0)},blockFromAssertLeft:function(r,s){this.blockedContext(r,s,!1)},retractLeft:function(r){var s=this.removeFromLeftMemory(r);if(s)this.__propagate("retract",this.__cloneContext(s=s.data));else if(!this.removeFromLeftBlockedMemory(r))throw new Error},assertLeft:function(r){for(var f,s=this.rightTuples.getRightMemory(r),d=this.constraint,u=-1,o=s.length;++u<o;)d.isMatch(r,f=s[u].data)&&(this.blockFromAssertLeft(r,f),r=null,u=o);r&&this.propagateFromLeft(r)},assertRight:function(r){this.__addToRightMemory(r),r.blocking=new x;for(var u,s=this.leftTuples.getLeftMemory(r).slice(),d=-1,f=s.length,o=this.constraint;++d<f;)o.isMatch(u=s[d].data,r)&&this.blockFromAssertRight(u,r)},addToLeftBlockedMemory:function(r){var d=r.data.hashCode,f=this.leftMemory[d];return this.leftTupleMemory[d]=r,f&&this.leftTuples.remove(f),this},removeFromLeftBlockedMemory:function(r){var s=this.leftTupleMemory[r.hashCode]||null;return s&&(delete this.leftTupleMemory[r.hashCode],s.data.blocker.blocking.remove(s)),s},modifyLeft:function(r){var d,c,h,_,s=this.removeFromLeftMemory(r),f=this.constraint,u=this.rightTuples.getRightMemory(r),o=u.length,p=!1;if(s||(s=this.removeFromLeftBlockedMemory(r),p=!0),!s)throw new Error;if((d=s.data)&&d.blocker&&(_=this.rightMemory[d.blocker.hashCode],d.blocker=null),_&&f.isMatch(r,h=_.data)&&(p||this.__propagate("retract",this.__cloneContext(d)),r.blocker=h,this.addToLeftBlockedMemory(h.blocking.push(r)),r=null),r&&o)for(c=-1;++c<o;)if(f.isMatch(r,h=u[c].data)){p||this.__propagate("retract",this.__cloneContext(d)),this.addToLeftBlockedMemory(h.blocking.push(r)),r.blocker=h,r=null;break}r&&(this.__addToLeftMemory(r),this.__propagate(p?"assert":"modify",this.__cloneContext(r)))},modifyRight:function(r){var s=this.removeFromRightMemory(r);if(!s)throw new Error;var o,c,h,d=s.data,f=this.leftTuples.getLeftMemory(r).slice(),u=f.length,p=this.constraint,_=d.blocking;this.__addToRightMemory(r),r.blocking=new x;for(var a,b={next:_.head};b=b.next;)if((o=b.data).blocker=null,p.isMatch(o,r))o.blocker=r,this.addToLeftBlockedMemory(r.blocking.push(o)),o=null;else{for(o.blocker=null,h=s;h=h.next;)if(p.isMatch(o,a=h.data)){o.blocker=a,this.addToLeftBlockedMemory(a.blocking.push(o)),o=null;break}o&&(this.__addToLeftMemory(o),this.__propagate("assert",this.__cloneContext(o)))}if(u)for(c=-1;++c<u;)p.isMatch(o=f[c].data,r)&&(this.__propagate("retract",this.__cloneContext(o)),this.removeFromLeftMemory(o),this.addToLeftBlockedMemory(r.blocking.push(o)),o.blocker=r)}}}).as(F)},{"../context":10,"../linkedList":16,"../pattern":48,"./joinNode":28}],39:[function(A,F,C){var T=A("./alphaNode"),x=A("../context"),E=A("../extended");T.extend({instance:{constructor:function(){this._super(arguments),this.alias=this.constraint.get("alias"),this.varLength=(this.variables=E(this.constraint.get("variables")).toArray().value(
1)).length},assert:function(w){var f,r=new x(w.fact,w.paths),s=this.variables,d=w.fact.object;r.set(this.alias,d);for(var u=0,o=this.varLength;u<o;u++)r.set((f=s[u])[1],d[f[0]]);this.__propagate("assert",r)},retract:function(w){this.__propagate("retract",new x(w.fact,w.paths))},modify:function(w){var f,r=new x(w.fact,w.paths),s=this.variables,d=w.fact.object;r.set(this.alias,d);for(var u=0,o=this.varLength;u<o;u++)r.set((f=s[u])[1],d[f[0]]);this.__propagate("modify",r)},toString:function(){return"PropertyNode"+this.__count}}}).as(F)},{"../context":10,"../extended":12,"./alphaNode":20}],40:[function(A,F,C){A("./adapterNode").extend({instance:{retractResolve:function(x){this.__propagate("retractResolve",x)},dispose:function(x){this.propagateDispose(x)},propagateAssert:function(x){this.__propagate("assertRight",x)},propagateRetract:function(x){this.__propagate("retractRight",x)},propagateResolve:function(x){this.__propagate("retractResolve",x)},propagateModify:function(x){this.__propagate("modifyRight",x)},toString:function(){return"RightAdapterNode "+this.__count}}}).as(F)},{"./adapterNode":18}],41:[function(A,F,C){var T=A("./node"),E=A("../extended").bind;T.extend({instance:{constructor:function(w,r,s,d){this._super([]),this.resolve=E(this,this.resolve),this.rule=s,this.index=r,this.name=this.rule.name,this.agenda=d,this.bucket=w,d.register(this)},__assertModify:function(w){var r=w.match;if(r.isMatch){var s=this.rule,d=this.bucket;this.agenda.insert(this,{rule:s,hashCode:w.hashCode,index:this.index,name:s.name,recency:d.recency++,match:r,counter:d.counter})}},assert:function(w){this.__assertModify(w)},modify:function(w){this.agenda.retract(this,w),this.__assertModify(w)},retract:function(w){this.agenda.retract(this,w)},retractRight:function(w){this.agenda.retract(this,w)},retractLeft:function(w){this.agenda.retract(this,w)},assertLeft:function(w){this.__assertModify(w)},assertRight:function(w){this.__assertModify(w)},toString:function(){return"TerminalNode "+this.rule.name}}}).as(F)},{"../extended":12,"./node":37}],42:[function(A,F,C){var T=A("./alphaNode"),x=A("../context");T.extend({instance:{assert:function(E){this.constraintAssert(E.object)&&this.__propagate("assert",E)},modify:function(E){this.constraintAssert(E.object)&&this.__propagate("modify",E)},retract:function(E){this.constraintAssert(E.object)&&this.__propagate("retract",E)},toString:function(){return"TypeNode"+this.__count},dispose:function(){for(var E=this.__entrySet,w=E.length-1;w>=0;w--){var r=E[w];r.key.dispose({paths:r.value})}},__propagate:function(E,w){for(var r=this.__entrySet,s=-1,d=r.length;++s<d;){var f=r[s];f.key[E](new x(w,f.value))}}}}).as(F)},{"../context":10,"./alphaNode":20}],43:[function(A,F,C){var T=A("__browserify_process"),x=function(){var E=function(ee,K,te,ue){for(te=te||{},ue=ee.length;ue--;te[ee[ue]]=K);return te},w=[1,29],r=[1,30],s=[1,26],d=[1,24],f=[1,16],u=[1,18],o=[1,19],p=[1,20],c=[1,21],h=[1,22],_=[5,38,49],a=[1,33],b=[5,36,38,49],N=[5,8,11,12,13,15,17,19,20,21,22,24,25,26,27,28,29,36,38,49],R=[2,2],g=[5,24,25,26,27,28,29,36,38,49],k=[1,42],M=[1,43],O=[1,44],U=[1,45],S=[5,8,11,12,13,15,17,19,20,21,22,24,25,26,27,28,29,31,33,36,38,40,46,49],D=[1,46],Z=[1,47],V=[1,48],J=[5,19,20,21,22,24,25,26,27,28,29,36,38,49],$=[1,50],I=[5,8,11,12,13,15,17,19,20,21,22,24,25,26,27,28,29,31,33,36,38,40,43,44,46,48,49],B=[5,17,19,20,21,22,24,25,26,27,28,29,36,38,49],e=[1,55],t=[1,54],n=[5,8,15,17,19,20,21,22,24,25,26,27,28,29,36,38,49],v=[1,56],y=[1,57],L=[1,58],H=[1,87],Q=[40,46,49],fe={trace:function(){},yy:{},symbols_:{error:2,expressions:3,EXPRESSION:4,EOF:5,UNARY_EXPRESSION:6,LITERAL_EXPRESSION:7,"-":8,"!":9,MULTIPLICATIVE_EXPRESSION:10,"*":11,"/":12,"%":13,ADDITIVE_EXPRESSION:14,"+":15,EXPONENT_EXPRESSION:16,"^":17,RELATIONAL_EXPRESSION:18,"<":19,">":20,"<=":21,">=":22,EQUALITY_EXPRESSION:23,"==":24,"===":25,"!=":26,"!==":27,"=~":28,"!=~":29,IN_EXPRESSION:30,in:31,ARRAY_EXPRESSION:32,notIn:33,OBJECT_EXPRESSION:34,AND_EXPRESSION:35,"&&":36,OR_EXPRESSION:37,"||":38,ARGUMENT_LIST:39,",":40,IDENTIFIER_EXPRESSION:41,IDENTIFIER:42,".":43,"[":44,STRING_EXPRESSION:45,"]":46,NUMBER_EXPRESSION:47,"(":48,")":49,STRING:50,NUMBER:51,REGEXP_EXPRESSION:52,REGEXP:53,BOOLEAN_EXPRESSION:54,BOOLEAN:55,NULL_EXPRESSION:56,NULL:57,$accept:0,$end:1},terminals_:{2:"error",5:"EOF",8:"-",9:"!",11:"*",12:"/",13:"%",15:"+",17:"^",19:"<",20:">",21:"<=",22:">=",24:"==",25:"===",26:"!=",27:"!==",28:"=~",29:"!=~",31:"in",33:"notIn",36:"&&",38:"||",40:",",42:"IDENTIFIER",43:".",44:"[",46:"]",48:"(",49:")",50:"STRING",51:"NUMBER",53:"REGEXP",55:"BOOLEAN",57:"NULL"},productions_:[0,[3,2],[6,1],[6,2],[6,2],[10,1],[10,3],[10,3],[10,3],[14,1],[14,3],[14,3],[16,1],[16,3],[18,1],[18,3],[18,3],[18,3],[18,3],[23,1],[23,3],[23,3],[23,3],[23,3],[23,3],[23,3],[30,1],[30,3],[30,3],[30,3],[30,3],[35,1],[35,3],[37,1],[37,3],[39,1],[39,3],[41,1],[34,1],[34,3],[34,4],[34,4],[34,4],[34,3],[34,4],[45,1],[47,1],[52,1],[54,1],[56,1],[32,2],[32,3],[7,1],[7,1],[7,1],[7,1],[7,1],[7,1],[7,1],[7,3],[4,1]],performAction:function(K,te,ue,ie,se,W,le){var ae=W.length-1;switch(se){case 1:return W[ae-1];case 3:this.$=[W[ae],null,"unary"];break;case 4:this.$=[W[ae],null,"logicalNot"];break;case 6:this.$=[W[ae-2],W[ae],"mult"];break;case 7:this.$=[W[ae-2],W[ae],"div"];break;case 8:this.$=[W[ae-2],W[ae],"mod"];break;case 10:this.$=[W[ae-2],W[ae],"plus"];break;case 11:this.$=[W[ae-2],W[ae],"minus"];break;case 13:this.$=[W[ae-2],W[ae],"pow"];break;case 15:this.$=[W[ae-2],W[ae],"lt"];break;case 16:this.$=[W[ae-2],W[ae],"gt"];break;case 17:this.$=[W[ae-2],W[ae],"lte"];break;case 18:this.$=[W[ae-2],W[ae],"gte"];break;case 20:this.$=[W[ae-2],W[ae],"eq"];break;case 21:this.$=[W[ae-2],W[ae],"seq"];break;case 22:this.$=[W[ae-2],W[ae],"neq"];break;case 23:this.$=[W[ae-2],W[ae],"sneq"];break;case 24:this.$=[W[ae-2],W[ae],"like"];break;case 25:this.$=[W[ae-2],W[ae],"notLike"];break;case 27:case 29:this.$=[W[ae-2],W[ae],"in"];break;case 28:case 30:this.$=[W[ae-2],W[ae],"notIn"];break;case 32:this.$=[W[ae-2],W[ae],"and"];break;case 34:this.$=[W[ae-2],W[ae],"or"];break;case 36:this.$=[W[ae-2],W[ae],"arguments"];break;case 37:this.$=[String(K),null,"identifier"];break;case 39:this.$=[W[ae-2],W[ae],"prop"];break;case 40:case 41:case 42:this.$=[W[ae-3],W[ae-1],"propLookup"];break;case 43:this.$=[W[ae-2],[null,null,"arguments"],"function"];break;case 44:this.$=[W[ae-3],W[ae-1],"function"];break;case 45:this.$=[String(K.replace(/^['|"]|['|"]$/g,"")),null,"string"];break;case 46:this.$=[Number(K),null,"number"];break;case 47:this.$=[K,null,"regexp"];break;case 48:this.$=["true"==K.replace(/^\s+/,""),null,"boolean"];break;
1case 49:this.$=[null,null,"null"];break;case 50:this.$=[null,null,"array"];break;case 51:this.$=[W[ae-1],null,"array"];break;case 59:this.$=[W[ae-1],null,"composite"]}},table:[{3:1,4:2,6:28,7:7,8:w,9:r,10:27,14:25,16:17,18:8,23:6,30:5,32:15,34:14,35:4,37:3,41:23,42:s,44:d,45:9,47:10,48:f,50:u,51:o,52:11,53:p,54:12,55:c,56:13,57:h},{1:[3]},{5:[1,31]},E([5,49],[2,60],{38:[1,32]}),E(_,[2,33],{36:a}),E(b,[2,31]),E(b,[2,26],{24:[1,34],25:[1,35],26:[1,36],27:[1,37],28:[1,38],29:[1,39]}),E(N,R,{31:[1,40],33:[1,41]}),E(g,[2,19],{19:k,20:M,21:O,22:U}),E(S,[2,52]),E(S,[2,53]),E(S,[2,54]),E(S,[2,55]),E(S,[2,56]),E(S,[2,57],{43:D,44:Z,48:V}),E(S,[2,58]),{4:49,6:28,7:7,8:w,9:r,10:27,14:25,16:17,18:8,23:6,30:5,32:15,34:14,35:4,37:3,41:23,42:s,44:d,45:9,47:10,48:f,50:u,51:o,52:11,53:p,54:12,55:c,56:13,57:h},E(J,[2,14],{17:$}),E(S,[2,45]),E(S,[2,46]),E(S,[2,47]),E(S,[2,48]),E(S,[2,49]),E(I,[2,38]),{7:53,32:15,34:14,39:52,41:23,42:s,44:d,45:9,46:[1,51],47:10,48:f,50:u,51:o,52:11,53:p,54:12,55:c,56:13,57:h},E(B,[2,12],{8:e,15:t}),E(I,[2,37]),E(n,[2,9],{11:v,12:y,13:L}),E(N,[2,5]),{6:59,7:60,8:w,9:r,32:15,34:14,41:23,42:s,44:d,45:9,47:10,48:f,50:u,51:o,52:11,53:p,54:12,55:c,56:13,57:h},{6:61,7:60,8:w,9:r,32:15,34:14,41:23,42:s,44:d,45:9,47:10,48:f,50:u,51:o,52:11,53:p,54:12,55:c,56:13,57:h},{1:[2,1]},{6:28,7:7,8:w,9:r,10:27,14:25,16:17,18:8,23:6,30:5,32:15,34:14,35:62,41:23,42:s,44:d,45:9,47:10,48:f,50:u,51:o,52:11,53:p,54:12,55:c,56:13,57:h},{6:28,7:7,8:w,9:r,10:27,14:25,16:17,18:8,23:6,30:63,32:15,34:14,41:23,42:s,44:d,45:9,47:10,48:f,50:u,51:o,52:11,53:p,54:12,55:c,56:13,57:h},{6:28,7:60,8:w,9:r,10:27,14:25,16:17,18:64,32:15,34:14,41:23,42:s,44:d,45:9,47:10,48:f,50:u,51:o,52:11,53:p,54:12,55:c,56:13,57:h},{6:28,7:60,8:w,9:r,10:27,14:25,16:17,18:65,32:15,34:14,41:23,42:s,44:d,45:9,47:10,48:f,50:u,51:o,52:11,53:p,54:12,55:c,56:13,57:h},{6:28,7:60,8:w,9:r,10:27,14:25,16:17,18:66,32:15,34:14,41:23,42:s,44:d,45:9,47:10,48:f,50:u,51:o,52:11,53:p,54:12,55:c,56:13,57:h},{6:28,7:60,8:w,9:r,10:27,14:25,16:17,18:67,32:15,34:14,41:23,42:s,44:d,45:9,47:10,48:f,50:u,51:o,52:11,53:p,54:12,55:c,56:13,57:h},{6:28,7:60,8:w,9:r,10:27,14:25,16:17,18:68,32:15,34:14,41:23,42:s,44:d,45:9,47:10,48:f,50:u,51:o,52:11,53:p,54:12,55:c,56:13,57:h},{6:28,7:60,8:w,9:r,10:27,14:25,16:17,18:69,32:15,34:14,41:23,42:s,44:d,45:9,47:10,48:f,50:u,51:o,52:11,53:p,54:12,55:c,56:13,57:h},{32:70,34:71,41:23,42:s,44:d},{32:72,34:73,41:23,42:s,44:d},{6:28,7:60,8:w,9:r,10:27,14:25,16:74,32:15,34:14,41:23,42:s,44:d,45:9,47:10,48:f,50:u,51:o,52:11,53:p,54:12,55:c,56:13,57:h},{6:28,7:60,8:w,9:r,10:27,14:25,16:75,32:15,34:14,41:23,42:s,44:d,45:9,47:10,48:f,50:u,51:o,52:11,53:p,54:12,55:c,56:13,57:h},{6:28,7:60,8:w,9:r,10:27,14:25,16:76,32:15,34:14,41:23,42:s,44:d,45:9,47:10,48:f,50:u,51:o,52:11,53:p,54:12,55:c,56:13,57:h},{6:28,7:60,8:w,9:r,10:27,14:25,16:77,32:15,34:14,41:23,42:s,44:d,45:9,47:10,48:f,50:u,51:o,52:11,53:p,54:12,55:c,56:13,57:h},{41:78,42:s},{34:81,41:23,42:s,45:79,47:80,50:u,51:o},{7:53,32:15,34:14,39:83,41:23,42:s,44:d,45:9,47:10,48:f,49:[1,82],50:u,51:o,52:11,53:p,54:12,55:c,56:13,57:h},{49:[1,84]},{6:28,7:60,8:w,9:r,10:27,14:85,32:15,34:14,41:23,42:s,44:d,45:9,47:10,48:f,50:u,51:o,52:11,53:p,54:12,55:c,56:13,57:h},E(S,[2,50]),{40:H,46:[1,86]},E(Q,[2,35]),{6:28,7:60,8:w,9:r,10:88,32:15,34:14,41:23,42:s,44:d,45:9,47:10,48:f,50:u,51:o,52:11,53:p,54:12,55:c,56:13,57:h},{6:28,7:60,8:w,9:r,10:89,32:15,34:14,41:23,42:s,44:d,45:9,47:10,48:f,50:u,51:o,52:11,53:p,54:12,55:c,56:13,57:h},{6:90,7:60,8:w,9:r,32:15,34:14,41:23,42:s,44:d,45:9,47:10,48:f,50:u,51:o,52:11,53:p,54:12,55:c,56:13,57:h},{6:91,7:60,8:w,9:r,32:15,34:14,41:23,42:s,44:d,45:9,47:10,48:f,50:u,51:o,52:11,53:p,54:12,55:c,56:13,57:h},{6:92,7:60,8:w,9:r,32:15,34:14,41:23,42:s,44:d,45:9,47:10,48:f,50:u,51:o,52:11,53:p,54:12,55:c,56:13,57:h},E(N,[2,3]),E(N,R),E(N,[2,4]),E(_,[2,34],{36:a}),E(b,[2,32]),E(g,[2,20],{19:k,20:M,21:O,22:U}),E(g,[2,21],{19:k,20:M,21:O,22:U}),E(g,[2,22],{19:k,20:M,21:O,22:U}),E(g,[2,23],{19:k,20:M,21:O,22:U}),E(g,[2,24],{19:k,20:M,21:O,22:U}),E(g,[2,25],{19:k,20:M,21:O,22:U}),E(b,[2,27]),E(b,[2,29],{43:D,44:Z,48:V}),E(b,[2,28]),E(b,[2,30],{43:D,44:Z,48:V}),E(J,[2,15],{17:$}),E(J,[2,16],{17:$}),E(J,[2,17],{17:$}),E(J,[2,18],{17:$}),E(I,[2,39]),{46:[1,93]},{46:[1,94]},{43:D,44:Z,46:[1,95],48:V},E(I,[2,43]),{40:H,49:[1,96]},E(S,[2,59]),E(B,[2,13],{8:e,15:t}),E(S,[2,51]),{7:97,32:15,34:14,41:23,42:s,44:d,45:9,47:10,48:f,50:u,51:o,52:11,53:p,54:12,55:c,56:13,57:h},E(n,[2,10],{11:v,12:y,13:L}),E(n,[2,11],{11:v,12:y,13:L}
vendor: 8,124 bytes, line 1
1),E(N,[2,6]),E(N,[2,7]),E(N,[2,8]),E(I,[2,40]),E(I,[2,41]),E(I,[2,42]),E(I,[2,44]),E(Q,[2,36])],defaultActions:{31:[2,1]},parseError:function(K,te){if(!te.recoverable){let ie=function(se,W){this.message=se,this.hash=W};throw ie.prototype=Error,new ie(K,te)}this.trace(K)},parse:function(K){var ue=[0],se=[null],W=[],le=this.table,ae="",ce=0,ve=0,Ee=0,G=W.slice.call(arguments,1),Y=Object.create(this.lexer),P={yy:{}};for(var j in this.yy)Object.prototype.hasOwnProperty.call(this.yy,j)&&(P.yy[j]=this.yy[j]);Y.setInput(K,P.yy),P.yy.lexer=Y,P.yy.parser=this,typeof Y.yylloc>"u"&&(Y.yylloc={});var q=Y.yylloc;W.push(q);var me,X=Y.options&&Y.options.ranges;this.parseError="function"==typeof P.yy.parseError?P.yy.parseError:Object.getPrototypeOf(this).parseError;for(var he,ge,_e,de,xe,Te,be,Le,ke={};;){if(this.defaultActions[_e=ue[ue.length-1]]?de=this.defaultActions[_e]:((null===he||typeof he>"u")&&(me=void 0,"number"!=typeof(me=Y.lex()||1)&&(me=this.symbols_[me]||me),he=me),de=le[_e]&&le[_e][he]),typeof de>"u"||!de.length||!de[0]){var Me;for(Te in Le=[],le[_e])this.terminals_[Te]&&Te>2&&Le.push("'"+this.terminals_[Te]+"'");Me=Y.showPosition?"Parse error on line "+(ce+1)+":\n"+Y.showPosition()+"\nExpecting "+Le.join(", ")+", got '"+(this.terminals_[he]||he)+"'":"Parse error on line "+(ce+1)+": Unexpected "+(1==he?"end of input":"'"+(this.terminals_[he]||he)+"'"),this.parseError(Me,{text:Y.match,token:this.terminals_[he]||he,line:Y.yylineno,loc:q,expected:Le})}if(de[0]instanceof Array&&de.length>1)throw new Error("Parse Error: multiple actions possible at state: "+_e+", token: "+he);switch(de[0]){case 1:ue.push(he),se.push(Y.yytext),W.push(Y.yylloc),ue.push(de[1]),he=null,ge?(he=ge,ge=null):(ve=Y.yyleng,ae=Y.yytext,ce=Y.yylineno,q=Y.yylloc,Ee>0&&Ee--);break;case 2:if(ke.$=se[se.length-(be=this.productions_[de[1]][1])],ke._$={first_line:W[W.length-(be||1)].first_line,last_line:W[W.length-1].last_line,first_column:W[W.length-(be||1)].first_column,last_column:W[W.length-1].last_column},X&&(ke._$.range=[W[W.length-(be||1)].range[0],W[W.length-1].range[1]]),typeof(xe=this.performAction.apply(ke,[ae,ve,ce,P.yy,de[1],se,W].concat(G)))<"u")return xe;be&&(ue=ue.slice(0,-1*be*2),se=se.slice(0,-1*be),W=W.slice(0,-1*be)),ue.push(this.productions_[de[1]][0]),se.push(ke.$),W.push(ke._$),ue.push(le[ue[ue.length-2]][ue[ue.length-1]]);break;case 3:return!0}}return!0}};function re(){this.yy={}}return fe.lexer={EOF:1,parseError:function(te,ue){if(!this.yy.parser)throw new Error(te);this.yy.parser.parseError(te,ue)},setInput:function(K,te){return this.yy=te||this.yy||{},this._input=K,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},input:function(){var K=this._input[0];return this.yytext+=K,this.yyleng++,this.offset++,this.match+=K,this.matched+=K,K.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),K},unput:function(K){var te=K.length,ue=K.split(/(?:\r\n?|\n)/g);this._input=K+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-te),this.offset-=te;var ie=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),ue.length-1&&(this.yylineno-=ue.length-1);var se=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:ue?(ue.length===ie.length?this.yylloc.first_column:0)+ie[ie.length-ue.length].length-ue[0].length:this.yylloc.first_column-te},this.options.ranges&&(this.yylloc.range=[se[0],se[0]+this.yyleng-te]),this.yyleng=this.yytext.length,this},more:function(){return this._more=!0,this},reject:function(){return this.options.backtrack_lexer?(this._backtrack=!0,this):this.parseError("Lexical error on line "+(this.yylineno+1)+". You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},less:function(K){this.unput(this.match.slice(K))},pastInput:function(){var K=this.matched.substr(0,this.matched.length-this.match.length);return(K.length>20?"...":"")+K.substr(-20).replace(/\n/g,"")},upcomingInput:function(){var K=this.match;return K.length<20&&(K+=this._input.substr(0,20-K.length)),(K.substr(0,20)+(K.length>20?"...":"")).replace(/\n/g,"")},showPosition:function(){var K=this.pastInput(),te=new Array(K.length+1).join("-");return K+this.upcomingInput()+"\n"+te+"^"},test_match:function(K,te){var ue,ie,se;if(this.options.backtrack_lexer&&(se={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(se.yylloc.range=this.yylloc.range.slice(0))),(ie=K[0].match(/(?:\r\n?|\n).*/g))&&(this.yylineno+=ie.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:ie?ie[ie.length-1].length-ie[ie.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+K[0].length},this.yytext+=K[0],this.match+=K[0],this.matches=K,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(K[0].length),this.matched+=K[0],ue=this.performAction.call(this,this.yy,this,te,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),ue)return ue;if(this._backtrack){for(var W in se)this[W]=se[W];return!1}return!1},next:function(){if(this.done)return this.EOF;var K,te,ue,ie;this._input||(this.done=!0),this._more||(this.yytext="",this.match="");for(var se=this._currentRules(),W=0;W<se.length;W++)if((ue=this._input.match(this.rules[se[W]]))&&(!te||ue[0].length>te[0].length)){if(te=ue,ie=W,this.options.backtrack_lexer){if(!1!==(K=this.test_match(ue,se[W])))return K;if(this._backtrack){te=!1;continue}return!1}if(!this.options.flex)break}return te?!1!==(K=this.test_match(te,se[ie]))&&K:""===this._input?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+". Unrecognized text.\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},lex:function(){return this.next()||this.lex()},begin:function(te){this.conditionStack.push(te)},popState:function(){return this.conditionStack.length-1>0?this.conditionStack.pop():this.conditionStack[0]},_currentRules:function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},topState:function(te){return(te=this.conditionStack.length-1-Math.abs(te||0))>=0?this.conditionStack[te]:"INITIAL"},pushState:function(te){this.begin(te)},stateStackSize:function(){return this.conditionStack.length},options:{},performAction:function(te,ue,ie,se){switch(ie){case 0:return 31;case 1:return 33;case 2:return"from";case 3:case 32:return 24;case 4:case 31:return 25;case 5:case 34:return 26;case 6:case 33:return 27;case 7:case 35:return 21;case 8:case 38:return 19;case 9:case 36:return 22;case 10:case 37:return 20;case 11:case 29:return 28;case 12:case 30:return 29;case 13:case 39:return 36;case 14:case 40:return 38;case 15:return 57;case 16:return 55;case 17:break;case 18:return 51;case 19:case 20:return 50;case 21:return 42;case 22:return 53;case 23:return 43;case 24:return 11;case 25:return 12;case 26:return 13;case 27:return 40;case 28:return 8;case 41:return 15;case 42:return 17;case 43:return 48;case 44:return 46;case 45:return 44;case 46:return 49;case 47:return 9;
1case 48:return 5}},rules:[/^(?:\s+in\b)/,/^(?:\s+notIn\b)/,/^(?:\s+from\b)/,/^(?:\s+(eq|EQ)\b)/,/^(?:\s+(seq|SEQ)\b)/,/^(?:\s+(neq|NEQ)\b)/,/^(?:\s+(sneq|SNEQ)\b)/,/^(?:\s+(lte|LTE)\b)/,/^(?:\s+(lt|LT)\b)/,/^(?:\s+(gte|GTE)\b)/,/^(?:\s+(gt|GT)\b)/,/^(?:\s+(like|LIKE)\b)/,/^(?:\s+(notLike|NOT_LIKE)\b)/,/^(?:\s+(and|AND)\b)/,/^(?:\s+(or|OR)\b)/,/^(?:\s*(null)\b)/,/^(?:\s*(true|false)\b)/,/^(?:\s+)/,/^(?:-?[0-9]+(?:\.[0-9]+)?\b)/,/^(?:'[^']*')/,/^(?:"[^"]*")/,/^(?:([a-zA-Z_$][0-9a-zA-Z_$]*))/,/^(?:^\/((?![\s=])[^[\/\n\\]*(?:(?:\\[\s\S]|\[[^\]\n\\]*(?:\\[\s\S][^\]\n\\]*)*])[^[\/\n\\]*)*\/[imgy]{0,4})(?!\w))/,/^(?:\.)/,/^(?:\*)/,/^(?:\/)/,/^(?:\%)/,/^(?:,)/,/^(?:-)/,/^(?:=~)/,/^(?:!=~)/,/^(?:===)/,/^(?:==)/,/^(?:!==)/,/^(?:!=)/,/^(?:<=)/,/^(?:>=)/,/^(?:>)/,/^(?:<)/,/^(?:&&)/,/^(?:\|\|)/,/^(?:\+)/,/^(?:\^)/,/^(?:\()/,/^(?:\])/,/^(?:\[)/,/^(?:\))/,/^(?:!)/,/^(?:$)/],conditions:{INITIAL:{rules:[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48],inclusive:!0}}},re.prototype=fe,fe.Parser=re,new re}();typeof A<"u"&&typeof C<"u"&&(C.parser=x,C.Parser=x.Parser,C.parse=function(){return x.parse.apply(x,arguments)},C.main=function(w){w[1]||(console.log("Usage: "+w[0]+" FILE"),T.exit(1));var r=A("fs").readFileSync(A("path").normalize(w[1]),"utf8");return C.parser.parse(r)},typeof F<"u"&&A.main===F&&C.main(T.argv.slice(1)))},{__browserify_process:64,fs:61,path:62}],44:[function(A,F,C){!function(){"use strict";var T=A("./constraint/parser"),x=A("./nools/nool.parser");C.parseConstraint=function(E){try{return T.parse(E)}catch{throw new Error("Invalid expression '"+E+"'")}},C.parseRuleSet=function(E,w){return x.parse(E,w)}}()},{"./constraint/parser":43,"./nools/nool.parser":45}],45:[function(A,F,C){"use strict";var T=A("./tokens.js"),E=A("../../extended").hash.keys,w=A("./util.js"),r=function(s,d,f){var u=s;s=s.replace(/\/\/(.*)/g,"").replace(/\r\n|\r|\n/g," ");for(var p,o=new RegExp("^("+E(d).join("|")+")");s&&-1!==(p=w.findNextTokenIndex(s));){var c=(s=s.substr(p)).match(o);if(null===c)throw new Error("Error parsing "+s);if(!((c=c[1])in d))throw new Error("Unknown token"+c);try{s=d[c](s,f,r).replace(/^\s*|\s*$/g,"")}catch(h){throw new Error("Invalid "+c+" definition \n"+h.message+"; \nstarting at : "+u)}}};C.parse=function(s,d){var f={define:[],rules:[],scope:[],loaded:[],file:d};return r(s,T,f),f}},{"../../extended":12,"./tokens.js":46,"./util.js":47}],46:[function(require,module,exports){var process=require("__browserify_process"),utils=require("./util.js"),fs=require("fs"),extd=require("../../extended"),filter=extd.filter,indexOf=extd.indexOf,predicates=["not","or","exists"],predicateRegExp=new RegExp("^("+predicates.join("|")+") *\\((.*)\\)$","m"),predicateBeginExp=new RegExp(" *("+predicates.join("|")+") *\\(","g"),isWhiteSpace=function(A){return 0===A.replace(/[\s|\n|\r|\t]/g,"").length},joinFunc=function(A,F){return"; "+F},splitRuleLineByPredicateExpressions=function(A){var F=A.replace(/,\s*(\$?\w+\s*:)/g,joinFunc),C=filter(F.split(predicateBeginExp),function(w){return""!==w}),T=C.length,x=[];if(!T)return F;for(var E=0;E<T;E++)-1!==indexOf(predicates,C[E])?x.push([C[E],"(",C[++E].replace(/, *$/,"")].join("")):x.push(C[E].replace(/, *$/,""));return x.join(";")},ruleTokens={salience:(A=/^(salience|priority)\s*:\s*(-?\d+)\s*[,;]?/,function(F,C){if(A.test(F)){var T=F.match(A),x=parseInt(T[2],10);if(isNaN(x))throw new Error("Invalid salience/priority "+T[2]);return C.options.priority=x,F.replace(T[0],"")}throw new Error("invalid format")}),agendaGroup:function(){var A=/^(agenda-group|agendaGroup)\s*:\s*([a-zA-Z_$][0-9a-zA-Z_$]*|"[^"]*"|'[^']*')\s*[,;]?/;return function(F,C){if(A.test(F)){var T=F.match(A),x=T[2];if(!x)throw new Error("Invalid agenda-group "+T[2]);return C.options.agendaGroup=x.replace(/^["']|["']$/g,""),F.replace(T[0],"")}throw new Error("invalid format")}}(),autoFocus:function(){var A=/^(auto-focus|autoFocus)\s*:\s*(true|false)\s*[,;]?/;return function(F,C){if(A.test(F)){var T=F.match(A),x=T[2];if(!x)throw new Error("Invalid auto-focus "+T[2]);return C.options.autoFocus="true"===x,F.replace(T[0],"")}throw new Error("invalid format")}}(),"agenda-group":function(){return this.agendaGroup.apply(this,arguments)},"auto-focus":function(){return this.autoFocus.apply(this,arguments)},priority:function(){return this.salience.apply(this,arguments)},when:function(){var ruleRegExp=/^(\$?\w+) *: *(\w+)(.*)/,constraintRegExp=/(\{ *(?:["']?\$?\w+["']?\s*:\s*["']?\$?\w+["']? *(?:, *["']?\$?\w+["']?\s*:\s*["']?\$?\w+["']?)*)+ *\})/,fromRegExp=/(\bfrom\s+.*)/,parseRules=function(str){for(var rules=[],ruleLines=str.split(";"),l=ruleLines.length,ruleLine,i=0;i<l&&(ruleLine=ruleLines[i].replace(/^\s*|\s*$/g,"").replace(/\n/g,""));i++)if(!isWhiteSpace(ruleLine)){var rule=[];
1if(predicateRegExp.test(ruleLine)){var m=ruleLine.match(predicateRegExp),pred=m[1].replace(/^\s*|\s*$/g,"");if(rule.push(pred),ruleLine=m[2].replace(/^\s*|\s*$/g,""),"or"===pred){rule=rule.concat(parseRules(splitRuleLineByPredicateExpressions(ruleLine))),rules.push(rule);continue}}var parts=ruleLine.match(ruleRegExp);if(!parts||!parts.length)throw new Error("Invalid constraint "+ruleLine);rule.push(parts[2],parts[1]);var constraints=parts[3].replace(/^\s*|\s*$/g,""),hashParts=constraints.match(constraintRegExp),from=null,fromMatch;if(hashParts){var hash=hashParts[1],constraint=constraints.replace(hash,"");fromRegExp.test(constraint)&&(fromMatch=constraint.match(fromRegExp),from=fromMatch[0],constraint=constraint.replace(fromMatch[0],"")),constraint&&rule.push(constraint.replace(/^\s*|\s*$/g,"")),hash&&rule.push(eval("("+hash.replace(/(\$?\w+)\s*:\s*(\$?\w+)/g,'"$1" : "$2"')+")"))}else constraints&&!isWhiteSpace(constraints)&&(fromRegExp.test(constraints)&&(fromMatch=constraints.match(fromRegExp),from=fromMatch[0],constraints=constraints.replace(fromMatch[0],"")),rule.push(constraints));from&&rule.push(from),rules.push(rule)}return rules};return function(A,F){var C=A.replace(/^when\s*/,"").replace(/^\s*|\s*$/g,"");if("{"===utils.findNextToken(C)){var T=utils.getTokensBetween(C,"{","}",!0).join("");return C=C.replace(T,""),F.constraints=parseRules(T.replace(/^\{\s*|\}\s*$/g,"")),C}throw new Error("unexpected token : expected : '{' found : '"+utils.findNextToken(C)+"'")}}(),then:function(A,F){if(F.action)throw new Error("action already defined for rule"+F.name);var C=A.replace(/^then\s*/,"").replace(/^\s*|\s*$/g,"");if("{"===utils.findNextToken(C)){var T=utils.getTokensBetween(C,"{","}",!0).join("");if(C=C.replace(T,""),F.action||(F.action=T.replace(/^\{\s*|\}\s*$/g,"")),!isWhiteSpace(C))throw new Error("Error parsing then block "+A);return C}throw new Error("unexpected token : expected : '{' found : '"+utils.findNextToken(C)+"'")}},topLevelTokens={"/":function(A){return A.match(/^\/\*/)?A.replace(/\/\*.*?\*\//,""):A},define:function(A,F){var C=A.replace(/^define\s*/,""),T=C.match(/^([a-zA-Z_$][0-9a-zA-Z_$]*)/);if(T){if(C=C.replace(T[0],"").replace(/^\s*|\s*$/g,""),"{"===utils.findNextToken(C)){T=T[1];var x=utils.getTokensBetween(C,"{","}",!0).join("");return C=C.replace(x,""),F.define.push({name:T,properties:"("+x+")"}),C}throw new Error("unexpected token : expected : '{' found : '"+utils.findNextToken(C)+"'")}throw new Error("missing name")},import:function(A,F,C){if(typeof window<"u")throw new Error("import cannot be used in a browser");var T=A.replace(/^import\s*/,"");if("("===utils.findNextToken(T)){var x=utils.getParamList(T);if(T=T.replace(x,"").replace(/^\s*|\s*$/g,""),";"===utils.findNextToken(T)&&(T=T.replace(/\s*;/,"")),1===(x=x.replace(/[\(|\)]/g,"").split(",")).length){if(x=utils.resolve(F.file||process.cwd(),x[0].replace(/["|']/g,"")),-1===indexOf(F.loaded,x)){var E=F.file;F.file=x,C(fs.readFileSync(x,"utf8"),topLevelTokens,F),F.loaded.push(x),F.file=E}return T}throw new Error("import accepts a single file")}throw new Error("unexpected token : expected : '(' found : '"+utils.findNextToken(T)+"'")},global:function(A,F){var C=A.replace(/^global\s*/,""),T=C.match(/^([a-zA-Z_$][0-9a-zA-Z_$]*\s*)/);if(T){if(C=C.replace(T[0],"").replace(/^\s*|\s*$/g,""),"="===utils.findNextToken(C)){T=T[1].replace(/^\s+|\s+$/g,"");var x=utils.getTokensBetween(C,"=",";",!0).join(""),E=x.substring(1,x.length-1);if(E=E.replace(/^\s+|\s+$/g,""),/^require\(/.test(E)){var w=utils.getParamList(E.replace("require")).replace(/[\(|\)]/g,"").split(",");1===w.length&&(w=w[0].replace(/["|']/g,""),E=["require('",utils.resolve(F.file||process.cwd(),w),"')"].join(""))}return F.scope.push({name:T,body:E}),C.replace(x,"")}throw new Error("unexpected token : expected : '=' found : '"+utils.findNextToken(C)+"'")}throw new Error("missing name")},function:function(A,F){var C=A.replace(/^function\s*/,""),T=C.match(/^([a-zA-Z_$][0-9a-zA-Z_$]*)\s*/);if(T){if(C=C.replace(T[0],""),"("===utils.findNextToken(C)){T=T[1];var x=utils.getParamList(C);if(C=C.replace(x,"").replace(/^\s*|\s*$/g,""),"{"===utils.findNextToken(C)){var E=utils.getTokensBetween(C,"{","}",!0).join("");return C=C.replace(E,""),F.scope.push({name:T,body:"function"+x+E}),C}throw new Error("unexpected token : expected : '{' found : '"+utils.findNextToken(C)+"'")}throw new Error("unexpected token : expected : '(' found : '"+utils.findNextToken(C)+"'")}throw new Error("missing name")},rule:function(A,F,C){var T=A.replace(/^rule\s*/,""),x=T.match(/^([a-zA-Z_$][0-9a-zA-Z_$]*|"[^"]*"|'[^']*')/);if(x){if(T=T.replace(x[0],"").replace(/^\s*|\s*$/g,""),"{"===utils.findNextToken(T)){var E={name:x=x[1].replace(/^["']|["']$/g,""),options:{},constraints:null,action:null},w=utils.getTokensBetween(T,"{","}",!0).join("");return T=T.replace(w,""),C(w.replace(/^\{\s*|\}\s*$/g,""),ruleTokens,E),F.rules.push(E),T}throw new Error("unexpected token : expected : '{' found : '"+utils.findNextToken(T)+"'")}throw new Error("missing name")}},A;module.exports=topLevelTokens},{"../../extended":12,"./util.js":47,__browserify_process:64,fs:61}],47:[function(A,F,C){var T=A("__browserify_process"),x=A("path"),E=/[\s|\n|\r|\t]/,w=x.sep||("win32"===T.platform?"\\":"/"),r={"{":"}","}":"{","(":")",")":"(","[":"]"},s=C.getTokensBetween=function(f,u,o,p){var c=0,h=[];u||(u=r[o],c=1),o||(o=r[u]),f=Object(f);for(var a,_=!1,b=0,N=!1;a=f.charAt(b++);)if(a===u)c++,_?h.push(a):(_=!0,p&&h.push(a));else if(a===o&&b){if(0==--c){p&&h.push(a),N=!0;break}h.push(a)}else _&&h.push(a);if(!N)throw new Error("Unable to match "+u+" in "+f);return h};C.getParamList=function(f){return s(f,"(",")",!0).join("")},C.resolve=function(f,u){return"win32"===T.platform&&(u=u.replace(/\//g,"\\")),""!==x.extname(f)&&(f=x.dirname(f)),1===u.split(w).length?u:x.resolve(f,u).replace(/\\/g,"/")};var d=C.findNextTokenIndex=function(f,u,o){u=u||0;var p=-1,c=f.length;for((!(o=o||f.length)||o>c)&&(o=c);u<o;u++){var h=f.charAt(u);if(!E.test(h)){p=u;break}}return p};C.findNextToken=function(f,u,o){return f.charAt(d(f,u,o))}},{__browserify_process:64,path:62}],48:[function(A,F,C){"use strict";var T=A("./extended"),x=T.isEmpty,E=T.merge,w=T.forEach,r=T.declare,s=A("./constraintMatcher"),d=A("./constraint"),f=d.EqualityConstraint,u=d.FromConstraint,o=0,p=r({}),c=p.extend({instance:{constructor:function(a,b,N,R,g){g=g||{},this.id=o++,this.type=a,this.alias=b,this.conditions=N,this.pattern=g.pattern;var k=[new d.ObjectConstraint(a)],M=s.toConstraints(N,E({alias:b},g));if(M.length)k=k.concat(M);else{var O=new d.TrueConstraint;k.push(O)}if(R&&!x(R)){var U=new d.HashConstraint(R);k.push(U)}w(k,function(S){S.set("alias",b)}),this.constraints=k},getSpecificity:function(){for(var a=this.constraints,b=0,N=0,R=a.length;N<R;N++)a[N]instanceof f&&b++;return b}
1,hasConstraint:function(a){return T.some(this.constraints,function(b){return b instanceof a})},hashCode:function(){return[this.type,this.alias,T.format("%j",this.conditions)].join(":")},toString:function(){return T.format("%j",this.constraints)}}}).as(C,"ObjectPattern"),h=c.extend({instance:{constructor:function(a,b,N,R,g,k){this._super([a,b,N,R,k]),this.from=new u(g,k)},hasConstraint:function(a){return T.some(this.constraints,function(b){return b instanceof a})},getSpecificity:function(){return this._super(arguments)+1},hashCode:function(){return[this.type,this.alias,T.format("%j",this.conditions),this.from.from].join(":")},toString:function(){return T.format("%j from %s",this.constraints,this.from.from)}}}).as(C,"FromPattern");h.extend().as(C,"FromNotPattern"),c.extend().as(C,"NotPattern"),c.extend().as(C,"ExistsPattern"),h.extend().as(C,"FromExistsPattern"),p.extend({instance:{constructor:function(a,b){this.id=o++,this.leftPattern=a,this.rightPattern=b},hashCode:function(){return[this.leftPattern.hashCode(),this.rightPattern.hashCode()].join(":")},getSpecificity:function(){return this.rightPattern.getSpecificity()+this.leftPattern.getSpecificity()},getters:{constraints:function(){return this.leftPattern.constraints.concat(this.rightPattern.constraints)}}}}).as(C,"CompositePattern");var _=r({instance:{constructor:function(){this.id=o++,this.recency=0}}}).as(C,"InitialFact");c.extend({instance:{constructor:function(){this._super([_,"__i__",[],{}])},assert:function(){return!0}}}).as(C,"InitialFactPattern")},{"./constraint":8,"./constraintMatcher":9,"./extended":12}],49:[function(A,F,C){"use strict";var T=A("./extended"),x=T.isArray,E=T.Promise,w=T.declare,r=T.isHash,s=T.isString,d=T.format,f=A("./parser"),u=A("./pattern"),o=u.ObjectPattern,p=u.FromPattern,c=u.NotPattern,h=u.ExistsPattern,_=u.FromNotPattern,a=u.FromExistsPattern,b=u.CompositePattern,N=function(S){return"function"==typeof S?S:f.parseConstraint(S)},R=T.switcher().isUndefinedOrNull(function(){return null}).isLike(/^from +/,function(S){return{from:S.replace(/^from +/,"").replace(/^\s*|\s*$/g,"")}}).def(function(S){throw new Error("invalid rule constraint option "+S)}).switcher(),g=T.switcher().isLength(1,function(S){throw new Error("invalid rule constraint "+d("%j",[S]))}).isLength(2,function(S){return S.push("true"),S}).isLength(3,function(S){if(s(S[2])&&/^from +/.test(S[2])){var D=S[2];S.splice(2,0,"true"),S[3]=null,S[4]=R(D)}else r(S[2])&&S.splice(2,0,"true");return S}).isLength(4,function(S){return s(S[3])&&(S.splice(3,0,null),S[4]=R(S[4])),S}).def(function(S){return 5===S.length&&(S[4]=R(S[4])),S}).switcher(),k=function(D,Z){Z=Z||{};var V=T.switcher().isEq("string",function(){return String}).isEq("date",function(){return Date}).isEq("array",function(){return Array}).isEq("boolean",function(){return Boolean}).isEq("regexp",function(){return RegExp}).isEq("number",function(){return Number}).isEq("object",function(){return Object}).isEq("hash",function(){return Object}).def(function($){throw new TypeError("invalid param type "+$)}).switcher();return T.switcher().isString(function($){return Z[$]||V($.toLowerCase())}).isFunction(function($){return $}).deepEqual([],function(){return Array}).def(function($){throw new Error("invalid param type "+$)}).switcher()(D)},M=T.switcher().containsAt("or",0,function(S){return S.shift(),T(S).map(function(D){return D.scope=S.scope,M(D)}).flatten().value()}).containsAt("not",0,function(S){return S.shift(),(S=g(S))[4]&&S[4].from?[new _(k(S[0],S.scope),S[1]||"m",N(S[2]||"true"),S[3]||{},N(S[4].from),{scope:S.scope,pattern:S[2]})]:[new c(k(S[0],S.scope),S[1]||"m",N(S[2]||"true"),S[3]||{},{scope:S.scope,pattern:S[2]})]}).containsAt("exists",0,function(S){return S.shift(),(S=g(S))[4]&&S[4].from?[new a(k(S[0],S.scope),S[1]||"m",N(S[2]||"true"),S[3]||{},N(S[4].from),{scope:S.scope,pattern:S[2]})]:[new h(k(S[0],S.scope),S[1]||"m",N(S[2]||"true"),S[3]||{},{scope:S.scope,pattern:S[2]})]}).def(function(S){return"function"==typeof S?[S]:(S=g(S))[4]&&S[4].from?[new p(k(S[0],S.scope),S[1]||"m",N(S[2]||"true"),S[3]||{},N(S[4].from),{scope:S.scope,pattern:S[2]})]:[new o(k(S[0],S.scope),S[1]||"m",N(S[2]||"true"),S[3]||{},{scope:S.scope,pattern:S[2]})]}).switcher(),O=w({instance:{constructor:function(S,D,Z,V){this.name=S,this.pattern=Z,this.cb=V,D.agendaGroup&&(this.agendaGroup=D.agendaGroup,this.autoFocus=!!T.isBoolean(D.autoFocus)&&D.autoFocus),this.priority=D.priority||D.salience||0},fire:function(S,D){var Z=new E,V=this.cb;try{3===V.length?V.call(S,D.factHash,S,Z.resolve):Z=V.call(S,D.factHash,S)}catch(J){Z.errback(J)}return Z}}});
1C.createRule=function U(S,D,Z,V){x(D)?(V=Z,Z=D):D=D||{};var J=T.every(Z,function(y){return x(y)});J&&1===Z.length&&(Z=Z[0],J=!1);var $=[],I=D.scope||{};if(Z.scope=I,J){for(var n,B=function(y,L){t[L]?T(t).forEach(function(H){H.push(y)}):(t[L]=0===L?[]:t[L-1].slice(),0!==L&&t[L].pop(),t[L].push(y))},e=Z.length,t=[],v=0;v<e;v++)(n=Z[v]).scope=I,T.forEach(M(n),B);$=T.map(t,function(y){for(var L=null,H=0;H<y.length;H++)L=new b(null===L?y[H++]:L,y[H]);return new O(S,D,L,V)})}else $=T.map(M(Z),function(y){return new O(S,D,y,V)});return $}},{"./extended":12,"./parser":44,"./pattern":48}],50:[function(A,F,C){"use strict";var T=A("declare.js"),x=A("./linkedList"),E=A("./pattern").InitialFact,w=0,r=T({instance:{constructor:function(s){this.object=s,this.recency=0,this.id=w++},equals:function(s){return s===this.object},hashCode:function(){return this.id}}});T({instance:{constructor:function(){this.recency=0,this.facts=new x},dispose:function(){this.facts.clear()},getFacts:function(){for(var u,s={next:this.facts.head},d=[],f=0;s=s.next;)(u=s.data.object)instanceof E||(d[f++]=u);return d},getFactsByType:function(s){for(var d={next:this.facts.head},f=[],u=0;d=d.next;){var o=d.data.object;!(o instanceof E)&&(o instanceof s||o.constructor===s)&&(f[u++]=o)}return f},getFactHandle:function(s){for(var f,d={next:this.facts.head};d=d.next;){var u=d.data;if(u.equals(s))return u}return f||((f=new r(s)).recency=this.recency++),f},modifyFact:function(s){for(var d={next:this.facts.head};d=d.next;){var f=d.data;if(f.equals(s))return f.recency=this.recency++,f}throw new Error("the fact to modify does not exist")},assertFact:function(s){var d=new r(s);return d.recency=this.recency++,this.facts.push(d),d},retractFact:function(s){for(var d=this.facts,f={next:d.head};f=f.next;){var u=f.data;if(u.equals(s))return d.remove(f),u}throw new Error("the fact to remove does not exist")}}}).as(C,"WorkingMemory")},{"./linkedList":16,"./pattern":48,"declare.js":55}],51:[function(A,F,C){(function(){"use strict";function T(x,E){function s(d,f){var u=-1,o=0,p=d.length,c=[];for(u+=f=f||0;++u<p;)c[o++]=d[u];return c}return x.define(E.isArguments,{toArray:s}).expose({argsToArray:s})}typeof C<"u"?typeof F<"u"&&F.exports&&(F.exports=T(A("extended"),A("is-extended"))):"function"==typeof define&&define.amd?define(["extended","is-extended"],function(x,E){return T(x,E)}):this.argumentsExtended=T(this.extended,this.isExtended)}).call(this)},{extended:56,"is-extended":66}],52:[function(A,F,C){(function(){"use strict";function T(x,E,w){var r=E.isString,s=Array.isArray||E.isArray,d=E.isDate,f=Math.floor,u=Math.abs,p=(Math,Math.min),c=Array.prototype,_=c.forEach,a=c.map,b=c.reduce,N=c.reduceRight,R=c.filter,g=c.every,k=c.some,M=w.argsToArray;function S(P,j){var X,oe,q=[],ne=-1;for(oe=P.length;++ne<oe;)-1!==Z(j,X=P[ne])&&q.push(X);return q}var P,j,q,D=(P=function(X,ne){return I(X,ne)},j=function(X,ne){return X-ne},q=function(X,ne){return X.getTime()-ne.getTime()},function(ne,oe){var he=[];return s(ne)&&(he=ne.slice(),oe?he.sort("function"==typeof oe?oe:function(ge,_e){var de=ge[oe],we=_e[oe];return r(de)&&r(we)?de>we?1:de<we?-1:0:d(de)&&d(we)?de.getTime()-we.getTime():de-we}):P(he,r)?he.sort():P(he,d)?he.sort(q):he.sort(j)),he});function Z(P,j,q){for(var X=(q||0)-1,ne=P.length;++X<ne;)if(P[X]===j)return X;return-1}function J(P,j,q){if(P&&R&&R===P.filter)return P.filter(j,q);if(!s(P)||"function"!=typeof j)throw new TypeError;for(var X=Object(P),ne=X.length>>>0,oe=[],he=0;he<ne;he++)if(he in X){var ge=X[he];j.call(q,ge,he,X)&&oe.push(ge)}return oe}function $(P,j,q){if(!s(P)||"function"!=typeof j)throw new TypeError;if(P&&_&&_===P.forEach)return P.forEach(j,q),P;for(var X=0,ne=P.length;X<ne;++X)j.call(q||P,P[X],X,P);return P}function I(P,j,q){if(P&&g&&g===P.every)return P.every(j,q);if(!s(P)||"function"!=typeof j)throw new TypeError;for(var X=Object(P),ne=X.length>>>0,oe=0;oe<ne;oe++)if(oe in X&&!j.call(q,X[oe],oe,X))return!1;return!0}function e(P,j,q){if(P&&a&&a===P.map)return P.map(j,q);if(!s(P)||"function"!=typeof j)throw new TypeError;for(var X=Object(P),ne=X.length>>>0,oe=[],he=0;he<ne;he++)he in X&&oe.push(j.call(q,X[he],he,X));return oe}function t(P,j,q){if(P&&b&&b===P.reduce)return arguments.length>2?P.reduce(j,q):P.reduce(j);if(!s(P)||"function"!=typeof j)throw new TypeError;var ne=0,oe=P.length>>0;
vendor: 7,475 bytes, line 1
1if(arguments.length<3){if(0===oe)throw new TypeError("Array length is 0 and no second argument");q=P[0],ne=1}else q=arguments[2];for(;ne<oe;)ne in P&&(q=j.call(void 0,q,P[ne],ne,P)),++ne;return q}function n(P,j,q){if(P&&N&&N===P.reduceRight)return arguments.length>2?P.reduceRight(j,q):P.reduceRight(j);if(!s(P)||"function"!=typeof j)throw new TypeError;var ne=Object(P),oe=ne.length>>>0;if(0===oe&&2===arguments.length)throw new TypeError;var he=oe-1;if(arguments.length>=3)q=arguments[2];else for(;;)if(he in P){q=P[he--];break}for(;he>=0;)he in ne&&(q=j.call(void 0,q,ne[he],he,ne)),he--;return q}function v(P){var j=[];if(null!==P){var q=M(arguments);if(1===q.length)if(s(P))j=P;else if(E.isHash(P))for(var X in P)P.hasOwnProperty(X)&&j.push([X,P[X]]);else j.push(P);else $(q,function(ne){j=j.concat(v(ne))})}return j}function y(P){return(P=P||[]).length?t(P,function(j,q){return j+q}):0}function re(P){var X,j=[],q=-1,ne=0;if(P)for(X=P.length;++q<X;){var oe=P[q];-1===Z(j,oe)&&(j[ne++]=oe)}return j}function K(P,j){var q=P.slice();return"number"!=typeof j&&(j=1),j&&s(P)?(j>0?(q.push(q.shift()),j--):(q.unshift(q.pop()),j++),K(q,j)):q}function ye(P){var q=M(arguments);return t(q.length>1?q:v(P),function(X,ne){return X.concat(ne)},[])}var Y={toArray:v,sum:y,avg:function L(P){if((P=P||[]).length){var j=y(P);if(E.isNumber(j))return j/P.length;throw new Error("Cannot average an array of non numbers.")}return 0},sort:function H(P,j){return D(P,j)},min:function Q(P,j){return D(P,j)[0]},max:function fe(P,j){return D(P,j)[P.length-1]},difference:function z(P){var j=P,q=ye(M(arguments,1));return s(P)&&(j=J(P,function(X){return-1===Z(q,X)})),j},removeDuplicates:re,unique:function ee(P){return re(P)},rotate:K,permutations:function te(P,j){var q=[];if(s(P)){var X=P.slice(0);"number"!=typeof j&&(j=P.length),j?j<=P.length&&(q=t(P,function(ne,oe,he){var ge;return ge=j>1?function U(P,j,q){for(var X=[],ne=0;ne<j.length;ne++)X.push([P].concat(K(j,ne)).slice(0,q));return X}(oe,K(X,he).slice(1),j):[[oe]],ne.concat(ge)},[])):q=[[]]}return q},zip:function ue(){var P=[],j=M(arguments);if(j.length>1){var q=j.shift();s(q)&&(P=t(q,function(X,ne,oe){for(var he=[ne],ge=0;ge<j.length;ge++){var _e=j[ge];s(_e)&&!E.isUndefined(_e[oe])?he.push(_e[oe]):he.push(null)}return X.push(he),X},[]))}return P},transpose:function ie(P){var q,j=[];return s(P)&&P.length&&$(P,function(X){s(X)&&(!q||X.length===q.length)&&($(X,function(ne,oe){j[oe]||(j[oe]=[]),j[oe].push(ne)}),q=X)}),j},valuesAt:function se(P,j){var q=[];if(P=(j=M(arguments)).shift(),s(P)&&j.length)for(var X=0,ne=j.length;X<ne;X++)q.push(P[j[X]]||null);return q},union:function W(){var P=[],j=M(arguments);if(j.length>1){for(var q=0,X=j.length;q<X;q++)P=P.concat(j[q]);P=re(P)}return P},intersect:function le(){var j,X,P=[],q=-1;if(j=arguments.length>1?M(arguments):arguments[0],s(j))for(P=j[0],q=0,X=j.length;++q<X;)P=S(P,j[q]);return re(P)},powerSet:function ae(P){var j=[];return s(P)&&P.length&&(j=t(P,function(q,X){var ne=e(q,function(oe){return oe.concat(X)});return q.concat(ne)},[[]])),j},cartesian:function ce(P,j){var q=[];return s(P)&&s(j)&&P.length&&j.length&&(q=function O(P,j){return n(j,function(q,X){return s(X)||(X=[X]),X.unshift(P),q.unshift(X),q},[])}(P[0],j).concat(ce(P.slice(1),j))),q},compact:function ve(P){var j=[];return s(P)&&P.length&&(j=J(P,function(q){return!E.isUndefinedOrNull(q)})),j},multiply:function Ee(P,j){(j=E.isNumber(j)?j:1)||(j=1),P=v(P||[]);for(var q=[],X=0;++X<=j;)q=q.concat(P);return q},flatten:ye,pluck:function pe(P,j){j=j.split(".");var q=P.slice(0);return $(j,function(X){var ne=X.match(/(\w+)\(\)$/);q=e(q,function(oe){return ne?oe[ne[1]]():oe[X]})}),q},invoke:function G(P,j,q){return q=M(arguments,2),e(P,function(X){return(r(j)?X[j]:j).apply(X,q)})},forEach:$,map:e,filter:J,reduce:t,reduceRight:n,some:function B(P,j,q){if(P&&k&&k===P.some)return P.some(j,q);if(!s(P)||"function"!=typeof j)throw new TypeError;for(var X=Object(P),ne=X.length>>>0,oe=0;oe<ne;oe++)if(oe in X&&j.call(q,X[oe],oe,X))return!0;return!1},every:I,indexOf:Z,lastIndexOf:function V(P,j,q){if(!s(P))throw new TypeError;var X=Object(P),ne=X.length>>>0;if(0===ne)return-1;var oe=ne;arguments.length>2&&((oe=Number(arguments[2]))!=oe?oe=0:0!==oe&&oe!==1/0&&oe!==-1/0&&(oe=(oe>0||-1)*f(u(oe))));for(var he=oe>=0?p(oe,ne-1):ne-u(oe);he>=0;he--)if(he in X&&X[he]===j)return he;return-1}};return x.define(s,Y).expose(Y)}typeof C<"u"?typeof F<"u"&&F.exports&&(F.exports=T(A("extended"),A("is-extended"),A("arguments-extended"))):"function"==typeof define&&define.amd?define(["extended","is-extended","arguments-extended"],function(x,E,w){return T(x,E,w)}):this.arrayExtended=T(this.extended,this.isExtended,this.argumentsExtended)}).call(this)},{"arguments-extended":51,extended:56,"is-extended":66}],53:[function(A,F,C){(function(){"use strict";function T(x,E,w){function r(v,y,L,H){L=L||" ";for(var Q=(v=""+v).length;Q<y;)H?v+=L:v=L+v,Q++;return v}function s(v,y,L){var H=v;if(E.isString(H)){if(v.length>y)if(L){var Q=v.length;H=v.substring(Q-y,Q)}else H=v.substring(0,y)}else H=s(""+H,y);return H}var f=function(){var v=Math.floor,y=Math.round,L={day:function(re,ee){return[ee,"Date",!1]},weekday:function(re,ee){var K,te,ue=ee%5,ie=re.getDay(),se=0;ue?(K=ue,te=parseInt(ee/5,10)):(K=ee>0?5:-5,te=ee>0?(ee-5)/5:(ee+5)/5),6===ie&&ee>0?se=1:0===ie&&ee<0&&(se=-1);var W=ie+K;return(0===W||6===W)&&(se=ee>0?2:-2),[7*te+K+se,"Date",!1]},year:function(re,ee){return[ee,"FullYear",!0]},week:function(re,ee){return[7*ee,"Date",!1]},quarter:function(re,ee){return[3*ee,"Month",!0]},month:function(re,ee){return[ee,"Month",!0]}},Q={quarter:function(re,ee,K){var te=ee.getFullYear()-re.getFullYear(),ue=re[K?"getUTCMonth":"getMonth"](),ie=ee[K?"getUTCMonth":"getMonth"](),se=v(ue/3)+1,W=v(ie/3)+1;return(W+=4*te)-se},weekday:function(re,ee,K){var ue,te=fe("day",re,ee,K),ie=te%7;if(0===ie)te=5*fe("week",re,ee,K);else{var se=0,W=re[K?"getUTCDay":"getDay"](),le=ee[K?"getUTCDay":"getDay"]();ue=parseInt(te/7,10);var ae=new Date(+re);ae.setDate(ae[K?"getUTCDate":"getDate"]()+7*ue);var ce=ae[K?"getUTCDay":"getDay"]();te>0?6===W||6===le?se=-1:0===W?se=0:(0===le||ce+ie>5)&&(se=-2):te<0&&(6===W?se=0:0===W||0===le?se=1:(6===le||ce+ie<0)&&(se=2)),te+=se,te-=2*ue}return te},year:function(z,re){return re.getFullYear()-z.getFullYear()},month:function(z,re,ee){var K=z[ee?"getUTCMonth":"getMonth"]();return re[ee?"getUTCMonth":"getMonth"]()-K+12*(re.getFullYear()-z.getFullYear())},week:function(z,re,ee){return y(fe("day",z,re,ee)/7)},day:function(z,re){return 1.1574074074074074e-8*(re.getTime()-z.getTime())},hour:function(z,re){return 2.7777777777777776e-7*(re.getTime()-z.getTime())},minute:function(z,re){return 16666666666666667e-21*(re.getTime()-z.getTime())},second:function(z,re){return.001*(re.getTime()-z.getTime())},millisecond:function(z,re){return re.getTime()-z.getTime()}};function fe(z,re,ee,K){return z=z.replace(/s$/,""),y(Q[z](re,ee,K))}return{addTransform:function H(z,re,ee){return z=z.replace(/s$/,""),L.hasOwnProperty(z)?L[z](re,ee):[ee,"UTC"+z.charAt(0).toUpperCase()+z.substring(1)+"s",!1]},differenceTransform:fe}}(),u=f.addTransform,o=f.differenceTransform,p=Math.floor,c=Math.round,h=Math.min,_=Math.pow,a=Math.ceil,b=Math.abs,N=["January","February","March","April","May","June","July","August","September","October","November","December"],R=["Jan.","Feb.","Mar.","Apr.","May.","Jun.","Jul.","Aug.","Sep.","Oct.","Nov.","Dec."],g=["Sunday","Monday","Tuesday","Wednesday","Thursday","Frid
1ay","Saturday"],k=["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],M=["Before Christ","Anno Domini"],O=["BC","AD"];function U(v,y){return V.difference(new Date(v.getFullYear(),0,1,v.getHours()),v,null,y)+1}function D(v){var y=v.toString(),L="",H=y.indexOf("(");return H>-1&&(L=y.substring(++H,y.indexOf(")"))),L}var V={getDaysInMonth:function(v){var y=v.getMonth();return 1===y&&V.isLeapYear(v)?29:[31,28,31,30,31,30,31,31,30,31,30,31][y]},isLeapYear:function(v,y){var L=v[y?"getUTCFullYear":"getFullYear"]();return L%400==0||L%4==0&&L%100!=0},isWeekend:function(v,y){var L=(v||new Date)[y?"getUTCDay":"getDay"]();return 0===L||6===L},getTimezoneName:D,compare:function(v,y,L){return v=new Date(+v),y=new Date(+(y||new Date)),"date"===L?(v.setHours(0,0,0,0),y.setHours(0,0,0,0)):"time"===L&&(v.setFullYear(0,0,0),y.setFullYear(0,0,0)),v>y?1:v<y?-1:0},add:function(v,y,L){var H=u(y,v,L||0);L=H[0];var Q=H[1],fe=new Date(+v),z=H[2];return Q&&fe["set"+Q](fe["get"+Q]()+L),z&&fe.getDate()<v.getDate()&&fe.setDate(0),fe},difference:function(v,y,L,H){return o(L=L||"day",v,y=y||new Date,H)},format:function(v,y,L){var H,Q,fe,z,re,ee,K,te;return(L=L||!1)?(H=v.getUTCFullYear(),Q=v.getUTCMonth(),fe=v.getUTCDay(),z=v.getUTCDate(),re=v.getUTCHours(),ee=v.getUTCMinutes(),K=v.getUTCSeconds(),te=v.getUTCMilliseconds()):(H=v.getFullYear(),Q=v.getMonth(),z=v.getDate(),fe=v.getDay(),re=v.getHours(),ee=v.getMinutes(),K=v.getSeconds(),te=v.getMilliseconds()),y.replace(/([A-Za-z])\1*/g,function(ue){var ie,se,W=ue.charAt(0),le=ue.length;if("d"===W)ie=""+z,se=!0;else if("H"!==W||ie)if("m"!==W||ie)if("s"===W)ie||(ie=""+K),se=!0;else if("G"===W)ie=(le<4?O:M)[H<0?0:1];else if("y"===W)ie=H,le>1&&(2===le?ie=s(""+ie,2,!0):se=!0);else if("Q"===W.toUpperCase())ie=a((Q+1)/3),se=!0;else if("M"===W)le<3?(ie=Q+1,se=!0):ie=(3===le?R:N)[Q];else if("w"===W)ie=function S(v,y,L){y=y||0;var H=v[L?"getUTCFullYear":"getFullYear"](),Q=new Date(H,0,1).getDay(),fe=(Q-y+7)%7,z=p((U(v)+fe-1)/7);return Q===y&&z++,z}(v,0,L),se=!0;else if("D"===W)ie=U(v,L),se=!0;else if("E"===W)le<3?(ie=fe+1,se=!0):ie=(-3===le?k:g)[fe];else if("a"===W)ie=re<12?"AM":"PM";else if("h"===W)ie=re%12||12,se=!0;else if("K"===W)ie=re%12,se=!0;else if("k"===W)ie=re||24,se=!0;else if("S"===W)ie=c(te*_(10,le-3)),se=!0;else if("z"===W||"v"===W||"Z"===W){if(ie=D(v),("z"===W||"v"===W)&&!ie&&(le=4),!ie||"Z"===W){var ae=v.getTimezoneOffset(),ce=[ae>=0?"-":"+",r(p(b(ae)/60),2,"0"),r(b(ae)%60,2,"0")];4===le&&(ce.splice(0,0,"GMT"),ce.splice(3,0,":")),ie=ce.join("")}}else ie=ue;else ie=""+ee,se=!0;else ie=""+re,se=!0;return se&&(ie=r(ie,le,"0")),ie})}},J={};
1function $(v){J[v+"sFromNow"]=function(y){return V.add(new Date,v,y)},J[v+"sAgo"]=function(y){return V.add(new Date,v,-y)}}for(var I=["year","month","day","hour","minute","second"],B=0,e=I.length;B<e;B++)$(I[B]);var t={parseDate:function(v,y){if(!y)throw new Error("format required when calling dateExtender.parse");var L=[],H=function Z(v,y){return v.replace(/([a-z])\1*/gi,function(L){var H,Q=L.charAt(0),fe=L.length;if("y"===Q)H="\\d{2,4}";else if("M"===Q)H=fe>2?"\\S+?":"1[0-2]|0?[1-9]";else if("D"===Q)H="[12][0-9][0-9]|3[0-5][0-9]|36[0-6]|0{0,2}[1-9][0-9]|0?[1-9]";else if("d"===Q)H="3[01]|[12]\\d|0?[1-9]";else if("w"===Q)H="[1-4][0-9]|5[0-3]|0?[1-9]";else if("E"===Q)H="\\S+";else if("h"===Q)H="1[0-2]|0?[1-9]";else if("K"===Q)H="1[01]|0?\\d";else if("H"===Q)H="1\\d|2[0-3]|0?\\d";else if("k"===Q)H="1\\d|2[0-4]|0?[1-9]";else if("m"===Q||"s"===Q)H="[0-5]\\d";else if("S"===Q)H="\\d{"+fe+"}";else if("a"===Q){var K="PM";H="AM|PM","AM"!=="AM".toLowerCase()&&(H+="|"+"AM".toLowerCase()),K!==K.toLowerCase()&&(H+="|"+K.toLowerCase()),H=H.replace(/\./g,"\\.")}else H="v"===Q||"z"===Q||"Z"===Q||"G"===Q||"q"===Q||"Q"===Q?".*":" "===Q?"\\s*":Q+"*";return y&&y.push(L),"("+H+")"}).replace(/[\xa0 ]/g,"[\\s\\xa0]")}(y,L),fe=new RegExp("^"+H+"$","i").exec(v);if(!fe)return null;var z=[1970,0,1,0,0,0,0],re="",ee=function d(v,y,L){if(!E.isArray(v)||"function"!=typeof y)throw new TypeError;for(var H=Object(v),Q=H.length>>>0,fe=0;fe<Q;fe++)if(fe in H&&!y.call(L,H[fe],fe,H))return!1;return!0}(fe,function(ce,ve){if(ve){var Ee=L[ve-1],ye=Ee.length,pe=Ee.charAt(0);if("y"===pe)if(ce<100){ce=parseInt(ce,10);var G=""+(new Date).getFullYear(),Y=100*G.substring(0,2),P=h(G.substring(2,4)+20,99);z[0]=ce<P?Y+ce:Y-100+ce}else z[0]=ce;else if("M"===pe){if(ye>2){var q,X,j=N;3===ye&&(j=R),ce=ce.replace(".","").toLowerCase();var ne=!1;for(q=0,X=j.length;q<X&&!ne;q++)j[q].replace(".","").toLocaleLowerCase()===ce&&(ce=q,ne=!0);if(!ne)return!1}else ce--;z[1]=ce}else if("E"===pe||"e"===pe){var he=g;3===ye&&(he=k),ce=ce.toLowerCase(),he=w.map(he,function(xe){return xe.toLowerCase()});var ge=w.indexOf(he,ce);if(-1===ge){if(ce=parseInt(ce,10),isNaN(ce)||ce>he.length)return!1}else ce=ge}else"D"===pe||"d"===pe?("D"===pe&&(z[1]=0),z[2]=ce):"a"===pe?(ce=ce.replace(/\./g,"").toLowerCase(),re="pm"===ce?"p":"am"===ce?"a":""):"k"===pe||"h"===pe||"H"===pe||"K"===pe?("k"===pe&&24==+ce&&(ce=0),z[3]=ce):"m"===pe?z[4]=ce:"s"===pe?z[5]=ce:"S"===pe&&(z[6]=ce)}return!0});if(ee){var K=+z[3];"p"===re&&K<12?z[3]=K+12:"a"===re&&12===K&&(z[3]=0);var te=new Date(z[0],z[1],z[2],z[3],z[4],z[5],z[6]),ue=-1!==w.indexOf(L,"d"),ie=-1!==w.indexOf(L,"M"),se=z[1],W=z[2],le=te.getMonth(),ae=te.getDate();return ie&&le>se||ue&&ae>W?null:te}return null}},n=x.define(E.isDate,V).define(E.isString,t).define(E.isNumber,J);for(B in V)V.hasOwnProperty(B)&&(n[B]=V[B]);for(B in t)t.hasOwnProperty(B)&&(n[B]=t[B]);for(B in J)J.hasOwnProperty(B)&&(n[B]=J[B]);return n}typeof C<"u"?typeof F<"u"&&F.exports&&(F.exports=T(A("extended"),A("is-extended"),A("array-extended"))):"function"==typeof define&&define.amd?define(["extended","is-extended","array-extended"],function(x,E,w){return T(x,E,w)}):this.dateExtended=T(this.extended,this.isExtended,this.arrayExtended)}).call(this)},{"array-extended":52,extended:56,"is-extended":66}],54:[function(A,F,C){!function(){function T(){var w,x=Array.prototype.slice,E=0,r=new Function,s=/(super)/g;function d(I,B){return x.call(I,B=B||0)}function f(I){return"[object Array]"===Object.prototype.toString.call(I)}function o(I){var B=function u(I){return null!=I&&"object"==typeof I}(I);return B&&I.constructor===Object}var p=function(B){return"[object Arguments]"===Object.prototype.toString.call(B)};function c(I,B){if(I&&I.length)for(var e=0,t=I.length;e<t;e++)if(I[e]===B)return e;return-1}function h(I,B,e){var t,n;for(t in B)B.hasOwnProperty(t)&&-1===c(e,t)&&(n=B[t],(!(t in I)||I[t]!==n)&&(I[t]=n));return I}function _(I,B){var e=this.__meta,t=e.supers,n=t.length,v=e.superMeta,y=v.pos;if(n>y){I=I?p(I)||f(I)?I:[I]:[];var Q,L=v.name,H=v.f;do{if("function"==typeof(Q=t[y][L])&&(Q=Q._f||Q)!==H)return v.pos=1+y,Q.apply(this,I)}while(n>++y)}return null}function a(){var I=this.__meta,B=I.supers,e=B.length,t=I.superMeta,n=t.pos;if(e>n){var L,v=t.name,y=t.f;do{if("function"==typeof(L=B[n][v])&&(L=L._f||L)!==y)return t.pos=1+n,L.bind(this)}while(e>++n)}return null}function b(I){var B=this.__getters__;return B.hasOwnProperty(I)?B[I].apply(this):this[I]}function N(I,B){var e=this.__setters__;if(!o(I))return e.hasOwnProperty(I)?e[I].apply(this,d(arguments,1
1)):this[I]=B;for(var t in I){var n=I[t];e.hasOwnProperty(t)?e[I].call(this,n):this[t]=n}}function R(){var I=this.__meta||{},B=I.supers,e=B.length,t=I.superMeta,n=t.pos;if(e>n){var L,v=t.name,y=t.f;do{if("function"==typeof(L=B[n][v])&&(L=L._f||L)!==y)return t.pos=1+n,L.apply(this,arguments)}while(e>++n)}return null}function g(I,B){if(I.toString().match(s)){var e=function(){var n,v=this.__meta||{},y=v.superMeta;switch(v.superMeta={f:I,pos:0,name:B},arguments.length){case 0:n=I.call(this);break;case 1:n=I.call(this,arguments[0]);break;case 2:n=I.call(this,arguments[0],arguments[1]);break;case 3:n=I.call(this,arguments[0],arguments[1],arguments[2]);break;default:n=I.apply(this,arguments)}return v.superMeta=y,n};return e._f=I,e}return I._f=I,I}function k(I,B){var e=B.setters||{},t=I.__setters__,n=I.__getters__;for(var v in e)t.hasOwnProperty(v)||(t[v]=e[v]);for(v in e=B.getters||{})n.hasOwnProperty(v)||(n[v]=e[v]);for(var y in B)if("getters"!==y&&"setters"!==y){var L=B[y];"function"==typeof L?I.hasOwnProperty(y)||(I[y]=g(R,y)):I[y]=L}}function M(){for(var I=d(arguments),B=I.length,e=this.prototype,t=e.__meta,n=this.__meta,v=e.__meta.bases,y=v.slice(),L=n.supers||[],H=t.supers||[],Q=0;Q<B;Q++){var fe=I[Q],z=fe.prototype,re=z.__meta,ee=fe.__meta;!re&&(re=z.__meta={proto:z||{}}),!ee&&(ee=fe.__meta={proto:fe.__proto__||{}}),k(e,re.proto||{}),k(this,ee.proto||{}),O(fe.prototype,H,v),O(fe,L,y)}return this}function O(I,B,e){var t=I.__meta;!t&&(t=I.__meta={});var n=I.__meta.unique;if(!n&&(t.unique="declare"+ ++E),-1===c(e,n)){e.push(n);for(var v=I.__meta.supers||[],y=v.length-1||0;y>=0;)O(v[y--],B,e);B.unshift(I)}}function U(I,B){var e=B.setters,t=I.__setters__,n=I.__getters__;if(e)for(var v in e)t[v]=e[v];if(e=B.getters||{})for(v in e)n[v]=e[v];for(v in B)if("getters"!=v&&"setters"!=v){var y=B[v];I[v]="function"==typeof y?(y.__meta||{}).isConstructor?y:g(y,v):y}}function V(I,B,e){var t={},n=[],v="declare"+ ++E,y=[],L=[],H=[],Q=[],fe={supers:H,unique:v,bases:y,superMeta:{f:null,pos:0,name:null}},z={supers:Q,unique:v,bases:L,isConstructor:!0,superMeta:{f:null,pos:0,name:null}};if(o(B)&&!e&&(e=B,B=w),"function"==typeof B||f(B)?(B=(n=f(B)?B:[B]).shift(),I.__meta=z,t=function Z(I){r.prototype=I.prototype;var B=new r;return r.prototype=null,B}(B),t.__meta=fe,t.__getters__=h({},t.__getters__||{}),t.__setters__=h({},t.__setters__||{}),I.__getters__=h({},I.__getters__||{}),I.__setters__=h({},I.__setters__||{}),O(B.prototype,H,y),O(B,Q,L)):(I.__meta=z,t.__meta=fe,t.__getters__=t.__getters__||{},t.__setters__=t.__setters__||{},I.__getters__=I.__getters__||{},I.__setters__=I.__setters__||{}),I.prototype=t,e){var re=fe.proto=e.instance||{},ee=z.proto=e.static||{};ee.init=ee.init||R,U(t,re),U(I,ee),t.constructor=re.hasOwnProperty("constructor")?g(re.constructor,"constructor"):re.constructor=g(R,"constructor")}else fe.proto={},z.proto={},I.init=g(R,"init"),t.constructor=g(R,"constructor");n.length&&M.apply(I,n),B&&h(I,h(h({},B),I)),t._super=I._super=_,t._getSuper=I._getSuper=a,t._static=I}function J(I,B){function e(){switch(arguments.length){case 0:this.constructor.call(this);break;case 1:this.constructor.call(this,arguments[0]);break;case 2:this.constructor.call(this,arguments[0],arguments[1]);break;case 3:this.constructor.call(this,arguments[0],arguments[1],arguments[2]);break;default:this.constructor.apply(this,arguments)}}return V(e,I,B),e.init()||e}return p(arguments)||(p=function(B){return!(!B||!B.hasOwnProperty("callee"))}),w=J({instance:{get:b,set:N},static:{get:b,set:N,mixin:M,extend:function D(I){return J(this,I)},as:function S(I,B){return I&&B?I[B]=this:I.exports=I=this,this}}}),J.singleton=function $(I,B){var e;function t(){return e||(this.constructor.apply(this,arguments),e=this),e}return V(t,I,B),t.init()||t},J}typeof C<"u"?typeof F<"u"&&F.exports&&(F.exports=T()):"function"==typeof define&&define.amd?define(T):this.declare=T()}()},{}],55:[function(A,F,C){F.exports=A("./declare.js")},{"./declare.js":54}],56:[function(A,F,C){(function(){"use strict";function T(x){function r(){return function w(){var d=x.define();return d.expose({register:function(u,o){o||(o=u,u=null);var p=typeof o;if(u)d[u]=o;else if(o&&"function"===p)d.extend(o);else{if("object"!==p)throw new TypeError("extended.register must be called with an extender function");d.expose(o)}return d},define:function(){return x.define.apply(x,arguments)}}),d}()}return r.define=function(){return x.define.apply(x,arguments)},r}typeof C<"u"?typeof F<"u"&&F.exports&&(F.exports=T(A("extender"))):"function"==typeof define&&define.amd?define(["extender"],function(x){return T(x)}):this.extended=T(this.extender)}).call(this)},{extender:58}],57:[function(A,F,C){(function(){function T(x){var E=Array.prototype.slice;function r(u,o){if(u&&u.length)for(var p=0,c=u.length;p<c;p++)if(u[p]===o)return p;return-1}var d=function(){function o(p,c,h){var _,a;for(_ in c)c.hasOwnProperty(_)&&-1===r(h,_)&&(a=c[_],(!(_ in p)||p[_]!==a)&&(p[_]=a));return p}return function(c){c||(c={});var h=arguments.length,_=arguments[arguments.length-1];!function s(u){return"[object Array]"===Object.prototype.toString.call(u)}(_)?_=[]:h--;for(var a=1;a<h;a++)o(c,arguments[a],_);return c}}();function f(u){u=u||[];var o=x({instance:{constructor:function(g){this._value=g},value:function(){return this._value},eq:function(k){return this.__extender__(this._value===k)},neq:function(k){return this.__extender__(this._value!==k)},print:function(){return console.log(this._value),this}}}),p=[];function c(g,k,M){if("function"!=typeof M)throw new TypeError("when extending type you must provide a function");var O;O="constructor"===k?function(){this._super(arguments),M.apply(this,arguments)}:function(){var S=E.call(arguments);S.unshift(this._value);var D=M.apply(this,S);return void 0!==D?this.__extender__(D):this},g[k]=O}function h(g,k,M){if("function"!=typeof M)throw new TypeError("when extending type you must provide a function");var O;O="constructor"===k?function(){this._super(arguments),M.apply(this,arguments)}:function(){var S=E.call(arguments);return S.unshift(this._value),M.apply(this,S)},g[k]=O}function _(g,k,M){for(var O in k)k.hasOwnProperty(O)&&("getters"!==O&&"setters"!==O?"noWrap"===O?_(g,k[O],!0):M?h(g,O,k[O]):c(g,O,k[O]):g[O]=k[O])}function a(g){var M,O,k=g;if(!(g instanceof o)){var U=o;for(M=0,O=p.length;M<O;M++){var S=p[M];S[0](g)&&(U=U.extend({instance:S[1]}))}(k=new U(g)).__extender__=a}return k}function b(){return!0}return a.define=function N(g,k){if(arguments.length){"object"==typeof g&&(k=g,g=b);var M={};_(M,k=k||{}),M.hasOwnProperty("constructor")||(k.hasOwnProperty("constructor")?c(M,"constructor",k.constructor):M.constructor=function(){this._super(arguments)}),p.push([g,M])}return a},a.extend=function R(g){return g&&g.hasOwnProperty("__defined__")&&(a.__defined__=p=p.concat(g.__defined__)),d(a,g,["define","extend","expose","__defined__"]),a},a.expose=function(){for(var k,M=0,O=arguments.length;M<O;M++)"object"==typeof(k=arguments[M])&&d(a,k,["define","extend","expose","__defined__"]);return a},a.__defined__=p,a}return{define:function(){return f().define.apply(f,arguments)},extend:function(u){return f().define().extend(u)}}}typeof C<"u"?typeof F<"u"&&F.exports&&(F.exports=T(A("declare.js"))):"function"==typeof define&&define.amd?define(["declare"],function(x){return T(x)}):this.extender=T(this.declare)}
1).call(this)},{"declare.js":55}],58:[function(A,F,C){F.exports=A("./extender.js")},{"./extender.js":57}],59:[function(A,F,C){(function(){"use strict";function T(x,E,w){var r=E.isArray,s=E.isObject,d=E.isString,f=E.isFunction,u=w.argsToArray;function o(R,g,k){var M;switch((g||[]).length){case 0:M=R.call(k);break;case 1:M=R.call(k,g[0]);break;case 2:M=R.call(k,g[0],g[1]);break;case 3:M=R.call(k,g[0],g[1],g[2]);break;default:M=R.apply(k,g)}return M}function p(R,g,k){if(k=u(arguments,2),d(g)&&!(g in R))throw new Error(g+" property not defined in scope");if(!d(g)&&!f(g))throw new Error(g+" is not a function");return d(g)?function(){var M=R[g];return f(M)?o(M,k.concat(u(arguments)),R):M}:k.length?function(){return o(g,k.concat(u(arguments)),R)}:function(){return o(g,arguments,R)}}function c(R,g){if(g=u(arguments,1),!d(R)&&!f(R))throw new Error(R+" must be the name of a property or function to execute");return d(R)?function(){var k=u(arguments),M=k.shift(),O=M[R];return f(O)?o(O,k=g.concat(k),M):O}:function(){var k=u(arguments),M=k.shift();return k=g.concat(k),o(R,k,M)}}function h(R,g,k){if(k=u(arguments,2),d(g)&&!(g in R))throw new Error(g+" property not defined in scope");if(!d(g)&&!f(g))throw new Error(g+" is not a function");return d(g)?function(){var M=R[g];return f(M)?o(M,k,R):M}:function(){return o(g,k,R)}}function _(R){var g=u(arguments,1);if(!s(R)&&!f(R))throw new TypeError("scope must be an object");if(1===g.length&&r(g[0])&&(g=g[0]),!g.length)for(var k in g=[],R)R.hasOwnProperty(k)&&f(R[k])&&g.push(k);for(var M=0,O=g.length;M<O;M++)R[g[M]]=p(R,R[g[M]]);return R}function a(R,g){if(g=u(arguments,1),!d(R)&&!f(R))throw new Error(R+" must be the name of a property or function to execute");return d(R)?function(){var k=this[R];return f(k)?o(k,g.concat(u(arguments)),this):k}:function(){var k=g.concat(u(arguments));return o(R,k,this)}}function b(R,g){return function(){var k=u(arguments);return g?o(R,arguments,this):function(){return o(R,k.concat(u(arguments)),this)}}}function N(R,g,k){var M;if(M=k?p(k,g):g,R)for(var O=R-1,U=O;U>=0;U--)M=b(M,U===O);return M}return x.define(s,{bind:p,bindAll:_,bindIgnore:h,curry:function(R,g,k){return N(g,k,R)}}).define(f,{bind:function(R,g){return o(p,[g,R].concat(u(arguments,2)),this)},bindIgnore:function(R,g){return o(h,[g,R].concat(u(arguments,2)),this)},partial:a,applyFirst:c,curry:function(R,g,k){return N(g,R,k)},noWrap:{f:function(){return this.value()}}}).define(d,{bind:function(R,g){return p(g,R)},bindIgnore:function(R,g){return h(g,R)},partial:a,applyFirst:c,curry:function(R,g,k){return N(g,R,k)}}).expose({bind:p,bindAll:_,bindIgnore:h,partial:a,applyFirst:c,curry:N})}typeof C<"u"?typeof F<"u"&&F.exports&&(F.exports=T(A("extended"),A("is-extended"),A("arguments-extended"))):"function"==typeof define&&define.amd?define(["extended","is-extended","arguments-extended"],function(x,E,w){return T(x,E,w)}):this.functionExtended=T(this.extended,this.isExtended,this.argumentsExtended)}).call(this)},{"arguments-extended":51,extended:56,"is-extended":66}],60:[function(A,F,C){var T=A("__browserify_process");T.EventEmitter||(T.EventEmitter=function(){});var x=C.EventEmitter=T.EventEmitter,E="function"==typeof Array.isArray?Array.isArray:function(s){return"[object Array]"===Object.prototype.toString.call(s)};x.prototype.setMaxListeners=function(s){this._events||(this._events={}),this._events.maxListeners=s},x.prototype.emit=function(s){if("error"===s&&(!this._events||!this._events.error||E(this._events.error)&&!this._events.error.length))throw arguments[1]instanceof Error?arguments[1]:new Error("Uncaught, unspecified 'error' event.");if(!this._events)return!1;var d=this._events[s];if(!d)return!1;if("function"==typeof d){switch(arguments.length){case 1:d.call(this);break;case 2:d.call(this,arguments[1]);break;case 3:d.call(this,arguments[1],arguments[2]);break;default:var f=Array.prototype.slice.call(arguments,1);d.apply(this,f)}return!0}if(E(d)){f=Array.prototype.slice.call(arguments,1);for(var u=d.slice(),o=0,p=u.length;o<p;o++)u[o].apply(this,f);return!0}return!1},x.prototype.addListener=function(s,d){if("function"!=typeof d)throw new Error("addListener only takes instances of Function");if(this._events||(this._events={}
1),this.emit("newListener",s,d),this._events[s])if(E(this._events[s])){var f;this._events[s].warned||(f=void 0!==this._events.maxListeners?this._events.maxListeners:10)&&f>0&&this._events[s].length>f&&(this._events[s].warned=!0,console.error("(node) warning: possible EventEmitter memory leak detected. %d listeners added. Use emitter.setMaxListeners() to increase limit.",this._events[s].length),console.trace()),this._events[s].push(d)}else this._events[s]=[this._events[s],d];else this._events[s]=d;return this},x.prototype.on=x.prototype.addListener,x.prototype.once=function(s,d){var f=this;return f.on(s,function u(){f.removeListener(s,u),d.apply(this,arguments)}),this},x.prototype.removeListener=function(s,d){if("function"!=typeof d)throw new Error("removeListener only takes instances of Function");if(!this._events||!this._events[s])return this;var f=this._events[s];if(E(f)){var u=function w(s,d){if(s.indexOf)return s.indexOf(d);for(var f=0;f<s.length;f++)if(d===s[f])return f;return-1}(f,d);if(u<0)return this;f.splice(u,1),0==f.length&&delete this._events[s]}else this._events[s]===d&&delete this._events[s];return this},x.prototype.removeAllListeners=function(s){return 0===arguments.length?(this._events={},this):(s&&this._events&&this._events[s]&&(this._events[s]=null),this)},x.prototype.listeners=function(s){return this._events||(this._events={}),this._events[s]||(this._events[s]=[]),E(this._events[s])||(this._events[s]=[this._events[s]]),this._events[s]},x.listenerCount=function(s,d){return s._events&&s._events[d]?"function"==typeof s._events[d]?1:s._events[d].length:0}},{__browserify_process:64}],61:[function(A,F,C){},{}],62:[function(A,F,C){var T=A("__browserify_process");function x(r,s){for(var d=[],f=0;f<r.length;f++)s(r[f],f,r)&&d.push(r[f]);return d}function E(r,s){for(var d=0,f=r.length;f>=0;f--){var u=r[f];"."==u?r.splice(f,1):".."===u?(r.splice(f,1),d++):d&&(r.splice(f,1),d--)}if(s)for(;d--;d)r.unshift("..");return r}var w=/^(.+\/(?!$)|\/)?((?:.+?)?(\.[^.]*)?)$/;C.resolve=function(){for(var r="",s=!1,d=arguments.length;d>=-1&&!s;d--){var f=d>=0?arguments[d]:T.cwd();"string"!=typeof f||!f||(r=f+"/"+r,s="/"===f.charAt(0))}return(s?"/":"")+(r=E(x(r.split("/"),function(u){return!!u}),!s).join("/"))||"."},C.normalize=function(r){var s="/"===r.charAt(0),d="/"===r.slice(-1);return!(r=E(x(r.split("/"),function(f){return!!f}),!s).join("/"))&&!s&&(r="."),r&&d&&(r+="/"),(s?"/":"")+r},C.join=function(){var r=Array.prototype.slice.call(arguments,0);return C.normalize(x(r,function(s,d){return s&&"string"==typeof s}).join("/"))},C.dirname=function(r){var s=w.exec(r)[1]||"";return s?1===s.length?s:s.substring(0,s.length-1):"."},C.basename=function(r,s){var d=w.exec(r)[2]||"";return s&&d.substr(-1*s.length)===s&&(d=d.substr(0,d.length-s.length)),d},C.extname=function(r){return w.exec(r)[3]||""},C.relative=function(r,s){function d(_){for(var a=0;a<_.length&&""===_[a];a++);for(var b=_.length-1;b>=0&&""===_[b];b--);return a>b?[]:_.slice(a,b-a+1)}r=C.resolve(r).substr(1),s=C.resolve(s).substr(1);for(var f=d(r.split("/")),u=d(s.split("/")),o=Math.min(f.length,u.length),p=o,c=0;c<o;c++)if(f[c]!==u[c]){p=c;break}var h=[];for(c=p;c<f.length;c++)h.push("..");return(h=h.concat(u.slice(p))).join("/")},C.sep="/"},{__browserify_process:64}],63:[function(A,F,C){A=function(T,x,E,w){function r(d){if(!E[d]){if(!x[d]){if(T)return T(d);throw new Error("Cannot find module '"+d+"'")}var f=E[d]={exports:{}};x[d][0](function(u){return r(x[d][1][u]||u)},f,f.exports)}return E[d].exports}for(var s=0;s<w.length;s++)r(w[s]);return r}(typeof A<"u"&&A,{1:[function(T,x,E){var w=T("util"),r=T("buffer").Buffer,s=Array.prototype.slice;function d(g){if(Object.keys)return Object.keys(g);var k=[];for(var M in g)Object.prototype.hasOwnProperty.call(g,M)&&k.push(M);return k}var f=x.exports=c;function u(g,k){return void 0===k?""+k:"number"==typeof k&&(isNaN(k)||!isFinite(k))||"function"==typeof k||k instanceof RegExp?k.toString():k}function o(g,k){return"string"==typeof g?g.length<k?g:g.slice(0,k):g}function p(g,k,M,O,U){throw new f.AssertionError({message:M,actual:g,expected:k,operator:O,stackStartFunction:U})}function c(g,k){g||p(g,!0,k,"==",f.ok)}function h(g,k){if(g===k)return!0;
1if(r.isBuffer(g)&&r.isBuffer(k)){if(g.length!=k.length)return!1;for(var M=0;M<g.length;M++)if(g[M]!==k[M])return!1;return!0}return g instanceof Date&&k instanceof Date?g.getTime()===k.getTime():"object"!=typeof g&&"object"!=typeof k?g==k:function b(g,k){if(_(g)||_(k)||g.prototype!==k.prototype)return!1;if(a(g))return!!a(k)&&h(g=s.call(g),k=s.call(k));try{var U,S,M=d(g),O=d(k)}catch{return!1}if(M.length!=O.length)return!1;for(M.sort(),O.sort(),S=M.length-1;S>=0;S--)if(M[S]!=O[S])return!1;for(S=M.length-1;S>=0;S--)if(!h(g[U=M[S]],k[U]))return!1;return!0}(g,k)}function _(g){return null==g}function a(g){return"[object Arguments]"==Object.prototype.toString.call(g)}function N(g,k){return!(!g||!k)&&(k instanceof RegExp?k.test(g):g instanceof k||!0===k.call({},g))}function R(g,k,M,O){var U;"string"==typeof M&&(O=M,M=null);try{k()}catch(S){U=S}if(O=(M&&M.name?" ("+M.name+").":".")+(O?" "+O:"."),g&&!U&&p("Missing expected exception"+O),!g&&N(U,M)&&p("Got unwanted exception"+O),g&&U&&M&&!N(U,M)||!g&&U)throw U}f.AssertionError=function(k){this.name="AssertionError",this.message=k.message,this.actual=k.actual,this.expected=k.expected,this.operator=k.operator,Error.captureStackTrace&&Error.captureStackTrace(this,k.stackStartFunction||p)},w.inherits(f.AssertionError,Error),f.AssertionError.prototype.toString=function(){return this.message?[this.name+":",this.message].join(" "):[this.name+":",o(JSON.stringify(this.actual,u),128),this.operator,o(JSON.stringify(this.expected,u),128)].join(" ")},f.AssertionError.__proto__=Error.prototype,f.fail=p,f.ok=c,f.equal=function(k,M,O){k!=M&&p(k,M,O,"==",f.equal)},f.notEqual=function(k,M,O){k==M&&p(k,M,O,"!=",f.notEqual)},f.deepEqual=function(k,M,O){h(k,M)||p(k,M,O,"deepEqual",f.deepEqual)},f.notDeepEqual=function(k,M,O){h(k,M)&&p(k,M,O,"notDeepEqual",f.notDeepEqual)},f.strictEqual=function(k,M,O){k!==M&&p(k,M,O,"===",f.strictEqual)},f.notStrictEqual=function(k,M,O){k===M&&p(k,M,O,"!==",f.notStrictEqual)},f.throws=function(g,k,M){R.apply(this,[!0].concat(s.call(arguments)))},f.doesNotThrow=function(g,k,M){R.apply(this,[!1].concat(s.call(arguments)))},f.ifError=function(g){if(g)throw g}},{util:2,buffer:3}],2:[function(T,x,E){function r(a){return a instanceof Array||Array.isArray(a)||a&&a!==Object.prototype&&r(a.__proto__)}function s(a){return a instanceof RegExp||"object"==typeof a&&"[object RegExp]"===Object.prototype.toString.call(a)}function d(a){if(a instanceof Date)return!0;if("object"!=typeof a)return!1;var b=Date.prototype&&c(Date.prototype),N=a.__proto__&&c(a.__proto__);return JSON.stringify(N)===JSON.stringify(b)}T("events"),E.isArray=r,E.isDate=function(a){return"[object Date]"===Object.prototype.toString.call(a)},E.isRegExp=function(a){return"[object RegExp]"===Object.prototype.toString.call(a)},E.print=function(){},E.puts=function(){},E.debug=function(){},E.inspect=function(a,b,N,R){var g=[],k=function(O,U){var S={bold:[1,22],italic:[3,23],underline:[4,24],inverse:[7,27],white:[37,39],grey:[90,39],black:[30,39],blue:[34,39],cyan:[36,39],green:[32,39],magenta:[35,39],red:[31,39],yellow:[33,39]},D={special:"cyan",number:"blue",boolean:"yellow",undefined:"grey",null:"bold",string:"green",date:"magenta",regexp:"red"}[U];return D?"\x1b["+S[D][0]+"m"+O+"\x1b["+S[D][1]+"m":O};return R||(k=function(O,U){return O}),function M(O,U){if(O&&"function"==typeof O.inspect&&O!==E&&(!O.constructor||O.constructor.prototype!==O))return O.inspect(U);switch(typeof O){case"undefined":return k("undefined","undefined");case"string":var S="'"+JSON.stringify(O).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return k(S,"string");case"number":return k(""+O,"number");case"boolean":return k(""+O,"boolean")}if(null===O)return k("null","null");var J,$,I,D=p(O),Z=b?c(O):D;if("function"==typeof O&&0===Z.length)return s(O)?k(""+O,"regexp"):k("[Function"+(O.name?": "+O.name:"")+"]","special");if(d(O)&&0===Z.length)return k(O.toUTCString(),"date");if(r(O)?($="Array",I=["[","]"]):($="Object",I=["{","}"]),"function"==typeof O){var B=O.name?": "+O.name:"";J=s(O)?" "+O:" [Function"+B+"]"}else J="";if(d(O)&&(J=" "+O.toUTCString()),0===Z.length)return I[0]+J+I[1];if(U<0)return s(O)?k(""+O,"regexp"):k("[Object]","special");g.push(O);var e=Z.map(function(v){var y,L;if(O.__lookupGetter__&&(O.__lookupGetter__(v)?L=O.__lookupSetter__(v)?k("[Getter/Setter]","special"):k("[Getter]","special"):O.__lookupSetter__(v)&&(L=k("[Setter]","special"))),D.indexOf(v)<0&&(y="["+v+"]"),L||(g.indexOf(O[v])<0?(L=null===U?M(O[v]):M(O[v],U-1)).indexOf("\n")>
1-1&&(L=r(O)?L.split("\n").map(function(H){return"  "+H}).join("\n").substr(2):"\n"+L.split("\n").map(function(H){return"   "+H}).join("\n")):L=k("[Circular]","special")),typeof y>"u"){if("Array"===$&&v.match(/^\d+$/))return L;(y=JSON.stringify(""+v)).match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(y=y.substr(1,y.length-2),y=k(y,"name")):(y=y.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),y=k(y,"string"))}return y+": "+L});return g.pop(),e.reduce(function(v,y){return y.indexOf("\n"),v+y.length+1},0)>50?I[0]+(""===J?"":J+"\n ")+" "+e.join(",\n  ")+" "+I[1]:I[0]+J+" "+e.join(", ")+" "+I[1]}(a,typeof N>"u"?2:N)},E.log=function(a){},E.pump=null;var p=Object.keys||function(a){var b=[];for(var N in a)b.push(N);return b},c=Object.getOwnPropertyNames||function(a){var b=[];for(var N in a)Object.hasOwnProperty.call(a,N)&&b.push(N);return b},h=Object.create||function(a,b){var N;if(null===a)N={__proto__:null};else{if("object"!=typeof a)throw new TypeError("typeof prototype["+typeof a+"] != 'object'");var R=function(){};R.prototype=a,(N=new R).__proto__=a}return typeof b<"u"&&Object.defineProperties&&Object.defineProperties(N,b),N};E.inherits=function(a,b){a.super_=b,a.prototype=h(b.prototype,{constructor:{value:a,enumerable:!1,writable:!0,configurable:!0}})};var _=/%[sdj%]/g;E.format=function(a){if("string"!=typeof a){for(var b=[],N=0;N<arguments.length;N++)b.push(E.inspect(arguments[N]));return b.join(" ")}N=1;for(var R=arguments,g=R.length,k=String(a).replace(_,function(O){if("%%"===O)return"%";if(N>=g)return O;switch(O){case"%s":return String(R[N++]);case"%d":return Number(R[N++]);case"%j":return JSON.stringify(R[N++]);default:return O}}),M=R[N];N<g;M=R[++N])k+=null===M||"object"!=typeof M?" "+M:" "+E.inspect(M);return k}},{events:4}],5:[function(T,x,E){E.readIEEE754=function(w,r,s,d,f){var u,o,p=8*f-d-1,c=(1<<p)-1,h=c>>1,_=-7,a=s?0:f-1,b=s?1:-1,N=w[r+a];for(a+=b,u=N&(1<<-_)-1,N>>=-_,_+=p;_>0;u=256*u+w[r+a],a+=b,_-=8);for(o=u&(1<<-_)-1,u>>=-_,_+=d;_>0;o=256*o+w[r+a],a+=b,_-=8);if(0===u)u=1-h;else{if(u===c)return o?NaN:1/0*(N?-1:1);o+=Math.pow(2,d),u-=h}return(N?-1:1)*o*Math.pow(2,u-d)},E.writeIEEE754=function(w,r,s,d,f,u){var o,p,c,h=8*u-f-1,_=(1<<h)-1,a=_>>1,b=23===f?Math.pow(2,-24)-Math.pow(2,-77):0,N=d?u-1:0,R=d?-1:1,g=r<0||0===r&&1/r<0?1:0;for(r=Math.abs(r),isNaN(r)||r===1/0?(p=isNaN(r)?1:0,o=_):(o=Math.floor(Math.log(r)/Math.LN2),r*(c=Math.pow(2,-o))<1&&(o--,c*=2),(r+=o+a>=1?b/c:b*Math.pow(2,1-a))*c>=2&&(o++,c/=2),o+a>=_?(p=0,o=_):o+a>=1?(p=(r*c-1)*Math.pow(2,f),o+=a):(p=r*Math.pow(2,a-1)*Math.pow(2,f),o=0));f>=8;w[s+N]=255&p,N+=R,p/=256,f-=8);for(o=o<<f|p,h+=f;h>0;w[s+N]=255&o,N+=R,o/=256,h-=8);w[s+N-R]|=128*g}},{}],6:[function(T,x,E){var w=x.exports={};w.nextTick=function(){var r=typeof window<"u"&&window.setImmediate,s=typeof window<"u"&&window.postMessage&&window.addEventListener;if(r)return function(f){return window.setImmediate(f)};if(s){var d=[];return window.addEventListener("message",function(f){f.source===window&&"process-tick"===f.data&&(f.stopPropagation(),d.length>0)&&d.shift()()},!0),function(u){d.push(u),window.postMessage("process-tick","*")}}return function(u){setTimeout(u,0)}}(),w.title="browser",w.browser=!0,w.env={},w.argv=[],w.binding=function(r){throw new Error("process.binding is not supported")},w.cwd=function(){return"/"},w.chdir=function(r){throw new Error("process.chdir is not supported")}},{}],4:[function(T,x,E){!function(w){w.EventEmitter||(w.EventEmitter=function(){});var r=E.EventEmitter=w.EventEmitter,s="function"==typeof Array.isArray?Array.isArray:function(u){return"[object Array]"===Object.prototype.toString.call(u)};r.prototype.setMaxListeners=function(u){this._events||(this._events={}),this._events.maxListeners=u},r.prototype.emit=function(u){if("error"===u&&(!this._events||!this._events.error||s(this._events.error)&&!this._events.error.length))throw arguments[1]instanceof Error?arguments[1]:new Error("Uncaught, unspecified 'error' event.");if(!this._events)return!1;var o=this._events[u];if(!o)return!1;if("function"==typeof o){switch(arguments.length){case 1:o.call(this);break;case 2:o.call(this,arguments[1]);break;case 3:o.call(this,arguments[1],arguments[2]);break;
1default:var p=Array.prototype.slice.call(arguments,1);o.apply(this,p)}return!0}if(s(o)){p=Array.prototype.slice.call(arguments,1);for(var c=o.slice(),h=0,_=c.length;h<_;h++)c[h].apply(this,p);return!0}return!1},r.prototype.addListener=function(u,o){if("function"!=typeof o)throw new Error("addListener only takes instances of Function");if(this._events||(this._events={}),this.emit("newListener",u,o),this._events[u])if(s(this._events[u])){var p;this._events[u].warned||(p=void 0!==this._events.maxListeners?this._events.maxListeners:10)&&p>0&&this._events[u].length>p&&(this._events[u].warned=!0,console.error("(node) warning: possible EventEmitter memory leak detected. %d listeners added. Use emitter.setMaxListeners() to increase limit.",this._events[u].length),console.trace()),this._events[u].push(o)}else this._events[u]=[this._events[u],o];else this._events[u]=o;return this},r.prototype.on=r.prototype.addListener,r.prototype.once=function(u,o){var p=this;return p.on(u,function c(){p.removeListener(u,c),o.apply(this,arguments)}),this},r.prototype.removeListener=function(u,o){if("function"!=typeof o)throw new Error("removeListener only takes instances of Function");if(!this._events||!this._events[u])return this;var p=this._events[u];if(s(p)){var c=function d(u,o){if(u.indexOf)return u.indexOf(o);for(var p=0;p<u.length;p++)if(o===u[p])return p;return-1}(p,o);if(c<0)return this;p.splice(c,1),0==p.length&&delete this._events[u]}else this._events[u]===o&&delete this._events[u];return this},r.prototype.removeAllListeners=function(u){return 0===arguments.length?(this._events={},this):(u&&this._events&&this._events[u]&&(this._events[u]=null),this)},r.prototype.listeners=function(u){return this._events||(this._events={}),this._events[u]||(this._events[u]=[]),s(this._events[u])||(this._events[u]=[this._events[u]]),this._events[u]}}(T("__browserify_process"))},{__browserify_process:6}],"buffer-browserify":[function(T,x,E){x.exports=T("q9TxCC")},{}],q9TxCC:[function(T,x,E){function w(e){this.length=e}var a,r=T("assert");function s(e){return e<16?"0"+e.toString(16):e.toString(16)}function d(e){for(var t=[],n=0;n<e.length;n++)if(e.charCodeAt(n)<=127)t.push(e.charCodeAt(n));else for(var v=encodeURIComponent(e.charAt(n)).substr(1).split("%"),y=0;y<v.length;y++)t.push(parseInt(v[y],16));return t}function u(e){return T("base64-js").toByteArray(e)}function o(e,t,n,v){for(var L=0;L<v&&!(L+n>=t.length||L>=e.length);)t[L+n]=e[L],L++;return L}function p(e){try{return decodeURIComponent(e)}catch{return String.fromCharCode(65533)}}function c(e){return(e=~~Math.ceil(+e))<0?0:e}function h(e,t,n){if(!(this instanceof h))return new h(e,t,n);var v;if("number"==typeof n)this.length=c(t),this.parent=e,this.offset=n;else{switch(v=typeof e){case"number":this.length=c(e);break;case"string":this.length=h.byteLength(e,t);break;case"object":this.length=c(e.length);break;default:throw new Error("First argument needs to be a number, array or string.")}if(this.length>h.poolSize?(this.parent=new w(this.length),this.offset=0):((!a||a.length-a.used<this.length)&&function b(){(a=new w(h.poolSize)).used=0}(),this.parent=a,this.offset=a.used,a.used+=this.length),function _(e){return Array.isArray(e)||h.isBuffer(e)||e&&"object"==typeof e&&"number"==typeof e.length}(e))for(var y=0;y<this.length;y++)this.parent[y+this.offset]=e instanceof h?e.readUInt8(y):e[y];else"string"==v&&(this.length=this.write(e,0,t))}}function N(e,t,n,v){var y=0;return v||(r.ok("boolean"==typeof n,"missing or invalid endian"),r.ok(null!=t,"missing offset"),r.ok(t+1<e.length,"Trying to read beyond buffer length")),t>=e.length?0:(n?(y=e.parent[e.offset+t]<<8,t+1<e.length&&(y|=e.parent[e.offset+t+1])):(y=e.parent[e.offset+t],t+1<e.length&&(y|=e.parent[e.offset+t+1]<<8)),y)}function R(e,t,n,v){var y=0;return v||(r.ok("boolean"==typeof n,"missing or invalid endian"),r.ok(null!=t,"missing offset"),r.ok(t+3<e.length,"Trying to read beyond buffer length")),t>=e.length?0:(n?(t+1<e.length&&(y=e.parent[e.offset+t+1]<<16),t+2<e.length&&(y|=e.parent[e.offset+t+2]<<8),t+3<e.length&&(y|=e.parent[e.offset+t+3]),y+=e.parent[e.offset+t]<<24>>>0):(t+2<e.length&&(y=e.parent[e.offset+t+2]<<16),t+1<e.length&&(y|=e.parent[e.offset+t+1]<<8),y|=e.parent[e.offset+t],t+3<e.length&&(y+=e.parent[e.offset+t+3]<<24>>>0)),y)}function g(e,t,n,v){var L;return v||(r.ok("boolean"==typeof n,"missing or invalid endian"),r.ok(null!=t,"missing offset"),r.ok(t+1<e.length,"Trying to read beyond buffer length")),32768&(L=N(e,t,n,v))?-1*(65535-L+1):L}function k(e,t,n,v){var L;return v||(r.ok("boolean"==typeof n,"missing or invalid endian"),r.ok(null!=t,"missing offset"),r.ok(t+3<e.length,"Trying to read beyond buffer length")),2147483648&(L=R(e,t,n,v))?-1*(4294967295-L+1):L}function M(e,t,n,v){return v||(r.ok("boolean"==typeof n,"missing or invalid endian"),r.ok(t+3<e.length,"Trying to read beyond buffer length")),T("./buffer_ieee754").readIEEE754(e,t,n,23,4)}function O(e,t,n,v){return v||(r.ok("boolean"==typeof n,"missing or invalid endian"),r.ok(t+7<e.length,"Trying to read beyond buffer length")),T("./buffer_ieee754").readIEEE754(e,t,n,52,8)}function U(e,t){r.ok("number"==typeof e,"cannot write a non-number as a number"),r.ok(e>=0,"specified a negative value for writing an unsigned value"),r.ok(e<=t,"value is larger than maximum value for type"),r.ok(Math.floor(e)===e,"value has a fractional component")}function S(e,t,n,v,y){y||(r.ok(null!=t,"missing value"),r.ok("boolean"==typeof v,"missing or invalid endian"),r.ok(null!=n,"missing offset"),r.ok(n+1<e.length,"trying to write beyond buffer length"),U(t,65535));for(var L=0;L<Math.min(e.length-n,2);
1L++)e.parent[e.offset+n+L]=(t&255<<8*(v?1-L:L))>>>8*(v?1-L:L)}function D(e,t,n,v,y){y||(r.ok(null!=t,"missing value"),r.ok("boolean"==typeof v,"missing or invalid endian"),r.ok(null!=n,"missing offset"),r.ok(n+3<e.length,"trying to write beyond buffer length"),U(t,4294967295));for(var L=0;L<Math.min(e.length-n,4);L++)e.parent[e.offset+n+L]=t>>>8*(v?3-L:L)&255}function Z(e,t,n){r.ok("number"==typeof e,"cannot write a non-number as a number"),r.ok(e<=t,"value larger than maximum allowed value"),r.ok(e>=n,"value smaller than minimum allowed value"),r.ok(Math.floor(e)===e,"value has a fractional component")}function V(e,t,n){r.ok("number"==typeof e,"cannot write a non-number as a number"),r.ok(e<=t,"value larger than maximum allowed value"),r.ok(e>=n,"value smaller than minimum allowed value")}function J(e,t,n,v,y){y||(r.ok(null!=t,"missing value"),r.ok("boolean"==typeof v,"missing or invalid endian"),r.ok(null!=n,"missing offset"),r.ok(n+1<e.length,"Trying to write beyond buffer length"),Z(t,32767,-32768)),S(e,t>=0?t:65535+t+1,n,v,y)}function $(e,t,n,v,y){y||(r.ok(null!=t,"missing value"),r.ok("boolean"==typeof v,"missing or invalid endian"),r.ok(null!=n,"missing offset"),r.ok(n+3<e.length,"Trying to write beyond buffer length"),Z(t,2147483647,-2147483648)),D(e,t>=0?t:4294967295+t+1,n,v,y)}function I(e,t,n,v,y){y||(r.ok(null!=t,"missing value"),r.ok("boolean"==typeof v,"missing or invalid endian"),r.ok(null!=n,"missing offset"),r.ok(n+3<e.length,"Trying to write beyond buffer length"),V(t,34028234663852886e22,-34028234663852886e22)),T("./buffer_ieee754").writeIEEE754(e,t,n,v,23,4)}function B(e,t,n,v,y){y||(r.ok(null!=t,"missing value"),r.ok("boolean"==typeof v,"missing or invalid endian"),r.ok(null!=n,"missing offset"),r.ok(n+7<e.length,"Trying to write beyond buffer length"),V(t,17976931348623157e292,-17976931348623157e292)),T("./buffer_ieee754").writeIEEE754(e,t,n,v,52,8)}E.INSPECT_MAX_BYTES=50,w.byteLength=function(e,t){switch(t||"utf8"){case"hex":return e.length/2;case"utf8":case"utf-8":return d(e).length;case"ascii":case"binary":return e.length;case"base64":return u(e).length;default:throw new Error("Unknown encoding")}},w.prototype.utf8Write=function(e,t,n){return w._charsWritten=o(d(e),this,t,n)},w.prototype.asciiWrite=function(e,t,n){return w._charsWritten=o(function f(e){for(var t=[],n=0;n<e.length;n++)t.push(255&e.charCodeAt(n));return t}(e),this,t,n)},w.prototype.binaryWrite=w.prototype.asciiWrite,w.prototype.base64Write=function(e,t,n){return w._charsWritten=o(u(e),this,t,n)},w.prototype.base64Slice=function(e,t){var n=Array.prototype.slice.apply(this,arguments);return T("base64-js").fromByteArray(n)},w.prototype.utf8Slice=function(){for(var e=Array.prototype.slice.apply(this,arguments),t="",n="",v=0;v<e.length;)e[v]<=127?(t+=p(n)+String.fromCharCode(e[v]),n=""):n+="%"+e[v].toString(16),v++;return t+p(n)},w.prototype.asciiSlice=function(){for(var e=Array.prototype.slice.apply(this,arguments),t="",n=0;n<e.length;n++)t+=String.fromCharCode(e[n]);return t},w.prototype.binarySlice=w.prototype.asciiSlice,w.prototype.inspect=function(){for(var e=[],t=this.length,n=0;n<t;n++)if(e[n]=s(this[n]),n==E.INSPECT_MAX_BYTES){e[n+1]="...";break}return"<SlowBuffer "+e.join(" ")+">"},w.prototype.hexSlice=function(e,t){var n=this.length;(!e||e<0)&&(e=0),(!t||t<0||t>n)&&(t=n);for(var v="",y=e;y<t;y++)v+=s(this[y]);return v},w.prototype.toString=function(e,t,n){if(e=String(e||"utf8").toLowerCase(),typeof n>"u"&&(n=this.length),+n==(t=+t||0))return"";switch(e){case"hex":return this.hexSlice(t,n);case"utf8":case"utf-8":return this.utf8Slice(t,n);case"ascii":return this.asciiSlice(t,n);case"binary":return this.binarySlice(t,n);case"base64":return this.base64Slice(t,n);case"ucs2":case"ucs-2":return this.ucs2Slice(t,n);default:throw new Error("Unknown encoding")}},w.prototype.hexWrite=function(e,t,n){var v=this.length-(t=+t||0);n?(n=+n)>v&&(n=v):n=v;var y=e.length;if(y%2)throw new Error("Invalid hex string");n>y/2&&(n=y/2);for(var L=0;L<n;L++){var H=parseInt(e.substr(2*L,2),16);if(isNaN(H))throw new Error("Invalid hex string");this[t+L]=H}return w._charsWritten=2*L,L},w.prototype.write=function(e,t,n,v){if(isFinite(t))isFinite(n)||(v=n,n=void 0);else{var y=v;v=t,t=n,n=y}var L=this.length-(t=+t||0);switch(n?(n=+n)>L&&(n=L):n=L,v=String(v||"utf8").toLowerCase()){case"hex":return this.hexWrite(e,t,n);case"utf8":case"utf-8":return this.utf8Write(e,t,n);case"ascii":return this.asciiWrite(e,t,n);case"binary":return this.binaryWrite(e,t,n);case"base64":return this.base64Write(e,t,n);case"ucs2":case"ucs-2":return this.ucs2Write(e,t,n);default:throw new Error("Unknown encoding")}},w.prototype.slice=function(e,t){if(void 0===t&&(t=this.length),t>this.length)throw new Error("oob");if(e>t)throw new Error("oob");return new h(this,t-e,+e)},w.prototype.copy=function(e,t,n,v){for(var y=[],L=n;L<v;L++)r.ok(typeof this[L]<"u","copying undefined buffer bytes!"),y.push(this[L]);for(L=t;L<t+y.length;L++)e[L]=y[L-t]},w.prototype.fill=function(e,t,n){if(n>this.length)throw new Error("oob");if(t>n)throw new Error("oob");for(var v=t;v<n;v++)this[v]=e},E.SlowBuffer=w,E.Buffer=h,h.poolSize=8192,h.isBuffer=function(t){return t instanceof h||t instanceof w},h.concat=function(e,t){if(!Array.isArray(e))throw new Error("Usage: Buffer.concat(list, [totalLength])\n       list should be an Array.");if(0===e.length)return new h(0);if(1===e.length)return e[0];if("number"!=typeof t){t=0;for(var n=0;n<e.length;n++)t+=(v=e[n]).length}var y=new h(t),L=0;for(n=0;n<e.length;n++){var v;(v=e[n]).copy(y,L),L+=v.length}return y},h.prototype.inspect=function(){for(var t=[],n=this.length,v=0;v<n;v++)if(t[v]=s(this.parent[v+this.offset]),v==E.INSPECT_MAX_BYTES){t[v+1]="...";break}
1return"<Buffer "+t.join(" ")+">"},h.prototype.get=function(t){if(t<0||t>=this.length)throw new Error("oob");return this.parent[this.offset+t]},h.prototype.set=function(t,n){if(t<0||t>=this.length)throw new Error("oob");return this.parent[this.offset+t]=n},h.prototype.write=function(e,t,n,v){if(isFinite(t))isFinite(n)||(v=n,n=void 0);else{var y=v;v=t,t=n,n=y}var H,L=this.length-(t=+t||0);switch(n?(n=+n)>L&&(n=L):n=L,v=String(v||"utf8").toLowerCase()){case"hex":H=this.parent.hexWrite(e,this.offset+t,n);break;case"utf8":case"utf-8":H=this.parent.utf8Write(e,this.offset+t,n);break;case"ascii":H=this.parent.asciiWrite(e,this.offset+t,n);break;case"binary":H=this.parent.binaryWrite(e,this.offset+t,n);break;case"base64":H=this.parent.base64Write(e,this.offset+t,n);break;case"ucs2":case"ucs-2":H=this.parent.ucs2Write(e,this.offset+t,n);break;default:throw new Error("Unknown encoding")}return h._charsWritten=w._charsWritten,H},h.prototype.toString=function(e,t,n){switch(e=String(e||"utf8").toLowerCase(),typeof t>"u"||t<0?t=0:t>this.length&&(t=this.length),typeof n>"u"||n>this.length?n=this.length:n<0&&(n=0),t+=this.offset,n+=this.offset,e){case"hex":return this.parent.hexSlice(t,n);case"utf8":case"utf-8":return this.parent.utf8Slice(t,n);case"ascii":return this.parent.asciiSlice(t,n);case"binary":return this.parent.binarySlice(t,n);case"base64":return this.parent.base64Slice(t,n);case"ucs2":case"ucs-2":return this.parent.ucs2Slice(t,n);default:throw new Error("Unknown encoding")}},h.byteLength=w.byteLength,h.prototype.fill=function(t,n,v){if(t||(t=0),n||(n=0),v||(v=this.length),"string"==typeof t&&(t=t.charCodeAt(0)),"number"!=typeof t||isNaN(t))throw new Error("value is not a number");if(v<n)throw new Error("end < start");if(v===n||0==this.length)return 0;if(n<0||n>=this.length)throw new Error("start out of bounds");if(v<0||v>this.length)throw new Error("end out of bounds");return this.parent.fill(t,n+this.offset,v+this.offset)},h.prototype.copy=function(e,t,n,v){var y=this;if(n||(n=0),v||(v=this.length),t||(t=0),v<n)throw new Error("sourceEnd < sourceStart");if(v===n||0==e.length||0==y.length)return 0;if(t<0||t>=e.length)throw new Error("targetStart out of bounds");if(n<0||n>=y.length)throw new Error("sourceStart out of bounds");if(v<0||v>y.length)throw new Error("sourceEnd out of bounds");return v>this.length&&(v=this.length),e.length-t<v-n&&(v=e.length-t+n),this.parent.copy(e.parent,t+e.offset,n+this.offset,v+this.offset)},h.prototype.slice=function(e,t){if(void 0===t&&(t=this.length),t>this.length)throw new Error("oob");if(e>t)throw new Error("oob");return new h(this.parent,t-e,+e+this.offset)},h.prototype.utf8Slice=function(e,t){return this.toString("utf8",e,t)},h.prototype.binarySlice=function(e,t){return this.toString("binary",e,t)},h.prototype.asciiSlice=function(e,t){return this.toString("ascii",e,t)},h.prototype.utf8Write=function(e,t){return this.write(e,t,"utf8")},h.prototype.binaryWrite=function(e,t){return this.write(e,t,"binary")},h.prototype.asciiWrite=function(e,t){return this.write(e,t,"ascii")},h.prototype.readUInt8=function(e,t){var n=this;if(t||(r.ok(null!=e,"missing offset"),r.ok(e<n.length,"Trying to read beyond buffer length")),!(e>=n.length))return n.parent[n.offset+e]},h.prototype.readUInt16LE=function(e,t){return N(this,e,!1,t)},h.prototype.readUInt16BE=function(e,t){return N(this,e,!0,t)},h.prototype.readUInt32LE=function(e,t){return R(this,e,!1,t)},h.prototype.readUInt32BE=function(e,t){return R(this,e,!0,t)},h.prototype.readInt8=function(e,t){var n=this;if(t||(r.ok(null!=e,"missing offset"),r.ok(e<n.length,"Trying to read beyond buffer length")),!(e>=n.length))return 128&n.parent[n.offset+e]?-1*(255-n.parent[n.offset+e]+1):n.parent[n.offset+e]},h.prototype.readInt16LE=function(e,t){return g(this,e,!1,t)},h.prototype.readInt16BE=function(e,t){return g(this,e,!0,t)},h.prototype.readInt32LE=function(e,t){return k(this,e,!1,t)},h.prototype.readInt32BE=function(e,t){return k(this,e,!0,t)},h.prototype.readFloatLE=function(e,t){return M(this,e,!1,t)},h.prototype.readFloatBE=function(e,t){return M(this,e,!0,t)},h.prototype.readDoubleLE=function(e,t){return O(this,e,!1,t)},h.prototype.readDoubleBE=function(e,t){return O(this,e,!0,t)},h.prototype.writeUInt8=function(e,t,n){var v=this;n||(r.ok(null!=e,"missing value"),r.ok(null!=t,"missing offset"),r.ok(t<v.length,"trying to write beyond buffer length"),U(e,255)),t<v.length&&(v.parent[v.offset+t]=e)},h.prototype.writeUInt16LE=function(e,t,n){S(this,e,t,!1,n)},h.prototype.writeUInt16BE=function(e,t,n){S(this,e,t,!0,n)},h.prototype.writeUInt32LE=function(e,t,n){D(this,e,t,!1,n)},h.prototype.writeUInt32BE=function(e,t,n){D(this,e,t,!0,n)},h.prototype.writeInt8=function(e,t,n){n||(r.ok(null!=e,"missing value"),r.ok(null!=t,"missing offset"),r.ok(t<this.length,"Trying to write beyond buffer length"),Z(e,127,-128)),this.writeUInt8(e>=0?e:255+e+1,t,n)},h.prototype.writeInt16LE=function(e,t,n){J(this,e,t,!1,n)},h.prototype.writeInt16BE=function(e,t,n){J(this,e,t,!0,n)},h.prototype.writeInt32LE=function(e,t,n){$(this,e,t,!1,n)},h.prototype.writeInt32BE=function(e,t,n){$(this,e,t,!0,n)},h.prototype.writeFloatLE=function(e,t,n){I(this,e,t,!1,n)},h.prototype.writeFloatBE=function(e,t,n){I(this,e,t,!0,n)},h.prototype.writeDoubleLE=function(e,t,n){B(this,e,t,!1,n)},h.prototype.writeDoubleBE=function(e,t,n){B(this,e,t,!0,n)},w.prototype.readUInt8=h.prototype.readUInt8,w.prototype.readUInt16LE=h.prototype.readUInt16LE,w.prototype.readUInt16BE=h.prototype.readUInt16BE,w.prototype.readUInt32LE=h.prototype.readUInt32LE,w.prototype.readUInt32BE=h.prototype.readUInt32BE,w.prototype.readInt8=h.prototype.readInt8,w.prototype.readInt16LE=h.prototype.readInt16LE,w.prototype.readInt16BE=h.prototype.readInt16BE,w.prototype.readInt32LE=h.prototype.readInt32LE,w.prototype.readInt32BE=h.prototype.readInt32BE,w.prototype.readFloatLE=h.prototype.readFloatLE,w.prototype.readFloatBE=h.prototype.readFloatBE,w.prototype.readDoubleLE=h.prototype.readDoubleLE,w.prototype.readDoubleBE=h.prototype.readDoubleBE,w.prototype.writeUInt8=h.prototype.writeUInt8,w.prototype.writeUInt16LE=h.prototype.writeUInt16LE,w.prototype.writeUInt16BE=h.prototype.writeUInt16BE,w.prototype.writeUInt32LE=h.prototype.writeUInt32LE,w.prototype.writeUInt32BE=h.prototype.writeUInt32BE,w.prototype.writeInt8=h.prototype.writeInt8,w.prototype.writeInt16LE=h.prototype.writeInt16LE,w.prototype.writeInt16BE=h.prototype.writeInt16BE,w.prototype.writeInt32LE=h.prototype.writeInt32LE,w.prototype.writeInt32BE=h.prototype.writeInt32BE,w.prototype.writeFloatLE=h.prototype.writeFloatLE,w.prototype.writeFloatBE=h.prototype.writeFloatBE,w.prototype.writeDoubleLE=h.prototype.writeDoubleLE,w.prototype.writeDoubleBE=h.prototype.writeDoubleBE},{assert:1,"./buffer_ieee754":5,"base64-js":7}],7:[function(T,x,E){!function(w){"use strict";var r="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789
1+/";x.exports.toByteArray=function s(f){var u,o,p,c,h,_;if(f.length%4>0)throw"Invalid string. Length must be a multiple of 4";for(_=[],p=(h=(h=f.indexOf("="))>0?f.length-h:0)>0?f.length-4:f.length,u=0,o=0;u<p;u+=4,o+=3)c=r.indexOf(f[u])<<18|r.indexOf(f[u+1])<<12|r.indexOf(f[u+2])<<6|r.indexOf(f[u+3]),_.push((16711680&c)>>16),_.push((65280&c)>>8),_.push(255&c);return 2===h?(c=r.indexOf(f[u])<<2|r.indexOf(f[u+1])>>4,_.push(255&c)):1===h&&(c=r.indexOf(f[u])<<10|r.indexOf(f[u+1])<<4|r.indexOf(f[u+2])>>2,_.push(c>>8&255),_.push(255&c)),_},x.exports.fromByteArray=function d(f){var u,c,h,a,o=f.length%3,p="";for(u=0,h=f.length-o;u<h;u+=3)p+=r[(a=c=(f[u]<<16)+(f[u+1]<<8)+f[u+2])>>18&63]+r[a>>12&63]+r[a>>6&63]+r[63&a];switch(o){case 1:p+=r[(c=f[f.length-1])>>2],p+=r[c<<4&63],p+="==";break;case 2:p+=r[(c=(f[f.length-2]<<8)+f[f.length-1])>>10],p+=r[c>>4&63],p+=r[c<<2&63],p+="="}return p}}()},{}],8:[function(T,x,E){E.readIEEE754=function(w,r,s,d,f){var u,o,p=8*f-d-1,c=(1<<p)-1,h=c>>1,_=-7,a=s?0:f-1,b=s?1:-1,N=w[r+a];for(a+=b,u=N&(1<<-_)-1,N>>=-_,_+=p;_>0;u=256*u+w[r+a],a+=b,_-=8);for(o=u&(1<<-_)-1,u>>=-_,_+=d;_>0;o=256*o+w[r+a],a+=b,_-=8);if(0===u)u=1-h;else{if(u===c)return o?NaN:1/0*(N?-1:1);o+=Math.pow(2,d),u-=h}return(N?-1:1)*o*Math.pow(2,u-d)},E.writeIEEE754=function(w,r,s,d,f,u){var o,p,c,h=8*u-f-1,_=(1<<h)-1,a=_>>1,b=23===f?Math.pow(2,-24)-Math.pow(2,-77):0,N=d?u-1:0,R=d?-1:1,g=r<0||0===r&&1/r<0?1:0;for(r=Math.abs(r),isNaN(r)||r===1/0?(p=isNaN(r)?1:0,o=_):(o=Math.floor(Math.log(r)/Math.LN2),r*(c=Math.pow(2,-o))<1&&(o--,c*=2),(r+=o+a>=1?b/c:b*Math.pow(2,1-a))*c>=2&&(o++,c/=2),o+a>=_?(p=0,o=_):o+a>=1?(p=(r*c-1)*Math.pow(2,f),o+=a):(p=r*Math.pow(2,a-1)*Math.pow(2,f),o=0));f>=8;w[s+N]=255&p,N+=R,p/=256,f-=8);for(o=o<<f|p,h+=f;h>0;w[s+N]=255&o,N+=R,o/=256,h-=8);w[s+N-R]|=128*g}},{}],3:[function(T,x,E){function w(e){this.length=e}var a,r=T("assert");function s(e){return e<16?"0"+e.toString(16):e.toString(16)}function d(e){for(var t=[],n=0;n<e.length;n++)if(e.charCodeAt(n)<=127)t.push(e.charCodeAt(n));else for(var v=encodeURIComponent(e.charAt(n)).substr(1).split("%"),y=0;y<v.length;y++)t.push(parseInt(v[y],16));return t}function u(e){return T("base64-js").toByteArray(e)}function o(e,t,n,v){for(var L=0;L<v&&!(L+n>=t.length||L>=e.length);)t[L+n]=e[L],L++;return L}function p(e){try{return decodeURIComponent(e)}catch{return String.fromCharCode(65533)}}function c(e){return(e=~~Math.ceil(+e))<0?0:e}function h(e,t,n){if(!(this instanceof h))return new h(e,t,n);var v;if("number"==typeof n)this.length=c(t),this.parent=e,this.offset=n;else{switch(v=typeof e){case"number":this.length=c(e);break;case"string":this.length=h.byteLength(e,t);break;case"object":this.length=c(e.length);break;default:throw new Error("First argument needs to be a number, array or string.")}if(this.length>h.poolSize?(this.parent=new w(this.length),this.offset=0):((!a||a.length-a.used<this.length)&&function b(){(a=new w(h.poolSize)).used=0}(),this.parent=a,this.offset=a.used,a.used+=this.length),function _(e){return Array.isArray(e)||h.isBuffer(e)||e&&"object"==typeof e&&"number"==typeof e.length}(e))for(var y=0;y<this.length;y++)this.parent[y+this.offset]=e[y];else"string"==v&&(this.length=this.write(e,0,t))}}function N(e,t,n,v){var y=0;return v||(r.ok("boolean"==typeof n,"missing or invalid endian"),r.ok(null!=t,"missing offset"),r.ok(t+1<e.length,"Trying to read beyond buffer length")),n?(y=e.parent[e.offset+t]<<8,y|=e.parent[e.offset+t+1]):(y=e.parent[e.offset+t],y|=e.parent[e.offset+t+1]<<8),y}function R(e,t,n,v){var y=0;return v||(r.ok("boolean"==typeof n,"missing or invalid endian"),r.ok(null!=t,"missing offset"),r.ok(t+3<e.length,"Trying to read beyond buffer length")),n?(y=e.parent[e.offset+t+1]<<16,y|=e.parent[e.offset+t+2]<<8,y|=e.parent[e.offset+t+3],y+=e.parent[e.offset+t]<<24>>>0):(y=e.parent[e.offset+t+2]<<16,y|=e.parent[e.offset+t+1]<<8,y|=e.parent[e.offset+t],y+=e.parent[e.offset+t+3]<<24>>>0),y}function g(e,t,n,v){var L;return v||(r.ok("boolean"==typeof n,"missing or invalid endian"),r.ok(null!=t,"missing offset"),r.ok(t+1<e.length,"Trying to read beyond buffer length")),32768&(L=N(e,t,n,v))?-1*(65535-L+1):L}function k(e,t,n,v){var L;return v||(r.ok("boolean"==typeof n,"missing or invalid endian"),r.ok(null!=t,"missing offset"),r.ok(t+3<e.length,"Trying to read beyond buffer length")),2147483648&(L=R(e,t,n,v))?-1*(4294967295-L+1):L}function M(e,t,n,v){return v||(r.ok("boolean"==typeof n,"missing or invalid endian"),r.ok(t+3<e.length,"Trying to read beyond buffer length")),T("./buffer_ieee754").readIEEE754(e,t,n,23,4)}function O(e,t,n,v){return v||(r.ok("boolean"==typeof n,"missing or invalid endian"),r.ok(t+7<e.length,"Trying to read beyond buffer length")),T("./buffer_ieee754").readIEEE754(e,t,n,52,8)}function U(e,t){r.ok("number"==typeof e,"cannot write a non-number as a number"),r.ok(e>=0,"specified a negative value for writing an unsigned value"),r.ok(e<=t,"value is larger than maximum value for type"),r.ok(Math.floor(e)===e,"value has a fractional component")}function S(e,t,n,v,y){y||(r.ok(null!=t,"missing value"),r.ok("boolean"==typeof v,"missing or invalid endian"),r.ok(null!=n,"missing offset"),r.ok(n+1<e.length,"trying to write beyond buffer length"),U(t,65535)),v?(e.parent[e.offset+n]=(65280&t)>>>8,e.parent[e.offset+n+1]=255&t):(e.parent[e.offset+n+1]=(65280&t)>>>8,e.parent[e.offset+n]=255&t)}function D(e,t,n,v,y){y||(r.ok(null!=t,"missing value"),r.ok("boolean"==typeof v,"missing or invalid endian"),r.ok(null!=n,"missing offset"),r.ok(n+3<e.length,"trying to write beyond buffer length"),U(t,4294967295)),v?(e.parent[e.offset+n]=t>>
1>24&255,e.parent[e.offset+n+1]=t>>>16&255,e.parent[e.offset+n+2]=t>>>8&255,e.parent[e.offset+n+3]=255&t):(e.parent[e.offset+n+3]=t>>>24&255,e.parent[e.offset+n+2]=t>>>16&255,e.parent[e.offset+n+1]=t>>>8&255,e.parent[e.offset+n]=255&t)}function Z(e,t,n){r.ok("number"==typeof e,"cannot write a non-number as a number"),r.ok(e<=t,"value larger than maximum allowed value"),r.ok(e>=n,"value smaller than minimum allowed value"),r.ok(Math.floor(e)===e,"value has a fractional component")}function V(e,t,n){r.ok("number"==typeof e,"cannot write a non-number as a number"),r.ok(e<=t,"value larger than maximum allowed value"),r.ok(e>=n,"value smaller than minimum allowed value")}function J(e,t,n,v,y){y||(r.ok(null!=t,"missing value"),r.ok("boolean"==typeof v,"missing or invalid endian"),r.ok(null!=n,"missing offset"),r.ok(n+1<e.length,"Trying to write beyond buffer length"),Z(t,32767,-32768)),S(e,t>=0?t:65535+t+1,n,v,y)}function $(e,t,n,v,y){y||(r.ok(null!=t,"missing value"),r.ok("boolean"==typeof v,"missing or invalid endian"),r.ok(null!=n,"missing offset"),r.ok(n+3<e.length,"Trying to write beyond buffer length"),Z(t,2147483647,-2147483648)),D(e,t>=0?t:4294967295+t+1,n,v,y)}function I(e,t,n,v,y){y||(r.ok(null!=t,"missing value"),r.ok("boolean"==typeof v,"missing or invalid endian"),r.ok(null!=n,"missing offset"),r.ok(n+3<e.length,"Trying to write beyond buffer length"),V(t,34028234663852886e22,-34028234663852886e22)),T("./buffer_ieee754").writeIEEE754(e,t,n,v,23,4)}function B(e,t,n,v,y){y||(r.ok(null!=t,"missing value"),r.ok("boolean"==typeof v,"missing or invalid endian"),r.ok(null!=n,"missing offset"),r.ok(n+7<e.length,"Trying to write beyond buffer length"),V(t,17976931348623157e292,-17976931348623157e292)),T("./buffer_ieee754").writeIEEE754(e,t,n,v,52,8)}E.INSPECT_MAX_BYTES=50,w.byteLength=function(e,t){switch(t||"utf8"){case"hex":return e.length/2;case"utf8":case"utf-8":return d(e).length;case"ascii":return e.length;case"base64":return u(e).length;default:throw new Error("Unknown encoding")}},w.prototype.utf8Write=function(e,t,n){return w._charsWritten=o(d(e),this,t,n)},w.prototype.asciiWrite=function(e,t,n){return w._charsWritten=o(function f(e){for(var t=[],n=0;n<e.length;n++)t.push(255&e.charCodeAt(n));return t}(e),this,t,n)},w.prototype.base64Write=function(e,t,n){return w._charsWritten=o(u(e),this,t,n)},w.prototype.base64Slice=function(e,t){var n=Array.prototype.slice.apply(this,arguments);return T("base64-js").fromByteArray(n)},w.prototype.utf8Slice=function(){for(var e=Array.prototype.slice.apply(this,arguments),t="",n="",v=0;v<e.length;)e[v]<=127?(t+=p(n)+String.fromCharCode(e[v]),n=""):n+="%"+e[v].toString(16),v++;return t+p(n)},w.prototype.asciiSlice=function(){for(var e=Array.prototype.slice.apply(this,arguments),t="",n=0;n<e.length;n++)t+=String.fromCharCode(e[n]);return t},w.prototype.inspect=function(){for(var e=[],t=this.length,n=0;n<t;n++)if(e[n]=s(this[n]),n==E.INSPECT_MAX_BYTES){e[n+1]="...";break}return"<SlowBuffer "+e.join(" ")+">"},w.prototype.hexSlice=function(e,t){var n=this.length;(!e||e<0)&&(e=0),(!t||t<0||t>n)&&(t=n);for(var v="",y=e;y<t;y++)v+=s(this[y]);return v},w.prototype.toString=function(e,t,n){if(e=String(e||"utf8").toLowerCase(),typeof n>"u"&&(n=this.length),+n==(t=+t||0))return"";switch(e){case"hex":return this.hexSlice(t,n);case"utf8":case"utf-8":return this.utf8Slice(t,n);case"ascii":return this.asciiSlice(t,n);case"binary":return this.binarySlice(t,n);case"base64":return this.base64Slice(t,n);case"ucs2":case"ucs-2":return this.ucs2Slice(t,n);default:throw new Error("Unknown encoding")}},w.prototype.hexWrite=function(e,t,n){var v=this.length-(t=+t||0);n?(n=+n)>v&&(n=v):n=v;var y=e.length;if(y%2)throw new Error("Invalid hex string");n>y/2&&(n=y/2);for(var L=0;L<n;L++){var H=parseInt(e.substr(2*L,2),16);if(isNaN(H))throw new Error("Invalid hex string");this[t+L]=H}return w._charsWritten=2*L,L},w.prototype.write=function(e,t,n,v){if(isFinite(t))isFinite(n)||(v=n,n=void 0);else{var y=v;v=t,t=n,n=y}var L=this.length-(t=+t||0);switch(n?(n=+n)>L&&(n=L):n=L,v=String(v||"utf8").toLowerCase()){case"hex":return this.hexWrite(e,t,n);case"utf8":case"utf-8":return this.utf8Write(e,t,n);case"ascii":return this.asciiWrite(e,t,n);case"binary":return this.binaryWrite(e,t,n);case"base64":return this.base64Write(e,t,n);case"ucs2":case"ucs-2":return this.ucs2Write(e,t,n);default:throw new Error("Unknown encoding")}},w.prototype.slice=function(e,t){if(void 0===t&&(t=this.length),t>this.length)throw new Error("oob");if(e>t)throw new Error("oob");return new h(this,t-e,+e)},w.prototype.copy=function(e,t,n,v){for(var y=[],L=n;L<v;L++)r.ok(typeof this[L]<"u","copying undefined buffer bytes!"),y.push(this[L]);for(L=t;L<t+y.length;L++)e[L]=y[L-t]},E.SlowBuffer=w,E.Buffer=h,h.poolSize=8192,h.isBuffer=function(t){return t instanceof h||t instanceof w},h.concat=function(e,t){if(!Array.isArray(e))throw new Error("Usage: Buffer.concat(list, [totalLength])\n       list should be an Array.");if(0===e.length)return new h(0);if(1===e.length)return e[0];if("number"!=typeof t){t=0;for(var n=0;n<e.length;n++)t+=(v=e[n]).length}var y=new h(t),L=0;for(n=0;n<e.length;n++){var v;(v=e[n]).copy(y,L),L+=v.length}return y},h.prototype.inspect=function(){for(var t=[],n=this.length,v=0;v<n;v++)if(t[v]=s(this.parent[v+this.offset]),v==E.INSPECT_MAX_BYTES){t[v+1]="...";break}
1return"<Buffer "+t.join(" ")+">"},h.prototype.get=function(t){if(t<0||t>=this.length)throw new Error("oob");return this.parent[this.offset+t]},h.prototype.set=function(t,n){if(t<0||t>=this.length)throw new Error("oob");return this.parent[this.offset+t]=n},h.prototype.write=function(e,t,n,v){if(isFinite(t))isFinite(n)||(v=n,n=void 0);else{var y=v;v=t,t=n,n=y}var H,L=this.length-(t=+t||0);switch(n?(n=+n)>L&&(n=L):n=L,v=String(v||"utf8").toLowerCase()){case"hex":H=this.parent.hexWrite(e,this.offset+t,n);break;case"utf8":case"utf-8":H=this.parent.utf8Write(e,this.offset+t,n);break;case"ascii":H=this.parent.asciiWrite(e,this.offset+t,n);break;case"binary":H=this.parent.binaryWrite(e,this.offset+t,n);break;case"base64":H=this.parent.base64Write(e,this.offset+t,n);break;case"ucs2":case"ucs-2":H=this.parent.ucs2Write(e,this.offset+t,n);break;default:throw new Error("Unknown encoding")}return h._charsWritten=w._charsWritten,H},h.prototype.toString=function(e,t,n){switch(e=String(e||"utf8").toLowerCase(),typeof t>"u"||t<0?t=0:t>this.length&&(t=this.length),typeof n>"u"||n>this.length?n=this.length:n<0&&(n=0),t+=this.offset,n+=this.offset,e){case"hex":return this.parent.hexSlice(t,n);case"utf8":case"utf-8":return this.parent.utf8Slice(t,n);case"ascii":return this.parent.asciiSlice(t,n);case"binary":return this.parent.binarySlice(t,n);case"base64":return this.parent.base64Slice(t,n);case"ucs2":case"ucs-2":return this.parent.ucs2Slice(t,n);default:throw new Error("Unknown encoding")}},h.byteLength=w.byteLength,h.prototype.fill=function(t,n,v){if(t||(t=0),n||(n=0),v||(v=this.length),"string"==typeof t&&(t=t.charCodeAt(0)),"number"!=typeof t||isNaN(t))throw new Error("value is not a number");if(v<n)throw new Error("end < start");if(v===n||0==this.length)return 0;if(n<0||n>=this.length)throw new Error("start out of bounds");if(v<0||v>this.length)throw new Error("end out of bounds");return this.parent.fill(t,n+this.offset,v+this.offset)},h.prototype.copy=function(e,t,n,v){var y=this;if(n||(n=0),v||(v=this.length),t||(t=0),v<n)throw new Error("sourceEnd < sourceStart");if(v===n||0==e.length||0==y.length)return 0;if(t<0||t>=e.length)throw new Error("targetStart out of bounds");if(n<0||n>=y.length)throw new Error("sourceStart out of bounds");if(v<0||v>y.length)throw new Error("sourceEnd out of bounds");return v>this.length&&(v=this.length),e.length-t<v-n&&(v=e.length-t+n),this.parent.copy(e.parent,t+e.offset,n+this.offset,v+this.offset)},h.prototype.slice=function(e,t){if(void 0===t&&(t=this.length),t>this.length)throw new Error("oob");if(e>t)throw new Error("oob");return new h(this.parent,t-e,+e+this.offset)},h.prototype.utf8Slice=function(e,t){return this.toString("utf8",e,t)},h.prototype.binarySlice=function(e,t){return this.toString("binary",e,t)},h.prototype.asciiSlice=function(e,t){return this.toString("ascii",e,t)},h.prototype.utf8Write=function(e,t){return this.write(e,t,"utf8")},h.prototype.binaryWrite=function(e,t){return this.write(e,t,"binary")},h.prototype.asciiWrite=function(e,t){return this.write(e,t,"ascii")},h.prototype.readUInt8=function(e,t){var n=this;return t||(r.ok(null!=e,"missing offset"),r.ok(e<n.length,"Trying to read beyond buffer length")),n.parent[n.offset+e]},h.prototype.readUInt16LE=function(e,t){return N(this,e,!1,t)},h.prototype.readUInt16BE=function(e,t){return N(this,e,!0,t)},h.prototype.readUInt32LE=function(e,t){return R(this,e,!1,t)},h.prototype.readUInt32BE=function(e,t){return R(this,e,!0,t)},h.prototype.readInt8=function(e,t){var n=this;return t||(r.ok(null!=e,"missing offset"),r.ok(e<n.length,"Trying to read beyond buffer length")),128&n.parent[n.offset+e]?-1*(255-n.parent[n.offset+e]+1):n.parent[n.offset+e]},h.prototype.readInt16LE=function(e,t){return g(this,e,!1,t)},h.prototype.readInt16BE=function(e,t){return g(this,e,!0,t)},h.prototype.readInt32LE=function(e,t){return k(this,e,!1,t)},h.prototype.readInt32BE=function(e,t){return k(this,e,!0,t)},h.prototype.readFloatLE=function(e,t){return M(this,e,!1,t)},h.prototype.readFloatBE=function(e,t){return M(this,e,!0,t)},h.prototype.readDoubleLE=function(e,t){return O(this,e,!1,t)},h.prototype.readDoubleBE=function(e,t){return O(this,e,!0,t)},h.prototype.writeUInt8=function(e,t,n){var v=this;n||(r.ok(null!=e,"missing value"),r.ok(null!=t,"missing offset"),r.ok(t<v.length,"trying to write beyond buffer length"),U(e,255)),v.parent[v.offset+t]=e},h.prototype.writeUInt16LE=function(e,t,n){S(this,e,t,!1,n)},h.prototype.writeUInt16BE=function(e,t,n){S(this,e,t,!0,n)},h.prototype.writeUInt32LE=function(e,t,n){D(this,e,t,!1,n)},h.prototype.writeUInt32BE=function(e,t,n){D(this,e,t,!0,n)},h.prototype.writeInt8=function(e,t,n){n||(r.ok(null!=e,"missing value"),r.ok(null!=t,"missing offset"),r.ok(t<this.length,"Trying to write beyond buffer length"),Z(e,127,-128)),this.writeUInt8(e>=0?e:255+e+1,t,n)},h.prototype.writeInt16LE=function(e,t,n){J(this,e,t,!1,n)},h.prototype.writeInt16BE=function(e,t,n){J(this,e,t,!0,n)},h.prototype.writeInt32LE=function(e,t,n){$(this,e,t,!1,n)},h.prototype.writeInt32BE=function(e,t,n){$(this,e,t,!0,n)},h.prototype.writeFloatLE=function(e,t,n){I(this,e,t,!1,n)},h.prototype.writeFloatBE=function(e,t,n){I(this,e,t,!0,n)},h.prototype.writeDoubleLE=function(e,t,n){B(this,e,t,!1,n)},h.prototype.writeDoubleBE=function(e,t,n){B(this,e,t,!0,n)},w.prototype.readUInt8=h.prototype.readUInt8,w.prototype.readUInt16LE=h.prototype.readUInt16LE,w.prototype.readUInt16BE=h.prototype.readUInt16BE,w.prototype.readUInt32LE=h.prototype.readUInt32LE,w.prototype.readUInt32BE=h.prototype.readUInt32BE,w.prototype.readInt8=h.prototype.readInt8,w.prototype.readInt16LE=h.prototype.readInt16LE,w.prototype.readInt16BE=h.prototype.readInt16BE,w.prototype.readInt32LE=h.prototype.readInt32LE,w.prototype.readInt32BE=h.prototype.readInt32BE,w.prototype.readFloatLE=h.prototype.readFloatLE,w.prototype.readFloatBE=h.prototype.readFloatBE,w.prototype.readDoubleLE=h.prototype.readDoubleLE,w.prototype.readDoubleBE=h.prototype.readDoubleBE,w.prototype.writeUInt8=h.prototype.writeUInt8,w.prototype.writeUInt16LE=h.prototype.writeUInt16LE,w.prototype.writeUInt16BE=h.prototype.writeUInt16BE,w.prototype.writeUInt32LE=h.prototype.writeUInt32LE,w.prototype.writeUInt32BE=h.prototype.writeUInt32BE,w.prototype.writeInt8=h.prototype.writeInt8,w.prototype.writeInt16LE=h.prototype.writeInt16LE,w.prototype.writeInt16BE=h.prototype.writeInt16BE,w.prototype.writeInt32LE=h.prototype.writeInt32LE,w.prototype.writeInt32BE=h.prototype.writeInt32BE,w.prototype.writeFloatLE=h.prototype.writeFloatLE,w.prototype.writeFloatBE=h.prototype.writeFloatBE,w.prototype.writeDoubleLE=h.prototype.writeDoubleLE,w.prototype.writeDoubleBE=h.prototype.writeDoubleBE},{assert:1,"./buffer_ieee754":8,"base64-js":9}],9:[function(T,x,E){!function(w){"use strict";var r="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789
1+/";x.exports.toByteArray=function s(f){var u,o,p,c,h,_;if(f.length%4>0)throw"Invalid string. Length must be a multiple of 4";for(_=[],p=(h=(h=f.indexOf("="))>0?f.length-h:0)>0?f.length-4:f.length,u=0,o=0;u<p;u+=4,o+=3)c=r.indexOf(f[u])<<18|r.indexOf(f[u+1])<<12|r.indexOf(f[u+2])<<6|r.indexOf(f[u+3]),_.push((16711680&c)>>16),_.push((65280&c)>>8),_.push(255&c);return 2===h?(c=r.indexOf(f[u])<<2|r.indexOf(f[u+1])>>4,_.push(255&c)):1===h&&(c=r.indexOf(f[u])<<10|r.indexOf(f[u+1])<<4|r.indexOf(f[u+2])>>2,_.push(c>>8&255),_.push(255&c)),_},x.exports.fromByteArray=function d(f){var u,c,h,a,o=f.length%3,p="";for(u=0,h=f.length-o;u<h;u+=3)p+=r[(a=c=(f[u]<<16)+(f[u+1]<<8)+f[u+2])>>18&63]+r[a>>12&63]+r[a>>6&63]+r[63&a];switch(o){case 1:p+=r[(c=f[f.length-1])>>2],p+=r[c<<4&63],p+="==";break;case 2:p+=r[(c=(f[f.length-2]<<8)+f[f.length-1])>>10],p+=r[c>>4&63],p+=r[c<<2&63],p+="="}return p}}()},{}]},{},[]),F.exports=A("buffer-browserify")},{}],64:[function(A,F,C){var T=F.exports={};T.nextTick=function(){var x=typeof window<"u"&&window.setImmediate,E=typeof window<"u"&&window.postMessage&&window.addEventListener;if(x)return function(r){return window.setImmediate(r)};if(E){var w=[];return window.addEventListener("message",function(r){var s=r.source;(s===window||null===s)&&"process-tick"===r.data&&(r.stopPropagation(),w.length>0)&&w.shift()()},!0),function(s){w.push(s),window.postMessage("process-tick","*")}}return function(s){setTimeout(s,0)}}(),T.title="browser",T.browser=!0,T.env={},T.argv=[],T.binding=function(x){throw new Error("process.binding is not supported")},T.cwd=function(){return"/"},T.chdir=function(x){throw new Error("process.chdir is not supported")}},{}],65:[function(A,F,C){(function(){"use strict";function T(x){var E=function(r){return"string"==typeof r?r:"object"==typeof r&&r.hashCode?r.hashCode():""+r},w=x.declare({instance:{constructor:function(){this.__entries=[],this.__keys=[],this.__values=[]},pushValue:function(r,s){return this.__keys.push(r),this.__values.push(s),this.__entries.push({key:r,value:s}),s},remove:function(r){for(var f,d=this.__entries,u=this.__keys,o=this.__values,p=d.length-1;p>=0;p--)if((f=d[p])&&f.key===r)return d.splice(p,1),u.splice(p,1),o.splice(p,1),f.value;return null},set:function(r,s){for(var d=null,f=this.__entries,u=this.__values,o=f.length-1;o>=0;o--){var p=f[o];if(p&&r===p.key){u[o]=s,p.value=s,d=s;break}}return d||f.push({key:r,value:s}),d},find:function(r){for(var f,s=null,d=this.__entries,u=d.length-1;u>=0;u--)if((f=d[u])&&r===f.key){s=f.value;break}return s},getEntrySet:function(){return this.__entries},getKeys:function(){return this.__keys},getValues:function(r){return this.__values}}});return x.declare({instance:{constructor:function(){this.__map={}},entrySet:function(){var r=[],s=this.__map;for(var d in s)s.hasOwnProperty(d)&&(r=r.concat(s[d].getEntrySet()));return r},put:function(r,s){var d=E(r),f=null;return(f=this.__map[d])||(f=this.__map[d]=new w),f.pushValue(r,s),s},remove:function(r){var s=E(r),d=null,f=this.__map[s];return f&&(d=f.remove(r)),d},get:function(r){var f,s=E(r),d=null;return(f=this.__map[s])&&(d=f.find(r)),d},set:function(r,s){var d=E(r),u=null,o=this.__map;return(u=o[d])?u.set(r,s):(o[d]=new w).pushValue(r,s)},contains:function(r){var s=E(r),d=!1,f=null;return(f=this.__map[s])&&(d=!!f.find(r)),d},concat:function(r){if(r instanceof this._static){for(var s=new this._static,d=r.entrySet().concat(this.entrySet()),f=d.length-1;f>=0;f--){var u=d[f];s.put(u.key,u.value)}return s}throw new TypeError("When joining hashtables the joining arg must be a HashTable")},filter:function(r,s){for(var d=this.entrySet(),f=new this._static,u=(d=x.filter(d,r,s)).length-1;u>=0;u--){var o=d[u];f.put(o.key,o.value)}return f},forEach:function(r,s){var d=this.entrySet();x.forEach(d,r,s)},every:function(r,s){var d=this.entrySet();return x.every(d,r,s)},map:function(r,s){var d=this.entrySet();return x.map(d,r,s)},some:function(r,s){var d=this.entrySet();return x.some(d,r,s)},reduce:function(r,s){var d=this.entrySet();return x.reduce(d,r,s)},reduceRight:function(r,s){var d=this.entrySet();return x.reduceRight(d,r,s)},clear:function(){this.__map={}},keys:function(){var r=[],s=this.__map;for(var d in s)r=r.concat(s[d].getKeys());return r},values:function(){var r=[],s=this.__map;for(var d in s)r=r.concat(s[d].getValues());return r},isEmpty:function(){return 0===this.keys().length}}})}typeof C<"u"?typeof F<"u"&&F.exports&&(F.exports=T(A("extended")().register("declare",A("declare.js")).register(A("is-extended")).register(A("array-extended")))):"function"==typeof define?define(["extended","declare","is-extended","array-extended"],function(x,E,w,r){return T(x().register("declare",E).register(w).register(r))}):this.Ht=T(this.extended().register("declare",this.declare).register(this.isExtended).register(this.arrayExtended))}).call(this)},{"array-extended":52,"declare.js":55,extended:56,"is-extended":66}],66:[function(A,F,C){var T=A("__browserify_Buffer").Buffer;(function(){"use strict";function x(E){var w=Array.prototype.slice,r=Object.prototype.hasOwnProperty,s=Object.prototype.toString;function d(G,Y){var P=-1,j=0,q=G.length,X=[];for(P+=Y=Y||0;++P<q;)X[j++]=G[P];return X}function f(G){var Y=[];for(var P in G)r.call(G,P)&&Y.push(P);return Y}var G,p=function(G){return"[object Function]"===s.call(G)};function c(G){return null!==G&&"object"==typeof G}function a(G){return!0===G||!1===G||"[object Boolean]"===s.call(G)}function b(G){return typeof G>"u"}function R(G){return b(G)||g(G)}function g(G){return null===G}typeof window<"u"&&!p(window.alert)&&(G=window.alert,p=function(Y){return"[object Function]"===s.call(Y)||Y===G});var k=function(Y){return"[object Arguments]"===s.call(Y)};function O(G){return"[object RegExp]"===s.call(G)}k(arguments)||(k=function(Y){return!(!Y||!r.call(Y,"callee"))});var U=Array.isArray||function(Y){return"[object Array]"===s.call(Y)};function S(G){return"[object Date]"===s.call(G)}function D(G){return"[object String]"===s.call(G)}function I(G,Y){return G==Y}function n(G,Y){if(U(Y)&&Array.prototype.indexOf||D(Y))return Y.indexOf(G)>-1;if(U(Y))for(var P=0,j=Y.length;P<j;P++)if(I(G,Y[P]))return!0;return!1}function fe(G,Y){return D(Y)?null!==(""+G).match(Y):!!O(Y)&&Y.test(G)}function ue(G,Y){return r.call(G,Y)}var le={isFunction:p,isObject:c,isEmpty:function _(G){return k(G)?0===G.length:c(G)?0===f(G).length:!D(G)&&!U(G)||0===G.length}
1,isHash:function h(G){return c(G)&&G.constructor===Object&&!G.nodeType&&!G.setInterval},isNumber:function Z(G){return"[object Number]"===s.call(G)},isString:D,isDate:S,isArray:U,isBoolean:a,isUndefined:b,isDefined:function N(G){return!b(G)},isUndefinedOrNull:R,isNull:g,isArguments:k,instanceOf:function M(G,Y){return!!p(Y)&&G instanceof Y},isRegExp:O,deepEqual:function u(G,Y){if(G===Y)return!0;if(typeof T<"u"&&T.isBuffer(G)&&T.isBuffer(Y)){if(G.length!==Y.length)return!1;for(var P=0;P<G.length;P++)if(G[P]!==Y[P])return!1;return!0}return S(G)&&S(Y)?G.getTime()===Y.getTime():O(G)&&O(Y)?G.source===Y.source&&G.global===Y.global&&G.multiline===Y.multiline&&G.lastIndex===Y.lastIndex&&G.ignoreCase===Y.ignoreCase:(!D(G)||!D(Y)||G===Y)&&("object"!=typeof G&&"object"!=typeof Y?G===Y:function o(G,Y){var P;if(R(G)||R(Y)||G.prototype!==Y.prototype)return!1;if(k(G))return!!k(Y)&&u(G=w.call(G),Y=w.call(Y));try{var X,j=f(G),q=f(Y);if(j.length!==q.length)return!1;for(j.sort(),q.sort(),X=j.length-1;X>=0;X--)if(j[X]!==q[X])return!1;for(X=j.length-1;X>=0;X--)if(!u(G[P=j[X]],Y[P]))return!1}catch{return!1}return!0}(G,Y))},isTrue:function V(G){return!0===G},isFalse:function J(G){return!1===G},isNotNull:function $(G){return!g(G)},isEq:I,isNeq:function B(G,Y){return G!=Y},isSeq:function e(G,Y){return G===Y},isSneq:function t(G,Y){return G!==Y},isIn:n,isNotIn:function v(G,Y){return!n(G,Y)},isLt:function y(G,Y){return G<Y},isLte:function L(G,Y){return G<=Y},isGt:function H(G,Y){return G>Y},isGte:function Q(G,Y){return G>=Y},isLike:fe,isNotLike:function z(G,Y){return!fe(G,Y)},contains:function re(G,Y){return n(Y,G)},notContains:function ee(G,Y){return!n(Y,G)},has:ue,notHas:function ie(G,Y){return!ue(G,Y)},isLength:function se(G,Y){return!!ue(G,"length")&&G.length===Y},isNotLength:function W(G,Y){return!!ue(G,"length")&&G.length!==Y},containsAt:function K(G,Y,P){return!!(U(G)&&G.length>P)&&I(G[P],Y)},notContainsAt:function te(G,Y,P){return!!U(G)&&!I(G[P],Y)}},ae={constructor:function(){this._testers=[]},noWrap:{tester:function(){var G=this._testers;return function(P){for(var j=!1,q=0,X=G.length;q<X&&!j;q++)j=G[q](P);return j}}}},ce={constructor:function(){this._cases=[],this.__default=null},def:function(G,Y){this.__default=Y},noWrap:{switcher:function(){var G=this._cases,Y=this.__default;return function(){for(var X,q=d(arguments),ne=0,oe=G.length;ne<oe;ne++)if((X=G[ne](q)).length>1&&(X[1]||X[0]))return X[1];if(Y)return Y.apply(this,q)}}}};function ve(G){ae[G]=function(){this._testers.push(le[G])}}function Ee(G){ce[G]=function(){var q,P=d(arguments,1),j=le[G],X=!0;if(P.length<=j.length-1)throw new TypeError("A handler must be defined when calling using switch");if(a(q=P.pop())&&(X=q,q=P.pop()),!p(q))throw new TypeError("handler must be defined");this._cases.push(function(ne){return j.apply(le,ne.concat(P))?[X,q.apply(this,ne)]:[!1]})}}for(var ye in le)r.call(le,ye)&&(Ee(ye),ve(ye));var pe=E.define(le).expose(le);return pe.tester=E.define(ae),pe.switcher=E.define(ce),pe}typeof C<"u"?typeof F<"u"&&F.exports&&(F.exports=x(A("extended"))):"function"==typeof define&&define.amd?define(["extended"],function(E){return x(E)}):this.isExtended=x(this.extended)}).call(this)},{__browserify_Buffer:63,extended:56}],67:[function(A,F,C){(function(){"use strict";function T(x){function E(o,p){return o>p?1:o<p?-1:p?0:1}var o,p,c,h,_,a,b,w=x.multiply,r=x.declare({instance:{__printNode:function(o,p){var c=[];x.isUndefinedOrNull(o)?(c.push(w("\t",p)),c.push("~"),console.log(c.join(""))):(this.__printNode(o.right,p+1),c.push(w("\t",p)),c.push(o.data+"\n"),console.log(c.join("")),this.__printNode(o.left,p+1))},constructor:function(o){this.compare=(o=o||{}).compare||E,this.__root=null},insert:function(){throw new Error("Not Implemented")},remove:function(){throw new Error("Not Implemented")},clear:function(){this.__root=null},isEmpty:function(){return!this.__root},traverseWithCondition:function(o,p,c){var h=!0;return o&&((p=p||r.PRE_ORDER)===r.PRE_ORDER?(h=c(o.data))&&(h=this.traverseWithCondition(o.left,p,c))&&(h=this.traverseWithCondition(o.right,p,c)):p===r.IN_ORDER?(h=this.traverseWithCondition(o.left,p,c))&&(h=c(o.data))&&(h=this.traverseWithCondition(o.right,p,c)):p===r.POST_ORDER?(h=this.traverseWithCondition(o.left,p,c))&&(h&&(h=this.traverseWithCondition(o.right,p,c)),h&&(h=c(o.data))):p===r.REVERSE_ORDER&&(h=this.traverseWithCondition(o.right,p,c))&&(h=c(o.data))&&(h=this.traverseWithCondition(o.left,p,c))),h},traverse:function(o,p,c){o&&((p=p||r.PRE_ORDER)===r.PRE_ORDER?(c(o.data),this.traverse(o.left,p,c),this.traverse(o.right,p,c)):p===r.IN_ORDER?(this.traverse(o.left,p,c),c(o.data),this.traverse(o.right,p,c)):p===r.POST_ORDER?(this.traverse(o.left,p,c),this.traverse(o.right,p,c),c(o.data)):p===r.REVERSE_ORDER&&(this.traverse(o.right,p,c),c(o.data),this.traverse(o.left,p,c)))}
1,forEach:function(o,p,c){if("function"!=typeof o)throw new TypeError;p=p||this,this.traverse(this.__root,c=c||r.IN_ORDER,function(h){o.call(p,h,this)})},map:function(o,p,c){if("function"!=typeof o)throw new TypeError;c=c||r.IN_ORDER,p=p||this;var h=new this._static;return this.traverse(this.__root,c,function(_){h.insert(o.call(p,_,this))}),h},filter:function(o,p,c){if("function"!=typeof o)throw new TypeError;c=c||r.IN_ORDER,p=p||this;var h=new this._static;return this.traverse(this.__root,c,function(_){o.call(p,_,this)&&h.insert(_)}),h},reduce:function(o,p,c){var _=[this.toArray(c),o];return x.isUndefinedOrNull(p)||_.push(p),x.reduce.apply(x,_)},reduceRight:function(o,p,c){var _=[this.toArray(c),o];return x.isUndefinedOrNull(p)||_.push(p),x.reduceRight.apply(x,_)},every:function(o,p,c){if("function"!=typeof o)throw new TypeError;p=p||this;var h=!1;return this.traverseWithCondition(this.__root,c=c||r.IN_ORDER,function(_){return h=o.call(p,_,this)}),h},some:function(o,p,c){if("function"!=typeof o)throw new TypeError;var h;return p=p||this,this.traverseWithCondition(this.__root,c=c||r.IN_ORDER,function(_){return!(h=o.call(p,_,this))}),h},toArray:function(o){var p=[];return this.traverse(this.__root,o=o||r.IN_ORDER,function(c){p.push(c)}),p},contains:function(o){for(var p=!1,c=this.__root;null!==c;){var h=this.compare(o,c.data);h?c=c[-1===h?"left":"right"]:(p=!0,c=null)}return p},find:function(o){for(var p,c=this.__root;c;){var h=this.compare(o,c.data);if(!h){p=c.data;break}c=c[-1===h?"left":"right"]}return p},findLessThan:function(o,p){var c=[],h=this.compare;return this.traverseWithCondition(this.__root,r.IN_ORDER,function(_){var a=h(o,_);return(!p&&0===a||1===a)&&(c.push(_),!0)}),c},findGreaterThan:function(o,p){var c=[],h=this.compare;return this.traverse(this.__root,r.REVERSE_ORDER,function(_){var a=h(o,_);return(!p&&0===a||-1===a)&&(c.push(_),!0)}),c},print:function(){this.__printNode(this.__root,0)}},static:{PRE_ORDER:"pre_order",IN_ORDER:"in_order",POST_ORDER:"post_order",REVERSE_ORDER:"reverse_order"}}),s=(o=Math.abs,p=function(g){return{data:g,balance:0,left:null,right:null}},c=function(g,k,M){var O=g[M];return g[M]=O[k],O[k]=g,O},h=function(g,k,M){return g[M]=c(g[M],M,k),c(g,k,M)},_=function(g,k,M){var U=g[k],S=U["left"===k?"right":"left"];0===S.balance?g.balance=U.balance=0:S.balance===M?(g.balance=-M,U.balance=0):(g.balance=0,U.balance=M),S.balance=0},a=function(g,k){var M="left"===k?"right":"left",O=g[k],U="right"===k?-1:1;
1return O.balance===U?(g.balance=O.balance=0,g=c(g,M,k)):(_(g,k,U),g=h(g,M,k)),g},b=function(g,k,M){var O="left"===k?"right":"left",U=g[O],S="right"===k?-1:1;return U.balance===-S?(g.balance=U.balance=0,g=c(g,k,O)):U.balance===S?(_(g,O,-S),g=h(g,k,O)):(g.balance=-S,U.balance=S,g=c(g,k,O),M.done=!0),g},r.extend({instance:{insert:function(g){!function N(g,k,M){var O=g.__root;if(null==O)g.__root=p(k);else{for(var V,U=O,S=[],D=[],Z=0;;){if(V=S[Z]=-1===M(k,U.data)?"left":"right",D[Z++]=U,!U[V]){U[V]=p(k);break}U=U[V]}if(!U[V])return null;for(;--Z>=0&&(D[Z].balance+="right"===S[Z]?-1:1,0!==D[Z].balance);)if(o(D[Z].balance)>1){D[Z]=a(D[Z],S[Z]),0!==Z?D[Z-1][S[Z-1]]=D[Z]:g.__root=D[0];break}}}(this,g,this.compare)},remove:function(g){!function R(g,k,M){var O=g.__root;if(null!=O){for(var J,$,U=O,S=0,D=[],Z=[],V={done:!1};;){if(!U)return;if(0===($=M(k,U.data)))break;J=Z[S]=-1===$?"left":"right",D[S++]=U,U=U[J]}var I=U.left;if(I&&U.right){var e=I;for(Z[S]="left",D[S++]=U;e.right;)Z[S]="right",D[S++]=e,e=e.right;U.data=e.data,D[S-1][D[S-1]===U?"left":"right"]=e.left}else J=I?"left":"right",0!==S?D[S-1][Z[S-1]]=U[J]:g.__root=U[J];for(;--S>=0&&!V.done&&(D[S].balance+="left"===Z[S]?-1:1,1!==o(D[S].balance));)o(D[S].balance)>1&&(D[S]=b(D[S],Z[S],V),0!==S?D[S-1][Z[S-1]]=D[S]:g.__root=D[0])}}(this,g,this.compare)},__printNode:function(g,k){var M=[];g?(this.__printNode(g.right,k+1),M.push(w("\t",k)),M.push(g.data+":"+g.balance+"\n"),console.log(M.join("")),this.__printNode(g.left,k+1)):(M.push(w("\t",k)),M.push("~"),console.log(M.join("")))}}})),d=function(){var o={level:0,data:null};function c(b){if(0!==b.level&&b.left.level===b.level){var N=b.left;b.left=N.right,N.right=b,b=N}return b}function h(b){if(0!==b.level&&b.right.right.level===b.level){var N=b.right;b.right=N.left,N.left=b,(b=N).level++}return b}function _(b,N,R){if(b===o)b=function p(b,N){return{data:b,level:N,left:o,right:o}}(N,1);else{var g=-1===R(N,b.data)?"left":"right";b[g]=_(b[g],N,R),b=h(b=c(b))}return b}var a=function(b,N,R){var g;if(b!==o){var M=R(N,b.data);if(0===M)if((g=b.left)!==o&&b.right!==o){for(var O=g;O.right!==o;)O=O.right;b.data=O.data,b.left=a(g,O.data,R)}else b=b[g===o?"right":"left"];else{var U=-1===M?"left":"right";b[U]=a(b[U],N,R)}}if(b!==o){var S=b.level,Z=b.right.level;(b.left.level<S-1||Z<S-1)&&(Z>--b.level&&(b.right.level=b.level),b=h(b=c(b)))}return b};return r.extend({instance:{isEmpty:function(){return this.__root===o||this._super(arguments)},insert:function(b){this.__root||(this.__root=o),this.__root=_(this.__root,b,this.compare)},remove:function(b){this.__root=a(this.__root,b,this.compare)},traverseWithCondition:function(b){return b===o||this._super(arguments)},traverse:function(b){b!==o&&this._super(arguments)},contains:function(){return this.__root!==o&&this._super(arguments)},__printNode:function(b,N){var R=[];b&&b.data?(this.__printNode(b.right,N+1),R.push(w("\t",N)),R.push(b.data+":"+b.level+"\n"),console.log(R.join("")),this.__printNode(b.left,N+1)):(R.push(w("\t",N)),R.push("~"),console.log(R.join("")))}}})}(),f=r.extend({instance:{insert:function(o){if(!this.__root)return this.__root={data:o,parent:null,left:null,right:null},this.__root;for(var p=this.compare,c=this.__root;null!==c;){var h=p(o,c.data);if(!h)return;var _=-1===h?"left":"right",a=c[_];if(!a)return c[_]={data:o,parent:c,left:null,right:null};c=a}},remove:function(o){if(null!==this.__root){for(var h,p={right:this.__root},c=p,_=null,a="right";null!==c[a];){h=c;var b=this.compare(o,(c=c[a]).data);b||(_=c),a=-1===b?"left":"right"}null!==_&&(_.data=c.data,h[h.right===c?"right":"left"]=c[null===c.left?"right":"left"]),this.__root=p.right}}}}),u=function(){var c=function(g){return null!==g&&g.red},_=function(g,k,M){if(!g)return function(g){return{data:g,red:!0,left:null,right:null}}(k);var O=M(k,g.data);if(O){var U=-1===O?"left":"right",S="left"===U?"right":"left";g[U]=_(g[U],k,M);var D=g[U];if(c(D)){var Z=g[S];c(Z)?(g.red=!0,D.red=!1,Z.red=!1):c(D[U])?g=a(g,S):c(D[S])&&(g=b(g,S))}}return g},a=function(g,k){var M="left"===k?"right":"left",O=g[M];return g[M]=O[k],O[k]=g,g.red=!0,O.red=!1,O},b=function(g,k){var M="left"===k?"right":"left";return g[M]=a(g[M],M),a(g,k)},N=function(g,k,M,O){if(g){var U;
1if(0===O(k,g.data)){if(!g.left||!g.right){var S=g[g.left?"left":"right"];return c(g)?M.done=!0:c(S)&&(S.red=!1,M.done=!0),S}for(var Z,D=g.right;null!==D.left;)Z=D,D=D.left;Z&&(Z.left=null),g.data=D.data,k=D.data}g[U=-1===O(k,g.data)?"left":"right"]=N(g[U],k,M,O),M.done||(g=R(g,U,M))}else M.done=!0;return g},R=function(g,k,M){var O="left"===k?"right":"left",U=g,S=U[O];if(c(S)&&(g=a(g,k),S=U[O]),null!==S)if(c(S.left)||c(S.right)){var D=U.red,Z=g===U;(U=(c(S[O])?a:b)(U,k)).red=D,U.left.red=U.right.red=0,Z?g=U:g[k]=U,M.done=!0}else c(U)&&(M.done=!0),U.red=0,S.red=1;return g};return r.extend({instance:{insert:function(g){this.__root=_(this.__root,g,this.compare),this.__root.red=!1},remove:function(g){var M=N(this.__root,g,{done:!1},this.compare);return null!==M&&(M.red=0),this.__root=M,g},__printNode:function(g,k){var M=[];g?(this.__printNode(g.right,k+1),M.push(w("\t",k)),M.push((g.red?"RED":"BLACK")+":"+g.data+"\n"),console.log(M.join("")),this.__printNode(g.left,k+1)):(M.push(w("\t",k)),M.push("~"),console.log(M.join("")))}}})}();return{Tree:r,AVLTree:s,AnderssonTree:d,BinaryTree:f,RedBlackTree:u,IN_ORDER:r.IN_ORDER,PRE_ORDER:r.PRE_ORDER,POST_ORDER:r.POST_ORDER,REVERSE_ORDER:r.REVERSE_ORDER}}typeof C<"u"?typeof F<"u"&&F.exports&&(F.exports=T(A("extended")().register("declare",A("declare.js")).register(A("is-extended")).register(A("array-extended")).register(A("string-extended")))):"function"==typeof define?define(["extended","declare.js","is-extended","array-extended","string-extended"],function(x,E,w,r,s){return T(x().register("declare",E).register(w).register(r).register(s))}):this.leafy=T(this.extended().register("declare",this.declare).register(this.isExtended).register(this.arrayExtended).register(this.stringExtended))}).call(this)},{"array-extended":52,"declare.js":55,extended:56,"is-extended":66,"string-extended":70}],68:[function(A,F,C){(function(){"use strict";function T(x,E,w){var r=E.deepEqual,s=E.isString,d=E.isHash,f=w.difference,u=Object.prototype.hasOwnProperty,o=E.isFunction;function p(V,J){var $,I;for($ in J)u.call(J,$)&&(I=J[$],(!($ in V)||V[$]!==I)&&(V[$]=I));return V}function c(V,J){var $,I,B;for($ in J)u.call(J,$)&&(r(B=V[$],I=J[$])||(V[$]=d(B)&&d(I)?c(B,I):d(I)?c({},I):I));return V}function h(V){V||(V={});for(var J=1,$=arguments.length;J<$;J++)p(V,arguments[J]);return V}function a(V,J){return h(V.prototype||V,J),V}function g(V){if(!d(V))throw new TypeError;var J=[];for(var $ in V)u.call(V,$)&&J.push($);return J}function O(V,J){if(!d(V))throw new TypeError;s(J)&&(J=[J]);for(var I,$=f(g(V),J),B={},e=0,t=$.length;e<t;++e)B[I=$[e]]=V[I];return B}var U={forEach:function b(V,J,$){if(!d(V)||!o(J))throw new TypeError;for(var B,I=g(V),e=0,t=I.length;e<t;++e)J.call($||V,V[B=I[e]],B,V);return V},filter:function N(V,J,$){if(!d(V)||!o(J))throw new TypeError;for(var B,e,I=g(V),t={},n=0,v=I.length;n<v;++n)J.call($||V,e=V[B=I[n]],B,V)&&(t[B]=e);return t},invert:function k(V){if(!d(V))throw new TypeError;for(var $,J=g(V),I={},B=0,e=J.length;B<e;++B)I[V[$=J[B]]]=$;return I},values:function R(V){if(!d(V))throw new TypeError;for(var J=g(V),$=[],I=0,B=J.length;I<B;++I)$.push(V[J[I]]);return $},toArray:function M(V){if(!d(V))throw new TypeError;for(var $,J=g(V),I=[],B=0,e=J.length;B<e;++B)I.push([$=J[B],V[$]]);return I},keys:g,omit:O},S={extend:a,merge:h,deepMerge:function _(V){V||(V={});for(var J=1,$=arguments.length;J<$;J++)c(V,arguments[J]);return V},omit:O},D=x.define(E.isObject,S).define(d,U).define(E.isFunction,{extend:a}).expose({hash:U}).expose(S),Z=D.extend;return D.extend=function(){if(1===arguments.length)return Z.extend.apply(D,arguments);a.apply(null,arguments)},D}typeof C<"u"?typeof F<"u"&&F.exports&&(F.exports=T(A("extended"),A("is-extended"),A("array-extended"))):"function"==typeof define&&define.amd?define(["extended","is-extended","array-extended"],function(x,E,w){return T(x,E,w)}):this.objectExtended=T(this.extended,this.isExtended,this.arrayExtended)}).call(this)},{"array-extended":52,extended:56,"is-extended":66}],69:[function(A,F,C){var T=A("__browserify_process");(function(){"use strict";function x(E,w,r,s,d,f){var R,u=r.forEach,o=s.isUndefinedOrNull,p=s.isArray,c=s.isFunction,h=s.isBoolean,_=d.bind,a=d.bindIgnore,b=f.argsToArray;function N(y,L){return function(){try{V(y.apply(null,arguments)).addCallback(L).addErrback(L)}catch(Q){L.errback(Q)}}}if("function"==typeof setImmediate)R=typeof window<"u"?setImmediate.bind(window):setImmediate;else if(typeof T<"u")R=function(y){T.nextTick(y)};else if(typeof MessageChannel<"u"){var g=new MessageChannel,k={},M=k;g.port1.onmessage=function(){var y=(k=k.next).task;delete k.task,y()},R=function(y){M=M.next={task:y},g.port2.postMessage(0)}}else R=function(y){setTimeout(y,0)};var O=E({instance:{__fired:!1,__results:null,__error:null,__errorCbs:null,__cbs:null,constructor:function(){this.__errorCbs=[],this.__cbs=[],d.bindAll(this,["callback","errback","resolve","classic","__resolve","addCallback","addErrback"])},__resolve:function(){if(!this.__fired){this.__fired=!0;var H,y=this.__error?this.__errorCbs:this.__cbs,L=y.length,Q=this.__error||this.__results;for(H=0;H<L;H++)this.__callNextTick(y[H],Q)}},__callNextTick:function(y,L){R(function(){y.apply(this,L)})},addCallback:function(y){return y&&(D(y)&&y.callback&&(y=y.callback),this.__fired&&this.__results?this.__callNextTick(y,this.__results):this.__cbs.push(y)),this},addErrback:function(y){return y&&(D(y)&&y.errback&&(y=y.errback),this.__fired&&this.__error?this.__callNextTick(y,this.__error):this.__errorCbs.push(y)),this},callback:function(y){return this.__fired||(this.__results=arguments,this.__resolve()),this.promise()},errback:function(y){return this.__fired||(this.__error=arguments,this.__resolve()),this.promise()},resolve:function(y,L){return y?this.errback(y):this.callback.apply(this,b(arguments,1
1)),this},classic:function(y){return"function"==typeof y&&(this.addErrback(function(L){y(L)}),this.addCallback(function(){y.apply(this,[null].concat(b(arguments)))})),this},then:function(y,L){var H=new O,Q=H;return c(L)&&(Q=N(L,H)),this.addErrback(Q),c(y)?this.addCallback(N(y,H)):this.addCallback(H),H.promise()},both:function(y){return this.then(y,y)},promise:function(){var y={then:_(this,"then"),both:_(this,"both"),promise:function(){return y}};return u(["addCallback","addErrback","classic"],function(L){y[L]=_(this,function(){return this[L].apply(this,arguments),y})},this),y}}}),U=O.extend({instance:{__results:null,__errors:null,__promiseLength:0,__defLength:0,__firedLength:0,normalizeResults:!1,constructor:function(y,L){this.__errors=[],this.__results=[],this.normalizeResults=!!h(L)&&L,this._super(arguments),y&&y.length?(this.__defLength=y.length,u(y,this.__addPromise,this)):this.__resolve()},__addPromise:function(y,L){y.then(_(this,function(){var H=b(arguments);H.unshift(L),this.callback.apply(this,H)}),_(this,function(){var H=b(arguments);H.unshift(L),this.errback.apply(this,H)}))},__resolve:function(){if(!this.__fired){this.__fired=!0;var H,y=this.__errors.length?this.__errorCbs:this.__cbs,L=y.length,Q=this.__errors.length?this.__errors:this.__results;for(H=0;H<L;H++)this.__callNextTick(y[H],Q)}},__callNextTick:function(y,L){R(function(){y.apply(null,[L])})},addCallback:function(y){return y&&(D(y)&&y.callback&&(y=_(y,"callback")),this.__fired&&!this.__errors.length?this.__callNextTick(y,this.__results):this.__cbs.push(y)),this},addErrback:function(y){return y&&(D(y)&&y.errback&&(y=_(y,"errback")),this.__fired&&this.__errors.length?this.__callNextTick(y,this.__errors):this.__errorCbs.push(y)),this},callback:function(y){if(this.__fired)throw new Error("Already fired!");var L=b(arguments);return this.normalizeResults&&(L=1===(L=L.slice(1)).length?L.pop():L),this.__results[y]=L,this.__firedLength++,this.__firedLength===this.__defLength&&this.__resolve(),this.promise()},errback:function(y){if(this.__fired)throw new Error("Already fired!");var L=b(arguments);return this.normalizeResults&&(L=1===(L=L.slice(1)).length?L.pop():L),this.__errors[y]=L,this.__firedLength++,this.__firedLength===this.__defLength&&this.__resolve(),this.promise()}}});function S(y,L,H){var Q=(new O).callback();return u(y,function(fe){Q=Q.then(H?fe:a(null,fe)),H||(Q=Q.then(function(z){return L.push(z),L}))}),Q}function D(y){return!o(y)&&c(y.then)}function V(y){var L;return(y=b(arguments)).length?1===y.length?D(y=y.pop())?y.addCallback&&y.addErrback?(L=new O,y.addCallback(L.callback),y.addErrback(L.errback)):L=function Z(y){var L=new O;return y.then(_(L,"callback"),_(L,"errback")),L.promise()}(y):L=p(y)&&r.every(y,D)?new U(y,!0).promise():(new O).callback(y):L=new U(r.map(y,function(H){return V(H)}),!0).promise():L=(new O).callback(y).promise(),L}function e(){return new O}return w.define({isPromiseLike:D}).expose({isPromiseLike:D,when:V,wrap:function J(y,L){return function(){var Q=new O,fe=b(arguments);return fe.push(Q.resolve),y.apply(L||this,fe),Q.promise()}},wait:function B(y,L){y=b(arguments);var H=!1;L=y.pop();var Q=V(y);return function(){return H?V(L.apply(this,arguments)):(y=arguments,Q.then(_(this,function(){return H=!0,L.apply(this,y)})))}},serial:function $(y){if(p(y))return S(y,[],!1);throw new Error("When calling promise.serial the first argument must be an array")},chain:function I(y){if(p(y))return S(y,[],!0);throw new Error("When calling promise.serial the first argument must be an array")},Promise:O,PromiseList:U,promise:e,defer:e,deferredList:function t(y){return new U(y,!0).promise()},reject:function n(y){return e().errback(y)},resolve:function v(y){return e().callback(y)}})}typeof C<"u"?typeof F<"u"&&F.exports&&(F.exports=x(A("declare.js"),A("extended"),A("array-extended"),A("is-extended"),A("function-extended"),A("arguments-extended"))):"function"==typeof define&&define.amd?define(["declare","extended","array-extended","is-extended","function-extended","arguments-extended"],function(E,w,r,s,d,f){return x(E,w,r,s,d,f)}):this.promiseExtended=x(this.declare,this.extended,this.arrayExtended,this.isExtended,this.functionExtended,this.argumentsExtended)}).call(this)},{__browserify_process:64,"arguments-extended":51,"array-extended":52,"declare.js":55,extended:56,"function-extended":59,"is-extended":66}],70:[function(A,F,C){(function(){"use strict";function T(x,E,w,r){var s;typeof JSON>"u"?function(){function I(z){return z<10?"0"+z:z}var v,y,H,B=E.tester().isString().isNumber().isBoolean().tester(),n=/[\\\"\x00-\x1f\x7f-\x9f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,L={"\b":"\\b","\t":"\\t","\n":"\\n","\f":"\\f","\r":"\\r",'"':'\\"',"\\":"\\\\"};function Q(z){return n.lastIndex=0,n.test(z)?'"'+z.replace(n,function(re){var ee=L[re];return"string"==typeof ee?ee:"\\u"+("0000"+re.charCodeAt(0).toString(16)).slice(-4)})+'"':'"'+z+'"'}function fe(z,re){var ee,K,te,ue,se,ie=v,W=re[z];switch(W&&(W=function e(z){return E.isDate(z)?isFinite(z.valueOf())?z.getUTCFullYear()+"-"+I(z.getUTCMonth()+1)+"-"+I(z.getUTCDate())+"T"+I(z.getUTCHours())+":"+I(z.getUTCMinutes())+":"+I(z.getUTCSeconds())+"Z":null:B(z)?z.valueOf():z}(W)),"function"==typeof H&&(W=H.call(re,z,W)),typeof W){case"string":return Q(W);case"number":return isFinite(W)?String(W):"null";case"boolean":case"null":return String(W);case"object":if(!W)return"null";if(v+=y,se=[],"[object Array]"===Object.prototype.toString.apply(W)){for(ue=W.length,ee=0;ee<ue;ee+=1)se[ee]=fe(ee,W)||"null";return te=0===se.length?"[]":v?"[\n"+v+se.join(",\n"+v)+"\n"+ie+"]":"["+se.join(",")+"]",v=ie,te}if(H&&"object"==typeof H)for(ue=H.length,ee=0;ee<ue;
vendor: 4,347 bytes, line 1
1ee+=1)"string"==typeof H[ee]&&(te=fe(K=H[ee],W))&&se.push(Q(K)+(v?": ":":")+te);else for(K in W)Object.prototype.hasOwnProperty.call(W,K)&&(te=fe(K,W))&&se.push(Q(K)+(v?": ":":")+te);return te=0===se.length?"{}":v?"{\n"+v+se.join(",\n"+v)+"\n"+ie+"}":"{"+se.join(",")+"}",v=ie,te}}s=function(z,re,ee){var K;if(v="",y="","number"==typeof ee)for(K=0;K<ee;K+=1)y+=" ";else"string"==typeof ee&&(y=ee);if(H=re,re&&"function"!=typeof re&&("object"!=typeof re||"number"!=typeof re.length))throw new Error("JSON.stringify");return fe("",{"":z})}}():s=JSON.stringify;var d=E.isHash,f=Array.prototype.slice,u=/%((?:-?\+?.?\d*)?|(?:\[[^\[|\]]*\]))?([sjdDZ])/g,o=/\{(?:\[([^\[|\]]*)\])?(\w+)\}/g,p=/(-?)(\+?)([A-Z|a-z|\W]?)([1-9][0-9]*)?$/,c=/([1-9][0-9]*)$/g;function h(I,B){var e=I;if(p.test(B)){var t=B.match(p),n=t[1],v=t[3],y=t[4];y&&(y=parseInt(y,10),e=e.length<y?R(e,y,v,n):g(e,y))}return e}function _(I,B){var e;if(!E.isNumber(I))throw new Error("stringExtended.format : when using %d the parameter must be a number!");if(e=""+I,p.test(B)){var t=B.match(p),n=t[1],y=t[3],L=t[4];t[2]&&(e=(I>0?"+":"")+e),L&&(L=parseInt(L,10),e=e.length<L?R(e,L,y||"0",n):g(e,L))}return e}function a(I,B){var e,t=B.match(c),n=0;t&&(n=parseInt(t[0],10),isNaN(n)&&(n=0));try{e=s(I,null,n)}catch{throw new Error("stringExtended.format : Unable to parse json from ",I)}return e}var b={bold:1,bright:1,italic:3,underline:4,blink:5,inverse:7,crossedOut:9,red:31,green:32,yellow:33,blue:34,magenta:35,cyan:36,white:37,redBackground:41,greenBackground:42,yellowBackground:43,blueBackground:44,magentaBackground:45,cyanBackground:46,whiteBackground:47,encircled:52,overlined:53,grey:90,black:90};function R(I,B,e,t){e=e||" ";for(var n=(I=""+I).length;n<B;)t?I+=e:I=e+I,n++;return I}function g(I,B,e){var t=I;if(E.isString(t)){if(I.length>B)if(e){var n=I.length;t=I.substring(n-B,n)}else t=I.substring(0,B)}else t=g(""+t,B);return t}function U(I,B){var e,t,n;if(B)if(E.isArray(I))for(e=[],t=0,n=I.length;t<n;t++)e.push(U(I[t],B));else if(B instanceof Array)for(e=I,t=0,n=B.length;t<n;t++)e=U(e,B[t]);else B in b&&(e="\x1b["+b[B]+"m"+I+"\x1b[0m");return e}var $={toArray:function M(I,B){var e=[];return I&&(I.indexOf(B)>0?e=I.replace(/\s+/g,"").split(B):e.push(I)),e},pad:R,truncate:g,multiply:function O(I,B){var e=[];if(B)for(var t=0;t<B;t++)e.push(I);return e.join("")},format:function k(I,B){if(B instanceof Array){var e=0,t=B.length;return I.replace(u,function(v,y,L){var H,Q;if(!(e<t))return v;if(H=B[e++],"%s"===v||"%d"===v||"%D"===v)Q=H+"";else if("%Z"===v)Q=H.toUTCString();else if("%j"===v)try{Q=s(H)}catch{throw new Error("stringExtended.format : Unable to parse json from ",H)}else switch(y=y.replace(/^\[|\]$/g,""),L){case"s":Q=h(H,y);break;case"d":Q=_(H,y);break;case"j":Q=a(H,y);break;case"D":Q=w.format(H,y);break;case"Z":Q=w.format(H,y,!0)}return Q})}return d(B)?I.replace(o,function(v,y,L){if(!E.isUndefined(L=B[L])){if(!y)return""+L;if(E.isString(L))return h(L,y);if(E.isNumber(L))return _(L,y);if(E.isDate(L))return w.format(L,y);if(E.isObject(L))return a(L,y)}return v}):k(I,f.call(arguments).slice(1))},style:U,escape:function S(I,B){return I.replace(/([\.$?*|{}\(\)\[\]\\\/\+^])/g,function(e){return B&&-1!==r.indexOf(B,e)?e:"\\"+e})},trim:function D(I){return I.replace(/^\s*|\s*$/g,"")},trimLeft:function Z(I){return I.replace(/^\s*/,"")},trimRight:function V(I){return I.replace(/\s*$/,"")},isEmpty:function J(I){return 0===I.length}};return x.define(E.isString,$).define(E.isArray,{style:U}).expose($).expose({characters:{SMILEY:"\u263a",SOLID_SMILEY:"\u263b",HEART:"\u2665",DIAMOND:"\u2666",CLOVE:"\u2663",SPADE:"\u2660",DOT:"\u2022",SQUARE_CIRCLE:"\u25d8",CIRCLE:"\u25cb",FILLED_SQUARE_CIRCLE:"\u25d9",MALE:"\u2642",FEMALE:"\u2640",EIGHT_NOTE:"\u266a",DOUBLE_EIGHTH_NOTE:"\u266b",SUN:"\u263c",PLAY:"\u25ba",REWIND:"\u25c4",UP_DOWN:"\u2195",PILCROW:"\xb6",SECTION:"\xa7",THICK_MINUS:"\u25ac",SMALL_UP_DOWN:"\u21a8",UP_ARROW:"\u2191",DOWN_ARROW:"\u2193",RIGHT_ARROW:"\u2192",LEFT_ARROW:"\u2190",RIGHT_ANGLE:"\u221f",LEFT_RIGHT_ARROW:"\u2194",TRIANGLE:"\u25b2",DOWN_TRIANGLE:"\u25bc",HOUSE:"\u2302",C_CEDILLA:"\xc7",U_UMLAUT:"\xfc",E_ACCENT:"\xe9",A_LOWER_CIRCUMFLEX:"\xe2",A_LOWER_UMLAUT:"\xe4",A_LOWER_GRAVE_ACCENT:"\xe0",A_LOWER_CIRCLE_OVER:"\xe5",C_LOWER_CIRCUMFLEX:"\xe7",E_LOWER_CIRCUMFLEX:"\xea",E_LOWER_UMLAUT:"\xeb",E_LOWER_GRAVE_ACCENT:"\xe8",I_
1LOWER_UMLAUT:"\xef",I_LOWER_CIRCUMFLEX:"\xee",I_LOWER_GRAVE_ACCENT:"\xec",A_UPPER_UMLAUT:"\xc4",A_UPPER_CIRCLE:"\xc5",E_UPPER_ACCENT:"\xc9",A_E_LOWER:"\xe6",A_E_UPPER:"\xc6",O_LOWER_CIRCUMFLEX:"\xf4",O_LOWER_UMLAUT:"\xf6",O_LOWER_GRAVE_ACCENT:"\xf2",U_LOWER_CIRCUMFLEX:"\xfb",U_LOWER_GRAVE_ACCENT:"\xf9",Y_LOWER_UMLAUT:"\xff",O_UPPER_UMLAUT:"\xd6",U_UPPER_UMLAUT:"\xdc",CENTS:"\xa2",POUND:"\xa3",YEN:"\xa5",CURRENCY:"\xa4",PTS:"\u20a7",FUNCTION:"\u0192",A_LOWER_ACCENT:"\xe1",I_LOWER_ACCENT:"\xed",O_LOWER_ACCENT:"\xf3",U_LOWER_ACCENT:"\xfa",N_LOWER_TILDE:"\xf1",N_UPPER_TILDE:"\xd1",A_SUPER:"\xaa",O_SUPER:"\xba",UPSIDEDOWN_QUESTION:"\xbf",SIDEWAYS_L:"\u2310",NEGATION:"\xac",ONE_HALF:"\xbd",ONE_FOURTH:"\xbc",UPSIDEDOWN_EXCLAMATION:"\xa1",DOUBLE_LEFT:"\xab",DOUBLE_RIGHT:"\xbb",LIGHT_SHADED_BOX:"\u2591",MEDIUM_SHADED_BOX:"\u2592",DARK_SHADED_BOX:"\u2593",VERTICAL_LINE:"\u2502",MAZE__SINGLE_RIGHT_T:"\u2524",MAZE_SINGLE_RIGHT_TOP:"\u2510",MAZE_SINGLE_RIGHT_BOTTOM_SMALL:"\u2518",MAZE_SINGLE_LEFT_TOP_SMALL:"\u250c",MAZE_SINGLE_LEFT_BOTTOM_SMALL:"\u2514",MAZE_SINGLE_LEFT_T:"\u251c",MAZE_SINGLE_BOTTOM_T:"\u2534",MAZE_SINGLE_TOP_T:"\u252c",MAZE_SINGLE_CENTER:"\u253c",MAZE_SINGLE_HORIZONTAL_LINE:"\u2500",MAZE_SINGLE_RIGHT_DOUBLECENTER_T:"\u2561",MAZE_SINGLE_RIGHT_DOUBLE_BL:"\u255b",MAZE_SINGLE_RIGHT_DOUBLE_T:"\u2562",MAZE_SINGLE_RIGHT_DOUBLEBOTTOM_TOP:"\u2556",MAZE_SINGLE_RIGHT_DOUBLELEFT_TOP:"\u2555",MAZE_SINGLE_LEFT_DOUBLE_T:"\u255e",MAZE_SINGLE_BOTTOM_DOUBLE_T:"\u2567",MAZE_SINGLE_TOP_DOUBLE_T:"\u2564",MAZE_SINGLE_TOP_DOUBLECENTER_T:"\u2565",MAZE_SINGLE_BOTTOM_DOUBLECENTER_T:"\u2568",MAZE_SINGLE_LEFT_DOUBLERIGHT_BOTTOM:"\u2558",MAZE_SINGLE_LEFT_DOUBLERIGHT_TOP:"\u2552",MAZE_SINGLE_LEFT_DOUBLEBOTTOM_TOP:"\u2553",MAZE_SINGLE_LEFT_DOUBLETOP_BOTTOM:"\u2559",MAZE_SINGLE_LEFT_TOP:"\u0393",MAZE_SINGLE_RIGHT_BOTTOM:"\u255c",MAZE_SINGLE_LEFT_CENTER:"\u255f",MAZE_SINGLE_DOUBLECENTER_CENTER:"\u256b",MAZE_SINGLE_DOUBLECROSS_CENTER:"\u256a",MAZE_DOUBLE_LEFT_CENTER:"\u2563",MAZE_DOUBLE_VERTICAL:"\u2551",MAZE_DOUBLE_RIGHT_TOP:"\u2557",MAZE_DOUBLE_RIGHT_BOTTOM:"\u255d",MAZE_DOUBLE_LEFT_BOTTOM:"\u255a",MAZE_DOUBLE_LEFT_TOP:"\u2554",MAZE_DOUBLE_BOTTOM_T:"\u2569",MAZE_DOUBLE_TOP_T:"\u2566",MAZE_DOUBLE_LEFT_T:"\u2560",MAZE_DOUBLE_HORIZONTAL:"\u2550",MAZE_DOUBLE_CROSS:"\u256c",SOLID_RECTANGLE:"\u2588",THICK_LEFT_VERTICAL:"\u258c",THICK_RIGHT_VERTICAL:"\u2590",SOLID_SMALL_RECTANGLE_BOTTOM:"\u2584",SOLID_SMALL_RECTANGLE_TOP:"\u2580",PHI_UPPER:"\u03a6",INFINITY:"\u221e",INTERSECTION:"\u2229",DEFINITION:"\u2261",PLUS_MINUS:"\xb1",GT_EQ:"\u2265",LT_EQ:"\u2264",THEREFORE:"\u2320",SINCE:"\u2235",DOESNOT_EXIST:"\u2204",EXISTS:"\u2203",FOR_ALL:"\u2200",EXCLUSIVE_OR:"\u2295",BECAUSE:"\u2321",DIVIDE:"\xf7",APPROX:"\u2248",DEGREE:"\xb0",BOLD_DOT:"\u2219",DOT_SMALL:"\xb7",CHECK:"\u221a",ITALIC_X:"\u2717",SUPER_N:"\u207f",SQUARED:"\xb2",CUBED:"\xb3",SOLID_BOX:"\u25a0",PERMILE:"\u2030",REGISTERED_TM:"\xae",COPYRIGHT:"\xa9",TRADEMARK:"\u2122",BETA:"\u03b2",GAMMA:"\u03b3",ZETA:"\u03b6",ETA:"\u03b7",IOTA:"\u03b9",KAPPA:"\u03ba",LAMBDA:"\u03bb",NU:"\u03bd",XI:"\u03be",OMICRON:"\u03bf",RHO:"\u03c1",UPSILON:"\u03c5",CHI_LOWER:"\u03c6",CHI_UPPER:"\u03c7",PSI:"\u03c8",ALPHA:"\u03b1",ESZETT:"\xdf",PI:"\u03c0",SIGMA_UPPER:"\u03a3",SIGMA_LOWER:"\u03c3",MU:"\xb5",TAU:"\u03c4",THETA:"\u0398",OMEGA:"\u03a9",DELTA:"\u03b4",PHI_LOWER:"\u03c6",EPSILON:"\u03b5"}})}typeof C<"u"?typeof F<"u"&&F.exports&&(F.exports=T(A("extended"),A("is-extended"),A("date-extended"),A("array-extended"))):"function"==typeof define&&define.amd?define(["extended","is-extended","date-extended","array-extended"],function(x,E,w,r){return T(x,E,w,r)}):this.stringExtended=T(this.extended,this.isExtended,this.dateExtended,this.arrayExtended)}).call(this)},{"array-extended":52,"date-extended":53,extended:56,"is-extended":66}]},{},[1]);

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