@talkjs/core 1.1.1 → 1.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -128,7 +128,7 @@ let p = null;
128
128
  function f({ WebSocket: e2 }) {
129
129
  p = e2;
130
130
  }
131
- class g {
131
+ class m {
132
132
  constructor(e2, t2) {
133
133
  this.realtimeUrl = e2, this.handlers = t2, this.socket = null, this.stateMachine = new u("ReconnectingSocket", ["STOPPED", "CONNECTING", "READY", "DISCONNECTED", "TERMINATED"], { startWs: { from: ["STOPPED", "DISCONNECTED"], to: "CONNECTING", afterTransition: () => {
134
134
  const e3 = new (function() {
@@ -177,9 +177,9 @@ class g {
177
177
  this.stateMachine.transition("destroy");
178
178
  }
179
179
  }
180
- class m {
180
+ class g {
181
181
  constructor(e2, t2) {
182
- this.handlers = t2, this.socket = new g(e2, { onOpen: () => this.handlers.onOpen(), onClose: () => this.handlers.onClose(), onMessage: (e3) => this.onWebSocketMessage(e3) });
182
+ this.handlers = t2, this.socket = new m(e2, { onOpen: () => this.handlers.onOpen(), onClose: () => this.handlers.onClose(), onMessage: (e3) => this.onWebSocketMessage(e3) });
183
183
  }
184
184
  call(e2, t2, s2, n2) {
185
185
  const r2 = `/${s2.map((e3) => encodeURIComponent(e3)).join("/")}`, i2 = JSON.stringify([e2, t2, r2, n2]);
@@ -240,9 +240,9 @@ class b {
240
240
  this.i = -1;
241
241
  }
242
242
  }
243
- class y {
243
+ class w {
244
244
  constructor(e2, t2) {
245
- this.handlers = t2, this.seqCounter = new b(), this.responseHandlers = {}, this.heartbeats = new w(this), this.socket = new m(e2, { onUpstreamRestarting: () => {
245
+ this.handlers = t2, this.seqCounter = new b(), this.responseHandlers = {}, this.heartbeats = new y(this), this.socket = new g(e2, { onUpstreamRestarting: () => {
246
246
  this.heartbeats.serverActive(), this.handlers.onUpstreamRestarting();
247
247
  }, onOpen: () => {
248
248
  this.heartbeats.clientActive(), this.heartbeats.serverActive(), this.handlers.onReady();
@@ -285,7 +285,7 @@ class y {
285
285
  this.socket.terminate();
286
286
  }
287
287
  }
288
- class w {
288
+ class y {
289
289
  constructor(e2) {
290
290
  this.connection = e2, this.clientInactivityTimer = new v(25e3), this.serverInactivityTimer = new v(1e4), this.serverTimeoutTimer = new v(5e3);
291
291
  }
@@ -327,7 +327,7 @@ class A {
327
327
  "READY" !== e3 && "RENEWING_SESSION" !== e3 || this.handlers.onNotReady(), this.authProvider.clearScheduledRefresh();
328
328
  } }, destroy: { from: "ANY", to: "TERMINATED", afterTransition: () => {
329
329
  this.authProvider.clearScheduledRefresh(), this.connection.destroy();
330
- } } }), this.connection = new y(e2, { onUpstreamRestarting: () => this.handlers.onUpstreamRestarting(), onReady: () => this.stateMachine.transition("logIn"), onNotReady: () => {
330
+ } } }), this.connection = new w(e2, { onUpstreamRestarting: () => this.handlers.onUpstreamRestarting(), onReady: () => this.stateMachine.transition("logIn"), onNotReady: () => {
331
331
  this.stateMachine.transition("wsDisconnected");
332
332
  }, onAuthExpired: () => {
333
333
  this.stateMachine.transition("authExpired");
@@ -469,12 +469,14 @@ class E {
469
469
  }
470
470
  sendQueuedCalls() {
471
471
  return __async(this, null, function* () {
472
+ let e2 = 0;
472
473
  for (; "PROCESSING_QUEUE" === this.stateMachine.state; ) {
473
- const e2 = this.dequeue();
474
- if (!e2) return void this.stateMachine.transition("ready");
475
- this.connection.call(e2.method, e2.path, e2.data).then((t2) => {
476
- e2.deferred.resolve(t2);
477
- }), yield new Promise((e3) => setTimeout(e3, 100));
474
+ e2++;
475
+ const t2 = this.dequeue();
476
+ if (!t2) return void this.stateMachine.transition("ready");
477
+ this.connection.call(t2.method, t2.path, t2.data).then((e3) => {
478
+ t2.deferred.resolve(e3);
479
+ }), e2 > 50 && (yield new Promise((e3) => setTimeout(e3, 100)));
478
480
  }
479
481
  });
480
482
  }
@@ -494,14 +496,14 @@ class x {
494
496
  this.sent = true;
495
497
  }
496
498
  }
497
- class S extends x {
499
+ class T extends x {
498
500
  constructor(e2, t2) {
499
501
  super(t2, () => {
500
502
  this.sendSubscribe(), this.sendGet();
501
503
  }), this.connection = e2, this.getCalls = [], this.subscribeCalls = [];
502
504
  }
503
505
  canPush(e2, t2) {
504
- return S.isCorrectBatchTypeFor(e2, t2);
506
+ return T.isCorrectBatchTypeFor(e2, t2);
505
507
  }
506
508
  static isCorrectBatchTypeFor(e2, t2) {
507
509
  return s(t2, ["users", "*"]) && ("GET" === e2 || "SUBSCRIBE" === e2);
@@ -527,12 +529,12 @@ class S extends x {
527
529
  this.connection.call("SUBSCRIBE", ["users"], { ids: e2 }).then((e3) => this.subscribeCalls.forEach((t2) => t2.deferred.resolve(e3)));
528
530
  }
529
531
  }
530
- class T extends x {
532
+ class I extends x {
531
533
  constructor(e2, t2, s2) {
532
534
  super(s2, () => this.sendMutate()), this.conversationId = e2, this.connection = t2, this.calls = [];
533
535
  }
534
536
  canPush(e2, t2) {
535
- return !!T.isCorrectBatchTypeFor(e2, t2) && t2[1] === this.conversationId;
537
+ return !!I.isCorrectBatchTypeFor(e2, t2) && t2[1] === this.conversationId;
536
538
  }
537
539
  static isCorrectBatchTypeFor(e2, t2) {
538
540
  return s(t2, ["conversations", "*", "participants", "*"]) && ("PUT" === e2 || "POST" === e2 || "PATCH" === e2);
@@ -553,7 +555,7 @@ class T extends x {
553
555
  });
554
556
  }
555
557
  }
556
- class D {
558
+ class S {
557
559
  constructor(e2, t2, s2) {
558
560
  this.pendingBatch = null, this.connection = new E(e2, t2, s2);
559
561
  }
@@ -574,18 +576,18 @@ class D {
574
576
  return this.connection.isConnected();
575
577
  }
576
578
  createEmptyBatchFor(e2, t2) {
577
- if (S.isCorrectBatchTypeFor(e2, t2)) return new S(this.connection, () => this.pendingBatch = null);
578
- if (T.isCorrectBatchTypeFor(e2, t2)) {
579
+ if (T.isCorrectBatchTypeFor(e2, t2)) return new T(this.connection, () => this.pendingBatch = null);
580
+ if (I.isCorrectBatchTypeFor(e2, t2)) {
579
581
  const e3 = t2[1];
580
- return new T(e3, this.connection, () => this.pendingBatch = null);
582
+ return new I(e3, this.connection, () => this.pendingBatch = null);
581
583
  }
582
584
  return null;
583
585
  }
584
586
  }
585
- const I = { 200: "RESOLVE", 400: "RESOLVE", 401: "RETRY", 402: "RESOLVE", 403: "RESOLVE", 404: "RESOLVE", 405: "RESOLVE", 409: "RESOLVE", 429: "DELAY", 500: "DELAY" };
587
+ const D = { 200: "RESOLVE", 400: "RESOLVE", 401: "RETRY", 402: "RESOLVE", 403: "RESOLVE", 404: "RESOLVE", 405: "RESOLVE", 409: "RESOLVE", 429: "DELAY", 500: "DELAY" };
586
588
  class F {
587
589
  constructor(e2, t2, s2) {
588
- this.throttler = new B(), this.alive = true, this.connection = new D(e2, t2, s2);
590
+ this.throttler = new M(), this.alive = true, this.connection = new S(e2, t2, s2);
589
591
  }
590
592
  call(e2, t2, s2) {
591
593
  return __async(this, null, function* () {
@@ -594,7 +596,7 @@ class F {
594
596
  const r2 = yield this.connection.call(e2, t2, s2);
595
597
  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;
596
598
  if (r2.ok || "client" !== r2.where) {
597
- const e3 = r2.value, t3 = e3.status, s3 = I[t3];
599
+ const e3 = r2.value, t3 = e3.status, s3 = D[t3];
598
600
  if ("RESOLVE" === s3) return this.throttler.resetDelay(), r2;
599
601
  if ("RETRY" === s3) continue;
600
602
  if ("DELAY" === s3) {
@@ -616,7 +618,7 @@ class F {
616
618
  return this.connection.isConnected();
617
619
  }
618
620
  }
619
- class B {
621
+ class M {
620
622
  constructor() {
621
623
  this.initialDelayMs = 200, this.exponentialFactor = 1.2, this.maxDelayMs = 3e4, this.currentDelayMs = this.initialDelayMs, this.lastCall = 0;
622
624
  }
@@ -631,7 +633,7 @@ class B {
631
633
  this.currentDelayMs = this.initialDelayMs;
632
634
  }
633
635
  }
634
- function M(e2) {
636
+ function B(e2) {
635
637
  return e2.map((e3) => encodeURIComponent(e3)).join();
636
638
  }
637
639
  class R {
@@ -639,13 +641,13 @@ class R {
639
641
  this.paths = {};
640
642
  }
641
643
  add(e2) {
642
- this.paths[M(e2)] = e2;
644
+ this.paths[B(e2)] = e2;
643
645
  }
644
646
  delete(e2) {
645
- delete this.paths[M(e2)];
647
+ delete this.paths[B(e2)];
646
648
  }
647
649
  has(e2) {
648
- return Object.hasOwnProperty.call(this.paths, M(e2));
650
+ return Object.hasOwnProperty.call(this.paths, B(e2));
649
651
  }
650
652
  clear() {
651
653
  this.paths = {};
@@ -732,7 +734,7 @@ class U {
732
734
  });
733
735
  }
734
736
  }
735
- class j {
737
+ class $ {
736
738
  constructor(e2) {
737
739
  this.initialised = false, this.getPointer = void 0, this.pendingStates = [e2], e2.resultPromise.then(() => this.initialised = true);
738
740
  }
@@ -766,7 +768,7 @@ class j {
766
768
  return this.getPointer;
767
769
  }
768
770
  }
769
- class $ extends j {
771
+ class j extends $ {
770
772
  constructor(e2, t2) {
771
773
  super(e2), this.onTeardown = t2, this._error = null, this._lastGoodState = Promise.resolve(void 0);
772
774
  }
@@ -795,7 +797,7 @@ class $ extends j {
795
797
  }));
796
798
  }
797
799
  }
798
- class W extends $ {
800
+ class W extends j {
799
801
  constructor(e2) {
800
802
  super({ seq: 0, resultPromise: new Promise((e3) => setTimeout(e3)).then(() => this.fetchInitial(0)) }, e2), this.getDeepMutex = new U(), this.lastDeep = void 0;
801
803
  }
@@ -866,6 +868,11 @@ class q extends W {
866
868
  this.setError(l("UNSUBSCRIBED"));
867
869
  }, this.unsubscribeDebounceMs);
868
870
  }
871
+ getLoadMoreSeq() {
872
+ var _a2;
873
+ const e2 = (_a2 = this.lastEmitSeq) != null ? _a2 : 0, t2 = this.mostRecentState.seq;
874
+ return Math.max(e2, t2) + 1e-6;
875
+ }
869
876
  emit(e2) {
870
877
  return __async(this, null, function* () {
871
878
  var _a2;
@@ -1126,7 +1133,7 @@ class ne extends W {
1126
1133
  });
1127
1134
  }
1128
1135
  messageDeleted(e2, t2) {
1129
- this.mutate(e2, (s2) => null === s2.value.data ? s2 : this.messageId === t2.messageId ? 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 } }) : s2);
1136
+ 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 } }) : s2);
1130
1137
  }
1131
1138
  getFromCache() {
1132
1139
  return __async(this, null, function* () {
@@ -1183,7 +1190,7 @@ class re extends W {
1183
1190
  }
1184
1191
  class ie extends q {
1185
1192
  constructor(e2, t2, s2, n2) {
1186
- super(e2, n2), this.conversationId = t2, this.realtimeClient = s2, this.unsubscribeDebounceMs = 1e3, this.pendingLoadMore = void 0;
1193
+ super(s2, n2), this.conversationId = e2, this.realtimeClient = t2, this.unsubscribeDebounceMs = 1e3, this.pendingLoadMore = void 0;
1187
1194
  }
1188
1195
  listen(e2) {
1189
1196
  return this.onlyUsedInternally && this.mostRecentState.resultPromise.then((e3) => {
@@ -1200,7 +1207,10 @@ class ie extends q {
1200
1207
  });
1201
1208
  }
1202
1209
  teardownNested(e2) {
1203
- ue(e2);
1210
+ if (e2.stores) {
1211
+ const t2 = l("TERMINATED");
1212
+ Object.values(e2.stores).forEach((e3) => e3.setError(t2)), e2.inWindow.forEach((e3) => e3.setError(t2));
1213
+ }
1204
1214
  }
1205
1215
  anyChildChanged(e2, t2, s2) {
1206
1216
  return __async(this, null, function* () {
@@ -1246,7 +1256,7 @@ class ie extends q {
1246
1256
  const t2 = yield this.mostRecentState.resultPromise;
1247
1257
  if (!t2.ok) return;
1248
1258
  if (null === t2.value.windowEnd) return;
1249
- const s2 = t2.value.windowEnd.cursor, n2 = yield ae({ count: e2, cursor: s2, conversationId: this.conversationId, realtimeClient: this.realtimeClient }), r2 = this.mostRecentState.seq + 1e-6;
1259
+ const s2 = t2.value.windowEnd.cursor, n2 = yield ae({ count: e2, cursor: s2, conversationId: this.conversationId, realtimeClient: this.realtimeClient }), r2 = this.getLoadMoreSeq();
1250
1260
  this.mutate(r2, (e3) => null === e3.value.windowEnd || s2 !== e3.value.windowEnd.cursor ? e3 : n2.ok ? null === n2.value.messages ? (console.warn("[TalkJS] When loading more messages, the conversation no longer existed. We should have been told about this."), e3) : oe({ seq: r2, prevState: e3.value, messages: n2.value.messages, cursor: n2.value.nextCursor, conversationId: this.conversationId, realtimeClient: this.realtimeClient }) : n2), yield this.emitMutex.runExclusive(() => this.emit(r2));
1251
1261
  });
1252
1262
  }
@@ -1295,17 +1305,17 @@ class ie extends q {
1295
1305
  conversationCleared(e2, t2) {
1296
1306
  this.mutate(e2, (t3) => {
1297
1307
  var _a2;
1298
- return 0 === ((_a2 = t3.value.inWindow) == null ? void 0 : _a2.length) && null === t3.value.windowEnd ? t3 : (ue(t3.value), c({ lastChanged: e2, lastMessageChanged: e2, stores: {}, inWindow: [], windowEnd: null }));
1308
+ return 0 === ((_a2 = t3.value.inWindow) == null ? void 0 : _a2.length) && null === t3.value.windowEnd ? t3 : (this.teardownNested(t3.value), c({ lastChanged: e2, lastMessageChanged: e2, stores: {}, inWindow: [], windowEnd: null }));
1299
1309
  });
1300
1310
  }
1301
1311
  sideCreated(e2, t2) {
1302
1312
  const s2 = this.fetchInitial(e2);
1303
1313
  this.mutate(e2, (e3) => null !== e3.value.stores ? (s2.then((e4) => {
1304
- e4.ok && ue(e4.value);
1314
+ e4.ok && this.teardownNested(e4.value);
1305
1315
  }), e3) : s2);
1306
1316
  }
1307
1317
  sideDeleted(e2, t2) {
1308
- this.mutate(e2, (t3) => null === t3.value.stores ? t3 : (ue(t3.value), c({ lastChanged: e2, lastMessageChanged: e2, stores: null, inWindow: null, windowEnd: null })));
1318
+ this.mutate(e2, (t3) => null === t3.value.stores ? t3 : (this.teardownNested(t3.value), c({ lastChanged: e2, lastMessageChanged: e2, stores: null, inWindow: null, windowEnd: null })));
1309
1319
  }
1310
1320
  getMessageFromCache(e2) {
1311
1321
  return __async(this, null, function* () {
@@ -1348,15 +1358,9 @@ function oe({ seq: e2, prevState: t2, messages: s2, cursor: n2, conversationId:
1348
1358
  if (null === n2) return c({ lastChanged: e2, lastMessageChanged: h2, stores: a2, inWindow: o2, windowEnd: null });
1349
1359
  return c({ lastChanged: e2, lastMessageChanged: h2, stores: a2, inWindow: o2, windowEnd: { cursor: n2, oldestMessageTs: s2[s2.length - 1].createdAt } });
1350
1360
  }
1351
- function ue(e2) {
1352
- if (e2.stores) {
1353
- const t2 = l("TERMINATED");
1354
- Object.values(e2.stores).forEach((e3) => e3.setError(t2)), e2.inWindow.forEach((e3) => e3.setError(t2));
1355
- }
1356
- }
1357
- class ce extends q {
1361
+ class ue extends q {
1358
1362
  constructor(e2, t2, s2, n2) {
1359
- super(e2, n2), this.conversationId = t2, this.realtimeClient = s2, this.unsubscribeDebounceMs = 5e3;
1363
+ super(s2, n2), this.conversationId = e2, this.realtimeClient = t2, this.unsubscribeDebounceMs = 5e3;
1360
1364
  }
1361
1365
  fetchInitial(e2) {
1362
1366
  return __async(this, null, function* () {
@@ -1394,13 +1398,13 @@ class ce extends q {
1394
1398
  });
1395
1399
  }
1396
1400
  participantEdited(e2, t2) {
1397
- 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: le(s2.value.snapshot, t2.diff), messageWindowStore: s2.value.messageWindowStore }));
1401
+ 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: ce(s2.value.snapshot, t2.diff), messageWindowStore: s2.value.messageWindowStore }));
1398
1402
  }
1399
1403
  conversationEdited(e2, t2) {
1400
- 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: le(s2.value.snapshot, t2.diff), messageWindowStore: s2.value.messageWindowStore }));
1404
+ 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: ce(s2.value.snapshot, t2.diff), messageWindowStore: s2.value.messageWindowStore }));
1401
1405
  }
1402
1406
  sideEdited(e2, t2) {
1403
- 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: le(s2.value.snapshot, t2.diff), messageWindowStore: s2.value.messageWindowStore }));
1407
+ 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: ce(s2.value.snapshot, t2.diff), messageWindowStore: s2.value.messageWindowStore }));
1404
1408
  }
1405
1409
  sideCreated(e2, t2) {
1406
1410
  this.mutate(e2, (s2) => s2.value.snapshot ? s2 : c({ lastChanged: e2, snapshot: t2.state, messageWindowStore: s2.value.messageWindowStore }));
@@ -1415,23 +1419,23 @@ class ce extends q {
1415
1419
  });
1416
1420
  }
1417
1421
  }
1418
- function le(e2, t2) {
1422
+ function ce(e2, t2) {
1419
1423
  const s2 = t2;
1420
1424
  return { id: e2.id, createdAt: e2.createdAt, subject: P(e2.subject, s2.subject), photoUrl: P(e2.photoUrl, s2.photoUrl), welcomeMessages: P(e2.welcomeMessages, s2.welcomeMessages), custom: _(e2.custom, s2.custom), lastMessageAt: P(e2.lastMessageAt, s2.lastMessageAt), unreadMessageCount: P(e2.unreadMessageCount, s2.unreadMessageCount), isUnread: P(e2.isUnread, s2.isUnread), access: P(e2.access, s2.access), notify: P(e2.notify, s2.notify), readUntil: P(e2.readUntil, s2.readUntil), everyoneReadUntil: P(e2.everyoneReadUntil, s2.everyoneReadUntil), joinedAt: e2.joinedAt };
1421
1425
  }
1422
- function he(e2, t2) {
1426
+ function le(e2, t2) {
1423
1427
  for (let s2 in e2) Object.prototype.hasOwnProperty.call(e2, s2) && t2(e2[s2], s2);
1424
1428
  }
1425
- function de(e2, t2) {
1429
+ function he(e2, t2) {
1426
1430
  return function(e3, t3) {
1427
1431
  let s2 = {}, n2 = 0;
1428
- return he(e3, (e4, r2) => {
1432
+ return le(e3, (e4, r2) => {
1429
1433
  const [i2, a2] = t3([r2, e4], n2++);
1430
1434
  s2[i2] = a2;
1431
1435
  }), s2;
1432
1436
  }(e2, ([e3, s2]) => [e3, t2(s2, e3)]);
1433
1437
  }
1434
- class pe extends q {
1438
+ class de extends q {
1435
1439
  constructor(e2, t2, s2, n2) {
1436
1440
  super(s2, n2), this.conversationId = e2, this.realtimeClient = t2, this.unsubscribeDebounceMs = 1e4;
1437
1441
  }
@@ -1443,7 +1447,7 @@ class pe extends q {
1443
1447
  if (!t2.ok) return t2;
1444
1448
  const s2 = t2.value.data;
1445
1449
  if (s2.many) return c({ data: { usersTyping: null, many: true }, userSubscriptions: {}, lastChanged: e2 });
1446
- return c({ data: s2, userSubscriptions: de(s2.usersTyping, (e3, t3) => this.realtimeClient.internalSubscribe(["users", t3])), lastChanged: e2 });
1450
+ return c({ data: s2, userSubscriptions: he(s2.usersTyping, (e3, t3) => this.realtimeClient.internalSubscribe(["users", t3])), lastChanged: e2 });
1447
1451
  });
1448
1452
  }
1449
1453
  equal(e2, t2) {
@@ -1460,7 +1464,7 @@ class pe extends q {
1460
1464
  });
1461
1465
  }
1462
1466
  typingAvailable(e2, t2) {
1463
- this.mutate(e2, () => c({ data: t2.state, userSubscriptions: t2.state.many ? {} : de(t2.state.usersTyping, (e3, t3) => this.realtimeClient.internalSubscribe(["users", t3])), lastChanged: e2 }));
1467
+ this.mutate(e2, () => c({ data: t2.state, userSubscriptions: t2.state.many ? {} : he(t2.state.usersTyping, (e3, t3) => this.realtimeClient.internalSubscribe(["users", t3])), lastChanged: e2 }));
1464
1468
  }
1465
1469
  typingChanged(e2, t2) {
1466
1470
  this.mutate(e2, (s2) => {
@@ -1468,7 +1472,7 @@ class pe extends q {
1468
1472
  if (void 0 === t2.diff.many) {
1469
1473
  if (true === s2.value.data.many) return s2;
1470
1474
  const n2 = __spreadValues({}, s2.value.data.usersTyping), r2 = __spreadValues({}, s2.value.userSubscriptions);
1471
- return he(t2.diff.usersTyping, (e3, t3) => {
1475
+ return le(t2.diff.usersTyping, (e3, t3) => {
1472
1476
  var _a2;
1473
1477
  "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]);
1474
1478
  }), c({ data: { usersTyping: n2, many: false }, userSubscriptions: r2, lastChanged: e2 });
@@ -1476,7 +1480,7 @@ class pe extends q {
1476
1480
  if (true === t2.diff.many) return s2.value.data.many ? s2 : c({ data: { usersTyping: null, many: true }, userSubscriptions: {}, lastChanged: e2 });
1477
1481
  if (false === t2.diff.many) {
1478
1482
  if (false === s2.value.data.many) return s2;
1479
- const n2 = de(t2.diff.usersTyping, (e3, t3) => this.realtimeClient.internalSubscribe(["users", t3]));
1483
+ const n2 = he(t2.diff.usersTyping, (e3, t3) => this.realtimeClient.internalSubscribe(["users", t3]));
1480
1484
  return c({ data: t2.diff, userSubscriptions: n2, lastChanged: e2 });
1481
1485
  }
1482
1486
  throw t2.diff, "Unreachable";
@@ -1486,7 +1490,7 @@ class pe extends q {
1486
1490
  this.mutate(e2, (t3) => null === t3.value.data ? t3 : c({ data: null, lastChanged: e2 }));
1487
1491
  }
1488
1492
  teardownNested(e2) {
1489
- e2.data && he(e2.userSubscriptions, (e3) => e3.unsubscribe());
1493
+ e2.data && le(e2.userSubscriptions, (e3) => e3.unsubscribe());
1490
1494
  }
1491
1495
  anyChildChanged(e2, t2, s2) {
1492
1496
  return __async(this, null, function* () {
@@ -1500,9 +1504,182 @@ class pe extends q {
1500
1504
  });
1501
1505
  }
1502
1506
  }
1503
- class fe {
1507
+ class pe extends W {
1508
+ constructor(e2, t2, s2) {
1509
+ super(), this.conversationId = e2, this.participantData = t2, this.realtimeClient = s2;
1510
+ }
1511
+ fetchInitial(e2) {
1512
+ return __async(this, null, function* () {
1513
+ return c({ lastChanged: e2, user: this.realtimeClient.internalSubscribe(["users", this.participantData.id]), data: this.participantData });
1514
+ });
1515
+ }
1516
+ refetch(e2) {
1517
+ throw "Do not call refetch on participant data stores, it can return outdated data. Destroy and remake them instead";
1518
+ }
1519
+ equal(e2, t2) {
1520
+ var _a2, _b, _c, _d;
1521
+ 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);
1522
+ }
1523
+ teardownNested(e2) {
1524
+ var _a2;
1525
+ (_a2 = e2.user) == null ? void 0 : _a2.unsubscribe();
1526
+ }
1527
+ anyChildChanged(e2, t2, s2) {
1528
+ return __async(this, null, function* () {
1529
+ var _a2;
1530
+ const n2 = (_a2 = s2.user) == null ? void 0 : _a2.store;
1531
+ return true === (yield n2 == null ? void 0 : n2.changedBetween(e2, t2));
1532
+ });
1533
+ }
1534
+ loadNested(e2, t2) {
1535
+ return __async(this, null, function* () {
1536
+ if (null === t2.data) return c({ snapshot: null });
1537
+ const s2 = yield t2.user.store.getDeep(e2);
1538
+ if (false === s2.ok) return s2;
1539
+ const n2 = s2.value.snapshot;
1540
+ return c({ snapshot: this.realtimeClient.createParticipantSnapshotPreloaded(t2.data, n2) });
1541
+ });
1542
+ }
1543
+ participantEdited(e2, t2) {
1544
+ this.mutate(e2, (s2) => {
1545
+ if (null === s2.value.data) return s2;
1546
+ return c({ lastChanged: e2, user: s2.value.user, data: { id: s2.value.data.id, access: P(s2.value.data.access, t2.diff.access), notify: P(s2.value.data.notify, t2.diff.notify), joinedAt: s2.value.data.joinedAt } });
1547
+ });
1548
+ }
1549
+ participantDeleted(e2, t2) {
1550
+ this.mutate(e2, (t3) => null === t3.value.data ? t3 : (this.teardownNested(t3.value), c({ lastChanged: e2, user: null, data: null })));
1551
+ }
1552
+ getFromCache() {
1553
+ return __async(this, null, function* () {
1554
+ const e2 = yield this.mostRecentState.resultPromise;
1555
+ if (!e2.ok) return l("NOT_IN_CACHE");
1556
+ if (null === e2.value.data) {
1557
+ return h({ status: 404, errorCode: "PARTICIPANT_NOT_FOUND", reasons: ["No participant with that ID exists"] });
1558
+ }
1559
+ return c({ status: 200, data: e2.value.data });
1560
+ });
1561
+ }
1562
+ }
1563
+ class fe extends q {
1564
+ constructor(e2, t2, s2, n2) {
1565
+ super(s2, n2), this.conversationId = e2, this.realtimeClient = t2, this.unsubscribeDebounceMs = 1e3, this.pendingLoadMore = void 0;
1566
+ }
1567
+ fetchInitial(e2) {
1568
+ return __async(this, null, function* () {
1569
+ const t2 = yield me({ realtimeClient: this.realtimeClient, conversationId: this.conversationId, count: 10 });
1570
+ return t2.ok ? null === t2.value.participants ? c({ lastChanged: e2, stores: null, inWindow: null, windowEnd: null }) : ge({ seq: e2, participants: t2.value.participants, cursor: t2.value.nextCursor, conversationId: this.conversationId, realtimeClient: this.realtimeClient }) : t2;
1571
+ });
1572
+ }
1573
+ teardownNested(e2) {
1574
+ if (e2.stores) {
1575
+ const t2 = l("TERMINATED");
1576
+ Object.values(e2.stores).forEach((e3) => e3.setError(t2));
1577
+ }
1578
+ }
1579
+ anyChildChanged(e2, t2, s2) {
1580
+ return __async(this, null, function* () {
1581
+ for (const n2 in s2.stores) {
1582
+ const r2 = s2.stores[n2];
1583
+ if (true === (yield r2 == null ? void 0 : r2.changedBetween(e2, t2))) return true;
1584
+ }
1585
+ return false;
1586
+ });
1587
+ }
1588
+ equal(e2, t2) {
1589
+ 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));
1590
+ }
1591
+ loadNested(e2, t2) {
1592
+ return __async(this, null, function* () {
1593
+ if (null === t2.stores) return c({ snapshot: null, loadedAll: true });
1594
+ const s2 = yield Promise.all(Object.values(t2.stores).map((t3) => t3.getDeep(e2))), n2 = s2.find((e3) => !e3.ok);
1595
+ if (n2) return n2;
1596
+ const r2 = s2.filter((e3) => null !== e3.value.snapshot).map((e3) => e3.value.snapshot);
1597
+ return r2.sort((e3, t3) => t3.joinedAt - e3.joinedAt), c({ snapshot: r2, loadedAll: null === t2.windowEnd });
1598
+ });
1599
+ }
1600
+ loadMore(e2) {
1601
+ return __async(this, null, function* () {
1602
+ if (this.pendingLoadMore) return this.pendingLoadMore;
1603
+ const t2 = o();
1604
+ this.pendingLoadMore = t2.promise, yield this._loadMoreParticipants(e2), t2.resolve(), this.pendingLoadMore = void 0;
1605
+ });
1606
+ }
1607
+ _loadMoreParticipants(e2 = 10) {
1608
+ return __async(this, null, function* () {
1609
+ const t2 = yield this.mostRecentState.resultPromise;
1610
+ if (!t2.ok) return;
1611
+ if (null === t2.value.windowEnd) return;
1612
+ const s2 = t2.value.windowEnd.cursor, n2 = yield me({ count: e2, cursor: s2, conversationId: this.conversationId, realtimeClient: this.realtimeClient }), r2 = this.getLoadMoreSeq();
1613
+ this.mutate(r2, (e3) => null === e3.value.windowEnd || s2 !== e3.value.windowEnd.cursor ? e3 : n2.ok ? null === n2.value.participants ? (console.warn("[TalkJS] When loading more participants, the conversation no longer existed. We should have been told about this."), e3) : ge({ seq: r2, prevStores: e3.value.stores, participants: n2.value.participants, cursor: n2.value.nextCursor, conversationId: this.conversationId, realtimeClient: this.realtimeClient }) : n2), yield this.emitMutex.runExclusive(() => this.emit(r2));
1614
+ });
1615
+ }
1616
+ participantCreated(e2, t2) {
1617
+ this.mutate(e2, (s2) => {
1618
+ if (null === s2.value.stores) return console.warn("[TalkJS] Received a 'participant.created' event for a nonexistent conversation."), s2;
1619
+ if (s2.value.windowEnd && t2.state.joinedAt < s2.value.windowEnd.oldestParticipantTs) return s2;
1620
+ if (Object.hasOwnProperty.call(s2.value.stores, t2.state.id)) return s2;
1621
+ const n2 = __spreadValues({}, s2.value.stores), r2 = new pe(this.conversationId, t2.state, this.realtimeClient);
1622
+ n2[t2.state.id] = r2;
1623
+ return c({ lastChanged: e2, stores: n2, windowEnd: s2.value.windowEnd });
1624
+ });
1625
+ }
1626
+ participantEdited(e2, t2) {
1627
+ this.mutate(e2, (s2) => {
1628
+ var _a2;
1629
+ return null === s2.value.stores ? (console.warn("[TalkJS] Received a 'participant.edited' event for a nonexistent conversation."), s2) : ((_a2 = s2.value.stores[t2.userId]) == null ? void 0 : _a2.participantEdited(e2, t2), s2);
1630
+ });
1631
+ }
1632
+ participantDeleted(e2, t2) {
1633
+ this.mutate(e2, (s2) => {
1634
+ if (null === s2.value.stores) return console.warn("[TalkJS] Received a 'participant.deleted' event for a conversation that we thought didn't exist."), s2;
1635
+ const n2 = s2.value.stores[t2.userId];
1636
+ if (void 0 === n2) return s2;
1637
+ n2.participantDeleted(e2, t2);
1638
+ const r2 = __spreadValues({}, s2.value.stores);
1639
+ return delete r2[t2.userId], c({ lastChanged: e2, stores: r2, windowEnd: s2.value.windowEnd });
1640
+ });
1641
+ }
1642
+ sideCreated(e2, t2) {
1643
+ const s2 = this.fetchInitial(e2);
1644
+ this.mutate(e2, (e3) => null !== e3.value.stores ? (s2.then((e4) => {
1645
+ e4.ok && this.teardownNested(e4.value);
1646
+ }), e3) : s2);
1647
+ }
1648
+ sideDeleted(e2, t2) {
1649
+ this.mutate(e2, (t3) => null === t3.value.stores ? t3 : (this.teardownNested(t3.value), c({ lastChanged: e2, stores: null, inWindow: null, windowEnd: null })));
1650
+ }
1651
+ getParticipantFromCache(e2) {
1652
+ return __async(this, null, function* () {
1653
+ const t2 = yield this.mostRecentState.resultPromise;
1654
+ if (!t2.ok) return l("NOT_IN_CACHE");
1655
+ if (null === t2.value.stores) return l("NOT_IN_CACHE");
1656
+ const s2 = t2.value.stores[e2];
1657
+ return void 0 === s2 ? l("NOT_IN_CACHE") : s2.getFromCache();
1658
+ });
1659
+ }
1660
+ }
1661
+ function me(_0) {
1662
+ return __async(this, arguments, function* ({ cursor: e2, realtimeClient: t2, conversationId: s2, count: n2 }) {
1663
+ const r2 = { limit: n2, cursor: e2 }, i2 = yield t2.call("GET", ["me", "conversations", s2, "participants"], r2, { bypassCache: true });
1664
+ if (i2.ok) {
1665
+ const { data: e3, cursor: t3 } = i2.value.data;
1666
+ return c({ participants: e3, nextCursor: t3 });
1667
+ }
1668
+ 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 });
1669
+ });
1670
+ }
1671
+ function ge({ seq: e2, prevStores: t2, participants: s2, cursor: n2, conversationId: r2, realtimeClient: i2 }) {
1672
+ const a2 = t2 ? __spreadValues({}, t2) : {};
1673
+ for (const e3 of s2) if (void 0 === a2[e3.id]) {
1674
+ const t3 = new pe(r2, e3, i2);
1675
+ a2[e3.id] = t3;
1676
+ }
1677
+ if (null === n2) return c({ lastChanged: e2, stores: a2, windowEnd: null });
1678
+ return c({ lastChanged: e2, stores: a2, windowEnd: { cursor: n2, oldestParticipantTs: s2[s2.length - 1].joinedAt } });
1679
+ }
1680
+ class ve {
1504
1681
  constructor(e2, t2, s2) {
1505
- this.realtimeClient = s2, this.userStores = {}, this.messageWindowStores = {}, this.conversationStores = {}, this.typingStores = {}, this.emitMutex = new U(), this.seqOffset = 0, this.seqInThisConnection = 0, this.refetchOnNextNetworkLoss = true, this.connection = new N(e2, t2, { onUpstreamRestarting: () => {
1682
+ this.realtimeClient = s2, this.storeMap = {}, this.emitMutex = new U(), this.seqOffset = 0, this.seqInThisConnection = 0, this.refetchOnNextNetworkLoss = true, this.connection = new N(e2, t2, { onUpstreamRestarting: () => {
1506
1683
  this.refetchOnNextNetworkLoss = false;
1507
1684
  }, onReady: () => {
1508
1685
  this.refetchOnNextNetworkLoss = true;
@@ -1514,7 +1691,7 @@ class fe {
1514
1691
  }
1515
1692
  }, onResubscribeError: (e3, t3) => {
1516
1693
  var _a2;
1517
- (_a2 = this.getStoreIfExists(e3)) == null ? void 0 : _a2.setError(t3);
1694
+ (_a2 = this.storeMap[be(e3)]) == null ? void 0 : _a2.setError(t3);
1518
1695
  }, onPublish: (e3, t3) => {
1519
1696
  this.seqInThisConnection = e3;
1520
1697
  const s3 = this.seq;
@@ -1526,119 +1703,70 @@ class fe {
1526
1703
  return this.seqOffset + this.seqInThisConnection;
1527
1704
  }
1528
1705
  refetchAll(e2) {
1529
- for (const t2 of Object.values(this.userStores)) t2.refetch(e2);
1530
- for (const t2 of Object.values(this.messageWindowStores)) t2.refetch(e2);
1531
- for (const t2 of Object.values(this.conversationStores)) t2.refetch(e2);
1532
- for (const t2 of Object.values(this.typingStores)) t2.refetch(e2);
1706
+ Object.values(this.storeMap).forEach((t2) => t2.refetch(e2));
1533
1707
  }
1534
1708
  emitAll(e2) {
1535
1709
  return this.emitMutex.runExclusive(() => __async(this, null, function* () {
1536
- yield Promise.all([...Object.values(this.userStores).map((t2) => t2.emit(e2)), ...Object.values(this.messageWindowStores).map((t2) => t2.emit(e2)), ...Object.values(this.conversationStores).map((t2) => t2.emit(e2)), ...Object.values(this.typingStores).map((t2) => t2.emit(e2))]);
1710
+ const t2 = Object.values(this.storeMap).map((t3) => t3.emit(e2));
1711
+ yield Promise.all(t2);
1537
1712
  }));
1538
1713
  }
1539
1714
  handlePublish(e2, t2) {
1715
+ var _a2, _b, _c, _d, _e2, _f, _g, _h, _i, _j, _k, _l, _m, _n, _o, _p, _q, _r, _s, _t2, _u;
1540
1716
  switch (t2.type) {
1541
1717
  case "user.created":
1542
- return this.handleUserCreated(e2, t2);
1718
+ return void ((_a2 = this.storeMap[`/users/${t2.userId}`]) == null ? void 0 : _a2.userCreated(e2, t2));
1543
1719
  case "user.edited":
1544
- return this.handleUserEdited(e2, t2);
1720
+ return void ((_b = this.storeMap[`/users/${t2.userId}`]) == null ? void 0 : _b.userEdited(e2, t2));
1545
1721
  case "side.created":
1546
- return this.handleSideCreated(e2, t2);
1722
+ return (_c = this.storeMap[`/me/conversations/${t2.conversationId}`]) == null ? void 0 : _c.sideCreated(e2, t2), (_d = this.storeMap[`/me/conversations/${t2.conversationId}/messages`]) == null ? void 0 : _d.sideCreated(e2, t2), void ((_e2 = this.storeMap[`/me/conversations/${t2.conversationId}/participants`]) == null ? void 0 : _e2.sideCreated(e2, t2));
1547
1723
  case "side.edited":
1548
- return this.handleSideEdited(e2, t2);
1724
+ return void ((_f = this.storeMap[`/me/conversations/${t2.conversationId}`]) == null ? void 0 : _f.sideEdited(e2, t2));
1549
1725
  case "side.deleted":
1550
- return this.handleSideDeleted(e2, t2);
1551
- case "participant.edited":
1552
- return this.handleParticipantEdited(e2, t2);
1726
+ return (_g = this.storeMap[`/me/conversations/${t2.conversationId}`]) == null ? void 0 : _g.sideDeleted(e2, t2), (_h = this.storeMap[`/me/conversations/${t2.conversationId}/messages`]) == null ? void 0 : _h.sideDeleted(e2, t2), (_i = this.storeMap[`/me/conversations/${t2.conversationId}/participants`]) == null ? void 0 : _i.sideDeleted(e2, t2), void ((_j = this.storeMap[`/me/conversations/${t2.conversationId}/typing`]) == null ? void 0 : _j.sideDeleted(e2, t2));
1553
1727
  case "conversation.edited":
1554
- return this.handleConversationEdited(e2, t2);
1728
+ return void ((_k = this.storeMap[`/me/conversations/${t2.conversationId}`]) == null ? void 0 : _k.conversationEdited(e2, t2));
1555
1729
  case "message.created":
1556
- return this.handleMessageCreated(e2, t2);
1730
+ return void ((_l = this.storeMap[`/me/conversations/${t2.conversationId}/messages`]) == null ? void 0 : _l.messageCreated(e2, t2));
1557
1731
  case "message.edited":
1558
- return this.handleMessageEdited(e2, t2);
1732
+ return void ((_m = this.storeMap[`/me/conversations/${t2.conversationId}/messages`]) == null ? void 0 : _m.messageEdited(e2, t2));
1559
1733
  case "message.deleted":
1560
- return this.handleMessageDeleted(e2, t2);
1734
+ return void ((_n = this.storeMap[`/me/conversations/${t2.conversationId}/messages`]) == null ? void 0 : _n.messageDeleted(e2, t2));
1561
1735
  case "typing.available":
1562
- return this.handleTypingAvailable(e2, t2);
1736
+ return void ((_o = this.storeMap[`/me/conversations/${t2.conversationId}/typing`]) == null ? void 0 : _o.typingAvailable(e2, t2));
1563
1737
  case "typing.changed":
1564
- return this.handleTypingChanged(e2, t2);
1738
+ return void ((_p = this.storeMap[`/me/conversations/${t2.conversationId}/typing`]) == null ? void 0 : _p.typingChanged(e2, t2));
1565
1739
  case "conversation.cleared":
1566
- return this.handleConversationCleared(e2, t2);
1740
+ return void ((_q = this.storeMap[`/me/conversations/${t2.conversationId}/messages`]) == null ? void 0 : _q.conversationCleared(e2, t2));
1741
+ case "participant.edited":
1742
+ return (_r = this.storeMap[`/me/conversations/${t2.conversationId}`]) == null ? void 0 : _r.participantEdited(e2, t2), void ((_s = this.storeMap[`/me/conversations/${t2.conversationId}/participants`]) == null ? void 0 : _s.participantEdited(e2, t2));
1743
+ case "participant.created":
1744
+ return void ((_t2 = this.storeMap[`/me/conversations/${t2.conversationId}/participants`]) == null ? void 0 : _t2.participantCreated(e2, t2));
1745
+ case "participant.deleted":
1746
+ return void ((_u = this.storeMap[`/me/conversations/${t2.conversationId}/participants`]) == null ? void 0 : _u.participantDeleted(e2, t2));
1567
1747
  }
1568
1748
  }
1569
- handleTypingAvailable(e2, t2) {
1570
- const s2 = this.typingStores[t2.conversationId];
1571
- s2 && s2.typingAvailable(e2, t2);
1572
- }
1573
- handleTypingChanged(e2, t2) {
1574
- const s2 = this.typingStores[t2.conversationId];
1575
- s2 && s2.typingChanged(e2, t2);
1576
- }
1577
- handleUserCreated(e2, t2) {
1578
- const s2 = this.userStores[t2.userId];
1579
- s2 && s2.userCreated(e2, t2);
1580
- }
1581
- handleUserEdited(e2, t2) {
1582
- const s2 = this.userStores[t2.userId];
1583
- s2 && s2.userEdited(e2, t2);
1584
- }
1585
- handleSideCreated(e2, t2) {
1586
- const s2 = this.messageWindowStores[t2.conversationId];
1587
- s2 && s2.sideCreated(e2, t2);
1588
- const n2 = this.conversationStores[t2.conversationId];
1589
- n2 && n2.sideCreated(e2, t2);
1590
- }
1591
- handleSideEdited(e2, t2) {
1592
- const s2 = this.conversationStores[t2.conversationId];
1593
- s2 && s2.sideEdited(e2, t2);
1594
- }
1595
- handleParticipantEdited(e2, t2) {
1596
- const s2 = this.conversationStores[t2.conversationId];
1597
- s2 && s2.participantEdited(e2, t2);
1598
- }
1599
- handleConversationEdited(e2, t2) {
1600
- const s2 = this.conversationStores[t2.conversationId];
1601
- s2 && s2.conversationEdited(e2, t2);
1602
- }
1603
- handleSideDeleted(e2, t2) {
1604
- const s2 = this.messageWindowStores[t2.conversationId];
1605
- s2 && s2.sideDeleted(e2, t2);
1606
- const n2 = this.conversationStores[t2.conversationId];
1607
- n2 && n2.sideDeleted(e2, t2);
1608
- const r2 = this.typingStores[t2.conversationId];
1609
- r2 && r2.sideDeleted(e2, t2);
1610
- }
1611
- handleMessageCreated(e2, t2) {
1612
- const s2 = this.messageWindowStores[t2.conversationId];
1613
- s2 && s2.messageCreated(e2, t2);
1614
- }
1615
- handleMessageEdited(e2, t2) {
1616
- const s2 = this.messageWindowStores[t2.conversationId];
1617
- s2 && s2.messageEdited(e2, t2);
1618
- }
1619
- handleMessageDeleted(e2, t2) {
1620
- const s2 = this.messageWindowStores[t2.conversationId];
1621
- s2 && s2.messageDeleted(e2, t2);
1622
- }
1623
- handleConversationCleared(e2, t2) {
1624
- const s2 = this.messageWindowStores[t2.conversationId];
1625
- s2 && s2.conversationCleared(e2, t2);
1626
- }
1627
1749
  call(e2, t2, n2, r2) {
1628
1750
  return __async(this, null, function* () {
1629
- if (!r2.bypassCache) {
1630
- if ("GET" === e2 && s(t2, ["users", "*"])) {
1631
- const e3 = t2[1], s2 = this.userStores[e3];
1632
- if (s2) {
1751
+ if (!r2.bypassCache && "GET" === e2) {
1752
+ const e3 = be(t2);
1753
+ if (e3 in this.storeMap) {
1754
+ const t3 = e3, s2 = this.storeMap[t3];
1755
+ if (s2 && "getFromCache" in s2) {
1633
1756
  const e4 = yield s2.getFromCache();
1634
1757
  if ("NOT_IN_CACHE" !== e4.value) return e4;
1635
1758
  }
1636
- }
1637
- if ("GET" === e2 && s(t2, ["me", "conversations", "*", "messages", "*"])) {
1638
- const e3 = t2[2], s2 = this.messageWindowStores[e3];
1639
- if (s2) {
1640
- const e4 = t2[3], n3 = yield s2.getMessageFromCache(e4);
1641
- if ("NOT_IN_CACHE" !== n3.value) return n3;
1759
+ } else if (s(t2, ["me", "conversations", "*", "messages", "*"])) {
1760
+ const e4 = this.storeMap[`/me/conversations/${t2[2]}/messages`];
1761
+ if (e4) {
1762
+ const s2 = yield e4.getMessageFromCache(t2[4]);
1763
+ if ("NOT_IN_CACHE" !== s2.value) return s2;
1764
+ }
1765
+ } else if (s(t2, ["me", "conversations", "*", "participants", "*"])) {
1766
+ const e4 = this.storeMap[`/me/conversations/${t2[2]}/participants`];
1767
+ if (e4) {
1768
+ const s2 = yield e4.getParticipantFromCache(t2[4]);
1769
+ if ("NOT_IN_CACHE" !== s2.value) return s2;
1642
1770
  }
1643
1771
  }
1644
1772
  }
@@ -1680,86 +1808,36 @@ class fe {
1680
1808
  }, a2;
1681
1809
  }
1682
1810
  getOrCreateStore(e2) {
1683
- if (s(e2, ["users", "*"])) {
1684
- const t2 = e2[1];
1685
- if (Object.hasOwnProperty.call(this.userStores, t2)) return this.userStores[t2];
1686
- {
1687
- this.connection.subscribe(["users", t2]).then((t3) => {
1688
- t3.ok || e3.setError(t3);
1689
- });
1690
- const e3 = new G(t2, this.realtimeClient, this.emitMutex, () => {
1691
- delete this.userStores[t2], this.connection.unsubscribe(["users", t2]);
1692
- });
1693
- return this.userStores[t2] = e3, e3;
1694
- }
1695
- }
1696
- if (s(e2, ["me", "conversations", "*"])) {
1697
- const t2 = e2[2];
1698
- if (Object.hasOwnProperty.call(this.conversationStores, t2)) return this.conversationStores[t2];
1699
- {
1700
- this.connection.subscribe(["me", "conversations", t2]).then((t3) => {
1701
- t3.ok || e3.setError(t3);
1702
- });
1703
- const e3 = new ce(this.emitMutex, t2, this.realtimeClient, () => {
1704
- delete this.conversationStores[t2], this.connection.unsubscribe(["me", "conversations", t2]);
1705
- });
1706
- return this.conversationStores[t2] = e3, e3;
1707
- }
1708
- }
1709
- if (s(e2, ["me", "conversations", "*", "messages"])) {
1710
- const t2 = e2[2];
1711
- if (Object.hasOwnProperty.call(this.messageWindowStores, t2)) return this.messageWindowStores[t2];
1712
- {
1713
- this.connection.subscribe(["me", "conversations", t2, "messages"]).then((t3) => {
1714
- t3.ok || e3.setError(t3);
1715
- });
1716
- const e3 = new ie(this.emitMutex, t2, this.realtimeClient, () => {
1717
- delete this.messageWindowStores[t2], this.connection.unsubscribe(["me", "conversations", t2, "messages"]);
1718
- });
1719
- return this.messageWindowStores[t2] = e3, e3;
1720
- }
1721
- }
1722
- if (s(e2, ["me", "conversations", "*", "typing"])) {
1723
- const t2 = e2[2];
1724
- if (Object.hasOwnProperty.call(this.typingStores, t2)) return this.typingStores[t2];
1725
- {
1726
- this.connection.subscribe(["me", "conversations", t2, "typing"]).then((t3) => {
1727
- t3.ok || e3.setError(t3);
1728
- });
1729
- const e3 = new pe(t2, this.realtimeClient, this.emitMutex, () => {
1730
- delete this.typingStores[t2], this.connection.unsubscribe(["me", "conversations", t2, "typing"]);
1731
- });
1732
- return this.typingStores[t2] = e3, e3;
1733
- }
1734
- }
1735
- throw new Error("Unrecognised subscribe path: " + e2);
1736
- }
1737
- getStoreIfExists(e2) {
1738
- var _a2, _b, _c;
1739
- if (s(e2, ["users", "*"])) {
1740
- const t2 = e2[1];
1741
- return (_a2 = this.userStores[t2]) != null ? _a2 : null;
1742
- }
1743
- if (s(e2, ["me", "conversations", "*", "messages"])) {
1744
- const t2 = e2[2];
1745
- return (_b = this.messageWindowStores[t2]) != null ? _b : null;
1746
- }
1747
- if (s(e2, ["me", "conversations", "*", "typing"])) {
1748
- const t2 = e2[2];
1749
- return (_c = this.typingStores[t2]) != null ? _c : null;
1750
- }
1751
- throw new Error("Unrecognised subscribe path: " + e2);
1811
+ const t2 = be(e2);
1812
+ if (t2 in this.storeMap) return this.storeMap[t2];
1813
+ this.connection.subscribe(e2).then((e3) => {
1814
+ e3.ok || n2.setError(e3);
1815
+ });
1816
+ const n2 = function(e3, t3, n3, r2) {
1817
+ if (s(e3, ["users", "*"])) return new G(e3[1], t3, n3, r2);
1818
+ if (s(e3, ["me", "conversations", "*"])) return new ue(e3[2], t3, n3, r2);
1819
+ if (s(e3, ["me", "conversations", "*", "messages"])) return new ie(e3[2], t3, n3, r2);
1820
+ if (s(e3, ["me", "conversations", "*", "participants"])) return new fe(e3[2], t3, n3, r2);
1821
+ if (s(e3, ["me", "conversations", "*", "typing"])) return new de(e3[2], t3, n3, r2);
1822
+ throw "Unreachable";
1823
+ }(e2, this.realtimeClient, this.emitMutex, () => {
1824
+ delete this.storeMap[t2], this.connection.unsubscribe(e2);
1825
+ });
1826
+ return this.storeMap[t2] = n2, n2;
1752
1827
  }
1753
1828
  destroy() {
1754
- this.userStores = {}, this.messageWindowStores = {}, this.connection.destroy();
1829
+ this.storeMap = {}, this.connection.destroy();
1755
1830
  }
1756
1831
  isConnected() {
1757
1832
  return this.connection.isConnected();
1758
1833
  }
1759
1834
  }
1760
- class ge {
1835
+ function be(e2) {
1836
+ return `/${e2.join("/")}`;
1837
+ }
1838
+ class we {
1761
1839
  constructor(e2, t2, s2) {
1762
- this.userId = t2, this.alive = true, this.connection = new fe(e2, s2, this), s2.onTokenRefreshFailed(() => {
1840
+ this.userId = t2, this.alive = true, this.connection = new ve(e2, s2, this), s2.onTokenRefreshFailed(() => {
1763
1841
  this.destroy();
1764
1842
  });
1765
1843
  }
@@ -1784,7 +1862,7 @@ class ge {
1784
1862
  listMessages(e2, t2) {
1785
1863
  return __async(this, null, function* () {
1786
1864
  const s2 = yield this.call("GET", ["me", "conversations", e2, "messages"], t2);
1787
- if (!s2.ok) return me(s2, "Listing messages in " + e2);
1865
+ if (!s2.ok) return ye(s2, "Listing messages in " + e2);
1788
1866
  const n2 = s2.value.data.data, r2 = yield Promise.all(n2.map((t3) => this.createMessageSnapshot(t3, e2))), i2 = r2.find((e3) => !e3.ok);
1789
1867
  if (void 0 !== i2 && !i2.ok) return i2;
1790
1868
  return c(r2.map(({ value: e3 }) => e3));
@@ -1797,7 +1875,7 @@ class ge {
1797
1875
  return { id: e2.id, name: e2.name, custom: e2.custom, locale: e2.locale, photoUrl: e2.photoUrl, role: e2.role, welcomeMessage: e2.welcomeMessage };
1798
1876
  }
1799
1877
  createParticipantSnapshotPreloaded(e2, t2) {
1800
- return "None" === e2.access ? null : { user: t2, access: e2.access, notify: e2.notify, joinedAt: e2.joinedAt };
1878
+ return { user: t2, access: e2.access, notify: e2.notify, joinedAt: e2.joinedAt };
1801
1879
  }
1802
1880
  createMessageSnapshot(e2, t2) {
1803
1881
  return __async(this, null, function* () {
@@ -1813,7 +1891,7 @@ class ge {
1813
1891
  const s2 = yield this.call("GET", ["me", "conversations", e2, "messages", t2], {});
1814
1892
  if (!s2.ok && "server" === s2.where && 404 === s2.value.status) return c(null);
1815
1893
  if (!s2.ok && "server" === s2.where && 403 === s2.value.status && "NOT_A_PARTICIPANT" === s2.value.errorCode) return c(null);
1816
- if (!s2.ok) return me(s2, `Fetching referenced message ${t2} in conversation ${e2}`);
1894
+ if (!s2.ok) return ye(s2, `Fetching referenced message ${t2} in conversation ${e2}`);
1817
1895
  const n2 = s2.value.data, r2 = yield this.getUser(n2.senderId);
1818
1896
  if (!r2.ok) return r2;
1819
1897
  const i2 = r2.value;
@@ -1824,7 +1902,7 @@ class ge {
1824
1902
  return __async(this, null, function* () {
1825
1903
  const t2 = yield this.call("GET", ["users", e2], { includePrivateFields: false });
1826
1904
  if (!t2.ok && "server" === t2.where && 404 === t2.value.status) return c(null);
1827
- if (!t2.ok) return me(t2, "Get user " + e2);
1905
+ if (!t2.ok) return ye(t2, "Get user " + e2);
1828
1906
  return c(this.createUserSnapshot(t2.value.data));
1829
1907
  });
1830
1908
  }
@@ -1835,15 +1913,15 @@ class ge {
1835
1913
  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, plaintext: te(e2.content, {}) };
1836
1914
  }
1837
1915
  }
1838
- function me(e2, t2) {
1916
+ function ye(e2, t2) {
1839
1917
  return "server" === e2.where ? h(__spreadProps(__spreadValues({}, e2.value), { operation: t2 })) : e2;
1840
1918
  }
1841
- function ve(e2, s2) {
1919
+ function Ae(e2, s2) {
1842
1920
  var _a2;
1843
1921
  if (s2.ok) return s2.value;
1844
1922
  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));
1845
1923
  }
1846
- class be {
1924
+ class Ce {
1847
1925
  constructor(e2, t2) {
1848
1926
  this.id = e2, this._realtimeClient = t2;
1849
1927
  }
@@ -1853,7 +1931,7 @@ class be {
1853
1931
  get() {
1854
1932
  return __async(this, null, function* () {
1855
1933
  const e2 = yield this._realtimeClient.getUser(this.brandedId);
1856
- return ve("Get user " + this.id, e2);
1934
+ return Ae("Get user " + this.id, e2);
1857
1935
  });
1858
1936
  }
1859
1937
  set(t2) {
@@ -1874,7 +1952,7 @@ class be {
1874
1952
  return this._realtimeClient.subscribe(["users", this.brandedId], e2);
1875
1953
  }
1876
1954
  }
1877
- class ye {
1955
+ class Ee {
1878
1956
  constructor(e2, t2, s2) {
1879
1957
  this.userId = e2, this.conversationId = t2, this._realtimeClient = s2;
1880
1958
  }
@@ -1918,7 +1996,7 @@ class ye {
1918
1996
  });
1919
1997
  }
1920
1998
  }
1921
- function we(e2) {
1999
+ function ke(e2) {
1922
2000
  const t2 = "-0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ_abcdefghijklmnopqrstuvwxyz";
1923
2001
  let s2 = 0;
1924
2002
  const n2 = [], r2 = e2 === s2;
@@ -1936,7 +2014,7 @@ function we(e2) {
1936
2014
  if (20 != a2.length) throw new Error("Length should be 20.");
1937
2015
  return a2;
1938
2016
  }
1939
- const Ae = (e2, t2, s2 = void 0) => function(e3, t3) {
2017
+ const xe = (e2, t2, s2 = void 0) => function(e3, t3) {
1940
2018
  return e3.reduce((e4, s3, n2) => e4.concat(t3(s3, n2)), []);
1941
2019
  }(e2, (e3) => {
1942
2020
  if ("string" == typeof e3) return t2(e3, s2);
@@ -1949,14 +2027,14 @@ const Ae = (e2, t2, s2 = void 0) => function(e3, t3) {
1949
2027
  case "bulletList":
1950
2028
  case "bulletpoint":
1951
2029
  case "bulletPoint":
1952
- return [{ type: e3.type, children: Ae(e3.children, t2, e3.type) }];
2030
+ return [{ type: e3.type, children: xe(e3.children, t2, e3.type) }];
1953
2031
  case "link":
1954
- return [{ type: e3.type, url: e3.url, children: Ae(e3.children, t2, e3.type) }];
2032
+ return [{ type: e3.type, url: e3.url, children: xe(e3.children, t2, e3.type) }];
1955
2033
  case "actionlink":
1956
2034
  case "actionLink":
1957
2035
  case "actionbutton":
1958
2036
  case "actionButton":
1959
- return [{ type: e3.type, action: e3.action, params: e3.params, children: Ae(e3.children, t2, e3.type) }];
2037
+ return [{ type: e3.type, action: e3.action, params: e3.params, children: xe(e3.children, t2, e3.type) }];
1960
2038
  case "mention":
1961
2039
  case "autolink":
1962
2040
  case "autoLink":
@@ -1971,7 +2049,7 @@ const Ae = (e2, t2, s2 = void 0) => function(e3, t3) {
1971
2049
  return [e3];
1972
2050
  }
1973
2051
  });
1974
- function Ce(e2, t2) {
2052
+ function Te(e2, t2) {
1975
2053
  return (s2) => {
1976
2054
  const n2 = s2;
1977
2055
  let r2 = 0;
@@ -1984,29 +2062,29 @@ function Ce(e2, t2) {
1984
2062
  return r2 < s2.length && i2.push(s2.substring(r2)), i2;
1985
2063
  };
1986
2064
  }
1987
- const Ee = "’'()[]{}<>:,‒–—―…!.«»-‐?‘’“”;/⁄␠·&@*\\•^¤¢$€£¥₩₪†‡°¡¿¬#№%‰‱¶′§~¨_|¦⁂☞∴‽※".replace(/[-[\]{}()*+?.,\\^$|#\s]/g, "\\$&");
1988
- var ke = ((e2) => (e2[e2.italic = 1] = "italic", e2[e2.strikethrough = 2] = "strikethrough", e2[e2.bold = 4] = "bold", e2))(ke || {});
1989
- const xe = [0, 1, 2, 3, 4, 5, 6].map((e2) => {
2065
+ const Ie = "’'()[]{}<>:,‒–—―…!.«»-‐?‘’“”;/⁄␠·&@*\\•^¤¢$€£¥₩₪†‡°¡¿¬#№%‰‱¶′§~¨_|¦⁂☞∴‽※".replace(/[-[\]{}()*+?.,\\^$|#\s]/g, "\\$&");
2066
+ var Se = ((e2) => (e2[e2.italic = 1] = "italic", e2[e2.strikethrough = 2] = "strikethrough", e2[e2.bold = 4] = "bold", e2))(Se || {});
2067
+ const De = [0, 1, 2, 3, 4, 5, 6].map((e2) => {
1990
2068
  const t2 = [];
1991
2069
  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");
1992
- }), Se = { _: 1, "*": 4, "~": 2 };
1993
- function Te(e2) {
1994
- return De(e2, 0);
2070
+ }), Fe = { _: 1, "*": 4, "~": 2 };
2071
+ function Me(e2) {
2072
+ return Be(e2, 0);
1995
2073
  }
1996
- function De(e2, t2 = 0) {
1997
- const s2 = xe[t2], n2 = s2 ? function(e3) {
1998
- const t3 = Ie.getOrCompute(e3, () => new RegExp(`(?:^|[\\s${Ee}])(?:${e3.source})(?=[\\s${Ee}]|$)`, "g")), s3 = Ce(t3, (e4) => {
2074
+ function Be(e2, t2 = 0) {
2075
+ const s2 = De[t2], n2 = s2 ? function(e3) {
2076
+ const t3 = Re.getOrCompute(e3, () => new RegExp(`(?:^|[\\s${Ie}])(?:${e3.source})(?=[\\s${Ie}]|$)`, "g")), s3 = Te(t3, (e4) => {
1999
2077
  const t4 = e4[0][1], s4 = e4[1] || e4[2] || e4[3] || e4[4] || e4[5] || e4[6];
2000
- return [" ", { type: ke[Se[t4]], children: [s4] }];
2078
+ return [" ", { type: Se[Fe[t4]], children: [s4] }];
2001
2079
  });
2002
2080
  return (e4) => {
2003
2081
  const [t4, ...n3] = s3(" " + e4);
2004
2082
  return t4.length > 1 && n3.unshift(t4.substring(1)), n3;
2005
2083
  };
2006
2084
  }(s2) : () => [e2];
2007
- return Ae(n2(e2), (e3, s3) => "bold" === s3 || "italic" === s3 || "strikethrough" === s3 ? De(e3, t2 | ke[s3]) : [e3]);
2085
+ return xe(n2(e2), (e3, s3) => "bold" === s3 || "italic" === s3 || "strikethrough" === s3 ? Be(e3, t2 | Se[s3]) : [e3]);
2008
2086
  }
2009
- const Ie = function() {
2087
+ const Re = function() {
2010
2088
  const e2 = function() {
2011
2089
  try {
2012
2090
  return /* @__PURE__ */ new WeakMap();
@@ -2022,18 +2100,18 @@ const Ie = function() {
2022
2100
  return e2.set(t2, n2), n2;
2023
2101
  } };
2024
2102
  }();
2025
- function Fe(e2, t2) {
2103
+ function Ne(e2, t2) {
2026
2104
  if (Array.prototype.indexOf) return e2.indexOf(t2);
2027
2105
  for (var s2 = 0, n2 = e2.length; s2 < n2; s2++) if (e2[s2] === t2) return s2;
2028
2106
  return -1;
2029
2107
  }
2030
- function Be(e2, t2) {
2108
+ function Pe(e2, t2) {
2031
2109
  for (var s2 = e2.length - 1; s2 >= 0; s2--) true === t2(e2[s2]) && e2.splice(s2, 1);
2032
2110
  }
2033
- function Me(e2) {
2111
+ function _e(e2) {
2034
2112
  throw new Error("Unhandled case for value: '" + e2 + "'");
2035
2113
  }
2036
- var Re = function() {
2114
+ var Oe = function() {
2037
2115
  function e2(e3) {
2038
2116
  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 || "";
2039
2117
  }
@@ -2052,11 +2130,11 @@ var Re = function() {
2052
2130
  }, e2.prototype.setClass = function(e3) {
2053
2131
  return this.setAttr("class", e3);
2054
2132
  }, e2.prototype.addClass = function(e3) {
2055
- for (var t2, s2 = this.getClass(), n2 = this.whitespaceRegex, r2 = s2 ? s2.split(n2) : [], i2 = e3.split(n2); t2 = i2.shift(); ) -1 === Fe(r2, t2) && r2.push(t2);
2133
+ for (var t2, s2 = this.getClass(), n2 = this.whitespaceRegex, r2 = s2 ? s2.split(n2) : [], i2 = e3.split(n2); t2 = i2.shift(); ) -1 === Ne(r2, t2) && r2.push(t2);
2056
2134
  return this.getAttrs().class = r2.join(" "), this;
2057
2135
  }, e2.prototype.removeClass = function(e3) {
2058
2136
  for (var t2, s2 = this.getClass(), n2 = this.whitespaceRegex, r2 = s2 ? s2.split(n2) : [], i2 = e3.split(n2); r2.length && (t2 = i2.shift()); ) {
2059
- var a2 = Fe(r2, t2);
2137
+ var a2 = Ne(r2, t2);
2060
2138
  -1 !== a2 && r2.splice(a2, 1);
2061
2139
  }
2062
2140
  return this.getAttrs().class = r2.join(" "), this;
@@ -2082,12 +2160,12 @@ var Re = function() {
2082
2160
  return t2.join(" ");
2083
2161
  }, e2;
2084
2162
  }();
2085
- var Ne = function() {
2163
+ var Ue = function() {
2086
2164
  function e2(e3) {
2087
2165
  void 0 === e3 && (e3 = {}), this.newWindow = false, this.truncate = {}, this.className = "", this.newWindow = e3.newWindow || false, this.truncate = e3.truncate || {}, this.className = e3.className || "";
2088
2166
  }
2089
2167
  return e2.prototype.build = function(e3) {
2090
- return new Re({ tagName: "a", attrs: this.createAttrs(e3), innerHtml: this.processAnchorText(e3.getAnchorText()) });
2168
+ return new Oe({ tagName: "a", attrs: this.createAttrs(e3), innerHtml: this.processAnchorText(e3.getAnchorText()) });
2091
2169
  }, e2.prototype.createAttrs = function(e3) {
2092
2170
  var t2 = { href: e3.getAnchorHref() }, s2 = this.createCssClass(e3);
2093
2171
  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;
@@ -2157,7 +2235,7 @@ var Ne = function() {
2157
2235
  }(e4, t3, s3);
2158
2236
  }(e3, s2);
2159
2237
  }, e2;
2160
- }(), Pe = function() {
2238
+ }(), $e = function() {
2161
2239
  function e2(e3) {
2162
2240
  this.__jsduckDummyDocProp = null, this.matchedText = "", this.offset = 0, this.tagBuilder = e3.tagBuilder, this.matchedText = e3.matchedText, this.offset = e3.offset;
2163
2241
  }
@@ -2172,30 +2250,30 @@ var Ne = function() {
2172
2250
  }, e2.prototype.buildTag = function() {
2173
2251
  return this.tagBuilder.build(this);
2174
2252
  }, e2;
2175
- }(), _e = function(e2, t2) {
2176
- return _e = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(e3, t3) {
2253
+ }(), je = function(e2, t2) {
2254
+ return je = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(e3, t3) {
2177
2255
  e3.__proto__ = t3;
2178
2256
  } || function(e3, t3) {
2179
2257
  for (var s2 in t3) t3.hasOwnProperty(s2) && (e3[s2] = t3[s2]);
2180
- }, _e(e2, t2);
2258
+ }, je(e2, t2);
2181
2259
  };
2182
- function Oe(e2, t2) {
2260
+ function We(e2, t2) {
2183
2261
  function s2() {
2184
2262
  this.constructor = e2;
2185
2263
  }
2186
- _e(e2, t2), e2.prototype = null === t2 ? Object.create(t2) : (s2.prototype = t2.prototype, new s2());
2264
+ je(e2, t2), e2.prototype = null === t2 ? Object.create(t2) : (s2.prototype = t2.prototype, new s2());
2187
2265
  }
2188
- var Ue, je = function() {
2189
- return je = Object.assign || function(e2) {
2266
+ var qe, He = function() {
2267
+ return He = Object.assign || function(e2) {
2190
2268
  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]);
2191
2269
  return e2;
2192
- }, je.apply(this, arguments);
2193
- }, $e = function(e2) {
2270
+ }, He.apply(this, arguments);
2271
+ }, Ge = function(e2) {
2194
2272
  function t2(t3) {
2195
2273
  var s2 = e2.call(this, t3) || this;
2196
2274
  return s2.email = "", s2.email = t3.email, s2;
2197
2275
  }
2198
- return Oe(t2, e2), t2.prototype.getType = function() {
2276
+ return We(t2, e2), t2.prototype.getType = function() {
2199
2277
  return "email";
2200
2278
  }, t2.prototype.getEmail = function() {
2201
2279
  return this.email;
@@ -2204,12 +2282,12 @@ var Ue, je = function() {
2204
2282
  }, t2.prototype.getAnchorText = function() {
2205
2283
  return this.email;
2206
2284
  }, t2;
2207
- }(Pe), We = function(e2) {
2285
+ }($e), Le = function(e2) {
2208
2286
  function t2(t3) {
2209
2287
  var s2 = e2.call(this, t3) || this;
2210
2288
  return s2.serviceName = "", s2.hashtag = "", s2.serviceName = t3.serviceName, s2.hashtag = t3.hashtag, s2;
2211
2289
  }
2212
- return Oe(t2, e2), t2.prototype.getType = function() {
2290
+ return We(t2, e2), t2.prototype.getType = function() {
2213
2291
  return "hashtag";
2214
2292
  }, t2.prototype.getServiceName = function() {
2215
2293
  return this.serviceName;
@@ -2230,12 +2308,12 @@ var Ue, je = function() {
2230
2308
  }, t2.prototype.getAnchorText = function() {
2231
2309
  return "#" + this.hashtag;
2232
2310
  }, t2;
2233
- }(Pe), qe = function(e2) {
2311
+ }($e), ze = function(e2) {
2234
2312
  function t2(t3) {
2235
2313
  var s2 = e2.call(this, t3) || this;
2236
2314
  return s2.serviceName = "twitter", s2.mention = "", s2.mention = t3.mention, s2.serviceName = t3.serviceName, s2;
2237
2315
  }
2238
- return Oe(t2, e2), t2.prototype.getType = function() {
2316
+ return We(t2, e2), t2.prototype.getType = function() {
2239
2317
  return "mention";
2240
2318
  }, t2.prototype.getMention = function() {
2241
2319
  return this.mention;
@@ -2258,12 +2336,12 @@ var Ue, je = function() {
2258
2336
  var t3 = e2.prototype.getCssClassSuffixes.call(this), s2 = this.getServiceName();
2259
2337
  return s2 && t3.push(s2), t3;
2260
2338
  }, t2;
2261
- }(Pe), He = function(e2) {
2339
+ }($e), Je = function(e2) {
2262
2340
  function t2(t3) {
2263
2341
  var s2 = e2.call(this, t3) || this;
2264
2342
  return s2.number = "", s2.plusSign = false, s2.number = t3.number, s2.plusSign = t3.plusSign, s2;
2265
2343
  }
2266
- return Oe(t2, e2), t2.prototype.getType = function() {
2344
+ return We(t2, e2), t2.prototype.getType = function() {
2267
2345
  return "phone";
2268
2346
  }, t2.prototype.getPhoneNumber = function() {
2269
2347
  return this.number;
@@ -2274,12 +2352,12 @@ var Ue, je = function() {
2274
2352
  }, t2.prototype.getAnchorText = function() {
2275
2353
  return this.matchedText;
2276
2354
  }, t2;
2277
- }(Pe), Ge = function(e2) {
2355
+ }($e), Ye = function(e2) {
2278
2356
  function t2(t3) {
2279
2357
  var s2 = e2.call(this, t3) || this;
2280
2358
  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;
2281
2359
  }
2282
- return Oe(t2, e2), t2.prototype.getType = function() {
2360
+ return We(t2, e2), t2.prototype.getType = function() {
2283
2361
  return "url";
2284
2362
  }, t2.prototype.getUrlMatchType = function() {
2285
2363
  return this.urlMatchType;
@@ -2307,19 +2385,19 @@ var Ue, je = function() {
2307
2385
  return t3;
2308
2386
  }
2309
2387
  }, t2;
2310
- }(Pe), Le = function(e2) {
2388
+ }($e), Qe = function(e2) {
2311
2389
  this.__jsduckDummyDocProp = null, this.tagBuilder = e2.tagBuilder;
2312
- }, ze = /[A-Za-z]/, Je = /[\d]/, Ye = /[\D]/, Qe = /\s/, Ve = /['"]/, Ze = /[\x00-\x1F\x7F]/, Ke = /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, Xe = Ke + /\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, et = /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, tt = Xe + et, st = Xe + et, nt = "(?:[" + et + "]{1,3}\\.){3}[" + et + "]{1,3}", rt = "[" + st + "](?:[" + st + "\\-]{0,61}[" + st + "])?", it = function(e2) {
2313
- return "(?=(" + rt + "))\\" + e2;
2314
- }, at = function(e2) {
2315
- return "(?:" + it(e2) + "(?:\\." + it(e2 + 1) + "){0,126}|" + nt + ")";
2316
- }, ot = new RegExp("[" + st + "]"), ut = /(?: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|ελ|бг|ею|рф|გე|닷넷|닷컴|삼성|한국|コム|世界|中信|中国|中國|企业|佛山|信息|健康|八卦|公司|公益|台湾|台灣|商城|商店|商标|嘉里|在线|大拿|娱乐|家電|工行|广东|微博|慈善|手机|手表|招聘|政务|政府|新闻|时尚|書籍|机构|游戏|澳門|点看|珠宝|移动|网址|网店|网站|网络|联通|谷歌|购物|通販|集团|食品|餐厅|香港)/, ct = new RegExp("[" + st + "!#$%&'*+/=?^_`{|}~-]"), lt = new RegExp("^" + ut.source + "$"), ht = function(e2) {
2390
+ }, Ve = /[A-Za-z]/, Ze = /[\d]/, Ke = /[\D]/, Xe = /\s/, et = /['"]/, tt = /[\x00-\x1F\x7F]/, st = /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, nt = st + /\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, rt = /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, it = nt + rt, at = nt + rt, ot = "(?:[" + rt + "]{1,3}\\.){3}[" + rt + "]{1,3}", ut = "[" + at + "](?:[" + at + "\\-]{0,61}[" + at + "])?", ct = function(e2) {
2391
+ return "(?=(" + ut + "))\\" + e2;
2392
+ }, lt = function(e2) {
2393
+ return "(?:" + ct(e2) + "(?:\\." + ct(e2 + 1) + "){0,126}|" + ot + ")";
2394
+ }, ht = new RegExp("[" + at + "]"), dt = /(?: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|ελ|бг|ею|рф|გე|닷넷|닷컴|삼성|한국|コム|世界|中信|中国|中國|企业|佛山|信息|健康|八卦|公司|公益|台湾|台灣|商城|商店|商标|嘉里|在线|大拿|娱乐|家電|工行|广东|微博|慈善|手机|手表|招聘|政务|政府|新闻|时尚|書籍|机构|游戏|澳門|点看|珠宝|移动|网址|网店|网站|网络|联通|谷歌|购物|通販|集团|食品|餐厅|香港)/, pt = new RegExp("[" + at + "!#$%&'*+/=?^_`{|}~-]"), ft = new RegExp("^" + dt.source + "$"), mt = function(e2) {
2317
2395
  function t2() {
2318
2396
  var t3 = null !== e2 && e2.apply(this, arguments) || this;
2319
- return t3.localPartCharRegex = ct, t3.strictTldRegex = lt, t3;
2397
+ return t3.localPartCharRegex = pt, t3.strictTldRegex = ft, t3;
2320
2398
  }
2321
- return Oe(t2, e2), t2.prototype.parseMatches = function(e3) {
2322
- for (var t3 = this.tagBuilder, s2 = this.localPartCharRegex, n2 = this.strictTldRegex, r2 = [], i2 = e3.length, a2 = new dt(), o2 = { m: "a", a: "i", i: "l", l: "t", t: "o", o: ":" }, u2 = 0, c2 = 0, l2 = a2; u2 < i2; ) {
2399
+ return We(t2, e2), t2.prototype.parseMatches = function(e3) {
2400
+ for (var t3 = this.tagBuilder, s2 = this.localPartCharRegex, n2 = this.strictTldRegex, r2 = [], i2 = e3.length, a2 = new gt(), o2 = { m: "a", a: "i", i: "l", l: "t", t: "o", o: ":" }, u2 = 0, c2 = 0, l2 = a2; u2 < i2; ) {
2323
2401
  var h2 = e3.charAt(u2);
2324
2402
  switch (c2) {
2325
2403
  case 0:
@@ -2332,10 +2410,10 @@ var Ue, je = function() {
2332
2410
  f2(h2);
2333
2411
  break;
2334
2412
  case 3:
2335
- g2(h2);
2413
+ m2(h2);
2336
2414
  break;
2337
2415
  case 4:
2338
- m2(h2);
2416
+ g2(h2);
2339
2417
  break;
2340
2418
  case 5:
2341
2419
  v2(h2);
@@ -2344,40 +2422,40 @@ var Ue, je = function() {
2344
2422
  b2(h2);
2345
2423
  break;
2346
2424
  case 7:
2347
- y2(h2);
2425
+ w2(h2);
2348
2426
  break;
2349
2427
  default:
2350
- Me(c2);
2428
+ _e(c2);
2351
2429
  }
2352
2430
  u2++;
2353
2431
  }
2354
2432
  return C2(), r2;
2355
2433
  function d2(e4) {
2356
- "m" === e4 ? w2(1) : s2.test(e4) && w2();
2434
+ "m" === e4 ? y2(1) : s2.test(e4) && y2();
2357
2435
  }
2358
2436
  function p2(e4, t4) {
2359
- ":" === e4 ? s2.test(t4) ? (c2 = 2, l2 = new dt(je(je({}, l2), { hasMailtoPrefix: true }))) : A2() : o2[e4] === t4 || (s2.test(t4) ? c2 = 2 : "." === t4 ? c2 = 3 : "@" === t4 ? c2 = 4 : A2());
2437
+ ":" === e4 ? s2.test(t4) ? (c2 = 2, l2 = new gt(He(He({}, l2), { hasMailtoPrefix: true }))) : A2() : o2[e4] === t4 || (s2.test(t4) ? c2 = 2 : "." === t4 ? c2 = 3 : "@" === t4 ? c2 = 4 : A2());
2360
2438
  }
2361
2439
  function f2(e4) {
2362
2440
  "." === e4 ? c2 = 3 : "@" === e4 ? c2 = 4 : s2.test(e4) || A2();
2363
2441
  }
2364
- function g2(e4) {
2442
+ function m2(e4) {
2365
2443
  "." === e4 || "@" === e4 ? A2() : s2.test(e4) ? c2 = 2 : A2();
2366
2444
  }
2367
- function m2(e4) {
2368
- ot.test(e4) ? c2 = 5 : A2();
2445
+ function g2(e4) {
2446
+ ht.test(e4) ? c2 = 5 : A2();
2369
2447
  }
2370
2448
  function v2(e4) {
2371
- "." === e4 ? c2 = 7 : "-" === e4 ? c2 = 6 : ot.test(e4) || C2();
2449
+ "." === e4 ? c2 = 7 : "-" === e4 ? c2 = 6 : ht.test(e4) || C2();
2372
2450
  }
2373
2451
  function b2(e4) {
2374
- "-" === e4 || "." === e4 ? C2() : ot.test(e4) ? c2 = 5 : C2();
2375
- }
2376
- function y2(e4) {
2377
- "." === e4 || "-" === e4 ? C2() : ot.test(e4) ? (c2 = 5, l2 = new dt(je(je({}, l2), { hasDomainDot: true }))) : C2();
2452
+ "-" === e4 || "." === e4 ? C2() : ht.test(e4) ? c2 = 5 : C2();
2378
2453
  }
2379
2454
  function w2(e4) {
2380
- void 0 === e4 && (e4 = 2), c2 = e4, l2 = new dt({ idx: u2 });
2455
+ "." === e4 || "-" === e4 ? C2() : ht.test(e4) ? (c2 = 5, l2 = new gt(He(He({}, l2), { hasDomainDot: true }))) : C2();
2456
+ }
2457
+ function y2(e4) {
2458
+ void 0 === e4 && (e4 = 2), c2 = e4, l2 = new gt({ idx: u2 });
2381
2459
  }
2382
2460
  function A2() {
2383
2461
  c2 = 0, l2 = a2;
@@ -2390,14 +2468,14 @@ var Ue, je = function() {
2390
2468
  (function(e4) {
2391
2469
  var t4 = e4.split(".").pop() || "", s4 = t4.toLowerCase();
2392
2470
  return n2.test(s4);
2393
- })(i3) && r2.push(new $e({ tagBuilder: t3, matchedText: s3, offset: l2.idx, email: i3 }));
2471
+ })(i3) && r2.push(new Ge({ tagBuilder: t3, matchedText: s3, offset: l2.idx, email: i3 }));
2394
2472
  }
2395
2473
  A2();
2396
2474
  }
2397
2475
  }, t2;
2398
- }(Le), dt = function(e2) {
2476
+ }(Qe), gt = function(e2) {
2399
2477
  void 0 === e2 && (e2 = {}), this.idx = void 0 !== e2.idx ? e2.idx : -1, this.hasMailtoPrefix = !!e2.hasMailtoPrefix, this.hasDomainDot = !!e2.hasDomainDot;
2400
- }, pt = function() {
2478
+ }, vt = function() {
2401
2479
  function e2() {
2402
2480
  }
2403
2481
  return e2.isValid = function(e3, t2) {
@@ -2415,22 +2493,22 @@ var Ue, je = function() {
2415
2493
  return !(!e3 || t2 && this.hasFullProtocolRegex.test(t2) || -1 !== e3.indexOf("."));
2416
2494
  }, e2.urlMatchDoesNotHaveAtLeastOneWordChar = function(e3, t2) {
2417
2495
  return !(!e3 || !t2) && (!this.hasFullProtocolRegex.test(t2) && !this.hasWordCharAfterProtocolRegex.test(e3));
2418
- }, e2.hasFullProtocolRegex = /^[A-Za-z][-.+A-Za-z0-9]*:\/\//, e2.uriSchemeRegex = /^[A-Za-z][-.+A-Za-z0-9]*:/, e2.hasWordCharAfterProtocolRegex = new RegExp(":[^\\s]*?[" + Ke + "]"), 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;
2419
- }(), ft = (Ue = new RegExp("[/?#](?:[" + st + "\\-+&@#/%=~_()|'$*\\[\\]{}?!:,.;^✓]*[" + st + "\\-+&@#/%=~_()|'$*\\[\\]{}✓])?"), new RegExp(["(?:", "(", /(?:[A-Za-z][-.+A-Za-z0-9]{0,63}:(?![A-Za-z][-.+A-Za-z0-9]{0,63}:\/\/)(?!\d+\/?)(?:\/\/)?)/.source, at(2), ")", "|", "(", "(//)?", /(?:www\.)/.source, at(6), ")", "|", "(", "(//)?", at(10) + "\\.", ut.source, "(?![-" + tt + "])", ")", ")", "(?::[0-9]+)?", "(?:" + Ue.source + ")?"].join(""), "gi")), gt = new RegExp("[" + st + "]"), mt = function(e2) {
2496
+ }, e2.hasFullProtocolRegex = /^[A-Za-z][-.+A-Za-z0-9]*:\/\//, e2.uriSchemeRegex = /^[A-Za-z][-.+A-Za-z0-9]*:/, e2.hasWordCharAfterProtocolRegex = new RegExp(":[^\\s]*?[" + st + "]"), 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;
2497
+ }(), bt = (qe = new RegExp("[/?#](?:[" + at + "\\-+&@#/%=~_()|'$*\\[\\]{}?!:,.;^✓]*[" + at + "\\-+&@#/%=~_()|'$*\\[\\]{}✓])?"), new RegExp(["(?:", "(", /(?:[A-Za-z][-.+A-Za-z0-9]{0,63}:(?![A-Za-z][-.+A-Za-z0-9]{0,63}:\/\/)(?!\d+\/?)(?:\/\/)?)/.source, lt(2), ")", "|", "(", "(//)?", /(?:www\.)/.source, lt(6), ")", "|", "(", "(//)?", lt(10) + "\\.", dt.source, "(?![-" + it + "])", ")", ")", "(?::[0-9]+)?", "(?:" + qe.source + ")?"].join(""), "gi")), wt = new RegExp("[" + at + "]"), yt = function(e2) {
2420
2498
  function t2(t3) {
2421
2499
  var s2 = e2.call(this, t3) || this;
2422
- return s2.stripPrefix = { scheme: true, www: true }, s2.stripTrailingSlash = true, s2.decodePercentEncoding = true, s2.matcherRegex = ft, s2.wordCharRegExp = gt, s2.stripPrefix = t3.stripPrefix, s2.stripTrailingSlash = t3.stripTrailingSlash, s2.decodePercentEncoding = t3.decodePercentEncoding, s2;
2500
+ return s2.stripPrefix = { scheme: true, www: true }, s2.stripTrailingSlash = true, s2.decodePercentEncoding = true, s2.matcherRegex = bt, s2.wordCharRegExp = wt, s2.stripPrefix = t3.stripPrefix, s2.stripTrailingSlash = t3.stripTrailingSlash, s2.decodePercentEncoding = t3.decodePercentEncoding, s2;
2423
2501
  }
2424
- return Oe(t2, e2), t2.prototype.parseMatches = function(e3) {
2502
+ return We(t2, e2), t2.prototype.parseMatches = function(e3) {
2425
2503
  for (var t3, s2 = this.matcherRegex, n2 = this.stripPrefix, r2 = this.stripTrailingSlash, i2 = this.decodePercentEncoding, a2 = this.tagBuilder, o2 = [], u2 = function() {
2426
- var s3 = t3[0], u3 = t3[1], l2 = t3[4], h2 = t3[5], d2 = t3[9], p2 = t3.index, f2 = h2 || d2, g2 = e3.charAt(p2 - 1);
2427
- if (!pt.isValid(s3, u3)) return "continue";
2428
- if (p2 > 0 && "@" === g2) return "continue";
2429
- if (p2 > 0 && f2 && c2.wordCharRegExp.test(g2)) return "continue";
2504
+ 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);
2505
+ if (!vt.isValid(s3, u3)) return "continue";
2506
+ if (p2 > 0 && "@" === m2) return "continue";
2507
+ if (p2 > 0 && f2 && c2.wordCharRegExp.test(m2)) return "continue";
2430
2508
  if (/\?$/.test(s3) && (s3 = s3.substr(0, s3.length - 1)), c2.matchHasUnbalancedClosingParen(s3)) s3 = s3.substr(0, s3.length - 1);
2431
2509
  else {
2432
- var m2 = c2.matchHasInvalidCharAfterTld(s3, u3);
2433
- m2 > -1 && (s3 = s3.substr(0, m2));
2510
+ var g2 = c2.matchHasInvalidCharAfterTld(s3, u3);
2511
+ g2 > -1 && (s3 = s3.substr(0, g2));
2434
2512
  }
2435
2513
  var v2 = ["http://", "https://"].find(function(e4) {
2436
2514
  return !!u3 && -1 !== u3.indexOf(e4);
@@ -2439,8 +2517,8 @@ var Ue, je = function() {
2439
2517
  var b2 = s3.indexOf(v2);
2440
2518
  s3 = s3.substr(b2), u3 = u3.substr(b2), p2 += b2;
2441
2519
  }
2442
- var y2 = u3 ? "scheme" : l2 ? "www" : "tld", w2 = !!u3;
2443
- o2.push(new Ge({ tagBuilder: a2, matchedText: s3, offset: p2, urlMatchType: y2, url: s3, protocolUrlMatch: w2, protocolRelativeMatch: !!f2, stripPrefix: n2, stripTrailingSlash: r2, decodePercentEncoding: i2 }));
2520
+ var w2 = u3 ? "scheme" : l2 ? "www" : "tld", y2 = !!u3;
2521
+ o2.push(new Ye({ tagBuilder: a2, matchedText: s3, offset: p2, urlMatchType: w2, url: s3, protocolUrlMatch: y2, protocolRelativeMatch: !!f2, stripPrefix: n2, stripTrailingSlash: r2, decodePercentEncoding: i2 }));
2444
2522
  }, c2 = this; null !== (t3 = s2.exec(e3)); ) u2();
2445
2523
  return o2;
2446
2524
  }, t2.prototype.matchHasUnbalancedClosingParen = function(e3) {
@@ -2460,65 +2538,65 @@ var Ue, je = function() {
2460
2538
  if (!e3) return -1;
2461
2539
  var s2 = 0;
2462
2540
  t3 && (s2 = e3.indexOf(":"), e3 = e3.slice(s2));
2463
- var n2 = new RegExp("^((.?//)?[-." + st + "]*[-" + st + "]\\.[-" + st + "]+)").exec(e3);
2541
+ var n2 = new RegExp("^((.?//)?[-." + at + "]*[-" + at + "]\\.[-" + at + "]+)").exec(e3);
2464
2542
  return null === n2 ? -1 : (s2 += n2[1].length, e3 = e3.slice(n2[1].length), /^[^-.A-Za-z0-9:\/?#]/.test(e3) ? s2 : -1);
2465
2543
  }, t2;
2466
- }(Le), vt = new RegExp("#[_" + st + "]{1,139}(?![_" + st + "])", "g"), bt = new RegExp("[^" + st + "]"), yt = function(e2) {
2544
+ }(Qe), At = new RegExp("#[_" + at + "]{1,139}(?![_" + at + "])", "g"), Ct = new RegExp("[^" + at + "]"), Et = function(e2) {
2467
2545
  function t2(t3) {
2468
2546
  var s2 = e2.call(this, t3) || this;
2469
- return s2.serviceName = "twitter", s2.matcherRegex = vt, s2.nonWordCharRegex = bt, s2.serviceName = t3.serviceName, s2;
2547
+ return s2.serviceName = "twitter", s2.matcherRegex = At, s2.nonWordCharRegex = Ct, s2.serviceName = t3.serviceName, s2;
2470
2548
  }
2471
- return Oe(t2, e2), t2.prototype.parseMatches = function(e3) {
2549
+ return We(t2, e2), t2.prototype.parseMatches = function(e3) {
2472
2550
  for (var t3, s2 = this.matcherRegex, n2 = this.nonWordCharRegex, r2 = this.serviceName, i2 = this.tagBuilder, a2 = []; null !== (t3 = s2.exec(e3)); ) {
2473
2551
  var o2 = t3.index, u2 = e3.charAt(o2 - 1);
2474
2552
  if (0 === o2 || n2.test(u2)) {
2475
2553
  var c2 = t3[0], l2 = t3[0].slice(1);
2476
- a2.push(new We({ tagBuilder: i2, matchedText: c2, offset: o2, serviceName: r2, hashtag: l2 }));
2554
+ a2.push(new Le({ tagBuilder: i2, matchedText: c2, offset: o2, serviceName: r2, hashtag: l2 }));
2477
2555
  }
2478
2556
  }
2479
2557
  return a2;
2480
2558
  }, t2;
2481
- }(Le), wt = 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"), At = function(e2) {
2559
+ }(Qe), kt = 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"), xt = function(e2) {
2482
2560
  function t2() {
2483
2561
  var t3 = null !== e2 && e2.apply(this, arguments) || this;
2484
- return t3.matcherRegex = wt, t3;
2562
+ return t3.matcherRegex = kt, t3;
2485
2563
  }
2486
- return Oe(t2, e2), t2.prototype.parseMatches = function(e3) {
2564
+ return We(t2, e2), t2.prototype.parseMatches = function(e3) {
2487
2565
  for (var t3, s2 = this.matcherRegex, n2 = this.tagBuilder, r2 = []; null !== (t3 = s2.exec(e3)); ) {
2488
2566
  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/);
2489
- this.testMatch(t3[3]) && this.testMatch(i2) && l2 && r2.push(new He({ tagBuilder: n2, matchedText: i2, offset: t3.index, number: a2, plusSign: o2 }));
2567
+ this.testMatch(t3[3]) && this.testMatch(i2) && l2 && r2.push(new Je({ tagBuilder: n2, matchedText: i2, offset: t3.index, number: a2, plusSign: o2 }));
2490
2568
  }
2491
2569
  return r2;
2492
2570
  }, t2.prototype.testMatch = function(e3) {
2493
- return Ye.test(e3);
2571
+ return Ke.test(e3);
2494
2572
  }, t2;
2495
- }(Le), Ct = new RegExp("@[_" + st + "]{1,50}(?![_" + st + "])", "g"), Et = new RegExp("@[_." + st + "]{1,30}(?![_" + st + "])", "g"), kt = new RegExp("@[-_." + st + "]{1,50}(?![-_" + st + "])", "g"), xt = new RegExp("[^" + st + "]"), St = function(e2) {
2573
+ }(Qe), Tt = new RegExp("@[_" + at + "]{1,50}(?![_" + at + "])", "g"), It = new RegExp("@[_." + at + "]{1,30}(?![_" + at + "])", "g"), St = new RegExp("@[-_." + at + "]{1,50}(?![-_" + at + "])", "g"), Dt = new RegExp("[^" + at + "]"), Ft = function(e2) {
2496
2574
  function t2(t3) {
2497
2575
  var s2 = e2.call(this, t3) || this;
2498
- return s2.serviceName = "twitter", s2.matcherRegexes = { twitter: Ct, instagram: Et, soundcloud: kt }, s2.nonWordCharRegex = xt, s2.serviceName = t3.serviceName, s2;
2576
+ return s2.serviceName = "twitter", s2.matcherRegexes = { twitter: Tt, instagram: It, soundcloud: St }, s2.nonWordCharRegex = Dt, s2.serviceName = t3.serviceName, s2;
2499
2577
  }
2500
- return Oe(t2, e2), t2.prototype.parseMatches = function(e3) {
2578
+ return We(t2, e2), t2.prototype.parseMatches = function(e3) {
2501
2579
  var t3, s2 = this.serviceName, n2 = this.matcherRegexes[this.serviceName], r2 = this.nonWordCharRegex, i2 = this.tagBuilder, a2 = [];
2502
2580
  if (!n2) return a2;
2503
2581
  for (; null !== (t3 = n2.exec(e3)); ) {
2504
2582
  var o2 = t3.index, u2 = e3.charAt(o2 - 1);
2505
2583
  if (0 === o2 || r2.test(u2)) {
2506
2584
  var c2 = t3[0].replace(/\.+$/g, ""), l2 = c2.slice(1);
2507
- a2.push(new qe({ tagBuilder: i2, matchedText: c2, offset: o2, serviceName: s2, mention: l2 }));
2585
+ a2.push(new ze({ tagBuilder: i2, matchedText: c2, offset: o2, serviceName: s2, mention: l2 }));
2508
2586
  }
2509
2587
  }
2510
2588
  return a2;
2511
2589
  }, t2;
2512
- }(Le);
2513
- function Tt(e2, t2) {
2514
- for (var s2, n2 = t2.onOpenTag, r2 = t2.onCloseTag, i2 = t2.onText, a2 = t2.onComment, o2 = t2.onDoctype, u2 = new Dt(), c2 = 0, l2 = e2.length, h2 = 0, d2 = 0, p2 = u2; c2 < l2; ) {
2590
+ }(Qe);
2591
+ function Mt(e2, t2) {
2592
+ for (var s2, n2 = t2.onOpenTag, r2 = t2.onCloseTag, i2 = t2.onText, a2 = t2.onComment, o2 = t2.onDoctype, u2 = new Bt(), c2 = 0, l2 = e2.length, h2 = 0, d2 = 0, p2 = u2; c2 < l2; ) {
2515
2593
  var f2 = e2.charAt(c2);
2516
2594
  switch (h2) {
2517
2595
  case 0:
2518
- g2(f2);
2596
+ m2(f2);
2519
2597
  break;
2520
2598
  case 1:
2521
- m2(f2);
2599
+ g2(f2);
2522
2600
  break;
2523
2601
  case 2:
2524
2602
  b2(f2);
@@ -2527,10 +2605,10 @@ function Tt(e2, t2) {
2527
2605
  v2(f2);
2528
2606
  break;
2529
2607
  case 4:
2530
- y2(f2);
2608
+ w2(f2);
2531
2609
  break;
2532
2610
  case 5:
2533
- w2(f2);
2611
+ y2(f2);
2534
2612
  break;
2535
2613
  case 6:
2536
2614
  A2(f2);
@@ -2548,25 +2626,25 @@ function Tt(e2, t2) {
2548
2626
  x2(f2);
2549
2627
  break;
2550
2628
  case 11:
2551
- S2(f2);
2629
+ T2(f2);
2552
2630
  break;
2553
2631
  case 12:
2554
- T2(f2);
2632
+ I2(f2);
2555
2633
  break;
2556
2634
  case 13:
2557
- D2();
2635
+ S2();
2558
2636
  break;
2559
2637
  case 14:
2560
- I2(f2);
2638
+ D2(f2);
2561
2639
  break;
2562
2640
  case 15:
2563
2641
  F2(f2);
2564
2642
  break;
2565
2643
  case 16:
2566
- B2(f2);
2644
+ M2(f2);
2567
2645
  break;
2568
2646
  case 17:
2569
- M2(f2);
2647
+ B2(f2);
2570
2648
  break;
2571
2649
  case 18:
2572
2650
  R2(f2);
@@ -2578,33 +2656,33 @@ function Tt(e2, t2) {
2578
2656
  P2(f2);
2579
2657
  break;
2580
2658
  default:
2581
- Me(h2);
2659
+ _e(h2);
2582
2660
  }
2583
2661
  c2++;
2584
2662
  }
2585
- function g2(e3) {
2663
+ function m2(e3) {
2586
2664
  "<" === e3 && O2();
2587
2665
  }
2588
- function m2(e3) {
2589
- "!" === e3 ? h2 = 13 : "/" === e3 ? (h2 = 2, p2 = new Dt(je(je({}, p2), { isClosing: true }))) : "<" === e3 ? O2() : ze.test(e3) ? (h2 = 3, p2 = new Dt(je(je({}, p2), { isOpening: true }))) : (h2 = 0, p2 = u2);
2666
+ function g2(e3) {
2667
+ "!" === e3 ? h2 = 13 : "/" === e3 ? (h2 = 2, p2 = new Bt(He(He({}, p2), { isClosing: true }))) : "<" === e3 ? O2() : Ve.test(e3) ? (h2 = 3, p2 = new Bt(He(He({}, p2), { isOpening: true }))) : (h2 = 0, p2 = u2);
2590
2668
  }
2591
2669
  function v2(e3) {
2592
- Qe.test(e3) ? (p2 = new Dt(je(je({}, p2), { name: j2() })), h2 = 4) : "<" === e3 ? O2() : "/" === e3 ? (p2 = new Dt(je(je({}, p2), { name: j2() })), h2 = 12) : ">" === e3 ? (p2 = new Dt(je(je({}, p2), { name: j2() })), U2()) : ze.test(e3) || Je.test(e3) || ":" === e3 || _2();
2670
+ Xe.test(e3) ? (p2 = new Bt(He(He({}, p2), { name: $2() })), h2 = 4) : "<" === e3 ? O2() : "/" === e3 ? (p2 = new Bt(He(He({}, p2), { name: $2() })), h2 = 12) : ">" === e3 ? (p2 = new Bt(He(He({}, p2), { name: $2() })), U2()) : Ve.test(e3) || Ze.test(e3) || ":" === e3 || _2();
2593
2671
  }
2594
2672
  function b2(e3) {
2595
- ">" === e3 ? _2() : ze.test(e3) ? h2 = 3 : _2();
2596
- }
2597
- function y2(e3) {
2598
- Qe.test(e3) || ("/" === e3 ? h2 = 12 : ">" === e3 ? U2() : "<" === e3 ? O2() : "=" === e3 || Ve.test(e3) || Ze.test(e3) ? _2() : h2 = 5);
2673
+ ">" === e3 ? _2() : Ve.test(e3) ? h2 = 3 : _2();
2599
2674
  }
2600
2675
  function w2(e3) {
2601
- Qe.test(e3) ? h2 = 6 : "/" === e3 ? h2 = 12 : "=" === e3 ? h2 = 7 : ">" === e3 ? U2() : "<" === e3 ? O2() : Ve.test(e3) && _2();
2676
+ Xe.test(e3) || ("/" === e3 ? h2 = 12 : ">" === e3 ? U2() : "<" === e3 ? O2() : "=" === e3 || et.test(e3) || tt.test(e3) ? _2() : h2 = 5);
2677
+ }
2678
+ function y2(e3) {
2679
+ Xe.test(e3) ? h2 = 6 : "/" === e3 ? h2 = 12 : "=" === e3 ? h2 = 7 : ">" === e3 ? U2() : "<" === e3 ? O2() : et.test(e3) && _2();
2602
2680
  }
2603
2681
  function A2(e3) {
2604
- Qe.test(e3) || ("/" === e3 ? h2 = 12 : "=" === e3 ? h2 = 7 : ">" === e3 ? U2() : "<" === e3 ? O2() : Ve.test(e3) ? _2() : h2 = 5);
2682
+ Xe.test(e3) || ("/" === e3 ? h2 = 12 : "=" === e3 ? h2 = 7 : ">" === e3 ? U2() : "<" === e3 ? O2() : et.test(e3) ? _2() : h2 = 5);
2605
2683
  }
2606
2684
  function C2(e3) {
2607
- Qe.test(e3) || ('"' === e3 ? h2 = 8 : "'" === e3 ? h2 = 9 : /[>=`]/.test(e3) ? _2() : "<" === e3 ? O2() : h2 = 10);
2685
+ Xe.test(e3) || ('"' === e3 ? h2 = 8 : "'" === e3 ? h2 = 9 : /[>=`]/.test(e3) ? _2() : "<" === e3 ? O2() : h2 = 10);
2608
2686
  }
2609
2687
  function E2(e3) {
2610
2688
  '"' === e3 && (h2 = 11);
@@ -2613,27 +2691,27 @@ function Tt(e2, t2) {
2613
2691
  "'" === e3 && (h2 = 11);
2614
2692
  }
2615
2693
  function x2(e3) {
2616
- Qe.test(e3) ? h2 = 4 : ">" === e3 ? U2() : "<" === e3 && O2();
2617
- }
2618
- function S2(e3) {
2619
- Qe.test(e3) ? h2 = 4 : "/" === e3 ? h2 = 12 : ">" === e3 ? U2() : "<" === e3 ? O2() : (h2 = 4, c2--);
2694
+ Xe.test(e3) ? h2 = 4 : ">" === e3 ? U2() : "<" === e3 && O2();
2620
2695
  }
2621
2696
  function T2(e3) {
2622
- ">" === e3 ? (p2 = new Dt(je(je({}, p2), { isClosing: true })), U2()) : h2 = 4;
2623
- }
2624
- function D2(t3) {
2625
- "--" === e2.substr(c2, 2) ? (c2 += 2, p2 = new Dt(je(je({}, p2), { type: "comment" })), h2 = 14) : "DOCTYPE" === e2.substr(c2, 7).toUpperCase() ? (c2 += 7, p2 = new Dt(je(je({}, p2), { type: "doctype" })), h2 = 20) : _2();
2697
+ Xe.test(e3) ? h2 = 4 : "/" === e3 ? h2 = 12 : ">" === e3 ? U2() : "<" === e3 ? O2() : (h2 = 4, c2--);
2626
2698
  }
2627
2699
  function I2(e3) {
2700
+ ">" === e3 ? (p2 = new Bt(He(He({}, p2), { isClosing: true })), U2()) : h2 = 4;
2701
+ }
2702
+ function S2(t3) {
2703
+ "--" === e2.substr(c2, 2) ? (c2 += 2, p2 = new Bt(He(He({}, p2), { type: "comment" })), h2 = 14) : "DOCTYPE" === e2.substr(c2, 7).toUpperCase() ? (c2 += 7, p2 = new Bt(He(He({}, p2), { type: "doctype" })), h2 = 20) : _2();
2704
+ }
2705
+ function D2(e3) {
2628
2706
  "-" === e3 ? h2 = 15 : ">" === e3 ? _2() : h2 = 16;
2629
2707
  }
2630
2708
  function F2(e3) {
2631
2709
  "-" === e3 ? h2 = 18 : ">" === e3 ? _2() : h2 = 16;
2632
2710
  }
2633
- function B2(e3) {
2711
+ function M2(e3) {
2634
2712
  "-" === e3 && (h2 = 17);
2635
2713
  }
2636
- function M2(e3) {
2714
+ function B2(e3) {
2637
2715
  h2 = "-" === e3 ? 18 : 16;
2638
2716
  }
2639
2717
  function R2(e3) {
@@ -2649,21 +2727,21 @@ function Tt(e2, t2) {
2649
2727
  h2 = 0, p2 = u2;
2650
2728
  }
2651
2729
  function O2() {
2652
- h2 = 1, p2 = new Dt({ idx: c2 });
2730
+ h2 = 1, p2 = new Bt({ idx: c2 });
2653
2731
  }
2654
2732
  function U2() {
2655
2733
  var t3 = e2.slice(d2, p2.idx);
2656
2734
  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)), _2(), d2 = c2 + 1;
2657
2735
  }
2658
- function j2() {
2736
+ function $2() {
2659
2737
  var t3 = p2.idx + (p2.isClosing ? 2 : 1);
2660
2738
  return e2.slice(t3, c2).toLowerCase();
2661
2739
  }
2662
2740
  d2 < c2 && (s2 = e2.slice(d2, c2), i2(s2, d2), d2 = c2 + 1);
2663
2741
  }
2664
- var Dt = function(e2) {
2742
+ var Bt = function(e2) {
2665
2743
  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;
2666
- }, It = function() {
2744
+ }, Rt = function() {
2667
2745
  function e2(t2) {
2668
2746
  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;
2669
2747
  var s2 = this.mention;
@@ -2687,7 +2765,7 @@ var Dt = function(e2) {
2687
2765
  }(e3 || {}, { length: Number.POSITIVE_INFINITY, location: "end" });
2688
2766
  }, e2.prototype.parse = function(e3) {
2689
2767
  var t2 = this, s2 = ["a", "style", "script"], n2 = 0, r2 = [];
2690
- return Tt(e3, { onOpenTag: function(e4) {
2768
+ return Mt(e3, { onOpenTag: function(e4) {
2691
2769
  s2.indexOf(e4) >= 0 && n2++;
2692
2770
  }, onText: function(e4, s3) {
2693
2771
  if (0 === n2) {
@@ -2726,19 +2804,19 @@ var Dt = function(e2) {
2726
2804
  }
2727
2805
  return e3;
2728
2806
  }, e2.prototype.removeUnwantedMatches = function(e3) {
2729
- return this.hashtag || Be(e3, function(e4) {
2807
+ return this.hashtag || Pe(e3, function(e4) {
2730
2808
  return "hashtag" === e4.getType();
2731
- }), this.email || Be(e3, function(e4) {
2809
+ }), this.email || Pe(e3, function(e4) {
2732
2810
  return "email" === e4.getType();
2733
- }), this.phone || Be(e3, function(e4) {
2811
+ }), this.phone || Pe(e3, function(e4) {
2734
2812
  return "phone" === e4.getType();
2735
- }), this.mention || Be(e3, function(e4) {
2813
+ }), this.mention || Pe(e3, function(e4) {
2736
2814
  return "mention" === e4.getType();
2737
- }), this.urls.schemeMatches || Be(e3, function(e4) {
2815
+ }), this.urls.schemeMatches || Pe(e3, function(e4) {
2738
2816
  return "url" === e4.getType() && "scheme" === e4.getUrlMatchType();
2739
- }), this.urls.wwwMatches || Be(e3, function(e4) {
2817
+ }), this.urls.wwwMatches || Pe(e3, function(e4) {
2740
2818
  return "url" === e4.getType() && "www" === e4.getUrlMatchType();
2741
- }), this.urls.tldMatches || Be(e3, function(e4) {
2819
+ }), this.urls.tldMatches || Pe(e3, function(e4) {
2742
2820
  return "url" === e4.getType() && "tld" === e4.getUrlMatchType();
2743
2821
  }), e3;
2744
2822
  }, e2.prototype.parseText = function(e3, t2) {
@@ -2758,99 +2836,99 @@ var Dt = function(e2) {
2758
2836
  return s2.push(e3.substring(n2)), s2.join("");
2759
2837
  }, e2.prototype.createMatchReturnVal = function(e3) {
2760
2838
  var t2;
2761
- return this.replaceFn && (t2 = this.replaceFn.call(this.context, e3)), "string" == typeof t2 ? t2 : false === t2 ? e3.getMatchedText() : t2 instanceof Re ? t2.toAnchorString() : e3.buildTag().toAnchorString();
2839
+ return this.replaceFn && (t2 = this.replaceFn.call(this.context, e3)), "string" == typeof t2 ? t2 : false === t2 ? e3.getMatchedText() : t2 instanceof Oe ? t2.toAnchorString() : e3.buildTag().toAnchorString();
2762
2840
  }, e2.prototype.getMatchers = function() {
2763
2841
  if (this.matchers) return this.matchers;
2764
- var e3 = this.getTagBuilder(), t2 = [new yt({ tagBuilder: e3, serviceName: this.hashtag }), new ht({ tagBuilder: e3 }), new At({ tagBuilder: e3 }), new St({ tagBuilder: e3, serviceName: this.mention }), new mt({ tagBuilder: e3, stripPrefix: this.stripPrefix, stripTrailingSlash: this.stripTrailingSlash, decodePercentEncoding: this.decodePercentEncoding })];
2842
+ var e3 = this.getTagBuilder(), t2 = [new Et({ tagBuilder: e3, serviceName: this.hashtag }), new mt({ tagBuilder: e3 }), new xt({ tagBuilder: e3 }), new Ft({ tagBuilder: e3, serviceName: this.mention }), new yt({ tagBuilder: e3, stripPrefix: this.stripPrefix, stripTrailingSlash: this.stripTrailingSlash, decodePercentEncoding: this.decodePercentEncoding })];
2765
2843
  return this.matchers = t2;
2766
2844
  }, e2.prototype.getTagBuilder = function() {
2767
2845
  var e3 = this.tagBuilder;
2768
- return e3 || (e3 = this.tagBuilder = new Ne({ newWindow: this.newWindow, truncate: this.truncate, className: this.className })), e3;
2769
- }, e2.version = "3.14.3", e2.AnchorTagBuilder = Ne, e2.HtmlTag = Re, e2.matcher = { Email: ht, Hashtag: yt, Matcher: Le, Mention: St, Phone: At, Url: mt }, e2.match = { Email: $e, Hashtag: We, Match: Pe, Mention: qe, Phone: He, Url: Ge }, e2;
2846
+ return e3 || (e3 = this.tagBuilder = new Ue({ newWindow: this.newWindow, truncate: this.truncate, className: this.className })), e3;
2847
+ }, e2.version = "3.14.3", e2.AnchorTagBuilder = Ue, e2.HtmlTag = Oe, e2.matcher = { Email: mt, Hashtag: Et, Matcher: Qe, Mention: Ft, Phone: xt, Url: yt }, e2.match = { Email: Ge, Hashtag: Le, Match: $e, Mention: ze, Phone: Je, Url: Ye }, e2;
2770
2848
  }();
2771
- function Ft(e2, t2 = e2) {
2849
+ function Nt(e2, t2 = e2) {
2772
2850
  return { type: "autolink", url: e2, text: t2 };
2773
2851
  }
2774
- const Bt = Ce(/<!!mention:([^>\s]*?)\|(.*?)>/gm, ([e2, t2, s2]) => /* @__PURE__ */ function(e3, t3) {
2852
+ const Pt = Te(/<!!mention:([^>\s]*?)\|(.*?)>/gm, ([e2, t2, s2]) => /* @__PURE__ */ function(e3, t3) {
2775
2853
  return { type: "mention", id: e3, text: t3 };
2776
- }(decodeURIComponent(t2), s2)), Mt = Ce(/<!!customemoji:(.*?)>/gm, ([e2, t2]) => /* @__PURE__ */ function(e3) {
2854
+ }(decodeURIComponent(t2), s2)), _t = Te(/<!!customemoji:(.*?)>/gm, ([e2, t2]) => /* @__PURE__ */ function(e3) {
2777
2855
  return { type: "customemoji", text: e3 };
2778
- }(t2)), Rt = Ce(/<((?:https?|mailto):.*?)\|(.*?)>/gi, ([e2, t2, s2]) => /* @__PURE__ */ function(e3, t3 = []) {
2856
+ }(t2)), Ot = Te(/<((?:https?|mailto):.*?)\|(.*?)>/gi, ([e2, t2, s2]) => /* @__PURE__ */ function(e3, t3 = []) {
2779
2857
  return { type: "link", url: e3, children: t3 };
2780
- }(t2, [s2])), Nt = Ce(/<actionlink:([^|]+)[|]([^>]*)>/gi, ([e2, t2, s2]) => {
2781
- const { action: n2, params: r2 } = _t(t2);
2858
+ }(t2, [s2])), Ut = Te(/<actionlink:([^|]+)[|]([^>]*)>/gi, ([e2, t2, s2]) => {
2859
+ const { action: n2, params: r2 } = jt(t2);
2782
2860
  return /* @__PURE__ */ function(e3, t3, s3 = []) {
2783
2861
  return { type: "actionlink", action: e3, params: t3, children: s3 };
2784
2862
  }(n2, r2, [s2]);
2785
- }), Pt = Ce(/<actionbutton:([^|]+)[|]([^>]*)>/gi, ([e2, t2, s2]) => {
2786
- const { action: n2, params: r2 } = _t(t2);
2863
+ }), $t = Te(/<actionbutton:([^|]+)[|]([^>]*)>/gi, ([e2, t2, s2]) => {
2864
+ const { action: n2, params: r2 } = jt(t2);
2787
2865
  return /* @__PURE__ */ function(e3, t3, s3 = []) {
2788
2866
  return { type: "actionbutton", action: e3, params: t3, children: s3 };
2789
2867
  }(n2, r2, [s2]);
2790
2868
  });
2791
- function _t(e2) {
2869
+ function jt(e2) {
2792
2870
  const t2 = e2.indexOf("?");
2793
2871
  if (-1 === t2) return { action: e2, params: {} };
2794
2872
  return { action: e2.slice(0, t2), params: Object.fromEntries(new URLSearchParams(e2.slice(t2))) };
2795
2873
  }
2796
- const Ot = Ce(/(?:^|\n)(?:\s*[-*+]\s+[^\n]+(?:\n|$))+/g, ([e2]) => /* @__PURE__ */ function(e3 = []) {
2874
+ const Wt = Te(/(?:^|\n)(?:\s*[-*+]\s+[^\n]+(?:\n|$))+/g, ([e2]) => /* @__PURE__ */ function(e3 = []) {
2797
2875
  return { type: "bulletlist", children: e3 };
2798
- }([e2.startsWith("\n") ? e2.slice(1) : e2])), Ut = Ce(/^\s*[-*+]\s+([^\n]+)(?:\n|$)/gm, ([e2, t2]) => ({ type: "bulletpoint", children: [t2] })), jt = (e2) => {
2876
+ }([e2.startsWith("\n") ? e2.slice(1) : e2])), qt = Te(/^\s*[-*+]\s+([^\n]+)(?:\n|$)/gm, ([e2, t2]) => ({ type: "bulletpoint", children: [t2] })), Ht = (e2) => {
2799
2877
  const t2 = /(?:^|[^-:/\w])([(+]?[0-9](?:[-_+ ().]?[0-9]){5,11}[0-9])(?:[^-:/\w]|$)/g;
2800
2878
  let s2 = 0;
2801
2879
  const n2 = [];
2802
2880
  for (const r2 of J(e2, t2)) {
2803
2881
  const t3 = r2[0], i2 = r2[1], a2 = t3.startsWith(i2) ? r2.index : r2.index + 1;
2804
2882
  a2 - s2 > 0 && n2.push(e2.substring(s2, a2));
2805
- const o2 = Ft("tel:" + i2.replace(/[^0-9+]/g, ""), i2);
2883
+ const o2 = Nt("tel:" + i2.replace(/[^0-9+]/g, ""), i2);
2806
2884
  n2.push(o2), s2 = a2 + i2.length;
2807
2885
  }
2808
2886
  return s2 < e2.length && n2.push(e2.substring(s2)), n2;
2809
- }, $t = (e2) => Rt(e2).flatMap((e3) => "string" == typeof e3 ? Wt(e3) : ["<", ...Wt(e3.url), ...Wt("|" + e3.children[0] + ">")]), Wt = (e2) => {
2810
- const t2 = It.parse(e2, { urls: true, email: true, phone: false, hashtag: false, mention: false }), s2 = [];
2887
+ }, Gt = (e2) => Ot(e2).flatMap((e3) => "string" == typeof e3 ? Lt(e3) : ["<", ...Lt(e3.url), ...Lt("|" + e3.children[0] + ">")]), Lt = (e2) => {
2888
+ const t2 = Rt.parse(e2, { urls: true, email: true, phone: false, hashtag: false, mention: false }), s2 = [];
2811
2889
  let n2 = 0;
2812
2890
  for (const r2 of t2) {
2813
2891
  const t3 = r2.getOffset(), i2 = r2.getMatchedText(), a2 = i2.length;
2814
2892
  let o2 = i2;
2815
- r2 instanceof $e ? o2 = "mailto:" + r2.getEmail() : r2 instanceof Ge && (o2 = r2.getUrl()), t3 > n2 && s2.push(e2.substring(n2, t3)), s2.push(Ft(o2, i2)), n2 = t3 + a2;
2893
+ r2 instanceof Ge ? o2 = "mailto:" + r2.getEmail() : r2 instanceof Ye && (o2 = r2.getUrl()), t3 > n2 && s2.push(e2.substring(n2, t3)), s2.push(Nt(o2, i2)), n2 = t3 + a2;
2816
2894
  }
2817
2895
  return n2 < e2.length && s2.push(e2.substring(n2)), s2;
2818
- }, qt = ["Codeblock", "Codespan", "FormattedLink", "Wikitext", "Autolink", "Actions", "Mention", "Mention", "BulletPoint", "CustomEmoji"];
2819
- function Ht(e2 = { except: [] }) {
2896
+ }, zt = ["Codeblock", "Codespan", "FormattedLink", "Wikitext", "Autolink", "Actions", "Mention", "Mention", "BulletPoint", "CustomEmoji"];
2897
+ function Jt(e2 = { except: [] }) {
2820
2898
  var _a2;
2821
- const t2 = { multilineSteps: [], singlelineSteps: [] }, s2 = (_a2 = e2.except) != null ? _a2 : qt.filter((t3) => !e2.only.includes(t3));
2822
- return s2.includes("BulletPoint") || t2.multilineSteps.push(Ot, Ut), s2.includes("Mention") || t2.singlelineSteps.push(Bt), s2.includes("CustomEmoji") || t2.singlelineSteps.push(Mt), s2.includes("Codespan") || t2.multilineSteps.push(Ce(/```([^]+?)```/g, ([e3, t3]) => ({ type: "codespan", text: t3 }))), s2.includes("FormattedLink") || t2.singlelineSteps.push(Rt), s2.includes("Actions") || (t2.singlelineSteps.push(Nt), t2.singlelineSteps.push(Pt)), s2.includes("Wikitext") || t2.singlelineSteps.push(Te), s2.includes("Autolink") || t2.singlelineSteps.push($t, jt), t2;
2899
+ const t2 = { multilineSteps: [], singlelineSteps: [] }, s2 = (_a2 = e2.except) != null ? _a2 : zt.filter((t3) => !e2.only.includes(t3));
2900
+ return s2.includes("BulletPoint") || t2.multilineSteps.push(Wt, qt), s2.includes("Mention") || t2.singlelineSteps.push(Pt), s2.includes("CustomEmoji") || t2.singlelineSteps.push(_t), s2.includes("Codespan") || t2.multilineSteps.push(Te(/```([^]+?)```/g, ([e3, t3]) => ({ type: "codespan", text: t3 }))), s2.includes("FormattedLink") || t2.singlelineSteps.push(Ot), s2.includes("Actions") || (t2.singlelineSteps.push(Ut), t2.singlelineSteps.push($t)), s2.includes("Wikitext") || t2.singlelineSteps.push(Me), s2.includes("Autolink") || t2.singlelineSteps.push(Gt, Ht), t2;
2823
2901
  }
2824
- const Gt = function(e2) {
2902
+ const Yt = function(e2) {
2825
2903
  const t2 = RegExp(`[^${e2}]+${e2}?|${e2}`, "g");
2826
2904
  return (e3) => Array.from(e3.match(t2) || []);
2827
2905
  }("\n");
2828
- function Lt(e2, t2 = { except: [] }) {
2906
+ function Qt(e2, t2 = { except: [] }) {
2829
2907
  let s2 = function(e3, t3) {
2830
2908
  let s3 = [e3];
2831
- return s3 = zt(s3, t3.multilineSteps), s3 = zt(s3, [Gt]), s3 = zt(s3, t3.singlelineSteps), s3 = Jt(s3), s3;
2832
- }(e2, Ht(t2));
2833
- return s2 = Yt(s2, false), s2;
2909
+ return s3 = Vt(s3, t3.multilineSteps), s3 = Vt(s3, [Yt]), s3 = Vt(s3, t3.singlelineSteps), s3 = Zt(s3), s3;
2910
+ }(e2, Jt(t2));
2911
+ return s2 = Kt(s2, false), s2;
2834
2912
  }
2835
- function zt(e2, t2) {
2836
- return t2.reduce((e3, t3) => Ae(e3, t3), e2);
2913
+ function Vt(e2, t2) {
2914
+ return t2.reduce((e3, t3) => xe(e3, t3), e2);
2837
2915
  }
2838
- function Jt(e2) {
2916
+ function Zt(e2) {
2839
2917
  const t2 = [];
2840
2918
  let s2 = -1;
2841
- 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: Jt(n2.children) }) : n2;
2919
+ 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: Zt(n2.children) }) : n2;
2842
2920
  return t2;
2843
2921
  }
2844
- function Yt(e2, t2) {
2922
+ function Kt(e2, t2) {
2845
2923
  const s2 = [];
2846
2924
  let n2 = [];
2847
2925
  for (let r2 = 0; r2 < e2.length; r2++) {
2848
2926
  const i2 = e2[r2];
2849
- "string" == typeof i2 ? n2.push(i2) : "children" in i2 ? (n2.length > 0 && (s2.push(n2.join("")), n2 = []), i2.children = Yt(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));
2927
+ "string" == typeof i2 ? n2.push(i2) : "children" in i2 ? (n2.length > 0 && (s2.push(n2.join("")), n2 = []), i2.children = Kt(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));
2850
2928
  }
2851
2929
  return n2.length > 0 && (s2.push(n2.join("")), n2 = []), s2;
2852
2930
  }
2853
- class Qt {
2931
+ class Xt {
2854
2932
  constructor(e2, t2, s2) {
2855
2933
  this.id = e2, this.conversationId = t2, this._realtimeClient = s2;
2856
2934
  }
@@ -2866,12 +2944,12 @@ class Qt {
2866
2944
  if (!t2.ok && "server" === t2.where && 404 === t2.value.status) return null;
2867
2945
  if (!t2.ok && "server" === t2.where && 403 === t2.value.status && "NOT_A_PARTICIPANT" === t2.value.errorCode) return null;
2868
2946
  const s2 = e("Get message " + this.id, t2), n2 = yield this._realtimeClient.createMessageSnapshot(s2, this.brandedConversationId);
2869
- return ve("Get message " + this.id, n2);
2947
+ return Ae("Get message " + this.id, n2);
2870
2948
  });
2871
2949
  }
2872
2950
  edit(t2) {
2873
2951
  return __async(this, null, function* () {
2874
- const s2 = { content: Vt(t2), custom: "string" == typeof t2 ? void 0 : t2.custom }, n2 = yield this._realtimeClient.call("PATCH", ["conversations", this.brandedConversationId, "messages", this.brandedId], s2);
2952
+ const s2 = { content: es(t2), custom: "string" == typeof t2 ? void 0 : t2.custom }, n2 = yield this._realtimeClient.call("PATCH", ["conversations", this.brandedConversationId, "messages", this.brandedId], s2);
2875
2953
  e(`Edit message ${this.id} in conversation ${this.conversationId}`, n2);
2876
2954
  });
2877
2955
  }
@@ -2882,16 +2960,16 @@ class Qt {
2882
2960
  });
2883
2961
  }
2884
2962
  }
2885
- function Vt(e2) {
2963
+ function es(e2) {
2886
2964
  if ("string" == typeof e2) {
2887
- return [{ type: "text", children: Lt(e2) }];
2965
+ return [{ type: "text", children: Qt(e2) }];
2888
2966
  }
2889
2967
  if ("text" in e2 && e2.text) {
2890
- return [{ type: "text", children: Lt(e2.text) }];
2968
+ return [{ type: "text", children: Qt(e2.text) }];
2891
2969
  }
2892
2970
  if ("content" in e2 && e2.content) return e2.content;
2893
2971
  }
2894
- class Zt {
2972
+ class ts {
2895
2973
  constructor(e2, t2) {
2896
2974
  this.id = e2, this._realtimeClient = t2, this.uselessObjForTypeCheck = { subject: null, photoUrl: null, welcomeMessages: null, custom: null, access: null, notify: null };
2897
2975
  }
@@ -2902,16 +2980,16 @@ class Zt {
2902
2980
  return this._realtimeClient.userId;
2903
2981
  }
2904
2982
  participant(e2) {
2905
- return new ye("string" == typeof e2 ? e2 : e2.id, this.id, this._realtimeClient);
2983
+ return new Ee("string" == typeof e2 ? e2 : e2.id, this.id, this._realtimeClient);
2906
2984
  }
2907
2985
  message(e2) {
2908
- return new Qt(e2, this.brandedId, this._realtimeClient);
2986
+ return new Xt(e2, this.brandedId, this._realtimeClient);
2909
2987
  }
2910
2988
  get() {
2911
2989
  return __async(this, null, function* () {
2912
2990
  const t2 = this._realtimeClient.listMessages(this.brandedId, { limit: 1 }), s2 = yield this._realtimeClient.call("GET", ["me", "conversations", this.brandedId], {});
2913
2991
  if (!s2.ok && "server" === s2.where && 404 === s2.value.status) return null;
2914
- const n2 = e("Get conversation " + this.id, s2), r2 = ve("Get last message in conversation " + this.id, yield t2), i2 = 0 === r2.length ? null : r2[0];
2992
+ const n2 = e("Get conversation " + this.id, s2), r2 = Ae("Get last message in conversation " + this.id, yield t2), i2 = 0 === r2.length ? null : r2[0];
2915
2993
  return this._realtimeClient.createConversationSnapshotPreloaded(n2, i2);
2916
2994
  });
2917
2995
  }
@@ -2954,13 +3032,16 @@ class Zt {
2954
3032
  }
2955
3033
  send(t2) {
2956
3034
  return __async(this, null, function* () {
2957
- const s2 = { content: Kt(t2), referencedMessageId: Xt(t2), custom: "string" == typeof t2 ? void 0 : t2.custom, idempotencyKey: we((/* @__PURE__ */ new Date()).getTime()) }, n2 = yield this._realtimeClient.call("POST", ["conversations", this.brandedId, "messages"], s2), r2 = e("Send message to conversation " + this.id, n2);
2958
- return new Qt(r2.id, this.brandedId, this._realtimeClient);
3035
+ const s2 = { content: ss(t2), referencedMessageId: ns(t2), custom: "string" == typeof t2 ? void 0 : t2.custom, idempotencyKey: ke((/* @__PURE__ */ new Date()).getTime()) }, n2 = yield this._realtimeClient.call("POST", ["conversations", this.brandedId, "messages"], s2), r2 = e("Send message to conversation " + this.id, n2);
3036
+ return new Xt(r2.id, this.brandedId, this._realtimeClient);
2959
3037
  });
2960
3038
  }
2961
3039
  subscribeMessages(e2) {
2962
3040
  return this._realtimeClient.subscribe(["me", "conversations", this.brandedId, "messages"], e2);
2963
3041
  }
3042
+ subscribeParticipants(e2) {
3043
+ return this._realtimeClient.subscribe(["me", "conversations", this.brandedId, "participants"], e2);
3044
+ }
2964
3045
  subscribe(e2) {
2965
3046
  return this._realtimeClient.subscribe(["me", "conversations", this.brandedId], e2);
2966
3047
  }
@@ -2974,21 +3055,21 @@ class Zt {
2974
3055
  });
2975
3056
  }
2976
3057
  }
2977
- function Kt(e2) {
3058
+ function ss(e2) {
2978
3059
  if ("string" == typeof e2) {
2979
- return [{ type: "text", children: Lt(e2) }];
3060
+ return [{ type: "text", children: Qt(e2) }];
2980
3061
  }
2981
3062
  if ("text" in e2) {
2982
- return [{ type: "text", children: Lt(e2.text) }];
3063
+ return [{ type: "text", children: Qt(e2.text) }];
2983
3064
  }
2984
3065
  return e2.content;
2985
3066
  }
2986
- function Xt(e2) {
3067
+ function ns(e2) {
2987
3068
  if ("string" == typeof e2) return;
2988
3069
  const t2 = e2.referencedMessage;
2989
3070
  return void 0 !== t2 ? "string" == typeof t2 ? t2 : t2.id : void 0;
2990
3071
  }
2991
- class es {
3072
+ class rs {
2992
3073
  constructor(e2, t2, s2) {
2993
3074
  this.realtimeWsApiUrl = e2, this.internalHttpApiUrl = t2, this.restApiHttpUrl = s2;
2994
3075
  }
@@ -3000,10 +3081,10 @@ class es {
3000
3081
  return this.realtimeWsApiUrl + `/${e2}/realtime/${i2}?talkjs-client-build=${r2 != null ? r2 : "standalone"}&talkjs-core=${s2}&talkjs-client-id=${n2}`;
3001
3082
  }
3002
3083
  }
3003
- function ts({ method: e2, url: t2, data: s2, options: n2, attempts: r2, shouldRetry: i2, authProvider: o2 }) {
3084
+ function is({ method: e2, url: t2, data: s2, options: n2, attempts: r2, shouldRetry: i2, authProvider: o2 }) {
3004
3085
  var _a2;
3005
3086
  (!r2 || r2 <= 0) && (r2 = 1);
3006
- const u2 = { "x-talkjs-client-build": "jssdk-dev", "x-talkjs-client-date": "2025-06-03T07:34:52.410Z" };
3087
+ const u2 = { "x-talkjs-client-build": "jssdk-dev", "x-talkjs-client-date": "2025-06-11T10:14:55.116Z" };
3007
3088
  s2 instanceof FormData || (u2["Content-Type"] = (_a2 = n2 == null ? void 0 : n2.contentType) != null ? _a2 : "application/json");
3008
3089
  return a(r2, () => __async(this, null, function* () {
3009
3090
  if (o2) {
@@ -3015,19 +3096,19 @@ function ts({ method: e2, url: t2, data: s2, options: n2, attempts: r2, shouldRe
3015
3096
  throw e3;
3016
3097
  });
3017
3098
  }), { initialDelay: 0.2, log: void 0, shouldRetry: (s3) => __async(this, null, function* () {
3018
- return o2 && 401 === s3.status ? (cs.log(`401 error from ${e2} ${t2}, ${yield o2.getToken()}`), o2.refreshToken(), true) : i2 ? i2(s3) : !("status" in s3 && s3.status >= 400 && s3.status < 500);
3099
+ return o2 && 401 === s3.status ? (ps.log(`401 error from ${e2} ${t2}, ${yield o2.getToken()}`), o2.refreshToken(), true) : i2 ? i2(s3) : !("status" in s3 && s3.status >= 400 && s3.status < 500);
3019
3100
  }) }).catch((s3) => {
3020
3101
  if (Math.random() < 0.1 && !t2.toString().startsWith("https://capture.trackjs.com")) {
3021
3102
  const n3 = `Network Error for ${e2} ${t2}`;
3022
3103
  if ("undefined" != typeof window) if (s3 instanceof Response) {
3023
- s3.clone().text().then((e3) => cs.log(`${n3} ${s3.status} ${e3} (10% logged)`));
3024
- } else cs.log(`${n3} ${s3} (10% logged)`);
3104
+ s3.clone().text().then((e3) => ps.log(`${n3} ${s3.status} ${e3} (10% logged)`));
3105
+ } else ps.log(`${n3} ${s3} (10% logged)`);
3025
3106
  console.error("[TalkJS]", n3);
3026
3107
  }
3027
3108
  throw s3;
3028
3109
  });
3029
3110
  }
3030
- const { cdnHost: ss, appHost: ns, restHost: rs, realtimeHost: is, appProtocol: as, appWsProtocol: os } = function() {
3111
+ const { cdnHost: as, appHost: os, restHost: us, realtimeHost: cs, appProtocol: ls, appWsProtocol: hs } = function() {
3031
3112
  if ("undefined" == typeof window) return { cdnHost: "test-hostname", appHost: "test-hostname", appProtocol: "http:", appWsProtocol: "ws:" };
3032
3113
  const e2 = function() {
3033
3114
  if (document.currentScript) return document.currentScript.src;
@@ -3052,11 +3133,11 @@ const { cdnHost: ss, appHost: ns, restHost: rs, realtimeHost: is, appProtocol: a
3052
3133
  }(n2), a2 = t2.protocol;
3053
3134
  return { cdnHost: s2, appHost: n2, restHost: r2, realtimeHost: i2, appProtocol: a2, appWsProtocol: "https:" === a2 ? "wss:" : "ws:" };
3054
3135
  }();
3055
- const us = ns.startsWith("app.talkjs.com");
3056
- const cs = "undefined" == typeof window ? { log: (e2) => Promise.resolve(), setData: (e2) => {
3136
+ const ds = os.startsWith("app.talkjs.com");
3137
+ const ps = "undefined" == typeof window ? { log: (e2) => Promise.resolve(), setData: (e2) => {
3057
3138
  } } : new class {
3058
3139
  constructor(e2) {
3059
- this._timeCreated = Date.now(), this._enabled = us, this._trackJSData = { customer: { application: "", correlationId: "", sessionId: "", token: "", userId: "", version: "dev-2025-06-03T07:34:52.410Z" }, 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-06-03T07:34:52.410Z", throttled: 0 }, this._url = `https://capture.trackjs.com/capture?token=${e2}`, this._trackJSData.customer.token = e2;
3140
+ this._timeCreated = Date.now(), this._enabled = ds, this._trackJSData = { customer: { application: "", correlationId: "", sessionId: "", token: "", userId: "", version: "dev-2025-06-11T10:14:55.116Z" }, 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-06-11T10:14:55.116Z", throttled: 0 }, this._url = `https://capture.trackjs.com/capture?token=${e2}`, this._trackJSData.customer.token = e2;
3060
3141
  }
3061
3142
  setData({ appId: e2, meId: t2, sessionId: s2 }) {
3062
3143
  this._trackJSData.customer.userId = e2, this._trackJSData.customer.sessionId = `${e2}/${t2}`, this._trackJSData.customer.correlationId = s2;
@@ -3066,14 +3147,14 @@ const cs = "undefined" == typeof window ? { log: (e2) => Promise.resolve(), setD
3066
3147
  try {
3067
3148
  if (!this._enabled) return Promise.resolve();
3068
3149
  const t2 = __spreadProps(__spreadValues({}, this._trackJSData), { message: e2 });
3069
- yield ts({ method: "POST", url: this._url, data: JSON.stringify(t2), options: { contentType: "text/plain" } });
3150
+ yield is({ method: "POST", url: this._url, data: JSON.stringify(t2), options: { contentType: "text/plain" } });
3070
3151
  } catch (e3) {
3071
3152
  console.error("[TalkJS] Failed when sending an error report. Error: ", e3);
3072
3153
  }
3073
3154
  });
3074
3155
  }
3075
3156
  }("970cd0be0fb74630b75c8451051299dc");
3076
- class ls {
3157
+ class fs {
3077
3158
  constructor(e2, t2 = {}) {
3078
3159
  this._onSubscription = t2, this._handlers = {};
3079
3160
  for (const t3 in e2) Object.hasOwnProperty.call(e2, t3) && (this._handlers[t3] = []);
@@ -3118,9 +3199,9 @@ class ls {
3118
3199
  return this.on(e2, t2), { unsubscribe: () => this.off(e2, t2) };
3119
3200
  }
3120
3201
  }
3121
- class hs {
3202
+ class ms {
3122
3203
  constructor(e2, t2, s2, n2, r2, i2) {
3123
- if (this.appId = t2, this.userId = s2, this.tokenFetcher = r2, this.usingBokens = false, this.requestInProgress = false, this.eventEmitter = new ls({ tokenChanged(e3) {
3204
+ if (this.appId = t2, this.userId = s2, this.tokenFetcher = r2, this.usingBokens = false, this.requestInProgress = false, this.eventEmitter = new fs({ tokenChanged(e3) {
3124
3205
  }, tokenRefreshFailed(e3) {
3125
3206
  }, tokenAccepted(e3) {
3126
3207
  } }), 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.");
@@ -3212,7 +3293,7 @@ class hs {
3212
3293
  const e3 = function(e4) {
3213
3294
  const t3 = e4.split(".");
3214
3295
  if (3 !== t3.length) throw "Token does not contain exactly two `.`. Check that you generated your JWT correctly. It should be `<header>.<payload>.<signature>`.";
3215
- return { header: ds(t3[0]), payload: ds(t3[1]) };
3296
+ return { header: gs(t3[0]), payload: gs(t3[1]) };
3216
3297
  }(s2);
3217
3298
  n2 = e3.header, r2 = e3.payload;
3218
3299
  } catch (e3) {
@@ -3226,7 +3307,7 @@ class hs {
3226
3307
  const e3 = this.checkJwtPayload(r2);
3227
3308
  t2.push(...e3);
3228
3309
  }
3229
- if (t2.length) if (this.usingBokens) cs.log(`JWT Errors detected by AuthProvider when using bokens: ${t2.join("\n")}`);
3310
+ if (t2.length) if (this.usingBokens) ps.log(`JWT Errors detected by AuthProvider when using bokens: ${t2.join("\n")}`);
3230
3311
  else {
3231
3312
  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.");
3232
3313
  const s3 = t2.length > 1;
@@ -3255,7 +3336,7 @@ class hs {
3255
3336
  sendBokenRequest(e2, t2) {
3256
3337
  return __async(this, null, function* () {
3257
3338
  let s2 = 0;
3258
- const n2 = e2.getBokensUrl(this.appId, this.userId, t2), r2 = yield ts({ method: "GET", url: n2, attempts: 1e4, shouldRetry: (e3) => {
3339
+ const n2 = e2.getBokensUrl(this.appId, this.userId, t2), r2 = yield is({ method: "GET", url: n2, attempts: 1e4, shouldRetry: (e3) => {
3259
3340
  if (e3 instanceof Error) return true;
3260
3341
  if (401 === e3.status) throw "Check that you provided a valid signature.";
3261
3342
  if (404 === e3.status) throw "Check that you specified the correct App ID.";
@@ -3268,7 +3349,7 @@ class hs {
3268
3349
  });
3269
3350
  }
3270
3351
  }
3271
- function ds(e2) {
3352
+ function gs(e2) {
3272
3353
  try {
3273
3354
  const t2 = e2.replace(/-/g, "+").replace(/_/g, "/"), s2 = decodeURIComponent(atob(t2).split("").map((e3) => "%" + ("00" + e3.charCodeAt(0).toString(16)).slice(-2)).join(""));
3274
3355
  return JSON.parse(s2);
@@ -3276,8 +3357,8 @@ function ds(e2) {
3276
3357
  throw `Could not base64-decode and JSON-parse token section: ${e2}. Check that you base-64 encoded the section correctly.`;
3277
3358
  }
3278
3359
  }
3279
- const ps = new es("wss://realtime.talkjs.com/v1", "https://app.talkjs.com/api/v0", "https://api.talkjs.com/v1");
3280
- class fs {
3360
+ const vs = new rs("wss://realtime.talkjs.com/v1", "https://app.talkjs.com/api/v0", "https://api.talkjs.com/v1");
3361
+ class bs {
3281
3362
  constructor(e2) {
3282
3363
  this.target = e2;
3283
3364
  }
@@ -3285,7 +3366,7 @@ class fs {
3285
3366
  return this.target;
3286
3367
  }
3287
3368
  }
3288
- const gs = new class {
3369
+ const ws = new class {
3289
3370
  constructor() {
3290
3371
  this.registry = {};
3291
3372
  }
@@ -3293,7 +3374,7 @@ const gs = new class {
3293
3374
  var _a2;
3294
3375
  const t2 = this.key(e2), s2 = (_a2 = this.registry[t2]) == null ? void 0 : _a2.deref();
3295
3376
  if (s2) return s2;
3296
- const n2 = new vs(e2), r2 = globalThis.WeakRef ? new WeakRef(n2) : new fs(n2);
3377
+ const n2 = new As(e2), r2 = globalThis.WeakRef ? new WeakRef(n2) : new bs(n2);
3297
3378
  return this.registry[t2] = r2, n2;
3298
3379
  }
3299
3380
  deregister(e2, t2) {
@@ -3304,10 +3385,10 @@ const gs = new class {
3304
3385
  return `${e2}:${t2}`;
3305
3386
  }
3306
3387
  }();
3307
- function ms(e2) {
3308
- return e2.forceCreateNew ? new vs(e2) : gs.getOrCreate(e2);
3388
+ function ys(e2) {
3389
+ return e2.forceCreateNew ? new As(e2) : ws.getOrCreate(e2);
3309
3390
  }
3310
- class vs {
3391
+ class As {
3311
3392
  constructor(e2) {
3312
3393
  !function(e3) {
3313
3394
  function t3(e4, t4) {
@@ -3317,13 +3398,13 @@ class vs {
3317
3398
  void 0 !== e3.tokenFetcher && t3("function" == typeof e3.tokenFetcher, "The `tokenFetcher` property of TalkSession#constructor must be a function.");
3318
3399
  }(e2);
3319
3400
  const { appId: t2, userId: s2, token: n2, tokenFetcher: r2, signature: i2 } = e2;
3320
- this._appId = t2, this._apiUrls = e2.apiUrls ? new es(e2.apiUrls.realtimeWsApiUrl, e2.apiUrls.internalHttpApiUrl, e2.apiUrls.restApiHttpUrl) : ps, this._authProvider = new hs(this._apiUrls, t2, s2, n2, r2, i2);
3401
+ this._appId = t2, this._apiUrls = e2.apiUrls ? new rs(e2.apiUrls.realtimeWsApiUrl, e2.apiUrls.internalHttpApiUrl, e2.apiUrls.restApiHttpUrl) : vs, this._authProvider = new ms(this._apiUrls, t2, s2, n2, r2, i2);
3321
3402
  const a2 = Math.random().toString().split(".")[1];
3322
- this._realtimeClient = new ge(this._apiUrls.getRealtimeWsUrl(t2, s2, "1.1.1", a2, e2.clientBuild), s2, this._authProvider), this.currentUser = new be(this._realtimeClient.userId, this._realtimeClient), this._terminationReason = o(), this._terminationReason.promise.then((e3) => {
3403
+ this._realtimeClient = new we(this._apiUrls.getRealtimeWsUrl(t2, s2, "1.1.1", a2, e2.clientBuild), s2, this._authProvider), this.currentUser = new Ce(this._realtimeClient.userId, this._realtimeClient), this._terminationReason = o(), this._terminationReason.promise.then((e3) => {
3323
3404
  console.error(`[TalkSession] ${e3}`);
3324
3405
  }), function(e3, t3, s3) {
3325
3406
  return __async(this, null, function* () {
3326
- return ts({ 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) => {
3407
+ return is({ 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) => {
3327
3408
  if ("string" != typeof e4 && "status" in e4) {
3328
3409
  const t4 = e4;
3329
3410
  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);
@@ -3344,37 +3425,37 @@ class vs {
3344
3425
  }), { unsubscribe: () => t2.resolve("UNSUBSCRIBED") };
3345
3426
  }
3346
3427
  user(e2) {
3347
- return new be(e2, this._realtimeClient);
3428
+ return new Ce(e2, this._realtimeClient);
3348
3429
  }
3349
3430
  conversation(e2) {
3350
- return new Zt(e2, this._realtimeClient);
3431
+ return new ts(e2, this._realtimeClient);
3351
3432
  }
3352
3433
  terminate(e2) {
3353
- gs.deregister(this._appId, this.currentUser.id), this._terminationReason.resolve(e2), this._realtimeClient.destroy();
3434
+ ws.deregister(this._appId, this.currentUser.id), this._terminationReason.resolve(e2), this._realtimeClient.destroy();
3354
3435
  }
3355
3436
  _isConnected() {
3356
3437
  return this._realtimeClient.isConnected();
3357
3438
  }
3358
3439
  uploadFile(e2, t2) {
3359
- return bs(`${this._apiUrls.restApiHttpUrl}/${this._appId}/files`, this._authProvider, e2, t2);
3440
+ return Cs(`${this._apiUrls.restApiHttpUrl}/${this._appId}/files`, this._authProvider, e2, t2);
3360
3441
  }
3361
3442
  uploadImage(e2, t2) {
3362
- return bs(`${this._apiUrls.restApiHttpUrl}/${this._appId}/files`, this._authProvider, e2, __spreadValues({ subtype: "image" }, t2));
3443
+ return Cs(`${this._apiUrls.restApiHttpUrl}/${this._appId}/files`, this._authProvider, e2, __spreadValues({ subtype: "image" }, t2));
3363
3444
  }
3364
3445
  uploadVideo(e2, t2) {
3365
- return bs(`${this._apiUrls.restApiHttpUrl}/${this._appId}/files`, this._authProvider, e2, __spreadValues({ subtype: "video" }, t2));
3446
+ return Cs(`${this._apiUrls.restApiHttpUrl}/${this._appId}/files`, this._authProvider, e2, __spreadValues({ subtype: "video" }, t2));
3366
3447
  }
3367
3448
  uploadAudio(e2, t2) {
3368
- return bs(`${this._apiUrls.restApiHttpUrl}/${this._appId}/files`, this._authProvider, e2, __spreadValues({ subtype: "audio" }, t2));
3449
+ return Cs(`${this._apiUrls.restApiHttpUrl}/${this._appId}/files`, this._authProvider, e2, __spreadValues({ subtype: "audio" }, t2));
3369
3450
  }
3370
3451
  uploadVoice(e2, t2) {
3371
- return bs(`${this._apiUrls.restApiHttpUrl}/${this._appId}/files`, this._authProvider, e2, __spreadValues({ subtype: "voice" }, t2));
3452
+ return Cs(`${this._apiUrls.restApiHttpUrl}/${this._appId}/files`, this._authProvider, e2, __spreadValues({ subtype: "voice" }, t2));
3372
3453
  }
3373
3454
  }
3374
- function bs(_0, _1, _2, _3) {
3455
+ function Cs(_0, _1, _2, _3) {
3375
3456
  return __async(this, arguments, function* (e2, t2, s2, { subtype: n2, filename: r2, width: i2, height: a2, duration: o2 }) {
3376
3457
  const u2 = new FormData();
3377
- 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()), ts({ method: "POST", url: e2, data: u2, authProvider: t2 }).then((e3) => e3.json()).then((e3) => e3.attachmentToken).catch((e3) => __async(this, null, function* () {
3458
+ 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()), is({ method: "POST", url: e2, data: u2, authProvider: t2 }).then((e3) => e3.json()).then((e3) => e3.attachmentToken).catch((e3) => __async(this, null, function* () {
3378
3459
  if (e3 instanceof Response) {
3379
3460
  const t3 = yield e3.json(), s3 = `Unexpected response when uploading file, status code ${e3.status} ${t3.errorCode}, ${t3.reasons}`;
3380
3461
  throw new Error(s3);
@@ -3384,7 +3465,7 @@ function bs(_0, _1, _2, _3) {
3384
3465
  });
3385
3466
  }
3386
3467
  export {
3387
- ms as getTalkSession,
3468
+ ys as getTalkSession,
3388
3469
  f as registerPolyfills
3389
3470
  };
3390
3471
  //# sourceMappingURL=talkSession.js.map