@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.cjs.js
CHANGED
|
@@ -5,12 +5,12 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
|
5
5
|
var path = require('path');
|
|
6
6
|
var web = require('stream/web');
|
|
7
7
|
var _crypto = require('crypto');
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
8
|
+
require('http');
|
|
9
|
+
require('https');
|
|
10
|
+
require('node:fs');
|
|
11
|
+
require('os');
|
|
12
|
+
require('process');
|
|
13
|
+
require('vm');
|
|
14
14
|
|
|
15
15
|
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
|
16
16
|
|
|
@@ -33,12 +33,6 @@ function _interopNamespace(e) {
|
|
|
33
33
|
}
|
|
34
34
|
|
|
35
35
|
var path__default = /*#__PURE__*/_interopDefaultLegacy(path);
|
|
36
|
-
var _crypto__namespace = /*#__PURE__*/_interopNamespace(_crypto);
|
|
37
|
-
var _http__namespace = /*#__PURE__*/_interopNamespace(_http);
|
|
38
|
-
var _https__namespace = /*#__PURE__*/_interopNamespace(_https);
|
|
39
|
-
var _fs__namespace = /*#__PURE__*/_interopNamespace(_fs);
|
|
40
|
-
var _os__namespace = /*#__PURE__*/_interopNamespace(_os);
|
|
41
|
-
var _process__namespace = /*#__PURE__*/_interopNamespace(_process);
|
|
42
36
|
|
|
43
37
|
function _extends() {
|
|
44
38
|
_extends = Object.assign || function assign(target) {
|
|
@@ -8175,7 +8169,7 @@ function _type_of(obj) {
|
|
|
8175
8169
|
}
|
|
8176
8170
|
return self;
|
|
8177
8171
|
}
|
|
8178
|
-
function _class_call_check$
|
|
8172
|
+
function _class_call_check$L(instance, Constructor) {
|
|
8179
8173
|
if (!(instance instanceof Constructor)) {
|
|
8180
8174
|
throw new TypeError("Cannot call a class as a function");
|
|
8181
8175
|
}
|
|
@@ -8290,7 +8284,7 @@ var LuxonError = /*#__PURE__*/ function(Error1) {
|
|
|
8290
8284
|
_inherits$p(LuxonError, Error1);
|
|
8291
8285
|
var _super = _create_super$p(LuxonError);
|
|
8292
8286
|
function LuxonError() {
|
|
8293
|
-
_class_call_check$
|
|
8287
|
+
_class_call_check$L(this, LuxonError);
|
|
8294
8288
|
return _super.apply(this, arguments);
|
|
8295
8289
|
}
|
|
8296
8290
|
return LuxonError;
|
|
@@ -8301,7 +8295,7 @@ var LuxonError = /*#__PURE__*/ function(Error1) {
|
|
|
8301
8295
|
_inherits$p(InvalidDateTimeError, LuxonError);
|
|
8302
8296
|
var _super = _create_super$p(InvalidDateTimeError);
|
|
8303
8297
|
function InvalidDateTimeError(reason) {
|
|
8304
|
-
_class_call_check$
|
|
8298
|
+
_class_call_check$L(this, InvalidDateTimeError);
|
|
8305
8299
|
return _super.call(this, "Invalid DateTime: ".concat(reason.toMessage()));
|
|
8306
8300
|
}
|
|
8307
8301
|
return InvalidDateTimeError;
|
|
@@ -8312,7 +8306,7 @@ var LuxonError = /*#__PURE__*/ function(Error1) {
|
|
|
8312
8306
|
_inherits$p(InvalidIntervalError, LuxonError);
|
|
8313
8307
|
var _super = _create_super$p(InvalidIntervalError);
|
|
8314
8308
|
function InvalidIntervalError(reason) {
|
|
8315
|
-
_class_call_check$
|
|
8309
|
+
_class_call_check$L(this, InvalidIntervalError);
|
|
8316
8310
|
return _super.call(this, "Invalid Interval: ".concat(reason.toMessage()));
|
|
8317
8311
|
}
|
|
8318
8312
|
return InvalidIntervalError;
|
|
@@ -8323,7 +8317,7 @@ var LuxonError = /*#__PURE__*/ function(Error1) {
|
|
|
8323
8317
|
_inherits$p(InvalidDurationError, LuxonError);
|
|
8324
8318
|
var _super = _create_super$p(InvalidDurationError);
|
|
8325
8319
|
function InvalidDurationError(reason) {
|
|
8326
|
-
_class_call_check$
|
|
8320
|
+
_class_call_check$L(this, InvalidDurationError);
|
|
8327
8321
|
return _super.call(this, "Invalid Duration: ".concat(reason.toMessage()));
|
|
8328
8322
|
}
|
|
8329
8323
|
return InvalidDurationError;
|
|
@@ -8334,7 +8328,7 @@ var LuxonError = /*#__PURE__*/ function(Error1) {
|
|
|
8334
8328
|
_inherits$p(ConflictingSpecificationError, LuxonError);
|
|
8335
8329
|
var _super = _create_super$p(ConflictingSpecificationError);
|
|
8336
8330
|
function ConflictingSpecificationError() {
|
|
8337
|
-
_class_call_check$
|
|
8331
|
+
_class_call_check$L(this, ConflictingSpecificationError);
|
|
8338
8332
|
return _super.apply(this, arguments);
|
|
8339
8333
|
}
|
|
8340
8334
|
return ConflictingSpecificationError;
|
|
@@ -8345,7 +8339,7 @@ var LuxonError = /*#__PURE__*/ function(Error1) {
|
|
|
8345
8339
|
_inherits$p(InvalidUnitError, LuxonError);
|
|
8346
8340
|
var _super = _create_super$p(InvalidUnitError);
|
|
8347
8341
|
function InvalidUnitError(unit) {
|
|
8348
|
-
_class_call_check$
|
|
8342
|
+
_class_call_check$L(this, InvalidUnitError);
|
|
8349
8343
|
return _super.call(this, "Invalid unit ".concat(unit));
|
|
8350
8344
|
}
|
|
8351
8345
|
return InvalidUnitError;
|
|
@@ -8356,7 +8350,7 @@ var LuxonError = /*#__PURE__*/ function(Error1) {
|
|
|
8356
8350
|
_inherits$p(InvalidArgumentError, LuxonError);
|
|
8357
8351
|
var _super = _create_super$p(InvalidArgumentError);
|
|
8358
8352
|
function InvalidArgumentError() {
|
|
8359
|
-
_class_call_check$
|
|
8353
|
+
_class_call_check$L(this, InvalidArgumentError);
|
|
8360
8354
|
return _super.apply(this, arguments);
|
|
8361
8355
|
}
|
|
8362
8356
|
return InvalidArgumentError;
|
|
@@ -8367,7 +8361,7 @@ var LuxonError = /*#__PURE__*/ function(Error1) {
|
|
|
8367
8361
|
_inherits$p(ZoneIsAbstractError, LuxonError);
|
|
8368
8362
|
var _super = _create_super$p(ZoneIsAbstractError);
|
|
8369
8363
|
function ZoneIsAbstractError() {
|
|
8370
|
-
_class_call_check$
|
|
8364
|
+
_class_call_check$L(this, ZoneIsAbstractError);
|
|
8371
8365
|
return _super.call(this, "Zone is an abstract class");
|
|
8372
8366
|
}
|
|
8373
8367
|
return ZoneIsAbstractError;
|
|
@@ -8524,12 +8518,12 @@ var DATETIME_HUGE_WITH_SECONDS = {
|
|
|
8524
8518
|
timeZoneName: l
|
|
8525
8519
|
};
|
|
8526
8520
|
|
|
8527
|
-
function _class_call_check$
|
|
8521
|
+
function _class_call_check$K(instance, Constructor) {
|
|
8528
8522
|
if (!(instance instanceof Constructor)) {
|
|
8529
8523
|
throw new TypeError("Cannot call a class as a function");
|
|
8530
8524
|
}
|
|
8531
8525
|
}
|
|
8532
|
-
function _defineProperties$
|
|
8526
|
+
function _defineProperties$x(target, props) {
|
|
8533
8527
|
for(var i = 0; i < props.length; i++){
|
|
8534
8528
|
var descriptor = props[i];
|
|
8535
8529
|
descriptor.enumerable = descriptor.enumerable || false;
|
|
@@ -8538,16 +8532,16 @@ function _defineProperties$y(target, props) {
|
|
|
8538
8532
|
Object.defineProperty(target, descriptor.key, descriptor);
|
|
8539
8533
|
}
|
|
8540
8534
|
}
|
|
8541
|
-
function _create_class$
|
|
8542
|
-
if (protoProps) _defineProperties$
|
|
8543
|
-
if (staticProps) _defineProperties$
|
|
8535
|
+
function _create_class$x(Constructor, protoProps, staticProps) {
|
|
8536
|
+
if (protoProps) _defineProperties$x(Constructor.prototype, protoProps);
|
|
8537
|
+
if (staticProps) _defineProperties$x(Constructor, staticProps);
|
|
8544
8538
|
return Constructor;
|
|
8545
8539
|
}
|
|
8546
8540
|
var Zone = /*#__PURE__*/ function() {
|
|
8547
8541
|
function Zone() {
|
|
8548
|
-
_class_call_check$
|
|
8542
|
+
_class_call_check$K(this, Zone);
|
|
8549
8543
|
}
|
|
8550
|
-
_create_class$
|
|
8544
|
+
_create_class$x(Zone, [
|
|
8551
8545
|
{
|
|
8552
8546
|
key: "type",
|
|
8553
8547
|
get: /**
|
|
@@ -8653,12 +8647,12 @@ function _assert_this_initialized$o(self) {
|
|
|
8653
8647
|
}
|
|
8654
8648
|
return self;
|
|
8655
8649
|
}
|
|
8656
|
-
function _class_call_check$
|
|
8650
|
+
function _class_call_check$J(instance, Constructor) {
|
|
8657
8651
|
if (!(instance instanceof Constructor)) {
|
|
8658
8652
|
throw new TypeError("Cannot call a class as a function");
|
|
8659
8653
|
}
|
|
8660
8654
|
}
|
|
8661
|
-
function _defineProperties$
|
|
8655
|
+
function _defineProperties$w(target, props) {
|
|
8662
8656
|
for(var i = 0; i < props.length; i++){
|
|
8663
8657
|
var descriptor = props[i];
|
|
8664
8658
|
descriptor.enumerable = descriptor.enumerable || false;
|
|
@@ -8667,9 +8661,9 @@ function _defineProperties$x(target, props) {
|
|
|
8667
8661
|
Object.defineProperty(target, descriptor.key, descriptor);
|
|
8668
8662
|
}
|
|
8669
8663
|
}
|
|
8670
|
-
function _create_class$
|
|
8671
|
-
if (protoProps) _defineProperties$
|
|
8672
|
-
if (staticProps) _defineProperties$
|
|
8664
|
+
function _create_class$w(Constructor, protoProps, staticProps) {
|
|
8665
|
+
if (protoProps) _defineProperties$w(Constructor.prototype, protoProps);
|
|
8666
|
+
if (staticProps) _defineProperties$w(Constructor, staticProps);
|
|
8673
8667
|
return Constructor;
|
|
8674
8668
|
}
|
|
8675
8669
|
function _get_prototype_of$o(o) {
|
|
@@ -8737,10 +8731,10 @@ var SystemZone = /*#__PURE__*/ function(Zone) {
|
|
|
8737
8731
|
_inherits$o(SystemZone, Zone);
|
|
8738
8732
|
var _super = _create_super$o(SystemZone);
|
|
8739
8733
|
function SystemZone() {
|
|
8740
|
-
_class_call_check$
|
|
8734
|
+
_class_call_check$J(this, SystemZone);
|
|
8741
8735
|
return _super.apply(this, arguments);
|
|
8742
8736
|
}
|
|
8743
|
-
_create_class$
|
|
8737
|
+
_create_class$w(SystemZone, [
|
|
8744
8738
|
{
|
|
8745
8739
|
key: "type",
|
|
8746
8740
|
get: /** @override **/ function get() {
|
|
@@ -8821,12 +8815,12 @@ function _assert_this_initialized$n(self) {
|
|
|
8821
8815
|
}
|
|
8822
8816
|
return self;
|
|
8823
8817
|
}
|
|
8824
|
-
function _class_call_check$
|
|
8818
|
+
function _class_call_check$I(instance, Constructor) {
|
|
8825
8819
|
if (!(instance instanceof Constructor)) {
|
|
8826
8820
|
throw new TypeError("Cannot call a class as a function");
|
|
8827
8821
|
}
|
|
8828
8822
|
}
|
|
8829
|
-
function _defineProperties$
|
|
8823
|
+
function _defineProperties$v(target, props) {
|
|
8830
8824
|
for(var i = 0; i < props.length; i++){
|
|
8831
8825
|
var descriptor = props[i];
|
|
8832
8826
|
descriptor.enumerable = descriptor.enumerable || false;
|
|
@@ -8835,9 +8829,9 @@ function _defineProperties$w(target, props) {
|
|
|
8835
8829
|
Object.defineProperty(target, descriptor.key, descriptor);
|
|
8836
8830
|
}
|
|
8837
8831
|
}
|
|
8838
|
-
function _create_class$
|
|
8839
|
-
if (protoProps) _defineProperties$
|
|
8840
|
-
if (staticProps) _defineProperties$
|
|
8832
|
+
function _create_class$v(Constructor, protoProps, staticProps) {
|
|
8833
|
+
if (protoProps) _defineProperties$v(Constructor.prototype, protoProps);
|
|
8834
|
+
if (staticProps) _defineProperties$v(Constructor, staticProps);
|
|
8841
8835
|
return Constructor;
|
|
8842
8836
|
}
|
|
8843
8837
|
function _get_prototype_of$n(o) {
|
|
@@ -8995,14 +8989,14 @@ var IANAZone = /*#__PURE__*/ function(Zone) {
|
|
|
8995
8989
|
_inherits$n(IANAZone, Zone);
|
|
8996
8990
|
var _super = _create_super$n(IANAZone);
|
|
8997
8991
|
function IANAZone(name) {
|
|
8998
|
-
_class_call_check$
|
|
8992
|
+
_class_call_check$I(this, IANAZone);
|
|
8999
8993
|
var _this;
|
|
9000
8994
|
_this = _super.call(this);
|
|
9001
8995
|
/** @private **/ _this.zoneName = name;
|
|
9002
8996
|
/** @private **/ _this.valid = IANAZone.isValidZone(name);
|
|
9003
8997
|
return _this;
|
|
9004
8998
|
}
|
|
9005
|
-
_create_class$
|
|
8999
|
+
_create_class$v(IANAZone, [
|
|
9006
9000
|
{
|
|
9007
9001
|
key: "type",
|
|
9008
9002
|
get: /** @override **/ function get() {
|
|
@@ -9144,12 +9138,12 @@ function _array_like_to_array$m(arr, len) {
|
|
|
9144
9138
|
function _array_with_holes$f(arr) {
|
|
9145
9139
|
if (Array.isArray(arr)) return arr;
|
|
9146
9140
|
}
|
|
9147
|
-
function _class_call_check$
|
|
9141
|
+
function _class_call_check$H(instance, Constructor) {
|
|
9148
9142
|
if (!(instance instanceof Constructor)) {
|
|
9149
9143
|
throw new TypeError("Cannot call a class as a function");
|
|
9150
9144
|
}
|
|
9151
9145
|
}
|
|
9152
|
-
function _defineProperties$
|
|
9146
|
+
function _defineProperties$u(target, props) {
|
|
9153
9147
|
for(var i = 0; i < props.length; i++){
|
|
9154
9148
|
var descriptor = props[i];
|
|
9155
9149
|
descriptor.enumerable = descriptor.enumerable || false;
|
|
@@ -9158,12 +9152,12 @@ function _defineProperties$v(target, props) {
|
|
|
9158
9152
|
Object.defineProperty(target, descriptor.key, descriptor);
|
|
9159
9153
|
}
|
|
9160
9154
|
}
|
|
9161
|
-
function _create_class$
|
|
9162
|
-
if (protoProps) _defineProperties$
|
|
9163
|
-
if (staticProps) _defineProperties$
|
|
9155
|
+
function _create_class$u(Constructor, protoProps, staticProps) {
|
|
9156
|
+
if (protoProps) _defineProperties$u(Constructor.prototype, protoProps);
|
|
9157
|
+
if (staticProps) _defineProperties$u(Constructor, staticProps);
|
|
9164
9158
|
return Constructor;
|
|
9165
9159
|
}
|
|
9166
|
-
function _define_property$
|
|
9160
|
+
function _define_property$D(obj, key, value) {
|
|
9167
9161
|
if (key in obj) {
|
|
9168
9162
|
Object.defineProperty(obj, key, {
|
|
9169
9163
|
value: value,
|
|
@@ -9213,7 +9207,7 @@ function _object_spread$q(target) {
|
|
|
9213
9207
|
}));
|
|
9214
9208
|
}
|
|
9215
9209
|
ownKeys.forEach(function(key) {
|
|
9216
|
-
_define_property$
|
|
9210
|
+
_define_property$D(target, key, source[key]);
|
|
9217
9211
|
});
|
|
9218
9212
|
}
|
|
9219
9213
|
return target;
|
|
@@ -9451,7 +9445,7 @@ function supportsFastNumbers(loc) {
|
|
|
9451
9445
|
* @private
|
|
9452
9446
|
*/ var PolyNumberFormatter = /*#__PURE__*/ function() {
|
|
9453
9447
|
function PolyNumberFormatter(intl, forceSimple, opts) {
|
|
9454
|
-
_class_call_check$
|
|
9448
|
+
_class_call_check$H(this, PolyNumberFormatter);
|
|
9455
9449
|
this.padTo = opts.padTo || 0;
|
|
9456
9450
|
this.floor = opts.floor || false;
|
|
9457
9451
|
opts.padTo; opts.floor; var otherOpts = _object_without_properties(opts, [
|
|
@@ -9466,7 +9460,7 @@ function supportsFastNumbers(loc) {
|
|
|
9466
9460
|
this.inf = getCachedINF(intl, intlOpts);
|
|
9467
9461
|
}
|
|
9468
9462
|
}
|
|
9469
|
-
_create_class$
|
|
9463
|
+
_create_class$u(PolyNumberFormatter, [
|
|
9470
9464
|
{
|
|
9471
9465
|
key: "format",
|
|
9472
9466
|
value: function format(i) {
|
|
@@ -9487,7 +9481,7 @@ function supportsFastNumbers(loc) {
|
|
|
9487
9481
|
* @private
|
|
9488
9482
|
*/ var PolyDateFormatter = /*#__PURE__*/ function() {
|
|
9489
9483
|
function PolyDateFormatter(dt, intl, opts) {
|
|
9490
|
-
_class_call_check$
|
|
9484
|
+
_class_call_check$H(this, PolyDateFormatter);
|
|
9491
9485
|
this.opts = opts;
|
|
9492
9486
|
this.originalZone = undefined;
|
|
9493
9487
|
var z = undefined;
|
|
@@ -9533,7 +9527,7 @@ function supportsFastNumbers(loc) {
|
|
|
9533
9527
|
intlOpts.timeZone = intlOpts.timeZone || z;
|
|
9534
9528
|
this.dtf = getCachedDTF(intl, intlOpts);
|
|
9535
9529
|
}
|
|
9536
|
-
_create_class$
|
|
9530
|
+
_create_class$u(PolyDateFormatter, [
|
|
9537
9531
|
{
|
|
9538
9532
|
key: "format",
|
|
9539
9533
|
value: function format() {
|
|
@@ -9584,7 +9578,7 @@ function supportsFastNumbers(loc) {
|
|
|
9584
9578
|
* @private
|
|
9585
9579
|
*/ var PolyRelFormatter = /*#__PURE__*/ function() {
|
|
9586
9580
|
function PolyRelFormatter(intl, isEnglish, opts) {
|
|
9587
|
-
_class_call_check$
|
|
9581
|
+
_class_call_check$H(this, PolyRelFormatter);
|
|
9588
9582
|
this.opts = _object_spread$q({
|
|
9589
9583
|
style: "long"
|
|
9590
9584
|
}, opts);
|
|
@@ -9592,7 +9586,7 @@ function supportsFastNumbers(loc) {
|
|
|
9592
9586
|
this.rtf = getCachedRTF(intl, opts);
|
|
9593
9587
|
}
|
|
9594
9588
|
}
|
|
9595
|
-
_create_class$
|
|
9589
|
+
_create_class$u(PolyRelFormatter, [
|
|
9596
9590
|
{
|
|
9597
9591
|
key: "format",
|
|
9598
9592
|
value: function format(count, unit) {
|
|
@@ -9626,7 +9620,7 @@ var fallbackWeekSettings = {
|
|
|
9626
9620
|
};
|
|
9627
9621
|
var Locale = /*#__PURE__*/ function() {
|
|
9628
9622
|
function Locale(locale, numbering, outputCalendar, weekSettings, specifiedLocale) {
|
|
9629
|
-
_class_call_check$
|
|
9623
|
+
_class_call_check$H(this, Locale);
|
|
9630
9624
|
var _parseLocaleString = _sliced_to_array$f(parseLocaleString(locale), 3), parsedLocale = _parseLocaleString[0], parsedNumberingSystem = _parseLocaleString[1], parsedOutputCalendar = _parseLocaleString[2];
|
|
9631
9625
|
this.locale = parsedLocale;
|
|
9632
9626
|
this.numberingSystem = numbering || parsedNumberingSystem || null;
|
|
@@ -9646,7 +9640,7 @@ var Locale = /*#__PURE__*/ function() {
|
|
|
9646
9640
|
this.specifiedLocale = specifiedLocale;
|
|
9647
9641
|
this.fastNumbersCached = null;
|
|
9648
9642
|
}
|
|
9649
|
-
_create_class$
|
|
9643
|
+
_create_class$u(Locale, [
|
|
9650
9644
|
{
|
|
9651
9645
|
key: "fastNumbers",
|
|
9652
9646
|
get: function get() {
|
|
@@ -9910,12 +9904,12 @@ function _assert_this_initialized$m(self) {
|
|
|
9910
9904
|
}
|
|
9911
9905
|
return self;
|
|
9912
9906
|
}
|
|
9913
|
-
function _class_call_check$
|
|
9907
|
+
function _class_call_check$G(instance, Constructor) {
|
|
9914
9908
|
if (!(instance instanceof Constructor)) {
|
|
9915
9909
|
throw new TypeError("Cannot call a class as a function");
|
|
9916
9910
|
}
|
|
9917
9911
|
}
|
|
9918
|
-
function _defineProperties$
|
|
9912
|
+
function _defineProperties$t(target, props) {
|
|
9919
9913
|
for(var i = 0; i < props.length; i++){
|
|
9920
9914
|
var descriptor = props[i];
|
|
9921
9915
|
descriptor.enumerable = descriptor.enumerable || false;
|
|
@@ -9924,9 +9918,9 @@ function _defineProperties$u(target, props) {
|
|
|
9924
9918
|
Object.defineProperty(target, descriptor.key, descriptor);
|
|
9925
9919
|
}
|
|
9926
9920
|
}
|
|
9927
|
-
function _create_class$
|
|
9928
|
-
if (protoProps) _defineProperties$
|
|
9929
|
-
if (staticProps) _defineProperties$
|
|
9921
|
+
function _create_class$t(Constructor, protoProps, staticProps) {
|
|
9922
|
+
if (protoProps) _defineProperties$t(Constructor.prototype, protoProps);
|
|
9923
|
+
if (staticProps) _defineProperties$t(Constructor, staticProps);
|
|
9930
9924
|
return Constructor;
|
|
9931
9925
|
}
|
|
9932
9926
|
function _get_prototype_of$m(o) {
|
|
@@ -9994,13 +9988,13 @@ var FixedOffsetZone = /*#__PURE__*/ function(Zone) {
|
|
|
9994
9988
|
_inherits$m(FixedOffsetZone, Zone);
|
|
9995
9989
|
var _super = _create_super$m(FixedOffsetZone);
|
|
9996
9990
|
function FixedOffsetZone(offset) {
|
|
9997
|
-
_class_call_check$
|
|
9991
|
+
_class_call_check$G(this, FixedOffsetZone);
|
|
9998
9992
|
var _this;
|
|
9999
9993
|
_this = _super.call(this);
|
|
10000
9994
|
/** @private **/ _this.fixed = offset;
|
|
10001
9995
|
return _this;
|
|
10002
9996
|
}
|
|
10003
|
-
_create_class$
|
|
9997
|
+
_create_class$t(FixedOffsetZone, [
|
|
10004
9998
|
{
|
|
10005
9999
|
key: "type",
|
|
10006
10000
|
get: /** @override **/ function get() {
|
|
@@ -10111,12 +10105,12 @@ function _assert_this_initialized$l(self) {
|
|
|
10111
10105
|
}
|
|
10112
10106
|
return self;
|
|
10113
10107
|
}
|
|
10114
|
-
function _class_call_check$
|
|
10108
|
+
function _class_call_check$F(instance, Constructor) {
|
|
10115
10109
|
if (!(instance instanceof Constructor)) {
|
|
10116
10110
|
throw new TypeError("Cannot call a class as a function");
|
|
10117
10111
|
}
|
|
10118
10112
|
}
|
|
10119
|
-
function _defineProperties$
|
|
10113
|
+
function _defineProperties$s(target, props) {
|
|
10120
10114
|
for(var i = 0; i < props.length; i++){
|
|
10121
10115
|
var descriptor = props[i];
|
|
10122
10116
|
descriptor.enumerable = descriptor.enumerable || false;
|
|
@@ -10125,9 +10119,9 @@ function _defineProperties$t(target, props) {
|
|
|
10125
10119
|
Object.defineProperty(target, descriptor.key, descriptor);
|
|
10126
10120
|
}
|
|
10127
10121
|
}
|
|
10128
|
-
function _create_class$
|
|
10129
|
-
if (protoProps) _defineProperties$
|
|
10130
|
-
if (staticProps) _defineProperties$
|
|
10122
|
+
function _create_class$s(Constructor, protoProps, staticProps) {
|
|
10123
|
+
if (protoProps) _defineProperties$s(Constructor.prototype, protoProps);
|
|
10124
|
+
if (staticProps) _defineProperties$s(Constructor, staticProps);
|
|
10131
10125
|
return Constructor;
|
|
10132
10126
|
}
|
|
10133
10127
|
function _get_prototype_of$l(o) {
|
|
@@ -10194,13 +10188,13 @@ var InvalidZone = /*#__PURE__*/ function(Zone) {
|
|
|
10194
10188
|
_inherits$l(InvalidZone, Zone);
|
|
10195
10189
|
var _super = _create_super$l(InvalidZone);
|
|
10196
10190
|
function InvalidZone(zoneName) {
|
|
10197
|
-
_class_call_check$
|
|
10191
|
+
_class_call_check$F(this, InvalidZone);
|
|
10198
10192
|
var _this;
|
|
10199
10193
|
_this = _super.call(this);
|
|
10200
10194
|
/** @private */ _this.zoneName = zoneName;
|
|
10201
10195
|
return _this;
|
|
10202
10196
|
}
|
|
10203
|
-
_create_class$
|
|
10197
|
+
_create_class$s(InvalidZone, [
|
|
10204
10198
|
{
|
|
10205
10199
|
key: "type",
|
|
10206
10200
|
get: /** @override **/ function get() {
|
|
@@ -10284,12 +10278,12 @@ function normalizeZone(input, defaultZone) {
|
|
|
10284
10278
|
}
|
|
10285
10279
|
}
|
|
10286
10280
|
|
|
10287
|
-
function _class_call_check$
|
|
10281
|
+
function _class_call_check$E(instance, Constructor) {
|
|
10288
10282
|
if (!(instance instanceof Constructor)) {
|
|
10289
10283
|
throw new TypeError("Cannot call a class as a function");
|
|
10290
10284
|
}
|
|
10291
10285
|
}
|
|
10292
|
-
function _defineProperties$
|
|
10286
|
+
function _defineProperties$r(target, props) {
|
|
10293
10287
|
for(var i = 0; i < props.length; i++){
|
|
10294
10288
|
var descriptor = props[i];
|
|
10295
10289
|
descriptor.enumerable = descriptor.enumerable || false;
|
|
@@ -10298,9 +10292,9 @@ function _defineProperties$s(target, props) {
|
|
|
10298
10292
|
Object.defineProperty(target, descriptor.key, descriptor);
|
|
10299
10293
|
}
|
|
10300
10294
|
}
|
|
10301
|
-
function _create_class$
|
|
10302
|
-
if (protoProps) _defineProperties$
|
|
10303
|
-
if (staticProps) _defineProperties$
|
|
10295
|
+
function _create_class$r(Constructor, protoProps, staticProps) {
|
|
10296
|
+
if (protoProps) _defineProperties$r(Constructor.prototype, protoProps);
|
|
10297
|
+
if (staticProps) _defineProperties$r(Constructor, staticProps);
|
|
10304
10298
|
return Constructor;
|
|
10305
10299
|
}
|
|
10306
10300
|
var now = function() {
|
|
@@ -10308,9 +10302,9 @@ var now = function() {
|
|
|
10308
10302
|
}, defaultZone = "system", defaultLocale = null, defaultNumberingSystem = null, defaultOutputCalendar = null, twoDigitCutoffYear = 60, throwOnInvalid, defaultWeekSettings = null;
|
|
10309
10303
|
var Settings = /*#__PURE__*/ function() {
|
|
10310
10304
|
function Settings() {
|
|
10311
|
-
_class_call_check$
|
|
10305
|
+
_class_call_check$E(this, Settings);
|
|
10312
10306
|
}
|
|
10313
|
-
_create_class$
|
|
10307
|
+
_create_class$r(Settings, null, [
|
|
10314
10308
|
{
|
|
10315
10309
|
key: "now",
|
|
10316
10310
|
get: /**
|
|
@@ -10461,12 +10455,12 @@ var Settings = /*#__PURE__*/ function() {
|
|
|
10461
10455
|
return Settings;
|
|
10462
10456
|
}();
|
|
10463
10457
|
|
|
10464
|
-
function _class_call_check$
|
|
10458
|
+
function _class_call_check$D(instance, Constructor) {
|
|
10465
10459
|
if (!(instance instanceof Constructor)) {
|
|
10466
10460
|
throw new TypeError("Cannot call a class as a function");
|
|
10467
10461
|
}
|
|
10468
10462
|
}
|
|
10469
|
-
function _defineProperties$
|
|
10463
|
+
function _defineProperties$q(target, props) {
|
|
10470
10464
|
for(var i = 0; i < props.length; i++){
|
|
10471
10465
|
var descriptor = props[i];
|
|
10472
10466
|
descriptor.enumerable = descriptor.enumerable || false;
|
|
@@ -10475,18 +10469,18 @@ function _defineProperties$r(target, props) {
|
|
|
10475
10469
|
Object.defineProperty(target, descriptor.key, descriptor);
|
|
10476
10470
|
}
|
|
10477
10471
|
}
|
|
10478
|
-
function _create_class$
|
|
10479
|
-
if (protoProps) _defineProperties$
|
|
10480
|
-
if (staticProps) _defineProperties$
|
|
10472
|
+
function _create_class$q(Constructor, protoProps, staticProps) {
|
|
10473
|
+
if (protoProps) _defineProperties$q(Constructor.prototype, protoProps);
|
|
10474
|
+
if (staticProps) _defineProperties$q(Constructor, staticProps);
|
|
10481
10475
|
return Constructor;
|
|
10482
10476
|
}
|
|
10483
10477
|
var Invalid = /*#__PURE__*/ function() {
|
|
10484
10478
|
function Invalid(reason, explanation) {
|
|
10485
|
-
_class_call_check$
|
|
10479
|
+
_class_call_check$D(this, Invalid);
|
|
10486
10480
|
this.reason = reason;
|
|
10487
10481
|
this.explanation = explanation;
|
|
10488
10482
|
}
|
|
10489
|
-
_create_class$
|
|
10483
|
+
_create_class$q(Invalid, [
|
|
10490
10484
|
{
|
|
10491
10485
|
key: "toMessage",
|
|
10492
10486
|
value: function toMessage() {
|
|
@@ -10501,7 +10495,7 @@ var Invalid = /*#__PURE__*/ function() {
|
|
|
10501
10495
|
return Invalid;
|
|
10502
10496
|
}();
|
|
10503
10497
|
|
|
10504
|
-
function _define_property$
|
|
10498
|
+
function _define_property$C(obj, key, value) {
|
|
10505
10499
|
if (key in obj) {
|
|
10506
10500
|
Object.defineProperty(obj, key, {
|
|
10507
10501
|
value: value,
|
|
@@ -10524,7 +10518,7 @@ function _object_spread$p(target) {
|
|
|
10524
10518
|
}));
|
|
10525
10519
|
}
|
|
10526
10520
|
ownKeys.forEach(function(key) {
|
|
10527
|
-
_define_property$
|
|
10521
|
+
_define_property$C(target, key, source[key]);
|
|
10528
10522
|
});
|
|
10529
10523
|
}
|
|
10530
10524
|
return target;
|
|
@@ -10720,7 +10714,7 @@ function hasInvalidTimeData(obj) {
|
|
|
10720
10714
|
This is just a junk drawer, containing anything used across multiple classes.
|
|
10721
10715
|
Because Luxon is small(ish), this should stay small and we won't worry about splitting
|
|
10722
10716
|
it up into, say, parsingUtil.js and basicUtil.js and so on. But they are divided up by feature area.
|
|
10723
|
-
*/ function _define_property$
|
|
10717
|
+
*/ function _define_property$B(obj, key, value) {
|
|
10724
10718
|
if (key in obj) {
|
|
10725
10719
|
Object.defineProperty(obj, key, {
|
|
10726
10720
|
value: value,
|
|
@@ -10743,7 +10737,7 @@ function _object_spread$o(target) {
|
|
|
10743
10737
|
}));
|
|
10744
10738
|
}
|
|
10745
10739
|
ownKeys.forEach(function(key) {
|
|
10746
|
-
_define_property$
|
|
10740
|
+
_define_property$B(target, key, source[key]);
|
|
10747
10741
|
});
|
|
10748
10742
|
}
|
|
10749
10743
|
return target;
|
|
@@ -11272,12 +11266,12 @@ function _array_like_to_array$k(arr, len) {
|
|
|
11272
11266
|
function _array_without_holes$b(arr) {
|
|
11273
11267
|
if (Array.isArray(arr)) return _array_like_to_array$k(arr);
|
|
11274
11268
|
}
|
|
11275
|
-
function _class_call_check$
|
|
11269
|
+
function _class_call_check$C(instance, Constructor) {
|
|
11276
11270
|
if (!(instance instanceof Constructor)) {
|
|
11277
11271
|
throw new TypeError("Cannot call a class as a function");
|
|
11278
11272
|
}
|
|
11279
11273
|
}
|
|
11280
|
-
function _defineProperties$
|
|
11274
|
+
function _defineProperties$p(target, props) {
|
|
11281
11275
|
for(var i = 0; i < props.length; i++){
|
|
11282
11276
|
var descriptor = props[i];
|
|
11283
11277
|
descriptor.enumerable = descriptor.enumerable || false;
|
|
@@ -11286,12 +11280,12 @@ function _defineProperties$q(target, props) {
|
|
|
11286
11280
|
Object.defineProperty(target, descriptor.key, descriptor);
|
|
11287
11281
|
}
|
|
11288
11282
|
}
|
|
11289
|
-
function _create_class$
|
|
11290
|
-
if (protoProps) _defineProperties$
|
|
11291
|
-
if (staticProps) _defineProperties$
|
|
11283
|
+
function _create_class$p(Constructor, protoProps, staticProps) {
|
|
11284
|
+
if (protoProps) _defineProperties$p(Constructor.prototype, protoProps);
|
|
11285
|
+
if (staticProps) _defineProperties$p(Constructor, staticProps);
|
|
11292
11286
|
return Constructor;
|
|
11293
11287
|
}
|
|
11294
|
-
function _define_property$
|
|
11288
|
+
function _define_property$A(obj, key, value) {
|
|
11295
11289
|
if (key in obj) {
|
|
11296
11290
|
Object.defineProperty(obj, key, {
|
|
11297
11291
|
value: value,
|
|
@@ -11320,7 +11314,7 @@ function _object_spread$n(target) {
|
|
|
11320
11314
|
}));
|
|
11321
11315
|
}
|
|
11322
11316
|
ownKeys.forEach(function(key) {
|
|
11323
|
-
_define_property$
|
|
11317
|
+
_define_property$A(target, key, source[key]);
|
|
11324
11318
|
});
|
|
11325
11319
|
}
|
|
11326
11320
|
return target;
|
|
@@ -11388,12 +11382,12 @@ var macroTokenToFormatOpts = {
|
|
|
11388
11382
|
};
|
|
11389
11383
|
var Formatter = /*#__PURE__*/ function() {
|
|
11390
11384
|
function Formatter(locale, formatOpts) {
|
|
11391
|
-
_class_call_check$
|
|
11385
|
+
_class_call_check$C(this, Formatter);
|
|
11392
11386
|
this.opts = formatOpts;
|
|
11393
11387
|
this.loc = locale;
|
|
11394
11388
|
this.systemLoc = null;
|
|
11395
11389
|
}
|
|
11396
|
-
_create_class$
|
|
11390
|
+
_create_class$p(Formatter, [
|
|
11397
11391
|
{
|
|
11398
11392
|
key: "formatWithSystemDefault",
|
|
11399
11393
|
value: function formatWithSystemDefault(dt, opts) {
|
|
@@ -11822,7 +11816,7 @@ function _array_like_to_array$j(arr, len) {
|
|
|
11822
11816
|
function _array_with_holes$e(arr) {
|
|
11823
11817
|
if (Array.isArray(arr)) return arr;
|
|
11824
11818
|
}
|
|
11825
|
-
function _define_property$
|
|
11819
|
+
function _define_property$z(obj, key, value) {
|
|
11826
11820
|
if (key in obj) {
|
|
11827
11821
|
Object.defineProperty(obj, key, {
|
|
11828
11822
|
value: value,
|
|
@@ -11872,7 +11866,7 @@ function _object_spread$m(target) {
|
|
|
11872
11866
|
}));
|
|
11873
11867
|
}
|
|
11874
11868
|
ownKeys.forEach(function(key) {
|
|
11875
|
-
_define_property$
|
|
11869
|
+
_define_property$z(target, key, source[key]);
|
|
11876
11870
|
});
|
|
11877
11871
|
}
|
|
11878
11872
|
return target;
|
|
@@ -12207,12 +12201,12 @@ function _array_like_to_array$i(arr, len) {
|
|
|
12207
12201
|
function _array_with_holes$d(arr) {
|
|
12208
12202
|
if (Array.isArray(arr)) return arr;
|
|
12209
12203
|
}
|
|
12210
|
-
function _class_call_check$
|
|
12204
|
+
function _class_call_check$B(instance, Constructor) {
|
|
12211
12205
|
if (!(instance instanceof Constructor)) {
|
|
12212
12206
|
throw new TypeError("Cannot call a class as a function");
|
|
12213
12207
|
}
|
|
12214
12208
|
}
|
|
12215
|
-
function _defineProperties$
|
|
12209
|
+
function _defineProperties$o(target, props) {
|
|
12216
12210
|
for(var i = 0; i < props.length; i++){
|
|
12217
12211
|
var descriptor = props[i];
|
|
12218
12212
|
descriptor.enumerable = descriptor.enumerable || false;
|
|
@@ -12221,12 +12215,12 @@ function _defineProperties$p(target, props) {
|
|
|
12221
12215
|
Object.defineProperty(target, descriptor.key, descriptor);
|
|
12222
12216
|
}
|
|
12223
12217
|
}
|
|
12224
|
-
function _create_class$
|
|
12225
|
-
if (protoProps) _defineProperties$
|
|
12226
|
-
if (staticProps) _defineProperties$
|
|
12218
|
+
function _create_class$o(Constructor, protoProps, staticProps) {
|
|
12219
|
+
if (protoProps) _defineProperties$o(Constructor.prototype, protoProps);
|
|
12220
|
+
if (staticProps) _defineProperties$o(Constructor, staticProps);
|
|
12227
12221
|
return Constructor;
|
|
12228
12222
|
}
|
|
12229
|
-
function _define_property$
|
|
12223
|
+
function _define_property$y(obj, key, value) {
|
|
12230
12224
|
if (key in obj) {
|
|
12231
12225
|
Object.defineProperty(obj, key, {
|
|
12232
12226
|
value: value,
|
|
@@ -12283,7 +12277,7 @@ function _object_spread$l(target) {
|
|
|
12283
12277
|
}));
|
|
12284
12278
|
}
|
|
12285
12279
|
ownKeys.forEach(function(key) {
|
|
12286
|
-
_define_property$
|
|
12280
|
+
_define_property$y(target, key, source[key]);
|
|
12287
12281
|
});
|
|
12288
12282
|
}
|
|
12289
12283
|
return target;
|
|
@@ -12542,7 +12536,7 @@ function removeZeroes(vals) {
|
|
|
12542
12536
|
}
|
|
12543
12537
|
var Duration = /*#__PURE__*/ function() {
|
|
12544
12538
|
function Duration(config) {
|
|
12545
|
-
_class_call_check$
|
|
12539
|
+
_class_call_check$B(this, Duration);
|
|
12546
12540
|
var accurate = config.conversionAccuracy === "longterm" || false;
|
|
12547
12541
|
var matrix = accurate ? accurateMatrix : casualMatrix;
|
|
12548
12542
|
if (config.matrix) {
|
|
@@ -12567,7 +12561,7 @@ var Duration = /*#__PURE__*/ function() {
|
|
|
12567
12561
|
* @access private
|
|
12568
12562
|
*/ this.isLuxonDuration = true;
|
|
12569
12563
|
}
|
|
12570
|
-
_create_class$
|
|
12564
|
+
_create_class$o(Duration, [
|
|
12571
12565
|
{
|
|
12572
12566
|
key: "locale",
|
|
12573
12567
|
get: /**
|
|
@@ -13439,12 +13433,12 @@ function _array_with_holes$c(arr) {
|
|
|
13439
13433
|
function _array_without_holes$a(arr) {
|
|
13440
13434
|
if (Array.isArray(arr)) return _array_like_to_array$h(arr);
|
|
13441
13435
|
}
|
|
13442
|
-
function _class_call_check$
|
|
13436
|
+
function _class_call_check$A(instance, Constructor) {
|
|
13443
13437
|
if (!(instance instanceof Constructor)) {
|
|
13444
13438
|
throw new TypeError("Cannot call a class as a function");
|
|
13445
13439
|
}
|
|
13446
13440
|
}
|
|
13447
|
-
function _defineProperties$
|
|
13441
|
+
function _defineProperties$n(target, props) {
|
|
13448
13442
|
for(var i = 0; i < props.length; i++){
|
|
13449
13443
|
var descriptor = props[i];
|
|
13450
13444
|
descriptor.enumerable = descriptor.enumerable || false;
|
|
@@ -13453,9 +13447,9 @@ function _defineProperties$o(target, props) {
|
|
|
13453
13447
|
Object.defineProperty(target, descriptor.key, descriptor);
|
|
13454
13448
|
}
|
|
13455
13449
|
}
|
|
13456
|
-
function _create_class$
|
|
13457
|
-
if (protoProps) _defineProperties$
|
|
13458
|
-
if (staticProps) _defineProperties$
|
|
13450
|
+
function _create_class$n(Constructor, protoProps, staticProps) {
|
|
13451
|
+
if (protoProps) _defineProperties$n(Constructor.prototype, protoProps);
|
|
13452
|
+
if (staticProps) _defineProperties$n(Constructor, staticProps);
|
|
13459
13453
|
return Constructor;
|
|
13460
13454
|
}
|
|
13461
13455
|
function _instanceof$9(left, right) {
|
|
@@ -13527,7 +13521,7 @@ function validateStartEnd(start, end) {
|
|
|
13527
13521
|
}
|
|
13528
13522
|
var Interval = /*#__PURE__*/ function() {
|
|
13529
13523
|
function Interval(config) {
|
|
13530
|
-
_class_call_check$
|
|
13524
|
+
_class_call_check$A(this, Interval);
|
|
13531
13525
|
/**
|
|
13532
13526
|
* @access private
|
|
13533
13527
|
*/ this.s = config.start;
|
|
@@ -13541,7 +13535,7 @@ var Interval = /*#__PURE__*/ function() {
|
|
|
13541
13535
|
* @access private
|
|
13542
13536
|
*/ this.isLuxonInterval = true;
|
|
13543
13537
|
}
|
|
13544
|
-
_create_class$
|
|
13538
|
+
_create_class$n(Interval, [
|
|
13545
13539
|
{
|
|
13546
13540
|
key: "start",
|
|
13547
13541
|
get: /**
|
|
@@ -14216,12 +14210,12 @@ var Interval = /*#__PURE__*/ function() {
|
|
|
14216
14210
|
return Interval;
|
|
14217
14211
|
}();
|
|
14218
14212
|
|
|
14219
|
-
function _class_call_check$
|
|
14213
|
+
function _class_call_check$z(instance, Constructor) {
|
|
14220
14214
|
if (!(instance instanceof Constructor)) {
|
|
14221
14215
|
throw new TypeError("Cannot call a class as a function");
|
|
14222
14216
|
}
|
|
14223
14217
|
}
|
|
14224
|
-
function _defineProperties$
|
|
14218
|
+
function _defineProperties$m(target, props) {
|
|
14225
14219
|
for(var i = 0; i < props.length; i++){
|
|
14226
14220
|
var descriptor = props[i];
|
|
14227
14221
|
descriptor.enumerable = descriptor.enumerable || false;
|
|
@@ -14230,16 +14224,16 @@ function _defineProperties$n(target, props) {
|
|
|
14230
14224
|
Object.defineProperty(target, descriptor.key, descriptor);
|
|
14231
14225
|
}
|
|
14232
14226
|
}
|
|
14233
|
-
function _create_class$
|
|
14234
|
-
if (protoProps) _defineProperties$
|
|
14235
|
-
if (staticProps) _defineProperties$
|
|
14227
|
+
function _create_class$m(Constructor, protoProps, staticProps) {
|
|
14228
|
+
if (protoProps) _defineProperties$m(Constructor.prototype, protoProps);
|
|
14229
|
+
if (staticProps) _defineProperties$m(Constructor, staticProps);
|
|
14236
14230
|
return Constructor;
|
|
14237
14231
|
}
|
|
14238
14232
|
var Info = /*#__PURE__*/ function() {
|
|
14239
14233
|
function Info() {
|
|
14240
|
-
_class_call_check$
|
|
14234
|
+
_class_call_check$z(this, Info);
|
|
14241
14235
|
}
|
|
14242
|
-
_create_class$
|
|
14236
|
+
_create_class$m(Info, null, [
|
|
14243
14237
|
{
|
|
14244
14238
|
key: "hasDST",
|
|
14245
14239
|
value: /**
|
|
@@ -14468,7 +14462,7 @@ function _array_with_holes$b(arr) {
|
|
|
14468
14462
|
function _array_without_holes$9(arr) {
|
|
14469
14463
|
if (Array.isArray(arr)) return _array_like_to_array$g(arr);
|
|
14470
14464
|
}
|
|
14471
|
-
function _define_property$
|
|
14465
|
+
function _define_property$x(obj, key, value) {
|
|
14472
14466
|
if (key in obj) {
|
|
14473
14467
|
Object.defineProperty(obj, key, {
|
|
14474
14468
|
value: value,
|
|
@@ -14639,7 +14633,7 @@ function diff(earlier, later, units, opts) {
|
|
|
14639
14633
|
});
|
|
14640
14634
|
if (lowerOrderUnits.length === 0) {
|
|
14641
14635
|
if (highWater < later) {
|
|
14642
|
-
highWater = cursor.plus(_define_property$
|
|
14636
|
+
highWater = cursor.plus(_define_property$x({}, lowestOrder, 1));
|
|
14643
14637
|
}
|
|
14644
14638
|
if (highWater !== cursor) {
|
|
14645
14639
|
results[lowestOrder] = (results[lowestOrder] || 0) + remainingMillis / (highWater - cursor);
|
|
@@ -15373,12 +15367,12 @@ function _array_like_to_array$d(arr, len) {
|
|
|
15373
15367
|
function _array_with_holes$8(arr) {
|
|
15374
15368
|
if (Array.isArray(arr)) return arr;
|
|
15375
15369
|
}
|
|
15376
|
-
function _class_call_check$
|
|
15370
|
+
function _class_call_check$y(instance, Constructor) {
|
|
15377
15371
|
if (!(instance instanceof Constructor)) {
|
|
15378
15372
|
throw new TypeError("Cannot call a class as a function");
|
|
15379
15373
|
}
|
|
15380
15374
|
}
|
|
15381
|
-
function _defineProperties$
|
|
15375
|
+
function _defineProperties$l(target, props) {
|
|
15382
15376
|
for(var i = 0; i < props.length; i++){
|
|
15383
15377
|
var descriptor = props[i];
|
|
15384
15378
|
descriptor.enumerable = descriptor.enumerable || false;
|
|
@@ -15387,12 +15381,12 @@ function _defineProperties$m(target, props) {
|
|
|
15387
15381
|
Object.defineProperty(target, descriptor.key, descriptor);
|
|
15388
15382
|
}
|
|
15389
15383
|
}
|
|
15390
|
-
function _create_class$
|
|
15391
|
-
if (protoProps) _defineProperties$
|
|
15392
|
-
if (staticProps) _defineProperties$
|
|
15384
|
+
function _create_class$l(Constructor, protoProps, staticProps) {
|
|
15385
|
+
if (protoProps) _defineProperties$l(Constructor.prototype, protoProps);
|
|
15386
|
+
if (staticProps) _defineProperties$l(Constructor, staticProps);
|
|
15393
15387
|
return Constructor;
|
|
15394
15388
|
}
|
|
15395
|
-
function _define_property$
|
|
15389
|
+
function _define_property$w(obj, key, value) {
|
|
15396
15390
|
if (key in obj) {
|
|
15397
15391
|
Object.defineProperty(obj, key, {
|
|
15398
15392
|
value: value,
|
|
@@ -15449,7 +15443,7 @@ function _object_spread$k(target) {
|
|
|
15449
15443
|
}));
|
|
15450
15444
|
}
|
|
15451
15445
|
ownKeys.forEach(function(key) {
|
|
15452
|
-
_define_property$
|
|
15446
|
+
_define_property$w(target, key, source[key]);
|
|
15453
15447
|
});
|
|
15454
15448
|
}
|
|
15455
15449
|
return target;
|
|
@@ -15880,7 +15874,7 @@ function lastOpts(argList) {
|
|
|
15880
15874
|
}
|
|
15881
15875
|
var DateTime = /*#__PURE__*/ function() {
|
|
15882
15876
|
function DateTime(config) {
|
|
15883
|
-
_class_call_check$
|
|
15877
|
+
_class_call_check$y(this, DateTime);
|
|
15884
15878
|
var zone = config.zone || Settings.defaultZone;
|
|
15885
15879
|
var invalid = config.invalid || (Number.isNaN(config.ts) ? new Invalid("invalid input") : null) || (!zone.isValid ? unsupportedZone(zone) : null);
|
|
15886
15880
|
/**
|
|
@@ -15928,7 +15922,7 @@ var DateTime = /*#__PURE__*/ function() {
|
|
|
15928
15922
|
* @access private
|
|
15929
15923
|
*/ this.isLuxonDateTime = true;
|
|
15930
15924
|
}
|
|
15931
|
-
_create_class$
|
|
15925
|
+
_create_class$l(DateTime, [
|
|
15932
15926
|
{
|
|
15933
15927
|
// INFO
|
|
15934
15928
|
/**
|
|
@@ -16666,7 +16660,7 @@ var DateTime = /*#__PURE__*/ function() {
|
|
|
16666
16660
|
* @return {DateTime}
|
|
16667
16661
|
*/ key: "endOf",
|
|
16668
16662
|
value: function endOf(unit, opts) {
|
|
16669
|
-
return this.isValid ? this.plus(_define_property$
|
|
16663
|
+
return this.isValid ? this.plus(_define_property$w({}, unit, 1)).startOf(unit, opts).minus(1) : this;
|
|
16670
16664
|
}
|
|
16671
16665
|
},
|
|
16672
16666
|
{
|
|
@@ -17939,12 +17933,12 @@ function _assert_this_initialized$k(self) {
|
|
|
17939
17933
|
}
|
|
17940
17934
|
return self;
|
|
17941
17935
|
}
|
|
17942
|
-
function _class_call_check$
|
|
17936
|
+
function _class_call_check$x(instance, Constructor) {
|
|
17943
17937
|
if (!(instance instanceof Constructor)) {
|
|
17944
17938
|
throw new TypeError("Cannot call a class as a function");
|
|
17945
17939
|
}
|
|
17946
17940
|
}
|
|
17947
|
-
function _defineProperties$
|
|
17941
|
+
function _defineProperties$k(target, props) {
|
|
17948
17942
|
for(var i = 0; i < props.length; i++){
|
|
17949
17943
|
var descriptor = props[i];
|
|
17950
17944
|
descriptor.enumerable = descriptor.enumerable || false;
|
|
@@ -17953,9 +17947,9 @@ function _defineProperties$l(target, props) {
|
|
|
17953
17947
|
Object.defineProperty(target, descriptor.key, descriptor);
|
|
17954
17948
|
}
|
|
17955
17949
|
}
|
|
17956
|
-
function _create_class$
|
|
17957
|
-
if (protoProps) _defineProperties$
|
|
17958
|
-
if (staticProps) _defineProperties$
|
|
17950
|
+
function _create_class$k(Constructor, protoProps, staticProps) {
|
|
17951
|
+
if (protoProps) _defineProperties$k(Constructor.prototype, protoProps);
|
|
17952
|
+
if (staticProps) _defineProperties$k(Constructor, staticProps);
|
|
17959
17953
|
return Constructor;
|
|
17960
17954
|
}
|
|
17961
17955
|
function _get_prototype_of$k(o) {
|
|
@@ -18066,7 +18060,7 @@ function _create_super$k(Derived) {
|
|
|
18066
18060
|
var DefaultBufferLength = 1024;
|
|
18067
18061
|
var nextPropID = 0;
|
|
18068
18062
|
var Range$1 = function Range(from, to) {
|
|
18069
|
-
_class_call_check$
|
|
18063
|
+
_class_call_check$x(this, Range);
|
|
18070
18064
|
this.from = from;
|
|
18071
18065
|
this.to = to;
|
|
18072
18066
|
};
|
|
@@ -18077,14 +18071,14 @@ class represent prop names.
|
|
|
18077
18071
|
*/ var NodeProp = /*#__PURE__*/ function() {
|
|
18078
18072
|
function NodeProp() {
|
|
18079
18073
|
var config = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
|
|
18080
|
-
_class_call_check$
|
|
18074
|
+
_class_call_check$x(this, NodeProp);
|
|
18081
18075
|
this.id = nextPropID++;
|
|
18082
18076
|
this.perNode = !!config.perNode;
|
|
18083
18077
|
this.deserialize = config.deserialize || function() {
|
|
18084
18078
|
throw new Error("This node type doesn't define a deserialize function");
|
|
18085
18079
|
};
|
|
18086
18080
|
}
|
|
18087
|
-
_create_class$
|
|
18081
|
+
_create_class$k(NodeProp, [
|
|
18088
18082
|
{
|
|
18089
18083
|
/**
|
|
18090
18084
|
This is meant to be used with
|
|
@@ -18195,12 +18189,12 @@ represented by another tree.
|
|
|
18195
18189
|
*/ overlay, /**
|
|
18196
18190
|
The parser used to create this subtree.
|
|
18197
18191
|
*/ parser) {
|
|
18198
|
-
_class_call_check$
|
|
18192
|
+
_class_call_check$x(this, MountedTree);
|
|
18199
18193
|
this.tree = tree;
|
|
18200
18194
|
this.overlay = overlay;
|
|
18201
18195
|
this.parser = parser;
|
|
18202
18196
|
}
|
|
18203
|
-
_create_class$
|
|
18197
|
+
_create_class$k(MountedTree, null, [
|
|
18204
18198
|
{
|
|
18205
18199
|
key: "get",
|
|
18206
18200
|
value: /**
|
|
@@ -18230,13 +18224,13 @@ Each node in a syntax tree has a node type associated with it.
|
|
|
18230
18224
|
var /**
|
|
18231
18225
|
@internal
|
|
18232
18226
|
*/ flags = arguments.length > 3 && arguments[3] !== void 0 ? arguments[3] : 0;
|
|
18233
|
-
_class_call_check$
|
|
18227
|
+
_class_call_check$x(this, NodeType);
|
|
18234
18228
|
this.name = name;
|
|
18235
18229
|
this.props = props;
|
|
18236
18230
|
this.id = id;
|
|
18237
18231
|
this.flags = flags;
|
|
18238
18232
|
}
|
|
18239
|
-
_create_class$
|
|
18233
|
+
_create_class$k(NodeType, [
|
|
18240
18234
|
{
|
|
18241
18235
|
/**
|
|
18242
18236
|
Retrieves a node prop for this type. Will return `undefined` if
|
|
@@ -18386,11 +18380,11 @@ types in it, so that the ids fit into 16-bit typed array slots.
|
|
|
18386
18380
|
function NodeSet(/**
|
|
18387
18381
|
The node types in this set, by id.
|
|
18388
18382
|
*/ types) {
|
|
18389
|
-
_class_call_check$
|
|
18383
|
+
_class_call_check$x(this, NodeSet);
|
|
18390
18384
|
this.types = types;
|
|
18391
18385
|
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");
|
|
18392
18386
|
}
|
|
18393
|
-
_create_class$
|
|
18387
|
+
_create_class$k(NodeSet, [
|
|
18394
18388
|
{
|
|
18395
18389
|
/**
|
|
18396
18390
|
Create a copy of this set with some node properties added. The
|
|
@@ -18509,7 +18503,7 @@ move around to adjacent nodes.
|
|
|
18509
18503
|
*/ length, /**
|
|
18510
18504
|
Per-node [node props](#common.NodeProp) to associate with this node.
|
|
18511
18505
|
*/ props) {
|
|
18512
|
-
_class_call_check$
|
|
18506
|
+
_class_call_check$x(this, Tree);
|
|
18513
18507
|
this.type = type;
|
|
18514
18508
|
this.children = children;
|
|
18515
18509
|
this.positions = positions;
|
|
@@ -18541,7 +18535,7 @@ move around to adjacent nodes.
|
|
|
18541
18535
|
}
|
|
18542
18536
|
}
|
|
18543
18537
|
}
|
|
18544
|
-
_create_class$
|
|
18538
|
+
_create_class$k(Tree, [
|
|
18545
18539
|
{
|
|
18546
18540
|
/**
|
|
18547
18541
|
@internal
|
|
@@ -18743,11 +18737,11 @@ The empty tree
|
|
|
18743
18737
|
*/ Tree.empty = new Tree(NodeType.none, [], [], 0);
|
|
18744
18738
|
var FlatBufferCursor = /*#__PURE__*/ function() {
|
|
18745
18739
|
function FlatBufferCursor(buffer, index) {
|
|
18746
|
-
_class_call_check$
|
|
18740
|
+
_class_call_check$x(this, FlatBufferCursor);
|
|
18747
18741
|
this.buffer = buffer;
|
|
18748
18742
|
this.index = index;
|
|
18749
18743
|
}
|
|
18750
|
-
_create_class$
|
|
18744
|
+
_create_class$k(FlatBufferCursor, [
|
|
18751
18745
|
{
|
|
18752
18746
|
key: "id",
|
|
18753
18747
|
get: function get() {
|
|
@@ -18806,12 +18800,12 @@ children belong to it).
|
|
|
18806
18800
|
*/ length, /**
|
|
18807
18801
|
The node set used in this buffer.
|
|
18808
18802
|
*/ set) {
|
|
18809
|
-
_class_call_check$
|
|
18803
|
+
_class_call_check$x(this, TreeBuffer);
|
|
18810
18804
|
this.buffer = buffer;
|
|
18811
18805
|
this.length = length;
|
|
18812
18806
|
this.set = set;
|
|
18813
18807
|
}
|
|
18814
|
-
_create_class$
|
|
18808
|
+
_create_class$k(TreeBuffer, [
|
|
18815
18809
|
{
|
|
18816
18810
|
key: "type",
|
|
18817
18811
|
get: /**
|
|
@@ -18923,9 +18917,9 @@ function resolveNode(node, pos, side, overlays) {
|
|
|
18923
18917
|
}
|
|
18924
18918
|
var BaseNode = /*#__PURE__*/ function() {
|
|
18925
18919
|
function BaseNode() {
|
|
18926
|
-
_class_call_check$
|
|
18920
|
+
_class_call_check$x(this, BaseNode);
|
|
18927
18921
|
}
|
|
18928
|
-
_create_class$
|
|
18922
|
+
_create_class$k(BaseNode, [
|
|
18929
18923
|
{
|
|
18930
18924
|
key: "cursor",
|
|
18931
18925
|
value: function cursor() {
|
|
@@ -19005,7 +18999,7 @@ var TreeNode = /*#__PURE__*/ function(BaseNode) {
|
|
|
19005
18999
|
var _super = _create_super$k(TreeNode);
|
|
19006
19000
|
function TreeNode(_tree, from, // Index in parent node, set to -1 if the node is not a direct child of _parent.node (overlay)
|
|
19007
19001
|
index, _parent) {
|
|
19008
|
-
_class_call_check$
|
|
19002
|
+
_class_call_check$x(this, TreeNode);
|
|
19009
19003
|
var _this;
|
|
19010
19004
|
_this = _super.call(this);
|
|
19011
19005
|
_this._tree = _tree;
|
|
@@ -19014,7 +19008,7 @@ var TreeNode = /*#__PURE__*/ function(BaseNode) {
|
|
|
19014
19008
|
_this._parent = _parent;
|
|
19015
19009
|
return _this;
|
|
19016
19010
|
}
|
|
19017
|
-
_create_class$
|
|
19011
|
+
_create_class$k(TreeNode, [
|
|
19018
19012
|
{
|
|
19019
19013
|
key: "type",
|
|
19020
19014
|
get: function get() {
|
|
@@ -19189,7 +19183,7 @@ function matchNodeContext(node, context) {
|
|
|
19189
19183
|
return true;
|
|
19190
19184
|
}
|
|
19191
19185
|
var BufferContext = function BufferContext(parent, buffer, index, start) {
|
|
19192
|
-
_class_call_check$
|
|
19186
|
+
_class_call_check$x(this, BufferContext);
|
|
19193
19187
|
this.parent = parent;
|
|
19194
19188
|
this.buffer = buffer;
|
|
19195
19189
|
this.index = index;
|
|
@@ -19199,7 +19193,7 @@ var BufferNode = /*#__PURE__*/ function(BaseNode) {
|
|
|
19199
19193
|
_inherits$k(BufferNode, BaseNode);
|
|
19200
19194
|
var _super = _create_super$k(BufferNode);
|
|
19201
19195
|
function BufferNode(context, _parent, index) {
|
|
19202
|
-
_class_call_check$
|
|
19196
|
+
_class_call_check$x(this, BufferNode);
|
|
19203
19197
|
var _this;
|
|
19204
19198
|
_this = _super.call(this);
|
|
19205
19199
|
_this.context = context;
|
|
@@ -19208,7 +19202,7 @@ var BufferNode = /*#__PURE__*/ function(BaseNode) {
|
|
|
19208
19202
|
_this.type = context.buffer.set.types[context.buffer.buffer[index]];
|
|
19209
19203
|
return _this;
|
|
19210
19204
|
}
|
|
19211
|
-
_create_class$
|
|
19205
|
+
_create_class$k(BufferNode, [
|
|
19212
19206
|
{
|
|
19213
19207
|
key: "name",
|
|
19214
19208
|
get: function get() {
|
|
@@ -19348,11 +19342,11 @@ function iterStack(heads) {
|
|
|
19348
19342
|
}
|
|
19349
19343
|
var StackIterator = /*#__PURE__*/ function() {
|
|
19350
19344
|
function StackIterator(heads, node) {
|
|
19351
|
-
_class_call_check$
|
|
19345
|
+
_class_call_check$x(this, StackIterator);
|
|
19352
19346
|
this.heads = heads;
|
|
19353
19347
|
this.node = node;
|
|
19354
19348
|
}
|
|
19355
|
-
_create_class$
|
|
19349
|
+
_create_class$k(StackIterator, [
|
|
19356
19350
|
{
|
|
19357
19351
|
key: "next",
|
|
19358
19352
|
get: function get() {
|
|
@@ -19392,7 +19386,7 @@ allows you to move to adjacent nodes.
|
|
|
19392
19386
|
var /**
|
|
19393
19387
|
@internal
|
|
19394
19388
|
*/ mode = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : 0;
|
|
19395
|
-
_class_call_check$
|
|
19389
|
+
_class_call_check$x(this, TreeCursor);
|
|
19396
19390
|
this.mode = mode;
|
|
19397
19391
|
/**
|
|
19398
19392
|
@internal
|
|
@@ -19412,7 +19406,7 @@ allows you to move to adjacent nodes.
|
|
|
19412
19406
|
this.yieldBuf(node.index);
|
|
19413
19407
|
}
|
|
19414
19408
|
}
|
|
19415
|
-
_create_class$
|
|
19409
|
+
_create_class$k(TreeCursor, [
|
|
19416
19410
|
{
|
|
19417
19411
|
key: "name",
|
|
19418
19412
|
get: /**
|
|
@@ -20032,9 +20026,9 @@ mkTree) {
|
|
|
20032
20026
|
A superclass that parsers should extend.
|
|
20033
20027
|
*/ var Parser = /*#__PURE__*/ function() {
|
|
20034
20028
|
function Parser() {
|
|
20035
|
-
_class_call_check$
|
|
20029
|
+
_class_call_check$x(this, Parser);
|
|
20036
20030
|
}
|
|
20037
|
-
_create_class$
|
|
20031
|
+
_create_class$k(Parser, [
|
|
20038
20032
|
{
|
|
20039
20033
|
/**
|
|
20040
20034
|
Start a parse, returning a [partial parse](#common.PartialParse)
|
|
@@ -20075,10 +20069,10 @@ A superclass that parsers should extend.
|
|
|
20075
20069
|
}();
|
|
20076
20070
|
var StringInput = /*#__PURE__*/ function() {
|
|
20077
20071
|
function StringInput(string) {
|
|
20078
|
-
_class_call_check$
|
|
20072
|
+
_class_call_check$x(this, StringInput);
|
|
20079
20073
|
this.string = string;
|
|
20080
20074
|
}
|
|
20081
|
-
_create_class$
|
|
20075
|
+
_create_class$k(StringInput, [
|
|
20082
20076
|
{
|
|
20083
20077
|
key: "length",
|
|
20084
20078
|
get: function get() {
|
|
@@ -20127,12 +20121,12 @@ function _assert_this_initialized$j(self) {
|
|
|
20127
20121
|
}
|
|
20128
20122
|
return self;
|
|
20129
20123
|
}
|
|
20130
|
-
function _class_call_check$
|
|
20124
|
+
function _class_call_check$w(instance, Constructor) {
|
|
20131
20125
|
if (!(instance instanceof Constructor)) {
|
|
20132
20126
|
throw new TypeError("Cannot call a class as a function");
|
|
20133
20127
|
}
|
|
20134
20128
|
}
|
|
20135
|
-
function _defineProperties$
|
|
20129
|
+
function _defineProperties$j(target, props) {
|
|
20136
20130
|
for(var i = 0; i < props.length; i++){
|
|
20137
20131
|
var descriptor = props[i];
|
|
20138
20132
|
descriptor.enumerable = descriptor.enumerable || false;
|
|
@@ -20141,9 +20135,9 @@ function _defineProperties$k(target, props) {
|
|
|
20141
20135
|
Object.defineProperty(target, descriptor.key, descriptor);
|
|
20142
20136
|
}
|
|
20143
20137
|
}
|
|
20144
|
-
function _create_class$
|
|
20145
|
-
if (protoProps) _defineProperties$
|
|
20146
|
-
if (staticProps) _defineProperties$
|
|
20138
|
+
function _create_class$j(Constructor, protoProps, staticProps) {
|
|
20139
|
+
if (protoProps) _defineProperties$j(Constructor.prototype, protoProps);
|
|
20140
|
+
if (staticProps) _defineProperties$j(Constructor, staticProps);
|
|
20147
20141
|
return Constructor;
|
|
20148
20142
|
}
|
|
20149
20143
|
function _get_prototype_of$j(o) {
|
|
@@ -20309,7 +20303,7 @@ about the parse state.
|
|
|
20309
20303
|
/**
|
|
20310
20304
|
@internal
|
|
20311
20305
|
*/ parent = arguments.length > 10 ? arguments[10] : void 0;
|
|
20312
|
-
_class_call_check$
|
|
20306
|
+
_class_call_check$w(this, Stack);
|
|
20313
20307
|
this.p = p;
|
|
20314
20308
|
this.stack = stack;
|
|
20315
20309
|
this.state = state;
|
|
@@ -20322,7 +20316,7 @@ about the parse state.
|
|
|
20322
20316
|
this.lookAhead = lookAhead;
|
|
20323
20317
|
this.parent = parent;
|
|
20324
20318
|
}
|
|
20325
|
-
_create_class$
|
|
20319
|
+
_create_class$j(Stack, [
|
|
20326
20320
|
{
|
|
20327
20321
|
/**
|
|
20328
20322
|
@internal
|
|
@@ -20788,7 +20782,7 @@ about the parse state.
|
|
|
20788
20782
|
return Stack;
|
|
20789
20783
|
}();
|
|
20790
20784
|
var StackContext = function StackContext(tracker, context) {
|
|
20791
|
-
_class_call_check$
|
|
20785
|
+
_class_call_check$w(this, StackContext);
|
|
20792
20786
|
this.tracker = tracker;
|
|
20793
20787
|
this.context = context;
|
|
20794
20788
|
this.hash = tracker.strict ? tracker.hash(context) : 0;
|
|
@@ -20797,13 +20791,13 @@ var StackContext = function StackContext(tracker, context) {
|
|
|
20797
20791
|
// an entire stack
|
|
20798
20792
|
var SimulatedStack = /*#__PURE__*/ function() {
|
|
20799
20793
|
function SimulatedStack(start) {
|
|
20800
|
-
_class_call_check$
|
|
20794
|
+
_class_call_check$w(this, SimulatedStack);
|
|
20801
20795
|
this.start = start;
|
|
20802
20796
|
this.state = start.state;
|
|
20803
20797
|
this.stack = start.stack;
|
|
20804
20798
|
this.base = this.stack.length;
|
|
20805
20799
|
}
|
|
20806
|
-
_create_class$
|
|
20800
|
+
_create_class$j(SimulatedStack, [
|
|
20807
20801
|
{
|
|
20808
20802
|
key: "reduce",
|
|
20809
20803
|
value: function reduce(action) {
|
|
@@ -20826,14 +20820,14 @@ var SimulatedStack = /*#__PURE__*/ function() {
|
|
|
20826
20820
|
// the parent-stack-walking necessary to read the nodes.
|
|
20827
20821
|
var StackBufferCursor = /*#__PURE__*/ function() {
|
|
20828
20822
|
function StackBufferCursor(stack, pos, index) {
|
|
20829
|
-
_class_call_check$
|
|
20823
|
+
_class_call_check$w(this, StackBufferCursor);
|
|
20830
20824
|
this.stack = stack;
|
|
20831
20825
|
this.pos = pos;
|
|
20832
20826
|
this.index = index;
|
|
20833
20827
|
this.buffer = stack.buffer;
|
|
20834
20828
|
if (this.index == 0) this.maybeNext();
|
|
20835
20829
|
}
|
|
20836
|
-
_create_class$
|
|
20830
|
+
_create_class$j(StackBufferCursor, [
|
|
20837
20831
|
{
|
|
20838
20832
|
key: "maybeNext",
|
|
20839
20833
|
value: function maybeNext() {
|
|
@@ -20925,7 +20919,7 @@ function decodeArray(input) {
|
|
|
20925
20919
|
return array;
|
|
20926
20920
|
}
|
|
20927
20921
|
var CachedToken = function CachedToken() {
|
|
20928
|
-
_class_call_check$
|
|
20922
|
+
_class_call_check$w(this, CachedToken);
|
|
20929
20923
|
this.start = -1;
|
|
20930
20924
|
this.value = -1;
|
|
20931
20925
|
this.end = -1;
|
|
@@ -20946,7 +20940,7 @@ characters, tracking lookahead and hiding the complexity of
|
|
|
20946
20940
|
*/ input, /**
|
|
20947
20941
|
@internal
|
|
20948
20942
|
*/ ranges) {
|
|
20949
|
-
_class_call_check$
|
|
20943
|
+
_class_call_check$w(this, InputStream);
|
|
20950
20944
|
this.input = input;
|
|
20951
20945
|
this.ranges = ranges;
|
|
20952
20946
|
/**
|
|
@@ -20972,7 +20966,7 @@ characters, tracking lookahead and hiding the complexity of
|
|
|
20972
20966
|
this.end = ranges[ranges.length - 1].to;
|
|
20973
20967
|
this.readNext();
|
|
20974
20968
|
}
|
|
20975
|
-
_create_class$
|
|
20969
|
+
_create_class$j(InputStream, [
|
|
20976
20970
|
{
|
|
20977
20971
|
/**
|
|
20978
20972
|
@internal
|
|
@@ -21213,11 +21207,11 @@ characters, tracking lookahead and hiding the complexity of
|
|
|
21213
21207
|
@internal
|
|
21214
21208
|
*/ var TokenGroup = /*#__PURE__*/ function() {
|
|
21215
21209
|
function TokenGroup(data, id) {
|
|
21216
|
-
_class_call_check$
|
|
21210
|
+
_class_call_check$w(this, TokenGroup);
|
|
21217
21211
|
this.data = data;
|
|
21218
21212
|
this.id = id;
|
|
21219
21213
|
}
|
|
21220
|
-
_create_class$
|
|
21214
|
+
_create_class$j(TokenGroup, [
|
|
21221
21215
|
{
|
|
21222
21216
|
key: "token",
|
|
21223
21217
|
value: function token(input, stack) {
|
|
@@ -21237,7 +21231,7 @@ an instance of this class.
|
|
|
21237
21231
|
@internal
|
|
21238
21232
|
*/ token) {
|
|
21239
21233
|
var options = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
|
|
21240
|
-
_class_call_check$
|
|
21234
|
+
_class_call_check$w(this, ExternalTokenizer);
|
|
21241
21235
|
this.token = token;
|
|
21242
21236
|
this.contextual = !!options.contextual;
|
|
21243
21237
|
this.fallback = !!options.fallback;
|
|
@@ -21324,7 +21318,7 @@ function cutAt(tree, pos, side) {
|
|
|
21324
21318
|
}
|
|
21325
21319
|
var FragmentCursor = /*#__PURE__*/ function() {
|
|
21326
21320
|
function FragmentCursor(fragments, nodeSet) {
|
|
21327
|
-
_class_call_check$
|
|
21321
|
+
_class_call_check$w(this, FragmentCursor);
|
|
21328
21322
|
this.fragments = fragments;
|
|
21329
21323
|
this.nodeSet = nodeSet;
|
|
21330
21324
|
this.i = 0;
|
|
@@ -21336,7 +21330,7 @@ var FragmentCursor = /*#__PURE__*/ function() {
|
|
|
21336
21330
|
this.index = [];
|
|
21337
21331
|
this.nextFragment();
|
|
21338
21332
|
}
|
|
21339
|
-
_create_class$
|
|
21333
|
+
_create_class$j(FragmentCursor, [
|
|
21340
21334
|
{
|
|
21341
21335
|
key: "nextFragment",
|
|
21342
21336
|
value: function nextFragment() {
|
|
@@ -21411,7 +21405,7 @@ var FragmentCursor = /*#__PURE__*/ function() {
|
|
|
21411
21405
|
}();
|
|
21412
21406
|
var TokenCache = /*#__PURE__*/ function() {
|
|
21413
21407
|
function TokenCache(parser, stream) {
|
|
21414
|
-
_class_call_check$
|
|
21408
|
+
_class_call_check$w(this, TokenCache);
|
|
21415
21409
|
this.stream = stream;
|
|
21416
21410
|
this.tokens = [];
|
|
21417
21411
|
this.mainToken = null;
|
|
@@ -21420,7 +21414,7 @@ var TokenCache = /*#__PURE__*/ function() {
|
|
|
21420
21414
|
return new CachedToken;
|
|
21421
21415
|
});
|
|
21422
21416
|
}
|
|
21423
|
-
_create_class$
|
|
21417
|
+
_create_class$j(TokenCache, [
|
|
21424
21418
|
{
|
|
21425
21419
|
key: "getActions",
|
|
21426
21420
|
value: function getActions(stack) {
|
|
@@ -21530,7 +21524,7 @@ var TokenCache = /*#__PURE__*/ function() {
|
|
|
21530
21524
|
}();
|
|
21531
21525
|
var Parse = /*#__PURE__*/ function() {
|
|
21532
21526
|
function Parse(parser, input, fragments, ranges) {
|
|
21533
|
-
_class_call_check$
|
|
21527
|
+
_class_call_check$w(this, Parse);
|
|
21534
21528
|
this.parser = parser;
|
|
21535
21529
|
this.input = input;
|
|
21536
21530
|
this.ranges = ranges;
|
|
@@ -21551,7 +21545,7 @@ var Parse = /*#__PURE__*/ function() {
|
|
|
21551
21545
|
];
|
|
21552
21546
|
this.fragments = fragments.length && this.stream.end - from > parser.bufferLength * 4 ? new FragmentCursor(fragments, parser.nodeSet) : null;
|
|
21553
21547
|
}
|
|
21554
|
-
_create_class$
|
|
21548
|
+
_create_class$j(Parse, [
|
|
21555
21549
|
{
|
|
21556
21550
|
key: "parsedPos",
|
|
21557
21551
|
get: function get() {
|
|
@@ -21831,12 +21825,12 @@ function pushStackDedup(stack, newStacks) {
|
|
|
21831
21825
|
}
|
|
21832
21826
|
var Dialect = /*#__PURE__*/ function() {
|
|
21833
21827
|
function Dialect(source, flags, disabled) {
|
|
21834
|
-
_class_call_check$
|
|
21828
|
+
_class_call_check$w(this, Dialect);
|
|
21835
21829
|
this.source = source;
|
|
21836
21830
|
this.flags = flags;
|
|
21837
21831
|
this.disabled = disabled;
|
|
21838
21832
|
}
|
|
21839
|
-
_create_class$
|
|
21833
|
+
_create_class$j(Dialect, [
|
|
21840
21834
|
{
|
|
21841
21835
|
key: "allows",
|
|
21842
21836
|
value: function allows(term) {
|
|
@@ -21861,7 +21855,7 @@ on shift or reduce actions.
|
|
|
21861
21855
|
The export used in a `@context` declaration should be of this
|
|
21862
21856
|
type.
|
|
21863
21857
|
*/ var ContextTracker = function ContextTracker(spec) {
|
|
21864
|
-
_class_call_check$
|
|
21858
|
+
_class_call_check$w(this, ContextTracker);
|
|
21865
21859
|
this.start = spec.start;
|
|
21866
21860
|
this.shift = spec.shift || id;
|
|
21867
21861
|
this.reduce = spec.reduce || id;
|
|
@@ -21880,7 +21874,7 @@ content with.
|
|
|
21880
21874
|
var _super = _create_super$j(LRParser);
|
|
21881
21875
|
function LRParser(spec) {
|
|
21882
21876
|
var _this_nodeSet;
|
|
21883
|
-
_class_call_check$
|
|
21877
|
+
_class_call_check$w(this, LRParser);
|
|
21884
21878
|
var _this;
|
|
21885
21879
|
var setProp = function setProp(nodeID, prop, value) {
|
|
21886
21880
|
nodeProps[nodeID].push([
|
|
@@ -21968,7 +21962,7 @@ content with.
|
|
|
21968
21962
|
_this.top = _this.topRules[Object.keys(_this.topRules)[0]];
|
|
21969
21963
|
return _this;
|
|
21970
21964
|
}
|
|
21971
|
-
_create_class$
|
|
21965
|
+
_create_class$j(LRParser, [
|
|
21972
21966
|
{
|
|
21973
21967
|
key: "createParse",
|
|
21974
21968
|
value: function createParse(input, fragments, ranges) {
|
|
@@ -22280,12 +22274,12 @@ function getSpecializer(spec) {
|
|
|
22280
22274
|
return spec.get;
|
|
22281
22275
|
}
|
|
22282
22276
|
|
|
22283
|
-
function _class_call_check$
|
|
22277
|
+
function _class_call_check$v(instance, Constructor) {
|
|
22284
22278
|
if (!(instance instanceof Constructor)) {
|
|
22285
22279
|
throw new TypeError("Cannot call a class as a function");
|
|
22286
22280
|
}
|
|
22287
22281
|
}
|
|
22288
|
-
function _defineProperties$
|
|
22282
|
+
function _defineProperties$i(target, props) {
|
|
22289
22283
|
for(var i = 0; i < props.length; i++){
|
|
22290
22284
|
var descriptor = props[i];
|
|
22291
22285
|
descriptor.enumerable = descriptor.enumerable || false;
|
|
@@ -22294,9 +22288,9 @@ function _defineProperties$j(target, props) {
|
|
|
22294
22288
|
Object.defineProperty(target, descriptor.key, descriptor);
|
|
22295
22289
|
}
|
|
22296
22290
|
}
|
|
22297
|
-
function _create_class$
|
|
22298
|
-
if (protoProps) _defineProperties$
|
|
22299
|
-
if (staticProps) _defineProperties$
|
|
22291
|
+
function _create_class$i(Constructor, protoProps, staticProps) {
|
|
22292
|
+
if (protoProps) _defineProperties$i(Constructor.prototype, protoProps);
|
|
22293
|
+
if (staticProps) _defineProperties$i(Constructor, staticProps);
|
|
22300
22294
|
return Constructor;
|
|
22301
22295
|
}
|
|
22302
22296
|
var nextTagID = 0;
|
|
@@ -22328,7 +22322,7 @@ from standard tags to allow highlighters to fall back to those).
|
|
|
22328
22322
|
*/ base, /**
|
|
22329
22323
|
The modifiers applied to this.base @internal
|
|
22330
22324
|
*/ modified) {
|
|
22331
|
-
_class_call_check$
|
|
22325
|
+
_class_call_check$v(this, Tag);
|
|
22332
22326
|
this.set = set;
|
|
22333
22327
|
this.base = base;
|
|
22334
22328
|
this.modified = modified;
|
|
@@ -22336,7 +22330,7 @@ from standard tags to allow highlighters to fall back to those).
|
|
|
22336
22330
|
@internal
|
|
22337
22331
|
*/ this.id = nextTagID++;
|
|
22338
22332
|
}
|
|
22339
|
-
_create_class$
|
|
22333
|
+
_create_class$i(Tag, null, [
|
|
22340
22334
|
{
|
|
22341
22335
|
key: "define",
|
|
22342
22336
|
value: /**
|
|
@@ -22401,11 +22395,11 @@ from standard tags to allow highlighters to fall back to those).
|
|
|
22401
22395
|
var nextModifierID = 0;
|
|
22402
22396
|
var Modifier = /*#__PURE__*/ function() {
|
|
22403
22397
|
function Modifier() {
|
|
22404
|
-
_class_call_check$
|
|
22398
|
+
_class_call_check$v(this, Modifier);
|
|
22405
22399
|
this.instances = [];
|
|
22406
22400
|
this.id = nextModifierID++;
|
|
22407
22401
|
}
|
|
22408
|
-
_create_class$
|
|
22402
|
+
_create_class$i(Modifier, null, [
|
|
22409
22403
|
{
|
|
22410
22404
|
key: "get",
|
|
22411
22405
|
value: function get(base, mods) {
|
|
@@ -22605,13 +22599,13 @@ parser.withProps(
|
|
|
22605
22599
|
var ruleNodeProp = new NodeProp();
|
|
22606
22600
|
var Rule = /*#__PURE__*/ function() {
|
|
22607
22601
|
function Rule(tags, mode, context, next) {
|
|
22608
|
-
_class_call_check$
|
|
22602
|
+
_class_call_check$v(this, Rule);
|
|
22609
22603
|
this.tags = tags;
|
|
22610
22604
|
this.mode = mode;
|
|
22611
22605
|
this.context = context;
|
|
22612
22606
|
this.next = next;
|
|
22613
22607
|
}
|
|
22614
|
-
_create_class$
|
|
22608
|
+
_create_class$i(Rule, [
|
|
22615
22609
|
{
|
|
22616
22610
|
key: "opaque",
|
|
22617
22611
|
get: function get() {
|
|
@@ -23231,12 +23225,12 @@ function _array_with_holes$5(arr) {
|
|
|
23231
23225
|
function _array_without_holes$6(arr) {
|
|
23232
23226
|
if (Array.isArray(arr)) return _array_like_to_array$a(arr);
|
|
23233
23227
|
}
|
|
23234
|
-
function _class_call_check$
|
|
23228
|
+
function _class_call_check$u(instance, Constructor) {
|
|
23235
23229
|
if (!(instance instanceof Constructor)) {
|
|
23236
23230
|
throw new TypeError("Cannot call a class as a function");
|
|
23237
23231
|
}
|
|
23238
23232
|
}
|
|
23239
|
-
function _defineProperties$
|
|
23233
|
+
function _defineProperties$h(target, props) {
|
|
23240
23234
|
for(var i = 0; i < props.length; i++){
|
|
23241
23235
|
var descriptor = props[i];
|
|
23242
23236
|
descriptor.enumerable = descriptor.enumerable || false;
|
|
@@ -23245,12 +23239,12 @@ function _defineProperties$i(target, props) {
|
|
|
23245
23239
|
Object.defineProperty(target, descriptor.key, descriptor);
|
|
23246
23240
|
}
|
|
23247
23241
|
}
|
|
23248
|
-
function _create_class$
|
|
23249
|
-
if (protoProps) _defineProperties$
|
|
23250
|
-
if (staticProps) _defineProperties$
|
|
23242
|
+
function _create_class$h(Constructor, protoProps, staticProps) {
|
|
23243
|
+
if (protoProps) _defineProperties$h(Constructor.prototype, protoProps);
|
|
23244
|
+
if (staticProps) _defineProperties$h(Constructor, staticProps);
|
|
23251
23245
|
return Constructor;
|
|
23252
23246
|
}
|
|
23253
|
-
function _define_property$
|
|
23247
|
+
function _define_property$v(obj, key, value) {
|
|
23254
23248
|
if (key in obj) {
|
|
23255
23249
|
Object.defineProperty(obj, key, {
|
|
23256
23250
|
value: value,
|
|
@@ -23313,7 +23307,7 @@ function _object_spread$j(target) {
|
|
|
23313
23307
|
}));
|
|
23314
23308
|
}
|
|
23315
23309
|
ownKeys.forEach(function(key) {
|
|
23316
|
-
_define_property$
|
|
23310
|
+
_define_property$v(target, key, source[key]);
|
|
23317
23311
|
});
|
|
23318
23312
|
}
|
|
23319
23313
|
return target;
|
|
@@ -23530,14 +23524,14 @@ function indent(str, spaces) {
|
|
|
23530
23524
|
var match = parseIdentifier(input, i1, namePart) || namePart && parseAdditionalSymbol(input, i1) || maybeSpace && parseSpaces(input, i1);
|
|
23531
23525
|
// match is required
|
|
23532
23526
|
if (!match) {
|
|
23533
|
-
return
|
|
23527
|
+
return tokens = tokens1, nextMatch = nextMatch1, i = i1, {
|
|
23534
23528
|
v: nextMatch1
|
|
23535
23529
|
};
|
|
23536
23530
|
}
|
|
23537
23531
|
var token = match.token, offset = match.offset;
|
|
23538
23532
|
i1 += offset;
|
|
23539
23533
|
if (token === " ") {
|
|
23540
|
-
return
|
|
23534
|
+
return tokens = tokens1, nextMatch = nextMatch1, i = i1, "continue";
|
|
23541
23535
|
}
|
|
23542
23536
|
tokens1 = _to_consumable_array$6(tokens1).concat([
|
|
23543
23537
|
token
|
|
@@ -23556,7 +23550,7 @@ function indent(str, spaces) {
|
|
|
23556
23550
|
if (contextKeys.some(function(el) {
|
|
23557
23551
|
return el.startsWith(name);
|
|
23558
23552
|
})) {
|
|
23559
|
-
return
|
|
23553
|
+
return tokens = tokens1, nextMatch = nextMatch1, i = i1, "continue";
|
|
23560
23554
|
}
|
|
23561
23555
|
if (dateTimeIdentifiers.some(function(el) {
|
|
23562
23556
|
return el === name;
|
|
@@ -23575,9 +23569,9 @@ function indent(str, spaces) {
|
|
|
23575
23569
|
if (dateTimeIdentifiers.some(function(el) {
|
|
23576
23570
|
return el.startsWith(name);
|
|
23577
23571
|
})) {
|
|
23578
|
-
return
|
|
23572
|
+
return tokens = tokens1, nextMatch = nextMatch1, i = i1, "continue";
|
|
23579
23573
|
}
|
|
23580
|
-
return
|
|
23574
|
+
return tokens = tokens1, nextMatch = nextMatch1, i = i1, {
|
|
23581
23575
|
v: nextMatch1
|
|
23582
23576
|
};
|
|
23583
23577
|
};
|
|
@@ -23589,7 +23583,7 @@ function indent(str, spaces) {
|
|
|
23589
23583
|
}
|
|
23590
23584
|
}
|
|
23591
23585
|
var _obj;
|
|
23592
|
-
var identifiersMap = (_obj = {}, _define_property$
|
|
23586
|
+
var identifiersMap = (_obj = {}, _define_property$v(_obj, identifier, "identifier"), _define_property$v(_obj, nameIdentifier, "nameIdentifier"), _obj);
|
|
23593
23587
|
var identifiers = new ExternalTokenizer(function(input, stack) {
|
|
23594
23588
|
LOG_PARSE_DEBUG && console.log("%s: T <identifier | nameIdentifier>", input.pos);
|
|
23595
23589
|
var nameMatch = parseName(input, stack.context);
|
|
@@ -23638,17 +23632,17 @@ var insertSemicolon = new ExternalTokenizer(function(input, stack) {
|
|
|
23638
23632
|
}
|
|
23639
23633
|
});
|
|
23640
23634
|
var _obj1;
|
|
23641
|
-
var prefixedContextStarts = (_obj1 = {}, _define_property$
|
|
23635
|
+
var prefixedContextStarts = (_obj1 = {}, _define_property$v(_obj1, functionInvocationStart, "FunctionInvocation"), _define_property$v(_obj1, filterExpressionStart, "FilterExpression"), _define_property$v(_obj1, pathExpressionStart, "PathExpression"), _obj1);
|
|
23642
23636
|
var _obj2;
|
|
23643
|
-
var contextStarts = (_obj2 = {}, _define_property$
|
|
23637
|
+
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);
|
|
23644
23638
|
var _obj3;
|
|
23645
|
-
var contextEnds = (_obj3 = {}, _define_property$
|
|
23639
|
+
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);
|
|
23646
23640
|
var ValueProducer = /*#__PURE__*/ function() {
|
|
23647
23641
|
function ValueProducer(fn) {
|
|
23648
|
-
_class_call_check$
|
|
23642
|
+
_class_call_check$u(this, ValueProducer);
|
|
23649
23643
|
this.fn = fn;
|
|
23650
23644
|
}
|
|
23651
|
-
_create_class$
|
|
23645
|
+
_create_class$h(ValueProducer, [
|
|
23652
23646
|
{
|
|
23653
23647
|
key: "get",
|
|
23654
23648
|
value: function get(variables) {
|
|
@@ -23681,12 +23675,12 @@ var dateTimeIdentifiers = Object.keys(dateTimeLiterals);
|
|
|
23681
23675
|
*/ var VariableContext = /*#__PURE__*/ function() {
|
|
23682
23676
|
function VariableContext() {
|
|
23683
23677
|
var value = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
|
|
23684
|
-
_class_call_check$
|
|
23678
|
+
_class_call_check$u(this, VariableContext);
|
|
23685
23679
|
/**
|
|
23686
23680
|
* @protected
|
|
23687
23681
|
*/ this.value = value;
|
|
23688
23682
|
}
|
|
23689
|
-
_create_class$
|
|
23683
|
+
_create_class$h(VariableContext, [
|
|
23690
23684
|
{
|
|
23691
23685
|
/**
|
|
23692
23686
|
* Return all defined keys of the context.
|
|
@@ -23727,7 +23721,7 @@ var dateTimeIdentifiers = Object.keys(dateTimeLiterals);
|
|
|
23727
23721
|
*/ key: "set",
|
|
23728
23722
|
value: function set(key, value) {
|
|
23729
23723
|
var constructor = /** @type { typeof VariableContext } */ this.constructor;
|
|
23730
|
-
return constructor.of(_object_spread_props$9(_object_spread$j({}, this.value), _define_property$
|
|
23724
|
+
return constructor.of(_object_spread_props$9(_object_spread$j({}, this.value), _define_property$v({}, key, value)));
|
|
23731
23725
|
}
|
|
23732
23726
|
}
|
|
23733
23727
|
], [
|
|
@@ -23776,7 +23770,7 @@ var dateTimeIdentifiers = Object.keys(dateTimeLiterals);
|
|
|
23776
23770
|
var Variables = /*#__PURE__*/ function() {
|
|
23777
23771
|
function Variables() {
|
|
23778
23772
|
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;
|
|
23779
|
-
_class_call_check$
|
|
23773
|
+
_class_call_check$u(this, Variables);
|
|
23780
23774
|
this.name = name;
|
|
23781
23775
|
this.tokens = tokens;
|
|
23782
23776
|
this.children = children;
|
|
@@ -23785,7 +23779,7 @@ var Variables = /*#__PURE__*/ function() {
|
|
|
23785
23779
|
this.value = value;
|
|
23786
23780
|
this.raw = raw;
|
|
23787
23781
|
}
|
|
23788
|
-
_create_class$
|
|
23782
|
+
_create_class$h(Variables, [
|
|
23789
23783
|
{
|
|
23790
23784
|
key: "enterScope",
|
|
23791
23785
|
value: function enterScope(name) {
|
|
@@ -24411,7 +24405,7 @@ function _assert_this_initialized$i(self) {
|
|
|
24411
24405
|
}
|
|
24412
24406
|
return self;
|
|
24413
24407
|
}
|
|
24414
|
-
function _class_call_check$
|
|
24408
|
+
function _class_call_check$t(instance, Constructor) {
|
|
24415
24409
|
if (!(instance instanceof Constructor)) {
|
|
24416
24410
|
throw new TypeError("Cannot call a class as a function");
|
|
24417
24411
|
}
|
|
@@ -24433,7 +24427,7 @@ function _construct$2(Parent, args, Class) {
|
|
|
24433
24427
|
}
|
|
24434
24428
|
return _construct$2.apply(null, arguments);
|
|
24435
24429
|
}
|
|
24436
|
-
function _defineProperties$
|
|
24430
|
+
function _defineProperties$g(target, props) {
|
|
24437
24431
|
for(var i = 0; i < props.length; i++){
|
|
24438
24432
|
var descriptor = props[i];
|
|
24439
24433
|
descriptor.enumerable = descriptor.enumerable || false;
|
|
@@ -24442,12 +24436,12 @@ function _defineProperties$h(target, props) {
|
|
|
24442
24436
|
Object.defineProperty(target, descriptor.key, descriptor);
|
|
24443
24437
|
}
|
|
24444
24438
|
}
|
|
24445
|
-
function _create_class$
|
|
24446
|
-
if (protoProps) _defineProperties$
|
|
24447
|
-
if (staticProps) _defineProperties$
|
|
24439
|
+
function _create_class$g(Constructor, protoProps, staticProps) {
|
|
24440
|
+
if (protoProps) _defineProperties$g(Constructor.prototype, protoProps);
|
|
24441
|
+
if (staticProps) _defineProperties$g(Constructor, staticProps);
|
|
24448
24442
|
return Constructor;
|
|
24449
24443
|
}
|
|
24450
|
-
function _define_property$
|
|
24444
|
+
function _define_property$u(obj, key, value) {
|
|
24451
24445
|
if (key in obj) {
|
|
24452
24446
|
Object.defineProperty(obj, key, {
|
|
24453
24447
|
value: value,
|
|
@@ -24685,7 +24679,7 @@ function typeCast(obj, type) {
|
|
|
24685
24679
|
return null;
|
|
24686
24680
|
}
|
|
24687
24681
|
var Range = function Range(props) {
|
|
24688
|
-
_class_call_check$
|
|
24682
|
+
_class_call_check$t(this, Range);
|
|
24689
24683
|
Object.assign(this, props);
|
|
24690
24684
|
};
|
|
24691
24685
|
function isNumber(obj) {
|
|
@@ -24791,11 +24785,11 @@ function equals(a, b) {
|
|
|
24791
24785
|
}
|
|
24792
24786
|
var FunctionWrapper = /*#__PURE__*/ function() {
|
|
24793
24787
|
function FunctionWrapper(fn, parameterNames) {
|
|
24794
|
-
_class_call_check$
|
|
24788
|
+
_class_call_check$t(this, FunctionWrapper);
|
|
24795
24789
|
this.fn = fn;
|
|
24796
24790
|
this.parameterNames = parameterNames;
|
|
24797
24791
|
}
|
|
24798
|
-
_create_class$
|
|
24792
|
+
_create_class$g(FunctionWrapper, [
|
|
24799
24793
|
{
|
|
24800
24794
|
key: "invoke",
|
|
24801
24795
|
value: function invoke(contextOrArgs) {
|
|
@@ -25740,7 +25734,7 @@ var builtins = {
|
|
|
25740
25734
|
if (key in context) {
|
|
25741
25735
|
return FALSE;
|
|
25742
25736
|
}
|
|
25743
|
-
return Object.assign(Object.assign({}, context), _define_property$
|
|
25737
|
+
return Object.assign(Object.assign({}, context), _define_property$u({}, entry.key, entry.value));
|
|
25744
25738
|
}, {});
|
|
25745
25739
|
if (context === FALSE) {
|
|
25746
25740
|
return null;
|
|
@@ -25793,7 +25787,7 @@ var builtins = {
|
|
|
25793
25787
|
return null;
|
|
25794
25788
|
}
|
|
25795
25789
|
}
|
|
25796
|
-
return Object.assign(Object.assign({}, context), _define_property$
|
|
25790
|
+
return Object.assign(Object.assign({}, context), _define_property$u({}, key, value));
|
|
25797
25791
|
}
|
|
25798
25792
|
function matches(a, b) {
|
|
25799
25793
|
return a === b;
|
|
@@ -26129,7 +26123,7 @@ var SyntaxError$1 = /*#__PURE__*/ function(Error1) {
|
|
|
26129
26123
|
_inherits$i(SyntaxError, Error1);
|
|
26130
26124
|
var _super = _create_super$i(SyntaxError);
|
|
26131
26125
|
function SyntaxError(message, details) {
|
|
26132
|
-
_class_call_check$
|
|
26126
|
+
_class_call_check$t(this, SyntaxError);
|
|
26133
26127
|
var _this;
|
|
26134
26128
|
_this = _super.call(this, message);
|
|
26135
26129
|
Object.assign(_assert_this_initialized$i(_this), details);
|
|
@@ -26139,9 +26133,9 @@ var SyntaxError$1 = /*#__PURE__*/ function(Error1) {
|
|
|
26139
26133
|
}(_wrap_native_super$2(Error));
|
|
26140
26134
|
var Interpreter = /*#__PURE__*/ function() {
|
|
26141
26135
|
function Interpreter() {
|
|
26142
|
-
_class_call_check$
|
|
26136
|
+
_class_call_check$t(this, Interpreter);
|
|
26143
26137
|
}
|
|
26144
|
-
_create_class$
|
|
26138
|
+
_create_class$g(Interpreter, [
|
|
26145
26139
|
{
|
|
26146
26140
|
key: "_buildExecutionTree",
|
|
26147
26141
|
value: function _buildExecutionTree(tree, input) {
|
|
@@ -26481,7 +26475,7 @@ function evalNode(node, input, args) {
|
|
|
26481
26475
|
return function(context) {
|
|
26482
26476
|
return args.slice(1, -1).reduce(function(obj, arg) {
|
|
26483
26477
|
var _arg = _sliced_to_array$4(arg(Object.assign(Object.assign({}, context), obj)), 2), key = _arg[0], value = _arg[1];
|
|
26484
|
-
return Object.assign(Object.assign({}, obj), _define_property$
|
|
26478
|
+
return Object.assign(Object.assign({}, obj), _define_property$u({}, key, value));
|
|
26485
26479
|
}, {});
|
|
26486
26480
|
};
|
|
26487
26481
|
case "FunctionBody":
|
|
@@ -26946,7 +26940,7 @@ function extractValue(context, prop, _target) {
|
|
|
26946
26940
|
"range"
|
|
26947
26941
|
].includes(getType(target))) {
|
|
26948
26942
|
return target.map(function(t) {
|
|
26949
|
-
return _define_property$
|
|
26943
|
+
return _define_property$u({}, prop, t);
|
|
26950
26944
|
});
|
|
26951
26945
|
}
|
|
26952
26946
|
return null;
|
|
@@ -27368,6 +27362,7 @@ const _config = globalInstance.__DIGIPAIR_CONFIG__ = (_globalInstance___DIGIPAIR
|
|
|
27368
27362
|
LIBRARIES: {},
|
|
27369
27363
|
BASE_URL: 'https://cdn.jsdelivr.net/npm'
|
|
27370
27364
|
};
|
|
27365
|
+
const isRemoteVersion = /^https?:\/\/[^\s/$.?#].[^\s]*$/;
|
|
27371
27366
|
const isPinsSettings = (value)=>{
|
|
27372
27367
|
return typeof value === 'object' && value !== null && typeof value.element === 'string' && typeof value.library === 'string';
|
|
27373
27368
|
};
|
|
@@ -27424,7 +27419,7 @@ const executePins = async (settingsOrigin, context = {})=>{
|
|
|
27424
27419
|
return results;
|
|
27425
27420
|
}
|
|
27426
27421
|
const version = context.config.VERSIONS[settings.library] || 'latest';
|
|
27427
|
-
const library = _config.LIBRARIES[settings.library] || (typeof window === 'undefined' ? require(settings.library) : await (function (t) { return Promise.resolve().then(function () { return /*#__PURE__*/_interopNamespace(require(t)); }); })(`${_config.BASE_URL}/${settings.library}@${version}/index.esm.js`));
|
|
27422
|
+
const library = _config.LIBRARIES[settings.library] || (typeof window === 'undefined' ? require(settings.library) : await (function (t) { return Promise.resolve().then(function () { return /*#__PURE__*/_interopNamespace(require(t)); }); })(isRemoteVersion.test(version) ? `${version}` : `${_config.BASE_URL}/${settings.library}@${version}/index.esm.js`));
|
|
27428
27423
|
const pins = library == null ? void 0 : library[settings.element];
|
|
27429
27424
|
if (!pins) {
|
|
27430
27425
|
throw new Error(`Element ${settings.element} not found in library ${settings.library}`);
|
|
@@ -27552,12 +27547,12 @@ function _assert_this_initialized$h(self) {
|
|
|
27552
27547
|
}
|
|
27553
27548
|
return self;
|
|
27554
27549
|
}
|
|
27555
|
-
function _class_call_check$
|
|
27550
|
+
function _class_call_check$s(instance, Constructor) {
|
|
27556
27551
|
if (!(instance instanceof Constructor)) {
|
|
27557
27552
|
throw new TypeError("Cannot call a class as a function");
|
|
27558
27553
|
}
|
|
27559
27554
|
}
|
|
27560
|
-
function _defineProperties$
|
|
27555
|
+
function _defineProperties$f(target, props) {
|
|
27561
27556
|
for(var i = 0; i < props.length; i++){
|
|
27562
27557
|
var descriptor = props[i];
|
|
27563
27558
|
descriptor.enumerable = descriptor.enumerable || false;
|
|
@@ -27566,12 +27561,12 @@ function _defineProperties$g(target, props) {
|
|
|
27566
27561
|
Object.defineProperty(target, descriptor.key, descriptor);
|
|
27567
27562
|
}
|
|
27568
27563
|
}
|
|
27569
|
-
function _create_class$
|
|
27570
|
-
if (protoProps) _defineProperties$
|
|
27571
|
-
if (staticProps) _defineProperties$
|
|
27564
|
+
function _create_class$f(Constructor, protoProps, staticProps) {
|
|
27565
|
+
if (protoProps) _defineProperties$f(Constructor.prototype, protoProps);
|
|
27566
|
+
if (staticProps) _defineProperties$f(Constructor, staticProps);
|
|
27572
27567
|
return Constructor;
|
|
27573
27568
|
}
|
|
27574
|
-
function _define_property$
|
|
27569
|
+
function _define_property$t(obj, key, value) {
|
|
27575
27570
|
if (key in obj) {
|
|
27576
27571
|
Object.defineProperty(obj, key, {
|
|
27577
27572
|
value: value,
|
|
@@ -27653,11 +27648,11 @@ function _create_super$h(Derived) {
|
|
|
27653
27648
|
}
|
|
27654
27649
|
var TextDecodeTransformer = /*#__PURE__*/ function() {
|
|
27655
27650
|
function TextDecodeTransformer() {
|
|
27656
|
-
_class_call_check$
|
|
27657
|
-
_define_property$
|
|
27651
|
+
_class_call_check$s(this, TextDecodeTransformer);
|
|
27652
|
+
_define_property$t(this, "decoder", void 0);
|
|
27658
27653
|
this.decoder = new TextDecoder();
|
|
27659
27654
|
}
|
|
27660
|
-
_create_class$
|
|
27655
|
+
_create_class$f(TextDecodeTransformer, [
|
|
27661
27656
|
{
|
|
27662
27657
|
key: "transform",
|
|
27663
27658
|
value: function transform(chunk, controller) {
|
|
@@ -27689,7 +27684,7 @@ var TextDecoderStreamPolyfill = /*#__PURE__*/ function(TransformStream) {
|
|
|
27689
27684
|
_inherits$h(TextDecoderStreamPolyfill, TransformStream);
|
|
27690
27685
|
var _super = _create_super$h(TextDecoderStreamPolyfill);
|
|
27691
27686
|
function TextDecoderStreamPolyfill() {
|
|
27692
|
-
_class_call_check$
|
|
27687
|
+
_class_call_check$s(this, TextDecoderStreamPolyfill);
|
|
27693
27688
|
return _super.call(this, new TextDecodeTransformer());
|
|
27694
27689
|
}
|
|
27695
27690
|
return TextDecoderStreamPolyfill;
|
|
@@ -27731,12 +27726,12 @@ function _async_to_generator$9(fn) {
|
|
|
27731
27726
|
});
|
|
27732
27727
|
};
|
|
27733
27728
|
}
|
|
27734
|
-
function _class_call_check$
|
|
27729
|
+
function _class_call_check$r(instance, Constructor) {
|
|
27735
27730
|
if (!(instance instanceof Constructor)) {
|
|
27736
27731
|
throw new TypeError("Cannot call a class as a function");
|
|
27737
27732
|
}
|
|
27738
27733
|
}
|
|
27739
|
-
function _defineProperties$
|
|
27734
|
+
function _defineProperties$e(target, props) {
|
|
27740
27735
|
for(var i = 0; i < props.length; i++){
|
|
27741
27736
|
var descriptor = props[i];
|
|
27742
27737
|
descriptor.enumerable = descriptor.enumerable || false;
|
|
@@ -27745,12 +27740,12 @@ function _defineProperties$f(target, props) {
|
|
|
27745
27740
|
Object.defineProperty(target, descriptor.key, descriptor);
|
|
27746
27741
|
}
|
|
27747
27742
|
}
|
|
27748
|
-
function _create_class$
|
|
27749
|
-
if (protoProps) _defineProperties$
|
|
27750
|
-
if (staticProps) _defineProperties$
|
|
27743
|
+
function _create_class$e(Constructor, protoProps, staticProps) {
|
|
27744
|
+
if (protoProps) _defineProperties$e(Constructor.prototype, protoProps);
|
|
27745
|
+
if (staticProps) _defineProperties$e(Constructor, staticProps);
|
|
27751
27746
|
return Constructor;
|
|
27752
27747
|
}
|
|
27753
|
-
function _define_property$
|
|
27748
|
+
function _define_property$s(obj, key, value) {
|
|
27754
27749
|
if (key in obj) {
|
|
27755
27750
|
Object.defineProperty(obj, key, {
|
|
27756
27751
|
value: value,
|
|
@@ -27920,9 +27915,9 @@ function _ts_generator$a(thisArg, body) {
|
|
|
27920
27915
|
}
|
|
27921
27916
|
var JSONTransformer = /*#__PURE__*/ function() {
|
|
27922
27917
|
function JSONTransformer() {
|
|
27923
|
-
_class_call_check$
|
|
27918
|
+
_class_call_check$r(this, JSONTransformer);
|
|
27924
27919
|
}
|
|
27925
|
-
_create_class$
|
|
27920
|
+
_create_class$e(JSONTransformer, [
|
|
27926
27921
|
{
|
|
27927
27922
|
key: "transform",
|
|
27928
27923
|
value: function transform(obj, controller) {
|
|
@@ -27955,22 +27950,22 @@ var JSONStringifyStream = /*#__PURE__*/ function(TransformStream) {
|
|
|
27955
27950
|
_inherits$g(JSONStringifyStream, TransformStream);
|
|
27956
27951
|
var _super = _create_super$g(JSONStringifyStream);
|
|
27957
27952
|
function JSONStringifyStream() {
|
|
27958
|
-
_class_call_check$
|
|
27953
|
+
_class_call_check$r(this, JSONStringifyStream);
|
|
27959
27954
|
return _super.call(this, new JSONTransformer());
|
|
27960
27955
|
}
|
|
27961
27956
|
return JSONStringifyStream;
|
|
27962
27957
|
}(web.TransformStream);
|
|
27963
27958
|
var TypeTransformer = /*#__PURE__*/ function() {
|
|
27964
27959
|
function TypeTransformer(transformFn, doneCallback) {
|
|
27965
|
-
_class_call_check$
|
|
27966
|
-
_define_property$
|
|
27967
|
-
_define_property$
|
|
27968
|
-
_define_property$
|
|
27960
|
+
_class_call_check$r(this, TypeTransformer);
|
|
27961
|
+
_define_property$s(this, "buffer", void 0);
|
|
27962
|
+
_define_property$s(this, "doneCallback", void 0);
|
|
27963
|
+
_define_property$s(this, "transformFn", void 0);
|
|
27969
27964
|
this.transformFn = transformFn;
|
|
27970
27965
|
this.doneCallback = doneCallback;
|
|
27971
27966
|
this.buffer = doneCallback ? [] : undefined;
|
|
27972
27967
|
}
|
|
27973
|
-
_create_class$
|
|
27968
|
+
_create_class$e(TypeTransformer, [
|
|
27974
27969
|
{
|
|
27975
27970
|
key: "transform",
|
|
27976
27971
|
value: function transform(obj, controller) {
|
|
@@ -28022,7 +28017,7 @@ var RespTransformStream = /*#__PURE__*/ function(TransformStream) {
|
|
|
28022
28017
|
_inherits$g(RespTransformStream, TransformStream);
|
|
28023
28018
|
var _super = _create_super$g(RespTransformStream);
|
|
28024
28019
|
function RespTransformStream(transformFn, doneCallback) {
|
|
28025
|
-
_class_call_check$
|
|
28020
|
+
_class_call_check$r(this, RespTransformStream);
|
|
28026
28021
|
return _super.call(this, new TypeTransformer(transformFn, doneCallback));
|
|
28027
28022
|
}
|
|
28028
28023
|
return RespTransformStream;
|
|
@@ -28065,7 +28060,7 @@ function _async_to_generator$8(fn) {
|
|
|
28065
28060
|
});
|
|
28066
28061
|
};
|
|
28067
28062
|
}
|
|
28068
|
-
function _define_property$
|
|
28063
|
+
function _define_property$r(obj, key, value) {
|
|
28069
28064
|
if (key in obj) {
|
|
28070
28065
|
Object.defineProperty(obj, key, {
|
|
28071
28066
|
value: value,
|
|
@@ -28088,7 +28083,7 @@ function _object_spread$i(target) {
|
|
|
28088
28083
|
}));
|
|
28089
28084
|
}
|
|
28090
28085
|
ownKeys.forEach(function(key) {
|
|
28091
|
-
_define_property$
|
|
28086
|
+
_define_property$r(target, key, source[key]);
|
|
28092
28087
|
});
|
|
28093
28088
|
}
|
|
28094
28089
|
return target;
|
|
@@ -28284,12 +28279,12 @@ var apiCall = function() {
|
|
|
28284
28279
|
}();
|
|
28285
28280
|
|
|
28286
28281
|
// eslint-disable-next-line @typescript-eslint/naming-convention
|
|
28287
|
-
function _class_call_check$
|
|
28282
|
+
function _class_call_check$q(instance, Constructor) {
|
|
28288
28283
|
if (!(instance instanceof Constructor)) {
|
|
28289
28284
|
throw new TypeError("Cannot call a class as a function");
|
|
28290
28285
|
}
|
|
28291
28286
|
}
|
|
28292
|
-
function _defineProperties$
|
|
28287
|
+
function _defineProperties$d(target, props) {
|
|
28293
28288
|
for(var i = 0; i < props.length; i++){
|
|
28294
28289
|
var descriptor = props[i];
|
|
28295
28290
|
descriptor.enumerable = descriptor.enumerable || false;
|
|
@@ -28298,12 +28293,12 @@ function _defineProperties$e(target, props) {
|
|
|
28298
28293
|
Object.defineProperty(target, descriptor.key, descriptor);
|
|
28299
28294
|
}
|
|
28300
28295
|
}
|
|
28301
|
-
function _create_class$
|
|
28302
|
-
if (protoProps) _defineProperties$
|
|
28303
|
-
if (staticProps) _defineProperties$
|
|
28296
|
+
function _create_class$d(Constructor, protoProps, staticProps) {
|
|
28297
|
+
if (protoProps) _defineProperties$d(Constructor.prototype, protoProps);
|
|
28298
|
+
if (staticProps) _defineProperties$d(Constructor, staticProps);
|
|
28304
28299
|
return Constructor;
|
|
28305
28300
|
}
|
|
28306
|
-
function _define_property$
|
|
28301
|
+
function _define_property$q(obj, key, value) {
|
|
28307
28302
|
if (key in obj) {
|
|
28308
28303
|
Object.defineProperty(obj, key, {
|
|
28309
28304
|
value: value,
|
|
@@ -28318,16 +28313,16 @@ function _define_property$r(obj, key, value) {
|
|
|
28318
28313
|
}
|
|
28319
28314
|
var ColorLog = /*#__PURE__*/ function() {
|
|
28320
28315
|
function ColorLog() {
|
|
28321
|
-
_class_call_check$
|
|
28316
|
+
_class_call_check$q(this, ColorLog);
|
|
28322
28317
|
// ANSI escape codes for different colors
|
|
28323
|
-
_define_property$
|
|
28324
|
-
_define_property$
|
|
28325
|
-
_define_property$
|
|
28326
|
-
_define_property$
|
|
28327
|
-
_define_property$
|
|
28328
|
-
_define_property$
|
|
28318
|
+
_define_property$q(this, "ANSI_WHITE_BRIGHT", "\x1b[97m");
|
|
28319
|
+
_define_property$q(this, "ANSI_GREEN_BRIGHT", "\x1b[92m");
|
|
28320
|
+
_define_property$q(this, "ANSI_BLUE_BRIGHT", "\x1b[94m");
|
|
28321
|
+
_define_property$q(this, "ANSI_YELLOW", "\x1b[93m");
|
|
28322
|
+
_define_property$q(this, "ANSI_RED", "\x1b[91m");
|
|
28323
|
+
_define_property$q(this, "ANSI_RESET", "\x1b[0m");
|
|
28329
28324
|
}
|
|
28330
|
-
_create_class$
|
|
28325
|
+
_create_class$d(ColorLog, [
|
|
28331
28326
|
{
|
|
28332
28327
|
// Method to wrap text with the specified ANSI color code
|
|
28333
28328
|
key: "colorize",
|
|
@@ -28408,12 +28403,12 @@ function _async_to_generator$7(fn) {
|
|
|
28408
28403
|
});
|
|
28409
28404
|
};
|
|
28410
28405
|
}
|
|
28411
|
-
function _class_call_check$
|
|
28406
|
+
function _class_call_check$p(instance, Constructor) {
|
|
28412
28407
|
if (!(instance instanceof Constructor)) {
|
|
28413
28408
|
throw new TypeError("Cannot call a class as a function");
|
|
28414
28409
|
}
|
|
28415
28410
|
}
|
|
28416
|
-
function _defineProperties$
|
|
28411
|
+
function _defineProperties$c(target, props) {
|
|
28417
28412
|
for(var i = 0; i < props.length; i++){
|
|
28418
28413
|
var descriptor = props[i];
|
|
28419
28414
|
descriptor.enumerable = descriptor.enumerable || false;
|
|
@@ -28422,12 +28417,12 @@ function _defineProperties$d(target, props) {
|
|
|
28422
28417
|
Object.defineProperty(target, descriptor.key, descriptor);
|
|
28423
28418
|
}
|
|
28424
28419
|
}
|
|
28425
|
-
function _create_class$
|
|
28426
|
-
if (protoProps) _defineProperties$
|
|
28427
|
-
if (staticProps) _defineProperties$
|
|
28420
|
+
function _create_class$c(Constructor, protoProps, staticProps) {
|
|
28421
|
+
if (protoProps) _defineProperties$c(Constructor.prototype, protoProps);
|
|
28422
|
+
if (staticProps) _defineProperties$c(Constructor, staticProps);
|
|
28428
28423
|
return Constructor;
|
|
28429
28424
|
}
|
|
28430
|
-
function _define_property$
|
|
28425
|
+
function _define_property$p(obj, key, value) {
|
|
28431
28426
|
if (key in obj) {
|
|
28432
28427
|
Object.defineProperty(obj, key, {
|
|
28433
28428
|
value: value,
|
|
@@ -28477,7 +28472,7 @@ function _object_spread$h(target) {
|
|
|
28477
28472
|
}));
|
|
28478
28473
|
}
|
|
28479
28474
|
ownKeys.forEach(function(key) {
|
|
28480
|
-
_define_property$
|
|
28475
|
+
_define_property$p(target, key, source[key]);
|
|
28481
28476
|
});
|
|
28482
28477
|
}
|
|
28483
28478
|
return target;
|
|
@@ -28624,26 +28619,26 @@ var axBaseAIDefaultConfig = function() {
|
|
|
28624
28619
|
var AxBaseAI = /*#__PURE__*/ function() {
|
|
28625
28620
|
function AxBaseAI(param) {
|
|
28626
28621
|
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;
|
|
28627
|
-
_class_call_check$
|
|
28628
|
-
_define_property$
|
|
28629
|
-
_define_property$
|
|
28630
|
-
_define_property$
|
|
28631
|
-
_define_property$
|
|
28632
|
-
_define_property$
|
|
28633
|
-
_define_property$
|
|
28634
|
-
_define_property$
|
|
28635
|
-
_define_property$
|
|
28636
|
-
_define_property$
|
|
28637
|
-
_define_property$
|
|
28638
|
-
_define_property$
|
|
28639
|
-
_define_property$
|
|
28640
|
-
_define_property$
|
|
28641
|
-
_define_property$
|
|
28642
|
-
_define_property$
|
|
28643
|
-
_define_property$
|
|
28644
|
-
_define_property$
|
|
28645
|
-
_define_property$
|
|
28646
|
-
_define_property$
|
|
28622
|
+
_class_call_check$p(this, AxBaseAI);
|
|
28623
|
+
_define_property$p(this, "generateChatReq", void 0);
|
|
28624
|
+
_define_property$p(this, "generateEmbedReq", void 0);
|
|
28625
|
+
_define_property$p(this, "generateChatResp", void 0);
|
|
28626
|
+
_define_property$p(this, "generateChatStreamResp", void 0);
|
|
28627
|
+
_define_property$p(this, "generateEmbedResp", void 0);
|
|
28628
|
+
_define_property$p(this, "debug", false);
|
|
28629
|
+
_define_property$p(this, "rt", void 0);
|
|
28630
|
+
_define_property$p(this, "fetch", void 0);
|
|
28631
|
+
_define_property$p(this, "tracer", void 0);
|
|
28632
|
+
_define_property$p(this, "modelMap", void 0);
|
|
28633
|
+
_define_property$p(this, "embedModelMap", void 0);
|
|
28634
|
+
_define_property$p(this, "modelUsage", void 0);
|
|
28635
|
+
_define_property$p(this, "embedModelUsage", void 0);
|
|
28636
|
+
_define_property$p(this, "apiURL", void 0);
|
|
28637
|
+
_define_property$p(this, "name", void 0);
|
|
28638
|
+
_define_property$p(this, "headers", void 0);
|
|
28639
|
+
_define_property$p(this, "modelInfo", void 0);
|
|
28640
|
+
_define_property$p(this, "embedModelInfo", void 0);
|
|
28641
|
+
_define_property$p(this, "supportFor", void 0);
|
|
28647
28642
|
this.name = name;
|
|
28648
28643
|
this.apiURL = apiURL;
|
|
28649
28644
|
this.headers = headers;
|
|
@@ -28679,7 +28674,7 @@ var AxBaseAI = /*#__PURE__*/ function() {
|
|
|
28679
28674
|
}
|
|
28680
28675
|
this.setOptions(options);
|
|
28681
28676
|
}
|
|
28682
|
-
_create_class$
|
|
28677
|
+
_create_class$c(AxBaseAI, [
|
|
28683
28678
|
{
|
|
28684
28679
|
key: "setName",
|
|
28685
28680
|
value: function setName(name) {
|
|
@@ -28779,7 +28774,7 @@ var AxBaseAI = /*#__PURE__*/ function() {
|
|
|
28779
28774
|
4,
|
|
28780
28775
|
(_this_tracer = _this.tracer) === null || _this_tracer === void 0 ? void 0 : _this_tracer.startActiveSpan("Chat Request", {
|
|
28781
28776
|
kind: AxSpanKind.SERVER,
|
|
28782
|
-
attributes: (_obj = {}, _define_property$
|
|
28777
|
+
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)
|
|
28783
28778
|
}, function() {
|
|
28784
28779
|
var _ref = _async_to_generator$7(function(span) {
|
|
28785
28780
|
var res;
|
|
@@ -28991,7 +28986,7 @@ var AxBaseAI = /*#__PURE__*/ function() {
|
|
|
28991
28986
|
4,
|
|
28992
28987
|
(_this_tracer = _this.tracer) === null || _this_tracer === void 0 ? void 0 : _this_tracer.startActiveSpan("Embed Request", {
|
|
28993
28988
|
kind: AxSpanKind.SERVER,
|
|
28994
|
-
attributes: (_obj = {}, _define_property$
|
|
28989
|
+
attributes: (_obj = {}, _define_property$p(_obj, axSpanAttributes.LLM_SYSTEM, _this.name), _define_property$p(_obj, axSpanAttributes.LLM_REQUEST_MODEL, _this.modelInfo.name), _obj)
|
|
28995
28990
|
}, function() {
|
|
28996
28991
|
var _ref = _async_to_generator$7(function(span) {
|
|
28997
28992
|
var res;
|
|
@@ -29109,7 +29104,7 @@ var AxBaseAI = /*#__PURE__*/ function() {
|
|
|
29109
29104
|
if (span === null || span === void 0 ? void 0 : span.isRecording()) {
|
|
29110
29105
|
if (res.modelUsage) {
|
|
29111
29106
|
_this.embedModelUsage = res.modelUsage;
|
|
29112
|
-
span.setAttributes((_obj = {}, _define_property$
|
|
29107
|
+
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));
|
|
29113
29108
|
}
|
|
29114
29109
|
}
|
|
29115
29110
|
span === null || span === void 0 ? void 0 : span.end();
|
|
@@ -29299,7 +29294,7 @@ var setResponseAttr = function(res, span) {
|
|
|
29299
29294
|
if (res.modelUsage) {
|
|
29300
29295
|
var _res_modelUsage_completionTokens;
|
|
29301
29296
|
var _obj;
|
|
29302
|
-
span.setAttributes((_obj = {}, _define_property$
|
|
29297
|
+
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));
|
|
29303
29298
|
}
|
|
29304
29299
|
};
|
|
29305
29300
|
|
|
@@ -29375,12 +29370,12 @@ function _assert_this_initialized$f(self) {
|
|
|
29375
29370
|
}
|
|
29376
29371
|
return self;
|
|
29377
29372
|
}
|
|
29378
|
-
function _class_call_check$
|
|
29373
|
+
function _class_call_check$o(instance, Constructor) {
|
|
29379
29374
|
if (!(instance instanceof Constructor)) {
|
|
29380
29375
|
throw new TypeError("Cannot call a class as a function");
|
|
29381
29376
|
}
|
|
29382
29377
|
}
|
|
29383
|
-
function _defineProperties$
|
|
29378
|
+
function _defineProperties$b(target, props) {
|
|
29384
29379
|
for(var i = 0; i < props.length; i++){
|
|
29385
29380
|
var descriptor = props[i];
|
|
29386
29381
|
descriptor.enumerable = descriptor.enumerable || false;
|
|
@@ -29389,12 +29384,12 @@ function _defineProperties$c(target, props) {
|
|
|
29389
29384
|
Object.defineProperty(target, descriptor.key, descriptor);
|
|
29390
29385
|
}
|
|
29391
29386
|
}
|
|
29392
|
-
function _create_class$
|
|
29393
|
-
if (protoProps) _defineProperties$
|
|
29394
|
-
if (staticProps) _defineProperties$
|
|
29387
|
+
function _create_class$b(Constructor, protoProps, staticProps) {
|
|
29388
|
+
if (protoProps) _defineProperties$b(Constructor.prototype, protoProps);
|
|
29389
|
+
if (staticProps) _defineProperties$b(Constructor, staticProps);
|
|
29395
29390
|
return Constructor;
|
|
29396
29391
|
}
|
|
29397
|
-
function _define_property$
|
|
29392
|
+
function _define_property$o(obj, key, value) {
|
|
29398
29393
|
if (key in obj) {
|
|
29399
29394
|
Object.defineProperty(obj, key, {
|
|
29400
29395
|
value: value,
|
|
@@ -29436,7 +29431,7 @@ function _object_spread$g(target) {
|
|
|
29436
29431
|
}));
|
|
29437
29432
|
}
|
|
29438
29433
|
ownKeys.forEach(function(key) {
|
|
29439
|
-
_define_property$
|
|
29434
|
+
_define_property$o(target, key, source[key]);
|
|
29440
29435
|
});
|
|
29441
29436
|
}
|
|
29442
29437
|
return target;
|
|
@@ -29493,7 +29488,7 @@ var AxAIOpenAI = /*#__PURE__*/ function(AxBaseAI) {
|
|
|
29493
29488
|
var _super = _create_super$f(AxAIOpenAI);
|
|
29494
29489
|
function AxAIOpenAI(param) {
|
|
29495
29490
|
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;
|
|
29496
|
-
_class_call_check$
|
|
29491
|
+
_class_call_check$o(this, AxAIOpenAI);
|
|
29497
29492
|
var _this;
|
|
29498
29493
|
if (!apiKey || apiKey === "") {
|
|
29499
29494
|
throw new Error("OpenAI API key not set");
|
|
@@ -29516,9 +29511,9 @@ var AxAIOpenAI = /*#__PURE__*/ function(AxBaseAI) {
|
|
|
29516
29511
|
streaming: true
|
|
29517
29512
|
}
|
|
29518
29513
|
});
|
|
29519
|
-
_define_property$
|
|
29520
|
-
_define_property$
|
|
29521
|
-
_define_property$
|
|
29514
|
+
_define_property$o(_assert_this_initialized$f(_this), "config", void 0);
|
|
29515
|
+
_define_property$o(_assert_this_initialized$f(_this), "streamingUsage", void 0);
|
|
29516
|
+
_define_property$o(_assert_this_initialized$f(_this), "generateChatReq", function(req, // eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
29522
29517
|
_config) {
|
|
29523
29518
|
var _req_functions, _req_modelConfig, _req_modelConfig1, _this_config, _this_config1, _req_modelConfig2, _req_modelConfig3, _req_modelConfig4, _req_modelConfig5, _req_modelConfig6, _req_modelConfig7;
|
|
29524
29519
|
var model = _this.config.model;
|
|
@@ -29573,7 +29568,7 @@ var AxAIOpenAI = /*#__PURE__*/ function(AxBaseAI) {
|
|
|
29573
29568
|
reqValue
|
|
29574
29569
|
];
|
|
29575
29570
|
});
|
|
29576
|
-
_define_property$
|
|
29571
|
+
_define_property$o(_assert_this_initialized$f(_this), "generateEmbedReq", function(req) {
|
|
29577
29572
|
var model = _this.config.embedModel;
|
|
29578
29573
|
if (!model) {
|
|
29579
29574
|
throw new Error("Embed model not set");
|
|
@@ -29593,7 +29588,7 @@ var AxAIOpenAI = /*#__PURE__*/ function(AxBaseAI) {
|
|
|
29593
29588
|
reqValue
|
|
29594
29589
|
];
|
|
29595
29590
|
});
|
|
29596
|
-
_define_property$
|
|
29591
|
+
_define_property$o(_assert_this_initialized$f(_this), "generateChatResp", function(resp) {
|
|
29597
29592
|
var id = resp.id, usage = resp.usage, choices = resp.choices, error = resp.error;
|
|
29598
29593
|
if (error) {
|
|
29599
29594
|
throw error;
|
|
@@ -29630,7 +29625,7 @@ var AxAIOpenAI = /*#__PURE__*/ function(AxBaseAI) {
|
|
|
29630
29625
|
remoteId: id
|
|
29631
29626
|
};
|
|
29632
29627
|
});
|
|
29633
|
-
_define_property$
|
|
29628
|
+
_define_property$o(_assert_this_initialized$f(_this), "generateChatStreamResp", function(resp, state) {
|
|
29634
29629
|
var id = resp.id, usage = resp.usage, choices = resp.choices;
|
|
29635
29630
|
var modelUsage = usage ? {
|
|
29636
29631
|
promptTokens: usage.prompt_tokens,
|
|
@@ -29678,7 +29673,7 @@ var AxAIOpenAI = /*#__PURE__*/ function(AxBaseAI) {
|
|
|
29678
29673
|
modelUsage: modelUsage
|
|
29679
29674
|
};
|
|
29680
29675
|
});
|
|
29681
|
-
_define_property$
|
|
29676
|
+
_define_property$o(_assert_this_initialized$f(_this), "generateEmbedResp", function(resp) {
|
|
29682
29677
|
var data = resp.data, usage = resp.usage;
|
|
29683
29678
|
var modelUsage = usage ? {
|
|
29684
29679
|
promptTokens: usage.prompt_tokens,
|
|
@@ -29697,7 +29692,7 @@ var AxAIOpenAI = /*#__PURE__*/ function(AxBaseAI) {
|
|
|
29697
29692
|
_this.streamingUsage = (_options_streamingUsage = options === null || options === void 0 ? void 0 : options.streamingUsage) !== null && _options_streamingUsage !== void 0 ? _options_streamingUsage : true;
|
|
29698
29693
|
return _this;
|
|
29699
29694
|
}
|
|
29700
|
-
_create_class$
|
|
29695
|
+
_create_class$b(AxAIOpenAI, [
|
|
29701
29696
|
{
|
|
29702
29697
|
key: "getModelConfig",
|
|
29703
29698
|
value: function getModelConfig() {
|
|
@@ -29807,12 +29802,12 @@ function _assert_this_initialized$e(self) {
|
|
|
29807
29802
|
}
|
|
29808
29803
|
return self;
|
|
29809
29804
|
}
|
|
29810
|
-
function _class_call_check$
|
|
29805
|
+
function _class_call_check$n(instance, Constructor) {
|
|
29811
29806
|
if (!(instance instanceof Constructor)) {
|
|
29812
29807
|
throw new TypeError("Cannot call a class as a function");
|
|
29813
29808
|
}
|
|
29814
29809
|
}
|
|
29815
|
-
function _define_property$
|
|
29810
|
+
function _define_property$n(obj, key, value) {
|
|
29816
29811
|
if (key in obj) {
|
|
29817
29812
|
Object.defineProperty(obj, key, {
|
|
29818
29813
|
value: value,
|
|
@@ -29870,7 +29865,7 @@ function _object_spread$f(target) {
|
|
|
29870
29865
|
}));
|
|
29871
29866
|
}
|
|
29872
29867
|
ownKeys.forEach(function(key) {
|
|
29873
|
-
_define_property$
|
|
29868
|
+
_define_property$n(target, key, source[key]);
|
|
29874
29869
|
});
|
|
29875
29870
|
}
|
|
29876
29871
|
return target;
|
|
@@ -29929,7 +29924,7 @@ var AxAIAzureOpenAI = /*#__PURE__*/ function(AxAIOpenAI) {
|
|
|
29929
29924
|
var _super = _create_super$e(AxAIAzureOpenAI);
|
|
29930
29925
|
function AxAIAzureOpenAI(param) {
|
|
29931
29926
|
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;
|
|
29932
|
-
_class_call_check$
|
|
29927
|
+
_class_call_check$n(this, AxAIAzureOpenAI);
|
|
29933
29928
|
if (!apiKey || apiKey === "") {
|
|
29934
29929
|
throw new Error("Azure OpenAPI API key not set");
|
|
29935
29930
|
}
|
|
@@ -29973,12 +29968,12 @@ function _assert_this_initialized$d(self) {
|
|
|
29973
29968
|
}
|
|
29974
29969
|
return self;
|
|
29975
29970
|
}
|
|
29976
|
-
function _class_call_check$
|
|
29971
|
+
function _class_call_check$m(instance, Constructor) {
|
|
29977
29972
|
if (!(instance instanceof Constructor)) {
|
|
29978
29973
|
throw new TypeError("Cannot call a class as a function");
|
|
29979
29974
|
}
|
|
29980
29975
|
}
|
|
29981
|
-
function _defineProperties$
|
|
29976
|
+
function _defineProperties$a(target, props) {
|
|
29982
29977
|
for(var i = 0; i < props.length; i++){
|
|
29983
29978
|
var descriptor = props[i];
|
|
29984
29979
|
descriptor.enumerable = descriptor.enumerable || false;
|
|
@@ -29987,12 +29982,12 @@ function _defineProperties$b(target, props) {
|
|
|
29987
29982
|
Object.defineProperty(target, descriptor.key, descriptor);
|
|
29988
29983
|
}
|
|
29989
29984
|
}
|
|
29990
|
-
function _create_class$
|
|
29991
|
-
if (protoProps) _defineProperties$
|
|
29992
|
-
if (staticProps) _defineProperties$
|
|
29985
|
+
function _create_class$a(Constructor, protoProps, staticProps) {
|
|
29986
|
+
if (protoProps) _defineProperties$a(Constructor.prototype, protoProps);
|
|
29987
|
+
if (staticProps) _defineProperties$a(Constructor, staticProps);
|
|
29993
29988
|
return Constructor;
|
|
29994
29989
|
}
|
|
29995
|
-
function _define_property$
|
|
29990
|
+
function _define_property$m(obj, key, value) {
|
|
29996
29991
|
if (key in obj) {
|
|
29997
29992
|
Object.defineProperty(obj, key, {
|
|
29998
29993
|
value: value,
|
|
@@ -30034,7 +30029,7 @@ function _object_spread$e(target) {
|
|
|
30034
30029
|
}));
|
|
30035
30030
|
}
|
|
30036
30031
|
ownKeys.forEach(function(key) {
|
|
30037
|
-
_define_property$
|
|
30032
|
+
_define_property$m(target, key, source[key]);
|
|
30038
30033
|
});
|
|
30039
30034
|
}
|
|
30040
30035
|
return target;
|
|
@@ -30090,7 +30085,7 @@ var AxAIHuggingFace = /*#__PURE__*/ function(AxBaseAI) {
|
|
|
30090
30085
|
var _super = _create_super$d(AxAIHuggingFace);
|
|
30091
30086
|
function AxAIHuggingFace(param) {
|
|
30092
30087
|
var apiKey = param.apiKey, config = param.config, options = param.options;
|
|
30093
|
-
_class_call_check$
|
|
30088
|
+
_class_call_check$m(this, AxAIHuggingFace);
|
|
30094
30089
|
var _this;
|
|
30095
30090
|
if (!apiKey || apiKey === "") {
|
|
30096
30091
|
throw new Error("HuggingFace API key not set");
|
|
@@ -30112,8 +30107,8 @@ var AxAIHuggingFace = /*#__PURE__*/ function(AxBaseAI) {
|
|
|
30112
30107
|
streaming: false
|
|
30113
30108
|
}
|
|
30114
30109
|
});
|
|
30115
|
-
_define_property$
|
|
30116
|
-
_define_property$
|
|
30110
|
+
_define_property$m(_assert_this_initialized$d(_this), "config", void 0);
|
|
30111
|
+
_define_property$m(_assert_this_initialized$d(_this), "generateChatReq", function(req, // eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
30117
30112
|
_config) {
|
|
30118
30113
|
var _req_chatPrompt, _req_modelConfig, _req_modelConfig1, _req_modelConfig2, _req_modelConfig3, _req_modelConfig4;
|
|
30119
30114
|
var model = _this.config.model;
|
|
@@ -30172,7 +30167,7 @@ var AxAIHuggingFace = /*#__PURE__*/ function(AxBaseAI) {
|
|
|
30172
30167
|
reqValue
|
|
30173
30168
|
];
|
|
30174
30169
|
});
|
|
30175
|
-
_define_property$
|
|
30170
|
+
_define_property$m(_assert_this_initialized$d(_this), "generateChatResp", function(resp) {
|
|
30176
30171
|
return {
|
|
30177
30172
|
results: [
|
|
30178
30173
|
{
|
|
@@ -30184,7 +30179,7 @@ var AxAIHuggingFace = /*#__PURE__*/ function(AxBaseAI) {
|
|
|
30184
30179
|
_this.config = _config;
|
|
30185
30180
|
return _this;
|
|
30186
30181
|
}
|
|
30187
|
-
_create_class$
|
|
30182
|
+
_create_class$a(AxAIHuggingFace, [
|
|
30188
30183
|
{
|
|
30189
30184
|
key: "getModelConfig",
|
|
30190
30185
|
value: function getModelConfig() {
|
|
@@ -30212,12 +30207,12 @@ function _assert_this_initialized$c(self) {
|
|
|
30212
30207
|
}
|
|
30213
30208
|
return self;
|
|
30214
30209
|
}
|
|
30215
|
-
function _class_call_check$
|
|
30210
|
+
function _class_call_check$l(instance, Constructor) {
|
|
30216
30211
|
if (!(instance instanceof Constructor)) {
|
|
30217
30212
|
throw new TypeError("Cannot call a class as a function");
|
|
30218
30213
|
}
|
|
30219
30214
|
}
|
|
30220
|
-
function _define_property$
|
|
30215
|
+
function _define_property$l(obj, key, value) {
|
|
30221
30216
|
if (key in obj) {
|
|
30222
30217
|
Object.defineProperty(obj, key, {
|
|
30223
30218
|
value: value,
|
|
@@ -30275,7 +30270,7 @@ function _object_spread$d(target) {
|
|
|
30275
30270
|
}));
|
|
30276
30271
|
}
|
|
30277
30272
|
ownKeys.forEach(function(key) {
|
|
30278
|
-
_define_property$
|
|
30273
|
+
_define_property$l(target, key, source[key]);
|
|
30279
30274
|
});
|
|
30280
30275
|
}
|
|
30281
30276
|
return target;
|
|
@@ -30339,7 +30334,7 @@ var AxAITogether = /*#__PURE__*/ function(AxAIOpenAI) {
|
|
|
30339
30334
|
var _super = _create_super$c(AxAITogether);
|
|
30340
30335
|
function AxAITogether(param) {
|
|
30341
30336
|
var apiKey = param.apiKey, config = param.config, options = param.options;
|
|
30342
|
-
_class_call_check$
|
|
30337
|
+
_class_call_check$l(this, AxAITogether);
|
|
30343
30338
|
if (!apiKey || apiKey === "") {
|
|
30344
30339
|
throw new Error("Together API key not set");
|
|
30345
30340
|
}
|
|
@@ -30444,12 +30439,12 @@ function _assert_this_initialized$b(self) {
|
|
|
30444
30439
|
}
|
|
30445
30440
|
return self;
|
|
30446
30441
|
}
|
|
30447
|
-
function _class_call_check$
|
|
30442
|
+
function _class_call_check$k(instance, Constructor) {
|
|
30448
30443
|
if (!(instance instanceof Constructor)) {
|
|
30449
30444
|
throw new TypeError("Cannot call a class as a function");
|
|
30450
30445
|
}
|
|
30451
30446
|
}
|
|
30452
|
-
function _defineProperties$
|
|
30447
|
+
function _defineProperties$9(target, props) {
|
|
30453
30448
|
for(var i = 0; i < props.length; i++){
|
|
30454
30449
|
var descriptor = props[i];
|
|
30455
30450
|
descriptor.enumerable = descriptor.enumerable || false;
|
|
@@ -30458,12 +30453,12 @@ function _defineProperties$a(target, props) {
|
|
|
30458
30453
|
Object.defineProperty(target, descriptor.key, descriptor);
|
|
30459
30454
|
}
|
|
30460
30455
|
}
|
|
30461
|
-
function _create_class$
|
|
30462
|
-
if (protoProps) _defineProperties$
|
|
30463
|
-
if (staticProps) _defineProperties$
|
|
30456
|
+
function _create_class$9(Constructor, protoProps, staticProps) {
|
|
30457
|
+
if (protoProps) _defineProperties$9(Constructor.prototype, protoProps);
|
|
30458
|
+
if (staticProps) _defineProperties$9(Constructor, staticProps);
|
|
30464
30459
|
return Constructor;
|
|
30465
30460
|
}
|
|
30466
|
-
function _define_property$
|
|
30461
|
+
function _define_property$k(obj, key, value) {
|
|
30467
30462
|
if (key in obj) {
|
|
30468
30463
|
Object.defineProperty(obj, key, {
|
|
30469
30464
|
value: value,
|
|
@@ -30532,7 +30527,7 @@ function _object_spread$c(target) {
|
|
|
30532
30527
|
}));
|
|
30533
30528
|
}
|
|
30534
30529
|
ownKeys.forEach(function(key) {
|
|
30535
|
-
_define_property$
|
|
30530
|
+
_define_property$k(target, key, source[key]);
|
|
30536
30531
|
});
|
|
30537
30532
|
}
|
|
30538
30533
|
return target;
|
|
@@ -30624,7 +30619,7 @@ var AxAICohere = /*#__PURE__*/ function(AxBaseAI) {
|
|
|
30624
30619
|
var _super = _create_super$b(AxAICohere);
|
|
30625
30620
|
function AxAICohere(param) {
|
|
30626
30621
|
var apiKey = param.apiKey, config = param.config, options = param.options;
|
|
30627
|
-
_class_call_check$
|
|
30622
|
+
_class_call_check$k(this, AxAICohere);
|
|
30628
30623
|
var _this;
|
|
30629
30624
|
if (!apiKey || apiKey === "") {
|
|
30630
30625
|
throw new Error("Cohere API key not set");
|
|
@@ -30646,8 +30641,8 @@ var AxAICohere = /*#__PURE__*/ function(AxBaseAI) {
|
|
|
30646
30641
|
},
|
|
30647
30642
|
options: options
|
|
30648
30643
|
});
|
|
30649
|
-
_define_property$
|
|
30650
|
-
_define_property$
|
|
30644
|
+
_define_property$k(_assert_this_initialized$b(_this), "config", void 0);
|
|
30645
|
+
_define_property$k(_assert_this_initialized$b(_this), "generateChatReq", function(req, // eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
30651
30646
|
_config) {
|
|
30652
30647
|
var _req_functions, _req_modelConfig, _req_modelConfig1, _req_modelConfig2, _req_modelConfig3, _req_modelConfig4, _req_modelConfig5, _req_modelConfig6;
|
|
30653
30648
|
var model = _this.config.model;
|
|
@@ -30744,7 +30739,7 @@ var AxAICohere = /*#__PURE__*/ function(AxBaseAI) {
|
|
|
30744
30739
|
reqValue
|
|
30745
30740
|
];
|
|
30746
30741
|
});
|
|
30747
|
-
_define_property$
|
|
30742
|
+
_define_property$k(_assert_this_initialized$b(_this), "generateEmbedReq", function(req) {
|
|
30748
30743
|
var model = _this.config.embedModel;
|
|
30749
30744
|
if (!model) {
|
|
30750
30745
|
throw new Error("Embed model not set");
|
|
@@ -30767,7 +30762,7 @@ var AxAICohere = /*#__PURE__*/ function(AxBaseAI) {
|
|
|
30767
30762
|
reqValue
|
|
30768
30763
|
];
|
|
30769
30764
|
});
|
|
30770
|
-
_define_property$
|
|
30765
|
+
_define_property$k(_assert_this_initialized$b(_this), "generateChatResp", function(resp) {
|
|
30771
30766
|
var modelUsage = resp.meta.billed_units ? {
|
|
30772
30767
|
promptTokens: resp.meta.billed_units.input_tokens,
|
|
30773
30768
|
completionTokens: resp.meta.billed_units.output_tokens,
|
|
@@ -30819,7 +30814,7 @@ var AxAICohere = /*#__PURE__*/ function(AxBaseAI) {
|
|
|
30819
30814
|
remoteId: resp.response_id
|
|
30820
30815
|
};
|
|
30821
30816
|
});
|
|
30822
|
-
_define_property$
|
|
30817
|
+
_define_property$k(_assert_this_initialized$b(_this), "generateChatStreamResp", function(resp, state) {
|
|
30823
30818
|
var ss = state;
|
|
30824
30819
|
if (resp.event_type === "stream-start") {
|
|
30825
30820
|
ss.generation_id = resp.generation_id;
|
|
@@ -30835,7 +30830,7 @@ var AxAICohere = /*#__PURE__*/ function(AxBaseAI) {
|
|
|
30835
30830
|
results: results
|
|
30836
30831
|
};
|
|
30837
30832
|
});
|
|
30838
|
-
_define_property$
|
|
30833
|
+
_define_property$k(_assert_this_initialized$b(_this), "generateEmbedResp", function(resp) {
|
|
30839
30834
|
return {
|
|
30840
30835
|
remoteId: resp.id,
|
|
30841
30836
|
embeddings: resp.embeddings
|
|
@@ -30844,7 +30839,7 @@ var AxAICohere = /*#__PURE__*/ function(AxBaseAI) {
|
|
|
30844
30839
|
_this.config = _config;
|
|
30845
30840
|
return _this;
|
|
30846
30841
|
}
|
|
30847
|
-
_create_class$
|
|
30842
|
+
_create_class$9(AxAICohere, [
|
|
30848
30843
|
{
|
|
30849
30844
|
key: "getModelConfig",
|
|
30850
30845
|
value: function getModelConfig() {
|
|
@@ -31002,12 +30997,12 @@ function _assert_this_initialized$a(self) {
|
|
|
31002
30997
|
}
|
|
31003
30998
|
return self;
|
|
31004
30999
|
}
|
|
31005
|
-
function _class_call_check$
|
|
31000
|
+
function _class_call_check$j(instance, Constructor) {
|
|
31006
31001
|
if (!(instance instanceof Constructor)) {
|
|
31007
31002
|
throw new TypeError("Cannot call a class as a function");
|
|
31008
31003
|
}
|
|
31009
31004
|
}
|
|
31010
|
-
function _defineProperties$
|
|
31005
|
+
function _defineProperties$8(target, props) {
|
|
31011
31006
|
for(var i = 0; i < props.length; i++){
|
|
31012
31007
|
var descriptor = props[i];
|
|
31013
31008
|
descriptor.enumerable = descriptor.enumerable || false;
|
|
@@ -31016,12 +31011,12 @@ function _defineProperties$9(target, props) {
|
|
|
31016
31011
|
Object.defineProperty(target, descriptor.key, descriptor);
|
|
31017
31012
|
}
|
|
31018
31013
|
}
|
|
31019
|
-
function _create_class$
|
|
31020
|
-
if (protoProps) _defineProperties$
|
|
31021
|
-
if (staticProps) _defineProperties$
|
|
31014
|
+
function _create_class$8(Constructor, protoProps, staticProps) {
|
|
31015
|
+
if (protoProps) _defineProperties$8(Constructor.prototype, protoProps);
|
|
31016
|
+
if (staticProps) _defineProperties$8(Constructor, staticProps);
|
|
31022
31017
|
return Constructor;
|
|
31023
31018
|
}
|
|
31024
|
-
function _define_property$
|
|
31019
|
+
function _define_property$j(obj, key, value) {
|
|
31025
31020
|
if (key in obj) {
|
|
31026
31021
|
Object.defineProperty(obj, key, {
|
|
31027
31022
|
value: value,
|
|
@@ -31063,7 +31058,7 @@ function _object_spread$b(target) {
|
|
|
31063
31058
|
}));
|
|
31064
31059
|
}
|
|
31065
31060
|
ownKeys.forEach(function(key) {
|
|
31066
|
-
_define_property$
|
|
31061
|
+
_define_property$j(target, key, source[key]);
|
|
31067
31062
|
});
|
|
31068
31063
|
}
|
|
31069
31064
|
return target;
|
|
@@ -31145,7 +31140,7 @@ var safetySettings = [
|
|
|
31145
31140
|
var _super = _create_super$a(AxAIGoogleGemini);
|
|
31146
31141
|
function AxAIGoogleGemini(param) {
|
|
31147
31142
|
var apiKey = param.apiKey, projectId = param.projectId, region = param.region, config = param.config, options = param.options;
|
|
31148
|
-
_class_call_check$
|
|
31143
|
+
_class_call_check$j(this, AxAIGoogleGemini);
|
|
31149
31144
|
var _this;
|
|
31150
31145
|
if (!apiKey || apiKey === "") {
|
|
31151
31146
|
throw new Error("GoogleGemini AI API key not set");
|
|
@@ -31170,10 +31165,10 @@ var safetySettings = [
|
|
|
31170
31165
|
streaming: true
|
|
31171
31166
|
}
|
|
31172
31167
|
});
|
|
31173
|
-
_define_property$
|
|
31174
|
-
_define_property$
|
|
31175
|
-
_define_property$
|
|
31176
|
-
_define_property$
|
|
31168
|
+
_define_property$j(_assert_this_initialized$a(_this), "options", void 0);
|
|
31169
|
+
_define_property$j(_assert_this_initialized$a(_this), "config", void 0);
|
|
31170
|
+
_define_property$j(_assert_this_initialized$a(_this), "apiKey", void 0);
|
|
31171
|
+
_define_property$j(_assert_this_initialized$a(_this), "generateChatReq", function(req) {
|
|
31177
31172
|
var _req_modelConfig, _this_options, _req_modelConfig1, _req_modelConfig2, _req_modelConfig3, _req_modelConfig4, _req_modelConfig5;
|
|
31178
31173
|
var model = _this.config.model;
|
|
31179
31174
|
var _req_modelConfig_stream;
|
|
@@ -31354,7 +31349,7 @@ var safetySettings = [
|
|
|
31354
31349
|
reqValue
|
|
31355
31350
|
];
|
|
31356
31351
|
});
|
|
31357
|
-
_define_property$
|
|
31352
|
+
_define_property$j(_assert_this_initialized$a(_this), "generateEmbedReq", function(req) {
|
|
31358
31353
|
var model = _this.config.embedModel;
|
|
31359
31354
|
if (!model) {
|
|
31360
31355
|
throw new Error("Embed model not set");
|
|
@@ -31378,7 +31373,7 @@ var safetySettings = [
|
|
|
31378
31373
|
reqValue
|
|
31379
31374
|
];
|
|
31380
31375
|
});
|
|
31381
|
-
_define_property$
|
|
31376
|
+
_define_property$j(_assert_this_initialized$a(_this), "generateChatResp", function(resp) {
|
|
31382
31377
|
var _resp_candidates;
|
|
31383
31378
|
var results = (_resp_candidates = resp.candidates) === null || _resp_candidates === void 0 ? void 0 : _resp_candidates.map(function(candidate) {
|
|
31384
31379
|
var result = {};
|
|
@@ -31444,10 +31439,10 @@ var safetySettings = [
|
|
|
31444
31439
|
modelUsage: modelUsage
|
|
31445
31440
|
};
|
|
31446
31441
|
});
|
|
31447
|
-
_define_property$
|
|
31442
|
+
_define_property$j(_assert_this_initialized$a(_this), "generateChatStreamResp", function(resp) {
|
|
31448
31443
|
return _this.generateChatResp(resp);
|
|
31449
31444
|
});
|
|
31450
|
-
_define_property$
|
|
31445
|
+
_define_property$j(_assert_this_initialized$a(_this), "generateEmbedResp", function(resp) {
|
|
31451
31446
|
var embeddings = resp.embeddings.map(function(embedding) {
|
|
31452
31447
|
return embedding.value;
|
|
31453
31448
|
});
|
|
@@ -31460,7 +31455,7 @@ var safetySettings = [
|
|
|
31460
31455
|
_this.apiKey = apiKey;
|
|
31461
31456
|
return _this;
|
|
31462
31457
|
}
|
|
31463
|
-
_create_class$
|
|
31458
|
+
_create_class$8(AxAIGoogleGemini, [
|
|
31464
31459
|
{
|
|
31465
31460
|
key: "getModelConfig",
|
|
31466
31461
|
value: function getModelConfig() {
|
|
@@ -31541,12 +31536,12 @@ function _assert_this_initialized$9(self) {
|
|
|
31541
31536
|
}
|
|
31542
31537
|
return self;
|
|
31543
31538
|
}
|
|
31544
|
-
function _class_call_check$
|
|
31539
|
+
function _class_call_check$i(instance, Constructor) {
|
|
31545
31540
|
if (!(instance instanceof Constructor)) {
|
|
31546
31541
|
throw new TypeError("Cannot call a class as a function");
|
|
31547
31542
|
}
|
|
31548
31543
|
}
|
|
31549
|
-
function _defineProperties$
|
|
31544
|
+
function _defineProperties$7(target, props) {
|
|
31550
31545
|
for(var i = 0; i < props.length; i++){
|
|
31551
31546
|
var descriptor = props[i];
|
|
31552
31547
|
descriptor.enumerable = descriptor.enumerable || false;
|
|
@@ -31555,12 +31550,12 @@ function _defineProperties$8(target, props) {
|
|
|
31555
31550
|
Object.defineProperty(target, descriptor.key, descriptor);
|
|
31556
31551
|
}
|
|
31557
31552
|
}
|
|
31558
|
-
function _create_class$
|
|
31559
|
-
if (protoProps) _defineProperties$
|
|
31560
|
-
if (staticProps) _defineProperties$
|
|
31553
|
+
function _create_class$7(Constructor, protoProps, staticProps) {
|
|
31554
|
+
if (protoProps) _defineProperties$7(Constructor.prototype, protoProps);
|
|
31555
|
+
if (staticProps) _defineProperties$7(Constructor, staticProps);
|
|
31561
31556
|
return Constructor;
|
|
31562
31557
|
}
|
|
31563
|
-
function _define_property$
|
|
31558
|
+
function _define_property$i(obj, key, value) {
|
|
31564
31559
|
if (key in obj) {
|
|
31565
31560
|
Object.defineProperty(obj, key, {
|
|
31566
31561
|
value: value,
|
|
@@ -31629,7 +31624,7 @@ function _object_spread$a(target) {
|
|
|
31629
31624
|
}));
|
|
31630
31625
|
}
|
|
31631
31626
|
ownKeys.forEach(function(key) {
|
|
31632
|
-
_define_property$
|
|
31627
|
+
_define_property$i(target, key, source[key]);
|
|
31633
31628
|
});
|
|
31634
31629
|
}
|
|
31635
31630
|
return target;
|
|
@@ -31720,7 +31715,7 @@ var AxAIAnthropic = /*#__PURE__*/ function(AxBaseAI) {
|
|
|
31720
31715
|
var _super = _create_super$9(AxAIAnthropic);
|
|
31721
31716
|
function AxAIAnthropic(param) {
|
|
31722
31717
|
var apiKey = param.apiKey, config = param.config, options = param.options;
|
|
31723
|
-
_class_call_check$
|
|
31718
|
+
_class_call_check$i(this, AxAIAnthropic);
|
|
31724
31719
|
var _this;
|
|
31725
31720
|
if (!apiKey || apiKey === "") {
|
|
31726
31721
|
throw new Error("Anthropic API key not set");
|
|
@@ -31743,8 +31738,8 @@ var AxAIAnthropic = /*#__PURE__*/ function(AxBaseAI) {
|
|
|
31743
31738
|
streaming: true
|
|
31744
31739
|
}
|
|
31745
31740
|
});
|
|
31746
|
-
_define_property$
|
|
31747
|
-
_define_property$
|
|
31741
|
+
_define_property$i(_assert_this_initialized$9(_this), "config", void 0);
|
|
31742
|
+
_define_property$i(_assert_this_initialized$9(_this), "generateChatReq", function(req) {
|
|
31748
31743
|
var _req_functions, _req_modelConfig, _req_modelConfig1, _req_modelConfig2, _req_modelConfig3, _req_modelConfig4, _req_modelConfig5;
|
|
31749
31744
|
var model = _this.config.model;
|
|
31750
31745
|
var apiConfig = {
|
|
@@ -31783,7 +31778,7 @@ var AxAIAnthropic = /*#__PURE__*/ function(AxBaseAI) {
|
|
|
31783
31778
|
reqValue
|
|
31784
31779
|
];
|
|
31785
31780
|
});
|
|
31786
|
-
_define_property$
|
|
31781
|
+
_define_property$i(_assert_this_initialized$9(_this), "generateChatResp", function(resp) {
|
|
31787
31782
|
if (resp.type === "error") {
|
|
31788
31783
|
throw new Error("Anthropic Chat API Error: ".concat(resp.error.message));
|
|
31789
31784
|
}
|
|
@@ -31822,7 +31817,7 @@ var AxAIAnthropic = /*#__PURE__*/ function(AxBaseAI) {
|
|
|
31822
31817
|
remoteId: resp.id
|
|
31823
31818
|
};
|
|
31824
31819
|
});
|
|
31825
|
-
_define_property$
|
|
31820
|
+
_define_property$i(_assert_this_initialized$9(_this), "generateChatStreamResp", function(resp, state) {
|
|
31826
31821
|
if (!("type" in resp)) {
|
|
31827
31822
|
throw new Error("Invalid Anthropic streaming event");
|
|
31828
31823
|
}
|
|
@@ -31950,7 +31945,7 @@ var AxAIAnthropic = /*#__PURE__*/ function(AxBaseAI) {
|
|
|
31950
31945
|
_this.config = _config;
|
|
31951
31946
|
return _this;
|
|
31952
31947
|
}
|
|
31953
|
-
_create_class$
|
|
31948
|
+
_create_class$7(AxAIAnthropic, [
|
|
31954
31949
|
{
|
|
31955
31950
|
key: "getModelConfig",
|
|
31956
31951
|
value: function getModelConfig() {
|
|
@@ -32131,12 +32126,12 @@ function _async_to_generator$6(fn) {
|
|
|
32131
32126
|
});
|
|
32132
32127
|
};
|
|
32133
32128
|
}
|
|
32134
|
-
function _class_call_check$
|
|
32129
|
+
function _class_call_check$h(instance, Constructor) {
|
|
32135
32130
|
if (!(instance instanceof Constructor)) {
|
|
32136
32131
|
throw new TypeError("Cannot call a class as a function");
|
|
32137
32132
|
}
|
|
32138
32133
|
}
|
|
32139
|
-
function _defineProperties$
|
|
32134
|
+
function _defineProperties$6(target, props) {
|
|
32140
32135
|
for(var i = 0; i < props.length; i++){
|
|
32141
32136
|
var descriptor = props[i];
|
|
32142
32137
|
descriptor.enumerable = descriptor.enumerable || false;
|
|
@@ -32145,12 +32140,12 @@ function _defineProperties$7(target, props) {
|
|
|
32145
32140
|
Object.defineProperty(target, descriptor.key, descriptor);
|
|
32146
32141
|
}
|
|
32147
32142
|
}
|
|
32148
|
-
function _create_class$
|
|
32149
|
-
if (protoProps) _defineProperties$
|
|
32150
|
-
if (staticProps) _defineProperties$
|
|
32143
|
+
function _create_class$6(Constructor, protoProps, staticProps) {
|
|
32144
|
+
if (protoProps) _defineProperties$6(Constructor.prototype, protoProps);
|
|
32145
|
+
if (staticProps) _defineProperties$6(Constructor, staticProps);
|
|
32151
32146
|
return Constructor;
|
|
32152
32147
|
}
|
|
32153
|
-
function _define_property$
|
|
32148
|
+
function _define_property$h(obj, key, value) {
|
|
32154
32149
|
if (key in obj) {
|
|
32155
32150
|
Object.defineProperty(obj, key, {
|
|
32156
32151
|
value: value,
|
|
@@ -32261,19 +32256,19 @@ function _ts_generator$7(thisArg, body) {
|
|
|
32261
32256
|
var colorLog = new ColorLog();
|
|
32262
32257
|
var AxRateLimiterTokenUsage = /*#__PURE__*/ function() {
|
|
32263
32258
|
function AxRateLimiterTokenUsage(maxTokens, refillRate, options) {
|
|
32264
|
-
_class_call_check$
|
|
32265
|
-
_define_property$
|
|
32266
|
-
_define_property$
|
|
32267
|
-
_define_property$
|
|
32268
|
-
_define_property$
|
|
32269
|
-
_define_property$
|
|
32259
|
+
_class_call_check$h(this, AxRateLimiterTokenUsage);
|
|
32260
|
+
_define_property$h(this, "options", void 0);
|
|
32261
|
+
_define_property$h(this, "maxTokens", void 0);
|
|
32262
|
+
_define_property$h(this, "refillRate", void 0);
|
|
32263
|
+
_define_property$h(this, "currentTokens", void 0);
|
|
32264
|
+
_define_property$h(this, "lastRefillTime", void 0);
|
|
32270
32265
|
this.maxTokens = maxTokens;
|
|
32271
32266
|
this.refillRate = refillRate;
|
|
32272
32267
|
this.currentTokens = maxTokens;
|
|
32273
32268
|
this.lastRefillTime = Date.now();
|
|
32274
32269
|
this.options = options;
|
|
32275
32270
|
}
|
|
32276
|
-
_create_class$
|
|
32271
|
+
_create_class$6(AxRateLimiterTokenUsage, [
|
|
32277
32272
|
{
|
|
32278
32273
|
key: "refillTokens",
|
|
32279
32274
|
value: function refillTokens() {
|
|
@@ -32399,12 +32394,12 @@ function _async_to_generator$5(fn) {
|
|
|
32399
32394
|
});
|
|
32400
32395
|
};
|
|
32401
32396
|
}
|
|
32402
|
-
function _class_call_check$
|
|
32397
|
+
function _class_call_check$g(instance, Constructor) {
|
|
32403
32398
|
if (!(instance instanceof Constructor)) {
|
|
32404
32399
|
throw new TypeError("Cannot call a class as a function");
|
|
32405
32400
|
}
|
|
32406
32401
|
}
|
|
32407
|
-
function _define_property$
|
|
32402
|
+
function _define_property$g(obj, key, value) {
|
|
32408
32403
|
if (key in obj) {
|
|
32409
32404
|
Object.defineProperty(obj, key, {
|
|
32410
32405
|
value: value,
|
|
@@ -32462,7 +32457,7 @@ function _object_spread$9(target) {
|
|
|
32462
32457
|
}));
|
|
32463
32458
|
}
|
|
32464
32459
|
ownKeys.forEach(function(key) {
|
|
32465
|
-
_define_property$
|
|
32460
|
+
_define_property$g(target, key, source[key]);
|
|
32466
32461
|
});
|
|
32467
32462
|
}
|
|
32468
32463
|
return target;
|
|
@@ -32644,7 +32639,7 @@ var AxAIGroq = /*#__PURE__*/ function(AxAIOpenAI) {
|
|
|
32644
32639
|
var _super = _create_super$8(AxAIGroq);
|
|
32645
32640
|
function AxAIGroq(param) {
|
|
32646
32641
|
var apiKey = param.apiKey, config = param.config, options = param.options;
|
|
32647
|
-
_class_call_check$
|
|
32642
|
+
_class_call_check$g(this, AxAIGroq);
|
|
32648
32643
|
var _this;
|
|
32649
32644
|
if (!apiKey || apiKey === "") {
|
|
32650
32645
|
throw new Error("Groq API key not set");
|
|
@@ -32660,13 +32655,13 @@ var AxAIGroq = /*#__PURE__*/ function(AxAIOpenAI) {
|
|
|
32660
32655
|
apiURL: "https://api.groq.com/openai/v1",
|
|
32661
32656
|
modelInfo: []
|
|
32662
32657
|
});
|
|
32663
|
-
_define_property$
|
|
32658
|
+
_define_property$g(_assert_this_initialized$8(_this), "setOptions", function(options) {
|
|
32664
32659
|
var rateLimiter = _this.newRateLimiter(options);
|
|
32665
32660
|
_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), {
|
|
32666
32661
|
rateLimiter: rateLimiter
|
|
32667
32662
|
}));
|
|
32668
32663
|
});
|
|
32669
|
-
_define_property$
|
|
32664
|
+
_define_property$g(_assert_this_initialized$8(_this), "newRateLimiter", function(options) {
|
|
32670
32665
|
if (options === null || options === void 0 ? void 0 : options.rateLimiter) {
|
|
32671
32666
|
return options.rateLimiter;
|
|
32672
32667
|
}
|
|
@@ -32766,12 +32761,12 @@ function _assert_this_initialized$7(self) {
|
|
|
32766
32761
|
}
|
|
32767
32762
|
return self;
|
|
32768
32763
|
}
|
|
32769
|
-
function _class_call_check$
|
|
32764
|
+
function _class_call_check$f(instance, Constructor) {
|
|
32770
32765
|
if (!(instance instanceof Constructor)) {
|
|
32771
32766
|
throw new TypeError("Cannot call a class as a function");
|
|
32772
32767
|
}
|
|
32773
32768
|
}
|
|
32774
|
-
function _define_property$
|
|
32769
|
+
function _define_property$f(obj, key, value) {
|
|
32775
32770
|
if (key in obj) {
|
|
32776
32771
|
Object.defineProperty(obj, key, {
|
|
32777
32772
|
value: value,
|
|
@@ -32829,7 +32824,7 @@ function _object_spread$8(target) {
|
|
|
32829
32824
|
}));
|
|
32830
32825
|
}
|
|
32831
32826
|
ownKeys.forEach(function(key) {
|
|
32832
|
-
_define_property$
|
|
32827
|
+
_define_property$f(target, key, source[key]);
|
|
32833
32828
|
});
|
|
32834
32829
|
}
|
|
32835
32830
|
return target;
|
|
@@ -32892,7 +32887,7 @@ var AxAIMistral = /*#__PURE__*/ function(AxAIOpenAI) {
|
|
|
32892
32887
|
var _super = _create_super$7(AxAIMistral);
|
|
32893
32888
|
function AxAIMistral(param) {
|
|
32894
32889
|
var apiKey = param.apiKey, config = param.config, options = param.options;
|
|
32895
|
-
_class_call_check$
|
|
32890
|
+
_class_call_check$f(this, AxAIMistral);
|
|
32896
32891
|
if (!apiKey || apiKey === "") {
|
|
32897
32892
|
throw new Error("Mistral API key not set");
|
|
32898
32893
|
}
|
|
@@ -32941,12 +32936,12 @@ function _assert_this_initialized$6(self) {
|
|
|
32941
32936
|
}
|
|
32942
32937
|
return self;
|
|
32943
32938
|
}
|
|
32944
|
-
function _class_call_check$
|
|
32939
|
+
function _class_call_check$e(instance, Constructor) {
|
|
32945
32940
|
if (!(instance instanceof Constructor)) {
|
|
32946
32941
|
throw new TypeError("Cannot call a class as a function");
|
|
32947
32942
|
}
|
|
32948
32943
|
}
|
|
32949
|
-
function _define_property$
|
|
32944
|
+
function _define_property$e(obj, key, value) {
|
|
32950
32945
|
if (key in obj) {
|
|
32951
32946
|
Object.defineProperty(obj, key, {
|
|
32952
32947
|
value: value,
|
|
@@ -33004,7 +32999,7 @@ function _object_spread$7(target) {
|
|
|
33004
32999
|
}));
|
|
33005
33000
|
}
|
|
33006
33001
|
ownKeys.forEach(function(key) {
|
|
33007
|
-
_define_property$
|
|
33002
|
+
_define_property$e(target, key, source[key]);
|
|
33008
33003
|
});
|
|
33009
33004
|
}
|
|
33010
33005
|
return target;
|
|
@@ -33067,7 +33062,7 @@ var AxAIDeepSeek = /*#__PURE__*/ function(AxAIOpenAI) {
|
|
|
33067
33062
|
var _super = _create_super$6(AxAIDeepSeek);
|
|
33068
33063
|
function AxAIDeepSeek(param) {
|
|
33069
33064
|
var apiKey = param.apiKey, config = param.config, options = param.options;
|
|
33070
|
-
_class_call_check$
|
|
33065
|
+
_class_call_check$e(this, AxAIDeepSeek);
|
|
33071
33066
|
if (!apiKey || apiKey === "") {
|
|
33072
33067
|
throw new Error("DeepSeek API key not set");
|
|
33073
33068
|
}
|
|
@@ -33092,12 +33087,12 @@ function _assert_this_initialized$5(self) {
|
|
|
33092
33087
|
}
|
|
33093
33088
|
return self;
|
|
33094
33089
|
}
|
|
33095
|
-
function _class_call_check$
|
|
33090
|
+
function _class_call_check$d(instance, Constructor) {
|
|
33096
33091
|
if (!(instance instanceof Constructor)) {
|
|
33097
33092
|
throw new TypeError("Cannot call a class as a function");
|
|
33098
33093
|
}
|
|
33099
33094
|
}
|
|
33100
|
-
function _define_property$
|
|
33095
|
+
function _define_property$d(obj, key, value) {
|
|
33101
33096
|
if (key in obj) {
|
|
33102
33097
|
Object.defineProperty(obj, key, {
|
|
33103
33098
|
value: value,
|
|
@@ -33155,7 +33150,7 @@ function _object_spread$6(target) {
|
|
|
33155
33150
|
}));
|
|
33156
33151
|
}
|
|
33157
33152
|
ownKeys.forEach(function(key) {
|
|
33158
|
-
_define_property$
|
|
33153
|
+
_define_property$d(target, key, source[key]);
|
|
33159
33154
|
});
|
|
33160
33155
|
}
|
|
33161
33156
|
return target;
|
|
@@ -33246,7 +33241,7 @@ var axAIOllamaDefaultConfig = function() {
|
|
|
33246
33241
|
var _super = _create_super$5(AxAIOllama);
|
|
33247
33242
|
function AxAIOllama(param) {
|
|
33248
33243
|
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;
|
|
33249
|
-
_class_call_check$
|
|
33244
|
+
_class_call_check$d(this, AxAIOllama);
|
|
33250
33245
|
var _config = _object_spread$6({}, axAIOllamaDefaultConfig(), config);
|
|
33251
33246
|
var _this = _super.call(this, {
|
|
33252
33247
|
apiKey: apiKey,
|
|
@@ -33290,12 +33285,12 @@ function _async_to_generator$4(fn) {
|
|
|
33290
33285
|
});
|
|
33291
33286
|
};
|
|
33292
33287
|
}
|
|
33293
|
-
function _class_call_check$
|
|
33288
|
+
function _class_call_check$c(instance, Constructor) {
|
|
33294
33289
|
if (!(instance instanceof Constructor)) {
|
|
33295
33290
|
throw new TypeError("Cannot call a class as a function");
|
|
33296
33291
|
}
|
|
33297
33292
|
}
|
|
33298
|
-
function _defineProperties$
|
|
33293
|
+
function _defineProperties$5(target, props) {
|
|
33299
33294
|
for(var i = 0; i < props.length; i++){
|
|
33300
33295
|
var descriptor = props[i];
|
|
33301
33296
|
descriptor.enumerable = descriptor.enumerable || false;
|
|
@@ -33304,12 +33299,12 @@ function _defineProperties$6(target, props) {
|
|
|
33304
33299
|
Object.defineProperty(target, descriptor.key, descriptor);
|
|
33305
33300
|
}
|
|
33306
33301
|
}
|
|
33307
|
-
function _create_class$
|
|
33308
|
-
if (protoProps) _defineProperties$
|
|
33309
|
-
if (staticProps) _defineProperties$
|
|
33302
|
+
function _create_class$5(Constructor, protoProps, staticProps) {
|
|
33303
|
+
if (protoProps) _defineProperties$5(Constructor.prototype, protoProps);
|
|
33304
|
+
if (staticProps) _defineProperties$5(Constructor, staticProps);
|
|
33310
33305
|
return Constructor;
|
|
33311
33306
|
}
|
|
33312
|
-
function _define_property$
|
|
33307
|
+
function _define_property$c(obj, key, value) {
|
|
33313
33308
|
if (key in obj) {
|
|
33314
33309
|
Object.defineProperty(obj, key, {
|
|
33315
33310
|
value: value,
|
|
@@ -33419,8 +33414,8 @@ function _ts_generator$5(thisArg, body) {
|
|
|
33419
33414
|
}
|
|
33420
33415
|
var AxAI = /*#__PURE__*/ function() {
|
|
33421
33416
|
function AxAI(options) {
|
|
33422
|
-
_class_call_check$
|
|
33423
|
-
_define_property$
|
|
33417
|
+
_class_call_check$c(this, AxAI);
|
|
33418
|
+
_define_property$c(this, "ai", void 0);
|
|
33424
33419
|
switch(options.name){
|
|
33425
33420
|
case "openai":
|
|
33426
33421
|
this.ai = new AxAIOpenAI(options);
|
|
@@ -33459,7 +33454,7 @@ var AxAI = /*#__PURE__*/ function() {
|
|
|
33459
33454
|
throw new Error("Unknown AI");
|
|
33460
33455
|
}
|
|
33461
33456
|
}
|
|
33462
|
-
_create_class$
|
|
33457
|
+
_create_class$5(AxAI, [
|
|
33463
33458
|
{
|
|
33464
33459
|
key: "setModelMap",
|
|
33465
33460
|
value: function setModelMap(modelMap) {
|
|
@@ -33565,12 +33560,12 @@ function _array_like_to_array$5(arr, len) {
|
|
|
33565
33560
|
function _array_without_holes$4(arr) {
|
|
33566
33561
|
if (Array.isArray(arr)) return _array_like_to_array$5(arr);
|
|
33567
33562
|
}
|
|
33568
|
-
function _class_call_check$
|
|
33563
|
+
function _class_call_check$b(instance, Constructor) {
|
|
33569
33564
|
if (!(instance instanceof Constructor)) {
|
|
33570
33565
|
throw new TypeError("Cannot call a class as a function");
|
|
33571
33566
|
}
|
|
33572
33567
|
}
|
|
33573
|
-
function _defineProperties$
|
|
33568
|
+
function _defineProperties$4(target, props) {
|
|
33574
33569
|
for(var i = 0; i < props.length; i++){
|
|
33575
33570
|
var descriptor = props[i];
|
|
33576
33571
|
descriptor.enumerable = descriptor.enumerable || false;
|
|
@@ -33579,12 +33574,12 @@ function _defineProperties$5(target, props) {
|
|
|
33579
33574
|
Object.defineProperty(target, descriptor.key, descriptor);
|
|
33580
33575
|
}
|
|
33581
33576
|
}
|
|
33582
|
-
function _create_class$
|
|
33583
|
-
if (protoProps) _defineProperties$
|
|
33584
|
-
if (staticProps) _defineProperties$
|
|
33577
|
+
function _create_class$4(Constructor, protoProps, staticProps) {
|
|
33578
|
+
if (protoProps) _defineProperties$4(Constructor.prototype, protoProps);
|
|
33579
|
+
if (staticProps) _defineProperties$4(Constructor, staticProps);
|
|
33585
33580
|
return Constructor;
|
|
33586
33581
|
}
|
|
33587
|
-
function _define_property$
|
|
33582
|
+
function _define_property$b(obj, key, value) {
|
|
33588
33583
|
if (key in obj) {
|
|
33589
33584
|
Object.defineProperty(obj, key, {
|
|
33590
33585
|
value: value,
|
|
@@ -33613,7 +33608,7 @@ function _object_spread$5(target) {
|
|
|
33613
33608
|
}));
|
|
33614
33609
|
}
|
|
33615
33610
|
ownKeys.forEach(function(key) {
|
|
33616
|
-
_define_property$
|
|
33611
|
+
_define_property$b(target, key, source[key]);
|
|
33617
33612
|
});
|
|
33618
33613
|
}
|
|
33619
33614
|
return target;
|
|
@@ -33632,16 +33627,16 @@ function _unsupported_iterable_to_array$5(o, minLen) {
|
|
|
33632
33627
|
var AxMemory = /*#__PURE__*/ function() {
|
|
33633
33628
|
function AxMemory() {
|
|
33634
33629
|
var limit = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : 50;
|
|
33635
|
-
_class_call_check$
|
|
33636
|
-
_define_property$
|
|
33637
|
-
_define_property$
|
|
33638
|
-
_define_property$
|
|
33630
|
+
_class_call_check$b(this, AxMemory);
|
|
33631
|
+
_define_property$b(this, "data", []);
|
|
33632
|
+
_define_property$b(this, "sdata", new Map());
|
|
33633
|
+
_define_property$b(this, "limit", void 0);
|
|
33639
33634
|
if (limit <= 0) {
|
|
33640
33635
|
throw Error("argument 'last' must be greater than 0");
|
|
33641
33636
|
}
|
|
33642
33637
|
this.limit = limit;
|
|
33643
33638
|
}
|
|
33644
|
-
_create_class$
|
|
33639
|
+
_create_class$4(AxMemory, [
|
|
33645
33640
|
{
|
|
33646
33641
|
key: "add",
|
|
33647
33642
|
value: function add(value, sessionId) {
|
|
@@ -33790,7 +33785,7 @@ function _assert_this_initialized$4(self) {
|
|
|
33790
33785
|
}
|
|
33791
33786
|
return self;
|
|
33792
33787
|
}
|
|
33793
|
-
function _class_call_check$
|
|
33788
|
+
function _class_call_check$a(instance, Constructor) {
|
|
33794
33789
|
if (!(instance instanceof Constructor)) {
|
|
33795
33790
|
throw new TypeError("Cannot call a class as a function");
|
|
33796
33791
|
}
|
|
@@ -33812,7 +33807,7 @@ function _construct$1(Parent, args, Class) {
|
|
|
33812
33807
|
}
|
|
33813
33808
|
return _construct$1.apply(null, arguments);
|
|
33814
33809
|
}
|
|
33815
|
-
function _define_property$
|
|
33810
|
+
function _define_property$a(obj, key, value) {
|
|
33816
33811
|
if (key in obj) {
|
|
33817
33812
|
Object.defineProperty(obj, key, {
|
|
33818
33813
|
value: value,
|
|
@@ -33919,19 +33914,19 @@ var AxAssertionError = /*#__PURE__*/ function(Error1) {
|
|
|
33919
33914
|
var _super = _create_super$4(AxAssertionError);
|
|
33920
33915
|
function AxAssertionError(param) {
|
|
33921
33916
|
var message = param.message, values = param.values, optional = param.optional;
|
|
33922
|
-
_class_call_check$
|
|
33917
|
+
_class_call_check$a(this, AxAssertionError);
|
|
33923
33918
|
var _this;
|
|
33924
33919
|
_this = _super.call(this, message);
|
|
33925
|
-
_define_property$
|
|
33926
|
-
_define_property$
|
|
33927
|
-
_define_property$
|
|
33920
|
+
_define_property$a(_assert_this_initialized$4(_this), "values", void 0);
|
|
33921
|
+
_define_property$a(_assert_this_initialized$4(_this), "optional", void 0);
|
|
33922
|
+
_define_property$a(_assert_this_initialized$4(_this), "getValue", function() {
|
|
33928
33923
|
return _this.values;
|
|
33929
33924
|
});
|
|
33930
|
-
_define_property$
|
|
33925
|
+
_define_property$a(_assert_this_initialized$4(_this), "getOptional", function() {
|
|
33931
33926
|
return _this.optional;
|
|
33932
33927
|
});
|
|
33933
33928
|
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
33934
|
-
_define_property$
|
|
33929
|
+
_define_property$a(_assert_this_initialized$4(_this), "getFixingInstructions", function(_sig) {
|
|
33935
33930
|
var extraFields = [];
|
|
33936
33931
|
// for (const f of sig.getOutputFields()) {
|
|
33937
33932
|
// extraFields.push({
|
|
@@ -35281,7 +35276,7 @@ var lib = JSON5;
|
|
|
35281
35276
|
}
|
|
35282
35277
|
return self;
|
|
35283
35278
|
}
|
|
35284
|
-
function _class_call_check$
|
|
35279
|
+
function _class_call_check$9(instance, Constructor) {
|
|
35285
35280
|
if (!(instance instanceof Constructor)) {
|
|
35286
35281
|
throw new TypeError("Cannot call a class as a function");
|
|
35287
35282
|
}
|
|
@@ -35303,7 +35298,7 @@ function _construct(Parent, args, Class) {
|
|
|
35303
35298
|
}
|
|
35304
35299
|
return _construct.apply(null, arguments);
|
|
35305
35300
|
}
|
|
35306
|
-
function _define_property$
|
|
35301
|
+
function _define_property$9(obj, key, value) {
|
|
35307
35302
|
if (key in obj) {
|
|
35308
35303
|
Object.defineProperty(obj, key, {
|
|
35309
35304
|
value: value,
|
|
@@ -35558,18 +35553,18 @@ var ValidationError = /*#__PURE__*/ function(Error1) {
|
|
|
35558
35553
|
var _super = _create_super$3(ValidationError);
|
|
35559
35554
|
function ValidationError(param) {
|
|
35560
35555
|
var message = param.message, field = param.field, value = param.value;
|
|
35561
|
-
_class_call_check$
|
|
35556
|
+
_class_call_check$9(this, ValidationError);
|
|
35562
35557
|
var _this;
|
|
35563
35558
|
_this = _super.call(this, message);
|
|
35564
|
-
_define_property$
|
|
35565
|
-
_define_property$
|
|
35566
|
-
_define_property$
|
|
35559
|
+
_define_property$9(_assert_this_initialized$3(_this), "field", void 0);
|
|
35560
|
+
_define_property$9(_assert_this_initialized$3(_this), "value", void 0);
|
|
35561
|
+
_define_property$9(_assert_this_initialized$3(_this), "getField", function() {
|
|
35567
35562
|
return _this.field;
|
|
35568
35563
|
});
|
|
35569
|
-
_define_property$
|
|
35564
|
+
_define_property$9(_assert_this_initialized$3(_this), "getValue", function() {
|
|
35570
35565
|
return _this.value;
|
|
35571
35566
|
});
|
|
35572
|
-
_define_property$
|
|
35567
|
+
_define_property$9(_assert_this_initialized$3(_this), "getFixingInstructions", function() {
|
|
35573
35568
|
var f = _this.field;
|
|
35574
35569
|
var extraFields = [
|
|
35575
35570
|
{
|
|
@@ -35731,12 +35726,12 @@ function _async_to_generator$3(fn) {
|
|
|
35731
35726
|
});
|
|
35732
35727
|
};
|
|
35733
35728
|
}
|
|
35734
|
-
function _class_call_check$
|
|
35729
|
+
function _class_call_check$8(instance, Constructor) {
|
|
35735
35730
|
if (!(instance instanceof Constructor)) {
|
|
35736
35731
|
throw new TypeError("Cannot call a class as a function");
|
|
35737
35732
|
}
|
|
35738
35733
|
}
|
|
35739
|
-
function _define_property$
|
|
35734
|
+
function _define_property$8(obj, key, value) {
|
|
35740
35735
|
if (key in obj) {
|
|
35741
35736
|
Object.defineProperty(obj, key, {
|
|
35742
35737
|
value: value,
|
|
@@ -35845,9 +35840,9 @@ function _ts_generator$4(thisArg, body) {
|
|
|
35845
35840
|
}
|
|
35846
35841
|
}
|
|
35847
35842
|
var AxFunctionProcessor = function AxFunctionProcessor(funcList) {
|
|
35848
|
-
_class_call_check$
|
|
35849
|
-
_define_property$
|
|
35850
|
-
_define_property$
|
|
35843
|
+
_class_call_check$8(this, AxFunctionProcessor);
|
|
35844
|
+
_define_property$8(this, "funcList", void 0);
|
|
35845
|
+
_define_property$8(this, "executeFunction", function() {
|
|
35851
35846
|
var _ref = _async_to_generator$3(function(fnSpec, func, options) {
|
|
35852
35847
|
var args, opt, res, _tmp, res1, _tmp1;
|
|
35853
35848
|
return _ts_generator$4(this, function(_state) {
|
|
@@ -35940,7 +35935,7 @@ var AxFunctionProcessor = function AxFunctionProcessor(funcList) {
|
|
|
35940
35935
|
};
|
|
35941
35936
|
}());
|
|
35942
35937
|
var _this = this;
|
|
35943
|
-
_define_property$
|
|
35938
|
+
_define_property$8(this, "execute", function() {
|
|
35944
35939
|
var _ref = _async_to_generator$3(function(func, options) {
|
|
35945
35940
|
var fnSpec;
|
|
35946
35941
|
return _ts_generator$4(this, function(_state) {
|
|
@@ -35981,12 +35976,12 @@ var AxFunctionProcessor = function AxFunctionProcessor(funcList) {
|
|
|
35981
35976
|
}
|
|
35982
35977
|
;
|
|
35983
35978
|
|
|
35984
|
-
function _class_call_check$
|
|
35979
|
+
function _class_call_check$7(instance, Constructor) {
|
|
35985
35980
|
if (!(instance instanceof Constructor)) {
|
|
35986
35981
|
throw new TypeError("Cannot call a class as a function");
|
|
35987
35982
|
}
|
|
35988
35983
|
}
|
|
35989
|
-
function _defineProperties$
|
|
35984
|
+
function _defineProperties$3(target, props) {
|
|
35990
35985
|
for(var i = 0; i < props.length; i++){
|
|
35991
35986
|
var descriptor = props[i];
|
|
35992
35987
|
descriptor.enumerable = descriptor.enumerable || false;
|
|
@@ -35995,12 +35990,12 @@ function _defineProperties$4(target, props) {
|
|
|
35995
35990
|
Object.defineProperty(target, descriptor.key, descriptor);
|
|
35996
35991
|
}
|
|
35997
35992
|
}
|
|
35998
|
-
function _create_class$
|
|
35999
|
-
if (protoProps) _defineProperties$
|
|
36000
|
-
if (staticProps) _defineProperties$
|
|
35993
|
+
function _create_class$3(Constructor, protoProps, staticProps) {
|
|
35994
|
+
if (protoProps) _defineProperties$3(Constructor.prototype, protoProps);
|
|
35995
|
+
if (staticProps) _defineProperties$3(Constructor, staticProps);
|
|
36001
35996
|
return Constructor;
|
|
36002
35997
|
}
|
|
36003
|
-
function _define_property$
|
|
35998
|
+
function _define_property$7(obj, key, value) {
|
|
36004
35999
|
if (key in obj) {
|
|
36005
36000
|
Object.defineProperty(obj, key, {
|
|
36006
36001
|
value: value,
|
|
@@ -36111,12 +36106,12 @@ function _ts_generator$3(thisArg, body) {
|
|
|
36111
36106
|
var _Symbol_iterator = Symbol.iterator;
|
|
36112
36107
|
var AxInstanceRegistry = /*#__PURE__*/ function() {
|
|
36113
36108
|
function AxInstanceRegistry() {
|
|
36114
|
-
_class_call_check$
|
|
36115
|
-
_define_property$
|
|
36109
|
+
_class_call_check$7(this, AxInstanceRegistry);
|
|
36110
|
+
_define_property$7(this, "reg", void 0 // To track keys for iteration
|
|
36116
36111
|
);
|
|
36117
36112
|
this.reg = new Set();
|
|
36118
36113
|
}
|
|
36119
|
-
_create_class$
|
|
36114
|
+
_create_class$3(AxInstanceRegistry, [
|
|
36120
36115
|
{
|
|
36121
36116
|
key: "register",
|
|
36122
36117
|
value: function register(instance) {
|
|
@@ -37657,12 +37652,12 @@ function _array_like_to_array$4(arr, len) {
|
|
|
37657
37652
|
function _array_with_holes(arr) {
|
|
37658
37653
|
if (Array.isArray(arr)) return arr;
|
|
37659
37654
|
}
|
|
37660
|
-
function _class_call_check$
|
|
37655
|
+
function _class_call_check$6(instance, Constructor) {
|
|
37661
37656
|
if (!(instance instanceof Constructor)) {
|
|
37662
37657
|
throw new TypeError("Cannot call a class as a function");
|
|
37663
37658
|
}
|
|
37664
37659
|
}
|
|
37665
|
-
function _define_property$
|
|
37660
|
+
function _define_property$6(obj, key, value) {
|
|
37666
37661
|
if (key in obj) {
|
|
37667
37662
|
Object.defineProperty(obj, key, {
|
|
37668
37663
|
value: value,
|
|
@@ -37719,7 +37714,7 @@ function _object_spread$4(target) {
|
|
|
37719
37714
|
}));
|
|
37720
37715
|
}
|
|
37721
37716
|
ownKeys.forEach(function(key) {
|
|
37722
|
-
_define_property$
|
|
37717
|
+
_define_property$6(target, key, source[key]);
|
|
37723
37718
|
});
|
|
37724
37719
|
}
|
|
37725
37720
|
return target;
|
|
@@ -37761,13 +37756,13 @@ function _unsupported_iterable_to_array$4(o, minLen) {
|
|
|
37761
37756
|
}
|
|
37762
37757
|
var AxSignature = function AxSignature(signature) {
|
|
37763
37758
|
var _this = this;
|
|
37764
|
-
_class_call_check$
|
|
37765
|
-
_define_property$
|
|
37766
|
-
_define_property$
|
|
37767
|
-
_define_property$
|
|
37768
|
-
_define_property$
|
|
37769
|
-
_define_property$
|
|
37770
|
-
_define_property$
|
|
37759
|
+
_class_call_check$6(this, AxSignature);
|
|
37760
|
+
_define_property$6(this, "description", void 0);
|
|
37761
|
+
_define_property$6(this, "inputFields", void 0);
|
|
37762
|
+
_define_property$6(this, "outputFields", void 0);
|
|
37763
|
+
_define_property$6(this, "sigHash", void 0);
|
|
37764
|
+
_define_property$6(this, "sigString", void 0);
|
|
37765
|
+
_define_property$6(this, "parseParsedField", function(field) {
|
|
37771
37766
|
if (!field.name || field.name.length === 0) {
|
|
37772
37767
|
throw new Error("Field name is required.");
|
|
37773
37768
|
}
|
|
@@ -37784,7 +37779,7 @@ var AxSignature = function AxSignature(signature) {
|
|
|
37784
37779
|
}
|
|
37785
37780
|
};
|
|
37786
37781
|
});
|
|
37787
|
-
_define_property$
|
|
37782
|
+
_define_property$6(this, "parseField", function(field) {
|
|
37788
37783
|
var title = !field.title || field.title.length === 0 ? _this.toTitle(field.name) : field.title;
|
|
37789
37784
|
if (field.type && (!field.type.name || field.type.name.length === 0)) {
|
|
37790
37785
|
throw new Error("Field type name is required: " + field.name);
|
|
@@ -37793,45 +37788,45 @@ var AxSignature = function AxSignature(signature) {
|
|
|
37793
37788
|
title: title
|
|
37794
37789
|
});
|
|
37795
37790
|
});
|
|
37796
|
-
_define_property$
|
|
37791
|
+
_define_property$6(this, "setDescription", function(desc) {
|
|
37797
37792
|
_this.description = desc;
|
|
37798
37793
|
_this.updateHash();
|
|
37799
37794
|
});
|
|
37800
|
-
_define_property$
|
|
37795
|
+
_define_property$6(this, "addInputField", function(field) {
|
|
37801
37796
|
_this.inputFields.push(_this.parseField(field));
|
|
37802
37797
|
_this.updateHash();
|
|
37803
37798
|
});
|
|
37804
|
-
_define_property$
|
|
37799
|
+
_define_property$6(this, "addOutputField", function(field) {
|
|
37805
37800
|
_this.outputFields.push(_this.parseField(field));
|
|
37806
37801
|
_this.updateHash();
|
|
37807
37802
|
});
|
|
37808
|
-
_define_property$
|
|
37803
|
+
_define_property$6(this, "setInputFields", function(fields) {
|
|
37809
37804
|
_this.inputFields = fields.map(function(v) {
|
|
37810
37805
|
return _this.parseField(v);
|
|
37811
37806
|
});
|
|
37812
37807
|
_this.updateHash();
|
|
37813
37808
|
});
|
|
37814
|
-
_define_property$
|
|
37809
|
+
_define_property$6(this, "setOutputFields", function(fields) {
|
|
37815
37810
|
_this.outputFields = fields.map(function(v) {
|
|
37816
37811
|
return _this.parseField(v);
|
|
37817
37812
|
});
|
|
37818
37813
|
_this.updateHash();
|
|
37819
37814
|
});
|
|
37820
|
-
_define_property$
|
|
37815
|
+
_define_property$6(this, "getInputFields", function() {
|
|
37821
37816
|
return _this.inputFields;
|
|
37822
37817
|
});
|
|
37823
|
-
_define_property$
|
|
37818
|
+
_define_property$6(this, "getOutputFields", function() {
|
|
37824
37819
|
return _this.outputFields;
|
|
37825
37820
|
});
|
|
37826
|
-
_define_property$
|
|
37821
|
+
_define_property$6(this, "getDescription", function() {
|
|
37827
37822
|
return _this.description;
|
|
37828
37823
|
});
|
|
37829
|
-
_define_property$
|
|
37824
|
+
_define_property$6(this, "toTitle", function(name) {
|
|
37830
37825
|
var result = name.replaceAll("_", " ");
|
|
37831
37826
|
result = result.replace(/([A-Z]|[0-9]+)/g, " $1").trim();
|
|
37832
37827
|
return result.charAt(0).toUpperCase() + result.slice(1);
|
|
37833
37828
|
});
|
|
37834
|
-
_define_property$
|
|
37829
|
+
_define_property$6(this, "toJSONSchema", function() {
|
|
37835
37830
|
var properties = {};
|
|
37836
37831
|
var required = [];
|
|
37837
37832
|
var _iteratorNormalCompletion = true, _didIteratorError = false, _iteratorError = undefined;
|
|
@@ -37880,7 +37875,7 @@ var AxSignature = function AxSignature(signature) {
|
|
|
37880
37875
|
};
|
|
37881
37876
|
return schema;
|
|
37882
37877
|
});
|
|
37883
|
-
_define_property$
|
|
37878
|
+
_define_property$6(this, "updateHash", function() {
|
|
37884
37879
|
_this.getInputFields().forEach(function(field) {
|
|
37885
37880
|
validateField(field);
|
|
37886
37881
|
});
|
|
@@ -37899,10 +37894,10 @@ var AxSignature = function AxSignature(signature) {
|
|
|
37899
37894
|
_this.sigString
|
|
37900
37895
|
];
|
|
37901
37896
|
});
|
|
37902
|
-
_define_property$
|
|
37897
|
+
_define_property$6(this, "hash", function() {
|
|
37903
37898
|
return _this.sigHash;
|
|
37904
37899
|
});
|
|
37905
|
-
_define_property$
|
|
37900
|
+
_define_property$6(this, "toString", function() {
|
|
37906
37901
|
return _this.sigString;
|
|
37907
37902
|
});
|
|
37908
37903
|
if (typeof signature === "string") {
|
|
@@ -37987,7 +37982,7 @@ function validateField(field) {
|
|
|
37987
37982
|
}
|
|
37988
37983
|
}
|
|
37989
37984
|
|
|
37990
|
-
/* eslint-disable @typescript-eslint/naming-convention */ function _define_property$
|
|
37985
|
+
/* eslint-disable @typescript-eslint/naming-convention */ function _define_property$5(obj, key, value) {
|
|
37991
37986
|
if (key in obj) {
|
|
37992
37987
|
Object.defineProperty(obj, key, {
|
|
37993
37988
|
value: value,
|
|
@@ -38010,7 +38005,7 @@ function _object_spread$3(target) {
|
|
|
38010
38005
|
}));
|
|
38011
38006
|
}
|
|
38012
38007
|
ownKeys.forEach(function(key) {
|
|
38013
|
-
_define_property$
|
|
38008
|
+
_define_property$5(target, key, source[key]);
|
|
38014
38009
|
});
|
|
38015
38010
|
}
|
|
38016
38011
|
return target;
|
|
@@ -38133,12 +38128,12 @@ function _async_to_generator$2(fn) {
|
|
|
38133
38128
|
});
|
|
38134
38129
|
};
|
|
38135
38130
|
}
|
|
38136
|
-
function _class_call_check$
|
|
38131
|
+
function _class_call_check$5(instance, Constructor) {
|
|
38137
38132
|
if (!(instance instanceof Constructor)) {
|
|
38138
38133
|
throw new TypeError("Cannot call a class as a function");
|
|
38139
38134
|
}
|
|
38140
38135
|
}
|
|
38141
|
-
function _defineProperties$
|
|
38136
|
+
function _defineProperties$2(target, props) {
|
|
38142
38137
|
for(var i = 0; i < props.length; i++){
|
|
38143
38138
|
var descriptor = props[i];
|
|
38144
38139
|
descriptor.enumerable = descriptor.enumerable || false;
|
|
@@ -38147,12 +38142,12 @@ function _defineProperties$3(target, props) {
|
|
|
38147
38142
|
Object.defineProperty(target, descriptor.key, descriptor);
|
|
38148
38143
|
}
|
|
38149
38144
|
}
|
|
38150
|
-
function _create_class$
|
|
38151
|
-
if (protoProps) _defineProperties$
|
|
38152
|
-
if (staticProps) _defineProperties$
|
|
38145
|
+
function _create_class$2(Constructor, protoProps, staticProps) {
|
|
38146
|
+
if (protoProps) _defineProperties$2(Constructor.prototype, protoProps);
|
|
38147
|
+
if (staticProps) _defineProperties$2(Constructor, staticProps);
|
|
38153
38148
|
return Constructor;
|
|
38154
38149
|
}
|
|
38155
|
-
function _define_property$
|
|
38150
|
+
function _define_property$4(obj, key, value) {
|
|
38156
38151
|
if (key in obj) {
|
|
38157
38152
|
Object.defineProperty(obj, key, {
|
|
38158
38153
|
value: value,
|
|
@@ -38279,16 +38274,16 @@ function _ts_generator$2(thisArg, body) {
|
|
|
38279
38274
|
}
|
|
38280
38275
|
var AxProgramWithSignature = /*#__PURE__*/ function() {
|
|
38281
38276
|
function AxProgramWithSignature(signature) {
|
|
38282
|
-
_class_call_check$
|
|
38277
|
+
_class_call_check$5(this, AxProgramWithSignature);
|
|
38283
38278
|
var _this_signature;
|
|
38284
|
-
_define_property$
|
|
38285
|
-
_define_property$
|
|
38286
|
-
_define_property$
|
|
38287
|
-
_define_property$
|
|
38288
|
-
_define_property$
|
|
38289
|
-
_define_property$
|
|
38290
|
-
_define_property$
|
|
38291
|
-
_define_property$
|
|
38279
|
+
_define_property$4(this, "signature", void 0);
|
|
38280
|
+
_define_property$4(this, "sigHash", void 0);
|
|
38281
|
+
_define_property$4(this, "examples", void 0);
|
|
38282
|
+
_define_property$4(this, "demos", void 0);
|
|
38283
|
+
_define_property$4(this, "trace", void 0);
|
|
38284
|
+
_define_property$4(this, "usage", []);
|
|
38285
|
+
_define_property$4(this, "key", void 0);
|
|
38286
|
+
_define_property$4(this, "children", void 0);
|
|
38292
38287
|
this.signature = new AxSignature(signature);
|
|
38293
38288
|
this.sigHash = (_this_signature = this.signature) === null || _this_signature === void 0 ? void 0 : _this_signature.hash();
|
|
38294
38289
|
this.children = new AxInstanceRegistry();
|
|
@@ -38296,7 +38291,7 @@ var AxProgramWithSignature = /*#__PURE__*/ function() {
|
|
|
38296
38291
|
id: this.constructor.name
|
|
38297
38292
|
};
|
|
38298
38293
|
}
|
|
38299
|
-
_create_class$
|
|
38294
|
+
_create_class$2(AxProgramWithSignature, [
|
|
38300
38295
|
{
|
|
38301
38296
|
key: "getSignature",
|
|
38302
38297
|
value: function getSignature() {
|
|
@@ -38569,12 +38564,12 @@ function _array_like_to_array$2(arr, len) {
|
|
|
38569
38564
|
function _array_without_holes$2(arr) {
|
|
38570
38565
|
if (Array.isArray(arr)) return _array_like_to_array$2(arr);
|
|
38571
38566
|
}
|
|
38572
|
-
function _class_call_check$
|
|
38567
|
+
function _class_call_check$4(instance, Constructor) {
|
|
38573
38568
|
if (!(instance instanceof Constructor)) {
|
|
38574
38569
|
throw new TypeError("Cannot call a class as a function");
|
|
38575
38570
|
}
|
|
38576
38571
|
}
|
|
38577
|
-
function _define_property$
|
|
38572
|
+
function _define_property$3(obj, key, value) {
|
|
38578
38573
|
if (key in obj) {
|
|
38579
38574
|
Object.defineProperty(obj, key, {
|
|
38580
38575
|
value: value,
|
|
@@ -38606,12 +38601,12 @@ function _unsupported_iterable_to_array$2(o, minLen) {
|
|
|
38606
38601
|
}
|
|
38607
38602
|
var AxPromptTemplate = function AxPromptTemplate(sig, fieldTemplates) {
|
|
38608
38603
|
var _this = this;
|
|
38609
|
-
_class_call_check$
|
|
38610
|
-
_define_property$
|
|
38611
|
-
_define_property$
|
|
38612
|
-
_define_property$
|
|
38613
|
-
_define_property$
|
|
38614
|
-
_define_property$
|
|
38604
|
+
_class_call_check$4(this, AxPromptTemplate);
|
|
38605
|
+
_define_property$3(this, "sig", void 0);
|
|
38606
|
+
_define_property$3(this, "fieldTemplates", void 0);
|
|
38607
|
+
_define_property$3(this, "task", void 0);
|
|
38608
|
+
_define_property$3(this, "outputFormat", void 0);
|
|
38609
|
+
_define_property$3(this, "render", function(values, param) {
|
|
38615
38610
|
var examples = param.examples, demos = param.demos;
|
|
38616
38611
|
var renderedExamples = examples ? [
|
|
38617
38612
|
{
|
|
@@ -38638,7 +38633,7 @@ var AxPromptTemplate = function AxPromptTemplate(sig, fieldTemplates) {
|
|
|
38638
38633
|
}
|
|
38639
38634
|
return prompt.reduce(combineConsecutiveStrings("\n"), []);
|
|
38640
38635
|
});
|
|
38641
|
-
_define_property$
|
|
38636
|
+
_define_property$3(this, "renderExtraFields", function(extraFields) {
|
|
38642
38637
|
var prompt = [];
|
|
38643
38638
|
if (extraFields && extraFields.length > 0) {
|
|
38644
38639
|
extraFields.forEach(function(field) {
|
|
@@ -38661,7 +38656,7 @@ var AxPromptTemplate = function AxPromptTemplate(sig, fieldTemplates) {
|
|
|
38661
38656
|
}
|
|
38662
38657
|
return prompt.reduce(combineConsecutiveStrings("\n"), []);
|
|
38663
38658
|
});
|
|
38664
|
-
_define_property$
|
|
38659
|
+
_define_property$3(this, "renderExamples", function(data) {
|
|
38665
38660
|
var list = [];
|
|
38666
38661
|
var _iteratorNormalCompletion = true, _didIteratorError = false, _iteratorError = undefined;
|
|
38667
38662
|
try {
|
|
@@ -38714,7 +38709,7 @@ var AxPromptTemplate = function AxPromptTemplate(sig, fieldTemplates) {
|
|
|
38714
38709
|
}
|
|
38715
38710
|
return list;
|
|
38716
38711
|
});
|
|
38717
|
-
_define_property$
|
|
38712
|
+
_define_property$3(this, "renderDemos", function(data) {
|
|
38718
38713
|
var list = [];
|
|
38719
38714
|
var fields = _to_consumable_array$2(_this.sig.getInputFields()).concat(_to_consumable_array$2(_this.sig.getOutputFields()));
|
|
38720
38715
|
var _iteratorNormalCompletion = true, _didIteratorError = false, _iteratorError = undefined;
|
|
@@ -38759,7 +38754,7 @@ var AxPromptTemplate = function AxPromptTemplate(sig, fieldTemplates) {
|
|
|
38759
38754
|
}
|
|
38760
38755
|
return list;
|
|
38761
38756
|
});
|
|
38762
|
-
_define_property$
|
|
38757
|
+
_define_property$3(this, "renderInputFields", function(values) {
|
|
38763
38758
|
var renderedItems = _this.sig.getInputFields().map(function(field) {
|
|
38764
38759
|
return _this.renderInField(field, values);
|
|
38765
38760
|
}).filter(function(v) {
|
|
@@ -38772,7 +38767,7 @@ var AxPromptTemplate = function AxPromptTemplate(sig, fieldTemplates) {
|
|
|
38772
38767
|
});
|
|
38773
38768
|
return renderedItems;
|
|
38774
38769
|
});
|
|
38775
|
-
_define_property$
|
|
38770
|
+
_define_property$3(this, "renderInField", function(field, values, skipMissing) {
|
|
38776
38771
|
var _this_fieldTemplates;
|
|
38777
38772
|
var _this_fieldTemplates_field_name;
|
|
38778
38773
|
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;
|
|
@@ -38792,7 +38787,7 @@ var AxPromptTemplate = function AxPromptTemplate(sig, fieldTemplates) {
|
|
|
38792
38787
|
var processedValue = processValue(field, value);
|
|
38793
38788
|
return textFieldFn(field, processedValue);
|
|
38794
38789
|
});
|
|
38795
|
-
_define_property$
|
|
38790
|
+
_define_property$3(this, "defaultRenderInField", function(field, value) {
|
|
38796
38791
|
var _field_type;
|
|
38797
38792
|
if (((_field_type = field.type) === null || _field_type === void 0 ? void 0 : _field_type.name) === "image") {
|
|
38798
38793
|
if (typeof value !== "object") {
|
|
@@ -38832,14 +38827,14 @@ var AxPromptTemplate = function AxPromptTemplate(sig, fieldTemplates) {
|
|
|
38832
38827
|
}
|
|
38833
38828
|
];
|
|
38834
38829
|
});
|
|
38835
|
-
_define_property$
|
|
38830
|
+
_define_property$3(this, "renderDescFields", function(list) {
|
|
38836
38831
|
return list.map(function(v) {
|
|
38837
38832
|
return "`".concat(v.title, "`");
|
|
38838
38833
|
}).join(", ");
|
|
38839
38834
|
});
|
|
38840
38835
|
// private renderInFields = (list: readonly Field[]) =>
|
|
38841
38836
|
// list.map((v) => v.title + ': ' + (v.description ?? toVar(v.name)));
|
|
38842
|
-
_define_property$
|
|
38837
|
+
_define_property$3(this, "renderOutFields", function(list) {
|
|
38843
38838
|
return list.map(function(v) {
|
|
38844
38839
|
var _v_description;
|
|
38845
38840
|
return [
|
|
@@ -39011,12 +39006,12 @@ function _async_to_generator$1(fn) {
|
|
|
39011
39006
|
});
|
|
39012
39007
|
};
|
|
39013
39008
|
}
|
|
39014
|
-
function _class_call_check$
|
|
39009
|
+
function _class_call_check$3(instance, Constructor) {
|
|
39015
39010
|
if (!(instance instanceof Constructor)) {
|
|
39016
39011
|
throw new TypeError("Cannot call a class as a function");
|
|
39017
39012
|
}
|
|
39018
39013
|
}
|
|
39019
|
-
function _defineProperties$
|
|
39014
|
+
function _defineProperties$1(target, props) {
|
|
39020
39015
|
for(var i = 0; i < props.length; i++){
|
|
39021
39016
|
var descriptor = props[i];
|
|
39022
39017
|
descriptor.enumerable = descriptor.enumerable || false;
|
|
@@ -39025,12 +39020,12 @@ function _defineProperties$2(target, props) {
|
|
|
39025
39020
|
Object.defineProperty(target, descriptor.key, descriptor);
|
|
39026
39021
|
}
|
|
39027
39022
|
}
|
|
39028
|
-
function _create_class$
|
|
39029
|
-
if (protoProps) _defineProperties$
|
|
39030
|
-
if (staticProps) _defineProperties$
|
|
39023
|
+
function _create_class$1(Constructor, protoProps, staticProps) {
|
|
39024
|
+
if (protoProps) _defineProperties$1(Constructor.prototype, protoProps);
|
|
39025
|
+
if (staticProps) _defineProperties$1(Constructor, staticProps);
|
|
39031
39026
|
return Constructor;
|
|
39032
39027
|
}
|
|
39033
|
-
function _define_property$
|
|
39028
|
+
function _define_property$2(obj, key, value) {
|
|
39034
39029
|
if (key in obj) {
|
|
39035
39030
|
Object.defineProperty(obj, key, {
|
|
39036
39031
|
value: value,
|
|
@@ -39079,7 +39074,7 @@ function _object_spread$2(target) {
|
|
|
39079
39074
|
}));
|
|
39080
39075
|
}
|
|
39081
39076
|
ownKeys.forEach(function(key) {
|
|
39082
|
-
_define_property$
|
|
39077
|
+
_define_property$2(target, key, source[key]);
|
|
39083
39078
|
});
|
|
39084
39079
|
}
|
|
39085
39080
|
return target;
|
|
@@ -39248,19 +39243,19 @@ var AxGenerate = /*#__PURE__*/ function(AxProgramWithSignature) {
|
|
|
39248
39243
|
_inherits$2(AxGenerate, AxProgramWithSignature);
|
|
39249
39244
|
var _super = _create_super$2(AxGenerate);
|
|
39250
39245
|
function AxGenerate(ai, signature, options) {
|
|
39251
|
-
_class_call_check$
|
|
39246
|
+
_class_call_check$3(this, AxGenerate);
|
|
39252
39247
|
var _this;
|
|
39253
39248
|
var _options_functions, _this_options, _this_options1, _this_functions;
|
|
39254
39249
|
_this = _super.call(this, signature);
|
|
39255
|
-
_define_property$
|
|
39256
|
-
_define_property$
|
|
39257
|
-
_define_property$
|
|
39258
|
-
_define_property$
|
|
39259
|
-
_define_property$
|
|
39260
|
-
_define_property$
|
|
39261
|
-
_define_property$
|
|
39262
|
-
_define_property$
|
|
39263
|
-
_define_property$
|
|
39250
|
+
_define_property$2(_assert_this_initialized$2(_this), "ai", void 0);
|
|
39251
|
+
_define_property$2(_assert_this_initialized$2(_this), "pt", void 0);
|
|
39252
|
+
_define_property$2(_assert_this_initialized$2(_this), "asserts", void 0);
|
|
39253
|
+
_define_property$2(_assert_this_initialized$2(_this), "streamingAsserts", void 0);
|
|
39254
|
+
_define_property$2(_assert_this_initialized$2(_this), "options", void 0);
|
|
39255
|
+
_define_property$2(_assert_this_initialized$2(_this), "functions", void 0);
|
|
39256
|
+
_define_property$2(_assert_this_initialized$2(_this), "funcProc", void 0);
|
|
39257
|
+
_define_property$2(_assert_this_initialized$2(_this), "functionList", void 0);
|
|
39258
|
+
_define_property$2(_assert_this_initialized$2(_this), "updateSigForFunctions", function() {
|
|
39264
39259
|
// AI supports function calling natively so
|
|
39265
39260
|
// no need to add fields for function call
|
|
39266
39261
|
if (_this.ai.getFeatures().functions) {
|
|
@@ -39278,14 +39273,14 @@ var AxGenerate = /*#__PURE__*/ function(AxProgramWithSignature) {
|
|
|
39278
39273
|
isOptional: true
|
|
39279
39274
|
});
|
|
39280
39275
|
});
|
|
39281
|
-
_define_property$
|
|
39276
|
+
_define_property$2(_assert_this_initialized$2(_this), "addAssert", function(fn, message, optional) {
|
|
39282
39277
|
_this.asserts.push({
|
|
39283
39278
|
fn: fn,
|
|
39284
39279
|
message: message,
|
|
39285
39280
|
optional: optional
|
|
39286
39281
|
});
|
|
39287
39282
|
});
|
|
39288
|
-
_define_property$
|
|
39283
|
+
_define_property$2(_assert_this_initialized$2(_this), "addStreamingAssert", function(fieldName, fn, message, optional) {
|
|
39289
39284
|
_this.streamingAsserts.push({
|
|
39290
39285
|
fieldName: fieldName,
|
|
39291
39286
|
fn: fn,
|
|
@@ -39294,7 +39289,7 @@ var AxGenerate = /*#__PURE__*/ function(AxProgramWithSignature) {
|
|
|
39294
39289
|
});
|
|
39295
39290
|
});
|
|
39296
39291
|
var _this1 = _assert_this_initialized$2(_this);
|
|
39297
|
-
_define_property$
|
|
39292
|
+
_define_property$2(_assert_this_initialized$2(_this), "processFunctions", function() {
|
|
39298
39293
|
var _ref = _async_to_generator$1(function(functionCalls, mem, sessionId, traceId) {
|
|
39299
39294
|
var promises, results;
|
|
39300
39295
|
return _ts_generator$1(this, function(_state) {
|
|
@@ -39363,7 +39358,7 @@ var AxGenerate = /*#__PURE__*/ function(AxProgramWithSignature) {
|
|
|
39363
39358
|
}
|
|
39364
39359
|
return _this;
|
|
39365
39360
|
}
|
|
39366
|
-
_create_class$
|
|
39361
|
+
_create_class$1(AxGenerate, [
|
|
39367
39362
|
{
|
|
39368
39363
|
key: "forwardSendRequest",
|
|
39369
39364
|
value: function forwardSendRequest(param) {
|
|
@@ -39902,7 +39897,7 @@ var AxGenerate = /*#__PURE__*/ function(AxProgramWithSignature) {
|
|
|
39902
39897
|
_state.sent()
|
|
39903
39898
|
];
|
|
39904
39899
|
case 2:
|
|
39905
|
-
attributes = (_obj = {}, _define_property$
|
|
39900
|
+
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);
|
|
39906
39901
|
return [
|
|
39907
39902
|
4,
|
|
39908
39903
|
tracer.startActiveSpan("Generate", {
|
|
@@ -39983,7 +39978,7 @@ function _assert_this_initialized$1(self) {
|
|
|
39983
39978
|
}
|
|
39984
39979
|
return self;
|
|
39985
39980
|
}
|
|
39986
|
-
function _class_call_check$
|
|
39981
|
+
function _class_call_check$2(instance, Constructor) {
|
|
39987
39982
|
if (!(instance instanceof Constructor)) {
|
|
39988
39983
|
throw new TypeError("Cannot call a class as a function");
|
|
39989
39984
|
}
|
|
@@ -40069,7 +40064,7 @@ var AxChainOfThought = /*#__PURE__*/ function(AxGenerate) {
|
|
|
40069
40064
|
_inherits$1(AxChainOfThought, AxGenerate);
|
|
40070
40065
|
var _super = _create_super$1(AxChainOfThought);
|
|
40071
40066
|
function AxChainOfThought(ai, signature, options) {
|
|
40072
|
-
_class_call_check$
|
|
40067
|
+
_class_call_check$2(this, AxChainOfThought);
|
|
40073
40068
|
var sig = new AxSignature(signature);
|
|
40074
40069
|
var description = "Let's work this out in a step by step way in order to ensure we have the right answer.";
|
|
40075
40070
|
sig.setOutputFields([
|
|
@@ -40090,12 +40085,12 @@ function _assert_this_initialized(self) {
|
|
|
40090
40085
|
}
|
|
40091
40086
|
return self;
|
|
40092
40087
|
}
|
|
40093
|
-
function _class_call_check$
|
|
40088
|
+
function _class_call_check$1(instance, Constructor) {
|
|
40094
40089
|
if (!(instance instanceof Constructor)) {
|
|
40095
40090
|
throw new TypeError("Cannot call a class as a function");
|
|
40096
40091
|
}
|
|
40097
40092
|
}
|
|
40098
|
-
function _define_property$
|
|
40093
|
+
function _define_property$1(obj, key, value) {
|
|
40099
40094
|
if (key in obj) {
|
|
40100
40095
|
Object.defineProperty(obj, key, {
|
|
40101
40096
|
value: value,
|
|
@@ -40137,7 +40132,7 @@ function _object_spread$1(target) {
|
|
|
40137
40132
|
}));
|
|
40138
40133
|
}
|
|
40139
40134
|
ownKeys.forEach(function(key) {
|
|
40140
|
-
_define_property$
|
|
40135
|
+
_define_property$1(target, key, source[key]);
|
|
40141
40136
|
});
|
|
40142
40137
|
}
|
|
40143
40138
|
return target;
|
|
@@ -40211,7 +40206,7 @@ var AxReAct = /*#__PURE__*/ function(AxChainOfThought) {
|
|
|
40211
40206
|
_inherits(AxReAct, AxChainOfThought);
|
|
40212
40207
|
var _super = _create_super(AxReAct);
|
|
40213
40208
|
function AxReAct(ai, signature, options) {
|
|
40214
|
-
_class_call_check$
|
|
40209
|
+
_class_call_check$1(this, AxReAct);
|
|
40215
40210
|
if (!(options === null || options === void 0 ? void 0 : options.functions) || options.functions.length === 0) {
|
|
40216
40211
|
throw new Error("No functions provided");
|
|
40217
40212
|
}
|
|
@@ -40282,12 +40277,12 @@ function _async_to_generator(fn) {
|
|
|
40282
40277
|
});
|
|
40283
40278
|
};
|
|
40284
40279
|
}
|
|
40285
|
-
function _class_call_check
|
|
40280
|
+
function _class_call_check(instance, Constructor) {
|
|
40286
40281
|
if (!(instance instanceof Constructor)) {
|
|
40287
40282
|
throw new TypeError("Cannot call a class as a function");
|
|
40288
40283
|
}
|
|
40289
40284
|
}
|
|
40290
|
-
function _defineProperties
|
|
40285
|
+
function _defineProperties(target, props) {
|
|
40291
40286
|
for(var i = 0; i < props.length; i++){
|
|
40292
40287
|
var descriptor = props[i];
|
|
40293
40288
|
descriptor.enumerable = descriptor.enumerable || false;
|
|
@@ -40296,12 +40291,12 @@ function _defineProperties$1(target, props) {
|
|
|
40296
40291
|
Object.defineProperty(target, descriptor.key, descriptor);
|
|
40297
40292
|
}
|
|
40298
40293
|
}
|
|
40299
|
-
function _create_class
|
|
40300
|
-
if (protoProps) _defineProperties
|
|
40301
|
-
if (staticProps) _defineProperties
|
|
40294
|
+
function _create_class(Constructor, protoProps, staticProps) {
|
|
40295
|
+
if (protoProps) _defineProperties(Constructor.prototype, protoProps);
|
|
40296
|
+
if (staticProps) _defineProperties(Constructor, staticProps);
|
|
40302
40297
|
return Constructor;
|
|
40303
40298
|
}
|
|
40304
|
-
function _define_property
|
|
40299
|
+
function _define_property(obj, key, value) {
|
|
40305
40300
|
if (key in obj) {
|
|
40306
40301
|
Object.defineProperty(obj, key, {
|
|
40307
40302
|
value: value,
|
|
@@ -40330,7 +40325,7 @@ function _object_spread(target) {
|
|
|
40330
40325
|
}));
|
|
40331
40326
|
}
|
|
40332
40327
|
ownKeys.forEach(function(key) {
|
|
40333
|
-
_define_property
|
|
40328
|
+
_define_property(target, key, source[key]);
|
|
40334
40329
|
});
|
|
40335
40330
|
}
|
|
40336
40331
|
return target;
|
|
@@ -40469,13 +40464,13 @@ var AxAgent = /*#__PURE__*/ function() {
|
|
|
40469
40464
|
function AxAgent(ai, param, options) {
|
|
40470
40465
|
var _this = this;
|
|
40471
40466
|
var name = param.name, description = param.description, signature = param.signature, agents = param.agents, functions = param.functions;
|
|
40472
|
-
_class_call_check
|
|
40473
|
-
_define_property
|
|
40474
|
-
_define_property
|
|
40475
|
-
_define_property
|
|
40476
|
-
_define_property
|
|
40477
|
-
_define_property
|
|
40478
|
-
_define_property
|
|
40467
|
+
_class_call_check(this, AxAgent);
|
|
40468
|
+
_define_property(this, "signature", void 0);
|
|
40469
|
+
_define_property(this, "program", void 0);
|
|
40470
|
+
_define_property(this, "name", void 0);
|
|
40471
|
+
_define_property(this, "description", void 0);
|
|
40472
|
+
_define_property(this, "subAgentList", void 0);
|
|
40473
|
+
_define_property(this, "func", void 0);
|
|
40479
40474
|
this.signature = new AxSignature(signature);
|
|
40480
40475
|
var _agents_map;
|
|
40481
40476
|
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) {
|
|
@@ -40525,7 +40520,7 @@ var AxAgent = /*#__PURE__*/ function() {
|
|
|
40525
40520
|
}
|
|
40526
40521
|
}
|
|
40527
40522
|
}
|
|
40528
|
-
_create_class
|
|
40523
|
+
_create_class(AxAgent, [
|
|
40529
40524
|
{
|
|
40530
40525
|
key: "setExamples",
|
|
40531
40526
|
value: function setExamples(examples) {
|
|
@@ -40597,7 +40592,7 @@ var AxAgent = /*#__PURE__*/ function() {
|
|
|
40597
40592
|
_state.sent()
|
|
40598
40593
|
];
|
|
40599
40594
|
case 2:
|
|
40600
|
-
attributes = (_obj = {}, _define_property
|
|
40595
|
+
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);
|
|
40601
40596
|
return [
|
|
40602
40597
|
4,
|
|
40603
40598
|
options === null || options === void 0 ? void 0 : options.tracer.startActiveSpan("Agent", {
|
|
@@ -40657,38 +40652,6 @@ function toCamelCase(inputString) {
|
|
|
40657
40652
|
return camelCaseString;
|
|
40658
40653
|
}
|
|
40659
40654
|
|
|
40660
|
-
function _class_call_check(instance, Constructor) {
|
|
40661
|
-
if (!(instance instanceof Constructor)) {
|
|
40662
|
-
throw new TypeError("Cannot call a class as a function");
|
|
40663
|
-
}
|
|
40664
|
-
}
|
|
40665
|
-
function _defineProperties(target, props) {
|
|
40666
|
-
for(var i = 0; i < props.length; i++){
|
|
40667
|
-
var descriptor = props[i];
|
|
40668
|
-
descriptor.enumerable = descriptor.enumerable || false;
|
|
40669
|
-
descriptor.configurable = true;
|
|
40670
|
-
if ("value" in descriptor) descriptor.writable = true;
|
|
40671
|
-
Object.defineProperty(target, descriptor.key, descriptor);
|
|
40672
|
-
}
|
|
40673
|
-
}
|
|
40674
|
-
function _create_class(Constructor, protoProps, staticProps) {
|
|
40675
|
-
if (protoProps) _defineProperties(Constructor.prototype, protoProps);
|
|
40676
|
-
if (staticProps) _defineProperties(Constructor, staticProps);
|
|
40677
|
-
return Constructor;
|
|
40678
|
-
}
|
|
40679
|
-
function _define_property(obj, key, value) {
|
|
40680
|
-
if (key in obj) {
|
|
40681
|
-
Object.defineProperty(obj, key, {
|
|
40682
|
-
value: value,
|
|
40683
|
-
enumerable: true,
|
|
40684
|
-
configurable: true,
|
|
40685
|
-
writable: true
|
|
40686
|
-
});
|
|
40687
|
-
} else {
|
|
40688
|
-
obj[key] = value;
|
|
40689
|
-
}
|
|
40690
|
-
return obj;
|
|
40691
|
-
}
|
|
40692
40655
|
var AxJSInterpreterPermission;
|
|
40693
40656
|
(function(AxJSInterpreterPermission) {
|
|
40694
40657
|
AxJSInterpreterPermission["FS"] = "node:fs";
|
|
@@ -40697,69 +40660,6 @@ var AxJSInterpreterPermission;
|
|
|
40697
40660
|
AxJSInterpreterPermission["CRYPTO"] = "crypto";
|
|
40698
40661
|
AxJSInterpreterPermission["PROCESS"] = "process";
|
|
40699
40662
|
})(AxJSInterpreterPermission || (AxJSInterpreterPermission = {}));
|
|
40700
|
-
var AxJSInterpreter = /*#__PURE__*/ function() {
|
|
40701
|
-
function AxJSInterpreter() {
|
|
40702
|
-
var _ref = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {}, _ref_permissions = _ref.permissions, permissions = _ref_permissions === void 0 ? [] : _ref_permissions;
|
|
40703
|
-
_class_call_check(this, AxJSInterpreter);
|
|
40704
|
-
_define_property(this, "permissions", void 0);
|
|
40705
|
-
this.permissions = permissions !== null && permissions !== void 0 ? permissions : [];
|
|
40706
|
-
}
|
|
40707
|
-
_create_class(AxJSInterpreter, [
|
|
40708
|
-
{
|
|
40709
|
-
key: "codeInterpreterJavascript",
|
|
40710
|
-
value: function codeInterpreterJavascript(code) {
|
|
40711
|
-
var context = {
|
|
40712
|
-
console: console
|
|
40713
|
-
};
|
|
40714
|
-
if (this.permissions.includes(AxJSInterpreterPermission.FS)) {
|
|
40715
|
-
context.fs = _fs__namespace;
|
|
40716
|
-
}
|
|
40717
|
-
if (this.permissions.includes(AxJSInterpreterPermission.NET)) {
|
|
40718
|
-
context.http = _http__namespace;
|
|
40719
|
-
context.https = _https__namespace;
|
|
40720
|
-
}
|
|
40721
|
-
if (this.permissions.includes(AxJSInterpreterPermission.OS)) {
|
|
40722
|
-
context.os = _os__namespace;
|
|
40723
|
-
}
|
|
40724
|
-
if (this.permissions.includes(AxJSInterpreterPermission.CRYPTO)) {
|
|
40725
|
-
context.crypto = _crypto__namespace;
|
|
40726
|
-
}
|
|
40727
|
-
if (this.permissions.includes(AxJSInterpreterPermission.PROCESS)) {
|
|
40728
|
-
context.process = _process__namespace;
|
|
40729
|
-
}
|
|
40730
|
-
return vm.runInNewContext("(function() { ".concat(code, " })()"), context);
|
|
40731
|
-
}
|
|
40732
|
-
},
|
|
40733
|
-
{
|
|
40734
|
-
key: "toFunction",
|
|
40735
|
-
value: function toFunction() {
|
|
40736
|
-
var _this = this;
|
|
40737
|
-
return {
|
|
40738
|
-
name: "javascriptInterpreter",
|
|
40739
|
-
description: "Use this function to run Javascript code and get any expected return value.",
|
|
40740
|
-
parameters: {
|
|
40741
|
-
type: "object",
|
|
40742
|
-
properties: {
|
|
40743
|
-
code: {
|
|
40744
|
-
type: "string",
|
|
40745
|
-
description: "JS code with a return value in the end."
|
|
40746
|
-
}
|
|
40747
|
-
},
|
|
40748
|
-
required: [
|
|
40749
|
-
"code"
|
|
40750
|
-
]
|
|
40751
|
-
},
|
|
40752
|
-
func: function(param) {
|
|
40753
|
-
var code = param.code;
|
|
40754
|
-
return _this.codeInterpreterJavascript(code);
|
|
40755
|
-
}
|
|
40756
|
-
};
|
|
40757
|
-
}
|
|
40758
|
-
}
|
|
40759
|
-
]);
|
|
40760
|
-
return AxJSInterpreter;
|
|
40761
|
-
}
|
|
40762
|
-
();
|
|
40763
40663
|
|
|
40764
40664
|
let DspService = class DspService {
|
|
40765
40665
|
async prepareFunctions(functions, context) {
|
|
@@ -40775,7 +40675,6 @@ let DspService = class DspService {
|
|
|
40775
40675
|
}));
|
|
40776
40676
|
}
|
|
40777
40677
|
async model(params, _pinsSettingsList, _context) {
|
|
40778
|
-
// const { AxAI } = await eval(`import('@ax-llm/ax')`);
|
|
40779
40678
|
const { name, options } = params;
|
|
40780
40679
|
const modelInstance = new AxAI(_extends({
|
|
40781
40680
|
name
|
|
@@ -40784,7 +40683,6 @@ let DspService = class DspService {
|
|
|
40784
40683
|
}
|
|
40785
40684
|
async modelOpenAI(params, _pinsSettingsList, context) {
|
|
40786
40685
|
var _context_privates_OPENAI_API_KEY, _context_privates_OPENAI_SERVER;
|
|
40787
|
-
// const { AxAIOpenAI } = await eval(`import('@ax-llm/ax')`);
|
|
40788
40686
|
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;
|
|
40789
40687
|
const modelInstance = new AxAIOpenAI({
|
|
40790
40688
|
apiKey,
|
|
@@ -40796,7 +40694,6 @@ let DspService = class DspService {
|
|
|
40796
40694
|
}
|
|
40797
40695
|
async modelAzureOpenAi(params, _pinsSettingsList, context) {
|
|
40798
40696
|
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;
|
|
40799
|
-
// const { AxAIAzureOpenAI } = await eval(`import('@ax-llm/ax')`);
|
|
40800
40697
|
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;
|
|
40801
40698
|
const modelInstance = new AxAIAzureOpenAI({
|
|
40802
40699
|
apiKey,
|
|
@@ -40809,7 +40706,6 @@ let DspService = class DspService {
|
|
|
40809
40706
|
return modelInstance;
|
|
40810
40707
|
}
|
|
40811
40708
|
async modelOllama(params, _pinsSettingsList, context) {
|
|
40812
|
-
// const { AxAIOllama } = await eval(`import('@ax-llm/ax')`);
|
|
40813
40709
|
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;
|
|
40814
40710
|
const modelInstance = new AxAIOllama({
|
|
40815
40711
|
model,
|
|
@@ -40821,7 +40717,6 @@ let DspService = class DspService {
|
|
|
40821
40717
|
return modelInstance;
|
|
40822
40718
|
}
|
|
40823
40719
|
async generate(params, _pinsSettingsList, context) {
|
|
40824
|
-
// const { AxGenerate } = await eval(`import('@ax-llm/ax')`);
|
|
40825
40720
|
const { model = context.privates.MODEL_DSP, functions = [], signature, input } = params;
|
|
40826
40721
|
const modelInstance = await executePinsList(model, context);
|
|
40827
40722
|
const gen = new AxGenerate(modelInstance, signature, {
|
|
@@ -40831,7 +40726,6 @@ let DspService = class DspService {
|
|
|
40831
40726
|
return result;
|
|
40832
40727
|
}
|
|
40833
40728
|
async chainOfThought(params, _pinsSettingsList, context) {
|
|
40834
|
-
// const { AxChainOfThought } = await eval(`import('@ax-llm/ax')`);
|
|
40835
40729
|
const { model = context.privates.MODEL_DSP, functions = [], signature, input } = params;
|
|
40836
40730
|
const modelInstance = await executePinsList(model, context);
|
|
40837
40731
|
const gen = new AxChainOfThought(modelInstance, signature, {
|
|
@@ -40841,7 +40735,6 @@ let DspService = class DspService {
|
|
|
40841
40735
|
return result;
|
|
40842
40736
|
}
|
|
40843
40737
|
async react(params, _pinsSettingsList, context) {
|
|
40844
|
-
// const { AxChainOfThought } = await eval(`import('@ax-llm/ax')`);
|
|
40845
40738
|
const { model = context.privates.MODEL_DSP, functions = [], signature, input } = params;
|
|
40846
40739
|
const modelInstance = await executePinsList(model, context);
|
|
40847
40740
|
const gen = new AxReAct(modelInstance, signature, {
|
|
@@ -40851,8 +40744,7 @@ let DspService = class DspService {
|
|
|
40851
40744
|
return result;
|
|
40852
40745
|
}
|
|
40853
40746
|
async agent(params, _pinsSettingsList, context) {
|
|
40854
|
-
|
|
40855
|
-
const { model = context.privates.MODEL_DSP, functions = [], agents = [], name, description, signature } = params;
|
|
40747
|
+
const { model = context.privates.MODEL_DSP, functions = [], agents = [], forward = true, name, description, signature, input } = params;
|
|
40856
40748
|
const modelInstance = await executePinsList(model, context);
|
|
40857
40749
|
const agent = new AxAgent(modelInstance, {
|
|
40858
40750
|
name,
|
|
@@ -40860,19 +40752,19 @@ let DspService = class DspService {
|
|
|
40860
40752
|
signature,
|
|
40861
40753
|
functions: await this.prepareFunctions(functions, context),
|
|
40862
40754
|
agents: await Promise.all(agents.map(async (execute)=>await executePinsList([
|
|
40863
|
-
execute
|
|
40755
|
+
_extends({}, execute, {
|
|
40756
|
+
properties: _extends({}, execute.properties, {
|
|
40757
|
+
forward: false
|
|
40758
|
+
})
|
|
40759
|
+
})
|
|
40864
40760
|
], context)))
|
|
40865
40761
|
});
|
|
40866
|
-
|
|
40867
|
-
|
|
40868
|
-
|
|
40869
|
-
const { agent, input } = params;
|
|
40762
|
+
if (!forward) {
|
|
40763
|
+
return agent;
|
|
40764
|
+
}
|
|
40870
40765
|
const result = await agent.forward(input);
|
|
40871
40766
|
return result;
|
|
40872
40767
|
}
|
|
40873
|
-
async jsInterpreter(_params, _pinsSettingsList, _context) {
|
|
40874
|
-
return new AxJSInterpreter();
|
|
40875
|
-
}
|
|
40876
40768
|
};
|
|
40877
40769
|
const model = (params, pinsSettingsList, context)=>new DspService().model(params, pinsSettingsList, context);
|
|
40878
40770
|
const modelOpenAI = (params, pinsSettingsList, context)=>new DspService().modelOpenAI(params, pinsSettingsList, context);
|
|
@@ -40882,14 +40774,10 @@ const generate = (params, pinsSettingsList, context)=>new DspService().generate(
|
|
|
40882
40774
|
const chainOfThought = (params, pinsSettingsList, context)=>new DspService().chainOfThought(params, pinsSettingsList, context);
|
|
40883
40775
|
const react = (params, pinsSettingsList, context)=>new DspService().react(params, pinsSettingsList, context);
|
|
40884
40776
|
const agent = (params, pinsSettingsList, context)=>new DspService().agent(params, pinsSettingsList, context);
|
|
40885
|
-
const forward = (params, pinsSettingsList, context)=>new DspService().forward(params, pinsSettingsList, context);
|
|
40886
|
-
const jsInterpreter = (params, pinsSettingsList, context)=>new DspService().jsInterpreter(params, pinsSettingsList, context);
|
|
40887
40777
|
|
|
40888
40778
|
exports.agent = agent;
|
|
40889
40779
|
exports.chainOfThought = chainOfThought;
|
|
40890
|
-
exports.forward = forward;
|
|
40891
40780
|
exports.generate = generate;
|
|
40892
|
-
exports.jsInterpreter = jsInterpreter;
|
|
40893
40781
|
exports.model = model;
|
|
40894
40782
|
exports.modelAzureOpenAi = modelAzureOpenAi;
|
|
40895
40783
|
exports.modelOllama = modelOllama;
|