autotel-subscribers 31.1.0 → 31.1.1

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.
@@ -111,11 +111,11 @@ function normalizeWindowsPath(path) {
111
111
  return path.replace(/^[A-Z]:/, "").replace(/\\/g, "/");
112
112
  }
113
113
  var init_module_node = __esm({
114
- "../../node_modules/.pnpm/posthog-node@5.33.0_rxjs@7.8.2/node_modules/posthog-node/dist/extensions/error-tracking/modifiers/module.node.mjs"() {
114
+ "../../node_modules/.pnpm/posthog-node@5.34.1_rxjs@7.8.2/node_modules/posthog-node/dist/extensions/error-tracking/modifiers/module.node.mjs"() {
115
115
  }
116
116
  });
117
117
 
118
- // ../../node_modules/.pnpm/@posthog+core@1.28.0/node_modules/@posthog/core/dist/featureFlagUtils.mjs
118
+ // ../../node_modules/.pnpm/@posthog+core@1.29.1/node_modules/@posthog/core/dist/featureFlagUtils.mjs
119
119
  function getFlagDetailFromFlagAndPayload(key, value, payload) {
120
120
  return {
121
121
  key,
@@ -132,7 +132,7 @@ function getFlagDetailFromFlagAndPayload(key, value, payload) {
132
132
  }
133
133
  var normalizeFlagsResponse, getFlagValuesFromFlags, getPayloadsFromFlags, getFeatureFlagValue, parsePayload;
134
134
  var init_featureFlagUtils = __esm({
135
- "../../node_modules/.pnpm/@posthog+core@1.28.0/node_modules/@posthog/core/dist/featureFlagUtils.mjs"() {
135
+ "../../node_modules/.pnpm/@posthog+core@1.29.1/node_modules/@posthog/core/dist/featureFlagUtils.mjs"() {
136
136
  normalizeFlagsResponse = (flagsResponse) => {
137
137
  if ("flags" in flagsResponse) {
138
138
  const featureFlags = getFlagValuesFromFlags(flagsResponse.flags);
@@ -190,15 +190,64 @@ var init_featureFlagUtils = __esm({
190
190
  }
191
191
  });
192
192
 
193
- // ../../node_modules/.pnpm/@posthog+core@1.28.0/node_modules/@posthog/core/dist/gzip.mjs
193
+ // ../../node_modules/.pnpm/@posthog+core@1.29.1/node_modules/@posthog/core/dist/types.mjs
194
+ var types_PostHogPersistedProperty, FeatureFlagError;
195
+ var init_types = __esm({
196
+ "../../node_modules/.pnpm/@posthog+core@1.29.1/node_modules/@posthog/core/dist/types.mjs"() {
197
+ types_PostHogPersistedProperty = /* @__PURE__ */ (function(PostHogPersistedProperty) {
198
+ PostHogPersistedProperty["AnonymousId"] = "anonymous_id";
199
+ PostHogPersistedProperty["DistinctId"] = "distinct_id";
200
+ PostHogPersistedProperty["Props"] = "props";
201
+ PostHogPersistedProperty["EnablePersonProcessing"] = "enable_person_processing";
202
+ PostHogPersistedProperty["PersonMode"] = "person_mode";
203
+ PostHogPersistedProperty["FeatureFlagDetails"] = "feature_flag_details";
204
+ PostHogPersistedProperty["FeatureFlags"] = "feature_flags";
205
+ PostHogPersistedProperty["FeatureFlagPayloads"] = "feature_flag_payloads";
206
+ PostHogPersistedProperty["BootstrapFeatureFlagDetails"] = "bootstrap_feature_flag_details";
207
+ PostHogPersistedProperty["BootstrapFeatureFlags"] = "bootstrap_feature_flags";
208
+ PostHogPersistedProperty["BootstrapFeatureFlagPayloads"] = "bootstrap_feature_flag_payloads";
209
+ PostHogPersistedProperty["OverrideFeatureFlags"] = "override_feature_flags";
210
+ PostHogPersistedProperty["Queue"] = "queue";
211
+ PostHogPersistedProperty["LogsQueue"] = "logs_queue";
212
+ PostHogPersistedProperty["OptedOut"] = "opted_out";
213
+ PostHogPersistedProperty["SessionId"] = "session_id";
214
+ PostHogPersistedProperty["SessionStartTimestamp"] = "session_start_timestamp";
215
+ PostHogPersistedProperty["SessionLastTimestamp"] = "session_timestamp";
216
+ PostHogPersistedProperty["PersonProperties"] = "person_properties";
217
+ PostHogPersistedProperty["GroupProperties"] = "group_properties";
218
+ PostHogPersistedProperty["InstalledAppBuild"] = "installed_app_build";
219
+ PostHogPersistedProperty["InstalledAppVersion"] = "installed_app_version";
220
+ PostHogPersistedProperty["SessionReplay"] = "session_replay";
221
+ PostHogPersistedProperty["SurveyLastSeenDate"] = "survey_last_seen_date";
222
+ PostHogPersistedProperty["SurveysSeen"] = "surveys_seen";
223
+ PostHogPersistedProperty["Surveys"] = "surveys";
224
+ PostHogPersistedProperty["RemoteConfig"] = "remote_config";
225
+ PostHogPersistedProperty["FlagsEndpointWasHit"] = "flags_endpoint_was_hit";
226
+ PostHogPersistedProperty["DeviceId"] = "device_id";
227
+ return PostHogPersistedProperty;
228
+ })({});
229
+ FeatureFlagError = {
230
+ ERRORS_WHILE_COMPUTING: "errors_while_computing_flags",
231
+ FLAG_MISSING: "flag_missing",
232
+ QUOTA_LIMITED: "quota_limited",
233
+ TIMEOUT: "timeout",
234
+ CONNECTION_ERROR: "connection_error",
235
+ UNKNOWN_ERROR: "unknown_error",
236
+ apiError: (status) => `api_error_${status}`
237
+ };
238
+ }
239
+ });
240
+
241
+ // ../../node_modules/.pnpm/@posthog+core@1.29.1/node_modules/@posthog/core/dist/gzip.mjs
194
242
  function isGzipSupported() {
195
243
  return "CompressionStream" in globalThis && "TextEncoder" in globalThis && "Response" in globalThis && "function" == typeof Response.prototype.blob;
196
244
  }
197
245
  async function gzipCompress(input, isDebug = true, options) {
198
246
  try {
247
+ const inputBytes = new TextEncoder().encode(input);
199
248
  const compressedStream = new CompressionStream("gzip");
200
249
  const writer = compressedStream.writable.getWriter();
201
- const writePromise = writer.write(new TextEncoder().encode(input)).then(() => writer.close()).catch(async (err) => {
250
+ const writePromise = writer.write(inputBytes).then(() => writer.close()).catch(async (err) => {
202
251
  try {
203
252
  await writer.abort(err);
204
253
  } catch {
@@ -210,21 +259,59 @@ async function gzipCompress(input, isDebug = true, options) {
210
259
  responsePromise,
211
260
  writePromise
212
261
  ]);
262
+ await validateNativeGzip(compressed, inputBytes);
213
263
  return compressed;
214
264
  } catch (error) {
215
265
  if (isDebug) console.error("Failed to gzip compress data", error);
216
266
  return null;
217
267
  }
218
268
  }
269
+ var NATIVE_GZIP_VALIDATION_ERROR, GZIP_MAGIC_FIRST_BYTE, GZIP_MAGIC_SECOND_BYTE, GZIP_DEFLATE_METHOD, hasGzipMagic, crc32Table, getCrc32Table, crc32, throwNativeGzipValidationError, validateNativeGzip;
219
270
  var init_gzip = __esm({
220
- "../../node_modules/.pnpm/@posthog+core@1.28.0/node_modules/@posthog/core/dist/gzip.mjs"() {
271
+ "../../node_modules/.pnpm/@posthog+core@1.29.1/node_modules/@posthog/core/dist/gzip.mjs"() {
272
+ init_types();
273
+ NATIVE_GZIP_VALIDATION_ERROR = "NativeGzipValidationError";
274
+ GZIP_MAGIC_FIRST_BYTE = 31;
275
+ GZIP_MAGIC_SECOND_BYTE = 139;
276
+ GZIP_DEFLATE_METHOD = 8;
277
+ hasGzipMagic = (bytes) => bytes.length >= 2 && bytes[0] === GZIP_MAGIC_FIRST_BYTE && bytes[1] === GZIP_MAGIC_SECOND_BYTE;
278
+ getCrc32Table = () => {
279
+ if (crc32Table) return crc32Table;
280
+ crc32Table = [];
281
+ for (let i = 0; i < 256; i++) {
282
+ let crc = i;
283
+ for (let j = 0; j < 8; j++) crc = 1 & crc ? 3988292384 ^ crc >>> 1 : crc >>> 1;
284
+ crc32Table[i] = crc >>> 0;
285
+ }
286
+ return crc32Table;
287
+ };
288
+ crc32 = (bytes) => {
289
+ const table = getCrc32Table();
290
+ let crc = 4294967295;
291
+ for (let i = 0; i < bytes.length; i++) crc = table[(crc ^ bytes[i]) & 255] ^ crc >>> 8;
292
+ return (4294967295 ^ crc) >>> 0;
293
+ };
294
+ throwNativeGzipValidationError = (reason) => {
295
+ const error = new Error(`Native gzip produced invalid output: ${reason}`);
296
+ error.name = NATIVE_GZIP_VALIDATION_ERROR;
297
+ throw error;
298
+ };
299
+ validateNativeGzip = async (compressed, inputBytes) => {
300
+ if (compressed.size < 18) throwNativeGzipValidationError("too-short");
301
+ const header = new Uint8Array(await compressed.slice(0, 10).arrayBuffer());
302
+ if (!hasGzipMagic(header) || header[2] !== GZIP_DEFLATE_METHOD) throwNativeGzipValidationError("invalid-header");
303
+ const trailer = new DataView(await compressed.slice(compressed.size - 8).arrayBuffer());
304
+ if (trailer.getUint32(0, true) !== crc32(inputBytes)) throwNativeGzipValidationError("invalid-crc");
305
+ const inputSize = inputBytes.length >>> 0;
306
+ if (trailer.getUint32(4, true) !== inputSize) throwNativeGzipValidationError("invalid-size");
307
+ };
221
308
  }
222
309
  });
223
310
 
224
- // ../../node_modules/.pnpm/@posthog+core@1.28.0/node_modules/@posthog/core/dist/utils/bot-detection.mjs
311
+ // ../../node_modules/.pnpm/@posthog+core@1.29.1/node_modules/@posthog/core/dist/utils/bot-detection.mjs
225
312
  var DEFAULT_BLOCKED_UA_STRS, isBlockedUA;
226
313
  var init_bot_detection = __esm({
227
- "../../node_modules/.pnpm/@posthog+core@1.28.0/node_modules/@posthog/core/dist/utils/bot-detection.mjs"() {
314
+ "../../node_modules/.pnpm/@posthog+core@1.29.1/node_modules/@posthog/core/dist/utils/bot-detection.mjs"() {
228
315
  DEFAULT_BLOCKED_UA_STRS = [
229
316
  "amazonbot",
230
317
  "amazonproductbot",
@@ -315,61 +402,13 @@ var init_bot_detection = __esm({
315
402
  }
316
403
  });
317
404
 
318
- // ../../node_modules/.pnpm/@posthog+core@1.28.0/node_modules/@posthog/core/dist/types.mjs
319
- var types_PostHogPersistedProperty, FeatureFlagError;
320
- var init_types = __esm({
321
- "../../node_modules/.pnpm/@posthog+core@1.28.0/node_modules/@posthog/core/dist/types.mjs"() {
322
- types_PostHogPersistedProperty = /* @__PURE__ */ (function(PostHogPersistedProperty) {
323
- PostHogPersistedProperty["AnonymousId"] = "anonymous_id";
324
- PostHogPersistedProperty["DistinctId"] = "distinct_id";
325
- PostHogPersistedProperty["Props"] = "props";
326
- PostHogPersistedProperty["EnablePersonProcessing"] = "enable_person_processing";
327
- PostHogPersistedProperty["PersonMode"] = "person_mode";
328
- PostHogPersistedProperty["FeatureFlagDetails"] = "feature_flag_details";
329
- PostHogPersistedProperty["FeatureFlags"] = "feature_flags";
330
- PostHogPersistedProperty["FeatureFlagPayloads"] = "feature_flag_payloads";
331
- PostHogPersistedProperty["BootstrapFeatureFlagDetails"] = "bootstrap_feature_flag_details";
332
- PostHogPersistedProperty["BootstrapFeatureFlags"] = "bootstrap_feature_flags";
333
- PostHogPersistedProperty["BootstrapFeatureFlagPayloads"] = "bootstrap_feature_flag_payloads";
334
- PostHogPersistedProperty["OverrideFeatureFlags"] = "override_feature_flags";
335
- PostHogPersistedProperty["Queue"] = "queue";
336
- PostHogPersistedProperty["LogsQueue"] = "logs_queue";
337
- PostHogPersistedProperty["OptedOut"] = "opted_out";
338
- PostHogPersistedProperty["SessionId"] = "session_id";
339
- PostHogPersistedProperty["SessionStartTimestamp"] = "session_start_timestamp";
340
- PostHogPersistedProperty["SessionLastTimestamp"] = "session_timestamp";
341
- PostHogPersistedProperty["PersonProperties"] = "person_properties";
342
- PostHogPersistedProperty["GroupProperties"] = "group_properties";
343
- PostHogPersistedProperty["InstalledAppBuild"] = "installed_app_build";
344
- PostHogPersistedProperty["InstalledAppVersion"] = "installed_app_version";
345
- PostHogPersistedProperty["SessionReplay"] = "session_replay";
346
- PostHogPersistedProperty["SurveyLastSeenDate"] = "survey_last_seen_date";
347
- PostHogPersistedProperty["SurveysSeen"] = "surveys_seen";
348
- PostHogPersistedProperty["Surveys"] = "surveys";
349
- PostHogPersistedProperty["RemoteConfig"] = "remote_config";
350
- PostHogPersistedProperty["FlagsEndpointWasHit"] = "flags_endpoint_was_hit";
351
- PostHogPersistedProperty["DeviceId"] = "device_id";
352
- return PostHogPersistedProperty;
353
- })({});
354
- FeatureFlagError = {
355
- ERRORS_WHILE_COMPUTING: "errors_while_computing_flags",
356
- FLAG_MISSING: "flag_missing",
357
- QUOTA_LIMITED: "quota_limited",
358
- TIMEOUT: "timeout",
359
- CONNECTION_ERROR: "connection_error",
360
- UNKNOWN_ERROR: "unknown_error",
361
- apiError: (status) => `api_error_${status}`
362
- };
363
- }
364
- });
365
-
366
- // ../../node_modules/.pnpm/@posthog+core@1.28.0/node_modules/@posthog/core/dist/utils/string-utils.mjs
405
+ // ../../node_modules/.pnpm/@posthog+core@1.29.1/node_modules/@posthog/core/dist/utils/string-utils.mjs
367
406
  var init_string_utils = __esm({
368
- "../../node_modules/.pnpm/@posthog+core@1.28.0/node_modules/@posthog/core/dist/utils/string-utils.mjs"() {
407
+ "../../node_modules/.pnpm/@posthog+core@1.29.1/node_modules/@posthog/core/dist/utils/string-utils.mjs"() {
369
408
  }
370
409
  });
371
410
 
372
- // ../../node_modules/.pnpm/@posthog+core@1.28.0/node_modules/@posthog/core/dist/utils/type-utils.mjs
411
+ // ../../node_modules/.pnpm/@posthog+core@1.29.1/node_modules/@posthog/core/dist/utils/type-utils.mjs
373
412
  function isPrimitive(value) {
374
413
  return null === value || "object" != typeof value;
375
414
  }
@@ -394,7 +433,7 @@ function isInstanceOf(candidate, base) {
394
433
  }
395
434
  var nativeIsArray, ObjProto, type_utils_toString, isArray, isObject, isUndefined, isString, isEmptyString, isNumber, isPlainError;
396
435
  var init_type_utils = __esm({
397
- "../../node_modules/.pnpm/@posthog+core@1.28.0/node_modules/@posthog/core/dist/utils/type-utils.mjs"() {
436
+ "../../node_modules/.pnpm/@posthog+core@1.29.1/node_modules/@posthog/core/dist/utils/type-utils.mjs"() {
398
437
  init_types();
399
438
  init_string_utils();
400
439
  nativeIsArray = Array.isArray;
@@ -413,7 +452,7 @@ var init_type_utils = __esm({
413
452
  }
414
453
  });
415
454
 
416
- // ../../node_modules/.pnpm/@posthog+core@1.28.0/node_modules/@posthog/core/dist/utils/number-utils.mjs
455
+ // ../../node_modules/.pnpm/@posthog+core@1.29.1/node_modules/@posthog/core/dist/utils/number-utils.mjs
417
456
  function clampToRange(value, min, max, logger, fallbackValue) {
418
457
  if (min > max) {
419
458
  logger.warn("min cannot be greater than max.");
@@ -431,15 +470,15 @@ function clampToRange(value, min, max, logger, fallbackValue) {
431
470
  return clampToRange(max, min, max, logger);
432
471
  }
433
472
  var init_number_utils = __esm({
434
- "../../node_modules/.pnpm/@posthog+core@1.28.0/node_modules/@posthog/core/dist/utils/number-utils.mjs"() {
473
+ "../../node_modules/.pnpm/@posthog+core@1.29.1/node_modules/@posthog/core/dist/utils/number-utils.mjs"() {
435
474
  init_type_utils();
436
475
  }
437
476
  });
438
477
 
439
- // ../../node_modules/.pnpm/@posthog+core@1.28.0/node_modules/@posthog/core/dist/utils/bucketed-rate-limiter.mjs
478
+ // ../../node_modules/.pnpm/@posthog+core@1.29.1/node_modules/@posthog/core/dist/utils/bucketed-rate-limiter.mjs
440
479
  var ONE_DAY_IN_MS, BucketedRateLimiter;
441
480
  var init_bucketed_rate_limiter = __esm({
442
- "../../node_modules/.pnpm/@posthog+core@1.28.0/node_modules/@posthog/core/dist/utils/bucketed-rate-limiter.mjs"() {
481
+ "../../node_modules/.pnpm/@posthog+core@1.29.1/node_modules/@posthog/core/dist/utils/bucketed-rate-limiter.mjs"() {
443
482
  init_number_utils();
444
483
  ONE_DAY_IN_MS = 864e5;
445
484
  BucketedRateLimiter = class {
@@ -483,10 +522,10 @@ var init_bucketed_rate_limiter = __esm({
483
522
  }
484
523
  });
485
524
 
486
- // ../../node_modules/.pnpm/@posthog+core@1.28.0/node_modules/@posthog/core/dist/vendor/uuidv7.mjs
525
+ // ../../node_modules/.pnpm/@posthog+core@1.29.1/node_modules/@posthog/core/dist/vendor/uuidv7.mjs
487
526
  var DIGITS, UUID, V7Generator, getDefaultRandom, defaultGenerator, uuidv7, uuidv7obj;
488
527
  var init_uuidv7 = __esm({
489
- "../../node_modules/.pnpm/@posthog+core@1.28.0/node_modules/@posthog/core/dist/vendor/uuidv7.mjs"() {
528
+ "../../node_modules/.pnpm/@posthog+core@1.29.1/node_modules/@posthog/core/dist/vendor/uuidv7.mjs"() {
490
529
  DIGITS = "0123456789abcdef";
491
530
  UUID = class _UUID {
492
531
  constructor(bytes) {
@@ -647,10 +686,10 @@ var init_uuidv7 = __esm({
647
686
  }
648
687
  });
649
688
 
650
- // ../../node_modules/.pnpm/@posthog+core@1.28.0/node_modules/@posthog/core/dist/utils/promise-queue.mjs
689
+ // ../../node_modules/.pnpm/@posthog+core@1.29.1/node_modules/@posthog/core/dist/utils/promise-queue.mjs
651
690
  var PromiseQueue;
652
691
  var init_promise_queue = __esm({
653
- "../../node_modules/.pnpm/@posthog+core@1.28.0/node_modules/@posthog/core/dist/utils/promise-queue.mjs"() {
692
+ "../../node_modules/.pnpm/@posthog+core@1.29.1/node_modules/@posthog/core/dist/utils/promise-queue.mjs"() {
654
693
  init_uuidv7();
655
694
  PromiseQueue = class {
656
695
  add(promise) {
@@ -681,7 +720,7 @@ var init_promise_queue = __esm({
681
720
  }
682
721
  });
683
722
 
684
- // ../../node_modules/.pnpm/@posthog+core@1.28.0/node_modules/@posthog/core/dist/utils/logger.mjs
723
+ // ../../node_modules/.pnpm/@posthog+core@1.29.1/node_modules/@posthog/core/dist/utils/logger.mjs
685
724
  function createConsole(consoleLike = console) {
686
725
  const lockedMethods = {
687
726
  log: consoleLike.log.bind(consoleLike),
@@ -696,7 +735,7 @@ function createLogger(prefix, maybeCall = passThrough) {
696
735
  }
697
736
  var _createLogger, passThrough;
698
737
  var init_logger = __esm({
699
- "../../node_modules/.pnpm/@posthog+core@1.28.0/node_modules/@posthog/core/dist/utils/logger.mjs"() {
738
+ "../../node_modules/.pnpm/@posthog+core@1.29.1/node_modules/@posthog/core/dist/utils/logger.mjs"() {
700
739
  _createLogger = (prefix, maybeCall, consoleLike) => {
701
740
  function _log(level, ...args) {
702
741
  maybeCall(() => {
@@ -728,10 +767,10 @@ var init_logger = __esm({
728
767
  }
729
768
  });
730
769
 
731
- // ../../node_modules/.pnpm/@posthog+core@1.28.0/node_modules/@posthog/core/dist/utils/user-agent-utils.mjs
770
+ // ../../node_modules/.pnpm/@posthog+core@1.29.1/node_modules/@posthog/core/dist/utils/user-agent-utils.mjs
732
771
  var MOBILE, TABLET, GENERIC;
733
772
  var init_user_agent_utils = __esm({
734
- "../../node_modules/.pnpm/@posthog+core@1.28.0/node_modules/@posthog/core/dist/utils/user-agent-utils.mjs"() {
773
+ "../../node_modules/.pnpm/@posthog+core@1.29.1/node_modules/@posthog/core/dist/utils/user-agent-utils.mjs"() {
735
774
  init_string_utils();
736
775
  init_type_utils();
737
776
  MOBILE = "Mobile";
@@ -742,7 +781,7 @@ var init_user_agent_utils = __esm({
742
781
  }
743
782
  });
744
783
 
745
- // ../../node_modules/.pnpm/@posthog+core@1.28.0/node_modules/@posthog/core/dist/utils/index.mjs
784
+ // ../../node_modules/.pnpm/@posthog+core@1.29.1/node_modules/@posthog/core/dist/utils/index.mjs
746
785
  function removeTrailingSlash(url) {
747
786
  return url?.replace(/\/+$/, "");
748
787
  }
@@ -779,7 +818,7 @@ function allSettled(promises) {
779
818
  }
780
819
  var STRING_FORMAT, isError;
781
820
  var init_utils = __esm({
782
- "../../node_modules/.pnpm/@posthog+core@1.28.0/node_modules/@posthog/core/dist/utils/index.mjs"() {
821
+ "../../node_modules/.pnpm/@posthog+core@1.29.1/node_modules/@posthog/core/dist/utils/index.mjs"() {
783
822
  init_bot_detection();
784
823
  init_bucketed_rate_limiter();
785
824
  init_number_utils();
@@ -793,10 +832,10 @@ var init_utils = __esm({
793
832
  }
794
833
  });
795
834
 
796
- // ../../node_modules/.pnpm/@posthog+core@1.28.0/node_modules/@posthog/core/dist/logs/logs-utils.mjs
835
+ // ../../node_modules/.pnpm/@posthog+core@1.29.1/node_modules/@posthog/core/dist/logs/logs-utils.mjs
797
836
  var OTLP_SEVERITY_MAP;
798
837
  var init_logs_utils = __esm({
799
- "../../node_modules/.pnpm/@posthog+core@1.28.0/node_modules/@posthog/core/dist/logs/logs-utils.mjs"() {
838
+ "../../node_modules/.pnpm/@posthog+core@1.29.1/node_modules/@posthog/core/dist/logs/logs-utils.mjs"() {
800
839
  init_utils();
801
840
  OTLP_SEVERITY_MAP = {
802
841
  trace: {
@@ -828,26 +867,102 @@ var init_logs_utils = __esm({
828
867
  }
829
868
  });
830
869
 
831
- // ../../node_modules/.pnpm/@posthog+core@1.28.0/node_modules/@posthog/core/dist/logs/index.mjs
870
+ // ../../node_modules/.pnpm/@posthog+core@1.29.1/node_modules/@posthog/core/dist/logs/index.mjs
832
871
  var init_logs = __esm({
833
- "../../node_modules/.pnpm/@posthog+core@1.28.0/node_modules/@posthog/core/dist/logs/index.mjs"() {
872
+ "../../node_modules/.pnpm/@posthog+core@1.29.1/node_modules/@posthog/core/dist/logs/index.mjs"() {
834
873
  init_logs_utils();
835
874
  init_types();
836
875
  init_utils();
837
876
  }
838
877
  });
839
878
 
840
- // ../../node_modules/.pnpm/@posthog+core@1.28.0/node_modules/@posthog/core/dist/surveys/validation.mjs
879
+ // ../../node_modules/.pnpm/@posthog+core@1.29.1/node_modules/@posthog/core/dist/surveys/validation.mjs
841
880
  var init_validation = __esm({
842
- "../../node_modules/.pnpm/@posthog+core@1.28.0/node_modules/@posthog/core/dist/surveys/validation.mjs"() {
881
+ "../../node_modules/.pnpm/@posthog+core@1.29.1/node_modules/@posthog/core/dist/surveys/validation.mjs"() {
843
882
  init_types();
844
883
  }
845
884
  });
846
885
 
847
- // ../../node_modules/.pnpm/@posthog+core@1.28.0/node_modules/@posthog/core/dist/eventemitter.mjs
886
+ // ../../node_modules/.pnpm/@posthog+core@1.29.1/node_modules/@posthog/core/dist/cookie.mjs
887
+ function cookieStoreFromHeader(cookieHeader) {
888
+ const cookies = {};
889
+ if (cookieHeader) for (const pair of cookieHeader.split(";")) {
890
+ const [key, ...valueParts] = pair.trim().split("=");
891
+ if (key) {
892
+ const raw = valueParts.join("=").trim();
893
+ try {
894
+ cookies[key.trim()] = decodeURIComponent(raw);
895
+ } catch {
896
+ cookies[key.trim()] = raw;
897
+ }
898
+ }
899
+ }
900
+ return {
901
+ get: (name) => name in cookies ? {
902
+ value: cookies[name]
903
+ } : void 0
904
+ };
905
+ }
906
+ function getPostHogCookieName(apiKey) {
907
+ const sanitized = apiKey.replace(/\+/g, "PL").replace(/\//g, "SL").replace(/=/g, "EQ");
908
+ return `${COOKIE_PREFIX}${sanitized}${COOKIE_SUFFIX}`;
909
+ }
910
+ function serializePostHogCookie(anonymousId) {
911
+ const now = Date.now();
912
+ const sessionId = uuidv7();
913
+ return JSON.stringify({
914
+ distinct_id: anonymousId,
915
+ $device_id: anonymousId,
916
+ $user_state: "anonymous",
917
+ $sesid: [
918
+ now,
919
+ sessionId,
920
+ now
921
+ ]
922
+ });
923
+ }
924
+ function readPostHogCookie(cookies, apiKey) {
925
+ const cookieName = getPostHogCookieName(apiKey);
926
+ const cookie = cookies.get(cookieName);
927
+ return cookie ? parsePostHogCookie(cookie.value) : null;
928
+ }
929
+ function cookieStateToProperties(state) {
930
+ if (!state) return;
931
+ const props = {};
932
+ if (state.sessionId) props.$session_id = state.sessionId;
933
+ if (state.deviceId) props.$device_id = state.deviceId;
934
+ return Object.keys(props).length > 0 ? props : void 0;
935
+ }
936
+ function parsePostHogCookie(cookieValue) {
937
+ if (!cookieValue) return null;
938
+ try {
939
+ const parsed = JSON.parse(cookieValue);
940
+ if (!parsed || "object" != typeof parsed || !parsed.distinct_id) return null;
941
+ const sesid = isArray(parsed.$sesid) ? parsed.$sesid[1] : void 0;
942
+ return {
943
+ distinctId: String(parsed.distinct_id),
944
+ isIdentified: "identified" === parsed.$user_state,
945
+ sessionId: "string" == typeof sesid ? sesid : void 0,
946
+ deviceId: "string" == typeof parsed.$device_id ? parsed.$device_id : void 0
947
+ };
948
+ } catch {
949
+ return null;
950
+ }
951
+ }
952
+ var COOKIE_PREFIX, COOKIE_SUFFIX;
953
+ var init_cookie = __esm({
954
+ "../../node_modules/.pnpm/@posthog+core@1.29.1/node_modules/@posthog/core/dist/cookie.mjs"() {
955
+ init_utils();
956
+ init_uuidv7();
957
+ COOKIE_PREFIX = "ph_";
958
+ COOKIE_SUFFIX = "_posthog";
959
+ }
960
+ });
961
+
962
+ // ../../node_modules/.pnpm/@posthog+core@1.29.1/node_modules/@posthog/core/dist/eventemitter.mjs
848
963
  var SimpleEventEmitter;
849
964
  var init_eventemitter = __esm({
850
- "../../node_modules/.pnpm/@posthog+core@1.28.0/node_modules/@posthog/core/dist/eventemitter.mjs"() {
965
+ "../../node_modules/.pnpm/@posthog+core@1.29.1/node_modules/@posthog/core/dist/eventemitter.mjs"() {
851
966
  SimpleEventEmitter = class {
852
967
  constructor() {
853
968
  this.events = {};
@@ -868,7 +983,7 @@ var init_eventemitter = __esm({
868
983
  }
869
984
  });
870
985
 
871
- // ../../node_modules/.pnpm/@posthog+core@1.28.0/node_modules/@posthog/core/dist/posthog-core-stateless.mjs
986
+ // ../../node_modules/.pnpm/@posthog+core@1.29.1/node_modules/@posthog/core/dist/posthog-core-stateless.mjs
872
987
  async function logFlushError(err) {
873
988
  if (err instanceof PostHogFetchHttpError) {
874
989
  let text = "";
@@ -888,7 +1003,7 @@ function isPostHogFetchContentTooLargeError(err) {
888
1003
  }
889
1004
  var PostHogFetchHttpError, PostHogFetchNetworkError, PostHogCoreStateless;
890
1005
  var init_posthog_core_stateless = __esm({
891
- "../../node_modules/.pnpm/@posthog+core@1.28.0/node_modules/@posthog/core/dist/posthog-core-stateless.mjs"() {
1006
+ "../../node_modules/.pnpm/@posthog+core@1.29.1/node_modules/@posthog/core/dist/posthog-core-stateless.mjs"() {
892
1007
  init_eventemitter();
893
1008
  init_featureFlagUtils();
894
1009
  init_gzip();
@@ -1252,6 +1367,7 @@ var init_posthog_core_stateless = __esm({
1252
1367
  }
1253
1368
  async getSurveysStateless() {
1254
1369
  await this._initPromise;
1370
+ if (this.disabled) return [];
1255
1371
  if (true === this.disableSurveys) {
1256
1372
  this._logger.info("Loading surveys is disabled.");
1257
1373
  return [];
@@ -1358,7 +1474,9 @@ var init_posthog_core_stateless = __esm({
1358
1474
  body: gzippedPayload || payload
1359
1475
  };
1360
1476
  try {
1361
- await this.fetchWithRetry(url, fetchOptions);
1477
+ const response = await this.fetchWithRetry(url, fetchOptions);
1478
+ await response.body?.cancel()?.catch(() => {
1479
+ });
1362
1480
  } catch (err) {
1363
1481
  this._events.emit("error", err);
1364
1482
  }
@@ -1395,6 +1513,7 @@ var init_posthog_core_stateless = __esm({
1395
1513
  });
1396
1514
  }
1397
1515
  async flush() {
1516
+ if (this.disabled) return;
1398
1517
  const nextFlushPromise = allSettled([
1399
1518
  this.flushPromise
1400
1519
  ]).then(() => this._flush());
@@ -1457,7 +1576,9 @@ var init_posthog_core_stateless = __esm({
1457
1576
  }
1458
1577
  };
1459
1578
  try {
1460
- await this.fetchWithRetry(url, fetchOptions, retryOptions);
1579
+ const response = await this.fetchWithRetry(url, fetchOptions, retryOptions);
1580
+ await response.body?.cancel()?.catch(() => {
1581
+ });
1461
1582
  } catch (err) {
1462
1583
  if (isPostHogFetchContentTooLargeError(err) && batchMessages.length > 1) {
1463
1584
  this.maxBatchSize = Math.max(1, Math.floor(batchMessages.length / 2));
@@ -1474,6 +1595,10 @@ var init_posthog_core_stateless = __esm({
1474
1595
  this._events.emit("flush", sentMessages);
1475
1596
  }
1476
1597
  async _sendLogsBatch(payload) {
1598
+ if (this.disabled) return {
1599
+ kind: "fatal",
1600
+ error: new Error("The client is disabled")
1601
+ };
1477
1602
  const serialized = JSON.stringify(payload);
1478
1603
  const url = `${this.host}/i/v1/logs?token=${encodeURIComponent(this.apiKey)}`;
1479
1604
  const gzippedPayload = this.disableCompression ? null : await gzipCompress(serialized, this.isDebug);
@@ -1551,6 +1676,7 @@ var init_posthog_core_stateless = __esm({
1551
1676
  await this._initPromise;
1552
1677
  let hasTimedOut = false;
1553
1678
  this.clearFlushTimer();
1679
+ if (this.disabled) return;
1554
1680
  const doShutdown = async () => {
1555
1681
  try {
1556
1682
  await this.promiseQueue.join();
@@ -1592,9 +1718,9 @@ var init_posthog_core_stateless = __esm({
1592
1718
  }
1593
1719
  });
1594
1720
 
1595
- // ../../node_modules/.pnpm/@posthog+core@1.28.0/node_modules/@posthog/core/dist/posthog-core.mjs
1721
+ // ../../node_modules/.pnpm/@posthog+core@1.29.1/node_modules/@posthog/core/dist/posthog-core.mjs
1596
1722
  var init_posthog_core = __esm({
1597
- "../../node_modules/.pnpm/@posthog+core@1.28.0/node_modules/@posthog/core/dist/posthog-core.mjs"() {
1723
+ "../../node_modules/.pnpm/@posthog+core@1.29.1/node_modules/@posthog/core/dist/posthog-core.mjs"() {
1598
1724
  init_featureFlagUtils();
1599
1725
  init_types();
1600
1726
  init_posthog_core_stateless();
@@ -1603,14 +1729,14 @@ var init_posthog_core = __esm({
1603
1729
  }
1604
1730
  });
1605
1731
 
1606
- // ../../node_modules/.pnpm/@posthog+core@1.28.0/node_modules/@posthog/core/dist/tracing-headers.mjs
1732
+ // ../../node_modules/.pnpm/@posthog+core@1.29.1/node_modules/@posthog/core/dist/tracing-headers.mjs
1607
1733
  var init_tracing_headers = __esm({
1608
- "../../node_modules/.pnpm/@posthog+core@1.28.0/node_modules/@posthog/core/dist/tracing-headers.mjs"() {
1734
+ "../../node_modules/.pnpm/@posthog+core@1.29.1/node_modules/@posthog/core/dist/tracing-headers.mjs"() {
1609
1735
  init_type_utils();
1610
1736
  }
1611
1737
  });
1612
1738
 
1613
- // ../../node_modules/.pnpm/@posthog+core@1.28.0/node_modules/@posthog/core/dist/error-tracking/chunk-ids.mjs
1739
+ // ../../node_modules/.pnpm/@posthog+core@1.29.1/node_modules/@posthog/core/dist/error-tracking/chunk-ids.mjs
1614
1740
  function getFilenameToChunkIdMap(stackParser) {
1615
1741
  const chunkIdMap = globalThis._posthogChunkIds;
1616
1742
  if (!chunkIdMap) return;
@@ -1643,14 +1769,14 @@ function getFilenameToChunkIdMap(stackParser) {
1643
1769
  }
1644
1770
  var parsedStackResults, lastKeysCount, cachedFilenameChunkIds;
1645
1771
  var init_chunk_ids = __esm({
1646
- "../../node_modules/.pnpm/@posthog+core@1.28.0/node_modules/@posthog/core/dist/error-tracking/chunk-ids.mjs"() {
1772
+ "../../node_modules/.pnpm/@posthog+core@1.29.1/node_modules/@posthog/core/dist/error-tracking/chunk-ids.mjs"() {
1647
1773
  }
1648
1774
  });
1649
1775
 
1650
- // ../../node_modules/.pnpm/@posthog+core@1.28.0/node_modules/@posthog/core/dist/error-tracking/error-properties-builder.mjs
1776
+ // ../../node_modules/.pnpm/@posthog+core@1.29.1/node_modules/@posthog/core/dist/error-tracking/error-properties-builder.mjs
1651
1777
  var MAX_CAUSE_RECURSION, ErrorPropertiesBuilder;
1652
1778
  var init_error_properties_builder = __esm({
1653
- "../../node_modules/.pnpm/@posthog+core@1.28.0/node_modules/@posthog/core/dist/error-tracking/error-properties-builder.mjs"() {
1779
+ "../../node_modules/.pnpm/@posthog+core@1.29.1/node_modules/@posthog/core/dist/error-tracking/error-properties-builder.mjs"() {
1654
1780
  init_utils();
1655
1781
  init_chunk_ids();
1656
1782
  MAX_CAUSE_RECURSION = 4;
@@ -1765,7 +1891,7 @@ var init_error_properties_builder = __esm({
1765
1891
  }
1766
1892
  });
1767
1893
 
1768
- // ../../node_modules/.pnpm/@posthog+core@1.28.0/node_modules/@posthog/core/dist/error-tracking/parsers/base.mjs
1894
+ // ../../node_modules/.pnpm/@posthog+core@1.29.1/node_modules/@posthog/core/dist/error-tracking/parsers/base.mjs
1769
1895
  function createFrame(platform, filename, func, lineno, colno) {
1770
1896
  const frame = {
1771
1897
  platform,
@@ -1779,16 +1905,16 @@ function createFrame(platform, filename, func, lineno, colno) {
1779
1905
  }
1780
1906
  var UNKNOWN_FUNCTION;
1781
1907
  var init_base = __esm({
1782
- "../../node_modules/.pnpm/@posthog+core@1.28.0/node_modules/@posthog/core/dist/error-tracking/parsers/base.mjs"() {
1908
+ "../../node_modules/.pnpm/@posthog+core@1.29.1/node_modules/@posthog/core/dist/error-tracking/parsers/base.mjs"() {
1783
1909
  init_utils();
1784
1910
  UNKNOWN_FUNCTION = "?";
1785
1911
  }
1786
1912
  });
1787
1913
 
1788
- // ../../node_modules/.pnpm/@posthog+core@1.28.0/node_modules/@posthog/core/dist/error-tracking/parsers/safari.mjs
1914
+ // ../../node_modules/.pnpm/@posthog+core@1.29.1/node_modules/@posthog/core/dist/error-tracking/parsers/safari.mjs
1789
1915
  var extractSafariExtensionDetails;
1790
1916
  var init_safari = __esm({
1791
- "../../node_modules/.pnpm/@posthog+core@1.28.0/node_modules/@posthog/core/dist/error-tracking/parsers/safari.mjs"() {
1917
+ "../../node_modules/.pnpm/@posthog+core@1.29.1/node_modules/@posthog/core/dist/error-tracking/parsers/safari.mjs"() {
1792
1918
  init_base();
1793
1919
  extractSafariExtensionDetails = (func, filename) => {
1794
1920
  const isSafariExtension = -1 !== func.indexOf("safari-extension");
@@ -1804,10 +1930,10 @@ var init_safari = __esm({
1804
1930
  }
1805
1931
  });
1806
1932
 
1807
- // ../../node_modules/.pnpm/@posthog+core@1.28.0/node_modules/@posthog/core/dist/error-tracking/parsers/chrome.mjs
1933
+ // ../../node_modules/.pnpm/@posthog+core@1.29.1/node_modules/@posthog/core/dist/error-tracking/parsers/chrome.mjs
1808
1934
  var chromeRegexNoFnName, chromeRegex, chromeEvalRegex, chromeStackLineParser;
1809
1935
  var init_chrome = __esm({
1810
- "../../node_modules/.pnpm/@posthog+core@1.28.0/node_modules/@posthog/core/dist/error-tracking/parsers/chrome.mjs"() {
1936
+ "../../node_modules/.pnpm/@posthog+core@1.29.1/node_modules/@posthog/core/dist/error-tracking/parsers/chrome.mjs"() {
1811
1937
  init_base();
1812
1938
  init_safari();
1813
1939
  chromeRegexNoFnName = /^\s*at (\S+?)(?::(\d+))(?::(\d+))\s*$/i;
@@ -1837,10 +1963,10 @@ var init_chrome = __esm({
1837
1963
  }
1838
1964
  });
1839
1965
 
1840
- // ../../node_modules/.pnpm/@posthog+core@1.28.0/node_modules/@posthog/core/dist/error-tracking/parsers/gecko.mjs
1966
+ // ../../node_modules/.pnpm/@posthog+core@1.29.1/node_modules/@posthog/core/dist/error-tracking/parsers/gecko.mjs
1841
1967
  var geckoREgex, geckoEvalRegex, geckoStackLineParser;
1842
1968
  var init_gecko = __esm({
1843
- "../../node_modules/.pnpm/@posthog+core@1.28.0/node_modules/@posthog/core/dist/error-tracking/parsers/gecko.mjs"() {
1969
+ "../../node_modules/.pnpm/@posthog+core@1.29.1/node_modules/@posthog/core/dist/error-tracking/parsers/gecko.mjs"() {
1844
1970
  init_base();
1845
1971
  init_safari();
1846
1972
  geckoREgex = /^\s*(.*?)(?:\((.*?)\))?(?:^|@)?((?:[-a-z]+)?:\/.*?|\[native code\]|[^@]*(?:bundle|\d+\.js)|\/[\w\-. /=]+)(?::(\d+))?(?::(\d+))?\s*$/i;
@@ -1867,10 +1993,10 @@ var init_gecko = __esm({
1867
1993
  }
1868
1994
  });
1869
1995
 
1870
- // ../../node_modules/.pnpm/@posthog+core@1.28.0/node_modules/@posthog/core/dist/error-tracking/parsers/winjs.mjs
1996
+ // ../../node_modules/.pnpm/@posthog+core@1.29.1/node_modules/@posthog/core/dist/error-tracking/parsers/winjs.mjs
1871
1997
  var winjsRegex, winjsStackLineParser;
1872
1998
  var init_winjs = __esm({
1873
- "../../node_modules/.pnpm/@posthog+core@1.28.0/node_modules/@posthog/core/dist/error-tracking/parsers/winjs.mjs"() {
1999
+ "../../node_modules/.pnpm/@posthog+core@1.29.1/node_modules/@posthog/core/dist/error-tracking/parsers/winjs.mjs"() {
1874
2000
  init_base();
1875
2001
  winjsRegex = /^\s*at (?:((?:\[object object\])?.+) )?\(?((?:[-a-z]+):.*?):(\d+)(?::(\d+))?\)?\s*$/i;
1876
2002
  winjsStackLineParser = (line, platform) => {
@@ -1880,10 +2006,10 @@ var init_winjs = __esm({
1880
2006
  }
1881
2007
  });
1882
2008
 
1883
- // ../../node_modules/.pnpm/@posthog+core@1.28.0/node_modules/@posthog/core/dist/error-tracking/parsers/opera.mjs
2009
+ // ../../node_modules/.pnpm/@posthog+core@1.29.1/node_modules/@posthog/core/dist/error-tracking/parsers/opera.mjs
1884
2010
  var opera10Regex, opera10StackLineParser, opera11Regex, opera11StackLineParser;
1885
2011
  var init_opera = __esm({
1886
- "../../node_modules/.pnpm/@posthog+core@1.28.0/node_modules/@posthog/core/dist/error-tracking/parsers/opera.mjs"() {
2012
+ "../../node_modules/.pnpm/@posthog+core@1.29.1/node_modules/@posthog/core/dist/error-tracking/parsers/opera.mjs"() {
1887
2013
  init_base();
1888
2014
  opera10Regex = / line (\d+).*script (?:in )?(\S+)(?:: in function (\S+))?$/i;
1889
2015
  opera10StackLineParser = (line, platform) => {
@@ -1898,7 +2024,7 @@ var init_opera = __esm({
1898
2024
  }
1899
2025
  });
1900
2026
 
1901
- // ../../node_modules/.pnpm/@posthog+core@1.28.0/node_modules/@posthog/core/dist/error-tracking/parsers/node.mjs
2027
+ // ../../node_modules/.pnpm/@posthog+core@1.29.1/node_modules/@posthog/core/dist/error-tracking/parsers/node.mjs
1902
2028
  function filenameIsInApp(filename, isNative = false) {
1903
2029
  const isInternal = isNative || filename && !filename.startsWith("/") && !filename.match(/^[A-Z]:/) && !filename.startsWith(".") && !filename.match(/^[a-zA-Z]([a-zA-Z0-9.\-+])*:\/\//);
1904
2030
  return !isInternal && void 0 !== filename && !filename.includes("node_modules/");
@@ -1908,7 +2034,7 @@ function _parseIntOrUndefined(input) {
1908
2034
  }
1909
2035
  var FILENAME_MATCH, FULL_MATCH, nodeStackLineParser;
1910
2036
  var init_node = __esm({
1911
- "../../node_modules/.pnpm/@posthog+core@1.28.0/node_modules/@posthog/core/dist/error-tracking/parsers/node.mjs"() {
2037
+ "../../node_modules/.pnpm/@posthog+core@1.29.1/node_modules/@posthog/core/dist/error-tracking/parsers/node.mjs"() {
1912
2038
  init_base();
1913
2039
  FILENAME_MATCH = /^\s*[-]{4,}$/;
1914
2040
  FULL_MATCH = /at (?:async )?(?:(.+?)\s+\()?(?:(.+):(\d+):(\d+)?|([^)]+))\)?/;
@@ -1969,7 +2095,7 @@ var init_node = __esm({
1969
2095
  }
1970
2096
  });
1971
2097
 
1972
- // ../../node_modules/.pnpm/@posthog+core@1.28.0/node_modules/@posthog/core/dist/error-tracking/parsers/index.mjs
2098
+ // ../../node_modules/.pnpm/@posthog+core@1.29.1/node_modules/@posthog/core/dist/error-tracking/parsers/index.mjs
1973
2099
  function reverseAndStripFrames(stack) {
1974
2100
  if (!stack.length) return [];
1975
2101
  const localStack = Array.from(stack);
@@ -2010,7 +2136,7 @@ function createStackParser(platform, ...parsers) {
2010
2136
  }
2011
2137
  var WEBPACK_ERROR_REGEXP, STACKTRACE_FRAME_LIMIT;
2012
2138
  var init_parsers = __esm({
2013
- "../../node_modules/.pnpm/@posthog+core@1.28.0/node_modules/@posthog/core/dist/error-tracking/parsers/index.mjs"() {
2139
+ "../../node_modules/.pnpm/@posthog+core@1.29.1/node_modules/@posthog/core/dist/error-tracking/parsers/index.mjs"() {
2014
2140
  init_base();
2015
2141
  init_chrome();
2016
2142
  init_gecko();
@@ -2022,10 +2148,10 @@ var init_parsers = __esm({
2022
2148
  }
2023
2149
  });
2024
2150
 
2025
- // ../../node_modules/.pnpm/@posthog+core@1.28.0/node_modules/@posthog/core/dist/error-tracking/coercers/dom-exception-coercer.mjs
2151
+ // ../../node_modules/.pnpm/@posthog+core@1.29.1/node_modules/@posthog/core/dist/error-tracking/coercers/dom-exception-coercer.mjs
2026
2152
  var DOMExceptionCoercer;
2027
2153
  var init_dom_exception_coercer = __esm({
2028
- "../../node_modules/.pnpm/@posthog+core@1.28.0/node_modules/@posthog/core/dist/error-tracking/coercers/dom-exception-coercer.mjs"() {
2154
+ "../../node_modules/.pnpm/@posthog+core@1.29.1/node_modules/@posthog/core/dist/error-tracking/coercers/dom-exception-coercer.mjs"() {
2029
2155
  init_utils();
2030
2156
  DOMExceptionCoercer = class {
2031
2157
  match(err) {
@@ -2059,10 +2185,10 @@ var init_dom_exception_coercer = __esm({
2059
2185
  }
2060
2186
  });
2061
2187
 
2062
- // ../../node_modules/.pnpm/@posthog+core@1.28.0/node_modules/@posthog/core/dist/error-tracking/coercers/error-coercer.mjs
2188
+ // ../../node_modules/.pnpm/@posthog+core@1.29.1/node_modules/@posthog/core/dist/error-tracking/coercers/error-coercer.mjs
2063
2189
  var ErrorCoercer;
2064
2190
  var init_error_coercer = __esm({
2065
- "../../node_modules/.pnpm/@posthog+core@1.28.0/node_modules/@posthog/core/dist/error-tracking/coercers/error-coercer.mjs"() {
2191
+ "../../node_modules/.pnpm/@posthog+core@1.29.1/node_modules/@posthog/core/dist/error-tracking/coercers/error-coercer.mjs"() {
2066
2192
  init_utils();
2067
2193
  ErrorCoercer = class {
2068
2194
  match(err) {
@@ -2092,10 +2218,10 @@ var init_error_coercer = __esm({
2092
2218
  }
2093
2219
  });
2094
2220
 
2095
- // ../../node_modules/.pnpm/@posthog+core@1.28.0/node_modules/@posthog/core/dist/error-tracking/coercers/error-event-coercer.mjs
2221
+ // ../../node_modules/.pnpm/@posthog+core@1.29.1/node_modules/@posthog/core/dist/error-tracking/coercers/error-event-coercer.mjs
2096
2222
  var ErrorEventCoercer;
2097
2223
  var init_error_event_coercer = __esm({
2098
- "../../node_modules/.pnpm/@posthog+core@1.28.0/node_modules/@posthog/core/dist/error-tracking/coercers/error-event-coercer.mjs"() {
2224
+ "../../node_modules/.pnpm/@posthog+core@1.29.1/node_modules/@posthog/core/dist/error-tracking/coercers/error-event-coercer.mjs"() {
2099
2225
  init_utils();
2100
2226
  ErrorEventCoercer = class {
2101
2227
  constructor() {
@@ -2117,10 +2243,10 @@ var init_error_event_coercer = __esm({
2117
2243
  }
2118
2244
  });
2119
2245
 
2120
- // ../../node_modules/.pnpm/@posthog+core@1.28.0/node_modules/@posthog/core/dist/error-tracking/coercers/string-coercer.mjs
2246
+ // ../../node_modules/.pnpm/@posthog+core@1.29.1/node_modules/@posthog/core/dist/error-tracking/coercers/string-coercer.mjs
2121
2247
  var ERROR_TYPES_PATTERN, StringCoercer;
2122
2248
  var init_string_coercer = __esm({
2123
- "../../node_modules/.pnpm/@posthog+core@1.28.0/node_modules/@posthog/core/dist/error-tracking/coercers/string-coercer.mjs"() {
2249
+ "../../node_modules/.pnpm/@posthog+core@1.29.1/node_modules/@posthog/core/dist/error-tracking/coercers/string-coercer.mjs"() {
2124
2250
  ERROR_TYPES_PATTERN = /^(?:[Uu]ncaught (?:exception: )?)?(?:((?:Eval|Internal|Range|Reference|Syntax|Type|URI|)Error): )?(.*)$/i;
2125
2251
  StringCoercer = class {
2126
2252
  match(input) {
@@ -2152,10 +2278,10 @@ var init_string_coercer = __esm({
2152
2278
  }
2153
2279
  });
2154
2280
 
2155
- // ../../node_modules/.pnpm/@posthog+core@1.28.0/node_modules/@posthog/core/dist/error-tracking/types.mjs
2281
+ // ../../node_modules/.pnpm/@posthog+core@1.29.1/node_modules/@posthog/core/dist/error-tracking/types.mjs
2156
2282
  var severityLevels;
2157
2283
  var init_types2 = __esm({
2158
- "../../node_modules/.pnpm/@posthog+core@1.28.0/node_modules/@posthog/core/dist/error-tracking/types.mjs"() {
2284
+ "../../node_modules/.pnpm/@posthog+core@1.29.1/node_modules/@posthog/core/dist/error-tracking/types.mjs"() {
2159
2285
  severityLevels = [
2160
2286
  "fatal",
2161
2287
  "error",
@@ -2167,7 +2293,7 @@ var init_types2 = __esm({
2167
2293
  }
2168
2294
  });
2169
2295
 
2170
- // ../../node_modules/.pnpm/@posthog+core@1.28.0/node_modules/@posthog/core/dist/error-tracking/coercers/utils.mjs
2296
+ // ../../node_modules/.pnpm/@posthog+core@1.29.1/node_modules/@posthog/core/dist/error-tracking/coercers/utils.mjs
2171
2297
  function extractExceptionKeysForMessage(err, maxLength = 40) {
2172
2298
  const keys = Object.keys(err);
2173
2299
  keys.sort();
@@ -2182,14 +2308,14 @@ function extractExceptionKeysForMessage(err, maxLength = 40) {
2182
2308
  return "";
2183
2309
  }
2184
2310
  var init_utils2 = __esm({
2185
- "../../node_modules/.pnpm/@posthog+core@1.28.0/node_modules/@posthog/core/dist/error-tracking/coercers/utils.mjs"() {
2311
+ "../../node_modules/.pnpm/@posthog+core@1.29.1/node_modules/@posthog/core/dist/error-tracking/coercers/utils.mjs"() {
2186
2312
  }
2187
2313
  });
2188
2314
 
2189
- // ../../node_modules/.pnpm/@posthog+core@1.28.0/node_modules/@posthog/core/dist/error-tracking/coercers/object-coercer.mjs
2315
+ // ../../node_modules/.pnpm/@posthog+core@1.29.1/node_modules/@posthog/core/dist/error-tracking/coercers/object-coercer.mjs
2190
2316
  var ObjectCoercer;
2191
2317
  var init_object_coercer = __esm({
2192
- "../../node_modules/.pnpm/@posthog+core@1.28.0/node_modules/@posthog/core/dist/error-tracking/coercers/object-coercer.mjs"() {
2318
+ "../../node_modules/.pnpm/@posthog+core@1.29.1/node_modules/@posthog/core/dist/error-tracking/coercers/object-coercer.mjs"() {
2193
2319
  init_utils();
2194
2320
  init_types2();
2195
2321
  init_utils2();
@@ -2243,10 +2369,10 @@ var init_object_coercer = __esm({
2243
2369
  }
2244
2370
  });
2245
2371
 
2246
- // ../../node_modules/.pnpm/@posthog+core@1.28.0/node_modules/@posthog/core/dist/error-tracking/coercers/event-coercer.mjs
2372
+ // ../../node_modules/.pnpm/@posthog+core@1.29.1/node_modules/@posthog/core/dist/error-tracking/coercers/event-coercer.mjs
2247
2373
  var EventCoercer;
2248
2374
  var init_event_coercer = __esm({
2249
- "../../node_modules/.pnpm/@posthog+core@1.28.0/node_modules/@posthog/core/dist/error-tracking/coercers/event-coercer.mjs"() {
2375
+ "../../node_modules/.pnpm/@posthog+core@1.29.1/node_modules/@posthog/core/dist/error-tracking/coercers/event-coercer.mjs"() {
2250
2376
  init_utils();
2251
2377
  init_utils2();
2252
2378
  EventCoercer = class {
@@ -2266,10 +2392,10 @@ var init_event_coercer = __esm({
2266
2392
  }
2267
2393
  });
2268
2394
 
2269
- // ../../node_modules/.pnpm/@posthog+core@1.28.0/node_modules/@posthog/core/dist/error-tracking/coercers/primitive-coercer.mjs
2395
+ // ../../node_modules/.pnpm/@posthog+core@1.29.1/node_modules/@posthog/core/dist/error-tracking/coercers/primitive-coercer.mjs
2270
2396
  var PrimitiveCoercer;
2271
2397
  var init_primitive_coercer = __esm({
2272
- "../../node_modules/.pnpm/@posthog+core@1.28.0/node_modules/@posthog/core/dist/error-tracking/coercers/primitive-coercer.mjs"() {
2398
+ "../../node_modules/.pnpm/@posthog+core@1.29.1/node_modules/@posthog/core/dist/error-tracking/coercers/primitive-coercer.mjs"() {
2273
2399
  init_utils();
2274
2400
  PrimitiveCoercer = class {
2275
2401
  match(candidate) {
@@ -2287,10 +2413,10 @@ var init_primitive_coercer = __esm({
2287
2413
  }
2288
2414
  });
2289
2415
 
2290
- // ../../node_modules/.pnpm/@posthog+core@1.28.0/node_modules/@posthog/core/dist/error-tracking/coercers/promise-rejection-event.mjs
2416
+ // ../../node_modules/.pnpm/@posthog+core@1.29.1/node_modules/@posthog/core/dist/error-tracking/coercers/promise-rejection-event.mjs
2291
2417
  var PromiseRejectionEventCoercer;
2292
2418
  var init_promise_rejection_event = __esm({
2293
- "../../node_modules/.pnpm/@posthog+core@1.28.0/node_modules/@posthog/core/dist/error-tracking/coercers/promise-rejection-event.mjs"() {
2419
+ "../../node_modules/.pnpm/@posthog+core@1.29.1/node_modules/@posthog/core/dist/error-tracking/coercers/promise-rejection-event.mjs"() {
2294
2420
  init_utils();
2295
2421
  PromiseRejectionEventCoercer = class {
2296
2422
  match(err) {
@@ -2327,9 +2453,9 @@ var init_promise_rejection_event = __esm({
2327
2453
  }
2328
2454
  });
2329
2455
 
2330
- // ../../node_modules/.pnpm/@posthog+core@1.28.0/node_modules/@posthog/core/dist/error-tracking/coercers/index.mjs
2456
+ // ../../node_modules/.pnpm/@posthog+core@1.29.1/node_modules/@posthog/core/dist/error-tracking/coercers/index.mjs
2331
2457
  var init_coercers = __esm({
2332
- "../../node_modules/.pnpm/@posthog+core@1.28.0/node_modules/@posthog/core/dist/error-tracking/coercers/index.mjs"() {
2458
+ "../../node_modules/.pnpm/@posthog+core@1.29.1/node_modules/@posthog/core/dist/error-tracking/coercers/index.mjs"() {
2333
2459
  init_dom_exception_coercer();
2334
2460
  init_error_coercer();
2335
2461
  init_error_event_coercer();
@@ -2341,10 +2467,10 @@ var init_coercers = __esm({
2341
2467
  }
2342
2468
  });
2343
2469
 
2344
- // ../../node_modules/.pnpm/@posthog+core@1.28.0/node_modules/@posthog/core/dist/error-tracking/utils.mjs
2470
+ // ../../node_modules/.pnpm/@posthog+core@1.29.1/node_modules/@posthog/core/dist/error-tracking/utils.mjs
2345
2471
  var ReduceableCache;
2346
2472
  var init_utils3 = __esm({
2347
- "../../node_modules/.pnpm/@posthog+core@1.28.0/node_modules/@posthog/core/dist/error-tracking/utils.mjs"() {
2473
+ "../../node_modules/.pnpm/@posthog+core@1.29.1/node_modules/@posthog/core/dist/error-tracking/utils.mjs"() {
2348
2474
  ReduceableCache = class {
2349
2475
  constructor(_maxSize) {
2350
2476
  this._maxSize = _maxSize;
@@ -2370,7 +2496,7 @@ var init_utils3 = __esm({
2370
2496
  }
2371
2497
  });
2372
2498
 
2373
- // ../../node_modules/.pnpm/@posthog+core@1.28.0/node_modules/@posthog/core/dist/error-tracking/exception-steps.mjs
2499
+ // ../../node_modules/.pnpm/@posthog+core@1.29.1/node_modules/@posthog/core/dist/error-tracking/exception-steps.mjs
2374
2500
  function resolveExceptionStepsConfig(config) {
2375
2501
  if (!config) return {
2376
2502
  ...DEFAULT_EXCEPTION_STEPS_CONFIG
@@ -2458,7 +2584,7 @@ function getUtf8ByteLength(value) {
2458
2584
  }
2459
2585
  var EXCEPTION_STEP_INTERNAL_FIELDS, RESERVED_EXCEPTION_STEP_KEYS, DEFAULT_EXCEPTION_STEPS_CONFIG, ExceptionStepsBuffer;
2460
2586
  var init_exception_steps = __esm({
2461
- "../../node_modules/.pnpm/@posthog+core@1.28.0/node_modules/@posthog/core/dist/error-tracking/exception-steps.mjs"() {
2587
+ "../../node_modules/.pnpm/@posthog+core@1.29.1/node_modules/@posthog/core/dist/error-tracking/exception-steps.mjs"() {
2462
2588
  init_utils();
2463
2589
  EXCEPTION_STEP_INTERNAL_FIELDS = {
2464
2590
  MESSAGE: "$message",
@@ -2514,7 +2640,7 @@ var init_exception_steps = __esm({
2514
2640
  }
2515
2641
  });
2516
2642
 
2517
- // ../../node_modules/.pnpm/@posthog+core@1.28.0/node_modules/@posthog/core/dist/error-tracking/index.mjs
2643
+ // ../../node_modules/.pnpm/@posthog+core@1.29.1/node_modules/@posthog/core/dist/error-tracking/index.mjs
2518
2644
  var error_tracking_exports = {};
2519
2645
  __export(error_tracking_exports, {
2520
2646
  DEFAULT_EXCEPTION_STEPS_CONFIG: () => DEFAULT_EXCEPTION_STEPS_CONFIG,
@@ -2544,7 +2670,7 @@ __export(error_tracking_exports, {
2544
2670
  winjsStackLineParser: () => winjsStackLineParser
2545
2671
  });
2546
2672
  var init_error_tracking = __esm({
2547
- "../../node_modules/.pnpm/@posthog+core@1.28.0/node_modules/@posthog/core/dist/error-tracking/index.mjs"() {
2673
+ "../../node_modules/.pnpm/@posthog+core@1.29.1/node_modules/@posthog/core/dist/error-tracking/index.mjs"() {
2548
2674
  init_error_properties_builder();
2549
2675
  init_parsers();
2550
2676
  init_coercers();
@@ -2553,9 +2679,9 @@ var init_error_tracking = __esm({
2553
2679
  }
2554
2680
  });
2555
2681
 
2556
- // ../../node_modules/.pnpm/@posthog+core@1.28.0/node_modules/@posthog/core/dist/index.mjs
2682
+ // ../../node_modules/.pnpm/@posthog+core@1.29.1/node_modules/@posthog/core/dist/index.mjs
2557
2683
  var init_dist = __esm({
2558
- "../../node_modules/.pnpm/@posthog+core@1.28.0/node_modules/@posthog/core/dist/index.mjs"() {
2684
+ "../../node_modules/.pnpm/@posthog+core@1.29.1/node_modules/@posthog/core/dist/index.mjs"() {
2559
2685
  init_featureFlagUtils();
2560
2686
  init_gzip();
2561
2687
  init_logs_utils();
@@ -2563,6 +2689,7 @@ var init_dist = __esm({
2563
2689
  init_uuidv7();
2564
2690
  init_validation();
2565
2691
  init_utils();
2692
+ init_cookie();
2566
2693
  init_posthog_core();
2567
2694
  init_posthog_core_stateless();
2568
2695
  init_tracing_headers();
@@ -2751,7 +2878,7 @@ function snipLine(line, colno) {
2751
2878
  }
2752
2879
  var LRU_FILE_CONTENTS_CACHE, LRU_FILE_CONTENTS_FS_READ_FAILED, DEFAULT_LINES_OF_CONTEXT, MAX_CONTEXTLINES_COLNO, MAX_CONTEXTLINES_LINENO;
2753
2880
  var init_context_lines_node = __esm({
2754
- "../../node_modules/.pnpm/posthog-node@5.33.0_rxjs@7.8.2/node_modules/posthog-node/dist/extensions/error-tracking/modifiers/context-lines.node.mjs"() {
2881
+ "../../node_modules/.pnpm/posthog-node@5.34.1_rxjs@7.8.2/node_modules/posthog-node/dist/extensions/error-tracking/modifiers/context-lines.node.mjs"() {
2755
2882
  init_dist();
2756
2883
  LRU_FILE_CONTENTS_CACHE = new error_tracking_exports.ReduceableCache(25);
2757
2884
  LRU_FILE_CONTENTS_FS_READ_FAILED = new error_tracking_exports.ReduceableCache(20);
@@ -2772,11 +2899,11 @@ function createRelativePathModifier(basePath = process.cwd()) {
2772
2899
  };
2773
2900
  }
2774
2901
  var init_relative_path_node = __esm({
2775
- "../../node_modules/.pnpm/posthog-node@5.33.0_rxjs@7.8.2/node_modules/posthog-node/dist/extensions/error-tracking/modifiers/relative-path.node.mjs"() {
2902
+ "../../node_modules/.pnpm/posthog-node@5.34.1_rxjs@7.8.2/node_modules/posthog-node/dist/extensions/error-tracking/modifiers/relative-path.node.mjs"() {
2776
2903
  }
2777
2904
  });
2778
2905
 
2779
- // ../../node_modules/.pnpm/posthog-node@5.33.0_rxjs@7.8.2/node_modules/posthog-node/dist/extensions/error-tracking/autocapture.mjs
2906
+ // ../../node_modules/.pnpm/posthog-node@5.34.1_rxjs@7.8.2/node_modules/posthog-node/dist/extensions/error-tracking/autocapture.mjs
2780
2907
  function makeUncaughtExceptionHandler(captureFn, onFatalFn) {
2781
2908
  let calledFatalError = false;
2782
2909
  return Object.assign((error) => {
@@ -2808,14 +2935,14 @@ function addUnhandledRejectionListener(captureFn) {
2808
2935
  }));
2809
2936
  }
2810
2937
  var init_autocapture = __esm({
2811
- "../../node_modules/.pnpm/posthog-node@5.33.0_rxjs@7.8.2/node_modules/posthog-node/dist/extensions/error-tracking/autocapture.mjs"() {
2938
+ "../../node_modules/.pnpm/posthog-node@5.34.1_rxjs@7.8.2/node_modules/posthog-node/dist/extensions/error-tracking/autocapture.mjs"() {
2812
2939
  }
2813
2940
  });
2814
2941
 
2815
- // ../../node_modules/.pnpm/posthog-node@5.33.0_rxjs@7.8.2/node_modules/posthog-node/dist/extensions/error-tracking/index.mjs
2942
+ // ../../node_modules/.pnpm/posthog-node@5.34.1_rxjs@7.8.2/node_modules/posthog-node/dist/extensions/error-tracking/index.mjs
2816
2943
  var SHUTDOWN_TIMEOUT, ErrorTracking;
2817
2944
  var init_error_tracking2 = __esm({
2818
- "../../node_modules/.pnpm/posthog-node@5.33.0_rxjs@7.8.2/node_modules/posthog-node/dist/extensions/error-tracking/index.mjs"() {
2945
+ "../../node_modules/.pnpm/posthog-node@5.34.1_rxjs@7.8.2/node_modules/posthog-node/dist/extensions/error-tracking/index.mjs"() {
2819
2946
  init_autocapture();
2820
2947
  init_dist();
2821
2948
  SHUTDOWN_TIMEOUT = 2e3;
@@ -2886,18 +3013,18 @@ var init_error_tracking2 = __esm({
2886
3013
  }
2887
3014
  });
2888
3015
 
2889
- // ../../node_modules/.pnpm/posthog-node@5.33.0_rxjs@7.8.2/node_modules/posthog-node/dist/version.mjs
3016
+ // ../../node_modules/.pnpm/posthog-node@5.34.1_rxjs@7.8.2/node_modules/posthog-node/dist/version.mjs
2890
3017
  var version;
2891
3018
  var init_version = __esm({
2892
- "../../node_modules/.pnpm/posthog-node@5.33.0_rxjs@7.8.2/node_modules/posthog-node/dist/version.mjs"() {
2893
- version = "5.33.0";
3019
+ "../../node_modules/.pnpm/posthog-node@5.34.1_rxjs@7.8.2/node_modules/posthog-node/dist/version.mjs"() {
3020
+ version = "5.34.1";
2894
3021
  }
2895
3022
  });
2896
3023
 
2897
- // ../../node_modules/.pnpm/posthog-node@5.33.0_rxjs@7.8.2/node_modules/posthog-node/dist/types.mjs
3024
+ // ../../node_modules/.pnpm/posthog-node@5.34.1_rxjs@7.8.2/node_modules/posthog-node/dist/types.mjs
2898
3025
  var FeatureFlagError2;
2899
3026
  var init_types3 = __esm({
2900
- "../../node_modules/.pnpm/posthog-node@5.33.0_rxjs@7.8.2/node_modules/posthog-node/dist/types.mjs"() {
3027
+ "../../node_modules/.pnpm/posthog-node@5.34.1_rxjs@7.8.2/node_modules/posthog-node/dist/types.mjs"() {
2901
3028
  FeatureFlagError2 = {
2902
3029
  ERRORS_WHILE_COMPUTING: "errors_while_computing_flags",
2903
3030
  FLAG_MISSING: "flag_missing",
@@ -2907,10 +3034,10 @@ var init_types3 = __esm({
2907
3034
  }
2908
3035
  });
2909
3036
 
2910
- // ../../node_modules/.pnpm/posthog-node@5.33.0_rxjs@7.8.2/node_modules/posthog-node/dist/feature-flag-evaluations.mjs
3037
+ // ../../node_modules/.pnpm/posthog-node@5.34.1_rxjs@7.8.2/node_modules/posthog-node/dist/feature-flag-evaluations.mjs
2911
3038
  var FeatureFlagEvaluations;
2912
3039
  var init_feature_flag_evaluations = __esm({
2913
- "../../node_modules/.pnpm/posthog-node@5.33.0_rxjs@7.8.2/node_modules/posthog-node/dist/feature-flag-evaluations.mjs"() {
3040
+ "../../node_modules/.pnpm/posthog-node@5.34.1_rxjs@7.8.2/node_modules/posthog-node/dist/feature-flag-evaluations.mjs"() {
2914
3041
  init_types3();
2915
3042
  FeatureFlagEvaluations = class _FeatureFlagEvaluations {
2916
3043
  constructor(init2) {
@@ -3030,7 +3157,7 @@ var init_feature_flag_evaluations = __esm({
3030
3157
  }
3031
3158
  });
3032
3159
 
3033
- // ../../node_modules/.pnpm/posthog-node@5.33.0_rxjs@7.8.2/node_modules/posthog-node/dist/extensions/feature-flags/crypto.mjs
3160
+ // ../../node_modules/.pnpm/posthog-node@5.34.1_rxjs@7.8.2/node_modules/posthog-node/dist/extensions/feature-flags/crypto.mjs
3034
3161
  async function hashSHA1(text) {
3035
3162
  const subtle = globalThis.crypto?.subtle;
3036
3163
  if (!subtle) throw new Error("SubtleCrypto API not available");
@@ -3039,11 +3166,11 @@ async function hashSHA1(text) {
3039
3166
  return hashArray.map((byte) => byte.toString(16).padStart(2, "0")).join("");
3040
3167
  }
3041
3168
  var init_crypto = __esm({
3042
- "../../node_modules/.pnpm/posthog-node@5.33.0_rxjs@7.8.2/node_modules/posthog-node/dist/extensions/feature-flags/crypto.mjs"() {
3169
+ "../../node_modules/.pnpm/posthog-node@5.34.1_rxjs@7.8.2/node_modules/posthog-node/dist/extensions/feature-flags/crypto.mjs"() {
3043
3170
  }
3044
3171
  });
3045
3172
 
3046
- // ../../node_modules/.pnpm/posthog-node@5.33.0_rxjs@7.8.2/node_modules/posthog-node/dist/extensions/feature-flags/feature-flags.mjs
3173
+ // ../../node_modules/.pnpm/posthog-node@5.34.1_rxjs@7.8.2/node_modules/posthog-node/dist/extensions/feature-flags/feature-flags.mjs
3047
3174
  async function _hash(key, bucketingValue, salt = "") {
3048
3175
  const hashString = await hashSHA1(`${key}.${bucketingValue}${salt}`);
3049
3176
  return parseInt(hashString.slice(0, 15), 16) / LONG_SCALE;
@@ -3359,7 +3486,7 @@ function relativeDateParseForFeatureFlagMatching(value) {
3359
3486
  }
3360
3487
  var SIXTY_SECONDS, LONG_SCALE, NULL_VALUES_ALLOWED_OPERATORS, ClientError, InconclusiveMatchError, RequiresServerEvaluation, FeatureFlagsPoller;
3361
3488
  var init_feature_flags = __esm({
3362
- "../../node_modules/.pnpm/posthog-node@5.33.0_rxjs@7.8.2/node_modules/posthog-node/dist/extensions/feature-flags/feature-flags.mjs"() {
3489
+ "../../node_modules/.pnpm/posthog-node@5.34.1_rxjs@7.8.2/node_modules/posthog-node/dist/extensions/feature-flags/feature-flags.mjs"() {
3363
3490
  init_dist();
3364
3491
  init_crypto();
3365
3492
  SIXTY_SECONDS = 6e4;
@@ -3831,10 +3958,10 @@ var init_feature_flags = __esm({
3831
3958
  }
3832
3959
  });
3833
3960
 
3834
- // ../../node_modules/.pnpm/posthog-node@5.33.0_rxjs@7.8.2/node_modules/posthog-node/dist/storage-memory.mjs
3961
+ // ../../node_modules/.pnpm/posthog-node@5.34.1_rxjs@7.8.2/node_modules/posthog-node/dist/storage-memory.mjs
3835
3962
  var PostHogMemoryStorage;
3836
3963
  var init_storage_memory = __esm({
3837
- "../../node_modules/.pnpm/posthog-node@5.33.0_rxjs@7.8.2/node_modules/posthog-node/dist/storage-memory.mjs"() {
3964
+ "../../node_modules/.pnpm/posthog-node@5.34.1_rxjs@7.8.2/node_modules/posthog-node/dist/storage-memory.mjs"() {
3838
3965
  PostHogMemoryStorage = class {
3839
3966
  getProperty(key) {
3840
3967
  return this._memoryStorage[key];
@@ -3849,7 +3976,7 @@ var init_storage_memory = __esm({
3849
3976
  }
3850
3977
  });
3851
3978
 
3852
- // ../../node_modules/.pnpm/posthog-node@5.33.0_rxjs@7.8.2/node_modules/posthog-node/dist/client.mjs
3979
+ // ../../node_modules/.pnpm/posthog-node@5.34.1_rxjs@7.8.2/node_modules/posthog-node/dist/client.mjs
3853
3980
  function emitDeprecationWarningOnce(id, message2) {
3854
3981
  if (_emittedDeprecations.has(id)) return;
3855
3982
  _emittedDeprecations.add(id);
@@ -3876,7 +4003,7 @@ function buildFlagEventProperties(flagValues) {
3876
4003
  }
3877
4004
  var MINIMUM_POLLING_INTERVAL, THIRTY_SECONDS, MAX_CACHE_SIZE, WAITUNTIL_DEBOUNCE_MS, WAITUNTIL_MAX_WAIT_MS, DEFAULT_NODE_HOST, _emittedDeprecations, PostHogBackendClient;
3878
4005
  var init_client = __esm({
3879
- "../../node_modules/.pnpm/posthog-node@5.33.0_rxjs@7.8.2/node_modules/posthog-node/dist/client.mjs"() {
4006
+ "../../node_modules/.pnpm/posthog-node@5.34.1_rxjs@7.8.2/node_modules/posthog-node/dist/client.mjs"() {
3880
4007
  init_version();
3881
4008
  init_dist();
3882
4009
  init_types3();
@@ -4746,7 +4873,7 @@ var init_client = __esm({
4746
4873
  });
4747
4874
  var PostHogContext;
4748
4875
  var init_context = __esm({
4749
- "../../node_modules/.pnpm/posthog-node@5.33.0_rxjs@7.8.2/node_modules/posthog-node/dist/extensions/context/context.mjs"() {
4876
+ "../../node_modules/.pnpm/posthog-node@5.34.1_rxjs@7.8.2/node_modules/posthog-node/dist/extensions/context/context.mjs"() {
4750
4877
  PostHogContext = class {
4751
4878
  constructor() {
4752
4879
  this.storage = new async_hooks.AsyncLocalStorage();
@@ -4776,7 +4903,7 @@ var init_context = __esm({
4776
4903
  }
4777
4904
  });
4778
4905
 
4779
- // ../../node_modules/.pnpm/posthog-node@5.33.0_rxjs@7.8.2/node_modules/posthog-node/dist/extensions/sentry-integration.mjs
4906
+ // ../../node_modules/.pnpm/posthog-node@5.34.1_rxjs@7.8.2/node_modules/posthog-node/dist/extensions/sentry-integration.mjs
4780
4907
  function createEventProcessor(_posthog, { organization, projectId, prefix, severityAllowList = [
4781
4908
  "error"
4782
4909
  ], sendExceptionsToPostHog = true } = {}) {
@@ -4832,7 +4959,7 @@ function sentryIntegration(_posthog, options) {
4832
4959
  }
4833
4960
  var NAME, PostHogSentryIntegration;
4834
4961
  var init_sentry_integration = __esm({
4835
- "../../node_modules/.pnpm/posthog-node@5.33.0_rxjs@7.8.2/node_modules/posthog-node/dist/extensions/sentry-integration.mjs"() {
4962
+ "../../node_modules/.pnpm/posthog-node@5.34.1_rxjs@7.8.2/node_modules/posthog-node/dist/extensions/sentry-integration.mjs"() {
4836
4963
  NAME = "posthog-node";
4837
4964
  PostHogSentryIntegration = class {
4838
4965
  static #_ = this.POSTHOG_ID_TAG = "posthog_distinct_id";
@@ -4854,7 +4981,7 @@ var init_sentry_integration = __esm({
4854
4981
  }
4855
4982
  });
4856
4983
 
4857
- // ../../node_modules/.pnpm/posthog-node@5.33.0_rxjs@7.8.2/node_modules/posthog-node/dist/extensions/tracing-headers.mjs
4984
+ // ../../node_modules/.pnpm/posthog-node@5.34.1_rxjs@7.8.2/node_modules/posthog-node/dist/extensions/tracing-headers.mjs
4858
4985
  function addProperty(properties, key, value) {
4859
4986
  if (null != value && "" !== value) properties[key] = value;
4860
4987
  }
@@ -4889,7 +5016,7 @@ function getPostHogTracingHeaderValues(headers) {
4889
5016
  }
4890
5017
  var TRACING_HEADER_MAX_LENGTH, TRACING_HEADER_CONTROL_CHARS_REGEX, POSTHOG_TRACING_HEADERS;
4891
5018
  var init_tracing_headers2 = __esm({
4892
- "../../node_modules/.pnpm/posthog-node@5.33.0_rxjs@7.8.2/node_modules/posthog-node/dist/extensions/tracing-headers.mjs"() {
5019
+ "../../node_modules/.pnpm/posthog-node@5.34.1_rxjs@7.8.2/node_modules/posthog-node/dist/extensions/tracing-headers.mjs"() {
4893
5020
  TRACING_HEADER_MAX_LENGTH = 1e3;
4894
5021
  TRACING_HEADER_CONTROL_CHARS_REGEX = /[\x00-\x1f\x7f-\x9f]/g;
4895
5022
  POSTHOG_TRACING_HEADERS = {
@@ -4899,7 +5026,7 @@ var init_tracing_headers2 = __esm({
4899
5026
  }
4900
5027
  });
4901
5028
 
4902
- // ../../node_modules/.pnpm/posthog-node@5.33.0_rxjs@7.8.2/node_modules/posthog-node/dist/extensions/express.mjs
5029
+ // ../../node_modules/.pnpm/posthog-node@5.34.1_rxjs@7.8.2/node_modules/posthog-node/dist/extensions/express.mjs
4903
5030
  function getClientIp(req) {
4904
5031
  const forwarded = getFirstHeaderValue(req.headers["x-forwarded-for"]);
4905
5032
  if (forwarded) {
@@ -4963,15 +5090,15 @@ function posthogErrorHandler(posthog) {
4963
5090
  };
4964
5091
  }
4965
5092
  var init_express = __esm({
4966
- "../../node_modules/.pnpm/posthog-node@5.33.0_rxjs@7.8.2/node_modules/posthog-node/dist/extensions/express.mjs"() {
5093
+ "../../node_modules/.pnpm/posthog-node@5.34.1_rxjs@7.8.2/node_modules/posthog-node/dist/extensions/express.mjs"() {
4967
5094
  init_error_tracking2();
4968
5095
  init_tracing_headers2();
4969
5096
  }
4970
5097
  });
4971
5098
 
4972
- // ../../node_modules/.pnpm/posthog-node@5.33.0_rxjs@7.8.2/node_modules/posthog-node/dist/exports.mjs
5099
+ // ../../node_modules/.pnpm/posthog-node@5.34.1_rxjs@7.8.2/node_modules/posthog-node/dist/exports.mjs
4973
5100
  var init_exports = __esm({
4974
- "../../node_modules/.pnpm/posthog-node@5.33.0_rxjs@7.8.2/node_modules/posthog-node/dist/exports.mjs"() {
5101
+ "../../node_modules/.pnpm/posthog-node@5.34.1_rxjs@7.8.2/node_modules/posthog-node/dist/exports.mjs"() {
4975
5102
  init_feature_flag_evaluations();
4976
5103
  init_dist();
4977
5104
  init_sentry_integration();
@@ -4980,21 +5107,28 @@ var init_exports = __esm({
4980
5107
  }
4981
5108
  });
4982
5109
 
4983
- // ../../node_modules/.pnpm/posthog-node@5.33.0_rxjs@7.8.2/node_modules/posthog-node/dist/entrypoints/index.node.mjs
5110
+ // ../../node_modules/.pnpm/posthog-node@5.34.1_rxjs@7.8.2/node_modules/posthog-node/dist/entrypoints/index.node.mjs
4984
5111
  var index_node_exports = {};
4985
5112
  __export(index_node_exports, {
4986
5113
  FeatureFlagError: () => FeatureFlagError,
4987
5114
  FeatureFlagEvaluations: () => FeatureFlagEvaluations,
4988
5115
  PostHog: () => PostHog,
4989
5116
  PostHogSentryIntegration: () => PostHogSentryIntegration,
5117
+ cookieStateToProperties: () => cookieStateToProperties,
5118
+ cookieStoreFromHeader: () => cookieStoreFromHeader,
4990
5119
  createEventProcessor: () => createEventProcessor,
5120
+ getPostHogCookieName: () => getPostHogCookieName,
5121
+ parsePostHogCookie: () => parsePostHogCookie,
5122
+ readPostHogCookie: () => readPostHogCookie,
4991
5123
  sentryIntegration: () => sentryIntegration,
5124
+ serializePostHogCookie: () => serializePostHogCookie,
4992
5125
  setupExpressErrorHandler: () => setupExpressErrorHandler,
4993
- setupExpressRequestContext: () => setupExpressRequestContext
5126
+ setupExpressRequestContext: () => setupExpressRequestContext,
5127
+ uuidv7: () => uuidv7
4994
5128
  });
4995
5129
  var PostHog;
4996
5130
  var init_index_node = __esm({
4997
- "../../node_modules/.pnpm/posthog-node@5.33.0_rxjs@7.8.2/node_modules/posthog-node/dist/entrypoints/index.node.mjs"() {
5131
+ "../../node_modules/.pnpm/posthog-node@5.34.1_rxjs@7.8.2/node_modules/posthog-node/dist/entrypoints/index.node.mjs"() {
4998
5132
  init_module_node();
4999
5133
  init_context_lines_node();
5000
5134
  init_relative_path_node();
@@ -6287,9 +6421,9 @@ var require_dist2 = __commonJS({
6287
6421
  }
6288
6422
  });
6289
6423
 
6290
- // ../../node_modules/.pnpm/mixpanel@0.21.0/node_modules/mixpanel/package.json
6424
+ // ../../node_modules/.pnpm/mixpanel@0.22.0/node_modules/mixpanel/package.json
6291
6425
  var require_package = __commonJS({
6292
- "../../node_modules/.pnpm/mixpanel@0.21.0/node_modules/mixpanel/package.json"(exports$1, module) {
6426
+ "../../node_modules/.pnpm/mixpanel@0.22.0/node_modules/mixpanel/package.json"(exports$1, module) {
6293
6427
  module.exports = {
6294
6428
  name: "mixpanel",
6295
6429
  description: "A simple server-side API for mixpanel",
@@ -6299,49 +6433,48 @@ var require_package = __commonJS({
6299
6433
  "api",
6300
6434
  "stats"
6301
6435
  ],
6302
- version: "0.21.0",
6436
+ version: "0.22.0",
6303
6437
  homepage: "https://github.com/mixpanel/mixpanel-node",
6304
6438
  author: "Carl Sverre",
6305
6439
  license: "MIT",
6306
6440
  main: "lib/mixpanel-node",
6441
+ types: "./lib/mixpanel-node.d.ts",
6442
+ files: [
6443
+ "lib",
6444
+ "readme.md",
6445
+ "LICENSE",
6446
+ "history.md"
6447
+ ],
6307
6448
  directories: {
6308
6449
  lib: "lib"
6309
6450
  },
6310
6451
  repository: {
6311
6452
  type: "git",
6312
- url: "git+ssh://git@github.com/mixpanel/mixpanel-node.git"
6453
+ url: "git+ssh://git@github.com/mixpanel/mixpanel-node.git",
6454
+ directory: "packages/mixpanel"
6313
6455
  },
6314
6456
  engines: {
6315
6457
  node: ">=10.0"
6316
6458
  },
6317
6459
  scripts: {
6318
- test: "vitest",
6319
- format: "prettier --write .",
6320
- "check-format": "prettier --check .",
6321
- lint: "oxlint ."
6322
- },
6323
- types: "./lib/mixpanel-node.d.ts",
6324
- devDependencies: {
6325
- "@types/node": "^24.10.1",
6326
- "@vitest/coverage-v8": "^4.0.8",
6327
- nock: "^14.0.10",
6328
- oxlint: "^1.16.0",
6329
- prettier: "^3.6.2",
6330
- proxyquire: "^2.1.3",
6331
- typescript: "^5.9.3",
6332
- vitest: "^4.0.8"
6460
+ test: "vitest run --coverage",
6461
+ build: "tsc --build"
6333
6462
  },
6334
6463
  dependencies: {
6335
6464
  "https-proxy-agent": "7.0.6",
6336
6465
  "json-logic-js": "2.0.5"
6466
+ },
6467
+ devDependencies: {
6468
+ nock: "^14.0.10",
6469
+ proxyquire: "^2.1.3"
6337
6470
  }
6338
6471
  };
6339
6472
  }
6340
6473
  });
6341
6474
 
6342
- // ../../node_modules/.pnpm/mixpanel@0.21.0/node_modules/mixpanel/lib/utils.js
6475
+ // ../../node_modules/.pnpm/mixpanel@0.22.0/node_modules/mixpanel/lib/utils.js
6343
6476
  var require_utils = __commonJS({
6344
- "../../node_modules/.pnpm/mixpanel@0.21.0/node_modules/mixpanel/lib/utils.js"(exports$1) {
6477
+ "../../node_modules/.pnpm/mixpanel@0.22.0/node_modules/mixpanel/lib/utils.js"(exports$1) {
6345
6478
  exports$1.async_all = function(requests, handler, callback) {
6346
6479
  let total = requests.length, errors = null, results = [], done = function(err, result) {
6347
6480
  if (err) {
@@ -6382,9 +6515,9 @@ var require_utils = __commonJS({
6382
6515
  }
6383
6516
  });
6384
6517
 
6385
- // ../../node_modules/.pnpm/mixpanel@0.21.0/node_modules/mixpanel/lib/profile_helpers.js
6518
+ // ../../node_modules/.pnpm/mixpanel@0.22.0/node_modules/mixpanel/lib/profile_helpers.js
6386
6519
  var require_profile_helpers = __commonJS({
6387
- "../../node_modules/.pnpm/mixpanel@0.21.0/node_modules/mixpanel/lib/profile_helpers.js"(exports$1) {
6520
+ "../../node_modules/.pnpm/mixpanel@0.22.0/node_modules/mixpanel/lib/profile_helpers.js"(exports$1) {
6388
6521
  var { ensure_timestamp } = require_utils();
6389
6522
  function merge_modifiers(data, modifiers) {
6390
6523
  if (modifiers) {
@@ -6612,9 +6745,9 @@ var require_profile_helpers = __commonJS({
6612
6745
  }
6613
6746
  });
6614
6747
 
6615
- // ../../node_modules/.pnpm/mixpanel@0.21.0/node_modules/mixpanel/lib/groups.js
6748
+ // ../../node_modules/.pnpm/mixpanel@0.22.0/node_modules/mixpanel/lib/groups.js
6616
6749
  var require_groups = __commonJS({
6617
- "../../node_modules/.pnpm/mixpanel@0.21.0/node_modules/mixpanel/lib/groups.js"(exports$1) {
6750
+ "../../node_modules/.pnpm/mixpanel@0.22.0/node_modules/mixpanel/lib/groups.js"(exports$1) {
6618
6751
  var { ProfileHelpers } = require_profile_helpers();
6619
6752
  var MixpanelGroups = class extends ProfileHelpers() {
6620
6753
  constructor(mp_instance) {
@@ -6714,9 +6847,9 @@ var require_groups = __commonJS({
6714
6847
  }
6715
6848
  });
6716
6849
 
6717
- // ../../node_modules/.pnpm/mixpanel@0.21.0/node_modules/mixpanel/lib/people.js
6850
+ // ../../node_modules/.pnpm/mixpanel@0.22.0/node_modules/mixpanel/lib/people.js
6718
6851
  var require_people = __commonJS({
6719
- "../../node_modules/.pnpm/mixpanel@0.21.0/node_modules/mixpanel/lib/people.js"(exports$1) {
6852
+ "../../node_modules/.pnpm/mixpanel@0.22.0/node_modules/mixpanel/lib/people.js"(exports$1) {
6720
6853
  var { merge_modifiers, ProfileHelpers } = require_profile_helpers();
6721
6854
  var MixpanelPeople = class extends ProfileHelpers() {
6722
6855
  constructor(mp_instance) {
@@ -7041,9 +7174,9 @@ var require_people = __commonJS({
7041
7174
  }
7042
7175
  });
7043
7176
 
7044
- // ../../node_modules/.pnpm/mixpanel@0.21.0/node_modules/mixpanel/lib/flags/utils.js
7177
+ // ../../node_modules/.pnpm/mixpanel@0.22.0/node_modules/mixpanel/lib/flags/utils.js
7045
7178
  var require_utils2 = __commonJS({
7046
- "../../node_modules/.pnpm/mixpanel@0.21.0/node_modules/mixpanel/lib/flags/utils.js"(exports$1, module) {
7179
+ "../../node_modules/.pnpm/mixpanel@0.22.0/node_modules/mixpanel/lib/flags/utils.js"(exports$1, module) {
7047
7180
  var crypto3 = __require("crypto");
7048
7181
  var EXPOSURE_EVENT = "$experiment_started";
7049
7182
  var REQUEST_HEADERS = {
@@ -7116,9 +7249,9 @@ var require_utils2 = __commonJS({
7116
7249
  }
7117
7250
  });
7118
7251
 
7119
- // ../../node_modules/.pnpm/mixpanel@0.21.0/node_modules/mixpanel/lib/flags/flags.js
7252
+ // ../../node_modules/.pnpm/mixpanel@0.22.0/node_modules/mixpanel/lib/flags/flags.js
7120
7253
  var require_flags = __commonJS({
7121
- "../../node_modules/.pnpm/mixpanel@0.21.0/node_modules/mixpanel/lib/flags/flags.js"(exports$1, module) {
7254
+ "../../node_modules/.pnpm/mixpanel@0.22.0/node_modules/mixpanel/lib/flags/flags.js"(exports$1, module) {
7122
7255
  var https2 = __require("https");
7123
7256
  var packageInfo = require_package();
7124
7257
  var {
@@ -7638,9 +7771,9 @@ var require_logic = __commonJS({
7638
7771
  }
7639
7772
  });
7640
7773
 
7641
- // ../../node_modules/.pnpm/mixpanel@0.21.0/node_modules/mixpanel/lib/flags/local_flags.js
7774
+ // ../../node_modules/.pnpm/mixpanel@0.22.0/node_modules/mixpanel/lib/flags/local_flags.js
7642
7775
  var require_local_flags = __commonJS({
7643
- "../../node_modules/.pnpm/mixpanel@0.21.0/node_modules/mixpanel/lib/flags/local_flags.js"(exports$1, module) {
7776
+ "../../node_modules/.pnpm/mixpanel@0.22.0/node_modules/mixpanel/lib/flags/local_flags.js"(exports$1, module) {
7644
7777
  var FeatureFlagsProvider = require_flags();
7645
7778
  var {
7646
7779
  normalizedHash,
@@ -7971,9 +8104,9 @@ var require_local_flags = __commonJS({
7971
8104
  }
7972
8105
  });
7973
8106
 
7974
- // ../../node_modules/.pnpm/mixpanel@0.21.0/node_modules/mixpanel/lib/flags/remote_flags.js
8107
+ // ../../node_modules/.pnpm/mixpanel@0.22.0/node_modules/mixpanel/lib/flags/remote_flags.js
7975
8108
  var require_remote_flags = __commonJS({
7976
- "../../node_modules/.pnpm/mixpanel@0.21.0/node_modules/mixpanel/lib/flags/remote_flags.js"(exports$1, module) {
8109
+ "../../node_modules/.pnpm/mixpanel@0.22.0/node_modules/mixpanel/lib/flags/remote_flags.js"(exports$1, module) {
7977
8110
  var FeatureFlagsProvider = require_flags();
7978
8111
  var RemoteFeatureFlagsProvider = class extends FeatureFlagsProvider {
7979
8112
  /**
@@ -8106,9 +8239,9 @@ var require_remote_flags = __commonJS({
8106
8239
  }
8107
8240
  });
8108
8241
 
8109
- // ../../node_modules/.pnpm/mixpanel@0.21.0/node_modules/mixpanel/lib/flags/index.js
8242
+ // ../../node_modules/.pnpm/mixpanel@0.22.0/node_modules/mixpanel/lib/flags/index.js
8110
8243
  var require_flags2 = __commonJS({
8111
- "../../node_modules/.pnpm/mixpanel@0.21.0/node_modules/mixpanel/lib/flags/index.js"(exports$1, module) {
8244
+ "../../node_modules/.pnpm/mixpanel@0.22.0/node_modules/mixpanel/lib/flags/index.js"(exports$1, module) {
8112
8245
  var LocalFeatureFlagsProvider = require_local_flags();
8113
8246
  var RemoteFeatureFlagsProvider = require_remote_flags();
8114
8247
  module.exports = {
@@ -8118,9 +8251,9 @@ var require_flags2 = __commonJS({
8118
8251
  }
8119
8252
  });
8120
8253
 
8121
- // ../../node_modules/.pnpm/mixpanel@0.21.0/node_modules/mixpanel/lib/mixpanel-node.js
8254
+ // ../../node_modules/.pnpm/mixpanel@0.22.0/node_modules/mixpanel/lib/mixpanel-node.js
8122
8255
  var require_mixpanel_node = __commonJS({
8123
- "../../node_modules/.pnpm/mixpanel@0.21.0/node_modules/mixpanel/lib/mixpanel-node.js"(exports$1, module) {
8256
+ "../../node_modules/.pnpm/mixpanel@0.22.0/node_modules/mixpanel/lib/mixpanel-node.js"(exports$1, module) {
8124
8257
  var querystring = __require("querystring");
8125
8258
  var Buffer5 = __require("buffer").Buffer;
8126
8259
  var http2 = __require("http");