autotel-subscribers 16.0.1 → 17.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/amplitude.cjs +64 -64
- package/dist/amplitude.cjs.map +1 -1
- package/dist/amplitude.js +64 -64
- package/dist/amplitude.js.map +1 -1
- package/dist/factories.cjs +348 -249
- package/dist/factories.cjs.map +1 -1
- package/dist/factories.js +348 -249
- package/dist/factories.js.map +1 -1
- package/dist/index.cjs +348 -249
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +348 -249
- package/dist/index.js.map +1 -1
- package/dist/posthog.cjs +284 -185
- package/dist/posthog.cjs.map +1 -1
- package/dist/posthog.js +284 -185
- package/dist/posthog.js.map +1 -1
- package/package.json +12 -12
- package/src/segment.test.ts +1 -0
package/dist/index.cjs
CHANGED
|
@@ -115,11 +115,11 @@ function normalizeWindowsPath(path) {
|
|
|
115
115
|
return path.replace(/^[A-Z]:/, "").replace(/\\/g, "/");
|
|
116
116
|
}
|
|
117
117
|
var init_module_node = __esm({
|
|
118
|
-
"../../node_modules/.pnpm/posthog-node@5.
|
|
118
|
+
"../../node_modules/.pnpm/posthog-node@5.24.1/node_modules/posthog-node/dist/extensions/error-tracking/modifiers/module.node.mjs"() {
|
|
119
119
|
}
|
|
120
120
|
});
|
|
121
121
|
|
|
122
|
-
// ../../node_modules/.pnpm/@posthog+core@1.
|
|
122
|
+
// ../../node_modules/.pnpm/@posthog+core@1.13.0/node_modules/@posthog/core/dist/featureFlagUtils.mjs
|
|
123
123
|
function getFlagDetailFromFlagAndPayload(key, value, payload) {
|
|
124
124
|
return {
|
|
125
125
|
key,
|
|
@@ -136,7 +136,7 @@ function getFlagDetailFromFlagAndPayload(key, value, payload) {
|
|
|
136
136
|
}
|
|
137
137
|
var normalizeFlagsResponse, getFlagValuesFromFlags, getPayloadsFromFlags, getFeatureFlagValue, parsePayload;
|
|
138
138
|
var init_featureFlagUtils = __esm({
|
|
139
|
-
"../../node_modules/.pnpm/@posthog+core@1.
|
|
139
|
+
"../../node_modules/.pnpm/@posthog+core@1.13.0/node_modules/@posthog/core/dist/featureFlagUtils.mjs"() {
|
|
140
140
|
normalizeFlagsResponse = (flagsResponse) => {
|
|
141
141
|
if ("flags" in flagsResponse) {
|
|
142
142
|
const featureFlags = getFlagValuesFromFlags(flagsResponse.flags);
|
|
@@ -194,10 +194,10 @@ var init_featureFlagUtils = __esm({
|
|
|
194
194
|
}
|
|
195
195
|
});
|
|
196
196
|
|
|
197
|
-
// ../../node_modules/.pnpm/@posthog+core@1.
|
|
197
|
+
// ../../node_modules/.pnpm/@posthog+core@1.13.0/node_modules/@posthog/core/dist/vendor/uuidv7.mjs
|
|
198
198
|
var DIGITS, UUID, V7Generator, getDefaultRandom, defaultGenerator, uuidv7, uuidv7obj;
|
|
199
199
|
var init_uuidv7 = __esm({
|
|
200
|
-
"../../node_modules/.pnpm/@posthog+core@1.
|
|
200
|
+
"../../node_modules/.pnpm/@posthog+core@1.13.0/node_modules/@posthog/core/dist/vendor/uuidv7.mjs"() {
|
|
201
201
|
DIGITS = "0123456789abcdef";
|
|
202
202
|
UUID = class _UUID {
|
|
203
203
|
constructor(bytes) {
|
|
@@ -358,10 +358,10 @@ var init_uuidv7 = __esm({
|
|
|
358
358
|
}
|
|
359
359
|
});
|
|
360
360
|
|
|
361
|
-
// ../../node_modules/.pnpm/@posthog+core@1.
|
|
361
|
+
// ../../node_modules/.pnpm/@posthog+core@1.13.0/node_modules/@posthog/core/dist/utils/bot-detection.mjs
|
|
362
362
|
var DEFAULT_BLOCKED_UA_STRS, isBlockedUA;
|
|
363
363
|
var init_bot_detection = __esm({
|
|
364
|
-
"../../node_modules/.pnpm/@posthog+core@1.
|
|
364
|
+
"../../node_modules/.pnpm/@posthog+core@1.13.0/node_modules/@posthog/core/dist/utils/bot-detection.mjs"() {
|
|
365
365
|
DEFAULT_BLOCKED_UA_STRS = [
|
|
366
366
|
"amazonbot",
|
|
367
367
|
"amazonproductbot",
|
|
@@ -452,10 +452,10 @@ var init_bot_detection = __esm({
|
|
|
452
452
|
}
|
|
453
453
|
});
|
|
454
454
|
|
|
455
|
-
// ../../node_modules/.pnpm/@posthog+core@1.
|
|
456
|
-
var types_PostHogPersistedProperty;
|
|
455
|
+
// ../../node_modules/.pnpm/@posthog+core@1.13.0/node_modules/@posthog/core/dist/types.mjs
|
|
456
|
+
var types_PostHogPersistedProperty, FeatureFlagError;
|
|
457
457
|
var init_types = __esm({
|
|
458
|
-
"../../node_modules/.pnpm/@posthog+core@1.
|
|
458
|
+
"../../node_modules/.pnpm/@posthog+core@1.13.0/node_modules/@posthog/core/dist/types.mjs"() {
|
|
459
459
|
types_PostHogPersistedProperty = /* @__PURE__ */ (function(PostHogPersistedProperty) {
|
|
460
460
|
PostHogPersistedProperty["AnonymousId"] = "anonymous_id";
|
|
461
461
|
PostHogPersistedProperty["DistinctId"] = "distinct_id";
|
|
@@ -484,16 +484,25 @@ var init_types = __esm({
|
|
|
484
484
|
PostHogPersistedProperty["FlagsEndpointWasHit"] = "flags_endpoint_was_hit";
|
|
485
485
|
return PostHogPersistedProperty;
|
|
486
486
|
})({});
|
|
487
|
+
FeatureFlagError = {
|
|
488
|
+
ERRORS_WHILE_COMPUTING: "errors_while_computing_flags",
|
|
489
|
+
FLAG_MISSING: "flag_missing",
|
|
490
|
+
QUOTA_LIMITED: "quota_limited",
|
|
491
|
+
TIMEOUT: "timeout",
|
|
492
|
+
CONNECTION_ERROR: "connection_error",
|
|
493
|
+
UNKNOWN_ERROR: "unknown_error",
|
|
494
|
+
apiError: (status) => `api_error_${status}`
|
|
495
|
+
};
|
|
487
496
|
}
|
|
488
497
|
});
|
|
489
498
|
|
|
490
|
-
// ../../node_modules/.pnpm/@posthog+core@1.
|
|
499
|
+
// ../../node_modules/.pnpm/@posthog+core@1.13.0/node_modules/@posthog/core/dist/utils/string-utils.mjs
|
|
491
500
|
var init_string_utils = __esm({
|
|
492
|
-
"../../node_modules/.pnpm/@posthog+core@1.
|
|
501
|
+
"../../node_modules/.pnpm/@posthog+core@1.13.0/node_modules/@posthog/core/dist/utils/string-utils.mjs"() {
|
|
493
502
|
}
|
|
494
503
|
});
|
|
495
504
|
|
|
496
|
-
// ../../node_modules/.pnpm/@posthog+core@1.
|
|
505
|
+
// ../../node_modules/.pnpm/@posthog+core@1.13.0/node_modules/@posthog/core/dist/utils/type-utils.mjs
|
|
497
506
|
function isPrimitive(value) {
|
|
498
507
|
return null === value || "object" != typeof value;
|
|
499
508
|
}
|
|
@@ -518,7 +527,7 @@ function isInstanceOf(candidate, base) {
|
|
|
518
527
|
}
|
|
519
528
|
var nativeIsArray, ObjProto, type_utils_toString, isArray, isObject, isUndefined, isString, isEmptyString, isNumber, isPlainError;
|
|
520
529
|
var init_type_utils = __esm({
|
|
521
|
-
"../../node_modules/.pnpm/@posthog+core@1.
|
|
530
|
+
"../../node_modules/.pnpm/@posthog+core@1.13.0/node_modules/@posthog/core/dist/utils/type-utils.mjs"() {
|
|
522
531
|
init_types();
|
|
523
532
|
init_string_utils();
|
|
524
533
|
nativeIsArray = Array.isArray;
|
|
@@ -532,12 +541,12 @@ var init_type_utils = __esm({
|
|
|
532
541
|
isUndefined = (x) => void 0 === x;
|
|
533
542
|
isString = (x) => "[object String]" == type_utils_toString.call(x);
|
|
534
543
|
isEmptyString = (x) => isString(x) && 0 === x.trim().length;
|
|
535
|
-
isNumber = (x) => "[object Number]" == type_utils_toString.call(x);
|
|
544
|
+
isNumber = (x) => "[object Number]" == type_utils_toString.call(x) && x === x;
|
|
536
545
|
isPlainError = (x) => x instanceof Error;
|
|
537
546
|
}
|
|
538
547
|
});
|
|
539
548
|
|
|
540
|
-
// ../../node_modules/.pnpm/@posthog+core@1.
|
|
549
|
+
// ../../node_modules/.pnpm/@posthog+core@1.13.0/node_modules/@posthog/core/dist/utils/number-utils.mjs
|
|
541
550
|
function clampToRange(value, min, max, logger, fallbackValue) {
|
|
542
551
|
if (min > max) {
|
|
543
552
|
logger.warn("min cannot be greater than max.");
|
|
@@ -555,15 +564,15 @@ function clampToRange(value, min, max, logger, fallbackValue) {
|
|
|
555
564
|
return clampToRange(max, min, max, logger);
|
|
556
565
|
}
|
|
557
566
|
var init_number_utils = __esm({
|
|
558
|
-
"../../node_modules/.pnpm/@posthog+core@1.
|
|
567
|
+
"../../node_modules/.pnpm/@posthog+core@1.13.0/node_modules/@posthog/core/dist/utils/number-utils.mjs"() {
|
|
559
568
|
init_type_utils();
|
|
560
569
|
}
|
|
561
570
|
});
|
|
562
571
|
|
|
563
|
-
// ../../node_modules/.pnpm/@posthog+core@1.
|
|
572
|
+
// ../../node_modules/.pnpm/@posthog+core@1.13.0/node_modules/@posthog/core/dist/utils/bucketed-rate-limiter.mjs
|
|
564
573
|
var ONE_DAY_IN_MS, BucketedRateLimiter;
|
|
565
574
|
var init_bucketed_rate_limiter = __esm({
|
|
566
|
-
"../../node_modules/.pnpm/@posthog+core@1.
|
|
575
|
+
"../../node_modules/.pnpm/@posthog+core@1.13.0/node_modules/@posthog/core/dist/utils/bucketed-rate-limiter.mjs"() {
|
|
567
576
|
init_number_utils();
|
|
568
577
|
ONE_DAY_IN_MS = 864e5;
|
|
569
578
|
BucketedRateLimiter = class {
|
|
@@ -607,10 +616,10 @@ var init_bucketed_rate_limiter = __esm({
|
|
|
607
616
|
}
|
|
608
617
|
});
|
|
609
618
|
|
|
610
|
-
// ../../node_modules/.pnpm/@posthog+core@1.
|
|
619
|
+
// ../../node_modules/.pnpm/@posthog+core@1.13.0/node_modules/@posthog/core/dist/utils/promise-queue.mjs
|
|
611
620
|
var PromiseQueue;
|
|
612
621
|
var init_promise_queue = __esm({
|
|
613
|
-
"../../node_modules/.pnpm/@posthog+core@1.
|
|
622
|
+
"../../node_modules/.pnpm/@posthog+core@1.13.0/node_modules/@posthog/core/dist/utils/promise-queue.mjs"() {
|
|
614
623
|
init_uuidv7();
|
|
615
624
|
PromiseQueue = class {
|
|
616
625
|
add(promise) {
|
|
@@ -641,7 +650,7 @@ var init_promise_queue = __esm({
|
|
|
641
650
|
}
|
|
642
651
|
});
|
|
643
652
|
|
|
644
|
-
// ../../node_modules/.pnpm/@posthog+core@1.
|
|
653
|
+
// ../../node_modules/.pnpm/@posthog+core@1.13.0/node_modules/@posthog/core/dist/utils/logger.mjs
|
|
645
654
|
function createConsole(consoleLike = console) {
|
|
646
655
|
const lockedMethods = {
|
|
647
656
|
log: consoleLike.log.bind(consoleLike),
|
|
@@ -656,7 +665,7 @@ function createLogger(prefix, maybeCall = passThrough) {
|
|
|
656
665
|
}
|
|
657
666
|
var _createLogger, passThrough;
|
|
658
667
|
var init_logger = __esm({
|
|
659
|
-
"../../node_modules/.pnpm/@posthog+core@1.
|
|
668
|
+
"../../node_modules/.pnpm/@posthog+core@1.13.0/node_modules/@posthog/core/dist/utils/logger.mjs"() {
|
|
660
669
|
_createLogger = (prefix, maybeCall, consoleLike) => {
|
|
661
670
|
function _log(level, ...args) {
|
|
662
671
|
maybeCall(() => {
|
|
@@ -685,10 +694,10 @@ var init_logger = __esm({
|
|
|
685
694
|
}
|
|
686
695
|
});
|
|
687
696
|
|
|
688
|
-
// ../../node_modules/.pnpm/@posthog+core@1.
|
|
697
|
+
// ../../node_modules/.pnpm/@posthog+core@1.13.0/node_modules/@posthog/core/dist/utils/user-agent-utils.mjs
|
|
689
698
|
var MOBILE, TABLET, GENERIC;
|
|
690
699
|
var init_user_agent_utils = __esm({
|
|
691
|
-
"../../node_modules/.pnpm/@posthog+core@1.
|
|
700
|
+
"../../node_modules/.pnpm/@posthog+core@1.13.0/node_modules/@posthog/core/dist/utils/user-agent-utils.mjs"() {
|
|
692
701
|
init_string_utils();
|
|
693
702
|
init_type_utils();
|
|
694
703
|
MOBILE = "Mobile";
|
|
@@ -699,7 +708,7 @@ var init_user_agent_utils = __esm({
|
|
|
699
708
|
}
|
|
700
709
|
});
|
|
701
710
|
|
|
702
|
-
// ../../node_modules/.pnpm/@posthog+core@1.
|
|
711
|
+
// ../../node_modules/.pnpm/@posthog+core@1.13.0/node_modules/@posthog/core/dist/utils/index.mjs
|
|
703
712
|
function assert(truthyValue, message2) {
|
|
704
713
|
if (!truthyValue || "string" != typeof truthyValue || isEmpty(truthyValue)) throw new Error(message2);
|
|
705
714
|
}
|
|
@@ -743,7 +752,7 @@ function allSettled(promises) {
|
|
|
743
752
|
}
|
|
744
753
|
var STRING_FORMAT, isError;
|
|
745
754
|
var init_utils = __esm({
|
|
746
|
-
"../../node_modules/.pnpm/@posthog+core@1.
|
|
755
|
+
"../../node_modules/.pnpm/@posthog+core@1.13.0/node_modules/@posthog/core/dist/utils/index.mjs"() {
|
|
747
756
|
init_bot_detection();
|
|
748
757
|
init_bucketed_rate_limiter();
|
|
749
758
|
init_number_utils();
|
|
@@ -757,10 +766,10 @@ var init_utils = __esm({
|
|
|
757
766
|
}
|
|
758
767
|
});
|
|
759
768
|
|
|
760
|
-
// ../../node_modules/.pnpm/@posthog+core@1.
|
|
769
|
+
// ../../node_modules/.pnpm/@posthog+core@1.13.0/node_modules/@posthog/core/dist/eventemitter.mjs
|
|
761
770
|
var SimpleEventEmitter;
|
|
762
771
|
var init_eventemitter = __esm({
|
|
763
|
-
"../../node_modules/.pnpm/@posthog+core@1.
|
|
772
|
+
"../../node_modules/.pnpm/@posthog+core@1.13.0/node_modules/@posthog/core/dist/eventemitter.mjs"() {
|
|
764
773
|
SimpleEventEmitter = class {
|
|
765
774
|
constructor() {
|
|
766
775
|
this.events = {};
|
|
@@ -781,7 +790,7 @@ var init_eventemitter = __esm({
|
|
|
781
790
|
}
|
|
782
791
|
});
|
|
783
792
|
|
|
784
|
-
// ../../node_modules/.pnpm/@posthog+core@1.
|
|
793
|
+
// ../../node_modules/.pnpm/@posthog+core@1.13.0/node_modules/@posthog/core/dist/gzip.mjs
|
|
785
794
|
function isGzipSupported() {
|
|
786
795
|
return "CompressionStream" in globalThis;
|
|
787
796
|
}
|
|
@@ -800,11 +809,11 @@ async function gzipCompress(input, isDebug = true) {
|
|
|
800
809
|
}
|
|
801
810
|
}
|
|
802
811
|
var init_gzip = __esm({
|
|
803
|
-
"../../node_modules/.pnpm/@posthog+core@1.
|
|
812
|
+
"../../node_modules/.pnpm/@posthog+core@1.13.0/node_modules/@posthog/core/dist/gzip.mjs"() {
|
|
804
813
|
}
|
|
805
814
|
});
|
|
806
815
|
|
|
807
|
-
// ../../node_modules/.pnpm/@posthog+core@1.
|
|
816
|
+
// ../../node_modules/.pnpm/@posthog+core@1.13.0/node_modules/@posthog/core/dist/posthog-core-stateless.mjs
|
|
808
817
|
async function logFlushError(err) {
|
|
809
818
|
if (err instanceof PostHogFetchHttpError) {
|
|
810
819
|
let text = "";
|
|
@@ -824,7 +833,7 @@ function isPostHogFetchContentTooLargeError(err) {
|
|
|
824
833
|
}
|
|
825
834
|
var PostHogFetchHttpError, PostHogFetchNetworkError, PostHogCoreStateless;
|
|
826
835
|
var init_posthog_core_stateless = __esm({
|
|
827
|
-
"../../node_modules/.pnpm/@posthog+core@1.
|
|
836
|
+
"../../node_modules/.pnpm/@posthog+core@1.13.0/node_modules/@posthog/core/dist/posthog-core-stateless.mjs"() {
|
|
828
837
|
init_eventemitter();
|
|
829
838
|
init_featureFlagUtils();
|
|
830
839
|
init_gzip();
|
|
@@ -880,10 +889,11 @@ var init_posthog_core_stateless = __esm({
|
|
|
880
889
|
this.disableGeoip = options.disableGeoip ?? true;
|
|
881
890
|
this.disabled = options.disabled ?? false;
|
|
882
891
|
this.historicalMigration = options?.historicalMigration ?? false;
|
|
883
|
-
this.evaluationEnvironments = options?.evaluationEnvironments;
|
|
884
892
|
this._initPromise = Promise.resolve();
|
|
885
893
|
this._isInitialized = true;
|
|
886
894
|
this._logger = createLogger("[PostHog]", this.logMsgIfDebug.bind(this));
|
|
895
|
+
this.evaluationContexts = options?.evaluationContexts ?? options?.evaluationEnvironments;
|
|
896
|
+
if (options?.evaluationEnvironments && !options?.evaluationContexts) this._logger.warn("evaluationEnvironments is deprecated. Use evaluationContexts instead. This property will be removed in a future version.");
|
|
887
897
|
this.disableCompression = !isGzipSupported() || (options?.disableCompression ?? false);
|
|
888
898
|
}
|
|
889
899
|
logMsgIfDebug(fn) {
|
|
@@ -1058,7 +1068,7 @@ var init_posthog_core_stateless = __esm({
|
|
|
1058
1068
|
group_properties: groupProperties,
|
|
1059
1069
|
...extraPayload
|
|
1060
1070
|
};
|
|
1061
|
-
if (this.
|
|
1071
|
+
if (this.evaluationContexts && this.evaluationContexts.length > 0) requestData.evaluation_contexts = this.evaluationContexts;
|
|
1062
1072
|
const fetchOptions = {
|
|
1063
1073
|
method: "POST",
|
|
1064
1074
|
headers: {
|
|
@@ -1070,10 +1080,35 @@ var init_posthog_core_stateless = __esm({
|
|
|
1070
1080
|
this._logger.info("Flags URL", url);
|
|
1071
1081
|
return this.fetchWithRetry(url, fetchOptions, {
|
|
1072
1082
|
retryCount: 0
|
|
1073
|
-
}, this.featureFlagsRequestTimeoutMs).then((response) => response.json()).then((response) =>
|
|
1083
|
+
}, this.featureFlagsRequestTimeoutMs).then((response) => response.json()).then((response) => ({
|
|
1084
|
+
success: true,
|
|
1085
|
+
response: normalizeFlagsResponse(response)
|
|
1086
|
+
})).catch((error) => {
|
|
1074
1087
|
this._events.emit("error", error);
|
|
1088
|
+
return {
|
|
1089
|
+
success: false,
|
|
1090
|
+
error: this.categorizeRequestError(error)
|
|
1091
|
+
};
|
|
1075
1092
|
});
|
|
1076
1093
|
}
|
|
1094
|
+
categorizeRequestError(error) {
|
|
1095
|
+
if (error instanceof PostHogFetchHttpError) return {
|
|
1096
|
+
type: "api_error",
|
|
1097
|
+
statusCode: error.status
|
|
1098
|
+
};
|
|
1099
|
+
if (error instanceof PostHogFetchNetworkError) {
|
|
1100
|
+
const cause = error.error;
|
|
1101
|
+
if (cause instanceof Error && ("AbortError" === cause.name || "TimeoutError" === cause.name)) return {
|
|
1102
|
+
type: "timeout"
|
|
1103
|
+
};
|
|
1104
|
+
return {
|
|
1105
|
+
type: "connection_error"
|
|
1106
|
+
};
|
|
1107
|
+
}
|
|
1108
|
+
return {
|
|
1109
|
+
type: "unknown_error"
|
|
1110
|
+
};
|
|
1111
|
+
}
|
|
1077
1112
|
async getFeatureFlagStateless(key, distinctId, groups = {}, personProperties = {}, groupProperties = {}, disableGeoip) {
|
|
1078
1113
|
await this._initPromise;
|
|
1079
1114
|
const flagDetailResponse = await this.getFeatureFlagDetailStateless(key, distinctId, groups, personProperties, groupProperties, disableGeoip);
|
|
@@ -1140,8 +1175,9 @@ var init_posthog_core_stateless = __esm({
|
|
|
1140
1175
|
const extraPayload = {};
|
|
1141
1176
|
if (disableGeoip ?? this.disableGeoip) extraPayload["geoip_disable"] = true;
|
|
1142
1177
|
if (flagKeysToEvaluate) extraPayload["flag_keys_to_evaluate"] = flagKeysToEvaluate;
|
|
1143
|
-
const
|
|
1144
|
-
if (
|
|
1178
|
+
const result = await this.getFlags(distinctId, groups, personProperties, groupProperties, extraPayload);
|
|
1179
|
+
if (!result.success) return;
|
|
1180
|
+
const flagsResponse = result.response;
|
|
1145
1181
|
if (flagsResponse.errorsWhileComputingFlags) console.error("[FEATURE FLAGS] Error while computing feature flags, some flags may be missing or incorrect. Learn more at https://posthog.com/docs/feature-flags/best-practices");
|
|
1146
1182
|
if (flagsResponse.quotaLimited?.includes("feature_flags")) {
|
|
1147
1183
|
console.warn("[FEATURE FLAGS] Feature flags quota limit exceeded - feature flags unavailable. Learn more about billing limits at https://posthog.com/docs/billing/limits-alerts");
|
|
@@ -1208,10 +1244,15 @@ var init_posthog_core_stateless = __esm({
|
|
|
1208
1244
|
this.setPersistedProperty(types_PostHogPersistedProperty.Props, this.props);
|
|
1209
1245
|
});
|
|
1210
1246
|
}
|
|
1247
|
+
processBeforeEnqueue(message2) {
|
|
1248
|
+
return message2;
|
|
1249
|
+
}
|
|
1211
1250
|
enqueue(type, _message, options) {
|
|
1212
1251
|
this.wrap(() => {
|
|
1213
1252
|
if (this.optedOut) return void this._events.emit(type, "Library is disabled. Not sending event. To re-enable, call posthog.optIn()");
|
|
1214
|
-
|
|
1253
|
+
let message2 = this.prepareMessage(type, _message, options);
|
|
1254
|
+
message2 = this.processBeforeEnqueue(message2);
|
|
1255
|
+
if (null === message2) return;
|
|
1215
1256
|
const queue = this.getPersistedProperty(types_PostHogPersistedProperty.Queue) || [];
|
|
1216
1257
|
if (queue.length >= this.maxQueueSize) {
|
|
1217
1258
|
queue.shift();
|
|
@@ -1230,10 +1271,13 @@ var init_posthog_core_stateless = __esm({
|
|
|
1230
1271
|
if (this.disabled) return void this._logger.warn("The client is disabled");
|
|
1231
1272
|
if (!this._isInitialized) await this._initPromise;
|
|
1232
1273
|
if (this.optedOut) return void this._events.emit(type, "Library is disabled. Not sending event. To re-enable, call posthog.optIn()");
|
|
1274
|
+
let message2 = this.prepareMessage(type, _message, options);
|
|
1275
|
+
message2 = this.processBeforeEnqueue(message2);
|
|
1276
|
+
if (null === message2) return;
|
|
1233
1277
|
const data = {
|
|
1234
1278
|
api_key: this.apiKey,
|
|
1235
1279
|
batch: [
|
|
1236
|
-
|
|
1280
|
+
message2
|
|
1237
1281
|
],
|
|
1238
1282
|
sent_at: currentISOTime()
|
|
1239
1283
|
};
|
|
@@ -1442,9 +1486,9 @@ var init_posthog_core_stateless = __esm({
|
|
|
1442
1486
|
}
|
|
1443
1487
|
});
|
|
1444
1488
|
|
|
1445
|
-
// ../../node_modules/.pnpm/@posthog+core@1.
|
|
1489
|
+
// ../../node_modules/.pnpm/@posthog+core@1.13.0/node_modules/@posthog/core/dist/posthog-core.mjs
|
|
1446
1490
|
var init_posthog_core = __esm({
|
|
1447
|
-
"../../node_modules/.pnpm/@posthog+core@1.
|
|
1491
|
+
"../../node_modules/.pnpm/@posthog+core@1.13.0/node_modules/@posthog/core/dist/posthog-core.mjs"() {
|
|
1448
1492
|
init_featureFlagUtils();
|
|
1449
1493
|
init_types();
|
|
1450
1494
|
init_posthog_core_stateless();
|
|
@@ -1453,7 +1497,7 @@ var init_posthog_core = __esm({
|
|
|
1453
1497
|
}
|
|
1454
1498
|
});
|
|
1455
1499
|
|
|
1456
|
-
// ../../node_modules/.pnpm/@posthog+core@1.
|
|
1500
|
+
// ../../node_modules/.pnpm/@posthog+core@1.13.0/node_modules/@posthog/core/dist/error-tracking/chunk-ids.mjs
|
|
1457
1501
|
function getFilenameToChunkIdMap(stackParser) {
|
|
1458
1502
|
const chunkIdMap = globalThis._posthogChunkIds;
|
|
1459
1503
|
if (!chunkIdMap) return;
|
|
@@ -1486,14 +1530,14 @@ function getFilenameToChunkIdMap(stackParser) {
|
|
|
1486
1530
|
}
|
|
1487
1531
|
var parsedStackResults, lastKeysCount, cachedFilenameChunkIds;
|
|
1488
1532
|
var init_chunk_ids = __esm({
|
|
1489
|
-
"../../node_modules/.pnpm/@posthog+core@1.
|
|
1533
|
+
"../../node_modules/.pnpm/@posthog+core@1.13.0/node_modules/@posthog/core/dist/error-tracking/chunk-ids.mjs"() {
|
|
1490
1534
|
}
|
|
1491
1535
|
});
|
|
1492
1536
|
|
|
1493
|
-
// ../../node_modules/.pnpm/@posthog+core@1.
|
|
1537
|
+
// ../../node_modules/.pnpm/@posthog+core@1.13.0/node_modules/@posthog/core/dist/error-tracking/error-properties-builder.mjs
|
|
1494
1538
|
var MAX_CAUSE_RECURSION, ErrorPropertiesBuilder;
|
|
1495
1539
|
var init_error_properties_builder = __esm({
|
|
1496
|
-
"../../node_modules/.pnpm/@posthog+core@1.
|
|
1540
|
+
"../../node_modules/.pnpm/@posthog+core@1.13.0/node_modules/@posthog/core/dist/error-tracking/error-properties-builder.mjs"() {
|
|
1497
1541
|
init_utils();
|
|
1498
1542
|
init_chunk_ids();
|
|
1499
1543
|
MAX_CAUSE_RECURSION = 4;
|
|
@@ -1607,7 +1651,7 @@ var init_error_properties_builder = __esm({
|
|
|
1607
1651
|
}
|
|
1608
1652
|
});
|
|
1609
1653
|
|
|
1610
|
-
// ../../node_modules/.pnpm/@posthog+core@1.
|
|
1654
|
+
// ../../node_modules/.pnpm/@posthog+core@1.13.0/node_modules/@posthog/core/dist/error-tracking/parsers/base.mjs
|
|
1611
1655
|
function createFrame(platform, filename, func, lineno, colno) {
|
|
1612
1656
|
const frame = {
|
|
1613
1657
|
platform,
|
|
@@ -1621,16 +1665,16 @@ function createFrame(platform, filename, func, lineno, colno) {
|
|
|
1621
1665
|
}
|
|
1622
1666
|
var UNKNOWN_FUNCTION;
|
|
1623
1667
|
var init_base = __esm({
|
|
1624
|
-
"../../node_modules/.pnpm/@posthog+core@1.
|
|
1668
|
+
"../../node_modules/.pnpm/@posthog+core@1.13.0/node_modules/@posthog/core/dist/error-tracking/parsers/base.mjs"() {
|
|
1625
1669
|
init_utils();
|
|
1626
1670
|
UNKNOWN_FUNCTION = "?";
|
|
1627
1671
|
}
|
|
1628
1672
|
});
|
|
1629
1673
|
|
|
1630
|
-
// ../../node_modules/.pnpm/@posthog+core@1.
|
|
1674
|
+
// ../../node_modules/.pnpm/@posthog+core@1.13.0/node_modules/@posthog/core/dist/error-tracking/parsers/safari.mjs
|
|
1631
1675
|
var extractSafariExtensionDetails;
|
|
1632
1676
|
var init_safari = __esm({
|
|
1633
|
-
"../../node_modules/.pnpm/@posthog+core@1.
|
|
1677
|
+
"../../node_modules/.pnpm/@posthog+core@1.13.0/node_modules/@posthog/core/dist/error-tracking/parsers/safari.mjs"() {
|
|
1634
1678
|
init_base();
|
|
1635
1679
|
extractSafariExtensionDetails = (func, filename) => {
|
|
1636
1680
|
const isSafariExtension = -1 !== func.indexOf("safari-extension");
|
|
@@ -1646,10 +1690,10 @@ var init_safari = __esm({
|
|
|
1646
1690
|
}
|
|
1647
1691
|
});
|
|
1648
1692
|
|
|
1649
|
-
// ../../node_modules/.pnpm/@posthog+core@1.
|
|
1693
|
+
// ../../node_modules/.pnpm/@posthog+core@1.13.0/node_modules/@posthog/core/dist/error-tracking/parsers/chrome.mjs
|
|
1650
1694
|
var chromeRegexNoFnName, chromeRegex, chromeEvalRegex, chromeStackLineParser;
|
|
1651
1695
|
var init_chrome = __esm({
|
|
1652
|
-
"../../node_modules/.pnpm/@posthog+core@1.
|
|
1696
|
+
"../../node_modules/.pnpm/@posthog+core@1.13.0/node_modules/@posthog/core/dist/error-tracking/parsers/chrome.mjs"() {
|
|
1653
1697
|
init_base();
|
|
1654
1698
|
init_safari();
|
|
1655
1699
|
chromeRegexNoFnName = /^\s*at (\S+?)(?::(\d+))(?::(\d+))\s*$/i;
|
|
@@ -1679,10 +1723,10 @@ var init_chrome = __esm({
|
|
|
1679
1723
|
}
|
|
1680
1724
|
});
|
|
1681
1725
|
|
|
1682
|
-
// ../../node_modules/.pnpm/@posthog+core@1.
|
|
1726
|
+
// ../../node_modules/.pnpm/@posthog+core@1.13.0/node_modules/@posthog/core/dist/error-tracking/parsers/gecko.mjs
|
|
1683
1727
|
var geckoREgex, geckoEvalRegex, geckoStackLineParser;
|
|
1684
1728
|
var init_gecko = __esm({
|
|
1685
|
-
"../../node_modules/.pnpm/@posthog+core@1.
|
|
1729
|
+
"../../node_modules/.pnpm/@posthog+core@1.13.0/node_modules/@posthog/core/dist/error-tracking/parsers/gecko.mjs"() {
|
|
1686
1730
|
init_base();
|
|
1687
1731
|
init_safari();
|
|
1688
1732
|
geckoREgex = /^\s*(.*?)(?:\((.*?)\))?(?:^|@)?((?:[-a-z]+)?:\/.*?|\[native code\]|[^@]*(?:bundle|\d+\.js)|\/[\w\-. /=]+)(?::(\d+))?(?::(\d+))?\s*$/i;
|
|
@@ -1709,10 +1753,10 @@ var init_gecko = __esm({
|
|
|
1709
1753
|
}
|
|
1710
1754
|
});
|
|
1711
1755
|
|
|
1712
|
-
// ../../node_modules/.pnpm/@posthog+core@1.
|
|
1756
|
+
// ../../node_modules/.pnpm/@posthog+core@1.13.0/node_modules/@posthog/core/dist/error-tracking/parsers/winjs.mjs
|
|
1713
1757
|
var winjsRegex, winjsStackLineParser;
|
|
1714
1758
|
var init_winjs = __esm({
|
|
1715
|
-
"../../node_modules/.pnpm/@posthog+core@1.
|
|
1759
|
+
"../../node_modules/.pnpm/@posthog+core@1.13.0/node_modules/@posthog/core/dist/error-tracking/parsers/winjs.mjs"() {
|
|
1716
1760
|
init_base();
|
|
1717
1761
|
winjsRegex = /^\s*at (?:((?:\[object object\])?.+) )?\(?((?:[-a-z]+):.*?):(\d+)(?::(\d+))?\)?\s*$/i;
|
|
1718
1762
|
winjsStackLineParser = (line, platform) => {
|
|
@@ -1722,10 +1766,10 @@ var init_winjs = __esm({
|
|
|
1722
1766
|
}
|
|
1723
1767
|
});
|
|
1724
1768
|
|
|
1725
|
-
// ../../node_modules/.pnpm/@posthog+core@1.
|
|
1769
|
+
// ../../node_modules/.pnpm/@posthog+core@1.13.0/node_modules/@posthog/core/dist/error-tracking/parsers/opera.mjs
|
|
1726
1770
|
var opera10Regex, opera10StackLineParser, opera11Regex, opera11StackLineParser;
|
|
1727
1771
|
var init_opera = __esm({
|
|
1728
|
-
"../../node_modules/.pnpm/@posthog+core@1.
|
|
1772
|
+
"../../node_modules/.pnpm/@posthog+core@1.13.0/node_modules/@posthog/core/dist/error-tracking/parsers/opera.mjs"() {
|
|
1729
1773
|
init_base();
|
|
1730
1774
|
opera10Regex = / line (\d+).*script (?:in )?(\S+)(?:: in function (\S+))?$/i;
|
|
1731
1775
|
opera10StackLineParser = (line, platform) => {
|
|
@@ -1740,7 +1784,7 @@ var init_opera = __esm({
|
|
|
1740
1784
|
}
|
|
1741
1785
|
});
|
|
1742
1786
|
|
|
1743
|
-
// ../../node_modules/.pnpm/@posthog+core@1.
|
|
1787
|
+
// ../../node_modules/.pnpm/@posthog+core@1.13.0/node_modules/@posthog/core/dist/error-tracking/parsers/node.mjs
|
|
1744
1788
|
function filenameIsInApp(filename, isNative = false) {
|
|
1745
1789
|
const isInternal = isNative || filename && !filename.startsWith("/") && !filename.match(/^[A-Z]:/) && !filename.startsWith(".") && !filename.match(/^[a-zA-Z]([a-zA-Z0-9.\-+])*:\/\//);
|
|
1746
1790
|
return !isInternal && void 0 !== filename && !filename.includes("node_modules/");
|
|
@@ -1750,7 +1794,7 @@ function _parseIntOrUndefined(input) {
|
|
|
1750
1794
|
}
|
|
1751
1795
|
var FILENAME_MATCH, FULL_MATCH, nodeStackLineParser;
|
|
1752
1796
|
var init_node = __esm({
|
|
1753
|
-
"../../node_modules/.pnpm/@posthog+core@1.
|
|
1797
|
+
"../../node_modules/.pnpm/@posthog+core@1.13.0/node_modules/@posthog/core/dist/error-tracking/parsers/node.mjs"() {
|
|
1754
1798
|
init_base();
|
|
1755
1799
|
FILENAME_MATCH = /^\s*[-]{4,}$/;
|
|
1756
1800
|
FULL_MATCH = /at (?:async )?(?:(.+?)\s+\()?(?:(.+):(\d+):(\d+)?|([^)]+))\)?/;
|
|
@@ -1811,7 +1855,7 @@ var init_node = __esm({
|
|
|
1811
1855
|
}
|
|
1812
1856
|
});
|
|
1813
1857
|
|
|
1814
|
-
// ../../node_modules/.pnpm/@posthog+core@1.
|
|
1858
|
+
// ../../node_modules/.pnpm/@posthog+core@1.13.0/node_modules/@posthog/core/dist/error-tracking/parsers/index.mjs
|
|
1815
1859
|
function reverseAndStripFrames(stack) {
|
|
1816
1860
|
if (!stack.length) return [];
|
|
1817
1861
|
const localStack = Array.from(stack);
|
|
@@ -1852,7 +1896,7 @@ function createStackParser(platform, ...parsers) {
|
|
|
1852
1896
|
}
|
|
1853
1897
|
var WEBPACK_ERROR_REGEXP, STACKTRACE_FRAME_LIMIT;
|
|
1854
1898
|
var init_parsers = __esm({
|
|
1855
|
-
"../../node_modules/.pnpm/@posthog+core@1.
|
|
1899
|
+
"../../node_modules/.pnpm/@posthog+core@1.13.0/node_modules/@posthog/core/dist/error-tracking/parsers/index.mjs"() {
|
|
1856
1900
|
init_base();
|
|
1857
1901
|
init_chrome();
|
|
1858
1902
|
init_gecko();
|
|
@@ -1864,10 +1908,10 @@ var init_parsers = __esm({
|
|
|
1864
1908
|
}
|
|
1865
1909
|
});
|
|
1866
1910
|
|
|
1867
|
-
// ../../node_modules/.pnpm/@posthog+core@1.
|
|
1911
|
+
// ../../node_modules/.pnpm/@posthog+core@1.13.0/node_modules/@posthog/core/dist/error-tracking/coercers/dom-exception-coercer.mjs
|
|
1868
1912
|
var DOMExceptionCoercer;
|
|
1869
1913
|
var init_dom_exception_coercer = __esm({
|
|
1870
|
-
"../../node_modules/.pnpm/@posthog+core@1.
|
|
1914
|
+
"../../node_modules/.pnpm/@posthog+core@1.13.0/node_modules/@posthog/core/dist/error-tracking/coercers/dom-exception-coercer.mjs"() {
|
|
1871
1915
|
init_utils();
|
|
1872
1916
|
DOMExceptionCoercer = class {
|
|
1873
1917
|
match(err) {
|
|
@@ -1901,10 +1945,10 @@ var init_dom_exception_coercer = __esm({
|
|
|
1901
1945
|
}
|
|
1902
1946
|
});
|
|
1903
1947
|
|
|
1904
|
-
// ../../node_modules/.pnpm/@posthog+core@1.
|
|
1948
|
+
// ../../node_modules/.pnpm/@posthog+core@1.13.0/node_modules/@posthog/core/dist/error-tracking/coercers/error-coercer.mjs
|
|
1905
1949
|
var ErrorCoercer;
|
|
1906
1950
|
var init_error_coercer = __esm({
|
|
1907
|
-
"../../node_modules/.pnpm/@posthog+core@1.
|
|
1951
|
+
"../../node_modules/.pnpm/@posthog+core@1.13.0/node_modules/@posthog/core/dist/error-tracking/coercers/error-coercer.mjs"() {
|
|
1908
1952
|
init_utils();
|
|
1909
1953
|
ErrorCoercer = class {
|
|
1910
1954
|
match(err) {
|
|
@@ -1934,10 +1978,10 @@ var init_error_coercer = __esm({
|
|
|
1934
1978
|
}
|
|
1935
1979
|
});
|
|
1936
1980
|
|
|
1937
|
-
// ../../node_modules/.pnpm/@posthog+core@1.
|
|
1981
|
+
// ../../node_modules/.pnpm/@posthog+core@1.13.0/node_modules/@posthog/core/dist/error-tracking/coercers/error-event-coercer.mjs
|
|
1938
1982
|
var ErrorEventCoercer;
|
|
1939
1983
|
var init_error_event_coercer = __esm({
|
|
1940
|
-
"../../node_modules/.pnpm/@posthog+core@1.
|
|
1984
|
+
"../../node_modules/.pnpm/@posthog+core@1.13.0/node_modules/@posthog/core/dist/error-tracking/coercers/error-event-coercer.mjs"() {
|
|
1941
1985
|
init_utils();
|
|
1942
1986
|
ErrorEventCoercer = class {
|
|
1943
1987
|
constructor() {
|
|
@@ -1959,10 +2003,10 @@ var init_error_event_coercer = __esm({
|
|
|
1959
2003
|
}
|
|
1960
2004
|
});
|
|
1961
2005
|
|
|
1962
|
-
// ../../node_modules/.pnpm/@posthog+core@1.
|
|
2006
|
+
// ../../node_modules/.pnpm/@posthog+core@1.13.0/node_modules/@posthog/core/dist/error-tracking/coercers/string-coercer.mjs
|
|
1963
2007
|
var ERROR_TYPES_PATTERN, StringCoercer;
|
|
1964
2008
|
var init_string_coercer = __esm({
|
|
1965
|
-
"../../node_modules/.pnpm/@posthog+core@1.
|
|
2009
|
+
"../../node_modules/.pnpm/@posthog+core@1.13.0/node_modules/@posthog/core/dist/error-tracking/coercers/string-coercer.mjs"() {
|
|
1966
2010
|
ERROR_TYPES_PATTERN = /^(?:[Uu]ncaught (?:exception: )?)?(?:((?:Eval|Internal|Range|Reference|Syntax|Type|URI|)Error): )?(.*)$/i;
|
|
1967
2011
|
StringCoercer = class {
|
|
1968
2012
|
match(input) {
|
|
@@ -1994,10 +2038,10 @@ var init_string_coercer = __esm({
|
|
|
1994
2038
|
}
|
|
1995
2039
|
});
|
|
1996
2040
|
|
|
1997
|
-
// ../../node_modules/.pnpm/@posthog+core@1.
|
|
2041
|
+
// ../../node_modules/.pnpm/@posthog+core@1.13.0/node_modules/@posthog/core/dist/error-tracking/types.mjs
|
|
1998
2042
|
var severityLevels;
|
|
1999
2043
|
var init_types2 = __esm({
|
|
2000
|
-
"../../node_modules/.pnpm/@posthog+core@1.
|
|
2044
|
+
"../../node_modules/.pnpm/@posthog+core@1.13.0/node_modules/@posthog/core/dist/error-tracking/types.mjs"() {
|
|
2001
2045
|
severityLevels = [
|
|
2002
2046
|
"fatal",
|
|
2003
2047
|
"error",
|
|
@@ -2009,7 +2053,7 @@ var init_types2 = __esm({
|
|
|
2009
2053
|
}
|
|
2010
2054
|
});
|
|
2011
2055
|
|
|
2012
|
-
// ../../node_modules/.pnpm/@posthog+core@1.
|
|
2056
|
+
// ../../node_modules/.pnpm/@posthog+core@1.13.0/node_modules/@posthog/core/dist/error-tracking/coercers/utils.mjs
|
|
2013
2057
|
function extractExceptionKeysForMessage(err, maxLength = 40) {
|
|
2014
2058
|
const keys = Object.keys(err);
|
|
2015
2059
|
keys.sort();
|
|
@@ -2024,14 +2068,14 @@ function extractExceptionKeysForMessage(err, maxLength = 40) {
|
|
|
2024
2068
|
return "";
|
|
2025
2069
|
}
|
|
2026
2070
|
var init_utils2 = __esm({
|
|
2027
|
-
"../../node_modules/.pnpm/@posthog+core@1.
|
|
2071
|
+
"../../node_modules/.pnpm/@posthog+core@1.13.0/node_modules/@posthog/core/dist/error-tracking/coercers/utils.mjs"() {
|
|
2028
2072
|
}
|
|
2029
2073
|
});
|
|
2030
2074
|
|
|
2031
|
-
// ../../node_modules/.pnpm/@posthog+core@1.
|
|
2075
|
+
// ../../node_modules/.pnpm/@posthog+core@1.13.0/node_modules/@posthog/core/dist/error-tracking/coercers/object-coercer.mjs
|
|
2032
2076
|
var ObjectCoercer;
|
|
2033
2077
|
var init_object_coercer = __esm({
|
|
2034
|
-
"../../node_modules/.pnpm/@posthog+core@1.
|
|
2078
|
+
"../../node_modules/.pnpm/@posthog+core@1.13.0/node_modules/@posthog/core/dist/error-tracking/coercers/object-coercer.mjs"() {
|
|
2035
2079
|
init_utils();
|
|
2036
2080
|
init_types2();
|
|
2037
2081
|
init_utils2();
|
|
@@ -2085,10 +2129,10 @@ var init_object_coercer = __esm({
|
|
|
2085
2129
|
}
|
|
2086
2130
|
});
|
|
2087
2131
|
|
|
2088
|
-
// ../../node_modules/.pnpm/@posthog+core@1.
|
|
2132
|
+
// ../../node_modules/.pnpm/@posthog+core@1.13.0/node_modules/@posthog/core/dist/error-tracking/coercers/event-coercer.mjs
|
|
2089
2133
|
var EventCoercer;
|
|
2090
2134
|
var init_event_coercer = __esm({
|
|
2091
|
-
"../../node_modules/.pnpm/@posthog+core@1.
|
|
2135
|
+
"../../node_modules/.pnpm/@posthog+core@1.13.0/node_modules/@posthog/core/dist/error-tracking/coercers/event-coercer.mjs"() {
|
|
2092
2136
|
init_utils();
|
|
2093
2137
|
init_utils2();
|
|
2094
2138
|
EventCoercer = class {
|
|
@@ -2108,10 +2152,10 @@ var init_event_coercer = __esm({
|
|
|
2108
2152
|
}
|
|
2109
2153
|
});
|
|
2110
2154
|
|
|
2111
|
-
// ../../node_modules/.pnpm/@posthog+core@1.
|
|
2155
|
+
// ../../node_modules/.pnpm/@posthog+core@1.13.0/node_modules/@posthog/core/dist/error-tracking/coercers/primitive-coercer.mjs
|
|
2112
2156
|
var PrimitiveCoercer;
|
|
2113
2157
|
var init_primitive_coercer = __esm({
|
|
2114
|
-
"../../node_modules/.pnpm/@posthog+core@1.
|
|
2158
|
+
"../../node_modules/.pnpm/@posthog+core@1.13.0/node_modules/@posthog/core/dist/error-tracking/coercers/primitive-coercer.mjs"() {
|
|
2115
2159
|
init_utils();
|
|
2116
2160
|
PrimitiveCoercer = class {
|
|
2117
2161
|
match(candidate) {
|
|
@@ -2129,10 +2173,10 @@ var init_primitive_coercer = __esm({
|
|
|
2129
2173
|
}
|
|
2130
2174
|
});
|
|
2131
2175
|
|
|
2132
|
-
// ../../node_modules/.pnpm/@posthog+core@1.
|
|
2176
|
+
// ../../node_modules/.pnpm/@posthog+core@1.13.0/node_modules/@posthog/core/dist/error-tracking/coercers/promise-rejection-event.mjs
|
|
2133
2177
|
var PromiseRejectionEventCoercer;
|
|
2134
2178
|
var init_promise_rejection_event = __esm({
|
|
2135
|
-
"../../node_modules/.pnpm/@posthog+core@1.
|
|
2179
|
+
"../../node_modules/.pnpm/@posthog+core@1.13.0/node_modules/@posthog/core/dist/error-tracking/coercers/promise-rejection-event.mjs"() {
|
|
2136
2180
|
init_utils();
|
|
2137
2181
|
PromiseRejectionEventCoercer = class {
|
|
2138
2182
|
match(err) {
|
|
@@ -2161,9 +2205,9 @@ var init_promise_rejection_event = __esm({
|
|
|
2161
2205
|
}
|
|
2162
2206
|
});
|
|
2163
2207
|
|
|
2164
|
-
// ../../node_modules/.pnpm/@posthog+core@1.
|
|
2208
|
+
// ../../node_modules/.pnpm/@posthog+core@1.13.0/node_modules/@posthog/core/dist/error-tracking/coercers/index.mjs
|
|
2165
2209
|
var init_coercers = __esm({
|
|
2166
|
-
"../../node_modules/.pnpm/@posthog+core@1.
|
|
2210
|
+
"../../node_modules/.pnpm/@posthog+core@1.13.0/node_modules/@posthog/core/dist/error-tracking/coercers/index.mjs"() {
|
|
2167
2211
|
init_dom_exception_coercer();
|
|
2168
2212
|
init_error_coercer();
|
|
2169
2213
|
init_error_event_coercer();
|
|
@@ -2175,10 +2219,10 @@ var init_coercers = __esm({
|
|
|
2175
2219
|
}
|
|
2176
2220
|
});
|
|
2177
2221
|
|
|
2178
|
-
// ../../node_modules/.pnpm/@posthog+core@1.
|
|
2222
|
+
// ../../node_modules/.pnpm/@posthog+core@1.13.0/node_modules/@posthog/core/dist/error-tracking/utils.mjs
|
|
2179
2223
|
var ReduceableCache;
|
|
2180
2224
|
var init_utils3 = __esm({
|
|
2181
|
-
"../../node_modules/.pnpm/@posthog+core@1.
|
|
2225
|
+
"../../node_modules/.pnpm/@posthog+core@1.13.0/node_modules/@posthog/core/dist/error-tracking/utils.mjs"() {
|
|
2182
2226
|
ReduceableCache = class {
|
|
2183
2227
|
constructor(_maxSize) {
|
|
2184
2228
|
this._maxSize = _maxSize;
|
|
@@ -2204,7 +2248,7 @@ var init_utils3 = __esm({
|
|
|
2204
2248
|
}
|
|
2205
2249
|
});
|
|
2206
2250
|
|
|
2207
|
-
// ../../node_modules/.pnpm/@posthog+core@1.
|
|
2251
|
+
// ../../node_modules/.pnpm/@posthog+core@1.13.0/node_modules/@posthog/core/dist/error-tracking/index.mjs
|
|
2208
2252
|
var error_tracking_exports = {};
|
|
2209
2253
|
__export(error_tracking_exports, {
|
|
2210
2254
|
DOMExceptionCoercer: () => DOMExceptionCoercer,
|
|
@@ -2228,7 +2272,7 @@ __export(error_tracking_exports, {
|
|
|
2228
2272
|
winjsStackLineParser: () => winjsStackLineParser
|
|
2229
2273
|
});
|
|
2230
2274
|
var init_error_tracking = __esm({
|
|
2231
|
-
"../../node_modules/.pnpm/@posthog+core@1.
|
|
2275
|
+
"../../node_modules/.pnpm/@posthog+core@1.13.0/node_modules/@posthog/core/dist/error-tracking/index.mjs"() {
|
|
2232
2276
|
init_error_properties_builder();
|
|
2233
2277
|
init_parsers();
|
|
2234
2278
|
init_coercers();
|
|
@@ -2236,9 +2280,9 @@ var init_error_tracking = __esm({
|
|
|
2236
2280
|
}
|
|
2237
2281
|
});
|
|
2238
2282
|
|
|
2239
|
-
// ../../node_modules/.pnpm/@posthog+core@1.
|
|
2283
|
+
// ../../node_modules/.pnpm/@posthog+core@1.13.0/node_modules/@posthog/core/dist/index.mjs
|
|
2240
2284
|
var init_dist = __esm({
|
|
2241
|
-
"../../node_modules/.pnpm/@posthog+core@1.
|
|
2285
|
+
"../../node_modules/.pnpm/@posthog+core@1.13.0/node_modules/@posthog/core/dist/index.mjs"() {
|
|
2242
2286
|
init_featureFlagUtils();
|
|
2243
2287
|
init_uuidv7();
|
|
2244
2288
|
init_utils();
|
|
@@ -2429,7 +2473,7 @@ function snipLine(line, colno) {
|
|
|
2429
2473
|
}
|
|
2430
2474
|
var LRU_FILE_CONTENTS_CACHE, LRU_FILE_CONTENTS_FS_READ_FAILED, DEFAULT_LINES_OF_CONTEXT, MAX_CONTEXTLINES_COLNO, MAX_CONTEXTLINES_LINENO;
|
|
2431
2475
|
var init_context_lines_node = __esm({
|
|
2432
|
-
"../../node_modules/.pnpm/posthog-node@5.
|
|
2476
|
+
"../../node_modules/.pnpm/posthog-node@5.24.1/node_modules/posthog-node/dist/extensions/error-tracking/modifiers/context-lines.node.mjs"() {
|
|
2433
2477
|
init_dist();
|
|
2434
2478
|
LRU_FILE_CONTENTS_CACHE = new error_tracking_exports.ReduceableCache(25);
|
|
2435
2479
|
LRU_FILE_CONTENTS_FS_READ_FAILED = new error_tracking_exports.ReduceableCache(20);
|
|
@@ -2439,7 +2483,7 @@ var init_context_lines_node = __esm({
|
|
|
2439
2483
|
}
|
|
2440
2484
|
});
|
|
2441
2485
|
|
|
2442
|
-
// ../../node_modules/.pnpm/posthog-node@5.
|
|
2486
|
+
// ../../node_modules/.pnpm/posthog-node@5.24.1/node_modules/posthog-node/dist/extensions/error-tracking/autocapture.mjs
|
|
2443
2487
|
function makeUncaughtExceptionHandler(captureFn, onFatalFn) {
|
|
2444
2488
|
let calledFatalError = false;
|
|
2445
2489
|
return Object.assign((error) => {
|
|
@@ -2471,14 +2515,14 @@ function addUnhandledRejectionListener(captureFn) {
|
|
|
2471
2515
|
}));
|
|
2472
2516
|
}
|
|
2473
2517
|
var init_autocapture = __esm({
|
|
2474
|
-
"../../node_modules/.pnpm/posthog-node@5.
|
|
2518
|
+
"../../node_modules/.pnpm/posthog-node@5.24.1/node_modules/posthog-node/dist/extensions/error-tracking/autocapture.mjs"() {
|
|
2475
2519
|
}
|
|
2476
2520
|
});
|
|
2477
2521
|
|
|
2478
|
-
// ../../node_modules/.pnpm/posthog-node@5.
|
|
2522
|
+
// ../../node_modules/.pnpm/posthog-node@5.24.1/node_modules/posthog-node/dist/extensions/error-tracking/index.mjs
|
|
2479
2523
|
var SHUTDOWN_TIMEOUT, ErrorTracking;
|
|
2480
2524
|
var init_error_tracking2 = __esm({
|
|
2481
|
-
"../../node_modules/.pnpm/posthog-node@5.
|
|
2525
|
+
"../../node_modules/.pnpm/posthog-node@5.24.1/node_modules/posthog-node/dist/extensions/error-tracking/index.mjs"() {
|
|
2482
2526
|
init_autocapture();
|
|
2483
2527
|
init_dist();
|
|
2484
2528
|
SHUTDOWN_TIMEOUT = 2e3;
|
|
@@ -2549,19 +2593,19 @@ var init_error_tracking2 = __esm({
|
|
|
2549
2593
|
}
|
|
2550
2594
|
});
|
|
2551
2595
|
|
|
2552
|
-
// ../../node_modules/.pnpm/posthog-node@5.
|
|
2596
|
+
// ../../node_modules/.pnpm/posthog-node@5.24.1/node_modules/posthog-node/dist/version.mjs
|
|
2553
2597
|
var version;
|
|
2554
2598
|
var init_version = __esm({
|
|
2555
|
-
"../../node_modules/.pnpm/posthog-node@5.
|
|
2556
|
-
version = "5.
|
|
2599
|
+
"../../node_modules/.pnpm/posthog-node@5.24.1/node_modules/posthog-node/dist/version.mjs"() {
|
|
2600
|
+
version = "5.24.1";
|
|
2557
2601
|
}
|
|
2558
2602
|
});
|
|
2559
2603
|
|
|
2560
|
-
// ../../node_modules/.pnpm/posthog-node@5.
|
|
2561
|
-
var
|
|
2604
|
+
// ../../node_modules/.pnpm/posthog-node@5.24.1/node_modules/posthog-node/dist/types.mjs
|
|
2605
|
+
var FeatureFlagError2;
|
|
2562
2606
|
var init_types3 = __esm({
|
|
2563
|
-
"../../node_modules/.pnpm/posthog-node@5.
|
|
2564
|
-
|
|
2607
|
+
"../../node_modules/.pnpm/posthog-node@5.24.1/node_modules/posthog-node/dist/types.mjs"() {
|
|
2608
|
+
FeatureFlagError2 = {
|
|
2565
2609
|
ERRORS_WHILE_COMPUTING: "errors_while_computing_flags",
|
|
2566
2610
|
FLAG_MISSING: "flag_missing",
|
|
2567
2611
|
QUOTA_LIMITED: "quota_limited",
|
|
@@ -2570,7 +2614,7 @@ var init_types3 = __esm({
|
|
|
2570
2614
|
}
|
|
2571
2615
|
});
|
|
2572
2616
|
|
|
2573
|
-
// ../../node_modules/.pnpm/posthog-node@5.
|
|
2617
|
+
// ../../node_modules/.pnpm/posthog-node@5.24.1/node_modules/posthog-node/dist/extensions/feature-flags/crypto.mjs
|
|
2574
2618
|
async function hashSHA1(text) {
|
|
2575
2619
|
const subtle = globalThis.crypto?.subtle;
|
|
2576
2620
|
if (!subtle) throw new Error("SubtleCrypto API not available");
|
|
@@ -2579,11 +2623,11 @@ async function hashSHA1(text) {
|
|
|
2579
2623
|
return hashArray.map((byte) => byte.toString(16).padStart(2, "0")).join("");
|
|
2580
2624
|
}
|
|
2581
2625
|
var init_crypto = __esm({
|
|
2582
|
-
"../../node_modules/.pnpm/posthog-node@5.
|
|
2626
|
+
"../../node_modules/.pnpm/posthog-node@5.24.1/node_modules/posthog-node/dist/extensions/feature-flags/crypto.mjs"() {
|
|
2583
2627
|
}
|
|
2584
2628
|
});
|
|
2585
2629
|
|
|
2586
|
-
// ../../node_modules/.pnpm/posthog-node@5.
|
|
2630
|
+
// ../../node_modules/.pnpm/posthog-node@5.24.1/node_modules/posthog-node/dist/extensions/feature-flags/feature-flags.mjs
|
|
2587
2631
|
async function _hash(key, distinctId, salt = "") {
|
|
2588
2632
|
const hashString = await hashSHA1(`${key}.${distinctId}${salt}`);
|
|
2589
2633
|
return parseInt(hashString.slice(0, 15), 16) / LONG_SCALE;
|
|
@@ -2751,7 +2795,7 @@ function relativeDateParseForFeatureFlagMatching(value) {
|
|
|
2751
2795
|
}
|
|
2752
2796
|
var SIXTY_SECONDS, LONG_SCALE, NULL_VALUES_ALLOWED_OPERATORS, ClientError, InconclusiveMatchError, RequiresServerEvaluation, FeatureFlagsPoller;
|
|
2753
2797
|
var init_feature_flags = __esm({
|
|
2754
|
-
"../../node_modules/.pnpm/posthog-node@5.
|
|
2798
|
+
"../../node_modules/.pnpm/posthog-node@5.24.1/node_modules/posthog-node/dist/extensions/feature-flags/feature-flags.mjs"() {
|
|
2755
2799
|
init_dist();
|
|
2756
2800
|
init_crypto();
|
|
2757
2801
|
SIXTY_SECONDS = 6e4;
|
|
@@ -3164,10 +3208,10 @@ var init_feature_flags = __esm({
|
|
|
3164
3208
|
}
|
|
3165
3209
|
});
|
|
3166
3210
|
|
|
3167
|
-
// ../../node_modules/.pnpm/posthog-node@5.
|
|
3211
|
+
// ../../node_modules/.pnpm/posthog-node@5.24.1/node_modules/posthog-node/dist/storage-memory.mjs
|
|
3168
3212
|
var PostHogMemoryStorage;
|
|
3169
3213
|
var init_storage_memory = __esm({
|
|
3170
|
-
"../../node_modules/.pnpm/posthog-node@5.
|
|
3214
|
+
"../../node_modules/.pnpm/posthog-node@5.24.1/node_modules/posthog-node/dist/storage-memory.mjs"() {
|
|
3171
3215
|
PostHogMemoryStorage = class {
|
|
3172
3216
|
getProperty(key) {
|
|
3173
3217
|
return this._memoryStorage[key];
|
|
@@ -3182,10 +3226,10 @@ var init_storage_memory = __esm({
|
|
|
3182
3226
|
}
|
|
3183
3227
|
});
|
|
3184
3228
|
|
|
3185
|
-
// ../../node_modules/.pnpm/posthog-node@5.
|
|
3229
|
+
// ../../node_modules/.pnpm/posthog-node@5.24.1/node_modules/posthog-node/dist/client.mjs
|
|
3186
3230
|
var MINIMUM_POLLING_INTERVAL, THIRTY_SECONDS, MAX_CACHE_SIZE, PostHogBackendClient;
|
|
3187
3231
|
var init_client = __esm({
|
|
3188
|
-
"../../node_modules/.pnpm/posthog-node@5.
|
|
3232
|
+
"../../node_modules/.pnpm/posthog-node@5.24.1/node_modules/posthog-node/dist/client.mjs"() {
|
|
3189
3233
|
init_version();
|
|
3190
3234
|
init_dist();
|
|
3191
3235
|
init_types3();
|
|
@@ -3325,94 +3369,148 @@ var init_client = __esm({
|
|
|
3325
3369
|
});
|
|
3326
3370
|
});
|
|
3327
3371
|
}
|
|
3328
|
-
async
|
|
3329
|
-
|
|
3330
|
-
|
|
3331
|
-
|
|
3372
|
+
async _getFeatureFlagResult(key, distinctId, options = {}, matchValue) {
|
|
3373
|
+
const sendFeatureFlagEvents = options.sendFeatureFlagEvents ?? true;
|
|
3374
|
+
if (void 0 !== this._flagOverrides && key in this._flagOverrides) {
|
|
3375
|
+
const overrideValue = this._flagOverrides[key];
|
|
3376
|
+
if (void 0 === overrideValue) return;
|
|
3377
|
+
const overridePayload = this._payloadOverrides?.[key];
|
|
3378
|
+
return {
|
|
3379
|
+
key,
|
|
3380
|
+
enabled: false !== overrideValue,
|
|
3381
|
+
variant: "string" == typeof overrideValue ? overrideValue : void 0,
|
|
3382
|
+
payload: overridePayload
|
|
3383
|
+
};
|
|
3384
|
+
}
|
|
3385
|
+
const { groups, disableGeoip } = options;
|
|
3386
|
+
let { onlyEvaluateLocally, personProperties, groupProperties } = options;
|
|
3332
3387
|
const adjustedProperties = this.addLocalPersonAndGroupProperties(distinctId, groups, personProperties, groupProperties);
|
|
3333
3388
|
personProperties = adjustedProperties.allPersonProperties;
|
|
3334
3389
|
groupProperties = adjustedProperties.allGroupProperties;
|
|
3335
3390
|
if (void 0 == onlyEvaluateLocally) onlyEvaluateLocally = this.options.strictLocalEvaluation ?? false;
|
|
3336
|
-
|
|
3337
|
-
let
|
|
3338
|
-
const flagWasLocallyEvaluated = void 0 !== response;
|
|
3391
|
+
let result;
|
|
3392
|
+
let flagWasLocallyEvaluated = false;
|
|
3339
3393
|
let requestId;
|
|
3340
3394
|
let evaluatedAt;
|
|
3341
|
-
let flagDetail;
|
|
3342
3395
|
let featureFlagError;
|
|
3396
|
+
let flagId;
|
|
3397
|
+
let flagVersion;
|
|
3398
|
+
let flagReason;
|
|
3399
|
+
const localEvaluationEnabled = void 0 !== this.featureFlagsPoller;
|
|
3400
|
+
if (localEvaluationEnabled) {
|
|
3401
|
+
await this.featureFlagsPoller?.loadFeatureFlags();
|
|
3402
|
+
const flag = this.featureFlagsPoller?.featureFlagsByKey[key];
|
|
3403
|
+
if (flag) try {
|
|
3404
|
+
const localResult = await this.featureFlagsPoller?.computeFlagAndPayloadLocally(flag, distinctId, groups, personProperties, groupProperties, matchValue);
|
|
3405
|
+
if (localResult) {
|
|
3406
|
+
flagWasLocallyEvaluated = true;
|
|
3407
|
+
const value = localResult.value;
|
|
3408
|
+
flagId = flag.id;
|
|
3409
|
+
flagReason = "Evaluated locally";
|
|
3410
|
+
result = {
|
|
3411
|
+
key,
|
|
3412
|
+
enabled: false !== value,
|
|
3413
|
+
variant: "string" == typeof value ? value : void 0,
|
|
3414
|
+
payload: localResult.payload ?? void 0
|
|
3415
|
+
};
|
|
3416
|
+
}
|
|
3417
|
+
} catch (e) {
|
|
3418
|
+
if (e instanceof RequiresServerEvaluation || e instanceof InconclusiveMatchError) this._logger?.info(`${e.name} when computing flag locally: ${key}: ${e.message}`);
|
|
3419
|
+
else throw e;
|
|
3420
|
+
}
|
|
3421
|
+
}
|
|
3343
3422
|
if (!flagWasLocallyEvaluated && !onlyEvaluateLocally) {
|
|
3344
3423
|
const flagsResponse = await super.getFeatureFlagDetailsStateless(distinctId, groups, personProperties, groupProperties, disableGeoip, [
|
|
3345
3424
|
key
|
|
3346
3425
|
]);
|
|
3347
|
-
if (void 0 === flagsResponse) featureFlagError =
|
|
3426
|
+
if (void 0 === flagsResponse) featureFlagError = FeatureFlagError2.UNKNOWN_ERROR;
|
|
3348
3427
|
else {
|
|
3349
3428
|
requestId = flagsResponse.requestId;
|
|
3350
3429
|
evaluatedAt = flagsResponse.evaluatedAt;
|
|
3351
3430
|
const errors = [];
|
|
3352
|
-
if (flagsResponse.errorsWhileComputingFlags) errors.push(
|
|
3353
|
-
if (flagsResponse.quotaLimited?.includes("feature_flags")) errors.push(
|
|
3354
|
-
flagDetail = flagsResponse.flags[key];
|
|
3355
|
-
if (void 0 === flagDetail) errors.push(
|
|
3431
|
+
if (flagsResponse.errorsWhileComputingFlags) errors.push(FeatureFlagError2.ERRORS_WHILE_COMPUTING);
|
|
3432
|
+
if (flagsResponse.quotaLimited?.includes("feature_flags")) errors.push(FeatureFlagError2.QUOTA_LIMITED);
|
|
3433
|
+
const flagDetail = flagsResponse.flags[key];
|
|
3434
|
+
if (void 0 === flagDetail) errors.push(FeatureFlagError2.FLAG_MISSING);
|
|
3435
|
+
else {
|
|
3436
|
+
flagId = flagDetail.metadata?.id;
|
|
3437
|
+
flagVersion = flagDetail.metadata?.version;
|
|
3438
|
+
flagReason = flagDetail.reason?.description ?? flagDetail.reason?.code;
|
|
3439
|
+
let parsedPayload;
|
|
3440
|
+
if (flagDetail.metadata?.payload !== void 0) try {
|
|
3441
|
+
parsedPayload = JSON.parse(flagDetail.metadata.payload);
|
|
3442
|
+
} catch {
|
|
3443
|
+
parsedPayload = flagDetail.metadata.payload;
|
|
3444
|
+
}
|
|
3445
|
+
result = {
|
|
3446
|
+
key,
|
|
3447
|
+
enabled: flagDetail.enabled,
|
|
3448
|
+
variant: flagDetail.variant,
|
|
3449
|
+
payload: parsedPayload
|
|
3450
|
+
};
|
|
3451
|
+
}
|
|
3356
3452
|
if (errors.length > 0) featureFlagError = errors.join(",");
|
|
3357
|
-
response = getFeatureFlagValue(flagDetail);
|
|
3358
3453
|
}
|
|
3359
3454
|
}
|
|
3360
|
-
|
|
3361
|
-
|
|
3362
|
-
|
|
3363
|
-
if (
|
|
3364
|
-
|
|
3365
|
-
featureFlagReportedKey
|
|
3366
|
-
|
|
3367
|
-
|
|
3368
|
-
|
|
3369
|
-
|
|
3370
|
-
|
|
3371
|
-
|
|
3372
|
-
|
|
3373
|
-
|
|
3374
|
-
|
|
3375
|
-
|
|
3376
|
-
|
|
3377
|
-
|
|
3378
|
-
|
|
3379
|
-
|
|
3380
|
-
|
|
3381
|
-
|
|
3382
|
-
|
|
3383
|
-
|
|
3384
|
-
|
|
3385
|
-
|
|
3455
|
+
if (sendFeatureFlagEvents) {
|
|
3456
|
+
const response = void 0 === result ? void 0 : false === result.enabled ? false : result.variant ?? true;
|
|
3457
|
+
const featureFlagReportedKey = `${key}_${response}`;
|
|
3458
|
+
if (!(distinctId in this.distinctIdHasSentFlagCalls) || !this.distinctIdHasSentFlagCalls[distinctId].includes(featureFlagReportedKey)) {
|
|
3459
|
+
if (Object.keys(this.distinctIdHasSentFlagCalls).length >= this.maxCacheSize) this.distinctIdHasSentFlagCalls = {};
|
|
3460
|
+
if (Array.isArray(this.distinctIdHasSentFlagCalls[distinctId])) this.distinctIdHasSentFlagCalls[distinctId].push(featureFlagReportedKey);
|
|
3461
|
+
else this.distinctIdHasSentFlagCalls[distinctId] = [
|
|
3462
|
+
featureFlagReportedKey
|
|
3463
|
+
];
|
|
3464
|
+
const properties = {
|
|
3465
|
+
$feature_flag: key,
|
|
3466
|
+
$feature_flag_response: response,
|
|
3467
|
+
$feature_flag_id: flagId,
|
|
3468
|
+
$feature_flag_version: flagVersion,
|
|
3469
|
+
$feature_flag_reason: flagReason,
|
|
3470
|
+
locally_evaluated: flagWasLocallyEvaluated,
|
|
3471
|
+
[`$feature/${key}`]: response,
|
|
3472
|
+
$feature_flag_request_id: requestId,
|
|
3473
|
+
$feature_flag_evaluated_at: evaluatedAt
|
|
3474
|
+
};
|
|
3475
|
+
if (featureFlagError) properties.$feature_flag_error = featureFlagError;
|
|
3476
|
+
this.capture({
|
|
3477
|
+
distinctId,
|
|
3478
|
+
event: "$feature_flag_called",
|
|
3479
|
+
properties,
|
|
3480
|
+
groups,
|
|
3481
|
+
disableGeoip
|
|
3482
|
+
});
|
|
3483
|
+
}
|
|
3386
3484
|
}
|
|
3387
|
-
|
|
3485
|
+
if (void 0 !== result && void 0 !== this._payloadOverrides && key in this._payloadOverrides) result = {
|
|
3486
|
+
...result,
|
|
3487
|
+
payload: this._payloadOverrides[key]
|
|
3488
|
+
};
|
|
3489
|
+
return result;
|
|
3490
|
+
}
|
|
3491
|
+
async getFeatureFlag(key, distinctId, options) {
|
|
3492
|
+
const result = await this._getFeatureFlagResult(key, distinctId, {
|
|
3493
|
+
...options,
|
|
3494
|
+
sendFeatureFlagEvents: options?.sendFeatureFlagEvents ?? this.options.sendFeatureFlagEvent ?? true
|
|
3495
|
+
});
|
|
3496
|
+
if (void 0 === result) return;
|
|
3497
|
+
if (false === result.enabled) return false;
|
|
3498
|
+
return result.variant ?? true;
|
|
3388
3499
|
}
|
|
3389
3500
|
async getFeatureFlagPayload(key, distinctId, matchValue, options) {
|
|
3390
3501
|
if (void 0 !== this._payloadOverrides && key in this._payloadOverrides) return this._payloadOverrides[key];
|
|
3391
|
-
const
|
|
3392
|
-
|
|
3393
|
-
|
|
3394
|
-
|
|
3395
|
-
|
|
3396
|
-
|
|
3397
|
-
|
|
3398
|
-
|
|
3399
|
-
|
|
3400
|
-
|
|
3401
|
-
|
|
3402
|
-
|
|
3403
|
-
if (result) {
|
|
3404
|
-
matchValue = result.value;
|
|
3405
|
-
response = result.payload;
|
|
3406
|
-
}
|
|
3407
|
-
} catch (e) {
|
|
3408
|
-
if (e instanceof RequiresServerEvaluation || e instanceof InconclusiveMatchError) this._logger?.info(`${e.name} when computing flag locally: ${flag.key}: ${e.message}`);
|
|
3409
|
-
else throw e;
|
|
3410
|
-
}
|
|
3411
|
-
}
|
|
3412
|
-
if (void 0 == onlyEvaluateLocally) onlyEvaluateLocally = this.options.strictLocalEvaluation ?? false;
|
|
3413
|
-
const payloadWasLocallyEvaluated = void 0 !== response;
|
|
3414
|
-
if (!payloadWasLocallyEvaluated && !onlyEvaluateLocally) response = await super.getFeatureFlagPayloadStateless(key, distinctId, groups, personProperties, groupProperties, disableGeoip);
|
|
3415
|
-
return response;
|
|
3502
|
+
const result = await this._getFeatureFlagResult(key, distinctId, {
|
|
3503
|
+
...options,
|
|
3504
|
+
sendFeatureFlagEvents: false
|
|
3505
|
+
}, matchValue);
|
|
3506
|
+
if (void 0 === result) return;
|
|
3507
|
+
return result.payload ?? null;
|
|
3508
|
+
}
|
|
3509
|
+
async getFeatureFlagResult(key, distinctId, options) {
|
|
3510
|
+
return this._getFeatureFlagResult(key, distinctId, {
|
|
3511
|
+
...options,
|
|
3512
|
+
sendFeatureFlagEvents: options?.sendFeatureFlagEvents ?? this.options.sendFeatureFlagEvent ?? true
|
|
3513
|
+
});
|
|
3416
3514
|
}
|
|
3417
3515
|
async getRemoteConfigPayload(flagKey) {
|
|
3418
3516
|
if (!this.options.personalApiKey) throw new Error("Personal API key is required for remote config payload decryption");
|
|
@@ -3739,7 +3837,7 @@ var init_client = __esm({
|
|
|
3739
3837
|
});
|
|
3740
3838
|
var PostHogContext;
|
|
3741
3839
|
var init_context = __esm({
|
|
3742
|
-
"../../node_modules/.pnpm/posthog-node@5.
|
|
3840
|
+
"../../node_modules/.pnpm/posthog-node@5.24.1/node_modules/posthog-node/dist/extensions/context/context.mjs"() {
|
|
3743
3841
|
PostHogContext = class {
|
|
3744
3842
|
constructor() {
|
|
3745
3843
|
this.storage = new async_hooks.AsyncLocalStorage();
|
|
@@ -3767,7 +3865,7 @@ var init_context = __esm({
|
|
|
3767
3865
|
}
|
|
3768
3866
|
});
|
|
3769
3867
|
|
|
3770
|
-
// ../../node_modules/.pnpm/posthog-node@5.
|
|
3868
|
+
// ../../node_modules/.pnpm/posthog-node@5.24.1/node_modules/posthog-node/dist/extensions/sentry-integration.mjs
|
|
3771
3869
|
function createEventProcessor(_posthog, { organization, projectId, prefix, severityAllowList = [
|
|
3772
3870
|
"error"
|
|
3773
3871
|
], sendExceptionsToPostHog = true } = {}) {
|
|
@@ -3823,7 +3921,7 @@ function sentryIntegration(_posthog, options) {
|
|
|
3823
3921
|
}
|
|
3824
3922
|
var NAME, PostHogSentryIntegration;
|
|
3825
3923
|
var init_sentry_integration = __esm({
|
|
3826
|
-
"../../node_modules/.pnpm/posthog-node@5.
|
|
3924
|
+
"../../node_modules/.pnpm/posthog-node@5.24.1/node_modules/posthog-node/dist/extensions/sentry-integration.mjs"() {
|
|
3827
3925
|
NAME = "posthog-node";
|
|
3828
3926
|
PostHogSentryIntegration = class {
|
|
3829
3927
|
static #_ = this.POSTHOG_ID_TAG = "posthog_distinct_id";
|
|
@@ -3845,7 +3943,7 @@ var init_sentry_integration = __esm({
|
|
|
3845
3943
|
}
|
|
3846
3944
|
});
|
|
3847
3945
|
|
|
3848
|
-
// ../../node_modules/.pnpm/posthog-node@5.
|
|
3946
|
+
// ../../node_modules/.pnpm/posthog-node@5.24.1/node_modules/posthog-node/dist/extensions/express.mjs
|
|
3849
3947
|
function setupExpressErrorHandler(_posthog, app) {
|
|
3850
3948
|
app.use(posthogErrorHandler(_posthog));
|
|
3851
3949
|
}
|
|
@@ -3877,21 +3975,22 @@ function posthogErrorHandler(posthog) {
|
|
|
3877
3975
|
};
|
|
3878
3976
|
}
|
|
3879
3977
|
var init_express = __esm({
|
|
3880
|
-
"../../node_modules/.pnpm/posthog-node@5.
|
|
3978
|
+
"../../node_modules/.pnpm/posthog-node@5.24.1/node_modules/posthog-node/dist/extensions/express.mjs"() {
|
|
3881
3979
|
init_error_tracking2();
|
|
3882
3980
|
}
|
|
3883
3981
|
});
|
|
3884
3982
|
|
|
3885
|
-
// ../../node_modules/.pnpm/posthog-node@5.
|
|
3983
|
+
// ../../node_modules/.pnpm/posthog-node@5.24.1/node_modules/posthog-node/dist/exports.mjs
|
|
3886
3984
|
var init_exports = __esm({
|
|
3887
|
-
"../../node_modules/.pnpm/posthog-node@5.
|
|
3985
|
+
"../../node_modules/.pnpm/posthog-node@5.24.1/node_modules/posthog-node/dist/exports.mjs"() {
|
|
3986
|
+
init_dist();
|
|
3888
3987
|
init_sentry_integration();
|
|
3889
3988
|
init_express();
|
|
3890
3989
|
init_types3();
|
|
3891
3990
|
}
|
|
3892
3991
|
});
|
|
3893
3992
|
|
|
3894
|
-
// ../../node_modules/.pnpm/posthog-node@5.
|
|
3993
|
+
// ../../node_modules/.pnpm/posthog-node@5.24.1/node_modules/posthog-node/dist/entrypoints/index.node.mjs
|
|
3895
3994
|
var index_node_exports = {};
|
|
3896
3995
|
__export(index_node_exports, {
|
|
3897
3996
|
FeatureFlagError: () => FeatureFlagError,
|
|
@@ -3903,7 +4002,7 @@ __export(index_node_exports, {
|
|
|
3903
4002
|
});
|
|
3904
4003
|
var PostHog;
|
|
3905
4004
|
var init_index_node = __esm({
|
|
3906
|
-
"../../node_modules/.pnpm/posthog-node@5.
|
|
4005
|
+
"../../node_modules/.pnpm/posthog-node@5.24.1/node_modules/posthog-node/dist/entrypoints/index.node.mjs"() {
|
|
3907
4006
|
init_module_node();
|
|
3908
4007
|
init_context_lines_node();
|
|
3909
4008
|
init_error_tracking2();
|
|
@@ -13977,10 +14076,10 @@ var init_esm4 = __esm({
|
|
|
13977
14076
|
}
|
|
13978
14077
|
});
|
|
13979
14078
|
|
|
13980
|
-
// ../../node_modules/.pnpm/@amplitude+analytics-core@2.
|
|
14079
|
+
// ../../node_modules/.pnpm/@amplitude+analytics-core@2.36.0/node_modules/@amplitude/analytics-core/lib/esm/types/event/event.js
|
|
13981
14080
|
var IdentifyOperation, SpecialEventType;
|
|
13982
14081
|
var init_event = __esm({
|
|
13983
|
-
"../../node_modules/.pnpm/@amplitude+analytics-core@2.
|
|
14082
|
+
"../../node_modules/.pnpm/@amplitude+analytics-core@2.36.0/node_modules/@amplitude/analytics-core/lib/esm/types/event/event.js"() {
|
|
13984
14083
|
(function(IdentifyOperation3) {
|
|
13985
14084
|
IdentifyOperation3["SET"] = "$set";
|
|
13986
14085
|
IdentifyOperation3["SET_ONCE"] = "$setOnce";
|
|
@@ -14001,10 +14100,10 @@ var init_event = __esm({
|
|
|
14001
14100
|
}
|
|
14002
14101
|
});
|
|
14003
14102
|
|
|
14004
|
-
// ../../node_modules/.pnpm/@amplitude+analytics-core@2.
|
|
14103
|
+
// ../../node_modules/.pnpm/@amplitude+analytics-core@2.36.0/node_modules/@amplitude/analytics-core/lib/esm/types/constants.js
|
|
14005
14104
|
var UNSET_VALUE, AMPLITUDE_PREFIX, STORAGE_PREFIX, DEFAULT_INSTANCE_NAME, AMPLITUDE_SERVER_URL, EU_AMPLITUDE_SERVER_URL, AMPLITUDE_BATCH_SERVER_URL, EU_AMPLITUDE_BATCH_SERVER_URL;
|
|
14006
14105
|
var init_constants = __esm({
|
|
14007
|
-
"../../node_modules/.pnpm/@amplitude+analytics-core@2.
|
|
14106
|
+
"../../node_modules/.pnpm/@amplitude+analytics-core@2.36.0/node_modules/@amplitude/analytics-core/lib/esm/types/constants.js"() {
|
|
14008
14107
|
UNSET_VALUE = "-";
|
|
14009
14108
|
AMPLITUDE_PREFIX = "AMP";
|
|
14010
14109
|
STORAGE_PREFIX = "".concat(AMPLITUDE_PREFIX, "_unsent");
|
|
@@ -14016,10 +14115,10 @@ var init_constants = __esm({
|
|
|
14016
14115
|
}
|
|
14017
14116
|
});
|
|
14018
14117
|
|
|
14019
|
-
// ../../node_modules/.pnpm/@amplitude+analytics-core@2.
|
|
14118
|
+
// ../../node_modules/.pnpm/@amplitude+analytics-core@2.36.0/node_modules/@amplitude/analytics-core/lib/esm/utils/valid-properties.js
|
|
14020
14119
|
var MAX_PROPERTY_KEYS, isValidObject, isValidProperties;
|
|
14021
14120
|
var init_valid_properties = __esm({
|
|
14022
|
-
"../../node_modules/.pnpm/@amplitude+analytics-core@2.
|
|
14121
|
+
"../../node_modules/.pnpm/@amplitude+analytics-core@2.36.0/node_modules/@amplitude/analytics-core/lib/esm/utils/valid-properties.js"() {
|
|
14023
14122
|
init_tslib_es6();
|
|
14024
14123
|
MAX_PROPERTY_KEYS = 1e3;
|
|
14025
14124
|
isValidObject = function(properties) {
|
|
@@ -14074,10 +14173,10 @@ var init_valid_properties = __esm({
|
|
|
14074
14173
|
}
|
|
14075
14174
|
});
|
|
14076
14175
|
|
|
14077
|
-
// ../../node_modules/.pnpm/@amplitude+analytics-core@2.
|
|
14176
|
+
// ../../node_modules/.pnpm/@amplitude+analytics-core@2.36.0/node_modules/@amplitude/analytics-core/lib/esm/identify.js
|
|
14078
14177
|
var Identify, IdentifyOperation2, OrderedIdentifyOperations;
|
|
14079
14178
|
var init_identify = __esm({
|
|
14080
|
-
"../../node_modules/.pnpm/@amplitude+analytics-core@2.
|
|
14179
|
+
"../../node_modules/.pnpm/@amplitude+analytics-core@2.36.0/node_modules/@amplitude/analytics-core/lib/esm/identify.js"() {
|
|
14081
14180
|
init_tslib_es6();
|
|
14082
14181
|
init_constants();
|
|
14083
14182
|
init_valid_properties();
|
|
@@ -14188,10 +14287,10 @@ var init_identify = __esm({
|
|
|
14188
14287
|
}
|
|
14189
14288
|
});
|
|
14190
14289
|
|
|
14191
|
-
// ../../node_modules/.pnpm/@amplitude+analytics-core@2.
|
|
14290
|
+
// ../../node_modules/.pnpm/@amplitude+analytics-core@2.36.0/node_modules/@amplitude/analytics-core/lib/esm/types/messages.js
|
|
14192
14291
|
var SUCCESS_MESSAGE, UNEXPECTED_ERROR_MESSAGE, MAX_RETRIES_EXCEEDED_MESSAGE, OPT_OUT_MESSAGE, MISSING_API_KEY_MESSAGE, INVALID_API_KEY, CLIENT_NOT_INITIALIZED;
|
|
14193
14292
|
var init_messages = __esm({
|
|
14194
|
-
"../../node_modules/.pnpm/@amplitude+analytics-core@2.
|
|
14293
|
+
"../../node_modules/.pnpm/@amplitude+analytics-core@2.36.0/node_modules/@amplitude/analytics-core/lib/esm/types/messages.js"() {
|
|
14195
14294
|
SUCCESS_MESSAGE = "Event tracked successfully";
|
|
14196
14295
|
UNEXPECTED_ERROR_MESSAGE = "Unexpected error occurred";
|
|
14197
14296
|
MAX_RETRIES_EXCEEDED_MESSAGE = "Event rejected due to exceeded retry count";
|
|
@@ -14202,10 +14301,10 @@ var init_messages = __esm({
|
|
|
14202
14301
|
}
|
|
14203
14302
|
});
|
|
14204
14303
|
|
|
14205
|
-
// ../../node_modules/.pnpm/@amplitude+analytics-core@2.
|
|
14304
|
+
// ../../node_modules/.pnpm/@amplitude+analytics-core@2.36.0/node_modules/@amplitude/analytics-core/lib/esm/types/status.js
|
|
14206
14305
|
var Status;
|
|
14207
14306
|
var init_status = __esm({
|
|
14208
|
-
"../../node_modules/.pnpm/@amplitude+analytics-core@2.
|
|
14307
|
+
"../../node_modules/.pnpm/@amplitude+analytics-core@2.36.0/node_modules/@amplitude/analytics-core/lib/esm/types/status.js"() {
|
|
14209
14308
|
(function(Status2) {
|
|
14210
14309
|
Status2["Unknown"] = "unknown";
|
|
14211
14310
|
Status2["Skipped"] = "skipped";
|
|
@@ -14220,10 +14319,10 @@ var init_status = __esm({
|
|
|
14220
14319
|
}
|
|
14221
14320
|
});
|
|
14222
14321
|
|
|
14223
|
-
// ../../node_modules/.pnpm/@amplitude+analytics-core@2.
|
|
14322
|
+
// ../../node_modules/.pnpm/@amplitude+analytics-core@2.36.0/node_modules/@amplitude/analytics-core/lib/esm/utils/result-builder.js
|
|
14224
14323
|
var buildResult;
|
|
14225
14324
|
var init_result_builder = __esm({
|
|
14226
|
-
"../../node_modules/.pnpm/@amplitude+analytics-core@2.
|
|
14325
|
+
"../../node_modules/.pnpm/@amplitude+analytics-core@2.36.0/node_modules/@amplitude/analytics-core/lib/esm/utils/result-builder.js"() {
|
|
14227
14326
|
init_status();
|
|
14228
14327
|
buildResult = function(event, code, message2) {
|
|
14229
14328
|
if (code === void 0) {
|
|
@@ -14237,10 +14336,10 @@ var init_result_builder = __esm({
|
|
|
14237
14336
|
}
|
|
14238
14337
|
});
|
|
14239
14338
|
|
|
14240
|
-
// ../../node_modules/.pnpm/@amplitude+analytics-core@2.
|
|
14339
|
+
// ../../node_modules/.pnpm/@amplitude+analytics-core@2.36.0/node_modules/@amplitude/analytics-core/lib/esm/global-scope.js
|
|
14241
14340
|
var getGlobalScope;
|
|
14242
14341
|
var init_global_scope = __esm({
|
|
14243
|
-
"../../node_modules/.pnpm/@amplitude+analytics-core@2.
|
|
14342
|
+
"../../node_modules/.pnpm/@amplitude+analytics-core@2.36.0/node_modules/@amplitude/analytics-core/lib/esm/global-scope.js"() {
|
|
14244
14343
|
getGlobalScope = function() {
|
|
14245
14344
|
var ampIntegrationContextName = "ampIntegrationContext";
|
|
14246
14345
|
if (typeof globalThis !== "undefined" && typeof globalThis[ampIntegrationContextName] !== "undefined") {
|
|
@@ -14263,10 +14362,10 @@ var init_global_scope = __esm({
|
|
|
14263
14362
|
}
|
|
14264
14363
|
});
|
|
14265
14364
|
|
|
14266
|
-
// ../../node_modules/.pnpm/@amplitude+analytics-core@2.
|
|
14365
|
+
// ../../node_modules/.pnpm/@amplitude+analytics-core@2.36.0/node_modules/@amplitude/analytics-core/lib/esm/utils/uuid.js
|
|
14267
14366
|
var legacyUUID, hex, UUID2;
|
|
14268
14367
|
var init_uuid2 = __esm({
|
|
14269
|
-
"../../node_modules/.pnpm/@amplitude+analytics-core@2.
|
|
14368
|
+
"../../node_modules/.pnpm/@amplitude+analytics-core@2.36.0/node_modules/@amplitude/analytics-core/lib/esm/utils/uuid.js"() {
|
|
14270
14369
|
init_tslib_es6();
|
|
14271
14370
|
init_global_scope();
|
|
14272
14371
|
legacyUUID = function(a) {
|
|
@@ -14310,10 +14409,10 @@ var init_uuid2 = __esm({
|
|
|
14310
14409
|
}
|
|
14311
14410
|
});
|
|
14312
14411
|
|
|
14313
|
-
// ../../node_modules/.pnpm/@amplitude+analytics-core@2.
|
|
14412
|
+
// ../../node_modules/.pnpm/@amplitude+analytics-core@2.36.0/node_modules/@amplitude/analytics-core/lib/esm/timeline.js
|
|
14314
14413
|
var Timeline;
|
|
14315
14414
|
var init_timeline = __esm({
|
|
14316
|
-
"../../node_modules/.pnpm/@amplitude+analytics-core@2.
|
|
14415
|
+
"../../node_modules/.pnpm/@amplitude+analytics-core@2.36.0/node_modules/@amplitude/analytics-core/lib/esm/timeline.js"() {
|
|
14317
14416
|
init_tslib_es6();
|
|
14318
14417
|
init_result_builder();
|
|
14319
14418
|
init_uuid2();
|
|
@@ -14615,10 +14714,10 @@ var init_timeline = __esm({
|
|
|
14615
14714
|
}
|
|
14616
14715
|
});
|
|
14617
14716
|
|
|
14618
|
-
// ../../node_modules/.pnpm/@amplitude+analytics-core@2.
|
|
14717
|
+
// ../../node_modules/.pnpm/@amplitude+analytics-core@2.36.0/node_modules/@amplitude/analytics-core/lib/esm/utils/event-builder.js
|
|
14619
14718
|
var createTrackEvent, createIdentifyEvent, createGroupIdentifyEvent, createGroupEvent, createRevenueEvent;
|
|
14620
14719
|
var init_event_builder = __esm({
|
|
14621
|
-
"../../node_modules/.pnpm/@amplitude+analytics-core@2.
|
|
14720
|
+
"../../node_modules/.pnpm/@amplitude+analytics-core@2.36.0/node_modules/@amplitude/analytics-core/lib/esm/utils/event-builder.js"() {
|
|
14622
14721
|
init_tslib_es6();
|
|
14623
14722
|
init_identify();
|
|
14624
14723
|
init_event();
|
|
@@ -14648,10 +14747,10 @@ var init_event_builder = __esm({
|
|
|
14648
14747
|
}
|
|
14649
14748
|
});
|
|
14650
14749
|
|
|
14651
|
-
// ../../node_modules/.pnpm/@amplitude+analytics-core@2.
|
|
14750
|
+
// ../../node_modules/.pnpm/@amplitude+analytics-core@2.36.0/node_modules/@amplitude/analytics-core/lib/esm/utils/return-wrapper.js
|
|
14652
14751
|
var returnWrapper;
|
|
14653
14752
|
var init_return_wrapper = __esm({
|
|
14654
|
-
"../../node_modules/.pnpm/@amplitude+analytics-core@2.
|
|
14753
|
+
"../../node_modules/.pnpm/@amplitude+analytics-core@2.36.0/node_modules/@amplitude/analytics-core/lib/esm/utils/return-wrapper.js"() {
|
|
14655
14754
|
returnWrapper = function(awaitable) {
|
|
14656
14755
|
return {
|
|
14657
14756
|
promise: awaitable || Promise.resolve()
|
|
@@ -14660,10 +14759,10 @@ var init_return_wrapper = __esm({
|
|
|
14660
14759
|
}
|
|
14661
14760
|
});
|
|
14662
14761
|
|
|
14663
|
-
// ../../node_modules/.pnpm/@amplitude+analytics-core@2.
|
|
14762
|
+
// ../../node_modules/.pnpm/@amplitude+analytics-core@2.36.0/node_modules/@amplitude/analytics-core/lib/esm/core-client.js
|
|
14664
14763
|
var AmplitudeCore;
|
|
14665
14764
|
var init_core_client = __esm({
|
|
14666
|
-
"../../node_modules/.pnpm/@amplitude+analytics-core@2.
|
|
14765
|
+
"../../node_modules/.pnpm/@amplitude+analytics-core@2.36.0/node_modules/@amplitude/analytics-core/lib/esm/core-client.js"() {
|
|
14667
14766
|
init_tslib_es6();
|
|
14668
14767
|
init_event();
|
|
14669
14768
|
init_identify();
|
|
@@ -14931,10 +15030,10 @@ var init_core_client = __esm({
|
|
|
14931
15030
|
}
|
|
14932
15031
|
});
|
|
14933
15032
|
|
|
14934
|
-
// ../../node_modules/.pnpm/@amplitude+analytics-core@2.
|
|
15033
|
+
// ../../node_modules/.pnpm/@amplitude+analytics-core@2.36.0/node_modules/@amplitude/analytics-core/lib/esm/revenue.js
|
|
14935
15034
|
var Revenue, RevenueProperty;
|
|
14936
15035
|
var init_revenue = __esm({
|
|
14937
|
-
"../../node_modules/.pnpm/@amplitude+analytics-core@2.
|
|
15036
|
+
"../../node_modules/.pnpm/@amplitude+analytics-core@2.36.0/node_modules/@amplitude/analytics-core/lib/esm/revenue.js"() {
|
|
14938
15037
|
init_tslib_es6();
|
|
14939
15038
|
init_valid_properties();
|
|
14940
15039
|
Revenue = /** @class */
|
|
@@ -15011,10 +15110,10 @@ var init_revenue = __esm({
|
|
|
15011
15110
|
}
|
|
15012
15111
|
});
|
|
15013
15112
|
|
|
15014
|
-
// ../../node_modules/.pnpm/@amplitude+analytics-core@2.
|
|
15113
|
+
// ../../node_modules/.pnpm/@amplitude+analytics-core@2.36.0/node_modules/@amplitude/analytics-core/lib/esm/utils/chunk.js
|
|
15015
15114
|
var chunk;
|
|
15016
15115
|
var init_chunk = __esm({
|
|
15017
|
-
"../../node_modules/.pnpm/@amplitude+analytics-core@2.
|
|
15116
|
+
"../../node_modules/.pnpm/@amplitude+analytics-core@2.36.0/node_modules/@amplitude/analytics-core/lib/esm/utils/chunk.js"() {
|
|
15018
15117
|
chunk = function(arr, size) {
|
|
15019
15118
|
var chunkSize = Math.max(size, 1);
|
|
15020
15119
|
return arr.reduce(function(chunks, element, index) {
|
|
@@ -15029,10 +15128,10 @@ var init_chunk = __esm({
|
|
|
15029
15128
|
}
|
|
15030
15129
|
});
|
|
15031
15130
|
|
|
15032
|
-
// ../../node_modules/.pnpm/@amplitude+analytics-core@2.
|
|
15131
|
+
// ../../node_modules/.pnpm/@amplitude+analytics-core@2.36.0/node_modules/@amplitude/analytics-core/lib/esm/types/loglevel.js
|
|
15033
15132
|
var LogLevel;
|
|
15034
15133
|
var init_loglevel = __esm({
|
|
15035
|
-
"../../node_modules/.pnpm/@amplitude+analytics-core@2.
|
|
15134
|
+
"../../node_modules/.pnpm/@amplitude+analytics-core@2.36.0/node_modules/@amplitude/analytics-core/lib/esm/types/loglevel.js"() {
|
|
15036
15135
|
(function(LogLevel2) {
|
|
15037
15136
|
LogLevel2[LogLevel2["None"] = 0] = "None";
|
|
15038
15137
|
LogLevel2[LogLevel2["Error"] = 1] = "Error";
|
|
@@ -15043,10 +15142,10 @@ var init_loglevel = __esm({
|
|
|
15043
15142
|
}
|
|
15044
15143
|
});
|
|
15045
15144
|
|
|
15046
|
-
// ../../node_modules/.pnpm/@amplitude+analytics-core@2.
|
|
15145
|
+
// ../../node_modules/.pnpm/@amplitude+analytics-core@2.36.0/node_modules/@amplitude/analytics-core/lib/esm/logger.js
|
|
15047
15146
|
var PREFIX, Logger;
|
|
15048
15147
|
var init_logger3 = __esm({
|
|
15049
|
-
"../../node_modules/.pnpm/@amplitude+analytics-core@2.
|
|
15148
|
+
"../../node_modules/.pnpm/@amplitude+analytics-core@2.36.0/node_modules/@amplitude/analytics-core/lib/esm/logger.js"() {
|
|
15050
15149
|
init_loglevel();
|
|
15051
15150
|
PREFIX = "Amplitude Logger ";
|
|
15052
15151
|
Logger = /** @class */
|
|
@@ -15108,10 +15207,10 @@ var init_logger3 = __esm({
|
|
|
15108
15207
|
}
|
|
15109
15208
|
});
|
|
15110
15209
|
|
|
15111
|
-
// ../../node_modules/.pnpm/@amplitude+analytics-core@2.
|
|
15210
|
+
// ../../node_modules/.pnpm/@amplitude+analytics-core@2.36.0/node_modules/@amplitude/analytics-core/lib/esm/config.js
|
|
15112
15211
|
var getDefaultConfig, Config, getServerUrl, createServerConfig, RequestMetadata;
|
|
15113
15212
|
var init_config = __esm({
|
|
15114
|
-
"../../node_modules/.pnpm/@amplitude+analytics-core@2.
|
|
15213
|
+
"../../node_modules/.pnpm/@amplitude+analytics-core@2.36.0/node_modules/@amplitude/analytics-core/lib/esm/config.js"() {
|
|
15115
15214
|
init_constants();
|
|
15116
15215
|
init_logger3();
|
|
15117
15216
|
init_loglevel();
|
|
@@ -15212,19 +15311,19 @@ var init_config = __esm({
|
|
|
15212
15311
|
}
|
|
15213
15312
|
});
|
|
15214
15313
|
|
|
15215
|
-
// ../../node_modules/.pnpm/@amplitude+analytics-core@2.
|
|
15314
|
+
// ../../node_modules/.pnpm/@amplitude+analytics-core@2.36.0/node_modules/@amplitude/analytics-core/lib/esm/utils/status-code.js
|
|
15216
15315
|
function isSuccessStatusCode(code) {
|
|
15217
15316
|
return code >= 200 && code < 300;
|
|
15218
15317
|
}
|
|
15219
15318
|
var init_status_code = __esm({
|
|
15220
|
-
"../../node_modules/.pnpm/@amplitude+analytics-core@2.
|
|
15319
|
+
"../../node_modules/.pnpm/@amplitude+analytics-core@2.36.0/node_modules/@amplitude/analytics-core/lib/esm/utils/status-code.js"() {
|
|
15221
15320
|
}
|
|
15222
15321
|
});
|
|
15223
15322
|
|
|
15224
|
-
// ../../node_modules/.pnpm/@amplitude+analytics-core@2.
|
|
15323
|
+
// ../../node_modules/.pnpm/@amplitude+analytics-core@2.36.0/node_modules/@amplitude/analytics-core/lib/esm/utils/debug.js
|
|
15225
15324
|
var getStacktrace, getClientLogConfig, getValueByStringPath, getClientStates, debugWrapper;
|
|
15226
15325
|
var init_debug = __esm({
|
|
15227
|
-
"../../node_modules/.pnpm/@amplitude+analytics-core@2.
|
|
15326
|
+
"../../node_modules/.pnpm/@amplitude+analytics-core@2.36.0/node_modules/@amplitude/analytics-core/lib/esm/utils/debug.js"() {
|
|
15228
15327
|
init_tslib_es6();
|
|
15229
15328
|
init_loglevel();
|
|
15230
15329
|
getStacktrace = function(ignoreDepth) {
|
|
@@ -15342,7 +15441,7 @@ var init_debug = __esm({
|
|
|
15342
15441
|
}
|
|
15343
15442
|
});
|
|
15344
15443
|
|
|
15345
|
-
// ../../node_modules/.pnpm/@amplitude+analytics-core@2.
|
|
15444
|
+
// ../../node_modules/.pnpm/@amplitude+analytics-core@2.36.0/node_modules/@amplitude/analytics-core/lib/esm/plugins/destination.js
|
|
15346
15445
|
function getErrorMessage(error) {
|
|
15347
15446
|
if (error instanceof Error)
|
|
15348
15447
|
return error.message;
|
|
@@ -15360,7 +15459,7 @@ function getResponseBodyString(res) {
|
|
|
15360
15459
|
}
|
|
15361
15460
|
var Destination;
|
|
15362
15461
|
var init_destination = __esm({
|
|
15363
|
-
"../../node_modules/.pnpm/@amplitude+analytics-core@2.
|
|
15462
|
+
"../../node_modules/.pnpm/@amplitude+analytics-core@2.36.0/node_modules/@amplitude/analytics-core/lib/esm/plugins/destination.js"() {
|
|
15364
15463
|
init_tslib_es6();
|
|
15365
15464
|
init_status();
|
|
15366
15465
|
init_messages();
|
|
@@ -15751,10 +15850,10 @@ var init_destination = __esm({
|
|
|
15751
15850
|
}
|
|
15752
15851
|
});
|
|
15753
15852
|
|
|
15754
|
-
// ../../node_modules/.pnpm/@amplitude+analytics-core@2.
|
|
15853
|
+
// ../../node_modules/.pnpm/@amplitude+analytics-core@2.36.0/node_modules/@amplitude/analytics-core/lib/esm/transports/base.js
|
|
15755
15854
|
var BaseTransport;
|
|
15756
15855
|
var init_base2 = __esm({
|
|
15757
|
-
"../../node_modules/.pnpm/@amplitude+analytics-core@2.
|
|
15856
|
+
"../../node_modules/.pnpm/@amplitude+analytics-core@2.36.0/node_modules/@amplitude/analytics-core/lib/esm/transports/base.js"() {
|
|
15758
15857
|
init_status();
|
|
15759
15858
|
init_status_code();
|
|
15760
15859
|
BaseTransport = /** @class */
|
|
@@ -15856,10 +15955,10 @@ var init_base2 = __esm({
|
|
|
15856
15955
|
}
|
|
15857
15956
|
});
|
|
15858
15957
|
|
|
15859
|
-
// ../../node_modules/.pnpm/@amplitude+analytics-core@2.
|
|
15958
|
+
// ../../node_modules/.pnpm/@amplitude+analytics-core@2.36.0/node_modules/@amplitude/analytics-core/lib/esm/types/server-zone.js
|
|
15860
15959
|
var ServerZone;
|
|
15861
15960
|
var init_server_zone = __esm({
|
|
15862
|
-
"../../node_modules/.pnpm/@amplitude+analytics-core@2.
|
|
15961
|
+
"../../node_modules/.pnpm/@amplitude+analytics-core@2.36.0/node_modules/@amplitude/analytics-core/lib/esm/types/server-zone.js"() {
|
|
15863
15962
|
(function(ServerZone2) {
|
|
15864
15963
|
ServerZone2["US"] = "US";
|
|
15865
15964
|
ServerZone2["EU"] = "EU";
|
|
@@ -15868,17 +15967,17 @@ var init_server_zone = __esm({
|
|
|
15868
15967
|
}
|
|
15869
15968
|
});
|
|
15870
15969
|
|
|
15871
|
-
// ../../node_modules/.pnpm/@amplitude+analytics-core@2.
|
|
15970
|
+
// ../../node_modules/.pnpm/@amplitude+analytics-core@2.36.0/node_modules/@amplitude/analytics-core/lib/esm/types/offline.js
|
|
15872
15971
|
var OfflineDisabled;
|
|
15873
15972
|
var init_offline = __esm({
|
|
15874
|
-
"../../node_modules/.pnpm/@amplitude+analytics-core@2.
|
|
15973
|
+
"../../node_modules/.pnpm/@amplitude+analytics-core@2.36.0/node_modules/@amplitude/analytics-core/lib/esm/types/offline.js"() {
|
|
15875
15974
|
OfflineDisabled = null;
|
|
15876
15975
|
}
|
|
15877
15976
|
});
|
|
15878
15977
|
|
|
15879
|
-
// ../../node_modules/.pnpm/@amplitude+analytics-core@2.
|
|
15978
|
+
// ../../node_modules/.pnpm/@amplitude+analytics-core@2.36.0/node_modules/@amplitude/analytics-core/lib/esm/index.js
|
|
15880
15979
|
var init_esm5 = __esm({
|
|
15881
|
-
"../../node_modules/.pnpm/@amplitude+analytics-core@2.
|
|
15980
|
+
"../../node_modules/.pnpm/@amplitude+analytics-core@2.36.0/node_modules/@amplitude/analytics-core/lib/esm/index.js"() {
|
|
15882
15981
|
init_core_client();
|
|
15883
15982
|
init_identify();
|
|
15884
15983
|
init_revenue();
|
|
@@ -15895,18 +15994,18 @@ var init_esm5 = __esm({
|
|
|
15895
15994
|
}
|
|
15896
15995
|
});
|
|
15897
15996
|
|
|
15898
|
-
// ../../node_modules/.pnpm/@amplitude+analytics-node@1.5.
|
|
15997
|
+
// ../../node_modules/.pnpm/@amplitude+analytics-node@1.5.32/node_modules/@amplitude/analytics-node/lib/esm/version.js
|
|
15899
15998
|
var VERSION;
|
|
15900
15999
|
var init_version3 = __esm({
|
|
15901
|
-
"../../node_modules/.pnpm/@amplitude+analytics-node@1.5.
|
|
15902
|
-
VERSION = "1.5.
|
|
16000
|
+
"../../node_modules/.pnpm/@amplitude+analytics-node@1.5.32/node_modules/@amplitude/analytics-node/lib/esm/version.js"() {
|
|
16001
|
+
VERSION = "1.5.32";
|
|
15903
16002
|
}
|
|
15904
16003
|
});
|
|
15905
16004
|
|
|
15906
|
-
// ../../node_modules/.pnpm/@amplitude+analytics-node@1.5.
|
|
16005
|
+
// ../../node_modules/.pnpm/@amplitude+analytics-node@1.5.32/node_modules/@amplitude/analytics-node/lib/esm/plugins/context.js
|
|
15907
16006
|
var Context2;
|
|
15908
16007
|
var init_context4 = __esm({
|
|
15909
|
-
"../../node_modules/.pnpm/@amplitude+analytics-node@1.5.
|
|
16008
|
+
"../../node_modules/.pnpm/@amplitude+analytics-node@1.5.32/node_modules/@amplitude/analytics-node/lib/esm/plugins/context.js"() {
|
|
15910
16009
|
init_tslib_es6();
|
|
15911
16010
|
init_esm5();
|
|
15912
16011
|
init_version3();
|
|
@@ -15941,7 +16040,7 @@ var init_context4 = __esm({
|
|
|
15941
16040
|
});
|
|
15942
16041
|
var Http;
|
|
15943
16042
|
var init_http = __esm({
|
|
15944
|
-
"../../node_modules/.pnpm/@amplitude+analytics-node@1.5.
|
|
16043
|
+
"../../node_modules/.pnpm/@amplitude+analytics-node@1.5.32/node_modules/@amplitude/analytics-node/lib/esm/transports/http.js"() {
|
|
15945
16044
|
init_tslib_es6();
|
|
15946
16045
|
init_esm5();
|
|
15947
16046
|
Http = /** @class */
|
|
@@ -16003,10 +16102,10 @@ var init_http = __esm({
|
|
|
16003
16102
|
}
|
|
16004
16103
|
});
|
|
16005
16104
|
|
|
16006
|
-
// ../../node_modules/.pnpm/@amplitude+analytics-node@1.5.
|
|
16105
|
+
// ../../node_modules/.pnpm/@amplitude+analytics-node@1.5.32/node_modules/@amplitude/analytics-node/lib/esm/config.js
|
|
16007
16106
|
var NodeConfig, useNodeConfig;
|
|
16008
16107
|
var init_config2 = __esm({
|
|
16009
|
-
"../../node_modules/.pnpm/@amplitude+analytics-node@1.5.
|
|
16108
|
+
"../../node_modules/.pnpm/@amplitude+analytics-node@1.5.32/node_modules/@amplitude/analytics-node/lib/esm/config.js"() {
|
|
16010
16109
|
init_tslib_es6();
|
|
16011
16110
|
init_esm5();
|
|
16012
16111
|
init_http();
|
|
@@ -16024,10 +16123,10 @@ var init_config2 = __esm({
|
|
|
16024
16123
|
}
|
|
16025
16124
|
});
|
|
16026
16125
|
|
|
16027
|
-
// ../../node_modules/.pnpm/@amplitude+analytics-node@1.5.
|
|
16126
|
+
// ../../node_modules/.pnpm/@amplitude+analytics-node@1.5.32/node_modules/@amplitude/analytics-node/lib/esm/node-client.js
|
|
16028
16127
|
var AmplitudeNode, createInstance, node_client_default;
|
|
16029
16128
|
var init_node_client = __esm({
|
|
16030
|
-
"../../node_modules/.pnpm/@amplitude+analytics-node@1.5.
|
|
16129
|
+
"../../node_modules/.pnpm/@amplitude+analytics-node@1.5.32/node_modules/@amplitude/analytics-node/lib/esm/node-client.js"() {
|
|
16031
16130
|
init_tslib_es6();
|
|
16032
16131
|
init_esm5();
|
|
16033
16132
|
init_context4();
|
|
@@ -16101,7 +16200,7 @@ var init_node_client = __esm({
|
|
|
16101
16200
|
}
|
|
16102
16201
|
});
|
|
16103
16202
|
|
|
16104
|
-
// ../../node_modules/.pnpm/@amplitude+analytics-node@1.5.
|
|
16203
|
+
// ../../node_modules/.pnpm/@amplitude+analytics-node@1.5.32/node_modules/@amplitude/analytics-node/lib/esm/types.js
|
|
16105
16204
|
var types_exports = {};
|
|
16106
16205
|
__export(types_exports, {
|
|
16107
16206
|
IdentifyOperation: () => IdentifyOperation,
|
|
@@ -16112,12 +16211,12 @@ __export(types_exports, {
|
|
|
16112
16211
|
SpecialEventType: () => SpecialEventType
|
|
16113
16212
|
});
|
|
16114
16213
|
var init_types4 = __esm({
|
|
16115
|
-
"../../node_modules/.pnpm/@amplitude+analytics-node@1.5.
|
|
16214
|
+
"../../node_modules/.pnpm/@amplitude+analytics-node@1.5.32/node_modules/@amplitude/analytics-node/lib/esm/types.js"() {
|
|
16116
16215
|
init_esm5();
|
|
16117
16216
|
}
|
|
16118
16217
|
});
|
|
16119
16218
|
|
|
16120
|
-
// ../../node_modules/.pnpm/@amplitude+analytics-node@1.5.
|
|
16219
|
+
// ../../node_modules/.pnpm/@amplitude+analytics-node@1.5.32/node_modules/@amplitude/analytics-node/lib/esm/index.js
|
|
16121
16220
|
var esm_exports2 = {};
|
|
16122
16221
|
__export(esm_exports2, {
|
|
16123
16222
|
Identify: () => Identify,
|
|
@@ -16138,7 +16237,7 @@ __export(esm_exports2, {
|
|
|
16138
16237
|
});
|
|
16139
16238
|
var add, groupIdentify, identify, init, logEvent, remove, revenue, setGroup, setOptOut, track, flush;
|
|
16140
16239
|
var init_esm6 = __esm({
|
|
16141
|
-
"../../node_modules/.pnpm/@amplitude+analytics-node@1.5.
|
|
16240
|
+
"../../node_modules/.pnpm/@amplitude+analytics-node@1.5.32/node_modules/@amplitude/analytics-node/lib/esm/index.js"() {
|
|
16142
16241
|
init_node_client();
|
|
16143
16242
|
init_node_client();
|
|
16144
16243
|
init_esm5();
|