/**
 * Minified by jsDelivr using Terser v5.39.0.
 * Original file: /npm/counter-hash-js@0.2.0/lib/counter-hash-js.js
 *
 * Do NOT use SRI with dynamically generated files! More information: https://www.jsdelivr.com/using-sri-with-dynamic-files
 */
var CounterHash=function(){function t(){this.values={}}return t.prototype.value=function(t){var e=this.values[t];return this.populated(e)?e:0},t.prototype.sum=function(){for(var t=0,e=Object.getOwnPropertyNames(this.values),o=0;o<e.length;o++){var r=e[o];t+=this.value(r)}return t},t.prototype.increment=function(t){if(this.populated(t)){var e=this.value(t);this.values[t]=e+1}},t.prototype.decrement=function(t){if(this.populated(t)){var e=this.value(t);this.values[t]=e-1}},t.prototype.add=function(t,e){if(this.populated(t)&&this.populated(e)){var o=this.value(t);this.values[t]=o+e}},t.prototype.subtract=function(t,e){if(this.populated(t)&&this.populated(e)){var o=this.value(t);this.values[t]=o-e}},t.prototype.sorted_keys=function(){return Object.getOwnPropertyNames(this.values).sort()},t.prototype.sorted_tuples=function(){for(var t=[],e=Object.getOwnPropertyNames(this.values),o=0;o<e.length;o++){var r=e[o],u=this.value(r);t.push([r,u])}return t.sort()},t.prototype.populated=function(t){return void 0!==t&&null!==t},t.VERSION="0.2.0",t}();exports.CounterHash=CounterHash;
//# sourceMappingURL=/sm/3745dc73ad8cea53ba8f0326555538b86af000bc733a3327fea397a70a99a081.map