@digipair/skill-dsp 0.15.3 → 0.16.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/index.cjs.js +593 -705
- package/index.esm.js +594 -699
- package/libs/skill-dsp/src/lib/skill-dsp.d.ts +2 -4
- package/package.json +1 -1
- package/schema.json +9 -38
package/index.esm.js
CHANGED
|
@@ -1,13 +1,12 @@
|
|
|
1
1
|
import path from 'path';
|
|
2
2
|
import { TransformStream, TextDecoderStream, ReadableStream } from 'stream/web';
|
|
3
|
-
import * as _crypto from 'crypto';
|
|
4
3
|
import { createHash } from 'crypto';
|
|
5
|
-
import
|
|
6
|
-
import
|
|
7
|
-
import
|
|
8
|
-
import
|
|
9
|
-
import
|
|
10
|
-
import
|
|
4
|
+
import 'http';
|
|
5
|
+
import 'https';
|
|
6
|
+
import 'node:fs';
|
|
7
|
+
import 'os';
|
|
8
|
+
import 'process';
|
|
9
|
+
import 'vm';
|
|
11
10
|
|
|
12
11
|
function _extends() {
|
|
13
12
|
_extends = Object.assign || function assign(target) {
|
|
@@ -8144,7 +8143,7 @@ function _type_of(obj) {
|
|
|
8144
8143
|
}
|
|
8145
8144
|
return self;
|
|
8146
8145
|
}
|
|
8147
|
-
function _class_call_check$
|
|
8146
|
+
function _class_call_check$L(instance, Constructor) {
|
|
8148
8147
|
if (!(instance instanceof Constructor)) {
|
|
8149
8148
|
throw new TypeError("Cannot call a class as a function");
|
|
8150
8149
|
}
|
|
@@ -8259,7 +8258,7 @@ var LuxonError = /*#__PURE__*/ function(Error1) {
|
|
|
8259
8258
|
_inherits$p(LuxonError, Error1);
|
|
8260
8259
|
var _super = _create_super$p(LuxonError);
|
|
8261
8260
|
function LuxonError() {
|
|
8262
|
-
_class_call_check$
|
|
8261
|
+
_class_call_check$L(this, LuxonError);
|
|
8263
8262
|
return _super.apply(this, arguments);
|
|
8264
8263
|
}
|
|
8265
8264
|
return LuxonError;
|
|
@@ -8270,7 +8269,7 @@ var LuxonError = /*#__PURE__*/ function(Error1) {
|
|
|
8270
8269
|
_inherits$p(InvalidDateTimeError, LuxonError);
|
|
8271
8270
|
var _super = _create_super$p(InvalidDateTimeError);
|
|
8272
8271
|
function InvalidDateTimeError(reason) {
|
|
8273
|
-
_class_call_check$
|
|
8272
|
+
_class_call_check$L(this, InvalidDateTimeError);
|
|
8274
8273
|
return _super.call(this, "Invalid DateTime: ".concat(reason.toMessage()));
|
|
8275
8274
|
}
|
|
8276
8275
|
return InvalidDateTimeError;
|
|
@@ -8281,7 +8280,7 @@ var LuxonError = /*#__PURE__*/ function(Error1) {
|
|
|
8281
8280
|
_inherits$p(InvalidIntervalError, LuxonError);
|
|
8282
8281
|
var _super = _create_super$p(InvalidIntervalError);
|
|
8283
8282
|
function InvalidIntervalError(reason) {
|
|
8284
|
-
_class_call_check$
|
|
8283
|
+
_class_call_check$L(this, InvalidIntervalError);
|
|
8285
8284
|
return _super.call(this, "Invalid Interval: ".concat(reason.toMessage()));
|
|
8286
8285
|
}
|
|
8287
8286
|
return InvalidIntervalError;
|
|
@@ -8292,7 +8291,7 @@ var LuxonError = /*#__PURE__*/ function(Error1) {
|
|
|
8292
8291
|
_inherits$p(InvalidDurationError, LuxonError);
|
|
8293
8292
|
var _super = _create_super$p(InvalidDurationError);
|
|
8294
8293
|
function InvalidDurationError(reason) {
|
|
8295
|
-
_class_call_check$
|
|
8294
|
+
_class_call_check$L(this, InvalidDurationError);
|
|
8296
8295
|
return _super.call(this, "Invalid Duration: ".concat(reason.toMessage()));
|
|
8297
8296
|
}
|
|
8298
8297
|
return InvalidDurationError;
|
|
@@ -8303,7 +8302,7 @@ var LuxonError = /*#__PURE__*/ function(Error1) {
|
|
|
8303
8302
|
_inherits$p(ConflictingSpecificationError, LuxonError);
|
|
8304
8303
|
var _super = _create_super$p(ConflictingSpecificationError);
|
|
8305
8304
|
function ConflictingSpecificationError() {
|
|
8306
|
-
_class_call_check$
|
|
8305
|
+
_class_call_check$L(this, ConflictingSpecificationError);
|
|
8307
8306
|
return _super.apply(this, arguments);
|
|
8308
8307
|
}
|
|
8309
8308
|
return ConflictingSpecificationError;
|
|
@@ -8314,7 +8313,7 @@ var LuxonError = /*#__PURE__*/ function(Error1) {
|
|
|
8314
8313
|
_inherits$p(InvalidUnitError, LuxonError);
|
|
8315
8314
|
var _super = _create_super$p(InvalidUnitError);
|
|
8316
8315
|
function InvalidUnitError(unit) {
|
|
8317
|
-
_class_call_check$
|
|
8316
|
+
_class_call_check$L(this, InvalidUnitError);
|
|
8318
8317
|
return _super.call(this, "Invalid unit ".concat(unit));
|
|
8319
8318
|
}
|
|
8320
8319
|
return InvalidUnitError;
|
|
@@ -8325,7 +8324,7 @@ var LuxonError = /*#__PURE__*/ function(Error1) {
|
|
|
8325
8324
|
_inherits$p(InvalidArgumentError, LuxonError);
|
|
8326
8325
|
var _super = _create_super$p(InvalidArgumentError);
|
|
8327
8326
|
function InvalidArgumentError() {
|
|
8328
|
-
_class_call_check$
|
|
8327
|
+
_class_call_check$L(this, InvalidArgumentError);
|
|
8329
8328
|
return _super.apply(this, arguments);
|
|
8330
8329
|
}
|
|
8331
8330
|
return InvalidArgumentError;
|
|
@@ -8336,7 +8335,7 @@ var LuxonError = /*#__PURE__*/ function(Error1) {
|
|
|
8336
8335
|
_inherits$p(ZoneIsAbstractError, LuxonError);
|
|
8337
8336
|
var _super = _create_super$p(ZoneIsAbstractError);
|
|
8338
8337
|
function ZoneIsAbstractError() {
|
|
8339
|
-
_class_call_check$
|
|
8338
|
+
_class_call_check$L(this, ZoneIsAbstractError);
|
|
8340
8339
|
return _super.call(this, "Zone is an abstract class");
|
|
8341
8340
|
}
|
|
8342
8341
|
return ZoneIsAbstractError;
|
|
@@ -8493,12 +8492,12 @@ var DATETIME_HUGE_WITH_SECONDS = {
|
|
|
8493
8492
|
timeZoneName: l
|
|
8494
8493
|
};
|
|
8495
8494
|
|
|
8496
|
-
function _class_call_check$
|
|
8495
|
+
function _class_call_check$K(instance, Constructor) {
|
|
8497
8496
|
if (!(instance instanceof Constructor)) {
|
|
8498
8497
|
throw new TypeError("Cannot call a class as a function");
|
|
8499
8498
|
}
|
|
8500
8499
|
}
|
|
8501
|
-
function _defineProperties$
|
|
8500
|
+
function _defineProperties$x(target, props) {
|
|
8502
8501
|
for(var i = 0; i < props.length; i++){
|
|
8503
8502
|
var descriptor = props[i];
|
|
8504
8503
|
descriptor.enumerable = descriptor.enumerable || false;
|
|
@@ -8507,16 +8506,16 @@ function _defineProperties$y(target, props) {
|
|
|
8507
8506
|
Object.defineProperty(target, descriptor.key, descriptor);
|
|
8508
8507
|
}
|
|
8509
8508
|
}
|
|
8510
|
-
function _create_class$
|
|
8511
|
-
if (protoProps) _defineProperties$
|
|
8512
|
-
if (staticProps) _defineProperties$
|
|
8509
|
+
function _create_class$x(Constructor, protoProps, staticProps) {
|
|
8510
|
+
if (protoProps) _defineProperties$x(Constructor.prototype, protoProps);
|
|
8511
|
+
if (staticProps) _defineProperties$x(Constructor, staticProps);
|
|
8513
8512
|
return Constructor;
|
|
8514
8513
|
}
|
|
8515
8514
|
var Zone = /*#__PURE__*/ function() {
|
|
8516
8515
|
function Zone() {
|
|
8517
|
-
_class_call_check$
|
|
8516
|
+
_class_call_check$K(this, Zone);
|
|
8518
8517
|
}
|
|
8519
|
-
_create_class$
|
|
8518
|
+
_create_class$x(Zone, [
|
|
8520
8519
|
{
|
|
8521
8520
|
key: "type",
|
|
8522
8521
|
get: /**
|
|
@@ -8622,12 +8621,12 @@ function _assert_this_initialized$o(self) {
|
|
|
8622
8621
|
}
|
|
8623
8622
|
return self;
|
|
8624
8623
|
}
|
|
8625
|
-
function _class_call_check$
|
|
8624
|
+
function _class_call_check$J(instance, Constructor) {
|
|
8626
8625
|
if (!(instance instanceof Constructor)) {
|
|
8627
8626
|
throw new TypeError("Cannot call a class as a function");
|
|
8628
8627
|
}
|
|
8629
8628
|
}
|
|
8630
|
-
function _defineProperties$
|
|
8629
|
+
function _defineProperties$w(target, props) {
|
|
8631
8630
|
for(var i = 0; i < props.length; i++){
|
|
8632
8631
|
var descriptor = props[i];
|
|
8633
8632
|
descriptor.enumerable = descriptor.enumerable || false;
|
|
@@ -8636,9 +8635,9 @@ function _defineProperties$x(target, props) {
|
|
|
8636
8635
|
Object.defineProperty(target, descriptor.key, descriptor);
|
|
8637
8636
|
}
|
|
8638
8637
|
}
|
|
8639
|
-
function _create_class$
|
|
8640
|
-
if (protoProps) _defineProperties$
|
|
8641
|
-
if (staticProps) _defineProperties$
|
|
8638
|
+
function _create_class$w(Constructor, protoProps, staticProps) {
|
|
8639
|
+
if (protoProps) _defineProperties$w(Constructor.prototype, protoProps);
|
|
8640
|
+
if (staticProps) _defineProperties$w(Constructor, staticProps);
|
|
8642
8641
|
return Constructor;
|
|
8643
8642
|
}
|
|
8644
8643
|
function _get_prototype_of$o(o) {
|
|
@@ -8706,10 +8705,10 @@ var SystemZone = /*#__PURE__*/ function(Zone) {
|
|
|
8706
8705
|
_inherits$o(SystemZone, Zone);
|
|
8707
8706
|
var _super = _create_super$o(SystemZone);
|
|
8708
8707
|
function SystemZone() {
|
|
8709
|
-
_class_call_check$
|
|
8708
|
+
_class_call_check$J(this, SystemZone);
|
|
8710
8709
|
return _super.apply(this, arguments);
|
|
8711
8710
|
}
|
|
8712
|
-
_create_class$
|
|
8711
|
+
_create_class$w(SystemZone, [
|
|
8713
8712
|
{
|
|
8714
8713
|
key: "type",
|
|
8715
8714
|
get: /** @override **/ function get() {
|
|
@@ -8790,12 +8789,12 @@ function _assert_this_initialized$n(self) {
|
|
|
8790
8789
|
}
|
|
8791
8790
|
return self;
|
|
8792
8791
|
}
|
|
8793
|
-
function _class_call_check$
|
|
8792
|
+
function _class_call_check$I(instance, Constructor) {
|
|
8794
8793
|
if (!(instance instanceof Constructor)) {
|
|
8795
8794
|
throw new TypeError("Cannot call a class as a function");
|
|
8796
8795
|
}
|
|
8797
8796
|
}
|
|
8798
|
-
function _defineProperties$
|
|
8797
|
+
function _defineProperties$v(target, props) {
|
|
8799
8798
|
for(var i = 0; i < props.length; i++){
|
|
8800
8799
|
var descriptor = props[i];
|
|
8801
8800
|
descriptor.enumerable = descriptor.enumerable || false;
|
|
@@ -8804,9 +8803,9 @@ function _defineProperties$w(target, props) {
|
|
|
8804
8803
|
Object.defineProperty(target, descriptor.key, descriptor);
|
|
8805
8804
|
}
|
|
8806
8805
|
}
|
|
8807
|
-
function _create_class$
|
|
8808
|
-
if (protoProps) _defineProperties$
|
|
8809
|
-
if (staticProps) _defineProperties$
|
|
8806
|
+
function _create_class$v(Constructor, protoProps, staticProps) {
|
|
8807
|
+
if (protoProps) _defineProperties$v(Constructor.prototype, protoProps);
|
|
8808
|
+
if (staticProps) _defineProperties$v(Constructor, staticProps);
|
|
8810
8809
|
return Constructor;
|
|
8811
8810
|
}
|
|
8812
8811
|
function _get_prototype_of$n(o) {
|
|
@@ -8964,14 +8963,14 @@ var IANAZone = /*#__PURE__*/ function(Zone) {
|
|
|
8964
8963
|
_inherits$n(IANAZone, Zone);
|
|
8965
8964
|
var _super = _create_super$n(IANAZone);
|
|
8966
8965
|
function IANAZone(name) {
|
|
8967
|
-
_class_call_check$
|
|
8966
|
+
_class_call_check$I(this, IANAZone);
|
|
8968
8967
|
var _this;
|
|
8969
8968
|
_this = _super.call(this);
|
|
8970
8969
|
/** @private **/ _this.zoneName = name;
|
|
8971
8970
|
/** @private **/ _this.valid = IANAZone.isValidZone(name);
|
|
8972
8971
|
return _this;
|
|
8973
8972
|
}
|
|
8974
|
-
_create_class$
|
|
8973
|
+
_create_class$v(IANAZone, [
|
|
8975
8974
|
{
|
|
8976
8975
|
key: "type",
|
|
8977
8976
|
get: /** @override **/ function get() {
|
|
@@ -9113,12 +9112,12 @@ function _array_like_to_array$m(arr, len) {
|
|
|
9113
9112
|
function _array_with_holes$f(arr) {
|
|
9114
9113
|
if (Array.isArray(arr)) return arr;
|
|
9115
9114
|
}
|
|
9116
|
-
function _class_call_check$
|
|
9115
|
+
function _class_call_check$H(instance, Constructor) {
|
|
9117
9116
|
if (!(instance instanceof Constructor)) {
|
|
9118
9117
|
throw new TypeError("Cannot call a class as a function");
|
|
9119
9118
|
}
|
|
9120
9119
|
}
|
|
9121
|
-
function _defineProperties$
|
|
9120
|
+
function _defineProperties$u(target, props) {
|
|
9122
9121
|
for(var i = 0; i < props.length; i++){
|
|
9123
9122
|
var descriptor = props[i];
|
|
9124
9123
|
descriptor.enumerable = descriptor.enumerable || false;
|
|
@@ -9127,12 +9126,12 @@ function _defineProperties$v(target, props) {
|
|
|
9127
9126
|
Object.defineProperty(target, descriptor.key, descriptor);
|
|
9128
9127
|
}
|
|
9129
9128
|
}
|
|
9130
|
-
function _create_class$
|
|
9131
|
-
if (protoProps) _defineProperties$
|
|
9132
|
-
if (staticProps) _defineProperties$
|
|
9129
|
+
function _create_class$u(Constructor, protoProps, staticProps) {
|
|
9130
|
+
if (protoProps) _defineProperties$u(Constructor.prototype, protoProps);
|
|
9131
|
+
if (staticProps) _defineProperties$u(Constructor, staticProps);
|
|
9133
9132
|
return Constructor;
|
|
9134
9133
|
}
|
|
9135
|
-
function _define_property$
|
|
9134
|
+
function _define_property$D(obj, key, value) {
|
|
9136
9135
|
if (key in obj) {
|
|
9137
9136
|
Object.defineProperty(obj, key, {
|
|
9138
9137
|
value: value,
|
|
@@ -9182,7 +9181,7 @@ function _object_spread$q(target) {
|
|
|
9182
9181
|
}));
|
|
9183
9182
|
}
|
|
9184
9183
|
ownKeys.forEach(function(key) {
|
|
9185
|
-
_define_property$
|
|
9184
|
+
_define_property$D(target, key, source[key]);
|
|
9186
9185
|
});
|
|
9187
9186
|
}
|
|
9188
9187
|
return target;
|
|
@@ -9420,7 +9419,7 @@ function supportsFastNumbers(loc) {
|
|
|
9420
9419
|
* @private
|
|
9421
9420
|
*/ var PolyNumberFormatter = /*#__PURE__*/ function() {
|
|
9422
9421
|
function PolyNumberFormatter(intl, forceSimple, opts) {
|
|
9423
|
-
_class_call_check$
|
|
9422
|
+
_class_call_check$H(this, PolyNumberFormatter);
|
|
9424
9423
|
this.padTo = opts.padTo || 0;
|
|
9425
9424
|
this.floor = opts.floor || false;
|
|
9426
9425
|
opts.padTo; opts.floor; var otherOpts = _object_without_properties(opts, [
|
|
@@ -9435,7 +9434,7 @@ function supportsFastNumbers(loc) {
|
|
|
9435
9434
|
this.inf = getCachedINF(intl, intlOpts);
|
|
9436
9435
|
}
|
|
9437
9436
|
}
|
|
9438
|
-
_create_class$
|
|
9437
|
+
_create_class$u(PolyNumberFormatter, [
|
|
9439
9438
|
{
|
|
9440
9439
|
key: "format",
|
|
9441
9440
|
value: function format(i) {
|
|
@@ -9456,7 +9455,7 @@ function supportsFastNumbers(loc) {
|
|
|
9456
9455
|
* @private
|
|
9457
9456
|
*/ var PolyDateFormatter = /*#__PURE__*/ function() {
|
|
9458
9457
|
function PolyDateFormatter(dt, intl, opts) {
|
|
9459
|
-
_class_call_check$
|
|
9458
|
+
_class_call_check$H(this, PolyDateFormatter);
|
|
9460
9459
|
this.opts = opts;
|
|
9461
9460
|
this.originalZone = undefined;
|
|
9462
9461
|
var z = undefined;
|
|
@@ -9502,7 +9501,7 @@ function supportsFastNumbers(loc) {
|
|
|
9502
9501
|
intlOpts.timeZone = intlOpts.timeZone || z;
|
|
9503
9502
|
this.dtf = getCachedDTF(intl, intlOpts);
|
|
9504
9503
|
}
|
|
9505
|
-
_create_class$
|
|
9504
|
+
_create_class$u(PolyDateFormatter, [
|
|
9506
9505
|
{
|
|
9507
9506
|
key: "format",
|
|
9508
9507
|
value: function format() {
|
|
@@ -9553,7 +9552,7 @@ function supportsFastNumbers(loc) {
|
|
|
9553
9552
|
* @private
|
|
9554
9553
|
*/ var PolyRelFormatter = /*#__PURE__*/ function() {
|
|
9555
9554
|
function PolyRelFormatter(intl, isEnglish, opts) {
|
|
9556
|
-
_class_call_check$
|
|
9555
|
+
_class_call_check$H(this, PolyRelFormatter);
|
|
9557
9556
|
this.opts = _object_spread$q({
|
|
9558
9557
|
style: "long"
|
|
9559
9558
|
}, opts);
|
|
@@ -9561,7 +9560,7 @@ function supportsFastNumbers(loc) {
|
|
|
9561
9560
|
this.rtf = getCachedRTF(intl, opts);
|
|
9562
9561
|
}
|
|
9563
9562
|
}
|
|
9564
|
-
_create_class$
|
|
9563
|
+
_create_class$u(PolyRelFormatter, [
|
|
9565
9564
|
{
|
|
9566
9565
|
key: "format",
|
|
9567
9566
|
value: function format(count, unit) {
|
|
@@ -9595,7 +9594,7 @@ var fallbackWeekSettings = {
|
|
|
9595
9594
|
};
|
|
9596
9595
|
var Locale = /*#__PURE__*/ function() {
|
|
9597
9596
|
function Locale(locale, numbering, outputCalendar, weekSettings, specifiedLocale) {
|
|
9598
|
-
_class_call_check$
|
|
9597
|
+
_class_call_check$H(this, Locale);
|
|
9599
9598
|
var _parseLocaleString = _sliced_to_array$f(parseLocaleString(locale), 3), parsedLocale = _parseLocaleString[0], parsedNumberingSystem = _parseLocaleString[1], parsedOutputCalendar = _parseLocaleString[2];
|
|
9600
9599
|
this.locale = parsedLocale;
|
|
9601
9600
|
this.numberingSystem = numbering || parsedNumberingSystem || null;
|
|
@@ -9615,7 +9614,7 @@ var Locale = /*#__PURE__*/ function() {
|
|
|
9615
9614
|
this.specifiedLocale = specifiedLocale;
|
|
9616
9615
|
this.fastNumbersCached = null;
|
|
9617
9616
|
}
|
|
9618
|
-
_create_class$
|
|
9617
|
+
_create_class$u(Locale, [
|
|
9619
9618
|
{
|
|
9620
9619
|
key: "fastNumbers",
|
|
9621
9620
|
get: function get() {
|
|
@@ -9879,12 +9878,12 @@ function _assert_this_initialized$m(self) {
|
|
|
9879
9878
|
}
|
|
9880
9879
|
return self;
|
|
9881
9880
|
}
|
|
9882
|
-
function _class_call_check$
|
|
9881
|
+
function _class_call_check$G(instance, Constructor) {
|
|
9883
9882
|
if (!(instance instanceof Constructor)) {
|
|
9884
9883
|
throw new TypeError("Cannot call a class as a function");
|
|
9885
9884
|
}
|
|
9886
9885
|
}
|
|
9887
|
-
function _defineProperties$
|
|
9886
|
+
function _defineProperties$t(target, props) {
|
|
9888
9887
|
for(var i = 0; i < props.length; i++){
|
|
9889
9888
|
var descriptor = props[i];
|
|
9890
9889
|
descriptor.enumerable = descriptor.enumerable || false;
|
|
@@ -9893,9 +9892,9 @@ function _defineProperties$u(target, props) {
|
|
|
9893
9892
|
Object.defineProperty(target, descriptor.key, descriptor);
|
|
9894
9893
|
}
|
|
9895
9894
|
}
|
|
9896
|
-
function _create_class$
|
|
9897
|
-
if (protoProps) _defineProperties$
|
|
9898
|
-
if (staticProps) _defineProperties$
|
|
9895
|
+
function _create_class$t(Constructor, protoProps, staticProps) {
|
|
9896
|
+
if (protoProps) _defineProperties$t(Constructor.prototype, protoProps);
|
|
9897
|
+
if (staticProps) _defineProperties$t(Constructor, staticProps);
|
|
9899
9898
|
return Constructor;
|
|
9900
9899
|
}
|
|
9901
9900
|
function _get_prototype_of$m(o) {
|
|
@@ -9963,13 +9962,13 @@ var FixedOffsetZone = /*#__PURE__*/ function(Zone) {
|
|
|
9963
9962
|
_inherits$m(FixedOffsetZone, Zone);
|
|
9964
9963
|
var _super = _create_super$m(FixedOffsetZone);
|
|
9965
9964
|
function FixedOffsetZone(offset) {
|
|
9966
|
-
_class_call_check$
|
|
9965
|
+
_class_call_check$G(this, FixedOffsetZone);
|
|
9967
9966
|
var _this;
|
|
9968
9967
|
_this = _super.call(this);
|
|
9969
9968
|
/** @private **/ _this.fixed = offset;
|
|
9970
9969
|
return _this;
|
|
9971
9970
|
}
|
|
9972
|
-
_create_class$
|
|
9971
|
+
_create_class$t(FixedOffsetZone, [
|
|
9973
9972
|
{
|
|
9974
9973
|
key: "type",
|
|
9975
9974
|
get: /** @override **/ function get() {
|
|
@@ -10080,12 +10079,12 @@ function _assert_this_initialized$l(self) {
|
|
|
10080
10079
|
}
|
|
10081
10080
|
return self;
|
|
10082
10081
|
}
|
|
10083
|
-
function _class_call_check$
|
|
10082
|
+
function _class_call_check$F(instance, Constructor) {
|
|
10084
10083
|
if (!(instance instanceof Constructor)) {
|
|
10085
10084
|
throw new TypeError("Cannot call a class as a function");
|
|
10086
10085
|
}
|
|
10087
10086
|
}
|
|
10088
|
-
function _defineProperties$
|
|
10087
|
+
function _defineProperties$s(target, props) {
|
|
10089
10088
|
for(var i = 0; i < props.length; i++){
|
|
10090
10089
|
var descriptor = props[i];
|
|
10091
10090
|
descriptor.enumerable = descriptor.enumerable || false;
|
|
@@ -10094,9 +10093,9 @@ function _defineProperties$t(target, props) {
|
|
|
10094
10093
|
Object.defineProperty(target, descriptor.key, descriptor);
|
|
10095
10094
|
}
|
|
10096
10095
|
}
|
|
10097
|
-
function _create_class$
|
|
10098
|
-
if (protoProps) _defineProperties$
|
|
10099
|
-
if (staticProps) _defineProperties$
|
|
10096
|
+
function _create_class$s(Constructor, protoProps, staticProps) {
|
|
10097
|
+
if (protoProps) _defineProperties$s(Constructor.prototype, protoProps);
|
|
10098
|
+
if (staticProps) _defineProperties$s(Constructor, staticProps);
|
|
10100
10099
|
return Constructor;
|
|
10101
10100
|
}
|
|
10102
10101
|
function _get_prototype_of$l(o) {
|
|
@@ -10163,13 +10162,13 @@ var InvalidZone = /*#__PURE__*/ function(Zone) {
|
|
|
10163
10162
|
_inherits$l(InvalidZone, Zone);
|
|
10164
10163
|
var _super = _create_super$l(InvalidZone);
|
|
10165
10164
|
function InvalidZone(zoneName) {
|
|
10166
|
-
_class_call_check$
|
|
10165
|
+
_class_call_check$F(this, InvalidZone);
|
|
10167
10166
|
var _this;
|
|
10168
10167
|
_this = _super.call(this);
|
|
10169
10168
|
/** @private */ _this.zoneName = zoneName;
|
|
10170
10169
|
return _this;
|
|
10171
10170
|
}
|
|
10172
|
-
_create_class$
|
|
10171
|
+
_create_class$s(InvalidZone, [
|
|
10173
10172
|
{
|
|
10174
10173
|
key: "type",
|
|
10175
10174
|
get: /** @override **/ function get() {
|
|
@@ -10253,12 +10252,12 @@ function normalizeZone(input, defaultZone) {
|
|
|
10253
10252
|
}
|
|
10254
10253
|
}
|
|
10255
10254
|
|
|
10256
|
-
function _class_call_check$
|
|
10255
|
+
function _class_call_check$E(instance, Constructor) {
|
|
10257
10256
|
if (!(instance instanceof Constructor)) {
|
|
10258
10257
|
throw new TypeError("Cannot call a class as a function");
|
|
10259
10258
|
}
|
|
10260
10259
|
}
|
|
10261
|
-
function _defineProperties$
|
|
10260
|
+
function _defineProperties$r(target, props) {
|
|
10262
10261
|
for(var i = 0; i < props.length; i++){
|
|
10263
10262
|
var descriptor = props[i];
|
|
10264
10263
|
descriptor.enumerable = descriptor.enumerable || false;
|
|
@@ -10267,9 +10266,9 @@ function _defineProperties$s(target, props) {
|
|
|
10267
10266
|
Object.defineProperty(target, descriptor.key, descriptor);
|
|
10268
10267
|
}
|
|
10269
10268
|
}
|
|
10270
|
-
function _create_class$
|
|
10271
|
-
if (protoProps) _defineProperties$
|
|
10272
|
-
if (staticProps) _defineProperties$
|
|
10269
|
+
function _create_class$r(Constructor, protoProps, staticProps) {
|
|
10270
|
+
if (protoProps) _defineProperties$r(Constructor.prototype, protoProps);
|
|
10271
|
+
if (staticProps) _defineProperties$r(Constructor, staticProps);
|
|
10273
10272
|
return Constructor;
|
|
10274
10273
|
}
|
|
10275
10274
|
var now = function() {
|
|
@@ -10277,9 +10276,9 @@ var now = function() {
|
|
|
10277
10276
|
}, defaultZone = "system", defaultLocale = null, defaultNumberingSystem = null, defaultOutputCalendar = null, twoDigitCutoffYear = 60, throwOnInvalid, defaultWeekSettings = null;
|
|
10278
10277
|
var Settings = /*#__PURE__*/ function() {
|
|
10279
10278
|
function Settings() {
|
|
10280
|
-
_class_call_check$
|
|
10279
|
+
_class_call_check$E(this, Settings);
|
|
10281
10280
|
}
|
|
10282
|
-
_create_class$
|
|
10281
|
+
_create_class$r(Settings, null, [
|
|
10283
10282
|
{
|
|
10284
10283
|
key: "now",
|
|
10285
10284
|
get: /**
|
|
@@ -10430,12 +10429,12 @@ var Settings = /*#__PURE__*/ function() {
|
|
|
10430
10429
|
return Settings;
|
|
10431
10430
|
}();
|
|
10432
10431
|
|
|
10433
|
-
function _class_call_check$
|
|
10432
|
+
function _class_call_check$D(instance, Constructor) {
|
|
10434
10433
|
if (!(instance instanceof Constructor)) {
|
|
10435
10434
|
throw new TypeError("Cannot call a class as a function");
|
|
10436
10435
|
}
|
|
10437
10436
|
}
|
|
10438
|
-
function _defineProperties$
|
|
10437
|
+
function _defineProperties$q(target, props) {
|
|
10439
10438
|
for(var i = 0; i < props.length; i++){
|
|
10440
10439
|
var descriptor = props[i];
|
|
10441
10440
|
descriptor.enumerable = descriptor.enumerable || false;
|
|
@@ -10444,18 +10443,18 @@ function _defineProperties$r(target, props) {
|
|
|
10444
10443
|
Object.defineProperty(target, descriptor.key, descriptor);
|
|
10445
10444
|
}
|
|
10446
10445
|
}
|
|
10447
|
-
function _create_class$
|
|
10448
|
-
if (protoProps) _defineProperties$
|
|
10449
|
-
if (staticProps) _defineProperties$
|
|
10446
|
+
function _create_class$q(Constructor, protoProps, staticProps) {
|
|
10447
|
+
if (protoProps) _defineProperties$q(Constructor.prototype, protoProps);
|
|
10448
|
+
if (staticProps) _defineProperties$q(Constructor, staticProps);
|
|
10450
10449
|
return Constructor;
|
|
10451
10450
|
}
|
|
10452
10451
|
var Invalid = /*#__PURE__*/ function() {
|
|
10453
10452
|
function Invalid(reason, explanation) {
|
|
10454
|
-
_class_call_check$
|
|
10453
|
+
_class_call_check$D(this, Invalid);
|
|
10455
10454
|
this.reason = reason;
|
|
10456
10455
|
this.explanation = explanation;
|
|
10457
10456
|
}
|
|
10458
|
-
_create_class$
|
|
10457
|
+
_create_class$q(Invalid, [
|
|
10459
10458
|
{
|
|
10460
10459
|
key: "toMessage",
|
|
10461
10460
|
value: function toMessage() {
|
|
@@ -10470,7 +10469,7 @@ var Invalid = /*#__PURE__*/ function() {
|
|
|
10470
10469
|
return Invalid;
|
|
10471
10470
|
}();
|
|
10472
10471
|
|
|
10473
|
-
function _define_property$
|
|
10472
|
+
function _define_property$C(obj, key, value) {
|
|
10474
10473
|
if (key in obj) {
|
|
10475
10474
|
Object.defineProperty(obj, key, {
|
|
10476
10475
|
value: value,
|
|
@@ -10493,7 +10492,7 @@ function _object_spread$p(target) {
|
|
|
10493
10492
|
}));
|
|
10494
10493
|
}
|
|
10495
10494
|
ownKeys.forEach(function(key) {
|
|
10496
|
-
_define_property$
|
|
10495
|
+
_define_property$C(target, key, source[key]);
|
|
10497
10496
|
});
|
|
10498
10497
|
}
|
|
10499
10498
|
return target;
|
|
@@ -10689,7 +10688,7 @@ function hasInvalidTimeData(obj) {
|
|
|
10689
10688
|
This is just a junk drawer, containing anything used across multiple classes.
|
|
10690
10689
|
Because Luxon is small(ish), this should stay small and we won't worry about splitting
|
|
10691
10690
|
it up into, say, parsingUtil.js and basicUtil.js and so on. But they are divided up by feature area.
|
|
10692
|
-
*/ function _define_property$
|
|
10691
|
+
*/ function _define_property$B(obj, key, value) {
|
|
10693
10692
|
if (key in obj) {
|
|
10694
10693
|
Object.defineProperty(obj, key, {
|
|
10695
10694
|
value: value,
|
|
@@ -10712,7 +10711,7 @@ function _object_spread$o(target) {
|
|
|
10712
10711
|
}));
|
|
10713
10712
|
}
|
|
10714
10713
|
ownKeys.forEach(function(key) {
|
|
10715
|
-
_define_property$
|
|
10714
|
+
_define_property$B(target, key, source[key]);
|
|
10716
10715
|
});
|
|
10717
10716
|
}
|
|
10718
10717
|
return target;
|
|
@@ -11241,12 +11240,12 @@ function _array_like_to_array$k(arr, len) {
|
|
|
11241
11240
|
function _array_without_holes$b(arr) {
|
|
11242
11241
|
if (Array.isArray(arr)) return _array_like_to_array$k(arr);
|
|
11243
11242
|
}
|
|
11244
|
-
function _class_call_check$
|
|
11243
|
+
function _class_call_check$C(instance, Constructor) {
|
|
11245
11244
|
if (!(instance instanceof Constructor)) {
|
|
11246
11245
|
throw new TypeError("Cannot call a class as a function");
|
|
11247
11246
|
}
|
|
11248
11247
|
}
|
|
11249
|
-
function _defineProperties$
|
|
11248
|
+
function _defineProperties$p(target, props) {
|
|
11250
11249
|
for(var i = 0; i < props.length; i++){
|
|
11251
11250
|
var descriptor = props[i];
|
|
11252
11251
|
descriptor.enumerable = descriptor.enumerable || false;
|
|
@@ -11255,12 +11254,12 @@ function _defineProperties$q(target, props) {
|
|
|
11255
11254
|
Object.defineProperty(target, descriptor.key, descriptor);
|
|
11256
11255
|
}
|
|
11257
11256
|
}
|
|
11258
|
-
function _create_class$
|
|
11259
|
-
if (protoProps) _defineProperties$
|
|
11260
|
-
if (staticProps) _defineProperties$
|
|
11257
|
+
function _create_class$p(Constructor, protoProps, staticProps) {
|
|
11258
|
+
if (protoProps) _defineProperties$p(Constructor.prototype, protoProps);
|
|
11259
|
+
if (staticProps) _defineProperties$p(Constructor, staticProps);
|
|
11261
11260
|
return Constructor;
|
|
11262
11261
|
}
|
|
11263
|
-
function _define_property$
|
|
11262
|
+
function _define_property$A(obj, key, value) {
|
|
11264
11263
|
if (key in obj) {
|
|
11265
11264
|
Object.defineProperty(obj, key, {
|
|
11266
11265
|
value: value,
|
|
@@ -11289,7 +11288,7 @@ function _object_spread$n(target) {
|
|
|
11289
11288
|
}));
|
|
11290
11289
|
}
|
|
11291
11290
|
ownKeys.forEach(function(key) {
|
|
11292
|
-
_define_property$
|
|
11291
|
+
_define_property$A(target, key, source[key]);
|
|
11293
11292
|
});
|
|
11294
11293
|
}
|
|
11295
11294
|
return target;
|
|
@@ -11357,12 +11356,12 @@ var macroTokenToFormatOpts = {
|
|
|
11357
11356
|
};
|
|
11358
11357
|
var Formatter = /*#__PURE__*/ function() {
|
|
11359
11358
|
function Formatter(locale, formatOpts) {
|
|
11360
|
-
_class_call_check$
|
|
11359
|
+
_class_call_check$C(this, Formatter);
|
|
11361
11360
|
this.opts = formatOpts;
|
|
11362
11361
|
this.loc = locale;
|
|
11363
11362
|
this.systemLoc = null;
|
|
11364
11363
|
}
|
|
11365
|
-
_create_class$
|
|
11364
|
+
_create_class$p(Formatter, [
|
|
11366
11365
|
{
|
|
11367
11366
|
key: "formatWithSystemDefault",
|
|
11368
11367
|
value: function formatWithSystemDefault(dt, opts) {
|
|
@@ -11791,7 +11790,7 @@ function _array_like_to_array$j(arr, len) {
|
|
|
11791
11790
|
function _array_with_holes$e(arr) {
|
|
11792
11791
|
if (Array.isArray(arr)) return arr;
|
|
11793
11792
|
}
|
|
11794
|
-
function _define_property$
|
|
11793
|
+
function _define_property$z(obj, key, value) {
|
|
11795
11794
|
if (key in obj) {
|
|
11796
11795
|
Object.defineProperty(obj, key, {
|
|
11797
11796
|
value: value,
|
|
@@ -11841,7 +11840,7 @@ function _object_spread$m(target) {
|
|
|
11841
11840
|
}));
|
|
11842
11841
|
}
|
|
11843
11842
|
ownKeys.forEach(function(key) {
|
|
11844
|
-
_define_property$
|
|
11843
|
+
_define_property$z(target, key, source[key]);
|
|
11845
11844
|
});
|
|
11846
11845
|
}
|
|
11847
11846
|
return target;
|
|
@@ -12176,12 +12175,12 @@ function _array_like_to_array$i(arr, len) {
|
|
|
12176
12175
|
function _array_with_holes$d(arr) {
|
|
12177
12176
|
if (Array.isArray(arr)) return arr;
|
|
12178
12177
|
}
|
|
12179
|
-
function _class_call_check$
|
|
12178
|
+
function _class_call_check$B(instance, Constructor) {
|
|
12180
12179
|
if (!(instance instanceof Constructor)) {
|
|
12181
12180
|
throw new TypeError("Cannot call a class as a function");
|
|
12182
12181
|
}
|
|
12183
12182
|
}
|
|
12184
|
-
function _defineProperties$
|
|
12183
|
+
function _defineProperties$o(target, props) {
|
|
12185
12184
|
for(var i = 0; i < props.length; i++){
|
|
12186
12185
|
var descriptor = props[i];
|
|
12187
12186
|
descriptor.enumerable = descriptor.enumerable || false;
|
|
@@ -12190,12 +12189,12 @@ function _defineProperties$p(target, props) {
|
|
|
12190
12189
|
Object.defineProperty(target, descriptor.key, descriptor);
|
|
12191
12190
|
}
|
|
12192
12191
|
}
|
|
12193
|
-
function _create_class$
|
|
12194
|
-
if (protoProps) _defineProperties$
|
|
12195
|
-
if (staticProps) _defineProperties$
|
|
12192
|
+
function _create_class$o(Constructor, protoProps, staticProps) {
|
|
12193
|
+
if (protoProps) _defineProperties$o(Constructor.prototype, protoProps);
|
|
12194
|
+
if (staticProps) _defineProperties$o(Constructor, staticProps);
|
|
12196
12195
|
return Constructor;
|
|
12197
12196
|
}
|
|
12198
|
-
function _define_property$
|
|
12197
|
+
function _define_property$y(obj, key, value) {
|
|
12199
12198
|
if (key in obj) {
|
|
12200
12199
|
Object.defineProperty(obj, key, {
|
|
12201
12200
|
value: value,
|
|
@@ -12252,7 +12251,7 @@ function _object_spread$l(target) {
|
|
|
12252
12251
|
}));
|
|
12253
12252
|
}
|
|
12254
12253
|
ownKeys.forEach(function(key) {
|
|
12255
|
-
_define_property$
|
|
12254
|
+
_define_property$y(target, key, source[key]);
|
|
12256
12255
|
});
|
|
12257
12256
|
}
|
|
12258
12257
|
return target;
|
|
@@ -12511,7 +12510,7 @@ function removeZeroes(vals) {
|
|
|
12511
12510
|
}
|
|
12512
12511
|
var Duration = /*#__PURE__*/ function() {
|
|
12513
12512
|
function Duration(config) {
|
|
12514
|
-
_class_call_check$
|
|
12513
|
+
_class_call_check$B(this, Duration);
|
|
12515
12514
|
var accurate = config.conversionAccuracy === "longterm" || false;
|
|
12516
12515
|
var matrix = accurate ? accurateMatrix : casualMatrix;
|
|
12517
12516
|
if (config.matrix) {
|
|
@@ -12536,7 +12535,7 @@ var Duration = /*#__PURE__*/ function() {
|
|
|
12536
12535
|
* @access private
|
|
12537
12536
|
*/ this.isLuxonDuration = true;
|
|
12538
12537
|
}
|
|
12539
|
-
_create_class$
|
|
12538
|
+
_create_class$o(Duration, [
|
|
12540
12539
|
{
|
|
12541
12540
|
key: "locale",
|
|
12542
12541
|
get: /**
|
|
@@ -13408,12 +13407,12 @@ function _array_with_holes$c(arr) {
|
|
|
13408
13407
|
function _array_without_holes$a(arr) {
|
|
13409
13408
|
if (Array.isArray(arr)) return _array_like_to_array$h(arr);
|
|
13410
13409
|
}
|
|
13411
|
-
function _class_call_check$
|
|
13410
|
+
function _class_call_check$A(instance, Constructor) {
|
|
13412
13411
|
if (!(instance instanceof Constructor)) {
|
|
13413
13412
|
throw new TypeError("Cannot call a class as a function");
|
|
13414
13413
|
}
|
|
13415
13414
|
}
|
|
13416
|
-
function _defineProperties$
|
|
13415
|
+
function _defineProperties$n(target, props) {
|
|
13417
13416
|
for(var i = 0; i < props.length; i++){
|
|
13418
13417
|
var descriptor = props[i];
|
|
13419
13418
|
descriptor.enumerable = descriptor.enumerable || false;
|
|
@@ -13422,9 +13421,9 @@ function _defineProperties$o(target, props) {
|
|
|
13422
13421
|
Object.defineProperty(target, descriptor.key, descriptor);
|
|
13423
13422
|
}
|
|
13424
13423
|
}
|
|
13425
|
-
function _create_class$
|
|
13426
|
-
if (protoProps) _defineProperties$
|
|
13427
|
-
if (staticProps) _defineProperties$
|
|
13424
|
+
function _create_class$n(Constructor, protoProps, staticProps) {
|
|
13425
|
+
if (protoProps) _defineProperties$n(Constructor.prototype, protoProps);
|
|
13426
|
+
if (staticProps) _defineProperties$n(Constructor, staticProps);
|
|
13428
13427
|
return Constructor;
|
|
13429
13428
|
}
|
|
13430
13429
|
function _instanceof$9(left, right) {
|
|
@@ -13496,7 +13495,7 @@ function validateStartEnd(start, end) {
|
|
|
13496
13495
|
}
|
|
13497
13496
|
var Interval = /*#__PURE__*/ function() {
|
|
13498
13497
|
function Interval(config) {
|
|
13499
|
-
_class_call_check$
|
|
13498
|
+
_class_call_check$A(this, Interval);
|
|
13500
13499
|
/**
|
|
13501
13500
|
* @access private
|
|
13502
13501
|
*/ this.s = config.start;
|
|
@@ -13510,7 +13509,7 @@ var Interval = /*#__PURE__*/ function() {
|
|
|
13510
13509
|
* @access private
|
|
13511
13510
|
*/ this.isLuxonInterval = true;
|
|
13512
13511
|
}
|
|
13513
|
-
_create_class$
|
|
13512
|
+
_create_class$n(Interval, [
|
|
13514
13513
|
{
|
|
13515
13514
|
key: "start",
|
|
13516
13515
|
get: /**
|
|
@@ -14185,12 +14184,12 @@ var Interval = /*#__PURE__*/ function() {
|
|
|
14185
14184
|
return Interval;
|
|
14186
14185
|
}();
|
|
14187
14186
|
|
|
14188
|
-
function _class_call_check$
|
|
14187
|
+
function _class_call_check$z(instance, Constructor) {
|
|
14189
14188
|
if (!(instance instanceof Constructor)) {
|
|
14190
14189
|
throw new TypeError("Cannot call a class as a function");
|
|
14191
14190
|
}
|
|
14192
14191
|
}
|
|
14193
|
-
function _defineProperties$
|
|
14192
|
+
function _defineProperties$m(target, props) {
|
|
14194
14193
|
for(var i = 0; i < props.length; i++){
|
|
14195
14194
|
var descriptor = props[i];
|
|
14196
14195
|
descriptor.enumerable = descriptor.enumerable || false;
|
|
@@ -14199,16 +14198,16 @@ function _defineProperties$n(target, props) {
|
|
|
14199
14198
|
Object.defineProperty(target, descriptor.key, descriptor);
|
|
14200
14199
|
}
|
|
14201
14200
|
}
|
|
14202
|
-
function _create_class$
|
|
14203
|
-
if (protoProps) _defineProperties$
|
|
14204
|
-
if (staticProps) _defineProperties$
|
|
14201
|
+
function _create_class$m(Constructor, protoProps, staticProps) {
|
|
14202
|
+
if (protoProps) _defineProperties$m(Constructor.prototype, protoProps);
|
|
14203
|
+
if (staticProps) _defineProperties$m(Constructor, staticProps);
|
|
14205
14204
|
return Constructor;
|
|
14206
14205
|
}
|
|
14207
14206
|
var Info = /*#__PURE__*/ function() {
|
|
14208
14207
|
function Info() {
|
|
14209
|
-
_class_call_check$
|
|
14208
|
+
_class_call_check$z(this, Info);
|
|
14210
14209
|
}
|
|
14211
|
-
_create_class$
|
|
14210
|
+
_create_class$m(Info, null, [
|
|
14212
14211
|
{
|
|
14213
14212
|
key: "hasDST",
|
|
14214
14213
|
value: /**
|
|
@@ -14437,7 +14436,7 @@ function _array_with_holes$b(arr) {
|
|
|
14437
14436
|
function _array_without_holes$9(arr) {
|
|
14438
14437
|
if (Array.isArray(arr)) return _array_like_to_array$g(arr);
|
|
14439
14438
|
}
|
|
14440
|
-
function _define_property$
|
|
14439
|
+
function _define_property$x(obj, key, value) {
|
|
14441
14440
|
if (key in obj) {
|
|
14442
14441
|
Object.defineProperty(obj, key, {
|
|
14443
14442
|
value: value,
|
|
@@ -14608,7 +14607,7 @@ function diff(earlier, later, units, opts) {
|
|
|
14608
14607
|
});
|
|
14609
14608
|
if (lowerOrderUnits.length === 0) {
|
|
14610
14609
|
if (highWater < later) {
|
|
14611
|
-
highWater = cursor.plus(_define_property$
|
|
14610
|
+
highWater = cursor.plus(_define_property$x({}, lowestOrder, 1));
|
|
14612
14611
|
}
|
|
14613
14612
|
if (highWater !== cursor) {
|
|
14614
14613
|
results[lowestOrder] = (results[lowestOrder] || 0) + remainingMillis / (highWater - cursor);
|
|
@@ -15342,12 +15341,12 @@ function _array_like_to_array$d(arr, len) {
|
|
|
15342
15341
|
function _array_with_holes$8(arr) {
|
|
15343
15342
|
if (Array.isArray(arr)) return arr;
|
|
15344
15343
|
}
|
|
15345
|
-
function _class_call_check$
|
|
15344
|
+
function _class_call_check$y(instance, Constructor) {
|
|
15346
15345
|
if (!(instance instanceof Constructor)) {
|
|
15347
15346
|
throw new TypeError("Cannot call a class as a function");
|
|
15348
15347
|
}
|
|
15349
15348
|
}
|
|
15350
|
-
function _defineProperties$
|
|
15349
|
+
function _defineProperties$l(target, props) {
|
|
15351
15350
|
for(var i = 0; i < props.length; i++){
|
|
15352
15351
|
var descriptor = props[i];
|
|
15353
15352
|
descriptor.enumerable = descriptor.enumerable || false;
|
|
@@ -15356,12 +15355,12 @@ function _defineProperties$m(target, props) {
|
|
|
15356
15355
|
Object.defineProperty(target, descriptor.key, descriptor);
|
|
15357
15356
|
}
|
|
15358
15357
|
}
|
|
15359
|
-
function _create_class$
|
|
15360
|
-
if (protoProps) _defineProperties$
|
|
15361
|
-
if (staticProps) _defineProperties$
|
|
15358
|
+
function _create_class$l(Constructor, protoProps, staticProps) {
|
|
15359
|
+
if (protoProps) _defineProperties$l(Constructor.prototype, protoProps);
|
|
15360
|
+
if (staticProps) _defineProperties$l(Constructor, staticProps);
|
|
15362
15361
|
return Constructor;
|
|
15363
15362
|
}
|
|
15364
|
-
function _define_property$
|
|
15363
|
+
function _define_property$w(obj, key, value) {
|
|
15365
15364
|
if (key in obj) {
|
|
15366
15365
|
Object.defineProperty(obj, key, {
|
|
15367
15366
|
value: value,
|
|
@@ -15418,7 +15417,7 @@ function _object_spread$k(target) {
|
|
|
15418
15417
|
}));
|
|
15419
15418
|
}
|
|
15420
15419
|
ownKeys.forEach(function(key) {
|
|
15421
|
-
_define_property$
|
|
15420
|
+
_define_property$w(target, key, source[key]);
|
|
15422
15421
|
});
|
|
15423
15422
|
}
|
|
15424
15423
|
return target;
|
|
@@ -15849,7 +15848,7 @@ function lastOpts(argList) {
|
|
|
15849
15848
|
}
|
|
15850
15849
|
var DateTime = /*#__PURE__*/ function() {
|
|
15851
15850
|
function DateTime(config) {
|
|
15852
|
-
_class_call_check$
|
|
15851
|
+
_class_call_check$y(this, DateTime);
|
|
15853
15852
|
var zone = config.zone || Settings.defaultZone;
|
|
15854
15853
|
var invalid = config.invalid || (Number.isNaN(config.ts) ? new Invalid("invalid input") : null) || (!zone.isValid ? unsupportedZone(zone) : null);
|
|
15855
15854
|
/**
|
|
@@ -15897,7 +15896,7 @@ var DateTime = /*#__PURE__*/ function() {
|
|
|
15897
15896
|
* @access private
|
|
15898
15897
|
*/ this.isLuxonDateTime = true;
|
|
15899
15898
|
}
|
|
15900
|
-
_create_class$
|
|
15899
|
+
_create_class$l(DateTime, [
|
|
15901
15900
|
{
|
|
15902
15901
|
// INFO
|
|
15903
15902
|
/**
|
|
@@ -16635,7 +16634,7 @@ var DateTime = /*#__PURE__*/ function() {
|
|
|
16635
16634
|
* @return {DateTime}
|
|
16636
16635
|
*/ key: "endOf",
|
|
16637
16636
|
value: function endOf(unit, opts) {
|
|
16638
|
-
return this.isValid ? this.plus(_define_property$
|
|
16637
|
+
return this.isValid ? this.plus(_define_property$w({}, unit, 1)).startOf(unit, opts).minus(1) : this;
|
|
16639
16638
|
}
|
|
16640
16639
|
},
|
|
16641
16640
|
{
|
|
@@ -17908,12 +17907,12 @@ function _assert_this_initialized$k(self) {
|
|
|
17908
17907
|
}
|
|
17909
17908
|
return self;
|
|
17910
17909
|
}
|
|
17911
|
-
function _class_call_check$
|
|
17910
|
+
function _class_call_check$x(instance, Constructor) {
|
|
17912
17911
|
if (!(instance instanceof Constructor)) {
|
|
17913
17912
|
throw new TypeError("Cannot call a class as a function");
|
|
17914
17913
|
}
|
|
17915
17914
|
}
|
|
17916
|
-
function _defineProperties$
|
|
17915
|
+
function _defineProperties$k(target, props) {
|
|
17917
17916
|
for(var i = 0; i < props.length; i++){
|
|
17918
17917
|
var descriptor = props[i];
|
|
17919
17918
|
descriptor.enumerable = descriptor.enumerable || false;
|
|
@@ -17922,9 +17921,9 @@ function _defineProperties$l(target, props) {
|
|
|
17922
17921
|
Object.defineProperty(target, descriptor.key, descriptor);
|
|
17923
17922
|
}
|
|
17924
17923
|
}
|
|
17925
|
-
function _create_class$
|
|
17926
|
-
if (protoProps) _defineProperties$
|
|
17927
|
-
if (staticProps) _defineProperties$
|
|
17924
|
+
function _create_class$k(Constructor, protoProps, staticProps) {
|
|
17925
|
+
if (protoProps) _defineProperties$k(Constructor.prototype, protoProps);
|
|
17926
|
+
if (staticProps) _defineProperties$k(Constructor, staticProps);
|
|
17928
17927
|
return Constructor;
|
|
17929
17928
|
}
|
|
17930
17929
|
function _get_prototype_of$k(o) {
|
|
@@ -18035,7 +18034,7 @@ function _create_super$k(Derived) {
|
|
|
18035
18034
|
var DefaultBufferLength = 1024;
|
|
18036
18035
|
var nextPropID = 0;
|
|
18037
18036
|
var Range$1 = function Range(from, to) {
|
|
18038
|
-
_class_call_check$
|
|
18037
|
+
_class_call_check$x(this, Range);
|
|
18039
18038
|
this.from = from;
|
|
18040
18039
|
this.to = to;
|
|
18041
18040
|
};
|
|
@@ -18046,14 +18045,14 @@ class represent prop names.
|
|
|
18046
18045
|
*/ var NodeProp = /*#__PURE__*/ function() {
|
|
18047
18046
|
function NodeProp() {
|
|
18048
18047
|
var config = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
|
|
18049
|
-
_class_call_check$
|
|
18048
|
+
_class_call_check$x(this, NodeProp);
|
|
18050
18049
|
this.id = nextPropID++;
|
|
18051
18050
|
this.perNode = !!config.perNode;
|
|
18052
18051
|
this.deserialize = config.deserialize || function() {
|
|
18053
18052
|
throw new Error("This node type doesn't define a deserialize function");
|
|
18054
18053
|
};
|
|
18055
18054
|
}
|
|
18056
|
-
_create_class$
|
|
18055
|
+
_create_class$k(NodeProp, [
|
|
18057
18056
|
{
|
|
18058
18057
|
/**
|
|
18059
18058
|
This is meant to be used with
|
|
@@ -18164,12 +18163,12 @@ represented by another tree.
|
|
|
18164
18163
|
*/ overlay, /**
|
|
18165
18164
|
The parser used to create this subtree.
|
|
18166
18165
|
*/ parser) {
|
|
18167
|
-
_class_call_check$
|
|
18166
|
+
_class_call_check$x(this, MountedTree);
|
|
18168
18167
|
this.tree = tree;
|
|
18169
18168
|
this.overlay = overlay;
|
|
18170
18169
|
this.parser = parser;
|
|
18171
18170
|
}
|
|
18172
|
-
_create_class$
|
|
18171
|
+
_create_class$k(MountedTree, null, [
|
|
18173
18172
|
{
|
|
18174
18173
|
key: "get",
|
|
18175
18174
|
value: /**
|
|
@@ -18199,13 +18198,13 @@ Each node in a syntax tree has a node type associated with it.
|
|
|
18199
18198
|
var /**
|
|
18200
18199
|
@internal
|
|
18201
18200
|
*/ flags = arguments.length > 3 && arguments[3] !== void 0 ? arguments[3] : 0;
|
|
18202
|
-
_class_call_check$
|
|
18201
|
+
_class_call_check$x(this, NodeType);
|
|
18203
18202
|
this.name = name;
|
|
18204
18203
|
this.props = props;
|
|
18205
18204
|
this.id = id;
|
|
18206
18205
|
this.flags = flags;
|
|
18207
18206
|
}
|
|
18208
|
-
_create_class$
|
|
18207
|
+
_create_class$k(NodeType, [
|
|
18209
18208
|
{
|
|
18210
18209
|
/**
|
|
18211
18210
|
Retrieves a node prop for this type. Will return `undefined` if
|
|
@@ -18355,11 +18354,11 @@ types in it, so that the ids fit into 16-bit typed array slots.
|
|
|
18355
18354
|
function NodeSet(/**
|
|
18356
18355
|
The node types in this set, by id.
|
|
18357
18356
|
*/ types) {
|
|
18358
|
-
_class_call_check$
|
|
18357
|
+
_class_call_check$x(this, NodeSet);
|
|
18359
18358
|
this.types = types;
|
|
18360
18359
|
for(var i = 0; i < types.length; i++)if (types[i].id != i) throw new RangeError("Node type ids should correspond to array positions when creating a node set");
|
|
18361
18360
|
}
|
|
18362
|
-
_create_class$
|
|
18361
|
+
_create_class$k(NodeSet, [
|
|
18363
18362
|
{
|
|
18364
18363
|
/**
|
|
18365
18364
|
Create a copy of this set with some node properties added. The
|
|
@@ -18478,7 +18477,7 @@ move around to adjacent nodes.
|
|
|
18478
18477
|
*/ length, /**
|
|
18479
18478
|
Per-node [node props](#common.NodeProp) to associate with this node.
|
|
18480
18479
|
*/ props) {
|
|
18481
|
-
_class_call_check$
|
|
18480
|
+
_class_call_check$x(this, Tree);
|
|
18482
18481
|
this.type = type;
|
|
18483
18482
|
this.children = children;
|
|
18484
18483
|
this.positions = positions;
|
|
@@ -18510,7 +18509,7 @@ move around to adjacent nodes.
|
|
|
18510
18509
|
}
|
|
18511
18510
|
}
|
|
18512
18511
|
}
|
|
18513
|
-
_create_class$
|
|
18512
|
+
_create_class$k(Tree, [
|
|
18514
18513
|
{
|
|
18515
18514
|
/**
|
|
18516
18515
|
@internal
|
|
@@ -18712,11 +18711,11 @@ The empty tree
|
|
|
18712
18711
|
*/ Tree.empty = new Tree(NodeType.none, [], [], 0);
|
|
18713
18712
|
var FlatBufferCursor = /*#__PURE__*/ function() {
|
|
18714
18713
|
function FlatBufferCursor(buffer, index) {
|
|
18715
|
-
_class_call_check$
|
|
18714
|
+
_class_call_check$x(this, FlatBufferCursor);
|
|
18716
18715
|
this.buffer = buffer;
|
|
18717
18716
|
this.index = index;
|
|
18718
18717
|
}
|
|
18719
|
-
_create_class$
|
|
18718
|
+
_create_class$k(FlatBufferCursor, [
|
|
18720
18719
|
{
|
|
18721
18720
|
key: "id",
|
|
18722
18721
|
get: function get() {
|
|
@@ -18775,12 +18774,12 @@ children belong to it).
|
|
|
18775
18774
|
*/ length, /**
|
|
18776
18775
|
The node set used in this buffer.
|
|
18777
18776
|
*/ set) {
|
|
18778
|
-
_class_call_check$
|
|
18777
|
+
_class_call_check$x(this, TreeBuffer);
|
|
18779
18778
|
this.buffer = buffer;
|
|
18780
18779
|
this.length = length;
|
|
18781
18780
|
this.set = set;
|
|
18782
18781
|
}
|
|
18783
|
-
_create_class$
|
|
18782
|
+
_create_class$k(TreeBuffer, [
|
|
18784
18783
|
{
|
|
18785
18784
|
key: "type",
|
|
18786
18785
|
get: /**
|
|
@@ -18892,9 +18891,9 @@ function resolveNode(node, pos, side, overlays) {
|
|
|
18892
18891
|
}
|
|
18893
18892
|
var BaseNode = /*#__PURE__*/ function() {
|
|
18894
18893
|
function BaseNode() {
|
|
18895
|
-
_class_call_check$
|
|
18894
|
+
_class_call_check$x(this, BaseNode);
|
|
18896
18895
|
}
|
|
18897
|
-
_create_class$
|
|
18896
|
+
_create_class$k(BaseNode, [
|
|
18898
18897
|
{
|
|
18899
18898
|
key: "cursor",
|
|
18900
18899
|
value: function cursor() {
|
|
@@ -18974,7 +18973,7 @@ var TreeNode = /*#__PURE__*/ function(BaseNode) {
|
|
|
18974
18973
|
var _super = _create_super$k(TreeNode);
|
|
18975
18974
|
function TreeNode(_tree, from, // Index in parent node, set to -1 if the node is not a direct child of _parent.node (overlay)
|
|
18976
18975
|
index, _parent) {
|
|
18977
|
-
_class_call_check$
|
|
18976
|
+
_class_call_check$x(this, TreeNode);
|
|
18978
18977
|
var _this;
|
|
18979
18978
|
_this = _super.call(this);
|
|
18980
18979
|
_this._tree = _tree;
|
|
@@ -18983,7 +18982,7 @@ var TreeNode = /*#__PURE__*/ function(BaseNode) {
|
|
|
18983
18982
|
_this._parent = _parent;
|
|
18984
18983
|
return _this;
|
|
18985
18984
|
}
|
|
18986
|
-
_create_class$
|
|
18985
|
+
_create_class$k(TreeNode, [
|
|
18987
18986
|
{
|
|
18988
18987
|
key: "type",
|
|
18989
18988
|
get: function get() {
|
|
@@ -19158,7 +19157,7 @@ function matchNodeContext(node, context) {
|
|
|
19158
19157
|
return true;
|
|
19159
19158
|
}
|
|
19160
19159
|
var BufferContext = function BufferContext(parent, buffer, index, start) {
|
|
19161
|
-
_class_call_check$
|
|
19160
|
+
_class_call_check$x(this, BufferContext);
|
|
19162
19161
|
this.parent = parent;
|
|
19163
19162
|
this.buffer = buffer;
|
|
19164
19163
|
this.index = index;
|
|
@@ -19168,7 +19167,7 @@ var BufferNode = /*#__PURE__*/ function(BaseNode) {
|
|
|
19168
19167
|
_inherits$k(BufferNode, BaseNode);
|
|
19169
19168
|
var _super = _create_super$k(BufferNode);
|
|
19170
19169
|
function BufferNode(context, _parent, index) {
|
|
19171
|
-
_class_call_check$
|
|
19170
|
+
_class_call_check$x(this, BufferNode);
|
|
19172
19171
|
var _this;
|
|
19173
19172
|
_this = _super.call(this);
|
|
19174
19173
|
_this.context = context;
|
|
@@ -19177,7 +19176,7 @@ var BufferNode = /*#__PURE__*/ function(BaseNode) {
|
|
|
19177
19176
|
_this.type = context.buffer.set.types[context.buffer.buffer[index]];
|
|
19178
19177
|
return _this;
|
|
19179
19178
|
}
|
|
19180
|
-
_create_class$
|
|
19179
|
+
_create_class$k(BufferNode, [
|
|
19181
19180
|
{
|
|
19182
19181
|
key: "name",
|
|
19183
19182
|
get: function get() {
|
|
@@ -19317,11 +19316,11 @@ function iterStack(heads) {
|
|
|
19317
19316
|
}
|
|
19318
19317
|
var StackIterator = /*#__PURE__*/ function() {
|
|
19319
19318
|
function StackIterator(heads, node) {
|
|
19320
|
-
_class_call_check$
|
|
19319
|
+
_class_call_check$x(this, StackIterator);
|
|
19321
19320
|
this.heads = heads;
|
|
19322
19321
|
this.node = node;
|
|
19323
19322
|
}
|
|
19324
|
-
_create_class$
|
|
19323
|
+
_create_class$k(StackIterator, [
|
|
19325
19324
|
{
|
|
19326
19325
|
key: "next",
|
|
19327
19326
|
get: function get() {
|
|
@@ -19361,7 +19360,7 @@ allows you to move to adjacent nodes.
|
|
|
19361
19360
|
var /**
|
|
19362
19361
|
@internal
|
|
19363
19362
|
*/ mode = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : 0;
|
|
19364
|
-
_class_call_check$
|
|
19363
|
+
_class_call_check$x(this, TreeCursor);
|
|
19365
19364
|
this.mode = mode;
|
|
19366
19365
|
/**
|
|
19367
19366
|
@internal
|
|
@@ -19381,7 +19380,7 @@ allows you to move to adjacent nodes.
|
|
|
19381
19380
|
this.yieldBuf(node.index);
|
|
19382
19381
|
}
|
|
19383
19382
|
}
|
|
19384
|
-
_create_class$
|
|
19383
|
+
_create_class$k(TreeCursor, [
|
|
19385
19384
|
{
|
|
19386
19385
|
key: "name",
|
|
19387
19386
|
get: /**
|
|
@@ -20001,9 +20000,9 @@ mkTree) {
|
|
|
20001
20000
|
A superclass that parsers should extend.
|
|
20002
20001
|
*/ var Parser = /*#__PURE__*/ function() {
|
|
20003
20002
|
function Parser() {
|
|
20004
|
-
_class_call_check$
|
|
20003
|
+
_class_call_check$x(this, Parser);
|
|
20005
20004
|
}
|
|
20006
|
-
_create_class$
|
|
20005
|
+
_create_class$k(Parser, [
|
|
20007
20006
|
{
|
|
20008
20007
|
/**
|
|
20009
20008
|
Start a parse, returning a [partial parse](#common.PartialParse)
|
|
@@ -20044,10 +20043,10 @@ A superclass that parsers should extend.
|
|
|
20044
20043
|
}();
|
|
20045
20044
|
var StringInput = /*#__PURE__*/ function() {
|
|
20046
20045
|
function StringInput(string) {
|
|
20047
|
-
_class_call_check$
|
|
20046
|
+
_class_call_check$x(this, StringInput);
|
|
20048
20047
|
this.string = string;
|
|
20049
20048
|
}
|
|
20050
|
-
_create_class$
|
|
20049
|
+
_create_class$k(StringInput, [
|
|
20051
20050
|
{
|
|
20052
20051
|
key: "length",
|
|
20053
20052
|
get: function get() {
|
|
@@ -20096,12 +20095,12 @@ function _assert_this_initialized$j(self) {
|
|
|
20096
20095
|
}
|
|
20097
20096
|
return self;
|
|
20098
20097
|
}
|
|
20099
|
-
function _class_call_check$
|
|
20098
|
+
function _class_call_check$w(instance, Constructor) {
|
|
20100
20099
|
if (!(instance instanceof Constructor)) {
|
|
20101
20100
|
throw new TypeError("Cannot call a class as a function");
|
|
20102
20101
|
}
|
|
20103
20102
|
}
|
|
20104
|
-
function _defineProperties$
|
|
20103
|
+
function _defineProperties$j(target, props) {
|
|
20105
20104
|
for(var i = 0; i < props.length; i++){
|
|
20106
20105
|
var descriptor = props[i];
|
|
20107
20106
|
descriptor.enumerable = descriptor.enumerable || false;
|
|
@@ -20110,9 +20109,9 @@ function _defineProperties$k(target, props) {
|
|
|
20110
20109
|
Object.defineProperty(target, descriptor.key, descriptor);
|
|
20111
20110
|
}
|
|
20112
20111
|
}
|
|
20113
|
-
function _create_class$
|
|
20114
|
-
if (protoProps) _defineProperties$
|
|
20115
|
-
if (staticProps) _defineProperties$
|
|
20112
|
+
function _create_class$j(Constructor, protoProps, staticProps) {
|
|
20113
|
+
if (protoProps) _defineProperties$j(Constructor.prototype, protoProps);
|
|
20114
|
+
if (staticProps) _defineProperties$j(Constructor, staticProps);
|
|
20116
20115
|
return Constructor;
|
|
20117
20116
|
}
|
|
20118
20117
|
function _get_prototype_of$j(o) {
|
|
@@ -20278,7 +20277,7 @@ about the parse state.
|
|
|
20278
20277
|
/**
|
|
20279
20278
|
@internal
|
|
20280
20279
|
*/ parent = arguments.length > 10 ? arguments[10] : void 0;
|
|
20281
|
-
_class_call_check$
|
|
20280
|
+
_class_call_check$w(this, Stack);
|
|
20282
20281
|
this.p = p;
|
|
20283
20282
|
this.stack = stack;
|
|
20284
20283
|
this.state = state;
|
|
@@ -20291,7 +20290,7 @@ about the parse state.
|
|
|
20291
20290
|
this.lookAhead = lookAhead;
|
|
20292
20291
|
this.parent = parent;
|
|
20293
20292
|
}
|
|
20294
|
-
_create_class$
|
|
20293
|
+
_create_class$j(Stack, [
|
|
20295
20294
|
{
|
|
20296
20295
|
/**
|
|
20297
20296
|
@internal
|
|
@@ -20757,7 +20756,7 @@ about the parse state.
|
|
|
20757
20756
|
return Stack;
|
|
20758
20757
|
}();
|
|
20759
20758
|
var StackContext = function StackContext(tracker, context) {
|
|
20760
|
-
_class_call_check$
|
|
20759
|
+
_class_call_check$w(this, StackContext);
|
|
20761
20760
|
this.tracker = tracker;
|
|
20762
20761
|
this.context = context;
|
|
20763
20762
|
this.hash = tracker.strict ? tracker.hash(context) : 0;
|
|
@@ -20766,13 +20765,13 @@ var StackContext = function StackContext(tracker, context) {
|
|
|
20766
20765
|
// an entire stack
|
|
20767
20766
|
var SimulatedStack = /*#__PURE__*/ function() {
|
|
20768
20767
|
function SimulatedStack(start) {
|
|
20769
|
-
_class_call_check$
|
|
20768
|
+
_class_call_check$w(this, SimulatedStack);
|
|
20770
20769
|
this.start = start;
|
|
20771
20770
|
this.state = start.state;
|
|
20772
20771
|
this.stack = start.stack;
|
|
20773
20772
|
this.base = this.stack.length;
|
|
20774
20773
|
}
|
|
20775
|
-
_create_class$
|
|
20774
|
+
_create_class$j(SimulatedStack, [
|
|
20776
20775
|
{
|
|
20777
20776
|
key: "reduce",
|
|
20778
20777
|
value: function reduce(action) {
|
|
@@ -20795,14 +20794,14 @@ var SimulatedStack = /*#__PURE__*/ function() {
|
|
|
20795
20794
|
// the parent-stack-walking necessary to read the nodes.
|
|
20796
20795
|
var StackBufferCursor = /*#__PURE__*/ function() {
|
|
20797
20796
|
function StackBufferCursor(stack, pos, index) {
|
|
20798
|
-
_class_call_check$
|
|
20797
|
+
_class_call_check$w(this, StackBufferCursor);
|
|
20799
20798
|
this.stack = stack;
|
|
20800
20799
|
this.pos = pos;
|
|
20801
20800
|
this.index = index;
|
|
20802
20801
|
this.buffer = stack.buffer;
|
|
20803
20802
|
if (this.index == 0) this.maybeNext();
|
|
20804
20803
|
}
|
|
20805
|
-
_create_class$
|
|
20804
|
+
_create_class$j(StackBufferCursor, [
|
|
20806
20805
|
{
|
|
20807
20806
|
key: "maybeNext",
|
|
20808
20807
|
value: function maybeNext() {
|
|
@@ -20894,7 +20893,7 @@ function decodeArray(input) {
|
|
|
20894
20893
|
return array;
|
|
20895
20894
|
}
|
|
20896
20895
|
var CachedToken = function CachedToken() {
|
|
20897
|
-
_class_call_check$
|
|
20896
|
+
_class_call_check$w(this, CachedToken);
|
|
20898
20897
|
this.start = -1;
|
|
20899
20898
|
this.value = -1;
|
|
20900
20899
|
this.end = -1;
|
|
@@ -20915,7 +20914,7 @@ characters, tracking lookahead and hiding the complexity of
|
|
|
20915
20914
|
*/ input, /**
|
|
20916
20915
|
@internal
|
|
20917
20916
|
*/ ranges) {
|
|
20918
|
-
_class_call_check$
|
|
20917
|
+
_class_call_check$w(this, InputStream);
|
|
20919
20918
|
this.input = input;
|
|
20920
20919
|
this.ranges = ranges;
|
|
20921
20920
|
/**
|
|
@@ -20941,7 +20940,7 @@ characters, tracking lookahead and hiding the complexity of
|
|
|
20941
20940
|
this.end = ranges[ranges.length - 1].to;
|
|
20942
20941
|
this.readNext();
|
|
20943
20942
|
}
|
|
20944
|
-
_create_class$
|
|
20943
|
+
_create_class$j(InputStream, [
|
|
20945
20944
|
{
|
|
20946
20945
|
/**
|
|
20947
20946
|
@internal
|
|
@@ -21182,11 +21181,11 @@ characters, tracking lookahead and hiding the complexity of
|
|
|
21182
21181
|
@internal
|
|
21183
21182
|
*/ var TokenGroup = /*#__PURE__*/ function() {
|
|
21184
21183
|
function TokenGroup(data, id) {
|
|
21185
|
-
_class_call_check$
|
|
21184
|
+
_class_call_check$w(this, TokenGroup);
|
|
21186
21185
|
this.data = data;
|
|
21187
21186
|
this.id = id;
|
|
21188
21187
|
}
|
|
21189
|
-
_create_class$
|
|
21188
|
+
_create_class$j(TokenGroup, [
|
|
21190
21189
|
{
|
|
21191
21190
|
key: "token",
|
|
21192
21191
|
value: function token(input, stack) {
|
|
@@ -21206,7 +21205,7 @@ an instance of this class.
|
|
|
21206
21205
|
@internal
|
|
21207
21206
|
*/ token) {
|
|
21208
21207
|
var options = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
|
|
21209
|
-
_class_call_check$
|
|
21208
|
+
_class_call_check$w(this, ExternalTokenizer);
|
|
21210
21209
|
this.token = token;
|
|
21211
21210
|
this.contextual = !!options.contextual;
|
|
21212
21211
|
this.fallback = !!options.fallback;
|
|
@@ -21293,7 +21292,7 @@ function cutAt(tree, pos, side) {
|
|
|
21293
21292
|
}
|
|
21294
21293
|
var FragmentCursor = /*#__PURE__*/ function() {
|
|
21295
21294
|
function FragmentCursor(fragments, nodeSet) {
|
|
21296
|
-
_class_call_check$
|
|
21295
|
+
_class_call_check$w(this, FragmentCursor);
|
|
21297
21296
|
this.fragments = fragments;
|
|
21298
21297
|
this.nodeSet = nodeSet;
|
|
21299
21298
|
this.i = 0;
|
|
@@ -21305,7 +21304,7 @@ var FragmentCursor = /*#__PURE__*/ function() {
|
|
|
21305
21304
|
this.index = [];
|
|
21306
21305
|
this.nextFragment();
|
|
21307
21306
|
}
|
|
21308
|
-
_create_class$
|
|
21307
|
+
_create_class$j(FragmentCursor, [
|
|
21309
21308
|
{
|
|
21310
21309
|
key: "nextFragment",
|
|
21311
21310
|
value: function nextFragment() {
|
|
@@ -21380,7 +21379,7 @@ var FragmentCursor = /*#__PURE__*/ function() {
|
|
|
21380
21379
|
}();
|
|
21381
21380
|
var TokenCache = /*#__PURE__*/ function() {
|
|
21382
21381
|
function TokenCache(parser, stream) {
|
|
21383
|
-
_class_call_check$
|
|
21382
|
+
_class_call_check$w(this, TokenCache);
|
|
21384
21383
|
this.stream = stream;
|
|
21385
21384
|
this.tokens = [];
|
|
21386
21385
|
this.mainToken = null;
|
|
@@ -21389,7 +21388,7 @@ var TokenCache = /*#__PURE__*/ function() {
|
|
|
21389
21388
|
return new CachedToken;
|
|
21390
21389
|
});
|
|
21391
21390
|
}
|
|
21392
|
-
_create_class$
|
|
21391
|
+
_create_class$j(TokenCache, [
|
|
21393
21392
|
{
|
|
21394
21393
|
key: "getActions",
|
|
21395
21394
|
value: function getActions(stack) {
|
|
@@ -21499,7 +21498,7 @@ var TokenCache = /*#__PURE__*/ function() {
|
|
|
21499
21498
|
}();
|
|
21500
21499
|
var Parse = /*#__PURE__*/ function() {
|
|
21501
21500
|
function Parse(parser, input, fragments, ranges) {
|
|
21502
|
-
_class_call_check$
|
|
21501
|
+
_class_call_check$w(this, Parse);
|
|
21503
21502
|
this.parser = parser;
|
|
21504
21503
|
this.input = input;
|
|
21505
21504
|
this.ranges = ranges;
|
|
@@ -21520,7 +21519,7 @@ var Parse = /*#__PURE__*/ function() {
|
|
|
21520
21519
|
];
|
|
21521
21520
|
this.fragments = fragments.length && this.stream.end - from > parser.bufferLength * 4 ? new FragmentCursor(fragments, parser.nodeSet) : null;
|
|
21522
21521
|
}
|
|
21523
|
-
_create_class$
|
|
21522
|
+
_create_class$j(Parse, [
|
|
21524
21523
|
{
|
|
21525
21524
|
key: "parsedPos",
|
|
21526
21525
|
get: function get() {
|
|
@@ -21800,12 +21799,12 @@ function pushStackDedup(stack, newStacks) {
|
|
|
21800
21799
|
}
|
|
21801
21800
|
var Dialect = /*#__PURE__*/ function() {
|
|
21802
21801
|
function Dialect(source, flags, disabled) {
|
|
21803
|
-
_class_call_check$
|
|
21802
|
+
_class_call_check$w(this, Dialect);
|
|
21804
21803
|
this.source = source;
|
|
21805
21804
|
this.flags = flags;
|
|
21806
21805
|
this.disabled = disabled;
|
|
21807
21806
|
}
|
|
21808
|
-
_create_class$
|
|
21807
|
+
_create_class$j(Dialect, [
|
|
21809
21808
|
{
|
|
21810
21809
|
key: "allows",
|
|
21811
21810
|
value: function allows(term) {
|
|
@@ -21830,7 +21829,7 @@ on shift or reduce actions.
|
|
|
21830
21829
|
The export used in a `@context` declaration should be of this
|
|
21831
21830
|
type.
|
|
21832
21831
|
*/ var ContextTracker = function ContextTracker(spec) {
|
|
21833
|
-
_class_call_check$
|
|
21832
|
+
_class_call_check$w(this, ContextTracker);
|
|
21834
21833
|
this.start = spec.start;
|
|
21835
21834
|
this.shift = spec.shift || id;
|
|
21836
21835
|
this.reduce = spec.reduce || id;
|
|
@@ -21849,7 +21848,7 @@ content with.
|
|
|
21849
21848
|
var _super = _create_super$j(LRParser);
|
|
21850
21849
|
function LRParser(spec) {
|
|
21851
21850
|
var _this_nodeSet;
|
|
21852
|
-
_class_call_check$
|
|
21851
|
+
_class_call_check$w(this, LRParser);
|
|
21853
21852
|
var _this;
|
|
21854
21853
|
var setProp = function setProp(nodeID, prop, value) {
|
|
21855
21854
|
nodeProps[nodeID].push([
|
|
@@ -21937,7 +21936,7 @@ content with.
|
|
|
21937
21936
|
_this.top = _this.topRules[Object.keys(_this.topRules)[0]];
|
|
21938
21937
|
return _this;
|
|
21939
21938
|
}
|
|
21940
|
-
_create_class$
|
|
21939
|
+
_create_class$j(LRParser, [
|
|
21941
21940
|
{
|
|
21942
21941
|
key: "createParse",
|
|
21943
21942
|
value: function createParse(input, fragments, ranges) {
|
|
@@ -22249,12 +22248,12 @@ function getSpecializer(spec) {
|
|
|
22249
22248
|
return spec.get;
|
|
22250
22249
|
}
|
|
22251
22250
|
|
|
22252
|
-
function _class_call_check$
|
|
22251
|
+
function _class_call_check$v(instance, Constructor) {
|
|
22253
22252
|
if (!(instance instanceof Constructor)) {
|
|
22254
22253
|
throw new TypeError("Cannot call a class as a function");
|
|
22255
22254
|
}
|
|
22256
22255
|
}
|
|
22257
|
-
function _defineProperties$
|
|
22256
|
+
function _defineProperties$i(target, props) {
|
|
22258
22257
|
for(var i = 0; i < props.length; i++){
|
|
22259
22258
|
var descriptor = props[i];
|
|
22260
22259
|
descriptor.enumerable = descriptor.enumerable || false;
|
|
@@ -22263,9 +22262,9 @@ function _defineProperties$j(target, props) {
|
|
|
22263
22262
|
Object.defineProperty(target, descriptor.key, descriptor);
|
|
22264
22263
|
}
|
|
22265
22264
|
}
|
|
22266
|
-
function _create_class$
|
|
22267
|
-
if (protoProps) _defineProperties$
|
|
22268
|
-
if (staticProps) _defineProperties$
|
|
22265
|
+
function _create_class$i(Constructor, protoProps, staticProps) {
|
|
22266
|
+
if (protoProps) _defineProperties$i(Constructor.prototype, protoProps);
|
|
22267
|
+
if (staticProps) _defineProperties$i(Constructor, staticProps);
|
|
22269
22268
|
return Constructor;
|
|
22270
22269
|
}
|
|
22271
22270
|
var nextTagID = 0;
|
|
@@ -22297,7 +22296,7 @@ from standard tags to allow highlighters to fall back to those).
|
|
|
22297
22296
|
*/ base, /**
|
|
22298
22297
|
The modifiers applied to this.base @internal
|
|
22299
22298
|
*/ modified) {
|
|
22300
|
-
_class_call_check$
|
|
22299
|
+
_class_call_check$v(this, Tag);
|
|
22301
22300
|
this.set = set;
|
|
22302
22301
|
this.base = base;
|
|
22303
22302
|
this.modified = modified;
|
|
@@ -22305,7 +22304,7 @@ from standard tags to allow highlighters to fall back to those).
|
|
|
22305
22304
|
@internal
|
|
22306
22305
|
*/ this.id = nextTagID++;
|
|
22307
22306
|
}
|
|
22308
|
-
_create_class$
|
|
22307
|
+
_create_class$i(Tag, null, [
|
|
22309
22308
|
{
|
|
22310
22309
|
key: "define",
|
|
22311
22310
|
value: /**
|
|
@@ -22370,11 +22369,11 @@ from standard tags to allow highlighters to fall back to those).
|
|
|
22370
22369
|
var nextModifierID = 0;
|
|
22371
22370
|
var Modifier = /*#__PURE__*/ function() {
|
|
22372
22371
|
function Modifier() {
|
|
22373
|
-
_class_call_check$
|
|
22372
|
+
_class_call_check$v(this, Modifier);
|
|
22374
22373
|
this.instances = [];
|
|
22375
22374
|
this.id = nextModifierID++;
|
|
22376
22375
|
}
|
|
22377
|
-
_create_class$
|
|
22376
|
+
_create_class$i(Modifier, null, [
|
|
22378
22377
|
{
|
|
22379
22378
|
key: "get",
|
|
22380
22379
|
value: function get(base, mods) {
|
|
@@ -22574,13 +22573,13 @@ parser.withProps(
|
|
|
22574
22573
|
var ruleNodeProp = new NodeProp();
|
|
22575
22574
|
var Rule = /*#__PURE__*/ function() {
|
|
22576
22575
|
function Rule(tags, mode, context, next) {
|
|
22577
|
-
_class_call_check$
|
|
22576
|
+
_class_call_check$v(this, Rule);
|
|
22578
22577
|
this.tags = tags;
|
|
22579
22578
|
this.mode = mode;
|
|
22580
22579
|
this.context = context;
|
|
22581
22580
|
this.next = next;
|
|
22582
22581
|
}
|
|
22583
|
-
_create_class$
|
|
22582
|
+
_create_class$i(Rule, [
|
|
22584
22583
|
{
|
|
22585
22584
|
key: "opaque",
|
|
22586
22585
|
get: function get() {
|
|
@@ -23200,12 +23199,12 @@ function _array_with_holes$5(arr) {
|
|
|
23200
23199
|
function _array_without_holes$6(arr) {
|
|
23201
23200
|
if (Array.isArray(arr)) return _array_like_to_array$a(arr);
|
|
23202
23201
|
}
|
|
23203
|
-
function _class_call_check$
|
|
23202
|
+
function _class_call_check$u(instance, Constructor) {
|
|
23204
23203
|
if (!(instance instanceof Constructor)) {
|
|
23205
23204
|
throw new TypeError("Cannot call a class as a function");
|
|
23206
23205
|
}
|
|
23207
23206
|
}
|
|
23208
|
-
function _defineProperties$
|
|
23207
|
+
function _defineProperties$h(target, props) {
|
|
23209
23208
|
for(var i = 0; i < props.length; i++){
|
|
23210
23209
|
var descriptor = props[i];
|
|
23211
23210
|
descriptor.enumerable = descriptor.enumerable || false;
|
|
@@ -23214,12 +23213,12 @@ function _defineProperties$i(target, props) {
|
|
|
23214
23213
|
Object.defineProperty(target, descriptor.key, descriptor);
|
|
23215
23214
|
}
|
|
23216
23215
|
}
|
|
23217
|
-
function _create_class$
|
|
23218
|
-
if (protoProps) _defineProperties$
|
|
23219
|
-
if (staticProps) _defineProperties$
|
|
23216
|
+
function _create_class$h(Constructor, protoProps, staticProps) {
|
|
23217
|
+
if (protoProps) _defineProperties$h(Constructor.prototype, protoProps);
|
|
23218
|
+
if (staticProps) _defineProperties$h(Constructor, staticProps);
|
|
23220
23219
|
return Constructor;
|
|
23221
23220
|
}
|
|
23222
|
-
function _define_property$
|
|
23221
|
+
function _define_property$v(obj, key, value) {
|
|
23223
23222
|
if (key in obj) {
|
|
23224
23223
|
Object.defineProperty(obj, key, {
|
|
23225
23224
|
value: value,
|
|
@@ -23282,7 +23281,7 @@ function _object_spread$j(target) {
|
|
|
23282
23281
|
}));
|
|
23283
23282
|
}
|
|
23284
23283
|
ownKeys.forEach(function(key) {
|
|
23285
|
-
_define_property$
|
|
23284
|
+
_define_property$v(target, key, source[key]);
|
|
23286
23285
|
});
|
|
23287
23286
|
}
|
|
23288
23287
|
return target;
|
|
@@ -23499,14 +23498,14 @@ function indent(str, spaces) {
|
|
|
23499
23498
|
var match = parseIdentifier(input, i1, namePart) || namePart && parseAdditionalSymbol(input, i1) || maybeSpace && parseSpaces(input, i1);
|
|
23500
23499
|
// match is required
|
|
23501
23500
|
if (!match) {
|
|
23502
|
-
return
|
|
23501
|
+
return tokens = tokens1, nextMatch = nextMatch1, i = i1, {
|
|
23503
23502
|
v: nextMatch1
|
|
23504
23503
|
};
|
|
23505
23504
|
}
|
|
23506
23505
|
var token = match.token, offset = match.offset;
|
|
23507
23506
|
i1 += offset;
|
|
23508
23507
|
if (token === " ") {
|
|
23509
|
-
return
|
|
23508
|
+
return tokens = tokens1, nextMatch = nextMatch1, i = i1, "continue";
|
|
23510
23509
|
}
|
|
23511
23510
|
tokens1 = _to_consumable_array$6(tokens1).concat([
|
|
23512
23511
|
token
|
|
@@ -23525,7 +23524,7 @@ function indent(str, spaces) {
|
|
|
23525
23524
|
if (contextKeys.some(function(el) {
|
|
23526
23525
|
return el.startsWith(name);
|
|
23527
23526
|
})) {
|
|
23528
|
-
return
|
|
23527
|
+
return tokens = tokens1, nextMatch = nextMatch1, i = i1, "continue";
|
|
23529
23528
|
}
|
|
23530
23529
|
if (dateTimeIdentifiers.some(function(el) {
|
|
23531
23530
|
return el === name;
|
|
@@ -23544,9 +23543,9 @@ function indent(str, spaces) {
|
|
|
23544
23543
|
if (dateTimeIdentifiers.some(function(el) {
|
|
23545
23544
|
return el.startsWith(name);
|
|
23546
23545
|
})) {
|
|
23547
|
-
return
|
|
23546
|
+
return tokens = tokens1, nextMatch = nextMatch1, i = i1, "continue";
|
|
23548
23547
|
}
|
|
23549
|
-
return
|
|
23548
|
+
return tokens = tokens1, nextMatch = nextMatch1, i = i1, {
|
|
23550
23549
|
v: nextMatch1
|
|
23551
23550
|
};
|
|
23552
23551
|
};
|
|
@@ -23558,7 +23557,7 @@ function indent(str, spaces) {
|
|
|
23558
23557
|
}
|
|
23559
23558
|
}
|
|
23560
23559
|
var _obj;
|
|
23561
|
-
var identifiersMap = (_obj = {}, _define_property$
|
|
23560
|
+
var identifiersMap = (_obj = {}, _define_property$v(_obj, identifier, "identifier"), _define_property$v(_obj, nameIdentifier, "nameIdentifier"), _obj);
|
|
23562
23561
|
var identifiers = new ExternalTokenizer(function(input, stack) {
|
|
23563
23562
|
LOG_PARSE_DEBUG && console.log("%s: T <identifier | nameIdentifier>", input.pos);
|
|
23564
23563
|
var nameMatch = parseName(input, stack.context);
|
|
@@ -23607,17 +23606,17 @@ var insertSemicolon = new ExternalTokenizer(function(input, stack) {
|
|
|
23607
23606
|
}
|
|
23608
23607
|
});
|
|
23609
23608
|
var _obj1;
|
|
23610
|
-
var prefixedContextStarts = (_obj1 = {}, _define_property$
|
|
23609
|
+
var prefixedContextStarts = (_obj1 = {}, _define_property$v(_obj1, functionInvocationStart, "FunctionInvocation"), _define_property$v(_obj1, filterExpressionStart, "FilterExpression"), _define_property$v(_obj1, pathExpressionStart, "PathExpression"), _obj1);
|
|
23611
23610
|
var _obj2;
|
|
23612
|
-
var contextStarts = (_obj2 = {}, _define_property$
|
|
23611
|
+
var contextStarts = (_obj2 = {}, _define_property$v(_obj2, contextStart, "Context"), _define_property$v(_obj2, functionDefinitionStart, "FunctionDefinition"), _define_property$v(_obj2, forExpressionStart, "ForExpression"), _define_property$v(_obj2, listStart, "List"), _define_property$v(_obj2, ifExpressionStart, "IfExpression"), _define_property$v(_obj2, quantifiedExpressionStart, "QuantifiedExpression"), _obj2);
|
|
23613
23612
|
var _obj3;
|
|
23614
|
-
var contextEnds = (_obj3 = {}, _define_property$
|
|
23613
|
+
var contextEnds = (_obj3 = {}, _define_property$v(_obj3, Context, "Context"), _define_property$v(_obj3, FunctionDefinition, "FunctionDefinition"), _define_property$v(_obj3, ForExpression, "ForExpression"), _define_property$v(_obj3, List, "List"), _define_property$v(_obj3, IfExpression, "IfExpression"), _define_property$v(_obj3, QuantifiedExpression, "QuantifiedExpression"), _define_property$v(_obj3, PathExpression, "PathExpression"), _define_property$v(_obj3, FunctionInvocation, "FunctionInvocation"), _define_property$v(_obj3, FilterExpression, "FilterExpression"), _define_property$v(_obj3, ArithmeticExpression, "ArithmeticExpression"), _obj3);
|
|
23615
23614
|
var ValueProducer = /*#__PURE__*/ function() {
|
|
23616
23615
|
function ValueProducer(fn) {
|
|
23617
|
-
_class_call_check$
|
|
23616
|
+
_class_call_check$u(this, ValueProducer);
|
|
23618
23617
|
this.fn = fn;
|
|
23619
23618
|
}
|
|
23620
|
-
_create_class$
|
|
23619
|
+
_create_class$h(ValueProducer, [
|
|
23621
23620
|
{
|
|
23622
23621
|
key: "get",
|
|
23623
23622
|
value: function get(variables) {
|
|
@@ -23650,12 +23649,12 @@ var dateTimeIdentifiers = Object.keys(dateTimeLiterals);
|
|
|
23650
23649
|
*/ var VariableContext = /*#__PURE__*/ function() {
|
|
23651
23650
|
function VariableContext() {
|
|
23652
23651
|
var value = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
|
|
23653
|
-
_class_call_check$
|
|
23652
|
+
_class_call_check$u(this, VariableContext);
|
|
23654
23653
|
/**
|
|
23655
23654
|
* @protected
|
|
23656
23655
|
*/ this.value = value;
|
|
23657
23656
|
}
|
|
23658
|
-
_create_class$
|
|
23657
|
+
_create_class$h(VariableContext, [
|
|
23659
23658
|
{
|
|
23660
23659
|
/**
|
|
23661
23660
|
* Return all defined keys of the context.
|
|
@@ -23696,7 +23695,7 @@ var dateTimeIdentifiers = Object.keys(dateTimeLiterals);
|
|
|
23696
23695
|
*/ key: "set",
|
|
23697
23696
|
value: function set(key, value) {
|
|
23698
23697
|
var constructor = /** @type { typeof VariableContext } */ this.constructor;
|
|
23699
|
-
return constructor.of(_object_spread_props$9(_object_spread$j({}, this.value), _define_property$
|
|
23698
|
+
return constructor.of(_object_spread_props$9(_object_spread$j({}, this.value), _define_property$v({}, key, value)));
|
|
23700
23699
|
}
|
|
23701
23700
|
}
|
|
23702
23701
|
], [
|
|
@@ -23745,7 +23744,7 @@ var dateTimeIdentifiers = Object.keys(dateTimeLiterals);
|
|
|
23745
23744
|
var Variables = /*#__PURE__*/ function() {
|
|
23746
23745
|
function Variables() {
|
|
23747
23746
|
var _ref = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {}, _ref_name = _ref.name, name = _ref_name === void 0 ? "Expressions" : _ref_name, _ref_tokens = _ref.tokens, tokens = _ref_tokens === void 0 ? [] : _ref_tokens, _ref_children = _ref.children, children = _ref_children === void 0 ? [] : _ref_children, _ref_parent = _ref.parent, parent = _ref_parent === void 0 ? null : _ref_parent, _ref_context = _ref.context, context = _ref_context === void 0 ? null : _ref_context, _ref_value = _ref.value, value = _ref_value === void 0 ? null : _ref_value, _ref_raw = _ref.raw, raw = _ref_raw === void 0 ? null : _ref_raw;
|
|
23748
|
-
_class_call_check$
|
|
23747
|
+
_class_call_check$u(this, Variables);
|
|
23749
23748
|
this.name = name;
|
|
23750
23749
|
this.tokens = tokens;
|
|
23751
23750
|
this.children = children;
|
|
@@ -23754,7 +23753,7 @@ var Variables = /*#__PURE__*/ function() {
|
|
|
23754
23753
|
this.value = value;
|
|
23755
23754
|
this.raw = raw;
|
|
23756
23755
|
}
|
|
23757
|
-
_create_class$
|
|
23756
|
+
_create_class$h(Variables, [
|
|
23758
23757
|
{
|
|
23759
23758
|
key: "enterScope",
|
|
23760
23759
|
value: function enterScope(name) {
|
|
@@ -24380,7 +24379,7 @@ function _assert_this_initialized$i(self) {
|
|
|
24380
24379
|
}
|
|
24381
24380
|
return self;
|
|
24382
24381
|
}
|
|
24383
|
-
function _class_call_check$
|
|
24382
|
+
function _class_call_check$t(instance, Constructor) {
|
|
24384
24383
|
if (!(instance instanceof Constructor)) {
|
|
24385
24384
|
throw new TypeError("Cannot call a class as a function");
|
|
24386
24385
|
}
|
|
@@ -24402,7 +24401,7 @@ function _construct$2(Parent, args, Class) {
|
|
|
24402
24401
|
}
|
|
24403
24402
|
return _construct$2.apply(null, arguments);
|
|
24404
24403
|
}
|
|
24405
|
-
function _defineProperties$
|
|
24404
|
+
function _defineProperties$g(target, props) {
|
|
24406
24405
|
for(var i = 0; i < props.length; i++){
|
|
24407
24406
|
var descriptor = props[i];
|
|
24408
24407
|
descriptor.enumerable = descriptor.enumerable || false;
|
|
@@ -24411,12 +24410,12 @@ function _defineProperties$h(target, props) {
|
|
|
24411
24410
|
Object.defineProperty(target, descriptor.key, descriptor);
|
|
24412
24411
|
}
|
|
24413
24412
|
}
|
|
24414
|
-
function _create_class$
|
|
24415
|
-
if (protoProps) _defineProperties$
|
|
24416
|
-
if (staticProps) _defineProperties$
|
|
24413
|
+
function _create_class$g(Constructor, protoProps, staticProps) {
|
|
24414
|
+
if (protoProps) _defineProperties$g(Constructor.prototype, protoProps);
|
|
24415
|
+
if (staticProps) _defineProperties$g(Constructor, staticProps);
|
|
24417
24416
|
return Constructor;
|
|
24418
24417
|
}
|
|
24419
|
-
function _define_property$
|
|
24418
|
+
function _define_property$u(obj, key, value) {
|
|
24420
24419
|
if (key in obj) {
|
|
24421
24420
|
Object.defineProperty(obj, key, {
|
|
24422
24421
|
value: value,
|
|
@@ -24654,7 +24653,7 @@ function typeCast(obj, type) {
|
|
|
24654
24653
|
return null;
|
|
24655
24654
|
}
|
|
24656
24655
|
var Range = function Range(props) {
|
|
24657
|
-
_class_call_check$
|
|
24656
|
+
_class_call_check$t(this, Range);
|
|
24658
24657
|
Object.assign(this, props);
|
|
24659
24658
|
};
|
|
24660
24659
|
function isNumber(obj) {
|
|
@@ -24760,11 +24759,11 @@ function equals(a, b) {
|
|
|
24760
24759
|
}
|
|
24761
24760
|
var FunctionWrapper = /*#__PURE__*/ function() {
|
|
24762
24761
|
function FunctionWrapper(fn, parameterNames) {
|
|
24763
|
-
_class_call_check$
|
|
24762
|
+
_class_call_check$t(this, FunctionWrapper);
|
|
24764
24763
|
this.fn = fn;
|
|
24765
24764
|
this.parameterNames = parameterNames;
|
|
24766
24765
|
}
|
|
24767
|
-
_create_class$
|
|
24766
|
+
_create_class$g(FunctionWrapper, [
|
|
24768
24767
|
{
|
|
24769
24768
|
key: "invoke",
|
|
24770
24769
|
value: function invoke(contextOrArgs) {
|
|
@@ -25709,7 +25708,7 @@ var builtins = {
|
|
|
25709
25708
|
if (key in context) {
|
|
25710
25709
|
return FALSE;
|
|
25711
25710
|
}
|
|
25712
|
-
return Object.assign(Object.assign({}, context), _define_property$
|
|
25711
|
+
return Object.assign(Object.assign({}, context), _define_property$u({}, entry.key, entry.value));
|
|
25713
25712
|
}, {});
|
|
25714
25713
|
if (context === FALSE) {
|
|
25715
25714
|
return null;
|
|
@@ -25762,7 +25761,7 @@ var builtins = {
|
|
|
25762
25761
|
return null;
|
|
25763
25762
|
}
|
|
25764
25763
|
}
|
|
25765
|
-
return Object.assign(Object.assign({}, context), _define_property$
|
|
25764
|
+
return Object.assign(Object.assign({}, context), _define_property$u({}, key, value));
|
|
25766
25765
|
}
|
|
25767
25766
|
function matches(a, b) {
|
|
25768
25767
|
return a === b;
|
|
@@ -26098,7 +26097,7 @@ var SyntaxError$1 = /*#__PURE__*/ function(Error1) {
|
|
|
26098
26097
|
_inherits$i(SyntaxError, Error1);
|
|
26099
26098
|
var _super = _create_super$i(SyntaxError);
|
|
26100
26099
|
function SyntaxError(message, details) {
|
|
26101
|
-
_class_call_check$
|
|
26100
|
+
_class_call_check$t(this, SyntaxError);
|
|
26102
26101
|
var _this;
|
|
26103
26102
|
_this = _super.call(this, message);
|
|
26104
26103
|
Object.assign(_assert_this_initialized$i(_this), details);
|
|
@@ -26108,9 +26107,9 @@ var SyntaxError$1 = /*#__PURE__*/ function(Error1) {
|
|
|
26108
26107
|
}(_wrap_native_super$2(Error));
|
|
26109
26108
|
var Interpreter = /*#__PURE__*/ function() {
|
|
26110
26109
|
function Interpreter() {
|
|
26111
|
-
_class_call_check$
|
|
26110
|
+
_class_call_check$t(this, Interpreter);
|
|
26112
26111
|
}
|
|
26113
|
-
_create_class$
|
|
26112
|
+
_create_class$g(Interpreter, [
|
|
26114
26113
|
{
|
|
26115
26114
|
key: "_buildExecutionTree",
|
|
26116
26115
|
value: function _buildExecutionTree(tree, input) {
|
|
@@ -26450,7 +26449,7 @@ function evalNode(node, input, args) {
|
|
|
26450
26449
|
return function(context) {
|
|
26451
26450
|
return args.slice(1, -1).reduce(function(obj, arg) {
|
|
26452
26451
|
var _arg = _sliced_to_array$4(arg(Object.assign(Object.assign({}, context), obj)), 2), key = _arg[0], value = _arg[1];
|
|
26453
|
-
return Object.assign(Object.assign({}, obj), _define_property$
|
|
26452
|
+
return Object.assign(Object.assign({}, obj), _define_property$u({}, key, value));
|
|
26454
26453
|
}, {});
|
|
26455
26454
|
};
|
|
26456
26455
|
case "FunctionBody":
|
|
@@ -26915,7 +26914,7 @@ function extractValue(context, prop, _target) {
|
|
|
26915
26914
|
"range"
|
|
26916
26915
|
].includes(getType(target))) {
|
|
26917
26916
|
return target.map(function(t) {
|
|
26918
|
-
return _define_property$
|
|
26917
|
+
return _define_property$u({}, prop, t);
|
|
26919
26918
|
});
|
|
26920
26919
|
}
|
|
26921
26920
|
return null;
|
|
@@ -27337,6 +27336,7 @@ const _config = globalInstance.__DIGIPAIR_CONFIG__ = (_globalInstance___DIGIPAIR
|
|
|
27337
27336
|
LIBRARIES: {},
|
|
27338
27337
|
BASE_URL: 'https://cdn.jsdelivr.net/npm'
|
|
27339
27338
|
};
|
|
27339
|
+
const isRemoteVersion = /^https?:\/\/[^\s/$.?#].[^\s]*$/;
|
|
27340
27340
|
const isPinsSettings = (value)=>{
|
|
27341
27341
|
return typeof value === 'object' && value !== null && typeof value.element === 'string' && typeof value.library === 'string';
|
|
27342
27342
|
};
|
|
@@ -27393,7 +27393,7 @@ const executePins = async (settingsOrigin, context = {})=>{
|
|
|
27393
27393
|
return results;
|
|
27394
27394
|
}
|
|
27395
27395
|
const version = context.config.VERSIONS[settings.library] || 'latest';
|
|
27396
|
-
const library = _config.LIBRARIES[settings.library] || (typeof window === 'undefined' ? require(settings.library) : await import(`${_config.BASE_URL}/${settings.library}@${version}/index.esm.js`));
|
|
27396
|
+
const library = _config.LIBRARIES[settings.library] || (typeof window === 'undefined' ? require(settings.library) : await import(isRemoteVersion.test(version) ? `${version}` : `${_config.BASE_URL}/${settings.library}@${version}/index.esm.js`));
|
|
27397
27397
|
const pins = library == null ? void 0 : library[settings.element];
|
|
27398
27398
|
if (!pins) {
|
|
27399
27399
|
throw new Error(`Element ${settings.element} not found in library ${settings.library}`);
|
|
@@ -27521,12 +27521,12 @@ function _assert_this_initialized$h(self) {
|
|
|
27521
27521
|
}
|
|
27522
27522
|
return self;
|
|
27523
27523
|
}
|
|
27524
|
-
function _class_call_check$
|
|
27524
|
+
function _class_call_check$s(instance, Constructor) {
|
|
27525
27525
|
if (!(instance instanceof Constructor)) {
|
|
27526
27526
|
throw new TypeError("Cannot call a class as a function");
|
|
27527
27527
|
}
|
|
27528
27528
|
}
|
|
27529
|
-
function _defineProperties$
|
|
27529
|
+
function _defineProperties$f(target, props) {
|
|
27530
27530
|
for(var i = 0; i < props.length; i++){
|
|
27531
27531
|
var descriptor = props[i];
|
|
27532
27532
|
descriptor.enumerable = descriptor.enumerable || false;
|
|
@@ -27535,12 +27535,12 @@ function _defineProperties$g(target, props) {
|
|
|
27535
27535
|
Object.defineProperty(target, descriptor.key, descriptor);
|
|
27536
27536
|
}
|
|
27537
27537
|
}
|
|
27538
|
-
function _create_class$
|
|
27539
|
-
if (protoProps) _defineProperties$
|
|
27540
|
-
if (staticProps) _defineProperties$
|
|
27538
|
+
function _create_class$f(Constructor, protoProps, staticProps) {
|
|
27539
|
+
if (protoProps) _defineProperties$f(Constructor.prototype, protoProps);
|
|
27540
|
+
if (staticProps) _defineProperties$f(Constructor, staticProps);
|
|
27541
27541
|
return Constructor;
|
|
27542
27542
|
}
|
|
27543
|
-
function _define_property$
|
|
27543
|
+
function _define_property$t(obj, key, value) {
|
|
27544
27544
|
if (key in obj) {
|
|
27545
27545
|
Object.defineProperty(obj, key, {
|
|
27546
27546
|
value: value,
|
|
@@ -27622,11 +27622,11 @@ function _create_super$h(Derived) {
|
|
|
27622
27622
|
}
|
|
27623
27623
|
var TextDecodeTransformer = /*#__PURE__*/ function() {
|
|
27624
27624
|
function TextDecodeTransformer() {
|
|
27625
|
-
_class_call_check$
|
|
27626
|
-
_define_property$
|
|
27625
|
+
_class_call_check$s(this, TextDecodeTransformer);
|
|
27626
|
+
_define_property$t(this, "decoder", void 0);
|
|
27627
27627
|
this.decoder = new TextDecoder();
|
|
27628
27628
|
}
|
|
27629
|
-
_create_class$
|
|
27629
|
+
_create_class$f(TextDecodeTransformer, [
|
|
27630
27630
|
{
|
|
27631
27631
|
key: "transform",
|
|
27632
27632
|
value: function transform(chunk, controller) {
|
|
@@ -27658,7 +27658,7 @@ var TextDecoderStreamPolyfill = /*#__PURE__*/ function(TransformStream) {
|
|
|
27658
27658
|
_inherits$h(TextDecoderStreamPolyfill, TransformStream);
|
|
27659
27659
|
var _super = _create_super$h(TextDecoderStreamPolyfill);
|
|
27660
27660
|
function TextDecoderStreamPolyfill() {
|
|
27661
|
-
_class_call_check$
|
|
27661
|
+
_class_call_check$s(this, TextDecoderStreamPolyfill);
|
|
27662
27662
|
return _super.call(this, new TextDecodeTransformer());
|
|
27663
27663
|
}
|
|
27664
27664
|
return TextDecoderStreamPolyfill;
|
|
@@ -27700,12 +27700,12 @@ function _async_to_generator$9(fn) {
|
|
|
27700
27700
|
});
|
|
27701
27701
|
};
|
|
27702
27702
|
}
|
|
27703
|
-
function _class_call_check$
|
|
27703
|
+
function _class_call_check$r(instance, Constructor) {
|
|
27704
27704
|
if (!(instance instanceof Constructor)) {
|
|
27705
27705
|
throw new TypeError("Cannot call a class as a function");
|
|
27706
27706
|
}
|
|
27707
27707
|
}
|
|
27708
|
-
function _defineProperties$
|
|
27708
|
+
function _defineProperties$e(target, props) {
|
|
27709
27709
|
for(var i = 0; i < props.length; i++){
|
|
27710
27710
|
var descriptor = props[i];
|
|
27711
27711
|
descriptor.enumerable = descriptor.enumerable || false;
|
|
@@ -27714,12 +27714,12 @@ function _defineProperties$f(target, props) {
|
|
|
27714
27714
|
Object.defineProperty(target, descriptor.key, descriptor);
|
|
27715
27715
|
}
|
|
27716
27716
|
}
|
|
27717
|
-
function _create_class$
|
|
27718
|
-
if (protoProps) _defineProperties$
|
|
27719
|
-
if (staticProps) _defineProperties$
|
|
27717
|
+
function _create_class$e(Constructor, protoProps, staticProps) {
|
|
27718
|
+
if (protoProps) _defineProperties$e(Constructor.prototype, protoProps);
|
|
27719
|
+
if (staticProps) _defineProperties$e(Constructor, staticProps);
|
|
27720
27720
|
return Constructor;
|
|
27721
27721
|
}
|
|
27722
|
-
function _define_property$
|
|
27722
|
+
function _define_property$s(obj, key, value) {
|
|
27723
27723
|
if (key in obj) {
|
|
27724
27724
|
Object.defineProperty(obj, key, {
|
|
27725
27725
|
value: value,
|
|
@@ -27889,9 +27889,9 @@ function _ts_generator$a(thisArg, body) {
|
|
|
27889
27889
|
}
|
|
27890
27890
|
var JSONTransformer = /*#__PURE__*/ function() {
|
|
27891
27891
|
function JSONTransformer() {
|
|
27892
|
-
_class_call_check$
|
|
27892
|
+
_class_call_check$r(this, JSONTransformer);
|
|
27893
27893
|
}
|
|
27894
|
-
_create_class$
|
|
27894
|
+
_create_class$e(JSONTransformer, [
|
|
27895
27895
|
{
|
|
27896
27896
|
key: "transform",
|
|
27897
27897
|
value: function transform(obj, controller) {
|
|
@@ -27924,22 +27924,22 @@ var JSONStringifyStream = /*#__PURE__*/ function(TransformStream) {
|
|
|
27924
27924
|
_inherits$g(JSONStringifyStream, TransformStream);
|
|
27925
27925
|
var _super = _create_super$g(JSONStringifyStream);
|
|
27926
27926
|
function JSONStringifyStream() {
|
|
27927
|
-
_class_call_check$
|
|
27927
|
+
_class_call_check$r(this, JSONStringifyStream);
|
|
27928
27928
|
return _super.call(this, new JSONTransformer());
|
|
27929
27929
|
}
|
|
27930
27930
|
return JSONStringifyStream;
|
|
27931
27931
|
}(TransformStream);
|
|
27932
27932
|
var TypeTransformer = /*#__PURE__*/ function() {
|
|
27933
27933
|
function TypeTransformer(transformFn, doneCallback) {
|
|
27934
|
-
_class_call_check$
|
|
27935
|
-
_define_property$
|
|
27936
|
-
_define_property$
|
|
27937
|
-
_define_property$
|
|
27934
|
+
_class_call_check$r(this, TypeTransformer);
|
|
27935
|
+
_define_property$s(this, "buffer", void 0);
|
|
27936
|
+
_define_property$s(this, "doneCallback", void 0);
|
|
27937
|
+
_define_property$s(this, "transformFn", void 0);
|
|
27938
27938
|
this.transformFn = transformFn;
|
|
27939
27939
|
this.doneCallback = doneCallback;
|
|
27940
27940
|
this.buffer = doneCallback ? [] : undefined;
|
|
27941
27941
|
}
|
|
27942
|
-
_create_class$
|
|
27942
|
+
_create_class$e(TypeTransformer, [
|
|
27943
27943
|
{
|
|
27944
27944
|
key: "transform",
|
|
27945
27945
|
value: function transform(obj, controller) {
|
|
@@ -27991,7 +27991,7 @@ var RespTransformStream = /*#__PURE__*/ function(TransformStream) {
|
|
|
27991
27991
|
_inherits$g(RespTransformStream, TransformStream);
|
|
27992
27992
|
var _super = _create_super$g(RespTransformStream);
|
|
27993
27993
|
function RespTransformStream(transformFn, doneCallback) {
|
|
27994
|
-
_class_call_check$
|
|
27994
|
+
_class_call_check$r(this, RespTransformStream);
|
|
27995
27995
|
return _super.call(this, new TypeTransformer(transformFn, doneCallback));
|
|
27996
27996
|
}
|
|
27997
27997
|
return RespTransformStream;
|
|
@@ -28034,7 +28034,7 @@ function _async_to_generator$8(fn) {
|
|
|
28034
28034
|
});
|
|
28035
28035
|
};
|
|
28036
28036
|
}
|
|
28037
|
-
function _define_property$
|
|
28037
|
+
function _define_property$r(obj, key, value) {
|
|
28038
28038
|
if (key in obj) {
|
|
28039
28039
|
Object.defineProperty(obj, key, {
|
|
28040
28040
|
value: value,
|
|
@@ -28057,7 +28057,7 @@ function _object_spread$i(target) {
|
|
|
28057
28057
|
}));
|
|
28058
28058
|
}
|
|
28059
28059
|
ownKeys.forEach(function(key) {
|
|
28060
|
-
_define_property$
|
|
28060
|
+
_define_property$r(target, key, source[key]);
|
|
28061
28061
|
});
|
|
28062
28062
|
}
|
|
28063
28063
|
return target;
|
|
@@ -28253,12 +28253,12 @@ var apiCall = function() {
|
|
|
28253
28253
|
}();
|
|
28254
28254
|
|
|
28255
28255
|
// eslint-disable-next-line @typescript-eslint/naming-convention
|
|
28256
|
-
function _class_call_check$
|
|
28256
|
+
function _class_call_check$q(instance, Constructor) {
|
|
28257
28257
|
if (!(instance instanceof Constructor)) {
|
|
28258
28258
|
throw new TypeError("Cannot call a class as a function");
|
|
28259
28259
|
}
|
|
28260
28260
|
}
|
|
28261
|
-
function _defineProperties$
|
|
28261
|
+
function _defineProperties$d(target, props) {
|
|
28262
28262
|
for(var i = 0; i < props.length; i++){
|
|
28263
28263
|
var descriptor = props[i];
|
|
28264
28264
|
descriptor.enumerable = descriptor.enumerable || false;
|
|
@@ -28267,12 +28267,12 @@ function _defineProperties$e(target, props) {
|
|
|
28267
28267
|
Object.defineProperty(target, descriptor.key, descriptor);
|
|
28268
28268
|
}
|
|
28269
28269
|
}
|
|
28270
|
-
function _create_class$
|
|
28271
|
-
if (protoProps) _defineProperties$
|
|
28272
|
-
if (staticProps) _defineProperties$
|
|
28270
|
+
function _create_class$d(Constructor, protoProps, staticProps) {
|
|
28271
|
+
if (protoProps) _defineProperties$d(Constructor.prototype, protoProps);
|
|
28272
|
+
if (staticProps) _defineProperties$d(Constructor, staticProps);
|
|
28273
28273
|
return Constructor;
|
|
28274
28274
|
}
|
|
28275
|
-
function _define_property$
|
|
28275
|
+
function _define_property$q(obj, key, value) {
|
|
28276
28276
|
if (key in obj) {
|
|
28277
28277
|
Object.defineProperty(obj, key, {
|
|
28278
28278
|
value: value,
|
|
@@ -28287,16 +28287,16 @@ function _define_property$r(obj, key, value) {
|
|
|
28287
28287
|
}
|
|
28288
28288
|
var ColorLog = /*#__PURE__*/ function() {
|
|
28289
28289
|
function ColorLog() {
|
|
28290
|
-
_class_call_check$
|
|
28290
|
+
_class_call_check$q(this, ColorLog);
|
|
28291
28291
|
// ANSI escape codes for different colors
|
|
28292
|
-
_define_property$
|
|
28293
|
-
_define_property$
|
|
28294
|
-
_define_property$
|
|
28295
|
-
_define_property$
|
|
28296
|
-
_define_property$
|
|
28297
|
-
_define_property$
|
|
28292
|
+
_define_property$q(this, "ANSI_WHITE_BRIGHT", "\x1b[97m");
|
|
28293
|
+
_define_property$q(this, "ANSI_GREEN_BRIGHT", "\x1b[92m");
|
|
28294
|
+
_define_property$q(this, "ANSI_BLUE_BRIGHT", "\x1b[94m");
|
|
28295
|
+
_define_property$q(this, "ANSI_YELLOW", "\x1b[93m");
|
|
28296
|
+
_define_property$q(this, "ANSI_RED", "\x1b[91m");
|
|
28297
|
+
_define_property$q(this, "ANSI_RESET", "\x1b[0m");
|
|
28298
28298
|
}
|
|
28299
|
-
_create_class$
|
|
28299
|
+
_create_class$d(ColorLog, [
|
|
28300
28300
|
{
|
|
28301
28301
|
// Method to wrap text with the specified ANSI color code
|
|
28302
28302
|
key: "colorize",
|
|
@@ -28377,12 +28377,12 @@ function _async_to_generator$7(fn) {
|
|
|
28377
28377
|
});
|
|
28378
28378
|
};
|
|
28379
28379
|
}
|
|
28380
|
-
function _class_call_check$
|
|
28380
|
+
function _class_call_check$p(instance, Constructor) {
|
|
28381
28381
|
if (!(instance instanceof Constructor)) {
|
|
28382
28382
|
throw new TypeError("Cannot call a class as a function");
|
|
28383
28383
|
}
|
|
28384
28384
|
}
|
|
28385
|
-
function _defineProperties$
|
|
28385
|
+
function _defineProperties$c(target, props) {
|
|
28386
28386
|
for(var i = 0; i < props.length; i++){
|
|
28387
28387
|
var descriptor = props[i];
|
|
28388
28388
|
descriptor.enumerable = descriptor.enumerable || false;
|
|
@@ -28391,12 +28391,12 @@ function _defineProperties$d(target, props) {
|
|
|
28391
28391
|
Object.defineProperty(target, descriptor.key, descriptor);
|
|
28392
28392
|
}
|
|
28393
28393
|
}
|
|
28394
|
-
function _create_class$
|
|
28395
|
-
if (protoProps) _defineProperties$
|
|
28396
|
-
if (staticProps) _defineProperties$
|
|
28394
|
+
function _create_class$c(Constructor, protoProps, staticProps) {
|
|
28395
|
+
if (protoProps) _defineProperties$c(Constructor.prototype, protoProps);
|
|
28396
|
+
if (staticProps) _defineProperties$c(Constructor, staticProps);
|
|
28397
28397
|
return Constructor;
|
|
28398
28398
|
}
|
|
28399
|
-
function _define_property$
|
|
28399
|
+
function _define_property$p(obj, key, value) {
|
|
28400
28400
|
if (key in obj) {
|
|
28401
28401
|
Object.defineProperty(obj, key, {
|
|
28402
28402
|
value: value,
|
|
@@ -28446,7 +28446,7 @@ function _object_spread$h(target) {
|
|
|
28446
28446
|
}));
|
|
28447
28447
|
}
|
|
28448
28448
|
ownKeys.forEach(function(key) {
|
|
28449
|
-
_define_property$
|
|
28449
|
+
_define_property$p(target, key, source[key]);
|
|
28450
28450
|
});
|
|
28451
28451
|
}
|
|
28452
28452
|
return target;
|
|
@@ -28593,26 +28593,26 @@ var axBaseAIDefaultConfig = function() {
|
|
|
28593
28593
|
var AxBaseAI = /*#__PURE__*/ function() {
|
|
28594
28594
|
function AxBaseAI(param) {
|
|
28595
28595
|
var name = param.name, apiURL = param.apiURL, headers = param.headers, modelInfo = param.modelInfo, models = param.models, _param_options = param.options, options = _param_options === void 0 ? {} : _param_options, supportFor = param.supportFor;
|
|
28596
|
-
_class_call_check$
|
|
28597
|
-
_define_property$
|
|
28598
|
-
_define_property$
|
|
28599
|
-
_define_property$
|
|
28600
|
-
_define_property$
|
|
28601
|
-
_define_property$
|
|
28602
|
-
_define_property$
|
|
28603
|
-
_define_property$
|
|
28604
|
-
_define_property$
|
|
28605
|
-
_define_property$
|
|
28606
|
-
_define_property$
|
|
28607
|
-
_define_property$
|
|
28608
|
-
_define_property$
|
|
28609
|
-
_define_property$
|
|
28610
|
-
_define_property$
|
|
28611
|
-
_define_property$
|
|
28612
|
-
_define_property$
|
|
28613
|
-
_define_property$
|
|
28614
|
-
_define_property$
|
|
28615
|
-
_define_property$
|
|
28596
|
+
_class_call_check$p(this, AxBaseAI);
|
|
28597
|
+
_define_property$p(this, "generateChatReq", void 0);
|
|
28598
|
+
_define_property$p(this, "generateEmbedReq", void 0);
|
|
28599
|
+
_define_property$p(this, "generateChatResp", void 0);
|
|
28600
|
+
_define_property$p(this, "generateChatStreamResp", void 0);
|
|
28601
|
+
_define_property$p(this, "generateEmbedResp", void 0);
|
|
28602
|
+
_define_property$p(this, "debug", false);
|
|
28603
|
+
_define_property$p(this, "rt", void 0);
|
|
28604
|
+
_define_property$p(this, "fetch", void 0);
|
|
28605
|
+
_define_property$p(this, "tracer", void 0);
|
|
28606
|
+
_define_property$p(this, "modelMap", void 0);
|
|
28607
|
+
_define_property$p(this, "embedModelMap", void 0);
|
|
28608
|
+
_define_property$p(this, "modelUsage", void 0);
|
|
28609
|
+
_define_property$p(this, "embedModelUsage", void 0);
|
|
28610
|
+
_define_property$p(this, "apiURL", void 0);
|
|
28611
|
+
_define_property$p(this, "name", void 0);
|
|
28612
|
+
_define_property$p(this, "headers", void 0);
|
|
28613
|
+
_define_property$p(this, "modelInfo", void 0);
|
|
28614
|
+
_define_property$p(this, "embedModelInfo", void 0);
|
|
28615
|
+
_define_property$p(this, "supportFor", void 0);
|
|
28616
28616
|
this.name = name;
|
|
28617
28617
|
this.apiURL = apiURL;
|
|
28618
28618
|
this.headers = headers;
|
|
@@ -28648,7 +28648,7 @@ var AxBaseAI = /*#__PURE__*/ function() {
|
|
|
28648
28648
|
}
|
|
28649
28649
|
this.setOptions(options);
|
|
28650
28650
|
}
|
|
28651
|
-
_create_class$
|
|
28651
|
+
_create_class$c(AxBaseAI, [
|
|
28652
28652
|
{
|
|
28653
28653
|
key: "setName",
|
|
28654
28654
|
value: function setName(name) {
|
|
@@ -28748,7 +28748,7 @@ var AxBaseAI = /*#__PURE__*/ function() {
|
|
|
28748
28748
|
4,
|
|
28749
28749
|
(_this_tracer = _this.tracer) === null || _this_tracer === void 0 ? void 0 : _this_tracer.startActiveSpan("Chat Request", {
|
|
28750
28750
|
kind: AxSpanKind.SERVER,
|
|
28751
|
-
attributes: (_obj = {}, _define_property$
|
|
28751
|
+
attributes: (_obj = {}, _define_property$p(_obj, axSpanAttributes.LLM_SYSTEM, _this.name), _define_property$p(_obj, axSpanAttributes.LLM_REQUEST_MODEL, _this.modelInfo.name), _define_property$p(_obj, axSpanAttributes.LLM_REQUEST_MAX_TOKENS, mc.maxTokens), _define_property$p(_obj, axSpanAttributes.LLM_REQUEST_TEMPERATURE, mc.temperature), _define_property$p(_obj, axSpanAttributes.LLM_REQUEST_TOP_P, mc.topP), _define_property$p(_obj, axSpanAttributes.LLM_REQUEST_TOP_K, mc.topK), _define_property$p(_obj, axSpanAttributes.LLM_REQUEST_FREQUENCY_PENALTY, mc.frequencyPenalty), _define_property$p(_obj, axSpanAttributes.LLM_REQUEST_PRESENCE_PENALTY, mc.presencePenalty), _define_property$p(_obj, axSpanAttributes.LLM_REQUEST_STOP_SEQUENCES, (_mc_stopSequences = mc.stopSequences) === null || _mc_stopSequences === void 0 ? void 0 : _mc_stopSequences.join(", ")), _define_property$p(_obj, axSpanAttributes.LLM_REQUEST_LLM_IS_STREAMING, mc.stream), _obj)
|
|
28752
28752
|
}, function() {
|
|
28753
28753
|
var _ref = _async_to_generator$7(function(span) {
|
|
28754
28754
|
var res;
|
|
@@ -28960,7 +28960,7 @@ var AxBaseAI = /*#__PURE__*/ function() {
|
|
|
28960
28960
|
4,
|
|
28961
28961
|
(_this_tracer = _this.tracer) === null || _this_tracer === void 0 ? void 0 : _this_tracer.startActiveSpan("Embed Request", {
|
|
28962
28962
|
kind: AxSpanKind.SERVER,
|
|
28963
|
-
attributes: (_obj = {}, _define_property$
|
|
28963
|
+
attributes: (_obj = {}, _define_property$p(_obj, axSpanAttributes.LLM_SYSTEM, _this.name), _define_property$p(_obj, axSpanAttributes.LLM_REQUEST_MODEL, _this.modelInfo.name), _obj)
|
|
28964
28964
|
}, function() {
|
|
28965
28965
|
var _ref = _async_to_generator$7(function(span) {
|
|
28966
28966
|
var res;
|
|
@@ -29078,7 +29078,7 @@ var AxBaseAI = /*#__PURE__*/ function() {
|
|
|
29078
29078
|
if (span === null || span === void 0 ? void 0 : span.isRecording()) {
|
|
29079
29079
|
if (res.modelUsage) {
|
|
29080
29080
|
_this.embedModelUsage = res.modelUsage;
|
|
29081
|
-
span.setAttributes((_obj = {}, _define_property$
|
|
29081
|
+
span.setAttributes((_obj = {}, _define_property$p(_obj, axSpanAttributes.LLM_USAGE_COMPLETION_TOKENS, (_res_modelUsage_completionTokens = res.modelUsage.completionTokens) !== null && _res_modelUsage_completionTokens !== void 0 ? _res_modelUsage_completionTokens : 0), _define_property$p(_obj, axSpanAttributes.LLM_USAGE_PROMPT_TOKENS, res.modelUsage.promptTokens), _obj));
|
|
29082
29082
|
}
|
|
29083
29083
|
}
|
|
29084
29084
|
span === null || span === void 0 ? void 0 : span.end();
|
|
@@ -29268,7 +29268,7 @@ var setResponseAttr = function(res, span) {
|
|
|
29268
29268
|
if (res.modelUsage) {
|
|
29269
29269
|
var _res_modelUsage_completionTokens;
|
|
29270
29270
|
var _obj;
|
|
29271
|
-
span.setAttributes((_obj = {}, _define_property$
|
|
29271
|
+
span.setAttributes((_obj = {}, _define_property$p(_obj, axSpanAttributes.LLM_USAGE_COMPLETION_TOKENS, (_res_modelUsage_completionTokens = res.modelUsage.completionTokens) !== null && _res_modelUsage_completionTokens !== void 0 ? _res_modelUsage_completionTokens : 0), _define_property$p(_obj, axSpanAttributes.LLM_USAGE_PROMPT_TOKENS, res.modelUsage.promptTokens), _obj));
|
|
29272
29272
|
}
|
|
29273
29273
|
};
|
|
29274
29274
|
|
|
@@ -29344,12 +29344,12 @@ function _assert_this_initialized$f(self) {
|
|
|
29344
29344
|
}
|
|
29345
29345
|
return self;
|
|
29346
29346
|
}
|
|
29347
|
-
function _class_call_check$
|
|
29347
|
+
function _class_call_check$o(instance, Constructor) {
|
|
29348
29348
|
if (!(instance instanceof Constructor)) {
|
|
29349
29349
|
throw new TypeError("Cannot call a class as a function");
|
|
29350
29350
|
}
|
|
29351
29351
|
}
|
|
29352
|
-
function _defineProperties$
|
|
29352
|
+
function _defineProperties$b(target, props) {
|
|
29353
29353
|
for(var i = 0; i < props.length; i++){
|
|
29354
29354
|
var descriptor = props[i];
|
|
29355
29355
|
descriptor.enumerable = descriptor.enumerable || false;
|
|
@@ -29358,12 +29358,12 @@ function _defineProperties$c(target, props) {
|
|
|
29358
29358
|
Object.defineProperty(target, descriptor.key, descriptor);
|
|
29359
29359
|
}
|
|
29360
29360
|
}
|
|
29361
|
-
function _create_class$
|
|
29362
|
-
if (protoProps) _defineProperties$
|
|
29363
|
-
if (staticProps) _defineProperties$
|
|
29361
|
+
function _create_class$b(Constructor, protoProps, staticProps) {
|
|
29362
|
+
if (protoProps) _defineProperties$b(Constructor.prototype, protoProps);
|
|
29363
|
+
if (staticProps) _defineProperties$b(Constructor, staticProps);
|
|
29364
29364
|
return Constructor;
|
|
29365
29365
|
}
|
|
29366
|
-
function _define_property$
|
|
29366
|
+
function _define_property$o(obj, key, value) {
|
|
29367
29367
|
if (key in obj) {
|
|
29368
29368
|
Object.defineProperty(obj, key, {
|
|
29369
29369
|
value: value,
|
|
@@ -29405,7 +29405,7 @@ function _object_spread$g(target) {
|
|
|
29405
29405
|
}));
|
|
29406
29406
|
}
|
|
29407
29407
|
ownKeys.forEach(function(key) {
|
|
29408
|
-
_define_property$
|
|
29408
|
+
_define_property$o(target, key, source[key]);
|
|
29409
29409
|
});
|
|
29410
29410
|
}
|
|
29411
29411
|
return target;
|
|
@@ -29462,7 +29462,7 @@ var AxAIOpenAI = /*#__PURE__*/ function(AxBaseAI) {
|
|
|
29462
29462
|
var _super = _create_super$f(AxAIOpenAI);
|
|
29463
29463
|
function AxAIOpenAI(param) {
|
|
29464
29464
|
var apiKey = param.apiKey, config = param.config, options = param.options, apiURL = param.apiURL, _param_modelInfo = param.modelInfo, modelInfo = _param_modelInfo === void 0 ? axModelInfoOpenAI : _param_modelInfo;
|
|
29465
|
-
_class_call_check$
|
|
29465
|
+
_class_call_check$o(this, AxAIOpenAI);
|
|
29466
29466
|
var _this;
|
|
29467
29467
|
if (!apiKey || apiKey === "") {
|
|
29468
29468
|
throw new Error("OpenAI API key not set");
|
|
@@ -29485,9 +29485,9 @@ var AxAIOpenAI = /*#__PURE__*/ function(AxBaseAI) {
|
|
|
29485
29485
|
streaming: true
|
|
29486
29486
|
}
|
|
29487
29487
|
});
|
|
29488
|
-
_define_property$
|
|
29489
|
-
_define_property$
|
|
29490
|
-
_define_property$
|
|
29488
|
+
_define_property$o(_assert_this_initialized$f(_this), "config", void 0);
|
|
29489
|
+
_define_property$o(_assert_this_initialized$f(_this), "streamingUsage", void 0);
|
|
29490
|
+
_define_property$o(_assert_this_initialized$f(_this), "generateChatReq", function(req, // eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
29491
29491
|
_config) {
|
|
29492
29492
|
var _req_functions, _req_modelConfig, _req_modelConfig1, _this_config, _this_config1, _req_modelConfig2, _req_modelConfig3, _req_modelConfig4, _req_modelConfig5, _req_modelConfig6, _req_modelConfig7;
|
|
29493
29493
|
var model = _this.config.model;
|
|
@@ -29542,7 +29542,7 @@ var AxAIOpenAI = /*#__PURE__*/ function(AxBaseAI) {
|
|
|
29542
29542
|
reqValue
|
|
29543
29543
|
];
|
|
29544
29544
|
});
|
|
29545
|
-
_define_property$
|
|
29545
|
+
_define_property$o(_assert_this_initialized$f(_this), "generateEmbedReq", function(req) {
|
|
29546
29546
|
var model = _this.config.embedModel;
|
|
29547
29547
|
if (!model) {
|
|
29548
29548
|
throw new Error("Embed model not set");
|
|
@@ -29562,7 +29562,7 @@ var AxAIOpenAI = /*#__PURE__*/ function(AxBaseAI) {
|
|
|
29562
29562
|
reqValue
|
|
29563
29563
|
];
|
|
29564
29564
|
});
|
|
29565
|
-
_define_property$
|
|
29565
|
+
_define_property$o(_assert_this_initialized$f(_this), "generateChatResp", function(resp) {
|
|
29566
29566
|
var id = resp.id, usage = resp.usage, choices = resp.choices, error = resp.error;
|
|
29567
29567
|
if (error) {
|
|
29568
29568
|
throw error;
|
|
@@ -29599,7 +29599,7 @@ var AxAIOpenAI = /*#__PURE__*/ function(AxBaseAI) {
|
|
|
29599
29599
|
remoteId: id
|
|
29600
29600
|
};
|
|
29601
29601
|
});
|
|
29602
|
-
_define_property$
|
|
29602
|
+
_define_property$o(_assert_this_initialized$f(_this), "generateChatStreamResp", function(resp, state) {
|
|
29603
29603
|
var id = resp.id, usage = resp.usage, choices = resp.choices;
|
|
29604
29604
|
var modelUsage = usage ? {
|
|
29605
29605
|
promptTokens: usage.prompt_tokens,
|
|
@@ -29647,7 +29647,7 @@ var AxAIOpenAI = /*#__PURE__*/ function(AxBaseAI) {
|
|
|
29647
29647
|
modelUsage: modelUsage
|
|
29648
29648
|
};
|
|
29649
29649
|
});
|
|
29650
|
-
_define_property$
|
|
29650
|
+
_define_property$o(_assert_this_initialized$f(_this), "generateEmbedResp", function(resp) {
|
|
29651
29651
|
var data = resp.data, usage = resp.usage;
|
|
29652
29652
|
var modelUsage = usage ? {
|
|
29653
29653
|
promptTokens: usage.prompt_tokens,
|
|
@@ -29666,7 +29666,7 @@ var AxAIOpenAI = /*#__PURE__*/ function(AxBaseAI) {
|
|
|
29666
29666
|
_this.streamingUsage = (_options_streamingUsage = options === null || options === void 0 ? void 0 : options.streamingUsage) !== null && _options_streamingUsage !== void 0 ? _options_streamingUsage : true;
|
|
29667
29667
|
return _this;
|
|
29668
29668
|
}
|
|
29669
|
-
_create_class$
|
|
29669
|
+
_create_class$b(AxAIOpenAI, [
|
|
29670
29670
|
{
|
|
29671
29671
|
key: "getModelConfig",
|
|
29672
29672
|
value: function getModelConfig() {
|
|
@@ -29776,12 +29776,12 @@ function _assert_this_initialized$e(self) {
|
|
|
29776
29776
|
}
|
|
29777
29777
|
return self;
|
|
29778
29778
|
}
|
|
29779
|
-
function _class_call_check$
|
|
29779
|
+
function _class_call_check$n(instance, Constructor) {
|
|
29780
29780
|
if (!(instance instanceof Constructor)) {
|
|
29781
29781
|
throw new TypeError("Cannot call a class as a function");
|
|
29782
29782
|
}
|
|
29783
29783
|
}
|
|
29784
|
-
function _define_property$
|
|
29784
|
+
function _define_property$n(obj, key, value) {
|
|
29785
29785
|
if (key in obj) {
|
|
29786
29786
|
Object.defineProperty(obj, key, {
|
|
29787
29787
|
value: value,
|
|
@@ -29839,7 +29839,7 @@ function _object_spread$f(target) {
|
|
|
29839
29839
|
}));
|
|
29840
29840
|
}
|
|
29841
29841
|
ownKeys.forEach(function(key) {
|
|
29842
|
-
_define_property$
|
|
29842
|
+
_define_property$n(target, key, source[key]);
|
|
29843
29843
|
});
|
|
29844
29844
|
}
|
|
29845
29845
|
return target;
|
|
@@ -29898,7 +29898,7 @@ var AxAIAzureOpenAI = /*#__PURE__*/ function(AxAIOpenAI) {
|
|
|
29898
29898
|
var _super = _create_super$e(AxAIAzureOpenAI);
|
|
29899
29899
|
function AxAIAzureOpenAI(param) {
|
|
29900
29900
|
var apiKey = param.apiKey, resourceName = param.resourceName, deploymentName = param.deploymentName, _param_version = param.version, version = _param_version === void 0 ? "api-version=2024-02-15-preview" : _param_version, config = param.config, options = param.options;
|
|
29901
|
-
_class_call_check$
|
|
29901
|
+
_class_call_check$n(this, AxAIAzureOpenAI);
|
|
29902
29902
|
if (!apiKey || apiKey === "") {
|
|
29903
29903
|
throw new Error("Azure OpenAPI API key not set");
|
|
29904
29904
|
}
|
|
@@ -29942,12 +29942,12 @@ function _assert_this_initialized$d(self) {
|
|
|
29942
29942
|
}
|
|
29943
29943
|
return self;
|
|
29944
29944
|
}
|
|
29945
|
-
function _class_call_check$
|
|
29945
|
+
function _class_call_check$m(instance, Constructor) {
|
|
29946
29946
|
if (!(instance instanceof Constructor)) {
|
|
29947
29947
|
throw new TypeError("Cannot call a class as a function");
|
|
29948
29948
|
}
|
|
29949
29949
|
}
|
|
29950
|
-
function _defineProperties$
|
|
29950
|
+
function _defineProperties$a(target, props) {
|
|
29951
29951
|
for(var i = 0; i < props.length; i++){
|
|
29952
29952
|
var descriptor = props[i];
|
|
29953
29953
|
descriptor.enumerable = descriptor.enumerable || false;
|
|
@@ -29956,12 +29956,12 @@ function _defineProperties$b(target, props) {
|
|
|
29956
29956
|
Object.defineProperty(target, descriptor.key, descriptor);
|
|
29957
29957
|
}
|
|
29958
29958
|
}
|
|
29959
|
-
function _create_class$
|
|
29960
|
-
if (protoProps) _defineProperties$
|
|
29961
|
-
if (staticProps) _defineProperties$
|
|
29959
|
+
function _create_class$a(Constructor, protoProps, staticProps) {
|
|
29960
|
+
if (protoProps) _defineProperties$a(Constructor.prototype, protoProps);
|
|
29961
|
+
if (staticProps) _defineProperties$a(Constructor, staticProps);
|
|
29962
29962
|
return Constructor;
|
|
29963
29963
|
}
|
|
29964
|
-
function _define_property$
|
|
29964
|
+
function _define_property$m(obj, key, value) {
|
|
29965
29965
|
if (key in obj) {
|
|
29966
29966
|
Object.defineProperty(obj, key, {
|
|
29967
29967
|
value: value,
|
|
@@ -30003,7 +30003,7 @@ function _object_spread$e(target) {
|
|
|
30003
30003
|
}));
|
|
30004
30004
|
}
|
|
30005
30005
|
ownKeys.forEach(function(key) {
|
|
30006
|
-
_define_property$
|
|
30006
|
+
_define_property$m(target, key, source[key]);
|
|
30007
30007
|
});
|
|
30008
30008
|
}
|
|
30009
30009
|
return target;
|
|
@@ -30059,7 +30059,7 @@ var AxAIHuggingFace = /*#__PURE__*/ function(AxBaseAI) {
|
|
|
30059
30059
|
var _super = _create_super$d(AxAIHuggingFace);
|
|
30060
30060
|
function AxAIHuggingFace(param) {
|
|
30061
30061
|
var apiKey = param.apiKey, config = param.config, options = param.options;
|
|
30062
|
-
_class_call_check$
|
|
30062
|
+
_class_call_check$m(this, AxAIHuggingFace);
|
|
30063
30063
|
var _this;
|
|
30064
30064
|
if (!apiKey || apiKey === "") {
|
|
30065
30065
|
throw new Error("HuggingFace API key not set");
|
|
@@ -30081,8 +30081,8 @@ var AxAIHuggingFace = /*#__PURE__*/ function(AxBaseAI) {
|
|
|
30081
30081
|
streaming: false
|
|
30082
30082
|
}
|
|
30083
30083
|
});
|
|
30084
|
-
_define_property$
|
|
30085
|
-
_define_property$
|
|
30084
|
+
_define_property$m(_assert_this_initialized$d(_this), "config", void 0);
|
|
30085
|
+
_define_property$m(_assert_this_initialized$d(_this), "generateChatReq", function(req, // eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
30086
30086
|
_config) {
|
|
30087
30087
|
var _req_chatPrompt, _req_modelConfig, _req_modelConfig1, _req_modelConfig2, _req_modelConfig3, _req_modelConfig4;
|
|
30088
30088
|
var model = _this.config.model;
|
|
@@ -30141,7 +30141,7 @@ var AxAIHuggingFace = /*#__PURE__*/ function(AxBaseAI) {
|
|
|
30141
30141
|
reqValue
|
|
30142
30142
|
];
|
|
30143
30143
|
});
|
|
30144
|
-
_define_property$
|
|
30144
|
+
_define_property$m(_assert_this_initialized$d(_this), "generateChatResp", function(resp) {
|
|
30145
30145
|
return {
|
|
30146
30146
|
results: [
|
|
30147
30147
|
{
|
|
@@ -30153,7 +30153,7 @@ var AxAIHuggingFace = /*#__PURE__*/ function(AxBaseAI) {
|
|
|
30153
30153
|
_this.config = _config;
|
|
30154
30154
|
return _this;
|
|
30155
30155
|
}
|
|
30156
|
-
_create_class$
|
|
30156
|
+
_create_class$a(AxAIHuggingFace, [
|
|
30157
30157
|
{
|
|
30158
30158
|
key: "getModelConfig",
|
|
30159
30159
|
value: function getModelConfig() {
|
|
@@ -30181,12 +30181,12 @@ function _assert_this_initialized$c(self) {
|
|
|
30181
30181
|
}
|
|
30182
30182
|
return self;
|
|
30183
30183
|
}
|
|
30184
|
-
function _class_call_check$
|
|
30184
|
+
function _class_call_check$l(instance, Constructor) {
|
|
30185
30185
|
if (!(instance instanceof Constructor)) {
|
|
30186
30186
|
throw new TypeError("Cannot call a class as a function");
|
|
30187
30187
|
}
|
|
30188
30188
|
}
|
|
30189
|
-
function _define_property$
|
|
30189
|
+
function _define_property$l(obj, key, value) {
|
|
30190
30190
|
if (key in obj) {
|
|
30191
30191
|
Object.defineProperty(obj, key, {
|
|
30192
30192
|
value: value,
|
|
@@ -30244,7 +30244,7 @@ function _object_spread$d(target) {
|
|
|
30244
30244
|
}));
|
|
30245
30245
|
}
|
|
30246
30246
|
ownKeys.forEach(function(key) {
|
|
30247
|
-
_define_property$
|
|
30247
|
+
_define_property$l(target, key, source[key]);
|
|
30248
30248
|
});
|
|
30249
30249
|
}
|
|
30250
30250
|
return target;
|
|
@@ -30308,7 +30308,7 @@ var AxAITogether = /*#__PURE__*/ function(AxAIOpenAI) {
|
|
|
30308
30308
|
var _super = _create_super$c(AxAITogether);
|
|
30309
30309
|
function AxAITogether(param) {
|
|
30310
30310
|
var apiKey = param.apiKey, config = param.config, options = param.options;
|
|
30311
|
-
_class_call_check$
|
|
30311
|
+
_class_call_check$l(this, AxAITogether);
|
|
30312
30312
|
if (!apiKey || apiKey === "") {
|
|
30313
30313
|
throw new Error("Together API key not set");
|
|
30314
30314
|
}
|
|
@@ -30413,12 +30413,12 @@ function _assert_this_initialized$b(self) {
|
|
|
30413
30413
|
}
|
|
30414
30414
|
return self;
|
|
30415
30415
|
}
|
|
30416
|
-
function _class_call_check$
|
|
30416
|
+
function _class_call_check$k(instance, Constructor) {
|
|
30417
30417
|
if (!(instance instanceof Constructor)) {
|
|
30418
30418
|
throw new TypeError("Cannot call a class as a function");
|
|
30419
30419
|
}
|
|
30420
30420
|
}
|
|
30421
|
-
function _defineProperties$
|
|
30421
|
+
function _defineProperties$9(target, props) {
|
|
30422
30422
|
for(var i = 0; i < props.length; i++){
|
|
30423
30423
|
var descriptor = props[i];
|
|
30424
30424
|
descriptor.enumerable = descriptor.enumerable || false;
|
|
@@ -30427,12 +30427,12 @@ function _defineProperties$a(target, props) {
|
|
|
30427
30427
|
Object.defineProperty(target, descriptor.key, descriptor);
|
|
30428
30428
|
}
|
|
30429
30429
|
}
|
|
30430
|
-
function _create_class$
|
|
30431
|
-
if (protoProps) _defineProperties$
|
|
30432
|
-
if (staticProps) _defineProperties$
|
|
30430
|
+
function _create_class$9(Constructor, protoProps, staticProps) {
|
|
30431
|
+
if (protoProps) _defineProperties$9(Constructor.prototype, protoProps);
|
|
30432
|
+
if (staticProps) _defineProperties$9(Constructor, staticProps);
|
|
30433
30433
|
return Constructor;
|
|
30434
30434
|
}
|
|
30435
|
-
function _define_property$
|
|
30435
|
+
function _define_property$k(obj, key, value) {
|
|
30436
30436
|
if (key in obj) {
|
|
30437
30437
|
Object.defineProperty(obj, key, {
|
|
30438
30438
|
value: value,
|
|
@@ -30501,7 +30501,7 @@ function _object_spread$c(target) {
|
|
|
30501
30501
|
}));
|
|
30502
30502
|
}
|
|
30503
30503
|
ownKeys.forEach(function(key) {
|
|
30504
|
-
_define_property$
|
|
30504
|
+
_define_property$k(target, key, source[key]);
|
|
30505
30505
|
});
|
|
30506
30506
|
}
|
|
30507
30507
|
return target;
|
|
@@ -30593,7 +30593,7 @@ var AxAICohere = /*#__PURE__*/ function(AxBaseAI) {
|
|
|
30593
30593
|
var _super = _create_super$b(AxAICohere);
|
|
30594
30594
|
function AxAICohere(param) {
|
|
30595
30595
|
var apiKey = param.apiKey, config = param.config, options = param.options;
|
|
30596
|
-
_class_call_check$
|
|
30596
|
+
_class_call_check$k(this, AxAICohere);
|
|
30597
30597
|
var _this;
|
|
30598
30598
|
if (!apiKey || apiKey === "") {
|
|
30599
30599
|
throw new Error("Cohere API key not set");
|
|
@@ -30615,8 +30615,8 @@ var AxAICohere = /*#__PURE__*/ function(AxBaseAI) {
|
|
|
30615
30615
|
},
|
|
30616
30616
|
options: options
|
|
30617
30617
|
});
|
|
30618
|
-
_define_property$
|
|
30619
|
-
_define_property$
|
|
30618
|
+
_define_property$k(_assert_this_initialized$b(_this), "config", void 0);
|
|
30619
|
+
_define_property$k(_assert_this_initialized$b(_this), "generateChatReq", function(req, // eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
30620
30620
|
_config) {
|
|
30621
30621
|
var _req_functions, _req_modelConfig, _req_modelConfig1, _req_modelConfig2, _req_modelConfig3, _req_modelConfig4, _req_modelConfig5, _req_modelConfig6;
|
|
30622
30622
|
var model = _this.config.model;
|
|
@@ -30713,7 +30713,7 @@ var AxAICohere = /*#__PURE__*/ function(AxBaseAI) {
|
|
|
30713
30713
|
reqValue
|
|
30714
30714
|
];
|
|
30715
30715
|
});
|
|
30716
|
-
_define_property$
|
|
30716
|
+
_define_property$k(_assert_this_initialized$b(_this), "generateEmbedReq", function(req) {
|
|
30717
30717
|
var model = _this.config.embedModel;
|
|
30718
30718
|
if (!model) {
|
|
30719
30719
|
throw new Error("Embed model not set");
|
|
@@ -30736,7 +30736,7 @@ var AxAICohere = /*#__PURE__*/ function(AxBaseAI) {
|
|
|
30736
30736
|
reqValue
|
|
30737
30737
|
];
|
|
30738
30738
|
});
|
|
30739
|
-
_define_property$
|
|
30739
|
+
_define_property$k(_assert_this_initialized$b(_this), "generateChatResp", function(resp) {
|
|
30740
30740
|
var modelUsage = resp.meta.billed_units ? {
|
|
30741
30741
|
promptTokens: resp.meta.billed_units.input_tokens,
|
|
30742
30742
|
completionTokens: resp.meta.billed_units.output_tokens,
|
|
@@ -30788,7 +30788,7 @@ var AxAICohere = /*#__PURE__*/ function(AxBaseAI) {
|
|
|
30788
30788
|
remoteId: resp.response_id
|
|
30789
30789
|
};
|
|
30790
30790
|
});
|
|
30791
|
-
_define_property$
|
|
30791
|
+
_define_property$k(_assert_this_initialized$b(_this), "generateChatStreamResp", function(resp, state) {
|
|
30792
30792
|
var ss = state;
|
|
30793
30793
|
if (resp.event_type === "stream-start") {
|
|
30794
30794
|
ss.generation_id = resp.generation_id;
|
|
@@ -30804,7 +30804,7 @@ var AxAICohere = /*#__PURE__*/ function(AxBaseAI) {
|
|
|
30804
30804
|
results: results
|
|
30805
30805
|
};
|
|
30806
30806
|
});
|
|
30807
|
-
_define_property$
|
|
30807
|
+
_define_property$k(_assert_this_initialized$b(_this), "generateEmbedResp", function(resp) {
|
|
30808
30808
|
return {
|
|
30809
30809
|
remoteId: resp.id,
|
|
30810
30810
|
embeddings: resp.embeddings
|
|
@@ -30813,7 +30813,7 @@ var AxAICohere = /*#__PURE__*/ function(AxBaseAI) {
|
|
|
30813
30813
|
_this.config = _config;
|
|
30814
30814
|
return _this;
|
|
30815
30815
|
}
|
|
30816
|
-
_create_class$
|
|
30816
|
+
_create_class$9(AxAICohere, [
|
|
30817
30817
|
{
|
|
30818
30818
|
key: "getModelConfig",
|
|
30819
30819
|
value: function getModelConfig() {
|
|
@@ -30971,12 +30971,12 @@ function _assert_this_initialized$a(self) {
|
|
|
30971
30971
|
}
|
|
30972
30972
|
return self;
|
|
30973
30973
|
}
|
|
30974
|
-
function _class_call_check$
|
|
30974
|
+
function _class_call_check$j(instance, Constructor) {
|
|
30975
30975
|
if (!(instance instanceof Constructor)) {
|
|
30976
30976
|
throw new TypeError("Cannot call a class as a function");
|
|
30977
30977
|
}
|
|
30978
30978
|
}
|
|
30979
|
-
function _defineProperties$
|
|
30979
|
+
function _defineProperties$8(target, props) {
|
|
30980
30980
|
for(var i = 0; i < props.length; i++){
|
|
30981
30981
|
var descriptor = props[i];
|
|
30982
30982
|
descriptor.enumerable = descriptor.enumerable || false;
|
|
@@ -30985,12 +30985,12 @@ function _defineProperties$9(target, props) {
|
|
|
30985
30985
|
Object.defineProperty(target, descriptor.key, descriptor);
|
|
30986
30986
|
}
|
|
30987
30987
|
}
|
|
30988
|
-
function _create_class$
|
|
30989
|
-
if (protoProps) _defineProperties$
|
|
30990
|
-
if (staticProps) _defineProperties$
|
|
30988
|
+
function _create_class$8(Constructor, protoProps, staticProps) {
|
|
30989
|
+
if (protoProps) _defineProperties$8(Constructor.prototype, protoProps);
|
|
30990
|
+
if (staticProps) _defineProperties$8(Constructor, staticProps);
|
|
30991
30991
|
return Constructor;
|
|
30992
30992
|
}
|
|
30993
|
-
function _define_property$
|
|
30993
|
+
function _define_property$j(obj, key, value) {
|
|
30994
30994
|
if (key in obj) {
|
|
30995
30995
|
Object.defineProperty(obj, key, {
|
|
30996
30996
|
value: value,
|
|
@@ -31032,7 +31032,7 @@ function _object_spread$b(target) {
|
|
|
31032
31032
|
}));
|
|
31033
31033
|
}
|
|
31034
31034
|
ownKeys.forEach(function(key) {
|
|
31035
|
-
_define_property$
|
|
31035
|
+
_define_property$j(target, key, source[key]);
|
|
31036
31036
|
});
|
|
31037
31037
|
}
|
|
31038
31038
|
return target;
|
|
@@ -31114,7 +31114,7 @@ var safetySettings = [
|
|
|
31114
31114
|
var _super = _create_super$a(AxAIGoogleGemini);
|
|
31115
31115
|
function AxAIGoogleGemini(param) {
|
|
31116
31116
|
var apiKey = param.apiKey, projectId = param.projectId, region = param.region, config = param.config, options = param.options;
|
|
31117
|
-
_class_call_check$
|
|
31117
|
+
_class_call_check$j(this, AxAIGoogleGemini);
|
|
31118
31118
|
var _this;
|
|
31119
31119
|
if (!apiKey || apiKey === "") {
|
|
31120
31120
|
throw new Error("GoogleGemini AI API key not set");
|
|
@@ -31139,10 +31139,10 @@ var safetySettings = [
|
|
|
31139
31139
|
streaming: true
|
|
31140
31140
|
}
|
|
31141
31141
|
});
|
|
31142
|
-
_define_property$
|
|
31143
|
-
_define_property$
|
|
31144
|
-
_define_property$
|
|
31145
|
-
_define_property$
|
|
31142
|
+
_define_property$j(_assert_this_initialized$a(_this), "options", void 0);
|
|
31143
|
+
_define_property$j(_assert_this_initialized$a(_this), "config", void 0);
|
|
31144
|
+
_define_property$j(_assert_this_initialized$a(_this), "apiKey", void 0);
|
|
31145
|
+
_define_property$j(_assert_this_initialized$a(_this), "generateChatReq", function(req) {
|
|
31146
31146
|
var _req_modelConfig, _this_options, _req_modelConfig1, _req_modelConfig2, _req_modelConfig3, _req_modelConfig4, _req_modelConfig5;
|
|
31147
31147
|
var model = _this.config.model;
|
|
31148
31148
|
var _req_modelConfig_stream;
|
|
@@ -31323,7 +31323,7 @@ var safetySettings = [
|
|
|
31323
31323
|
reqValue
|
|
31324
31324
|
];
|
|
31325
31325
|
});
|
|
31326
|
-
_define_property$
|
|
31326
|
+
_define_property$j(_assert_this_initialized$a(_this), "generateEmbedReq", function(req) {
|
|
31327
31327
|
var model = _this.config.embedModel;
|
|
31328
31328
|
if (!model) {
|
|
31329
31329
|
throw new Error("Embed model not set");
|
|
@@ -31347,7 +31347,7 @@ var safetySettings = [
|
|
|
31347
31347
|
reqValue
|
|
31348
31348
|
];
|
|
31349
31349
|
});
|
|
31350
|
-
_define_property$
|
|
31350
|
+
_define_property$j(_assert_this_initialized$a(_this), "generateChatResp", function(resp) {
|
|
31351
31351
|
var _resp_candidates;
|
|
31352
31352
|
var results = (_resp_candidates = resp.candidates) === null || _resp_candidates === void 0 ? void 0 : _resp_candidates.map(function(candidate) {
|
|
31353
31353
|
var result = {};
|
|
@@ -31413,10 +31413,10 @@ var safetySettings = [
|
|
|
31413
31413
|
modelUsage: modelUsage
|
|
31414
31414
|
};
|
|
31415
31415
|
});
|
|
31416
|
-
_define_property$
|
|
31416
|
+
_define_property$j(_assert_this_initialized$a(_this), "generateChatStreamResp", function(resp) {
|
|
31417
31417
|
return _this.generateChatResp(resp);
|
|
31418
31418
|
});
|
|
31419
|
-
_define_property$
|
|
31419
|
+
_define_property$j(_assert_this_initialized$a(_this), "generateEmbedResp", function(resp) {
|
|
31420
31420
|
var embeddings = resp.embeddings.map(function(embedding) {
|
|
31421
31421
|
return embedding.value;
|
|
31422
31422
|
});
|
|
@@ -31429,7 +31429,7 @@ var safetySettings = [
|
|
|
31429
31429
|
_this.apiKey = apiKey;
|
|
31430
31430
|
return _this;
|
|
31431
31431
|
}
|
|
31432
|
-
_create_class$
|
|
31432
|
+
_create_class$8(AxAIGoogleGemini, [
|
|
31433
31433
|
{
|
|
31434
31434
|
key: "getModelConfig",
|
|
31435
31435
|
value: function getModelConfig() {
|
|
@@ -31510,12 +31510,12 @@ function _assert_this_initialized$9(self) {
|
|
|
31510
31510
|
}
|
|
31511
31511
|
return self;
|
|
31512
31512
|
}
|
|
31513
|
-
function _class_call_check$
|
|
31513
|
+
function _class_call_check$i(instance, Constructor) {
|
|
31514
31514
|
if (!(instance instanceof Constructor)) {
|
|
31515
31515
|
throw new TypeError("Cannot call a class as a function");
|
|
31516
31516
|
}
|
|
31517
31517
|
}
|
|
31518
|
-
function _defineProperties$
|
|
31518
|
+
function _defineProperties$7(target, props) {
|
|
31519
31519
|
for(var i = 0; i < props.length; i++){
|
|
31520
31520
|
var descriptor = props[i];
|
|
31521
31521
|
descriptor.enumerable = descriptor.enumerable || false;
|
|
@@ -31524,12 +31524,12 @@ function _defineProperties$8(target, props) {
|
|
|
31524
31524
|
Object.defineProperty(target, descriptor.key, descriptor);
|
|
31525
31525
|
}
|
|
31526
31526
|
}
|
|
31527
|
-
function _create_class$
|
|
31528
|
-
if (protoProps) _defineProperties$
|
|
31529
|
-
if (staticProps) _defineProperties$
|
|
31527
|
+
function _create_class$7(Constructor, protoProps, staticProps) {
|
|
31528
|
+
if (protoProps) _defineProperties$7(Constructor.prototype, protoProps);
|
|
31529
|
+
if (staticProps) _defineProperties$7(Constructor, staticProps);
|
|
31530
31530
|
return Constructor;
|
|
31531
31531
|
}
|
|
31532
|
-
function _define_property$
|
|
31532
|
+
function _define_property$i(obj, key, value) {
|
|
31533
31533
|
if (key in obj) {
|
|
31534
31534
|
Object.defineProperty(obj, key, {
|
|
31535
31535
|
value: value,
|
|
@@ -31598,7 +31598,7 @@ function _object_spread$a(target) {
|
|
|
31598
31598
|
}));
|
|
31599
31599
|
}
|
|
31600
31600
|
ownKeys.forEach(function(key) {
|
|
31601
|
-
_define_property$
|
|
31601
|
+
_define_property$i(target, key, source[key]);
|
|
31602
31602
|
});
|
|
31603
31603
|
}
|
|
31604
31604
|
return target;
|
|
@@ -31689,7 +31689,7 @@ var AxAIAnthropic = /*#__PURE__*/ function(AxBaseAI) {
|
|
|
31689
31689
|
var _super = _create_super$9(AxAIAnthropic);
|
|
31690
31690
|
function AxAIAnthropic(param) {
|
|
31691
31691
|
var apiKey = param.apiKey, config = param.config, options = param.options;
|
|
31692
|
-
_class_call_check$
|
|
31692
|
+
_class_call_check$i(this, AxAIAnthropic);
|
|
31693
31693
|
var _this;
|
|
31694
31694
|
if (!apiKey || apiKey === "") {
|
|
31695
31695
|
throw new Error("Anthropic API key not set");
|
|
@@ -31712,8 +31712,8 @@ var AxAIAnthropic = /*#__PURE__*/ function(AxBaseAI) {
|
|
|
31712
31712
|
streaming: true
|
|
31713
31713
|
}
|
|
31714
31714
|
});
|
|
31715
|
-
_define_property$
|
|
31716
|
-
_define_property$
|
|
31715
|
+
_define_property$i(_assert_this_initialized$9(_this), "config", void 0);
|
|
31716
|
+
_define_property$i(_assert_this_initialized$9(_this), "generateChatReq", function(req) {
|
|
31717
31717
|
var _req_functions, _req_modelConfig, _req_modelConfig1, _req_modelConfig2, _req_modelConfig3, _req_modelConfig4, _req_modelConfig5;
|
|
31718
31718
|
var model = _this.config.model;
|
|
31719
31719
|
var apiConfig = {
|
|
@@ -31752,7 +31752,7 @@ var AxAIAnthropic = /*#__PURE__*/ function(AxBaseAI) {
|
|
|
31752
31752
|
reqValue
|
|
31753
31753
|
];
|
|
31754
31754
|
});
|
|
31755
|
-
_define_property$
|
|
31755
|
+
_define_property$i(_assert_this_initialized$9(_this), "generateChatResp", function(resp) {
|
|
31756
31756
|
if (resp.type === "error") {
|
|
31757
31757
|
throw new Error("Anthropic Chat API Error: ".concat(resp.error.message));
|
|
31758
31758
|
}
|
|
@@ -31791,7 +31791,7 @@ var AxAIAnthropic = /*#__PURE__*/ function(AxBaseAI) {
|
|
|
31791
31791
|
remoteId: resp.id
|
|
31792
31792
|
};
|
|
31793
31793
|
});
|
|
31794
|
-
_define_property$
|
|
31794
|
+
_define_property$i(_assert_this_initialized$9(_this), "generateChatStreamResp", function(resp, state) {
|
|
31795
31795
|
if (!("type" in resp)) {
|
|
31796
31796
|
throw new Error("Invalid Anthropic streaming event");
|
|
31797
31797
|
}
|
|
@@ -31919,7 +31919,7 @@ var AxAIAnthropic = /*#__PURE__*/ function(AxBaseAI) {
|
|
|
31919
31919
|
_this.config = _config;
|
|
31920
31920
|
return _this;
|
|
31921
31921
|
}
|
|
31922
|
-
_create_class$
|
|
31922
|
+
_create_class$7(AxAIAnthropic, [
|
|
31923
31923
|
{
|
|
31924
31924
|
key: "getModelConfig",
|
|
31925
31925
|
value: function getModelConfig() {
|
|
@@ -32100,12 +32100,12 @@ function _async_to_generator$6(fn) {
|
|
|
32100
32100
|
});
|
|
32101
32101
|
};
|
|
32102
32102
|
}
|
|
32103
|
-
function _class_call_check$
|
|
32103
|
+
function _class_call_check$h(instance, Constructor) {
|
|
32104
32104
|
if (!(instance instanceof Constructor)) {
|
|
32105
32105
|
throw new TypeError("Cannot call a class as a function");
|
|
32106
32106
|
}
|
|
32107
32107
|
}
|
|
32108
|
-
function _defineProperties$
|
|
32108
|
+
function _defineProperties$6(target, props) {
|
|
32109
32109
|
for(var i = 0; i < props.length; i++){
|
|
32110
32110
|
var descriptor = props[i];
|
|
32111
32111
|
descriptor.enumerable = descriptor.enumerable || false;
|
|
@@ -32114,12 +32114,12 @@ function _defineProperties$7(target, props) {
|
|
|
32114
32114
|
Object.defineProperty(target, descriptor.key, descriptor);
|
|
32115
32115
|
}
|
|
32116
32116
|
}
|
|
32117
|
-
function _create_class$
|
|
32118
|
-
if (protoProps) _defineProperties$
|
|
32119
|
-
if (staticProps) _defineProperties$
|
|
32117
|
+
function _create_class$6(Constructor, protoProps, staticProps) {
|
|
32118
|
+
if (protoProps) _defineProperties$6(Constructor.prototype, protoProps);
|
|
32119
|
+
if (staticProps) _defineProperties$6(Constructor, staticProps);
|
|
32120
32120
|
return Constructor;
|
|
32121
32121
|
}
|
|
32122
|
-
function _define_property$
|
|
32122
|
+
function _define_property$h(obj, key, value) {
|
|
32123
32123
|
if (key in obj) {
|
|
32124
32124
|
Object.defineProperty(obj, key, {
|
|
32125
32125
|
value: value,
|
|
@@ -32230,19 +32230,19 @@ function _ts_generator$7(thisArg, body) {
|
|
|
32230
32230
|
var colorLog = new ColorLog();
|
|
32231
32231
|
var AxRateLimiterTokenUsage = /*#__PURE__*/ function() {
|
|
32232
32232
|
function AxRateLimiterTokenUsage(maxTokens, refillRate, options) {
|
|
32233
|
-
_class_call_check$
|
|
32234
|
-
_define_property$
|
|
32235
|
-
_define_property$
|
|
32236
|
-
_define_property$
|
|
32237
|
-
_define_property$
|
|
32238
|
-
_define_property$
|
|
32233
|
+
_class_call_check$h(this, AxRateLimiterTokenUsage);
|
|
32234
|
+
_define_property$h(this, "options", void 0);
|
|
32235
|
+
_define_property$h(this, "maxTokens", void 0);
|
|
32236
|
+
_define_property$h(this, "refillRate", void 0);
|
|
32237
|
+
_define_property$h(this, "currentTokens", void 0);
|
|
32238
|
+
_define_property$h(this, "lastRefillTime", void 0);
|
|
32239
32239
|
this.maxTokens = maxTokens;
|
|
32240
32240
|
this.refillRate = refillRate;
|
|
32241
32241
|
this.currentTokens = maxTokens;
|
|
32242
32242
|
this.lastRefillTime = Date.now();
|
|
32243
32243
|
this.options = options;
|
|
32244
32244
|
}
|
|
32245
|
-
_create_class$
|
|
32245
|
+
_create_class$6(AxRateLimiterTokenUsage, [
|
|
32246
32246
|
{
|
|
32247
32247
|
key: "refillTokens",
|
|
32248
32248
|
value: function refillTokens() {
|
|
@@ -32368,12 +32368,12 @@ function _async_to_generator$5(fn) {
|
|
|
32368
32368
|
});
|
|
32369
32369
|
};
|
|
32370
32370
|
}
|
|
32371
|
-
function _class_call_check$
|
|
32371
|
+
function _class_call_check$g(instance, Constructor) {
|
|
32372
32372
|
if (!(instance instanceof Constructor)) {
|
|
32373
32373
|
throw new TypeError("Cannot call a class as a function");
|
|
32374
32374
|
}
|
|
32375
32375
|
}
|
|
32376
|
-
function _define_property$
|
|
32376
|
+
function _define_property$g(obj, key, value) {
|
|
32377
32377
|
if (key in obj) {
|
|
32378
32378
|
Object.defineProperty(obj, key, {
|
|
32379
32379
|
value: value,
|
|
@@ -32431,7 +32431,7 @@ function _object_spread$9(target) {
|
|
|
32431
32431
|
}));
|
|
32432
32432
|
}
|
|
32433
32433
|
ownKeys.forEach(function(key) {
|
|
32434
|
-
_define_property$
|
|
32434
|
+
_define_property$g(target, key, source[key]);
|
|
32435
32435
|
});
|
|
32436
32436
|
}
|
|
32437
32437
|
return target;
|
|
@@ -32613,7 +32613,7 @@ var AxAIGroq = /*#__PURE__*/ function(AxAIOpenAI) {
|
|
|
32613
32613
|
var _super = _create_super$8(AxAIGroq);
|
|
32614
32614
|
function AxAIGroq(param) {
|
|
32615
32615
|
var apiKey = param.apiKey, config = param.config, options = param.options;
|
|
32616
|
-
_class_call_check$
|
|
32616
|
+
_class_call_check$g(this, AxAIGroq);
|
|
32617
32617
|
var _this;
|
|
32618
32618
|
if (!apiKey || apiKey === "") {
|
|
32619
32619
|
throw new Error("Groq API key not set");
|
|
@@ -32629,13 +32629,13 @@ var AxAIGroq = /*#__PURE__*/ function(AxAIOpenAI) {
|
|
|
32629
32629
|
apiURL: "https://api.groq.com/openai/v1",
|
|
32630
32630
|
modelInfo: []
|
|
32631
32631
|
});
|
|
32632
|
-
_define_property$
|
|
32632
|
+
_define_property$g(_assert_this_initialized$8(_this), "setOptions", function(options) {
|
|
32633
32633
|
var rateLimiter = _this.newRateLimiter(options);
|
|
32634
32634
|
_get$3((_assert_this_initialized$8(_this), _get_prototype_of$8(AxAIGroq.prototype)), "setOptions", _this).call(_this, _object_spread_props$5(_object_spread$9({}, options), {
|
|
32635
32635
|
rateLimiter: rateLimiter
|
|
32636
32636
|
}));
|
|
32637
32637
|
});
|
|
32638
|
-
_define_property$
|
|
32638
|
+
_define_property$g(_assert_this_initialized$8(_this), "newRateLimiter", function(options) {
|
|
32639
32639
|
if (options === null || options === void 0 ? void 0 : options.rateLimiter) {
|
|
32640
32640
|
return options.rateLimiter;
|
|
32641
32641
|
}
|
|
@@ -32735,12 +32735,12 @@ function _assert_this_initialized$7(self) {
|
|
|
32735
32735
|
}
|
|
32736
32736
|
return self;
|
|
32737
32737
|
}
|
|
32738
|
-
function _class_call_check$
|
|
32738
|
+
function _class_call_check$f(instance, Constructor) {
|
|
32739
32739
|
if (!(instance instanceof Constructor)) {
|
|
32740
32740
|
throw new TypeError("Cannot call a class as a function");
|
|
32741
32741
|
}
|
|
32742
32742
|
}
|
|
32743
|
-
function _define_property$
|
|
32743
|
+
function _define_property$f(obj, key, value) {
|
|
32744
32744
|
if (key in obj) {
|
|
32745
32745
|
Object.defineProperty(obj, key, {
|
|
32746
32746
|
value: value,
|
|
@@ -32798,7 +32798,7 @@ function _object_spread$8(target) {
|
|
|
32798
32798
|
}));
|
|
32799
32799
|
}
|
|
32800
32800
|
ownKeys.forEach(function(key) {
|
|
32801
|
-
_define_property$
|
|
32801
|
+
_define_property$f(target, key, source[key]);
|
|
32802
32802
|
});
|
|
32803
32803
|
}
|
|
32804
32804
|
return target;
|
|
@@ -32861,7 +32861,7 @@ var AxAIMistral = /*#__PURE__*/ function(AxAIOpenAI) {
|
|
|
32861
32861
|
var _super = _create_super$7(AxAIMistral);
|
|
32862
32862
|
function AxAIMistral(param) {
|
|
32863
32863
|
var apiKey = param.apiKey, config = param.config, options = param.options;
|
|
32864
|
-
_class_call_check$
|
|
32864
|
+
_class_call_check$f(this, AxAIMistral);
|
|
32865
32865
|
if (!apiKey || apiKey === "") {
|
|
32866
32866
|
throw new Error("Mistral API key not set");
|
|
32867
32867
|
}
|
|
@@ -32910,12 +32910,12 @@ function _assert_this_initialized$6(self) {
|
|
|
32910
32910
|
}
|
|
32911
32911
|
return self;
|
|
32912
32912
|
}
|
|
32913
|
-
function _class_call_check$
|
|
32913
|
+
function _class_call_check$e(instance, Constructor) {
|
|
32914
32914
|
if (!(instance instanceof Constructor)) {
|
|
32915
32915
|
throw new TypeError("Cannot call a class as a function");
|
|
32916
32916
|
}
|
|
32917
32917
|
}
|
|
32918
|
-
function _define_property$
|
|
32918
|
+
function _define_property$e(obj, key, value) {
|
|
32919
32919
|
if (key in obj) {
|
|
32920
32920
|
Object.defineProperty(obj, key, {
|
|
32921
32921
|
value: value,
|
|
@@ -32973,7 +32973,7 @@ function _object_spread$7(target) {
|
|
|
32973
32973
|
}));
|
|
32974
32974
|
}
|
|
32975
32975
|
ownKeys.forEach(function(key) {
|
|
32976
|
-
_define_property$
|
|
32976
|
+
_define_property$e(target, key, source[key]);
|
|
32977
32977
|
});
|
|
32978
32978
|
}
|
|
32979
32979
|
return target;
|
|
@@ -33036,7 +33036,7 @@ var AxAIDeepSeek = /*#__PURE__*/ function(AxAIOpenAI) {
|
|
|
33036
33036
|
var _super = _create_super$6(AxAIDeepSeek);
|
|
33037
33037
|
function AxAIDeepSeek(param) {
|
|
33038
33038
|
var apiKey = param.apiKey, config = param.config, options = param.options;
|
|
33039
|
-
_class_call_check$
|
|
33039
|
+
_class_call_check$e(this, AxAIDeepSeek);
|
|
33040
33040
|
if (!apiKey || apiKey === "") {
|
|
33041
33041
|
throw new Error("DeepSeek API key not set");
|
|
33042
33042
|
}
|
|
@@ -33061,12 +33061,12 @@ function _assert_this_initialized$5(self) {
|
|
|
33061
33061
|
}
|
|
33062
33062
|
return self;
|
|
33063
33063
|
}
|
|
33064
|
-
function _class_call_check$
|
|
33064
|
+
function _class_call_check$d(instance, Constructor) {
|
|
33065
33065
|
if (!(instance instanceof Constructor)) {
|
|
33066
33066
|
throw new TypeError("Cannot call a class as a function");
|
|
33067
33067
|
}
|
|
33068
33068
|
}
|
|
33069
|
-
function _define_property$
|
|
33069
|
+
function _define_property$d(obj, key, value) {
|
|
33070
33070
|
if (key in obj) {
|
|
33071
33071
|
Object.defineProperty(obj, key, {
|
|
33072
33072
|
value: value,
|
|
@@ -33124,7 +33124,7 @@ function _object_spread$6(target) {
|
|
|
33124
33124
|
}));
|
|
33125
33125
|
}
|
|
33126
33126
|
ownKeys.forEach(function(key) {
|
|
33127
|
-
_define_property$
|
|
33127
|
+
_define_property$d(target, key, source[key]);
|
|
33128
33128
|
});
|
|
33129
33129
|
}
|
|
33130
33130
|
return target;
|
|
@@ -33215,7 +33215,7 @@ var axAIOllamaDefaultConfig = function() {
|
|
|
33215
33215
|
var _super = _create_super$5(AxAIOllama);
|
|
33216
33216
|
function AxAIOllama(param) {
|
|
33217
33217
|
var _param_apiKey = param.apiKey, apiKey = _param_apiKey === void 0 ? "not-set" : _param_apiKey, _param_url = param.url, url = _param_url === void 0 ? "http://localhost:11434" : _param_url, config = param.config, options = param.options;
|
|
33218
|
-
_class_call_check$
|
|
33218
|
+
_class_call_check$d(this, AxAIOllama);
|
|
33219
33219
|
var _config = _object_spread$6({}, axAIOllamaDefaultConfig(), config);
|
|
33220
33220
|
var _this = _super.call(this, {
|
|
33221
33221
|
apiKey: apiKey,
|
|
@@ -33259,12 +33259,12 @@ function _async_to_generator$4(fn) {
|
|
|
33259
33259
|
});
|
|
33260
33260
|
};
|
|
33261
33261
|
}
|
|
33262
|
-
function _class_call_check$
|
|
33262
|
+
function _class_call_check$c(instance, Constructor) {
|
|
33263
33263
|
if (!(instance instanceof Constructor)) {
|
|
33264
33264
|
throw new TypeError("Cannot call a class as a function");
|
|
33265
33265
|
}
|
|
33266
33266
|
}
|
|
33267
|
-
function _defineProperties$
|
|
33267
|
+
function _defineProperties$5(target, props) {
|
|
33268
33268
|
for(var i = 0; i < props.length; i++){
|
|
33269
33269
|
var descriptor = props[i];
|
|
33270
33270
|
descriptor.enumerable = descriptor.enumerable || false;
|
|
@@ -33273,12 +33273,12 @@ function _defineProperties$6(target, props) {
|
|
|
33273
33273
|
Object.defineProperty(target, descriptor.key, descriptor);
|
|
33274
33274
|
}
|
|
33275
33275
|
}
|
|
33276
|
-
function _create_class$
|
|
33277
|
-
if (protoProps) _defineProperties$
|
|
33278
|
-
if (staticProps) _defineProperties$
|
|
33276
|
+
function _create_class$5(Constructor, protoProps, staticProps) {
|
|
33277
|
+
if (protoProps) _defineProperties$5(Constructor.prototype, protoProps);
|
|
33278
|
+
if (staticProps) _defineProperties$5(Constructor, staticProps);
|
|
33279
33279
|
return Constructor;
|
|
33280
33280
|
}
|
|
33281
|
-
function _define_property$
|
|
33281
|
+
function _define_property$c(obj, key, value) {
|
|
33282
33282
|
if (key in obj) {
|
|
33283
33283
|
Object.defineProperty(obj, key, {
|
|
33284
33284
|
value: value,
|
|
@@ -33388,8 +33388,8 @@ function _ts_generator$5(thisArg, body) {
|
|
|
33388
33388
|
}
|
|
33389
33389
|
var AxAI = /*#__PURE__*/ function() {
|
|
33390
33390
|
function AxAI(options) {
|
|
33391
|
-
_class_call_check$
|
|
33392
|
-
_define_property$
|
|
33391
|
+
_class_call_check$c(this, AxAI);
|
|
33392
|
+
_define_property$c(this, "ai", void 0);
|
|
33393
33393
|
switch(options.name){
|
|
33394
33394
|
case "openai":
|
|
33395
33395
|
this.ai = new AxAIOpenAI(options);
|
|
@@ -33428,7 +33428,7 @@ var AxAI = /*#__PURE__*/ function() {
|
|
|
33428
33428
|
throw new Error("Unknown AI");
|
|
33429
33429
|
}
|
|
33430
33430
|
}
|
|
33431
|
-
_create_class$
|
|
33431
|
+
_create_class$5(AxAI, [
|
|
33432
33432
|
{
|
|
33433
33433
|
key: "setModelMap",
|
|
33434
33434
|
value: function setModelMap(modelMap) {
|
|
@@ -33534,12 +33534,12 @@ function _array_like_to_array$5(arr, len) {
|
|
|
33534
33534
|
function _array_without_holes$4(arr) {
|
|
33535
33535
|
if (Array.isArray(arr)) return _array_like_to_array$5(arr);
|
|
33536
33536
|
}
|
|
33537
|
-
function _class_call_check$
|
|
33537
|
+
function _class_call_check$b(instance, Constructor) {
|
|
33538
33538
|
if (!(instance instanceof Constructor)) {
|
|
33539
33539
|
throw new TypeError("Cannot call a class as a function");
|
|
33540
33540
|
}
|
|
33541
33541
|
}
|
|
33542
|
-
function _defineProperties$
|
|
33542
|
+
function _defineProperties$4(target, props) {
|
|
33543
33543
|
for(var i = 0; i < props.length; i++){
|
|
33544
33544
|
var descriptor = props[i];
|
|
33545
33545
|
descriptor.enumerable = descriptor.enumerable || false;
|
|
@@ -33548,12 +33548,12 @@ function _defineProperties$5(target, props) {
|
|
|
33548
33548
|
Object.defineProperty(target, descriptor.key, descriptor);
|
|
33549
33549
|
}
|
|
33550
33550
|
}
|
|
33551
|
-
function _create_class$
|
|
33552
|
-
if (protoProps) _defineProperties$
|
|
33553
|
-
if (staticProps) _defineProperties$
|
|
33551
|
+
function _create_class$4(Constructor, protoProps, staticProps) {
|
|
33552
|
+
if (protoProps) _defineProperties$4(Constructor.prototype, protoProps);
|
|
33553
|
+
if (staticProps) _defineProperties$4(Constructor, staticProps);
|
|
33554
33554
|
return Constructor;
|
|
33555
33555
|
}
|
|
33556
|
-
function _define_property$
|
|
33556
|
+
function _define_property$b(obj, key, value) {
|
|
33557
33557
|
if (key in obj) {
|
|
33558
33558
|
Object.defineProperty(obj, key, {
|
|
33559
33559
|
value: value,
|
|
@@ -33582,7 +33582,7 @@ function _object_spread$5(target) {
|
|
|
33582
33582
|
}));
|
|
33583
33583
|
}
|
|
33584
33584
|
ownKeys.forEach(function(key) {
|
|
33585
|
-
_define_property$
|
|
33585
|
+
_define_property$b(target, key, source[key]);
|
|
33586
33586
|
});
|
|
33587
33587
|
}
|
|
33588
33588
|
return target;
|
|
@@ -33601,16 +33601,16 @@ function _unsupported_iterable_to_array$5(o, minLen) {
|
|
|
33601
33601
|
var AxMemory = /*#__PURE__*/ function() {
|
|
33602
33602
|
function AxMemory() {
|
|
33603
33603
|
var limit = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : 50;
|
|
33604
|
-
_class_call_check$
|
|
33605
|
-
_define_property$
|
|
33606
|
-
_define_property$
|
|
33607
|
-
_define_property$
|
|
33604
|
+
_class_call_check$b(this, AxMemory);
|
|
33605
|
+
_define_property$b(this, "data", []);
|
|
33606
|
+
_define_property$b(this, "sdata", new Map());
|
|
33607
|
+
_define_property$b(this, "limit", void 0);
|
|
33608
33608
|
if (limit <= 0) {
|
|
33609
33609
|
throw Error("argument 'last' must be greater than 0");
|
|
33610
33610
|
}
|
|
33611
33611
|
this.limit = limit;
|
|
33612
33612
|
}
|
|
33613
|
-
_create_class$
|
|
33613
|
+
_create_class$4(AxMemory, [
|
|
33614
33614
|
{
|
|
33615
33615
|
key: "add",
|
|
33616
33616
|
value: function add(value, sessionId) {
|
|
@@ -33759,7 +33759,7 @@ function _assert_this_initialized$4(self) {
|
|
|
33759
33759
|
}
|
|
33760
33760
|
return self;
|
|
33761
33761
|
}
|
|
33762
|
-
function _class_call_check$
|
|
33762
|
+
function _class_call_check$a(instance, Constructor) {
|
|
33763
33763
|
if (!(instance instanceof Constructor)) {
|
|
33764
33764
|
throw new TypeError("Cannot call a class as a function");
|
|
33765
33765
|
}
|
|
@@ -33781,7 +33781,7 @@ function _construct$1(Parent, args, Class) {
|
|
|
33781
33781
|
}
|
|
33782
33782
|
return _construct$1.apply(null, arguments);
|
|
33783
33783
|
}
|
|
33784
|
-
function _define_property$
|
|
33784
|
+
function _define_property$a(obj, key, value) {
|
|
33785
33785
|
if (key in obj) {
|
|
33786
33786
|
Object.defineProperty(obj, key, {
|
|
33787
33787
|
value: value,
|
|
@@ -33888,19 +33888,19 @@ var AxAssertionError = /*#__PURE__*/ function(Error1) {
|
|
|
33888
33888
|
var _super = _create_super$4(AxAssertionError);
|
|
33889
33889
|
function AxAssertionError(param) {
|
|
33890
33890
|
var message = param.message, values = param.values, optional = param.optional;
|
|
33891
|
-
_class_call_check$
|
|
33891
|
+
_class_call_check$a(this, AxAssertionError);
|
|
33892
33892
|
var _this;
|
|
33893
33893
|
_this = _super.call(this, message);
|
|
33894
|
-
_define_property$
|
|
33895
|
-
_define_property$
|
|
33896
|
-
_define_property$
|
|
33894
|
+
_define_property$a(_assert_this_initialized$4(_this), "values", void 0);
|
|
33895
|
+
_define_property$a(_assert_this_initialized$4(_this), "optional", void 0);
|
|
33896
|
+
_define_property$a(_assert_this_initialized$4(_this), "getValue", function() {
|
|
33897
33897
|
return _this.values;
|
|
33898
33898
|
});
|
|
33899
|
-
_define_property$
|
|
33899
|
+
_define_property$a(_assert_this_initialized$4(_this), "getOptional", function() {
|
|
33900
33900
|
return _this.optional;
|
|
33901
33901
|
});
|
|
33902
33902
|
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
33903
|
-
_define_property$
|
|
33903
|
+
_define_property$a(_assert_this_initialized$4(_this), "getFixingInstructions", function(_sig) {
|
|
33904
33904
|
var extraFields = [];
|
|
33905
33905
|
// for (const f of sig.getOutputFields()) {
|
|
33906
33906
|
// extraFields.push({
|
|
@@ -35250,7 +35250,7 @@ var lib = JSON5;
|
|
|
35250
35250
|
}
|
|
35251
35251
|
return self;
|
|
35252
35252
|
}
|
|
35253
|
-
function _class_call_check$
|
|
35253
|
+
function _class_call_check$9(instance, Constructor) {
|
|
35254
35254
|
if (!(instance instanceof Constructor)) {
|
|
35255
35255
|
throw new TypeError("Cannot call a class as a function");
|
|
35256
35256
|
}
|
|
@@ -35272,7 +35272,7 @@ function _construct(Parent, args, Class) {
|
|
|
35272
35272
|
}
|
|
35273
35273
|
return _construct.apply(null, arguments);
|
|
35274
35274
|
}
|
|
35275
|
-
function _define_property$
|
|
35275
|
+
function _define_property$9(obj, key, value) {
|
|
35276
35276
|
if (key in obj) {
|
|
35277
35277
|
Object.defineProperty(obj, key, {
|
|
35278
35278
|
value: value,
|
|
@@ -35527,18 +35527,18 @@ var ValidationError = /*#__PURE__*/ function(Error1) {
|
|
|
35527
35527
|
var _super = _create_super$3(ValidationError);
|
|
35528
35528
|
function ValidationError(param) {
|
|
35529
35529
|
var message = param.message, field = param.field, value = param.value;
|
|
35530
|
-
_class_call_check$
|
|
35530
|
+
_class_call_check$9(this, ValidationError);
|
|
35531
35531
|
var _this;
|
|
35532
35532
|
_this = _super.call(this, message);
|
|
35533
|
-
_define_property$
|
|
35534
|
-
_define_property$
|
|
35535
|
-
_define_property$
|
|
35533
|
+
_define_property$9(_assert_this_initialized$3(_this), "field", void 0);
|
|
35534
|
+
_define_property$9(_assert_this_initialized$3(_this), "value", void 0);
|
|
35535
|
+
_define_property$9(_assert_this_initialized$3(_this), "getField", function() {
|
|
35536
35536
|
return _this.field;
|
|
35537
35537
|
});
|
|
35538
|
-
_define_property$
|
|
35538
|
+
_define_property$9(_assert_this_initialized$3(_this), "getValue", function() {
|
|
35539
35539
|
return _this.value;
|
|
35540
35540
|
});
|
|
35541
|
-
_define_property$
|
|
35541
|
+
_define_property$9(_assert_this_initialized$3(_this), "getFixingInstructions", function() {
|
|
35542
35542
|
var f = _this.field;
|
|
35543
35543
|
var extraFields = [
|
|
35544
35544
|
{
|
|
@@ -35700,12 +35700,12 @@ function _async_to_generator$3(fn) {
|
|
|
35700
35700
|
});
|
|
35701
35701
|
};
|
|
35702
35702
|
}
|
|
35703
|
-
function _class_call_check$
|
|
35703
|
+
function _class_call_check$8(instance, Constructor) {
|
|
35704
35704
|
if (!(instance instanceof Constructor)) {
|
|
35705
35705
|
throw new TypeError("Cannot call a class as a function");
|
|
35706
35706
|
}
|
|
35707
35707
|
}
|
|
35708
|
-
function _define_property$
|
|
35708
|
+
function _define_property$8(obj, key, value) {
|
|
35709
35709
|
if (key in obj) {
|
|
35710
35710
|
Object.defineProperty(obj, key, {
|
|
35711
35711
|
value: value,
|
|
@@ -35814,9 +35814,9 @@ function _ts_generator$4(thisArg, body) {
|
|
|
35814
35814
|
}
|
|
35815
35815
|
}
|
|
35816
35816
|
var AxFunctionProcessor = function AxFunctionProcessor(funcList) {
|
|
35817
|
-
_class_call_check$
|
|
35818
|
-
_define_property$
|
|
35819
|
-
_define_property$
|
|
35817
|
+
_class_call_check$8(this, AxFunctionProcessor);
|
|
35818
|
+
_define_property$8(this, "funcList", void 0);
|
|
35819
|
+
_define_property$8(this, "executeFunction", function() {
|
|
35820
35820
|
var _ref = _async_to_generator$3(function(fnSpec, func, options) {
|
|
35821
35821
|
var args, opt, res, _tmp, res1, _tmp1;
|
|
35822
35822
|
return _ts_generator$4(this, function(_state) {
|
|
@@ -35909,7 +35909,7 @@ var AxFunctionProcessor = function AxFunctionProcessor(funcList) {
|
|
|
35909
35909
|
};
|
|
35910
35910
|
}());
|
|
35911
35911
|
var _this = this;
|
|
35912
|
-
_define_property$
|
|
35912
|
+
_define_property$8(this, "execute", function() {
|
|
35913
35913
|
var _ref = _async_to_generator$3(function(func, options) {
|
|
35914
35914
|
var fnSpec;
|
|
35915
35915
|
return _ts_generator$4(this, function(_state) {
|
|
@@ -35950,12 +35950,12 @@ var AxFunctionProcessor = function AxFunctionProcessor(funcList) {
|
|
|
35950
35950
|
}
|
|
35951
35951
|
;
|
|
35952
35952
|
|
|
35953
|
-
function _class_call_check$
|
|
35953
|
+
function _class_call_check$7(instance, Constructor) {
|
|
35954
35954
|
if (!(instance instanceof Constructor)) {
|
|
35955
35955
|
throw new TypeError("Cannot call a class as a function");
|
|
35956
35956
|
}
|
|
35957
35957
|
}
|
|
35958
|
-
function _defineProperties$
|
|
35958
|
+
function _defineProperties$3(target, props) {
|
|
35959
35959
|
for(var i = 0; i < props.length; i++){
|
|
35960
35960
|
var descriptor = props[i];
|
|
35961
35961
|
descriptor.enumerable = descriptor.enumerable || false;
|
|
@@ -35964,12 +35964,12 @@ function _defineProperties$4(target, props) {
|
|
|
35964
35964
|
Object.defineProperty(target, descriptor.key, descriptor);
|
|
35965
35965
|
}
|
|
35966
35966
|
}
|
|
35967
|
-
function _create_class$
|
|
35968
|
-
if (protoProps) _defineProperties$
|
|
35969
|
-
if (staticProps) _defineProperties$
|
|
35967
|
+
function _create_class$3(Constructor, protoProps, staticProps) {
|
|
35968
|
+
if (protoProps) _defineProperties$3(Constructor.prototype, protoProps);
|
|
35969
|
+
if (staticProps) _defineProperties$3(Constructor, staticProps);
|
|
35970
35970
|
return Constructor;
|
|
35971
35971
|
}
|
|
35972
|
-
function _define_property$
|
|
35972
|
+
function _define_property$7(obj, key, value) {
|
|
35973
35973
|
if (key in obj) {
|
|
35974
35974
|
Object.defineProperty(obj, key, {
|
|
35975
35975
|
value: value,
|
|
@@ -36080,12 +36080,12 @@ function _ts_generator$3(thisArg, body) {
|
|
|
36080
36080
|
var _Symbol_iterator = Symbol.iterator;
|
|
36081
36081
|
var AxInstanceRegistry = /*#__PURE__*/ function() {
|
|
36082
36082
|
function AxInstanceRegistry() {
|
|
36083
|
-
_class_call_check$
|
|
36084
|
-
_define_property$
|
|
36083
|
+
_class_call_check$7(this, AxInstanceRegistry);
|
|
36084
|
+
_define_property$7(this, "reg", void 0 // To track keys for iteration
|
|
36085
36085
|
);
|
|
36086
36086
|
this.reg = new Set();
|
|
36087
36087
|
}
|
|
36088
|
-
_create_class$
|
|
36088
|
+
_create_class$3(AxInstanceRegistry, [
|
|
36089
36089
|
{
|
|
36090
36090
|
key: "register",
|
|
36091
36091
|
value: function register(instance) {
|
|
@@ -37626,12 +37626,12 @@ function _array_like_to_array$4(arr, len) {
|
|
|
37626
37626
|
function _array_with_holes(arr) {
|
|
37627
37627
|
if (Array.isArray(arr)) return arr;
|
|
37628
37628
|
}
|
|
37629
|
-
function _class_call_check$
|
|
37629
|
+
function _class_call_check$6(instance, Constructor) {
|
|
37630
37630
|
if (!(instance instanceof Constructor)) {
|
|
37631
37631
|
throw new TypeError("Cannot call a class as a function");
|
|
37632
37632
|
}
|
|
37633
37633
|
}
|
|
37634
|
-
function _define_property$
|
|
37634
|
+
function _define_property$6(obj, key, value) {
|
|
37635
37635
|
if (key in obj) {
|
|
37636
37636
|
Object.defineProperty(obj, key, {
|
|
37637
37637
|
value: value,
|
|
@@ -37688,7 +37688,7 @@ function _object_spread$4(target) {
|
|
|
37688
37688
|
}));
|
|
37689
37689
|
}
|
|
37690
37690
|
ownKeys.forEach(function(key) {
|
|
37691
|
-
_define_property$
|
|
37691
|
+
_define_property$6(target, key, source[key]);
|
|
37692
37692
|
});
|
|
37693
37693
|
}
|
|
37694
37694
|
return target;
|
|
@@ -37730,13 +37730,13 @@ function _unsupported_iterable_to_array$4(o, minLen) {
|
|
|
37730
37730
|
}
|
|
37731
37731
|
var AxSignature = function AxSignature(signature) {
|
|
37732
37732
|
var _this = this;
|
|
37733
|
-
_class_call_check$
|
|
37734
|
-
_define_property$
|
|
37735
|
-
_define_property$
|
|
37736
|
-
_define_property$
|
|
37737
|
-
_define_property$
|
|
37738
|
-
_define_property$
|
|
37739
|
-
_define_property$
|
|
37733
|
+
_class_call_check$6(this, AxSignature);
|
|
37734
|
+
_define_property$6(this, "description", void 0);
|
|
37735
|
+
_define_property$6(this, "inputFields", void 0);
|
|
37736
|
+
_define_property$6(this, "outputFields", void 0);
|
|
37737
|
+
_define_property$6(this, "sigHash", void 0);
|
|
37738
|
+
_define_property$6(this, "sigString", void 0);
|
|
37739
|
+
_define_property$6(this, "parseParsedField", function(field) {
|
|
37740
37740
|
if (!field.name || field.name.length === 0) {
|
|
37741
37741
|
throw new Error("Field name is required.");
|
|
37742
37742
|
}
|
|
@@ -37753,7 +37753,7 @@ var AxSignature = function AxSignature(signature) {
|
|
|
37753
37753
|
}
|
|
37754
37754
|
};
|
|
37755
37755
|
});
|
|
37756
|
-
_define_property$
|
|
37756
|
+
_define_property$6(this, "parseField", function(field) {
|
|
37757
37757
|
var title = !field.title || field.title.length === 0 ? _this.toTitle(field.name) : field.title;
|
|
37758
37758
|
if (field.type && (!field.type.name || field.type.name.length === 0)) {
|
|
37759
37759
|
throw new Error("Field type name is required: " + field.name);
|
|
@@ -37762,45 +37762,45 @@ var AxSignature = function AxSignature(signature) {
|
|
|
37762
37762
|
title: title
|
|
37763
37763
|
});
|
|
37764
37764
|
});
|
|
37765
|
-
_define_property$
|
|
37765
|
+
_define_property$6(this, "setDescription", function(desc) {
|
|
37766
37766
|
_this.description = desc;
|
|
37767
37767
|
_this.updateHash();
|
|
37768
37768
|
});
|
|
37769
|
-
_define_property$
|
|
37769
|
+
_define_property$6(this, "addInputField", function(field) {
|
|
37770
37770
|
_this.inputFields.push(_this.parseField(field));
|
|
37771
37771
|
_this.updateHash();
|
|
37772
37772
|
});
|
|
37773
|
-
_define_property$
|
|
37773
|
+
_define_property$6(this, "addOutputField", function(field) {
|
|
37774
37774
|
_this.outputFields.push(_this.parseField(field));
|
|
37775
37775
|
_this.updateHash();
|
|
37776
37776
|
});
|
|
37777
|
-
_define_property$
|
|
37777
|
+
_define_property$6(this, "setInputFields", function(fields) {
|
|
37778
37778
|
_this.inputFields = fields.map(function(v) {
|
|
37779
37779
|
return _this.parseField(v);
|
|
37780
37780
|
});
|
|
37781
37781
|
_this.updateHash();
|
|
37782
37782
|
});
|
|
37783
|
-
_define_property$
|
|
37783
|
+
_define_property$6(this, "setOutputFields", function(fields) {
|
|
37784
37784
|
_this.outputFields = fields.map(function(v) {
|
|
37785
37785
|
return _this.parseField(v);
|
|
37786
37786
|
});
|
|
37787
37787
|
_this.updateHash();
|
|
37788
37788
|
});
|
|
37789
|
-
_define_property$
|
|
37789
|
+
_define_property$6(this, "getInputFields", function() {
|
|
37790
37790
|
return _this.inputFields;
|
|
37791
37791
|
});
|
|
37792
|
-
_define_property$
|
|
37792
|
+
_define_property$6(this, "getOutputFields", function() {
|
|
37793
37793
|
return _this.outputFields;
|
|
37794
37794
|
});
|
|
37795
|
-
_define_property$
|
|
37795
|
+
_define_property$6(this, "getDescription", function() {
|
|
37796
37796
|
return _this.description;
|
|
37797
37797
|
});
|
|
37798
|
-
_define_property$
|
|
37798
|
+
_define_property$6(this, "toTitle", function(name) {
|
|
37799
37799
|
var result = name.replaceAll("_", " ");
|
|
37800
37800
|
result = result.replace(/([A-Z]|[0-9]+)/g, " $1").trim();
|
|
37801
37801
|
return result.charAt(0).toUpperCase() + result.slice(1);
|
|
37802
37802
|
});
|
|
37803
|
-
_define_property$
|
|
37803
|
+
_define_property$6(this, "toJSONSchema", function() {
|
|
37804
37804
|
var properties = {};
|
|
37805
37805
|
var required = [];
|
|
37806
37806
|
var _iteratorNormalCompletion = true, _didIteratorError = false, _iteratorError = undefined;
|
|
@@ -37849,7 +37849,7 @@ var AxSignature = function AxSignature(signature) {
|
|
|
37849
37849
|
};
|
|
37850
37850
|
return schema;
|
|
37851
37851
|
});
|
|
37852
|
-
_define_property$
|
|
37852
|
+
_define_property$6(this, "updateHash", function() {
|
|
37853
37853
|
_this.getInputFields().forEach(function(field) {
|
|
37854
37854
|
validateField(field);
|
|
37855
37855
|
});
|
|
@@ -37868,10 +37868,10 @@ var AxSignature = function AxSignature(signature) {
|
|
|
37868
37868
|
_this.sigString
|
|
37869
37869
|
];
|
|
37870
37870
|
});
|
|
37871
|
-
_define_property$
|
|
37871
|
+
_define_property$6(this, "hash", function() {
|
|
37872
37872
|
return _this.sigHash;
|
|
37873
37873
|
});
|
|
37874
|
-
_define_property$
|
|
37874
|
+
_define_property$6(this, "toString", function() {
|
|
37875
37875
|
return _this.sigString;
|
|
37876
37876
|
});
|
|
37877
37877
|
if (typeof signature === "string") {
|
|
@@ -37956,7 +37956,7 @@ function validateField(field) {
|
|
|
37956
37956
|
}
|
|
37957
37957
|
}
|
|
37958
37958
|
|
|
37959
|
-
/* eslint-disable @typescript-eslint/naming-convention */ function _define_property$
|
|
37959
|
+
/* eslint-disable @typescript-eslint/naming-convention */ function _define_property$5(obj, key, value) {
|
|
37960
37960
|
if (key in obj) {
|
|
37961
37961
|
Object.defineProperty(obj, key, {
|
|
37962
37962
|
value: value,
|
|
@@ -37979,7 +37979,7 @@ function _object_spread$3(target) {
|
|
|
37979
37979
|
}));
|
|
37980
37980
|
}
|
|
37981
37981
|
ownKeys.forEach(function(key) {
|
|
37982
|
-
_define_property$
|
|
37982
|
+
_define_property$5(target, key, source[key]);
|
|
37983
37983
|
});
|
|
37984
37984
|
}
|
|
37985
37985
|
return target;
|
|
@@ -38102,12 +38102,12 @@ function _async_to_generator$2(fn) {
|
|
|
38102
38102
|
});
|
|
38103
38103
|
};
|
|
38104
38104
|
}
|
|
38105
|
-
function _class_call_check$
|
|
38105
|
+
function _class_call_check$5(instance, Constructor) {
|
|
38106
38106
|
if (!(instance instanceof Constructor)) {
|
|
38107
38107
|
throw new TypeError("Cannot call a class as a function");
|
|
38108
38108
|
}
|
|
38109
38109
|
}
|
|
38110
|
-
function _defineProperties$
|
|
38110
|
+
function _defineProperties$2(target, props) {
|
|
38111
38111
|
for(var i = 0; i < props.length; i++){
|
|
38112
38112
|
var descriptor = props[i];
|
|
38113
38113
|
descriptor.enumerable = descriptor.enumerable || false;
|
|
@@ -38116,12 +38116,12 @@ function _defineProperties$3(target, props) {
|
|
|
38116
38116
|
Object.defineProperty(target, descriptor.key, descriptor);
|
|
38117
38117
|
}
|
|
38118
38118
|
}
|
|
38119
|
-
function _create_class$
|
|
38120
|
-
if (protoProps) _defineProperties$
|
|
38121
|
-
if (staticProps) _defineProperties$
|
|
38119
|
+
function _create_class$2(Constructor, protoProps, staticProps) {
|
|
38120
|
+
if (protoProps) _defineProperties$2(Constructor.prototype, protoProps);
|
|
38121
|
+
if (staticProps) _defineProperties$2(Constructor, staticProps);
|
|
38122
38122
|
return Constructor;
|
|
38123
38123
|
}
|
|
38124
|
-
function _define_property$
|
|
38124
|
+
function _define_property$4(obj, key, value) {
|
|
38125
38125
|
if (key in obj) {
|
|
38126
38126
|
Object.defineProperty(obj, key, {
|
|
38127
38127
|
value: value,
|
|
@@ -38248,16 +38248,16 @@ function _ts_generator$2(thisArg, body) {
|
|
|
38248
38248
|
}
|
|
38249
38249
|
var AxProgramWithSignature = /*#__PURE__*/ function() {
|
|
38250
38250
|
function AxProgramWithSignature(signature) {
|
|
38251
|
-
_class_call_check$
|
|
38251
|
+
_class_call_check$5(this, AxProgramWithSignature);
|
|
38252
38252
|
var _this_signature;
|
|
38253
|
-
_define_property$
|
|
38254
|
-
_define_property$
|
|
38255
|
-
_define_property$
|
|
38256
|
-
_define_property$
|
|
38257
|
-
_define_property$
|
|
38258
|
-
_define_property$
|
|
38259
|
-
_define_property$
|
|
38260
|
-
_define_property$
|
|
38253
|
+
_define_property$4(this, "signature", void 0);
|
|
38254
|
+
_define_property$4(this, "sigHash", void 0);
|
|
38255
|
+
_define_property$4(this, "examples", void 0);
|
|
38256
|
+
_define_property$4(this, "demos", void 0);
|
|
38257
|
+
_define_property$4(this, "trace", void 0);
|
|
38258
|
+
_define_property$4(this, "usage", []);
|
|
38259
|
+
_define_property$4(this, "key", void 0);
|
|
38260
|
+
_define_property$4(this, "children", void 0);
|
|
38261
38261
|
this.signature = new AxSignature(signature);
|
|
38262
38262
|
this.sigHash = (_this_signature = this.signature) === null || _this_signature === void 0 ? void 0 : _this_signature.hash();
|
|
38263
38263
|
this.children = new AxInstanceRegistry();
|
|
@@ -38265,7 +38265,7 @@ var AxProgramWithSignature = /*#__PURE__*/ function() {
|
|
|
38265
38265
|
id: this.constructor.name
|
|
38266
38266
|
};
|
|
38267
38267
|
}
|
|
38268
|
-
_create_class$
|
|
38268
|
+
_create_class$2(AxProgramWithSignature, [
|
|
38269
38269
|
{
|
|
38270
38270
|
key: "getSignature",
|
|
38271
38271
|
value: function getSignature() {
|
|
@@ -38538,12 +38538,12 @@ function _array_like_to_array$2(arr, len) {
|
|
|
38538
38538
|
function _array_without_holes$2(arr) {
|
|
38539
38539
|
if (Array.isArray(arr)) return _array_like_to_array$2(arr);
|
|
38540
38540
|
}
|
|
38541
|
-
function _class_call_check$
|
|
38541
|
+
function _class_call_check$4(instance, Constructor) {
|
|
38542
38542
|
if (!(instance instanceof Constructor)) {
|
|
38543
38543
|
throw new TypeError("Cannot call a class as a function");
|
|
38544
38544
|
}
|
|
38545
38545
|
}
|
|
38546
|
-
function _define_property$
|
|
38546
|
+
function _define_property$3(obj, key, value) {
|
|
38547
38547
|
if (key in obj) {
|
|
38548
38548
|
Object.defineProperty(obj, key, {
|
|
38549
38549
|
value: value,
|
|
@@ -38575,12 +38575,12 @@ function _unsupported_iterable_to_array$2(o, minLen) {
|
|
|
38575
38575
|
}
|
|
38576
38576
|
var AxPromptTemplate = function AxPromptTemplate(sig, fieldTemplates) {
|
|
38577
38577
|
var _this = this;
|
|
38578
|
-
_class_call_check$
|
|
38579
|
-
_define_property$
|
|
38580
|
-
_define_property$
|
|
38581
|
-
_define_property$
|
|
38582
|
-
_define_property$
|
|
38583
|
-
_define_property$
|
|
38578
|
+
_class_call_check$4(this, AxPromptTemplate);
|
|
38579
|
+
_define_property$3(this, "sig", void 0);
|
|
38580
|
+
_define_property$3(this, "fieldTemplates", void 0);
|
|
38581
|
+
_define_property$3(this, "task", void 0);
|
|
38582
|
+
_define_property$3(this, "outputFormat", void 0);
|
|
38583
|
+
_define_property$3(this, "render", function(values, param) {
|
|
38584
38584
|
var examples = param.examples, demos = param.demos;
|
|
38585
38585
|
var renderedExamples = examples ? [
|
|
38586
38586
|
{
|
|
@@ -38607,7 +38607,7 @@ var AxPromptTemplate = function AxPromptTemplate(sig, fieldTemplates) {
|
|
|
38607
38607
|
}
|
|
38608
38608
|
return prompt.reduce(combineConsecutiveStrings("\n"), []);
|
|
38609
38609
|
});
|
|
38610
|
-
_define_property$
|
|
38610
|
+
_define_property$3(this, "renderExtraFields", function(extraFields) {
|
|
38611
38611
|
var prompt = [];
|
|
38612
38612
|
if (extraFields && extraFields.length > 0) {
|
|
38613
38613
|
extraFields.forEach(function(field) {
|
|
@@ -38630,7 +38630,7 @@ var AxPromptTemplate = function AxPromptTemplate(sig, fieldTemplates) {
|
|
|
38630
38630
|
}
|
|
38631
38631
|
return prompt.reduce(combineConsecutiveStrings("\n"), []);
|
|
38632
38632
|
});
|
|
38633
|
-
_define_property$
|
|
38633
|
+
_define_property$3(this, "renderExamples", function(data) {
|
|
38634
38634
|
var list = [];
|
|
38635
38635
|
var _iteratorNormalCompletion = true, _didIteratorError = false, _iteratorError = undefined;
|
|
38636
38636
|
try {
|
|
@@ -38683,7 +38683,7 @@ var AxPromptTemplate = function AxPromptTemplate(sig, fieldTemplates) {
|
|
|
38683
38683
|
}
|
|
38684
38684
|
return list;
|
|
38685
38685
|
});
|
|
38686
|
-
_define_property$
|
|
38686
|
+
_define_property$3(this, "renderDemos", function(data) {
|
|
38687
38687
|
var list = [];
|
|
38688
38688
|
var fields = _to_consumable_array$2(_this.sig.getInputFields()).concat(_to_consumable_array$2(_this.sig.getOutputFields()));
|
|
38689
38689
|
var _iteratorNormalCompletion = true, _didIteratorError = false, _iteratorError = undefined;
|
|
@@ -38728,7 +38728,7 @@ var AxPromptTemplate = function AxPromptTemplate(sig, fieldTemplates) {
|
|
|
38728
38728
|
}
|
|
38729
38729
|
return list;
|
|
38730
38730
|
});
|
|
38731
|
-
_define_property$
|
|
38731
|
+
_define_property$3(this, "renderInputFields", function(values) {
|
|
38732
38732
|
var renderedItems = _this.sig.getInputFields().map(function(field) {
|
|
38733
38733
|
return _this.renderInField(field, values);
|
|
38734
38734
|
}).filter(function(v) {
|
|
@@ -38741,7 +38741,7 @@ var AxPromptTemplate = function AxPromptTemplate(sig, fieldTemplates) {
|
|
|
38741
38741
|
});
|
|
38742
38742
|
return renderedItems;
|
|
38743
38743
|
});
|
|
38744
|
-
_define_property$
|
|
38744
|
+
_define_property$3(this, "renderInField", function(field, values, skipMissing) {
|
|
38745
38745
|
var _this_fieldTemplates;
|
|
38746
38746
|
var _this_fieldTemplates_field_name;
|
|
38747
38747
|
var textFieldFn = (_this_fieldTemplates_field_name = (_this_fieldTemplates = _this.fieldTemplates) === null || _this_fieldTemplates === void 0 ? void 0 : _this_fieldTemplates[field.name]) !== null && _this_fieldTemplates_field_name !== void 0 ? _this_fieldTemplates_field_name : _this.defaultRenderInField;
|
|
@@ -38761,7 +38761,7 @@ var AxPromptTemplate = function AxPromptTemplate(sig, fieldTemplates) {
|
|
|
38761
38761
|
var processedValue = processValue(field, value);
|
|
38762
38762
|
return textFieldFn(field, processedValue);
|
|
38763
38763
|
});
|
|
38764
|
-
_define_property$
|
|
38764
|
+
_define_property$3(this, "defaultRenderInField", function(field, value) {
|
|
38765
38765
|
var _field_type;
|
|
38766
38766
|
if (((_field_type = field.type) === null || _field_type === void 0 ? void 0 : _field_type.name) === "image") {
|
|
38767
38767
|
if (typeof value !== "object") {
|
|
@@ -38801,14 +38801,14 @@ var AxPromptTemplate = function AxPromptTemplate(sig, fieldTemplates) {
|
|
|
38801
38801
|
}
|
|
38802
38802
|
];
|
|
38803
38803
|
});
|
|
38804
|
-
_define_property$
|
|
38804
|
+
_define_property$3(this, "renderDescFields", function(list) {
|
|
38805
38805
|
return list.map(function(v) {
|
|
38806
38806
|
return "`".concat(v.title, "`");
|
|
38807
38807
|
}).join(", ");
|
|
38808
38808
|
});
|
|
38809
38809
|
// private renderInFields = (list: readonly Field[]) =>
|
|
38810
38810
|
// list.map((v) => v.title + ': ' + (v.description ?? toVar(v.name)));
|
|
38811
|
-
_define_property$
|
|
38811
|
+
_define_property$3(this, "renderOutFields", function(list) {
|
|
38812
38812
|
return list.map(function(v) {
|
|
38813
38813
|
var _v_description;
|
|
38814
38814
|
return [
|
|
@@ -38980,12 +38980,12 @@ function _async_to_generator$1(fn) {
|
|
|
38980
38980
|
});
|
|
38981
38981
|
};
|
|
38982
38982
|
}
|
|
38983
|
-
function _class_call_check$
|
|
38983
|
+
function _class_call_check$3(instance, Constructor) {
|
|
38984
38984
|
if (!(instance instanceof Constructor)) {
|
|
38985
38985
|
throw new TypeError("Cannot call a class as a function");
|
|
38986
38986
|
}
|
|
38987
38987
|
}
|
|
38988
|
-
function _defineProperties$
|
|
38988
|
+
function _defineProperties$1(target, props) {
|
|
38989
38989
|
for(var i = 0; i < props.length; i++){
|
|
38990
38990
|
var descriptor = props[i];
|
|
38991
38991
|
descriptor.enumerable = descriptor.enumerable || false;
|
|
@@ -38994,12 +38994,12 @@ function _defineProperties$2(target, props) {
|
|
|
38994
38994
|
Object.defineProperty(target, descriptor.key, descriptor);
|
|
38995
38995
|
}
|
|
38996
38996
|
}
|
|
38997
|
-
function _create_class$
|
|
38998
|
-
if (protoProps) _defineProperties$
|
|
38999
|
-
if (staticProps) _defineProperties$
|
|
38997
|
+
function _create_class$1(Constructor, protoProps, staticProps) {
|
|
38998
|
+
if (protoProps) _defineProperties$1(Constructor.prototype, protoProps);
|
|
38999
|
+
if (staticProps) _defineProperties$1(Constructor, staticProps);
|
|
39000
39000
|
return Constructor;
|
|
39001
39001
|
}
|
|
39002
|
-
function _define_property$
|
|
39002
|
+
function _define_property$2(obj, key, value) {
|
|
39003
39003
|
if (key in obj) {
|
|
39004
39004
|
Object.defineProperty(obj, key, {
|
|
39005
39005
|
value: value,
|
|
@@ -39048,7 +39048,7 @@ function _object_spread$2(target) {
|
|
|
39048
39048
|
}));
|
|
39049
39049
|
}
|
|
39050
39050
|
ownKeys.forEach(function(key) {
|
|
39051
|
-
_define_property$
|
|
39051
|
+
_define_property$2(target, key, source[key]);
|
|
39052
39052
|
});
|
|
39053
39053
|
}
|
|
39054
39054
|
return target;
|
|
@@ -39217,19 +39217,19 @@ var AxGenerate = /*#__PURE__*/ function(AxProgramWithSignature) {
|
|
|
39217
39217
|
_inherits$2(AxGenerate, AxProgramWithSignature);
|
|
39218
39218
|
var _super = _create_super$2(AxGenerate);
|
|
39219
39219
|
function AxGenerate(ai, signature, options) {
|
|
39220
|
-
_class_call_check$
|
|
39220
|
+
_class_call_check$3(this, AxGenerate);
|
|
39221
39221
|
var _this;
|
|
39222
39222
|
var _options_functions, _this_options, _this_options1, _this_functions;
|
|
39223
39223
|
_this = _super.call(this, signature);
|
|
39224
|
-
_define_property$
|
|
39225
|
-
_define_property$
|
|
39226
|
-
_define_property$
|
|
39227
|
-
_define_property$
|
|
39228
|
-
_define_property$
|
|
39229
|
-
_define_property$
|
|
39230
|
-
_define_property$
|
|
39231
|
-
_define_property$
|
|
39232
|
-
_define_property$
|
|
39224
|
+
_define_property$2(_assert_this_initialized$2(_this), "ai", void 0);
|
|
39225
|
+
_define_property$2(_assert_this_initialized$2(_this), "pt", void 0);
|
|
39226
|
+
_define_property$2(_assert_this_initialized$2(_this), "asserts", void 0);
|
|
39227
|
+
_define_property$2(_assert_this_initialized$2(_this), "streamingAsserts", void 0);
|
|
39228
|
+
_define_property$2(_assert_this_initialized$2(_this), "options", void 0);
|
|
39229
|
+
_define_property$2(_assert_this_initialized$2(_this), "functions", void 0);
|
|
39230
|
+
_define_property$2(_assert_this_initialized$2(_this), "funcProc", void 0);
|
|
39231
|
+
_define_property$2(_assert_this_initialized$2(_this), "functionList", void 0);
|
|
39232
|
+
_define_property$2(_assert_this_initialized$2(_this), "updateSigForFunctions", function() {
|
|
39233
39233
|
// AI supports function calling natively so
|
|
39234
39234
|
// no need to add fields for function call
|
|
39235
39235
|
if (_this.ai.getFeatures().functions) {
|
|
@@ -39247,14 +39247,14 @@ var AxGenerate = /*#__PURE__*/ function(AxProgramWithSignature) {
|
|
|
39247
39247
|
isOptional: true
|
|
39248
39248
|
});
|
|
39249
39249
|
});
|
|
39250
|
-
_define_property$
|
|
39250
|
+
_define_property$2(_assert_this_initialized$2(_this), "addAssert", function(fn, message, optional) {
|
|
39251
39251
|
_this.asserts.push({
|
|
39252
39252
|
fn: fn,
|
|
39253
39253
|
message: message,
|
|
39254
39254
|
optional: optional
|
|
39255
39255
|
});
|
|
39256
39256
|
});
|
|
39257
|
-
_define_property$
|
|
39257
|
+
_define_property$2(_assert_this_initialized$2(_this), "addStreamingAssert", function(fieldName, fn, message, optional) {
|
|
39258
39258
|
_this.streamingAsserts.push({
|
|
39259
39259
|
fieldName: fieldName,
|
|
39260
39260
|
fn: fn,
|
|
@@ -39263,7 +39263,7 @@ var AxGenerate = /*#__PURE__*/ function(AxProgramWithSignature) {
|
|
|
39263
39263
|
});
|
|
39264
39264
|
});
|
|
39265
39265
|
var _this1 = _assert_this_initialized$2(_this);
|
|
39266
|
-
_define_property$
|
|
39266
|
+
_define_property$2(_assert_this_initialized$2(_this), "processFunctions", function() {
|
|
39267
39267
|
var _ref = _async_to_generator$1(function(functionCalls, mem, sessionId, traceId) {
|
|
39268
39268
|
var promises, results;
|
|
39269
39269
|
return _ts_generator$1(this, function(_state) {
|
|
@@ -39332,7 +39332,7 @@ var AxGenerate = /*#__PURE__*/ function(AxProgramWithSignature) {
|
|
|
39332
39332
|
}
|
|
39333
39333
|
return _this;
|
|
39334
39334
|
}
|
|
39335
|
-
_create_class$
|
|
39335
|
+
_create_class$1(AxGenerate, [
|
|
39336
39336
|
{
|
|
39337
39337
|
key: "forwardSendRequest",
|
|
39338
39338
|
value: function forwardSendRequest(param) {
|
|
@@ -39871,7 +39871,7 @@ var AxGenerate = /*#__PURE__*/ function(AxProgramWithSignature) {
|
|
|
39871
39871
|
_state.sent()
|
|
39872
39872
|
];
|
|
39873
39873
|
case 2:
|
|
39874
|
-
attributes = (_obj = {}, _define_property$
|
|
39874
|
+
attributes = (_obj = {}, _define_property$2(_obj, "generate.signature", _this.signature.toString()), _define_property$2(_obj, "generate.functions", (_this_functionList = _this.functionList) !== null && _this_functionList !== void 0 ? _this_functionList : "none"), _obj);
|
|
39875
39875
|
return [
|
|
39876
39876
|
4,
|
|
39877
39877
|
tracer.startActiveSpan("Generate", {
|
|
@@ -39952,7 +39952,7 @@ function _assert_this_initialized$1(self) {
|
|
|
39952
39952
|
}
|
|
39953
39953
|
return self;
|
|
39954
39954
|
}
|
|
39955
|
-
function _class_call_check$
|
|
39955
|
+
function _class_call_check$2(instance, Constructor) {
|
|
39956
39956
|
if (!(instance instanceof Constructor)) {
|
|
39957
39957
|
throw new TypeError("Cannot call a class as a function");
|
|
39958
39958
|
}
|
|
@@ -40038,7 +40038,7 @@ var AxChainOfThought = /*#__PURE__*/ function(AxGenerate) {
|
|
|
40038
40038
|
_inherits$1(AxChainOfThought, AxGenerate);
|
|
40039
40039
|
var _super = _create_super$1(AxChainOfThought);
|
|
40040
40040
|
function AxChainOfThought(ai, signature, options) {
|
|
40041
|
-
_class_call_check$
|
|
40041
|
+
_class_call_check$2(this, AxChainOfThought);
|
|
40042
40042
|
var sig = new AxSignature(signature);
|
|
40043
40043
|
var description = "Let's work this out in a step by step way in order to ensure we have the right answer.";
|
|
40044
40044
|
sig.setOutputFields([
|
|
@@ -40059,12 +40059,12 @@ function _assert_this_initialized(self) {
|
|
|
40059
40059
|
}
|
|
40060
40060
|
return self;
|
|
40061
40061
|
}
|
|
40062
|
-
function _class_call_check$
|
|
40062
|
+
function _class_call_check$1(instance, Constructor) {
|
|
40063
40063
|
if (!(instance instanceof Constructor)) {
|
|
40064
40064
|
throw new TypeError("Cannot call a class as a function");
|
|
40065
40065
|
}
|
|
40066
40066
|
}
|
|
40067
|
-
function _define_property$
|
|
40067
|
+
function _define_property$1(obj, key, value) {
|
|
40068
40068
|
if (key in obj) {
|
|
40069
40069
|
Object.defineProperty(obj, key, {
|
|
40070
40070
|
value: value,
|
|
@@ -40106,7 +40106,7 @@ function _object_spread$1(target) {
|
|
|
40106
40106
|
}));
|
|
40107
40107
|
}
|
|
40108
40108
|
ownKeys.forEach(function(key) {
|
|
40109
|
-
_define_property$
|
|
40109
|
+
_define_property$1(target, key, source[key]);
|
|
40110
40110
|
});
|
|
40111
40111
|
}
|
|
40112
40112
|
return target;
|
|
@@ -40180,7 +40180,7 @@ var AxReAct = /*#__PURE__*/ function(AxChainOfThought) {
|
|
|
40180
40180
|
_inherits(AxReAct, AxChainOfThought);
|
|
40181
40181
|
var _super = _create_super(AxReAct);
|
|
40182
40182
|
function AxReAct(ai, signature, options) {
|
|
40183
|
-
_class_call_check$
|
|
40183
|
+
_class_call_check$1(this, AxReAct);
|
|
40184
40184
|
if (!(options === null || options === void 0 ? void 0 : options.functions) || options.functions.length === 0) {
|
|
40185
40185
|
throw new Error("No functions provided");
|
|
40186
40186
|
}
|
|
@@ -40251,12 +40251,12 @@ function _async_to_generator(fn) {
|
|
|
40251
40251
|
});
|
|
40252
40252
|
};
|
|
40253
40253
|
}
|
|
40254
|
-
function _class_call_check
|
|
40254
|
+
function _class_call_check(instance, Constructor) {
|
|
40255
40255
|
if (!(instance instanceof Constructor)) {
|
|
40256
40256
|
throw new TypeError("Cannot call a class as a function");
|
|
40257
40257
|
}
|
|
40258
40258
|
}
|
|
40259
|
-
function _defineProperties
|
|
40259
|
+
function _defineProperties(target, props) {
|
|
40260
40260
|
for(var i = 0; i < props.length; i++){
|
|
40261
40261
|
var descriptor = props[i];
|
|
40262
40262
|
descriptor.enumerable = descriptor.enumerable || false;
|
|
@@ -40265,12 +40265,12 @@ function _defineProperties$1(target, props) {
|
|
|
40265
40265
|
Object.defineProperty(target, descriptor.key, descriptor);
|
|
40266
40266
|
}
|
|
40267
40267
|
}
|
|
40268
|
-
function _create_class
|
|
40269
|
-
if (protoProps) _defineProperties
|
|
40270
|
-
if (staticProps) _defineProperties
|
|
40268
|
+
function _create_class(Constructor, protoProps, staticProps) {
|
|
40269
|
+
if (protoProps) _defineProperties(Constructor.prototype, protoProps);
|
|
40270
|
+
if (staticProps) _defineProperties(Constructor, staticProps);
|
|
40271
40271
|
return Constructor;
|
|
40272
40272
|
}
|
|
40273
|
-
function _define_property
|
|
40273
|
+
function _define_property(obj, key, value) {
|
|
40274
40274
|
if (key in obj) {
|
|
40275
40275
|
Object.defineProperty(obj, key, {
|
|
40276
40276
|
value: value,
|
|
@@ -40299,7 +40299,7 @@ function _object_spread(target) {
|
|
|
40299
40299
|
}));
|
|
40300
40300
|
}
|
|
40301
40301
|
ownKeys.forEach(function(key) {
|
|
40302
|
-
_define_property
|
|
40302
|
+
_define_property(target, key, source[key]);
|
|
40303
40303
|
});
|
|
40304
40304
|
}
|
|
40305
40305
|
return target;
|
|
@@ -40438,13 +40438,13 @@ var AxAgent = /*#__PURE__*/ function() {
|
|
|
40438
40438
|
function AxAgent(ai, param, options) {
|
|
40439
40439
|
var _this = this;
|
|
40440
40440
|
var name = param.name, description = param.description, signature = param.signature, agents = param.agents, functions = param.functions;
|
|
40441
|
-
_class_call_check
|
|
40442
|
-
_define_property
|
|
40443
|
-
_define_property
|
|
40444
|
-
_define_property
|
|
40445
|
-
_define_property
|
|
40446
|
-
_define_property
|
|
40447
|
-
_define_property
|
|
40441
|
+
_class_call_check(this, AxAgent);
|
|
40442
|
+
_define_property(this, "signature", void 0);
|
|
40443
|
+
_define_property(this, "program", void 0);
|
|
40444
|
+
_define_property(this, "name", void 0);
|
|
40445
|
+
_define_property(this, "description", void 0);
|
|
40446
|
+
_define_property(this, "subAgentList", void 0);
|
|
40447
|
+
_define_property(this, "func", void 0);
|
|
40448
40448
|
this.signature = new AxSignature(signature);
|
|
40449
40449
|
var _agents_map;
|
|
40450
40450
|
var funcs = _to_consumable_array(functions !== null && functions !== void 0 ? functions : []).concat(_to_consumable_array((_agents_map = agents === null || agents === void 0 ? void 0 : agents.map(function(a) {
|
|
@@ -40494,7 +40494,7 @@ var AxAgent = /*#__PURE__*/ function() {
|
|
|
40494
40494
|
}
|
|
40495
40495
|
}
|
|
40496
40496
|
}
|
|
40497
|
-
_create_class
|
|
40497
|
+
_create_class(AxAgent, [
|
|
40498
40498
|
{
|
|
40499
40499
|
key: "setExamples",
|
|
40500
40500
|
value: function setExamples(examples) {
|
|
@@ -40566,7 +40566,7 @@ var AxAgent = /*#__PURE__*/ function() {
|
|
|
40566
40566
|
_state.sent()
|
|
40567
40567
|
];
|
|
40568
40568
|
case 2:
|
|
40569
|
-
attributes = (_obj = {}, _define_property
|
|
40569
|
+
attributes = (_obj = {}, _define_property(_obj, "agent.name", _this.name), _define_property(_obj, "agent.description", _this.description), _define_property(_obj, "agent.subAgents", (_this_subAgentList = _this.subAgentList) !== null && _this_subAgentList !== void 0 ? _this_subAgentList : "none"), _obj);
|
|
40570
40570
|
return [
|
|
40571
40571
|
4,
|
|
40572
40572
|
options === null || options === void 0 ? void 0 : options.tracer.startActiveSpan("Agent", {
|
|
@@ -40626,38 +40626,6 @@ function toCamelCase(inputString) {
|
|
|
40626
40626
|
return camelCaseString;
|
|
40627
40627
|
}
|
|
40628
40628
|
|
|
40629
|
-
function _class_call_check(instance, Constructor) {
|
|
40630
|
-
if (!(instance instanceof Constructor)) {
|
|
40631
|
-
throw new TypeError("Cannot call a class as a function");
|
|
40632
|
-
}
|
|
40633
|
-
}
|
|
40634
|
-
function _defineProperties(target, props) {
|
|
40635
|
-
for(var i = 0; i < props.length; i++){
|
|
40636
|
-
var descriptor = props[i];
|
|
40637
|
-
descriptor.enumerable = descriptor.enumerable || false;
|
|
40638
|
-
descriptor.configurable = true;
|
|
40639
|
-
if ("value" in descriptor) descriptor.writable = true;
|
|
40640
|
-
Object.defineProperty(target, descriptor.key, descriptor);
|
|
40641
|
-
}
|
|
40642
|
-
}
|
|
40643
|
-
function _create_class(Constructor, protoProps, staticProps) {
|
|
40644
|
-
if (protoProps) _defineProperties(Constructor.prototype, protoProps);
|
|
40645
|
-
if (staticProps) _defineProperties(Constructor, staticProps);
|
|
40646
|
-
return Constructor;
|
|
40647
|
-
}
|
|
40648
|
-
function _define_property(obj, key, value) {
|
|
40649
|
-
if (key in obj) {
|
|
40650
|
-
Object.defineProperty(obj, key, {
|
|
40651
|
-
value: value,
|
|
40652
|
-
enumerable: true,
|
|
40653
|
-
configurable: true,
|
|
40654
|
-
writable: true
|
|
40655
|
-
});
|
|
40656
|
-
} else {
|
|
40657
|
-
obj[key] = value;
|
|
40658
|
-
}
|
|
40659
|
-
return obj;
|
|
40660
|
-
}
|
|
40661
40629
|
var AxJSInterpreterPermission;
|
|
40662
40630
|
(function(AxJSInterpreterPermission) {
|
|
40663
40631
|
AxJSInterpreterPermission["FS"] = "node:fs";
|
|
@@ -40666,69 +40634,6 @@ var AxJSInterpreterPermission;
|
|
|
40666
40634
|
AxJSInterpreterPermission["CRYPTO"] = "crypto";
|
|
40667
40635
|
AxJSInterpreterPermission["PROCESS"] = "process";
|
|
40668
40636
|
})(AxJSInterpreterPermission || (AxJSInterpreterPermission = {}));
|
|
40669
|
-
var AxJSInterpreter = /*#__PURE__*/ function() {
|
|
40670
|
-
function AxJSInterpreter() {
|
|
40671
|
-
var _ref = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {}, _ref_permissions = _ref.permissions, permissions = _ref_permissions === void 0 ? [] : _ref_permissions;
|
|
40672
|
-
_class_call_check(this, AxJSInterpreter);
|
|
40673
|
-
_define_property(this, "permissions", void 0);
|
|
40674
|
-
this.permissions = permissions !== null && permissions !== void 0 ? permissions : [];
|
|
40675
|
-
}
|
|
40676
|
-
_create_class(AxJSInterpreter, [
|
|
40677
|
-
{
|
|
40678
|
-
key: "codeInterpreterJavascript",
|
|
40679
|
-
value: function codeInterpreterJavascript(code) {
|
|
40680
|
-
var context = {
|
|
40681
|
-
console: console
|
|
40682
|
-
};
|
|
40683
|
-
if (this.permissions.includes(AxJSInterpreterPermission.FS)) {
|
|
40684
|
-
context.fs = _fs;
|
|
40685
|
-
}
|
|
40686
|
-
if (this.permissions.includes(AxJSInterpreterPermission.NET)) {
|
|
40687
|
-
context.http = _http;
|
|
40688
|
-
context.https = _https;
|
|
40689
|
-
}
|
|
40690
|
-
if (this.permissions.includes(AxJSInterpreterPermission.OS)) {
|
|
40691
|
-
context.os = _os;
|
|
40692
|
-
}
|
|
40693
|
-
if (this.permissions.includes(AxJSInterpreterPermission.CRYPTO)) {
|
|
40694
|
-
context.crypto = _crypto;
|
|
40695
|
-
}
|
|
40696
|
-
if (this.permissions.includes(AxJSInterpreterPermission.PROCESS)) {
|
|
40697
|
-
context.process = _process;
|
|
40698
|
-
}
|
|
40699
|
-
return runInNewContext("(function() { ".concat(code, " })()"), context);
|
|
40700
|
-
}
|
|
40701
|
-
},
|
|
40702
|
-
{
|
|
40703
|
-
key: "toFunction",
|
|
40704
|
-
value: function toFunction() {
|
|
40705
|
-
var _this = this;
|
|
40706
|
-
return {
|
|
40707
|
-
name: "javascriptInterpreter",
|
|
40708
|
-
description: "Use this function to run Javascript code and get any expected return value.",
|
|
40709
|
-
parameters: {
|
|
40710
|
-
type: "object",
|
|
40711
|
-
properties: {
|
|
40712
|
-
code: {
|
|
40713
|
-
type: "string",
|
|
40714
|
-
description: "JS code with a return value in the end."
|
|
40715
|
-
}
|
|
40716
|
-
},
|
|
40717
|
-
required: [
|
|
40718
|
-
"code"
|
|
40719
|
-
]
|
|
40720
|
-
},
|
|
40721
|
-
func: function(param) {
|
|
40722
|
-
var code = param.code;
|
|
40723
|
-
return _this.codeInterpreterJavascript(code);
|
|
40724
|
-
}
|
|
40725
|
-
};
|
|
40726
|
-
}
|
|
40727
|
-
}
|
|
40728
|
-
]);
|
|
40729
|
-
return AxJSInterpreter;
|
|
40730
|
-
}
|
|
40731
|
-
();
|
|
40732
40637
|
|
|
40733
40638
|
let DspService = class DspService {
|
|
40734
40639
|
async prepareFunctions(functions, context) {
|
|
@@ -40744,7 +40649,6 @@ let DspService = class DspService {
|
|
|
40744
40649
|
}));
|
|
40745
40650
|
}
|
|
40746
40651
|
async model(params, _pinsSettingsList, _context) {
|
|
40747
|
-
// const { AxAI } = await eval(`import('@ax-llm/ax')`);
|
|
40748
40652
|
const { name, options } = params;
|
|
40749
40653
|
const modelInstance = new AxAI(_extends({
|
|
40750
40654
|
name
|
|
@@ -40753,7 +40657,6 @@ let DspService = class DspService {
|
|
|
40753
40657
|
}
|
|
40754
40658
|
async modelOpenAI(params, _pinsSettingsList, context) {
|
|
40755
40659
|
var _context_privates_OPENAI_API_KEY, _context_privates_OPENAI_SERVER;
|
|
40756
|
-
// const { AxAIOpenAI } = await eval(`import('@ax-llm/ax')`);
|
|
40757
40660
|
const { apiKey = (_context_privates_OPENAI_API_KEY = context.privates.OPENAI_API_KEY) != null ? _context_privates_OPENAI_API_KEY : process.env['OPENAI_API_KEY'], apiURL = (_context_privates_OPENAI_SERVER = context.privates.OPENAI_SERVER) != null ? _context_privates_OPENAI_SERVER : process.env['OPENAI_SERVER'], config, options } = params;
|
|
40758
40661
|
const modelInstance = new AxAIOpenAI({
|
|
40759
40662
|
apiKey,
|
|
@@ -40765,7 +40668,6 @@ let DspService = class DspService {
|
|
|
40765
40668
|
}
|
|
40766
40669
|
async modelAzureOpenAi(params, _pinsSettingsList, context) {
|
|
40767
40670
|
var _context_privates_AZURE_OPENAI_API_KEY, _context_privates_AZURE_OPENAI_API_INSTANCE_NAME, _context_privates_AZURE_OPENAI_API_DEPLOYMENT_NAME, _context_privates_AZURE_OPENAI_API_VERSION;
|
|
40768
|
-
// const { AxAIAzureOpenAI } = await eval(`import('@ax-llm/ax')`);
|
|
40769
40671
|
const { apiKey = (_context_privates_AZURE_OPENAI_API_KEY = context.privates.AZURE_OPENAI_API_KEY) != null ? _context_privates_AZURE_OPENAI_API_KEY : process.env['AZURE_OPENAI_API_KEY'], resourceName = (_context_privates_AZURE_OPENAI_API_INSTANCE_NAME = context.privates.AZURE_OPENAI_API_INSTANCE_NAME) != null ? _context_privates_AZURE_OPENAI_API_INSTANCE_NAME : process.env['AZURE_OPENAI_API_INSTANCE_NAME'], deploymentName = (_context_privates_AZURE_OPENAI_API_DEPLOYMENT_NAME = context.privates.AZURE_OPENAI_API_DEPLOYMENT_NAME) != null ? _context_privates_AZURE_OPENAI_API_DEPLOYMENT_NAME : process.env['AZURE_OPENAI_API_DEPLOYMENT_NAME'], version = (_context_privates_AZURE_OPENAI_API_VERSION = context.privates.AZURE_OPENAI_API_VERSION) != null ? _context_privates_AZURE_OPENAI_API_VERSION : process.env['AZURE_OPENAI_API_VERSION'], config, options } = params;
|
|
40770
40672
|
const modelInstance = new AxAIAzureOpenAI({
|
|
40771
40673
|
apiKey,
|
|
@@ -40778,7 +40680,6 @@ let DspService = class DspService {
|
|
|
40778
40680
|
return modelInstance;
|
|
40779
40681
|
}
|
|
40780
40682
|
async modelOllama(params, _pinsSettingsList, context) {
|
|
40781
|
-
// const { AxAIOllama } = await eval(`import('@ax-llm/ax')`);
|
|
40782
40683
|
const { model, url = context.privates.OLLAMA_SERVER ? context.privates.OLLAMA_SERVER + '/v1' : process.env['OLLAMA_SERVER'] ? process.env['OLLAMA_SERVER'] + '/v1' : 'http://localhost:11434/v1', apiKey, config, options } = params;
|
|
40783
40684
|
const modelInstance = new AxAIOllama({
|
|
40784
40685
|
model,
|
|
@@ -40790,7 +40691,6 @@ let DspService = class DspService {
|
|
|
40790
40691
|
return modelInstance;
|
|
40791
40692
|
}
|
|
40792
40693
|
async generate(params, _pinsSettingsList, context) {
|
|
40793
|
-
// const { AxGenerate } = await eval(`import('@ax-llm/ax')`);
|
|
40794
40694
|
const { model = context.privates.MODEL_DSP, functions = [], signature, input } = params;
|
|
40795
40695
|
const modelInstance = await executePinsList(model, context);
|
|
40796
40696
|
const gen = new AxGenerate(modelInstance, signature, {
|
|
@@ -40800,7 +40700,6 @@ let DspService = class DspService {
|
|
|
40800
40700
|
return result;
|
|
40801
40701
|
}
|
|
40802
40702
|
async chainOfThought(params, _pinsSettingsList, context) {
|
|
40803
|
-
// const { AxChainOfThought } = await eval(`import('@ax-llm/ax')`);
|
|
40804
40703
|
const { model = context.privates.MODEL_DSP, functions = [], signature, input } = params;
|
|
40805
40704
|
const modelInstance = await executePinsList(model, context);
|
|
40806
40705
|
const gen = new AxChainOfThought(modelInstance, signature, {
|
|
@@ -40810,7 +40709,6 @@ let DspService = class DspService {
|
|
|
40810
40709
|
return result;
|
|
40811
40710
|
}
|
|
40812
40711
|
async react(params, _pinsSettingsList, context) {
|
|
40813
|
-
// const { AxChainOfThought } = await eval(`import('@ax-llm/ax')`);
|
|
40814
40712
|
const { model = context.privates.MODEL_DSP, functions = [], signature, input } = params;
|
|
40815
40713
|
const modelInstance = await executePinsList(model, context);
|
|
40816
40714
|
const gen = new AxReAct(modelInstance, signature, {
|
|
@@ -40820,8 +40718,7 @@ let DspService = class DspService {
|
|
|
40820
40718
|
return result;
|
|
40821
40719
|
}
|
|
40822
40720
|
async agent(params, _pinsSettingsList, context) {
|
|
40823
|
-
|
|
40824
|
-
const { model = context.privates.MODEL_DSP, functions = [], agents = [], name, description, signature } = params;
|
|
40721
|
+
const { model = context.privates.MODEL_DSP, functions = [], agents = [], forward = true, name, description, signature, input } = params;
|
|
40825
40722
|
const modelInstance = await executePinsList(model, context);
|
|
40826
40723
|
const agent = new AxAgent(modelInstance, {
|
|
40827
40724
|
name,
|
|
@@ -40829,19 +40726,19 @@ let DspService = class DspService {
|
|
|
40829
40726
|
signature,
|
|
40830
40727
|
functions: await this.prepareFunctions(functions, context),
|
|
40831
40728
|
agents: await Promise.all(agents.map(async (execute)=>await executePinsList([
|
|
40832
|
-
execute
|
|
40729
|
+
_extends({}, execute, {
|
|
40730
|
+
properties: _extends({}, execute.properties, {
|
|
40731
|
+
forward: false
|
|
40732
|
+
})
|
|
40733
|
+
})
|
|
40833
40734
|
], context)))
|
|
40834
40735
|
});
|
|
40835
|
-
|
|
40836
|
-
|
|
40837
|
-
|
|
40838
|
-
const { agent, input } = params;
|
|
40736
|
+
if (!forward) {
|
|
40737
|
+
return agent;
|
|
40738
|
+
}
|
|
40839
40739
|
const result = await agent.forward(input);
|
|
40840
40740
|
return result;
|
|
40841
40741
|
}
|
|
40842
|
-
async jsInterpreter(_params, _pinsSettingsList, _context) {
|
|
40843
|
-
return new AxJSInterpreter();
|
|
40844
|
-
}
|
|
40845
40742
|
};
|
|
40846
40743
|
const model = (params, pinsSettingsList, context)=>new DspService().model(params, pinsSettingsList, context);
|
|
40847
40744
|
const modelOpenAI = (params, pinsSettingsList, context)=>new DspService().modelOpenAI(params, pinsSettingsList, context);
|
|
@@ -40851,7 +40748,5 @@ const generate = (params, pinsSettingsList, context)=>new DspService().generate(
|
|
|
40851
40748
|
const chainOfThought = (params, pinsSettingsList, context)=>new DspService().chainOfThought(params, pinsSettingsList, context);
|
|
40852
40749
|
const react = (params, pinsSettingsList, context)=>new DspService().react(params, pinsSettingsList, context);
|
|
40853
40750
|
const agent = (params, pinsSettingsList, context)=>new DspService().agent(params, pinsSettingsList, context);
|
|
40854
|
-
const forward = (params, pinsSettingsList, context)=>new DspService().forward(params, pinsSettingsList, context);
|
|
40855
|
-
const jsInterpreter = (params, pinsSettingsList, context)=>new DspService().jsInterpreter(params, pinsSettingsList, context);
|
|
40856
40751
|
|
|
40857
|
-
export { agent, chainOfThought,
|
|
40752
|
+
export { agent, chainOfThought, generate, model, modelAzureOpenAi, modelOllama, modelOpenAI, react };
|