hm-tracking-sdk 0.1.9 → 0.2.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.
@@ -4374,19 +4374,19 @@ function getTelegramUserUnsafe() {
4374
4374
  return !r.user || !r.user.id ? null : {
4375
4375
  user: {
4376
4376
  id: r.user.id,
4377
- first_name: r.user.first_name || "",
4378
- last_name: r.user.last_name || "",
4377
+ firstName: r.user.first_name || "",
4378
+ lastName: r.user.last_name || "",
4379
4379
  username: r.user.username,
4380
- photo_url: r.user.photo_url,
4381
- language_code: r.user.language_code,
4382
- allows_write_to_pm: r.user.allows_write_to_pm || !1,
4383
- is_premium: r.user.is_premium || !1
4380
+ photoUrl: r.user.photo_url || "",
4381
+ languageCode: r.user.language_code,
4382
+ isPremium: r.user.is_premium || !1,
4383
+ allowsWriteToPm: r.user.allows_write_to_pm || !1
4384
4384
  },
4385
- auth_date: r.auth_date,
4385
+ authDate: Math.floor(Date.now() / 1e3),
4386
4386
  hash: r.hash || "",
4387
- start_param: r.start_param,
4388
- chat_type: r.chat_type,
4389
- chat_instance: r.chat_instance
4387
+ startParam: r.start_param,
4388
+ chatType: r.chat_type,
4389
+ chatInstance: r.chat_instance
4390
4390
  };
4391
4391
  } catch {
4392
4392
  return null;
@@ -4426,35 +4426,36 @@ function getAnonymousBrowserUser(r = "tg_tracking_uid") {
4426
4426
  return {
4427
4427
  user: {
4428
4428
  id: d,
4429
- first_name: "Guest",
4430
- last_name: "",
4429
+ firstName: "Guest",
4430
+ lastName: "",
4431
4431
  username: `guest_${f.slice(-6)}`,
4432
- language_code: m.toLowerCase(),
4433
- allows_write_to_pm: !1
4432
+ languageCode: m.toLowerCase(),
4433
+ isPremium: !1,
4434
+ allowsWriteToPm: !1
4434
4435
  },
4435
- auth_date: Math.floor(Date.now() / 1e3),
4436
+ authDate: Math.floor(Date.now() / 1e3),
4436
4437
  hash: "anonymous_cookie_user",
4437
- start_param: "browser_guest",
4438
- chat_type: "sender",
4439
- chat_instance: ""
4438
+ startParam: "browser_guest",
4439
+ chatType: "sender",
4440
+ chatInstance: ""
4440
4441
  };
4441
4442
  }
4442
4443
  function getDefaultMockUser() {
4443
4444
  return {
4444
4445
  user: {
4445
4446
  id: 2077220643,
4446
- first_name: "Mock",
4447
- last_name: "User",
4447
+ firstName: "Mock",
4448
+ lastName: "User",
4448
4449
  username: "mock_user_demo",
4449
- language_code: "zh-hans",
4450
- allows_write_to_pm: !0,
4451
- is_premium: !0
4450
+ languageCode: "zh-hans",
4451
+ isPremium: !0,
4452
+ allowsWriteToPm: !0
4452
4453
  },
4453
- auth_date: Math.floor(Date.now() / 1e3),
4454
+ authDate: Math.floor(Date.now() / 1e3),
4454
4455
  hash: "mock_hash_for_demo_purpose",
4455
- start_param: "demo_start_param",
4456
- chat_type: "sender",
4457
- chat_instance: "-245769840322609948"
4456
+ startParam: "demo_start_param",
4457
+ chatType: "sender",
4458
+ chatInstance: "-245769840322609948"
4458
4459
  };
4459
4460
  }
4460
4461
  var naclUtil$1 = { exports: {} }, naclUtil = naclUtil$1.exports, hasRequiredNaclUtil;