vibe-cokit 1.5.0 → 1.5.1

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.
Files changed (2) hide show
  1. package/dist/cli.js +1767 -324
  2. package/package.json +5 -3
package/dist/cli.js CHANGED
@@ -1,63 +1,15 @@
1
1
  #!/usr/bin/env bun
2
2
  // @bun
3
- var __create = Object.create;
4
- var __getProtoOf = Object.getPrototypeOf;
5
3
  var __defProp = Object.defineProperty;
6
- var __getOwnPropNames = Object.getOwnPropertyNames;
7
- var __hasOwnProp = Object.prototype.hasOwnProperty;
8
- var __toESM = (mod, isNodeMode, target) => {
9
- target = mod != null ? __create(__getProtoOf(mod)) : {};
10
- const to = isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target;
11
- for (let key of __getOwnPropNames(mod))
12
- if (!__hasOwnProp.call(to, key))
13
- __defProp(to, key, {
14
- get: () => mod[key],
15
- enumerable: true
16
- });
17
- return to;
4
+ var __export = (target, all) => {
5
+ for (var name in all)
6
+ __defProp(target, name, {
7
+ get: all[name],
8
+ enumerable: true,
9
+ configurable: true,
10
+ set: (newValue) => all[name] = () => newValue
11
+ });
18
12
  };
19
- var __commonJS = (cb, mod) => () => (mod || cb((mod = { exports: {} }).exports, mod), mod.exports);
20
-
21
- // package.json
22
- var require_package = __commonJS((exports, module) => {
23
- module.exports = {
24
- name: "vibe-cokit",
25
- version: "0.1.0",
26
- description: "A toolkit for interacting with Claude Code",
27
- module: "index.ts",
28
- type: "module",
29
- bin: {
30
- "vibe-cokit": "bin/vk.cjs",
31
- vk: "bin/vk.cjs"
32
- },
33
- files: [
34
- "bin/",
35
- "dist/",
36
- "package.json",
37
- "README.md"
38
- ],
39
- scripts: {
40
- build: "bun build src/cli.ts --outdir dist --target bun",
41
- typecheck: "bunx tsc --noEmit"
42
- },
43
- publishConfig: {
44
- access: "public"
45
- },
46
- repository: {
47
- type: "git",
48
- url: "git+https://github.com/vibe-cokit/cli.git"
49
- },
50
- devDependencies: {
51
- "@types/bun": "latest"
52
- },
53
- peerDependencies: {
54
- typescript: "^5"
55
- },
56
- dependencies: {
57
- cac: "^6.7.14"
58
- }
59
- };
60
- });
61
13
 
62
14
  // node_modules/cac/dist/index.mjs
63
15
  import { EventEmitter } from "events";
@@ -627,75 +579,1712 @@ class CAC extends EventEmitter {
627
579
  }
628
580
  }
629
581
  }
630
- for (const key of Object.keys(parsed)) {
631
- if (key !== "_") {
632
- const keys = key.split(".");
633
- setDotProp(options, keys, parsed[key]);
634
- setByType(options, transforms);
582
+ for (const key of Object.keys(parsed)) {
583
+ if (key !== "_") {
584
+ const keys = key.split(".");
585
+ setDotProp(options, keys, parsed[key]);
586
+ setByType(options, transforms);
587
+ }
588
+ }
589
+ return {
590
+ args,
591
+ options
592
+ };
593
+ }
594
+ runMatchedCommand() {
595
+ const { args, options, matchedCommand: command } = this;
596
+ if (!command || !command.commandAction)
597
+ return;
598
+ command.checkUnknownOptions();
599
+ command.checkOptionValue();
600
+ command.checkRequiredArgs();
601
+ const actionArgs = [];
602
+ command.args.forEach((arg, index) => {
603
+ if (arg.variadic) {
604
+ actionArgs.push(args.slice(index));
605
+ } else {
606
+ actionArgs.push(args[index]);
607
+ }
608
+ });
609
+ actionArgs.push(options);
610
+ return command.commandAction.apply(this, actionArgs);
611
+ }
612
+ }
613
+ var cac = (name = "") => new CAC(name);
614
+ var dist_default = cac;
615
+ // package.json
616
+ var version = "0.1.0";
617
+
618
+ // src/commands/init.ts
619
+ import { join as join2 } from "path";
620
+
621
+ // src/utils/config.ts
622
+ import { homedir } from "os";
623
+ import { join } from "path";
624
+ import { mkdir, cp, rm, stat, readdir } from "fs/promises";
625
+ import { execFile as execFile2 } from "child_process";
626
+ import { promisify as promisify2 } from "util";
627
+
628
+ // node_modules/lodash-es/_freeGlobal.js
629
+ var freeGlobal = typeof global == "object" && global && global.Object === Object && global;
630
+ var _freeGlobal_default = freeGlobal;
631
+
632
+ // node_modules/lodash-es/_root.js
633
+ var freeSelf = typeof self == "object" && self && self.Object === Object && self;
634
+ var root = _freeGlobal_default || freeSelf || Function("return this")();
635
+ var _root_default = root;
636
+
637
+ // node_modules/lodash-es/_Symbol.js
638
+ var Symbol2 = _root_default.Symbol;
639
+ var _Symbol_default = Symbol2;
640
+
641
+ // node_modules/lodash-es/_getRawTag.js
642
+ var objectProto = Object.prototype;
643
+ var hasOwnProperty = objectProto.hasOwnProperty;
644
+ var nativeObjectToString = objectProto.toString;
645
+ var symToStringTag = _Symbol_default ? _Symbol_default.toStringTag : undefined;
646
+ function getRawTag(value) {
647
+ var isOwn = hasOwnProperty.call(value, symToStringTag), tag = value[symToStringTag];
648
+ try {
649
+ value[symToStringTag] = undefined;
650
+ var unmasked = true;
651
+ } catch (e) {}
652
+ var result = nativeObjectToString.call(value);
653
+ if (unmasked) {
654
+ if (isOwn) {
655
+ value[symToStringTag] = tag;
656
+ } else {
657
+ delete value[symToStringTag];
658
+ }
659
+ }
660
+ return result;
661
+ }
662
+ var _getRawTag_default = getRawTag;
663
+
664
+ // node_modules/lodash-es/_objectToString.js
665
+ var objectProto2 = Object.prototype;
666
+ var nativeObjectToString2 = objectProto2.toString;
667
+ function objectToString(value) {
668
+ return nativeObjectToString2.call(value);
669
+ }
670
+ var _objectToString_default = objectToString;
671
+
672
+ // node_modules/lodash-es/_baseGetTag.js
673
+ var nullTag = "[object Null]";
674
+ var undefinedTag = "[object Undefined]";
675
+ var symToStringTag2 = _Symbol_default ? _Symbol_default.toStringTag : undefined;
676
+ function baseGetTag(value) {
677
+ if (value == null) {
678
+ return value === undefined ? undefinedTag : nullTag;
679
+ }
680
+ return symToStringTag2 && symToStringTag2 in Object(value) ? _getRawTag_default(value) : _objectToString_default(value);
681
+ }
682
+ var _baseGetTag_default = baseGetTag;
683
+
684
+ // node_modules/lodash-es/isObjectLike.js
685
+ function isObjectLike(value) {
686
+ return value != null && typeof value == "object";
687
+ }
688
+ var isObjectLike_default = isObjectLike;
689
+
690
+ // node_modules/lodash-es/isSymbol.js
691
+ var symbolTag = "[object Symbol]";
692
+ function isSymbol(value) {
693
+ return typeof value == "symbol" || isObjectLike_default(value) && _baseGetTag_default(value) == symbolTag;
694
+ }
695
+ var isSymbol_default = isSymbol;
696
+
697
+ // node_modules/lodash-es/_arrayMap.js
698
+ function arrayMap(array, iteratee) {
699
+ var index = -1, length = array == null ? 0 : array.length, result = Array(length);
700
+ while (++index < length) {
701
+ result[index] = iteratee(array[index], index, array);
702
+ }
703
+ return result;
704
+ }
705
+ var _arrayMap_default = arrayMap;
706
+
707
+ // node_modules/lodash-es/isArray.js
708
+ var isArray = Array.isArray;
709
+ var isArray_default = isArray;
710
+
711
+ // node_modules/lodash-es/_baseToString.js
712
+ var INFINITY = 1 / 0;
713
+ var symbolProto = _Symbol_default ? _Symbol_default.prototype : undefined;
714
+ var symbolToString = symbolProto ? symbolProto.toString : undefined;
715
+ function baseToString(value) {
716
+ if (typeof value == "string") {
717
+ return value;
718
+ }
719
+ if (isArray_default(value)) {
720
+ return _arrayMap_default(value, baseToString) + "";
721
+ }
722
+ if (isSymbol_default(value)) {
723
+ return symbolToString ? symbolToString.call(value) : "";
724
+ }
725
+ var result = value + "";
726
+ return result == "0" && 1 / value == -INFINITY ? "-0" : result;
727
+ }
728
+ var _baseToString_default = baseToString;
729
+
730
+ // node_modules/lodash-es/isObject.js
731
+ function isObject(value) {
732
+ var type = typeof value;
733
+ return value != null && (type == "object" || type == "function");
734
+ }
735
+ var isObject_default = isObject;
736
+
737
+ // node_modules/lodash-es/identity.js
738
+ function identity(value) {
739
+ return value;
740
+ }
741
+ var identity_default = identity;
742
+
743
+ // node_modules/lodash-es/isFunction.js
744
+ var asyncTag = "[object AsyncFunction]";
745
+ var funcTag = "[object Function]";
746
+ var genTag = "[object GeneratorFunction]";
747
+ var proxyTag = "[object Proxy]";
748
+ function isFunction(value) {
749
+ if (!isObject_default(value)) {
750
+ return false;
751
+ }
752
+ var tag = _baseGetTag_default(value);
753
+ return tag == funcTag || tag == genTag || tag == asyncTag || tag == proxyTag;
754
+ }
755
+ var isFunction_default = isFunction;
756
+
757
+ // node_modules/lodash-es/_coreJsData.js
758
+ var coreJsData = _root_default["__core-js_shared__"];
759
+ var _coreJsData_default = coreJsData;
760
+
761
+ // node_modules/lodash-es/_isMasked.js
762
+ var maskSrcKey = function() {
763
+ var uid = /[^.]+$/.exec(_coreJsData_default && _coreJsData_default.keys && _coreJsData_default.keys.IE_PROTO || "");
764
+ return uid ? "Symbol(src)_1." + uid : "";
765
+ }();
766
+ function isMasked(func) {
767
+ return !!maskSrcKey && maskSrcKey in func;
768
+ }
769
+ var _isMasked_default = isMasked;
770
+
771
+ // node_modules/lodash-es/_toSource.js
772
+ var funcProto = Function.prototype;
773
+ var funcToString = funcProto.toString;
774
+ function toSource(func) {
775
+ if (func != null) {
776
+ try {
777
+ return funcToString.call(func);
778
+ } catch (e) {}
779
+ try {
780
+ return func + "";
781
+ } catch (e) {}
782
+ }
783
+ return "";
784
+ }
785
+ var _toSource_default = toSource;
786
+
787
+ // node_modules/lodash-es/_baseIsNative.js
788
+ var reRegExpChar = /[\\^$.*+?()[\]{}|]/g;
789
+ var reIsHostCtor = /^\[object .+?Constructor\]$/;
790
+ var funcProto2 = Function.prototype;
791
+ var objectProto3 = Object.prototype;
792
+ var funcToString2 = funcProto2.toString;
793
+ var hasOwnProperty2 = objectProto3.hasOwnProperty;
794
+ var reIsNative = RegExp("^" + funcToString2.call(hasOwnProperty2).replace(reRegExpChar, "\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, "$1.*?") + "$");
795
+ function baseIsNative(value) {
796
+ if (!isObject_default(value) || _isMasked_default(value)) {
797
+ return false;
798
+ }
799
+ var pattern = isFunction_default(value) ? reIsNative : reIsHostCtor;
800
+ return pattern.test(_toSource_default(value));
801
+ }
802
+ var _baseIsNative_default = baseIsNative;
803
+
804
+ // node_modules/lodash-es/_getValue.js
805
+ function getValue(object, key) {
806
+ return object == null ? undefined : object[key];
807
+ }
808
+ var _getValue_default = getValue;
809
+
810
+ // node_modules/lodash-es/_getNative.js
811
+ function getNative(object, key) {
812
+ var value = _getValue_default(object, key);
813
+ return _baseIsNative_default(value) ? value : undefined;
814
+ }
815
+ var _getNative_default = getNative;
816
+
817
+ // node_modules/lodash-es/_WeakMap.js
818
+ var WeakMap2 = _getNative_default(_root_default, "WeakMap");
819
+ var _WeakMap_default = WeakMap2;
820
+
821
+ // node_modules/lodash-es/_defineProperty.js
822
+ var defineProperty = function() {
823
+ try {
824
+ var func = _getNative_default(Object, "defineProperty");
825
+ func({}, "", {});
826
+ return func;
827
+ } catch (e) {}
828
+ }();
829
+ var _defineProperty_default = defineProperty;
830
+
831
+ // node_modules/lodash-es/_isIndex.js
832
+ var MAX_SAFE_INTEGER = 9007199254740991;
833
+ var reIsUint = /^(?:0|[1-9]\d*)$/;
834
+ function isIndex(value, length) {
835
+ var type = typeof value;
836
+ length = length == null ? MAX_SAFE_INTEGER : length;
837
+ return !!length && (type == "number" || type != "symbol" && reIsUint.test(value)) && (value > -1 && value % 1 == 0 && value < length);
838
+ }
839
+ var _isIndex_default = isIndex;
840
+
841
+ // node_modules/lodash-es/_baseAssignValue.js
842
+ function baseAssignValue(object, key, value) {
843
+ if (key == "__proto__" && _defineProperty_default) {
844
+ _defineProperty_default(object, key, {
845
+ configurable: true,
846
+ enumerable: true,
847
+ value,
848
+ writable: true
849
+ });
850
+ } else {
851
+ object[key] = value;
852
+ }
853
+ }
854
+ var _baseAssignValue_default = baseAssignValue;
855
+
856
+ // node_modules/lodash-es/eq.js
857
+ function eq(value, other) {
858
+ return value === other || value !== value && other !== other;
859
+ }
860
+ var eq_default = eq;
861
+
862
+ // node_modules/lodash-es/isLength.js
863
+ var MAX_SAFE_INTEGER2 = 9007199254740991;
864
+ function isLength(value) {
865
+ return typeof value == "number" && value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER2;
866
+ }
867
+ var isLength_default = isLength;
868
+
869
+ // node_modules/lodash-es/isArrayLike.js
870
+ function isArrayLike(value) {
871
+ return value != null && isLength_default(value.length) && !isFunction_default(value);
872
+ }
873
+ var isArrayLike_default = isArrayLike;
874
+
875
+ // node_modules/lodash-es/_isIterateeCall.js
876
+ function isIterateeCall(value, index, object) {
877
+ if (!isObject_default(object)) {
878
+ return false;
879
+ }
880
+ var type = typeof index;
881
+ if (type == "number" ? isArrayLike_default(object) && _isIndex_default(index, object.length) : type == "string" && (index in object)) {
882
+ return eq_default(object[index], value);
883
+ }
884
+ return false;
885
+ }
886
+ var _isIterateeCall_default = isIterateeCall;
887
+
888
+ // node_modules/lodash-es/_isPrototype.js
889
+ var objectProto4 = Object.prototype;
890
+ function isPrototype(value) {
891
+ var Ctor = value && value.constructor, proto = typeof Ctor == "function" && Ctor.prototype || objectProto4;
892
+ return value === proto;
893
+ }
894
+ var _isPrototype_default = isPrototype;
895
+
896
+ // node_modules/lodash-es/_baseTimes.js
897
+ function baseTimes(n, iteratee) {
898
+ var index = -1, result = Array(n);
899
+ while (++index < n) {
900
+ result[index] = iteratee(index);
901
+ }
902
+ return result;
903
+ }
904
+ var _baseTimes_default = baseTimes;
905
+
906
+ // node_modules/lodash-es/_baseIsArguments.js
907
+ var argsTag = "[object Arguments]";
908
+ function baseIsArguments(value) {
909
+ return isObjectLike_default(value) && _baseGetTag_default(value) == argsTag;
910
+ }
911
+ var _baseIsArguments_default = baseIsArguments;
912
+
913
+ // node_modules/lodash-es/isArguments.js
914
+ var objectProto5 = Object.prototype;
915
+ var hasOwnProperty3 = objectProto5.hasOwnProperty;
916
+ var propertyIsEnumerable = objectProto5.propertyIsEnumerable;
917
+ var isArguments = _baseIsArguments_default(function() {
918
+ return arguments;
919
+ }()) ? _baseIsArguments_default : function(value) {
920
+ return isObjectLike_default(value) && hasOwnProperty3.call(value, "callee") && !propertyIsEnumerable.call(value, "callee");
921
+ };
922
+ var isArguments_default = isArguments;
923
+
924
+ // node_modules/lodash-es/isBuffer.js
925
+ var exports_isBuffer = {};
926
+ __export(exports_isBuffer, {
927
+ default: () => isBuffer_default
928
+ });
929
+
930
+ // node_modules/lodash-es/stubFalse.js
931
+ function stubFalse() {
932
+ return false;
933
+ }
934
+ var stubFalse_default = stubFalse;
935
+
936
+ // node_modules/lodash-es/isBuffer.js
937
+ var freeExports = typeof exports_isBuffer == "object" && exports_isBuffer && !exports_isBuffer.nodeType && exports_isBuffer;
938
+ var freeModule = freeExports && typeof module_isBuffer == "object" && module_isBuffer && !module_isBuffer.nodeType && module_isBuffer;
939
+ var moduleExports = freeModule && freeModule.exports === freeExports;
940
+ var Buffer = moduleExports ? _root_default.Buffer : undefined;
941
+ var nativeIsBuffer = Buffer ? Buffer.isBuffer : undefined;
942
+ var isBuffer = nativeIsBuffer || stubFalse_default;
943
+ var isBuffer_default = isBuffer;
944
+
945
+ // node_modules/lodash-es/_baseIsTypedArray.js
946
+ var argsTag2 = "[object Arguments]";
947
+ var arrayTag = "[object Array]";
948
+ var boolTag = "[object Boolean]";
949
+ var dateTag = "[object Date]";
950
+ var errorTag = "[object Error]";
951
+ var funcTag2 = "[object Function]";
952
+ var mapTag = "[object Map]";
953
+ var numberTag = "[object Number]";
954
+ var objectTag = "[object Object]";
955
+ var regexpTag = "[object RegExp]";
956
+ var setTag = "[object Set]";
957
+ var stringTag = "[object String]";
958
+ var weakMapTag = "[object WeakMap]";
959
+ var arrayBufferTag = "[object ArrayBuffer]";
960
+ var dataViewTag = "[object DataView]";
961
+ var float32Tag = "[object Float32Array]";
962
+ var float64Tag = "[object Float64Array]";
963
+ var int8Tag = "[object Int8Array]";
964
+ var int16Tag = "[object Int16Array]";
965
+ var int32Tag = "[object Int32Array]";
966
+ var uint8Tag = "[object Uint8Array]";
967
+ var uint8ClampedTag = "[object Uint8ClampedArray]";
968
+ var uint16Tag = "[object Uint16Array]";
969
+ var uint32Tag = "[object Uint32Array]";
970
+ var typedArrayTags = {};
971
+ typedArrayTags[float32Tag] = typedArrayTags[float64Tag] = typedArrayTags[int8Tag] = typedArrayTags[int16Tag] = typedArrayTags[int32Tag] = typedArrayTags[uint8Tag] = typedArrayTags[uint8ClampedTag] = typedArrayTags[uint16Tag] = typedArrayTags[uint32Tag] = true;
972
+ typedArrayTags[argsTag2] = typedArrayTags[arrayTag] = typedArrayTags[arrayBufferTag] = typedArrayTags[boolTag] = typedArrayTags[dataViewTag] = typedArrayTags[dateTag] = typedArrayTags[errorTag] = typedArrayTags[funcTag2] = typedArrayTags[mapTag] = typedArrayTags[numberTag] = typedArrayTags[objectTag] = typedArrayTags[regexpTag] = typedArrayTags[setTag] = typedArrayTags[stringTag] = typedArrayTags[weakMapTag] = false;
973
+ function baseIsTypedArray(value) {
974
+ return isObjectLike_default(value) && isLength_default(value.length) && !!typedArrayTags[_baseGetTag_default(value)];
975
+ }
976
+ var _baseIsTypedArray_default = baseIsTypedArray;
977
+
978
+ // node_modules/lodash-es/_baseUnary.js
979
+ function baseUnary(func) {
980
+ return function(value) {
981
+ return func(value);
982
+ };
983
+ }
984
+ var _baseUnary_default = baseUnary;
985
+
986
+ // node_modules/lodash-es/_nodeUtil.js
987
+ var exports__nodeUtil = {};
988
+ __export(exports__nodeUtil, {
989
+ default: () => _nodeUtil_default
990
+ });
991
+ var freeExports2 = typeof exports__nodeUtil == "object" && exports__nodeUtil && !exports__nodeUtil.nodeType && exports__nodeUtil;
992
+ var freeModule2 = freeExports2 && typeof module__nodeUtil == "object" && module__nodeUtil && !module__nodeUtil.nodeType && module__nodeUtil;
993
+ var moduleExports2 = freeModule2 && freeModule2.exports === freeExports2;
994
+ var freeProcess = moduleExports2 && _freeGlobal_default.process;
995
+ var nodeUtil = function() {
996
+ try {
997
+ var types = freeModule2 && freeModule2.require && freeModule2.require("util").types;
998
+ if (types) {
999
+ return types;
1000
+ }
1001
+ return freeProcess && freeProcess.binding && freeProcess.binding("util");
1002
+ } catch (e) {}
1003
+ }();
1004
+ var _nodeUtil_default = nodeUtil;
1005
+
1006
+ // node_modules/lodash-es/isTypedArray.js
1007
+ var nodeIsTypedArray = _nodeUtil_default && _nodeUtil_default.isTypedArray;
1008
+ var isTypedArray = nodeIsTypedArray ? _baseUnary_default(nodeIsTypedArray) : _baseIsTypedArray_default;
1009
+ var isTypedArray_default = isTypedArray;
1010
+
1011
+ // node_modules/lodash-es/_arrayLikeKeys.js
1012
+ var objectProto6 = Object.prototype;
1013
+ var hasOwnProperty4 = objectProto6.hasOwnProperty;
1014
+ function arrayLikeKeys(value, inherited) {
1015
+ var isArr = isArray_default(value), isArg = !isArr && isArguments_default(value), isBuff = !isArr && !isArg && isBuffer_default(value), isType = !isArr && !isArg && !isBuff && isTypedArray_default(value), skipIndexes = isArr || isArg || isBuff || isType, result = skipIndexes ? _baseTimes_default(value.length, String) : [], length = result.length;
1016
+ for (var key in value) {
1017
+ if ((inherited || hasOwnProperty4.call(value, key)) && !(skipIndexes && (key == "length" || isBuff && (key == "offset" || key == "parent") || isType && (key == "buffer" || key == "byteLength" || key == "byteOffset") || _isIndex_default(key, length)))) {
1018
+ result.push(key);
1019
+ }
1020
+ }
1021
+ return result;
1022
+ }
1023
+ var _arrayLikeKeys_default = arrayLikeKeys;
1024
+
1025
+ // node_modules/lodash-es/_overArg.js
1026
+ function overArg(func, transform) {
1027
+ return function(arg) {
1028
+ return func(transform(arg));
1029
+ };
1030
+ }
1031
+ var _overArg_default = overArg;
1032
+
1033
+ // node_modules/lodash-es/_nativeKeys.js
1034
+ var nativeKeys = _overArg_default(Object.keys, Object);
1035
+ var _nativeKeys_default = nativeKeys;
1036
+
1037
+ // node_modules/lodash-es/_baseKeys.js
1038
+ var objectProto7 = Object.prototype;
1039
+ var hasOwnProperty5 = objectProto7.hasOwnProperty;
1040
+ function baseKeys(object) {
1041
+ if (!_isPrototype_default(object)) {
1042
+ return _nativeKeys_default(object);
1043
+ }
1044
+ var result = [];
1045
+ for (var key in Object(object)) {
1046
+ if (hasOwnProperty5.call(object, key) && key != "constructor") {
1047
+ result.push(key);
1048
+ }
1049
+ }
1050
+ return result;
1051
+ }
1052
+ var _baseKeys_default = baseKeys;
1053
+
1054
+ // node_modules/lodash-es/keys.js
1055
+ function keys(object) {
1056
+ return isArrayLike_default(object) ? _arrayLikeKeys_default(object) : _baseKeys_default(object);
1057
+ }
1058
+ var keys_default = keys;
1059
+
1060
+ // node_modules/lodash-es/_isKey.js
1061
+ var reIsDeepProp = /\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/;
1062
+ var reIsPlainProp = /^\w*$/;
1063
+ function isKey(value, object) {
1064
+ if (isArray_default(value)) {
1065
+ return false;
1066
+ }
1067
+ var type = typeof value;
1068
+ if (type == "number" || type == "symbol" || type == "boolean" || value == null || isSymbol_default(value)) {
1069
+ return true;
1070
+ }
1071
+ return reIsPlainProp.test(value) || !reIsDeepProp.test(value) || object != null && value in Object(object);
1072
+ }
1073
+ var _isKey_default = isKey;
1074
+
1075
+ // node_modules/lodash-es/_nativeCreate.js
1076
+ var nativeCreate = _getNative_default(Object, "create");
1077
+ var _nativeCreate_default = nativeCreate;
1078
+
1079
+ // node_modules/lodash-es/_hashClear.js
1080
+ function hashClear() {
1081
+ this.__data__ = _nativeCreate_default ? _nativeCreate_default(null) : {};
1082
+ this.size = 0;
1083
+ }
1084
+ var _hashClear_default = hashClear;
1085
+
1086
+ // node_modules/lodash-es/_hashDelete.js
1087
+ function hashDelete(key) {
1088
+ var result = this.has(key) && delete this.__data__[key];
1089
+ this.size -= result ? 1 : 0;
1090
+ return result;
1091
+ }
1092
+ var _hashDelete_default = hashDelete;
1093
+
1094
+ // node_modules/lodash-es/_hashGet.js
1095
+ var HASH_UNDEFINED = "__lodash_hash_undefined__";
1096
+ var objectProto8 = Object.prototype;
1097
+ var hasOwnProperty6 = objectProto8.hasOwnProperty;
1098
+ function hashGet(key) {
1099
+ var data = this.__data__;
1100
+ if (_nativeCreate_default) {
1101
+ var result = data[key];
1102
+ return result === HASH_UNDEFINED ? undefined : result;
1103
+ }
1104
+ return hasOwnProperty6.call(data, key) ? data[key] : undefined;
1105
+ }
1106
+ var _hashGet_default = hashGet;
1107
+
1108
+ // node_modules/lodash-es/_hashHas.js
1109
+ var objectProto9 = Object.prototype;
1110
+ var hasOwnProperty7 = objectProto9.hasOwnProperty;
1111
+ function hashHas(key) {
1112
+ var data = this.__data__;
1113
+ return _nativeCreate_default ? data[key] !== undefined : hasOwnProperty7.call(data, key);
1114
+ }
1115
+ var _hashHas_default = hashHas;
1116
+
1117
+ // node_modules/lodash-es/_hashSet.js
1118
+ var HASH_UNDEFINED2 = "__lodash_hash_undefined__";
1119
+ function hashSet(key, value) {
1120
+ var data = this.__data__;
1121
+ this.size += this.has(key) ? 0 : 1;
1122
+ data[key] = _nativeCreate_default && value === undefined ? HASH_UNDEFINED2 : value;
1123
+ return this;
1124
+ }
1125
+ var _hashSet_default = hashSet;
1126
+
1127
+ // node_modules/lodash-es/_Hash.js
1128
+ function Hash(entries) {
1129
+ var index = -1, length = entries == null ? 0 : entries.length;
1130
+ this.clear();
1131
+ while (++index < length) {
1132
+ var entry = entries[index];
1133
+ this.set(entry[0], entry[1]);
1134
+ }
1135
+ }
1136
+ Hash.prototype.clear = _hashClear_default;
1137
+ Hash.prototype["delete"] = _hashDelete_default;
1138
+ Hash.prototype.get = _hashGet_default;
1139
+ Hash.prototype.has = _hashHas_default;
1140
+ Hash.prototype.set = _hashSet_default;
1141
+ var _Hash_default = Hash;
1142
+
1143
+ // node_modules/lodash-es/_listCacheClear.js
1144
+ function listCacheClear() {
1145
+ this.__data__ = [];
1146
+ this.size = 0;
1147
+ }
1148
+ var _listCacheClear_default = listCacheClear;
1149
+
1150
+ // node_modules/lodash-es/_assocIndexOf.js
1151
+ function assocIndexOf(array, key) {
1152
+ var length = array.length;
1153
+ while (length--) {
1154
+ if (eq_default(array[length][0], key)) {
1155
+ return length;
1156
+ }
1157
+ }
1158
+ return -1;
1159
+ }
1160
+ var _assocIndexOf_default = assocIndexOf;
1161
+
1162
+ // node_modules/lodash-es/_listCacheDelete.js
1163
+ var arrayProto = Array.prototype;
1164
+ var splice = arrayProto.splice;
1165
+ function listCacheDelete(key) {
1166
+ var data = this.__data__, index = _assocIndexOf_default(data, key);
1167
+ if (index < 0) {
1168
+ return false;
1169
+ }
1170
+ var lastIndex = data.length - 1;
1171
+ if (index == lastIndex) {
1172
+ data.pop();
1173
+ } else {
1174
+ splice.call(data, index, 1);
1175
+ }
1176
+ --this.size;
1177
+ return true;
1178
+ }
1179
+ var _listCacheDelete_default = listCacheDelete;
1180
+
1181
+ // node_modules/lodash-es/_listCacheGet.js
1182
+ function listCacheGet(key) {
1183
+ var data = this.__data__, index = _assocIndexOf_default(data, key);
1184
+ return index < 0 ? undefined : data[index][1];
1185
+ }
1186
+ var _listCacheGet_default = listCacheGet;
1187
+
1188
+ // node_modules/lodash-es/_listCacheHas.js
1189
+ function listCacheHas(key) {
1190
+ return _assocIndexOf_default(this.__data__, key) > -1;
1191
+ }
1192
+ var _listCacheHas_default = listCacheHas;
1193
+
1194
+ // node_modules/lodash-es/_listCacheSet.js
1195
+ function listCacheSet(key, value) {
1196
+ var data = this.__data__, index = _assocIndexOf_default(data, key);
1197
+ if (index < 0) {
1198
+ ++this.size;
1199
+ data.push([key, value]);
1200
+ } else {
1201
+ data[index][1] = value;
1202
+ }
1203
+ return this;
1204
+ }
1205
+ var _listCacheSet_default = listCacheSet;
1206
+
1207
+ // node_modules/lodash-es/_ListCache.js
1208
+ function ListCache(entries) {
1209
+ var index = -1, length = entries == null ? 0 : entries.length;
1210
+ this.clear();
1211
+ while (++index < length) {
1212
+ var entry = entries[index];
1213
+ this.set(entry[0], entry[1]);
1214
+ }
1215
+ }
1216
+ ListCache.prototype.clear = _listCacheClear_default;
1217
+ ListCache.prototype["delete"] = _listCacheDelete_default;
1218
+ ListCache.prototype.get = _listCacheGet_default;
1219
+ ListCache.prototype.has = _listCacheHas_default;
1220
+ ListCache.prototype.set = _listCacheSet_default;
1221
+ var _ListCache_default = ListCache;
1222
+
1223
+ // node_modules/lodash-es/_Map.js
1224
+ var Map = _getNative_default(_root_default, "Map");
1225
+ var _Map_default = Map;
1226
+
1227
+ // node_modules/lodash-es/_mapCacheClear.js
1228
+ function mapCacheClear() {
1229
+ this.size = 0;
1230
+ this.__data__ = {
1231
+ hash: new _Hash_default,
1232
+ map: new (_Map_default || _ListCache_default),
1233
+ string: new _Hash_default
1234
+ };
1235
+ }
1236
+ var _mapCacheClear_default = mapCacheClear;
1237
+
1238
+ // node_modules/lodash-es/_isKeyable.js
1239
+ function isKeyable(value) {
1240
+ var type = typeof value;
1241
+ return type == "string" || type == "number" || type == "symbol" || type == "boolean" ? value !== "__proto__" : value === null;
1242
+ }
1243
+ var _isKeyable_default = isKeyable;
1244
+
1245
+ // node_modules/lodash-es/_getMapData.js
1246
+ function getMapData(map, key) {
1247
+ var data = map.__data__;
1248
+ return _isKeyable_default(key) ? data[typeof key == "string" ? "string" : "hash"] : data.map;
1249
+ }
1250
+ var _getMapData_default = getMapData;
1251
+
1252
+ // node_modules/lodash-es/_mapCacheDelete.js
1253
+ function mapCacheDelete(key) {
1254
+ var result = _getMapData_default(this, key)["delete"](key);
1255
+ this.size -= result ? 1 : 0;
1256
+ return result;
1257
+ }
1258
+ var _mapCacheDelete_default = mapCacheDelete;
1259
+
1260
+ // node_modules/lodash-es/_mapCacheGet.js
1261
+ function mapCacheGet(key) {
1262
+ return _getMapData_default(this, key).get(key);
1263
+ }
1264
+ var _mapCacheGet_default = mapCacheGet;
1265
+
1266
+ // node_modules/lodash-es/_mapCacheHas.js
1267
+ function mapCacheHas(key) {
1268
+ return _getMapData_default(this, key).has(key);
1269
+ }
1270
+ var _mapCacheHas_default = mapCacheHas;
1271
+
1272
+ // node_modules/lodash-es/_mapCacheSet.js
1273
+ function mapCacheSet(key, value) {
1274
+ var data = _getMapData_default(this, key), size = data.size;
1275
+ data.set(key, value);
1276
+ this.size += data.size == size ? 0 : 1;
1277
+ return this;
1278
+ }
1279
+ var _mapCacheSet_default = mapCacheSet;
1280
+
1281
+ // node_modules/lodash-es/_MapCache.js
1282
+ function MapCache(entries) {
1283
+ var index = -1, length = entries == null ? 0 : entries.length;
1284
+ this.clear();
1285
+ while (++index < length) {
1286
+ var entry = entries[index];
1287
+ this.set(entry[0], entry[1]);
1288
+ }
1289
+ }
1290
+ MapCache.prototype.clear = _mapCacheClear_default;
1291
+ MapCache.prototype["delete"] = _mapCacheDelete_default;
1292
+ MapCache.prototype.get = _mapCacheGet_default;
1293
+ MapCache.prototype.has = _mapCacheHas_default;
1294
+ MapCache.prototype.set = _mapCacheSet_default;
1295
+ var _MapCache_default = MapCache;
1296
+
1297
+ // node_modules/lodash-es/memoize.js
1298
+ var FUNC_ERROR_TEXT = "Expected a function";
1299
+ function memoize(func, resolver) {
1300
+ if (typeof func != "function" || resolver != null && typeof resolver != "function") {
1301
+ throw new TypeError(FUNC_ERROR_TEXT);
1302
+ }
1303
+ var memoized = function() {
1304
+ var args = arguments, key = resolver ? resolver.apply(this, args) : args[0], cache = memoized.cache;
1305
+ if (cache.has(key)) {
1306
+ return cache.get(key);
1307
+ }
1308
+ var result = func.apply(this, args);
1309
+ memoized.cache = cache.set(key, result) || cache;
1310
+ return result;
1311
+ };
1312
+ memoized.cache = new (memoize.Cache || _MapCache_default);
1313
+ return memoized;
1314
+ }
1315
+ memoize.Cache = _MapCache_default;
1316
+ var memoize_default = memoize;
1317
+
1318
+ // node_modules/lodash-es/_memoizeCapped.js
1319
+ var MAX_MEMOIZE_SIZE = 500;
1320
+ function memoizeCapped(func) {
1321
+ var result = memoize_default(func, function(key) {
1322
+ if (cache.size === MAX_MEMOIZE_SIZE) {
1323
+ cache.clear();
1324
+ }
1325
+ return key;
1326
+ });
1327
+ var cache = result.cache;
1328
+ return result;
1329
+ }
1330
+ var _memoizeCapped_default = memoizeCapped;
1331
+
1332
+ // node_modules/lodash-es/_stringToPath.js
1333
+ var rePropName = /[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g;
1334
+ var reEscapeChar = /\\(\\)?/g;
1335
+ var stringToPath = _memoizeCapped_default(function(string) {
1336
+ var result = [];
1337
+ if (string.charCodeAt(0) === 46) {
1338
+ result.push("");
1339
+ }
1340
+ string.replace(rePropName, function(match, number, quote, subString) {
1341
+ result.push(quote ? subString.replace(reEscapeChar, "$1") : number || match);
1342
+ });
1343
+ return result;
1344
+ });
1345
+ var _stringToPath_default = stringToPath;
1346
+
1347
+ // node_modules/lodash-es/toString.js
1348
+ function toString(value) {
1349
+ return value == null ? "" : _baseToString_default(value);
1350
+ }
1351
+ var toString_default = toString;
1352
+
1353
+ // node_modules/lodash-es/_castPath.js
1354
+ function castPath(value, object) {
1355
+ if (isArray_default(value)) {
1356
+ return value;
1357
+ }
1358
+ return _isKey_default(value, object) ? [value] : _stringToPath_default(toString_default(value));
1359
+ }
1360
+ var _castPath_default = castPath;
1361
+
1362
+ // node_modules/lodash-es/_toKey.js
1363
+ var INFINITY2 = 1 / 0;
1364
+ function toKey(value) {
1365
+ if (typeof value == "string" || isSymbol_default(value)) {
1366
+ return value;
1367
+ }
1368
+ var result = value + "";
1369
+ return result == "0" && 1 / value == -INFINITY2 ? "-0" : result;
1370
+ }
1371
+ var _toKey_default = toKey;
1372
+
1373
+ // node_modules/lodash-es/_baseGet.js
1374
+ function baseGet(object, path) {
1375
+ path = _castPath_default(path, object);
1376
+ var index = 0, length = path.length;
1377
+ while (object != null && index < length) {
1378
+ object = object[_toKey_default(path[index++])];
1379
+ }
1380
+ return index && index == length ? object : undefined;
1381
+ }
1382
+ var _baseGet_default = baseGet;
1383
+
1384
+ // node_modules/lodash-es/get.js
1385
+ function get(object, path, defaultValue) {
1386
+ var result = object == null ? undefined : _baseGet_default(object, path);
1387
+ return result === undefined ? defaultValue : result;
1388
+ }
1389
+ var get_default = get;
1390
+
1391
+ // node_modules/lodash-es/_arrayPush.js
1392
+ function arrayPush(array, values) {
1393
+ var index = -1, length = values.length, offset = array.length;
1394
+ while (++index < length) {
1395
+ array[offset + index] = values[index];
1396
+ }
1397
+ return array;
1398
+ }
1399
+ var _arrayPush_default = arrayPush;
1400
+
1401
+ // node_modules/lodash-es/_hasUnicode.js
1402
+ var rsAstralRange = "\\ud800-\\udfff";
1403
+ var rsComboMarksRange = "\\u0300-\\u036f";
1404
+ var reComboHalfMarksRange = "\\ufe20-\\ufe2f";
1405
+ var rsComboSymbolsRange = "\\u20d0-\\u20ff";
1406
+ var rsComboRange = rsComboMarksRange + reComboHalfMarksRange + rsComboSymbolsRange;
1407
+ var rsVarRange = "\\ufe0e\\ufe0f";
1408
+ var rsZWJ = "\\u200d";
1409
+ var reHasUnicode = RegExp("[" + rsZWJ + rsAstralRange + rsComboRange + rsVarRange + "]");
1410
+ function hasUnicode(string) {
1411
+ return reHasUnicode.test(string);
1412
+ }
1413
+ var _hasUnicode_default = hasUnicode;
1414
+
1415
+ // node_modules/lodash-es/_stackClear.js
1416
+ function stackClear() {
1417
+ this.__data__ = new _ListCache_default;
1418
+ this.size = 0;
1419
+ }
1420
+ var _stackClear_default = stackClear;
1421
+
1422
+ // node_modules/lodash-es/_stackDelete.js
1423
+ function stackDelete(key) {
1424
+ var data = this.__data__, result = data["delete"](key);
1425
+ this.size = data.size;
1426
+ return result;
1427
+ }
1428
+ var _stackDelete_default = stackDelete;
1429
+
1430
+ // node_modules/lodash-es/_stackGet.js
1431
+ function stackGet(key) {
1432
+ return this.__data__.get(key);
1433
+ }
1434
+ var _stackGet_default = stackGet;
1435
+
1436
+ // node_modules/lodash-es/_stackHas.js
1437
+ function stackHas(key) {
1438
+ return this.__data__.has(key);
1439
+ }
1440
+ var _stackHas_default = stackHas;
1441
+
1442
+ // node_modules/lodash-es/_stackSet.js
1443
+ var LARGE_ARRAY_SIZE = 200;
1444
+ function stackSet(key, value) {
1445
+ var data = this.__data__;
1446
+ if (data instanceof _ListCache_default) {
1447
+ var pairs = data.__data__;
1448
+ if (!_Map_default || pairs.length < LARGE_ARRAY_SIZE - 1) {
1449
+ pairs.push([key, value]);
1450
+ this.size = ++data.size;
1451
+ return this;
1452
+ }
1453
+ data = this.__data__ = new _MapCache_default(pairs);
1454
+ }
1455
+ data.set(key, value);
1456
+ this.size = data.size;
1457
+ return this;
1458
+ }
1459
+ var _stackSet_default = stackSet;
1460
+
1461
+ // node_modules/lodash-es/_Stack.js
1462
+ function Stack(entries) {
1463
+ var data = this.__data__ = new _ListCache_default(entries);
1464
+ this.size = data.size;
1465
+ }
1466
+ Stack.prototype.clear = _stackClear_default;
1467
+ Stack.prototype["delete"] = _stackDelete_default;
1468
+ Stack.prototype.get = _stackGet_default;
1469
+ Stack.prototype.has = _stackHas_default;
1470
+ Stack.prototype.set = _stackSet_default;
1471
+ var _Stack_default = Stack;
1472
+
1473
+ // node_modules/lodash-es/_arrayFilter.js
1474
+ function arrayFilter(array, predicate) {
1475
+ var index = -1, length = array == null ? 0 : array.length, resIndex = 0, result = [];
1476
+ while (++index < length) {
1477
+ var value = array[index];
1478
+ if (predicate(value, index, array)) {
1479
+ result[resIndex++] = value;
1480
+ }
1481
+ }
1482
+ return result;
1483
+ }
1484
+ var _arrayFilter_default = arrayFilter;
1485
+
1486
+ // node_modules/lodash-es/stubArray.js
1487
+ function stubArray() {
1488
+ return [];
1489
+ }
1490
+ var stubArray_default = stubArray;
1491
+
1492
+ // node_modules/lodash-es/_getSymbols.js
1493
+ var objectProto10 = Object.prototype;
1494
+ var propertyIsEnumerable2 = objectProto10.propertyIsEnumerable;
1495
+ var nativeGetSymbols = Object.getOwnPropertySymbols;
1496
+ var getSymbols = !nativeGetSymbols ? stubArray_default : function(object) {
1497
+ if (object == null) {
1498
+ return [];
1499
+ }
1500
+ object = Object(object);
1501
+ return _arrayFilter_default(nativeGetSymbols(object), function(symbol) {
1502
+ return propertyIsEnumerable2.call(object, symbol);
1503
+ });
1504
+ };
1505
+ var _getSymbols_default = getSymbols;
1506
+
1507
+ // node_modules/lodash-es/_baseGetAllKeys.js
1508
+ function baseGetAllKeys(object, keysFunc, symbolsFunc) {
1509
+ var result = keysFunc(object);
1510
+ return isArray_default(object) ? result : _arrayPush_default(result, symbolsFunc(object));
1511
+ }
1512
+ var _baseGetAllKeys_default = baseGetAllKeys;
1513
+
1514
+ // node_modules/lodash-es/_getAllKeys.js
1515
+ function getAllKeys(object) {
1516
+ return _baseGetAllKeys_default(object, keys_default, _getSymbols_default);
1517
+ }
1518
+ var _getAllKeys_default = getAllKeys;
1519
+
1520
+ // node_modules/lodash-es/_DataView.js
1521
+ var DataView = _getNative_default(_root_default, "DataView");
1522
+ var _DataView_default = DataView;
1523
+
1524
+ // node_modules/lodash-es/_Promise.js
1525
+ var Promise2 = _getNative_default(_root_default, "Promise");
1526
+ var _Promise_default = Promise2;
1527
+
1528
+ // node_modules/lodash-es/_Set.js
1529
+ var Set = _getNative_default(_root_default, "Set");
1530
+ var _Set_default = Set;
1531
+
1532
+ // node_modules/lodash-es/_getTag.js
1533
+ var mapTag2 = "[object Map]";
1534
+ var objectTag2 = "[object Object]";
1535
+ var promiseTag = "[object Promise]";
1536
+ var setTag2 = "[object Set]";
1537
+ var weakMapTag2 = "[object WeakMap]";
1538
+ var dataViewTag2 = "[object DataView]";
1539
+ var dataViewCtorString = _toSource_default(_DataView_default);
1540
+ var mapCtorString = _toSource_default(_Map_default);
1541
+ var promiseCtorString = _toSource_default(_Promise_default);
1542
+ var setCtorString = _toSource_default(_Set_default);
1543
+ var weakMapCtorString = _toSource_default(_WeakMap_default);
1544
+ var getTag = _baseGetTag_default;
1545
+ if (_DataView_default && getTag(new _DataView_default(new ArrayBuffer(1))) != dataViewTag2 || _Map_default && getTag(new _Map_default) != mapTag2 || _Promise_default && getTag(_Promise_default.resolve()) != promiseTag || _Set_default && getTag(new _Set_default) != setTag2 || _WeakMap_default && getTag(new _WeakMap_default) != weakMapTag2) {
1546
+ getTag = function(value) {
1547
+ var result = _baseGetTag_default(value), Ctor = result == objectTag2 ? value.constructor : undefined, ctorString = Ctor ? _toSource_default(Ctor) : "";
1548
+ if (ctorString) {
1549
+ switch (ctorString) {
1550
+ case dataViewCtorString:
1551
+ return dataViewTag2;
1552
+ case mapCtorString:
1553
+ return mapTag2;
1554
+ case promiseCtorString:
1555
+ return promiseTag;
1556
+ case setCtorString:
1557
+ return setTag2;
1558
+ case weakMapCtorString:
1559
+ return weakMapTag2;
1560
+ }
1561
+ }
1562
+ return result;
1563
+ };
1564
+ }
1565
+ var _getTag_default = getTag;
1566
+
1567
+ // node_modules/lodash-es/_Uint8Array.js
1568
+ var Uint8Array = _root_default.Uint8Array;
1569
+ var _Uint8Array_default = Uint8Array;
1570
+
1571
+ // node_modules/lodash-es/_setCacheAdd.js
1572
+ var HASH_UNDEFINED3 = "__lodash_hash_undefined__";
1573
+ function setCacheAdd(value) {
1574
+ this.__data__.set(value, HASH_UNDEFINED3);
1575
+ return this;
1576
+ }
1577
+ var _setCacheAdd_default = setCacheAdd;
1578
+
1579
+ // node_modules/lodash-es/_setCacheHas.js
1580
+ function setCacheHas(value) {
1581
+ return this.__data__.has(value);
1582
+ }
1583
+ var _setCacheHas_default = setCacheHas;
1584
+
1585
+ // node_modules/lodash-es/_SetCache.js
1586
+ function SetCache(values) {
1587
+ var index = -1, length = values == null ? 0 : values.length;
1588
+ this.__data__ = new _MapCache_default;
1589
+ while (++index < length) {
1590
+ this.add(values[index]);
1591
+ }
1592
+ }
1593
+ SetCache.prototype.add = SetCache.prototype.push = _setCacheAdd_default;
1594
+ SetCache.prototype.has = _setCacheHas_default;
1595
+ var _SetCache_default = SetCache;
1596
+
1597
+ // node_modules/lodash-es/_arraySome.js
1598
+ function arraySome(array, predicate) {
1599
+ var index = -1, length = array == null ? 0 : array.length;
1600
+ while (++index < length) {
1601
+ if (predicate(array[index], index, array)) {
1602
+ return true;
1603
+ }
1604
+ }
1605
+ return false;
1606
+ }
1607
+ var _arraySome_default = arraySome;
1608
+
1609
+ // node_modules/lodash-es/_cacheHas.js
1610
+ function cacheHas(cache, key) {
1611
+ return cache.has(key);
1612
+ }
1613
+ var _cacheHas_default = cacheHas;
1614
+
1615
+ // node_modules/lodash-es/_equalArrays.js
1616
+ var COMPARE_PARTIAL_FLAG = 1;
1617
+ var COMPARE_UNORDERED_FLAG = 2;
1618
+ function equalArrays(array, other, bitmask, customizer, equalFunc, stack) {
1619
+ var isPartial = bitmask & COMPARE_PARTIAL_FLAG, arrLength = array.length, othLength = other.length;
1620
+ if (arrLength != othLength && !(isPartial && othLength > arrLength)) {
1621
+ return false;
1622
+ }
1623
+ var arrStacked = stack.get(array);
1624
+ var othStacked = stack.get(other);
1625
+ if (arrStacked && othStacked) {
1626
+ return arrStacked == other && othStacked == array;
1627
+ }
1628
+ var index = -1, result = true, seen = bitmask & COMPARE_UNORDERED_FLAG ? new _SetCache_default : undefined;
1629
+ stack.set(array, other);
1630
+ stack.set(other, array);
1631
+ while (++index < arrLength) {
1632
+ var arrValue = array[index], othValue = other[index];
1633
+ if (customizer) {
1634
+ var compared = isPartial ? customizer(othValue, arrValue, index, other, array, stack) : customizer(arrValue, othValue, index, array, other, stack);
1635
+ }
1636
+ if (compared !== undefined) {
1637
+ if (compared) {
1638
+ continue;
1639
+ }
1640
+ result = false;
1641
+ break;
1642
+ }
1643
+ if (seen) {
1644
+ if (!_arraySome_default(other, function(othValue2, othIndex) {
1645
+ if (!_cacheHas_default(seen, othIndex) && (arrValue === othValue2 || equalFunc(arrValue, othValue2, bitmask, customizer, stack))) {
1646
+ return seen.push(othIndex);
1647
+ }
1648
+ })) {
1649
+ result = false;
1650
+ break;
1651
+ }
1652
+ } else if (!(arrValue === othValue || equalFunc(arrValue, othValue, bitmask, customizer, stack))) {
1653
+ result = false;
1654
+ break;
1655
+ }
1656
+ }
1657
+ stack["delete"](array);
1658
+ stack["delete"](other);
1659
+ return result;
1660
+ }
1661
+ var _equalArrays_default = equalArrays;
1662
+
1663
+ // node_modules/lodash-es/_mapToArray.js
1664
+ function mapToArray(map) {
1665
+ var index = -1, result = Array(map.size);
1666
+ map.forEach(function(value, key) {
1667
+ result[++index] = [key, value];
1668
+ });
1669
+ return result;
1670
+ }
1671
+ var _mapToArray_default = mapToArray;
1672
+
1673
+ // node_modules/lodash-es/_setToArray.js
1674
+ function setToArray(set) {
1675
+ var index = -1, result = Array(set.size);
1676
+ set.forEach(function(value) {
1677
+ result[++index] = value;
1678
+ });
1679
+ return result;
1680
+ }
1681
+ var _setToArray_default = setToArray;
1682
+
1683
+ // node_modules/lodash-es/_equalByTag.js
1684
+ var COMPARE_PARTIAL_FLAG2 = 1;
1685
+ var COMPARE_UNORDERED_FLAG2 = 2;
1686
+ var boolTag2 = "[object Boolean]";
1687
+ var dateTag2 = "[object Date]";
1688
+ var errorTag2 = "[object Error]";
1689
+ var mapTag3 = "[object Map]";
1690
+ var numberTag2 = "[object Number]";
1691
+ var regexpTag2 = "[object RegExp]";
1692
+ var setTag3 = "[object Set]";
1693
+ var stringTag2 = "[object String]";
1694
+ var symbolTag2 = "[object Symbol]";
1695
+ var arrayBufferTag2 = "[object ArrayBuffer]";
1696
+ var dataViewTag3 = "[object DataView]";
1697
+ var symbolProto2 = _Symbol_default ? _Symbol_default.prototype : undefined;
1698
+ var symbolValueOf = symbolProto2 ? symbolProto2.valueOf : undefined;
1699
+ function equalByTag(object, other, tag, bitmask, customizer, equalFunc, stack) {
1700
+ switch (tag) {
1701
+ case dataViewTag3:
1702
+ if (object.byteLength != other.byteLength || object.byteOffset != other.byteOffset) {
1703
+ return false;
1704
+ }
1705
+ object = object.buffer;
1706
+ other = other.buffer;
1707
+ case arrayBufferTag2:
1708
+ if (object.byteLength != other.byteLength || !equalFunc(new _Uint8Array_default(object), new _Uint8Array_default(other))) {
1709
+ return false;
1710
+ }
1711
+ return true;
1712
+ case boolTag2:
1713
+ case dateTag2:
1714
+ case numberTag2:
1715
+ return eq_default(+object, +other);
1716
+ case errorTag2:
1717
+ return object.name == other.name && object.message == other.message;
1718
+ case regexpTag2:
1719
+ case stringTag2:
1720
+ return object == other + "";
1721
+ case mapTag3:
1722
+ var convert = _mapToArray_default;
1723
+ case setTag3:
1724
+ var isPartial = bitmask & COMPARE_PARTIAL_FLAG2;
1725
+ convert || (convert = _setToArray_default);
1726
+ if (object.size != other.size && !isPartial) {
1727
+ return false;
1728
+ }
1729
+ var stacked = stack.get(object);
1730
+ if (stacked) {
1731
+ return stacked == other;
1732
+ }
1733
+ bitmask |= COMPARE_UNORDERED_FLAG2;
1734
+ stack.set(object, other);
1735
+ var result = _equalArrays_default(convert(object), convert(other), bitmask, customizer, equalFunc, stack);
1736
+ stack["delete"](object);
1737
+ return result;
1738
+ case symbolTag2:
1739
+ if (symbolValueOf) {
1740
+ return symbolValueOf.call(object) == symbolValueOf.call(other);
1741
+ }
1742
+ }
1743
+ return false;
1744
+ }
1745
+ var _equalByTag_default = equalByTag;
1746
+
1747
+ // node_modules/lodash-es/_equalObjects.js
1748
+ var COMPARE_PARTIAL_FLAG3 = 1;
1749
+ var objectProto11 = Object.prototype;
1750
+ var hasOwnProperty8 = objectProto11.hasOwnProperty;
1751
+ function equalObjects(object, other, bitmask, customizer, equalFunc, stack) {
1752
+ var isPartial = bitmask & COMPARE_PARTIAL_FLAG3, objProps = _getAllKeys_default(object), objLength = objProps.length, othProps = _getAllKeys_default(other), othLength = othProps.length;
1753
+ if (objLength != othLength && !isPartial) {
1754
+ return false;
1755
+ }
1756
+ var index = objLength;
1757
+ while (index--) {
1758
+ var key = objProps[index];
1759
+ if (!(isPartial ? key in other : hasOwnProperty8.call(other, key))) {
1760
+ return false;
1761
+ }
1762
+ }
1763
+ var objStacked = stack.get(object);
1764
+ var othStacked = stack.get(other);
1765
+ if (objStacked && othStacked) {
1766
+ return objStacked == other && othStacked == object;
1767
+ }
1768
+ var result = true;
1769
+ stack.set(object, other);
1770
+ stack.set(other, object);
1771
+ var skipCtor = isPartial;
1772
+ while (++index < objLength) {
1773
+ key = objProps[index];
1774
+ var objValue = object[key], othValue = other[key];
1775
+ if (customizer) {
1776
+ var compared = isPartial ? customizer(othValue, objValue, key, other, object, stack) : customizer(objValue, othValue, key, object, other, stack);
1777
+ }
1778
+ if (!(compared === undefined ? objValue === othValue || equalFunc(objValue, othValue, bitmask, customizer, stack) : compared)) {
1779
+ result = false;
1780
+ break;
1781
+ }
1782
+ skipCtor || (skipCtor = key == "constructor");
1783
+ }
1784
+ if (result && !skipCtor) {
1785
+ var objCtor = object.constructor, othCtor = other.constructor;
1786
+ if (objCtor != othCtor && (("constructor" in object) && ("constructor" in other)) && !(typeof objCtor == "function" && objCtor instanceof objCtor && typeof othCtor == "function" && othCtor instanceof othCtor)) {
1787
+ result = false;
1788
+ }
1789
+ }
1790
+ stack["delete"](object);
1791
+ stack["delete"](other);
1792
+ return result;
1793
+ }
1794
+ var _equalObjects_default = equalObjects;
1795
+
1796
+ // node_modules/lodash-es/_baseIsEqualDeep.js
1797
+ var COMPARE_PARTIAL_FLAG4 = 1;
1798
+ var argsTag3 = "[object Arguments]";
1799
+ var arrayTag2 = "[object Array]";
1800
+ var objectTag3 = "[object Object]";
1801
+ var objectProto12 = Object.prototype;
1802
+ var hasOwnProperty9 = objectProto12.hasOwnProperty;
1803
+ function baseIsEqualDeep(object, other, bitmask, customizer, equalFunc, stack) {
1804
+ var objIsArr = isArray_default(object), othIsArr = isArray_default(other), objTag = objIsArr ? arrayTag2 : _getTag_default(object), othTag = othIsArr ? arrayTag2 : _getTag_default(other);
1805
+ objTag = objTag == argsTag3 ? objectTag3 : objTag;
1806
+ othTag = othTag == argsTag3 ? objectTag3 : othTag;
1807
+ var objIsObj = objTag == objectTag3, othIsObj = othTag == objectTag3, isSameTag = objTag == othTag;
1808
+ if (isSameTag && isBuffer_default(object)) {
1809
+ if (!isBuffer_default(other)) {
1810
+ return false;
1811
+ }
1812
+ objIsArr = true;
1813
+ objIsObj = false;
1814
+ }
1815
+ if (isSameTag && !objIsObj) {
1816
+ stack || (stack = new _Stack_default);
1817
+ return objIsArr || isTypedArray_default(object) ? _equalArrays_default(object, other, bitmask, customizer, equalFunc, stack) : _equalByTag_default(object, other, objTag, bitmask, customizer, equalFunc, stack);
1818
+ }
1819
+ if (!(bitmask & COMPARE_PARTIAL_FLAG4)) {
1820
+ var objIsWrapped = objIsObj && hasOwnProperty9.call(object, "__wrapped__"), othIsWrapped = othIsObj && hasOwnProperty9.call(other, "__wrapped__");
1821
+ if (objIsWrapped || othIsWrapped) {
1822
+ var objUnwrapped = objIsWrapped ? object.value() : object, othUnwrapped = othIsWrapped ? other.value() : other;
1823
+ stack || (stack = new _Stack_default);
1824
+ return equalFunc(objUnwrapped, othUnwrapped, bitmask, customizer, stack);
1825
+ }
1826
+ }
1827
+ if (!isSameTag) {
1828
+ return false;
1829
+ }
1830
+ stack || (stack = new _Stack_default);
1831
+ return _equalObjects_default(object, other, bitmask, customizer, equalFunc, stack);
1832
+ }
1833
+ var _baseIsEqualDeep_default = baseIsEqualDeep;
1834
+
1835
+ // node_modules/lodash-es/_baseIsEqual.js
1836
+ function baseIsEqual(value, other, bitmask, customizer, stack) {
1837
+ if (value === other) {
1838
+ return true;
1839
+ }
1840
+ if (value == null || other == null || !isObjectLike_default(value) && !isObjectLike_default(other)) {
1841
+ return value !== value && other !== other;
1842
+ }
1843
+ return _baseIsEqualDeep_default(value, other, bitmask, customizer, baseIsEqual, stack);
1844
+ }
1845
+ var _baseIsEqual_default = baseIsEqual;
1846
+
1847
+ // node_modules/lodash-es/_baseIsMatch.js
1848
+ var COMPARE_PARTIAL_FLAG5 = 1;
1849
+ var COMPARE_UNORDERED_FLAG3 = 2;
1850
+ function baseIsMatch(object, source, matchData, customizer) {
1851
+ var index = matchData.length, length = index, noCustomizer = !customizer;
1852
+ if (object == null) {
1853
+ return !length;
1854
+ }
1855
+ object = Object(object);
1856
+ while (index--) {
1857
+ var data = matchData[index];
1858
+ if (noCustomizer && data[2] ? data[1] !== object[data[0]] : !(data[0] in object)) {
1859
+ return false;
1860
+ }
1861
+ }
1862
+ while (++index < length) {
1863
+ data = matchData[index];
1864
+ var key = data[0], objValue = object[key], srcValue = data[1];
1865
+ if (noCustomizer && data[2]) {
1866
+ if (objValue === undefined && !(key in object)) {
1867
+ return false;
1868
+ }
1869
+ } else {
1870
+ var stack = new _Stack_default;
1871
+ if (customizer) {
1872
+ var result = customizer(objValue, srcValue, key, object, source, stack);
1873
+ }
1874
+ if (!(result === undefined ? _baseIsEqual_default(srcValue, objValue, COMPARE_PARTIAL_FLAG5 | COMPARE_UNORDERED_FLAG3, customizer, stack) : result)) {
1875
+ return false;
1876
+ }
1877
+ }
1878
+ }
1879
+ return true;
1880
+ }
1881
+ var _baseIsMatch_default = baseIsMatch;
1882
+
1883
+ // node_modules/lodash-es/_isStrictComparable.js
1884
+ function isStrictComparable(value) {
1885
+ return value === value && !isObject_default(value);
1886
+ }
1887
+ var _isStrictComparable_default = isStrictComparable;
1888
+
1889
+ // node_modules/lodash-es/_getMatchData.js
1890
+ function getMatchData(object) {
1891
+ var result = keys_default(object), length = result.length;
1892
+ while (length--) {
1893
+ var key = result[length], value = object[key];
1894
+ result[length] = [key, value, _isStrictComparable_default(value)];
1895
+ }
1896
+ return result;
1897
+ }
1898
+ var _getMatchData_default = getMatchData;
1899
+
1900
+ // node_modules/lodash-es/_matchesStrictComparable.js
1901
+ function matchesStrictComparable(key, srcValue) {
1902
+ return function(object) {
1903
+ if (object == null) {
1904
+ return false;
1905
+ }
1906
+ return object[key] === srcValue && (srcValue !== undefined || (key in Object(object)));
1907
+ };
1908
+ }
1909
+ var _matchesStrictComparable_default = matchesStrictComparable;
1910
+
1911
+ // node_modules/lodash-es/_baseMatches.js
1912
+ function baseMatches(source) {
1913
+ var matchData = _getMatchData_default(source);
1914
+ if (matchData.length == 1 && matchData[0][2]) {
1915
+ return _matchesStrictComparable_default(matchData[0][0], matchData[0][1]);
1916
+ }
1917
+ return function(object) {
1918
+ return object === source || _baseIsMatch_default(object, source, matchData);
1919
+ };
1920
+ }
1921
+ var _baseMatches_default = baseMatches;
1922
+
1923
+ // node_modules/lodash-es/_baseHasIn.js
1924
+ function baseHasIn(object, key) {
1925
+ return object != null && key in Object(object);
1926
+ }
1927
+ var _baseHasIn_default = baseHasIn;
1928
+
1929
+ // node_modules/lodash-es/_hasPath.js
1930
+ function hasPath(object, path, hasFunc) {
1931
+ path = _castPath_default(path, object);
1932
+ var index = -1, length = path.length, result = false;
1933
+ while (++index < length) {
1934
+ var key = _toKey_default(path[index]);
1935
+ if (!(result = object != null && hasFunc(object, key))) {
1936
+ break;
1937
+ }
1938
+ object = object[key];
1939
+ }
1940
+ if (result || ++index != length) {
1941
+ return result;
1942
+ }
1943
+ length = object == null ? 0 : object.length;
1944
+ return !!length && isLength_default(length) && _isIndex_default(key, length) && (isArray_default(object) || isArguments_default(object));
1945
+ }
1946
+ var _hasPath_default = hasPath;
1947
+
1948
+ // node_modules/lodash-es/hasIn.js
1949
+ function hasIn(object, path) {
1950
+ return object != null && _hasPath_default(object, path, _baseHasIn_default);
1951
+ }
1952
+ var hasIn_default = hasIn;
1953
+
1954
+ // node_modules/lodash-es/_baseMatchesProperty.js
1955
+ var COMPARE_PARTIAL_FLAG6 = 1;
1956
+ var COMPARE_UNORDERED_FLAG4 = 2;
1957
+ function baseMatchesProperty(path, srcValue) {
1958
+ if (_isKey_default(path) && _isStrictComparable_default(srcValue)) {
1959
+ return _matchesStrictComparable_default(_toKey_default(path), srcValue);
1960
+ }
1961
+ return function(object) {
1962
+ var objValue = get_default(object, path);
1963
+ return objValue === undefined && objValue === srcValue ? hasIn_default(object, path) : _baseIsEqual_default(srcValue, objValue, COMPARE_PARTIAL_FLAG6 | COMPARE_UNORDERED_FLAG4);
1964
+ };
1965
+ }
1966
+ var _baseMatchesProperty_default = baseMatchesProperty;
1967
+
1968
+ // node_modules/lodash-es/_baseProperty.js
1969
+ function baseProperty(key) {
1970
+ return function(object) {
1971
+ return object == null ? undefined : object[key];
1972
+ };
1973
+ }
1974
+ var _baseProperty_default = baseProperty;
1975
+
1976
+ // node_modules/lodash-es/_basePropertyDeep.js
1977
+ function basePropertyDeep(path) {
1978
+ return function(object) {
1979
+ return _baseGet_default(object, path);
1980
+ };
1981
+ }
1982
+ var _basePropertyDeep_default = basePropertyDeep;
1983
+
1984
+ // node_modules/lodash-es/property.js
1985
+ function property(path) {
1986
+ return _isKey_default(path) ? _baseProperty_default(_toKey_default(path)) : _basePropertyDeep_default(path);
1987
+ }
1988
+ var property_default = property;
1989
+
1990
+ // node_modules/lodash-es/_baseIteratee.js
1991
+ function baseIteratee(value) {
1992
+ if (typeof value == "function") {
1993
+ return value;
1994
+ }
1995
+ if (value == null) {
1996
+ return identity_default;
1997
+ }
1998
+ if (typeof value == "object") {
1999
+ return isArray_default(value) ? _baseMatchesProperty_default(value[0], value[1]) : _baseMatches_default(value);
2000
+ }
2001
+ return property_default(value);
2002
+ }
2003
+ var _baseIteratee_default = baseIteratee;
2004
+
2005
+ // node_modules/lodash-es/_createBaseFor.js
2006
+ function createBaseFor(fromRight) {
2007
+ return function(object, iteratee, keysFunc) {
2008
+ var index = -1, iterable = Object(object), props = keysFunc(object), length = props.length;
2009
+ while (length--) {
2010
+ var key = props[fromRight ? length : ++index];
2011
+ if (iteratee(iterable[key], key, iterable) === false) {
2012
+ break;
2013
+ }
2014
+ }
2015
+ return object;
2016
+ };
2017
+ }
2018
+ var _createBaseFor_default = createBaseFor;
2019
+
2020
+ // node_modules/lodash-es/_baseFor.js
2021
+ var baseFor = _createBaseFor_default();
2022
+ var _baseFor_default = baseFor;
2023
+
2024
+ // node_modules/lodash-es/_baseForOwn.js
2025
+ function baseForOwn(object, iteratee) {
2026
+ return object && _baseFor_default(object, iteratee, keys_default);
2027
+ }
2028
+ var _baseForOwn_default = baseForOwn;
2029
+
2030
+ // node_modules/lodash-es/_createBaseEach.js
2031
+ function createBaseEach(eachFunc, fromRight) {
2032
+ return function(collection, iteratee) {
2033
+ if (collection == null) {
2034
+ return collection;
2035
+ }
2036
+ if (!isArrayLike_default(collection)) {
2037
+ return eachFunc(collection, iteratee);
2038
+ }
2039
+ var length = collection.length, index = fromRight ? length : -1, iterable = Object(collection);
2040
+ while (fromRight ? index-- : ++index < length) {
2041
+ if (iteratee(iterable[index], index, iterable) === false) {
2042
+ break;
635
2043
  }
636
2044
  }
637
- return {
638
- args,
639
- options
640
- };
2045
+ return collection;
2046
+ };
2047
+ }
2048
+ var _createBaseEach_default = createBaseEach;
2049
+
2050
+ // node_modules/lodash-es/_baseEach.js
2051
+ var baseEach = _createBaseEach_default(_baseForOwn_default);
2052
+ var _baseEach_default = baseEach;
2053
+
2054
+ // node_modules/lodash-es/_baseFilter.js
2055
+ function baseFilter(collection, predicate) {
2056
+ var result = [];
2057
+ _baseEach_default(collection, function(value, index, collection2) {
2058
+ if (predicate(value, index, collection2)) {
2059
+ result.push(value);
2060
+ }
2061
+ });
2062
+ return result;
2063
+ }
2064
+ var _baseFilter_default = baseFilter;
2065
+
2066
+ // node_modules/lodash-es/filter.js
2067
+ function filter(collection, predicate) {
2068
+ var func = isArray_default(collection) ? _arrayFilter_default : _baseFilter_default;
2069
+ return func(collection, _baseIteratee_default(predicate, 3));
2070
+ }
2071
+ var filter_default = filter;
2072
+ // node_modules/lodash-es/_baseGt.js
2073
+ function baseGt(value, other) {
2074
+ return value > other;
2075
+ }
2076
+ var _baseGt_default = baseGt;
2077
+
2078
+ // node_modules/lodash-es/isString.js
2079
+ var stringTag3 = "[object String]";
2080
+ function isString(value) {
2081
+ return typeof value == "string" || !isArray_default(value) && isObjectLike_default(value) && _baseGetTag_default(value) == stringTag3;
2082
+ }
2083
+ var isString_default = isString;
2084
+ // node_modules/lodash-es/mapValues.js
2085
+ function mapValues(object, iteratee) {
2086
+ var result = {};
2087
+ iteratee = _baseIteratee_default(iteratee, 3);
2088
+ _baseForOwn_default(object, function(value, key, object2) {
2089
+ _baseAssignValue_default(result, key, iteratee(value, key, object2));
2090
+ });
2091
+ return result;
2092
+ }
2093
+ var mapValues_default = mapValues;
2094
+ // node_modules/lodash-es/_baseExtremum.js
2095
+ function baseExtremum(array, iteratee, comparator) {
2096
+ var index = -1, length = array.length;
2097
+ while (++index < length) {
2098
+ var value = array[index], current = iteratee(value);
2099
+ if (current != null && (computed === undefined ? current === current && !isSymbol_default(current) : comparator(current, computed))) {
2100
+ var computed = current, result = value;
2101
+ }
641
2102
  }
642
- runMatchedCommand() {
643
- const { args, options, matchedCommand: command } = this;
644
- if (!command || !command.commandAction)
645
- return;
646
- command.checkUnknownOptions();
647
- command.checkOptionValue();
648
- command.checkRequiredArgs();
649
- const actionArgs = [];
650
- command.args.forEach((arg, index) => {
651
- if (arg.variadic) {
652
- actionArgs.push(args.slice(index));
653
- } else {
654
- actionArgs.push(args[index]);
655
- }
656
- });
657
- actionArgs.push(options);
658
- return command.commandAction.apply(this, actionArgs);
2103
+ return result;
2104
+ }
2105
+ var _baseExtremum_default = baseExtremum;
2106
+
2107
+ // node_modules/lodash-es/maxBy.js
2108
+ function maxBy(array, iteratee) {
2109
+ return array && array.length ? _baseExtremum_default(array, _baseIteratee_default(iteratee, 2), _baseGt_default) : undefined;
2110
+ }
2111
+ var maxBy_default = maxBy;
2112
+ // node_modules/lodash-es/_asciiSize.js
2113
+ var asciiSize = _baseProperty_default("length");
2114
+ var _asciiSize_default = asciiSize;
2115
+
2116
+ // node_modules/lodash-es/_unicodeSize.js
2117
+ var rsAstralRange2 = "\\ud800-\\udfff";
2118
+ var rsComboMarksRange2 = "\\u0300-\\u036f";
2119
+ var reComboHalfMarksRange2 = "\\ufe20-\\ufe2f";
2120
+ var rsComboSymbolsRange2 = "\\u20d0-\\u20ff";
2121
+ var rsComboRange2 = rsComboMarksRange2 + reComboHalfMarksRange2 + rsComboSymbolsRange2;
2122
+ var rsVarRange2 = "\\ufe0e\\ufe0f";
2123
+ var rsAstral = "[" + rsAstralRange2 + "]";
2124
+ var rsCombo = "[" + rsComboRange2 + "]";
2125
+ var rsFitz = "\\ud83c[\\udffb-\\udfff]";
2126
+ var rsModifier = "(?:" + rsCombo + "|" + rsFitz + ")";
2127
+ var rsNonAstral = "[^" + rsAstralRange2 + "]";
2128
+ var rsRegional = "(?:\\ud83c[\\udde6-\\uddff]){2}";
2129
+ var rsSurrPair = "[\\ud800-\\udbff][\\udc00-\\udfff]";
2130
+ var rsZWJ2 = "\\u200d";
2131
+ var reOptMod = rsModifier + "?";
2132
+ var rsOptVar = "[" + rsVarRange2 + "]?";
2133
+ var rsOptJoin = "(?:" + rsZWJ2 + "(?:" + [rsNonAstral, rsRegional, rsSurrPair].join("|") + ")" + rsOptVar + reOptMod + ")*";
2134
+ var rsSeq = rsOptVar + reOptMod + rsOptJoin;
2135
+ var rsSymbol = "(?:" + [rsNonAstral + rsCombo + "?", rsCombo, rsRegional, rsSurrPair, rsAstral].join("|") + ")";
2136
+ var reUnicode = RegExp(rsFitz + "(?=" + rsFitz + ")|" + rsSymbol + rsSeq, "g");
2137
+ function unicodeSize(string) {
2138
+ var result = reUnicode.lastIndex = 0;
2139
+ while (reUnicode.test(string)) {
2140
+ ++result;
659
2141
  }
2142
+ return result;
660
2143
  }
661
- var cac = (name = "") => new CAC(name);
662
- var dist_default = cac;
2144
+ var _unicodeSize_default = unicodeSize;
663
2145
 
664
- // src/cli.ts
665
- var import__package3 = __toESM(require_package(), 1);
2146
+ // node_modules/lodash-es/_stringSize.js
2147
+ function stringSize(string) {
2148
+ return _hasUnicode_default(string) ? _unicodeSize_default(string) : _asciiSize_default(string);
2149
+ }
2150
+ var _stringSize_default = stringSize;
666
2151
 
667
- // src/commands/init.ts
668
- import { join as join2 } from "path";
2152
+ // node_modules/lodash-es/size.js
2153
+ var mapTag4 = "[object Map]";
2154
+ var setTag4 = "[object Set]";
2155
+ function size(collection) {
2156
+ if (collection == null) {
2157
+ return 0;
2158
+ }
2159
+ if (isArrayLike_default(collection)) {
2160
+ return isString_default(collection) ? _stringSize_default(collection) : collection.length;
2161
+ }
2162
+ var tag = _getTag_default(collection);
2163
+ if (tag == mapTag4 || tag == setTag4) {
2164
+ return collection.size;
2165
+ }
2166
+ return _baseKeys_default(collection).length;
2167
+ }
2168
+ var size_default = size;
2169
+ // node_modules/lodash-es/_baseSome.js
2170
+ function baseSome(collection, predicate) {
2171
+ var result;
2172
+ _baseEach_default(collection, function(value, index, collection2) {
2173
+ result = predicate(value, index, collection2);
2174
+ return !result;
2175
+ });
2176
+ return !!result;
2177
+ }
2178
+ var _baseSome_default = baseSome;
669
2179
 
670
- // src/utils/config.ts
671
- import { homedir } from "os";
672
- import { join } from "path";
673
- import { mkdir, cp, rm, stat, readdir } from "fs/promises";
2180
+ // node_modules/lodash-es/some.js
2181
+ function some(collection, predicate, guard) {
2182
+ var func = isArray_default(collection) ? _arraySome_default : _baseSome_default;
2183
+ if (guard && _isIterateeCall_default(collection, predicate, guard)) {
2184
+ predicate = undefined;
2185
+ }
2186
+ return func(collection, _baseIteratee_default(predicate, 3));
2187
+ }
2188
+ var some_default = some;
2189
+ // src/utils/helpers.ts
674
2190
  import { execFile } from "child_process";
675
2191
  import { promisify } from "util";
676
2192
  var exec = promisify(execFile);
2193
+ function getErrorMsg(err) {
2194
+ return err instanceof Error ? err.message : String(err);
2195
+ }
2196
+ async function checkBin(name) {
2197
+ try {
2198
+ await exec(name, ["--version"]);
2199
+ return true;
2200
+ } catch {
2201
+ return false;
2202
+ }
2203
+ }
2204
+ async function checkBinVersion(name) {
2205
+ try {
2206
+ const { stdout } = await exec(name, ["--version"]);
2207
+ return stdout.trim().split(`
2208
+ `)[0] ?? null;
2209
+ } catch {
2210
+ return null;
2211
+ }
2212
+ }
2213
+ function plural(count, singular, suffix = "s") {
2214
+ return `${count} ${singular}${count > 1 ? suffix : ""}`;
2215
+ }
2216
+ function printSummary(ok, fail, label, action) {
2217
+ console.log();
2218
+ if (ok > 0)
2219
+ console.log(` \u2713 ${action} ${plural(ok, label)}`);
2220
+ if (fail > 0)
2221
+ console.log(` \u2717 Failed: ${fail}`);
2222
+ if (ok > 0)
2223
+ console.log(`
2224
+ Restart Claude Code to ${action === "Installed" ? "activate" : "apply"}.
2225
+ `);
2226
+ }
2227
+ function maxKeyLength(registry) {
2228
+ return size_default(maxBy_default(keys_default(registry), (k) => k.length) ?? "");
2229
+ }
2230
+ function listRegistry(registry, header, usage) {
2231
+ console.log(`
2232
+ ${header}
2233
+ `);
2234
+ const pad = maxKeyLength(registry) + 2;
2235
+ for (const [key, item] of Object.entries(registry)) {
2236
+ console.log(` ${key.padEnd(pad)}${item.description}`);
2237
+ }
2238
+ console.log(`
2239
+ Usage:`);
2240
+ for (const line of usage)
2241
+ console.log(` ${line}`);
2242
+ console.log();
2243
+ }
2244
+ function validateTargets(targets, registry, errorLabel, helpCmd) {
2245
+ const invalid = filter_default(targets, (t) => !registry[t]);
2246
+ if (invalid.length > 0) {
2247
+ console.error(`
2248
+ \u2717 Unknown ${errorLabel}: ${invalid.join(", ")}`);
2249
+ console.error(` Run '${helpCmd}' to see available ${errorLabel}.
2250
+ `);
2251
+ process.exit(1);
2252
+ }
2253
+ return true;
2254
+ }
2255
+ async function requireClaude() {
2256
+ if (!await checkBin("claude")) {
2257
+ console.error(`
2258
+ \u2717 claude CLI not found.
2259
+ `);
2260
+ process.exit(1);
2261
+ }
2262
+ }
2263
+
2264
+ // src/utils/config.ts
2265
+ var exec2 = promisify2(execFile2);
677
2266
  var REPO = "vibe-cokit/claude-code";
678
2267
  var SKILLS_REPO = "vibe-cokit/skills";
679
2268
  var CLAUDE_DIR = join(homedir(), ".claude");
680
2269
  var SKILLS_DIR = join(CLAUDE_DIR, "skills");
681
2270
  var CONFIG_FOLDERS = ["agents", "commands", "hooks", "prompts", "workflows"];
682
2271
  var TEMP_DIR = join(homedir(), ".vibe-cokit-tmp");
2272
+ var SETTINGS_PATH = join(CLAUDE_DIR, "settings.json");
683
2273
  function log(step) {
684
2274
  console.log(` \u2192 ${step}`);
685
2275
  }
686
2276
  async function verifyPrerequisites() {
687
2277
  try {
688
- await exec("gh", ["--version"]);
2278
+ await exec2("gh", ["--version"]);
689
2279
  } catch {
690
2280
  throw new Error("gh CLI not found. Install: https://cli.github.com");
691
2281
  }
692
2282
  }
693
2283
  async function cloneRepo(tmpDir, repo = REPO) {
694
2284
  try {
695
- await exec("gh", ["repo", "clone", repo, tmpDir]);
2285
+ await exec2("gh", ["repo", "clone", repo, tmpDir]);
696
2286
  } catch (err) {
697
- const msg = err instanceof Error ? err.message : String(err);
698
- throw new Error(`Failed to clone repo: ${msg}`);
2287
+ throw new Error(`Failed to clone repo: ${getErrorMsg(err)}`);
699
2288
  }
700
2289
  }
701
2290
  async function dirExists(path) {
@@ -734,7 +2323,7 @@ async function copyClaudeMd(srcDir) {
734
2323
  }
735
2324
  async function runClaudeInit() {
736
2325
  try {
737
- await exec("claude", ["init"]);
2326
+ await exec2("claude", ["init"]);
738
2327
  return true;
739
2328
  } catch {
740
2329
  console.log(" \u26A0 claude CLI not available, skipping CLAUDE.md enrichment");
@@ -742,18 +2331,22 @@ async function runClaudeInit() {
742
2331
  }
743
2332
  }
744
2333
  async function getCommitSha(tmpDir) {
745
- const { stdout } = await exec("git", ["-C", tmpDir, "rev-parse", "HEAD"]);
2334
+ const { stdout } = await exec2("git", ["-C", tmpDir, "rev-parse", "HEAD"]);
746
2335
  return stdout.trim();
747
2336
  }
2337
+ async function readSettings() {
2338
+ const file = Bun.file(SETTINGS_PATH);
2339
+ if (await file.exists())
2340
+ return file.json();
2341
+ return {};
2342
+ }
2343
+ async function writeSettings(settings) {
2344
+ await Bun.write(SETTINGS_PATH, JSON.stringify(settings, null, 2));
2345
+ }
748
2346
  async function updateSettings(commitSha) {
749
- const settingsPath = join(CLAUDE_DIR, "settings.json");
750
- let settings = {};
751
- const file = Bun.file(settingsPath);
752
- if (await file.exists()) {
753
- settings = await file.json();
754
- }
2347
+ const settings = await readSettings();
755
2348
  settings.version = commitSha;
756
- await Bun.write(settingsPath, JSON.stringify(settings, null, 2));
2349
+ await writeSettings(settings);
757
2350
  }
758
2351
  async function cleanup(tmpDir) {
759
2352
  try {
@@ -761,17 +2354,12 @@ async function cleanup(tmpDir) {
761
2354
  } catch {}
762
2355
  }
763
2356
  async function getCurrentVersion() {
764
- const settingsPath = join(CLAUDE_DIR, "settings.json");
765
- const file = Bun.file(settingsPath);
766
- if (await file.exists()) {
767
- const settings = await file.json();
768
- return settings.version ?? null;
769
- }
770
- return null;
2357
+ const settings = await readSettings();
2358
+ return get_default(settings, "version", null);
771
2359
  }
772
2360
  async function getRemoteSha(ref, repo = REPO) {
773
2361
  const target = ref ?? "HEAD";
774
- const { stdout } = await exec("git", ["ls-remote", `https://github.com/${repo}.git`, target]);
2362
+ const { stdout } = await exec2("git", ["ls-remote", `https://github.com/${repo}.git`, target]);
775
2363
  const sha = stdout.trim().split("\t")[0];
776
2364
  if (!sha)
777
2365
  throw new Error(`Could not resolve ref: ${target}`);
@@ -790,32 +2378,24 @@ async function copySkillFolders(srcDir) {
790
2378
  }
791
2379
  }
792
2380
  async function updateSkillsVersion(commitSha) {
793
- const settingsPath = join(CLAUDE_DIR, "settings.json");
794
- let settings = {};
795
- const file = Bun.file(settingsPath);
796
- if (await file.exists()) {
797
- settings = await file.json();
798
- }
2381
+ const settings = await readSettings();
799
2382
  settings.skillsVersion = commitSha;
800
- await Bun.write(settingsPath, JSON.stringify(settings, null, 2));
2383
+ await writeSettings(settings);
801
2384
  }
802
2385
  async function getSkillsVersion() {
803
- const settingsPath = join(CLAUDE_DIR, "settings.json");
804
- const file = Bun.file(settingsPath);
805
- if (await file.exists()) {
806
- const settings = await file.json();
807
- return settings.skillsVersion ?? null;
808
- }
809
- return null;
2386
+ const settings = await readSettings();
2387
+ return get_default(settings, "skillsVersion", null);
810
2388
  }
811
2389
  async function upgradeCli() {
812
- const { version: currentVersion } = await Promise.resolve().then(() => __toESM(require_package(), 1));
813
- const { stdout: latestRaw } = await exec("npm", ["view", "vibe-cokit", "version"]);
2390
+ const { stdout: installedRaw } = await exec2("bun", ["pm", "ls", "-g"]);
2391
+ const match = installedRaw.match(/vibe-cokit@(\S+)/);
2392
+ const currentVersion = match?.[1] ?? "0.0.0";
2393
+ const { stdout: latestRaw } = await exec2("npm", ["view", "vibe-cokit", "version"]);
814
2394
  const latestVersion = latestRaw.trim();
815
2395
  if (currentVersion === latestVersion) {
816
2396
  return { upgraded: false, from: currentVersion, to: latestVersion };
817
2397
  }
818
- await exec("bun", ["install", "-g", `vibe-cokit@${latestVersion}`]);
2398
+ await exec2("bun", ["install", "-g", `vibe-cokit@${latestVersion}`]);
819
2399
  return { upgraded: true, from: currentVersion, to: latestVersion };
820
2400
  }
821
2401
 
@@ -846,9 +2426,8 @@ vibe-cokit init
846
2426
  console.log(` Claude: ./CLAUDE.md
847
2427
  `);
848
2428
  } catch (err) {
849
- const msg = err instanceof Error ? err.message : String(err);
850
2429
  console.error(`
851
- \u2717 Init failed: ${msg}
2430
+ \u2717 Init failed: ${getErrorMsg(err)}
852
2431
  `);
853
2432
  process.exit(1);
854
2433
  } finally {
@@ -858,9 +2437,9 @@ vibe-cokit init
858
2437
 
859
2438
  // src/commands/update.ts
860
2439
  import { join as join3 } from "path";
861
- import { execFile as execFile2 } from "child_process";
862
- import { promisify as promisify2 } from "util";
863
- var exec2 = promisify2(execFile2);
2440
+ import { execFile as execFile3 } from "child_process";
2441
+ import { promisify as promisify3 } from "util";
2442
+ var exec3 = promisify3(execFile3);
864
2443
  async function updateCommand(ref) {
865
2444
  try {
866
2445
  console.log(`
@@ -885,7 +2464,7 @@ vibe-cokit update
885
2464
  \u2713 vibe-cokit update complete!
886
2465
  `);
887
2466
  } catch (err) {
888
- const msg = err instanceof Error ? err.message : String(err);
2467
+ const msg = getErrorMsg(err);
889
2468
  console.error(`
890
2469
  \u2717 Update failed: ${msg}
891
2470
  `);
@@ -907,7 +2486,7 @@ async function updateConfig(ref) {
907
2486
  await cloneRepo(tmpDir);
908
2487
  if (ref) {
909
2488
  log(`Checking out ${ref}...`);
910
- await exec2("git", ["-C", tmpDir, "checkout", ref]);
2489
+ await exec3("git", ["-C", tmpDir, "checkout", ref]);
911
2490
  }
912
2491
  log("Updating config folders in ~/.claude/");
913
2492
  await copyConfigFolders(tmpDir);
@@ -934,7 +2513,7 @@ async function updateSkills(ref) {
934
2513
  await cloneRepo(tmpDir, SKILLS_REPO);
935
2514
  if (ref) {
936
2515
  log(`Checking out ${ref}...`);
937
- await exec2("git", ["-C", tmpDir, "checkout", ref]);
2516
+ await exec3("git", ["-C", tmpDir, "checkout", ref]);
938
2517
  }
939
2518
  log("Updating skills in ~/.claude/skills/");
940
2519
  await copySkillFolders(tmpDir);
@@ -949,9 +2528,9 @@ async function updateSkills(ref) {
949
2528
 
950
2529
  // src/commands/skills.ts
951
2530
  import { join as join4 } from "path";
952
- import { execFile as execFile3 } from "child_process";
953
- import { promisify as promisify3 } from "util";
954
- var exec3 = promisify3(execFile3);
2531
+ import { execFile as execFile4 } from "child_process";
2532
+ import { promisify as promisify4 } from "util";
2533
+ var exec4 = promisify4(execFile4);
955
2534
  async function skillsCommand(ref) {
956
2535
  const tmpDir = join4(TEMP_DIR, crypto.randomUUID());
957
2536
  try {
@@ -974,7 +2553,7 @@ vibe-cokit skills
974
2553
  await cloneRepo(tmpDir, SKILLS_REPO);
975
2554
  if (ref) {
976
2555
  log(`Checking out ${ref}...`);
977
- await exec3("git", ["-C", tmpDir, "checkout", ref]);
2556
+ await exec4("git", ["-C", tmpDir, "checkout", ref]);
978
2557
  }
979
2558
  log("Copying skills to ~/.claude/skills/");
980
2559
  await copySkillFolders(tmpDir);
@@ -989,9 +2568,8 @@ vibe-cokit skills
989
2568
  console.log(` Skills: ~/.claude/skills/
990
2569
  `);
991
2570
  } catch (err) {
992
- const msg = err instanceof Error ? err.message : String(err);
993
2571
  console.error(`
994
- \u2717 Skills setup failed: ${msg}
2572
+ \u2717 Skills setup failed: ${getErrorMsg(err)}
995
2573
  `);
996
2574
  process.exit(1);
997
2575
  } finally {
@@ -1000,9 +2578,8 @@ vibe-cokit skills
1000
2578
  }
1001
2579
 
1002
2580
  // src/commands/help.ts
1003
- var import__package = __toESM(require_package(), 1);
1004
2581
  var HELP_TEXT = `
1005
- vibe-cokit v${import__package.version} \u2014 A toolkit for interacting with Claude Code
2582
+ vibe-cokit v${version} \u2014 A toolkit for interacting with Claude Code
1006
2583
 
1007
2584
  USAGE
1008
2585
  vk <command> [options]
@@ -1067,12 +2644,11 @@ function helpCommand() {
1067
2644
  }
1068
2645
 
1069
2646
  // src/commands/version.ts
1070
- var import__package2 = __toESM(require_package(), 1);
1071
2647
  async function versionCommand() {
1072
2648
  const commitSha = await getCurrentVersion();
1073
2649
  const skillsSha = await getSkillsVersion();
1074
2650
  console.log(`
1075
- vibe-cokit v${import__package2.version}`);
2651
+ vibe-cokit v${version}`);
1076
2652
  if (commitSha) {
1077
2653
  console.log(` Config commit: ${commitSha.slice(0, 10)}`);
1078
2654
  } else {
@@ -1087,19 +2663,7 @@ vibe-cokit v${import__package2.version}`);
1087
2663
  }
1088
2664
 
1089
2665
  // src/commands/doctor.ts
1090
- import { execFile as execFile4 } from "child_process";
1091
- import { promisify as promisify4 } from "util";
1092
2666
  import { join as join5 } from "path";
1093
- var exec4 = promisify4(execFile4);
1094
- async function checkBin(name) {
1095
- try {
1096
- const { stdout } = await exec4(name, ["--version"]);
1097
- return stdout.trim().split(`
1098
- `)[0] ?? null;
1099
- } catch {
1100
- return null;
1101
- }
1102
- }
1103
2667
  async function doctorCommand() {
1104
2668
  console.log(`
1105
2669
  vibe-cokit doctor
@@ -1107,7 +2671,7 @@ vibe-cokit doctor
1107
2671
  let issues = 0;
1108
2672
  const tools = ["gh", "git", "claude"];
1109
2673
  for (const tool of tools) {
1110
- const ver = await checkBin(tool);
2674
+ const ver = await checkBinVersion(tool);
1111
2675
  if (ver) {
1112
2676
  console.log(` \u2713 ${tool}: ${ver}`);
1113
2677
  } else {
@@ -1156,7 +2720,7 @@ vibe-cokit doctor
1156
2720
  console.log(` \u2713 All checks passed!
1157
2721
  `);
1158
2722
  } else {
1159
- console.log(` \u26A0 ${issues} issue${issues > 1 ? "s" : ""} found
2723
+ console.log(` \u26A0 ${plural(issues, "issue")} found
1160
2724
  `);
1161
2725
  }
1162
2726
  }
@@ -1171,14 +2735,14 @@ vibe-cokit doctor fix
1171
2735
  log("Verifying prerequisites...");
1172
2736
  await verifyPrerequisites();
1173
2737
  } catch (err) {
1174
- const msg = err instanceof Error ? err.message : String(err);
1175
2738
  console.error(`
1176
- \u2717 Cannot fix: ${msg}
2739
+ \u2717 Cannot fix: ${getErrorMsg(err)}
1177
2740
  `);
1178
2741
  process.exit(1);
1179
2742
  }
1180
2743
  let fixed = 0;
1181
- const configMissing = !await dirExists(CLAUDE_DIR) || (await Promise.all(CONFIG_FOLDERS.map((f) => dirExists(join6(CLAUDE_DIR, f))))).some((exists) => !exists) || !await getCurrentVersion();
2744
+ const folderChecks = await Promise.all(CONFIG_FOLDERS.map((f) => dirExists(join6(CLAUDE_DIR, f))));
2745
+ const configMissing = !await dirExists(CLAUDE_DIR) || some_default(folderChecks, (exists) => !exists) || !await getCurrentVersion();
1182
2746
  const claudeMdPath = join6(process.cwd(), "CLAUDE.md");
1183
2747
  const claudeMdMissing = !await fileExists(claudeMdPath);
1184
2748
  if (configMissing || claudeMdMissing) {
@@ -1204,8 +2768,7 @@ vibe-cokit doctor fix
1204
2768
  log("CLAUDE.md: OK");
1205
2769
  }
1206
2770
  } catch (err) {
1207
- const msg = err instanceof Error ? err.message : String(err);
1208
- console.error(` \u2717 Config/CLAUDE.md fix failed: ${msg}`);
2771
+ console.error(` \u2717 Config/CLAUDE.md fix failed: ${getErrorMsg(err)}`);
1209
2772
  } finally {
1210
2773
  await cleanup(tmpDir);
1211
2774
  }
@@ -1225,8 +2788,7 @@ vibe-cokit doctor fix
1225
2788
  log(`Skills installed (${sha.slice(0, 8)})`);
1226
2789
  fixed++;
1227
2790
  } catch (err) {
1228
- const msg = err instanceof Error ? err.message : String(err);
1229
- console.error(` \u2717 Skills fix failed: ${msg}`);
2791
+ console.error(` \u2717 Skills fix failed: ${getErrorMsg(err)}`);
1230
2792
  } finally {
1231
2793
  await cleanup(tmpDir);
1232
2794
  }
@@ -1235,7 +2797,7 @@ vibe-cokit doctor fix
1235
2797
  }
1236
2798
  console.log();
1237
2799
  if (fixed > 0) {
1238
- console.log(` \u2713 Fixed ${fixed} issue${fixed > 1 ? "s" : ""}!
2800
+ console.log(` \u2713 Fixed ${plural(fixed, "issue")}!
1239
2801
  `);
1240
2802
  } else {
1241
2803
  console.log(` \u2713 Nothing to fix \u2014 all good!
@@ -1302,52 +2864,16 @@ var MCP_MODULES = {
1302
2864
  args: ["-y", "@modelcontextprotocol/server-puppeteer"]
1303
2865
  }
1304
2866
  };
1305
- function listModules() {
1306
- console.log(`
1307
- Available MCP modules:
1308
- `);
1309
- const maxName = Math.max(...Object.keys(MCP_MODULES).map((k) => k.length));
1310
- for (const [key, mod] of Object.entries(MCP_MODULES)) {
1311
- console.log(` ${key.padEnd(maxName + 2)}${mod.description}`);
1312
- }
1313
- console.log(`
1314
- Usage:`);
1315
- console.log(` vk mcp install <module> [module2 ...]`);
1316
- console.log(` vk mcp install --all`);
1317
- console.log(` vk mcp uninstall <module> [module2 ...]`);
1318
- console.log();
1319
- }
1320
- async function checkClaude() {
1321
- try {
1322
- await exec5("claude", ["--version"]);
1323
- return true;
1324
- } catch {
1325
- return false;
1326
- }
1327
- }
1328
- async function checkUv() {
1329
- try {
1330
- await exec5("uvx", ["--version"]);
1331
- return true;
1332
- } catch {
1333
- return false;
1334
- }
1335
- }
1336
2867
  async function addModule(mod) {
1337
2868
  const config = { command: mod.command, args: mod.args };
1338
2869
  if (mod.env) {
1339
- const envConfig = {};
1340
- for (const [key, defaultVal] of Object.entries(mod.env)) {
1341
- envConfig[key] = process.env[key] || defaultVal;
1342
- }
1343
- config.env = envConfig;
2870
+ config.env = mapValues_default(mod.env, (defaultVal, key) => process.env[key] || defaultVal);
1344
2871
  }
1345
2872
  try {
1346
2873
  await exec5("claude", ["mcp", "add-json", mod.name, JSON.stringify(config)]);
1347
2874
  return true;
1348
2875
  } catch (err) {
1349
- const msg = err instanceof Error ? err.message : String(err);
1350
- console.error(` \u2717 Failed to add ${mod.name}: ${msg}`);
2876
+ console.error(` \u2717 Failed to add ${mod.name}: ${getErrorMsg(err)}`);
1351
2877
  return false;
1352
2878
  }
1353
2879
  }
@@ -1356,7 +2882,7 @@ async function removeModule(name) {
1356
2882
  await exec5("claude", ["mcp", "remove", name]);
1357
2883
  return true;
1358
2884
  } catch (err) {
1359
- const msg = err instanceof Error ? err.message : String(err);
2885
+ const msg = getErrorMsg(err);
1360
2886
  if (msg.includes("not found") || msg.includes("does not exist")) {
1361
2887
  console.log(` \u26A0 ${name} not configured, skipping`);
1362
2888
  return true;
@@ -1383,28 +2909,20 @@ vk mcp \u2014 Manage MCP servers for Claude Code
1383
2909
  }
1384
2910
  async function mcpInstallCommand(modules, options) {
1385
2911
  if (modules.length === 0 && !options.all) {
1386
- listModules();
2912
+ listRegistry(MCP_MODULES, "Available MCP modules:", [
2913
+ "vk mcp install <module> [module2 ...]",
2914
+ "vk mcp install --all",
2915
+ "vk mcp uninstall <module> [module2 ...]"
2916
+ ]);
1387
2917
  return;
1388
2918
  }
1389
2919
  log("Checking claude CLI...");
1390
- if (!await checkClaude()) {
1391
- console.error(`
1392
- \u2717 claude CLI not found.
1393
- `);
1394
- process.exit(1);
1395
- }
1396
- const targets = options.all ? Object.keys(MCP_MODULES) : modules;
1397
- const invalid = targets.filter((m) => !MCP_MODULES[m]);
1398
- if (invalid.length > 0) {
1399
- console.error(`
1400
- \u2717 Unknown modules: ${invalid.join(", ")}`);
1401
- console.error(` Run 'vk mcp install' to see available modules.
1402
- `);
1403
- process.exit(1);
1404
- }
1405
- if (targets.some((m) => MCP_MODULES[m]?.requiresUv)) {
2920
+ await requireClaude();
2921
+ const targets = options.all ? keys_default(MCP_MODULES) : modules;
2922
+ validateTargets(targets, MCP_MODULES, "modules", "vk mcp install");
2923
+ if (some_default(targets, (m) => MCP_MODULES[m]?.requiresUv)) {
1406
2924
  log("Checking uv/uvx...");
1407
- if (!await checkUv()) {
2925
+ if (!await checkBin("uvx")) {
1408
2926
  console.error(`
1409
2927
  \u2717 uvx not found (required for serena). Install: https://docs.astral.sh/uv/
1410
2928
  `);
@@ -1413,13 +2931,11 @@ async function mcpInstallCommand(modules, options) {
1413
2931
  }
1414
2932
  for (const name of targets) {
1415
2933
  const mod = MCP_MODULES[name];
1416
- if (!mod)
2934
+ if (!mod?.envPrompts)
1417
2935
  continue;
1418
- if (mod.envPrompts) {
1419
- for (const [key, prompt] of Object.entries(mod.envPrompts)) {
1420
- if (!process.env[key] && mod.env && !mod.env[key]) {
1421
- console.log(` \u26A0 ${name}: ${prompt} not set (env: ${key})`);
1422
- }
2936
+ for (const [key, prompt] of Object.entries(mod.envPrompts)) {
2937
+ if (!process.env[key] && mod.env && !mod.env[key]) {
2938
+ console.log(` \u26A0 ${name}: ${prompt} not set (env: ${key})`);
1423
2939
  }
1424
2940
  }
1425
2941
  }
@@ -1436,15 +2952,7 @@ async function mcpInstallCommand(modules, options) {
1436
2952
  fail++;
1437
2953
  }
1438
2954
  }
1439
- console.log();
1440
- if (ok > 0)
1441
- console.log(` \u2713 Installed ${ok} MCP module${ok > 1 ? "s" : ""}`);
1442
- if (fail > 0)
1443
- console.log(` \u2717 Failed: ${fail}`);
1444
- if (ok > 0)
1445
- console.log(`
1446
- Restart Claude Code to activate.
1447
- `);
2955
+ printSummary(ok, fail, "MCP module", "Installed");
1448
2956
  }
1449
2957
  async function mcpUninstallCommand(modules) {
1450
2958
  if (modules.length === 0) {
@@ -1454,12 +2962,7 @@ Usage: vk mcp uninstall <module> [module2 ...]
1454
2962
  return;
1455
2963
  }
1456
2964
  log("Checking claude CLI...");
1457
- if (!await checkClaude()) {
1458
- console.error(`
1459
- \u2717 claude CLI not found.
1460
- `);
1461
- process.exit(1);
1462
- }
2965
+ await requireClaude();
1463
2966
  let ok = 0, fail = 0;
1464
2967
  for (const name of modules) {
1465
2968
  log(`Removing ${name}...`);
@@ -1470,15 +2973,7 @@ Usage: vk mcp uninstall <module> [module2 ...]
1470
2973
  fail++;
1471
2974
  }
1472
2975
  }
1473
- console.log();
1474
- if (ok > 0)
1475
- console.log(` \u2713 Removed ${ok} MCP module${ok > 1 ? "s" : ""}`);
1476
- if (fail > 0)
1477
- console.log(` \u2717 Failed: ${fail}`);
1478
- if (ok > 0)
1479
- console.log(`
1480
- Restart Claude Code to apply.
1481
- `);
2976
+ printSummary(ok, fail, "MCP module", "Removed");
1482
2977
  }
1483
2978
 
1484
2979
  // src/commands/plugin.ts
@@ -1557,35 +3052,12 @@ var PLUGINS = {
1557
3052
  marketplace: "claude-plugins-official"
1558
3053
  }
1559
3054
  };
1560
- function listPlugins() {
1561
- console.log(`
1562
- Available plugins:
1563
- `);
1564
- const maxName = Math.max(...Object.keys(PLUGINS).map((k) => k.length));
1565
- for (const [key, plugin] of Object.entries(PLUGINS)) {
1566
- console.log(` ${key.padEnd(maxName + 2)}${plugin.description}`);
1567
- }
1568
- console.log(`
1569
- Usage:`);
1570
- console.log(` vk plugin install <name> [name2 ...]`);
1571
- console.log(` vk plugin install --all`);
1572
- console.log(` vk plugin uninstall <name> [name2 ...]`);
1573
- console.log();
1574
- }
1575
- async function checkClaude2() {
1576
- try {
1577
- await exec6("claude", ["--version"]);
1578
- return true;
1579
- } catch {
1580
- return false;
1581
- }
1582
- }
1583
3055
  async function addPlugin(plugin) {
1584
3056
  const fullName = `${plugin.name}@${plugin.marketplace}`;
1585
3057
  try {
1586
3058
  await exec6("claude", ["plugin", "install", fullName]);
1587
3059
  } catch (err) {
1588
- const msg = err instanceof Error ? err.message : String(err);
3060
+ const msg = getErrorMsg(err);
1589
3061
  if (!msg.includes("already installed")) {
1590
3062
  console.error(` \u2717 Failed to install ${plugin.name}: ${msg}`);
1591
3063
  return false;
@@ -1594,7 +3066,7 @@ async function addPlugin(plugin) {
1594
3066
  try {
1595
3067
  await exec6("claude", ["plugin", "enable", fullName]);
1596
3068
  } catch (err) {
1597
- const msg = err instanceof Error ? err.message : String(err);
3069
+ const msg = getErrorMsg(err);
1598
3070
  if (!msg.includes("already enabled")) {
1599
3071
  console.error(` \u2717 Failed to enable ${plugin.name}: ${msg}`);
1600
3072
  return false;
@@ -1609,7 +3081,7 @@ async function removePlugin(name) {
1609
3081
  await exec6("claude", ["plugin", "uninstall", fullName]);
1610
3082
  return true;
1611
3083
  } catch (err) {
1612
- const msg = err instanceof Error ? err.message : String(err);
3084
+ const msg = getErrorMsg(err);
1613
3085
  if (msg.includes("not installed") || msg.includes("not found")) {
1614
3086
  console.log(` \u26A0 ${name} not installed, skipping`);
1615
3087
  return true;
@@ -1636,25 +3108,17 @@ vk plugin \u2014 Manage Claude Code plugins
1636
3108
  }
1637
3109
  async function pluginInstallCommand(modules, options) {
1638
3110
  if (modules.length === 0 && !options.all) {
1639
- listPlugins();
3111
+ listRegistry(PLUGINS, "Available plugins:", [
3112
+ "vk plugin install <name> [name2 ...]",
3113
+ "vk plugin install --all",
3114
+ "vk plugin uninstall <name> [name2 ...]"
3115
+ ]);
1640
3116
  return;
1641
3117
  }
1642
3118
  log("Checking claude CLI...");
1643
- if (!await checkClaude2()) {
1644
- console.error(`
1645
- \u2717 claude CLI not found.
1646
- `);
1647
- process.exit(1);
1648
- }
1649
- const targets = options.all ? Object.keys(PLUGINS) : modules;
1650
- const invalid = targets.filter((p) => !PLUGINS[p]);
1651
- if (invalid.length > 0) {
1652
- console.error(`
1653
- \u2717 Unknown plugins: ${invalid.join(", ")}`);
1654
- console.error(` Run 'vk plugin install' to see available plugins.
1655
- `);
1656
- process.exit(1);
1657
- }
3119
+ await requireClaude();
3120
+ const targets = options.all ? keys_default(PLUGINS) : modules;
3121
+ validateTargets(targets, PLUGINS, "plugins", "vk plugin install");
1658
3122
  let ok = 0, fail = 0;
1659
3123
  for (const name of targets) {
1660
3124
  const plugin = PLUGINS[name];
@@ -1668,15 +3132,7 @@ async function pluginInstallCommand(modules, options) {
1668
3132
  fail++;
1669
3133
  }
1670
3134
  }
1671
- console.log();
1672
- if (ok > 0)
1673
- console.log(` \u2713 Installed ${ok} plugin${ok > 1 ? "s" : ""}`);
1674
- if (fail > 0)
1675
- console.log(` \u2717 Failed: ${fail}`);
1676
- if (ok > 0)
1677
- console.log(`
1678
- Restart Claude Code to activate.
1679
- `);
3135
+ printSummary(ok, fail, "plugin", "Installed");
1680
3136
  }
1681
3137
  async function pluginUninstallCommand(modules) {
1682
3138
  if (modules.length === 0) {
@@ -1686,12 +3142,7 @@ Usage: vk plugin uninstall <name> [name2 ...]
1686
3142
  return;
1687
3143
  }
1688
3144
  log("Checking claude CLI...");
1689
- if (!await checkClaude2()) {
1690
- console.error(`
1691
- \u2717 claude CLI not found.
1692
- `);
1693
- process.exit(1);
1694
- }
3145
+ await requireClaude();
1695
3146
  let ok = 0, fail = 0;
1696
3147
  for (const name of modules) {
1697
3148
  log(`Removing ${name}...`);
@@ -1702,15 +3153,7 @@ Usage: vk plugin uninstall <name> [name2 ...]
1702
3153
  fail++;
1703
3154
  }
1704
3155
  }
1705
- console.log();
1706
- if (ok > 0)
1707
- console.log(` \u2713 Removed ${ok} plugin${ok > 1 ? "s" : ""}`);
1708
- if (fail > 0)
1709
- console.log(` \u2717 Failed: ${fail}`);
1710
- if (ok > 0)
1711
- console.log(`
1712
- Restart Claude Code to apply.
1713
- `);
3156
+ printSummary(ok, fail, "plugin", "Removed");
1714
3157
  }
1715
3158
 
1716
3159
  // src/cli.ts
@@ -1735,5 +3178,5 @@ cli.command("plugin [action] [...plugins]", "Manage plugins (install/uninstall)"
1735
3178
  return pluginCommand(action, plugins, options);
1736
3179
  });
1737
3180
  cli.help();
1738
- cli.version(import__package3.version);
3181
+ cli.version(version);
1739
3182
  cli.parse();