<commit_before>/* combyne.js v0.1.6
 * Copyright 2011, <NAME> (@tbranyen)
 * combyne.js may be freely distributed under the MIT license.
 */(function(a){function i(a){var b=this,c;return function(){c=c?c:{original:b.template};return a.apply(c,arguments)}}function h(a,b){function c(){return{_cache:{},get:function(a){return this._cache[a]},remove:function(a){delete this._cache[a]}}}if(!(this instanceof h))return new h(a,b);this.template=a,this.context=b||{},this.filters=c(),this.filters.add=function(a,b){this._cache[a]=i(b)},this.partials=c(),this.partials.add=function(a,b,c){this._cache[a]={template:b,context:c}}}function c(a){var b,c=[];for(b in a){if(!a.hasOwnProperty(b))continue;c.push(b)}return c}function b(a,b){function e(){}var c,d;e.prototype=b,c=new e;for(d in a){if(!a.hasOwnProperty(d))continue;c[d]=a[d]}return c}Array.prototype.indexOf||(Array.prototype.indexOf=function(a){"use strict";if(this===void 0||this===null)throw new TypeError;var b=Object(this),c=b.length>>>0;if(c===0)return-1;var d=0;arguments.length>0&&(d=Number(arguments[1]),d!==d?d=0:d!==0&&d!==1/0&&d!==-Infinity&&(d=(d>0||-1)*Math.floor(Math.abs(d))));if(d>=c)return-1;var e=d>=0?d:Math.max(c-Math.abs(d),0);for(;e<c;e++)if(e in b&&b[e]===a)return e;return-1});var d=Object.prototype.toString,e=function(){var a;return function(b,d,e){a=e=e||a;var f,g,h,i=c(e),j=i.length,k=0;while(b.length)for(k=0;k<j;k++){h=i[k];if(f=e[h].exec(b))g={name:h,captures:f},b=b.replace(e[h],""),f[0]&&d.push(g)}}}(),f=function(){function p(a,b,c,d,g){var h,k,l,m=[],n=c[0],o=a.partials.get(n);if(o==null&&a.debug)throw new Error("Partial "+n+" not found");if(error=e(o.template,m))if(a.debug)throw new Error(error);m.reverse(),h=j,k=g.get(),j="",g.clear(),l=f(a,o.context,m,i),j=h,g.set(k),g.unset("skip");return l}function o(a,b,c,d){var e,f,g,h,i,j,k=b.length,m=!0,n={"==":function(a,b){if(a==b)return!0;return!1},"!=":function(a,b){if(a!=b)return!0;return!1},">":function(a,b){if(a>b)return!0;return!1},">=":function(a,b){if(this["=="](a,b)||this[">"](a,b))return!0;return!1},"<":function(a,b){if(a<b)return!0;return!1},"<=":function(a,b){if(this["=="](a,b)||this["<"](a,b))return!0;return!1},not:function(a){return!a}};for(e=0;e<k;e++){f=isNaN(b[e])?b[e]+"":+b[e];if(f==="not"){j=!0;continue}if(n[f]){i=f;continue}f=l(f,c);if(j){j=undefined;if(g===undefined){g=n.not(f);continue}h=f;continue}if(g===undefined){g=f;continue}h=f;break}i?n[i]?m=n[i](g,h):m=!1:m=g;return m}function n(a,b){function d(a){var b,e=c.shift();b=a[e];if(b!=null)return c.length?d(b):b}var c=a.split(".");if(c.length)return d(b)}function m(a,b,c,d,e,f){var g,h,i=a.filters.get(b);if(i==null){i=function(){return d};if(a.debug)throw new Error("Filter "+b+" not found")}for(g=0,h=c.length;g<h;g++)c[g]=l(c[g],e);c.unshift(d),f.unset("filter");return i.apply(d,c)}function l(a,b){var c=/\'|\"/gi;c.exec(a)?a=a.replace(c,""):isNaN(a)?typeof a=="string"&&(a=b[a]!=null?b[a]:n(a,b),typeof a=="function"&&(a=a())):a=+a;return a}var a,g,h,i,j="",k="",q=function(){var a=[];return{set:function(b){a=a.concat(b)},get:function(){return a},unset:function(b){a.splice(a.indexOf(b),1)},exists:function(b){return~a.indexOf(b)},clear:function(){a=[]},count:function(b){var c,d;for(c=d=0;~(d=a.indexOf(b,d));c++);return c}}}(),r=function(){var a,d,h,k,l,m,n=[];return{execArray:function(c,d,h,n){var o,p;a=q.get(),q.unset("loop");if(d&&d.length)for(o=0,p=d.length;o<p;o++){k=[];if(l=e(g,k))if(c.debug)throw new Error(l);k.reverse(),m={i:o,length:p,original:d},m[h.index||"."]=d[o],typeof d[o]=="object"?(m=b(m,d[o]),d[o]=b(d[o],n)):m=b(m,n),j=f(c,m,k,i)}q.set(a),g=j},execObj:function(n,o,p,r){var s,t;a=q.get(),q.unset("loop"),h=o?c(o):[];if(h.length)for(s=0,t=h.length;s<t;s++){d=h[s],k=[];if(l=e(g,k))if(n.debug)throw new Error(l);k.reverse(),m={original:o},m[p.key||"."]=d,m[p.obj||"original"]=o,m[p.val||"$"]=o[d],typeof o[d]=="object"?(m=b(m,o[d]),o[d]=b(o[d],r)):m=b(m,r),j=f(n,m,k,i)}q.set(a)},clear:function(){n=[]}}}();return function(b,c,e,n){var s,t,u,v=e.pop(),w=v.captures[0];i=n||i;switch(v.name){case"START_PROP":if(q.exists("skip"))break;if(q.exists("loop")){g+=w;break}q.set("prop");break;case"END_PROP":if(q.exists("skip"))break;if(q.exists("loop")){g+=w;break}typeof a!="object"?j+=a:j+=n.START_PROP+a.prop+n.END_PROP,q.unset("prop");break;case"START_EXPR":q.set("expr");if(q.exists("skip"))break;q.exists("loop")&&(g+=w);break;case"END_EXPR":q.unset("expr");if(q.exists("skip")){a==="--"&&q.unset("skip");break}q.exists("loop")&&(g+=w),q.exists("partial")&&(j+=a,q.unset("partial")),a==="endeach"&&q.unset("loop");break;case"OTHER":if(q.exists("prop")){if(q.exists("skip"))break;if(q.exists("loop")){g+=w;break}a=l(w,c),a==null&&(a={prop:w})}else if(q.exists("filter")){if(q.exists("skip"))break;if(q.exists("loop")){g+=w;break}s=w.split(" "),t=s.shift(),u=s,a=m(b,t,u,a,c,q),q.set("string")}else if(q.exists("expr")){s=w.split(" "),t=s.shift(),u=s;if(t==="if"||t==="elsif"){if(!q.exists("else")&&q.exists("skip"))break;q.exists("else")&&q.unset("else");if(q.exists("loop")){g+=w;break}if(u.length<1){if(b.debug)throw new Error("No arguments supplied for if statement")}else if(u.length===1){if(!l(u[0],c)){q.set("else"),q.set("skip");break}}else o(b,u,c)?q.unset("skip"):(q.set("else"),q.set("skip"))}else if(t==="else")q.exists("else")?q.unset("skip"):q.exists("skip")||q.set("skip");else if(t==="endif"){if(q.exists("loop")){g+=w;break}q.unset("skip")}else if(t==="each"){if(q.exists("skip"))break;if(q.exists("loop")){q.set("loop"),g+=w;break}q.set("loop");if(u.length<1){if(b.debug)throw new Error("No arguments supplied for each statement")}else d.call(c[u[0]])=="[object Array]"?(h={},a=c[u[0]],h.index=u[2],g=""):(h={},c[u[0]]&&(a=c[u[0]],h.obj=u[0],h.key=u[2],h.val=u[3],g=""))}else if(t==="endeach"){if(q.exists("skip"))break;q.unset("loop");if(!q.exists("loop"))d.call(a)=="[object Array]"?r.execArray(b,a,h,c):r.execObj(b,a,h,c),r.clear();else if(q.exists("loop")){g+=w+n.END_EXPR;break}}else if(t==="partial"){if(q.exists("skip"))break;if(q.exists("loop")){g+=w;break}s=w.split(" "),t=s.shift(),u=s,a=p(b,t,u,a,q),q.set("partial"),q.set("expr")}}else{if(q.exists("skip"))break;if(q.exists("loop")){g+=w;break}j+=w}break;case"WHITESPACE":if(q.exists("skip"))break;if(q.exists("loop")){g+=w;break}j+=w;break;case"FILTER":if(q.exists("skip"))break;if(q.exists("loop")){g+=w;break}q.unset("prop"),q.set("filter");break;case"COMMENT":if(q.exists("skip")){a="--";break}if(q.exists("loop")){g+=w;break}q.exists("expr")?q.set("skip"):j+=n.COMMENT}if(e.length)return f(b,c,e,n);k=j,q.clear(),j="",a=undefined;return k}}(),g=function(){function b(b){return b.replace(a,"\\$&")}var a=/[\^$\\\/.*+?()[\]{}|]/g;return function(a,c,d,g){var h,i,j,k,l,m,n,o=0,p=[],q={};i=b(g.START_PROP),j=b(g.END_PROP),k=b(g.START_EXPR),l=b(g.END_EXPR),m=b(g.COMMENT),n=b(g.FILTER),q.START_PROP=RegExp("^"+i),q.END_PROP=RegExp("^"+j),q.START_EXPR=RegExp("^"+k),q.END_EXPR=RegExp("^"+l),q.COMMENT=RegExp("^"+m),q.FILTER=RegExp("^"+n),h=[i,j,k,l,m,n].join("|"),q.WHITESPACE=/^[\ |\t|\r|\n]+/,q.OTHER=RegExp("^((?!"+h+").)*");if(o=e(c,p,q))if(a.debug)throw new Error(o);p.reverse();return f(a,d,p,g)}}();h.version="0.1.6",h.prototype={render:function(){var a=this;if(!a.template||!a.context)if(a.debug)throw new Error("Missing template or context");a.delimiters=a.delimiters||{},a.delimiters=b(a.delimiters,{START_PROP:"{{",END_PROP:"}}",START_EXPR:"{%",END_EXPR:"%}",COMMENT:"--",FILTER:"|"});return g(a,a.template,a.context,a.delimiters)},delimiters:{}},typeof module!="undefined"&&module.exports?(module.exports=h,module.exports.compile=function(a){return function(b){return h(a,b).render()}}):a.combyne=h})(this)<commit_msg>and minfied version<commit_after>/* combyne.js v0.1.6
 * Copyright 2011, <NAME> (@tbranyen)
 * combyne.js may be freely distributed under the MIT license.
 */(function(a){function k(a){var b=this,c;return function(){c=c?c:{original:b.template};return a.apply(c,arguments)}}function j(a,b){function c(){return{_cache:{},get:function(a){return this._cache[a]},remove:function(a){delete this._cache[a]}}}if(!(this instanceof j))return new j(a,b);this.template=a,this.context=b||{},this.filters=c(),this.filters.add=function(a,b){this._cache[a]=k(b)},this.partials=c(),this.partials.add=function(a,b,c){this._cache[a]={template:b,context:c}}}function f(a){var b,c=[];for(b in a){if(!a.hasOwnProperty(b))continue;c.push(b)}return c}function e(a,b){function e(){}var c,d;e.prototype=b,c=new e;for(d in a){if(!a.hasOwnProperty(d))continue;c[d]=a[d]}return c}var b=Object.prototype.toString,c=/[\^$\\\/.*+?()[\]{}|]/g,d=function(){var a={};return function(b){if(a[b])return a[b];a[b]=b.replace(c,"\\$&");return a[b]}}();Array.prototype.indexOf||(Array.prototype.indexOf=function(a){"use strict";if(this===void 0||this===null)throw new TypeError;var b=Object(this),c=b.length>>>0;if(c===0)return-1;var d=0;arguments.length>0&&(d=Number(arguments[1]),d!==d?d=0:d!==0&&d!==1/0&&d!==-Infinity&&(d=(d>0||-1)*Math.floor(Math.abs(d))));if(d>=c)return-1;var e=d>=0?d:Math.max(c-Math.abs(d),0);for(;e<c;e++)if(e in b&&b[e]===a)return e;return-1});var g=function(){var a;return function(b,c,d){a=d=d||a;var e,g,h,i=f(d),j=i.length,k=0;while(b.length)for(k=0;k<j;k++){h=i[k];if(e=d[h].exec(b))g={name:h,captures:e},b=b.replace(d[h],""),e[0]&&c.push(g)}}}(),h=function(){function p(a,b,c,d,e){var f,k,l,m=[],n=c[0],o=a.partials.get(n);if(o==null&&a.debug)throw new Error("Partial "+n+" not found");if(error=g(o.template,m))if(a.debug)throw new Error(error);m.reverse(),f=j,k=e.get(),j="",e.clear(),l=h(a,o.context,m,i),j=f,e.set(k),e.unset("skip");return l}function o(a,b,c,d){var e,f,g,h,i,j,k=b.length,m=!0,n={"==":function(a,b){if(a==b)return!0;return!1},"!=":function(a,b){if(a!=b)return!0;return!1},">":function(a,b){if(a>b)return!0;return!1},">=":function(a,b){if(this["=="](a,b)||this[">"](a,b))return!0;return!1},"<":function(a,b){if(a<b)return!0;return!1},"<=":function(a,b){if(this["=="](a,b)||this["<"](a,b))return!0;return!1},not:function(a){return!a}};for(e=0;e<k;e++){f=isNaN(b[e])?b[e]+"":+b[e];if(f==="not"){j=!0;continue}if(n[f]){i=f;continue}f=l(f,c);if(j){j=undefined;if(g===undefined){g=n.not(f);continue}h=f;continue}if(g===undefined){g=f;continue}h=f;break}i?n[i]?m=n[i](g,h):m=!1:m=g;return m}function n(a,b){function d(a){var b,e=c.shift();b=a[e];if(b!=null)return c.length?d(b):b}var c=a.split(".");if(c.length)return d(b)}function m(a,b,c,d,e,f){var g,h,i=a.filters.get(b);if(i==null){i=function(){return d};if(a.debug)throw new Error("Filter "+b+" not found")}for(g=0,h=c.length;g<h;g++)c[g]=l(c[g],e);c.unshift(d),f.unset("filter");return i.apply(d,c)}function l(a,b){var c=/\'|\"/gi;c.exec(a)?a=a.replace(c,""):isNaN(a)?typeof a=="string"&&(a=b[a]!=null?b[a]:n(a,b),typeof a=="function"&&(a=a())):a=+a;return a}var a,c,d,i,j="",k="",q=function(){var a=[];return{set:function(b){a=a.concat(b)},get:function(){return a},unset:function(b){a.splice(a.indexOf(b),1)},exists:function(b){return~a.indexOf(b)},clear:function(){a=[]},count:function(b){var c,d;for(c=d=0;~(d=a.indexOf(b,d));c++);return c}}}(),r=function(){var a,b,d,k,l,m,n=[];return{execArray:function(b,d,f,n){var o,p;a=q.get(),q.unset("loop");if(d&&d.length)for(o=0,p=d.length;o<p;o++){k=[];if(l=g(c,k))if(b.debug)throw new Error(l);k.reverse(),m={i:o,length:p,original:d},m[f.index||"."]=d[o],typeof d[o]=="object"?(m=e(m,d[o]),d[o]=e(d[o],n)):m=e(m,n),j=h(b,m,k,i)}q.set(a),c=j},execObj:function(n,o,p,r){var s,t;a=q.get(),q.unset("loop"),d=o?f(o):[];if(d.length)for(s=0,t=d.length;s<t;s++){b=d[s],k=[];if(l=g(c,k))if(n.debug)throw new Error(l);k.reverse(),m={original:o},m[p.key||"."]=b,m[p.obj||"original"]=o,m[p.val||"$"]=o[b],typeof o[b]=="object"?(m=e(m,o[b]),o[b]=e(o[b],r)):m=e(m,r),j=h(n,m,k,i)}q.set(a)},clear:function(){n=[]}}}();return function(e,f,g,n){var s,t,u,v=g.pop(),w=v.captures[0];i=n||i;switch(v.name){case"START_PROP":if(q.exists("skip"))break;if(q.exists("loop")){c+=w;break}q.set("prop");break;case"END_PROP":if(q.exists("skip"))break;if(q.exists("loop")){c+=w;break}typeof a!="object"?j+=a:j+=n.START_PROP+a.prop+n.END_PROP,q.unset("prop");break;case"START_EXPR":q.set("expr");if(q.exists("skip"))break;q.exists("loop")&&(c+=w);break;case"END_EXPR":q.unset("expr");if(q.exists("skip")){a==="--"&&q.unset("skip");break}q.exists("loop")&&(c+=w),q.exists("partial")&&(j+=a,q.unset("partial")),a==="endeach"&&q.unset("loop");break;case"OTHER":if(q.exists("prop")){if(q.exists("skip"))break;if(q.exists("loop")){c+=w;break}a=l(w,f),a==null&&(a={prop:w})}else if(q.exists("filter")){if(q.exists("skip"))break;if(q.exists("loop")){c+=w;break}s=w.split(" "),t=s.shift(),u=s,a=m(e,t,u,a,f,q),q.set("string")}else if(q.exists("expr")){s=w.split(" "),t=s.shift(),u=s;if(t==="if"||t==="elsif"){if(!q.exists("else")&&q.exists("skip"))break;q.exists("else")&&q.unset("else");if(q.exists("loop")){c+=w;break}if(u.length<1){if(e.debug)throw new Error("No arguments supplied for if statement")}else if(u.length===1){if(!l(u[0],f)){q.set("else"),q.set("skip");break}}else o(e,u,f)?q.unset("skip"):(q.set("else"),q.set("skip"))}else if(t==="else")q.exists("else")?q.unset("skip"):q.exists("skip")||q.set("skip");else if(t==="endif"){if(q.exists("loop")){c+=w;break}q.unset("skip")}else if(t==="each"){if(q.exists("skip"))break;if(q.exists("loop")){q.set("loop"),c+=w;break}q.set("loop");if(u.length<1){if(e.debug)throw new Error("No arguments supplied for each statement")}else b.call(f[u[0]])=="[object Array]"?(d={},a=f[u[0]],d.index=u[2],c=""):(d={},f[u[0]]&&(a=f[u[0]],d.obj=u[0],d.key=u[2],d.val=u[3],c=""))}else if(t==="endeach"){if(q.exists("skip"))break;q.unset("loop");if(!q.exists("loop"))b.call(a)=="[object Array]"?r.execArray(e,a,d,f):r.execObj(e,a,d,f),r.clear();else if(q.exists("loop")){c+=w+n.END_EXPR;break}}else if(t==="partial"){if(q.exists("skip"))break;if(q.exists("loop")){c+=w;break}s=w.split(" "),t=s.shift(),u=s,a=p(e,t,u,a,q),q.set("partial"),q.set("expr")}}else{if(q.exists("skip"))break;if(q.exists("loop")){c+=w;break}j+=w}break;case"WHITESPACE":if(q.exists("skip"))break;if(q.exists("loop")){c+=w;break}j+=w;break;case"FILTER":if(q.exists("skip"))break;if(q.exists("loop")){c+=w;break}q.unset("prop"),q.set("filter");break;case"COMMENT":if(q.exists("skip")){a="--";break}if(q.exists("loop")){c+=w;break}q.exists("expr")?q.set("skip"):j+=n.COMMENT}if(g.length)return h(e,f,g,n);k=j,q.clear(),j="",a=undefined;return k}}(),i=function(){return function(a,b,c,e){var f,i,j,k,l,m,n,o=0,p=[],q={};i=d(e.START_PROP),j=d(e.END_PROP),k=d(e.START_EXPR),l=d(e.END_EXPR),m=d(e.COMMENT),n=d(e.FILTER),q.START_PROP=RegExp("^"+i),q.END_PROP=RegExp("^"+j),q.START_EXPR=RegExp("^"+k),q.END_EXPR=RegExp("^"+l),q.COMMENT=RegExp("^"+m),q.FILTER=RegExp("^"+n),f=[i,j,k,l,m,n].join("|"),q.WHITESPACE=/^[\ |\t|\r|\n]+/,q.OTHER=RegExp("^((?!"+f+").)*");if(o=g(b,p,q))if(a.debug)throw new Error(o);p.reverse();return h(a,c,p,e)}}();j.version="0.1.6",j.prototype={render:function(){var a=this;if(!a.template||!a.context)if(a.debug)throw new Error("Missing template or context");a.delimiters=a.delimiters||{},a.delimiters=e(a.delimiters,{START_PROP:"{{",END_PROP:"}}",START_EXPR:"{%",END_EXPR:"%}",COMMENT:"--",FILTER:"|"});return i(a,a.template,a.context,a.delimiters)},delimiters:{}},typeof module!="undefined"&&module.exports?(module.exports=j,module.exports.compile=function(a){return function(b){return j(a,b).render()}}):a.combyne=j})(this)
{'fraction_non_alphanumeric': 0.34698121791122377, 'fraction_numerical': 0.008578670306102555, 'mean_word_length': 17.167650531286895, 'pattern_counts': {'":': 30, '<': 29, '<?xml version=': 0, '>': 27, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1503485', 'n_tokens_mistral': 7343, 'n_tokens_neox': 7293, 'n_words': 315}