@kong-ui-public/analytics-utilities 2.0.0 → 2.0.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.
@@ -3020,24 +3020,24 @@ function xn(r, e) {
3020
3020
  }
3021
3021
  }
3022
3022
  function Mn(r, e) {
3023
- var t = r.format(e).replace(/\u200E/g, ""), a = /(\d+)\/(\d+)\/(\d+),? (\d+):(\d+):(\d+)/.exec(t);
3023
+ var t = r.format(e), a = /(\d+)\/(\d+)\/(\d+),? (\d+):(\d+):(\d+)/.exec(t);
3024
3024
  return [a[3], a[1], a[2], a[4], a[5], a[6]];
3025
3025
  }
3026
3026
  var ke = {};
3027
3027
  function Cn(r) {
3028
3028
  if (!ke[r]) {
3029
3029
  var e = new Intl.DateTimeFormat("en-US", {
3030
- hour12: !1,
3030
+ hourCycle: "h23",
3031
3031
  timeZone: "America/New_York",
3032
3032
  year: "numeric",
3033
- month: "numeric",
3033
+ month: "2-digit",
3034
3034
  day: "2-digit",
3035
3035
  hour: "2-digit",
3036
3036
  minute: "2-digit",
3037
3037
  second: "2-digit"
3038
3038
  }).format(/* @__PURE__ */ new Date("2014-06-25T04:00:00.123Z")), t = e === "06/25/2014, 00:00:00" || e === "‎06‎/‎25‎/‎2014‎ ‎00‎:‎00‎:‎00";
3039
3039
  ke[r] = t ? new Intl.DateTimeFormat("en-US", {
3040
- hour12: !1,
3040
+ hourCycle: "h23",
3041
3041
  timeZone: r,
3042
3042
  year: "numeric",
3043
3043
  month: "numeric",
@@ -3046,7 +3046,7 @@ function Cn(r) {
3046
3046
  minute: "2-digit",
3047
3047
  second: "2-digit"
3048
3048
  }) : new Intl.DateTimeFormat("en-US", {
3049
- hourCycle: "h23",
3049
+ hour12: !1,
3050
3050
  timeZone: r,
3051
3051
  year: "numeric",
3052
3052
  month: "numeric",
@@ -3066,7 +3066,7 @@ var Ut = 36e5, Sn = 6e4, Ye = {
3066
3066
  timezone: /([Z+-].*)$/,
3067
3067
  timezoneZ: /^(Z)$/,
3068
3068
  timezoneHH: /^([+-]\d{2})$/,
3069
- timezoneHHMM: /^([+-]\d{2}):?(\d{2})$/
3069
+ timezoneHHMM: /^([+-])(\d{2}):?(\d{2})$/
3070
3070
  };
3071
3071
  function le(r, e, t) {
3072
3072
  var a, n;
@@ -3076,9 +3076,9 @@ function le(r, e, t) {
3076
3076
  if (a = Ye.timezoneHH.exec(r), a)
3077
3077
  return i = parseInt(a[1], 10), Nt(i) ? -(i * Ut) : NaN;
3078
3078
  if (a = Ye.timezoneHHMM.exec(r), a) {
3079
- i = parseInt(a[1], 10);
3080
- var o = parseInt(a[2], 10);
3081
- return Nt(i, o) ? (n = Math.abs(i) * Ut + o * Sn, i > 0 ? -n : n) : NaN;
3079
+ i = parseInt(a[2], 10);
3080
+ var o = parseInt(a[3], 10);
3081
+ return Nt(i, o) ? (n = Math.abs(i) * Ut + o * Sn, a[1] === "+" ? -n : n) : NaN;
3082
3082
  }
3083
3083
  if (kn(r)) {
3084
3084
  e = new Date(e || Date.now());
@@ -3134,7 +3134,7 @@ function kn(r) {
3134
3134
  var Yn = 60 * 1e3, Un = {
3135
3135
  // Timezone (ISO-8601. If offset is 0, output is always `'Z'`)
3136
3136
  X: function(r, e, t, a) {
3137
- var n = Ue(a.timeZone, a._originalDate || r);
3137
+ var n = Ue(a.timeZone, r);
3138
3138
  if (n === 0)
3139
3139
  return "Z";
3140
3140
  switch (e) {
@@ -3151,7 +3151,7 @@ var Yn = 60 * 1e3, Un = {
3151
3151
  },
3152
3152
  // Timezone (ISO-8601. If offset is 0, output is `'+00:00'` or equivalent)
3153
3153
  x: function(r, e, t, a) {
3154
- var n = Ue(a.timeZone, a._originalDate || r);
3154
+ var n = Ue(a.timeZone, r);
3155
3155
  switch (e) {
3156
3156
  case "x":
3157
3157
  return Rt(n);
@@ -3166,7 +3166,7 @@ var Yn = 60 * 1e3, Un = {
3166
3166
  },
3167
3167
  // Timezone (GMT)
3168
3168
  O: function(r, e, t, a) {
3169
- var n = Ue(a.timeZone, a._originalDate || r);
3169
+ var n = Ue(a.timeZone, r);
3170
3170
  switch (e) {
3171
3171
  case "O":
3172
3172
  case "OO":
@@ -3179,15 +3179,14 @@ var Yn = 60 * 1e3, Un = {
3179
3179
  },
3180
3180
  // Timezone (specific non-location)
3181
3181
  z: function(r, e, t, a) {
3182
- var n = a._originalDate || r;
3183
3182
  switch (e) {
3184
3183
  case "z":
3185
3184
  case "zz":
3186
3185
  case "zzz":
3187
- return Yt("short", n, a);
3186
+ return Yt("short", r, a);
3188
3187
  case "zzzz":
3189
3188
  default:
3190
- return Yt("long", n, a);
3189
+ return Yt("long", r, a);
3191
3190
  }
3192
3191
  }
3193
3192
  };
@@ -3395,7 +3394,7 @@ var Gn = /([xXOz]+)|''|'(''|[^'])+('|$)/g;
3395
3394
  function zn(r, e, t) {
3396
3395
  var a = String(e), n = t || {}, i = a.match(Gn);
3397
3396
  if (i) {
3398
- var o = ge(r, n);
3397
+ var o = ge(n.originalDate || r, n);
3399
3398
  a = i.reduce(function(l, u) {
3400
3399
  if (u[0] === "'")
3401
3400
  return l;
@@ -3442,7 +3441,7 @@ function ar(r, e, t) {
3442
3441
  }
3443
3442
  function Vn(r, e, t, a) {
3444
3443
  var n = rr(a);
3445
- return n.timeZone = e, zn(ar(r, e), t, n);
3444
+ return n.timeZone = e, n.originalDate = r, zn(ar(r, e), t, n);
3446
3445
  }
3447
3446
  function nr(r, e) {
3448
3447
  return -le(r, e);