@purescraps/purehtml 0.8.0 → 0.10.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/src/index.js CHANGED
@@ -29,9 +29,9 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
29
29
  ));
30
30
  var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
31
31
 
32
- // node_modules/.pnpm/ajv@8.17.1/node_modules/ajv/dist/compile/codegen/code.js
32
+ // node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/compile/codegen/code.js
33
33
  var require_code = __commonJS({
34
- "node_modules/.pnpm/ajv@8.17.1/node_modules/ajv/dist/compile/codegen/code.js"(exports2) {
34
+ "node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/compile/codegen/code.js"(exports2) {
35
35
  "use strict";
36
36
  Object.defineProperty(exports2, "__esModule", { value: true });
37
37
  exports2.regexpCode = exports2.getEsmExportName = exports2.getProperty = exports2.safeStringify = exports2.stringify = exports2.strConcat = exports2.addCodeArg = exports2.str = exports2._ = exports2.nil = exports2._Code = exports2.Name = exports2.IDENTIFIER = exports2._CodeOrName = void 0;
@@ -183,9 +183,9 @@ var require_code = __commonJS({
183
183
  }
184
184
  });
185
185
 
186
- // node_modules/.pnpm/ajv@8.17.1/node_modules/ajv/dist/compile/codegen/scope.js
186
+ // node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/compile/codegen/scope.js
187
187
  var require_scope = __commonJS({
188
- "node_modules/.pnpm/ajv@8.17.1/node_modules/ajv/dist/compile/codegen/scope.js"(exports2) {
188
+ "node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/compile/codegen/scope.js"(exports2) {
189
189
  "use strict";
190
190
  Object.defineProperty(exports2, "__esModule", { value: true });
191
191
  exports2.ValueScope = exports2.ValueScopeName = exports2.Scope = exports2.varKinds = exports2.UsedValueState = void 0;
@@ -328,9 +328,9 @@ var require_scope = __commonJS({
328
328
  }
329
329
  });
330
330
 
331
- // node_modules/.pnpm/ajv@8.17.1/node_modules/ajv/dist/compile/codegen/index.js
331
+ // node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/compile/codegen/index.js
332
332
  var require_codegen = __commonJS({
333
- "node_modules/.pnpm/ajv@8.17.1/node_modules/ajv/dist/compile/codegen/index.js"(exports2) {
333
+ "node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/compile/codegen/index.js"(exports2) {
334
334
  "use strict";
335
335
  Object.defineProperty(exports2, "__esModule", { value: true });
336
336
  exports2.or = exports2.and = exports2.not = exports2.CodeGen = exports2.operators = exports2.varKinds = exports2.ValueScopeName = exports2.ValueScope = exports2.Scope = exports2.Name = exports2.regexpCode = exports2.stringify = exports2.getProperty = exports2.nil = exports2.strConcat = exports2.str = exports2._ = void 0;
@@ -1048,9 +1048,9 @@ var require_codegen = __commonJS({
1048
1048
  }
1049
1049
  });
1050
1050
 
1051
- // node_modules/.pnpm/ajv@8.17.1/node_modules/ajv/dist/compile/util.js
1051
+ // node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/compile/util.js
1052
1052
  var require_util = __commonJS({
1053
- "node_modules/.pnpm/ajv@8.17.1/node_modules/ajv/dist/compile/util.js"(exports2) {
1053
+ "node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/compile/util.js"(exports2) {
1054
1054
  "use strict";
1055
1055
  Object.defineProperty(exports2, "__esModule", { value: true });
1056
1056
  exports2.checkStrictMode = exports2.getErrorPath = exports2.Type = exports2.useFunc = exports2.setEvaluated = exports2.evaluatedPropsToName = exports2.mergeEvaluated = exports2.eachItem = exports2.unescapeJsonPointer = exports2.escapeJsonPointer = exports2.escapeFragment = exports2.unescapeFragment = exports2.schemaRefOrVal = exports2.schemaHasRulesButRef = exports2.schemaHasRules = exports2.checkUnknownRules = exports2.alwaysValidSchema = exports2.toHash = void 0;
@@ -1215,9 +1215,9 @@ var require_util = __commonJS({
1215
1215
  }
1216
1216
  });
1217
1217
 
1218
- // node_modules/.pnpm/ajv@8.17.1/node_modules/ajv/dist/compile/names.js
1218
+ // node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/compile/names.js
1219
1219
  var require_names = __commonJS({
1220
- "node_modules/.pnpm/ajv@8.17.1/node_modules/ajv/dist/compile/names.js"(exports2) {
1220
+ "node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/compile/names.js"(exports2) {
1221
1221
  "use strict";
1222
1222
  Object.defineProperty(exports2, "__esModule", { value: true });
1223
1223
  var codegen_1 = require_codegen();
@@ -1254,9 +1254,9 @@ var require_names = __commonJS({
1254
1254
  }
1255
1255
  });
1256
1256
 
1257
- // node_modules/.pnpm/ajv@8.17.1/node_modules/ajv/dist/compile/errors.js
1257
+ // node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/compile/errors.js
1258
1258
  var require_errors = __commonJS({
1259
- "node_modules/.pnpm/ajv@8.17.1/node_modules/ajv/dist/compile/errors.js"(exports2) {
1259
+ "node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/compile/errors.js"(exports2) {
1260
1260
  "use strict";
1261
1261
  Object.defineProperty(exports2, "__esModule", { value: true });
1262
1262
  exports2.extendErrors = exports2.resetErrorsCount = exports2.reportExtraError = exports2.reportError = exports2.keyword$DataError = exports2.keywordError = void 0;
@@ -1376,9 +1376,9 @@ var require_errors = __commonJS({
1376
1376
  }
1377
1377
  });
1378
1378
 
1379
- // node_modules/.pnpm/ajv@8.17.1/node_modules/ajv/dist/compile/validate/boolSchema.js
1379
+ // node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/compile/validate/boolSchema.js
1380
1380
  var require_boolSchema = __commonJS({
1381
- "node_modules/.pnpm/ajv@8.17.1/node_modules/ajv/dist/compile/validate/boolSchema.js"(exports2) {
1381
+ "node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/compile/validate/boolSchema.js"(exports2) {
1382
1382
  "use strict";
1383
1383
  Object.defineProperty(exports2, "__esModule", { value: true });
1384
1384
  exports2.boolOrEmptySchema = exports2.topBoolOrEmptySchema = void 0;
@@ -1427,9 +1427,9 @@ var require_boolSchema = __commonJS({
1427
1427
  }
1428
1428
  });
1429
1429
 
1430
- // node_modules/.pnpm/ajv@8.17.1/node_modules/ajv/dist/compile/rules.js
1430
+ // node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/compile/rules.js
1431
1431
  var require_rules = __commonJS({
1432
- "node_modules/.pnpm/ajv@8.17.1/node_modules/ajv/dist/compile/rules.js"(exports2) {
1432
+ "node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/compile/rules.js"(exports2) {
1433
1433
  "use strict";
1434
1434
  Object.defineProperty(exports2, "__esModule", { value: true });
1435
1435
  exports2.getRules = exports2.isJSONType = void 0;
@@ -1458,9 +1458,9 @@ var require_rules = __commonJS({
1458
1458
  }
1459
1459
  });
1460
1460
 
1461
- // node_modules/.pnpm/ajv@8.17.1/node_modules/ajv/dist/compile/validate/applicability.js
1461
+ // node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/compile/validate/applicability.js
1462
1462
  var require_applicability = __commonJS({
1463
- "node_modules/.pnpm/ajv@8.17.1/node_modules/ajv/dist/compile/validate/applicability.js"(exports2) {
1463
+ "node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/compile/validate/applicability.js"(exports2) {
1464
1464
  "use strict";
1465
1465
  Object.defineProperty(exports2, "__esModule", { value: true });
1466
1466
  exports2.shouldUseRule = exports2.shouldUseGroup = exports2.schemaHasRulesForType = void 0;
@@ -1481,9 +1481,9 @@ var require_applicability = __commonJS({
1481
1481
  }
1482
1482
  });
1483
1483
 
1484
- // node_modules/.pnpm/ajv@8.17.1/node_modules/ajv/dist/compile/validate/dataType.js
1484
+ // node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/compile/validate/dataType.js
1485
1485
  var require_dataType = __commonJS({
1486
- "node_modules/.pnpm/ajv@8.17.1/node_modules/ajv/dist/compile/validate/dataType.js"(exports2) {
1486
+ "node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/compile/validate/dataType.js"(exports2) {
1487
1487
  "use strict";
1488
1488
  Object.defineProperty(exports2, "__esModule", { value: true });
1489
1489
  exports2.reportTypeError = exports2.checkDataTypes = exports2.checkDataType = exports2.coerceAndCheckDataType = exports2.getJSONTypes = exports2.getSchemaTypes = exports2.DataType = void 0;
@@ -1665,9 +1665,9 @@ var require_dataType = __commonJS({
1665
1665
  }
1666
1666
  });
1667
1667
 
1668
- // node_modules/.pnpm/ajv@8.17.1/node_modules/ajv/dist/compile/validate/defaults.js
1668
+ // node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/compile/validate/defaults.js
1669
1669
  var require_defaults = __commonJS({
1670
- "node_modules/.pnpm/ajv@8.17.1/node_modules/ajv/dist/compile/validate/defaults.js"(exports2) {
1670
+ "node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/compile/validate/defaults.js"(exports2) {
1671
1671
  "use strict";
1672
1672
  Object.defineProperty(exports2, "__esModule", { value: true });
1673
1673
  exports2.assignDefaults = void 0;
@@ -1702,9 +1702,9 @@ var require_defaults = __commonJS({
1702
1702
  }
1703
1703
  });
1704
1704
 
1705
- // node_modules/.pnpm/ajv@8.17.1/node_modules/ajv/dist/vocabularies/code.js
1705
+ // node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/code.js
1706
1706
  var require_code2 = __commonJS({
1707
- "node_modules/.pnpm/ajv@8.17.1/node_modules/ajv/dist/vocabularies/code.js"(exports2) {
1707
+ "node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/code.js"(exports2) {
1708
1708
  "use strict";
1709
1709
  Object.defineProperty(exports2, "__esModule", { value: true });
1710
1710
  exports2.validateUnion = exports2.validateArray = exports2.usePattern = exports2.callValidateCode = exports2.schemaProperties = exports2.allSchemaProperties = exports2.noPropertyInData = exports2.propertyInData = exports2.isOwnProperty = exports2.hasPropFunc = exports2.reportMissingProp = exports2.checkMissingProp = exports2.checkReportMissingProp = void 0;
@@ -1835,9 +1835,9 @@ var require_code2 = __commonJS({
1835
1835
  }
1836
1836
  });
1837
1837
 
1838
- // node_modules/.pnpm/ajv@8.17.1/node_modules/ajv/dist/compile/validate/keyword.js
1838
+ // node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/compile/validate/keyword.js
1839
1839
  var require_keyword = __commonJS({
1840
- "node_modules/.pnpm/ajv@8.17.1/node_modules/ajv/dist/compile/validate/keyword.js"(exports2) {
1840
+ "node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/compile/validate/keyword.js"(exports2) {
1841
1841
  "use strict";
1842
1842
  Object.defineProperty(exports2, "__esModule", { value: true });
1843
1843
  exports2.validateKeywordUsage = exports2.validSchemaType = exports2.funcKeywordCode = exports2.macroKeywordCode = void 0;
@@ -1953,9 +1953,9 @@ var require_keyword = __commonJS({
1953
1953
  }
1954
1954
  });
1955
1955
 
1956
- // node_modules/.pnpm/ajv@8.17.1/node_modules/ajv/dist/compile/validate/subschema.js
1956
+ // node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/compile/validate/subschema.js
1957
1957
  var require_subschema = __commonJS({
1958
- "node_modules/.pnpm/ajv@8.17.1/node_modules/ajv/dist/compile/validate/subschema.js"(exports2) {
1958
+ "node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/compile/validate/subschema.js"(exports2) {
1959
1959
  "use strict";
1960
1960
  Object.defineProperty(exports2, "__esModule", { value: true });
1961
1961
  exports2.extendSubschemaMode = exports2.extendSubschemaData = exports2.getSubschema = void 0;
@@ -2159,9 +2159,9 @@ var require_json_schema_traverse = __commonJS({
2159
2159
  }
2160
2160
  });
2161
2161
 
2162
- // node_modules/.pnpm/ajv@8.17.1/node_modules/ajv/dist/compile/resolve.js
2162
+ // node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/compile/resolve.js
2163
2163
  var require_resolve = __commonJS({
2164
- "node_modules/.pnpm/ajv@8.17.1/node_modules/ajv/dist/compile/resolve.js"(exports2) {
2164
+ "node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/compile/resolve.js"(exports2) {
2165
2165
  "use strict";
2166
2166
  Object.defineProperty(exports2, "__esModule", { value: true });
2167
2167
  exports2.getSchemaRefs = exports2.resolveUrl = exports2.normalizeId = exports2._getFullPath = exports2.getFullPath = exports2.inlineRef = void 0;
@@ -2315,9 +2315,9 @@ var require_resolve = __commonJS({
2315
2315
  }
2316
2316
  });
2317
2317
 
2318
- // node_modules/.pnpm/ajv@8.17.1/node_modules/ajv/dist/compile/validate/index.js
2318
+ // node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/compile/validate/index.js
2319
2319
  var require_validate = __commonJS({
2320
- "node_modules/.pnpm/ajv@8.17.1/node_modules/ajv/dist/compile/validate/index.js"(exports2) {
2320
+ "node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/compile/validate/index.js"(exports2) {
2321
2321
  "use strict";
2322
2322
  Object.defineProperty(exports2, "__esModule", { value: true });
2323
2323
  exports2.getData = exports2.KeywordCxt = exports2.validateFunctionCode = void 0;
@@ -2823,9 +2823,9 @@ var require_validate = __commonJS({
2823
2823
  }
2824
2824
  });
2825
2825
 
2826
- // node_modules/.pnpm/ajv@8.17.1/node_modules/ajv/dist/runtime/validation_error.js
2826
+ // node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/runtime/validation_error.js
2827
2827
  var require_validation_error = __commonJS({
2828
- "node_modules/.pnpm/ajv@8.17.1/node_modules/ajv/dist/runtime/validation_error.js"(exports2) {
2828
+ "node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/runtime/validation_error.js"(exports2) {
2829
2829
  "use strict";
2830
2830
  Object.defineProperty(exports2, "__esModule", { value: true });
2831
2831
  var ValidationError = class extends Error {
@@ -2839,9 +2839,9 @@ var require_validation_error = __commonJS({
2839
2839
  }
2840
2840
  });
2841
2841
 
2842
- // node_modules/.pnpm/ajv@8.17.1/node_modules/ajv/dist/compile/ref_error.js
2842
+ // node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/compile/ref_error.js
2843
2843
  var require_ref_error = __commonJS({
2844
- "node_modules/.pnpm/ajv@8.17.1/node_modules/ajv/dist/compile/ref_error.js"(exports2) {
2844
+ "node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/compile/ref_error.js"(exports2) {
2845
2845
  "use strict";
2846
2846
  Object.defineProperty(exports2, "__esModule", { value: true });
2847
2847
  var resolve_1 = require_resolve();
@@ -2856,9 +2856,9 @@ var require_ref_error = __commonJS({
2856
2856
  }
2857
2857
  });
2858
2858
 
2859
- // node_modules/.pnpm/ajv@8.17.1/node_modules/ajv/dist/compile/index.js
2859
+ // node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/compile/index.js
2860
2860
  var require_compile = __commonJS({
2861
- "node_modules/.pnpm/ajv@8.17.1/node_modules/ajv/dist/compile/index.js"(exports2) {
2861
+ "node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/compile/index.js"(exports2) {
2862
2862
  "use strict";
2863
2863
  Object.defineProperty(exports2, "__esModule", { value: true });
2864
2864
  exports2.resolveSchema = exports2.getCompilingSchema = exports2.resolveRef = exports2.compileSchema = exports2.SchemaEnv = void 0;
@@ -3080,9 +3080,9 @@ var require_compile = __commonJS({
3080
3080
  }
3081
3081
  });
3082
3082
 
3083
- // node_modules/.pnpm/ajv@8.17.1/node_modules/ajv/dist/refs/data.json
3083
+ // node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/refs/data.json
3084
3084
  var require_data = __commonJS({
3085
- "node_modules/.pnpm/ajv@8.17.1/node_modules/ajv/dist/refs/data.json"(exports2, module2) {
3085
+ "node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/refs/data.json"(exports2, module2) {
3086
3086
  module2.exports = {
3087
3087
  $id: "https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#",
3088
3088
  description: "Meta-schema for $data reference (JSON AnySchema extension proposal)",
@@ -3766,9 +3766,9 @@ var require_fast_uri = __commonJS({
3766
3766
  }
3767
3767
  });
3768
3768
 
3769
- // node_modules/.pnpm/ajv@8.17.1/node_modules/ajv/dist/runtime/uri.js
3769
+ // node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/runtime/uri.js
3770
3770
  var require_uri = __commonJS({
3771
- "node_modules/.pnpm/ajv@8.17.1/node_modules/ajv/dist/runtime/uri.js"(exports2) {
3771
+ "node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/runtime/uri.js"(exports2) {
3772
3772
  "use strict";
3773
3773
  Object.defineProperty(exports2, "__esModule", { value: true });
3774
3774
  var uri = require_fast_uri();
@@ -3777,9 +3777,9 @@ var require_uri = __commonJS({
3777
3777
  }
3778
3778
  });
3779
3779
 
3780
- // node_modules/.pnpm/ajv@8.17.1/node_modules/ajv/dist/core.js
3780
+ // node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/core.js
3781
3781
  var require_core = __commonJS({
3782
- "node_modules/.pnpm/ajv@8.17.1/node_modules/ajv/dist/core.js"(exports2) {
3782
+ "node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/core.js"(exports2) {
3783
3783
  "use strict";
3784
3784
  Object.defineProperty(exports2, "__esModule", { value: true });
3785
3785
  exports2.CodeGen = exports2.Name = exports2.nil = exports2.stringify = exports2.str = exports2._ = exports2.KeywordCxt = void 0;
@@ -3889,7 +3889,7 @@ var require_core = __commonJS({
3889
3889
  constructor(opts = {}) {
3890
3890
  this.schemas = {};
3891
3891
  this.refs = {};
3892
- this.formats = {};
3892
+ this.formats = /* @__PURE__ */ Object.create(null);
3893
3893
  this._compilations = /* @__PURE__ */ new Set();
3894
3894
  this._loading = {};
3895
3895
  this._cache = /* @__PURE__ */ new Map();
@@ -4388,9 +4388,9 @@ var require_core = __commonJS({
4388
4388
  }
4389
4389
  });
4390
4390
 
4391
- // node_modules/.pnpm/ajv@8.17.1/node_modules/ajv/dist/vocabularies/core/id.js
4391
+ // node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/core/id.js
4392
4392
  var require_id = __commonJS({
4393
- "node_modules/.pnpm/ajv@8.17.1/node_modules/ajv/dist/vocabularies/core/id.js"(exports2) {
4393
+ "node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/core/id.js"(exports2) {
4394
4394
  "use strict";
4395
4395
  Object.defineProperty(exports2, "__esModule", { value: true });
4396
4396
  var def = {
@@ -4403,9 +4403,9 @@ var require_id = __commonJS({
4403
4403
  }
4404
4404
  });
4405
4405
 
4406
- // node_modules/.pnpm/ajv@8.17.1/node_modules/ajv/dist/vocabularies/core/ref.js
4406
+ // node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/core/ref.js
4407
4407
  var require_ref = __commonJS({
4408
- "node_modules/.pnpm/ajv@8.17.1/node_modules/ajv/dist/vocabularies/core/ref.js"(exports2) {
4408
+ "node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/core/ref.js"(exports2) {
4409
4409
  "use strict";
4410
4410
  Object.defineProperty(exports2, "__esModule", { value: true });
4411
4411
  exports2.callRef = exports2.getValidate = void 0;
@@ -4525,9 +4525,9 @@ var require_ref = __commonJS({
4525
4525
  }
4526
4526
  });
4527
4527
 
4528
- // node_modules/.pnpm/ajv@8.17.1/node_modules/ajv/dist/vocabularies/core/index.js
4528
+ // node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/core/index.js
4529
4529
  var require_core2 = __commonJS({
4530
- "node_modules/.pnpm/ajv@8.17.1/node_modules/ajv/dist/vocabularies/core/index.js"(exports2) {
4530
+ "node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/core/index.js"(exports2) {
4531
4531
  "use strict";
4532
4532
  Object.defineProperty(exports2, "__esModule", { value: true });
4533
4533
  var id_1 = require_id();
@@ -4546,9 +4546,9 @@ var require_core2 = __commonJS({
4546
4546
  }
4547
4547
  });
4548
4548
 
4549
- // node_modules/.pnpm/ajv@8.17.1/node_modules/ajv/dist/vocabularies/validation/limitNumber.js
4549
+ // node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/validation/limitNumber.js
4550
4550
  var require_limitNumber = __commonJS({
4551
- "node_modules/.pnpm/ajv@8.17.1/node_modules/ajv/dist/vocabularies/validation/limitNumber.js"(exports2) {
4551
+ "node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/validation/limitNumber.js"(exports2) {
4552
4552
  "use strict";
4553
4553
  Object.defineProperty(exports2, "__esModule", { value: true });
4554
4554
  var codegen_1 = require_codegen();
@@ -4578,9 +4578,9 @@ var require_limitNumber = __commonJS({
4578
4578
  }
4579
4579
  });
4580
4580
 
4581
- // node_modules/.pnpm/ajv@8.17.1/node_modules/ajv/dist/vocabularies/validation/multipleOf.js
4581
+ // node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/validation/multipleOf.js
4582
4582
  var require_multipleOf = __commonJS({
4583
- "node_modules/.pnpm/ajv@8.17.1/node_modules/ajv/dist/vocabularies/validation/multipleOf.js"(exports2) {
4583
+ "node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/validation/multipleOf.js"(exports2) {
4584
4584
  "use strict";
4585
4585
  Object.defineProperty(exports2, "__esModule", { value: true });
4586
4586
  var codegen_1 = require_codegen();
@@ -4606,9 +4606,9 @@ var require_multipleOf = __commonJS({
4606
4606
  }
4607
4607
  });
4608
4608
 
4609
- // node_modules/.pnpm/ajv@8.17.1/node_modules/ajv/dist/runtime/ucs2length.js
4609
+ // node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/runtime/ucs2length.js
4610
4610
  var require_ucs2length = __commonJS({
4611
- "node_modules/.pnpm/ajv@8.17.1/node_modules/ajv/dist/runtime/ucs2length.js"(exports2) {
4611
+ "node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/runtime/ucs2length.js"(exports2) {
4612
4612
  "use strict";
4613
4613
  Object.defineProperty(exports2, "__esModule", { value: true });
4614
4614
  function ucs2length(str) {
@@ -4632,9 +4632,9 @@ var require_ucs2length = __commonJS({
4632
4632
  }
4633
4633
  });
4634
4634
 
4635
- // node_modules/.pnpm/ajv@8.17.1/node_modules/ajv/dist/vocabularies/validation/limitLength.js
4635
+ // node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/validation/limitLength.js
4636
4636
  var require_limitLength = __commonJS({
4637
- "node_modules/.pnpm/ajv@8.17.1/node_modules/ajv/dist/vocabularies/validation/limitLength.js"(exports2) {
4637
+ "node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/validation/limitLength.js"(exports2) {
4638
4638
  "use strict";
4639
4639
  Object.defineProperty(exports2, "__esModule", { value: true });
4640
4640
  var codegen_1 = require_codegen();
@@ -4664,12 +4664,13 @@ var require_limitLength = __commonJS({
4664
4664
  }
4665
4665
  });
4666
4666
 
4667
- // node_modules/.pnpm/ajv@8.17.1/node_modules/ajv/dist/vocabularies/validation/pattern.js
4667
+ // node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/validation/pattern.js
4668
4668
  var require_pattern = __commonJS({
4669
- "node_modules/.pnpm/ajv@8.17.1/node_modules/ajv/dist/vocabularies/validation/pattern.js"(exports2) {
4669
+ "node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/validation/pattern.js"(exports2) {
4670
4670
  "use strict";
4671
4671
  Object.defineProperty(exports2, "__esModule", { value: true });
4672
4672
  var code_1 = require_code2();
4673
+ var util_1 = require_util();
4673
4674
  var codegen_1 = require_codegen();
4674
4675
  var error = {
4675
4676
  message: ({ schemaCode }) => (0, codegen_1.str)`must match pattern "${schemaCode}"`,
@@ -4682,19 +4683,27 @@ var require_pattern = __commonJS({
4682
4683
  $data: true,
4683
4684
  error,
4684
4685
  code(cxt) {
4685
- const { data, $data, schema, schemaCode, it } = cxt;
4686
+ const { gen, data, $data, schema, schemaCode, it } = cxt;
4686
4687
  const u = it.opts.unicodeRegExp ? "u" : "";
4687
- const regExp = $data ? (0, codegen_1._)`(new RegExp(${schemaCode}, ${u}))` : (0, code_1.usePattern)(cxt, schema);
4688
- cxt.fail$data((0, codegen_1._)`!${regExp}.test(${data})`);
4688
+ if ($data) {
4689
+ const { regExp } = it.opts.code;
4690
+ const regExpCode = regExp.code === "new RegExp" ? (0, codegen_1._)`new RegExp` : (0, util_1.useFunc)(gen, regExp);
4691
+ const valid = gen.let("valid");
4692
+ gen.try(() => gen.assign(valid, (0, codegen_1._)`${regExpCode}(${schemaCode}, ${u}).test(${data})`), () => gen.assign(valid, false));
4693
+ cxt.fail$data((0, codegen_1._)`!${valid}`);
4694
+ } else {
4695
+ const regExp = (0, code_1.usePattern)(cxt, schema);
4696
+ cxt.fail$data((0, codegen_1._)`!${regExp}.test(${data})`);
4697
+ }
4689
4698
  }
4690
4699
  };
4691
4700
  exports2.default = def;
4692
4701
  }
4693
4702
  });
4694
4703
 
4695
- // node_modules/.pnpm/ajv@8.17.1/node_modules/ajv/dist/vocabularies/validation/limitProperties.js
4704
+ // node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/validation/limitProperties.js
4696
4705
  var require_limitProperties = __commonJS({
4697
- "node_modules/.pnpm/ajv@8.17.1/node_modules/ajv/dist/vocabularies/validation/limitProperties.js"(exports2) {
4706
+ "node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/validation/limitProperties.js"(exports2) {
4698
4707
  "use strict";
4699
4708
  Object.defineProperty(exports2, "__esModule", { value: true });
4700
4709
  var codegen_1 = require_codegen();
@@ -4721,9 +4730,9 @@ var require_limitProperties = __commonJS({
4721
4730
  }
4722
4731
  });
4723
4732
 
4724
- // node_modules/.pnpm/ajv@8.17.1/node_modules/ajv/dist/vocabularies/validation/required.js
4733
+ // node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/validation/required.js
4725
4734
  var require_required = __commonJS({
4726
- "node_modules/.pnpm/ajv@8.17.1/node_modules/ajv/dist/vocabularies/validation/required.js"(exports2) {
4735
+ "node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/validation/required.js"(exports2) {
4727
4736
  "use strict";
4728
4737
  Object.defineProperty(exports2, "__esModule", { value: true });
4729
4738
  var code_1 = require_code2();
@@ -4803,9 +4812,9 @@ var require_required = __commonJS({
4803
4812
  }
4804
4813
  });
4805
4814
 
4806
- // node_modules/.pnpm/ajv@8.17.1/node_modules/ajv/dist/vocabularies/validation/limitItems.js
4815
+ // node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/validation/limitItems.js
4807
4816
  var require_limitItems = __commonJS({
4808
- "node_modules/.pnpm/ajv@8.17.1/node_modules/ajv/dist/vocabularies/validation/limitItems.js"(exports2) {
4817
+ "node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/validation/limitItems.js"(exports2) {
4809
4818
  "use strict";
4810
4819
  Object.defineProperty(exports2, "__esModule", { value: true });
4811
4820
  var codegen_1 = require_codegen();
@@ -4832,9 +4841,9 @@ var require_limitItems = __commonJS({
4832
4841
  }
4833
4842
  });
4834
4843
 
4835
- // node_modules/.pnpm/ajv@8.17.1/node_modules/ajv/dist/runtime/equal.js
4844
+ // node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/runtime/equal.js
4836
4845
  var require_equal = __commonJS({
4837
- "node_modules/.pnpm/ajv@8.17.1/node_modules/ajv/dist/runtime/equal.js"(exports2) {
4846
+ "node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/runtime/equal.js"(exports2) {
4838
4847
  "use strict";
4839
4848
  Object.defineProperty(exports2, "__esModule", { value: true });
4840
4849
  var equal = require_fast_deep_equal();
@@ -4843,9 +4852,9 @@ var require_equal = __commonJS({
4843
4852
  }
4844
4853
  });
4845
4854
 
4846
- // node_modules/.pnpm/ajv@8.17.1/node_modules/ajv/dist/vocabularies/validation/uniqueItems.js
4855
+ // node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/validation/uniqueItems.js
4847
4856
  var require_uniqueItems = __commonJS({
4848
- "node_modules/.pnpm/ajv@8.17.1/node_modules/ajv/dist/vocabularies/validation/uniqueItems.js"(exports2) {
4857
+ "node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/validation/uniqueItems.js"(exports2) {
4849
4858
  "use strict";
4850
4859
  Object.defineProperty(exports2, "__esModule", { value: true });
4851
4860
  var dataType_1 = require_dataType();
@@ -4910,9 +4919,9 @@ var require_uniqueItems = __commonJS({
4910
4919
  }
4911
4920
  });
4912
4921
 
4913
- // node_modules/.pnpm/ajv@8.17.1/node_modules/ajv/dist/vocabularies/validation/const.js
4922
+ // node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/validation/const.js
4914
4923
  var require_const = __commonJS({
4915
- "node_modules/.pnpm/ajv@8.17.1/node_modules/ajv/dist/vocabularies/validation/const.js"(exports2) {
4924
+ "node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/validation/const.js"(exports2) {
4916
4925
  "use strict";
4917
4926
  Object.defineProperty(exports2, "__esModule", { value: true });
4918
4927
  var codegen_1 = require_codegen();
@@ -4939,9 +4948,9 @@ var require_const = __commonJS({
4939
4948
  }
4940
4949
  });
4941
4950
 
4942
- // node_modules/.pnpm/ajv@8.17.1/node_modules/ajv/dist/vocabularies/validation/enum.js
4951
+ // node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/validation/enum.js
4943
4952
  var require_enum = __commonJS({
4944
- "node_modules/.pnpm/ajv@8.17.1/node_modules/ajv/dist/vocabularies/validation/enum.js"(exports2) {
4953
+ "node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/validation/enum.js"(exports2) {
4945
4954
  "use strict";
4946
4955
  Object.defineProperty(exports2, "__esModule", { value: true });
4947
4956
  var codegen_1 = require_codegen();
@@ -4988,9 +4997,9 @@ var require_enum = __commonJS({
4988
4997
  }
4989
4998
  });
4990
4999
 
4991
- // node_modules/.pnpm/ajv@8.17.1/node_modules/ajv/dist/vocabularies/validation/index.js
5000
+ // node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/validation/index.js
4992
5001
  var require_validation = __commonJS({
4993
- "node_modules/.pnpm/ajv@8.17.1/node_modules/ajv/dist/vocabularies/validation/index.js"(exports2) {
5002
+ "node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/validation/index.js"(exports2) {
4994
5003
  "use strict";
4995
5004
  Object.defineProperty(exports2, "__esModule", { value: true });
4996
5005
  var limitNumber_1 = require_limitNumber();
@@ -5026,9 +5035,9 @@ var require_validation = __commonJS({
5026
5035
  }
5027
5036
  });
5028
5037
 
5029
- // node_modules/.pnpm/ajv@8.17.1/node_modules/ajv/dist/vocabularies/applicator/additionalItems.js
5038
+ // node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/applicator/additionalItems.js
5030
5039
  var require_additionalItems = __commonJS({
5031
- "node_modules/.pnpm/ajv@8.17.1/node_modules/ajv/dist/vocabularies/applicator/additionalItems.js"(exports2) {
5040
+ "node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/applicator/additionalItems.js"(exports2) {
5032
5041
  "use strict";
5033
5042
  Object.defineProperty(exports2, "__esModule", { value: true });
5034
5043
  exports2.validateAdditionalItems = void 0;
@@ -5079,9 +5088,9 @@ var require_additionalItems = __commonJS({
5079
5088
  }
5080
5089
  });
5081
5090
 
5082
- // node_modules/.pnpm/ajv@8.17.1/node_modules/ajv/dist/vocabularies/applicator/items.js
5091
+ // node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/applicator/items.js
5083
5092
  var require_items = __commonJS({
5084
- "node_modules/.pnpm/ajv@8.17.1/node_modules/ajv/dist/vocabularies/applicator/items.js"(exports2) {
5093
+ "node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/applicator/items.js"(exports2) {
5085
5094
  "use strict";
5086
5095
  Object.defineProperty(exports2, "__esModule", { value: true });
5087
5096
  exports2.validateTuple = void 0;
@@ -5136,9 +5145,9 @@ var require_items = __commonJS({
5136
5145
  }
5137
5146
  });
5138
5147
 
5139
- // node_modules/.pnpm/ajv@8.17.1/node_modules/ajv/dist/vocabularies/applicator/prefixItems.js
5148
+ // node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/applicator/prefixItems.js
5140
5149
  var require_prefixItems = __commonJS({
5141
- "node_modules/.pnpm/ajv@8.17.1/node_modules/ajv/dist/vocabularies/applicator/prefixItems.js"(exports2) {
5150
+ "node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/applicator/prefixItems.js"(exports2) {
5142
5151
  "use strict";
5143
5152
  Object.defineProperty(exports2, "__esModule", { value: true });
5144
5153
  var items_1 = require_items();
@@ -5153,9 +5162,9 @@ var require_prefixItems = __commonJS({
5153
5162
  }
5154
5163
  });
5155
5164
 
5156
- // node_modules/.pnpm/ajv@8.17.1/node_modules/ajv/dist/vocabularies/applicator/items2020.js
5165
+ // node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/applicator/items2020.js
5157
5166
  var require_items2020 = __commonJS({
5158
- "node_modules/.pnpm/ajv@8.17.1/node_modules/ajv/dist/vocabularies/applicator/items2020.js"(exports2) {
5167
+ "node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/applicator/items2020.js"(exports2) {
5159
5168
  "use strict";
5160
5169
  Object.defineProperty(exports2, "__esModule", { value: true });
5161
5170
  var codegen_1 = require_codegen();
@@ -5188,9 +5197,9 @@ var require_items2020 = __commonJS({
5188
5197
  }
5189
5198
  });
5190
5199
 
5191
- // node_modules/.pnpm/ajv@8.17.1/node_modules/ajv/dist/vocabularies/applicator/contains.js
5200
+ // node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/applicator/contains.js
5192
5201
  var require_contains = __commonJS({
5193
- "node_modules/.pnpm/ajv@8.17.1/node_modules/ajv/dist/vocabularies/applicator/contains.js"(exports2) {
5202
+ "node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/applicator/contains.js"(exports2) {
5194
5203
  "use strict";
5195
5204
  Object.defineProperty(exports2, "__esModule", { value: true });
5196
5205
  var codegen_1 = require_codegen();
@@ -5282,9 +5291,9 @@ var require_contains = __commonJS({
5282
5291
  }
5283
5292
  });
5284
5293
 
5285
- // node_modules/.pnpm/ajv@8.17.1/node_modules/ajv/dist/vocabularies/applicator/dependencies.js
5294
+ // node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/applicator/dependencies.js
5286
5295
  var require_dependencies = __commonJS({
5287
- "node_modules/.pnpm/ajv@8.17.1/node_modules/ajv/dist/vocabularies/applicator/dependencies.js"(exports2) {
5296
+ "node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/applicator/dependencies.js"(exports2) {
5288
5297
  "use strict";
5289
5298
  Object.defineProperty(exports2, "__esModule", { value: true });
5290
5299
  exports2.validateSchemaDeps = exports2.validatePropertyDeps = exports2.error = void 0;
@@ -5376,9 +5385,9 @@ var require_dependencies = __commonJS({
5376
5385
  }
5377
5386
  });
5378
5387
 
5379
- // node_modules/.pnpm/ajv@8.17.1/node_modules/ajv/dist/vocabularies/applicator/propertyNames.js
5388
+ // node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/applicator/propertyNames.js
5380
5389
  var require_propertyNames = __commonJS({
5381
- "node_modules/.pnpm/ajv@8.17.1/node_modules/ajv/dist/vocabularies/applicator/propertyNames.js"(exports2) {
5390
+ "node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/applicator/propertyNames.js"(exports2) {
5382
5391
  "use strict";
5383
5392
  Object.defineProperty(exports2, "__esModule", { value: true });
5384
5393
  var codegen_1 = require_codegen();
@@ -5419,9 +5428,9 @@ var require_propertyNames = __commonJS({
5419
5428
  }
5420
5429
  });
5421
5430
 
5422
- // node_modules/.pnpm/ajv@8.17.1/node_modules/ajv/dist/vocabularies/applicator/additionalProperties.js
5431
+ // node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/applicator/additionalProperties.js
5423
5432
  var require_additionalProperties = __commonJS({
5424
- "node_modules/.pnpm/ajv@8.17.1/node_modules/ajv/dist/vocabularies/applicator/additionalProperties.js"(exports2) {
5433
+ "node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/applicator/additionalProperties.js"(exports2) {
5425
5434
  "use strict";
5426
5435
  Object.defineProperty(exports2, "__esModule", { value: true });
5427
5436
  var code_1 = require_code2();
@@ -5525,9 +5534,9 @@ var require_additionalProperties = __commonJS({
5525
5534
  }
5526
5535
  });
5527
5536
 
5528
- // node_modules/.pnpm/ajv@8.17.1/node_modules/ajv/dist/vocabularies/applicator/properties.js
5537
+ // node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/applicator/properties.js
5529
5538
  var require_properties = __commonJS({
5530
- "node_modules/.pnpm/ajv@8.17.1/node_modules/ajv/dist/vocabularies/applicator/properties.js"(exports2) {
5539
+ "node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/applicator/properties.js"(exports2) {
5531
5540
  "use strict";
5532
5541
  Object.defineProperty(exports2, "__esModule", { value: true });
5533
5542
  var validate_1 = require_validate();
@@ -5583,9 +5592,9 @@ var require_properties = __commonJS({
5583
5592
  }
5584
5593
  });
5585
5594
 
5586
- // node_modules/.pnpm/ajv@8.17.1/node_modules/ajv/dist/vocabularies/applicator/patternProperties.js
5595
+ // node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/applicator/patternProperties.js
5587
5596
  var require_patternProperties = __commonJS({
5588
- "node_modules/.pnpm/ajv@8.17.1/node_modules/ajv/dist/vocabularies/applicator/patternProperties.js"(exports2) {
5597
+ "node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/applicator/patternProperties.js"(exports2) {
5589
5598
  "use strict";
5590
5599
  Object.defineProperty(exports2, "__esModule", { value: true });
5591
5600
  var code_1 = require_code2();
@@ -5657,9 +5666,9 @@ var require_patternProperties = __commonJS({
5657
5666
  }
5658
5667
  });
5659
5668
 
5660
- // node_modules/.pnpm/ajv@8.17.1/node_modules/ajv/dist/vocabularies/applicator/not.js
5669
+ // node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/applicator/not.js
5661
5670
  var require_not = __commonJS({
5662
- "node_modules/.pnpm/ajv@8.17.1/node_modules/ajv/dist/vocabularies/applicator/not.js"(exports2) {
5671
+ "node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/applicator/not.js"(exports2) {
5663
5672
  "use strict";
5664
5673
  Object.defineProperty(exports2, "__esModule", { value: true });
5665
5674
  var util_1 = require_util();
@@ -5688,9 +5697,9 @@ var require_not = __commonJS({
5688
5697
  }
5689
5698
  });
5690
5699
 
5691
- // node_modules/.pnpm/ajv@8.17.1/node_modules/ajv/dist/vocabularies/applicator/anyOf.js
5700
+ // node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/applicator/anyOf.js
5692
5701
  var require_anyOf = __commonJS({
5693
- "node_modules/.pnpm/ajv@8.17.1/node_modules/ajv/dist/vocabularies/applicator/anyOf.js"(exports2) {
5702
+ "node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/applicator/anyOf.js"(exports2) {
5694
5703
  "use strict";
5695
5704
  Object.defineProperty(exports2, "__esModule", { value: true });
5696
5705
  var code_1 = require_code2();
@@ -5705,9 +5714,9 @@ var require_anyOf = __commonJS({
5705
5714
  }
5706
5715
  });
5707
5716
 
5708
- // node_modules/.pnpm/ajv@8.17.1/node_modules/ajv/dist/vocabularies/applicator/oneOf.js
5717
+ // node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/applicator/oneOf.js
5709
5718
  var require_oneOf = __commonJS({
5710
- "node_modules/.pnpm/ajv@8.17.1/node_modules/ajv/dist/vocabularies/applicator/oneOf.js"(exports2) {
5719
+ "node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/applicator/oneOf.js"(exports2) {
5711
5720
  "use strict";
5712
5721
  Object.defineProperty(exports2, "__esModule", { value: true });
5713
5722
  var codegen_1 = require_codegen();
@@ -5763,9 +5772,9 @@ var require_oneOf = __commonJS({
5763
5772
  }
5764
5773
  });
5765
5774
 
5766
- // node_modules/.pnpm/ajv@8.17.1/node_modules/ajv/dist/vocabularies/applicator/allOf.js
5775
+ // node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/applicator/allOf.js
5767
5776
  var require_allOf = __commonJS({
5768
- "node_modules/.pnpm/ajv@8.17.1/node_modules/ajv/dist/vocabularies/applicator/allOf.js"(exports2) {
5777
+ "node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/applicator/allOf.js"(exports2) {
5769
5778
  "use strict";
5770
5779
  Object.defineProperty(exports2, "__esModule", { value: true });
5771
5780
  var util_1 = require_util();
@@ -5790,9 +5799,9 @@ var require_allOf = __commonJS({
5790
5799
  }
5791
5800
  });
5792
5801
 
5793
- // node_modules/.pnpm/ajv@8.17.1/node_modules/ajv/dist/vocabularies/applicator/if.js
5802
+ // node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/applicator/if.js
5794
5803
  var require_if = __commonJS({
5795
- "node_modules/.pnpm/ajv@8.17.1/node_modules/ajv/dist/vocabularies/applicator/if.js"(exports2) {
5804
+ "node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/applicator/if.js"(exports2) {
5796
5805
  "use strict";
5797
5806
  Object.defineProperty(exports2, "__esModule", { value: true });
5798
5807
  var codegen_1 = require_codegen();
@@ -5859,9 +5868,9 @@ var require_if = __commonJS({
5859
5868
  }
5860
5869
  });
5861
5870
 
5862
- // node_modules/.pnpm/ajv@8.17.1/node_modules/ajv/dist/vocabularies/applicator/thenElse.js
5871
+ // node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/applicator/thenElse.js
5863
5872
  var require_thenElse = __commonJS({
5864
- "node_modules/.pnpm/ajv@8.17.1/node_modules/ajv/dist/vocabularies/applicator/thenElse.js"(exports2) {
5873
+ "node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/applicator/thenElse.js"(exports2) {
5865
5874
  "use strict";
5866
5875
  Object.defineProperty(exports2, "__esModule", { value: true });
5867
5876
  var util_1 = require_util();
@@ -5877,9 +5886,9 @@ var require_thenElse = __commonJS({
5877
5886
  }
5878
5887
  });
5879
5888
 
5880
- // node_modules/.pnpm/ajv@8.17.1/node_modules/ajv/dist/vocabularies/applicator/index.js
5889
+ // node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/applicator/index.js
5881
5890
  var require_applicator = __commonJS({
5882
- "node_modules/.pnpm/ajv@8.17.1/node_modules/ajv/dist/vocabularies/applicator/index.js"(exports2) {
5891
+ "node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/applicator/index.js"(exports2) {
5883
5892
  "use strict";
5884
5893
  Object.defineProperty(exports2, "__esModule", { value: true });
5885
5894
  var additionalItems_1 = require_additionalItems();
@@ -5925,9 +5934,9 @@ var require_applicator = __commonJS({
5925
5934
  }
5926
5935
  });
5927
5936
 
5928
- // node_modules/.pnpm/ajv@8.17.1/node_modules/ajv/dist/vocabularies/format/format.js
5937
+ // node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/format/format.js
5929
5938
  var require_format = __commonJS({
5930
- "node_modules/.pnpm/ajv@8.17.1/node_modules/ajv/dist/vocabularies/format/format.js"(exports2) {
5939
+ "node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/format/format.js"(exports2) {
5931
5940
  "use strict";
5932
5941
  Object.defineProperty(exports2, "__esModule", { value: true });
5933
5942
  var codegen_1 = require_codegen();
@@ -6015,9 +6024,9 @@ var require_format = __commonJS({
6015
6024
  }
6016
6025
  });
6017
6026
 
6018
- // node_modules/.pnpm/ajv@8.17.1/node_modules/ajv/dist/vocabularies/format/index.js
6027
+ // node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/format/index.js
6019
6028
  var require_format2 = __commonJS({
6020
- "node_modules/.pnpm/ajv@8.17.1/node_modules/ajv/dist/vocabularies/format/index.js"(exports2) {
6029
+ "node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/format/index.js"(exports2) {
6021
6030
  "use strict";
6022
6031
  Object.defineProperty(exports2, "__esModule", { value: true });
6023
6032
  var format_1 = require_format();
@@ -6026,9 +6035,9 @@ var require_format2 = __commonJS({
6026
6035
  }
6027
6036
  });
6028
6037
 
6029
- // node_modules/.pnpm/ajv@8.17.1/node_modules/ajv/dist/vocabularies/metadata.js
6038
+ // node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/metadata.js
6030
6039
  var require_metadata = __commonJS({
6031
- "node_modules/.pnpm/ajv@8.17.1/node_modules/ajv/dist/vocabularies/metadata.js"(exports2) {
6040
+ "node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/metadata.js"(exports2) {
6032
6041
  "use strict";
6033
6042
  Object.defineProperty(exports2, "__esModule", { value: true });
6034
6043
  exports2.contentVocabulary = exports2.metadataVocabulary = void 0;
@@ -6049,9 +6058,9 @@ var require_metadata = __commonJS({
6049
6058
  }
6050
6059
  });
6051
6060
 
6052
- // node_modules/.pnpm/ajv@8.17.1/node_modules/ajv/dist/vocabularies/draft7.js
6061
+ // node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/draft7.js
6053
6062
  var require_draft7 = __commonJS({
6054
- "node_modules/.pnpm/ajv@8.17.1/node_modules/ajv/dist/vocabularies/draft7.js"(exports2) {
6063
+ "node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/draft7.js"(exports2) {
6055
6064
  "use strict";
6056
6065
  Object.defineProperty(exports2, "__esModule", { value: true });
6057
6066
  var core_1 = require_core2();
@@ -6071,9 +6080,9 @@ var require_draft7 = __commonJS({
6071
6080
  }
6072
6081
  });
6073
6082
 
6074
- // node_modules/.pnpm/ajv@8.17.1/node_modules/ajv/dist/vocabularies/discriminator/types.js
6083
+ // node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/discriminator/types.js
6075
6084
  var require_types = __commonJS({
6076
- "node_modules/.pnpm/ajv@8.17.1/node_modules/ajv/dist/vocabularies/discriminator/types.js"(exports2) {
6085
+ "node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/discriminator/types.js"(exports2) {
6077
6086
  "use strict";
6078
6087
  Object.defineProperty(exports2, "__esModule", { value: true });
6079
6088
  exports2.DiscrError = void 0;
@@ -6085,9 +6094,9 @@ var require_types = __commonJS({
6085
6094
  }
6086
6095
  });
6087
6096
 
6088
- // node_modules/.pnpm/ajv@8.17.1/node_modules/ajv/dist/vocabularies/discriminator/index.js
6097
+ // node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/discriminator/index.js
6089
6098
  var require_discriminator = __commonJS({
6090
- "node_modules/.pnpm/ajv@8.17.1/node_modules/ajv/dist/vocabularies/discriminator/index.js"(exports2) {
6099
+ "node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/discriminator/index.js"(exports2) {
6091
6100
  "use strict";
6092
6101
  Object.defineProperty(exports2, "__esModule", { value: true });
6093
6102
  var codegen_1 = require_codegen();
@@ -6190,9 +6199,9 @@ var require_discriminator = __commonJS({
6190
6199
  }
6191
6200
  });
6192
6201
 
6193
- // node_modules/.pnpm/ajv@8.17.1/node_modules/ajv/dist/refs/json-schema-draft-07.json
6202
+ // node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/refs/json-schema-draft-07.json
6194
6203
  var require_json_schema_draft_07 = __commonJS({
6195
- "node_modules/.pnpm/ajv@8.17.1/node_modules/ajv/dist/refs/json-schema-draft-07.json"(exports2, module2) {
6204
+ "node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/refs/json-schema-draft-07.json"(exports2, module2) {
6196
6205
  module2.exports = {
6197
6206
  $schema: "http://json-schema.org/draft-07/schema#",
6198
6207
  $id: "http://json-schema.org/draft-07/schema#",
@@ -6347,9 +6356,9 @@ var require_json_schema_draft_07 = __commonJS({
6347
6356
  }
6348
6357
  });
6349
6358
 
6350
- // node_modules/.pnpm/ajv@8.17.1/node_modules/ajv/dist/ajv.js
6359
+ // node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/ajv.js
6351
6360
  var require_ajv = __commonJS({
6352
- "node_modules/.pnpm/ajv@8.17.1/node_modules/ajv/dist/ajv.js"(exports2, module2) {
6361
+ "node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/ajv.js"(exports2, module2) {
6353
6362
  "use strict";
6354
6363
  Object.defineProperty(exports2, "__esModule", { value: true });
6355
6364
  exports2.MissingRefError = exports2.ValidationError = exports2.CodeGen = exports2.Name = exports2.nil = exports2.stringify = exports2.str = exports2._ = exports2.KeywordCxt = exports2.Ajv = void 0;
@@ -6660,6 +6669,65 @@ var AttributeTransformer = class _AttributeTransformer extends Transformer {
6660
6669
  }
6661
6670
  };
6662
6671
 
6672
+ // src/transformers/boolean.ts
6673
+ var BooleanTransformer = class extends Transformer {
6674
+ static getName() {
6675
+ return "boolean";
6676
+ }
6677
+ inputType() {
6678
+ return BOOLEAN;
6679
+ }
6680
+ outputType() {
6681
+ return BOOLEAN;
6682
+ }
6683
+ transform({ val }) {
6684
+ if (Array.isArray(val)) {
6685
+ return val.length > 0;
6686
+ }
6687
+ if (val !== null && typeof val === "object") {
6688
+ return Object.keys(val).length > 0;
6689
+ }
6690
+ return Boolean(val);
6691
+ }
6692
+ };
6693
+
6694
+ // src/errors/invalid-parse-input-error.ts
6695
+ var InvalidParseInputError = class extends Error {
6696
+ constructor(property, message) {
6697
+ super(message);
6698
+ this.property = property;
6699
+ }
6700
+ };
6701
+
6702
+ // src/transformers/capitalize.ts
6703
+ var CapitalizeTransformer = class extends Transformer {
6704
+ static getName() {
6705
+ return "capitalize";
6706
+ }
6707
+ inputType() {
6708
+ return STRING;
6709
+ }
6710
+ outputType() {
6711
+ return STRING;
6712
+ }
6713
+ transform({ property, val }) {
6714
+ if (val === null) {
6715
+ return null;
6716
+ }
6717
+ if (typeof val !== "string") {
6718
+ throw new InvalidParseInputError(
6719
+ property,
6720
+ `CapitalizeTransformer.transform: invalid value type: ${typeof val}`
6721
+ );
6722
+ }
6723
+ if (val.length === 0) {
6724
+ return val;
6725
+ }
6726
+ const lower = val.toLowerCase();
6727
+ return lower.charAt(0).toUpperCase() + lower.slice(1);
6728
+ }
6729
+ };
6730
+
6663
6731
  // src/transformers/exists.ts
6664
6732
  var Exists = class extends Transformer {
6665
6733
  static getName() {
@@ -6692,6 +6760,40 @@ var HTMLTransformer = class extends Transformer {
6692
6760
  }
6693
6761
  };
6694
6762
 
6763
+ // src/core/complex-types.ts
6764
+ var OBJECT = Symbol("OBJECT");
6765
+ var ARRAY = Symbol("ARRAY");
6766
+
6767
+ // src/transformers/join.ts
6768
+ var JoinTransformer = class extends Transformer {
6769
+ constructor(args) {
6770
+ super();
6771
+ this.args = args;
6772
+ }
6773
+ static getName() {
6774
+ return "join";
6775
+ }
6776
+ inputType() {
6777
+ return ARRAY;
6778
+ }
6779
+ outputType() {
6780
+ return STRING;
6781
+ }
6782
+ transform({ property, val }) {
6783
+ if (val === null) {
6784
+ return null;
6785
+ }
6786
+ if (!Array.isArray(val)) {
6787
+ throw new InvalidParseInputError(
6788
+ property,
6789
+ `JoinTransformer.transform: invalid value type: ${typeof val}`
6790
+ );
6791
+ }
6792
+ const [delimiter = ""] = this.args;
6793
+ return val.map((item) => String(item)).join(delimiter);
6794
+ }
6795
+ };
6796
+
6695
6797
  // src/transformers/json.ts
6696
6798
  var JSONTransformer = class extends Transformer {
6697
6799
  static getName() {
@@ -6711,11 +6813,142 @@ var JSONTransformer = class extends Transformer {
6711
6813
  }
6712
6814
  };
6713
6815
 
6714
- // src/errors/invalid-parse-input-error.ts
6715
- var InvalidParseInputError = class extends Error {
6716
- constructor(property, message) {
6717
- super(message);
6718
- this.property = property;
6816
+ // src/transformers/jsonpath.ts
6817
+ var isIdentChar = (ch) => /[A-Za-z0-9_]/.test(ch);
6818
+ function parseJsonPath(path) {
6819
+ if (path.length === 0 || path[0] !== "$") {
6820
+ throw new Error(
6821
+ `jsonpath: invalid path ${JSON.stringify(path)}: must start with "$"`
6822
+ );
6823
+ }
6824
+ const segments = [];
6825
+ const n = path.length;
6826
+ let i = 1;
6827
+ while (i < n) {
6828
+ const ch = path[i];
6829
+ if (ch === ".") {
6830
+ i += 1;
6831
+ const start = i;
6832
+ while (i < n && isIdentChar(path[i])) {
6833
+ i += 1;
6834
+ }
6835
+ if (i === start) {
6836
+ throw new Error(
6837
+ `jsonpath: invalid path ${JSON.stringify(path)}: expected a name after "."`
6838
+ );
6839
+ }
6840
+ segments.push({ type: "key", key: path.slice(start, i) });
6841
+ continue;
6842
+ }
6843
+ if (ch === "[") {
6844
+ i += 1;
6845
+ if (i >= n) {
6846
+ throw new Error(
6847
+ `jsonpath: invalid path ${JSON.stringify(path)}: unterminated "["`
6848
+ );
6849
+ }
6850
+ const next = path[i];
6851
+ if (next === '"' || next === "'") {
6852
+ const quote = next;
6853
+ i += 1;
6854
+ let key = "";
6855
+ while (i < n && path[i] !== quote) {
6856
+ if (path[i] === "\\" && i + 1 < n && (path[i + 1] === quote || path[i + 1] === "\\")) {
6857
+ key += path[i + 1];
6858
+ i += 2;
6859
+ } else {
6860
+ key += path[i];
6861
+ i += 1;
6862
+ }
6863
+ }
6864
+ if (i >= n) {
6865
+ throw new Error(
6866
+ `jsonpath: invalid path ${JSON.stringify(path)}: unterminated quoted key`
6867
+ );
6868
+ }
6869
+ i += 1;
6870
+ segments.push({ type: "key", key });
6871
+ } else if (next === "-" || next >= "0" && next <= "9") {
6872
+ const start = i;
6873
+ if (next === "-") {
6874
+ i += 1;
6875
+ }
6876
+ const digitsStart = i;
6877
+ while (i < n && path[i] >= "0" && path[i] <= "9") {
6878
+ i += 1;
6879
+ }
6880
+ if (i === digitsStart) {
6881
+ throw new Error(
6882
+ `jsonpath: invalid path ${JSON.stringify(path)}: expected an index inside "[]"`
6883
+ );
6884
+ }
6885
+ segments.push({
6886
+ type: "index",
6887
+ index: parseInt(path.slice(start, i), 10)
6888
+ });
6889
+ } else {
6890
+ throw new Error(
6891
+ `jsonpath: invalid path ${JSON.stringify(path)}: expected an index or quoted key inside "[]"`
6892
+ );
6893
+ }
6894
+ if (path[i] !== "]") {
6895
+ throw new Error(
6896
+ `jsonpath: invalid path ${JSON.stringify(path)}: expected "]"`
6897
+ );
6898
+ }
6899
+ i += 1;
6900
+ continue;
6901
+ }
6902
+ throw new Error(
6903
+ `jsonpath: invalid path ${JSON.stringify(path)}: unexpected character "${ch}" at position ${i}`
6904
+ );
6905
+ }
6906
+ return segments;
6907
+ }
6908
+ function evaluateJsonPath(root, segments) {
6909
+ let current = root;
6910
+ for (const segment of segments) {
6911
+ if (current === null || current === void 0) {
6912
+ return null;
6913
+ }
6914
+ if (segment.type === "key") {
6915
+ if (typeof current !== "object" || Array.isArray(current)) {
6916
+ return null;
6917
+ }
6918
+ current = current[segment.key];
6919
+ } else {
6920
+ if (!Array.isArray(current)) {
6921
+ return null;
6922
+ }
6923
+ const index = segment.index < 0 ? current.length + segment.index : segment.index;
6924
+ current = index >= 0 && index < current.length ? current[index] : void 0;
6925
+ }
6926
+ }
6927
+ return current === void 0 ? null : current;
6928
+ }
6929
+ var JSONPathTransformer = class extends Transformer {
6930
+ constructor(args) {
6931
+ super();
6932
+ this.args = args;
6933
+ }
6934
+ static getName() {
6935
+ return "jsonpath";
6936
+ }
6937
+ inputType() {
6938
+ return STRING;
6939
+ }
6940
+ outputType() {
6941
+ return STRING;
6942
+ }
6943
+ transform({ val }) {
6944
+ if (val === null || val === void 0) {
6945
+ return null;
6946
+ }
6947
+ const [path] = this.args;
6948
+ if (path === void 0) {
6949
+ throw new Error('jsonpath: requires a path, e.g. jsonpath("$.a.b")');
6950
+ }
6951
+ return evaluateJsonPath(val, parseJsonPath(path));
6719
6952
  }
6720
6953
  };
6721
6954
 
@@ -6741,6 +6974,31 @@ var Length = class extends Transformer {
6741
6974
  }
6742
6975
  };
6743
6976
 
6977
+ // src/transformers/lower.ts
6978
+ var LowerTransformer = class extends Transformer {
6979
+ static getName() {
6980
+ return "lower";
6981
+ }
6982
+ inputType() {
6983
+ return STRING;
6984
+ }
6985
+ outputType() {
6986
+ return STRING;
6987
+ }
6988
+ transform({ property, val }) {
6989
+ if (val === null) {
6990
+ return null;
6991
+ }
6992
+ if (typeof val === "string") {
6993
+ return val.toLowerCase();
6994
+ }
6995
+ throw new InvalidParseInputError(
6996
+ property,
6997
+ `LowerTransformer.transform: invalid value type: ${typeof val}`
6998
+ );
6999
+ }
7000
+ };
7001
+
6744
7002
  // src/transformers/number.ts
6745
7003
  var NumberTransformer = class extends Transformer {
6746
7004
  static getName() {
@@ -6839,6 +7097,41 @@ var RemoveUrlQueryParam = class _RemoveUrlQueryParam extends Transformer {
6839
7097
  }
6840
7098
  };
6841
7099
 
7100
+ // src/transformers/replace.ts
7101
+ var ReplaceTransformer = class extends Transformer {
7102
+ constructor(args) {
7103
+ super();
7104
+ this.args = args;
7105
+ }
7106
+ static getName() {
7107
+ return "replace";
7108
+ }
7109
+ inputType() {
7110
+ return STRING;
7111
+ }
7112
+ outputType() {
7113
+ return STRING;
7114
+ }
7115
+ transform({ property, val }) {
7116
+ if (val === null) {
7117
+ return null;
7118
+ }
7119
+ if (typeof val !== "string") {
7120
+ throw new InvalidParseInputError(
7121
+ property,
7122
+ `ReplaceTransformer.transform: invalid value type: ${typeof val}`
7123
+ );
7124
+ }
7125
+ const [pattern, replacement] = this.args;
7126
+ if (pattern === void 0 || replacement === void 0) {
7127
+ throw new Error(
7128
+ 'replace: requires a pattern and a replacement, e.g. replace("\\s+", " ")'
7129
+ );
7130
+ }
7131
+ return val.replace(new RegExp(pattern, "g"), replacement);
7132
+ }
7133
+ };
7134
+
6842
7135
  // src/transformers/resolve.ts
6843
7136
  var ResolveTransformer = class extends Transformer {
6844
7137
  static getName() {
@@ -6861,6 +7154,40 @@ var ResolveTransformer = class extends Transformer {
6861
7154
  }
6862
7155
  };
6863
7156
 
7157
+ // src/transformers/split.ts
7158
+ var SplitTransformer = class extends Transformer {
7159
+ constructor(args) {
7160
+ super();
7161
+ this.args = args;
7162
+ }
7163
+ static getName() {
7164
+ return "split";
7165
+ }
7166
+ inputType() {
7167
+ return STRING;
7168
+ }
7169
+ outputType() {
7170
+ return ARRAY;
7171
+ }
7172
+ transform({ property, val }) {
7173
+ if (val === null) {
7174
+ return null;
7175
+ }
7176
+ if (typeof val !== "string") {
7177
+ throw new InvalidParseInputError(
7178
+ property,
7179
+ `SplitTransformer.transform: invalid value type: ${typeof val}`
7180
+ );
7181
+ }
7182
+ const [delimiter] = this.args;
7183
+ if (delimiter === void 0) {
7184
+ const trimmed = val.trim();
7185
+ return trimmed === "" ? [] : trimmed.split(/\s+/);
7186
+ }
7187
+ return val.split(delimiter);
7188
+ }
7189
+ };
7190
+
6864
7191
  // src/transformers/trim.ts
6865
7192
  var Trim = class extends Transformer {
6866
7193
  static getName() {
@@ -6886,6 +7213,31 @@ var Trim = class extends Transformer {
6886
7213
  }
6887
7214
  };
6888
7215
 
7216
+ // src/transformers/upper.ts
7217
+ var UpperTransformer = class extends Transformer {
7218
+ static getName() {
7219
+ return "upper";
7220
+ }
7221
+ inputType() {
7222
+ return STRING;
7223
+ }
7224
+ outputType() {
7225
+ return STRING;
7226
+ }
7227
+ transform({ property, val }) {
7228
+ if (val === null) {
7229
+ return null;
7230
+ }
7231
+ if (typeof val === "string") {
7232
+ return val.toUpperCase();
7233
+ }
7234
+ throw new InvalidParseInputError(
7235
+ property,
7236
+ `UpperTransformer.transform: invalid value type: ${typeof val}`
7237
+ );
7238
+ }
7239
+ };
7240
+
6889
7241
  // src/transformers/url-query-param.ts
6890
7242
  var UrlQueryParamTransformer = class _UrlQueryParamTransformer extends Transformer {
6891
7243
  constructor(args) {
@@ -6933,15 +7285,23 @@ var UrlQueryParamTransformer = class _UrlQueryParamTransformer extends Transform
6933
7285
  var Transformers = class _Transformers {
6934
7286
  static transformers = [
6935
7287
  AttributeTransformer,
7288
+ BooleanTransformer,
7289
+ CapitalizeTransformer,
6936
7290
  Exists,
6937
7291
  HTMLTransformer,
7292
+ JoinTransformer,
6938
7293
  JSONTransformer,
7294
+ JSONPathTransformer,
6939
7295
  Length,
7296
+ LowerTransformer,
6940
7297
  NumberTransformer,
6941
7298
  RemoveLastPathSection,
6942
7299
  RemoveUrlQueryParam,
7300
+ ReplaceTransformer,
6943
7301
  ResolveTransformer,
7302
+ SplitTransformer,
6944
7303
  Trim,
7304
+ UpperTransformer,
6945
7305
  UrlQueryParamTransformer
6946
7306
  ];
6947
7307
  static getByName(name) {
@@ -6950,9 +7310,9 @@ var Transformers = class _Transformers {
6950
7310
  };
6951
7311
 
6952
7312
  // src/transformers/factory.ts
7313
+ var ARG_PATTERN = /(?:"(?:[^"\\]|\\.)*"|'(?:[^'\\]|\\.)*'|[\w-]+)/.source;
7314
+ var TRANSFORMER_DEFINITION_REGEX = `^[\\w-]+(\\((\\s*${ARG_PATTERN}\\s*(,\\s*${ARG_PATTERN}\\s*)*)?\\))?$`;
6953
7315
  var TRANSFORMER_NAME_REGEX = /^([\w-]+[^(])/;
6954
- var TRANSFORMER_ARGUMENT_PARANTHESIS_REGEX = /\(([\w-]+\s*,?\s*)*\)/;
6955
- var TRANSFORMER_ARGUMENT_NAME_REGEX = /[\w-]+/g;
6956
7316
  var TransformerFactory = class _TransformerFactory {
6957
7317
  static create(transform) {
6958
7318
  const transformerName = _TransformerFactory.extractTransformerName(transform);
@@ -6971,19 +7331,74 @@ var TransformerFactory = class _TransformerFactory {
6971
7331
  return matches[0];
6972
7332
  }
6973
7333
  static extractTransformerArgs(def) {
6974
- const argsParanthesisMatch = def.match(
6975
- TRANSFORMER_ARGUMENT_PARANTHESIS_REGEX
6976
- );
6977
- if (argsParanthesisMatch === null) {
7334
+ const openIndex = def.indexOf("(");
7335
+ if (openIndex === -1) {
6978
7336
  return [];
6979
7337
  }
6980
- const argMatches = argsParanthesisMatch[0].match(
6981
- TRANSFORMER_ARGUMENT_NAME_REGEX
6982
- );
6983
- if (argMatches === null) {
7338
+ const closeIndex = def.lastIndexOf(")");
7339
+ if (closeIndex === -1 || closeIndex < openIndex) {
6984
7340
  return [];
6985
7341
  }
6986
- return argMatches;
7342
+ return _TransformerFactory.parseArgList(
7343
+ def.slice(openIndex + 1, closeIndex)
7344
+ );
7345
+ }
7346
+ /**
7347
+ * Parses a comma-separated argument list, honoring single- and
7348
+ * double-quoted arguments so that delimiters, regex patterns, and
7349
+ * replacement strings can contain commas, spaces, and other characters
7350
+ * that would otherwise conflict with the comma separator, e.g.
7351
+ * replace("\s+", " ") or split(", "). Inside a quoted argument, a
7352
+ * backslash escapes the matching quote character or another backslash
7353
+ * (\" or \\); any other backslash (e.g. the \s above) is left untouched
7354
+ * so regex patterns pass through unchanged. Bare (unquoted) arguments are
7355
+ * trimmed of surrounding whitespace but otherwise taken verbatim.
7356
+ */
7357
+ static parseArgList(argsStr) {
7358
+ const args = [];
7359
+ let i = 0;
7360
+ const n = argsStr.length;
7361
+ const isSpace = (ch) => ch === " " || ch === " " || ch === "\n";
7362
+ while (i < n) {
7363
+ while (i < n && isSpace(argsStr.charAt(i))) {
7364
+ i += 1;
7365
+ }
7366
+ if (i >= n) {
7367
+ break;
7368
+ }
7369
+ const ch = argsStr.charAt(i);
7370
+ if (ch === '"' || ch === "'") {
7371
+ const quote = ch;
7372
+ i += 1;
7373
+ let value = "";
7374
+ while (i < n && argsStr.charAt(i) !== quote) {
7375
+ const c = argsStr.charAt(i);
7376
+ const next = argsStr.charAt(i + 1);
7377
+ if (c === "\\" && i + 1 < n && (next === quote || next === "\\")) {
7378
+ value += next;
7379
+ i += 2;
7380
+ } else {
7381
+ value += c;
7382
+ i += 1;
7383
+ }
7384
+ }
7385
+ i += 1;
7386
+ args.push(value);
7387
+ } else {
7388
+ const start = i;
7389
+ while (i < n && argsStr.charAt(i) !== ",") {
7390
+ i += 1;
7391
+ }
7392
+ args.push(argsStr.slice(start, i).trim());
7393
+ }
7394
+ while (i < n && isSpace(argsStr.charAt(i))) {
7395
+ i += 1;
7396
+ }
7397
+ if (i < n && argsStr.charAt(i) === ",") {
7398
+ i += 1;
7399
+ }
7400
+ }
7401
+ return args;
6987
7402
  }
6988
7403
  };
6989
7404
 
@@ -7012,6 +7427,22 @@ var ConstantConfig = class _ConstantConfig extends ConfigWithSelector {
7012
7427
  }
7013
7428
  };
7014
7429
 
7430
+ // src/config/types/default.ts
7431
+ var DefaultValueConfig = class _DefaultValueConfig extends Config {
7432
+ constructor(inner, defaultValue) {
7433
+ super();
7434
+ this.inner = inner;
7435
+ this.defaultValue = defaultValue;
7436
+ }
7437
+ extract(params) {
7438
+ const val = this.inner.extract(params);
7439
+ return val === null ? this.defaultValue : val;
7440
+ }
7441
+ static generate(inner, defaultValue) {
7442
+ return new _DefaultValueConfig(inner, defaultValue);
7443
+ }
7444
+ };
7445
+
7015
7446
  // src/config/types/object.ts
7016
7447
  var ObjectConfig = class _ObjectConfig extends ConfigWithSelector {
7017
7448
  static generate(selector, properties) {
@@ -7149,7 +7580,7 @@ var oneOf = [
7149
7580
  },
7150
7581
  type: {
7151
7582
  type: "string",
7152
- enum: ["string", "object", "array", "union"]
7583
+ enum: ["string", "number", "boolean", "object", "array", "union"]
7153
7584
  },
7154
7585
  items: { $ref: "config-schema.json" },
7155
7586
  properties: {
@@ -7160,17 +7591,20 @@ var oneOf = [
7160
7591
  oneOf: [
7161
7592
  {
7162
7593
  type: "string",
7163
- pattern: "^[\\w-]+(\\(([\\w-]+|(([\\w-]+\\s*,\\s*)*[\\w-]+))?\\))?$"
7594
+ pattern: `^[\\w-]+(\\((\\s*(?:"(?:[^"\\\\]|\\\\.)*"|'(?:[^'\\\\]|\\\\.)*'|[\\w-]+)\\s*(,\\s*(?:"(?:[^"\\\\]|\\\\.)*"|'(?:[^'\\\\]|\\\\.)*'|[\\w-]+)\\s*)*)?\\))?$`
7164
7595
  },
7165
7596
  {
7166
7597
  type: "array",
7167
7598
  items: {
7168
7599
  type: "string",
7169
- pattern: "^[\\w-]+(\\(([\\w-]+|(([\\w-]+\\s*,\\s*)*[\\w-]+))?\\))?$"
7600
+ pattern: `^[\\w-]+(\\((\\s*(?:"(?:[^"\\\\]|\\\\.)*"|'(?:[^'\\\\]|\\\\.)*'|[\\w-]+)\\s*(,\\s*(?:"(?:[^"\\\\]|\\\\.)*"|'(?:[^'\\\\]|\\\\.)*'|[\\w-]+)\\s*)*)?\\))?$`
7170
7601
  },
7171
7602
  minItems: 1
7172
7603
  }
7173
7604
  ]
7605
+ },
7606
+ default: {
7607
+ $comment: "fallback value returned in place of null when the selector matches nothing"
7174
7608
  }
7175
7609
  },
7176
7610
  required: [],
@@ -7230,6 +7664,9 @@ var oneOf = [
7230
7664
  type: "array",
7231
7665
  items: { $ref: "config-schema.json" },
7232
7666
  minItems: 1
7667
+ },
7668
+ default: {
7669
+ $comment: "fallback value returned in place of null when no union member matches"
7233
7670
  }
7234
7671
  },
7235
7672
  required: ["union"],
@@ -7238,7 +7675,13 @@ var oneOf = [
7238
7675
  {
7239
7676
  $comment: "Constant",
7240
7677
  type: "object",
7241
- properties: { selector: { type: "string" }, constant: {} },
7678
+ properties: {
7679
+ selector: { type: "string" },
7680
+ constant: {},
7681
+ default: {
7682
+ $comment: "fallback value returned in place of null when the selector matches nothing"
7683
+ }
7684
+ },
7242
7685
  required: ["constant"],
7243
7686
  additionalProperties: false
7244
7687
  }
@@ -7285,41 +7728,72 @@ var ConfigFactory = class _ConfigFactory {
7285
7728
  transform: transformOrig,
7286
7729
  properties,
7287
7730
  items,
7288
- union
7731
+ union,
7732
+ default: defaultValue
7289
7733
  } = plain;
7290
7734
  const selector = _ConfigFactory.generateSelector(selectorOrig);
7291
7735
  const expectedType = _ConfigFactory.detectExpectedType(plain);
7292
7736
  const transform = transformOrig ? _ConfigFactory.generateTransform(transformOrig) : void 0;
7293
- switch (expectedType) {
7294
- case "constant":
7295
- return ConstantConfig.generate(constant, selector);
7296
- case "object": {
7297
- let propConfigs;
7298
- if (properties) {
7299
- propConfigs = Object.keys(properties).reduce(
7300
- (acc, key) => {
7301
- acc[key] = _ConfigFactory.generate(properties[key]);
7302
- return acc;
7303
- },
7304
- {}
7305
- );
7737
+ const config = (() => {
7738
+ switch (expectedType) {
7739
+ case "constant":
7740
+ return ConstantConfig.generate(constant, selector);
7741
+ case "object": {
7742
+ let propConfigs;
7743
+ if (properties) {
7744
+ propConfigs = Object.keys(properties).reduce(
7745
+ (acc, key) => {
7746
+ acc[key] = _ConfigFactory.generate(properties[key]);
7747
+ return acc;
7748
+ },
7749
+ {}
7750
+ );
7751
+ }
7752
+ return ObjectConfig.generate(selector, propConfigs);
7306
7753
  }
7307
- return ObjectConfig.generate(selector, propConfigs);
7754
+ case "array":
7755
+ return ArrayConfig.generate(
7756
+ selector,
7757
+ items && _ConfigFactory.generate(items),
7758
+ transform
7759
+ );
7760
+ case "union":
7761
+ return UnionConfig.generate(
7762
+ // biome-ignore lint/style/noNonNullAssertion: union will be present here. because our schema already validated the input
7763
+ union.map((cfg) => _ConfigFactory.generate(cfg))
7764
+ );
7765
+ default:
7766
+ return PrimitiveValueConfig.generate(
7767
+ selector,
7768
+ _ConfigFactory.appendTypeCoercion(plain.type, transform)
7769
+ );
7308
7770
  }
7309
- case "array":
7310
- return ArrayConfig.generate(
7311
- selector,
7312
- items && _ConfigFactory.generate(items),
7313
- transform
7314
- );
7315
- case "union":
7316
- return UnionConfig.generate(
7317
- // biome-ignore lint/style/noNonNullAssertion: union will be present here. because our schema already validated the input
7318
- union.map((cfg) => _ConfigFactory.generate(cfg))
7319
- );
7320
- default:
7321
- return PrimitiveValueConfig.generate(selector, transform);
7771
+ })();
7772
+ if (defaultValue !== void 0) {
7773
+ return DefaultValueConfig.generate(
7774
+ config,
7775
+ defaultValue
7776
+ );
7322
7777
  }
7778
+ return config;
7779
+ }
7780
+ /**
7781
+ * `type: number` / `type: boolean` on a primitive value are sugar for
7782
+ * appending the corresponding transformer to the end of the transform
7783
+ * chain, so the extracted value is coerced even when no explicit
7784
+ * `transform` is provided. `type: string` (or no type) is left as-is.
7785
+ */
7786
+ static appendTypeCoercion(type2, transform) {
7787
+ if (type2 !== "number" && type2 !== "boolean") {
7788
+ return transform;
7789
+ }
7790
+ const coercion = TransformerFactory.create(type2);
7791
+ if (!transform) {
7792
+ return coercion;
7793
+ }
7794
+ return (Array.isArray(transform) ? transform : [transform]).concat(
7795
+ coercion
7796
+ );
7323
7797
  }
7324
7798
  static generateSelector(selector) {
7325
7799
  if (typeof selector === "string") {