@jaredwray/fumanchu 3.0.0 → 3.0.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -50,9 +50,9 @@ var __async = (__this, __arguments, generator) => {
50
50
  });
51
51
  };
52
52
 
53
- // lib/utils/falsey.js
53
+ // helpers/lib/utils/falsey.js
54
54
  var require_falsey = __commonJS({
55
- "lib/utils/falsey.js"(exports2, module2) {
55
+ "helpers/lib/utils/falsey.js"(exports2, module2) {
56
56
  "use strict";
57
57
  function falsey(val, keywords) {
58
58
  if (!val) {
@@ -95,9 +95,9 @@ var require_falsey = __commonJS({
95
95
  }
96
96
  });
97
97
 
98
- // lib/utils/utils.js
98
+ // helpers/lib/utils/utils.js
99
99
  var require_utils = __commonJS({
100
- "lib/utils/utils.js"(exports2, module2) {
100
+ "helpers/lib/utils/utils.js"(exports2, module2) {
101
101
  "use strict";
102
102
  var utils = require("lazy-cache")(require);
103
103
  var falsey = require_falsey();
@@ -123,9 +123,9 @@ var require_utils = __commonJS({
123
123
  }
124
124
  });
125
125
 
126
- // lib/utils/index.js
126
+ // helpers/lib/utils/index.js
127
127
  var require_utils2 = __commonJS({
128
- "lib/utils/index.js"(exports2, module2) {
128
+ "helpers/lib/utils/index.js"(exports2, module2) {
129
129
  "use strict";
130
130
  var util = require("handlebars-utils");
131
131
  var utils = require_utils();
@@ -164,32 +164,32 @@ var require_utils2 = __commonJS({
164
164
  }
165
165
  });
166
166
 
167
- // lib/array.js
167
+ // helpers/lib/array.js
168
168
  var require_array = __commonJS({
169
- "lib/array.js"(exports2, module2) {
169
+ "helpers/lib/array.js"(exports2, module2) {
170
170
  "use strict";
171
171
  var util = require("handlebars-utils");
172
172
  var utils = require_utils2();
173
- var helpers2 = module2.exports;
174
- helpers2.after = function(array, n) {
173
+ var helpers3 = module2.exports;
174
+ helpers3.after = function(array, n) {
175
175
  if (util.isUndefined(array)) return "";
176
176
  return array.slice(n);
177
177
  };
178
- helpers2.arrayify = function(value) {
178
+ helpers3.arrayify = function(value) {
179
179
  return value ? Array.isArray(value) ? value : [value] : [];
180
180
  };
181
- helpers2.before = function(array, n) {
181
+ helpers3.before = function(array, n) {
182
182
  if (util.isUndefined(array)) return "";
183
183
  return array.slice(0, -n);
184
184
  };
185
- helpers2.eachIndex = function(array, options) {
185
+ helpers3.eachIndex = function(array, options) {
186
186
  var result = "";
187
187
  for (var i = 0; i < array.length; i++) {
188
188
  result += options.fn({ item: array[i], index: i });
189
189
  }
190
190
  return result;
191
191
  };
192
- helpers2.filter = function(array, value, options) {
192
+ helpers3.filter = function(array, value, options) {
193
193
  var content = "";
194
194
  var results = [];
195
195
  var prop = options.hash && (options.hash.property || options.hash.prop);
@@ -210,14 +210,14 @@ var require_array = __commonJS({
210
210
  }
211
211
  return options.inverse(this);
212
212
  };
213
- helpers2.first = function(array, n) {
213
+ helpers3.first = function(array, n) {
214
214
  if (util.isUndefined(array)) return "";
215
215
  if (!utils.isNumber(n)) {
216
216
  return array[0];
217
217
  }
218
218
  return array.slice(0, n);
219
219
  };
220
- helpers2.forEach = function(array, options) {
220
+ helpers3.forEach = function(array, options) {
221
221
  var data = utils.createFrame(options, options.hash);
222
222
  var len = array.length;
223
223
  var buffer = "";
@@ -233,13 +233,13 @@ var require_array = __commonJS({
233
233
  }
234
234
  return buffer;
235
235
  };
236
- helpers2.inArray = function(array, value, options) {
236
+ helpers3.inArray = function(array, value, options) {
237
237
  return util.value(util.indexOf(array, value) > -1, this, options);
238
238
  };
239
- helpers2.isArray = function(value) {
239
+ helpers3.isArray = function(value) {
240
240
  return Array.isArray(value);
241
241
  };
242
- helpers2.itemAt = function(array, idx) {
242
+ helpers3.itemAt = function(array, idx) {
243
243
  array = util.result(array);
244
244
  if (Array.isArray(array)) {
245
245
  idx = utils.isNumber(idx) ? +idx : 0;
@@ -251,13 +251,13 @@ var require_array = __commonJS({
251
251
  }
252
252
  }
253
253
  };
254
- helpers2.join = function(array, separator) {
254
+ helpers3.join = function(array, separator) {
255
255
  if (typeof array === "string") return array;
256
256
  if (!Array.isArray(array)) return "";
257
257
  separator = util.isString(separator) ? separator : ", ";
258
258
  return array.join(separator);
259
259
  };
260
- helpers2.equalsLength = function(value, length, options) {
260
+ helpers3.equalsLength = function(value, length, options) {
261
261
  if (util.isOptions(length)) {
262
262
  options = length;
263
263
  length = 0;
@@ -268,7 +268,7 @@ var require_array = __commonJS({
268
268
  }
269
269
  return util.value(len === length, this, options);
270
270
  };
271
- helpers2.last = function(value, n) {
271
+ helpers3.last = function(value, n) {
272
272
  if (!Array.isArray(value) && typeof value !== "string") {
273
273
  return "";
274
274
  }
@@ -277,7 +277,7 @@ var require_array = __commonJS({
277
277
  }
278
278
  return value.slice(-Math.abs(n));
279
279
  };
280
- helpers2.length = function(value) {
280
+ helpers3.length = function(value) {
281
281
  if (util.isObject(value) && !util.isOptions(value)) {
282
282
  value = Object.keys(value);
283
283
  }
@@ -286,8 +286,8 @@ var require_array = __commonJS({
286
286
  }
287
287
  return 0;
288
288
  };
289
- helpers2.lengthEqual = helpers2.equalsLength;
290
- helpers2.map = function(array, iter) {
289
+ helpers3.lengthEqual = helpers3.equalsLength;
290
+ helpers3.map = function(array, iter) {
291
291
  if (!Array.isArray(array)) return "";
292
292
  var len = array.length;
293
293
  var res = new Array(len);
@@ -300,7 +300,7 @@ var require_array = __commonJS({
300
300
  }
301
301
  return res;
302
302
  };
303
- helpers2.pluck = function(arr, prop) {
303
+ helpers3.pluck = function(arr, prop) {
304
304
  if (util.isUndefined(arr)) return "";
305
305
  var res = [];
306
306
  for (var i = 0; i < arr.length; i++) {
@@ -311,7 +311,7 @@ var require_array = __commonJS({
311
311
  }
312
312
  return res;
313
313
  };
314
- helpers2.reverse = function(val) {
314
+ helpers3.reverse = function(val) {
315
315
  if (Array.isArray(val)) {
316
316
  val.reverse();
317
317
  return val;
@@ -320,7 +320,7 @@ var require_array = __commonJS({
320
320
  return val.split("").reverse().join("");
321
321
  }
322
322
  };
323
- helpers2.some = function(array, iter, options) {
323
+ helpers3.some = function(array, iter, options) {
324
324
  if (Array.isArray(array)) {
325
325
  for (var i = 0; i < array.length; i++) {
326
326
  if (iter(array[i], i, array)) {
@@ -330,14 +330,14 @@ var require_array = __commonJS({
330
330
  }
331
331
  return options.inverse(this);
332
332
  };
333
- helpers2.sort = function(array, options) {
333
+ helpers3.sort = function(array, options) {
334
334
  if (!Array.isArray(array)) return "";
335
335
  if (utils.get(options, "hash.reverse")) {
336
336
  return array.sort().reverse();
337
337
  }
338
338
  return array.sort();
339
339
  };
340
- helpers2.sortBy = function(array, prop, options) {
340
+ helpers3.sortBy = function(array, prop, options) {
341
341
  if (!Array.isArray(array)) return "";
342
342
  var args = [].slice.call(arguments);
343
343
  args.pop();
@@ -346,7 +346,7 @@ var require_array = __commonJS({
346
346
  }
347
347
  return utils.sortBy.apply(null, args);
348
348
  };
349
- helpers2.withAfter = function(array, idx, options) {
349
+ helpers3.withAfter = function(array, idx, options) {
350
350
  if (!Array.isArray(array)) return "";
351
351
  array = array.slice(idx);
352
352
  var result = "";
@@ -355,7 +355,7 @@ var require_array = __commonJS({
355
355
  }
356
356
  return result;
357
357
  };
358
- helpers2.withBefore = function(array, idx, options) {
358
+ helpers3.withBefore = function(array, idx, options) {
359
359
  if (!Array.isArray(array)) return "";
360
360
  array = array.slice(0, -idx);
361
361
  var result = "";
@@ -364,7 +364,7 @@ var require_array = __commonJS({
364
364
  }
365
365
  return result;
366
366
  };
367
- helpers2.withFirst = function(array, idx, options) {
367
+ helpers3.withFirst = function(array, idx, options) {
368
368
  if (util.isUndefined(array)) return "";
369
369
  array = util.result(array);
370
370
  if (!util.isUndefined(idx)) {
@@ -381,7 +381,7 @@ var require_array = __commonJS({
381
381
  }
382
382
  return result;
383
383
  };
384
- helpers2.withGroup = function(array, size, options) {
384
+ helpers3.withGroup = function(array, size, options) {
385
385
  var result = "";
386
386
  if (Array.isArray(array) && array.length > 0) {
387
387
  var subcontext = [];
@@ -396,7 +396,7 @@ var require_array = __commonJS({
396
396
  }
397
397
  return result;
398
398
  };
399
- helpers2.withLast = function(array, idx, options) {
399
+ helpers3.withLast = function(array, idx, options) {
400
400
  if (util.isUndefined(array)) return "";
401
401
  array = util.result(array);
402
402
  if (!util.isUndefined(idx)) {
@@ -414,7 +414,7 @@ var require_array = __commonJS({
414
414
  }
415
415
  return result;
416
416
  };
417
- helpers2.withSort = function(array, prop, options) {
417
+ helpers3.withSort = function(array, prop, options) {
418
418
  if (util.isUndefined(array)) return "";
419
419
  var result = "";
420
420
  if (util.isUndefined(prop)) {
@@ -442,7 +442,7 @@ var require_array = __commonJS({
442
442
  }
443
443
  return result;
444
444
  };
445
- helpers2.unique = function(array, options) {
445
+ helpers3.unique = function(array, options) {
446
446
  if (util.isUndefined(array)) return "";
447
447
  return array.filter(function(item, index, arr) {
448
448
  return arr.indexOf(item) === index;
@@ -451,15 +451,15 @@ var require_array = __commonJS({
451
451
  }
452
452
  });
453
453
 
454
- // lib/code.js
454
+ // helpers/lib/code.js
455
455
  var require_code = __commonJS({
456
- "lib/code.js"(exports2, module2) {
456
+ "helpers/lib/code.js"(exports2, module2) {
457
457
  "use strict";
458
458
  var fs = require("fs");
459
459
  var path = require("path");
460
460
  var utils = require_utils2();
461
- var helpers2 = module2.exports;
462
- helpers2.embed = function embed(filepath, ext) {
461
+ var helpers3 = module2.exports;
462
+ helpers3.embed = function embed(filepath, ext) {
463
463
  ext = typeof ext !== "string" ? path.extname(filepath).slice(1) : ext;
464
464
  var code = fs.readFileSync(filepath, "utf8");
465
465
  if (ext === "markdown" || ext === "md") {
@@ -468,10 +468,10 @@ var require_code = __commonJS({
468
468
  }
469
469
  return utils.block(code, ext).trim() + "\n";
470
470
  };
471
- helpers2.gist = function(id) {
471
+ helpers3.gist = function(id) {
472
472
  return utils.tag("script", { src: "https://gist.github.com/" + id + ".js" });
473
473
  };
474
- helpers2.jsfiddle = function jsFiddle(options) {
474
+ helpers3.jsfiddle = function jsFiddle(options) {
475
475
  var attr = Object.assign({}, options && options.hash);
476
476
  if (typeof attr.id === "undefined") {
477
477
  throw new Error("jsfiddle helper expects an `id`");
@@ -492,16 +492,16 @@ var require_code = __commonJS({
492
492
  }
493
493
  });
494
494
 
495
- // lib/object.js
495
+ // helpers/lib/object.js
496
496
  var require_object = __commonJS({
497
- "lib/object.js"(exports2, module2) {
497
+ "helpers/lib/object.js"(exports2, module2) {
498
498
  "use strict";
499
499
  var hasOwn = Object.hasOwnProperty;
500
500
  var util = require("handlebars-utils");
501
501
  var array = require_array();
502
502
  var utils = require_utils2();
503
- var helpers2 = module2.exports;
504
- helpers2.extend = function() {
503
+ var helpers3 = module2.exports;
504
+ helpers3.extend = function() {
505
505
  var args = [].slice.call(arguments);
506
506
  var opts = {};
507
507
  if (util.isOptions(args[args.length - 1])) {
@@ -521,7 +521,7 @@ var require_object = __commonJS({
521
521
  }
522
522
  return context;
523
523
  };
524
- helpers2.forIn = function(obj, options) {
524
+ helpers3.forIn = function(obj, options) {
525
525
  if (!util.isOptions(options)) {
526
526
  return obj.inverse(this);
527
527
  }
@@ -533,7 +533,7 @@ var require_object = __commonJS({
533
533
  }
534
534
  return result;
535
535
  };
536
- helpers2.forOwn = function(obj, options) {
536
+ helpers3.forOwn = function(obj, options) {
537
537
  if (!util.isOptions(options)) {
538
538
  return obj.inverse(this);
539
539
  }
@@ -547,7 +547,7 @@ var require_object = __commonJS({
547
547
  }
548
548
  return result;
549
549
  };
550
- helpers2.toPath = function() {
550
+ helpers3.toPath = function() {
551
551
  var prop = [];
552
552
  for (var i = 0; i < arguments.length; i++) {
553
553
  if (typeof arguments[i] === "string" || typeof arguments[i] === "number") {
@@ -556,32 +556,32 @@ var require_object = __commonJS({
556
556
  }
557
557
  return prop.join(".");
558
558
  };
559
- helpers2.get = function(prop, context, options) {
559
+ helpers3.get = function(prop, context, options) {
560
560
  var val = utils.get(context, prop);
561
561
  if (options && options.fn) {
562
562
  return val ? options.fn(val) : options.inverse(context);
563
563
  }
564
564
  return val;
565
565
  };
566
- helpers2.getObject = function(prop, context) {
566
+ helpers3.getObject = function(prop, context) {
567
567
  return utils.getObject(context, prop);
568
568
  };
569
- helpers2.hasOwn = function(context, key) {
569
+ helpers3.hasOwn = function(context, key) {
570
570
  return hasOwn.call(context, key);
571
571
  };
572
- helpers2.isObject = function(value) {
572
+ helpers3.isObject = function(value) {
573
573
  return utils.typeOf(value) === "object";
574
574
  };
575
- helpers2.JSONparse = function(str, options) {
575
+ helpers3.JSONparse = function(str, options) {
576
576
  return JSON.parse(str);
577
577
  };
578
- helpers2.JSONstringify = function(obj, indent) {
578
+ helpers3.JSONstringify = function(obj, indent) {
579
579
  if (!utils.isNumber(indent)) {
580
580
  indent = 0;
581
581
  }
582
582
  return JSON.stringify(obj, null, indent);
583
583
  };
584
- helpers2.merge = function(context) {
584
+ helpers3.merge = function(context) {
585
585
  var args = [].slice.call(arguments);
586
586
  var opts = {};
587
587
  if (util.isOptions(args[args.length - 1])) {
@@ -590,13 +590,13 @@ var require_object = __commonJS({
590
590
  }
591
591
  return Object.assign.apply(null, args);
592
592
  };
593
- helpers2.parseJSON = helpers2.JSONparse;
594
- helpers2.pick = function(props, context, options) {
593
+ helpers3.parseJSON = helpers3.JSONparse;
594
+ helpers3.pick = function(props, context, options) {
595
595
  var keys = array.arrayify(props);
596
596
  var len = keys.length, i = -1;
597
597
  var result = {};
598
598
  while (++i < len) {
599
- result = helpers2.extend({}, result, utils.getObject(context, keys[i]));
599
+ result = helpers3.extend({}, result, utils.getObject(context, keys[i]));
600
600
  }
601
601
  if (options.fn) {
602
602
  if (Object.keys(result).length) {
@@ -606,21 +606,21 @@ var require_object = __commonJS({
606
606
  }
607
607
  return result;
608
608
  };
609
- helpers2.stringify = helpers2.JSONstringify;
609
+ helpers3.stringify = helpers3.JSONstringify;
610
610
  }
611
611
  });
612
612
 
613
- // lib/collection.js
613
+ // helpers/lib/collection.js
614
614
  var require_collection = __commonJS({
615
- "lib/collection.js"(exports2, module2) {
615
+ "helpers/lib/collection.js"(exports2, module2) {
616
616
  "use strict";
617
617
  var util = require("handlebars-utils");
618
618
  var object = require_object();
619
619
  var array = require_array();
620
620
  var forEach = array.forEach;
621
621
  var forOwn = object.forOwn;
622
- var helpers2 = module2.exports;
623
- helpers2.isEmpty = function(collection, options) {
622
+ var helpers3 = module2.exports;
623
+ helpers3.isEmpty = function(collection, options) {
624
624
  if (!util.isOptions(options)) {
625
625
  options = collection;
626
626
  return util.fn(true, this, options);
@@ -632,7 +632,7 @@ var require_collection = __commonJS({
632
632
  var isEmpty = typeof collection === "object" && !keys.length;
633
633
  return util.value(isEmpty, this, options);
634
634
  };
635
- helpers2.iterate = function(collection, options) {
635
+ helpers3.iterate = function(collection, options) {
636
636
  if (Array.isArray(collection)) {
637
637
  return forEach.apply(null, arguments);
638
638
  }
@@ -644,15 +644,15 @@ var require_collection = __commonJS({
644
644
  }
645
645
  });
646
646
 
647
- // lib/comparison.js
647
+ // helpers/lib/comparison.js
648
648
  var require_comparison = __commonJS({
649
- "lib/comparison.js"(exports2, module2) {
649
+ "helpers/lib/comparison.js"(exports2, module2) {
650
650
  "use strict";
651
651
  var has = require("has-value");
652
652
  var util = require("handlebars-utils");
653
653
  var utils = require_utils2();
654
- var helpers2 = module2.exports;
655
- helpers2.and = function() {
654
+ var helpers3 = module2.exports;
655
+ helpers3.and = function() {
656
656
  var len = arguments.length - 1;
657
657
  var options = arguments[len];
658
658
  var val = true;
@@ -664,7 +664,7 @@ var require_comparison = __commonJS({
664
664
  }
665
665
  return util.value(val, this, options);
666
666
  };
667
- helpers2.compare = function(a, operator, b, options) {
667
+ helpers3.compare = function(a, operator, b, options) {
668
668
  if (arguments.length < 4) {
669
669
  throw new Error("handlebars Helper {{compare}} expects 4 arguments");
670
670
  }
@@ -703,7 +703,7 @@ var require_comparison = __commonJS({
703
703
  }
704
704
  return util.value(result, this, options);
705
705
  };
706
- helpers2.contains = function(collection, value, startIndex, options) {
706
+ helpers3.contains = function(collection, value, startIndex, options) {
707
707
  if (typeof startIndex === "object") {
708
708
  options = startIndex;
709
709
  startIndex = void 0;
@@ -711,34 +711,34 @@ var require_comparison = __commonJS({
711
711
  var val = utils.contains(collection, value, startIndex);
712
712
  return util.value(val, this, options);
713
713
  };
714
- helpers2.default = function() {
714
+ helpers3.default = function() {
715
715
  for (var i = 0; i < arguments.length - 1; i++) {
716
716
  if (arguments[i] != null) return arguments[i];
717
717
  }
718
718
  return "";
719
719
  };
720
- helpers2.eq = function(a, b, options) {
720
+ helpers3.eq = function(a, b, options) {
721
721
  if (arguments.length === 2) {
722
722
  options = b;
723
723
  b = options.hash.compare;
724
724
  }
725
725
  return util.value(a === b, this, options);
726
726
  };
727
- helpers2.gt = function(a, b, options) {
727
+ helpers3.gt = function(a, b, options) {
728
728
  if (arguments.length === 2) {
729
729
  options = b;
730
730
  b = options.hash.compare;
731
731
  }
732
732
  return util.value(a > b, this, options);
733
733
  };
734
- helpers2.gte = function(a, b, options) {
734
+ helpers3.gte = function(a, b, options) {
735
735
  if (arguments.length === 2) {
736
736
  options = b;
737
737
  b = options.hash.compare;
738
738
  }
739
739
  return util.value(a >= b, this, options);
740
740
  };
741
- helpers2.has = function(value, pattern, options) {
741
+ helpers3.has = function(value, pattern, options) {
742
742
  if (util.isOptions(value)) {
743
743
  options = value;
744
744
  pattern = null;
@@ -764,57 +764,57 @@ var require_comparison = __commonJS({
764
764
  }
765
765
  return util.inverse(false, this, options);
766
766
  };
767
- helpers2.isFalsey = function(val, options) {
767
+ helpers3.isFalsey = function(val, options) {
768
768
  return util.value(utils.falsey(val), this, options);
769
769
  };
770
- helpers2.isTruthy = function(val, options) {
770
+ helpers3.isTruthy = function(val, options) {
771
771
  return util.value(!utils.falsey(val), this, options);
772
772
  };
773
- helpers2.ifEven = function(num, options) {
773
+ helpers3.ifEven = function(num, options) {
774
774
  return util.value(utils.isEven(num), this, options);
775
775
  };
776
- helpers2.ifNth = function(a, b, options) {
776
+ helpers3.ifNth = function(a, b, options) {
777
777
  var isNth = utils.isNumber(a) && utils.isNumber(b) && b % a === 0;
778
778
  return util.value(isNth, this, options);
779
779
  };
780
- helpers2.ifOdd = function(val, options) {
780
+ helpers3.ifOdd = function(val, options) {
781
781
  return util.value(!utils.isEven(val), this, options);
782
782
  };
783
- helpers2.is = function(a, b, options) {
783
+ helpers3.is = function(a, b, options) {
784
784
  if (arguments.length === 2) {
785
785
  options = b;
786
786
  b = options.hash.compare;
787
787
  }
788
788
  return util.value(a == b, this, options);
789
789
  };
790
- helpers2.isnt = function(a, b, options) {
790
+ helpers3.isnt = function(a, b, options) {
791
791
  if (arguments.length === 2) {
792
792
  options = b;
793
793
  b = options.hash.compare;
794
794
  }
795
795
  return util.value(a != b, this, options);
796
796
  };
797
- helpers2.lt = function(a, b, options) {
797
+ helpers3.lt = function(a, b, options) {
798
798
  if (arguments.length === 2) {
799
799
  options = b;
800
800
  b = options.hash.compare;
801
801
  }
802
802
  return util.value(a < b, this, options);
803
803
  };
804
- helpers2.lte = function(a, b, options) {
804
+ helpers3.lte = function(a, b, options) {
805
805
  if (arguments.length === 2) {
806
806
  options = b;
807
807
  b = options.hash.compare;
808
808
  }
809
809
  return util.value(a <= b, this, options);
810
810
  };
811
- helpers2.neither = function(a, b, options) {
811
+ helpers3.neither = function(a, b, options) {
812
812
  return util.value(!a && !b, this, options);
813
813
  };
814
- helpers2.not = function(val, options) {
814
+ helpers3.not = function(val, options) {
815
815
  return util.value(!val, this, options);
816
816
  };
817
- helpers2.or = function() {
817
+ helpers3.or = function() {
818
818
  var len = arguments.length - 1;
819
819
  var options = arguments[len];
820
820
  var val = false;
@@ -826,35 +826,35 @@ var require_comparison = __commonJS({
826
826
  }
827
827
  return util.value(val, this, options);
828
828
  };
829
- helpers2.unlessEq = function(a, b, options) {
829
+ helpers3.unlessEq = function(a, b, options) {
830
830
  if (util.isOptions(b)) {
831
831
  options = b;
832
832
  b = options.hash.compare;
833
833
  }
834
834
  return util.value(a !== b, this, options);
835
835
  };
836
- helpers2.unlessGt = function(a, b, options) {
836
+ helpers3.unlessGt = function(a, b, options) {
837
837
  if (util.isOptions(b)) {
838
838
  options = b;
839
839
  b = options.hash.compare;
840
840
  }
841
841
  return util.value(a <= b, this, options);
842
842
  };
843
- helpers2.unlessLt = function(a, b, options) {
843
+ helpers3.unlessLt = function(a, b, options) {
844
844
  if (util.isOptions(b)) {
845
845
  options = b;
846
846
  b = options.hash.compare;
847
847
  }
848
848
  return util.value(a >= b, this, options);
849
849
  };
850
- helpers2.unlessGteq = function(a, b, options) {
850
+ helpers3.unlessGteq = function(a, b, options) {
851
851
  if (util.isOptions(b)) {
852
852
  options = b;
853
853
  b = options.hash.compare;
854
854
  }
855
855
  return util.value(a < b, this, options);
856
856
  };
857
- helpers2.unlessLteq = function(a, b, options) {
857
+ helpers3.unlessLteq = function(a, b, options) {
858
858
  if (util.isOptions(b)) {
859
859
  options = b;
860
860
  b = options.hash.compare;
@@ -864,25 +864,25 @@ var require_comparison = __commonJS({
864
864
  }
865
865
  });
866
866
 
867
- // lib/date.js
867
+ // helpers/lib/date.js
868
868
  var require_date = __commonJS({
869
- "lib/date.js"(exports2, module2) {
869
+ "helpers/lib/date.js"(exports2, module2) {
870
870
  "use strict";
871
- var helpers2 = module2.exports;
872
- helpers2.year = require("year");
873
- helpers2.moment = helpers2.date = require("helper-date");
871
+ var helpers3 = module2.exports;
872
+ helpers3.year = require("year");
873
+ helpers3.moment = helpers3.date = require("helper-date");
874
874
  }
875
875
  });
876
876
 
877
- // lib/number.js
877
+ // helpers/lib/number.js
878
878
  var require_number = __commonJS({
879
- "lib/number.js"(exports2, module2) {
879
+ "helpers/lib/number.js"(exports2, module2) {
880
880
  "use strict";
881
881
  var isNumber = require("is-number");
882
882
  var util = require("handlebars-utils");
883
883
  var utils = require_utils2();
884
- var helpers2 = module2.exports;
885
- helpers2.bytes = function(number, precision, options) {
884
+ var helpers3 = module2.exports;
885
+ helpers3.bytes = function(number, precision, options) {
886
886
  if (number == null) return "0 B";
887
887
  if (!utils.isNumber(number)) {
888
888
  number = number.length;
@@ -905,14 +905,14 @@ var require_number = __commonJS({
905
905
  }
906
906
  return number;
907
907
  };
908
- helpers2.addCommas = function(num) {
908
+ helpers3.addCommas = function(num) {
909
909
  return num.toString().replace(/(\d)(?=(\d\d\d)+(?!\d))/g, "$1,");
910
910
  };
911
- helpers2.phoneNumber = function(num) {
911
+ helpers3.phoneNumber = function(num) {
912
912
  num = num.toString();
913
913
  return "(" + num.substr(0, 3) + ") " + num.substr(3, 3) + "-" + num.substr(6, 4);
914
914
  };
915
- helpers2.toAbbr = function(number, precision) {
915
+ helpers3.toAbbr = function(number, precision) {
916
916
  if (!utils.isNumber(number)) {
917
917
  number = 0;
918
918
  }
@@ -934,7 +934,7 @@ var require_number = __commonJS({
934
934
  }
935
935
  return number;
936
936
  };
937
- helpers2.toExponential = function(number, digits) {
937
+ helpers3.toExponential = function(number, digits) {
938
938
  if (!utils.isNumber(number)) {
939
939
  number = 0;
940
940
  }
@@ -943,7 +943,7 @@ var require_number = __commonJS({
943
943
  }
944
944
  return Number(number).toExponential(digits);
945
945
  };
946
- helpers2.toFixed = function(number, digits) {
946
+ helpers3.toFixed = function(number, digits) {
947
947
  if (!utils.isNumber(number)) {
948
948
  number = 0;
949
949
  }
@@ -952,13 +952,13 @@ var require_number = __commonJS({
952
952
  }
953
953
  return Number(number).toFixed(digits);
954
954
  };
955
- helpers2.toFloat = function(number) {
955
+ helpers3.toFloat = function(number) {
956
956
  return parseFloat(number);
957
957
  };
958
- helpers2.toInt = function(number) {
958
+ helpers3.toInt = function(number) {
959
959
  return parseInt(number, 10);
960
960
  };
961
- helpers2.toPrecision = function(number, precision) {
961
+ helpers3.toPrecision = function(number, precision) {
962
962
  if (!utils.isNumber(number)) {
963
963
  number = 0;
964
964
  }
@@ -970,21 +970,21 @@ var require_number = __commonJS({
970
970
  }
971
971
  });
972
972
 
973
- // lib/fs.js
973
+ // helpers/lib/fs.js
974
974
  var require_fs = __commonJS({
975
- "lib/fs.js"(exports2, module2) {
975
+ "helpers/lib/fs.js"(exports2, module2) {
976
976
  "use strict";
977
977
  var fs = require("fs");
978
978
  var path = require("path");
979
979
  var util = require("handlebars-utils");
980
980
  var utils = require_utils2();
981
981
  var number = require_number();
982
- var helpers2 = module2.exports;
983
- helpers2.fileSize = number.bytes;
984
- helpers2.read = function(filepath, options) {
982
+ var helpers3 = module2.exports;
983
+ helpers3.fileSize = number.bytes;
984
+ helpers3.read = function(filepath, options) {
985
985
  return fs.readFileSync(filepath, "utf8");
986
986
  };
987
- helpers2.readdir = function(dir, filter) {
987
+ helpers3.readdir = function(dir, filter) {
988
988
  var files = fs.readdirSync(dir);
989
989
  files = files.map(function(fp) {
990
990
  return path.join(dir, fp);
@@ -1021,9 +1021,9 @@ var require_fs = __commonJS({
1021
1021
  }
1022
1022
  });
1023
1023
 
1024
- // lib/utils/html.js
1024
+ // helpers/lib/utils/html.js
1025
1025
  var require_html = __commonJS({
1026
- "lib/utils/html.js"(exports2, module2) {
1026
+ "helpers/lib/utils/html.js"(exports2, module2) {
1027
1027
  "use strict";
1028
1028
  var util = require("handlebars-utils");
1029
1029
  var striptags = require("striptags");
@@ -1060,21 +1060,21 @@ var require_html = __commonJS({
1060
1060
  }
1061
1061
  });
1062
1062
 
1063
- // lib/html.js
1063
+ // helpers/lib/html.js
1064
1064
  var require_html2 = __commonJS({
1065
- "lib/html.js"(exports2, module2) {
1065
+ "helpers/lib/html.js"(exports2, module2) {
1066
1066
  "use strict";
1067
1067
  var path = require("path");
1068
1068
  var util = require("handlebars-utils");
1069
1069
  var html = require_html();
1070
1070
  var utils = require_utils2();
1071
1071
  var parseAttr = html.parseAttributes;
1072
- var helpers2 = module2.exports;
1073
- helpers2.attr = function(options) {
1072
+ var helpers3 = module2.exports;
1073
+ helpers3.attr = function(options) {
1074
1074
  var val = parseAttr(options && options.hash || {});
1075
1075
  return val.trim() ? " " + val : "";
1076
1076
  };
1077
- helpers2.css = function(list, options) {
1077
+ helpers3.css = function(list, options) {
1078
1078
  if (arguments.length < 2) {
1079
1079
  options = list;
1080
1080
  list = [];
@@ -1099,7 +1099,7 @@ var require_html2 = __commonJS({
1099
1099
  return '<link type="text/css" rel="stylesheet" href="' + fp + '">';
1100
1100
  }).join("\n");
1101
1101
  };
1102
- helpers2.js = function(context) {
1102
+ helpers3.js = function(context) {
1103
1103
  if (utils.typeOf(context) === "object") {
1104
1104
  var attr = parseAttr(context.hash);
1105
1105
  return "<script" + (attr ? " " + attr : "") + "></script>";
@@ -1112,10 +1112,10 @@ var require_html2 = __commonJS({
1112
1112
  return path.extname(fp) === ".coffee" ? utils.tag("script", { type: "text/coffeescript", src: fp }) : utils.tag("script", { src: fp });
1113
1113
  }).join("\n");
1114
1114
  };
1115
- helpers2.sanitize = function(str) {
1115
+ helpers3.sanitize = function(str) {
1116
1116
  return html.sanitize(str);
1117
1117
  };
1118
- helpers2.ul = function(context, options) {
1118
+ helpers3.ul = function(context, options) {
1119
1119
  return "<ul " + parseAttr(options.hash) + ">" + context.map(function(item) {
1120
1120
  if (typeof item !== "string") {
1121
1121
  item = options.fn(item);
@@ -1123,7 +1123,7 @@ var require_html2 = __commonJS({
1123
1123
  return "<li>" + item + "</li>";
1124
1124
  }).join("\n") + "</ul>";
1125
1125
  };
1126
- helpers2.ol = function(context, options) {
1126
+ helpers3.ol = function(context, options) {
1127
1127
  return "<ol " + parseAttr(options.hash) + ">" + context.map(function(item) {
1128
1128
  if (typeof item !== "string") {
1129
1129
  item = options.fn(item);
@@ -1131,7 +1131,7 @@ var require_html2 = __commonJS({
1131
1131
  return "<li>" + item + "</li>";
1132
1132
  }).join("\n") + "</ol>";
1133
1133
  };
1134
- helpers2.thumbnailImage = function(context) {
1134
+ helpers3.thumbnailImage = function(context) {
1135
1135
  var figure = "";
1136
1136
  var image = "";
1137
1137
  var link = context.full || false;
@@ -1170,14 +1170,14 @@ var require_html2 = __commonJS({
1170
1170
  }
1171
1171
  });
1172
1172
 
1173
- // lib/i18n.js
1173
+ // helpers/lib/i18n.js
1174
1174
  var require_i18n = __commonJS({
1175
- "lib/i18n.js"(exports2, module2) {
1175
+ "helpers/lib/i18n.js"(exports2, module2) {
1176
1176
  "use strict";
1177
1177
  var util = require("handlebars-utils");
1178
1178
  var utils = require_utils2();
1179
- var helpers2 = module2.exports;
1180
- helpers2.i18n = function(prop, locals, options) {
1179
+ var helpers3 = module2.exports;
1180
+ helpers3.i18n = function(prop, locals, options) {
1181
1181
  if (util.isOptions(locals)) {
1182
1182
  options = locals;
1183
1183
  locals = {};
@@ -1204,13 +1204,13 @@ var require_i18n = __commonJS({
1204
1204
  }
1205
1205
  });
1206
1206
 
1207
- // lib/inflection.js
1207
+ // helpers/lib/inflection.js
1208
1208
  var require_inflection = __commonJS({
1209
- "lib/inflection.js"(exports2, module2) {
1209
+ "helpers/lib/inflection.js"(exports2, module2) {
1210
1210
  "use strict";
1211
1211
  var util = require("handlebars-utils");
1212
- var helpers2 = module2.exports;
1213
- helpers2.inflect = function(count, singular, plural, includeCount) {
1212
+ var helpers3 = module2.exports;
1213
+ helpers3.inflect = function(count, singular, plural, includeCount) {
1214
1214
  var word = count > 1 || count === 0 ? plural : singular;
1215
1215
  if (includeCount === true) {
1216
1216
  return String(count) + " " + word;
@@ -1218,7 +1218,7 @@ var require_inflection = __commonJS({
1218
1218
  return word;
1219
1219
  }
1220
1220
  };
1221
- helpers2.ordinalize = function(val) {
1221
+ helpers3.ordinalize = function(val) {
1222
1222
  var num = Math.abs(Math.round(val));
1223
1223
  var str = String(val);
1224
1224
  var res = num % 100;
@@ -1240,17 +1240,17 @@ var require_inflection = __commonJS({
1240
1240
  }
1241
1241
  });
1242
1242
 
1243
- // lib/logging.js
1243
+ // helpers/lib/logging.js
1244
1244
  var require_logging = __commonJS({
1245
- "lib/logging.js"(exports2, module2) {
1245
+ "helpers/lib/logging.js"(exports2, module2) {
1246
1246
  "use strict";
1247
1247
  module2.exports = require("logging-helpers");
1248
1248
  }
1249
1249
  });
1250
1250
 
1251
- // lib/md.js
1251
+ // helpers/lib/md.js
1252
1252
  var require_md = __commonJS({
1253
- "lib/md.js"(exports2, module2) {
1253
+ "helpers/lib/md.js"(exports2, module2) {
1254
1254
  "use strict";
1255
1255
  var fs = require("fs");
1256
1256
  var path = require("path");
@@ -1336,16 +1336,16 @@ var require_md = __commonJS({
1336
1336
  }
1337
1337
  });
1338
1338
 
1339
- // lib/markdown.js
1339
+ // helpers/lib/markdown.js
1340
1340
  var require_markdown = __commonJS({
1341
- "lib/markdown.js"(exports2, module2) {
1341
+ "helpers/lib/markdown.js"(exports2, module2) {
1342
1342
  "use strict";
1343
1343
  var hljs = require("highlight.js");
1344
1344
  var utils = require("handlebars-utils");
1345
1345
  var { Remarkable } = require("remarkable");
1346
- var helpers2 = module2.exports;
1346
+ var helpers3 = module2.exports;
1347
1347
  var markdown;
1348
- Object.defineProperty(helpers2, "markdown", {
1348
+ Object.defineProperty(helpers3, "markdown", {
1349
1349
  configurable: true,
1350
1350
  enumerable: true,
1351
1351
  set: function(val) {
@@ -1355,9 +1355,9 @@ var require_markdown = __commonJS({
1355
1355
  return markdown || (markdown = this.helpersForMarkdown());
1356
1356
  }
1357
1357
  });
1358
- helpers2.md = require_md();
1359
- helpers2.helpersForMarkdown = function(config) {
1360
- const defaults = { html: true, breaks: true, highlight: helpers2.highlightFormMarkdown };
1358
+ helpers3.md = require_md();
1359
+ helpers3.helpersForMarkdown = function(config) {
1360
+ const defaults = { html: true, breaks: true, highlight: helpers3.highlightFormMarkdown };
1361
1361
  if (typeof config === "string" || utils.isOptions(config)) {
1362
1362
  return markdown2.apply(defaults, arguments);
1363
1363
  }
@@ -1383,7 +1383,7 @@ var require_markdown = __commonJS({
1383
1383
  }
1384
1384
  return markdown2;
1385
1385
  };
1386
- helpers2.highlightFormMarkdown = function(code, lang) {
1386
+ helpers3.highlightFormMarkdown = function(code, lang) {
1387
1387
  if (lang) {
1388
1388
  return hljs.highlight(code, { language: lang }).value;
1389
1389
  }
@@ -1392,64 +1392,64 @@ var require_markdown = __commonJS({
1392
1392
  }
1393
1393
  });
1394
1394
 
1395
- // lib/match.js
1395
+ // helpers/lib/match.js
1396
1396
  var require_match = __commonJS({
1397
- "lib/match.js"(exports2, module2) {
1397
+ "helpers/lib/match.js"(exports2, module2) {
1398
1398
  "use strict";
1399
1399
  var util = require("handlebars-utils");
1400
1400
  var utils = require_utils2();
1401
- var helpers2 = module2.exports;
1402
- helpers2.match = function(files, patterns, locals, options) {
1401
+ var helpers3 = module2.exports;
1402
+ helpers3.match = function(files, patterns, locals, options) {
1403
1403
  var opts = util.options(this, locals, options);
1404
1404
  if (typeof patterns === "string") {
1405
1405
  patterns = patterns.split(/, */);
1406
1406
  }
1407
1407
  return utils.mm(files, patterns, opts);
1408
1408
  };
1409
- helpers2.isMatch = function(files, patterns, locals, options) {
1409
+ helpers3.isMatch = function(files, patterns, locals, options) {
1410
1410
  var opts = util.options(this, locals, options);
1411
1411
  return utils.mm.isMatch(files, patterns, opts);
1412
1412
  };
1413
- helpers2.mm = function() {
1413
+ helpers3.mm = function() {
1414
1414
  console.log("the {{mm}} helper is depcrecated and will be removed");
1415
1415
  console.log("in handlebars-helpers v1.0.0, please use the {{match}}");
1416
1416
  console.log("helper instead.");
1417
- return helpers2.match.apply(this, arguments);
1417
+ return helpers3.match.apply(this, arguments);
1418
1418
  };
1419
1419
  }
1420
1420
  });
1421
1421
 
1422
- // lib/math.js
1422
+ // helpers/lib/math.js
1423
1423
  var require_math = __commonJS({
1424
- "lib/math.js"(exports2, module2) {
1424
+ "helpers/lib/math.js"(exports2, module2) {
1425
1425
  "use strict";
1426
1426
  var isNumber = require("is-number");
1427
1427
  var utils = require_utils2();
1428
- var helpers2 = module2.exports;
1429
- helpers2.abs = function(num) {
1428
+ var helpers3 = module2.exports;
1429
+ helpers3.abs = function(num) {
1430
1430
  if (!isNumber(num)) {
1431
1431
  throw new TypeError("expected a number");
1432
1432
  }
1433
1433
  return Math.abs(num);
1434
1434
  };
1435
- helpers2.add = function(a, b) {
1435
+ helpers3.add = function(a, b) {
1436
1436
  if (isNumber(a) && isNumber(b)) {
1437
1437
  return Number(a) + Number(b);
1438
1438
  }
1439
1439
  return "";
1440
1440
  };
1441
- helpers2.avg = function() {
1441
+ helpers3.avg = function() {
1442
1442
  var args = [].concat.apply([], arguments);
1443
1443
  args.pop();
1444
- return helpers2.sum(args) / args.length;
1444
+ return helpers3.sum(args) / args.length;
1445
1445
  };
1446
- helpers2.ceil = function(num) {
1446
+ helpers3.ceil = function(num) {
1447
1447
  if (!isNumber(num)) {
1448
1448
  throw new TypeError("expected a number");
1449
1449
  }
1450
1450
  return Math.ceil(num);
1451
1451
  };
1452
- helpers2.divide = function(a, b) {
1452
+ helpers3.divide = function(a, b) {
1453
1453
  if (!isNumber(a)) {
1454
1454
  throw new TypeError("expected the first argument to be a number");
1455
1455
  }
@@ -1458,13 +1458,13 @@ var require_math = __commonJS({
1458
1458
  }
1459
1459
  return Number(a) / Number(b);
1460
1460
  };
1461
- helpers2.floor = function(num) {
1461
+ helpers3.floor = function(num) {
1462
1462
  if (!isNumber(num)) {
1463
1463
  throw new TypeError("expected a number");
1464
1464
  }
1465
1465
  return Math.floor(num);
1466
1466
  };
1467
- helpers2.minus = function(a, b) {
1467
+ helpers3.minus = function(a, b) {
1468
1468
  if (!isNumber(a)) {
1469
1469
  throw new TypeError("expected the first argument to be a number");
1470
1470
  }
@@ -1473,7 +1473,7 @@ var require_math = __commonJS({
1473
1473
  }
1474
1474
  return Number(a) - Number(b);
1475
1475
  };
1476
- helpers2.modulo = function(a, b) {
1476
+ helpers3.modulo = function(a, b) {
1477
1477
  if (!isNumber(a)) {
1478
1478
  throw new TypeError("expected the first argument to be a number");
1479
1479
  }
@@ -1482,7 +1482,7 @@ var require_math = __commonJS({
1482
1482
  }
1483
1483
  return Number(a) % Number(b);
1484
1484
  };
1485
- helpers2.multiply = function(a, b) {
1485
+ helpers3.multiply = function(a, b) {
1486
1486
  if (!isNumber(a)) {
1487
1487
  throw new TypeError("expected the first argument to be a number");
1488
1488
  }
@@ -1491,7 +1491,7 @@ var require_math = __commonJS({
1491
1491
  }
1492
1492
  return Number(a) * Number(b);
1493
1493
  };
1494
- helpers2.plus = function(a, b) {
1494
+ helpers3.plus = function(a, b) {
1495
1495
  if (!isNumber(a)) {
1496
1496
  throw new TypeError("expected the first argument to be a number");
1497
1497
  }
@@ -1500,7 +1500,7 @@ var require_math = __commonJS({
1500
1500
  }
1501
1501
  return Number(a) + Number(b);
1502
1502
  };
1503
- helpers2.random = function(min, max) {
1503
+ helpers3.random = function(min, max) {
1504
1504
  if (!isNumber(min)) {
1505
1505
  throw new TypeError("expected minimum to be a number");
1506
1506
  }
@@ -1509,16 +1509,16 @@ var require_math = __commonJS({
1509
1509
  }
1510
1510
  return utils.random(min, max);
1511
1511
  };
1512
- helpers2.remainder = function(a, b) {
1512
+ helpers3.remainder = function(a, b) {
1513
1513
  return a % b;
1514
1514
  };
1515
- helpers2.round = function(num) {
1515
+ helpers3.round = function(num) {
1516
1516
  if (!isNumber(num)) {
1517
1517
  throw new TypeError("expected a number");
1518
1518
  }
1519
1519
  return Math.round(num);
1520
1520
  };
1521
- helpers2.subtract = function(a, b) {
1521
+ helpers3.subtract = function(a, b) {
1522
1522
  if (!isNumber(a)) {
1523
1523
  throw new TypeError("expected the first argument to be a number");
1524
1524
  }
@@ -1527,7 +1527,7 @@ var require_math = __commonJS({
1527
1527
  }
1528
1528
  return Number(a) - Number(b);
1529
1529
  };
1530
- helpers2.sum = function() {
1530
+ helpers3.sum = function() {
1531
1531
  var args = [].concat.apply([], arguments);
1532
1532
  var len = args.length;
1533
1533
  var sum = 0;
@@ -1538,28 +1538,28 @@ var require_math = __commonJS({
1538
1538
  }
1539
1539
  return sum;
1540
1540
  };
1541
- helpers2.times = function() {
1542
- return helpers2.multiply.apply(this, arguments);
1541
+ helpers3.times = function() {
1542
+ return helpers3.multiply.apply(this, arguments);
1543
1543
  };
1544
1544
  }
1545
1545
  });
1546
1546
 
1547
- // lib/misc.js
1547
+ // helpers/lib/misc.js
1548
1548
  var require_misc = __commonJS({
1549
- "lib/misc.js"(exports2, module2) {
1549
+ "helpers/lib/misc.js"(exports2, module2) {
1550
1550
  "use strict";
1551
1551
  var util = require("handlebars-utils");
1552
1552
  var utils = require_utils2();
1553
- var helpers2 = module2.exports;
1554
- helpers2.frame = require("handlebars-helper-create-frame");
1555
- helpers2.option = function(prop, locals, options) {
1553
+ var helpers3 = module2.exports;
1554
+ helpers3.frame = require("handlebars-helper-create-frame");
1555
+ helpers3.option = function(prop, locals, options) {
1556
1556
  return utils.get(util.options(this, locals, options), prop);
1557
1557
  };
1558
- helpers2.noop = function(options) {
1558
+ helpers3.noop = function(options) {
1559
1559
  return options.fn(this);
1560
1560
  };
1561
- helpers2.typeOf = require("kind-of");
1562
- helpers2.withHash = function(options) {
1561
+ helpers3.typeOf = require("kind-of");
1562
+ helpers3.withHash = function(options) {
1563
1563
  if (options.hash && Object.keys(options.hash).length) {
1564
1564
  return options.fn(options.hash);
1565
1565
  } else {
@@ -1569,34 +1569,34 @@ var require_misc = __commonJS({
1569
1569
  }
1570
1570
  });
1571
1571
 
1572
- // lib/path.js
1572
+ // helpers/lib/path.js
1573
1573
  var require_path = __commonJS({
1574
- "lib/path.js"(exports2, module2) {
1574
+ "helpers/lib/path.js"(exports2, module2) {
1575
1575
  "use strict";
1576
1576
  var util = require("handlebars-utils");
1577
1577
  var path = require("path");
1578
1578
  var utils = require_utils2();
1579
- var helpers2 = module2.exports;
1579
+ var helpers3 = module2.exports;
1580
1580
  utils.expectedType = (variableName, expectedType, variableValue) => {
1581
1581
  const actualType = Object.prototype.toString.call(variableValue).slice(8, -1).toLowerCase();
1582
1582
  if (actualType !== expectedType) {
1583
1583
  throw new TypeError(`Expected ${variableName} to be of type ${expectedType}, but got ${actualType}`);
1584
1584
  }
1585
1585
  };
1586
- helpers2.absolute = function(filepath, options) {
1586
+ helpers3.absolute = function(filepath, options) {
1587
1587
  options = options || { data: {} };
1588
1588
  var context = util.options(this, options);
1589
1589
  var ctx = Object.assign({}, options.data.root, context);
1590
1590
  var cwd = ctx.cwd || process.cwd();
1591
1591
  return path.resolve(cwd, filepath);
1592
1592
  };
1593
- helpers2.dirname = function(filepath, options) {
1593
+ helpers3.dirname = function(filepath, options) {
1594
1594
  if (typeof filepath !== "string") {
1595
1595
  throw new TypeError(utils.expectedType("filepath", "string", filepath));
1596
1596
  }
1597
1597
  return path.dirname(filepath);
1598
1598
  };
1599
- helpers2.relative = function(a, b) {
1599
+ helpers3.relative = function(a, b) {
1600
1600
  if (typeof a !== "string") {
1601
1601
  throw new TypeError(utils.expectedType("first path", "string", a));
1602
1602
  }
@@ -1605,32 +1605,32 @@ var require_path = __commonJS({
1605
1605
  }
1606
1606
  return utils.relative(a, b);
1607
1607
  };
1608
- helpers2.basename = function(filepath) {
1608
+ helpers3.basename = function(filepath) {
1609
1609
  if (typeof filepath !== "string") {
1610
1610
  throw new TypeError(utils.expectedType("filepath", "string", filepath));
1611
1611
  }
1612
1612
  return path.basename(filepath);
1613
1613
  };
1614
- helpers2.stem = function(filepath) {
1614
+ helpers3.stem = function(filepath) {
1615
1615
  if (typeof filepath !== "string") {
1616
1616
  throw new TypeError(utils.expectedType("filepath", "string", filepath));
1617
1617
  }
1618
1618
  return path.basename(filepath, path.extname(filepath));
1619
1619
  };
1620
- helpers2.extname = function(filepath) {
1620
+ helpers3.extname = function(filepath) {
1621
1621
  if (typeof filepath !== "string") {
1622
1622
  throw new TypeError(utils.expectedType("filepath", "string", filepath));
1623
1623
  }
1624
1624
  return path.extname(filepath);
1625
1625
  };
1626
- helpers2.resolve = function(filepath) {
1626
+ helpers3.resolve = function(filepath) {
1627
1627
  var args = [].slice.call(arguments);
1628
1628
  var opts = util.options(this, args.pop());
1629
1629
  var cwd = path.resolve(opts.cwd || process.cwd());
1630
1630
  args.unshift(cwd);
1631
1631
  return path.resolve.apply(path, args);
1632
1632
  };
1633
- helpers2.segments = function(filepath, a, b) {
1633
+ helpers3.segments = function(filepath, a, b) {
1634
1634
  if (typeof filepath !== "string") {
1635
1635
  throw new TypeError(utils.expectedType("filepath", "string", filepath));
1636
1636
  }
@@ -1640,18 +1640,18 @@ var require_path = __commonJS({
1640
1640
  }
1641
1641
  });
1642
1642
 
1643
- // lib/regex.js
1643
+ // helpers/lib/regex.js
1644
1644
  var require_regex = __commonJS({
1645
- "lib/regex.js"(exports2, module2) {
1645
+ "helpers/lib/regex.js"(exports2, module2) {
1646
1646
  "use strict";
1647
1647
  var util = require("handlebars-utils");
1648
1648
  var utils = require_utils2();
1649
- var helpers2 = module2.exports;
1650
- helpers2.toRegex = function(str, locals, options) {
1649
+ var helpers3 = module2.exports;
1650
+ helpers3.toRegex = function(str, locals, options) {
1651
1651
  var opts = util.options({}, locals, options);
1652
1652
  return new RegExp(str, opts.flags);
1653
1653
  };
1654
- helpers2.test = function(str, regex) {
1654
+ helpers3.test = function(str, regex) {
1655
1655
  if (!util.isString(str)) {
1656
1656
  return false;
1657
1657
  }
@@ -1663,39 +1663,39 @@ var require_regex = __commonJS({
1663
1663
  }
1664
1664
  });
1665
1665
 
1666
- // lib/string.js
1666
+ // helpers/lib/string.js
1667
1667
  var require_string = __commonJS({
1668
- "lib/string.js"(exports2, module2) {
1668
+ "helpers/lib/string.js"(exports2, module2) {
1669
1669
  "use strict";
1670
1670
  var isNumber = require("is-number");
1671
1671
  var util = require("handlebars-utils");
1672
1672
  var utils = require_utils2();
1673
- var helpers2 = module2.exports;
1674
- helpers2.append = function(str, suffix) {
1673
+ var helpers3 = module2.exports;
1674
+ helpers3.append = function(str, suffix) {
1675
1675
  if (typeof str === "string" && typeof suffix === "string") {
1676
1676
  return str + suffix;
1677
1677
  }
1678
1678
  return str;
1679
1679
  };
1680
- helpers2.camelcase = function(str) {
1680
+ helpers3.camelcase = function(str) {
1681
1681
  if (!util.isString(str)) return "";
1682
1682
  return utils.changecase(str, function(ch) {
1683
1683
  return ch.toUpperCase();
1684
1684
  });
1685
1685
  };
1686
- helpers2.capitalize = function(str) {
1686
+ helpers3.capitalize = function(str) {
1687
1687
  if (!util.isString(str)) return "";
1688
1688
  return str.charAt(0).toUpperCase() + str.slice(1);
1689
1689
  };
1690
- helpers2.capitalizeAll = function(str) {
1690
+ helpers3.capitalizeAll = function(str) {
1691
1691
  if (!util.isString(str)) return "";
1692
1692
  if (util.isString(str)) {
1693
1693
  return str.replace(/\w\S*/g, function(word) {
1694
- return helpers2.capitalize(word);
1694
+ return helpers3.capitalize(word);
1695
1695
  });
1696
1696
  }
1697
1697
  };
1698
- helpers2.center = function(str, spaces) {
1698
+ helpers3.center = function(str, spaces) {
1699
1699
  if (!util.isString(str)) return "";
1700
1700
  var space = "";
1701
1701
  var i = 0;
@@ -1705,48 +1705,48 @@ var require_string = __commonJS({
1705
1705
  }
1706
1706
  return space + str + space;
1707
1707
  };
1708
- helpers2.chop = function(str) {
1708
+ helpers3.chop = function(str) {
1709
1709
  if (!util.isString(str)) return "";
1710
1710
  return utils.chop(str);
1711
1711
  };
1712
- helpers2.dashcase = function(str) {
1712
+ helpers3.dashcase = function(str) {
1713
1713
  if (!util.isString(str)) return "";
1714
1714
  return utils.changecase(str, function(ch) {
1715
1715
  return "-" + ch;
1716
1716
  });
1717
1717
  };
1718
- helpers2.dotcase = function(str) {
1718
+ helpers3.dotcase = function(str) {
1719
1719
  if (!util.isString(str)) return "";
1720
1720
  return utils.changecase(str, function(ch) {
1721
1721
  return "." + ch;
1722
1722
  });
1723
1723
  };
1724
- helpers2.downcase = function() {
1725
- return helpers2.lowercase.apply(this, arguments);
1724
+ helpers3.downcase = function() {
1725
+ return helpers3.lowercase.apply(this, arguments);
1726
1726
  };
1727
- helpers2.ellipsis = function(str, limit) {
1727
+ helpers3.ellipsis = function(str, limit) {
1728
1728
  if (util.isString(str)) {
1729
1729
  if (str.length <= limit) {
1730
1730
  return str;
1731
1731
  }
1732
- return helpers2.truncate(str, limit) + "\u2026";
1732
+ return helpers3.truncate(str, limit) + "\u2026";
1733
1733
  }
1734
1734
  };
1735
- helpers2.hyphenate = function(str) {
1735
+ helpers3.hyphenate = function(str) {
1736
1736
  if (!util.isString(str)) return "";
1737
1737
  return str.split(" ").join("-");
1738
1738
  };
1739
- helpers2.isString = function(value) {
1739
+ helpers3.isString = function(value) {
1740
1740
  return typeof value === "string";
1741
1741
  };
1742
- helpers2.lowercase = function(str) {
1742
+ helpers3.lowercase = function(str) {
1743
1743
  if (util.isObject(str) && str.fn) {
1744
1744
  return str.fn(this).toLowerCase();
1745
1745
  }
1746
1746
  if (!util.isString(str)) return "";
1747
1747
  return str.toLowerCase();
1748
1748
  };
1749
- helpers2.occurrences = function(str, substring) {
1749
+ helpers3.occurrences = function(str, substring) {
1750
1750
  if (!util.isString(str)) return "";
1751
1751
  var len = substring.length;
1752
1752
  var pos = 0;
@@ -1757,28 +1757,28 @@ var require_string = __commonJS({
1757
1757
  }
1758
1758
  return n;
1759
1759
  };
1760
- helpers2.pascalcase = function(str) {
1760
+ helpers3.pascalcase = function(str) {
1761
1761
  if (!util.isString(str)) return "";
1762
1762
  str = utils.changecase(str, function(ch) {
1763
1763
  return ch.toUpperCase();
1764
1764
  });
1765
1765
  return str.charAt(0).toUpperCase() + str.slice(1);
1766
1766
  };
1767
- helpers2.pathcase = function(str) {
1767
+ helpers3.pathcase = function(str) {
1768
1768
  if (!util.isString(str)) return "";
1769
1769
  return utils.changecase(str, function(ch) {
1770
1770
  return "/" + ch;
1771
1771
  });
1772
1772
  };
1773
- helpers2.plusify = function(str, ch) {
1773
+ helpers3.plusify = function(str, ch) {
1774
1774
  if (!util.isString(str)) return "";
1775
1775
  if (!util.isString(ch)) ch = " ";
1776
1776
  return str.split(ch).join("+");
1777
1777
  };
1778
- helpers2.prepend = function(str, prefix) {
1778
+ helpers3.prepend = function(str, prefix) {
1779
1779
  return typeof str === "string" && typeof prefix === "string" ? prefix + str : str;
1780
1780
  };
1781
- helpers2.raw = function(options) {
1781
+ helpers3.raw = function(options) {
1782
1782
  var str = options.fn();
1783
1783
  var opts = util.options(this, options);
1784
1784
  if (opts.escape !== false) {
@@ -1792,50 +1792,50 @@ var require_string = __commonJS({
1792
1792
  }
1793
1793
  return str;
1794
1794
  };
1795
- helpers2.remove = function(str, ch) {
1795
+ helpers3.remove = function(str, ch) {
1796
1796
  if (!util.isString(str)) return "";
1797
1797
  if (!util.isString(ch)) return str;
1798
1798
  return str.split(ch).join("");
1799
1799
  };
1800
- helpers2.removeFirst = function(str, ch) {
1800
+ helpers3.removeFirst = function(str, ch) {
1801
1801
  if (!util.isString(str)) return "";
1802
1802
  if (!util.isString(ch)) return str;
1803
1803
  return str.replace(ch, "");
1804
1804
  };
1805
- helpers2.replace = function(str, a, b) {
1805
+ helpers3.replace = function(str, a, b) {
1806
1806
  if (!util.isString(str)) return "";
1807
1807
  if (!util.isString(a)) return str;
1808
1808
  if (!util.isString(b)) b = "";
1809
1809
  return str.split(a).join(b);
1810
1810
  };
1811
- helpers2.replaceFirst = function(str, a, b) {
1811
+ helpers3.replaceFirst = function(str, a, b) {
1812
1812
  if (!util.isString(str)) return "";
1813
1813
  if (!util.isString(a)) return str;
1814
1814
  if (!util.isString(b)) b = "";
1815
1815
  return str.replace(a, b);
1816
1816
  };
1817
- helpers2.reverse = function(str) {
1817
+ helpers3.reverse = function(str) {
1818
1818
  if (!util.isString(str)) return "";
1819
1819
  return str.split("").reverse().join("");
1820
1820
  };
1821
- helpers2.sentence = function(str) {
1821
+ helpers3.sentence = function(str) {
1822
1822
  if (!util.isString(str)) return "";
1823
1823
  return str.replace(/((?:\S[^\.\?\!]*)[\.\?\!]*)/g, function(txt) {
1824
1824
  return txt.charAt(0).toUpperCase() + txt.substr(1).toLowerCase();
1825
1825
  });
1826
1826
  };
1827
- helpers2.snakecase = function(str) {
1827
+ helpers3.snakecase = function(str) {
1828
1828
  if (!util.isString(str)) return "";
1829
1829
  return utils.changecase(str, function(ch) {
1830
1830
  return "_" + ch;
1831
1831
  });
1832
1832
  };
1833
- helpers2.split = function(str, ch) {
1833
+ helpers3.split = function(str, ch) {
1834
1834
  if (!util.isString(str)) return "";
1835
1835
  if (!util.isString(ch)) ch = ",";
1836
1836
  return str.split(ch);
1837
1837
  };
1838
- helpers2.startsWith = function(prefix, str, options) {
1838
+ helpers3.startsWith = function(prefix, str, options) {
1839
1839
  var args = [].slice.call(arguments);
1840
1840
  options = args.pop();
1841
1841
  if (util.isString(str) && str.indexOf(prefix) === 0) {
@@ -1846,7 +1846,7 @@ var require_string = __commonJS({
1846
1846
  }
1847
1847
  return "";
1848
1848
  };
1849
- helpers2.titleize = function(str) {
1849
+ helpers3.titleize = function(str) {
1850
1850
  if (!util.isString(str)) return "";
1851
1851
  var title = str.replace(/[- _]+/g, " ");
1852
1852
  var words = title.split(" ");
@@ -1859,20 +1859,20 @@ var require_string = __commonJS({
1859
1859
  }
1860
1860
  return res.join(" ");
1861
1861
  };
1862
- helpers2.trim = function(str) {
1862
+ helpers3.trim = function(str) {
1863
1863
  return typeof str === "string" ? str.trim() : "";
1864
1864
  };
1865
- helpers2.trimLeft = function(str) {
1865
+ helpers3.trimLeft = function(str) {
1866
1866
  if (util.isString(str)) {
1867
1867
  return str.replace(/^\s+/, "");
1868
1868
  }
1869
1869
  };
1870
- helpers2.trimRight = function(str) {
1870
+ helpers3.trimRight = function(str) {
1871
1871
  if (util.isString(str)) {
1872
1872
  return str.replace(/\s+$/, "");
1873
1873
  }
1874
1874
  };
1875
- helpers2.truncate = function(str, limit, suffix) {
1875
+ helpers3.truncate = function(str, limit, suffix) {
1876
1876
  if (util.isString(str)) {
1877
1877
  if (typeof suffix !== "string") {
1878
1878
  suffix = "";
@@ -1883,7 +1883,7 @@ var require_string = __commonJS({
1883
1883
  return str;
1884
1884
  }
1885
1885
  };
1886
- helpers2.truncateWords = function(str, count, suffix) {
1886
+ helpers3.truncateWords = function(str, count, suffix) {
1887
1887
  if (util.isString(str) && isNumber(count)) {
1888
1888
  if (typeof suffix !== "string") {
1889
1889
  suffix = "...";
@@ -1897,10 +1897,10 @@ var require_string = __commonJS({
1897
1897
  return val + suffix;
1898
1898
  }
1899
1899
  };
1900
- helpers2.upcase = function() {
1901
- return helpers2.uppercase.apply(this, arguments);
1900
+ helpers3.upcase = function() {
1901
+ return helpers3.uppercase.apply(this, arguments);
1902
1902
  };
1903
- helpers2.uppercase = function(str) {
1903
+ helpers3.uppercase = function(str) {
1904
1904
  if (util.isObject(str) && str.fn) {
1905
1905
  return str.fn(this).toUpperCase();
1906
1906
  }
@@ -1910,47 +1910,47 @@ var require_string = __commonJS({
1910
1910
  }
1911
1911
  });
1912
1912
 
1913
- // lib/url.js
1913
+ // helpers/lib/url.js
1914
1914
  var require_url = __commonJS({
1915
- "lib/url.js"(exports2, module2) {
1915
+ "helpers/lib/url.js"(exports2, module2) {
1916
1916
  "use strict";
1917
1917
  var url = require("url");
1918
1918
  var util = require("handlebars-utils");
1919
1919
  var querystring = require("querystring");
1920
- var helpers2 = module2.exports;
1921
- helpers2.encodeURI = function(str) {
1920
+ var helpers3 = module2.exports;
1921
+ helpers3.encodeURI = function(str) {
1922
1922
  if (util.isString(str)) {
1923
1923
  return encodeURIComponent(str);
1924
1924
  }
1925
1925
  };
1926
- helpers2.escape = function(str) {
1926
+ helpers3.escape = function(str) {
1927
1927
  if (util.isString(str)) {
1928
1928
  return querystring.escape(str);
1929
1929
  }
1930
1930
  };
1931
- helpers2.decodeURI = function(str) {
1931
+ helpers3.decodeURI = function(str) {
1932
1932
  if (util.isString(str)) {
1933
1933
  return decodeURIComponent(str);
1934
1934
  }
1935
1935
  };
1936
- helpers2.url_encode = function() {
1937
- return helpers2.encodeURI.apply(this, arguments);
1936
+ helpers3.url_encode = function() {
1937
+ return helpers3.encodeURI.apply(this, arguments);
1938
1938
  };
1939
- helpers2.url_decode = function(val) {
1940
- return helpers2.decodeURI.apply(this, arguments);
1939
+ helpers3.url_decode = function(val) {
1940
+ return helpers3.decodeURI.apply(this, arguments);
1941
1941
  };
1942
- helpers2.urlResolve = function(base, href) {
1942
+ helpers3.urlResolve = function(base, href) {
1943
1943
  return url.resolve(base, href);
1944
1944
  };
1945
- helpers2.urlParse = function(str) {
1945
+ helpers3.urlParse = function(str) {
1946
1946
  return url.parse(str);
1947
1947
  };
1948
- helpers2.stripQuerystring = function(str) {
1948
+ helpers3.stripQuerystring = function(str) {
1949
1949
  if (util.isString(str)) {
1950
1950
  return str.split("?")[0];
1951
1951
  }
1952
1952
  };
1953
- helpers2.stripProtocol = function(str) {
1953
+ helpers3.stripProtocol = function(str) {
1954
1954
  if (util.isString(str)) {
1955
1955
  var parsed = url.parse(str);
1956
1956
  parsed.protocol = "";
@@ -1960,9 +1960,9 @@ var require_url = __commonJS({
1960
1960
  }
1961
1961
  });
1962
1962
 
1963
- // lib/index.js
1963
+ // helpers/lib/index.js
1964
1964
  var require_lib = __commonJS({
1965
- "lib/index.js"(exports2, module2) {
1965
+ "helpers/lib/index.js"(exports2, module2) {
1966
1966
  "use strict";
1967
1967
  module2.exports = {
1968
1968
  array: require_array(),
@@ -1989,14 +1989,14 @@ var require_lib = __commonJS({
1989
1989
  }
1990
1990
  });
1991
1991
 
1992
- // helpers.js
1992
+ // helpers/helpers.js
1993
1993
  var require_helpers = __commonJS({
1994
- "helpers.js"(exports2, module2) {
1994
+ "helpers/helpers.js"(exports2, module2) {
1995
1995
  "use strict";
1996
1996
  var forIn = require("for-in");
1997
1997
  var define = require("define-property");
1998
1998
  var lib = require_lib();
1999
- module2.exports = function helpers2(groups, options) {
1999
+ module2.exports = function helpers3(groups, options) {
2000
2000
  if (typeof groups === "string") {
2001
2001
  groups = [groups];
2002
2002
  } else if (!Array.isArray(groups)) {
@@ -2030,32 +2030,96 @@ var require_helpers = __commonJS({
2030
2030
  }
2031
2031
  });
2032
2032
 
2033
- // index.ts
2034
- var fumanchu_exports = {};
2035
- __export(fumanchu_exports, {
2033
+ // src/index.ts
2034
+ var src_exports = {};
2035
+ __export(src_exports, {
2036
2036
  Handlebars: () => Handlebars,
2037
+ HelperRegistry: () => HelperRegistry,
2037
2038
  createHandlebars: () => createHandlebars,
2039
+ fumanchu: () => fumanchu,
2038
2040
  handlebars: () => handlebars,
2039
- helpers: () => helpers
2041
+ helpers: () => helpers2
2040
2042
  });
2041
- module.exports = __toCommonJS(fumanchu_exports);
2043
+ module.exports = __toCommonJS(src_exports);
2042
2044
  var HandlebarsLib = __toESM(require("handlebars"));
2045
+
2046
+ // src/helpers/date.ts
2047
+ var year = () => (/* @__PURE__ */ new Date()).getFullYear().toString();
2048
+ var helpers = [
2049
+ {
2050
+ name: "year",
2051
+ category: "date",
2052
+ fn: year
2053
+ }
2054
+ ];
2055
+
2056
+ // src/helper-registry.ts
2057
+ var HelperRegistry = class {
2058
+ constructor() {
2059
+ this._helpers = [];
2060
+ this.init();
2061
+ }
2062
+ init() {
2063
+ this.registerHelpers(helpers);
2064
+ }
2065
+ register(helper) {
2066
+ const result = false;
2067
+ if (!this.has(helper.name)) {
2068
+ this._helpers.push(helper);
2069
+ }
2070
+ return result;
2071
+ }
2072
+ registerHelpers(helpers3) {
2073
+ for (const helper of helpers3) {
2074
+ this.register(helper);
2075
+ }
2076
+ }
2077
+ has(name) {
2078
+ return this._helpers.some((helper) => helper.name === name);
2079
+ }
2080
+ filter(filter) {
2081
+ return this._helpers.filter((helper) => (!filter.name || helper.name === filter.name) && (!filter.category || helper.category === filter.category) && (!filter.compatibility || helper.compatibility === filter.compatibility));
2082
+ }
2083
+ loadHandlebars(handlebars2) {
2084
+ for (const helper of this._helpers) {
2085
+ handlebars2.registerHelper(helper.name, helper.fn);
2086
+ }
2087
+ }
2088
+ swapHelpers(handlebars2) {
2089
+ for (const helper of this._helpers) {
2090
+ handlebars2.unregisterHelper(helper.name);
2091
+ handlebars2.registerHelper(helper.name, helper.fn);
2092
+ }
2093
+ }
2094
+ };
2095
+
2096
+ // src/index.ts
2043
2097
  var import_helpers = __toESM(require_helpers());
2044
2098
  var Handlebars = HandlebarsLib;
2045
2099
  var handlebars = HandlebarsLib.create();
2046
- var helpers = import_helpers.default;
2100
+ var helpers2 = import_helpers.default;
2047
2101
  function createHandlebars() {
2048
2102
  return __async(this, null, function* () {
2103
+ const registry = new HelperRegistry();
2049
2104
  const handlebars2 = HandlebarsLib.create();
2050
2105
  const helpersFunction = yield Promise.resolve().then(() => __toESM(require_helpers()));
2051
2106
  helpersFunction.default({ handlebars: handlebars2 });
2107
+ registry.swapHelpers(handlebars2);
2052
2108
  return handlebars2;
2053
2109
  });
2054
2110
  }
2111
+ function fumanchu(options) {
2112
+ const registry = new HelperRegistry();
2113
+ const handlebars2 = HandlebarsLib.create();
2114
+ registry.loadHandlebars(handlebars2);
2115
+ return handlebars2;
2116
+ }
2055
2117
  // Annotate the CommonJS export names for ESM import in node:
2056
2118
  0 && (module.exports = {
2057
2119
  Handlebars,
2120
+ HelperRegistry,
2058
2121
  createHandlebars,
2122
+ fumanchu,
2059
2123
  handlebars,
2060
2124
  helpers
2061
2125
  });