@talkjs/core 1.5.3 → 1.5.5

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.
@@ -404,9 +404,9 @@ class A {
404
404
  }
405
405
  call(e2, t2, s2) {
406
406
  return __async(this, null, function* () {
407
- this.inactivityTimer.stop(), this.pendingCalls++;
407
+ this.inactivityTimer.stop(), this.pendingCalls++, this.logTrace("Called", t2, s2);
408
408
  const n2 = yield this.connection.call(e2, t2, s2);
409
- return this.pendingCalls--, "SUBSCRIBE" === e2 && n2.ok ? this.activeSubscriptions++ : "UNSUBSCRIBE" === e2 && n2.ok && this.activeSubscriptions--, this.inactive && this.inactivityTimer.schedule(() => {
409
+ return this.pendingCalls--, this.logTrace("Received", t2, s2), "SUBSCRIBE" === e2 && n2.ok ? (this.activeSubscriptions++, this.logTrace("Subscribed", t2, s2)) : "UNSUBSCRIBE" === e2 && n2.ok && (this.activeSubscriptions--, this.logTrace("Unsubscribed", t2, s2)), this.inactive && this.inactivityTimer.schedule(() => {
410
410
  this.stateMachine.transition("stop");
411
411
  }), n2;
412
412
  });
@@ -417,6 +417,8 @@ class A {
417
417
  isConnected() {
418
418
  return "READY" === this.stateMachine.state;
419
419
  }
420
+ logTrace(e2, t2, s2) {
421
+ }
420
422
  }
421
423
  class E {
422
424
  constructor(e2, t2, s2) {
@@ -529,12 +531,12 @@ class I extends x {
529
531
  this.connection.call("SUBSCRIBE", ["users"], { ids: e2 }).then((e3) => this.subscribeCalls.forEach((t2) => t2.deferred.resolve(e3)));
530
532
  }
531
533
  }
532
- class S extends x {
534
+ class T extends x {
533
535
  constructor(e2, t2, s2) {
534
536
  super(s2, () => this.sendMutate()), this.conversationId = e2, this.connection = t2, this.calls = [];
535
537
  }
536
538
  canPush(e2, t2) {
537
- return !!S.isCorrectBatchTypeFor(e2, t2) && t2[1] === this.conversationId;
539
+ return !!T.isCorrectBatchTypeFor(e2, t2) && t2[1] === this.conversationId;
538
540
  }
539
541
  static isCorrectBatchTypeFor(e2, t2) {
540
542
  return s(t2, ["conversations", "*", "participants", "*"]) && ("PUT" === e2 || "POST" === e2 || "PATCH" === e2);
@@ -555,7 +557,7 @@ class S extends x {
555
557
  });
556
558
  }
557
559
  }
558
- class T {
560
+ class D {
559
561
  constructor(e2, t2, s2) {
560
562
  this.pendingBatch = null, this.connection = new E(e2, t2, s2);
561
563
  }
@@ -577,17 +579,17 @@ class T {
577
579
  }
578
580
  createEmptyBatchFor(e2, t2) {
579
581
  if (I.isCorrectBatchTypeFor(e2, t2)) return new I(this.connection, () => this.pendingBatch = null);
580
- if (S.isCorrectBatchTypeFor(e2, t2)) {
582
+ if (T.isCorrectBatchTypeFor(e2, t2)) {
581
583
  const e3 = t2[1];
582
- return new S(e3, this.connection, () => this.pendingBatch = null);
584
+ return new T(e3, this.connection, () => this.pendingBatch = null);
583
585
  }
584
586
  return null;
585
587
  }
586
588
  }
587
- const D = { 200: "RESOLVE", 400: "RESOLVE", 401: "RETRY", 402: "RESOLVE", 403: "RESOLVE", 404: "RESOLVE", 405: "RESOLVE", 409: "RESOLVE", 429: "DELAY", 500: "DELAY" };
589
+ const S = { 200: "RESOLVE", 400: "RESOLVE", 401: "RETRY", 402: "RESOLVE", 403: "RESOLVE", 404: "RESOLVE", 405: "RESOLVE", 409: "RESOLVE", 429: "DELAY", 500: "DELAY" };
588
590
  class M {
589
591
  constructor(e2, t2, s2) {
590
- this.throttler = new F(), this.alive = true, this.connection = new T(e2, t2, s2);
592
+ this.throttler = new F(), this.alive = true, this.connection = new D(e2, t2, s2);
591
593
  }
592
594
  call(e2, t2, s2) {
593
595
  return __async(this, null, function* () {
@@ -596,7 +598,7 @@ class M {
596
598
  const r2 = yield this.connection.call(e2, t2, s2);
597
599
  if ((r2.ok || "client" !== r2.where || "SOCKET_NOT_READY" !== r2.value) && (r2.ok || "server" !== r2.where || 500 !== r2.value.status) || n2++, 10 === n2) return r2;
598
600
  if (r2.ok || "client" !== r2.where) {
599
- const e3 = r2.value, t3 = e3.status, s3 = D[t3];
601
+ const e3 = r2.value, t3 = e3.status, s3 = S[t3];
600
602
  if ("RESOLVE" === s3) return this.throttler.resetDelay(), r2;
601
603
  if ("RETRY" === s3) continue;
602
604
  if ("DELAY" === s3) {
@@ -692,38 +694,76 @@ class N {
692
694
  return this.connection.isConnected();
693
695
  }
694
696
  }
695
- function _(e2, t2) {
697
+ function _(e2) {
698
+ return Object.freeze(e2);
699
+ }
700
+ function P(e2) {
701
+ return _(e2.map((e3) => function(e4) {
702
+ switch (e4.type) {
703
+ case "text":
704
+ return Object.freeze({ type: "text", children: O(e4.children) });
705
+ case "file":
706
+ case "location":
707
+ return Object.freeze(e4);
708
+ }
709
+ }(e3)));
710
+ }
711
+ function O(e2) {
712
+ return _(e2.map((e3) => function(e4) {
713
+ if ("string" == typeof e4) return e4;
714
+ switch (e4.type) {
715
+ case "bold":
716
+ case "italic":
717
+ case "strikethrough":
718
+ case "bulletList":
719
+ case "bulletPoint":
720
+ case "link":
721
+ case "actionLink":
722
+ case "actionButton":
723
+ return Object.freeze(__spreadProps(__spreadValues({}, e4), { children: O(e4.children) }));
724
+ case "mention":
725
+ case "autoLink":
726
+ case "codeSpan":
727
+ case "customEmoji":
728
+ return Object.freeze(e4);
729
+ }
730
+ }(e3)));
731
+ }
732
+ function j(e2, t2) {
696
733
  return void 0 === t2 ? e2 : t2;
697
734
  }
698
- function P(e2, t2) {
735
+ function U(e2, t2) {
736
+ return void 0 === t2 ? e2 : _(t2);
737
+ }
738
+ function $(e2, t2) {
699
739
  if (void 0 === t2) return e2;
700
- if (null === t2) return {};
740
+ if (null === t2) return _({});
701
741
  const s2 = __spreadValues({}, e2);
702
742
  for (const e3 in t2) {
703
743
  const n2 = t2[e3];
704
744
  null === n2 ? delete s2[e3] : s2[e3] = n2;
705
745
  }
706
- return s2;
746
+ return _(s2);
707
747
  }
708
- function O(e2, t2) {
748
+ function W(e2, t2) {
709
749
  if (e2 === t2) return true;
710
750
  if (!e2 || !t2) return false;
711
751
  if ("object" != typeof e2 || "object" != typeof t2) return false;
712
752
  if (e2.constructor !== t2.constructor) return false;
713
753
  if (Array.isArray(e2) && Array.isArray(t2)) {
714
754
  if (e2.length !== t2.length) return false;
715
- for (let s2 = 0; s2 < e2.length; s2++) if (!O(e2[s2], t2[s2])) return false;
755
+ for (let s2 = 0; s2 < e2.length; s2++) if (!W(e2[s2], t2[s2])) return false;
716
756
  } else {
717
757
  const s2 = Object.keys(e2);
718
758
  if (s2.length !== Object.keys(t2).length) return false;
719
759
  for (const n2 of s2) {
720
760
  if (!Object.hasOwnProperty.call(t2, n2)) return false;
721
- if (!O(e2[n2], t2[n2])) return false;
761
+ if (!W(e2[n2], t2[n2])) return false;
722
762
  }
723
763
  }
724
764
  return true;
725
765
  }
726
- class U {
766
+ class q {
727
767
  constructor() {
728
768
  this.prev = Promise.resolve();
729
769
  }
@@ -734,7 +774,7 @@ class U {
734
774
  });
735
775
  }
736
776
  }
737
- class j {
777
+ class H {
738
778
  constructor(e2) {
739
779
  this.initialised = false, this.getPointer = void 0, this.pendingStates = [e2], e2.resultPromise.then(() => this.initialised = true);
740
780
  }
@@ -767,9 +807,9 @@ class j {
767
807
  return this.getPointer;
768
808
  }
769
809
  }
770
- class $ extends j {
810
+ class L extends H {
771
811
  constructor(e2, t2) {
772
- super(e2), this.onTeardown = t2, this._error = null, this._lastGoodState = Promise.resolve(void 0);
812
+ super(e2), this.onTeardown = t2, this._error = null, this._lastGoodState = Promise.resolve(void 0), this.registerNewState(e2.resultPromise);
773
813
  }
774
814
  get error() {
775
815
  return this._error;
@@ -796,10 +836,10 @@ class $ extends j {
796
836
  }));
797
837
  }
798
838
  }
799
- class W extends $ {
839
+ class G extends L {
800
840
  constructor(e2, t2) {
801
841
  const s2 = new Promise((e3) => setTimeout(e3)).then(() => this.fetchInitial(e2));
802
- super({ seq: e2, resultPromise: s2 }, t2.onTeardown), this.initialSeq = e2, this.getDeepMutex = new U(), this.lastDeep = void 0;
842
+ super({ seq: e2, resultPromise: s2 }, t2.onTeardown), this.initialSeq = e2, this.getDeepMutex = new q(), this.lastDeep = void 0;
803
843
  }
804
844
  refetchInitial(e2) {
805
845
  return __async(this, null, function* () {
@@ -842,9 +882,9 @@ class W extends $ {
842
882
  });
843
883
  }
844
884
  }
845
- class q extends W {
885
+ class z extends G {
846
886
  constructor(e2, t2, s2) {
847
- super(e2, s2), this.emitMutex = t2, this.unsubscribeTimer = new H(), this.referencedByOtherStores = 0, this.listeners = [], this.lastEmitSeq = void 0, this.lastEmitResult = void 0, t2.runExclusive(() => __async(this, null, function* () {
887
+ super(e2, s2), this.emitMutex = t2, this.unsubscribeTimer = new J(), this.referencedByOtherStores = 0, this.listeners = [], this.lastEmitSeq = void 0, this.lastEmitResult = void 0, t2.runExclusive(() => __async(this, null, function* () {
848
888
  yield this.emit(e2);
849
889
  }));
850
890
  }
@@ -879,7 +919,7 @@ class q extends W {
879
919
  });
880
920
  }
881
921
  }
882
- class H {
922
+ class J {
883
923
  constructor() {
884
924
  this.timerId = void 0;
885
925
  }
@@ -890,76 +930,34 @@ class H {
890
930
  clearTimeout(this.timerId);
891
931
  }
892
932
  }
893
- class G extends q {
894
- constructor(e2, t2, s2, n2, r2) {
895
- super(e2, n2, r2), this.userId = t2, this.realtimeClient = s2, this.unsubscribeDebounceMs = 1e4;
896
- }
897
- fetchInitial(e2) {
898
- return __async(this, null, function* () {
899
- const t2 = yield this.realtimeClient.call("GET", ["users", this.userId], { includePrivateFields: false }, { bypassCache: true });
900
- return t2.ok ? c({ snapshot: this.realtimeClient.createUserSnapshot(t2.value.data), lastChanged: e2 }) : "server" === t2.where && 404 === t2.value.status ? c({ snapshot: null, lastChanged: e2 }) : t2;
901
- });
902
- }
903
- equal(e2, t2) {
904
- return O(e2.snapshot, t2.snapshot);
905
- }
906
- loadNested(e2, t2) {
907
- return __async(this, null, function* () {
908
- return c(t2);
909
- });
910
- }
911
- userCreated(e2, t2) {
912
- this.mutate(e2, (s2) => null !== s2.value.snapshot ? s2 : c({ snapshot: this.realtimeClient.createUserSnapshot(t2.state), lastChanged: e2 }));
913
- }
914
- userEdited(e2, t2) {
915
- this.mutate(e2, (s2) => {
916
- const n2 = s2.value.snapshot;
917
- if (null === n2) return console.warn("[TalkJS] Received a 'used edited' event for a user that we thought didn't exist."), s2;
918
- return c({ snapshot: { id: n2.id, name: _(n2.name, t2.diff.name), custom: P(n2.custom, t2.diff.custom), locale: _(n2.locale, t2.diff.locale), photoUrl: _(n2.photoUrl, t2.diff.photoUrl), role: _(n2.role, t2.diff.role), welcomeMessage: _(n2.welcomeMessage, t2.diff.welcomeMessage) }, lastChanged: e2 });
919
- });
920
- }
921
- getFromCache() {
922
- return __async(this, null, function* () {
923
- const e2 = yield this.mostRecentState.resultPromise;
924
- return e2.ok ? null === e2.value.snapshot ? h({ status: 404, errorCode: "USER_NOT_FOUND", reasons: ["That user does not exist yet"] }) : c({ status: 200, data: { id: e2.value.snapshot.id, name: e2.value.snapshot.name, custom: e2.value.snapshot.custom, locale: e2.value.snapshot.locale, photoUrl: e2.value.snapshot.photoUrl, role: e2.value.snapshot.role, welcomeMessage: e2.value.snapshot.welcomeMessage } }) : l("NOT_IN_CACHE");
925
- });
926
- }
927
- teardownNested(e2) {
928
- }
929
- anyChildChanged(e2, t2, s2) {
930
- return __async(this, null, function* () {
931
- return false;
932
- });
933
- }
934
- }
935
- var L, z = {};
936
- function J(e2, t2) {
933
+ var Y, Q = {};
934
+ function V(e2, t2) {
937
935
  const s2 = t2.lastIndex;
938
936
  let n2;
939
937
  const r2 = [];
940
938
  for (; null !== (n2 = t2.exec(e2)); ) r2.push(n2);
941
939
  return t2.lastIndex = s2, r2;
942
940
  }
943
- function Y(e2) {
941
+ function Z(e2) {
944
942
  const t2 = e2.replace(/%2F/g, "/").replace(/^.*?\/([^/]+?)(?:\?.*)?$/, "$1");
945
943
  return decodeURIComponent(t2);
946
944
  }
947
- function Q(e2, t2) {
945
+ function K(e2, t2) {
948
946
  if (!e2() && !t2) {
949
947
  t2 = e2.toString().replace(/^function\s*\(\)\s*\{\s*return\s*(.*);\s*\}\s*$/, "`$1`") + " was not true";
950
948
  }
951
949
  }
952
950
  !function() {
953
- if (L) return z;
951
+ if (Y) return Q;
954
952
  function e2(e3) {
955
953
  return String.fromCharCode(parseInt(e3.slice(1), 16));
956
954
  }
957
955
  function t2(e3) {
958
956
  return `%${`00${e3.charCodeAt(0).toString(16)}`.slice(-2)}`;
959
957
  }
960
- L = 1, Object.defineProperty(z, "__esModule", { value: true }), z.encode = function(t3) {
958
+ Y = 1, Object.defineProperty(Q, "__esModule", { value: true }), Q.encode = function(t3) {
961
959
  return btoa(encodeURIComponent(t3).replace(/%[0-9A-F]{2}/g, e2));
962
- }, z.decode = function(e3) {
960
+ }, Q.decode = function(e3) {
963
961
  return decodeURIComponent(Array.from(atob(e3), t2).join(""));
964
962
  };
965
963
  }(), ((e2) => {
@@ -993,51 +991,51 @@ function Q(e2, t2) {
993
991
  }, e2.falsy = function(e3) {
994
992
  }, e2.never = function(e3) {
995
993
  };
996
- })(Q || (Q = {}));
997
- const V = Q, Z = /^\/.*[^\\]\/[im]*$/;
998
- function K(e2) {
999
- if (!Z.test(e2)) return false;
1000
- return !X(e2).test("");
994
+ })(K || (K = {}));
995
+ const X = K, ee = /^\/.*[^\\]\/[im]*$/;
996
+ function te(e2) {
997
+ if (!ee.test(e2)) return false;
998
+ return !se(e2).test("");
1001
999
  }
1002
- function X(e2) {
1000
+ function se(e2) {
1003
1001
  const t2 = e2.match(/^\/(.*[^\\])\/(.*)$/);
1004
1002
  if (!t2) throw new Error(`Expected ${e2} to be a (non-empty) regex`);
1005
1003
  let s2 = t2[2] || "";
1006
1004
  return s2 = s2.replace(/[^im]/g, "") + "g", new RegExp(t2[1], s2);
1007
1005
  }
1008
- class ee {
1006
+ class ne {
1009
1007
  constructor({ mode: e2, allowedHostnames: t2, allowedPhoneNrs: s2, allowedMatches: n2, forbiddenMatches: r2, suppressLinks: i2, suppressEmailAddresses: a2, suppressPhoneNumbers: o2, replacement: u2 }) {
1010
- V.oneOf(e2, ["all", "otherOnly", "off"]), this.mode = e2, this.suppressLinks = false !== i2, this.suppressEmailAddresses = false !== a2, this.suppressPhoneNumbers = false !== o2, this.allowedHostnames = t2 || [], this.allowedPhoneNrs = (s2 || []).filter((e3) => e3).map((e3) => e3.replace(/[^0-9]/g, "")), this.allowedMatches = (n2 || []).filter(K).map((e3) => X(e3)), this.forbiddenMatches = (r2 || []).filter(K).map((e3) => X(e3)), V(() => this.allowedMatches.every((e3) => e3.flags.includes("g")), "All regexes in `suppressContactInfo.allowedMatches` must be global. Check `allowedMatches`!"), V(() => this.forbiddenMatches.every((e3) => e3.flags.includes("g")), "All regexes in `suppressContactInfo.forbiddenMatches` must be global. Check `forbiddenMatches`!"), u2 = u2 == null ? void 0 : u2.trim(), this.replacement = u2 && u2.length > 0 ? u2 : void 0;
1008
+ X.oneOf(e2, ["all", "otherOnly", "off"]), this.mode = e2, this.suppressLinks = false !== i2, this.suppressEmailAddresses = false !== a2, this.suppressPhoneNumbers = false !== o2, this.allowedHostnames = t2 || [], this.allowedPhoneNrs = (s2 || []).filter((e3) => e3).map((e3) => e3.replace(/[^0-9]/g, "")), this.allowedMatches = (n2 || []).filter(te).map((e3) => se(e3)), this.forbiddenMatches = (r2 || []).filter(te).map((e3) => se(e3)), X(() => this.allowedMatches.every((e3) => e3.flags.includes("g")), "All regexes in `suppressContactInfo.allowedMatches` must be global. Check `allowedMatches`!"), X(() => this.forbiddenMatches.every((e3) => e3.flags.includes("g")), "All regexes in `suppressContactInfo.forbiddenMatches` must be global. Check `forbiddenMatches`!"), u2 = u2 == null ? void 0 : u2.trim(), this.replacement = u2 && u2.length > 0 ? u2 : void 0;
1011
1009
  }
1012
1010
  shouldSuppress({ isContentBySender: e2 }) {
1013
1011
  return "all" === this.mode || "otherOnly" === this.mode && !e2;
1014
1012
  }
1015
1013
  }
1016
- function te(e2, t2) {
1014
+ function re(e2, t2) {
1017
1015
  const s2 = e2.map((e3) => function(e4, t3) {
1018
1016
  if ("text" === e4.type) return function(e5, t4) {
1019
1017
  const s3 = function(e6) {
1020
- var _a2, _b, _c, _d, _e2, _f, _g, _h, _i, _j, _k, _l;
1018
+ var _a2, _b, _c, _d, _e2, _f, _g, _h, _i, _j, _k, _l, _m;
1021
1019
  let t5 = "";
1022
- return e6.t && (t5 = `(${e6.t("CONTACT_INFORMATION_HIDDEN")})`), { formattedLinks: (_a2 = e6.formattedLinks) != null ? _a2 : "plaintext", markup: (_b = e6.markup) != null ? _b : false, useFallbackMentions: (_c = e6.useFallbackMentions) != null ? _c : false, sameTabLinkRules: (_d = e6.sameTabLinkRules) != null ? _d : [], enableEmojiImageFallback: (_e2 = e6.enableEmojiImageFallback) != null ? _e2 : false, highlight: (_f = e6.highlight) != null ? _f : [], contactInfo: (_g = e6.contactInfo) != null ? _g : false, suppression: (_h = e6.suppression) != null ? _h : new ee({ mode: "off" }), contactInfoHiddenText: (_k = (_j = e6.contactInfoHiddenText) != null ? _j : (_i = e6.suppression) == null ? void 0 : _i.replacement) != null ? _k : t5, customEmojiUrls: (_l = e6.customEmojiUrls) != null ? _l : {} };
1020
+ return e6.t && (t5 = `(${e6.t("CONTACT_INFORMATION_HIDDEN")})`), { formattedLinks: (_a2 = e6.formattedLinks) != null ? _a2 : "plaintext", markup: (_b = e6.markup) != null ? _b : false, useFallbackMentions: (_c = e6.useFallbackMentions) != null ? _c : false, sameTabLinkRules: (_d = e6.sameTabLinkRules) != null ? _d : [], enableEmojiImageFallback: (_e2 = e6.enableEmojiImageFallback) != null ? _e2 : false, highlight: (_f = e6.highlight) != null ? _f : [], contactInfo: (_g = e6.contactInfo) != null ? _g : false, suppression: (_h = e6.suppression) != null ? _h : new ne({ mode: "off" }), contactInfoHiddenText: (_k = (_j = e6.contactInfoHiddenText) != null ? _j : (_i = e6.suppression) == null ? void 0 : _i.replacement) != null ? _k : t5, customEmojiUrls: (_l = e6.customEmojiUrls) != null ? _l : {}, enableActions: (_m = e6.enableActions) != null ? _m : true };
1023
1021
  }(t4);
1024
- return se(e5, s3);
1022
+ return ie(e5, s3);
1025
1023
  }(e4.children, t3);
1026
- if ("file" === e4.type && "video" === e4.subtype) return `🎥 ${Y(e4.url)}`;
1027
- if ("file" === e4.type && "image" === e4.subtype) return `📷 ${Y(e4.url)}`;
1028
- if ("file" === e4.type && "audio" === e4.subtype) return `🎧 ${Y(e4.url)}`;
1024
+ if ("file" === e4.type && "video" === e4.subtype) return `🎥 ${Z(e4.url)}`;
1025
+ if ("file" === e4.type && "image" === e4.subtype) return `📷 ${Z(e4.url)}`;
1026
+ if ("file" === e4.type && "audio" === e4.subtype) return `🎧 ${Z(e4.url)}`;
1029
1027
  if ("file" === e4.type && "voice" === e4.subtype) {
1030
1028
  const t4 = e4.duration;
1031
1029
  if (void 0 === t4) return "🎙️";
1032
1030
  return `🎙️ (${Math.floor(t4 / 60)}:${Math.floor(t4 % 60).toString().padStart(2, "0")})`;
1033
1031
  }
1034
- if ("file" === e4.type) return e4.subtype, `📎 ${Y(e4.url)}`;
1032
+ if ("file" === e4.type) return e4.subtype, `📎 ${Z(e4.url)}`;
1035
1033
  if ("location" === e4.type) return "📍";
1036
1034
  return "";
1037
1035
  }(e3, t2));
1038
1036
  return s2.join("\n\n");
1039
1037
  }
1040
- function se(e2, t2) {
1038
+ function ie(e2, t2) {
1041
1039
  return e2.flatMap((e3) => {
1042
1040
  if ("string" == typeof e3) return e3;
1043
1041
  switch (e3.type) {
@@ -1050,13 +1048,13 @@ function se(e2, t2) {
1050
1048
  case "actionLink":
1051
1049
  case "actionbutton":
1052
1050
  case "actionButton":
1053
- return se(e3.children, t2);
1051
+ return ie(e3.children, t2);
1054
1052
  case "bulletlist":
1055
1053
  case "bulletList":
1056
- return "\n" + se(e3.children, t2);
1054
+ return "\n" + ie(e3.children, t2);
1057
1055
  case "bulletpoint":
1058
1056
  case "bulletPoint":
1059
- return "- " + se(e3.children, t2) + "\n";
1057
+ return "- " + ie(e3.children, t2) + "\n";
1060
1058
  case "autolink":
1061
1059
  case "autoLink":
1062
1060
  case "codeblock":
@@ -1074,7 +1072,59 @@ function se(e2, t2) {
1074
1072
  }
1075
1073
  }).join("");
1076
1074
  }
1077
- class ne extends W {
1075
+ function ae(e2) {
1076
+ return _({ id: e2.id, name: e2.name, custom: _(e2.custom), locale: e2.locale, photoUrl: e2.photoUrl, role: e2.role, welcomeMessage: e2.welcomeMessage });
1077
+ }
1078
+ function oe(e2, t2) {
1079
+ return _({ user: t2, access: e2.access, notify: e2.notify, joinedAt: e2.joinedAt });
1080
+ }
1081
+ function ue(e2) {
1082
+ const t2 = Object.entries(e2).map(([e3, t3]) => _({ emoji: e3, count: t3.count, currentUserReacted: t3.currentUserReacted }));
1083
+ return t2.sort((e3, t3) => e3.emoji.localeCompare(t3.emoji)), _(t2);
1084
+ }
1085
+ class ce extends z {
1086
+ constructor(e2, t2, s2, n2, r2) {
1087
+ super(e2, n2, r2), this.userId = t2, this.realtimeClient = s2, this.unsubscribeDebounceMs = 1e4;
1088
+ }
1089
+ fetchInitial(e2) {
1090
+ return __async(this, null, function* () {
1091
+ const t2 = yield this.realtimeClient.call("GET", ["users", this.userId], { includePrivateFields: false }, { bypassCache: true });
1092
+ return t2.ok ? c({ snapshot: ae(t2.value.data), lastChanged: e2 }) : "server" === t2.where && 404 === t2.value.status ? c({ snapshot: null, lastChanged: e2 }) : t2;
1093
+ });
1094
+ }
1095
+ equal(e2, t2) {
1096
+ return W(e2.snapshot, t2.snapshot);
1097
+ }
1098
+ loadNested(e2, t2) {
1099
+ return __async(this, null, function* () {
1100
+ return c(t2);
1101
+ });
1102
+ }
1103
+ userCreated(e2, t2) {
1104
+ this.mutate(e2, (s2) => null !== s2.value.snapshot ? s2 : c({ snapshot: ae(t2.state), lastChanged: e2 }));
1105
+ }
1106
+ userEdited(e2, t2) {
1107
+ this.mutate(e2, (s2) => {
1108
+ const n2 = s2.value.snapshot;
1109
+ if (null === n2) return console.warn("[TalkJS] Received a 'used edited' event for a user that we thought didn't exist."), s2;
1110
+ return c({ snapshot: { id: n2.id, name: j(n2.name, t2.diff.name), custom: $(n2.custom, t2.diff.custom), locale: j(n2.locale, t2.diff.locale), photoUrl: j(n2.photoUrl, t2.diff.photoUrl), role: j(n2.role, t2.diff.role), welcomeMessage: j(n2.welcomeMessage, t2.diff.welcomeMessage) }, lastChanged: e2 });
1111
+ });
1112
+ }
1113
+ getFromCache() {
1114
+ return __async(this, null, function* () {
1115
+ const e2 = yield this.mostRecentState.resultPromise;
1116
+ return e2.ok ? null === e2.value.snapshot ? h({ status: 404, errorCode: "USER_NOT_FOUND", reasons: ["That user does not exist yet"] }) : c({ status: 200, data: { id: e2.value.snapshot.id, name: e2.value.snapshot.name, custom: e2.value.snapshot.custom, locale: e2.value.snapshot.locale, photoUrl: e2.value.snapshot.photoUrl, role: e2.value.snapshot.role, welcomeMessage: e2.value.snapshot.welcomeMessage } }) : l("NOT_IN_CACHE");
1117
+ });
1118
+ }
1119
+ teardownNested(e2) {
1120
+ }
1121
+ anyChildChanged(e2, t2, s2) {
1122
+ return __async(this, null, function* () {
1123
+ return false;
1124
+ });
1125
+ }
1126
+ }
1127
+ class le extends G {
1078
1128
  constructor(e2, t2, s2, n2) {
1079
1129
  super(e2, {}), this.conversationId = t2, this.message = s2, this.realtimeClient = n2;
1080
1130
  }
@@ -1090,14 +1140,14 @@ class ne extends W {
1090
1140
  if (!e3.ok) return e3;
1091
1141
  t2 = e3.value.data;
1092
1142
  }
1093
- return c({ lastChanged: e2, sender: null === t2.senderId ? null : this.realtimeClient.internalSubscribe(["users", t2.senderId]), data: { id: t2.id, type: t2.type, custom: t2.custom, createdAt: t2.createdAt, editedAt: t2.editedAt, referencedMessageId: t2.referencedMessageId, origin: t2.origin, plaintext: te(t2.content, {}), content: t2.content, reactions: ie(t2.reactions) } });
1143
+ return c({ lastChanged: e2, sender: null === t2.senderId ? null : this.realtimeClient.internalSubscribe(["users", t2.senderId]), data: { id: t2.id, type: t2.type, custom: _(t2.custom), createdAt: t2.createdAt, editedAt: t2.editedAt, referencedMessageId: t2.referencedMessageId, origin: t2.origin, plaintext: re(t2.content, {}), content: P(t2.content), reactions: ue(t2.reactions) } });
1094
1144
  });
1095
1145
  }
1096
1146
  refetch(e2) {
1097
1147
  throw "Do not call refetch on message data stores, it can return outdated data. Destroy and remake them instead";
1098
1148
  }
1099
1149
  equal(e2, t2) {
1100
- return O(e2.data, t2.data);
1150
+ return W(e2.data, t2.data);
1101
1151
  }
1102
1152
  teardownNested(e2) {
1103
1153
  var _a2;
@@ -1117,17 +1167,20 @@ class ne extends W {
1117
1167
  if (false === (s2 == null ? void 0 : s2.ok)) return s2;
1118
1168
  if (null === t2.data) return c({ snapshot: null });
1119
1169
  const n2 = s2 == null ? void 0 : s2.value;
1120
- return c({ snapshot: { sender: (_c = n2 == null ? void 0 : n2.snapshot) != null ? _c : null, id: t2.data.id, type: t2.data.type, custom: t2.data.custom, createdAt: t2.data.createdAt, editedAt: t2.data.editedAt, origin: t2.data.origin, plaintext: te(t2.data.content, {}), content: t2.data.content, referencedMessageId: t2.data.referencedMessageId, reactions: t2.data.reactions } });
1170
+ return c({ snapshot: _({ sender: (_c = n2 == null ? void 0 : n2.snapshot) != null ? _c : null, id: t2.data.id, type: t2.data.type, custom: _(t2.data.custom), createdAt: t2.data.createdAt, editedAt: t2.data.editedAt, origin: t2.data.origin, plaintext: t2.data.plaintext, content: t2.data.content, referencedMessageId: t2.data.referencedMessageId, reactions: t2.data.reactions }) });
1121
1171
  });
1122
1172
  }
1123
1173
  messageEdited(e2, t2) {
1124
1174
  this.mutate(e2, (s2) => {
1125
1175
  if (null === s2.value.data) return s2;
1126
- return c({ lastChanged: e2, sender: s2.value.sender, data: { id: s2.value.data.id, type: s2.value.data.type, createdAt: s2.value.data.createdAt, origin: s2.value.data.origin, referencedMessageId: s2.value.data.referencedMessageId, editedAt: _(s2.value.data.editedAt, t2.diff.editedAt), custom: P(s2.value.data.custom, t2.diff.custom), content: _(s2.value.data.content, t2.diff.content), reactions: re(s2.value.data.reactions, t2.diff.reactions) } });
1176
+ const n2 = s2.value.data.content, r2 = (i2 = n2, void 0 === (a2 = t2.diff.content) ? i2 : P(a2));
1177
+ var i2, a2;
1178
+ const o2 = n2 === r2 ? s2.value.data.plaintext : re(r2, {});
1179
+ return c({ lastChanged: e2, sender: s2.value.sender, data: { id: s2.value.data.id, type: s2.value.data.type, createdAt: s2.value.data.createdAt, origin: s2.value.data.origin, referencedMessageId: s2.value.data.referencedMessageId, editedAt: j(s2.value.data.editedAt, t2.diff.editedAt), custom: $(s2.value.data.custom, t2.diff.custom), plaintext: o2, content: r2, reactions: he(s2.value.data.reactions, t2.diff.reactions) } });
1127
1180
  });
1128
1181
  }
1129
1182
  messageDeleted(e2, t2) {
1130
- this.mutate(e2, (s2) => null === s2.value.data ? s2 : this.messageId === t2.messageId ? (this.teardownNested(s2.value), c({ lastChanged: e2, sender: null, data: null })) : s2.value.data.referencedMessageId === t2.messageId ? c({ lastChanged: e2, sender: s2.value.sender, data: { id: s2.value.data.id, type: s2.value.data.type, createdAt: s2.value.data.createdAt, origin: s2.value.data.origin, referencedMessageId: null, editedAt: s2.value.data.editedAt, custom: s2.value.data.custom, content: s2.value.data.content, reactions: s2.value.data.reactions } }) : s2);
1183
+ this.mutate(e2, (s2) => null === s2.value.data ? s2 : this.messageId === t2.messageId ? (this.teardownNested(s2.value), c({ lastChanged: e2, sender: null, data: null })) : s2.value.data.referencedMessageId === t2.messageId ? c({ lastChanged: e2, sender: s2.value.sender, data: { id: s2.value.data.id, type: s2.value.data.type, createdAt: s2.value.data.createdAt, origin: s2.value.data.origin, referencedMessageId: null, editedAt: s2.value.data.editedAt, custom: s2.value.data.custom, plaintext: s2.value.data.plaintext, content: s2.value.data.content, reactions: s2.value.data.reactions } }) : s2);
1131
1184
  }
1132
1185
  getFromCache() {
1133
1186
  return __async(this, null, function* () {
@@ -1144,23 +1197,19 @@ class ne extends W {
1144
1197
  });
1145
1198
  }
1146
1199
  }
1147
- function re(e2, t2) {
1200
+ function he(e2, t2) {
1148
1201
  if (void 0 === t2) return e2;
1149
1202
  const s2 = e2.map((e3) => {
1150
1203
  const s3 = t2[e3.emoji];
1151
- return void 0 === s3 ? e3 : null === s3 ? __spreadProps(__spreadValues({}, e3), { count: 0 }) : { emoji: e3.emoji, count: _(e3.count, s3.count), currentUserReacted: _(e3.currentUserReacted, s3.currentUserReacted) };
1204
+ return void 0 === s3 ? e3 : _(null === s3 ? __spreadProps(__spreadValues({}, e3), { count: 0 }) : { emoji: e3.emoji, count: j(e3.count, s3.count), currentUserReacted: j(e3.currentUserReacted, s3.currentUserReacted) });
1152
1205
  }).filter((e3) => e3.count > 0), n2 = new Set(s2.map((e3) => e3.emoji));
1153
1206
  for (const e3 in t2) {
1154
1207
  const r2 = t2[e3];
1155
- r2 && !n2.has(e3) && s2.push({ emoji: e3, count: r2.count, currentUserReacted: r2.currentUserReacted });
1208
+ r2 && !n2.has(e3) && s2.push(_({ emoji: e3, count: r2.count, currentUserReacted: r2.currentUserReacted }));
1156
1209
  }
1157
- return s2.sort((e3, t3) => e3.emoji.localeCompare(t3.emoji)), s2;
1158
- }
1159
- function ie(e2) {
1160
- const t2 = Object.entries(e2).map(([e3, t3]) => ({ emoji: e3, count: t3.count, currentUserReacted: t3.currentUserReacted }));
1161
- return t2.sort((e3, t3) => e3.emoji.localeCompare(t3.emoji)), t2;
1210
+ return s2.sort((e3, t3) => e3.emoji.localeCompare(t3.emoji)), _(s2);
1162
1211
  }
1163
- class ae extends W {
1212
+ class de extends G {
1164
1213
  constructor(e2, t2, s2, n2) {
1165
1214
  super(e2, {}), this.createdAt = t2, this.dataStore = s2, this.referencedDataStore = n2;
1166
1215
  }
@@ -1196,11 +1245,11 @@ class ae extends W {
1196
1245
  const r2 = yield (_a2 = t2.referencedDataStore) == null ? void 0 : _a2.getDeep(e2);
1197
1246
  if (r2 && !r2.ok) return r2;
1198
1247
  const i2 = (_b = r2 == null ? void 0 : r2.value) != null ? _b : null, a2 = (_c = i2 == null ? void 0 : i2.snapshot) != null ? _c : null;
1199
- return c({ snapshot: { id: n2.snapshot.id, type: n2.snapshot.type, sender: n2.snapshot.sender, custom: n2.snapshot.custom, createdAt: n2.snapshot.createdAt, editedAt: n2.snapshot.editedAt, referencedMessage: a2, origin: n2.snapshot.origin, plaintext: n2.snapshot.plaintext, content: n2.snapshot.content, reactions: n2.snapshot.reactions } });
1248
+ return c({ snapshot: _({ id: n2.snapshot.id, type: n2.snapshot.type, sender: n2.snapshot.sender, custom: _(n2.snapshot.custom), createdAt: n2.snapshot.createdAt, editedAt: n2.snapshot.editedAt, referencedMessage: a2, origin: n2.snapshot.origin, plaintext: n2.snapshot.plaintext, content: n2.snapshot.content, reactions: n2.snapshot.reactions }) });
1200
1249
  });
1201
1250
  }
1202
1251
  }
1203
- class oe extends q {
1252
+ class pe extends z {
1204
1253
  constructor(e2, t2, s2, n2, r2) {
1205
1254
  super(e2, n2, r2), this.conversationId = t2, this.realtimeClient = s2, this.handlers = r2, this.unsubscribeDebounceMs = 1e3, this.pendingLoadMore = void 0;
1206
1255
  }
@@ -1214,8 +1263,8 @@ class oe extends q {
1214
1263
  }
1215
1264
  fetchInitial(e2) {
1216
1265
  return __async(this, null, function* () {
1217
- const t2 = this.onlyUsedInternally ? 1 : 30, s2 = yield ue({ realtimeClient: this.realtimeClient, conversationId: this.conversationId, count: t2 });
1218
- return s2.ok ? null === s2.value.messages ? c({ lastChanged: e2, lastMessageChanged: e2, stores: null, inWindow: null, windowEnd: null }) : ce({ seq: e2, messages: s2.value.messages, cursor: s2.value.nextCursor, conversationId: this.conversationId, realtimeClient: this.realtimeClient }) : s2;
1266
+ const t2 = this.onlyUsedInternally ? 1 : 30, s2 = yield fe({ realtimeClient: this.realtimeClient, conversationId: this.conversationId, count: t2 });
1267
+ return s2.ok ? null === s2.value.messages ? c({ lastChanged: e2, lastMessageChanged: e2, stores: null, inWindow: null, windowEnd: null }) : me({ seq: e2, messages: s2.value.messages, cursor: s2.value.nextCursor, conversationId: this.conversationId, realtimeClient: this.realtimeClient }) : s2;
1219
1268
  });
1220
1269
  }
1221
1270
  teardownNested(e2) {
@@ -1246,14 +1295,14 @@ class oe extends q {
1246
1295
  });
1247
1296
  }
1248
1297
  equal(e2, t2) {
1249
- return null === e2.stores && null === t2.stores || null !== e2.stores && null !== t2.stores && (!!O(Object.keys(e2.stores), Object.keys(t2.stores)) && (!!O(e2.inWindow.map((e3) => e3.messageId), t2.inWindow.map((e3) => e3.messageId)) && O(e2.windowEnd, t2.windowEnd)));
1298
+ return null === e2.stores && null === t2.stores || null !== e2.stores && null !== t2.stores && (!!W(Object.keys(e2.stores), Object.keys(t2.stores)) && (!!W(e2.inWindow.map((e3) => e3.messageId), t2.inWindow.map((e3) => e3.messageId)) && W(e2.windowEnd, t2.windowEnd)));
1250
1299
  }
1251
1300
  loadNested(e2, t2) {
1252
1301
  return __async(this, null, function* () {
1253
1302
  if (null === t2.stores) return c({ snapshot: null, loadedAll: true });
1254
1303
  const s2 = yield Promise.all(t2.inWindow.map((t3) => t3.getDeep(e2))), n2 = s2.find((e3) => !e3.ok);
1255
1304
  if (n2) return n2;
1256
- return c({ snapshot: s2.filter((e3) => null !== e3.value.snapshot).map((e3) => e3.value.snapshot), loadedAll: null === t2.windowEnd });
1305
+ return c({ snapshot: _(s2.filter((e3) => null !== e3.value.snapshot).map((e3) => e3.value.snapshot)), loadedAll: null === t2.windowEnd });
1257
1306
  });
1258
1307
  }
1259
1308
  loadMore(e2) {
@@ -1268,24 +1317,24 @@ class oe extends q {
1268
1317
  const t2 = yield this.mostRecentState.resultPromise;
1269
1318
  if (!t2.ok) return;
1270
1319
  if (null === t2.value.windowEnd) return;
1271
- const s2 = t2.value.windowEnd.cursor, n2 = yield ue({ count: e2, cursor: s2, conversationId: this.conversationId, realtimeClient: this.realtimeClient });
1320
+ const s2 = t2.value.windowEnd.cursor, n2 = yield fe({ count: e2, cursor: s2, conversationId: this.conversationId, realtimeClient: this.realtimeClient });
1272
1321
  yield this.handlers.onLoadedMore({ type: "virtual.messages.loadedmore", conversationId: this.conversationId, data: n2 });
1273
1322
  });
1274
1323
  }
1275
1324
  loadedMore(e2, t2) {
1276
- this.mutate(e2, (s2) => null === s2.value.windowEnd ? s2 : t2.data.ok ? null === t2.data.value.messages ? (console.warn("[TalkJS] When loading more messages, the conversation no longer existed. We should have been told about this."), s2) : ce({ seq: e2, prevState: s2.value, messages: t2.data.value.messages, cursor: t2.data.value.nextCursor, conversationId: this.conversationId, realtimeClient: this.realtimeClient }) : t2.data);
1325
+ this.mutate(e2, (s2) => null === s2.value.windowEnd ? s2 : t2.data.ok ? null === t2.data.value.messages ? (console.warn("[TalkJS] When loading more messages, the conversation no longer existed. We should have been told about this."), s2) : me({ seq: e2, prevState: s2.value, messages: t2.data.value.messages, cursor: t2.data.value.nextCursor, conversationId: this.conversationId, realtimeClient: this.realtimeClient }) : t2.data);
1277
1326
  }
1278
1327
  messageCreated(e2, t2) {
1279
1328
  this.mutate(e2, (s2) => {
1280
1329
  if (null === s2.value.stores) return console.warn("[TalkJS] Received a 'message.created' event for a nonexistent conversation."), s2;
1281
1330
  if (s2.value.windowEnd && t2.state.createdAt < s2.value.windowEnd.oldestMessageTs) return s2;
1282
1331
  if (Object.hasOwnProperty.call(s2.value.stores, t2.state.id)) return s2;
1283
- const n2 = __spreadValues({}, s2.value.stores), r2 = new ne(e2, this.conversationId, t2.state, this.realtimeClient);
1332
+ const n2 = __spreadValues({}, s2.value.stores), r2 = new le(e2, this.conversationId, t2.state, this.realtimeClient);
1284
1333
  n2[t2.state.id] = r2;
1285
1334
  const i2 = t2.state.referencedMessageId;
1286
1335
  let a2;
1287
- null === i2 ? a2 = null : i2 in n2 ? a2 = n2[i2] : (a2 = new ne(e2, this.conversationId, i2, this.realtimeClient), n2[i2] = a2);
1288
- const o2 = new ae(e2, t2.state.createdAt, r2, a2), u2 = [...s2.value.inWindow, o2];
1336
+ null === i2 ? a2 = null : i2 in n2 ? a2 = n2[i2] : (a2 = new le(e2, this.conversationId, i2, this.realtimeClient), n2[i2] = a2);
1337
+ const o2 = new de(e2, t2.state.createdAt, r2, a2), u2 = [...s2.value.inWindow, o2];
1289
1338
  u2.sort((e3, t3) => t3.createdAt - e3.createdAt);
1290
1339
  const l2 = u2[0].messageId === t2.messageId ? e2 : s2.value.lastMessageChanged;
1291
1340
  return c({ lastChanged: e2, lastMessageChanged: l2, stores: n2, inWindow: u2, windowEnd: s2.value.windowEnd });
@@ -1305,12 +1354,12 @@ class oe extends q {
1305
1354
  delete n2[t2.messageId];
1306
1355
  const r2 = s2.value.inWindow.filter((e3) => e3.messageId !== t2.messageId);
1307
1356
  if (t2.newLastMessage && 0 === r2.length) {
1308
- const s3 = new ne(e2, this.conversationId, t2.newLastMessage, this.realtimeClient);
1357
+ const s3 = new le(e2, this.conversationId, t2.newLastMessage, this.realtimeClient);
1309
1358
  n2[s3.messageId] = s3;
1310
1359
  const i3 = t2.newLastMessage.referencedMessageId;
1311
1360
  let a2;
1312
- null === i3 ? a2 = null : i3 in n2 ? a2 = n2[i3] : (a2 = new ne(e2, this.conversationId, i3, this.realtimeClient), n2[i3] = a2);
1313
- const o2 = new ae(e2, t2.newLastMessage.createdAt, s3, a2);
1361
+ null === i3 ? a2 = null : i3 in n2 ? a2 = n2[i3] : (a2 = new le(e2, this.conversationId, i3, this.realtimeClient), n2[i3] = a2);
1362
+ const o2 = new de(e2, t2.newLastMessage.createdAt, s3, a2);
1314
1363
  r2.push(o2);
1315
1364
  }
1316
1365
  const i2 = void 0 !== t2.newLastMessage ? e2 : s2.value.lastMessageChanged;
@@ -1342,7 +1391,7 @@ class oe extends q {
1342
1391
  });
1343
1392
  }
1344
1393
  }
1345
- function ue(_0) {
1394
+ function fe(_0) {
1346
1395
  return __async(this, arguments, function* ({ cursor: e2, realtimeClient: t2, conversationId: s2, count: n2 }) {
1347
1396
  const r2 = { limit: n2, cursor: e2 }, i2 = yield t2.call("GET", ["me", "conversations", s2, "messages"], r2, { bypassCache: true });
1348
1397
  if (i2.ok) {
@@ -1352,42 +1401,42 @@ function ue(_0) {
1352
1401
  return (i2.ok || "server" !== i2.where || 404 !== i2.value.status) && (i2.ok || "server" !== i2.where || 403 !== i2.value.status || "NOT_A_PARTICIPANT" !== i2.value.errorCode) ? i2 : c({ messages: null, nextCursor: null });
1353
1402
  });
1354
1403
  }
1355
- function ce({ seq: e2, prevState: t2, messages: s2, cursor: n2, conversationId: r2, realtimeClient: i2 }) {
1404
+ function me({ seq: e2, prevState: t2, messages: s2, cursor: n2, conversationId: r2, realtimeClient: i2 }) {
1356
1405
  var _a2, _b, _c, _d;
1357
1406
  const a2 = t2 ? __spreadValues({}, t2.stores) : {};
1358
1407
  for (const t3 of s2) if (void 0 === a2[t3.id]) {
1359
- const s3 = new ne(e2, r2, t3, i2);
1408
+ const s3 = new le(e2, r2, t3, i2);
1360
1409
  a2[s3.messageId] = s3;
1361
1410
  }
1362
1411
  for (const t3 of s2) {
1363
1412
  const s3 = t3.referencedMessageId;
1364
1413
  if (s3 && void 0 === a2[s3]) {
1365
- const t4 = new ne(e2, r2, s3, i2);
1414
+ const t4 = new le(e2, r2, s3, i2);
1366
1415
  a2[t4.messageId] = t4;
1367
1416
  }
1368
1417
  }
1369
1418
  const o2 = t2 ? [...t2.inWindow] : [];
1370
- for (const t3 of s2) o2.push(new ae(e2, t3.createdAt, a2[t3.id], t3.referencedMessageId ? a2[t3.referencedMessageId] : null));
1419
+ for (const t3 of s2) o2.push(new de(e2, t3.createdAt, a2[t3.id], t3.referencedMessageId ? a2[t3.referencedMessageId] : null));
1371
1420
  o2.sort((e3, t3) => t3.createdAt - e3.createdAt);
1372
1421
  const u2 = (_b = (_a2 = t2 == null ? void 0 : t2.inWindow) == null ? void 0 : _a2[0]) == null ? void 0 : _b.messageId, l2 = (_c = o2 == null ? void 0 : o2[0]) == null ? void 0 : _c.messageId, h2 = u2 === l2 ? (_d = t2 == null ? void 0 : t2.lastMessageChanged) != null ? _d : e2 : e2;
1373
1422
  if (null === n2) return c({ lastChanged: e2, lastMessageChanged: h2, stores: a2, inWindow: o2, windowEnd: null });
1374
1423
  return c({ lastChanged: e2, lastMessageChanged: h2, stores: a2, inWindow: o2, windowEnd: { cursor: n2, oldestMessageTs: s2[s2.length - 1].createdAt } });
1375
1424
  }
1376
- class le extends q {
1425
+ class ge extends z {
1377
1426
  constructor(e2, t2, s2, n2, r2) {
1378
- super(e2, n2, r2), this.convDataStore = t2, this.realtimeClient = s2, this.unsubscribeDebounceMs = 0;
1427
+ super(e2, n2, r2), this.convData = t2, this.realtimeClient = s2, this.unsubscribeDebounceMs = 0;
1379
1428
  }
1380
1429
  fetchInitial(e2) {
1381
1430
  return __async(this, null, function* () {
1382
- return c({ lastChanged: e2, store: this.convDataStore });
1431
+ return c({ lastChanged: e2, convData: this.convData });
1383
1432
  });
1384
1433
  }
1385
1434
  teardownNested(e2) {
1386
- e2.store.unsubscribe();
1435
+ e2.convData.unsubscribe();
1387
1436
  }
1388
1437
  anyChildChanged(e2, t2, s2) {
1389
1438
  return __async(this, null, function* () {
1390
- return s2.store.store.changedBetween(e2, t2);
1439
+ return s2.convData.store.changedBetween(e2, t2);
1391
1440
  });
1392
1441
  }
1393
1442
  equal(e2, t2) {
@@ -1395,28 +1444,28 @@ class le extends q {
1395
1444
  }
1396
1445
  loadNested(e2, t2) {
1397
1446
  return __async(this, null, function* () {
1398
- return t2.store.store.getDeep(e2);
1447
+ return t2.convData.store.getDeep(e2);
1399
1448
  });
1400
1449
  }
1401
1450
  getFromCache() {
1402
1451
  return __async(this, null, function* () {
1403
- return this.convDataStore.store.getFromCache();
1452
+ return this.convData.store.getFromCache();
1404
1453
  });
1405
1454
  }
1406
1455
  }
1407
- function he(e2, t2) {
1456
+ function ve(e2, t2) {
1408
1457
  for (let s2 in e2) Object.prototype.hasOwnProperty.call(e2, s2) && t2(e2[s2], s2);
1409
1458
  }
1410
- function de(e2, t2) {
1459
+ function we(e2, t2) {
1411
1460
  return function(e3, t3) {
1412
1461
  let s2 = {}, n2 = 0;
1413
- return he(e3, (e4, r2) => {
1462
+ return ve(e3, (e4, r2) => {
1414
1463
  const [i2, a2] = t3([r2, e4], n2++);
1415
1464
  s2[i2] = a2;
1416
1465
  }), s2;
1417
1466
  }(e2, ([e3, s2]) => [e3, t2(s2, e3)]);
1418
1467
  }
1419
- class pe extends q {
1468
+ class be extends z {
1420
1469
  constructor(e2, t2, s2, n2, r2) {
1421
1470
  super(e2, n2, r2), this.conversationId = t2, this.realtimeClient = s2, this.unsubscribeDebounceMs = 1e4;
1422
1471
  }
@@ -1428,24 +1477,24 @@ class pe extends q {
1428
1477
  if (!t2.ok) return t2;
1429
1478
  const s2 = t2.value.data;
1430
1479
  if (s2.many) return c({ data: { usersTyping: null, many: true }, userSubscriptions: {}, lastChanged: e2 });
1431
- return c({ data: s2, userSubscriptions: de(s2.usersTyping, (e3, t3) => this.realtimeClient.internalSubscribe(["users", t3])), lastChanged: e2 });
1480
+ return c({ data: s2, userSubscriptions: we(s2.usersTyping, (e3, t3) => this.realtimeClient.internalSubscribe(["users", t3])), lastChanged: e2 });
1432
1481
  });
1433
1482
  }
1434
1483
  equal(e2, t2) {
1435
- return O(e2.data, t2.data);
1484
+ return W(e2.data, t2.data);
1436
1485
  }
1437
1486
  loadNested(e2, t2) {
1438
1487
  return __async(this, null, function* () {
1439
1488
  if (null === t2.data) return c({ snapshot: null, lastChanged: t2.lastChanged });
1440
- if (t2.data.many) return c({ snapshot: { many: true }, lastChanged: t2.lastChanged });
1489
+ if (t2.data.many) return c({ snapshot: _({ many: true }), lastChanged: t2.lastChanged });
1441
1490
  const s2 = Object.entries(t2.data.usersTyping).sort(([e3, t3], [s3, n3]) => t3 - n3).map(([e3, t3]) => e3).map((s3) => t2.userSubscriptions[s3].store.getDeep(e2)), n2 = yield Promise.all(s2), r2 = n2.find((e3) => !e3.ok);
1442
1491
  if (r2) return r2;
1443
- const i2 = n2.map((e3) => e3.value), a2 = i2.map((e3) => e3.snapshot), o2 = i2.map((e3) => e3.lastChanged);
1444
- return c({ snapshot: { users: a2, many: false }, lastChanged: Math.max(t2.lastChanged, ...o2) });
1492
+ const i2 = n2.map((e3) => e3.value), a2 = i2.map((e3) => e3.snapshot), o2 = i2.map((e3) => e3.lastChanged), u2 = Math.max(t2.lastChanged, ...o2);
1493
+ return c({ snapshot: _({ users: _(a2), many: false }), lastChanged: u2 });
1445
1494
  });
1446
1495
  }
1447
1496
  typingAvailable(e2, t2) {
1448
- this.mutate(e2, () => c({ data: t2.state, userSubscriptions: t2.state.many ? {} : de(t2.state.usersTyping, (e3, t3) => this.realtimeClient.internalSubscribe(["users", t3])), lastChanged: e2 }));
1497
+ this.mutate(e2, () => c({ data: t2.state, userSubscriptions: t2.state.many ? {} : we(t2.state.usersTyping, (e3, t3) => this.realtimeClient.internalSubscribe(["users", t3])), lastChanged: e2 }));
1449
1498
  }
1450
1499
  typingChanged(e2, t2) {
1451
1500
  this.mutate(e2, (s2) => {
@@ -1453,7 +1502,7 @@ class pe extends q {
1453
1502
  if (void 0 === t2.diff.many) {
1454
1503
  if (true === s2.value.data.many) return s2;
1455
1504
  const n2 = __spreadValues({}, s2.value.data.usersTyping), r2 = __spreadValues({}, s2.value.userSubscriptions);
1456
- return he(t2.diff.usersTyping, (e3, t3) => {
1505
+ return ve(t2.diff.usersTyping, (e3, t3) => {
1457
1506
  var _a2;
1458
1507
  "number" == typeof e3 ? (n2[t3] = e3, r2[t3] = this.realtimeClient.internalSubscribe(["users", t3])) : null === e3 && (delete n2[t3], (_a2 = r2[t3]) == null ? void 0 : _a2.unsubscribe(), delete r2[t3]);
1459
1508
  }), c({ data: { usersTyping: n2, many: false }, userSubscriptions: r2, lastChanged: e2 });
@@ -1461,7 +1510,7 @@ class pe extends q {
1461
1510
  if (true === t2.diff.many) return s2.value.data.many ? s2 : c({ data: { usersTyping: null, many: true }, userSubscriptions: {}, lastChanged: e2 });
1462
1511
  if (false === t2.diff.many) {
1463
1512
  if (false === s2.value.data.many) return s2;
1464
- const n2 = de(t2.diff.usersTyping, (e3, t3) => this.realtimeClient.internalSubscribe(["users", t3]));
1513
+ const n2 = we(t2.diff.usersTyping, (e3, t3) => this.realtimeClient.internalSubscribe(["users", t3]));
1465
1514
  return c({ data: t2.diff, userSubscriptions: n2, lastChanged: e2 });
1466
1515
  }
1467
1516
  throw t2.diff, "Unreachable";
@@ -1471,7 +1520,7 @@ class pe extends q {
1471
1520
  this.mutate(e2, (t3) => null === t3.value.data ? t3 : c({ data: null, lastChanged: e2 }));
1472
1521
  }
1473
1522
  teardownNested(e2) {
1474
- e2.data && he(e2.userSubscriptions, (e3) => e3.unsubscribe());
1523
+ e2.data && ve(e2.userSubscriptions, (e3) => e3.unsubscribe());
1475
1524
  }
1476
1525
  anyChildChanged(e2, t2, s2) {
1477
1526
  return __async(this, null, function* () {
@@ -1485,7 +1534,7 @@ class pe extends q {
1485
1534
  });
1486
1535
  }
1487
1536
  }
1488
- class fe extends W {
1537
+ class ye extends G {
1489
1538
  constructor(e2, t2, s2, n2) {
1490
1539
  super(e2, {}), this.conversationId = t2, this.participantData = s2, this.realtimeClient = n2;
1491
1540
  }
@@ -1499,7 +1548,7 @@ class fe extends W {
1499
1548
  }
1500
1549
  equal(e2, t2) {
1501
1550
  var _a2, _b, _c, _d;
1502
- return ((_b = (_a2 = e2.user) == null ? void 0 : _a2.store) == null ? void 0 : _b.userId) === ((_d = (_c = t2.user) == null ? void 0 : _c.store) == null ? void 0 : _d.userId) && O(e2.data, t2.data);
1551
+ return ((_b = (_a2 = e2.user) == null ? void 0 : _a2.store) == null ? void 0 : _b.userId) === ((_d = (_c = t2.user) == null ? void 0 : _c.store) == null ? void 0 : _d.userId) && W(e2.data, t2.data);
1503
1552
  }
1504
1553
  teardownNested(e2) {
1505
1554
  var _a2;
@@ -1518,13 +1567,13 @@ class fe extends W {
1518
1567
  const s2 = yield t2.user.store.getDeep(e2);
1519
1568
  if (false === s2.ok) return s2;
1520
1569
  const n2 = s2.value.snapshot;
1521
- return c({ snapshot: this.realtimeClient.createParticipantSnapshotPreloaded(t2.data, n2) });
1570
+ return c({ snapshot: oe(t2.data, n2) });
1522
1571
  });
1523
1572
  }
1524
1573
  participantEdited(e2, t2) {
1525
1574
  this.mutate(e2, (s2) => {
1526
1575
  if (null === s2.value.data) return s2;
1527
- return c({ lastChanged: e2, user: s2.value.user, data: { id: s2.value.data.id, access: _(s2.value.data.access, t2.diff.access), notify: _(s2.value.data.notify, t2.diff.notify), joinedAt: s2.value.data.joinedAt } });
1576
+ return c({ lastChanged: e2, user: s2.value.user, data: { id: s2.value.data.id, access: j(s2.value.data.access, t2.diff.access), notify: j(s2.value.data.notify, t2.diff.notify), joinedAt: s2.value.data.joinedAt } });
1528
1577
  });
1529
1578
  }
1530
1579
  participantDeleted(e2, t2) {
@@ -1541,14 +1590,14 @@ class fe extends W {
1541
1590
  });
1542
1591
  }
1543
1592
  }
1544
- class me extends q {
1593
+ class Ce extends z {
1545
1594
  constructor(e2, t2, s2, n2, r2) {
1546
1595
  super(e2, n2, r2), this.conversationId = t2, this.realtimeClient = s2, this.handlers = r2, this.unsubscribeDebounceMs = 1e3, this.pendingLoadMore = void 0;
1547
1596
  }
1548
1597
  fetchInitial(e2) {
1549
1598
  return __async(this, null, function* () {
1550
- const t2 = yield ge({ realtimeClient: this.realtimeClient, conversationId: this.conversationId, count: 10 });
1551
- return t2.ok ? null === t2.value.participants ? c({ lastChanged: e2, stores: null, inWindow: null, windowEnd: null }) : ve({ seq: e2, participants: t2.value.participants, cursor: t2.value.nextCursor, conversationId: this.conversationId, realtimeClient: this.realtimeClient }) : t2;
1599
+ const t2 = yield Ae({ realtimeClient: this.realtimeClient, conversationId: this.conversationId, count: 10 });
1600
+ return t2.ok ? null === t2.value.participants ? c({ lastChanged: e2, stores: null, inWindow: null, windowEnd: null }) : Ee({ seq: e2, participants: t2.value.participants, cursor: t2.value.nextCursor, conversationId: this.conversationId, realtimeClient: this.realtimeClient }) : t2;
1552
1601
  });
1553
1602
  }
1554
1603
  teardownNested(e2) {
@@ -1567,7 +1616,7 @@ class me extends q {
1567
1616
  });
1568
1617
  }
1569
1618
  equal(e2, t2) {
1570
- return null === e2.stores && null === t2.stores || null !== e2.stores && null !== t2.stores && (!!O(Object.keys(e2.stores), Object.keys(t2.stores)) && O(e2.windowEnd, t2.windowEnd));
1619
+ return null === e2.stores && null === t2.stores || null !== e2.stores && null !== t2.stores && (!!W(Object.keys(e2.stores), Object.keys(t2.stores)) && W(e2.windowEnd, t2.windowEnd));
1571
1620
  }
1572
1621
  loadNested(e2, t2) {
1573
1622
  return __async(this, null, function* () {
@@ -1575,7 +1624,7 @@ class me extends q {
1575
1624
  const s2 = yield Promise.all(Object.values(t2.stores).map((t3) => t3.getDeep(e2))), n2 = s2.find((e3) => !e3.ok);
1576
1625
  if (n2) return n2;
1577
1626
  const r2 = s2.filter((e3) => null !== e3.value.snapshot).map((e3) => e3.value.snapshot);
1578
- return r2.sort((e3, t3) => t3.joinedAt - e3.joinedAt), c({ snapshot: r2, loadedAll: null === t2.windowEnd });
1627
+ return r2.sort((e3, t3) => t3.joinedAt - e3.joinedAt), c({ snapshot: _(r2), loadedAll: null === t2.windowEnd });
1579
1628
  });
1580
1629
  }
1581
1630
  loadMore(e2) {
@@ -1590,19 +1639,19 @@ class me extends q {
1590
1639
  const t2 = yield this.mostRecentState.resultPromise;
1591
1640
  if (!t2.ok) return;
1592
1641
  if (null === t2.value.windowEnd) return;
1593
- const s2 = t2.value.windowEnd.cursor, n2 = yield ge({ count: e2, cursor: s2, conversationId: this.conversationId, realtimeClient: this.realtimeClient });
1642
+ const s2 = t2.value.windowEnd.cursor, n2 = yield Ae({ count: e2, cursor: s2, conversationId: this.conversationId, realtimeClient: this.realtimeClient });
1594
1643
  yield this.handlers.onLoadedMore({ type: "virtual.participants.loadedmore", conversationId: this.conversationId, data: n2 });
1595
1644
  });
1596
1645
  }
1597
1646
  loadedMore(e2, t2) {
1598
- this.mutate(e2, (s2) => null === s2.value.windowEnd ? s2 : t2.data.ok ? null === t2.data.value.participants ? (console.warn("[TalkJS] When loading more participants, the conversation no longer existed. We should have been told about this."), s2) : ve({ seq: e2, prevStores: s2.value.stores, participants: t2.data.value.participants, cursor: t2.data.value.nextCursor, conversationId: this.conversationId, realtimeClient: this.realtimeClient }) : t2.data);
1647
+ this.mutate(e2, (s2) => null === s2.value.windowEnd ? s2 : t2.data.ok ? null === t2.data.value.participants ? (console.warn("[TalkJS] When loading more participants, the conversation no longer existed. We should have been told about this."), s2) : Ee({ seq: e2, prevStores: s2.value.stores, participants: t2.data.value.participants, cursor: t2.data.value.nextCursor, conversationId: this.conversationId, realtimeClient: this.realtimeClient }) : t2.data);
1599
1648
  }
1600
1649
  participantCreated(e2, t2) {
1601
1650
  this.mutate(e2, (s2) => {
1602
1651
  if (null === s2.value.stores) return console.warn("[TalkJS] Received a 'participant.created' event for a nonexistent conversation."), s2;
1603
1652
  if (s2.value.windowEnd && t2.state.joinedAt < s2.value.windowEnd.oldestParticipantTs) return s2;
1604
1653
  if (Object.hasOwnProperty.call(s2.value.stores, t2.state.id)) return s2;
1605
- const n2 = __spreadValues({}, s2.value.stores), r2 = new fe(e2, this.conversationId, t2.state, this.realtimeClient);
1654
+ const n2 = __spreadValues({}, s2.value.stores), r2 = new ye(e2, this.conversationId, t2.state, this.realtimeClient);
1606
1655
  n2[t2.state.id] = r2;
1607
1656
  return c({ lastChanged: e2, stores: n2, windowEnd: s2.value.windowEnd });
1608
1657
  });
@@ -1642,7 +1691,7 @@ class me extends q {
1642
1691
  });
1643
1692
  }
1644
1693
  }
1645
- function ge(_0) {
1694
+ function Ae(_0) {
1646
1695
  return __async(this, arguments, function* ({ cursor: e2, realtimeClient: t2, conversationId: s2, count: n2 }) {
1647
1696
  const r2 = { limit: n2, cursor: e2 }, i2 = yield t2.call("GET", ["me", "conversations", s2, "participants"], r2, { bypassCache: true });
1648
1697
  if (i2.ok) {
@@ -1652,23 +1701,23 @@ function ge(_0) {
1652
1701
  return (i2.ok || "server" !== i2.where || 404 !== i2.value.status) && (i2.ok || "server" !== i2.where || 403 !== i2.value.status || "NOT_A_PARTICIPANT" !== i2.value.errorCode) ? i2 : c({ participants: null, nextCursor: null });
1653
1702
  });
1654
1703
  }
1655
- function ve({ seq: e2, prevStores: t2, participants: s2, cursor: n2, conversationId: r2, realtimeClient: i2 }) {
1704
+ function Ee({ seq: e2, prevStores: t2, participants: s2, cursor: n2, conversationId: r2, realtimeClient: i2 }) {
1656
1705
  const a2 = t2 ? __spreadValues({}, t2) : {};
1657
1706
  for (const t3 of s2) if (void 0 === a2[t3.id]) {
1658
- const s3 = new fe(e2, r2, t3, i2);
1707
+ const s3 = new ye(e2, r2, t3, i2);
1659
1708
  a2[t3.id] = s3;
1660
1709
  }
1661
1710
  if (null === n2) return c({ lastChanged: e2, stores: a2, windowEnd: null });
1662
1711
  return c({ lastChanged: e2, stores: a2, windowEnd: { cursor: n2, oldestParticipantTs: s2[s2.length - 1].joinedAt } });
1663
1712
  }
1664
- class we extends q {
1713
+ class ke extends z {
1665
1714
  constructor(e2, t2, s2, n2, r2) {
1666
1715
  super(e2, n2, r2), this.getConvDataStore = t2, this.realtimeClient = s2, this.handlers = r2, this.unsubscribeDebounceMs = 1e3, this.pendingLoadMore = void 0;
1667
1716
  }
1668
1717
  fetchInitial(e2) {
1669
1718
  return __async(this, null, function* () {
1670
- const t2 = yield be({ realtimeClient: this.realtimeClient, count: 20 });
1671
- return t2.ok ? null === t2.value.conversations ? c({ lastChanged: e2, stores: null, windowEnd: null }) : ye({ seq: e2, conversations: t2.value.conversations, cursor: t2.value.nextCursor, getConvDataStore: this.getConvDataStore }) : t2;
1719
+ const t2 = yield xe({ realtimeClient: this.realtimeClient, count: 20 });
1720
+ return t2.ok ? null === t2.value.conversations ? c({ lastChanged: e2, stores: null, windowEnd: null }) : Ie({ seq: e2, conversations: t2.value.conversations, cursor: t2.value.nextCursor, getConvDataStore: this.getConvDataStore }) : t2;
1672
1721
  });
1673
1722
  }
1674
1723
  teardownNested(e2) {
@@ -1685,11 +1734,11 @@ class we extends q {
1685
1734
  });
1686
1735
  }
1687
1736
  equal(e2, t2) {
1688
- return null === e2.stores && null === t2.stores || null !== e2.stores && null !== t2.stores && (!!O(Object.keys(e2.stores), Object.keys(t2.stores)) && O(e2.windowEnd, t2.windowEnd));
1737
+ return null === e2.stores && null === t2.stores || null !== e2.stores && null !== t2.stores && (!!W(Object.keys(e2.stores), Object.keys(t2.stores)) && W(e2.windowEnd, t2.windowEnd));
1689
1738
  }
1690
1739
  loadNested(e2, t2) {
1691
1740
  return __async(this, null, function* () {
1692
- if (null === t2.stores) return c({ snapshot: [], loadedAll: true });
1741
+ if (null === t2.stores) return c({ snapshot: _([]), loadedAll: true });
1693
1742
  const s2 = yield Promise.all(Object.values(t2.stores).map((t3) => t3.store.getDeep(e2))), n2 = s2.find((e3) => !e3.ok);
1694
1743
  if (n2) return n2;
1695
1744
  const r2 = s2.filter((e3) => null !== e3.value.snapshot).map((e3) => e3.value.snapshot);
@@ -1697,7 +1746,7 @@ class we extends q {
1697
1746
  var _a2, _b, _c, _d;
1698
1747
  const s3 = (_b = (_a2 = e3.lastMessage) == null ? void 0 : _a2.createdAt) != null ? _b : e3.joinedAt;
1699
1748
  return ((_d = (_c = t3.lastMessage) == null ? void 0 : _c.createdAt) != null ? _d : t3.joinedAt) - s3;
1700
- }), c({ snapshot: r2, loadedAll: null === t2.windowEnd });
1749
+ }), c({ snapshot: _(r2), loadedAll: null === t2.windowEnd });
1701
1750
  });
1702
1751
  }
1703
1752
  loadMore(e2) {
@@ -1712,7 +1761,7 @@ class we extends q {
1712
1761
  const t2 = yield this.mostRecentState.resultPromise;
1713
1762
  if (!t2.ok) return;
1714
1763
  if (null === t2.value.windowEnd) return;
1715
- const s2 = t2.value.windowEnd.cursor, n2 = yield be({ count: e2, cursor: s2, realtimeClient: this.realtimeClient });
1764
+ const s2 = t2.value.windowEnd.cursor, n2 = yield xe({ count: e2, cursor: s2, realtimeClient: this.realtimeClient });
1716
1765
  yield this.handlers.onLoadedMore({ type: "virtual.conversations.loadedmore", data: n2 });
1717
1766
  });
1718
1767
  }
@@ -1726,14 +1775,17 @@ class we extends q {
1726
1775
  });
1727
1776
  }
1728
1777
  loadedMore(e2, t2) {
1729
- this.mutate(e2, (s2) => null === s2.value.windowEnd ? s2 : t2.data.ok ? null === t2.data.value.conversations ? (console.warn("[TalkJS] When loading more conversations, the user stopped existing, which should be impossible."), s2) : ye({ seq: e2, prevStores: s2.value.stores, conversations: t2.data.value.conversations, cursor: t2.data.value.nextCursor, getConvDataStore: this.getConvDataStore }) : t2.data);
1778
+ this.mutate(e2, (s2) => null === s2.value.windowEnd ? s2 : t2.data.ok ? null === t2.data.value.conversations ? (console.warn("[TalkJS] When loading more conversations, the user stopped existing, which should be impossible."), s2) : Ie({ seq: e2, prevStores: s2.value.stores, conversations: t2.data.value.conversations, cursor: t2.data.value.nextCursor, getConvDataStore: this.getConvDataStore }) : t2.data);
1730
1779
  }
1731
1780
  userCreated(e2, t2) {
1732
1781
  this.mutate(e2, (e3) => null !== e3.value.stores ? e3 : c({ lastChanged: e3.value.lastChanged, stores: {}, windowEnd: null }));
1733
1782
  }
1734
1783
  sideCreated(e2, t2) {
1735
1784
  const s2 = this.getConvDataStore(t2.state);
1736
- this.mutate(e2, (n2) => Object.hasOwnProperty.call(n2.value.stores, t2.conversationId) ? (s2.unsubscribe(), n2) : c({ lastChanged: e2, stores: __spreadProps(__spreadValues({}, n2.value.stores), { [t2.conversationId]: s2 }), windowEnd: n2.value.windowEnd }));
1785
+ this.mutate(e2, (n2) => {
1786
+ let r2 = n2.value.stores;
1787
+ return null === r2 && (console.warn("[TalkJS] Received a 'side.created' event when we thought your user didn't exist."), r2 = {}), Object.hasOwnProperty.call(r2, t2.conversationId) ? (s2.unsubscribe(), n2) : c({ lastChanged: e2, stores: __spreadProps(__spreadValues({}, r2), { [t2.conversationId]: s2 }), windowEnd: n2.value.windowEnd });
1788
+ });
1737
1789
  }
1738
1790
  sideDeleted(e2, t2) {
1739
1791
  this.mutate(e2, (s2) => {
@@ -1762,7 +1814,7 @@ class we extends q {
1762
1814
  });
1763
1815
  }
1764
1816
  }
1765
- function be(_0) {
1817
+ function xe(_0) {
1766
1818
  return __async(this, arguments, function* ({ cursor: e2, realtimeClient: t2, count: s2 }) {
1767
1819
  const n2 = { limit: s2, cursor: e2 }, r2 = yield t2.call("GET", ["me", "conversations"], n2, { bypassCache: true });
1768
1820
  if (r2.ok) {
@@ -1772,13 +1824,13 @@ function be(_0) {
1772
1824
  return r2.ok || "server" !== r2.where || 404 !== r2.value.status || "USER_NOT_FOUND" !== r2.value.errorCode ? r2 : c({ conversations: null, nextCursor: null });
1773
1825
  });
1774
1826
  }
1775
- function ye({ seq: e2, prevStores: t2, conversations: s2, cursor: n2, getConvDataStore: r2 }) {
1827
+ function Ie({ seq: e2, prevStores: t2, conversations: s2, cursor: n2, getConvDataStore: r2 }) {
1776
1828
  const i2 = t2 ? __spreadValues({}, t2) : {};
1777
1829
  for (const e3 of s2) void 0 === i2[e3.id] && (i2[e3.id] = r2(e3));
1778
1830
  if (null === n2) return c({ lastChanged: e2, stores: i2, windowEnd: null });
1779
1831
  return c({ lastChanged: e2, stores: i2, windowEnd: { cursor: n2, oldestMessageTs: Math.min(...s2.map((e3) => e3.lastMessageAt)) } });
1780
1832
  }
1781
- class Ce extends q {
1833
+ class Te extends z {
1782
1834
  constructor(e2, t2, s2, n2, r2) {
1783
1835
  super(e2, n2, r2), this.conversation = t2, this.realtimeClient = s2, this.unsubscribeDebounceMs = 5e3;
1784
1836
  }
@@ -1788,7 +1840,7 @@ class Ce extends q {
1788
1840
  fetchInitial(e2) {
1789
1841
  return __async(this, null, function* () {
1790
1842
  const t2 = this.realtimeClient.internalSubscribe(["me", "conversations", this.conversationId, "messages"]);
1791
- if ("object" == typeof this.conversation) return c({ lastChanged: e2, snapshot: this.conversation, messageWindowStore: t2 });
1843
+ if ("object" == typeof this.conversation) return c({ lastChanged: e2, snapshot: this.conversation, messageWindow: t2 });
1792
1844
  const s2 = yield this.realtimeClient.call("GET", ["me", "conversations", this.conversationId], {}, { bypassCache: true });
1793
1845
  let n2;
1794
1846
  if (s2.ok) n2 = s2.value.data;
@@ -1797,45 +1849,45 @@ class Ce extends q {
1797
1849
  if ("server" !== s2.where || 403 !== s2.value.status || "NOT_A_PARTICIPANT" !== s2.value.errorCode) return t2.unsubscribe(), s2;
1798
1850
  n2 = null;
1799
1851
  }
1800
- return c({ lastChanged: e2, snapshot: n2, messageWindowStore: t2 });
1852
+ return c({ lastChanged: e2, snapshot: n2, messageWindow: t2 });
1801
1853
  });
1802
1854
  }
1803
1855
  teardownNested(e2) {
1804
1856
  var _a2;
1805
- (_a2 = e2.messageWindowStore) == null ? void 0 : _a2.unsubscribe();
1857
+ (_a2 = e2.messageWindow) == null ? void 0 : _a2.unsubscribe();
1806
1858
  }
1807
1859
  anyChildChanged(e2, t2, s2) {
1808
1860
  return __async(this, null, function* () {
1809
- return true === (yield s2.messageWindowStore.store.lastMessageChangedBetween(e2, t2));
1861
+ return true === (yield s2.messageWindow.store.lastMessageChangedBetween(e2, t2));
1810
1862
  });
1811
1863
  }
1812
1864
  equal(e2, t2) {
1813
- return O(e2.snapshot, t2.snapshot);
1865
+ return W(e2.snapshot, t2.snapshot);
1814
1866
  }
1815
1867
  loadNested(e2, t2) {
1816
1868
  return __async(this, null, function* () {
1817
1869
  var _a2;
1818
1870
  if (!t2.snapshot) return c({ snapshot: null, loadedAll: true });
1819
- const s2 = yield t2.messageWindowStore.store.getDeep(e2);
1871
+ const s2 = yield t2.messageWindow.store.getDeep(e2);
1820
1872
  if (!s2.ok) return s2;
1821
1873
  const n2 = s2.value.snapshot, r2 = (_a2 = n2 == null ? void 0 : n2[0]) != null ? _a2 : null;
1822
- return c({ snapshot: __spreadProps(__spreadValues({}, t2.snapshot), { lastMessage: r2 }) });
1874
+ return c({ snapshot: _(__spreadProps(__spreadValues({}, t2.snapshot), { custom: _(t2.snapshot.custom), welcomeMessages: _(t2.snapshot.welcomeMessages), lastMessage: r2 })) });
1823
1875
  });
1824
1876
  }
1825
1877
  participantEdited(e2, t2) {
1826
- this.mutate(e2, (s2) => null === s2.value.snapshot ? (console.warn("[TalkJS] Received a 'participant.edited' event for a conversation that we thought didn't exist."), s2) : c({ lastChanged: e2, snapshot: Ae(s2.value.snapshot, t2.diff), messageWindowStore: s2.value.messageWindowStore }));
1878
+ this.mutate(e2, (s2) => null === s2.value.snapshot ? (console.warn("[TalkJS] Received a 'participant.edited' event for a conversation that we thought didn't exist."), s2) : c({ lastChanged: e2, snapshot: De(s2.value.snapshot, t2.diff), messageWindow: s2.value.messageWindow }));
1827
1879
  }
1828
1880
  conversationEdited(e2, t2) {
1829
- this.mutate(e2, (s2) => null === s2.value.snapshot ? (console.warn("[TalkJS] Received a 'conversation.edited' event for a conversation that we thought didn't exist."), s2) : c({ lastChanged: e2, snapshot: Ae(s2.value.snapshot, t2.diff), messageWindowStore: s2.value.messageWindowStore }));
1881
+ this.mutate(e2, (s2) => null === s2.value.snapshot ? (console.warn("[TalkJS] Received a 'conversation.edited' event for a conversation that we thought didn't exist."), s2) : c({ lastChanged: e2, snapshot: De(s2.value.snapshot, t2.diff), messageWindow: s2.value.messageWindow }));
1830
1882
  }
1831
1883
  sideEdited(e2, t2) {
1832
- this.mutate(e2, (s2) => null === s2.value.snapshot ? (console.warn("[TalkJS] Received a 'side.edited' event for a conversation that we thought didn't exist."), s2) : c({ lastChanged: e2, snapshot: Ae(s2.value.snapshot, t2.diff), messageWindowStore: s2.value.messageWindowStore }));
1884
+ this.mutate(e2, (s2) => null === s2.value.snapshot ? (console.warn("[TalkJS] Received a 'side.edited' event for a conversation that we thought didn't exist."), s2) : c({ lastChanged: e2, snapshot: De(s2.value.snapshot, t2.diff), messageWindow: s2.value.messageWindow }));
1833
1885
  }
1834
1886
  sideCreated(e2, t2) {
1835
- this.mutate(e2, (s2) => s2.value.snapshot ? s2 : c({ lastChanged: e2, snapshot: t2.state, messageWindowStore: s2.value.messageWindowStore }));
1887
+ this.mutate(e2, (s2) => s2.value.snapshot ? s2 : c({ lastChanged: e2, snapshot: t2.state, messageWindow: s2.value.messageWindow }));
1836
1888
  }
1837
1889
  sideDeleted(e2, t2) {
1838
- this.mutate(e2, (t3) => null === t3.value.snapshot ? t3 : c({ lastChanged: e2, snapshot: null, messageWindowStore: t3.value.messageWindowStore }));
1890
+ this.mutate(e2, (t3) => null === t3.value.snapshot ? t3 : c({ lastChanged: e2, snapshot: null, messageWindow: t3.value.messageWindow }));
1839
1891
  }
1840
1892
  getFromCache() {
1841
1893
  return __async(this, null, function* () {
@@ -1844,11 +1896,11 @@ class Ce extends q {
1844
1896
  });
1845
1897
  }
1846
1898
  }
1847
- function Ae(e2, t2) {
1899
+ function De(e2, t2) {
1848
1900
  const s2 = t2;
1849
- return { id: e2.id, createdAt: e2.createdAt, subject: _(e2.subject, s2.subject), photoUrl: _(e2.photoUrl, s2.photoUrl), welcomeMessages: _(e2.welcomeMessages, s2.welcomeMessages), custom: P(e2.custom, s2.custom), lastMessageAt: _(e2.lastMessageAt, s2.lastMessageAt), unreadMessageCount: _(e2.unreadMessageCount, s2.unreadMessageCount), isUnread: _(e2.isUnread, s2.isUnread), access: _(e2.access, s2.access), notify: _(e2.notify, s2.notify), readUntil: _(e2.readUntil, s2.readUntil), everyoneReadUntil: _(e2.everyoneReadUntil, s2.everyoneReadUntil), joinedAt: e2.joinedAt };
1901
+ return { id: e2.id, createdAt: e2.createdAt, subject: j(e2.subject, s2.subject), photoUrl: j(e2.photoUrl, s2.photoUrl), welcomeMessages: U(e2.welcomeMessages, s2.welcomeMessages), custom: $(e2.custom, s2.custom), lastMessageAt: j(e2.lastMessageAt, s2.lastMessageAt), unreadMessageCount: j(e2.unreadMessageCount, s2.unreadMessageCount), isUnread: j(e2.isUnread, s2.isUnread), access: j(e2.access, s2.access), notify: j(e2.notify, s2.notify), readUntil: j(e2.readUntil, s2.readUntil), everyoneReadUntil: j(e2.everyoneReadUntil, s2.everyoneReadUntil), joinedAt: e2.joinedAt };
1850
1902
  }
1851
- class Ee extends q {
1903
+ class Se extends z {
1852
1904
  constructor(e2, t2, s2, n2, r2) {
1853
1905
  super(e2, n2, r2), this.userId = t2, this.realtimeClient = s2, this.unsubscribeDebounceMs = 1e3;
1854
1906
  }
@@ -1859,7 +1911,7 @@ class Ee extends q {
1859
1911
  });
1860
1912
  }
1861
1913
  equal(e2, t2) {
1862
- return O(e2.data, t2.data);
1914
+ return W(e2.data, t2.data);
1863
1915
  }
1864
1916
  teardownNested(e2) {
1865
1917
  e2.user.unsubscribe();
@@ -1874,7 +1926,7 @@ class Ee extends q {
1874
1926
  const s2 = yield t2.user.store.getDeep(e2);
1875
1927
  if (!s2.ok) return s2;
1876
1928
  const n2 = s2.value.snapshot;
1877
- return null === t2.data || null === n2 ? c({ snapshot: null }) : c({ snapshot: __spreadValues({ user: n2 }, t2.data) });
1929
+ return null === t2.data || null === n2 ? c({ snapshot: null }) : c({ snapshot: _(__spreadProps(__spreadValues({}, t2.data), { user: n2 })) });
1878
1930
  });
1879
1931
  }
1880
1932
  userCreated(e2, t2) {
@@ -1898,9 +1950,9 @@ class Ee extends q {
1898
1950
  });
1899
1951
  }
1900
1952
  }
1901
- class ke {
1953
+ class Me {
1902
1954
  constructor(e2, t2, s2) {
1903
- this.realtimeClient = s2, this.convDataStores = {}, this.storeMap = {}, this.emitMutex = new U(), this.virtualSeqOffset = 0, this.realPublishSeq = 0, this.refetchOnNextNetworkLoss = true, this.connection = new N(e2, t2, { onUpstreamRestarting: () => {
1955
+ this.realtimeClient = s2, this.convDataStores = {}, this.storeMap = {}, this.emitMutex = new q(), this.virtualSeqOffset = 0, this.realPublishSeq = 0, this.refetchOnNextNetworkLoss = true, this.connection = new N(e2, t2, { onUpstreamRestarting: () => {
1904
1956
  this.refetchOnNextNetworkLoss = false;
1905
1957
  }, onReady: () => {
1906
1958
  this.refetchOnNextNetworkLoss = true;
@@ -1912,7 +1964,7 @@ class ke {
1912
1964
  }
1913
1965
  }, onResubscribeError: (e3, t3) => {
1914
1966
  var _a2;
1915
- (_a2 = this.storeMap[xe(e3)]) == null ? void 0 : _a2.setError(t3);
1967
+ (_a2 = this.storeMap[Fe(e3)]) == null ? void 0 : _a2.setError(t3);
1916
1968
  }, onPublish: (e3, t3) => {
1917
1969
  this.realPublishSeq = e3;
1918
1970
  const s3 = this.virtualSeq;
@@ -1933,7 +1985,7 @@ class ke {
1933
1985
  }));
1934
1986
  }
1935
1987
  handlePublish(e2, t2) {
1936
- var _a2, _b, _c, _d, _e2, _f, _g, _h, _i, _j, _k, _l, _m, _n, _o, _p, _q, _r, _s, _t2, _u, _v, _w, _x, _y, _z, _A, _B, _C, _D;
1988
+ var _a2, _b, _c, _d, _e2, _f, _g, _h, _i, _j, _k, _l, _m, _n, _o, _p, _q, _r, _s2, _t2, _u, _v, _w, _x, _y, _z, _A, _B, _C, _D;
1937
1989
  switch (t2.type) {
1938
1990
  case "user.created":
1939
1991
  return (_a2 = this.storeMap[`/users/${t2.userId}`]) == null ? void 0 : _a2.userCreated(e2, t2), (_b = this.storeMap["/me/conversations"]) == null ? void 0 : _b.userCreated(e2, t2), void ((_c = this.storeMap[`/users/${t2.userId}/online`]) == null ? void 0 : _c.userCreated(e2, t2));
@@ -1952,7 +2004,7 @@ class ke {
1952
2004
  case "message.edited":
1953
2005
  return void ((_r = this.storeMap[`/me/conversations/${t2.conversationId}/messages`]) == null ? void 0 : _r.messageEdited(e2, t2));
1954
2006
  case "message.deleted":
1955
- return void ((_s = this.storeMap[`/me/conversations/${t2.conversationId}/messages`]) == null ? void 0 : _s.messageDeleted(e2, t2));
2007
+ return void ((_s2 = this.storeMap[`/me/conversations/${t2.conversationId}/messages`]) == null ? void 0 : _s2.messageDeleted(e2, t2));
1956
2008
  case "typing.available":
1957
2009
  return void ((_t2 = this.storeMap[`/me/conversations/${t2.conversationId}/typing`]) == null ? void 0 : _t2.typingAvailable(e2, t2));
1958
2010
  case "typing.changed":
@@ -1978,7 +2030,7 @@ class ke {
1978
2030
  call(e2, t2, n2, r2) {
1979
2031
  return __async(this, null, function* () {
1980
2032
  if (!r2.bypassCache && "GET" === e2) {
1981
- const e3 = xe(t2);
2033
+ const e3 = Fe(t2);
1982
2034
  if (e3 in this.storeMap) {
1983
2035
  const t3 = e3, s2 = this.storeMap[t3];
1984
2036
  if (s2 && "getFromCache" in s2) {
@@ -2050,7 +2102,7 @@ class ke {
2050
2102
  });
2051
2103
  }
2052
2104
  getOrCreateStore(e2) {
2053
- const t2 = xe(e2);
2105
+ const t2 = Fe(e2);
2054
2106
  if (t2 in this.storeMap) return this.storeMap[t2];
2055
2107
  this.connection.subscribe(e2).then((e3) => {
2056
2108
  e3.ok || s2.setError(e3);
@@ -2067,13 +2119,13 @@ class ke {
2067
2119
  return this.connection.isConnected();
2068
2120
  }
2069
2121
  instantiateStore(e2, t2) {
2070
- if (s(e2, ["users", "*"])) return new G(this.virtualSeq, e2[1], this.realtimeClient, this.emitMutex, { onTeardown: t2 });
2071
- if (s(e2, ["me", "conversations", "*"])) return new le(this.virtualSeq, this.subscribeConvData(e2[2]), this.realtimeClient, this.emitMutex, { onTeardown: t2 });
2072
- if (s(e2, ["me", "conversations", "*", "messages"])) return new oe(this.virtualSeq, e2[2], this.realtimeClient, this.emitMutex, { onTeardown: t2, onLoadedMore: (e3) => this.onVirtualPublish(e3) });
2073
- if (s(e2, ["me", "conversations", "*", "participants"])) return new me(this.virtualSeq, e2[2], this.realtimeClient, this.emitMutex, { onTeardown: t2, onLoadedMore: (e3) => this.onVirtualPublish(e3) });
2074
- if (s(e2, ["me", "conversations", "*", "typing"])) return new pe(this.virtualSeq, e2[2], this.realtimeClient, this.emitMutex, { onTeardown: t2 });
2075
- if (s(e2, ["me", "conversations"])) return new we(this.virtualSeq, (e3) => this.subscribeConvData(e3), this.realtimeClient, this.emitMutex, { onTeardown: t2, onLoadedMore: (e3) => this.onVirtualPublish(e3) });
2076
- if (s(e2, ["users", "*", "online"])) return new Ee(this.virtualSeq, e2[1], this.realtimeClient, this.emitMutex, { onTeardown: t2 });
2122
+ if (s(e2, ["users", "*"])) return new ce(this.virtualSeq, e2[1], this.realtimeClient, this.emitMutex, { onTeardown: t2 });
2123
+ if (s(e2, ["me", "conversations", "*"])) return new ge(this.virtualSeq, this.subscribeConvData(e2[2]), this.realtimeClient, this.emitMutex, { onTeardown: t2 });
2124
+ if (s(e2, ["me", "conversations", "*", "messages"])) return new pe(this.virtualSeq, e2[2], this.realtimeClient, this.emitMutex, { onTeardown: t2, onLoadedMore: (e3) => this.onVirtualPublish(e3) });
2125
+ if (s(e2, ["me", "conversations", "*", "participants"])) return new Ce(this.virtualSeq, e2[2], this.realtimeClient, this.emitMutex, { onTeardown: t2, onLoadedMore: (e3) => this.onVirtualPublish(e3) });
2126
+ if (s(e2, ["me", "conversations", "*", "typing"])) return new be(this.virtualSeq, e2[2], this.realtimeClient, this.emitMutex, { onTeardown: t2 });
2127
+ if (s(e2, ["me", "conversations"])) return new ke(this.virtualSeq, (e3) => this.subscribeConvData(e3), this.realtimeClient, this.emitMutex, { onTeardown: t2, onLoadedMore: (e3) => this.onVirtualPublish(e3) });
2128
+ if (s(e2, ["users", "*", "online"])) return new Se(this.virtualSeq, e2[1], this.realtimeClient, this.emitMutex, { onTeardown: t2 });
2077
2129
  throw "Unreachable";
2078
2130
  }
2079
2131
  subscribeConvData(e2) {
@@ -2082,18 +2134,18 @@ class ke {
2082
2134
  const e3 = this.convDataStores[t2];
2083
2135
  return { store: e3, unsubscribe: e3.registerInternalSubscription() };
2084
2136
  }
2085
- const s2 = new Ce(this.virtualSeq, e2, this.realtimeClient, this.emitMutex, { onTeardown: () => {
2137
+ const s2 = new Te(this.virtualSeq, e2, this.realtimeClient, this.emitMutex, { onTeardown: () => {
2086
2138
  delete this.convDataStores[t2];
2087
2139
  } });
2088
2140
  return this.convDataStores[t2] = s2, { store: s2, unsubscribe: s2.registerInternalSubscription() };
2089
2141
  }
2090
2142
  }
2091
- function xe(e2) {
2143
+ function Fe(e2) {
2092
2144
  return `/${e2.join("/")}`;
2093
2145
  }
2094
- class Ie {
2146
+ class Be {
2095
2147
  constructor(e2, t2, s2) {
2096
- this.userId = t2, this.alive = true, this.connection = new ke(e2, s2, this), s2.onTokenRefreshFailed(() => {
2148
+ this.userId = t2, this.alive = true, this.connection = new Me(e2, s2, this), s2.onTokenRefreshFailed(() => {
2097
2149
  this.destroy();
2098
2150
  });
2099
2151
  }
@@ -2118,28 +2170,22 @@ class Ie {
2118
2170
  listMessages(e2, t2) {
2119
2171
  return __async(this, null, function* () {
2120
2172
  const s2 = yield this.call("GET", ["me", "conversations", e2, "messages"], t2);
2121
- if (!s2.ok) return Se(s2, "Listing messages in " + e2);
2122
- const n2 = s2.value.data.data, r2 = yield Promise.all(n2.map((t3) => this.createMessageSnapshot(t3, e2))), i2 = r2.find((e3) => !e3.ok);
2173
+ if (!s2.ok) return Re(s2, "Listing messages in " + e2);
2174
+ const n2 = s2.value.data.data, r2 = yield Promise.all(n2.map((t3) => this.hydrateMessageData(t3, e2))), i2 = r2.find((e3) => !e3.ok);
2123
2175
  if (void 0 !== i2 && !i2.ok) return i2;
2124
2176
  return c(r2.map(({ value: e3 }) => e3));
2125
2177
  });
2126
2178
  }
2127
- createConversationSnapshotPreloaded(e2, t2) {
2128
- return { id: e2.id, subject: e2.subject, photoUrl: e2.photoUrl, welcomeMessages: e2.welcomeMessages, custom: e2.custom, createdAt: e2.createdAt, joinedAt: e2.joinedAt, lastMessageAt: e2.lastMessageAt, unreadMessageCount: e2.unreadMessageCount, isUnread: e2.isUnread, access: e2.access, notify: e2.notify, lastMessage: t2, readUntil: e2.readUntil, everyoneReadUntil: e2.everyoneReadUntil };
2129
- }
2130
- createUserSnapshot(e2) {
2131
- return { id: e2.id, name: e2.name, custom: e2.custom, locale: e2.locale, photoUrl: e2.photoUrl, role: e2.role, welcomeMessage: e2.welcomeMessage };
2132
- }
2133
- createParticipantSnapshotPreloaded(e2, t2) {
2134
- return { user: t2, access: e2.access, notify: e2.notify, joinedAt: e2.joinedAt };
2135
- }
2136
- createMessageSnapshot(e2, t2) {
2179
+ hydrateMessageData(e2, t2) {
2137
2180
  return __async(this, null, function* () {
2138
2181
  const s2 = null === e2.senderId ? Promise.resolve(c(null)) : this.getUser(e2.senderId), n2 = null === e2.referencedMessageId ? Promise.resolve(c(null)) : this.getReferencedMessage(t2, e2.referencedMessageId), r2 = yield s2;
2139
2182
  if (!r2.ok) return r2;
2140
2183
  const i2 = yield n2;
2141
2184
  if (!i2.ok) return i2;
2142
- return c(this.createMessageSnapshotPreloaded(e2, r2.value, i2.value));
2185
+ const a2 = function(e3, t3, s3) {
2186
+ return _({ id: e3.id, type: e3.type, sender: t3, referencedMessage: s3, custom: _(e3.custom), createdAt: e3.createdAt, editedAt: e3.editedAt, origin: e3.origin, content: e3.content, reactions: ue(e3.reactions), plaintext: re(e3.content, {}) });
2187
+ }(e2, r2.value, i2.value);
2188
+ return c(a2);
2143
2189
  });
2144
2190
  }
2145
2191
  getReferencedMessage(e2, t2) {
@@ -2147,37 +2193,33 @@ class Ie {
2147
2193
  const s2 = yield this.call("GET", ["me", "conversations", e2, "messages", t2], {});
2148
2194
  if (!s2.ok && "server" === s2.where && 404 === s2.value.status) return c(null);
2149
2195
  if (!s2.ok && "server" === s2.where && 403 === s2.value.status && "NOT_A_PARTICIPANT" === s2.value.errorCode) return c(null);
2150
- if (!s2.ok) return Se(s2, `Fetching referenced message ${t2} in conversation ${e2}`);
2196
+ if (!s2.ok) return Re(s2, `Fetching referenced message ${t2} in conversation ${e2}`);
2151
2197
  const n2 = s2.value.data, r2 = yield this.getUser(n2.senderId);
2152
2198
  if (!r2.ok) return r2;
2153
- const i2 = r2.value;
2154
- return c(this.createReferencedMessageSnapshotPreloaded(n2, i2));
2199
+ const i2 = function(e3, t3) {
2200
+ return _({ id: e3.id, type: e3.type, sender: t3, referencedMessageId: e3.referencedMessageId, custom: _(e3.custom), createdAt: e3.createdAt, editedAt: e3.editedAt, origin: e3.origin, content: e3.content, reactions: ue(e3.reactions), plaintext: re(e3.content, {}) });
2201
+ }(n2, r2.value);
2202
+ return c(i2);
2155
2203
  });
2156
2204
  }
2157
2205
  getUser(e2) {
2158
2206
  return __async(this, null, function* () {
2159
2207
  const t2 = yield this.call("GET", ["users", e2], { includePrivateFields: false });
2160
2208
  if (!t2.ok && "server" === t2.where && 404 === t2.value.status) return c(null);
2161
- if (!t2.ok) return Se(t2, "Get user " + e2);
2162
- return c(this.createUserSnapshot(t2.value.data));
2209
+ if (!t2.ok) return Re(t2, "Get user " + e2);
2210
+ return c(ae(t2.value.data));
2163
2211
  });
2164
2212
  }
2165
- createMessageSnapshotPreloaded(e2, t2, s2) {
2166
- return { id: e2.id, type: e2.type, sender: t2, referencedMessage: s2, custom: e2.custom, createdAt: e2.createdAt, editedAt: e2.editedAt, origin: e2.origin, content: e2.content, reactions: ie(e2.reactions), plaintext: te(e2.content, {}) };
2167
- }
2168
- createReferencedMessageSnapshotPreloaded(e2, t2) {
2169
- return { id: e2.id, type: e2.type, sender: t2, referencedMessageId: e2.referencedMessageId, custom: e2.custom, createdAt: e2.createdAt, editedAt: e2.editedAt, origin: e2.origin, content: e2.content, reactions: ie(e2.reactions), plaintext: te(e2.content, {}) };
2170
- }
2171
2213
  }
2172
- function Se(e2, t2) {
2214
+ function Re(e2, t2) {
2173
2215
  return "server" === e2.where ? h(__spreadProps(__spreadValues({}, e2.value), { operation: t2 })) : e2;
2174
2216
  }
2175
- function Te(e2, s2) {
2217
+ function Ne(e2, s2) {
2176
2218
  var _a2;
2177
2219
  if (s2.ok) return s2.value;
2178
2220
  throw "SESSION_DESTROYED" === s2.value ? new Error(`${e2} failed because the session was destroyed`) : new Error(t((_a2 = s2.value.operation) != null ? _a2 : e2, s2.value));
2179
2221
  }
2180
- class De {
2222
+ class _e {
2181
2223
  constructor(e2, t2) {
2182
2224
  this.id = e2, this._realtimeClient = t2;
2183
2225
  }
@@ -2187,7 +2229,7 @@ class De {
2187
2229
  get() {
2188
2230
  return __async(this, null, function* () {
2189
2231
  const e2 = yield this._realtimeClient.getUser(this.brandedId);
2190
- return Te("Get user " + this.id, e2);
2232
+ return Ne("Get user " + this.id, e2);
2191
2233
  });
2192
2234
  }
2193
2235
  set(t2) {
@@ -2211,7 +2253,7 @@ class De {
2211
2253
  return this._realtimeClient.subscribe(["users", this.brandedId, "online"], e2);
2212
2254
  }
2213
2255
  }
2214
- class Me {
2256
+ class Pe {
2215
2257
  constructor(e2, t2, s2) {
2216
2258
  this.userId = e2, this.conversationId = t2, this._realtimeClient = s2;
2217
2259
  }
@@ -2226,8 +2268,7 @@ class Me {
2226
2268
  const t2 = yield this._realtimeClient.call("GET", ["me", "conversations", this.brandedConversationId, "participants", this.brandedUserId], {}), s2 = yield this._realtimeClient.call("GET", ["users", this.brandedUserId], { includePrivateFields: false }), [n2, r2] = yield Promise.all([t2, s2]);
2227
2269
  if (!n2.ok && "server" === n2.where && 404 === n2.value.status) return null;
2228
2270
  if (!r2.ok && "server" === r2.where && 404 === r2.value.status) return null;
2229
- const i2 = e(`Get participant ${this.userId} in conversation ${this.conversationId}`, n2), a2 = e(`Get user ${this.userId}`, r2), o2 = this._realtimeClient.createUserSnapshot(a2);
2230
- return this._realtimeClient.createParticipantSnapshotPreloaded(i2, o2);
2271
+ return oe(e(`Get participant ${this.userId} in conversation ${this.conversationId}`, n2), ae(e(`Get user ${this.userId}`, r2)));
2231
2272
  });
2232
2273
  }
2233
2274
  set() {
@@ -2255,7 +2296,7 @@ class Me {
2255
2296
  });
2256
2297
  }
2257
2298
  }
2258
- function Fe(e2) {
2299
+ function Oe(e2) {
2259
2300
  const t2 = "-0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ_abcdefghijklmnopqrstuvwxyz";
2260
2301
  let s2 = 0;
2261
2302
  const n2 = [], r2 = e2 === s2;
@@ -2273,7 +2314,7 @@ function Fe(e2) {
2273
2314
  if (20 != a2.length) throw new Error("Length should be 20.");
2274
2315
  return a2;
2275
2316
  }
2276
- const Be = (e2, t2, s2 = void 0) => function(e3, t3) {
2317
+ const je = (e2, t2, s2 = void 0) => function(e3, t3) {
2277
2318
  return e3.reduce((e4, s3, n2) => e4.concat(t3(s3, n2)), []);
2278
2319
  }(e2, (e3) => {
2279
2320
  if ("string" == typeof e3) return t2(e3, s2);
@@ -2286,14 +2327,14 @@ const Be = (e2, t2, s2 = void 0) => function(e3, t3) {
2286
2327
  case "bulletList":
2287
2328
  case "bulletpoint":
2288
2329
  case "bulletPoint":
2289
- return [{ type: e3.type, children: Be(e3.children, t2, e3.type) }];
2330
+ return [{ type: e3.type, children: je(e3.children, t2, e3.type) }];
2290
2331
  case "link":
2291
- return [{ type: e3.type, url: e3.url, children: Be(e3.children, t2, e3.type) }];
2332
+ return [{ type: e3.type, url: e3.url, children: je(e3.children, t2, e3.type) }];
2292
2333
  case "actionlink":
2293
2334
  case "actionLink":
2294
2335
  case "actionbutton":
2295
2336
  case "actionButton":
2296
- return [{ type: e3.type, action: e3.action, params: e3.params, children: Be(e3.children, t2, e3.type) }];
2337
+ return [{ type: e3.type, action: e3.action, params: e3.params, children: je(e3.children, t2, e3.type) }];
2297
2338
  case "mention":
2298
2339
  case "autolink":
2299
2340
  case "autoLink":
@@ -2308,12 +2349,12 @@ const Be = (e2, t2, s2 = void 0) => function(e3, t3) {
2308
2349
  return [e3];
2309
2350
  }
2310
2351
  });
2311
- function Re(e2, t2) {
2352
+ function Ue(e2, t2) {
2312
2353
  return (s2) => {
2313
2354
  const n2 = s2;
2314
2355
  let r2 = 0;
2315
2356
  const i2 = [];
2316
- for (const a2 of J(s2, e2)) {
2357
+ for (const a2 of V(s2, e2)) {
2317
2358
  a2.index - r2 > 0 && i2.push(n2.substring(r2, a2.index));
2318
2359
  const e3 = t2(a2);
2319
2360
  Array.isArray(e3) ? i2.push(...e3) : i2.push(e3), r2 = a2.index + a2[0].length;
@@ -2321,29 +2362,29 @@ function Re(e2, t2) {
2321
2362
  return r2 < s2.length && i2.push(s2.substring(r2)), i2;
2322
2363
  };
2323
2364
  }
2324
- const Ne = "’'()[]{}<>:,‒–—―…!.«»-‐?‘’“”;/⁄␠·&@*\\•^¤¢$€£¥₩₪†‡°¡¿¬#№%‰‱¶′§~¨_|¦⁂☞∴‽※".replace(/[-[\]{}()*+?.,\\^$|#\s]/g, "\\$&");
2325
- var _e = ((e2) => (e2[e2.italic = 1] = "italic", e2[e2.strikethrough = 2] = "strikethrough", e2[e2.bold = 4] = "bold", e2))(_e || {});
2326
- const Pe = [0, 1, 2, 3, 4, 5, 6].map((e2) => {
2365
+ const $e = "’'()[]{}<>:,‒–—―…!.«»-‐?‘’“”;/⁄␠·&@*\\•^¤¢$€£¥₩₪†‡°¡¿¬#№%‰‱¶′§~¨_|¦⁂☞∴‽※".replace(/[-[\]{}()*+?.,\\^$|#\s]/g, "\\$&");
2366
+ var We = ((e2) => (e2[e2.italic = 1] = "italic", e2[e2.strikethrough = 2] = "strikethrough", e2[e2.bold = 4] = "bold", e2))(We || {});
2367
+ const qe = [0, 1, 2, 3, 4, 5, 6].map((e2) => {
2327
2368
  const t2 = [];
2328
2369
  return 1 & e2 || t2.push(/_([^\s_].*?[^\s_])_|_([^\s_])_/), 2 & e2 || t2.push(/~([^\s~].*?[^\s~])~|~([^\s~])~/), 4 & e2 || t2.push(/\*([^\s*].*?[^\s*])\*|\*([^\s*])\*/), new RegExp(t2.map((e3) => e3.source).join("|"), "g");
2329
- }), Oe = { _: 1, "*": 4, "~": 2 };
2330
- function Ue(e2) {
2331
- return je(e2, 0);
2370
+ }), He = { _: 1, "*": 4, "~": 2 };
2371
+ function Le(e2) {
2372
+ return Ge(e2, 0);
2332
2373
  }
2333
- function je(e2, t2 = 0) {
2334
- const s2 = Pe[t2], n2 = s2 ? function(e3) {
2335
- const t3 = $e.getOrCompute(e3, () => new RegExp(`(?:^|[\\s${Ne}])(?:${e3.source})(?=[\\s${Ne}]|$)`, "g")), s3 = Re(t3, (e4) => {
2374
+ function Ge(e2, t2 = 0) {
2375
+ const s2 = qe[t2], n2 = s2 ? function(e3) {
2376
+ const t3 = ze.getOrCompute(e3, () => new RegExp(`(?:^|[\\s${$e}])(?:${e3.source})(?=[\\s${$e}]|$)`, "g")), s3 = Ue(t3, (e4) => {
2336
2377
  const t4 = e4[0][1], s4 = e4[1] || e4[2] || e4[3] || e4[4] || e4[5] || e4[6];
2337
- return [" ", { type: _e[Oe[t4]], children: [s4] }];
2378
+ return [" ", { type: We[He[t4]], children: [s4] }];
2338
2379
  });
2339
2380
  return (e4) => {
2340
2381
  const [t4, ...n3] = s3(" " + e4);
2341
2382
  return t4.length > 1 && n3.unshift(t4.substring(1)), n3;
2342
2383
  };
2343
2384
  }(s2) : () => [e2];
2344
- return Be(n2(e2), (e3, s3) => "bold" === s3 || "italic" === s3 || "strikethrough" === s3 ? je(e3, t2 | _e[s3]) : [e3]);
2385
+ return je(n2(e2), (e3, s3) => "bold" === s3 || "italic" === s3 || "strikethrough" === s3 ? Ge(e3, t2 | We[s3]) : [e3]);
2345
2386
  }
2346
- const $e = function() {
2387
+ const ze = function() {
2347
2388
  const e2 = function() {
2348
2389
  try {
2349
2390
  return /* @__PURE__ */ new WeakMap();
@@ -2359,18 +2400,18 @@ const $e = function() {
2359
2400
  return e2.set(t2, n2), n2;
2360
2401
  } };
2361
2402
  }();
2362
- function We(e2, t2) {
2403
+ function Je(e2, t2) {
2363
2404
  if (Array.prototype.indexOf) return e2.indexOf(t2);
2364
2405
  for (var s2 = 0, n2 = e2.length; s2 < n2; s2++) if (e2[s2] === t2) return s2;
2365
2406
  return -1;
2366
2407
  }
2367
- function qe(e2, t2) {
2408
+ function Ye(e2, t2) {
2368
2409
  for (var s2 = e2.length - 1; s2 >= 0; s2--) true === t2(e2[s2]) && e2.splice(s2, 1);
2369
2410
  }
2370
- function He(e2) {
2411
+ function Qe(e2) {
2371
2412
  throw new Error("Unhandled case for value: '" + e2 + "'");
2372
2413
  }
2373
- var Ge = function() {
2414
+ var Ve = function() {
2374
2415
  function e2(e3) {
2375
2416
  void 0 === e3 && (e3 = {}), this.tagName = "", this.attrs = {}, this.innerHTML = "", this.whitespaceRegex = /\s+/, this.tagName = e3.tagName || "", this.attrs = e3.attrs || {}, this.innerHTML = e3.innerHtml || e3.innerHTML || "";
2376
2417
  }
@@ -2389,11 +2430,11 @@ var Ge = function() {
2389
2430
  }, e2.prototype.setClass = function(e3) {
2390
2431
  return this.setAttr("class", e3);
2391
2432
  }, e2.prototype.addClass = function(e3) {
2392
- for (var t2, s2 = this.getClass(), n2 = this.whitespaceRegex, r2 = s2 ? s2.split(n2) : [], i2 = e3.split(n2); t2 = i2.shift(); ) -1 === We(r2, t2) && r2.push(t2);
2433
+ for (var t2, s2 = this.getClass(), n2 = this.whitespaceRegex, r2 = s2 ? s2.split(n2) : [], i2 = e3.split(n2); t2 = i2.shift(); ) -1 === Je(r2, t2) && r2.push(t2);
2393
2434
  return this.getAttrs().class = r2.join(" "), this;
2394
2435
  }, e2.prototype.removeClass = function(e3) {
2395
2436
  for (var t2, s2 = this.getClass(), n2 = this.whitespaceRegex, r2 = s2 ? s2.split(n2) : [], i2 = e3.split(n2); r2.length && (t2 = i2.shift()); ) {
2396
- var a2 = We(r2, t2);
2437
+ var a2 = Je(r2, t2);
2397
2438
  -1 !== a2 && r2.splice(a2, 1);
2398
2439
  }
2399
2440
  return this.getAttrs().class = r2.join(" "), this;
@@ -2419,12 +2460,12 @@ var Ge = function() {
2419
2460
  return t2.join(" ");
2420
2461
  }, e2;
2421
2462
  }();
2422
- var Le = function() {
2463
+ var Ze = function() {
2423
2464
  function e2(e3) {
2424
2465
  void 0 === e3 && (e3 = {}), this.newWindow = false, this.truncate = {}, this.className = "", this.newWindow = e3.newWindow || false, this.truncate = e3.truncate || {}, this.className = e3.className || "";
2425
2466
  }
2426
2467
  return e2.prototype.build = function(e3) {
2427
- return new Ge({ tagName: "a", attrs: this.createAttrs(e3), innerHtml: this.processAnchorText(e3.getAnchorText()) });
2468
+ return new Ve({ tagName: "a", attrs: this.createAttrs(e3), innerHtml: this.processAnchorText(e3.getAnchorText()) });
2428
2469
  }, e2.prototype.createAttrs = function(e3) {
2429
2470
  var t2 = { href: e3.getAnchorHref() }, s2 = this.createCssClass(e3);
2430
2471
  return s2 && (t2.class = s2), this.newWindow && (t2.target = "_blank", t2.rel = "noopener noreferrer"), this.truncate && this.truncate.length && this.truncate.length < e3.getAnchorText().length && (t2.title = e3.getAnchorHref()), t2;
@@ -2494,7 +2535,7 @@ var Le = function() {
2494
2535
  }(e4, t3, s3);
2495
2536
  }(e3, s2);
2496
2537
  }, e2;
2497
- }(), ze = function() {
2538
+ }(), Ke = function() {
2498
2539
  function e2(e3) {
2499
2540
  this.__jsduckDummyDocProp = null, this.matchedText = "", this.offset = 0, this.tagBuilder = e3.tagBuilder, this.matchedText = e3.matchedText, this.offset = e3.offset;
2500
2541
  }
@@ -2509,30 +2550,30 @@ var Le = function() {
2509
2550
  }, e2.prototype.buildTag = function() {
2510
2551
  return this.tagBuilder.build(this);
2511
2552
  }, e2;
2512
- }(), Je = function(e2, t2) {
2513
- return Je = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(e3, t3) {
2553
+ }(), Xe = function(e2, t2) {
2554
+ return Xe = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(e3, t3) {
2514
2555
  e3.__proto__ = t3;
2515
2556
  } || function(e3, t3) {
2516
2557
  for (var s2 in t3) t3.hasOwnProperty(s2) && (e3[s2] = t3[s2]);
2517
- }, Je(e2, t2);
2558
+ }, Xe(e2, t2);
2518
2559
  };
2519
- function Ye(e2, t2) {
2560
+ function et(e2, t2) {
2520
2561
  function s2() {
2521
2562
  this.constructor = e2;
2522
2563
  }
2523
- Je(e2, t2), e2.prototype = null === t2 ? Object.create(t2) : (s2.prototype = t2.prototype, new s2());
2564
+ Xe(e2, t2), e2.prototype = null === t2 ? Object.create(t2) : (s2.prototype = t2.prototype, new s2());
2524
2565
  }
2525
- var Qe, Ve = function() {
2526
- return Ve = Object.assign || function(e2) {
2566
+ var tt, st = function() {
2567
+ return st = Object.assign || function(e2) {
2527
2568
  for (var t2, s2 = 1, n2 = arguments.length; s2 < n2; s2++) for (var r2 in t2 = arguments[s2]) Object.prototype.hasOwnProperty.call(t2, r2) && (e2[r2] = t2[r2]);
2528
2569
  return e2;
2529
- }, Ve.apply(this, arguments);
2530
- }, Ze = function(e2) {
2570
+ }, st.apply(this, arguments);
2571
+ }, nt = function(e2) {
2531
2572
  function t2(t3) {
2532
2573
  var s2 = e2.call(this, t3) || this;
2533
2574
  return s2.email = "", s2.email = t3.email, s2;
2534
2575
  }
2535
- return Ye(t2, e2), t2.prototype.getType = function() {
2576
+ return et(t2, e2), t2.prototype.getType = function() {
2536
2577
  return "email";
2537
2578
  }, t2.prototype.getEmail = function() {
2538
2579
  return this.email;
@@ -2541,12 +2582,12 @@ var Qe, Ve = function() {
2541
2582
  }, t2.prototype.getAnchorText = function() {
2542
2583
  return this.email;
2543
2584
  }, t2;
2544
- }(ze), Ke = function(e2) {
2585
+ }(Ke), rt = function(e2) {
2545
2586
  function t2(t3) {
2546
2587
  var s2 = e2.call(this, t3) || this;
2547
2588
  return s2.serviceName = "", s2.hashtag = "", s2.serviceName = t3.serviceName, s2.hashtag = t3.hashtag, s2;
2548
2589
  }
2549
- return Ye(t2, e2), t2.prototype.getType = function() {
2590
+ return et(t2, e2), t2.prototype.getType = function() {
2550
2591
  return "hashtag";
2551
2592
  }, t2.prototype.getServiceName = function() {
2552
2593
  return this.serviceName;
@@ -2567,12 +2608,12 @@ var Qe, Ve = function() {
2567
2608
  }, t2.prototype.getAnchorText = function() {
2568
2609
  return "#" + this.hashtag;
2569
2610
  }, t2;
2570
- }(ze), Xe = function(e2) {
2611
+ }(Ke), it = function(e2) {
2571
2612
  function t2(t3) {
2572
2613
  var s2 = e2.call(this, t3) || this;
2573
2614
  return s2.serviceName = "twitter", s2.mention = "", s2.mention = t3.mention, s2.serviceName = t3.serviceName, s2;
2574
2615
  }
2575
- return Ye(t2, e2), t2.prototype.getType = function() {
2616
+ return et(t2, e2), t2.prototype.getType = function() {
2576
2617
  return "mention";
2577
2618
  }, t2.prototype.getMention = function() {
2578
2619
  return this.mention;
@@ -2595,12 +2636,12 @@ var Qe, Ve = function() {
2595
2636
  var t3 = e2.prototype.getCssClassSuffixes.call(this), s2 = this.getServiceName();
2596
2637
  return s2 && t3.push(s2), t3;
2597
2638
  }, t2;
2598
- }(ze), et = function(e2) {
2639
+ }(Ke), at = function(e2) {
2599
2640
  function t2(t3) {
2600
2641
  var s2 = e2.call(this, t3) || this;
2601
2642
  return s2.number = "", s2.plusSign = false, s2.number = t3.number, s2.plusSign = t3.plusSign, s2;
2602
2643
  }
2603
- return Ye(t2, e2), t2.prototype.getType = function() {
2644
+ return et(t2, e2), t2.prototype.getType = function() {
2604
2645
  return "phone";
2605
2646
  }, t2.prototype.getPhoneNumber = function() {
2606
2647
  return this.number;
@@ -2611,12 +2652,12 @@ var Qe, Ve = function() {
2611
2652
  }, t2.prototype.getAnchorText = function() {
2612
2653
  return this.matchedText;
2613
2654
  }, t2;
2614
- }(ze), tt = function(e2) {
2655
+ }(Ke), ot = function(e2) {
2615
2656
  function t2(t3) {
2616
2657
  var s2 = e2.call(this, t3) || this;
2617
2658
  return s2.url = "", s2.urlMatchType = "scheme", s2.protocolUrlMatch = false, s2.protocolRelativeMatch = false, s2.stripPrefix = { scheme: true, www: true }, s2.stripTrailingSlash = true, s2.decodePercentEncoding = true, s2.schemePrefixRegex = /^(https?:\/\/)?/i, s2.wwwPrefixRegex = /^(https?:\/\/)?(www\.)?/i, s2.protocolRelativeRegex = /^\/\//, s2.protocolPrepended = false, s2.urlMatchType = t3.urlMatchType, s2.url = t3.url, s2.protocolUrlMatch = t3.protocolUrlMatch, s2.protocolRelativeMatch = t3.protocolRelativeMatch, s2.stripPrefix = t3.stripPrefix, s2.stripTrailingSlash = t3.stripTrailingSlash, s2.decodePercentEncoding = t3.decodePercentEncoding, s2;
2618
2659
  }
2619
- return Ye(t2, e2), t2.prototype.getType = function() {
2660
+ return et(t2, e2), t2.prototype.getType = function() {
2620
2661
  return "url";
2621
2662
  }, t2.prototype.getUrlMatchType = function() {
2622
2663
  return this.urlMatchType;
@@ -2644,19 +2685,19 @@ var Qe, Ve = function() {
2644
2685
  return t3;
2645
2686
  }
2646
2687
  }, t2;
2647
- }(ze), st = function(e2) {
2688
+ }(Ke), ut = function(e2) {
2648
2689
  this.__jsduckDummyDocProp = null, this.tagBuilder = e2.tagBuilder;
2649
- }, nt = /[A-Za-z]/, rt = /[\d]/, it = /[\D]/, at = /\s/, ot = /['"]/, ut = /[\x00-\x1F\x7F]/, ct = /A-Za-z\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u052F\u0531-\u0556\u0559\u0561-\u0587\u05D0-\u05EA\u05F0-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u08A0-\u08B4\u08B6-\u08BD\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0980\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0AF9\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D\u0C58-\u0C5A\u0C60\u0C61\u0C80\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D54-\u0D56\u0D5F-\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16F1-\u16F8\u1700-\u170C\u170E-\u1711\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1877\u1880-\u1884\u1887-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191E\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4B\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1C80-\u1C88\u1CE9-\u1CEC\u1CEE-\u1CF1\u1CF5\u1CF6\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2183\u2184\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2E2F\u3005\u3006\u3031-\u3035\u303B\u303C\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FD5\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6E5\uA717-\uA71F\uA722-\uA788\uA78B-\uA7AE\uA7B0-\uA7B7\uA7F7-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA8FD\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uA9E0-\uA9E4\uA9E6-\uA9EF\uA9FA-\uA9FE\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA7E-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB65\uAB70-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC/.source, lt = ct + /\u2700-\u27bf\udde6-\uddff\ud800-\udbff\udc00-\udfff\ufe0e\ufe0f\u0300-\u036f\ufe20-\ufe23\u20d0-\u20f0\ud83c\udffb-\udfff\u200d\u3299\u3297\u303d\u3030\u24c2\ud83c\udd70-\udd71\udd7e-\udd7f\udd8e\udd91-\udd9a\udde6-\uddff\ude01-\ude02\ude1a\ude2f\ude32-\ude3a\ude50-\ude51\u203c\u2049\u25aa-\u25ab\u25b6\u25c0\u25fb-\u25fe\u00a9\u00ae\u2122\u2139\udc04\u2600-\u26FF\u2b05\u2b06\u2b07\u2b1b\u2b1c\u2b50\u2b55\u231a\u231b\u2328\u23cf\u23e9-\u23f3\u23f8-\u23fa\udccf\u2935\u2934\u2190-\u21ff/.source + /\u0300-\u036F\u0483-\u0489\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u0610-\u061A\u064B-\u065F\u0670\u06D6-\u06DC\u06DF-\u06E4\u06E7\u06E8\u06EA-\u06ED\u0711\u0730-\u074A\u07A6-\u07B0\u07EB-\u07F3\u0816-\u0819\u081B-\u0823\u0825-\u0827\u0829-\u082D\u0859-\u085B\u08D4-\u08E1\u08E3-\u0903\u093A-\u093C\u093E-\u094F\u0951-\u0957\u0962\u0963\u0981-\u0983\u09BC\u09BE-\u09C4\u09C7\u09C8\u09CB-\u09CD\u09D7\u09E2\u09E3\u0A01-\u0A03\u0A3C\u0A3E-\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A70\u0A71\u0A75\u0A81-\u0A83\u0ABC\u0ABE-\u0AC5\u0AC7-\u0AC9\u0ACB-\u0ACD\u0AE2\u0AE3\u0B01-\u0B03\u0B3C\u0B3E-\u0B44\u0B47\u0B48\u0B4B-\u0B4D\u0B56\u0B57\u0B62\u0B63\u0B82\u0BBE-\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCD\u0BD7\u0C00-\u0C03\u0C3E-\u0C44\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C62\u0C63\u0C81-\u0C83\u0CBC\u0CBE-\u0CC4\u0CC6-\u0CC8\u0CCA-\u0CCD\u0CD5\u0CD6\u0CE2\u0CE3\u0D01-\u0D03\u0D3E-\u0D44\u0D46-\u0D48\u0D4A-\u0D4D\u0D57\u0D62\u0D63\u0D82\u0D83\u0DCA\u0DCF-\u0DD4\u0DD6\u0DD8-\u0DDF\u0DF2\u0DF3\u0E31\u0E34-\u0E3A\u0E47-\u0E4E\u0EB1\u0EB4-\u0EB9\u0EBB\u0EBC\u0EC8-\u0ECD\u0F18\u0F19\u0F35\u0F37\u0F39\u0F3E\u0F3F\u0F71-\u0F84\u0F86\u0F87\u0F8D-\u0F97\u0F99-\u0FBC\u0FC6\u102B-\u103E\u1056-\u1059\u105E-\u1060\u1062-\u1064\u1067-\u106D\u1071-\u1074\u1082-\u108D\u108F\u109A-\u109D\u135D-\u135F\u1712-\u1714\u1732-\u1734\u1752\u1753\u1772\u1773\u17B4-\u17D3\u17DD\u180B-\u180D\u1885\u1886\u18A9\u1920-\u192B\u1930-\u193B\u1A17-\u1A1B\u1A55-\u1A5E\u1A60-\u1A7C\u1A7F\u1AB0-\u1ABE\u1B00-\u1B04\u1B34-\u1B44\u1B6B-\u1B73\u1B80-\u1B82\u1BA1-\u1BAD\u1BE6-\u1BF3\u1C24-\u1C37\u1CD0-\u1CD2\u1CD4-\u1CE8\u1CED\u1CF2-\u1CF4\u1CF8\u1CF9\u1DC0-\u1DF5\u1DFB-\u1DFF\u20D0-\u20F0\u2CEF-\u2CF1\u2D7F\u2DE0-\u2DFF\u302A-\u302F\u3099\u309A\uA66F-\uA672\uA674-\uA67D\uA69E\uA69F\uA6F0\uA6F1\uA802\uA806\uA80B\uA823-\uA827\uA880\uA881\uA8B4-\uA8C5\uA8E0-\uA8F1\uA926-\uA92D\uA947-\uA953\uA980-\uA983\uA9B3-\uA9C0\uA9E5\uAA29-\uAA36\uAA43\uAA4C\uAA4D\uAA7B-\uAA7D\uAAB0\uAAB2-\uAAB4\uAAB7\uAAB8\uAABE\uAABF\uAAC1\uAAEB-\uAAEF\uAAF5\uAAF6\uABE3-\uABEA\uABEC\uABED\uFB1E\uFE00-\uFE0F\uFE20-\uFE2F/.source, ht = /0-9\u0660-\u0669\u06F0-\u06F9\u07C0-\u07C9\u0966-\u096F\u09E6-\u09EF\u0A66-\u0A6F\u0AE6-\u0AEF\u0B66-\u0B6F\u0BE6-\u0BEF\u0C66-\u0C6F\u0CE6-\u0CEF\u0D66-\u0D6F\u0DE6-\u0DEF\u0E50-\u0E59\u0ED0-\u0ED9\u0F20-\u0F29\u1040-\u1049\u1090-\u1099\u17E0-\u17E9\u1810-\u1819\u1946-\u194F\u19D0-\u19D9\u1A80-\u1A89\u1A90-\u1A99\u1B50-\u1B59\u1BB0-\u1BB9\u1C40-\u1C49\u1C50-\u1C59\uA620-\uA629\uA8D0-\uA8D9\uA900-\uA909\uA9D0-\uA9D9\uA9F0-\uA9F9\uAA50-\uAA59\uABF0-\uABF9\uFF10-\uFF19/.source, dt = lt + ht, pt = lt + ht, ft = "(?:[" + ht + "]{1,3}\\.){3}[" + ht + "]{1,3}", mt = "[" + pt + "](?:[" + pt + "\\-]{0,61}[" + pt + "])?", gt = function(e2) {
2650
- return "(?=(" + mt + "))\\" + e2;
2651
- }, vt = function(e2) {
2652
- return "(?:" + gt(e2) + "(?:\\." + gt(e2 + 1) + "){0,126}|" + ft + ")";
2653
- }, wt = new RegExp("[" + pt + "]"), bt = /(?:xn--vermgensberatung-pwb|xn--vermgensberater-ctb|xn--clchc0ea0b2g2a9gcd|xn--w4r85el8fhu5dnra|northwesternmutual|travelersinsurance|vermögensberatung|xn--3oq18vl8pn36a|xn--5su34j936bgsg|xn--bck1b9a5dre4c|xn--mgbai9azgqp6j|xn--mgberp4a5d4ar|xn--xkc2dl3a5ee0h|vermögensberater|xn--fzys8d69uvgm|xn--mgba7c0bbn0a|xn--xkc2al3hye2a|americanexpress|kerryproperties|sandvikcoromant|xn--i1b6b1a6a2e|xn--kcrx77d1x4a|xn--lgbbat1ad8j|xn--mgba3a4f16a|xn--mgbaakc7dvf|xn--mgbc0a9azcg|xn--nqv7fs00ema|afamilycompany|americanfamily|bananarepublic|cancerresearch|cookingchannel|kerrylogistics|weatherchannel|xn--54b7fta0cc|xn--6qq986b3xl|xn--80aqecdr1a|xn--b4w605ferd|xn--fiq228c5hs|xn--h2breg3eve|xn--jlq61u9w7b|xn--mgba3a3ejt|xn--mgbaam7a8h|xn--mgbayh7gpa|xn--mgbb9fbpob|xn--mgbbh1a71e|xn--mgbca7dzdo|xn--mgbi4ecexp|xn--mgbx4cd0ab|xn--rvc1e0am3e|international|lifeinsurance|spreadbetting|travelchannel|wolterskluwer|xn--eckvdtc9d|xn--fpcrj9c3d|xn--fzc2c9e2c|xn--h2brj9c8c|xn--tiq49xqyj|xn--yfro4i67o|xn--ygbi2ammx|construction|lplfinancial|scholarships|versicherung|xn--3e0b707e|xn--45br5cyl|xn--80adxhks|xn--80asehdb|xn--8y0a063a|xn--gckr3f0f|xn--mgb9awbf|xn--mgbab2bd|xn--mgbgu82a|xn--mgbpl2fh|xn--mgbt3dhd|xn--mk1bu44c|xn--ngbc5azd|xn--ngbe9e0a|xn--ogbpf8fl|xn--qcka1pmc|accountants|barclaycard|blackfriday|blockbuster|bridgestone|calvinklein|contractors|creditunion|engineering|enterprises|foodnetwork|investments|kerryhotels|lamborghini|motorcycles|olayangroup|photography|playstation|productions|progressive|redumbrella|rightathome|williamhill|xn--11b4c3d|xn--1ck2e1b|xn--1qqw23a|xn--2scrj9c|xn--3bst00m|xn--3ds443g|xn--3hcrj9c|xn--42c2d9a|xn--45brj9c|xn--55qw42g|xn--6frz82g|xn--80ao21a|xn--9krt00a|xn--cck2b3b|xn--czr694b|xn--d1acj3b|xn--efvy88h|xn--estv75g|xn--fct429k|xn--fjq720a|xn--flw351e|xn--g2xx48c|xn--gecrj9c|xn--gk3at1e|xn--h2brj9c|xn--hxt814e|xn--imr513n|xn--j6w193g|xn--jvr189m|xn--kprw13d|xn--kpry57d|xn--kpu716f|xn--mgbbh1a|xn--mgbtx2b|xn--mix891f|xn--nyqy26a|xn--otu796d|xn--pbt977c|xn--pgbs0dh|xn--q9jyb4c|xn--rhqv96g|xn--rovu88b|xn--s9brj9c|xn--ses554g|xn--t60b56a|xn--vuq861b|xn--w4rs40l|xn--xhq521b|xn--zfr164b|சிங்கப்பூர்|accountant|apartments|associates|basketball|bnpparibas|boehringer|capitalone|consulting|creditcard|cuisinella|eurovision|extraspace|foundation|healthcare|immobilien|industries|management|mitsubishi|nationwide|newholland|nextdirect|onyourside|properties|protection|prudential|realestate|republican|restaurant|schaeffler|swiftcover|tatamotors|technology|telefonica|university|vistaprint|vlaanderen|volkswagen|xn--30rr7y|xn--3pxu8k|xn--45q11c|xn--4gbrim|xn--55qx5d|xn--5tzm5g|xn--80aswg|xn--90a3ac|xn--9dbq2a|xn--9et52u|xn--c2br7g|xn--cg4bki|xn--czrs0t|xn--czru2d|xn--fiq64b|xn--fiqs8s|xn--fiqz9s|xn--io0a7i|xn--kput3i|xn--mxtq1m|xn--o3cw4h|xn--pssy2u|xn--unup4y|xn--wgbh1c|xn--wgbl6a|xn--y9a3aq|accenture|alfaromeo|allfinanz|amsterdam|analytics|aquarelle|barcelona|bloomberg|christmas|community|directory|education|equipment|fairwinds|financial|firestone|fresenius|frontdoor|fujixerox|furniture|goldpoint|hisamitsu|homedepot|homegoods|homesense|honeywell|institute|insurance|kuokgroup|ladbrokes|lancaster|landrover|lifestyle|marketing|marshalls|melbourne|microsoft|panasonic|passagens|pramerica|richardli|scjohnson|shangrila|solutions|statebank|statefarm|stockholm|travelers|vacations|xn--90ais|xn--c1avg|xn--d1alf|xn--e1a4c|xn--fhbei|xn--j1aef|xn--j1amh|xn--l1acc|xn--ngbrx|xn--nqv7f|xn--p1acf|xn--tckwe|xn--vhquv|yodobashi|abudhabi|airforce|allstate|attorney|barclays|barefoot|bargains|baseball|boutique|bradesco|broadway|brussels|budapest|builders|business|capetown|catering|catholic|chrysler|cipriani|cityeats|cleaning|clinique|clothing|commbank|computer|delivery|deloitte|democrat|diamonds|discount|discover|download|engineer|ericsson|esurance|etisalat|everbank|exchange|feedback|fidelity|firmdale|football|frontier|goodyear|grainger|graphics|guardian|hdfcbank|helsinki|holdings|hospital|infiniti|ipiranga|istanbul|jpmorgan|lighting|lundbeck|marriott|maserati|mckinsey|memorial|merckmsd|mortgage|movistar|observer|partners|pharmacy|pictures|plumbing|property|redstone|reliance|saarland|samsclub|security|services|shopping|showtime|softbank|software|stcgroup|supplies|symantec|training|uconnect|vanguard|ventures|verisign|woodside|xn--90ae|xn--node|xn--p1ai|xn--qxam|yokohama|السعودية|abogado|academy|agakhan|alibaba|android|athleta|auction|audible|auspost|avianca|banamex|bauhaus|bentley|bestbuy|booking|brother|bugatti|capital|caravan|careers|cartier|channel|charity|chintai|citadel|clubmed|college|cologne|comcast|company|compare|contact|cooking|corsica|country|coupons|courses|cricket|cruises|dentist|digital|domains|exposed|express|farmers|fashion|ferrari|ferrero|finance|fishing|fitness|flights|florist|flowers|forsale|frogans|fujitsu|gallery|genting|godaddy|grocery|guitars|hamburg|hangout|hitachi|holiday|hosting|hoteles|hotmail|hyundai|iselect|ismaili|jewelry|juniper|kitchen|komatsu|lacaixa|lancome|lanxess|lasalle|latrobe|leclerc|liaison|limited|lincoln|markets|metlife|monster|netbank|netflix|network|neustar|okinawa|oldnavy|organic|origins|philips|pioneer|politie|realtor|recipes|rentals|reviews|rexroth|samsung|sandvik|schmidt|schwarz|science|shiksha|shriram|singles|staples|starhub|storage|support|surgery|systems|temasek|theater|theatre|tickets|tiffany|toshiba|trading|walmart|wanggou|watches|weather|website|wedding|whoswho|windows|winners|xfinity|yamaxun|youtube|zuerich|католик|اتصالات|الجزائر|العليان|پاکستان|كاثوليك|موبايلي|இந்தியா|abarth|abbott|abbvie|active|africa|agency|airbus|airtel|alipay|alsace|alstom|anquan|aramco|author|bayern|beauty|berlin|bharti|blanco|bostik|boston|broker|camera|career|caseih|casino|center|chanel|chrome|church|circle|claims|clinic|coffee|comsec|condos|coupon|credit|cruise|dating|datsun|dealer|degree|dental|design|direct|doctor|dunlop|dupont|durban|emerck|energy|estate|events|expert|family|flickr|futbol|gallup|garden|george|giving|global|google|gratis|health|hermes|hiphop|hockey|hotels|hughes|imamat|insure|intuit|jaguar|joburg|juegos|kaufen|kinder|kindle|kosher|lancia|latino|lawyer|lefrak|living|locker|london|luxury|madrid|maison|makeup|market|mattel|mobile|mobily|monash|mormon|moscow|museum|mutual|nagoya|natura|nissan|nissay|norton|nowruz|office|olayan|online|oracle|orange|otsuka|pfizer|photos|physio|piaget|pictet|quebec|racing|realty|reisen|repair|report|review|rocher|rogers|ryukyu|safety|sakura|sanofi|school|schule|search|secure|select|shouji|soccer|social|stream|studio|supply|suzuki|swatch|sydney|taipei|taobao|target|tattoo|tennis|tienda|tjmaxx|tkmaxx|toyota|travel|unicom|viajes|viking|villas|virgin|vision|voting|voyage|vuelos|walter|warman|webcam|xihuan|yachts|yandex|zappos|москва|онлайн|ابوظبي|ارامكو|الاردن|المغرب|امارات|فلسطين|مليسيا|भारतम्|இலங்கை|ファッション|actor|adult|aetna|amfam|amica|apple|archi|audio|autos|azure|baidu|beats|bible|bingo|black|boats|bosch|build|canon|cards|chase|cheap|cisco|citic|click|cloud|coach|codes|crown|cymru|dabur|dance|deals|delta|dodge|drive|dubai|earth|edeka|email|epost|epson|faith|fedex|final|forex|forum|gallo|games|gifts|gives|glade|glass|globo|gmail|green|gripe|group|gucci|guide|homes|honda|horse|house|hyatt|ikano|intel|irish|iveco|jetzt|koeln|kyoto|lamer|lease|legal|lexus|lilly|linde|lipsy|lixil|loans|locus|lotte|lotto|lupin|macys|mango|media|miami|money|mopar|movie|nadex|nexus|nikon|ninja|nokia|nowtv|omega|osaka|paris|parts|party|phone|photo|pizza|place|poker|praxi|press|prime|promo|quest|radio|rehab|reise|ricoh|rocks|rodeo|rugby|salon|sener|seven|sharp|shell|shoes|skype|sling|smart|smile|solar|space|sport|stada|store|study|style|sucks|swiss|tatar|tires|tirol|tmall|today|tokyo|tools|toray|total|tours|trade|trust|tunes|tushu|ubank|vegas|video|vodka|volvo|wales|watch|weber|weibo|works|world|xerox|yahoo|zippo|ایران|بازار|بھارت|سودان|سورية|همراه|भारोत|संगठन|বাংলা|భారత్|ഭാരതം|嘉里大酒店|aarp|able|adac|aero|aigo|akdn|ally|amex|arab|army|arpa|arte|asda|asia|audi|auto|baby|band|bank|bbva|beer|best|bike|bing|blog|blue|bofa|bond|book|buzz|cafe|call|camp|care|cars|casa|case|cash|cbre|cern|chat|citi|city|club|cool|coop|cyou|data|date|dclk|deal|dell|desi|diet|dish|docs|doha|duck|duns|dvag|erni|fage|fail|fans|farm|fast|fiat|fido|film|fire|fish|flir|food|ford|free|fund|game|gbiz|gent|ggee|gift|gmbh|gold|golf|goog|guge|guru|hair|haus|hdfc|help|here|hgtv|host|hsbc|icbc|ieee|imdb|immo|info|itau|java|jeep|jobs|jprs|kddi|kiwi|kpmg|kred|land|lego|lgbt|lidl|life|like|limo|link|live|loan|loft|love|ltda|luxe|maif|meet|meme|menu|mini|mint|mobi|moda|moto|name|navy|news|next|nico|nike|ollo|open|page|pars|pccw|pics|ping|pink|play|plus|pohl|porn|post|prod|prof|qpon|raid|read|reit|rent|rest|rich|rmit|room|rsvp|ruhr|safe|sale|sarl|save|saxo|scor|scot|seat|seek|sexy|shaw|shia|shop|show|silk|sina|site|skin|sncf|sohu|song|sony|spot|star|surf|talk|taxi|team|tech|teva|tiaa|tips|town|toys|tube|vana|visa|viva|vivo|vote|voto|wang|weir|wien|wiki|wine|work|xbox|yoga|zara|zero|zone|дети|сайт|بارت|بيتك|ڀارت|تونس|شبكة|عراق|عمان|موقع|भारत|ভারত|ভাৰত|ਭਾਰਤ|ભારત|ଭାରତ|ಭಾರತ|ලංකා|グーグル|クラウド|ポイント|大众汽车|组织机构|電訊盈科|香格里拉|aaa|abb|abc|aco|ads|aeg|afl|aig|anz|aol|app|art|aws|axa|bar|bbc|bbt|bcg|bcn|bet|bid|bio|biz|bms|bmw|bnl|bom|boo|bot|box|buy|bzh|cab|cal|cam|car|cat|cba|cbn|cbs|ceb|ceo|cfa|cfd|com|crs|csc|dad|day|dds|dev|dhl|diy|dnp|dog|dot|dtv|dvr|eat|eco|edu|esq|eus|fan|fit|fly|foo|fox|frl|ftr|fun|fyi|gal|gap|gdn|gea|gle|gmo|gmx|goo|gop|got|gov|hbo|hiv|hkt|hot|how|ibm|ice|icu|ifm|inc|ing|ink|int|ist|itv|jcb|jcp|jio|jll|jmp|jnj|jot|joy|kfh|kia|kim|kpn|krd|lat|law|lds|llc|lol|lpl|ltd|man|map|mba|med|men|mil|mit|mlb|mls|mma|moe|moi|mom|mov|msd|mtn|mtr|nab|nba|nec|net|new|nfl|ngo|nhk|now|nra|nrw|ntt|nyc|obi|off|one|ong|onl|ooo|org|ott|ovh|pay|pet|phd|pid|pin|pnc|pro|pru|pub|pwc|qvc|red|ren|ril|rio|rip|run|rwe|sap|sas|sbi|sbs|sca|scb|ses|sew|sex|sfr|ski|sky|soy|srl|srt|stc|tab|tax|tci|tdk|tel|thd|tjx|top|trv|tui|tvs|ubs|uno|uol|ups|vet|vig|vin|vip|wed|win|wme|wow|wtc|wtf|xin|xxx|xyz|you|yun|zip|бел|ком|қаз|мкд|мон|орг|рус|срб|укр|հայ|קום|عرب|قطر|كوم|مصر|कॉम|नेट|คอม|ไทย|ストア|セール|みんな|中文网|天主教|我爱你|新加坡|淡马锡|诺基亚|飞利浦|ac|ad|ae|af|ag|ai|al|am|ao|aq|ar|as|at|au|aw|ax|az|ba|bb|bd|be|bf|bg|bh|bi|bj|bm|bn|bo|br|bs|bt|bv|bw|by|bz|ca|cc|cd|cf|cg|ch|ci|ck|cl|cm|cn|co|cr|cu|cv|cw|cx|cy|cz|de|dj|dk|dm|do|dz|ec|ee|eg|er|es|et|eu|fi|fj|fk|fm|fo|fr|ga|gb|gd|ge|gf|gg|gh|gi|gl|gm|gn|gp|gq|gr|gs|gt|gu|gw|gy|hk|hm|hn|hr|ht|hu|id|ie|il|im|in|io|iq|ir|is|it|je|jm|jo|jp|ke|kg|kh|ki|km|kn|kp|kr|kw|ky|kz|la|lb|lc|li|lk|lr|ls|lt|lu|lv|ly|ma|mc|md|me|mg|mh|mk|ml|mm|mn|mo|mp|mq|mr|ms|mt|mu|mv|mw|mx|my|mz|na|nc|ne|nf|ng|ni|nl|no|np|nr|nu|nz|om|pa|pe|pf|pg|ph|pk|pl|pm|pn|pr|ps|pt|pw|py|qa|re|ro|rs|ru|rw|sa|sb|sc|sd|se|sg|sh|si|sj|sk|sl|sm|sn|so|sr|st|su|sv|sx|sy|sz|tc|td|tf|tg|th|tj|tk|tl|tm|tn|to|tr|tt|tv|tw|tz|ua|ug|uk|us|uy|uz|va|vc|ve|vg|vi|vn|vu|wf|ws|ye|yt|za|zm|zw|ελ|бг|ею|рф|გე|닷넷|닷컴|삼성|한국|コム|世界|中信|中国|中國|企业|佛山|信息|健康|八卦|公司|公益|台湾|台灣|商城|商店|商标|嘉里|在线|大拿|娱乐|家電|工行|广东|微博|慈善|手机|手表|招聘|政务|政府|新闻|时尚|書籍|机构|游戏|澳門|点看|珠宝|移动|网址|网店|网站|网络|联通|谷歌|购物|通販|集团|食品|餐厅|香港)/, yt = new RegExp("[" + pt + "!#$%&'*+/=?^_`{|}~-]"), Ct = new RegExp("^" + bt.source + "$"), At = function(e2) {
2690
+ }, ct = /[A-Za-z]/, lt = /[\d]/, ht = /[\D]/, dt = /\s/, pt = /['"]/, ft = /[\x00-\x1F\x7F]/, mt = /A-Za-z\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u052F\u0531-\u0556\u0559\u0561-\u0587\u05D0-\u05EA\u05F0-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u08A0-\u08B4\u08B6-\u08BD\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0980\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0AF9\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D\u0C58-\u0C5A\u0C60\u0C61\u0C80\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D54-\u0D56\u0D5F-\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16F1-\u16F8\u1700-\u170C\u170E-\u1711\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1877\u1880-\u1884\u1887-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191E\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4B\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1C80-\u1C88\u1CE9-\u1CEC\u1CEE-\u1CF1\u1CF5\u1CF6\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2183\u2184\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2E2F\u3005\u3006\u3031-\u3035\u303B\u303C\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FD5\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6E5\uA717-\uA71F\uA722-\uA788\uA78B-\uA7AE\uA7B0-\uA7B7\uA7F7-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA8FD\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uA9E0-\uA9E4\uA9E6-\uA9EF\uA9FA-\uA9FE\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA7E-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB65\uAB70-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC/.source, gt = mt + /\u2700-\u27bf\udde6-\uddff\ud800-\udbff\udc00-\udfff\ufe0e\ufe0f\u0300-\u036f\ufe20-\ufe23\u20d0-\u20f0\ud83c\udffb-\udfff\u200d\u3299\u3297\u303d\u3030\u24c2\ud83c\udd70-\udd71\udd7e-\udd7f\udd8e\udd91-\udd9a\udde6-\uddff\ude01-\ude02\ude1a\ude2f\ude32-\ude3a\ude50-\ude51\u203c\u2049\u25aa-\u25ab\u25b6\u25c0\u25fb-\u25fe\u00a9\u00ae\u2122\u2139\udc04\u2600-\u26FF\u2b05\u2b06\u2b07\u2b1b\u2b1c\u2b50\u2b55\u231a\u231b\u2328\u23cf\u23e9-\u23f3\u23f8-\u23fa\udccf\u2935\u2934\u2190-\u21ff/.source + /\u0300-\u036F\u0483-\u0489\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u0610-\u061A\u064B-\u065F\u0670\u06D6-\u06DC\u06DF-\u06E4\u06E7\u06E8\u06EA-\u06ED\u0711\u0730-\u074A\u07A6-\u07B0\u07EB-\u07F3\u0816-\u0819\u081B-\u0823\u0825-\u0827\u0829-\u082D\u0859-\u085B\u08D4-\u08E1\u08E3-\u0903\u093A-\u093C\u093E-\u094F\u0951-\u0957\u0962\u0963\u0981-\u0983\u09BC\u09BE-\u09C4\u09C7\u09C8\u09CB-\u09CD\u09D7\u09E2\u09E3\u0A01-\u0A03\u0A3C\u0A3E-\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A70\u0A71\u0A75\u0A81-\u0A83\u0ABC\u0ABE-\u0AC5\u0AC7-\u0AC9\u0ACB-\u0ACD\u0AE2\u0AE3\u0B01-\u0B03\u0B3C\u0B3E-\u0B44\u0B47\u0B48\u0B4B-\u0B4D\u0B56\u0B57\u0B62\u0B63\u0B82\u0BBE-\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCD\u0BD7\u0C00-\u0C03\u0C3E-\u0C44\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C62\u0C63\u0C81-\u0C83\u0CBC\u0CBE-\u0CC4\u0CC6-\u0CC8\u0CCA-\u0CCD\u0CD5\u0CD6\u0CE2\u0CE3\u0D01-\u0D03\u0D3E-\u0D44\u0D46-\u0D48\u0D4A-\u0D4D\u0D57\u0D62\u0D63\u0D82\u0D83\u0DCA\u0DCF-\u0DD4\u0DD6\u0DD8-\u0DDF\u0DF2\u0DF3\u0E31\u0E34-\u0E3A\u0E47-\u0E4E\u0EB1\u0EB4-\u0EB9\u0EBB\u0EBC\u0EC8-\u0ECD\u0F18\u0F19\u0F35\u0F37\u0F39\u0F3E\u0F3F\u0F71-\u0F84\u0F86\u0F87\u0F8D-\u0F97\u0F99-\u0FBC\u0FC6\u102B-\u103E\u1056-\u1059\u105E-\u1060\u1062-\u1064\u1067-\u106D\u1071-\u1074\u1082-\u108D\u108F\u109A-\u109D\u135D-\u135F\u1712-\u1714\u1732-\u1734\u1752\u1753\u1772\u1773\u17B4-\u17D3\u17DD\u180B-\u180D\u1885\u1886\u18A9\u1920-\u192B\u1930-\u193B\u1A17-\u1A1B\u1A55-\u1A5E\u1A60-\u1A7C\u1A7F\u1AB0-\u1ABE\u1B00-\u1B04\u1B34-\u1B44\u1B6B-\u1B73\u1B80-\u1B82\u1BA1-\u1BAD\u1BE6-\u1BF3\u1C24-\u1C37\u1CD0-\u1CD2\u1CD4-\u1CE8\u1CED\u1CF2-\u1CF4\u1CF8\u1CF9\u1DC0-\u1DF5\u1DFB-\u1DFF\u20D0-\u20F0\u2CEF-\u2CF1\u2D7F\u2DE0-\u2DFF\u302A-\u302F\u3099\u309A\uA66F-\uA672\uA674-\uA67D\uA69E\uA69F\uA6F0\uA6F1\uA802\uA806\uA80B\uA823-\uA827\uA880\uA881\uA8B4-\uA8C5\uA8E0-\uA8F1\uA926-\uA92D\uA947-\uA953\uA980-\uA983\uA9B3-\uA9C0\uA9E5\uAA29-\uAA36\uAA43\uAA4C\uAA4D\uAA7B-\uAA7D\uAAB0\uAAB2-\uAAB4\uAAB7\uAAB8\uAABE\uAABF\uAAC1\uAAEB-\uAAEF\uAAF5\uAAF6\uABE3-\uABEA\uABEC\uABED\uFB1E\uFE00-\uFE0F\uFE20-\uFE2F/.source, vt = /0-9\u0660-\u0669\u06F0-\u06F9\u07C0-\u07C9\u0966-\u096F\u09E6-\u09EF\u0A66-\u0A6F\u0AE6-\u0AEF\u0B66-\u0B6F\u0BE6-\u0BEF\u0C66-\u0C6F\u0CE6-\u0CEF\u0D66-\u0D6F\u0DE6-\u0DEF\u0E50-\u0E59\u0ED0-\u0ED9\u0F20-\u0F29\u1040-\u1049\u1090-\u1099\u17E0-\u17E9\u1810-\u1819\u1946-\u194F\u19D0-\u19D9\u1A80-\u1A89\u1A90-\u1A99\u1B50-\u1B59\u1BB0-\u1BB9\u1C40-\u1C49\u1C50-\u1C59\uA620-\uA629\uA8D0-\uA8D9\uA900-\uA909\uA9D0-\uA9D9\uA9F0-\uA9F9\uAA50-\uAA59\uABF0-\uABF9\uFF10-\uFF19/.source, wt = gt + vt, bt = gt + vt, yt = "(?:[" + vt + "]{1,3}\\.){3}[" + vt + "]{1,3}", Ct = "[" + bt + "](?:[" + bt + "\\-]{0,61}[" + bt + "])?", At = function(e2) {
2691
+ return "(?=(" + Ct + "))\\" + e2;
2692
+ }, Et = function(e2) {
2693
+ return "(?:" + At(e2) + "(?:\\." + At(e2 + 1) + "){0,126}|" + yt + ")";
2694
+ }, kt = new RegExp("[" + bt + "]"), xt = /(?:xn--vermgensberatung-pwb|xn--vermgensberater-ctb|xn--clchc0ea0b2g2a9gcd|xn--w4r85el8fhu5dnra|northwesternmutual|travelersinsurance|vermögensberatung|xn--3oq18vl8pn36a|xn--5su34j936bgsg|xn--bck1b9a5dre4c|xn--mgbai9azgqp6j|xn--mgberp4a5d4ar|xn--xkc2dl3a5ee0h|vermögensberater|xn--fzys8d69uvgm|xn--mgba7c0bbn0a|xn--xkc2al3hye2a|americanexpress|kerryproperties|sandvikcoromant|xn--i1b6b1a6a2e|xn--kcrx77d1x4a|xn--lgbbat1ad8j|xn--mgba3a4f16a|xn--mgbaakc7dvf|xn--mgbc0a9azcg|xn--nqv7fs00ema|afamilycompany|americanfamily|bananarepublic|cancerresearch|cookingchannel|kerrylogistics|weatherchannel|xn--54b7fta0cc|xn--6qq986b3xl|xn--80aqecdr1a|xn--b4w605ferd|xn--fiq228c5hs|xn--h2breg3eve|xn--jlq61u9w7b|xn--mgba3a3ejt|xn--mgbaam7a8h|xn--mgbayh7gpa|xn--mgbb9fbpob|xn--mgbbh1a71e|xn--mgbca7dzdo|xn--mgbi4ecexp|xn--mgbx4cd0ab|xn--rvc1e0am3e|international|lifeinsurance|spreadbetting|travelchannel|wolterskluwer|xn--eckvdtc9d|xn--fpcrj9c3d|xn--fzc2c9e2c|xn--h2brj9c8c|xn--tiq49xqyj|xn--yfro4i67o|xn--ygbi2ammx|construction|lplfinancial|scholarships|versicherung|xn--3e0b707e|xn--45br5cyl|xn--80adxhks|xn--80asehdb|xn--8y0a063a|xn--gckr3f0f|xn--mgb9awbf|xn--mgbab2bd|xn--mgbgu82a|xn--mgbpl2fh|xn--mgbt3dhd|xn--mk1bu44c|xn--ngbc5azd|xn--ngbe9e0a|xn--ogbpf8fl|xn--qcka1pmc|accountants|barclaycard|blackfriday|blockbuster|bridgestone|calvinklein|contractors|creditunion|engineering|enterprises|foodnetwork|investments|kerryhotels|lamborghini|motorcycles|olayangroup|photography|playstation|productions|progressive|redumbrella|rightathome|williamhill|xn--11b4c3d|xn--1ck2e1b|xn--1qqw23a|xn--2scrj9c|xn--3bst00m|xn--3ds443g|xn--3hcrj9c|xn--42c2d9a|xn--45brj9c|xn--55qw42g|xn--6frz82g|xn--80ao21a|xn--9krt00a|xn--cck2b3b|xn--czr694b|xn--d1acj3b|xn--efvy88h|xn--estv75g|xn--fct429k|xn--fjq720a|xn--flw351e|xn--g2xx48c|xn--gecrj9c|xn--gk3at1e|xn--h2brj9c|xn--hxt814e|xn--imr513n|xn--j6w193g|xn--jvr189m|xn--kprw13d|xn--kpry57d|xn--kpu716f|xn--mgbbh1a|xn--mgbtx2b|xn--mix891f|xn--nyqy26a|xn--otu796d|xn--pbt977c|xn--pgbs0dh|xn--q9jyb4c|xn--rhqv96g|xn--rovu88b|xn--s9brj9c|xn--ses554g|xn--t60b56a|xn--vuq861b|xn--w4rs40l|xn--xhq521b|xn--zfr164b|சிங்கப்பூர்|accountant|apartments|associates|basketball|bnpparibas|boehringer|capitalone|consulting|creditcard|cuisinella|eurovision|extraspace|foundation|healthcare|immobilien|industries|management|mitsubishi|nationwide|newholland|nextdirect|onyourside|properties|protection|prudential|realestate|republican|restaurant|schaeffler|swiftcover|tatamotors|technology|telefonica|university|vistaprint|vlaanderen|volkswagen|xn--30rr7y|xn--3pxu8k|xn--45q11c|xn--4gbrim|xn--55qx5d|xn--5tzm5g|xn--80aswg|xn--90a3ac|xn--9dbq2a|xn--9et52u|xn--c2br7g|xn--cg4bki|xn--czrs0t|xn--czru2d|xn--fiq64b|xn--fiqs8s|xn--fiqz9s|xn--io0a7i|xn--kput3i|xn--mxtq1m|xn--o3cw4h|xn--pssy2u|xn--unup4y|xn--wgbh1c|xn--wgbl6a|xn--y9a3aq|accenture|alfaromeo|allfinanz|amsterdam|analytics|aquarelle|barcelona|bloomberg|christmas|community|directory|education|equipment|fairwinds|financial|firestone|fresenius|frontdoor|fujixerox|furniture|goldpoint|hisamitsu|homedepot|homegoods|homesense|honeywell|institute|insurance|kuokgroup|ladbrokes|lancaster|landrover|lifestyle|marketing|marshalls|melbourne|microsoft|panasonic|passagens|pramerica|richardli|scjohnson|shangrila|solutions|statebank|statefarm|stockholm|travelers|vacations|xn--90ais|xn--c1avg|xn--d1alf|xn--e1a4c|xn--fhbei|xn--j1aef|xn--j1amh|xn--l1acc|xn--ngbrx|xn--nqv7f|xn--p1acf|xn--tckwe|xn--vhquv|yodobashi|abudhabi|airforce|allstate|attorney|barclays|barefoot|bargains|baseball|boutique|bradesco|broadway|brussels|budapest|builders|business|capetown|catering|catholic|chrysler|cipriani|cityeats|cleaning|clinique|clothing|commbank|computer|delivery|deloitte|democrat|diamonds|discount|discover|download|engineer|ericsson|esurance|etisalat|everbank|exchange|feedback|fidelity|firmdale|football|frontier|goodyear|grainger|graphics|guardian|hdfcbank|helsinki|holdings|hospital|infiniti|ipiranga|istanbul|jpmorgan|lighting|lundbeck|marriott|maserati|mckinsey|memorial|merckmsd|mortgage|movistar|observer|partners|pharmacy|pictures|plumbing|property|redstone|reliance|saarland|samsclub|security|services|shopping|showtime|softbank|software|stcgroup|supplies|symantec|training|uconnect|vanguard|ventures|verisign|woodside|xn--90ae|xn--node|xn--p1ai|xn--qxam|yokohama|السعودية|abogado|academy|agakhan|alibaba|android|athleta|auction|audible|auspost|avianca|banamex|bauhaus|bentley|bestbuy|booking|brother|bugatti|capital|caravan|careers|cartier|channel|charity|chintai|citadel|clubmed|college|cologne|comcast|company|compare|contact|cooking|corsica|country|coupons|courses|cricket|cruises|dentist|digital|domains|exposed|express|farmers|fashion|ferrari|ferrero|finance|fishing|fitness|flights|florist|flowers|forsale|frogans|fujitsu|gallery|genting|godaddy|grocery|guitars|hamburg|hangout|hitachi|holiday|hosting|hoteles|hotmail|hyundai|iselect|ismaili|jewelry|juniper|kitchen|komatsu|lacaixa|lancome|lanxess|lasalle|latrobe|leclerc|liaison|limited|lincoln|markets|metlife|monster|netbank|netflix|network|neustar|okinawa|oldnavy|organic|origins|philips|pioneer|politie|realtor|recipes|rentals|reviews|rexroth|samsung|sandvik|schmidt|schwarz|science|shiksha|shriram|singles|staples|starhub|storage|support|surgery|systems|temasek|theater|theatre|tickets|tiffany|toshiba|trading|walmart|wanggou|watches|weather|website|wedding|whoswho|windows|winners|xfinity|yamaxun|youtube|zuerich|католик|اتصالات|الجزائر|العليان|پاکستان|كاثوليك|موبايلي|இந்தியா|abarth|abbott|abbvie|active|africa|agency|airbus|airtel|alipay|alsace|alstom|anquan|aramco|author|bayern|beauty|berlin|bharti|blanco|bostik|boston|broker|camera|career|caseih|casino|center|chanel|chrome|church|circle|claims|clinic|coffee|comsec|condos|coupon|credit|cruise|dating|datsun|dealer|degree|dental|design|direct|doctor|dunlop|dupont|durban|emerck|energy|estate|events|expert|family|flickr|futbol|gallup|garden|george|giving|global|google|gratis|health|hermes|hiphop|hockey|hotels|hughes|imamat|insure|intuit|jaguar|joburg|juegos|kaufen|kinder|kindle|kosher|lancia|latino|lawyer|lefrak|living|locker|london|luxury|madrid|maison|makeup|market|mattel|mobile|mobily|monash|mormon|moscow|museum|mutual|nagoya|natura|nissan|nissay|norton|nowruz|office|olayan|online|oracle|orange|otsuka|pfizer|photos|physio|piaget|pictet|quebec|racing|realty|reisen|repair|report|review|rocher|rogers|ryukyu|safety|sakura|sanofi|school|schule|search|secure|select|shouji|soccer|social|stream|studio|supply|suzuki|swatch|sydney|taipei|taobao|target|tattoo|tennis|tienda|tjmaxx|tkmaxx|toyota|travel|unicom|viajes|viking|villas|virgin|vision|voting|voyage|vuelos|walter|warman|webcam|xihuan|yachts|yandex|zappos|москва|онлайн|ابوظبي|ارامكو|الاردن|المغرب|امارات|فلسطين|مليسيا|भारतम्|இலங்கை|ファッション|actor|adult|aetna|amfam|amica|apple|archi|audio|autos|azure|baidu|beats|bible|bingo|black|boats|bosch|build|canon|cards|chase|cheap|cisco|citic|click|cloud|coach|codes|crown|cymru|dabur|dance|deals|delta|dodge|drive|dubai|earth|edeka|email|epost|epson|faith|fedex|final|forex|forum|gallo|games|gifts|gives|glade|glass|globo|gmail|green|gripe|group|gucci|guide|homes|honda|horse|house|hyatt|ikano|intel|irish|iveco|jetzt|koeln|kyoto|lamer|lease|legal|lexus|lilly|linde|lipsy|lixil|loans|locus|lotte|lotto|lupin|macys|mango|media|miami|money|mopar|movie|nadex|nexus|nikon|ninja|nokia|nowtv|omega|osaka|paris|parts|party|phone|photo|pizza|place|poker|praxi|press|prime|promo|quest|radio|rehab|reise|ricoh|rocks|rodeo|rugby|salon|sener|seven|sharp|shell|shoes|skype|sling|smart|smile|solar|space|sport|stada|store|study|style|sucks|swiss|tatar|tires|tirol|tmall|today|tokyo|tools|toray|total|tours|trade|trust|tunes|tushu|ubank|vegas|video|vodka|volvo|wales|watch|weber|weibo|works|world|xerox|yahoo|zippo|ایران|بازار|بھارت|سودان|سورية|همراه|भारोत|संगठन|বাংলা|భారత్|ഭാരതം|嘉里大酒店|aarp|able|adac|aero|aigo|akdn|ally|amex|arab|army|arpa|arte|asda|asia|audi|auto|baby|band|bank|bbva|beer|best|bike|bing|blog|blue|bofa|bond|book|buzz|cafe|call|camp|care|cars|casa|case|cash|cbre|cern|chat|citi|city|club|cool|coop|cyou|data|date|dclk|deal|dell|desi|diet|dish|docs|doha|duck|duns|dvag|erni|fage|fail|fans|farm|fast|fiat|fido|film|fire|fish|flir|food|ford|free|fund|game|gbiz|gent|ggee|gift|gmbh|gold|golf|goog|guge|guru|hair|haus|hdfc|help|here|hgtv|host|hsbc|icbc|ieee|imdb|immo|info|itau|java|jeep|jobs|jprs|kddi|kiwi|kpmg|kred|land|lego|lgbt|lidl|life|like|limo|link|live|loan|loft|love|ltda|luxe|maif|meet|meme|menu|mini|mint|mobi|moda|moto|name|navy|news|next|nico|nike|ollo|open|page|pars|pccw|pics|ping|pink|play|plus|pohl|porn|post|prod|prof|qpon|raid|read|reit|rent|rest|rich|rmit|room|rsvp|ruhr|safe|sale|sarl|save|saxo|scor|scot|seat|seek|sexy|shaw|shia|shop|show|silk|sina|site|skin|sncf|sohu|song|sony|spot|star|surf|talk|taxi|team|tech|teva|tiaa|tips|town|toys|tube|vana|visa|viva|vivo|vote|voto|wang|weir|wien|wiki|wine|work|xbox|yoga|zara|zero|zone|дети|сайт|بارت|بيتك|ڀارت|تونس|شبكة|عراق|عمان|موقع|भारत|ভারত|ভাৰত|ਭਾਰਤ|ભારત|ଭାରତ|ಭಾರತ|ලංකා|グーグル|クラウド|ポイント|大众汽车|组织机构|電訊盈科|香格里拉|aaa|abb|abc|aco|ads|aeg|afl|aig|anz|aol|app|art|aws|axa|bar|bbc|bbt|bcg|bcn|bet|bid|bio|biz|bms|bmw|bnl|bom|boo|bot|box|buy|bzh|cab|cal|cam|car|cat|cba|cbn|cbs|ceb|ceo|cfa|cfd|com|crs|csc|dad|day|dds|dev|dhl|diy|dnp|dog|dot|dtv|dvr|eat|eco|edu|esq|eus|fan|fit|fly|foo|fox|frl|ftr|fun|fyi|gal|gap|gdn|gea|gle|gmo|gmx|goo|gop|got|gov|hbo|hiv|hkt|hot|how|ibm|ice|icu|ifm|inc|ing|ink|int|ist|itv|jcb|jcp|jio|jll|jmp|jnj|jot|joy|kfh|kia|kim|kpn|krd|lat|law|lds|llc|lol|lpl|ltd|man|map|mba|med|men|mil|mit|mlb|mls|mma|moe|moi|mom|mov|msd|mtn|mtr|nab|nba|nec|net|new|nfl|ngo|nhk|now|nra|nrw|ntt|nyc|obi|off|one|ong|onl|ooo|org|ott|ovh|pay|pet|phd|pid|pin|pnc|pro|pru|pub|pwc|qvc|red|ren|ril|rio|rip|run|rwe|sap|sas|sbi|sbs|sca|scb|ses|sew|sex|sfr|ski|sky|soy|srl|srt|stc|tab|tax|tci|tdk|tel|thd|tjx|top|trv|tui|tvs|ubs|uno|uol|ups|vet|vig|vin|vip|wed|win|wme|wow|wtc|wtf|xin|xxx|xyz|you|yun|zip|бел|ком|қаз|мкд|мон|орг|рус|срб|укр|հայ|קום|عرب|قطر|كوم|مصر|कॉम|नेट|คอม|ไทย|ストア|セール|みんな|中文网|天主教|我爱你|新加坡|淡马锡|诺基亚|飞利浦|ac|ad|ae|af|ag|ai|al|am|ao|aq|ar|as|at|au|aw|ax|az|ba|bb|bd|be|bf|bg|bh|bi|bj|bm|bn|bo|br|bs|bt|bv|bw|by|bz|ca|cc|cd|cf|cg|ch|ci|ck|cl|cm|cn|co|cr|cu|cv|cw|cx|cy|cz|de|dj|dk|dm|do|dz|ec|ee|eg|er|es|et|eu|fi|fj|fk|fm|fo|fr|ga|gb|gd|ge|gf|gg|gh|gi|gl|gm|gn|gp|gq|gr|gs|gt|gu|gw|gy|hk|hm|hn|hr|ht|hu|id|ie|il|im|in|io|iq|ir|is|it|je|jm|jo|jp|ke|kg|kh|ki|km|kn|kp|kr|kw|ky|kz|la|lb|lc|li|lk|lr|ls|lt|lu|lv|ly|ma|mc|md|me|mg|mh|mk|ml|mm|mn|mo|mp|mq|mr|ms|mt|mu|mv|mw|mx|my|mz|na|nc|ne|nf|ng|ni|nl|no|np|nr|nu|nz|om|pa|pe|pf|pg|ph|pk|pl|pm|pn|pr|ps|pt|pw|py|qa|re|ro|rs|ru|rw|sa|sb|sc|sd|se|sg|sh|si|sj|sk|sl|sm|sn|so|sr|st|su|sv|sx|sy|sz|tc|td|tf|tg|th|tj|tk|tl|tm|tn|to|tr|tt|tv|tw|tz|ua|ug|uk|us|uy|uz|va|vc|ve|vg|vi|vn|vu|wf|ws|ye|yt|za|zm|zw|ελ|бг|ею|рф|გე|닷넷|닷컴|삼성|한국|コム|世界|中信|中国|中國|企业|佛山|信息|健康|八卦|公司|公益|台湾|台灣|商城|商店|商标|嘉里|在线|大拿|娱乐|家電|工行|广东|微博|慈善|手机|手表|招聘|政务|政府|新闻|时尚|書籍|机构|游戏|澳門|点看|珠宝|移动|网址|网店|网站|网络|联通|谷歌|购物|通販|集团|食品|餐厅|香港)/, It = new RegExp("[" + bt + "!#$%&'*+/=?^_`{|}~-]"), Tt = new RegExp("^" + xt.source + "$"), Dt = function(e2) {
2654
2695
  function t2() {
2655
2696
  var t3 = null !== e2 && e2.apply(this, arguments) || this;
2656
- return t3.localPartCharRegex = yt, t3.strictTldRegex = Ct, t3;
2697
+ return t3.localPartCharRegex = It, t3.strictTldRegex = Tt, t3;
2657
2698
  }
2658
- return Ye(t2, e2), t2.prototype.parseMatches = function(e3) {
2659
- for (var t3 = this.tagBuilder, s2 = this.localPartCharRegex, n2 = this.strictTldRegex, r2 = [], i2 = e3.length, a2 = new Et(), o2 = { m: "a", a: "i", i: "l", l: "t", t: "o", o: ":" }, u2 = 0, c2 = 0, l2 = a2; u2 < i2; ) {
2699
+ return et(t2, e2), t2.prototype.parseMatches = function(e3) {
2700
+ for (var t3 = this.tagBuilder, s2 = this.localPartCharRegex, n2 = this.strictTldRegex, r2 = [], i2 = e3.length, a2 = new St(), o2 = { m: "a", a: "i", i: "l", l: "t", t: "o", o: ":" }, u2 = 0, c2 = 0, l2 = a2; u2 < i2; ) {
2660
2701
  var h2 = e3.charAt(u2);
2661
2702
  switch (c2) {
2662
2703
  case 0:
@@ -2684,7 +2725,7 @@ var Qe, Ve = function() {
2684
2725
  b2(h2);
2685
2726
  break;
2686
2727
  default:
2687
- He(c2);
2728
+ Qe(c2);
2688
2729
  }
2689
2730
  u2++;
2690
2731
  }
@@ -2693,7 +2734,7 @@ var Qe, Ve = function() {
2693
2734
  "m" === e4 ? y2(1) : s2.test(e4) && y2();
2694
2735
  }
2695
2736
  function p2(e4, t4) {
2696
- ":" === e4 ? s2.test(t4) ? (c2 = 2, l2 = new Et(Ve(Ve({}, l2), { hasMailtoPrefix: true }))) : C2() : o2[e4] === t4 || (s2.test(t4) ? c2 = 2 : "." === t4 ? c2 = 3 : "@" === t4 ? c2 = 4 : C2());
2737
+ ":" === e4 ? s2.test(t4) ? (c2 = 2, l2 = new St(st(st({}, l2), { hasMailtoPrefix: true }))) : C2() : o2[e4] === t4 || (s2.test(t4) ? c2 = 2 : "." === t4 ? c2 = 3 : "@" === t4 ? c2 = 4 : C2());
2697
2738
  }
2698
2739
  function f2(e4) {
2699
2740
  "." === e4 ? c2 = 3 : "@" === e4 ? c2 = 4 : s2.test(e4) || C2();
@@ -2702,19 +2743,19 @@ var Qe, Ve = function() {
2702
2743
  "." === e4 || "@" === e4 ? C2() : s2.test(e4) ? c2 = 2 : C2();
2703
2744
  }
2704
2745
  function g2(e4) {
2705
- wt.test(e4) ? c2 = 5 : C2();
2746
+ kt.test(e4) ? c2 = 5 : C2();
2706
2747
  }
2707
2748
  function v2(e4) {
2708
- "." === e4 ? c2 = 7 : "-" === e4 ? c2 = 6 : wt.test(e4) || A2();
2749
+ "." === e4 ? c2 = 7 : "-" === e4 ? c2 = 6 : kt.test(e4) || A2();
2709
2750
  }
2710
2751
  function w2(e4) {
2711
- "-" === e4 || "." === e4 ? A2() : wt.test(e4) ? c2 = 5 : A2();
2752
+ "-" === e4 || "." === e4 ? A2() : kt.test(e4) ? c2 = 5 : A2();
2712
2753
  }
2713
2754
  function b2(e4) {
2714
- "." === e4 || "-" === e4 ? A2() : wt.test(e4) ? (c2 = 5, l2 = new Et(Ve(Ve({}, l2), { hasDomainDot: true }))) : A2();
2755
+ "." === e4 || "-" === e4 ? A2() : kt.test(e4) ? (c2 = 5, l2 = new St(st(st({}, l2), { hasDomainDot: true }))) : A2();
2715
2756
  }
2716
2757
  function y2(e4) {
2717
- void 0 === e4 && (e4 = 2), c2 = e4, l2 = new Et({ idx: u2 });
2758
+ void 0 === e4 && (e4 = 2), c2 = e4, l2 = new St({ idx: u2 });
2718
2759
  }
2719
2760
  function C2() {
2720
2761
  c2 = 0, l2 = a2;
@@ -2727,14 +2768,14 @@ var Qe, Ve = function() {
2727
2768
  (function(e4) {
2728
2769
  var t4 = e4.split(".").pop() || "", s4 = t4.toLowerCase();
2729
2770
  return n2.test(s4);
2730
- })(i3) && r2.push(new Ze({ tagBuilder: t3, matchedText: s3, offset: l2.idx, email: i3 }));
2771
+ })(i3) && r2.push(new nt({ tagBuilder: t3, matchedText: s3, offset: l2.idx, email: i3 }));
2731
2772
  }
2732
2773
  C2();
2733
2774
  }
2734
2775
  }, t2;
2735
- }(st), Et = function(e2) {
2776
+ }(ut), St = function(e2) {
2736
2777
  void 0 === e2 && (e2 = {}), this.idx = void 0 !== e2.idx ? e2.idx : -1, this.hasMailtoPrefix = !!e2.hasMailtoPrefix, this.hasDomainDot = !!e2.hasDomainDot;
2737
- }, kt = function() {
2778
+ }, Mt = function() {
2738
2779
  function e2() {
2739
2780
  }
2740
2781
  return e2.isValid = function(e3, t2) {
@@ -2752,16 +2793,16 @@ var Qe, Ve = function() {
2752
2793
  return !(!e3 || t2 && this.hasFullProtocolRegex.test(t2) || -1 !== e3.indexOf("."));
2753
2794
  }, e2.urlMatchDoesNotHaveAtLeastOneWordChar = function(e3, t2) {
2754
2795
  return !(!e3 || !t2) && (!this.hasFullProtocolRegex.test(t2) && !this.hasWordCharAfterProtocolRegex.test(e3));
2755
- }, e2.hasFullProtocolRegex = /^[A-Za-z][-.+A-Za-z0-9]*:\/\//, e2.uriSchemeRegex = /^[A-Za-z][-.+A-Za-z0-9]*:/, e2.hasWordCharAfterProtocolRegex = new RegExp(":[^\\s]*?[" + ct + "]"), e2.ipRegex = /[0-9][0-9]?[0-9]?\.[0-9][0-9]?[0-9]?\.[0-9][0-9]?[0-9]?\.[0-9][0-9]?[0-9]?(:[0-9]*)?\/?$/, e2;
2756
- }(), xt = (Qe = new RegExp("[/?#](?:[" + pt + "\\-+&@#/%=~_()|'$*\\[\\]{}?!:,.;^✓]*[" + pt + "\\-+&@#/%=~_()|'$*\\[\\]{}✓])?"), new RegExp(["(?:", "(", /(?:[A-Za-z][-.+A-Za-z0-9]{0,63}:(?![A-Za-z][-.+A-Za-z0-9]{0,63}:\/\/)(?!\d+\/?)(?:\/\/)?)/.source, vt(2), ")", "|", "(", "(//)?", /(?:www\.)/.source, vt(6), ")", "|", "(", "(//)?", vt(10) + "\\.", bt.source, "(?![-" + dt + "])", ")", ")", "(?::[0-9]+)?", "(?:" + Qe.source + ")?"].join(""), "gi")), It = new RegExp("[" + pt + "]"), St = function(e2) {
2796
+ }, e2.hasFullProtocolRegex = /^[A-Za-z][-.+A-Za-z0-9]*:\/\//, e2.uriSchemeRegex = /^[A-Za-z][-.+A-Za-z0-9]*:/, e2.hasWordCharAfterProtocolRegex = new RegExp(":[^\\s]*?[" + mt + "]"), e2.ipRegex = /[0-9][0-9]?[0-9]?\.[0-9][0-9]?[0-9]?\.[0-9][0-9]?[0-9]?\.[0-9][0-9]?[0-9]?(:[0-9]*)?\/?$/, e2;
2797
+ }(), Ft = (tt = new RegExp("[/?#](?:[" + bt + "\\-+&@#/%=~_()|'$*\\[\\]{}?!:,.;^✓]*[" + bt + "\\-+&@#/%=~_()|'$*\\[\\]{}✓])?"), new RegExp(["(?:", "(", /(?:[A-Za-z][-.+A-Za-z0-9]{0,63}:(?![A-Za-z][-.+A-Za-z0-9]{0,63}:\/\/)(?!\d+\/?)(?:\/\/)?)/.source, Et(2), ")", "|", "(", "(//)?", /(?:www\.)/.source, Et(6), ")", "|", "(", "(//)?", Et(10) + "\\.", xt.source, "(?![-" + wt + "])", ")", ")", "(?::[0-9]+)?", "(?:" + tt.source + ")?"].join(""), "gi")), Bt = new RegExp("[" + bt + "]"), Rt = function(e2) {
2757
2798
  function t2(t3) {
2758
2799
  var s2 = e2.call(this, t3) || this;
2759
- return s2.stripPrefix = { scheme: true, www: true }, s2.stripTrailingSlash = true, s2.decodePercentEncoding = true, s2.matcherRegex = xt, s2.wordCharRegExp = It, s2.stripPrefix = t3.stripPrefix, s2.stripTrailingSlash = t3.stripTrailingSlash, s2.decodePercentEncoding = t3.decodePercentEncoding, s2;
2800
+ return s2.stripPrefix = { scheme: true, www: true }, s2.stripTrailingSlash = true, s2.decodePercentEncoding = true, s2.matcherRegex = Ft, s2.wordCharRegExp = Bt, s2.stripPrefix = t3.stripPrefix, s2.stripTrailingSlash = t3.stripTrailingSlash, s2.decodePercentEncoding = t3.decodePercentEncoding, s2;
2760
2801
  }
2761
- return Ye(t2, e2), t2.prototype.parseMatches = function(e3) {
2802
+ return et(t2, e2), t2.prototype.parseMatches = function(e3) {
2762
2803
  for (var t3, s2 = this.matcherRegex, n2 = this.stripPrefix, r2 = this.stripTrailingSlash, i2 = this.decodePercentEncoding, a2 = this.tagBuilder, o2 = [], u2 = function() {
2763
2804
  var s3 = t3[0], u3 = t3[1], l2 = t3[4], h2 = t3[5], d2 = t3[9], p2 = t3.index, f2 = h2 || d2, m2 = e3.charAt(p2 - 1);
2764
- if (!kt.isValid(s3, u3)) return "continue";
2805
+ if (!Mt.isValid(s3, u3)) return "continue";
2765
2806
  if (p2 > 0 && "@" === m2) return "continue";
2766
2807
  if (p2 > 0 && f2 && c2.wordCharRegExp.test(m2)) return "continue";
2767
2808
  if (/\?$/.test(s3) && (s3 = s3.substr(0, s3.length - 1)), c2.matchHasUnbalancedClosingParen(s3)) s3 = s3.substr(0, s3.length - 1);
@@ -2777,7 +2818,7 @@ var Qe, Ve = function() {
2777
2818
  s3 = s3.substr(w2), u3 = u3.substr(w2), p2 += w2;
2778
2819
  }
2779
2820
  var b2 = u3 ? "scheme" : l2 ? "www" : "tld", y2 = !!u3;
2780
- o2.push(new tt({ tagBuilder: a2, matchedText: s3, offset: p2, urlMatchType: b2, url: s3, protocolUrlMatch: y2, protocolRelativeMatch: !!f2, stripPrefix: n2, stripTrailingSlash: r2, decodePercentEncoding: i2 }));
2821
+ o2.push(new ot({ tagBuilder: a2, matchedText: s3, offset: p2, urlMatchType: b2, url: s3, protocolUrlMatch: y2, protocolRelativeMatch: !!f2, stripPrefix: n2, stripTrailingSlash: r2, decodePercentEncoding: i2 }));
2781
2822
  }, c2 = this; null !== (t3 = s2.exec(e3)); ) u2();
2782
2823
  return o2;
2783
2824
  }, t2.prototype.matchHasUnbalancedClosingParen = function(e3) {
@@ -2797,58 +2838,58 @@ var Qe, Ve = function() {
2797
2838
  if (!e3) return -1;
2798
2839
  var s2 = 0;
2799
2840
  t3 && (s2 = e3.indexOf(":"), e3 = e3.slice(s2));
2800
- var n2 = new RegExp("^((.?//)?[-." + pt + "]*[-" + pt + "]\\.[-" + pt + "]+)").exec(e3);
2841
+ var n2 = new RegExp("^((.?//)?[-." + bt + "]*[-" + bt + "]\\.[-" + bt + "]+)").exec(e3);
2801
2842
  return null === n2 ? -1 : (s2 += n2[1].length, e3 = e3.slice(n2[1].length), /^[^-.A-Za-z0-9:\/?#]/.test(e3) ? s2 : -1);
2802
2843
  }, t2;
2803
- }(st), Tt = new RegExp("#[_" + pt + "]{1,139}(?![_" + pt + "])", "g"), Dt = new RegExp("[^" + pt + "]"), Mt = function(e2) {
2844
+ }(ut), Nt = new RegExp("#[_" + bt + "]{1,139}(?![_" + bt + "])", "g"), _t = new RegExp("[^" + bt + "]"), Pt = function(e2) {
2804
2845
  function t2(t3) {
2805
2846
  var s2 = e2.call(this, t3) || this;
2806
- return s2.serviceName = "twitter", s2.matcherRegex = Tt, s2.nonWordCharRegex = Dt, s2.serviceName = t3.serviceName, s2;
2847
+ return s2.serviceName = "twitter", s2.matcherRegex = Nt, s2.nonWordCharRegex = _t, s2.serviceName = t3.serviceName, s2;
2807
2848
  }
2808
- return Ye(t2, e2), t2.prototype.parseMatches = function(e3) {
2849
+ return et(t2, e2), t2.prototype.parseMatches = function(e3) {
2809
2850
  for (var t3, s2 = this.matcherRegex, n2 = this.nonWordCharRegex, r2 = this.serviceName, i2 = this.tagBuilder, a2 = []; null !== (t3 = s2.exec(e3)); ) {
2810
2851
  var o2 = t3.index, u2 = e3.charAt(o2 - 1);
2811
2852
  if (0 === o2 || n2.test(u2)) {
2812
2853
  var c2 = t3[0], l2 = t3[0].slice(1);
2813
- a2.push(new Ke({ tagBuilder: i2, matchedText: c2, offset: o2, serviceName: r2, hashtag: l2 }));
2854
+ a2.push(new rt({ tagBuilder: i2, matchedText: c2, offset: o2, serviceName: r2, hashtag: l2 }));
2814
2855
  }
2815
2856
  }
2816
2857
  return a2;
2817
2858
  }, t2;
2818
- }(st), Ft = new RegExp(/(?:(?:(?:(\+)?\d{1,3}[-\040.]?)?\(?\d{3}\)?[-\040.]?\d{3}[-\040.]?\d{4})|(?:(\+)(?:9[976]\d|8[987530]\d|6[987]\d|5[90]\d|42\d|3[875]\d|2[98654321]\d|9[8543210]|8[6421]|6[6543210]|5[87654321]|4[987654310]|3[9643210]|2[70]|7|1)[-\040.]?(?:\d[-\040.]?){6,12}\d+))([,;]+[0-9]+#?)*/.source + "|" + /(0([1-9]{1}-?[1-9]\d{3}|[1-9]{2}-?\d{3}|[1-9]{2}\d{1}-?\d{2}|[1-9]{2}\d{2}-?\d{1})-?\d{4}|0[789]0-?\d{4}-?\d{4}|050-?\d{4}-?\d{4})/.source, "g"), Bt = function(e2) {
2859
+ }(ut), Ot = new RegExp(/(?:(?:(?:(\+)?\d{1,3}[-\040.]?)?\(?\d{3}\)?[-\040.]?\d{3}[-\040.]?\d{4})|(?:(\+)(?:9[976]\d|8[987530]\d|6[987]\d|5[90]\d|42\d|3[875]\d|2[98654321]\d|9[8543210]|8[6421]|6[6543210]|5[87654321]|4[987654310]|3[9643210]|2[70]|7|1)[-\040.]?(?:\d[-\040.]?){6,12}\d+))([,;]+[0-9]+#?)*/.source + "|" + /(0([1-9]{1}-?[1-9]\d{3}|[1-9]{2}-?\d{3}|[1-9]{2}\d{1}-?\d{2}|[1-9]{2}\d{2}-?\d{1})-?\d{4}|0[789]0-?\d{4}-?\d{4}|050-?\d{4}-?\d{4})/.source, "g"), jt = function(e2) {
2819
2860
  function t2() {
2820
2861
  var t3 = null !== e2 && e2.apply(this, arguments) || this;
2821
- return t3.matcherRegex = Ft, t3;
2862
+ return t3.matcherRegex = Ot, t3;
2822
2863
  }
2823
- return Ye(t2, e2), t2.prototype.parseMatches = function(e3) {
2864
+ return et(t2, e2), t2.prototype.parseMatches = function(e3) {
2824
2865
  for (var t3, s2 = this.matcherRegex, n2 = this.tagBuilder, r2 = []; null !== (t3 = s2.exec(e3)); ) {
2825
2866
  var i2 = t3[0], a2 = i2.replace(/[^0-9,;#]/g, ""), o2 = !(!t3[1] && !t3[2]), u2 = 0 == t3.index ? "" : e3.substr(t3.index - 1, 1), c2 = e3.substr(t3.index + i2.length, 1), l2 = !u2.match(/\d/) && !c2.match(/\d/);
2826
- this.testMatch(t3[3]) && this.testMatch(i2) && l2 && r2.push(new et({ tagBuilder: n2, matchedText: i2, offset: t3.index, number: a2, plusSign: o2 }));
2867
+ this.testMatch(t3[3]) && this.testMatch(i2) && l2 && r2.push(new at({ tagBuilder: n2, matchedText: i2, offset: t3.index, number: a2, plusSign: o2 }));
2827
2868
  }
2828
2869
  return r2;
2829
2870
  }, t2.prototype.testMatch = function(e3) {
2830
- return it.test(e3);
2871
+ return ht.test(e3);
2831
2872
  }, t2;
2832
- }(st), Rt = new RegExp("@[_" + pt + "]{1,50}(?![_" + pt + "])", "g"), Nt = new RegExp("@[_." + pt + "]{1,30}(?![_" + pt + "])", "g"), _t = new RegExp("@[-_." + pt + "]{1,50}(?![-_" + pt + "])", "g"), Pt = new RegExp("[^" + pt + "]"), Ot = function(e2) {
2873
+ }(ut), Ut = new RegExp("@[_" + bt + "]{1,50}(?![_" + bt + "])", "g"), $t = new RegExp("@[_." + bt + "]{1,30}(?![_" + bt + "])", "g"), Wt = new RegExp("@[-_." + bt + "]{1,50}(?![-_" + bt + "])", "g"), qt = new RegExp("[^" + bt + "]"), Ht = function(e2) {
2833
2874
  function t2(t3) {
2834
2875
  var s2 = e2.call(this, t3) || this;
2835
- return s2.serviceName = "twitter", s2.matcherRegexes = { twitter: Rt, instagram: Nt, soundcloud: _t }, s2.nonWordCharRegex = Pt, s2.serviceName = t3.serviceName, s2;
2876
+ return s2.serviceName = "twitter", s2.matcherRegexes = { twitter: Ut, instagram: $t, soundcloud: Wt }, s2.nonWordCharRegex = qt, s2.serviceName = t3.serviceName, s2;
2836
2877
  }
2837
- return Ye(t2, e2), t2.prototype.parseMatches = function(e3) {
2878
+ return et(t2, e2), t2.prototype.parseMatches = function(e3) {
2838
2879
  var t3, s2 = this.serviceName, n2 = this.matcherRegexes[this.serviceName], r2 = this.nonWordCharRegex, i2 = this.tagBuilder, a2 = [];
2839
2880
  if (!n2) return a2;
2840
2881
  for (; null !== (t3 = n2.exec(e3)); ) {
2841
2882
  var o2 = t3.index, u2 = e3.charAt(o2 - 1);
2842
2883
  if (0 === o2 || r2.test(u2)) {
2843
2884
  var c2 = t3[0].replace(/\.+$/g, ""), l2 = c2.slice(1);
2844
- a2.push(new Xe({ tagBuilder: i2, matchedText: c2, offset: o2, serviceName: s2, mention: l2 }));
2885
+ a2.push(new it({ tagBuilder: i2, matchedText: c2, offset: o2, serviceName: s2, mention: l2 }));
2845
2886
  }
2846
2887
  }
2847
2888
  return a2;
2848
2889
  }, t2;
2849
- }(st);
2850
- function Ut(e2, t2) {
2851
- for (var s2, n2 = t2.onOpenTag, r2 = t2.onCloseTag, i2 = t2.onText, a2 = t2.onComment, o2 = t2.onDoctype, u2 = new jt(), c2 = 0, l2 = e2.length, h2 = 0, d2 = 0, p2 = u2; c2 < l2; ) {
2890
+ }(ut);
2891
+ function Lt(e2, t2) {
2892
+ for (var s2, n2 = t2.onOpenTag, r2 = t2.onCloseTag, i2 = t2.onText, a2 = t2.onComment, o2 = t2.onDoctype, u2 = new Gt(), c2 = 0, l2 = e2.length, h2 = 0, d2 = 0, p2 = u2; c2 < l2; ) {
2852
2893
  var f2 = e2.charAt(c2);
2853
2894
  switch (h2) {
2854
2895
  case 0:
@@ -2888,13 +2929,13 @@ function Ut(e2, t2) {
2888
2929
  I2(f2);
2889
2930
  break;
2890
2931
  case 12:
2891
- S2(f2);
2932
+ T2(f2);
2892
2933
  break;
2893
2934
  case 13:
2894
- T2();
2935
+ D2();
2895
2936
  break;
2896
2937
  case 14:
2897
- D2(f2);
2938
+ S2(f2);
2898
2939
  break;
2899
2940
  case 15:
2900
2941
  M2(f2);
@@ -2915,7 +2956,7 @@ function Ut(e2, t2) {
2915
2956
  _2(f2);
2916
2957
  break;
2917
2958
  default:
2918
- He(h2);
2959
+ Qe(h2);
2919
2960
  }
2920
2961
  c2++;
2921
2962
  }
@@ -2923,25 +2964,25 @@ function Ut(e2, t2) {
2923
2964
  "<" === e3 && O2();
2924
2965
  }
2925
2966
  function g2(e3) {
2926
- "!" === e3 ? h2 = 13 : "/" === e3 ? (h2 = 2, p2 = new jt(Ve(Ve({}, p2), { isClosing: true }))) : "<" === e3 ? O2() : nt.test(e3) ? (h2 = 3, p2 = new jt(Ve(Ve({}, p2), { isOpening: true }))) : (h2 = 0, p2 = u2);
2967
+ "!" === e3 ? h2 = 13 : "/" === e3 ? (h2 = 2, p2 = new Gt(st(st({}, p2), { isClosing: true }))) : "<" === e3 ? O2() : ct.test(e3) ? (h2 = 3, p2 = new Gt(st(st({}, p2), { isOpening: true }))) : (h2 = 0, p2 = u2);
2927
2968
  }
2928
2969
  function v2(e3) {
2929
- at.test(e3) ? (p2 = new jt(Ve(Ve({}, p2), { name: j2() })), h2 = 4) : "<" === e3 ? O2() : "/" === e3 ? (p2 = new jt(Ve(Ve({}, p2), { name: j2() })), h2 = 12) : ">" === e3 ? (p2 = new jt(Ve(Ve({}, p2), { name: j2() })), U2()) : nt.test(e3) || rt.test(e3) || ":" === e3 || P2();
2970
+ dt.test(e3) ? (p2 = new Gt(st(st({}, p2), { name: U2() })), h2 = 4) : "<" === e3 ? O2() : "/" === e3 ? (p2 = new Gt(st(st({}, p2), { name: U2() })), h2 = 12) : ">" === e3 ? (p2 = new Gt(st(st({}, p2), { name: U2() })), j2()) : ct.test(e3) || lt.test(e3) || ":" === e3 || P2();
2930
2971
  }
2931
2972
  function w2(e3) {
2932
- ">" === e3 ? P2() : nt.test(e3) ? h2 = 3 : P2();
2973
+ ">" === e3 ? P2() : ct.test(e3) ? h2 = 3 : P2();
2933
2974
  }
2934
2975
  function b2(e3) {
2935
- at.test(e3) || ("/" === e3 ? h2 = 12 : ">" === e3 ? U2() : "<" === e3 ? O2() : "=" === e3 || ot.test(e3) || ut.test(e3) ? P2() : h2 = 5);
2976
+ dt.test(e3) || ("/" === e3 ? h2 = 12 : ">" === e3 ? j2() : "<" === e3 ? O2() : "=" === e3 || pt.test(e3) || ft.test(e3) ? P2() : h2 = 5);
2936
2977
  }
2937
2978
  function y2(e3) {
2938
- at.test(e3) ? h2 = 6 : "/" === e3 ? h2 = 12 : "=" === e3 ? h2 = 7 : ">" === e3 ? U2() : "<" === e3 ? O2() : ot.test(e3) && P2();
2979
+ dt.test(e3) ? h2 = 6 : "/" === e3 ? h2 = 12 : "=" === e3 ? h2 = 7 : ">" === e3 ? j2() : "<" === e3 ? O2() : pt.test(e3) && P2();
2939
2980
  }
2940
2981
  function C2(e3) {
2941
- at.test(e3) || ("/" === e3 ? h2 = 12 : "=" === e3 ? h2 = 7 : ">" === e3 ? U2() : "<" === e3 ? O2() : ot.test(e3) ? P2() : h2 = 5);
2982
+ dt.test(e3) || ("/" === e3 ? h2 = 12 : "=" === e3 ? h2 = 7 : ">" === e3 ? j2() : "<" === e3 ? O2() : pt.test(e3) ? P2() : h2 = 5);
2942
2983
  }
2943
2984
  function A2(e3) {
2944
- at.test(e3) || ('"' === e3 ? h2 = 8 : "'" === e3 ? h2 = 9 : /[>=`]/.test(e3) ? P2() : "<" === e3 ? O2() : h2 = 10);
2985
+ dt.test(e3) || ('"' === e3 ? h2 = 8 : "'" === e3 ? h2 = 9 : /[>=`]/.test(e3) ? P2() : "<" === e3 ? O2() : h2 = 10);
2945
2986
  }
2946
2987
  function E2(e3) {
2947
2988
  '"' === e3 && (h2 = 11);
@@ -2950,18 +2991,18 @@ function Ut(e2, t2) {
2950
2991
  "'" === e3 && (h2 = 11);
2951
2992
  }
2952
2993
  function x2(e3) {
2953
- at.test(e3) ? h2 = 4 : ">" === e3 ? U2() : "<" === e3 && O2();
2994
+ dt.test(e3) ? h2 = 4 : ">" === e3 ? j2() : "<" === e3 && O2();
2954
2995
  }
2955
2996
  function I2(e3) {
2956
- at.test(e3) ? h2 = 4 : "/" === e3 ? h2 = 12 : ">" === e3 ? U2() : "<" === e3 ? O2() : (h2 = 4, c2--);
2997
+ dt.test(e3) ? h2 = 4 : "/" === e3 ? h2 = 12 : ">" === e3 ? j2() : "<" === e3 ? O2() : (h2 = 4, c2--);
2957
2998
  }
2958
- function S2(e3) {
2959
- ">" === e3 ? (p2 = new jt(Ve(Ve({}, p2), { isClosing: true })), U2()) : h2 = 4;
2999
+ function T2(e3) {
3000
+ ">" === e3 ? (p2 = new Gt(st(st({}, p2), { isClosing: true })), j2()) : h2 = 4;
2960
3001
  }
2961
- function T2(t3) {
2962
- "--" === e2.substr(c2, 2) ? (c2 += 2, p2 = new jt(Ve(Ve({}, p2), { type: "comment" })), h2 = 14) : "DOCTYPE" === e2.substr(c2, 7).toUpperCase() ? (c2 += 7, p2 = new jt(Ve(Ve({}, p2), { type: "doctype" })), h2 = 20) : P2();
3002
+ function D2(t3) {
3003
+ "--" === e2.substr(c2, 2) ? (c2 += 2, p2 = new Gt(st(st({}, p2), { type: "comment" })), h2 = 14) : "DOCTYPE" === e2.substr(c2, 7).toUpperCase() ? (c2 += 7, p2 = new Gt(st(st({}, p2), { type: "doctype" })), h2 = 20) : P2();
2963
3004
  }
2964
- function D2(e3) {
3005
+ function S2(e3) {
2965
3006
  "-" === e3 ? h2 = 15 : ">" === e3 ? P2() : h2 = 16;
2966
3007
  }
2967
3008
  function M2(e3) {
@@ -2974,33 +3015,33 @@ function Ut(e2, t2) {
2974
3015
  h2 = "-" === e3 ? 18 : 16;
2975
3016
  }
2976
3017
  function R2(e3) {
2977
- ">" === e3 ? U2() : "!" === e3 ? h2 = 19 : "-" === e3 || (h2 = 16);
3018
+ ">" === e3 ? j2() : "!" === e3 ? h2 = 19 : "-" === e3 || (h2 = 16);
2978
3019
  }
2979
3020
  function N2(e3) {
2980
- "-" === e3 ? h2 = 17 : ">" === e3 ? U2() : h2 = 16;
3021
+ "-" === e3 ? h2 = 17 : ">" === e3 ? j2() : h2 = 16;
2981
3022
  }
2982
3023
  function _2(e3) {
2983
- ">" === e3 ? U2() : "<" === e3 && O2();
3024
+ ">" === e3 ? j2() : "<" === e3 && O2();
2984
3025
  }
2985
3026
  function P2() {
2986
3027
  h2 = 0, p2 = u2;
2987
3028
  }
2988
3029
  function O2() {
2989
- h2 = 1, p2 = new jt({ idx: c2 });
3030
+ h2 = 1, p2 = new Gt({ idx: c2 });
2990
3031
  }
2991
- function U2() {
3032
+ function j2() {
2992
3033
  var t3 = e2.slice(d2, p2.idx);
2993
3034
  t3 && i2(t3, d2), "comment" === p2.type ? a2(p2.idx) : "doctype" === p2.type ? o2(p2.idx) : (p2.isOpening && n2(p2.name, p2.idx), p2.isClosing && r2(p2.name, p2.idx)), P2(), d2 = c2 + 1;
2994
3035
  }
2995
- function j2() {
3036
+ function U2() {
2996
3037
  var t3 = p2.idx + (p2.isClosing ? 2 : 1);
2997
3038
  return e2.slice(t3, c2).toLowerCase();
2998
3039
  }
2999
3040
  d2 < c2 && (s2 = e2.slice(d2, c2), i2(s2, d2), d2 = c2 + 1);
3000
3041
  }
3001
- var jt = function(e2) {
3042
+ var Gt = function(e2) {
3002
3043
  void 0 === e2 && (e2 = {}), this.idx = void 0 !== e2.idx ? e2.idx : -1, this.type = e2.type || "tag", this.name = e2.name || "", this.isOpening = !!e2.isOpening, this.isClosing = !!e2.isClosing;
3003
- }, $t = function() {
3044
+ }, zt = function() {
3004
3045
  function e2(t2) {
3005
3046
  void 0 === t2 && (t2 = {}), this.version = e2.version, this.urls = {}, this.email = true, this.phone = true, this.hashtag = false, this.mention = false, this.newWindow = true, this.stripPrefix = { scheme: true, www: true }, this.stripTrailingSlash = true, this.decodePercentEncoding = true, this.truncate = { length: 0, location: "end" }, this.className = "", this.replaceFn = null, this.context = void 0, this.sanitizeHtml = false, this.matchers = null, this.tagBuilder = null, this.urls = this.normalizeUrlsCfg(t2.urls), this.email = "boolean" == typeof t2.email ? t2.email : this.email, this.phone = "boolean" == typeof t2.phone ? t2.phone : this.phone, this.hashtag = t2.hashtag || this.hashtag, this.mention = t2.mention || this.mention, this.newWindow = "boolean" == typeof t2.newWindow ? t2.newWindow : this.newWindow, this.stripPrefix = this.normalizeStripPrefixCfg(t2.stripPrefix), this.stripTrailingSlash = "boolean" == typeof t2.stripTrailingSlash ? t2.stripTrailingSlash : this.stripTrailingSlash, this.decodePercentEncoding = "boolean" == typeof t2.decodePercentEncoding ? t2.decodePercentEncoding : this.decodePercentEncoding, this.sanitizeHtml = t2.sanitizeHtml || false;
3006
3047
  var s2 = this.mention;
@@ -3024,7 +3065,7 @@ var jt = function(e2) {
3024
3065
  }(e3 || {}, { length: Number.POSITIVE_INFINITY, location: "end" });
3025
3066
  }, e2.prototype.parse = function(e3) {
3026
3067
  var t2 = this, s2 = ["a", "style", "script"], n2 = 0, r2 = [];
3027
- return Ut(e3, { onOpenTag: function(e4) {
3068
+ return Lt(e3, { onOpenTag: function(e4) {
3028
3069
  s2.indexOf(e4) >= 0 && n2++;
3029
3070
  }, onText: function(e4, s3) {
3030
3071
  if (0 === n2) {
@@ -3063,19 +3104,19 @@ var jt = function(e2) {
3063
3104
  }
3064
3105
  return e3;
3065
3106
  }, e2.prototype.removeUnwantedMatches = function(e3) {
3066
- return this.hashtag || qe(e3, function(e4) {
3107
+ return this.hashtag || Ye(e3, function(e4) {
3067
3108
  return "hashtag" === e4.getType();
3068
- }), this.email || qe(e3, function(e4) {
3109
+ }), this.email || Ye(e3, function(e4) {
3069
3110
  return "email" === e4.getType();
3070
- }), this.phone || qe(e3, function(e4) {
3111
+ }), this.phone || Ye(e3, function(e4) {
3071
3112
  return "phone" === e4.getType();
3072
- }), this.mention || qe(e3, function(e4) {
3113
+ }), this.mention || Ye(e3, function(e4) {
3073
3114
  return "mention" === e4.getType();
3074
- }), this.urls.schemeMatches || qe(e3, function(e4) {
3115
+ }), this.urls.schemeMatches || Ye(e3, function(e4) {
3075
3116
  return "url" === e4.getType() && "scheme" === e4.getUrlMatchType();
3076
- }), this.urls.wwwMatches || qe(e3, function(e4) {
3117
+ }), this.urls.wwwMatches || Ye(e3, function(e4) {
3077
3118
  return "url" === e4.getType() && "www" === e4.getUrlMatchType();
3078
- }), this.urls.tldMatches || qe(e3, function(e4) {
3119
+ }), this.urls.tldMatches || Ye(e3, function(e4) {
3079
3120
  return "url" === e4.getType() && "tld" === e4.getUrlMatchType();
3080
3121
  }), e3;
3081
3122
  }, e2.prototype.parseText = function(e3, t2) {
@@ -3095,102 +3136,107 @@ var jt = function(e2) {
3095
3136
  return s2.push(e3.substring(n2)), s2.join("");
3096
3137
  }, e2.prototype.createMatchReturnVal = function(e3) {
3097
3138
  var t2;
3098
- return this.replaceFn && (t2 = this.replaceFn.call(this.context, e3)), "string" == typeof t2 ? t2 : false === t2 ? e3.getMatchedText() : t2 instanceof Ge ? t2.toAnchorString() : e3.buildTag().toAnchorString();
3139
+ return this.replaceFn && (t2 = this.replaceFn.call(this.context, e3)), "string" == typeof t2 ? t2 : false === t2 ? e3.getMatchedText() : t2 instanceof Ve ? t2.toAnchorString() : e3.buildTag().toAnchorString();
3099
3140
  }, e2.prototype.getMatchers = function() {
3100
3141
  if (this.matchers) return this.matchers;
3101
- var e3 = this.getTagBuilder(), t2 = [new Mt({ tagBuilder: e3, serviceName: this.hashtag }), new At({ tagBuilder: e3 }), new Bt({ tagBuilder: e3 }), new Ot({ tagBuilder: e3, serviceName: this.mention }), new St({ tagBuilder: e3, stripPrefix: this.stripPrefix, stripTrailingSlash: this.stripTrailingSlash, decodePercentEncoding: this.decodePercentEncoding })];
3142
+ var e3 = this.getTagBuilder(), t2 = [new Pt({ tagBuilder: e3, serviceName: this.hashtag }), new Dt({ tagBuilder: e3 }), new jt({ tagBuilder: e3 }), new Ht({ tagBuilder: e3, serviceName: this.mention }), new Rt({ tagBuilder: e3, stripPrefix: this.stripPrefix, stripTrailingSlash: this.stripTrailingSlash, decodePercentEncoding: this.decodePercentEncoding })];
3102
3143
  return this.matchers = t2;
3103
3144
  }, e2.prototype.getTagBuilder = function() {
3104
3145
  var e3 = this.tagBuilder;
3105
- return e3 || (e3 = this.tagBuilder = new Le({ newWindow: this.newWindow, truncate: this.truncate, className: this.className })), e3;
3106
- }, e2.version = "3.14.3", e2.AnchorTagBuilder = Le, e2.HtmlTag = Ge, e2.matcher = { Email: At, Hashtag: Mt, Matcher: st, Mention: Ot, Phone: Bt, Url: St }, e2.match = { Email: Ze, Hashtag: Ke, Match: ze, Mention: Xe, Phone: et, Url: tt }, e2;
3146
+ return e3 || (e3 = this.tagBuilder = new Ze({ newWindow: this.newWindow, truncate: this.truncate, className: this.className })), e3;
3147
+ }, e2.version = "3.14.3", e2.AnchorTagBuilder = Ze, e2.HtmlTag = Ve, e2.matcher = { Email: Dt, Hashtag: Pt, Matcher: ut, Mention: Ht, Phone: jt, Url: Rt }, e2.match = { Email: nt, Hashtag: rt, Match: Ke, Mention: it, Phone: at, Url: ot }, e2;
3107
3148
  }();
3108
- function Wt(e2, t2 = e2) {
3149
+ function Jt(e2, t2 = e2) {
3109
3150
  return { type: "autolink", url: e2, text: t2 };
3110
3151
  }
3111
- const qt = Re(/<!!mention:([^>\s]*?)\|(.*?)>/gm, ([e2, t2, s2]) => /* @__PURE__ */ function(e3, t3) {
3152
+ const Yt = Ue(/<!!mention:([^>\s]*?)\|(.*?)>/gm, ([e2, t2, s2]) => /* @__PURE__ */ function(e3, t3) {
3112
3153
  return { type: "mention", id: e3, text: t3 };
3113
- }(decodeURIComponent(t2), s2)), Ht = Re(/<!!customemoji:(.*?)>/gm, ([e2, t2]) => /* @__PURE__ */ function(e3) {
3154
+ }(decodeURIComponent(t2), s2)), Qt = Ue(/<!!customemoji:(.*?)>/gm, ([e2, t2]) => /* @__PURE__ */ function(e3) {
3114
3155
  return { type: "customemoji", text: e3 };
3115
- }(t2)), Gt = Re(/<((?:https?|mailto):.*?)\|(.*?)>/gi, ([e2, t2, s2]) => /* @__PURE__ */ function(e3, t3 = []) {
3156
+ }(t2)), Vt = Ue(/<((?:https?|mailto):.*?)\|(.*?)>/gi, ([e2, t2, s2]) => /* @__PURE__ */ function(e3, t3 = []) {
3116
3157
  return { type: "link", url: e3, children: t3 };
3117
- }(t2, [s2])), Lt = Re(/<actionlink:([^|]+)[|]([^>]*)>/gi, ([e2, t2, s2]) => {
3118
- const { action: n2, params: r2 } = Jt(t2);
3158
+ }(t2, [s2])), Zt = Ue(/<actionlink:([^|]+)[|]([^>]*)>/gi, ([e2, t2, s2]) => {
3159
+ const { action: n2, params: r2 } = Xt(t2);
3119
3160
  return /* @__PURE__ */ function(e3, t3, s3 = []) {
3120
3161
  return { type: "actionlink", action: e3, params: t3, children: s3 };
3121
3162
  }(n2, r2, [s2]);
3122
- }), zt = Re(/<actionbutton:([^|]+)[|]([^>]*)>/gi, ([e2, t2, s2]) => {
3123
- const { action: n2, params: r2 } = Jt(t2);
3163
+ }), Kt = Ue(/<actionbutton:([^|]+)[|]([^>]*)>/gi, ([e2, t2, s2]) => {
3164
+ const { action: n2, params: r2 } = Xt(t2);
3124
3165
  return /* @__PURE__ */ function(e3, t3, s3 = []) {
3125
3166
  return { type: "actionbutton", action: e3, params: t3, children: s3 };
3126
3167
  }(n2, r2, [s2]);
3127
3168
  });
3128
- function Jt(e2) {
3169
+ function Xt(e2) {
3129
3170
  const t2 = e2.indexOf("?");
3130
3171
  if (-1 === t2) return { action: e2, params: {} };
3131
3172
  return { action: e2.slice(0, t2), params: Object.fromEntries(new URLSearchParams(e2.slice(t2))) };
3132
3173
  }
3133
- const Yt = Re(/(?:^|\n)(?:\s*[-*+]\s+[^\n]+(?:\n|$))+/g, ([e2]) => /* @__PURE__ */ function(e3 = []) {
3174
+ const es = Ue(/(?:^|\n)(?:\s*[-*+]\s+[^\n]+(?:\n|$))+/g, ([e2]) => /* @__PURE__ */ function(e3 = []) {
3134
3175
  return { type: "bulletlist", children: e3 };
3135
- }([e2.startsWith("\n") ? e2.slice(1) : e2])), Qt = Re(/^\s*[-*+]\s+([^\n]+)(?:\n|$)/gm, ([e2, t2]) => ({ type: "bulletpoint", children: [t2] })), Vt = (e2) => {
3176
+ }([e2.startsWith("\n") ? e2.slice(1) : e2])), ts = Ue(/^\s*[-*+]\s+([^\n]+)(?:\n|$)/gm, ([e2, t2]) => ({ type: "bulletpoint", children: [t2] })), ss = (e2) => {
3136
3177
  const t2 = /(?:^|[^-:/\w])([(+]?[0-9](?:[-_+ ().]?[0-9]){5,11}[0-9])(?:[^-:/\w]|$)/g;
3137
3178
  let s2 = 0;
3138
3179
  const n2 = [];
3139
- for (const r2 of J(e2, t2)) {
3180
+ for (const r2 of V(e2, t2)) {
3140
3181
  const t3 = r2[0], i2 = r2[1], a2 = t3.startsWith(i2) ? r2.index : r2.index + 1;
3141
3182
  a2 - s2 > 0 && n2.push(e2.substring(s2, a2));
3142
- const o2 = Wt("tel:" + i2.replace(/[^0-9+]/g, ""), i2);
3183
+ const o2 = Jt("tel:" + i2.replace(/[^0-9+]/g, ""), i2);
3143
3184
  n2.push(o2), s2 = a2 + i2.length;
3144
3185
  }
3145
3186
  return s2 < e2.length && n2.push(e2.substring(s2)), n2;
3146
- }, Zt = (e2) => Gt(e2).flatMap((e3) => "string" == typeof e3 ? Kt(e3) : ["<", ...Kt(e3.url), ...Kt("|" + e3.children[0] + ">")]), Kt = (e2) => {
3147
- const t2 = $t.parse(e2, { urls: true, email: true, phone: false, hashtag: false, mention: false }), s2 = [];
3187
+ }, ns = (e2) => Vt(e2).flatMap((e3) => "string" == typeof e3 ? rs(e3) : ["<", ...rs(e3.url), ...rs("|" + e3.children[0] + ">")]), rs = (e2) => {
3188
+ const t2 = zt.parse(e2, { urls: true, email: true, phone: false, hashtag: false, mention: false }), s2 = [];
3148
3189
  let n2 = 0;
3149
3190
  for (const r2 of t2) {
3150
3191
  const t3 = r2.getOffset(), i2 = r2.getMatchedText(), a2 = i2.length;
3151
3192
  let o2 = i2;
3152
- r2 instanceof Ze ? o2 = "mailto:" + r2.getEmail() : r2 instanceof tt && (o2 = r2.getUrl()), t3 > n2 && s2.push(e2.substring(n2, t3)), s2.push(Wt(o2, i2)), n2 = t3 + a2;
3193
+ r2 instanceof nt ? o2 = "mailto:" + r2.getEmail() : r2 instanceof ot && (o2 = r2.getUrl()), t3 > n2 && s2.push(e2.substring(n2, t3)), s2.push(Jt(o2, i2)), n2 = t3 + a2;
3153
3194
  }
3154
3195
  return n2 < e2.length && s2.push(e2.substring(n2)), s2;
3155
- }, Xt = ["Codeblock", "Codespan", "FormattedLink", "Wikitext", "Autolink", "Actions", "Mention", "Mention", "BulletPoint", "CustomEmoji"];
3156
- function es(e2 = { except: [] }) {
3196
+ }, is = ["Codeblock", "Codespan", "FormattedLink", "Wikitext", "Autolink", "Actions", "Mention", "Mention", "BulletPoint", "CustomEmoji"];
3197
+ function as(e2 = { except: [] }) {
3157
3198
  var _a2;
3158
- const t2 = { multilineSteps: [], singlelineSteps: [] }, s2 = (_a2 = e2.except) != null ? _a2 : Xt.filter((t3) => !e2.only.includes(t3));
3159
- return s2.includes("BulletPoint") || t2.multilineSteps.push(Yt, Qt), s2.includes("Mention") || t2.singlelineSteps.push(qt), s2.includes("CustomEmoji") || t2.singlelineSteps.push(Ht), s2.includes("Codespan") || t2.multilineSteps.push(Re(/```([^]+?)```/g, ([e3, t3]) => ({ type: "codespan", text: t3 }))), s2.includes("FormattedLink") || t2.singlelineSteps.push(Gt), s2.includes("Actions") || (t2.singlelineSteps.push(Lt), t2.singlelineSteps.push(zt)), s2.includes("Wikitext") || t2.singlelineSteps.push(Ue), s2.includes("Autolink") || t2.singlelineSteps.push(Zt, Vt), t2;
3199
+ const t2 = { multilineSteps: [], singlelineSteps: [] }, s2 = (_a2 = e2.except) != null ? _a2 : is.filter((t3) => !e2.only.includes(t3));
3200
+ return s2.includes("BulletPoint") || t2.multilineSteps.push(es, ts), s2.includes("Mention") || t2.singlelineSteps.push(Yt), s2.includes("CustomEmoji") || t2.singlelineSteps.push(Qt), s2.includes("Codespan") || t2.multilineSteps.push(Ue(/```([^]+?)```/g, ([e3, t3]) => ({ type: "codespan", text: t3.replace(/<!!mention:.*?\|([^>]*)>/gim, "@$1").replace(/<!!customemoji:(.*?)>/gim, "$1") }))), s2.includes("FormattedLink") || t2.singlelineSteps.push(Vt), s2.includes("Actions") || (t2.singlelineSteps.push(Zt), t2.singlelineSteps.push(Kt)), s2.includes("Wikitext") || t2.singlelineSteps.push(Le), s2.includes("Autolink") || t2.singlelineSteps.push(ns, ss), t2;
3160
3201
  }
3161
- const ts = function(e2) {
3202
+ const os = function(e2) {
3162
3203
  const t2 = RegExp(`[^${e2}]+${e2}?|${e2}`, "g");
3163
3204
  return (e3) => Array.from(e3.match(t2) || []);
3164
3205
  }("\n");
3165
- function ss(e2, t2 = { except: [] }) {
3206
+ function us(e2, t2 = { except: [] }) {
3166
3207
  let s2 = function(e3, t3) {
3167
3208
  let s3 = [e3];
3168
- return s3 = rs(s3, t3.multilineSteps), s3 = rs(s3, [ts]), s3 = rs(s3, t3.singlelineSteps), s3 = is(s3), s3;
3169
- }(e2, es(t2));
3170
- return s2 = as(s2, false), s2;
3209
+ return s3 = ls(s3, t3.multilineSteps), s3 = ls(s3, [os]), s3 = ls(s3, t3.singlelineSteps), s3 = hs(s3), s3;
3210
+ }(e2, as(t2));
3211
+ return s2 = ds(s2, false), s2;
3171
3212
  }
3172
- function ns(e2) {
3173
- return ss(e2, { except: ["FormattedLink", "Actions"] });
3213
+ function cs(e2) {
3214
+ return us(e2, { except: ["FormattedLink", "Actions"] });
3174
3215
  }
3175
- function rs(e2, t2) {
3176
- return t2.reduce((e3, t3) => Be(e3, t3), e2);
3216
+ function ls(e2, t2) {
3217
+ return t2.reduce((e3, t3) => je(e3, t3), e2);
3177
3218
  }
3178
- function is(e2) {
3219
+ function hs(e2) {
3179
3220
  const t2 = [];
3180
3221
  let s2 = -1;
3181
- for (const n2 of e2) "string" == typeof n2 ? "string" == typeof t2[s2] ? t2[s2] += n2 : t2[++s2] = n2 : t2[++s2] = "children" in n2 ? __spreadProps(__spreadValues({}, n2), { children: is(n2.children) }) : n2;
3222
+ for (const n2 of e2) "string" == typeof n2 ? "string" == typeof t2[s2] ? t2[s2] += n2 : t2[++s2] = n2 : t2[++s2] = "children" in n2 ? __spreadProps(__spreadValues({}, n2), { children: hs(n2.children) }) : n2;
3182
3223
  return t2;
3183
3224
  }
3184
- function as(e2, t2) {
3225
+ function ds(e2, t2) {
3185
3226
  const s2 = [];
3186
3227
  let n2 = [];
3187
3228
  for (let r2 = 0; r2 < e2.length; r2++) {
3188
3229
  const i2 = e2[r2];
3189
- "string" == typeof i2 ? n2.push(i2) : "children" in i2 ? (n2.length > 0 && (s2.push(n2.join("")), n2 = []), i2.children = as(i2.children, t2 || "link" === i2.type || "actionbutton" === i2.type || "actionlink" === i2.type), s2.push(i2)) : "autolink" === i2.type && t2 ? n2.push(i2.text) : (n2.length > 0 && (s2.push(n2.join("")), n2 = []), s2.push(i2));
3230
+ if ("string" == typeof i2) n2.push(i2);
3231
+ else if ("children" in i2) {
3232
+ n2.length > 0 && (s2.push(n2.join("")), n2 = []);
3233
+ const e3 = ds(i2.children, t2 || "link" === i2.type || "actionbutton" === i2.type || "actionlink" === i2.type);
3234
+ s2.push(__spreadProps(__spreadValues({}, i2), { children: e3 }));
3235
+ } else "autolink" === i2.type && t2 ? n2.push(i2.text) : (n2.length > 0 && (s2.push(n2.join("")), n2 = []), s2.push(i2));
3190
3236
  }
3191
3237
  return n2.length > 0 && (s2.push(n2.join("")), n2 = []), s2;
3192
3238
  }
3193
- class os {
3239
+ class ps {
3194
3240
  constructor(e2, t2, s2, n2) {
3195
3241
  this.emoji = e2, this.messageId = t2, this.conversationId = s2, this._realtimeClient = n2;
3196
3242
  }
@@ -3213,7 +3259,7 @@ class os {
3213
3259
  });
3214
3260
  }
3215
3261
  }
3216
- class us {
3262
+ class fs {
3217
3263
  constructor(e2, t2, s2) {
3218
3264
  this.id = e2, this.conversationId = t2, this._realtimeClient = s2;
3219
3265
  }
@@ -3226,20 +3272,20 @@ class us {
3226
3272
  reaction(e2) {
3227
3273
  if ("string" != typeof e2) throw new Error(`Creating ReactionRef failed because emoji "${e2}" is not a string`);
3228
3274
  if ("" === e2) throw new Error(`Creating ReactionRef failed because emoji "${e2}" is an empty string`);
3229
- return new os(e2, this.brandedId, this.brandedConversationId, this._realtimeClient);
3275
+ return new ps(e2, this.brandedId, this.brandedConversationId, this._realtimeClient);
3230
3276
  }
3231
3277
  get() {
3232
3278
  return __async(this, null, function* () {
3233
3279
  const t2 = yield this._realtimeClient.call("GET", ["me", "conversations", this.brandedConversationId, "messages", this.brandedId], {});
3234
3280
  if (!t2.ok && "server" === t2.where && 404 === t2.value.status) return null;
3235
3281
  if (!t2.ok && "server" === t2.where && 403 === t2.value.status && "NOT_A_PARTICIPANT" === t2.value.errorCode) return null;
3236
- const s2 = e("Get message " + this.id, t2), n2 = yield this._realtimeClient.createMessageSnapshot(s2, this.brandedConversationId);
3237
- return Te("Get message " + this.id, n2);
3282
+ const s2 = e("Get message " + this.id, t2), n2 = yield this._realtimeClient.hydrateMessageData(s2, this.brandedConversationId);
3283
+ return Ne("Get message " + this.id, n2);
3238
3284
  });
3239
3285
  }
3240
3286
  edit(t2) {
3241
3287
  return __async(this, null, function* () {
3242
- const s2 = { content: cs(t2), custom: "string" == typeof t2 ? void 0 : t2.custom }, n2 = yield this._realtimeClient.call("PATCH", ["conversations", this.brandedConversationId, "messages", this.brandedId], s2);
3288
+ const s2 = { content: ms(t2), custom: "string" == typeof t2 ? void 0 : t2.custom }, n2 = yield this._realtimeClient.call("PATCH", ["conversations", this.brandedConversationId, "messages", this.brandedId], s2);
3243
3289
  e(`Edit message ${this.id} in conversation ${this.conversationId}`, n2);
3244
3290
  });
3245
3291
  }
@@ -3250,16 +3296,16 @@ class us {
3250
3296
  });
3251
3297
  }
3252
3298
  }
3253
- function cs(e2) {
3299
+ function ms(e2) {
3254
3300
  if ("string" == typeof e2) {
3255
- return [{ type: "text", children: ss(e2) }];
3301
+ return [{ type: "text", children: us(e2) }];
3256
3302
  }
3257
3303
  if ("text" in e2 && e2.text) {
3258
- return [{ type: "text", children: ss(e2.text) }];
3304
+ return [{ type: "text", children: us(e2.text) }];
3259
3305
  }
3260
3306
  if ("content" in e2 && e2.content) return e2.content;
3261
3307
  }
3262
- class ls {
3308
+ class gs {
3263
3309
  constructor(e2, t2) {
3264
3310
  this.id = e2, this._realtimeClient = t2, this.uselessObjForTypeCheck = { subject: null, photoUrl: null, welcomeMessages: null, custom: null, access: null, notify: null };
3265
3311
  }
@@ -3272,22 +3318,24 @@ class ls {
3272
3318
  participant(e2) {
3273
3319
  if ("string" == typeof e2) {
3274
3320
  if ("" === e2) throw new Error(`Creating ParticipantRef failed because ID "${e2}" is an empty string`);
3275
- return new Me(e2, this.id, this._realtimeClient);
3321
+ return new Pe(e2, this.id, this._realtimeClient);
3276
3322
  }
3277
- if ("brandedId" in e2) return new Me(e2.id, this.id, this._realtimeClient);
3323
+ if ("brandedId" in e2) return new Pe(e2.id, this.id, this._realtimeClient);
3278
3324
  throw new Error(`Creating ParticipantRef failed because user "${e2}" is not a string or a UserRef`);
3279
3325
  }
3280
3326
  message(e2) {
3281
3327
  if ("string" != typeof e2) throw new Error(`Creating MessageRef failed because ID "${e2}" is not a string`);
3282
3328
  if ("" === e2) throw new Error(`Creating MessageRef failed because ID "${e2}" is an empty string`);
3283
- return new us(e2, this.brandedId, this._realtimeClient);
3329
+ return new fs(e2, this.brandedId, this._realtimeClient);
3284
3330
  }
3285
3331
  get() {
3286
3332
  return __async(this, null, function* () {
3287
3333
  const t2 = this._realtimeClient.listMessages(this.brandedId, { limit: 1 }), s2 = yield this._realtimeClient.call("GET", ["me", "conversations", this.brandedId], {});
3288
3334
  if (!s2.ok && "server" === s2.where && 404 === s2.value.status) return null;
3289
- const n2 = e("Get conversation " + this.id, s2), r2 = Te("Get last message in conversation " + this.id, yield t2), i2 = 0 === r2.length ? null : r2[0];
3290
- return this._realtimeClient.createConversationSnapshotPreloaded(n2, i2);
3335
+ const n2 = e("Get conversation " + this.id, s2), r2 = Ne("Get last message in conversation " + this.id, yield t2);
3336
+ return function(e2, t3) {
3337
+ return _({ id: e2.id, subject: e2.subject, photoUrl: e2.photoUrl, welcomeMessages: _(e2.welcomeMessages), custom: _(e2.custom), createdAt: e2.createdAt, joinedAt: e2.joinedAt, lastMessageAt: e2.lastMessageAt, unreadMessageCount: e2.unreadMessageCount, isUnread: e2.isUnread, access: e2.access, notify: e2.notify, lastMessage: t3, readUntil: e2.readUntil, everyoneReadUntil: e2.everyoneReadUntil });
3338
+ }(n2, 0 === r2.length ? null : r2[0]);
3291
3339
  });
3292
3340
  }
3293
3341
  set(t2) {
@@ -3329,8 +3377,8 @@ class ls {
3329
3377
  }
3330
3378
  send(t2) {
3331
3379
  return __async(this, null, function* () {
3332
- const s2 = { content: hs(t2), referencedMessageId: ds(t2), custom: "string" == typeof t2 ? void 0 : t2.custom, idempotencyKey: Fe((/* @__PURE__ */ new Date()).getTime()) }, n2 = yield this._realtimeClient.call("POST", ["conversations", this.brandedId, "messages"], s2), r2 = e("Send message to conversation " + this.id, n2);
3333
- return new us(r2.id, this.brandedId, this._realtimeClient);
3380
+ const s2 = { content: vs(t2), referencedMessageId: ws(t2), custom: "string" == typeof t2 ? void 0 : t2.custom, idempotencyKey: Oe((/* @__PURE__ */ new Date()).getTime()) }, n2 = yield this._realtimeClient.call("POST", ["conversations", this.brandedId, "messages"], s2), r2 = e("Send message to conversation " + this.id, n2);
3381
+ return new fs(r2.id, this.brandedId, this._realtimeClient);
3334
3382
  });
3335
3383
  }
3336
3384
  subscribeMessages(e2) {
@@ -3352,21 +3400,21 @@ class ls {
3352
3400
  });
3353
3401
  }
3354
3402
  }
3355
- function hs(e2) {
3403
+ function vs(e2) {
3356
3404
  if ("string" == typeof e2) {
3357
- return [{ type: "text", children: ns(e2) }];
3405
+ return [{ type: "text", children: cs(e2) }];
3358
3406
  }
3359
3407
  if ("text" in e2) {
3360
- return [{ type: "text", children: ns(e2.text) }];
3408
+ return [{ type: "text", children: cs(e2.text) }];
3361
3409
  }
3362
3410
  return e2.content;
3363
3411
  }
3364
- function ds(e2) {
3412
+ function ws(e2) {
3365
3413
  if ("string" == typeof e2) return;
3366
3414
  const t2 = e2.referencedMessage;
3367
3415
  return void 0 !== t2 ? "string" == typeof t2 ? t2 : t2.id : void 0;
3368
3416
  }
3369
- class ps {
3417
+ class bs {
3370
3418
  constructor(e2, t2, s2) {
3371
3419
  this.realtimeWsApiUrl = e2, this.internalHttpApiUrl = t2, this.restApiHttpUrl = s2;
3372
3420
  }
@@ -3378,23 +3426,28 @@ class ps {
3378
3426
  return this.realtimeWsApiUrl + `/${e2}/realtime/${i2}?talkjs-client-build=${r2 != null ? r2 : "standalone"}&talkjs-core=${s2}&talkjs-client-id=${n2}`;
3379
3427
  }
3380
3428
  static fromHost(e2) {
3381
- const t2 = new ps("wss://realtime.talkjs.com/v1", "https://app.talkjs.com/api/v0", "https://api.talkjs.com/v1");
3429
+ var _a2;
3430
+ const t2 = new bs("wss://realtime.talkjs.com/v1", "https://app.talkjs.com/api/v0", "https://api.talkjs.com/v1");
3382
3431
  if (!e2) return t2;
3432
+ if ("@currentHost" === e2) {
3433
+ if ("undefined" == typeof location) throw new Error("You can only use @currentHost in a browser.");
3434
+ e2 = ((_a2 = window.top) != null ? _a2 : window).location.host;
3435
+ }
3383
3436
  if (e2.endsWith("talkjs.com")) {
3384
3437
  const s2 = e2.match(/\w+-(\w+)\.talkjs\.com/);
3385
3438
  if (s2) {
3386
3439
  const e3 = s2[1];
3387
- return new ps(`wss://realtime-${e3}.talkjs.com/v1`, `https://app-${e3}.talkjs.com/api/v0`, `https://api-${e3}.talkjs.com/v1`);
3440
+ return new bs(`wss://realtime-${e3}.talkjs.com/v1`, `https://app-${e3}.talkjs.com/api/v0`, `https://api-${e3}.talkjs.com/v1`);
3388
3441
  }
3389
3442
  return t2;
3390
3443
  }
3391
- return e2.includes("localhost") || e2.includes("localtest.me") || /^\d+\.\d+\.\d+\.\d+(:\d+)?$/.test(e2) ? new ps(`ws://${e2}/public_api/v1`, `http://${e2}/api/v0`, `http://${e2}/public_api/v1`) : new ps(`wss://${e2}/public_api/v1`, `https://${e2}/api/v0`, `https://${e2}/public_api/v1`);
3444
+ return e2.includes("localhost") || e2.includes("localtest.me") || /^\d+\.\d+\.\d+\.\d+(:\d+)?$/.test(e2) ? new bs(`ws://${e2}/public_api/v1`, `http://${e2}/api/v0`, `http://${e2}/public_api/v1`) : new bs(`wss://${e2}/public_api/v1`, `https://${e2}/api/v0`, `https://${e2}/public_api/v1`);
3392
3445
  }
3393
3446
  }
3394
- function fs({ method: e2, url: t2, data: s2, options: n2, attempts: r2, shouldRetry: i2, authProvider: o2 }) {
3447
+ function ys({ method: e2, url: t2, data: s2, options: n2, attempts: r2, shouldRetry: i2, authProvider: o2 }) {
3395
3448
  var _a2;
3396
3449
  (!r2 || r2 <= 0) && (r2 = 1);
3397
- const u2 = { "x-talkjs-client-build": "jssdk-dev", "x-talkjs-client-date": "2025-09-02T09:13:11.435Z" };
3450
+ const u2 = { "x-talkjs-client-build": "jssdk-dev", "x-talkjs-client-date": "2025-10-14T15:13:24.972Z" };
3398
3451
  s2 instanceof FormData || (u2["Content-Type"] = (_a2 = n2 == null ? void 0 : n2.contentType) != null ? _a2 : "application/json");
3399
3452
  return a(r2, () => __async(this, null, function* () {
3400
3453
  if (o2) {
@@ -3406,19 +3459,19 @@ function fs({ method: e2, url: t2, data: s2, options: n2, attempts: r2, shouldRe
3406
3459
  throw e3;
3407
3460
  });
3408
3461
  }), { initialDelay: 0.2, log: void 0, shouldRetry: (s3) => __async(this, null, function* () {
3409
- return o2 && 401 === s3.status ? (As.log(`401 error from ${e2} ${t2}, ${yield o2.getToken()}`), o2.refreshToken(), true) : i2 ? i2(s3) : !("status" in s3 && s3.status >= 400 && s3.status < 500);
3462
+ return o2 && 401 === s3.status ? (Ds.log(`401 error from ${e2} ${t2}, ${yield o2.getToken()}`), o2.refreshToken(), true) : i2 ? i2(s3) : !("status" in s3 && s3.status >= 400 && s3.status < 500);
3410
3463
  }) }).catch((s3) => {
3411
3464
  if (Math.random() < 0.1 && !t2.toString().startsWith("https://capture.trackjs.com")) {
3412
3465
  const n3 = `Network Error for ${e2} ${t2}`;
3413
3466
  if ("undefined" != typeof window) if (s3 instanceof Response) {
3414
- s3.clone().text().then((e3) => As.log(`${n3} ${s3.status} ${e3} (10% logged)`));
3415
- } else As.log(`${n3} ${s3} (10% logged)`);
3467
+ s3.clone().text().then((e3) => Ds.log(`${n3} ${s3.status} ${e3} (10% logged)`));
3468
+ } else Ds.log(`${n3} ${s3} (10% logged)`);
3416
3469
  console.error("[TalkJS]", n3);
3417
3470
  }
3418
3471
  throw s3;
3419
3472
  });
3420
3473
  }
3421
- const { cdnHost: ms, appHost: gs, restHost: vs, realtimeHost: ws, appProtocol: bs, appWsProtocol: ys } = function() {
3474
+ const { cdnHost: Cs, appHost: As, restHost: Es, realtimeHost: ks, appProtocol: xs, appWsProtocol: Is } = function() {
3422
3475
  if ("undefined" == typeof window) return { cdnHost: "test-hostname", appHost: "test-hostname", appProtocol: "http:", appWsProtocol: "ws:" };
3423
3476
  const e2 = function() {
3424
3477
  if (document.currentScript) return document.currentScript.src;
@@ -3443,11 +3496,11 @@ const { cdnHost: ms, appHost: gs, restHost: vs, realtimeHost: ws, appProtocol: b
3443
3496
  }(n2), a2 = t2.protocol;
3444
3497
  return { cdnHost: s2, appHost: n2, restHost: r2, realtimeHost: i2, appProtocol: a2, appWsProtocol: "https:" === a2 ? "wss:" : "ws:" };
3445
3498
  }();
3446
- const Cs = gs.startsWith("app.talkjs.com");
3447
- const As = "undefined" == typeof window ? { log: (e2) => Promise.resolve(), setData: (e2) => {
3499
+ const Ts = As.startsWith("app.talkjs.com");
3500
+ const Ds = "undefined" == typeof window ? { log: (e2) => Promise.resolve(), setData: (e2) => {
3448
3501
  } } : new class {
3449
3502
  constructor(e2) {
3450
- this._timeCreated = Date.now(), this._enabled = Cs, this._trackJSData = { customer: { application: "", correlationId: "", sessionId: "", token: "", userId: "", version: "dev-2025-09-02T09:13:11.435Z" }, entry: "direct", environment: { age: Date.now() - this._timeCreated, dependencies: {}, originalUrl: window.location.href, referrer: document.referrer, userAgent: window.navigator.userAgent }, metadata: [], nav: [], network: [], url: window.location.href, stack: "", timestamp: (/* @__PURE__ */ new Date()).toISOString(), version: "dev-2025-09-02T09:13:11.435Z", throttled: 0 }, this._url = `https://capture.trackjs.com/capture?token=${e2}`, this._trackJSData.customer.token = e2;
3503
+ this._timeCreated = Date.now(), this._enabled = Ts, this._trackJSData = { customer: { application: "", correlationId: "", sessionId: "", token: "", userId: "", version: "dev-2025-10-14T15:13:24.972Z" }, entry: "direct", environment: { age: Date.now() - this._timeCreated, dependencies: {}, originalUrl: window.location.href, referrer: document.referrer, userAgent: window.navigator.userAgent }, metadata: [], nav: [], network: [], url: window.location.href, stack: "", timestamp: (/* @__PURE__ */ new Date()).toISOString(), version: "dev-2025-10-14T15:13:24.972Z", throttled: 0 }, this._url = `https://capture.trackjs.com/capture?token=${e2}`, this._trackJSData.customer.token = e2;
3451
3504
  }
3452
3505
  setData({ appId: e2, meId: t2, sessionId: s2 }) {
3453
3506
  this._trackJSData.customer.userId = e2, this._trackJSData.customer.sessionId = `${e2}/${t2}`, this._trackJSData.customer.correlationId = s2;
@@ -3457,14 +3510,14 @@ const As = "undefined" == typeof window ? { log: (e2) => Promise.resolve(), setD
3457
3510
  try {
3458
3511
  if (!this._enabled) return Promise.resolve();
3459
3512
  const t2 = __spreadProps(__spreadValues({}, this._trackJSData), { message: e2 });
3460
- yield fs({ method: "POST", url: this._url, data: JSON.stringify(t2), options: { contentType: "text/plain" } });
3513
+ yield ys({ method: "POST", url: this._url, data: JSON.stringify(t2), options: { contentType: "text/plain" } });
3461
3514
  } catch (e3) {
3462
3515
  console.error("[TalkJS] Failed when sending an error report. Error: ", e3);
3463
3516
  }
3464
3517
  });
3465
3518
  }
3466
3519
  }("970cd0be0fb74630b75c8451051299dc");
3467
- class Es {
3520
+ class Ss {
3468
3521
  constructor(e2, t2 = {}) {
3469
3522
  this._onSubscription = t2, this._handlers = {};
3470
3523
  for (const t3 in e2) Object.hasOwnProperty.call(e2, t3) && (this._handlers[t3] = []);
@@ -3509,9 +3562,9 @@ class Es {
3509
3562
  return this.on(e2, t2), { unsubscribe: () => this.off(e2, t2) };
3510
3563
  }
3511
3564
  }
3512
- class ks {
3565
+ class Ms {
3513
3566
  constructor(e2, t2, s2, n2, r2, i2) {
3514
- if (this.appId = t2, this.userId = s2, this.tokenFetcher = r2, this.usingBokens = false, this.requestInProgress = false, this.eventEmitter = new Es({ tokenChanged(e3) {
3567
+ if (this.appId = t2, this.userId = s2, this.tokenFetcher = r2, this.usingBokens = false, this.requestInProgress = false, this.eventEmitter = new Ss({ tokenChanged(e3) {
3515
3568
  }, tokenRefreshFailed(e3) {
3516
3569
  }, tokenAccepted(e3) {
3517
3570
  } }), this.sessionExpiryWarningTimeoutId = void 0, i2 && (n2 || r2)) throw new Error("[TalkJS] If providing a signature for authentication, you must not provide a token or tokenFetcher.");
@@ -3603,7 +3656,7 @@ class ks {
3603
3656
  const e3 = function(e4) {
3604
3657
  const t3 = e4.split(".");
3605
3658
  if (3 !== t3.length) throw "Token does not contain exactly two `.`. Check that you generated your JWT correctly. It should be `<header>.<payload>.<signature>`.";
3606
- return { header: xs(t3[0]), payload: xs(t3[1]) };
3659
+ return { header: Fs(t3[0]), payload: Fs(t3[1]) };
3607
3660
  }(s2);
3608
3661
  n2 = e3.header, r2 = e3.payload;
3609
3662
  } catch (e3) {
@@ -3617,7 +3670,7 @@ class ks {
3617
3670
  const e3 = this.checkJwtPayload(r2);
3618
3671
  t2.push(...e3);
3619
3672
  }
3620
- if (t2.length) if (this.usingBokens) As.log(`JWT Errors detected by AuthProvider when using bokens: ${t2.join("\n")}`);
3673
+ if (t2.length) if (this.usingBokens) Ds.log(`JWT Errors detected by AuthProvider when using bokens: ${t2.join("\n")}`);
3621
3674
  else {
3622
3675
  console.warn("[TalkJS] Authentication token appears to be generated incorrectly. Will still attempt to authenticate, but TalkJS may not work as expected. See below for a description of any problems and how to fix them.");
3623
3676
  const s3 = t2.length > 1;
@@ -3646,7 +3699,7 @@ class ks {
3646
3699
  sendBokenRequest(e2, t2) {
3647
3700
  return __async(this, null, function* () {
3648
3701
  let s2 = 0;
3649
- const n2 = e2.getBokensUrl(this.appId, this.userId, t2), r2 = yield fs({ method: "GET", url: n2, attempts: 1e4, shouldRetry: (e3) => {
3702
+ const n2 = e2.getBokensUrl(this.appId, this.userId, t2), r2 = yield ys({ method: "GET", url: n2, attempts: 1e4, shouldRetry: (e3) => {
3650
3703
  if (e3 instanceof Error) return true;
3651
3704
  if (401 === e3.status) throw "Check that you provided a valid signature.";
3652
3705
  if (404 === e3.status) throw "Check that you specified the correct App ID.";
@@ -3659,7 +3712,7 @@ class ks {
3659
3712
  });
3660
3713
  }
3661
3714
  }
3662
- function xs(e2) {
3715
+ function Fs(e2) {
3663
3716
  try {
3664
3717
  const t2 = e2.replace(/-/g, "+").replace(/_/g, "/"), s2 = decodeURIComponent(atob(t2).split("").map((e3) => "%" + ("00" + e3.charCodeAt(0).toString(16)).slice(-2)).join(""));
3665
3718
  return JSON.parse(s2);
@@ -3667,7 +3720,7 @@ function xs(e2) {
3667
3720
  throw `Could not base64-decode and JSON-parse token section: ${e2}. Check that you base-64 encoded the section correctly.`;
3668
3721
  }
3669
3722
  }
3670
- class Is {
3723
+ class Bs {
3671
3724
  constructor(e2) {
3672
3725
  this.target = e2;
3673
3726
  }
@@ -3675,7 +3728,7 @@ class Is {
3675
3728
  return this.target;
3676
3729
  }
3677
3730
  }
3678
- const Ss = new class {
3731
+ const Rs = new class {
3679
3732
  constructor() {
3680
3733
  this.registry = {};
3681
3734
  }
@@ -3683,7 +3736,7 @@ const Ss = new class {
3683
3736
  var _a2;
3684
3737
  const t2 = this.key(e2), s2 = (_a2 = this.registry[t2]) == null ? void 0 : _a2.deref();
3685
3738
  if (s2) return s2;
3686
- const n2 = new Ds(e2), r2 = globalThis.WeakRef ? new WeakRef(n2) : new Is(n2);
3739
+ const n2 = new _s(e2), r2 = globalThis.WeakRef ? new WeakRef(n2) : new Bs(n2);
3687
3740
  return this.registry[t2] = r2, n2;
3688
3741
  }
3689
3742
  deregister(e2, t2) {
@@ -3694,10 +3747,11 @@ const Ss = new class {
3694
3747
  return `${e2}:${t2}`;
3695
3748
  }
3696
3749
  }();
3697
- function Ts(e2) {
3698
- return e2.forceCreateNew ? new Ds(e2) : Ss.getOrCreate(e2);
3750
+ function Ns(e2) {
3751
+ if (!e2) throw new Error("[TalkJS] Must provide an options object to `getTalkSession`");
3752
+ return e2.forceCreateNew ? new _s(e2) : Rs.getOrCreate(e2);
3699
3753
  }
3700
- class Ds {
3754
+ class _s {
3701
3755
  constructor(e2) {
3702
3756
  !function(e3) {
3703
3757
  function t3(e4, t4) {
@@ -3707,13 +3761,13 @@ class Ds {
3707
3761
  void 0 !== e3.tokenFetcher && t3("function" == typeof e3.tokenFetcher, "The `tokenFetcher` property of TalkSession#constructor must be a function.");
3708
3762
  }(e2);
3709
3763
  const { appId: t2, userId: s2, token: n2, tokenFetcher: r2, signature: i2 } = e2;
3710
- this._appId = t2, this._apiUrls = e2.apiUrls ? new ps(e2.apiUrls.realtimeWsApiUrl, e2.apiUrls.internalHttpApiUrl, e2.apiUrls.restApiHttpUrl) : ps.fromHost(e2.host), this._authProvider = new ks(this._apiUrls, t2, s2, n2, r2, i2);
3764
+ this._appId = t2, this._apiUrls = e2.apiUrls ? new bs(e2.apiUrls.realtimeWsApiUrl, e2.apiUrls.internalHttpApiUrl, e2.apiUrls.restApiHttpUrl) : bs.fromHost(e2.host), this._authProvider = new Ms(this._apiUrls, t2, s2, n2, r2, i2);
3711
3765
  const a2 = Math.random().toString().split(".")[1];
3712
- this._realtimeClient = new Ie(this._apiUrls.getRealtimeWsUrl(t2, s2, "1.5.2", a2, e2.clientBuild), s2, this._authProvider), this.currentUser = new De(this._realtimeClient.userId, this._realtimeClient), this._terminationReason = o(), this._terminationReason.promise.then((e3) => {
3766
+ this._realtimeClient = new Be(this._apiUrls.getRealtimeWsUrl(t2, s2, "1.5.4", a2, e2.clientBuild), s2, this._authProvider), this.currentUser = new _e(this._realtimeClient.userId, this._realtimeClient), this._terminationReason = o(), this._terminationReason.promise.then((e3) => {
3713
3767
  console.error(`[TalkSession] ${e3}`);
3714
3768
  }), function(e3, t3, s3) {
3715
3769
  return __async(this, null, function* () {
3716
- return fs({ method: "GET", url: `${t3}/${e3}/app`, authProvider: s3 }).then((e4) => 200 === e4.status || 404 !== e4.status && (console.warn(`[TalkJS] Received unexpected ${e4.status} status code when validating app ID. Assuming that the app ID is valid.`), true)).catch((e4) => {
3770
+ return ys({ method: "GET", url: `${t3}/${e3}/app`, authProvider: s3 }).then((e4) => 200 === e4.status || 404 !== e4.status && (console.warn(`[TalkJS] Received unexpected ${e4.status} status code when validating app ID. Assuming that the app ID is valid.`), true)).catch((e4) => {
3717
3771
  if ("string" != typeof e4 && "status" in e4) {
3718
3772
  const t4 = e4;
3719
3773
  return 200 === t4.status || 404 !== t4.status && (console.warn(`[TalkJS] Received unexpected ${t4.status} status code when validating app ID. Assuming that the app ID is valid.`), true);
@@ -3736,42 +3790,42 @@ class Ds {
3736
3790
  user(e2) {
3737
3791
  if ("string" != typeof e2) throw new Error(`Creating UserRef failed because ID "${e2}" is not a string`);
3738
3792
  if ("" === e2) throw new Error(`Creating UserRef failed because ID "${e2}" is an empty string`);
3739
- return new De(e2, this._realtimeClient);
3793
+ return new _e(e2, this._realtimeClient);
3740
3794
  }
3741
3795
  conversation(e2) {
3742
3796
  if ("string" != typeof e2) throw new Error(`Creating ConversationRef failed because ID "${e2}" is not a string`);
3743
3797
  if ("" === e2) throw new Error(`Creating ConversationRef failed because ID "${e2}" is an empty string`);
3744
- return new ls(e2, this._realtimeClient);
3798
+ return new gs(e2, this._realtimeClient);
3745
3799
  }
3746
3800
  subscribeConversations(e2) {
3747
3801
  return this._realtimeClient.subscribe(["me", "conversations"], e2);
3748
3802
  }
3749
3803
  terminate(e2) {
3750
- Ss.deregister(this._appId, this.currentUser.id), this._terminationReason.resolve(e2), this._realtimeClient.destroy();
3804
+ Rs.deregister(this._appId, this.currentUser.id), this._terminationReason.resolve(e2), this._realtimeClient.destroy();
3751
3805
  }
3752
3806
  _isConnected() {
3753
3807
  return this._realtimeClient.isConnected();
3754
3808
  }
3755
3809
  uploadFile(e2, t2) {
3756
- return Ms(`${this._apiUrls.restApiHttpUrl}/${this._appId}/files`, this._authProvider, e2, t2);
3810
+ return Ps(`${this._apiUrls.restApiHttpUrl}/${this._appId}/files`, this._authProvider, e2, t2);
3757
3811
  }
3758
3812
  uploadImage(e2, t2) {
3759
- return Ms(`${this._apiUrls.restApiHttpUrl}/${this._appId}/files`, this._authProvider, e2, __spreadValues({ subtype: "image" }, t2));
3813
+ return Ps(`${this._apiUrls.restApiHttpUrl}/${this._appId}/files`, this._authProvider, e2, __spreadValues({ subtype: "image" }, t2));
3760
3814
  }
3761
3815
  uploadVideo(e2, t2) {
3762
- return Ms(`${this._apiUrls.restApiHttpUrl}/${this._appId}/files`, this._authProvider, e2, __spreadValues({ subtype: "video" }, t2));
3816
+ return Ps(`${this._apiUrls.restApiHttpUrl}/${this._appId}/files`, this._authProvider, e2, __spreadValues({ subtype: "video" }, t2));
3763
3817
  }
3764
3818
  uploadAudio(e2, t2) {
3765
- return Ms(`${this._apiUrls.restApiHttpUrl}/${this._appId}/files`, this._authProvider, e2, __spreadValues({ subtype: "audio" }, t2));
3819
+ return Ps(`${this._apiUrls.restApiHttpUrl}/${this._appId}/files`, this._authProvider, e2, __spreadValues({ subtype: "audio" }, t2));
3766
3820
  }
3767
3821
  uploadVoice(e2, t2) {
3768
- return Ms(`${this._apiUrls.restApiHttpUrl}/${this._appId}/files`, this._authProvider, e2, __spreadValues({ subtype: "voice" }, t2));
3822
+ return Ps(`${this._apiUrls.restApiHttpUrl}/${this._appId}/files`, this._authProvider, e2, __spreadValues({ subtype: "voice" }, t2));
3769
3823
  }
3770
3824
  }
3771
- function Ms(_0, _1, _2, _3) {
3825
+ function Ps(_0, _1, _2, _3) {
3772
3826
  return __async(this, arguments, function* (e2, t2, s2, { subtype: n2, filename: r2, width: i2, height: a2, duration: o2 }) {
3773
3827
  const u2 = new FormData();
3774
- return u2.set("file", s2, r2), void 0 !== n2 && u2.set("subtype", n2), void 0 !== i2 && u2.set("width", i2.toString()), void 0 !== a2 && u2.set("height", a2.toString()), void 0 !== o2 && u2.set("duration", o2.toString()), fs({ method: "POST", url: e2, data: u2, authProvider: t2 }).then((e3) => e3.json()).then((e3) => e3.attachmentToken).catch((e3) => __async(this, null, function* () {
3828
+ return u2.set("file", s2, r2), void 0 !== n2 && u2.set("subtype", n2), void 0 !== i2 && u2.set("width", i2.toString()), void 0 !== a2 && u2.set("height", a2.toString()), void 0 !== o2 && u2.set("duration", o2.toString()), ys({ method: "POST", url: e2, data: u2, authProvider: t2 }).then((e3) => e3.json()).then((e3) => e3.attachmentToken).catch((e3) => __async(this, null, function* () {
3775
3829
  if (e3 instanceof Response) {
3776
3830
  const t3 = yield e3.json(), s3 = `Unexpected response when uploading file, status code ${e3.status} ${t3.errorCode}, ${t3.reasons}`;
3777
3831
  throw new Error(s3);
@@ -3781,7 +3835,7 @@ function Ms(_0, _1, _2, _3) {
3781
3835
  });
3782
3836
  }
3783
3837
  export {
3784
- Ts as getTalkSession,
3838
+ Ns as getTalkSession,
3785
3839
  f as registerPolyfills
3786
3840
  };
3787
3841
  //# sourceMappingURL=talkSession.js.map