path-serializer 0.0.6 → 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/cjs/main.cjs CHANGED
@@ -1,6 +1,6 @@
1
- var __webpack_modules__ = ({
2
- "./node_modules/.pnpm/upath@2.0.1/node_modules/upath/build/code/upath.js": (function (__unused_webpack_module, exports, __webpack_require__) {
3
- /**
1
+ var __webpack_modules__ = {
2
+ "./node_modules/.pnpm/upath@2.0.1/node_modules/upath/build/code/upath.js": function(__unused_webpack_module, exports1, __webpack_require__) {
3
+ /**
4
4
  * upath http://github.com/anodynos/upath/
5
5
  *
6
6
  * A proxy to `path`, replacing `\` with `/` for all results (supports UNC paths) & new methods to normalize & join keeping leading `./` and add, change, default, trim file extensions.
@@ -8,269 +8,188 @@ var __webpack_modules__ = ({
8
8
  * Repository git://github.com/anodynos/upath
9
9
  * Copyright(c) 2020 Angelos Pikoulas <agelos.pikoulas@gmail.com>
10
10
  * License MIT
11
- */
12
-
13
- // Generated by uRequire v0.7.0-beta.33 target: 'lib' template: 'nodejs'
14
-
15
-
16
- var VERSION = '2.0.1'; // injected by urequire-rc-inject-version
17
-
18
- var extraFn, extraFunctions, isFunction, isString, isValidExt, name, path, propName, propValue, toUnix, upath, slice = [].slice, indexOf = [].indexOf || function (item) {
19
- for (var i = 0, l = this.length; i < l; i++) {
20
- if (i in this && this[i] === item)
21
- return i;
22
- }
23
- return -1;
24
- }, hasProp = {}.hasOwnProperty;
25
- path = __webpack_require__("path");
26
- isFunction = function (val) {
27
- return typeof val === "function";
28
- };
29
- isString = function (val) {
30
- return typeof val === "string" || !!val && typeof val === "object" && Object.prototype.toString.call(val) === "[object String]";
31
- };
32
- upath = exports;
33
- upath.VERSION = typeof VERSION !== "undefined" && VERSION !== null ? VERSION : "NO-VERSION";
34
- toUnix = function (p) {
35
- p = p.replace(/\\/g, "/");
36
- p = p.replace(/(?<!^)\/+/g, "/");
37
- return p;
38
- };
39
- for (propName in path) {
40
- propValue = path[propName];
41
- if (isFunction(propValue)) {
42
- upath[propName] = function (propName) {
43
- return function () {
44
- var args, result;
45
- args = 1 <= arguments.length ? slice.call(arguments, 0) : [];
46
- args = args.map(function (p) {
47
- if (isString(p)) {
48
- return toUnix(p);
49
- } else {
11
+ */ // Generated by uRequire v0.7.0-beta.33 target: 'lib' template: 'nodejs'
12
+ var VERSION = '2.0.1'; // injected by urequire-rc-inject-version
13
+ var extraFn, extraFunctions, isFunction, isString, isValidExt, name, path, propName, propValue, toUnix, upath, slice = [].slice, indexOf = [].indexOf || function(item) {
14
+ for(var i = 0, l = this.length; i < l; i++)if (i in this && this[i] === item) return i;
15
+ return -1;
16
+ }, hasProp = {}.hasOwnProperty;
17
+ path = __webpack_require__("path");
18
+ isFunction = function(val) {
19
+ return "function" == typeof val;
20
+ };
21
+ isString = function(val) {
22
+ return "string" == typeof val || !!val && "object" == typeof val && "[object String]" === Object.prototype.toString.call(val);
23
+ };
24
+ upath = exports1;
25
+ upath.VERSION = null != VERSION ? VERSION : "NO-VERSION";
26
+ toUnix = function(p) {
27
+ p = p.replace(/\\/g, "/");
28
+ p = p.replace(/(?<!^)\/+/g, "/");
50
29
  return p;
51
- }
52
- });
53
- result = path[propName].apply(path, args);
54
- if (isString(result)) {
55
- return toUnix(result);
56
- } else {
57
- return result;
30
+ };
31
+ for(propName in path){
32
+ propValue = path[propName];
33
+ if (isFunction(propValue)) upath[propName] = function(propName) {
34
+ return function() {
35
+ var args, result;
36
+ args = 1 <= arguments.length ? slice.call(arguments, 0) : [];
37
+ args = args.map(function(p) {
38
+ if (isString(p)) return toUnix(p);
39
+ return p;
40
+ });
41
+ result = path[propName].apply(path, args);
42
+ if (isString(result)) return toUnix(result);
43
+ return result;
44
+ };
45
+ }(propName);
46
+ else upath[propName] = propValue;
58
47
  }
59
- };
60
- }(propName);
61
- } else {
62
- upath[propName] = propValue;
63
- }
64
- }
65
- upath.sep = "/";
66
- extraFunctions = {
67
- toUnix: toUnix,
68
- normalizeSafe: function (p) {
69
- var result;
70
- p = toUnix(p);
71
- result = upath.normalize(p);
72
- if (p.startsWith("./") && !result.startsWith("./") && !result.startsWith("..")) {
73
- result = "./" + result;
74
- } else if (p.startsWith("//") && !result.startsWith("//")) {
75
- if (p.startsWith("//./")) {
76
- result = "//." + result;
77
- } else {
78
- result = "/" + result;
79
- }
80
- }
81
- return result;
82
- },
83
- normalizeTrim: function (p) {
84
- p = upath.normalizeSafe(p);
85
- if (p.endsWith("/")) {
86
- return p.slice(0, +(p.length - 2) + 1 || 9000000000);
87
- } else {
88
- return p;
89
- }
90
- },
91
- joinSafe: function () {
92
- var p, p0, result;
93
- p = 1 <= arguments.length ? slice.call(arguments, 0) : [];
94
- result = upath.join.apply(null, p);
95
- if (p.length > 0) {
96
- p0 = toUnix(p[0]);
97
- if (p0.startsWith("./") && !result.startsWith("./") && !result.startsWith("..")) {
98
- result = "./" + result;
99
- } else if (p0.startsWith("//") && !result.startsWith("//")) {
100
- if (p0.startsWith("//./")) {
101
- result = "//." + result;
102
- } else {
103
- result = "/" + result;
48
+ upath.sep = "/";
49
+ extraFunctions = {
50
+ toUnix: toUnix,
51
+ normalizeSafe: function(p) {
52
+ var result;
53
+ p = toUnix(p);
54
+ result = upath.normalize(p);
55
+ if (!p.startsWith("./") || result.startsWith("./") || result.startsWith("..")) {
56
+ if (p.startsWith("//") && !result.startsWith("//")) result = p.startsWith("//./") ? "//." + result : "/" + result;
57
+ } else result = "./" + result;
58
+ return result;
59
+ },
60
+ normalizeTrim: function(p) {
61
+ p = upath.normalizeSafe(p);
62
+ if (p.endsWith("/")) return p.slice(0, +(p.length - 2) + 1 || 9000000000);
63
+ return p;
64
+ },
65
+ joinSafe: function() {
66
+ var p, p0, result;
67
+ p = 1 <= arguments.length ? slice.call(arguments, 0) : [];
68
+ result = upath.join.apply(null, p);
69
+ if (p.length > 0) {
70
+ p0 = toUnix(p[0]);
71
+ if (!p0.startsWith("./") || result.startsWith("./") || result.startsWith("..")) {
72
+ if (p0.startsWith("//") && !result.startsWith("//")) result = p0.startsWith("//./") ? "//." + result : "/" + result;
73
+ } else result = "./" + result;
74
+ }
75
+ return result;
76
+ },
77
+ addExt: function(file, ext) {
78
+ if (!ext) return file;
79
+ if ("." !== ext[0]) ext = "." + ext;
80
+ return file + (file.endsWith(ext) ? "" : ext);
81
+ },
82
+ trimExt: function(filename, ignoreExts, maxSize) {
83
+ var oldExt;
84
+ if (null == maxSize) maxSize = 7;
85
+ oldExt = upath.extname(filename);
86
+ if (isValidExt(oldExt, ignoreExts, maxSize)) return filename.slice(0, +(filename.length - oldExt.length - 1) + 1 || 9000000000);
87
+ return filename;
88
+ },
89
+ removeExt: function(filename, ext) {
90
+ if (!ext) return filename;
91
+ ext = "." === ext[0] ? ext : "." + ext;
92
+ if (upath.extname(filename) === ext) return upath.trimExt(filename, [], ext.length);
93
+ return filename;
94
+ },
95
+ changeExt: function(filename, ext, ignoreExts, maxSize) {
96
+ if (null == maxSize) maxSize = 7;
97
+ return upath.trimExt(filename, ignoreExts, maxSize) + (ext ? "." === ext[0] ? ext : "." + ext : "");
98
+ },
99
+ defaultExt: function(filename, ext, ignoreExts, maxSize) {
100
+ var oldExt;
101
+ if (null == maxSize) maxSize = 7;
102
+ oldExt = upath.extname(filename);
103
+ if (isValidExt(oldExt, ignoreExts, maxSize)) return filename;
104
+ return upath.addExt(filename, ext);
105
+ }
106
+ };
107
+ isValidExt = function(ext, ignoreExts, maxSize) {
108
+ if (null == ignoreExts) ignoreExts = [];
109
+ return ext && ext.length <= maxSize && indexOf.call(ignoreExts.map(function(e) {
110
+ return (e && "." !== e[0] ? "." : "") + e;
111
+ }), ext) < 0;
112
+ };
113
+ for(name in extraFunctions)if (!!hasProp.call(extraFunctions, name)) {
114
+ extraFn = extraFunctions[name];
115
+ if (void 0 !== upath[name]) throw new Error("path." + name + " already exists.");
116
+ upath[name] = extraFn;
104
117
  }
105
- }
106
- }
107
- return result;
108
- },
109
- addExt: function (file, ext) {
110
- if (!ext) {
111
- return file;
112
- } else {
113
- if (ext[0] !== ".") {
114
- ext = "." + ext;
115
- }
116
- return file + (file.endsWith(ext) ? "" : ext);
117
- }
118
- },
119
- trimExt: function (filename, ignoreExts, maxSize) {
120
- var oldExt;
121
- if (maxSize == null) {
122
- maxSize = 7;
123
- }
124
- oldExt = upath.extname(filename);
125
- if (isValidExt(oldExt, ignoreExts, maxSize)) {
126
- return filename.slice(0, +(filename.length - oldExt.length - 1) + 1 || 9000000000);
127
- } else {
128
- return filename;
129
- }
130
- },
131
- removeExt: function (filename, ext) {
132
- if (!ext) {
133
- return filename;
134
- } else {
135
- ext = ext[0] === "." ? ext : "." + ext;
136
- if (upath.extname(filename) === ext) {
137
- return upath.trimExt(filename, [], ext.length);
138
- } else {
139
- return filename;
140
- }
141
- }
142
- },
143
- changeExt: function (filename, ext, ignoreExts, maxSize) {
144
- if (maxSize == null) {
145
- maxSize = 7;
118
+ },
119
+ path: function(module) {
120
+ "use strict";
121
+ module.exports = require("path");
146
122
  }
147
- return upath.trimExt(filename, ignoreExts, maxSize) + (!ext ? "" : ext[0] === "." ? ext : "." + ext);
148
- },
149
- defaultExt: function (filename, ext, ignoreExts, maxSize) {
150
- var oldExt;
151
- if (maxSize == null) {
152
- maxSize = 7;
153
- }
154
- oldExt = upath.extname(filename);
155
- if (isValidExt(oldExt, ignoreExts, maxSize)) {
156
- return filename;
157
- } else {
158
- return upath.addExt(filename, ext);
159
- }
160
- }
161
123
  };
162
- isValidExt = function (ext, ignoreExts, maxSize) {
163
- if (ignoreExts == null) {
164
- ignoreExts = [];
165
- }
166
- return ext && ext.length <= maxSize && indexOf.call(ignoreExts.map(function (e) {
167
- return (e && e[0] !== "." ? "." : "") + e;
168
- }), ext) < 0;
169
- };
170
- for (name in extraFunctions) {
171
- if (!hasProp.call(extraFunctions, name))
172
- continue;
173
- extraFn = extraFunctions[name];
174
- if (upath[name] !== void 0) {
175
- throw new Error("path." + name + " already exists.");
176
- } else {
177
- upath[name] = extraFn;
178
- }
179
- }
180
-
181
- ;
182
-
183
- }),
184
- "path": (function (module) {
185
- "use strict";
186
- module.exports = require("path");
187
-
188
- }),
189
-
190
- });
191
- /************************************************************************/
192
- // The module cache
124
+ /************************************************************************/ // The module cache
193
125
  var __webpack_module_cache__ = {};
194
-
195
126
  // The require function
196
127
  function __webpack_require__(moduleId) {
197
-
198
- // Check if module is in cache
199
- var cachedModule = __webpack_module_cache__[moduleId];
200
- if (cachedModule !== undefined) {
201
- return cachedModule.exports;
202
- }
203
- // Create a new module (and put it into the cache)
204
- var module = (__webpack_module_cache__[moduleId] = {
205
- exports: {}
206
- });
207
- // Execute the module function
208
- __webpack_modules__[moduleId](module, module.exports, __webpack_require__);
209
-
210
- // Return the exports of the module
211
- return module.exports;
212
-
128
+ // Check if module is in cache
129
+ var cachedModule = __webpack_module_cache__[moduleId];
130
+ if (void 0 !== cachedModule) return cachedModule.exports;
131
+ // Create a new module (and put it into the cache)
132
+ var module = __webpack_module_cache__[moduleId] = {
133
+ exports: {}
134
+ };
135
+ // Execute the module function
136
+ __webpack_modules__[moduleId](module, module.exports, __webpack_require__);
137
+ // Return the exports of the module
138
+ return module.exports;
213
139
  }
214
-
215
- /************************************************************************/
216
- // webpack/runtime/compat_get_default_export
217
- (() => {
218
- // getDefaultExport function for compatibility with non-harmony modules
219
- __webpack_require__.n = function (module) {
220
- var getter = module && module.__esModule ?
221
- function () { return module['default']; } :
222
- function () { return module; };
223
- __webpack_require__.d(getter, { a: getter });
224
- return getter;
225
- };
226
-
227
-
228
-
229
-
140
+ /************************************************************************/ // webpack/runtime/compat_get_default_export
141
+ (()=>{
142
+ // getDefaultExport function for compatibility with non-harmony modules
143
+ __webpack_require__.n = function(module) {
144
+ var getter = module && module.__esModule ? function() {
145
+ return module['default'];
146
+ } : function() {
147
+ return module;
148
+ };
149
+ __webpack_require__.d(getter, {
150
+ a: getter
151
+ });
152
+ return getter;
153
+ };
230
154
  })();
231
155
  // webpack/runtime/define_property_getters
232
- (() => {
233
- __webpack_require__.d = function(exports, definition) {
234
- for(var key in definition) {
235
- if(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {
236
- Object.defineProperty(exports, key, { enumerable: true, get: definition[key] });
237
- }
238
- }
239
- };
156
+ (()=>{
157
+ __webpack_require__.d = function(exports1, definition) {
158
+ for(var key in definition)if (__webpack_require__.o(definition, key) && !__webpack_require__.o(exports1, key)) Object.defineProperty(exports1, key, {
159
+ enumerable: true,
160
+ get: definition[key]
161
+ });
162
+ };
240
163
  })();
241
164
  // webpack/runtime/has_own_property
242
- (() => {
243
- __webpack_require__.o = function (obj, prop) {
244
- return Object.prototype.hasOwnProperty.call(obj, prop);
245
- };
246
-
165
+ (()=>{
166
+ __webpack_require__.o = function(obj, prop) {
167
+ return Object.prototype.hasOwnProperty.call(obj, prop);
168
+ };
247
169
  })();
248
170
  // webpack/runtime/make_namespace_object
249
- (() => {
250
- // define __esModule on exports
251
- __webpack_require__.r = function(exports) {
252
- if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {
253
- Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
254
- }
255
- Object.defineProperty(exports, '__esModule', { value: true });
256
- };
257
-
171
+ (()=>{
172
+ // define __esModule on exports
173
+ __webpack_require__.r = function(exports1) {
174
+ if ('undefined' != typeof Symbol && Symbol.toStringTag) Object.defineProperty(exports1, Symbol.toStringTag, {
175
+ value: 'Module'
176
+ });
177
+ Object.defineProperty(exports1, '__esModule', {
178
+ value: true
179
+ });
180
+ };
258
181
  })();
259
- /************************************************************************/
260
- var __webpack_exports__ = {};
182
+ /************************************************************************/ var __webpack_exports__ = {};
261
183
  // This entry need to be wrapped in an IIFE because it need to be in strict mode.
262
- (() => {
263
- "use strict";
264
- // ESM COMPAT FLAG
265
- __webpack_require__.r(__webpack_exports__);
266
-
267
- // EXPORTS
268
- __webpack_require__.d(__webpack_exports__, {
269
- createSnapshotSerializer: () => (/* reexport */ createSnapshotSerializer)
270
- });
271
-
272
- ;// CONCATENATED MODULE: ./node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_arrayReduce.js
273
- /**
184
+ (()=>{
185
+ "use strict";
186
+ // ESM COMPAT FLAG
187
+ __webpack_require__.r(__webpack_exports__);
188
+ // EXPORTS
189
+ __webpack_require__.d(__webpack_exports__, {
190
+ createSnapshotSerializer: ()=>/* reexport */ createSnapshotSerializer
191
+ });
192
+ /**
274
193
  * A specialized version of `_.reduce` for arrays without support for
275
194
  * iteratee shorthands.
276
195
  *
@@ -281,138 +200,236 @@ __webpack_require__.d(__webpack_exports__, {
281
200
  * @param {boolean} [initAccum] Specify using the first element of `array` as
282
201
  * the initial value.
283
202
  * @returns {*} Returns the accumulated value.
284
- */
285
- function arrayReduce(array, iteratee, accumulator, initAccum) {
286
- var index = -1,
287
- length = array == null ? 0 : array.length;
288
-
289
- if (initAccum && length) {
290
- accumulator = array[++index];
291
- }
292
- while (++index < length) {
293
- accumulator = iteratee(accumulator, array[index], index, array);
294
- }
295
- return accumulator;
296
- }
297
-
298
- /* harmony default export */ const _arrayReduce = (arrayReduce);
299
-
300
- ;// CONCATENATED MODULE: ./node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_basePropertyOf.js
301
- /**
203
+ */ function arrayReduce(array, iteratee, accumulator, initAccum) {
204
+ var index = -1, length = null == array ? 0 : array.length;
205
+ if (initAccum && length) accumulator = array[++index];
206
+ while(++index < length)accumulator = iteratee(accumulator, array[index], index, array);
207
+ return accumulator;
208
+ }
209
+ /* harmony default export */ const _arrayReduce = arrayReduce;
210
+ /**
302
211
  * The base implementation of `_.propertyOf` without support for deep paths.
303
212
  *
304
213
  * @private
305
214
  * @param {Object} object The object to query.
306
215
  * @returns {Function} Returns the new accessor function.
307
- */
308
- function basePropertyOf(object) {
309
- return function(key) {
310
- return object == null ? undefined : object[key];
311
- };
312
- }
313
-
314
- /* harmony default export */ const _basePropertyOf = (basePropertyOf);
315
-
316
- ;// CONCATENATED MODULE: ./node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_deburrLetter.js
317
-
318
-
319
- /** Used to map Latin Unicode letters to basic Latin letters. */
320
- var deburredLetters = {
321
- // Latin-1 Supplement block.
322
- '\xc0': 'A', '\xc1': 'A', '\xc2': 'A', '\xc3': 'A', '\xc4': 'A', '\xc5': 'A',
323
- '\xe0': 'a', '\xe1': 'a', '\xe2': 'a', '\xe3': 'a', '\xe4': 'a', '\xe5': 'a',
324
- '\xc7': 'C', '\xe7': 'c',
325
- '\xd0': 'D', '\xf0': 'd',
326
- '\xc8': 'E', '\xc9': 'E', '\xca': 'E', '\xcb': 'E',
327
- '\xe8': 'e', '\xe9': 'e', '\xea': 'e', '\xeb': 'e',
328
- '\xcc': 'I', '\xcd': 'I', '\xce': 'I', '\xcf': 'I',
329
- '\xec': 'i', '\xed': 'i', '\xee': 'i', '\xef': 'i',
330
- '\xd1': 'N', '\xf1': 'n',
331
- '\xd2': 'O', '\xd3': 'O', '\xd4': 'O', '\xd5': 'O', '\xd6': 'O', '\xd8': 'O',
332
- '\xf2': 'o', '\xf3': 'o', '\xf4': 'o', '\xf5': 'o', '\xf6': 'o', '\xf8': 'o',
333
- '\xd9': 'U', '\xda': 'U', '\xdb': 'U', '\xdc': 'U',
334
- '\xf9': 'u', '\xfa': 'u', '\xfb': 'u', '\xfc': 'u',
335
- '\xdd': 'Y', '\xfd': 'y', '\xff': 'y',
336
- '\xc6': 'Ae', '\xe6': 'ae',
337
- '\xde': 'Th', '\xfe': 'th',
338
- '\xdf': 'ss',
339
- // Latin Extended-A block.
340
- '\u0100': 'A', '\u0102': 'A', '\u0104': 'A',
341
- '\u0101': 'a', '\u0103': 'a', '\u0105': 'a',
342
- '\u0106': 'C', '\u0108': 'C', '\u010a': 'C', '\u010c': 'C',
343
- '\u0107': 'c', '\u0109': 'c', '\u010b': 'c', '\u010d': 'c',
344
- '\u010e': 'D', '\u0110': 'D', '\u010f': 'd', '\u0111': 'd',
345
- '\u0112': 'E', '\u0114': 'E', '\u0116': 'E', '\u0118': 'E', '\u011a': 'E',
346
- '\u0113': 'e', '\u0115': 'e', '\u0117': 'e', '\u0119': 'e', '\u011b': 'e',
347
- '\u011c': 'G', '\u011e': 'G', '\u0120': 'G', '\u0122': 'G',
348
- '\u011d': 'g', '\u011f': 'g', '\u0121': 'g', '\u0123': 'g',
349
- '\u0124': 'H', '\u0126': 'H', '\u0125': 'h', '\u0127': 'h',
350
- '\u0128': 'I', '\u012a': 'I', '\u012c': 'I', '\u012e': 'I', '\u0130': 'I',
351
- '\u0129': 'i', '\u012b': 'i', '\u012d': 'i', '\u012f': 'i', '\u0131': 'i',
352
- '\u0134': 'J', '\u0135': 'j',
353
- '\u0136': 'K', '\u0137': 'k', '\u0138': 'k',
354
- '\u0139': 'L', '\u013b': 'L', '\u013d': 'L', '\u013f': 'L', '\u0141': 'L',
355
- '\u013a': 'l', '\u013c': 'l', '\u013e': 'l', '\u0140': 'l', '\u0142': 'l',
356
- '\u0143': 'N', '\u0145': 'N', '\u0147': 'N', '\u014a': 'N',
357
- '\u0144': 'n', '\u0146': 'n', '\u0148': 'n', '\u014b': 'n',
358
- '\u014c': 'O', '\u014e': 'O', '\u0150': 'O',
359
- '\u014d': 'o', '\u014f': 'o', '\u0151': 'o',
360
- '\u0154': 'R', '\u0156': 'R', '\u0158': 'R',
361
- '\u0155': 'r', '\u0157': 'r', '\u0159': 'r',
362
- '\u015a': 'S', '\u015c': 'S', '\u015e': 'S', '\u0160': 'S',
363
- '\u015b': 's', '\u015d': 's', '\u015f': 's', '\u0161': 's',
364
- '\u0162': 'T', '\u0164': 'T', '\u0166': 'T',
365
- '\u0163': 't', '\u0165': 't', '\u0167': 't',
366
- '\u0168': 'U', '\u016a': 'U', '\u016c': 'U', '\u016e': 'U', '\u0170': 'U', '\u0172': 'U',
367
- '\u0169': 'u', '\u016b': 'u', '\u016d': 'u', '\u016f': 'u', '\u0171': 'u', '\u0173': 'u',
368
- '\u0174': 'W', '\u0175': 'w',
369
- '\u0176': 'Y', '\u0177': 'y', '\u0178': 'Y',
370
- '\u0179': 'Z', '\u017b': 'Z', '\u017d': 'Z',
371
- '\u017a': 'z', '\u017c': 'z', '\u017e': 'z',
372
- '\u0132': 'IJ', '\u0133': 'ij',
373
- '\u0152': 'Oe', '\u0153': 'oe',
374
- '\u0149': "'n", '\u017f': 's'
375
- };
376
-
377
- /**
216
+ */ function basePropertyOf(object) {
217
+ return function(key) {
218
+ return null == object ? void 0 : object[key];
219
+ };
220
+ }
221
+ /* harmony default export */ const _basePropertyOf = basePropertyOf;
222
+ /** Used to map Latin Unicode letters to basic Latin letters. */ var deburredLetters = {
223
+ // Latin-1 Supplement block.
224
+ À: 'A',
225
+ Á: 'A',
226
+ Â: 'A',
227
+ Ã: 'A',
228
+ Ä: 'A',
229
+ Å: 'A',
230
+ à: 'a',
231
+ á: 'a',
232
+ â: 'a',
233
+ ã: 'a',
234
+ ä: 'a',
235
+ å: 'a',
236
+ Ç: 'C',
237
+ ç: 'c',
238
+ Ð: 'D',
239
+ ð: 'd',
240
+ È: 'E',
241
+ É: 'E',
242
+ Ê: 'E',
243
+ Ë: 'E',
244
+ è: 'e',
245
+ é: 'e',
246
+ ê: 'e',
247
+ ë: 'e',
248
+ Ì: 'I',
249
+ Í: 'I',
250
+ Î: 'I',
251
+ Ï: 'I',
252
+ ì: 'i',
253
+ í: 'i',
254
+ î: 'i',
255
+ ï: 'i',
256
+ Ñ: 'N',
257
+ ñ: 'n',
258
+ Ò: 'O',
259
+ Ó: 'O',
260
+ Ô: 'O',
261
+ Õ: 'O',
262
+ Ö: 'O',
263
+ Ø: 'O',
264
+ ò: 'o',
265
+ ó: 'o',
266
+ ô: 'o',
267
+ õ: 'o',
268
+ ö: 'o',
269
+ ø: 'o',
270
+ Ù: 'U',
271
+ Ú: 'U',
272
+ Û: 'U',
273
+ Ü: 'U',
274
+ ù: 'u',
275
+ ú: 'u',
276
+ û: 'u',
277
+ ü: 'u',
278
+ Ý: 'Y',
279
+ ý: 'y',
280
+ ÿ: 'y',
281
+ Æ: 'Ae',
282
+ æ: 'ae',
283
+ Þ: 'Th',
284
+ þ: 'th',
285
+ ß: 'ss',
286
+ // Latin Extended-A block.
287
+ Ā: 'A',
288
+ Ă: 'A',
289
+ Ą: 'A',
290
+ ā: 'a',
291
+ ă: 'a',
292
+ ą: 'a',
293
+ Ć: 'C',
294
+ Ĉ: 'C',
295
+ Ċ: 'C',
296
+ Č: 'C',
297
+ ć: 'c',
298
+ ĉ: 'c',
299
+ ċ: 'c',
300
+ č: 'c',
301
+ Ď: 'D',
302
+ Đ: 'D',
303
+ ď: 'd',
304
+ đ: 'd',
305
+ Ē: 'E',
306
+ Ĕ: 'E',
307
+ Ė: 'E',
308
+ Ę: 'E',
309
+ Ě: 'E',
310
+ ē: 'e',
311
+ ĕ: 'e',
312
+ ė: 'e',
313
+ ę: 'e',
314
+ ě: 'e',
315
+ Ĝ: 'G',
316
+ Ğ: 'G',
317
+ Ġ: 'G',
318
+ Ģ: 'G',
319
+ ĝ: 'g',
320
+ ğ: 'g',
321
+ ġ: 'g',
322
+ ģ: 'g',
323
+ Ĥ: 'H',
324
+ Ħ: 'H',
325
+ ĥ: 'h',
326
+ ħ: 'h',
327
+ Ĩ: 'I',
328
+ Ī: 'I',
329
+ Ĭ: 'I',
330
+ Į: 'I',
331
+ İ: 'I',
332
+ ĩ: 'i',
333
+ ī: 'i',
334
+ ĭ: 'i',
335
+ į: 'i',
336
+ ı: 'i',
337
+ Ĵ: 'J',
338
+ ĵ: 'j',
339
+ Ķ: 'K',
340
+ ķ: 'k',
341
+ ĸ: 'k',
342
+ Ĺ: 'L',
343
+ Ļ: 'L',
344
+ Ľ: 'L',
345
+ Ŀ: 'L',
346
+ Ł: 'L',
347
+ ĺ: 'l',
348
+ ļ: 'l',
349
+ ľ: 'l',
350
+ ŀ: 'l',
351
+ ł: 'l',
352
+ Ń: 'N',
353
+ Ņ: 'N',
354
+ Ň: 'N',
355
+ Ŋ: 'N',
356
+ ń: 'n',
357
+ ņ: 'n',
358
+ ň: 'n',
359
+ ŋ: 'n',
360
+ Ō: 'O',
361
+ Ŏ: 'O',
362
+ Ő: 'O',
363
+ ō: 'o',
364
+ ŏ: 'o',
365
+ ő: 'o',
366
+ Ŕ: 'R',
367
+ Ŗ: 'R',
368
+ Ř: 'R',
369
+ ŕ: 'r',
370
+ ŗ: 'r',
371
+ ř: 'r',
372
+ Ś: 'S',
373
+ Ŝ: 'S',
374
+ Ş: 'S',
375
+ Š: 'S',
376
+ ś: 's',
377
+ ŝ: 's',
378
+ ş: 's',
379
+ š: 's',
380
+ Ţ: 'T',
381
+ Ť: 'T',
382
+ Ŧ: 'T',
383
+ ţ: 't',
384
+ ť: 't',
385
+ ŧ: 't',
386
+ Ũ: 'U',
387
+ Ū: 'U',
388
+ Ŭ: 'U',
389
+ Ů: 'U',
390
+ Ű: 'U',
391
+ Ų: 'U',
392
+ ũ: 'u',
393
+ ū: 'u',
394
+ ŭ: 'u',
395
+ ů: 'u',
396
+ ű: 'u',
397
+ ų: 'u',
398
+ Ŵ: 'W',
399
+ ŵ: 'w',
400
+ Ŷ: 'Y',
401
+ ŷ: 'y',
402
+ Ÿ: 'Y',
403
+ Ź: 'Z',
404
+ Ż: 'Z',
405
+ Ž: 'Z',
406
+ ź: 'z',
407
+ ż: 'z',
408
+ ž: 'z',
409
+ IJ: 'IJ',
410
+ ij: 'ij',
411
+ Œ: 'Oe',
412
+ œ: 'oe',
413
+ ʼn: "'n",
414
+ ſ: 's'
415
+ };
416
+ /**
378
417
  * Used by `_.deburr` to convert Latin-1 Supplement and Latin Extended-A
379
418
  * letters to basic Latin letters.
380
419
  *
381
420
  * @private
382
421
  * @param {string} letter The matched letter to deburr.
383
422
  * @returns {string} Returns the deburred letter.
384
- */
385
- var deburrLetter = _basePropertyOf(deburredLetters);
386
-
387
- /* harmony default export */ const _deburrLetter = (deburrLetter);
388
-
389
- ;// CONCATENATED MODULE: ./node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_freeGlobal.js
390
- /** Detect free variable `global` from Node.js. */
391
- var freeGlobal = typeof global == 'object' && global && global.Object === Object && global;
392
-
393
- /* harmony default export */ const _freeGlobal = (freeGlobal);
394
-
395
- ;// CONCATENATED MODULE: ./node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_root.js
396
-
397
-
398
- /** Detect free variable `self`. */
399
- var freeSelf = typeof self == 'object' && self && self.Object === Object && self;
400
-
401
- /** Used as a reference to the global object. */
402
- var root = _freeGlobal || freeSelf || Function('return this')();
403
-
404
- /* harmony default export */ const _root = (root);
405
-
406
- ;// CONCATENATED MODULE: ./node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_Symbol.js
407
-
408
-
409
- /** Built-in value references. */
410
- var Symbol = _root.Symbol;
411
-
412
- /* harmony default export */ const _Symbol = (Symbol);
413
-
414
- ;// CONCATENATED MODULE: ./node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_arrayMap.js
415
- /**
423
+ */ var deburrLetter = _basePropertyOf(deburredLetters);
424
+ /* harmony default export */ const _deburrLetter = deburrLetter;
425
+ /** Detect free variable `global` from Node.js. */ var freeGlobal = 'object' == typeof global && global && global.Object === Object && global;
426
+ /* harmony default export */ const _freeGlobal = freeGlobal;
427
+ /** Detect free variable `self`. */ var freeSelf = 'object' == typeof self && self && self.Object === Object && self;
428
+ /** Used as a reference to the global object. */ var root = _freeGlobal || freeSelf || Function('return this')();
429
+ /* harmony default export */ const _root = root;
430
+ /** Built-in value references. */ var Symbol1 = _root.Symbol;
431
+ /* harmony default export */ const _Symbol = Symbol1;
432
+ /**
416
433
  * A specialized version of `_.map` for arrays without support for iteratee
417
434
  * shorthands.
418
435
  *
@@ -420,22 +437,13 @@ var Symbol = _root.Symbol;
420
437
  * @param {Array} [array] The array to iterate over.
421
438
  * @param {Function} iteratee The function invoked per iteration.
422
439
  * @returns {Array} Returns the new mapped array.
423
- */
424
- function arrayMap(array, iteratee) {
425
- var index = -1,
426
- length = array == null ? 0 : array.length,
427
- result = Array(length);
428
-
429
- while (++index < length) {
430
- result[index] = iteratee(array[index], index, array);
431
- }
432
- return result;
433
- }
434
-
435
- /* harmony default export */ const _arrayMap = (arrayMap);
436
-
437
- ;// CONCATENATED MODULE: ./node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/isArray.js
438
- /**
440
+ */ function arrayMap(array, iteratee) {
441
+ var index = -1, length = null == array ? 0 : array.length, result = Array(length);
442
+ while(++index < length)result[index] = iteratee(array[index], index, array);
443
+ return result;
444
+ }
445
+ /* harmony default export */ const _arrayMap = arrayMap;
446
+ /**
439
447
  * Checks if `value` is classified as an `Array` object.
440
448
  *
441
449
  * @static
@@ -457,115 +465,66 @@ function arrayMap(array, iteratee) {
457
465
  *
458
466
  * _.isArray(_.noop);
459
467
  * // => false
460
- */
461
- var isArray_isArray = Array.isArray;
462
-
463
- /* harmony default export */ const isArray = (isArray_isArray);
464
-
465
- ;// CONCATENATED MODULE: ./node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_getRawTag.js
466
-
467
-
468
- /** Used for built-in method references. */
469
- var objectProto = Object.prototype;
470
-
471
- /** Used to check objects for own properties. */
472
- var _getRawTag_hasOwnProperty = objectProto.hasOwnProperty;
473
-
474
- /**
468
+ */ var isArray_isArray = Array.isArray;
469
+ /* harmony default export */ const isArray = isArray_isArray;
470
+ /** Used for built-in method references. */ var objectProto = Object.prototype;
471
+ /** Used to check objects for own properties. */ var _getRawTag_hasOwnProperty = objectProto.hasOwnProperty;
472
+ /**
475
473
  * Used to resolve the
476
474
  * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)
477
475
  * of values.
478
- */
479
- var nativeObjectToString = objectProto.toString;
480
-
481
- /** Built-in value references. */
482
- var symToStringTag = _Symbol ? _Symbol.toStringTag : undefined;
483
-
484
- /**
476
+ */ var nativeObjectToString = objectProto.toString;
477
+ /** Built-in value references. */ var symToStringTag = _Symbol ? _Symbol.toStringTag : void 0;
478
+ /**
485
479
  * A specialized version of `baseGetTag` which ignores `Symbol.toStringTag` values.
486
480
  *
487
481
  * @private
488
482
  * @param {*} value The value to query.
489
483
  * @returns {string} Returns the raw `toStringTag`.
490
- */
491
- function getRawTag(value) {
492
- var isOwn = _getRawTag_hasOwnProperty.call(value, symToStringTag),
493
- tag = value[symToStringTag];
494
-
495
- try {
496
- value[symToStringTag] = undefined;
497
- var unmasked = true;
498
- } catch (e) {}
499
-
500
- var result = nativeObjectToString.call(value);
501
- if (unmasked) {
502
- if (isOwn) {
503
- value[symToStringTag] = tag;
504
- } else {
505
- delete value[symToStringTag];
484
+ */ function getRawTag(value) {
485
+ var isOwn = _getRawTag_hasOwnProperty.call(value, symToStringTag), tag = value[symToStringTag];
486
+ try {
487
+ value[symToStringTag] = void 0;
488
+ var unmasked = true;
489
+ } catch (e) {}
490
+ var result = nativeObjectToString.call(value);
491
+ if (unmasked) {
492
+ if (isOwn) value[symToStringTag] = tag;
493
+ else delete value[symToStringTag];
494
+ }
495
+ return result;
506
496
  }
507
- }
508
- return result;
509
- }
510
-
511
- /* harmony default export */ const _getRawTag = (getRawTag);
512
-
513
- ;// CONCATENATED MODULE: ./node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_objectToString.js
514
- /** Used for built-in method references. */
515
- var _objectToString_objectProto = Object.prototype;
516
-
517
- /**
497
+ /* harmony default export */ const _getRawTag = getRawTag;
498
+ /** Used for built-in method references. */ var _objectToString_objectProto = Object.prototype;
499
+ /**
518
500
  * Used to resolve the
519
501
  * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)
520
502
  * of values.
521
- */
522
- var _objectToString_nativeObjectToString = _objectToString_objectProto.toString;
523
-
524
- /**
503
+ */ var _objectToString_nativeObjectToString = _objectToString_objectProto.toString;
504
+ /**
525
505
  * Converts `value` to a string using `Object.prototype.toString`.
526
506
  *
527
507
  * @private
528
508
  * @param {*} value The value to convert.
529
509
  * @returns {string} Returns the converted string.
530
- */
531
- function objectToString(value) {
532
- return _objectToString_nativeObjectToString.call(value);
533
- }
534
-
535
- /* harmony default export */ const _objectToString = (objectToString);
536
-
537
- ;// CONCATENATED MODULE: ./node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_baseGetTag.js
538
-
539
-
540
-
541
-
542
- /** `Object#toString` result references. */
543
- var nullTag = '[object Null]',
544
- undefinedTag = '[object Undefined]';
545
-
546
- /** Built-in value references. */
547
- var _baseGetTag_symToStringTag = _Symbol ? _Symbol.toStringTag : undefined;
548
-
549
- /**
510
+ */ function objectToString(value) {
511
+ return _objectToString_nativeObjectToString.call(value);
512
+ }
513
+ /* harmony default export */ const _objectToString = objectToString;
514
+ /** `Object#toString` result references. */ var nullTag = '[object Null]', undefinedTag = '[object Undefined]';
515
+ /** Built-in value references. */ var _baseGetTag_symToStringTag = _Symbol ? _Symbol.toStringTag : void 0;
516
+ /**
550
517
  * The base implementation of `getTag` without fallbacks for buggy environments.
551
518
  *
552
519
  * @private
553
520
  * @param {*} value The value to query.
554
521
  * @returns {string} Returns the `toStringTag`.
555
- */
556
- function baseGetTag(value) {
557
- if (value == null) {
558
- return value === undefined ? undefinedTag : nullTag;
559
- }
560
- return (_baseGetTag_symToStringTag && _baseGetTag_symToStringTag in Object(value))
561
- ? _getRawTag(value)
562
- : _objectToString(value);
563
- }
564
-
565
- /* harmony default export */ const _baseGetTag = (baseGetTag);
566
-
567
- ;// CONCATENATED MODULE: ./node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/isObjectLike.js
568
- /**
522
+ */ function baseGetTag(value) {
523
+ if (null == value) return void 0 === value ? undefinedTag : nullTag;
524
+ return _baseGetTag_symToStringTag && _baseGetTag_symToStringTag in Object(value) ? _getRawTag(value) : _objectToString(value);
525
+ }
526
+ /* harmony default export */ const _baseGetTag = baseGetTag;
527
+ /**
569
528
  * Checks if `value` is object-like. A value is object-like if it's not `null`
570
529
  * and has a `typeof` result of "object".
571
530
  *
@@ -588,21 +547,12 @@ function baseGetTag(value) {
588
547
  *
589
548
  * _.isObjectLike(null);
590
549
  * // => false
591
- */
592
- function isObjectLike(value) {
593
- return value != null && typeof value == 'object';
594
- }
595
-
596
- /* harmony default export */ const lodash_es_isObjectLike = (isObjectLike);
597
-
598
- ;// CONCATENATED MODULE: ./node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/isSymbol.js
599
-
600
-
601
-
602
- /** `Object#toString` result references. */
603
- var symbolTag = '[object Symbol]';
604
-
605
- /**
550
+ */ function isObjectLike(value) {
551
+ return null != value && 'object' == typeof value;
552
+ }
553
+ /* harmony default export */ const lodash_es_isObjectLike = isObjectLike;
554
+ /** `Object#toString` result references. */ var symbolTag = '[object Symbol]';
555
+ /**
606
556
  * Checks if `value` is classified as a `Symbol` primitive or object.
607
557
  *
608
558
  * @static
@@ -618,57 +568,30 @@ var symbolTag = '[object Symbol]';
618
568
  *
619
569
  * _.isSymbol('abc');
620
570
  * // => false
621
- */
622
- function isSymbol_isSymbol(value) {
623
- return typeof value == 'symbol' ||
624
- (lodash_es_isObjectLike(value) && _baseGetTag(value) == symbolTag);
625
- }
626
-
627
- /* harmony default export */ const isSymbol = (isSymbol_isSymbol);
628
-
629
- ;// CONCATENATED MODULE: ./node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_baseToString.js
630
-
631
-
632
-
633
-
634
-
635
- /** Used as references for various `Number` constants. */
636
- var INFINITY = 1 / 0;
637
-
638
- /** Used to convert symbols to primitives and strings. */
639
- var symbolProto = _Symbol ? _Symbol.prototype : undefined,
640
- symbolToString = symbolProto ? symbolProto.toString : undefined;
641
-
642
- /**
571
+ */ function isSymbol_isSymbol(value) {
572
+ return 'symbol' == typeof value || lodash_es_isObjectLike(value) && _baseGetTag(value) == symbolTag;
573
+ }
574
+ /* harmony default export */ const isSymbol = isSymbol_isSymbol;
575
+ /** Used as references for various `Number` constants. */ var INFINITY = 1 / 0;
576
+ /** Used to convert symbols to primitives and strings. */ var symbolProto = _Symbol ? _Symbol.prototype : void 0, symbolToString = symbolProto ? symbolProto.toString : void 0;
577
+ /**
643
578
  * The base implementation of `_.toString` which doesn't convert nullish
644
579
  * values to empty strings.
645
580
  *
646
581
  * @private
647
582
  * @param {*} value The value to process.
648
583
  * @returns {string} Returns the string.
649
- */
650
- function baseToString(value) {
651
- // Exit early for strings to avoid a performance hit in some environments.
652
- if (typeof value == 'string') {
653
- return value;
654
- }
655
- if (isArray(value)) {
656
- // Recursively convert values (susceptible to call stack limits).
657
- return _arrayMap(value, baseToString) + '';
658
- }
659
- if (isSymbol(value)) {
660
- return symbolToString ? symbolToString.call(value) : '';
661
- }
662
- var result = (value + '');
663
- return (result == '0' && (1 / value) == -INFINITY) ? '-0' : result;
664
- }
665
-
666
- /* harmony default export */ const _baseToString = (baseToString);
667
-
668
- ;// CONCATENATED MODULE: ./node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/toString.js
669
-
670
-
671
- /**
584
+ */ function baseToString(value) {
585
+ // Exit early for strings to avoid a performance hit in some environments.
586
+ if ('string' == typeof value) return value;
587
+ if (isArray(value)) // Recursively convert values (susceptible to call stack limits).
588
+ return _arrayMap(value, baseToString) + '';
589
+ if (isSymbol(value)) return symbolToString ? symbolToString.call(value) : '';
590
+ var result = value + '';
591
+ return '0' == result && 1 / value == -INFINITY ? '-0' : result;
592
+ }
593
+ /* harmony default export */ const _baseToString = baseToString;
594
+ /**
672
595
  * Converts `value` to a string. An empty string is returned for `null`
673
596
  * and `undefined` values. The sign of `-0` is preserved.
674
597
  *
@@ -688,36 +611,18 @@ function baseToString(value) {
688
611
  *
689
612
  * _.toString([1, 2, 3]);
690
613
  * // => '1,2,3'
691
- */
692
- function toString_toString(value) {
693
- return value == null ? '' : _baseToString(value);
694
- }
695
-
696
- /* harmony default export */ const lodash_es_toString = (toString_toString);
697
-
698
- ;// CONCATENATED MODULE: ./node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/deburr.js
699
-
700
-
701
-
702
- /** Used to match Latin Unicode letters (excluding mathematical operators). */
703
- var reLatin = /[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g;
704
-
705
- /** Used to compose unicode character classes. */
706
- var rsComboMarksRange = '\\u0300-\\u036f',
707
- reComboHalfMarksRange = '\\ufe20-\\ufe2f',
708
- rsComboSymbolsRange = '\\u20d0-\\u20ff',
709
- rsComboRange = rsComboMarksRange + reComboHalfMarksRange + rsComboSymbolsRange;
710
-
711
- /** Used to compose unicode capture groups. */
712
- var rsCombo = '[' + rsComboRange + ']';
713
-
714
- /**
614
+ */ function toString_toString(value) {
615
+ return null == value ? '' : _baseToString(value);
616
+ }
617
+ /* harmony default export */ const lodash_es_toString = toString_toString;
618
+ /** Used to match Latin Unicode letters (excluding mathematical operators). */ var reLatin = /[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g;
619
+ /** Used to compose unicode character classes. */ var rsComboMarksRange = '\\u0300-\\u036f', reComboHalfMarksRange = '\\ufe20-\\ufe2f', rsComboSymbolsRange = '\\u20d0-\\u20ff', rsComboRange = rsComboMarksRange + reComboHalfMarksRange + rsComboSymbolsRange;
620
+ /** Used to compose unicode capture groups. */ var rsCombo = '[' + rsComboRange + ']';
621
+ /**
715
622
  * Used to match [combining diacritical marks](https://en.wikipedia.org/wiki/Combining_Diacritical_Marks) and
716
623
  * [combining diacritical marks for symbols](https://en.wikipedia.org/wiki/Combining_Diacritical_Marks_for_Symbols).
717
- */
718
- var reComboMark = RegExp(rsCombo, 'g');
719
-
720
- /**
624
+ */ var reComboMark = RegExp(rsCombo, 'g');
625
+ /**
721
626
  * Deburrs `string` by converting
722
627
  * [Latin-1 Supplement](https://en.wikipedia.org/wiki/Latin-1_Supplement_(Unicode_block)#Character_table)
723
628
  * and [Latin Extended-A](https://en.wikipedia.org/wiki/Latin_Extended-A)
@@ -734,126 +639,73 @@ var reComboMark = RegExp(rsCombo, 'g');
734
639
  *
735
640
  * _.deburr('déjà vu');
736
641
  * // => 'deja vu'
737
- */
738
- function deburr_deburr(string) {
739
- string = lodash_es_toString(string);
740
- return string && string.replace(reLatin, _deburrLetter).replace(reComboMark, '');
741
- }
742
-
743
- /* harmony default export */ const deburr = (deburr_deburr);
744
-
745
- ;// CONCATENATED MODULE: ./node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_asciiWords.js
746
- /** Used to match words composed of alphanumeric characters. */
747
- var reAsciiWord = /[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g;
748
-
749
- /**
642
+ */ function deburr_deburr(string) {
643
+ string = lodash_es_toString(string);
644
+ return string && string.replace(reLatin, _deburrLetter).replace(reComboMark, '');
645
+ }
646
+ /* harmony default export */ const deburr = deburr_deburr;
647
+ /** Used to match words composed of alphanumeric characters. */ var reAsciiWord = /[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g;
648
+ /**
750
649
  * Splits an ASCII `string` into an array of its words.
751
650
  *
752
651
  * @private
753
652
  * @param {string} The string to inspect.
754
653
  * @returns {Array} Returns the words of `string`.
755
- */
756
- function asciiWords(string) {
757
- return string.match(reAsciiWord) || [];
758
- }
759
-
760
- /* harmony default export */ const _asciiWords = (asciiWords);
761
-
762
- ;// CONCATENATED MODULE: ./node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_hasUnicodeWord.js
763
- /** Used to detect strings that need a more robust regexp to match words. */
764
- var reHasUnicodeWord = /[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/;
765
-
766
- /**
654
+ */ function asciiWords(string) {
655
+ return string.match(reAsciiWord) || [];
656
+ }
657
+ /* harmony default export */ const _asciiWords = asciiWords;
658
+ /** Used to detect strings that need a more robust regexp to match words. */ var reHasUnicodeWord = /[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/;
659
+ /**
767
660
  * Checks if `string` contains a word composed of Unicode symbols.
768
661
  *
769
662
  * @private
770
663
  * @param {string} string The string to inspect.
771
664
  * @returns {boolean} Returns `true` if a word is found, else `false`.
772
- */
773
- function hasUnicodeWord(string) {
774
- return reHasUnicodeWord.test(string);
775
- }
776
-
777
- /* harmony default export */ const _hasUnicodeWord = (hasUnicodeWord);
778
-
779
- ;// CONCATENATED MODULE: ./node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_unicodeWords.js
780
- /** Used to compose unicode character classes. */
781
- var rsAstralRange = '\\ud800-\\udfff',
782
- _unicodeWords_rsComboMarksRange = '\\u0300-\\u036f',
783
- _unicodeWords_reComboHalfMarksRange = '\\ufe20-\\ufe2f',
784
- _unicodeWords_rsComboSymbolsRange = '\\u20d0-\\u20ff',
785
- _unicodeWords_rsComboRange = _unicodeWords_rsComboMarksRange + _unicodeWords_reComboHalfMarksRange + _unicodeWords_rsComboSymbolsRange,
786
- rsDingbatRange = '\\u2700-\\u27bf',
787
- rsLowerRange = 'a-z\\xdf-\\xf6\\xf8-\\xff',
788
- rsMathOpRange = '\\xac\\xb1\\xd7\\xf7',
789
- rsNonCharRange = '\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf',
790
- rsPunctuationRange = '\\u2000-\\u206f',
791
- rsSpaceRange = ' \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000',
792
- rsUpperRange = 'A-Z\\xc0-\\xd6\\xd8-\\xde',
793
- rsVarRange = '\\ufe0e\\ufe0f',
794
- rsBreakRange = rsMathOpRange + rsNonCharRange + rsPunctuationRange + rsSpaceRange;
795
-
796
- /** Used to compose unicode capture groups. */
797
- var rsApos = "['\u2019]",
798
- rsBreak = '[' + rsBreakRange + ']',
799
- _unicodeWords_rsCombo = '[' + _unicodeWords_rsComboRange + ']',
800
- rsDigits = '\\d+',
801
- rsDingbat = '[' + rsDingbatRange + ']',
802
- rsLower = '[' + rsLowerRange + ']',
803
- rsMisc = '[^' + rsAstralRange + rsBreakRange + rsDigits + rsDingbatRange + rsLowerRange + rsUpperRange + ']',
804
- rsFitz = '\\ud83c[\\udffb-\\udfff]',
805
- rsModifier = '(?:' + _unicodeWords_rsCombo + '|' + rsFitz + ')',
806
- rsNonAstral = '[^' + rsAstralRange + ']',
807
- rsRegional = '(?:\\ud83c[\\udde6-\\uddff]){2}',
808
- rsSurrPair = '[\\ud800-\\udbff][\\udc00-\\udfff]',
809
- rsUpper = '[' + rsUpperRange + ']',
810
- rsZWJ = '\\u200d';
811
-
812
- /** Used to compose unicode regexes. */
813
- var rsMiscLower = '(?:' + rsLower + '|' + rsMisc + ')',
814
- rsMiscUpper = '(?:' + rsUpper + '|' + rsMisc + ')',
815
- rsOptContrLower = '(?:' + rsApos + '(?:d|ll|m|re|s|t|ve))?',
816
- rsOptContrUpper = '(?:' + rsApos + '(?:D|LL|M|RE|S|T|VE))?',
817
- reOptMod = rsModifier + '?',
818
- rsOptVar = '[' + rsVarRange + ']?',
819
- rsOptJoin = '(?:' + rsZWJ + '(?:' + [rsNonAstral, rsRegional, rsSurrPair].join('|') + ')' + rsOptVar + reOptMod + ')*',
820
- rsOrdLower = '\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])',
821
- rsOrdUpper = '\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])',
822
- rsSeq = rsOptVar + reOptMod + rsOptJoin,
823
- rsEmoji = '(?:' + [rsDingbat, rsRegional, rsSurrPair].join('|') + ')' + rsSeq;
824
-
825
- /** Used to match complex or compound words. */
826
- var reUnicodeWord = RegExp([
827
- rsUpper + '?' + rsLower + '+' + rsOptContrLower + '(?=' + [rsBreak, rsUpper, '$'].join('|') + ')',
828
- rsMiscUpper + '+' + rsOptContrUpper + '(?=' + [rsBreak, rsUpper + rsMiscLower, '$'].join('|') + ')',
829
- rsUpper + '?' + rsMiscLower + '+' + rsOptContrLower,
830
- rsUpper + '+' + rsOptContrUpper,
831
- rsOrdUpper,
832
- rsOrdLower,
833
- rsDigits,
834
- rsEmoji
835
- ].join('|'), 'g');
836
-
837
- /**
665
+ */ function hasUnicodeWord(string) {
666
+ return reHasUnicodeWord.test(string);
667
+ }
668
+ /* harmony default export */ const _hasUnicodeWord = hasUnicodeWord;
669
+ /** Used to compose unicode character classes. */ var rsAstralRange = '\\ud800-\\udfff', _unicodeWords_rsComboMarksRange = '\\u0300-\\u036f', _unicodeWords_reComboHalfMarksRange = '\\ufe20-\\ufe2f', _unicodeWords_rsComboSymbolsRange = '\\u20d0-\\u20ff', _unicodeWords_rsComboRange = _unicodeWords_rsComboMarksRange + _unicodeWords_reComboHalfMarksRange + _unicodeWords_rsComboSymbolsRange, rsDingbatRange = '\\u2700-\\u27bf', rsLowerRange = 'a-z\\xdf-\\xf6\\xf8-\\xff', rsMathOpRange = '\\xac\\xb1\\xd7\\xf7', rsNonCharRange = '\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf', rsPunctuationRange = '\\u2000-\\u206f', rsSpaceRange = ' \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000', rsUpperRange = 'A-Z\\xc0-\\xd6\\xd8-\\xde', rsVarRange = '\\ufe0e\\ufe0f', rsBreakRange = rsMathOpRange + rsNonCharRange + rsPunctuationRange + rsSpaceRange;
670
+ /** Used to compose unicode capture groups. */ var rsApos = "['\u2019]", rsBreak = '[' + rsBreakRange + ']', _unicodeWords_rsCombo = '[' + _unicodeWords_rsComboRange + ']', rsDigits = '\\d+', rsDingbat = '[' + rsDingbatRange + ']', rsLower = '[' + rsLowerRange + ']', rsMisc = '[^' + rsAstralRange + rsBreakRange + rsDigits + rsDingbatRange + rsLowerRange + rsUpperRange + ']', rsFitz = '\\ud83c[\\udffb-\\udfff]', rsModifier = '(?:' + _unicodeWords_rsCombo + '|' + rsFitz + ')', rsNonAstral = '[^' + rsAstralRange + ']', rsRegional = '(?:\\ud83c[\\udde6-\\uddff]){2}', rsSurrPair = '[\\ud800-\\udbff][\\udc00-\\udfff]', rsUpper = '[' + rsUpperRange + ']', rsZWJ = '\\u200d';
671
+ /** Used to compose unicode regexes. */ var rsMiscLower = '(?:' + rsLower + '|' + rsMisc + ')', rsMiscUpper = '(?:' + rsUpper + '|' + rsMisc + ')', rsOptContrLower = '(?:' + rsApos + '(?:d|ll|m|re|s|t|ve))?', rsOptContrUpper = '(?:' + rsApos + '(?:D|LL|M|RE|S|T|VE))?', reOptMod = rsModifier + '?', rsOptVar = '[' + rsVarRange + ']?', rsOptJoin = '(?:' + rsZWJ + '(?:' + [
672
+ rsNonAstral,
673
+ rsRegional,
674
+ rsSurrPair
675
+ ].join('|') + ')' + rsOptVar + reOptMod + ')*', rsOrdLower = '\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])', rsOrdUpper = '\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])', rsSeq = rsOptVar + reOptMod + rsOptJoin, rsEmoji = '(?:' + [
676
+ rsDingbat,
677
+ rsRegional,
678
+ rsSurrPair
679
+ ].join('|') + ')' + rsSeq;
680
+ /** Used to match complex or compound words. */ var reUnicodeWord = RegExp([
681
+ rsUpper + '?' + rsLower + '+' + rsOptContrLower + '(?=' + [
682
+ rsBreak,
683
+ rsUpper,
684
+ '$'
685
+ ].join('|') + ')',
686
+ rsMiscUpper + '+' + rsOptContrUpper + '(?=' + [
687
+ rsBreak,
688
+ rsUpper + rsMiscLower,
689
+ '$'
690
+ ].join('|') + ')',
691
+ rsUpper + '?' + rsMiscLower + '+' + rsOptContrLower,
692
+ rsUpper + '+' + rsOptContrUpper,
693
+ rsOrdUpper,
694
+ rsOrdLower,
695
+ rsDigits,
696
+ rsEmoji
697
+ ].join('|'), 'g');
698
+ /**
838
699
  * Splits a Unicode `string` into an array of its words.
839
700
  *
840
701
  * @private
841
702
  * @param {string} The string to inspect.
842
703
  * @returns {Array} Returns the words of `string`.
843
- */
844
- function unicodeWords(string) {
845
- return string.match(reUnicodeWord) || [];
846
- }
847
-
848
- /* harmony default export */ const _unicodeWords = (unicodeWords);
849
-
850
- ;// CONCATENATED MODULE: ./node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/words.js
851
-
852
-
853
-
854
-
855
-
856
- /**
704
+ */ function unicodeWords(string) {
705
+ return string.match(reUnicodeWord) || [];
706
+ }
707
+ /* harmony default export */ const _unicodeWords = unicodeWords;
708
+ /**
857
709
  * Splits `string` into an array of its words.
858
710
  *
859
711
  * @static
@@ -871,49 +723,28 @@ function unicodeWords(string) {
871
723
  *
872
724
  * _.words('fred, barney, & pebbles', /[^, ]+/g);
873
725
  * // => ['fred', 'barney', '&', 'pebbles']
874
- */
875
- function words_words(string, pattern, guard) {
876
- string = lodash_es_toString(string);
877
- pattern = guard ? undefined : pattern;
878
-
879
- if (pattern === undefined) {
880
- return _hasUnicodeWord(string) ? _unicodeWords(string) : _asciiWords(string);
881
- }
882
- return string.match(pattern) || [];
883
- }
884
-
885
- /* harmony default export */ const words = (words_words);
886
-
887
- ;// CONCATENATED MODULE: ./node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_createCompounder.js
888
-
889
-
890
-
891
-
892
- /** Used to compose unicode capture groups. */
893
- var _createCompounder_rsApos = "['\u2019]";
894
-
895
- /** Used to match apostrophes. */
896
- var reApos = RegExp(_createCompounder_rsApos, 'g');
897
-
898
- /**
726
+ */ function words_words(string, pattern, guard) {
727
+ string = lodash_es_toString(string);
728
+ pattern = guard ? void 0 : pattern;
729
+ if (void 0 === pattern) return _hasUnicodeWord(string) ? _unicodeWords(string) : _asciiWords(string);
730
+ return string.match(pattern) || [];
731
+ }
732
+ /* harmony default export */ const words = words_words;
733
+ /** Used to compose unicode capture groups. */ var _createCompounder_rsApos = "['\u2019]";
734
+ /** Used to match apostrophes. */ var reApos = RegExp(_createCompounder_rsApos, 'g');
735
+ /**
899
736
  * Creates a function like `_.camelCase`.
900
737
  *
901
738
  * @private
902
739
  * @param {Function} callback The function to combine each word.
903
740
  * @returns {Function} Returns the new compounder function.
904
- */
905
- function createCompounder(callback) {
906
- return function(string) {
907
- return _arrayReduce(words(deburr(string).replace(reApos, '')), callback, '');
908
- };
909
- }
910
-
911
- /* harmony default export */ const _createCompounder = (createCompounder);
912
-
913
- ;// CONCATENATED MODULE: ./node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/snakeCase.js
914
-
915
-
916
- /**
741
+ */ function createCompounder(callback) {
742
+ return function(string) {
743
+ return _arrayReduce(words(deburr(string).replace(reApos, '')), callback, '');
744
+ };
745
+ }
746
+ /* harmony default export */ const _createCompounder = createCompounder;
747
+ /**
917
748
  * Converts `string` to
918
749
  * [snake case](https://en.wikipedia.org/wiki/Snake_case).
919
750
  *
@@ -933,33 +764,21 @@ function createCompounder(callback) {
933
764
  *
934
765
  * _.snakeCase('--FOO-BAR--');
935
766
  * // => 'foo_bar'
936
- */
937
- var snakeCase_snakeCase = _createCompounder(function(result, word, index) {
938
- return result + (index ? '_' : '') + word.toLowerCase();
939
- });
940
-
941
- /* harmony default export */ const snakeCase = (snakeCase_snakeCase);
942
-
943
- ;// CONCATENATED MODULE: external "node:fs"
944
- var external_node_fs_namespaceObject = require("node:fs");
945
- var external_node_fs_default = /*#__PURE__*/__webpack_require__.n(external_node_fs_namespaceObject);
946
- ;// CONCATENATED MODULE: external "node:os"
947
- var external_node_os_namespaceObject = require("node:os");
948
- var external_node_os_default = /*#__PURE__*/__webpack_require__.n(external_node_os_namespaceObject);
949
- ;// CONCATENATED MODULE: external "node:path"
950
- var external_node_path_namespaceObject = require("node:path");
951
- var external_node_path_default = /*#__PURE__*/__webpack_require__.n(external_node_path_namespaceObject);
952
- ;// CONCATENATED MODULE: ./node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/escapeRegExp.js
953
-
954
-
955
- /**
767
+ */ var snakeCase_snakeCase = _createCompounder(function(result, word, index) {
768
+ return result + (index ? '_' : '') + word.toLowerCase();
769
+ });
770
+ /* harmony default export */ const snakeCase = snakeCase_snakeCase;
771
+ const external_node_fs_namespaceObject = require("node:fs");
772
+ var external_node_fs_default = /*#__PURE__*/ __webpack_require__.n(external_node_fs_namespaceObject);
773
+ const external_node_os_namespaceObject = require("node:os");
774
+ var external_node_os_default = /*#__PURE__*/ __webpack_require__.n(external_node_os_namespaceObject);
775
+ const external_node_path_namespaceObject = require("node:path");
776
+ var external_node_path_default = /*#__PURE__*/ __webpack_require__.n(external_node_path_namespaceObject);
777
+ /**
956
778
  * Used to match `RegExp`
957
779
  * [syntax characters](http://ecma-international.org/ecma-262/7.0/#sec-patterns).
958
- */
959
- var reRegExpChar = /[\\^$.*+?()[\]{}|]/g,
960
- reHasRegExpChar = RegExp(reRegExpChar.source);
961
-
962
- /**
780
+ */ var reRegExpChar = /[\\^$.*+?()[\]{}|]/g, reHasRegExpChar = RegExp(reRegExpChar.source);
781
+ /**
963
782
  * Escapes the `RegExp` special characters "^", "$", "\", ".", "*", "+",
964
783
  * "?", "(", ")", "[", "]", "{", "}", and "|" in `string`.
965
784
  *
@@ -973,149 +792,108 @@ var reRegExpChar = /[\\^$.*+?()[\]{}|]/g,
973
792
  *
974
793
  * _.escapeRegExp('[lodash](https://lodash.com/)');
975
794
  * // => '\[lodash\]\(https://lodash\.com/\)'
976
- */
977
- function escapeRegExp(string) {
978
- string = lodash_es_toString(string);
979
- return (string && reHasRegExpChar.test(string))
980
- ? string.replace(reRegExpChar, '\\$&')
981
- : string;
982
- }
983
-
984
- /* harmony default export */ const lodash_es_escapeRegExp = (escapeRegExp);
985
-
986
- // EXTERNAL MODULE: ./node_modules/.pnpm/upath@2.0.1/node_modules/upath/build/code/upath.js
987
- var upath = __webpack_require__("./node_modules/.pnpm/upath@2.0.1/node_modules/upath/build/code/upath.js");
988
- var upath_default = /*#__PURE__*/__webpack_require__.n(upath);
989
- ;// CONCATENATED MODULE: ./src/utils.ts
990
-
991
-
992
-
993
-
994
-
995
- const isPathString = (test)=>external_node_path_default().posix.basename(test) !== test || external_node_path_default().win32.basename(test) !== test;
996
- function getRealTemporaryDirectory() {
997
- let ret = null;
998
- try {
999
- ret = external_node_os_default().tmpdir();
1000
- ret = external_node_fs_default().realpathSync(ret);
1001
- } catch {}
1002
- return ret;
1003
- }
1004
- const normalizeToPosixPath = (p)=>{
1005
- return upath_default().normalizeSafe(external_node_path_default().normalize(p || '')).replace(/^([a-zA-Z]+):/, (_, m)=>`/${m.toLowerCase()}`);
1006
- };
1007
- /**
795
+ */ function escapeRegExp(string) {
796
+ string = lodash_es_toString(string);
797
+ return string && reHasRegExpChar.test(string) ? string.replace(reRegExpChar, '\\$&') : string;
798
+ }
799
+ /* harmony default export */ const lodash_es_escapeRegExp = escapeRegExp;
800
+ // EXTERNAL MODULE: ./node_modules/.pnpm/upath@2.0.1/node_modules/upath/build/code/upath.js
801
+ var upath = __webpack_require__("./node_modules/.pnpm/upath@2.0.1/node_modules/upath/build/code/upath.js");
802
+ var upath_default = /*#__PURE__*/ __webpack_require__.n(upath);
803
+ function getRealTemporaryDirectory() {
804
+ let ret = null;
805
+ try {
806
+ ret = external_node_os_default().tmpdir();
807
+ ret = external_node_fs_default().realpathSync(ret);
808
+ } catch {}
809
+ return ret;
810
+ }
811
+ const normalizeToPosixPath = (p)=>upath_default().normalizeSafe(external_node_path_default().normalize(p || '')).replace(/^([a-zA-Z]+):/, (_, m)=>`/${m.toLowerCase()}`);
812
+ /**
1008
813
  * Compile path string to RegExp.
1009
814
  * @note Only support posix path.
1010
815
  */ function compilePathMatcherRegExp(match) {
1011
- if (typeof match !== 'string') {
1012
- return match;
816
+ if ('string' != typeof match) return match;
817
+ const escaped = lodash_es_escapeRegExp(match);
818
+ return new RegExp(`(?<=\\W|^)${escaped}(?=\\W|$)`, 'g');
1013
819
  }
1014
- const escaped = lodash_es_escapeRegExp(match);
1015
- return new RegExp(`(?<=\\W|^)${escaped}(?=\\W|$)`, 'g');
1016
- }
1017
- function splitPathString(str) {
1018
- return str.split(/[\\/]/);
1019
- }
1020
-
1021
- ;// CONCATENATED MODULE: ./src/applyMatcherReplacement.ts
1022
-
1023
-
1024
- function applyPathMatcher(matcher, str, options = {}) {
1025
- const regex = compilePathMatcherRegExp(matcher.match);
1026
- const replacer = (substring, ...args)=>{
1027
- if (options.minPartials && splitPathString(substring).length < options.minPartials) {
1028
- return substring;
1029
- }
1030
- const ret = typeof matcher.mark === 'string' ? matcher.mark : matcher.mark(substring, ...args);
1031
- return `<${snakeCase(ret).toUpperCase()}>`;
820
+ function splitPathString(str) {
821
+ return str.split(/[\\/]/);
822
+ }
823
+ function applyPathMatcher(matcher, str, options = {}) {
824
+ const regex = compilePathMatcherRegExp(matcher.match);
825
+ const replacer = (substring, ...args)=>{
826
+ if (options.minPartials && splitPathString(substring).length < options.minPartials) return substring;
827
+ const ret = 'string' == typeof matcher.mark ? matcher.mark : matcher.mark(substring, ...args);
828
+ return `<${snakeCase(ret).toUpperCase()}>`;
829
+ };
830
+ return str.replace(regex, replacer);
831
+ }
832
+ function applyMatcherReplacement(matchers, str, options = {}) {
833
+ return matchers.reduce((ret, matcher)=>applyPathMatcher(matcher, ret, options), str);
834
+ }
835
+ const createTmpDirMatchers = ()=>{
836
+ const ret = [];
837
+ const tmpdir = getRealTemporaryDirectory();
838
+ tmpdir && ret.push({
839
+ match: tmpdir,
840
+ mark: 'temp'
841
+ });
842
+ ret.push({
843
+ match: external_node_os_default().tmpdir(),
844
+ mark: 'temp'
845
+ });
846
+ ret.push({
847
+ match: external_node_os_default().homedir(),
848
+ mark: 'home'
849
+ });
850
+ return ret;
1032
851
  };
1033
- return str.replace(regex, replacer);
1034
- }
1035
- function applyMatcherReplacement(matchers, str, options = {}) {
1036
- return matchers.reduce((ret, matcher)=>{
1037
- return applyPathMatcher(matcher, ret, options);
1038
- }, str);
1039
- }
1040
-
1041
- ;// CONCATENATED MODULE: ./src/createDefaultPathMatchers.ts
1042
-
1043
-
1044
- const createDefaultPathMatchers = ()=>{
1045
- const ret = [
1046
- {
1047
- match: /(?<=\/)(\.pnpm\/.+?\/node_modules)(?=\/)/g,
1048
- mark: 'pnpmInner'
1049
- }
1050
- ];
1051
- const tmpdir = getRealTemporaryDirectory();
1052
- tmpdir && ret.push({
1053
- match: tmpdir,
1054
- mark: 'temp'
1055
- });
1056
- ret.push({
1057
- match: external_node_os_default().tmpdir(),
1058
- mark: 'temp'
1059
- });
1060
- ret.push({
1061
- match: external_node_os_default().homedir(),
1062
- mark: 'home'
1063
- });
1064
- return ret;
1065
- };
1066
-
1067
- ;// CONCATENATED MODULE: ./src/transformCodeToPosixPath.ts
1068
-
1069
- function transformCodeToPosixPath(code) {
1070
- return code.replace(// windows absolute path
1071
- // ignore http, https, file
1072
- /(?<![a-zA-Z])([a-zA-Z]:[\\/])([-\u4e00-\u9fa5\w\s.()~!@#$%^&()\[\]{}+=]+[\\/])*/g, (match, _diskName)=>{
1073
- return normalizeToPosixPath(match);
1074
- });
1075
- }
1076
-
1077
-
1078
- ;// CONCATENATED MODULE: ./src/createSnapshotSerializer.ts
1079
-
1080
-
1081
-
1082
-
1083
- function createSnapshotSerializer(options) {
1084
- const { cwd = process.cwd(), workspace = process.cwd(), replace: customMatchers = [] } = options || {};
1085
- const pathMatchers = [
1086
- {
1087
- mark: 'root',
1088
- match: cwd
1089
- },
1090
- {
1091
- mark: 'workspace',
1092
- match: workspace
1093
- },
1094
- ...customMatchers,
1095
- ...createDefaultPathMatchers()
1096
- ];
1097
- for (const matcher of pathMatchers){
1098
- if (typeof matcher.match === 'string') {
1099
- matcher.match = normalizeToPosixPath(matcher.match);
1100
- }
852
+ function transformCodeToPosixPath(code) {
853
+ return code.replace(// ignore http, https, file
854
+ /(?<![a-zA-Z])([a-zA-Z]:[\\/])([-\u4e00-\u9fa5\w\s.()~!@#$%^&()\[\]{}+=]+[\\/])*/g, (match, _diskName)=>normalizeToPosixPath(match));
1101
855
  }
1102
- return {
1103
- pathMatchers,
1104
- // match path-format string
1105
- test: (val)=>typeof val === 'string' && isPathString(val),
1106
- print: (val)=>{
1107
- const normalized = transformCodeToPosixPath(val);
1108
- const replaced = applyMatcherReplacement(pathMatchers, normalized).replace(/"/g, '\\"');
1109
- return `"${replaced}"`;
856
+ function createSnapshotSerializer(options) {
857
+ const { cwd = process.cwd(), workspace = process.cwd(), replace: customMatchers = [], features = {} } = options || {};
858
+ const { replaceRoot = true, replaceWorkspace = true, replacePnpmInner = true, replaceTmpDir = true, ansiDoubleQuotes = true, addDoubleQuotes = true } = features;
859
+ function createPathMatchers() {
860
+ const pathMatchers = [];
861
+ if (replaceRoot) pathMatchers.push({
862
+ mark: 'root',
863
+ match: cwd
864
+ });
865
+ if (replaceWorkspace) pathMatchers.push({
866
+ mark: 'workspace',
867
+ match: workspace
868
+ });
869
+ if (replacePnpmInner) pathMatchers.push({
870
+ match: /(?<=\/)(\.pnpm\/.+?\/node_modules)(?=\/)/g,
871
+ mark: 'pnpmInner'
872
+ });
873
+ if (replaceTmpDir) pathMatchers.push(...createTmpDirMatchers());
874
+ pathMatchers.push(...customMatchers);
875
+ return pathMatchers;
1110
876
  }
1111
- };
1112
- }
1113
-
1114
- ;// CONCATENATED MODULE: ./src/index.ts
1115
-
1116
-
877
+ const pathMatchers = createPathMatchers();
878
+ for (const matcher of pathMatchers)if ('string' == typeof matcher.match) matcher.match = normalizeToPosixPath(matcher.match);
879
+ const serializer = {
880
+ // match path-format string
881
+ test (val) {
882
+ return 'string' == typeof val;
883
+ },
884
+ serialize (val, _config, _indentation, _depth, _refs, _printer) {
885
+ const normalized = transformCodeToPosixPath(val);
886
+ let replaced = applyMatcherReplacement(pathMatchers, normalized);
887
+ if (ansiDoubleQuotes) replaced = replaced.replace(/"/g, '\\"');
888
+ if (addDoubleQuotes) replaced = `"${replaced}"`;
889
+ return replaced;
890
+ }
891
+ };
892
+ return serializer;
893
+ }
1117
894
  })();
1118
-
1119
895
  var __webpack_export_target__ = exports;
1120
- for(var i in __webpack_exports__) __webpack_export_target__[i] = __webpack_exports__[i];
1121
- if(__webpack_exports__.__esModule) Object.defineProperty(__webpack_export_target__, '__esModule', { value: true });
896
+ for(var i in __webpack_exports__)__webpack_export_target__[i] = __webpack_exports__[i];
897
+ if (__webpack_exports__.__esModule) Object.defineProperty(__webpack_export_target__, '__esModule', {
898
+ value: true
899
+ });