@xpert-ai/plugin-sdk 0.0.3-0 → 3.6.0-beta.6

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/index.esm.js CHANGED
@@ -6,6 +6,8 @@ import http from 'http';
6
6
  import https from 'https';
7
7
  import fsPromises from 'fs/promises';
8
8
  import path from 'path';
9
+ import { createInstance } from 'i18next';
10
+ import FsBackend from 'i18next-fs-backend';
9
11
 
10
12
  // Current version.
11
13
  var VERSION = "1.13.7";
@@ -2657,7 +2659,7 @@ function _assert_this_initialized$n(self) {
2657
2659
  }
2658
2660
  return self;
2659
2661
  }
2660
- function _class_call_check$F(instance, Constructor) {
2662
+ function _class_call_check$G(instance, Constructor) {
2661
2663
  if (!(instance instanceof Constructor)) {
2662
2664
  throw new TypeError("Cannot call a class as a function");
2663
2665
  }
@@ -2679,7 +2681,7 @@ function _construct$7(Parent, args, Class) {
2679
2681
  }
2680
2682
  return _construct$7.apply(null, arguments);
2681
2683
  }
2682
- function _defineProperties$z(target, props) {
2684
+ function _defineProperties$A(target, props) {
2683
2685
  for(var i = 0; i < props.length; i++){
2684
2686
  var descriptor = props[i];
2685
2687
  descriptor.enumerable = descriptor.enumerable || false;
@@ -2688,9 +2690,9 @@ function _defineProperties$z(target, props) {
2688
2690
  Object.defineProperty(target, descriptor.key, descriptor);
2689
2691
  }
2690
2692
  }
2691
- function _create_class$z(Constructor, protoProps, staticProps) {
2692
- if (protoProps) _defineProperties$z(Constructor.prototype, protoProps);
2693
- if (staticProps) _defineProperties$z(Constructor, staticProps);
2693
+ function _create_class$A(Constructor, protoProps, staticProps) {
2694
+ if (protoProps) _defineProperties$A(Constructor.prototype, protoProps);
2695
+ if (staticProps) _defineProperties$A(Constructor, staticProps);
2694
2696
  return Constructor;
2695
2697
  }
2696
2698
  function _get_prototype_of$n(o) {
@@ -2828,7 +2830,7 @@ var ZodError = /*#__PURE__*/ function _target(Error1) {
2828
2830
  _inherits$n(ZodError, Error1);
2829
2831
  var _super = _create_super$n(ZodError);
2830
2832
  function ZodError(issues) {
2831
- _class_call_check$F(this, ZodError);
2833
+ _class_call_check$G(this, ZodError);
2832
2834
  var _this;
2833
2835
  _this = _super.call(this);
2834
2836
  _this.issues = [];
@@ -2852,7 +2854,7 @@ var ZodError = /*#__PURE__*/ function _target(Error1) {
2852
2854
  _this.issues = issues;
2853
2855
  return _this;
2854
2856
  }
2855
- _create_class$z(ZodError, [
2857
+ _create_class$A(ZodError, [
2856
2858
  {
2857
2859
  key: "errors",
2858
2860
  get: function get() {
@@ -3140,12 +3142,12 @@ function _async_to_generator$q(fn) {
3140
3142
  });
3141
3143
  };
3142
3144
  }
3143
- function _class_call_check$E(instance, Constructor) {
3145
+ function _class_call_check$F(instance, Constructor) {
3144
3146
  if (!(instance instanceof Constructor)) {
3145
3147
  throw new TypeError("Cannot call a class as a function");
3146
3148
  }
3147
3149
  }
3148
- function _defineProperties$y(target, props) {
3150
+ function _defineProperties$z(target, props) {
3149
3151
  for(var i = 0; i < props.length; i++){
3150
3152
  var descriptor = props[i];
3151
3153
  descriptor.enumerable = descriptor.enumerable || false;
@@ -3154,9 +3156,9 @@ function _defineProperties$y(target, props) {
3154
3156
  Object.defineProperty(target, descriptor.key, descriptor);
3155
3157
  }
3156
3158
  }
3157
- function _create_class$y(Constructor, protoProps, staticProps) {
3158
- if (protoProps) _defineProperties$y(Constructor.prototype, protoProps);
3159
- if (staticProps) _defineProperties$y(Constructor, staticProps);
3159
+ function _create_class$z(Constructor, protoProps, staticProps) {
3160
+ if (protoProps) _defineProperties$z(Constructor.prototype, protoProps);
3161
+ if (staticProps) _defineProperties$z(Constructor, staticProps);
3160
3162
  return Constructor;
3161
3163
  }
3162
3164
  function _define_property$O(obj, key, value) {
@@ -3388,10 +3390,10 @@ function addIssueToContext(ctx, issueData) {
3388
3390
  }
3389
3391
  var ParseStatus = /*#__PURE__*/ function() {
3390
3392
  function ParseStatus() {
3391
- _class_call_check$E(this, ParseStatus);
3393
+ _class_call_check$F(this, ParseStatus);
3392
3394
  this.value = "valid";
3393
3395
  }
3394
- _create_class$y(ParseStatus, [
3396
+ _create_class$z(ParseStatus, [
3395
3397
  {
3396
3398
  key: "dirty",
3397
3399
  value: function dirty() {
@@ -3649,12 +3651,12 @@ function _async_to_generator$p(fn) {
3649
3651
  });
3650
3652
  };
3651
3653
  }
3652
- function _class_call_check$D(instance, Constructor) {
3654
+ function _class_call_check$E(instance, Constructor) {
3653
3655
  if (!(instance instanceof Constructor)) {
3654
3656
  throw new TypeError("Cannot call a class as a function");
3655
3657
  }
3656
3658
  }
3657
- function _defineProperties$x(target, props) {
3659
+ function _defineProperties$y(target, props) {
3658
3660
  for(var i = 0; i < props.length; i++){
3659
3661
  var descriptor = props[i];
3660
3662
  descriptor.enumerable = descriptor.enumerable || false;
@@ -3663,9 +3665,9 @@ function _defineProperties$x(target, props) {
3663
3665
  Object.defineProperty(target, descriptor.key, descriptor);
3664
3666
  }
3665
3667
  }
3666
- function _create_class$x(Constructor, protoProps, staticProps) {
3667
- if (protoProps) _defineProperties$x(Constructor.prototype, protoProps);
3668
- if (staticProps) _defineProperties$x(Constructor, staticProps);
3668
+ function _create_class$y(Constructor, protoProps, staticProps) {
3669
+ if (protoProps) _defineProperties$y(Constructor.prototype, protoProps);
3670
+ if (staticProps) _defineProperties$y(Constructor, staticProps);
3669
3671
  return Constructor;
3670
3672
  }
3671
3673
  function _define_property$N(obj, key, value) {
@@ -3926,14 +3928,14 @@ function _ts_generator$q(thisArg, body) {
3926
3928
  }
3927
3929
  var ParseInputLazyPath = /*#__PURE__*/ function() {
3928
3930
  function ParseInputLazyPath(parent, value, path, key) {
3929
- _class_call_check$D(this, ParseInputLazyPath);
3931
+ _class_call_check$E(this, ParseInputLazyPath);
3930
3932
  this._cachedPath = [];
3931
3933
  this.parent = parent;
3932
3934
  this.data = value;
3933
3935
  this._path = path;
3934
3936
  this._key = key;
3935
3937
  }
3936
- _create_class$x(ParseInputLazyPath, [
3938
+ _create_class$y(ParseInputLazyPath, [
3937
3939
  {
3938
3940
  key: "path",
3939
3941
  get: function get() {
@@ -4014,7 +4016,7 @@ function processCreateParams(params) {
4014
4016
  var ZodType = /*#__PURE__*/ function() {
4015
4017
  function ZodType(def) {
4016
4018
  var _this = this;
4017
- _class_call_check$D(this, ZodType);
4019
+ _class_call_check$E(this, ZodType);
4018
4020
  /** Alias of safeParseAsync */ this.spa = this.safeParseAsync;
4019
4021
  this._def = def;
4020
4022
  this.parse = this.parse.bind(this);
@@ -4049,7 +4051,7 @@ var ZodType = /*#__PURE__*/ function() {
4049
4051
  }
4050
4052
  };
4051
4053
  }
4052
- _create_class$x(ZodType, [
4054
+ _create_class$y(ZodType, [
4053
4055
  {
4054
4056
  key: "description",
4055
4057
  get: function get() {
@@ -4562,10 +4564,10 @@ var ZodString = /*#__PURE__*/ function(ZodType) {
4562
4564
  _inherits$m(ZodString, ZodType);
4563
4565
  var _super = _create_super$m(ZodString);
4564
4566
  function ZodString() {
4565
- _class_call_check$D(this, ZodString);
4567
+ _class_call_check$E(this, ZodString);
4566
4568
  return _super.apply(this, arguments);
4567
4569
  }
4568
- _create_class$x(ZodString, [
4570
+ _create_class$y(ZodString, [
4569
4571
  {
4570
4572
  key: "_parse",
4571
4573
  value: function _parse(input) {
@@ -5387,7 +5389,7 @@ var ZodAny = /*#__PURE__*/ function(ZodType) {
5387
5389
  _inherits$m(ZodAny, ZodType);
5388
5390
  var _super = _create_super$m(ZodAny);
5389
5391
  function ZodAny() {
5390
- _class_call_check$D(this, ZodAny);
5392
+ _class_call_check$E(this, ZodAny);
5391
5393
  var _this;
5392
5394
  _this = _super.call.apply(_super, [
5393
5395
  this
@@ -5396,7 +5398,7 @@ var ZodAny = /*#__PURE__*/ function(ZodType) {
5396
5398
  _this._any = true;
5397
5399
  return _this;
5398
5400
  }
5399
- _create_class$x(ZodAny, [
5401
+ _create_class$y(ZodAny, [
5400
5402
  {
5401
5403
  key: "_parse",
5402
5404
  value: function _parse(input) {
@@ -5415,10 +5417,10 @@ var ZodNever = /*#__PURE__*/ function(ZodType) {
5415
5417
  _inherits$m(ZodNever, ZodType);
5416
5418
  var _super = _create_super$m(ZodNever);
5417
5419
  function ZodNever() {
5418
- _class_call_check$D(this, ZodNever);
5420
+ _class_call_check$E(this, ZodNever);
5419
5421
  return _super.apply(this, arguments);
5420
5422
  }
5421
- _create_class$x(ZodNever, [
5423
+ _create_class$y(ZodNever, [
5422
5424
  {
5423
5425
  key: "_parse",
5424
5426
  value: function _parse(input) {
@@ -5443,10 +5445,10 @@ var ZodArray = /*#__PURE__*/ function(ZodType) {
5443
5445
  _inherits$m(ZodArray, ZodType);
5444
5446
  var _super = _create_super$m(ZodArray);
5445
5447
  function ZodArray() {
5446
- _class_call_check$D(this, ZodArray);
5448
+ _class_call_check$E(this, ZodArray);
5447
5449
  return _super.apply(this, arguments);
5448
5450
  }
5449
- _create_class$x(ZodArray, [
5451
+ _create_class$y(ZodArray, [
5450
5452
  {
5451
5453
  key: "_parse",
5452
5454
  value: function _parse(input) {
@@ -5604,7 +5606,7 @@ var ZodObject = /*#__PURE__*/ function(ZodType) {
5604
5606
  _inherits$m(ZodObject, ZodType);
5605
5607
  var _super = _create_super$m(ZodObject);
5606
5608
  function ZodObject() {
5607
- _class_call_check$D(this, ZodObject);
5609
+ _class_call_check$E(this, ZodObject);
5608
5610
  var _this;
5609
5611
  _this = _super.call.apply(_super, [
5610
5612
  this
@@ -5652,7 +5654,7 @@ var ZodObject = /*#__PURE__*/ function(ZodType) {
5652
5654
  * */ _this.augment = _this.extend;
5653
5655
  return _this;
5654
5656
  }
5655
- _create_class$x(ZodObject, [
5657
+ _create_class$y(ZodObject, [
5656
5658
  {
5657
5659
  key: "_getCached",
5658
5660
  value: function _getCached() {
@@ -6237,10 +6239,10 @@ var ZodUnion = /*#__PURE__*/ function(ZodType) {
6237
6239
  _inherits$m(ZodUnion, ZodType);
6238
6240
  var _super = _create_super$m(ZodUnion);
6239
6241
  function ZodUnion() {
6240
- _class_call_check$D(this, ZodUnion);
6242
+ _class_call_check$E(this, ZodUnion);
6241
6243
  return _super.apply(this, arguments);
6242
6244
  }
6243
- _create_class$x(ZodUnion, [
6245
+ _create_class$y(ZodUnion, [
6244
6246
  {
6245
6247
  key: "_parse",
6246
6248
  value: function _parse(input) {
@@ -6495,10 +6497,10 @@ var ZodIntersection = /*#__PURE__*/ function(ZodType) {
6495
6497
  _inherits$m(ZodIntersection, ZodType);
6496
6498
  var _super = _create_super$m(ZodIntersection);
6497
6499
  function ZodIntersection() {
6498
- _class_call_check$D(this, ZodIntersection);
6500
+ _class_call_check$E(this, ZodIntersection);
6499
6501
  return _super.apply(this, arguments);
6500
6502
  }
6501
- _create_class$x(ZodIntersection, [
6503
+ _create_class$y(ZodIntersection, [
6502
6504
  {
6503
6505
  key: "_parse",
6504
6506
  value: function _parse(input) {
@@ -6566,10 +6568,10 @@ var ZodTuple = /*#__PURE__*/ function(ZodType) {
6566
6568
  _inherits$m(ZodTuple, ZodType);
6567
6569
  var _super = _create_super$m(ZodTuple);
6568
6570
  function ZodTuple() {
6569
- _class_call_check$D(this, ZodTuple);
6571
+ _class_call_check$E(this, ZodTuple);
6570
6572
  return _super.apply(this, arguments);
6571
6573
  }
6572
- _create_class$x(ZodTuple, [
6574
+ _create_class$y(ZodTuple, [
6573
6575
  {
6574
6576
  key: "_parse",
6575
6577
  value: function _parse(input) {
@@ -6657,10 +6659,10 @@ var ZodEnum = /*#__PURE__*/ function(ZodType) {
6657
6659
  _inherits$m(ZodEnum, ZodType);
6658
6660
  var _super = _create_super$m(ZodEnum);
6659
6661
  function ZodEnum() {
6660
- _class_call_check$D(this, ZodEnum);
6662
+ _class_call_check$E(this, ZodEnum);
6661
6663
  return _super.apply(this, arguments);
6662
6664
  }
6663
- _create_class$x(ZodEnum, [
6665
+ _create_class$y(ZodEnum, [
6664
6666
  {
6665
6667
  key: "_parse",
6666
6668
  value: function _parse(input) {
@@ -6801,10 +6803,10 @@ var ZodPromise = /*#__PURE__*/ function(ZodType) {
6801
6803
  _inherits$m(ZodPromise, ZodType);
6802
6804
  var _super = _create_super$m(ZodPromise);
6803
6805
  function ZodPromise() {
6804
- _class_call_check$D(this, ZodPromise);
6806
+ _class_call_check$E(this, ZodPromise);
6805
6807
  return _super.apply(this, arguments);
6806
6808
  }
6807
- _create_class$x(ZodPromise, [
6809
+ _create_class$y(ZodPromise, [
6808
6810
  {
6809
6811
  key: "unwrap",
6810
6812
  value: function unwrap() {
@@ -6846,10 +6848,10 @@ var ZodEffects = /*#__PURE__*/ function(ZodType) {
6846
6848
  _inherits$m(ZodEffects, ZodType);
6847
6849
  var _super = _create_super$m(ZodEffects);
6848
6850
  function ZodEffects() {
6849
- _class_call_check$D(this, ZodEffects);
6851
+ _class_call_check$E(this, ZodEffects);
6850
6852
  return _super.apply(this, arguments);
6851
6853
  }
6852
- _create_class$x(ZodEffects, [
6854
+ _create_class$y(ZodEffects, [
6853
6855
  {
6854
6856
  key: "innerType",
6855
6857
  value: function innerType() {
@@ -7042,10 +7044,10 @@ var ZodOptional = /*#__PURE__*/ function(ZodType) {
7042
7044
  _inherits$m(ZodOptional, ZodType);
7043
7045
  var _super = _create_super$m(ZodOptional);
7044
7046
  function ZodOptional() {
7045
- _class_call_check$D(this, ZodOptional);
7047
+ _class_call_check$E(this, ZodOptional);
7046
7048
  return _super.apply(this, arguments);
7047
7049
  }
7048
- _create_class$x(ZodOptional, [
7050
+ _create_class$y(ZodOptional, [
7049
7051
  {
7050
7052
  key: "_parse",
7051
7053
  value: function _parse(input) {
@@ -7075,10 +7077,10 @@ var ZodNullable = /*#__PURE__*/ function(ZodType) {
7075
7077
  _inherits$m(ZodNullable, ZodType);
7076
7078
  var _super = _create_super$m(ZodNullable);
7077
7079
  function ZodNullable() {
7078
- _class_call_check$D(this, ZodNullable);
7080
+ _class_call_check$E(this, ZodNullable);
7079
7081
  return _super.apply(this, arguments);
7080
7082
  }
7081
- _create_class$x(ZodNullable, [
7083
+ _create_class$y(ZodNullable, [
7082
7084
  {
7083
7085
  key: "_parse",
7084
7086
  value: function _parse(input) {
@@ -7108,10 +7110,10 @@ var ZodDefault = /*#__PURE__*/ function(ZodType) {
7108
7110
  _inherits$m(ZodDefault, ZodType);
7109
7111
  var _super = _create_super$m(ZodDefault);
7110
7112
  function ZodDefault() {
7111
- _class_call_check$D(this, ZodDefault);
7113
+ _class_call_check$E(this, ZodDefault);
7112
7114
  return _super.apply(this, arguments);
7113
7115
  }
7114
- _create_class$x(ZodDefault, [
7116
+ _create_class$y(ZodDefault, [
7115
7117
  {
7116
7118
  key: "_parse",
7117
7119
  value: function _parse(input) {
@@ -7149,10 +7151,10 @@ var ZodCatch = /*#__PURE__*/ function(ZodType) {
7149
7151
  _inherits$m(ZodCatch, ZodType);
7150
7152
  var _super = _create_super$m(ZodCatch);
7151
7153
  function ZodCatch() {
7152
- _class_call_check$D(this, ZodCatch);
7154
+ _class_call_check$E(this, ZodCatch);
7153
7155
  return _super.apply(this, arguments);
7154
7156
  }
7155
- _create_class$x(ZodCatch, [
7157
+ _create_class$y(ZodCatch, [
7156
7158
  {
7157
7159
  key: "_parse",
7158
7160
  value: function _parse(input) {
@@ -7216,10 +7218,10 @@ var ZodBranded = /*#__PURE__*/ function(ZodType) {
7216
7218
  _inherits$m(ZodBranded, ZodType);
7217
7219
  var _super = _create_super$m(ZodBranded);
7218
7220
  function ZodBranded() {
7219
- _class_call_check$D(this, ZodBranded);
7221
+ _class_call_check$E(this, ZodBranded);
7220
7222
  return _super.apply(this, arguments);
7221
7223
  }
7222
- _create_class$x(ZodBranded, [
7224
+ _create_class$y(ZodBranded, [
7223
7225
  {
7224
7226
  key: "_parse",
7225
7227
  value: function _parse(input) {
@@ -7245,10 +7247,10 @@ var ZodPipeline = /*#__PURE__*/ function(ZodType) {
7245
7247
  _inherits$m(ZodPipeline, ZodType);
7246
7248
  var _super = _create_super$m(ZodPipeline);
7247
7249
  function ZodPipeline() {
7248
- _class_call_check$D(this, ZodPipeline);
7250
+ _class_call_check$E(this, ZodPipeline);
7249
7251
  return _super.apply(this, arguments);
7250
7252
  }
7251
- _create_class$x(ZodPipeline, [
7253
+ _create_class$y(ZodPipeline, [
7252
7254
  {
7253
7255
  key: "_parse",
7254
7256
  value: function _parse(input) {
@@ -7340,10 +7342,10 @@ var ZodReadonly = /*#__PURE__*/ function(ZodType) {
7340
7342
  _inherits$m(ZodReadonly, ZodType);
7341
7343
  var _super = _create_super$m(ZodReadonly);
7342
7344
  function ZodReadonly() {
7343
- _class_call_check$D(this, ZodReadonly);
7345
+ _class_call_check$E(this, ZodReadonly);
7344
7346
  return _super.apply(this, arguments);
7345
7347
  }
7346
- _create_class$x(ZodReadonly, [
7348
+ _create_class$y(ZodReadonly, [
7347
7349
  {
7348
7350
  key: "_parse",
7349
7351
  value: function _parse(input) {
@@ -9085,12 +9087,12 @@ function _array_with_holes$j(arr) {
9085
9087
  function _array_without_holes$z(arr) {
9086
9088
  if (Array.isArray(arr)) return _array_like_to_array$H(arr);
9087
9089
  }
9088
- function _class_call_check$C(instance, Constructor) {
9090
+ function _class_call_check$D(instance, Constructor) {
9089
9091
  if (!(instance instanceof Constructor)) {
9090
9092
  throw new TypeError("Cannot call a class as a function");
9091
9093
  }
9092
9094
  }
9093
- function _defineProperties$w(target, props) {
9095
+ function _defineProperties$x(target, props) {
9094
9096
  for(var i = 0; i < props.length; i++){
9095
9097
  var descriptor = props[i];
9096
9098
  descriptor.enumerable = descriptor.enumerable || false;
@@ -9099,9 +9101,9 @@ function _defineProperties$w(target, props) {
9099
9101
  Object.defineProperty(target, descriptor.key, descriptor);
9100
9102
  }
9101
9103
  }
9102
- function _create_class$w(Constructor, protoProps, staticProps) {
9103
- if (protoProps) _defineProperties$w(Constructor.prototype, protoProps);
9104
- if (staticProps) _defineProperties$w(Constructor, staticProps);
9104
+ function _create_class$x(Constructor, protoProps, staticProps) {
9105
+ if (protoProps) _defineProperties$x(Constructor.prototype, protoProps);
9106
+ if (staticProps) _defineProperties$x(Constructor, staticProps);
9105
9107
  return Constructor;
9106
9108
  }
9107
9109
  function _define_property$L(obj, key, value) {
@@ -9272,7 +9274,7 @@ var Serializable = /*#__PURE__*/ function() {
9272
9274
  _args[_key - 1] = arguments[_key];
9273
9275
  }
9274
9276
  var _this = this;
9275
- _class_call_check$C(this, Serializable);
9277
+ _class_call_check$D(this, Serializable);
9276
9278
  Object.defineProperty(this, "lc_serializable", {
9277
9279
  enumerable: true,
9278
9280
  configurable: true,
@@ -9295,7 +9297,7 @@ var Serializable = /*#__PURE__*/ function() {
9295
9297
  this.lc_kwargs = kwargs !== null && kwargs !== void 0 ? kwargs : {};
9296
9298
  }
9297
9299
  }
9298
- _create_class$w(Serializable, [
9300
+ _create_class$x(Serializable, [
9299
9301
  {
9300
9302
  key: "lc_id",
9301
9303
  get: /**
@@ -9527,12 +9529,12 @@ function _assert_this_initialized$l(self) {
9527
9529
  }
9528
9530
  return self;
9529
9531
  }
9530
- function _class_call_check$B(instance, Constructor) {
9532
+ function _class_call_check$C(instance, Constructor) {
9531
9533
  if (!(instance instanceof Constructor)) {
9532
9534
  throw new TypeError("Cannot call a class as a function");
9533
9535
  }
9534
9536
  }
9535
- function _defineProperties$v(target, props) {
9537
+ function _defineProperties$w(target, props) {
9536
9538
  for(var i = 0; i < props.length; i++){
9537
9539
  var descriptor = props[i];
9538
9540
  descriptor.enumerable = descriptor.enumerable || false;
@@ -9541,9 +9543,9 @@ function _defineProperties$v(target, props) {
9541
9543
  Object.defineProperty(target, descriptor.key, descriptor);
9542
9544
  }
9543
9545
  }
9544
- function _create_class$v(Constructor, protoProps, staticProps) {
9545
- if (protoProps) _defineProperties$v(Constructor.prototype, protoProps);
9546
- if (staticProps) _defineProperties$v(Constructor, staticProps);
9546
+ function _create_class$w(Constructor, protoProps, staticProps) {
9547
+ if (protoProps) _defineProperties$w(Constructor.prototype, protoProps);
9548
+ if (staticProps) _defineProperties$w(Constructor, staticProps);
9547
9549
  return Constructor;
9548
9550
  }
9549
9551
  function _get_prototype_of$l(o) {
@@ -9628,7 +9630,7 @@ function _create_super$l(Derived) {
9628
9630
  * overridden in derived classes to handle various events during the
9629
9631
  * execution of a LangChain application.
9630
9632
  */ var BaseCallbackHandlerMethodsClass = function BaseCallbackHandlerMethodsClass() {
9631
- _class_call_check$B(this, BaseCallbackHandlerMethodsClass);
9633
+ _class_call_check$C(this, BaseCallbackHandlerMethodsClass);
9632
9634
  };
9633
9635
  /**
9634
9636
  * Abstract base class for creating callback handlers in the LangChain
@@ -9639,7 +9641,7 @@ function _create_super$l(Derived) {
9639
9641
  _inherits$l(BaseCallbackHandler, BaseCallbackHandlerMethodsClass);
9640
9642
  var _super = _create_super$l(BaseCallbackHandler);
9641
9643
  function BaseCallbackHandler(input) {
9642
- _class_call_check$B(this, BaseCallbackHandler);
9644
+ _class_call_check$C(this, BaseCallbackHandler);
9643
9645
  var _this;
9644
9646
  _this = _super.call(this);
9645
9647
  Object.defineProperty(_assert_this_initialized$l(_this), "lc_serializable", {
@@ -9715,7 +9717,7 @@ function _create_super$l(Derived) {
9715
9717
  }
9716
9718
  return _this;
9717
9719
  }
9718
- _create_class$v(BaseCallbackHandler, [
9720
+ _create_class$w(BaseCallbackHandler, [
9719
9721
  {
9720
9722
  key: "lc_namespace",
9721
9723
  get: function get() {
@@ -9797,7 +9799,7 @@ function _create_super$l(Derived) {
9797
9799
  _inherits$l(Handler, BaseCallbackHandler);
9798
9800
  var _super = _create_super$l(Handler);
9799
9801
  function Handler() {
9800
- _class_call_check$B(this, Handler);
9802
+ _class_call_check$C(this, Handler);
9801
9803
  var _this;
9802
9804
  _this = _super.call(this);
9803
9805
  Object.defineProperty(_assert_this_initialized$l(_this), "name", {
@@ -10764,12 +10766,12 @@ function getOtelEnabled() {
10764
10766
  }
10765
10767
 
10766
10768
  // Should not import any OTEL packages to avoid pulling in optional deps.
10767
- function _class_call_check$A(instance, Constructor) {
10769
+ function _class_call_check$B(instance, Constructor) {
10768
10770
  if (!(instance instanceof Constructor)) {
10769
10771
  throw new TypeError("Cannot call a class as a function");
10770
10772
  }
10771
10773
  }
10772
- function _defineProperties$u(target, props) {
10774
+ function _defineProperties$v(target, props) {
10773
10775
  for(var i = 0; i < props.length; i++){
10774
10776
  var descriptor = props[i];
10775
10777
  descriptor.enumerable = descriptor.enumerable || false;
@@ -10778,13 +10780,13 @@ function _defineProperties$u(target, props) {
10778
10780
  Object.defineProperty(target, descriptor.key, descriptor);
10779
10781
  }
10780
10782
  }
10781
- function _create_class$u(Constructor, protoProps, staticProps) {
10782
- if (protoProps) _defineProperties$u(Constructor.prototype, protoProps);
10783
+ function _create_class$v(Constructor, protoProps, staticProps) {
10784
+ if (protoProps) _defineProperties$v(Constructor.prototype, protoProps);
10783
10785
  return Constructor;
10784
10786
  }
10785
10787
  var MockTracer = /*#__PURE__*/ function() {
10786
10788
  function MockTracer() {
10787
- _class_call_check$A(this, MockTracer);
10789
+ _class_call_check$B(this, MockTracer);
10788
10790
  Object.defineProperty(this, "hasWarned", {
10789
10791
  enumerable: true,
10790
10792
  configurable: true,
@@ -10792,7 +10794,7 @@ var MockTracer = /*#__PURE__*/ function() {
10792
10794
  value: false
10793
10795
  });
10794
10796
  }
10795
- _create_class$u(MockTracer, [
10797
+ _create_class$v(MockTracer, [
10796
10798
  {
10797
10799
  key: "startActiveSpan",
10798
10800
  value: function startActiveSpan(_name) {
@@ -10826,7 +10828,7 @@ var MockTracer = /*#__PURE__*/ function() {
10826
10828
  }();
10827
10829
  var MockOTELTrace = /*#__PURE__*/ function() {
10828
10830
  function MockOTELTrace() {
10829
- _class_call_check$A(this, MockOTELTrace);
10831
+ _class_call_check$B(this, MockOTELTrace);
10830
10832
  Object.defineProperty(this, "mockTracer", {
10831
10833
  enumerable: true,
10832
10834
  configurable: true,
@@ -10834,7 +10836,7 @@ var MockOTELTrace = /*#__PURE__*/ function() {
10834
10836
  value: new MockTracer()
10835
10837
  });
10836
10838
  }
10837
- _create_class$u(MockOTELTrace, [
10839
+ _create_class$v(MockOTELTrace, [
10838
10840
  {
10839
10841
  key: "getTracer",
10840
10842
  value: function getTracer(_name, _version) {
@@ -10882,9 +10884,9 @@ var MockOTELTrace = /*#__PURE__*/ function() {
10882
10884
  }();
10883
10885
  var MockOTELContext = /*#__PURE__*/ function() {
10884
10886
  function MockOTELContext() {
10885
- _class_call_check$A(this, MockOTELContext);
10887
+ _class_call_check$B(this, MockOTELContext);
10886
10888
  }
10887
- _create_class$u(MockOTELContext, [
10889
+ _create_class$v(MockOTELContext, [
10888
10890
  {
10889
10891
  key: "active",
10890
10892
  value: function active() {
@@ -10907,9 +10909,9 @@ var mockOTELTrace = new MockOTELTrace();
10907
10909
  var mockOTELContext = new MockOTELContext();
10908
10910
  var OTELProvider = /*#__PURE__*/ function() {
10909
10911
  function OTELProvider() {
10910
- _class_call_check$A(this, OTELProvider);
10912
+ _class_call_check$B(this, OTELProvider);
10911
10913
  }
10912
- _create_class$u(OTELProvider, [
10914
+ _create_class$v(OTELProvider, [
10913
10915
  {
10914
10916
  key: "getTraceInstance",
10915
10917
  value: function getTraceInstance() {
@@ -10986,12 +10988,12 @@ function _array_like_to_array$D(arr, len) {
10986
10988
  function _array_with_holes$g(arr) {
10987
10989
  if (Array.isArray(arr)) return arr;
10988
10990
  }
10989
- function _class_call_check$z(instance, Constructor) {
10991
+ function _class_call_check$A(instance, Constructor) {
10990
10992
  if (!(instance instanceof Constructor)) {
10991
10993
  throw new TypeError("Cannot call a class as a function");
10992
10994
  }
10993
10995
  }
10994
- function _defineProperties$t(target, props) {
10996
+ function _defineProperties$u(target, props) {
10995
10997
  for(var i = 0; i < props.length; i++){
10996
10998
  var descriptor = props[i];
10997
10999
  descriptor.enumerable = descriptor.enumerable || false;
@@ -11000,8 +11002,8 @@ function _defineProperties$t(target, props) {
11000
11002
  Object.defineProperty(target, descriptor.key, descriptor);
11001
11003
  }
11002
11004
  }
11003
- function _create_class$t(Constructor, protoProps, staticProps) {
11004
- if (protoProps) _defineProperties$t(Constructor.prototype, protoProps);
11005
+ function _create_class$u(Constructor, protoProps, staticProps) {
11006
+ if (protoProps) _defineProperties$u(Constructor.prototype, protoProps);
11005
11007
  return Constructor;
11006
11008
  }
11007
11009
  function _iterable_to_array_limit$g(arr, i) {
@@ -11054,7 +11056,7 @@ function getOperationName(runType) {
11054
11056
  }
11055
11057
  var LangSmithToOTELTranslator = /*#__PURE__*/ function() {
11056
11058
  function LangSmithToOTELTranslator() {
11057
- _class_call_check$z(this, LangSmithToOTELTranslator);
11059
+ _class_call_check$A(this, LangSmithToOTELTranslator);
11058
11060
  Object.defineProperty(this, "spans", {
11059
11061
  enumerable: true,
11060
11062
  configurable: true,
@@ -11062,7 +11064,7 @@ var LangSmithToOTELTranslator = /*#__PURE__*/ function() {
11062
11064
  value: new Map()
11063
11065
  });
11064
11066
  }
11065
- _create_class$t(LangSmithToOTELTranslator, [
11067
+ _create_class$u(LangSmithToOTELTranslator, [
11066
11068
  {
11067
11069
  key: "exportBatch",
11068
11070
  value: function exportBatch(operations, otelContextMap) {
@@ -11801,7 +11803,7 @@ function _async_to_generator$n(fn) {
11801
11803
  });
11802
11804
  };
11803
11805
  }
11804
- function _class_call_check$y(instance, Constructor) {
11806
+ function _class_call_check$z(instance, Constructor) {
11805
11807
  if (!(instance instanceof Constructor)) {
11806
11808
  throw new TypeError("Cannot call a class as a function");
11807
11809
  }
@@ -12053,7 +12055,7 @@ var AbortError = /*#__PURE__*/ function(Error1) {
12053
12055
  _inherits$k(AbortError, Error1);
12054
12056
  var _super = _create_super$k(AbortError);
12055
12057
  function AbortError(message) {
12056
- _class_call_check$y(this, AbortError);
12058
+ _class_call_check$z(this, AbortError);
12057
12059
  var _this;
12058
12060
  _this = _super.call(this);
12059
12061
  if (_instanceof$f(message, Error)) {
@@ -12509,7 +12511,7 @@ function _assert_this_initialized$j(self) {
12509
12511
  }
12510
12512
  return self;
12511
12513
  }
12512
- function _class_call_check$x(instance, Constructor) {
12514
+ function _class_call_check$y(instance, Constructor) {
12513
12515
  if (!(instance instanceof Constructor)) {
12514
12516
  throw new TypeError("Cannot call a class as a function");
12515
12517
  }
@@ -12632,7 +12634,7 @@ var TimeoutError = /*#__PURE__*/ function(Error1) {
12632
12634
  _inherits$j(TimeoutError, Error1);
12633
12635
  var _super = _create_super$j(TimeoutError);
12634
12636
  function TimeoutError(message) {
12635
- _class_call_check$x(this, TimeoutError);
12637
+ _class_call_check$y(this, TimeoutError);
12636
12638
  var _this;
12637
12639
  _this = _super.call(this, message);
12638
12640
  _this.name = "TimeoutError";
@@ -12705,12 +12707,12 @@ function lowerBound(array, value, comparator) {
12705
12707
  }
12706
12708
  lowerBound$1.default = lowerBound;
12707
12709
 
12708
- function _class_call_check$w(instance, Constructor) {
12710
+ function _class_call_check$x(instance, Constructor) {
12709
12711
  if (!(instance instanceof Constructor)) {
12710
12712
  throw new TypeError("Cannot call a class as a function");
12711
12713
  }
12712
12714
  }
12713
- function _defineProperties$s(target, props) {
12715
+ function _defineProperties$t(target, props) {
12714
12716
  for(var i = 0; i < props.length; i++){
12715
12717
  var descriptor = props[i];
12716
12718
  descriptor.enumerable = descriptor.enumerable || false;
@@ -12719,8 +12721,8 @@ function _defineProperties$s(target, props) {
12719
12721
  Object.defineProperty(target, descriptor.key, descriptor);
12720
12722
  }
12721
12723
  }
12722
- function _create_class$s(Constructor, protoProps, staticProps) {
12723
- if (protoProps) _defineProperties$s(Constructor.prototype, protoProps);
12724
+ function _create_class$t(Constructor, protoProps, staticProps) {
12725
+ if (protoProps) _defineProperties$t(Constructor.prototype, protoProps);
12724
12726
  return Constructor;
12725
12727
  }
12726
12728
  Object.defineProperty(priorityQueue, "__esModule", {
@@ -12729,10 +12731,10 @@ Object.defineProperty(priorityQueue, "__esModule", {
12729
12731
  var lower_bound_1 = lowerBound$1;
12730
12732
  var PriorityQueue = /*#__PURE__*/ function() {
12731
12733
  function PriorityQueue() {
12732
- _class_call_check$w(this, PriorityQueue);
12734
+ _class_call_check$x(this, PriorityQueue);
12733
12735
  this._queue = [];
12734
12736
  }
12735
- _create_class$s(PriorityQueue, [
12737
+ _create_class$t(PriorityQueue, [
12736
12738
  {
12737
12739
  key: "enqueue",
12738
12740
  value: function enqueue(run, options) {
@@ -12816,12 +12818,12 @@ function _async_to_generator$m(fn) {
12816
12818
  });
12817
12819
  };
12818
12820
  }
12819
- function _class_call_check$v(instance, Constructor) {
12821
+ function _class_call_check$w(instance, Constructor) {
12820
12822
  if (!(instance instanceof Constructor)) {
12821
12823
  throw new TypeError("Cannot call a class as a function");
12822
12824
  }
12823
12825
  }
12824
- function _defineProperties$r(target, props) {
12826
+ function _defineProperties$s(target, props) {
12825
12827
  for(var i = 0; i < props.length; i++){
12826
12828
  var descriptor = props[i];
12827
12829
  descriptor.enumerable = descriptor.enumerable || false;
@@ -12830,8 +12832,8 @@ function _defineProperties$r(target, props) {
12830
12832
  Object.defineProperty(target, descriptor.key, descriptor);
12831
12833
  }
12832
12834
  }
12833
- function _create_class$r(Constructor, protoProps, staticProps) {
12834
- if (protoProps) _defineProperties$r(Constructor.prototype, protoProps);
12835
+ function _create_class$s(Constructor, protoProps, staticProps) {
12836
+ if (protoProps) _defineProperties$s(Constructor.prototype, protoProps);
12835
12837
  return Constructor;
12836
12838
  }
12837
12839
  function _get_prototype_of$i(o) {
@@ -13004,7 +13006,7 @@ Promise queue with concurrency control.
13004
13006
  _inherits$i(PQueue, EventEmitter);
13005
13007
  var _super = _create_super$i(PQueue);
13006
13008
  function PQueue(options) {
13007
- _class_call_check$v(this, PQueue);
13009
+ _class_call_check$w(this, PQueue);
13008
13010
  var _this;
13009
13011
  var _a, _b, _c, _d;
13010
13012
  _this = _super.call(this);
@@ -13040,7 +13042,7 @@ Promise queue with concurrency control.
13040
13042
  _this._isPaused = options.autoStart === false;
13041
13043
  return _this;
13042
13044
  }
13043
- _create_class$r(PQueue, [
13045
+ _create_class$s(PQueue, [
13044
13046
  {
13045
13047
  key: "_doesIntervalAllowAnother",
13046
13048
  get: function get() {
@@ -13463,12 +13465,12 @@ function _async_to_generator$l(fn) {
13463
13465
  });
13464
13466
  };
13465
13467
  }
13466
- function _class_call_check$u(instance, Constructor) {
13468
+ function _class_call_check$v(instance, Constructor) {
13467
13469
  if (!(instance instanceof Constructor)) {
13468
13470
  throw new TypeError("Cannot call a class as a function");
13469
13471
  }
13470
13472
  }
13471
- function _defineProperties$q(target, props) {
13473
+ function _defineProperties$r(target, props) {
13472
13474
  for(var i = 0; i < props.length; i++){
13473
13475
  var descriptor = props[i];
13474
13476
  descriptor.enumerable = descriptor.enumerable || false;
@@ -13477,8 +13479,8 @@ function _defineProperties$q(target, props) {
13477
13479
  Object.defineProperty(target, descriptor.key, descriptor);
13478
13480
  }
13479
13481
  }
13480
- function _create_class$q(Constructor, protoProps, staticProps) {
13481
- if (protoProps) _defineProperties$q(Constructor.prototype, protoProps);
13482
+ function _create_class$r(Constructor, protoProps, staticProps) {
13483
+ if (protoProps) _defineProperties$r(Constructor.prototype, protoProps);
13482
13484
  return Constructor;
13483
13485
  }
13484
13486
  function _instanceof$d(left, right) {
@@ -13621,7 +13623,7 @@ var STATUS_RETRYABLE = [
13621
13623
  * exponential backoff between each attempt.
13622
13624
  */ var AsyncCaller$1 = /*#__PURE__*/ function() {
13623
13625
  function AsyncCaller(params) {
13624
- _class_call_check$u(this, AsyncCaller);
13626
+ _class_call_check$v(this, AsyncCaller);
13625
13627
  Object.defineProperty(this, "maxConcurrency", {
13626
13628
  enumerable: true,
13627
13629
  configurable: true,
@@ -13663,7 +13665,7 @@ var STATUS_RETRYABLE = [
13663
13665
  }
13664
13666
  this.onFailedResponseHook = params === null || params === void 0 ? void 0 : params.onFailedResponseHook;
13665
13667
  }
13666
- _create_class$q(AsyncCaller, [
13668
+ _create_class$r(AsyncCaller, [
13667
13669
  {
13668
13670
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
13669
13671
  key: "call",
@@ -14147,12 +14149,12 @@ var identifiers$1 = {
14147
14149
  rcompareIdentifiers: rcompareIdentifiers
14148
14150
  };
14149
14151
 
14150
- function _class_call_check$t(instance, Constructor) {
14152
+ function _class_call_check$u(instance, Constructor) {
14151
14153
  if (!(instance instanceof Constructor)) {
14152
14154
  throw new TypeError("Cannot call a class as a function");
14153
14155
  }
14154
14156
  }
14155
- function _defineProperties$p(target, props) {
14157
+ function _defineProperties$q(target, props) {
14156
14158
  for(var i = 0; i < props.length; i++){
14157
14159
  var descriptor = props[i];
14158
14160
  descriptor.enumerable = descriptor.enumerable || false;
@@ -14161,8 +14163,8 @@ function _defineProperties$p(target, props) {
14161
14163
  Object.defineProperty(target, descriptor.key, descriptor);
14162
14164
  }
14163
14165
  }
14164
- function _create_class$p(Constructor, protoProps, staticProps) {
14165
- if (protoProps) _defineProperties$p(Constructor.prototype, protoProps);
14166
+ function _create_class$q(Constructor, protoProps, staticProps) {
14167
+ if (protoProps) _defineProperties$q(Constructor.prototype, protoProps);
14166
14168
  return Constructor;
14167
14169
  }
14168
14170
  function _instanceof$c(left, right) {
@@ -14183,7 +14185,7 @@ var parseOptions = parseOptions_1;
14183
14185
  var compareIdentifiers = identifiers$1.compareIdentifiers;
14184
14186
  var SemVer$1 = /*#__PURE__*/ function() {
14185
14187
  function SemVer(version, options) {
14186
- _class_call_check$t(this, SemVer);
14188
+ _class_call_check$u(this, SemVer);
14187
14189
  options = parseOptions(options);
14188
14190
  if (_instanceof$c(version, SemVer)) {
14189
14191
  if (version.loose === !!options.loose && version.includePrerelease === !!options.includePrerelease) {
@@ -14238,7 +14240,7 @@ var SemVer$1 = /*#__PURE__*/ function() {
14238
14240
  this.build = m[5] ? m[5].split(".") : [];
14239
14241
  this.format();
14240
14242
  }
14241
- _create_class$p(SemVer, [
14243
+ _create_class$q(SemVer, [
14242
14244
  {
14243
14245
  key: "format",
14244
14246
  value: function format() {
@@ -14574,78 +14576,70 @@ var cmp_1 = cmp;
14574
14576
 
14575
14577
  var _require = reExports; _require.safeRe; _require.t;
14576
14578
 
14577
- var lrucache;
14578
- var hasRequiredLrucache;
14579
-
14580
- function requireLrucache () {
14581
- if (hasRequiredLrucache) return lrucache;
14582
- hasRequiredLrucache = 1;
14583
- function _class_call_check(instance, Constructor) {
14584
- if (!(instance instanceof Constructor)) {
14585
- throw new TypeError("Cannot call a class as a function");
14586
- }
14587
- }
14588
- function _defineProperties(target, props) {
14589
- for(var i = 0; i < props.length; i++){
14590
- var descriptor = props[i];
14591
- descriptor.enumerable = descriptor.enumerable || false;
14592
- descriptor.configurable = true;
14593
- if ("value" in descriptor) descriptor.writable = true;
14594
- Object.defineProperty(target, descriptor.key, descriptor);
14595
- }
14596
- }
14597
- function _create_class(Constructor, protoProps, staticProps) {
14598
- if (protoProps) _defineProperties(Constructor.prototype, protoProps);
14599
- return Constructor;
14600
- }
14601
- var LRUCache = /*#__PURE__*/ function() {
14602
- function LRUCache() {
14603
- _class_call_check(this, LRUCache);
14604
- this.max = 1000;
14605
- this.map = new Map();
14606
- }
14607
- _create_class(LRUCache, [
14608
- {
14609
- key: "get",
14610
- value: function get(key) {
14611
- var value = this.map.get(key);
14612
- if (value === undefined) {
14613
- return undefined;
14614
- } else {
14615
- // Remove the key from the map and add it to the end
14616
- this.map.delete(key);
14617
- this.map.set(key, value);
14618
- return value;
14619
- }
14620
- }
14621
- },
14622
- {
14623
- key: "delete",
14624
- value: function _delete(key) {
14625
- return this.map.delete(key);
14626
- }
14627
- },
14628
- {
14629
- key: "set",
14630
- value: function set(key, value) {
14631
- var deleted = this.delete(key);
14632
- if (!deleted && value !== undefined) {
14633
- // If cache is full, delete the least recently used item
14634
- if (this.map.size >= this.max) {
14635
- var firstKey = this.map.keys().next().value;
14636
- this.delete(firstKey);
14637
- }
14638
- this.map.set(key, value);
14639
- }
14640
- return this;
14641
- }
14642
- }
14643
- ]);
14644
- return LRUCache;
14645
- }();
14646
- lrucache = LRUCache;
14647
- return lrucache;
14579
+ function _class_call_check$t(instance, Constructor) {
14580
+ if (!(instance instanceof Constructor)) {
14581
+ throw new TypeError("Cannot call a class as a function");
14582
+ }
14583
+ }
14584
+ function _defineProperties$p(target, props) {
14585
+ for(var i = 0; i < props.length; i++){
14586
+ var descriptor = props[i];
14587
+ descriptor.enumerable = descriptor.enumerable || false;
14588
+ descriptor.configurable = true;
14589
+ if ("value" in descriptor) descriptor.writable = true;
14590
+ Object.defineProperty(target, descriptor.key, descriptor);
14591
+ }
14592
+ }
14593
+ function _create_class$p(Constructor, protoProps, staticProps) {
14594
+ if (protoProps) _defineProperties$p(Constructor.prototype, protoProps);
14595
+ return Constructor;
14648
14596
  }
14597
+ var LRUCache = /*#__PURE__*/ function() {
14598
+ function LRUCache() {
14599
+ _class_call_check$t(this, LRUCache);
14600
+ this.max = 1000;
14601
+ this.map = new Map();
14602
+ }
14603
+ _create_class$p(LRUCache, [
14604
+ {
14605
+ key: "get",
14606
+ value: function get(key) {
14607
+ var value = this.map.get(key);
14608
+ if (value === undefined) {
14609
+ return undefined;
14610
+ } else {
14611
+ // Remove the key from the map and add it to the end
14612
+ this.map.delete(key);
14613
+ this.map.set(key, value);
14614
+ return value;
14615
+ }
14616
+ }
14617
+ },
14618
+ {
14619
+ key: "delete",
14620
+ value: function _delete(key) {
14621
+ return this.map.delete(key);
14622
+ }
14623
+ },
14624
+ {
14625
+ key: "set",
14626
+ value: function set(key, value) {
14627
+ var deleted = this.delete(key);
14628
+ if (!deleted && value !== undefined) {
14629
+ // If cache is full, delete the least recently used item
14630
+ if (this.map.size >= this.max) {
14631
+ var firstKey = this.map.keys().next().value;
14632
+ this.delete(firstKey);
14633
+ }
14634
+ this.map.set(key, value);
14635
+ }
14636
+ return this;
14637
+ }
14638
+ }
14639
+ ]);
14640
+ return LRUCache;
14641
+ }();
14642
+ var lrucache = LRUCache;
14649
14643
 
14650
14644
  var range;
14651
14645
  var hasRequiredRange;
@@ -14949,7 +14943,7 @@ function requireRange () {
14949
14943
  return Range;
14950
14944
  }();
14951
14945
  range = Range;
14952
- var LRU = requireLrucache();
14946
+ var LRU = lrucache;
14953
14947
  var cache = new LRU();
14954
14948
  var parseOptions = parseOptions_1;
14955
14949
  var Comparator = requireComparator();
@@ -56357,4 +56351,27 @@ BuiltinToolset.provider = '';
56357
56351
  }
56358
56352
  }
56359
56353
 
56360
- export { BaseTool, BaseToolset, BuiltinToolset, DOCUMENT_SOURCE_STRATEGY, DOCUMENT_TRANSFORMER_STRATEGY, DocumentSourceRegistry, DocumentSourceStrategy, DocumentTransformerRegistry, DocumentTransformerStrategy, IMAGE_UNDERSTANDING_STRATEGY, INTEGRATION_STRATEGY, ImageUnderstandingRegistry, ImageUnderstandingStrategy, IntegrationStrategyKey, IntegrationStrategyRegistry, KNOWLEDGE_STRATEGY, KnowledgeStrategyKey, KnowledgeStrategyRegistry, PLUGIN_METADATA, RETRIEVER_STRATEGY, RetrieverRegistry, RetrieverStrategy, TEXT_SPLITTER_STRATEGY, TOOLSET_STRATEGY, TextSplitterRegistry, TextSplitterStrategy, ToolsetRegistry, ToolsetStrategy, VECTOR_STORE_STRATEGY, VectorStoreRegistry, VectorStoreStrategy, WORKFLOW_NODE_STRATEGY, WORKFLOW_TRIGGER_STRATEGY, WorkflowNodeRegistry, WorkflowNodeStrategy, WorkflowTriggerRegistry, WorkflowTriggerStrategy, XpFileSystem, XpertServerPlugin, createPluginLogger, downloadRemoteFile, isRemoteFile, mergeParentChildChunks };
56354
+ async function createI18nInstance(pluginDir, language) {
56355
+ const instance = createInstance();
56356
+ const i18nDir = path.join(pluginDir, 'i18n');
56357
+ // detect available languages dynamically
56358
+ const lngs = fs.readdirSync(i18nDir).filter((f)=>f.endsWith('.json')).map((f)=>f.replace('.json', ''));
56359
+ await instance.use(FsBackend).init({
56360
+ lng: language,
56361
+ fallbackLng: 'en',
56362
+ preload: lngs,
56363
+ ns: [
56364
+ 'default'
56365
+ ],
56366
+ defaultNS: 'default',
56367
+ backend: {
56368
+ loadPath: path.join(i18nDir, '{{lng}}.json')
56369
+ },
56370
+ interpolation: {
56371
+ escapeValue: false
56372
+ }
56373
+ });
56374
+ return instance;
56375
+ }
56376
+
56377
+ export { BaseTool, BaseToolset, BuiltinToolset, DOCUMENT_SOURCE_STRATEGY, DOCUMENT_TRANSFORMER_STRATEGY, DocumentSourceRegistry, DocumentSourceStrategy, DocumentTransformerRegistry, DocumentTransformerStrategy, IMAGE_UNDERSTANDING_STRATEGY, INTEGRATION_STRATEGY, ImageUnderstandingRegistry, ImageUnderstandingStrategy, IntegrationStrategyKey, IntegrationStrategyRegistry, KNOWLEDGE_STRATEGY, KnowledgeStrategyKey, KnowledgeStrategyRegistry, PLUGIN_METADATA, RETRIEVER_STRATEGY, RetrieverRegistry, RetrieverStrategy, TEXT_SPLITTER_STRATEGY, TOOLSET_STRATEGY, TextSplitterRegistry, TextSplitterStrategy, ToolsetRegistry, ToolsetStrategy, VECTOR_STORE_STRATEGY, VectorStoreRegistry, VectorStoreStrategy, WORKFLOW_NODE_STRATEGY, WORKFLOW_TRIGGER_STRATEGY, WorkflowNodeRegistry, WorkflowNodeStrategy, WorkflowTriggerRegistry, WorkflowTriggerStrategy, XpFileSystem, XpertServerPlugin, createI18nInstance, createPluginLogger, downloadRemoteFile, isRemoteFile, mergeParentChildChunks };