-
Notifications
You must be signed in to change notification settings - Fork 6
Expand file tree
/
Copy pathindex.html
More file actions
2666 lines (2512 loc) · 180 KB
/
Copy pathindex.html
File metadata and controls
2666 lines (2512 loc) · 180 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<!-- Fallback CSP -->
<meta http-equiv="Content-Security-Policy"
content="default-src 'self'; script-src 'self'; style-src 'self'; img-src 'self' data: blob: https:; media-src 'self' blob: https:; font-src 'self' data: https:; connect-src 'self' https: wss: ws:; worker-src 'self' blob:; child-src 'self' blob:; object-src 'none'; base-uri 'self'; form-action 'self'; manifest-src 'self' data:">
<meta name="viewport"
content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no, viewport-fit=cover, interactive-widget=resizes-content">
<title>Nymchat — open the app</title>
<meta name="description" content="Open the Nymchat client: pseudonymous, end-to-end encrypted chat over Nostr, with no account and no registration. Runs in the browser.">
<link rel="manifest"
href="data:application/json;base64,eyJuYW1lIjoiTnltY2hhdCIsInNob3J0X25hbWUiOiJOeW1jaGF0Iiwic3RhcnRfdXJsIjoiaHR0cHM6Ly93ZWIubnltY2hhdC5hcHAiLCJkaXNwbGF5Ijoic3RhbmRhbG9uZSIsInRoZW1lX2NvbG9yIjoiIzAwMDAwMCIsImJhY2tncm91bmRfY29sb3IiOiIjMDAwMDAwIiwiaWNvbnMiOlt7InNyYyI6Imh0dHBzOi8vbnltY2hhdC5hcHAvaW1hZ2VzL05ZTS1pY29uLnBuZyIsInNpemVzIjoiMTkyeDE5MiIsInR5cGUiOiJpbWFnZS9wbmcifSx7InNyYyI6Imh0dHBzOi8vbnltY2hhdC5hcHAvaW1hZ2VzL05ZTS1pY29uLnBuZyIsInNpemVzIjoiNTEyeDUxMiIsInR5cGUiOiJpbWFnZS9wbmcifV19">
<link rel="icon" type="image/x-icon" href="https://nymchat.app/images/favicon.ico">
<link rel="icon" type="image/png" sizes="192x192" href="https://nymchat.app/images/android-chrome-192x192.png">
<link rel="icon" type="image/png" sizes="512x512" href="https://nymchat.app/images/android-chrome-512x512.png">
<link rel="apple-touch-icon" sizes="192x192" href="https://nymchat.app/images/android-chrome-192x192.png">
<!-- Open Graph Meta Tags -->
<meta property="og:title" content="Nymchat — open the app">
<meta property="og:description" content="Open the Nymchat client: pseudonymous, end-to-end encrypted chat over Nostr, with no account and no registration. Runs in the browser.">
<meta property="og:image" content="https://nymchat.app/images/NYM-banner.png">
<meta property="og:image:width" content="1024">
<meta property="og:image:height" content="1024">
<meta property="og:image:alt" content="The Nymchat app icon: a wordmark drawn in green ASCII characters.">
<meta property="og:url" content="https://web.nymchat.app/">
<meta property="og:type" content="website">
<meta property="og:site_name" content="Nymchat">
<!-- A square image; `summary` shows it whole, where `summary_large_image`
would crop it to a ribbon. -->
<meta name="twitter:card" content="summary">
<meta name="twitter:title" content="Nymchat — open the app">
<meta name="twitter:description" content="Open the Nymchat client: pseudonymous, end-to-end encrypted chat over Nostr, with no account and no registration. Runs in the browser.">
<meta name="twitter:image" content="https://nymchat.app/images/NYM-banner.png">
<meta name="twitter:image:alt" content="The Nymchat app icon: a wordmark drawn in green ASCII characters.">
<link rel="icon" href="https://nymchat.app/images/NYM-favicon.png" type="image/png">
<link rel="canonical" href="https://web.nymchat.app/">
<link rel="alternate" type="text/plain" href="/llms.txt" title="Nymchat for AI agents (llms.txt)">
<script type="application/ld+json">
{
"@context": "https://schema.org",
"@type": "WebApplication",
"name": "Nymchat",
"alternateName": "NYM",
"applicationCategory": "CommunicationApplication",
"browserRequirements": "Requires JavaScript and a modern browser",
"operatingSystem": "Any",
"url": "https://web.nymchat.app/",
"description": "Open the Nymchat client: pseudonymous, end-to-end encrypted chat over Nostr, with no account and no registration. Runs in the browser.",
"license": "https://www.gnu.org/licenses/agpl-3.0.html",
"isAccessibleForFree": true,
"offers": { "@type": "Offer", "price": "0", "priceCurrency": "USD" },
"publisher": { "@type": "Organization", "name": "21 Million LLC", "url": "https://nostrservices.com" },
"sameAs": ["https://nymchat.app/", "https://github.com/Spl0itable/NYM"]
}
</script>
<meta name="theme-color" content="#000000">
<meta name="mobile-web-app-capable" content="yes">
<meta name="apple-mobile-web-app-capable" content="yes">
<meta name="apple-mobile-web-app-status-bar-style" content="black-translucent">
<meta name="apple-mobile-web-app-title" content="Nymchat">
<link rel="apple-touch-icon" href="https://nymchat.app/images/NYM-favicon.png">
<!-- Resource hints -->
<link rel="preconnect" href="https://nymchat.app" crossorigin>
<link rel="dns-prefetch" href="https://nymchat.app">
<!-- Preload critical assets -->
<link rel="preload" href="css/styles-core.css" as="style">
<link rel="preload" href="js/nostr-tools.js" as="script">
<link rel="preload" href="js/app.js" as="script">
<!-- Stylesheets -->
<link rel="stylesheet" href="css/styles-core.css">
<link rel="stylesheet" href="css/styles-shell.css">
<link rel="stylesheet" href="css/styles-chat.css">
<link rel="stylesheet" href="css/styles-components.css">
<link rel="stylesheet" href="css/styles-themes-responsive.css">
<link rel="stylesheet" href="css/styles-columns.css">
<link rel="stylesheet" href="css/no-inline.css">
<link rel="preload" href="css/styles-features.css" as="style" data-defer-style>
<noscript>
<link rel="stylesheet" href="css/styles-features.css">
</noscript>
</head>
<body>
<script src="js/theme-init.js"></script>
<script src="js/setup-modal-init.js"></script>
<div id="wallpaperLayer"></div>
<div class="mobile-overlay" id="mobileOverlay" data-action="closeSidebar"></div>
<!-- Context Menu Overlay -->
<div class="context-menu-overlay" id="contextMenuOverlay"></div>
<!-- Context Menu Sidebar -->
<div class="context-menu" id="contextMenu">
<button class="context-menu-back nm-hidden" id="ctxBackBtn" data-action="ctxBack" title="Back to group" aria-label="Back to group">
<svg viewBox="0 0 24 24" width="18" height="18" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><polyline points="15 18 9 12 15 6"></polyline></svg>
</button>
<button class="context-menu-close" id="ctxCloseBtn" title="Close">✕</button>
<img id="ctxBannerImg" class="context-menu-banner nm-hidden" src="" alt="" decoding="async" loading="lazy"
data-action="expandImageFromSrcStop">
<div class="context-menu-avatar-header" id="ctxAvatarHeader">
<img id="ctxAvatarImg" class="avatar-context nm-pointer" src="" alt="Avatar" decoding="async"
data-action="expandImageFromSrcStop">
<div class="context-menu-avatar-nym" id="ctxAvatarNym"></div>
<div class="ctx-status-row" id="ctxStatusRow"></div>
<div class="ctx-full-pubkey" id="ctxFullPubkey" title="Click to switch between npub and hex"></div>
<div class="ctx-pubkey-actions">
<div class="context-menu-copy-pubkey" id="ctxCopyPubkey">
<svg width="12" height="12" viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-width="1.5" class="nm-ico4">
<rect x="5" y="5" width="8" height="9" rx="1" />
<path d="M 3 10 L 3 4 C 3 3.45 3.45 3 4 3 L 9 3" stroke-linecap="round" />
</svg>
<span id="ctxCopyPubkeyLabel">Copy npub</span>
</div>
<div class="context-menu-copy-pubkey" id="ctxTogglePubkeyFormat" title="Switch between npub and hex">
<svg width="12" height="12" viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-width="1.5" class="nm-ico4">
<path d="M 2 6 L 12 6 M 9.5 3.5 L 12 6 L 9.5 8.5" stroke-linecap="round" stroke-linejoin="round" />
<path d="M 14 10 L 4 10 M 6.5 7.5 L 4 10 L 6.5 12.5" stroke-linecap="round" stroke-linejoin="round" />
</svg>
<span id="ctxTogglePubkeyFormatLabel">Show hex</span>
</div>
</div>
</div>
<div class="context-menu-bio" id="ctxBio"></div>
<div class="context-menu-actions">
<div class="context-menu-item" id="ctxReact">
<svg width="16" height="16" viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-width="1.5" class="nm-ico8">
<circle cx="8" cy="8" r="6" />
<circle cx="6" cy="7" r="0.5" fill="currentColor" />
<circle cx="10" cy="7" r="0.5" fill="currentColor" />
<path d="M 5.5 9.5 Q 8 11.5 10.5 9.5" stroke-linecap="round" />
</svg>
React
</div>
<div class="context-menu-item" id="ctxMention">
<svg width="16" height="16" viewBox="0 0 16 16" fill="currentColor" stroke="none" class="nm-ico8">
<text x="8" y="12.5" font-size="14" font-family="Arial, sans-serif" text-anchor="middle"
font-weight="600">@</text>
</svg>
Mention
</div>
<div class="context-menu-item" id="ctxPM">
<svg width="16" height="16" viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-width="1.5" class="nm-ico8">
<rect x="2" y="4" width="12" height="9" rx="1" />
<path d="M 2 5 L 8 9 L 14 5" stroke-linecap="round" stroke-linejoin="round" />
</svg>
Private Message
</div>
<div class="context-menu-item nm-hidden" id="ctxAddToGroup" data-action="addToGroupFromContext">
<svg width="16" height="16" viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-width="1.5" class="nm-ico8">
<circle cx="6" cy="6" r="2.5" />
<path d="M 1.5 13 C 1.5 10 3.5 8.5 6 8.5 C 7 8.5 7.9 8.7 8.6 9.1" stroke-linecap="round" />
<line x1="12" y1="7" x2="12" y2="13" stroke-linecap="round" />
<line x1="9" y1="10" x2="15" y2="10" stroke-linecap="round" />
</svg>
Create Group Chat
</div>
<div class="context-menu-item lightning nm-hidden" id="ctxZap">
<svg width="16" height="16" viewBox="0 0 16 16" fill="currentColor" class="nm-ico8">
<path d="M 9 2 L 4 9 H 7 L 7 14 L 12 7 H 9 Z" />
</svg>
Zap Bitcoin
</div>
<div class="context-menu-item nm-hidden" id="ctxGiftCredits">
<svg width="16" height="16" viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-width="1.5" class="nm-ico8">
<rect x="2" y="7" width="12" height="7" rx="1" />
<path d="M 2 7 L 8 7 L 8 14 M 8 7 L 14 7" />
<path d="M 8 7 C 8 4 6 3 5 4 C 4 5 6 7 8 7 C 8 4 10 3 11 4 C 12 5 10 7 8 7 Z" />
</svg>
Gift Nymbot Credits
</div>
<div class="context-menu-item" id="ctxQuote">
<svg width="16" height="16" viewBox="0 0 16 16" fill="currentColor" class="nm-ico8">
<path d="M 3 6 C 3 4.5 4 3 6 3 C 6 4.5 5 5 4 5.5 C 3.5 5.8 3 6.3 3 7 L 3 9 L 6 9 L 6 6 Z" />
<path d="M 9 6 C 9 4.5 10 3 12 3 C 12 4.5 11 5 10 5.5 C 9.5 5.8 9 6.3 9 7 L 9 9 L 12 9 L 12 6 Z" />
</svg>
Quote Message
</div>
<div class="context-menu-item" id="ctxCopyMessage">
<svg width="16" height="16" viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-width="1.5" class="nm-ico8">
<rect x="5" y="5" width="8" height="9" rx="1" />
<path d="M 3 10 L 3 4 C 3 3.45 3.45 3 4 3 L 9 3" stroke-linecap="round" />
</svg>
Copy Message
</div>
<div class="context-menu-item" id="ctxTranslate">
<svg width="16" height="16" viewBox="0 0 24 24" fill="currentColor" class="nm-ico8">
<path d="m12.87 15.07-2.54-2.51.03-.03A17.52 17.52 0 0 0 14.07 6H17V4h-7V2H8v2H1v1.99h11.17C11.5 7.92 10.44 9.75 9 11.35 8.07 10.32 7.3 9.19 6.69 8h-2c.73 1.63 1.73 3.17 2.98 4.56l-5.09 5.02L4 19l5-5 3.11 3.11.76-2.04zM18.5 10h-2L12 22h2l1.12-3h4.75L21 22h2l-4.5-12zm-2.62 7 1.62-4.33L19.12 17h-3.24z"/>
</svg>
Translate Message
</div>
<div class="context-menu-item" id="ctxFriend">
<svg width="16" height="16" viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-width="1.5" class="nm-ico8">
<circle cx="6" cy="5" r="2.5" />
<path d="M 1.5 14 C 1.5 10.5 3.5 9 6 9 C 8.5 9 10.5 10.5 10.5 14" stroke-linecap="round" />
<line x1="13" y1="6" x2="13" y2="10" stroke-linecap="round" stroke-width="1.5" />
<line x1="11" y1="8" x2="15" y2="8" stroke-linecap="round" stroke-width="1.5" />
</svg>
Add Friend
</div>
<div class="context-menu-item report" id="ctxReport">
<svg width="16" height="16" viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-width="1.5" class="nm-ico8">
<circle cx="8" cy="8" r="6" />
<path d="M 8 5 L 8 8.5" stroke-linecap="round" stroke-width="2" />
<circle cx="8" cy="10.5" r="0.8" fill="currentColor" stroke="none" />
</svg>
Report
</div>
<div class="context-menu-item nm-hidden" id="ctxEditMessage">
<svg width="16" height="16" viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-width="1.5" class="nm-ico8">
<path d="M 11.5 2.5 L 13.5 4.5 L 5 13 L 2 14 L 3 11 Z" stroke-linejoin="round" />
<path d="M 10 4 L 12 6" stroke-linecap="round" />
</svg>
Edit Message
</div>
<div class="context-menu-item danger" id="ctxDeleteMessage" data-action="deleteMessageFromContext">
<svg width="16" height="16" viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-width="1.5" class="nm-ico8">
<path d="M 3 5 L 13 5" stroke-linecap="round" />
<path d="M 5 5 L 5 13 C 5 13.55 5.45 14 6 14 L 10 14 C 10.55 14 11 13.55 11 13 L 11 5"
stroke-linejoin="round" />
<path d="M 6.5 2 L 9.5 2" stroke-linecap="round" />
<path d="M 7 7 L 7 11.5" stroke-linecap="round" />
<path d="M 9 7 L 9 11.5" stroke-linecap="round" />
</svg>
Delete Message
</div>
<div class="context-menu-item nm-hidden" id="ctxAddMod" data-action="addModFromContext">
<svg width="16" height="16" viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-width="1.5" class="nm-ico8">
<path d="M 8 1.5 L 10 5.5 L 14 6 L 11 9 L 12 13.5 L 8 11 L 4 13.5 L 5 9 L 2 6 L 6 5.5 Z"
stroke-linejoin="round" />
</svg>
Make Moderator
</div>
<div class="context-menu-item nm-hidden" id="ctxRemoveMod" data-action="removeModFromContext">
<svg width="16" height="16" viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-width="1.5" class="nm-ico8">
<path d="M 8 1.5 L 10 5.5 L 14 6 L 11 9 L 12 13.5 L 8 11 L 4 13.5 L 5 9 L 2 6 L 6 5.5 Z"
stroke-linejoin="round" />
<line x1="3" y1="3" x2="13" y2="13" stroke-linecap="round" />
</svg>
Revoke Moderator
</div>
<div class="context-menu-item nm-hidden" id="ctxAddAdmin" data-action="addAdminFromContext">
<svg width="16" height="16" viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-width="1.5" class="nm-ico8">
<path d="M 8 1.5 L 13.5 3.5 L 13.5 8 C 13.5 11 11 13.5 8 14.5 C 5 13.5 2.5 11 2.5 8 L 2.5 3.5 Z"
stroke-linejoin="round" />
<path d="M 5.75 8 L 7.25 9.5 L 10.25 6" stroke-linecap="round" stroke-linejoin="round" />
</svg>
Make Admin
</div>
<div class="context-menu-item nm-hidden" id="ctxRemoveAdmin" data-action="removeAdminFromContext">
<svg width="16" height="16" viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-width="1.5" class="nm-ico8">
<path d="M 8 1.5 L 13.5 3.5 L 13.5 8 C 13.5 11 11 13.5 8 14.5 C 5 13.5 2.5 11 2.5 8 L 2.5 3.5 Z"
stroke-linejoin="round" />
<line x1="4" y1="4" x2="12" y2="12" stroke-linecap="round" />
</svg>
Revoke Admin
</div>
<div class="context-menu-item nm-hidden" id="ctxTransferOwner" data-action="transferOwnerFromContext">
<svg width="16" height="16" viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-width="1.5" class="nm-ico8">
<circle cx="8" cy="5" r="2.5" />
<path d="M 2 14 C 2 10 4 9 8 9 C 12 9 14 10 14 14" stroke-linecap="round" />
<path d="M 12 4 L 15 4 L 13.5 2 M 15 4 L 13.5 6" stroke-linecap="round" stroke-linejoin="round" />
</svg>
Transfer Ownership
</div>
<div class="context-menu-item danger nm-hidden" id="ctxKickMember" data-action="kickMemberFromContext">
<svg width="16" height="16" viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-width="1.5" class="nm-ico8">
<path d="M 6 8 L 2 8" stroke-linecap="round" />
<path d="M 4 6 L 2 8 L 4 10" stroke-linecap="round" stroke-linejoin="round" />
<circle cx="10" cy="5.5" r="2.5" />
<path d="M 5.5 14 C 5.5 11.5 7.5 10 10 10 C 12.5 10 14.5 11.5 14.5 14" stroke-linecap="round" />
</svg>
Remove from Group
</div>
<div class="context-menu-item danger nm-hidden" id="ctxBanMember" data-action="banMemberFromContext">
<svg width="16" height="16" viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-width="1.5" class="nm-ico8">
<circle cx="8" cy="8" r="6.5" />
<line x1="3.5" y1="3.5" x2="12.5" y2="12.5" stroke-linecap="round" />
</svg>
Ban from Group
</div>
<div class="context-menu-item danger" id="ctxBlock">
<svg width="16" height="16" viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-width="1.5" class="nm-ico8">
<circle cx="8" cy="8" r="6" />
<line x1="3.75" y1="3.75" x2="12.25" y2="12.25" stroke-width="1.5" stroke-linecap="round" />
</svg>
Block User
</div>
<div class="context-menu-item nm-hidden" id="ctxEditProfile">
<svg width="16" height="16" viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-width="1.5" class="nm-ico8">
<circle cx="8" cy="5.5" r="2.5" />
<path d="M 3 14 C 3 11 5 9.5 8 9.5 C 11 9.5 13 11 13 14" stroke-linecap="round" />
</svg>
Edit Profile
</div>
</div>
</div>
<!-- Group Context Menu Sidebar -->
<div class="context-menu-overlay" id="groupContextMenuOverlay" data-action="closeGroupContextMenu"></div>
<div class="context-menu" id="groupContextMenu">
<button class="context-menu-close" id="grpCtxCloseBtn" data-action="closeGroupContextMenu" title="Close">✕</button>
<div id="grpCtxDefaultBanner" class="context-menu-banner group-ctx-default-banner nm-hidden"></div>
<img id="grpCtxBannerImg" class="context-menu-banner nm-pointer nm-hidden" src="" alt="" decoding="async" loading="lazy" data-action="expandImageFromSrcStop">
<div class="context-menu-avatar-header">
<div class="group-ctx-icon" id="grpCtxIcon"></div>
<div class="context-menu-avatar-nym" id="grpCtxName"></div>
<div class="ctx-status-row" id="grpCtxMemberCount"></div>
<div class="ctx-full-pubkey nm-hidden" id="grpCtxInviteLink" title="Group invite link"></div>
<div class="context-menu-copy-pubkey nm-hidden" id="grpCtxCopyInvite" data-action="groupCtxCopyInviteLink">
<svg width="12" height="12" viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-width="1.5" class="nm-ico4">
<rect x="5" y="5" width="8" height="9" rx="1" />
<path d="M 3 10 L 3 4 C 3 3.45 3.45 3 4 3 L 9 3" stroke-linecap="round" />
</svg>
Copy Invite Link
</div>
</div>
<div class="context-menu-bio" id="grpCtxBio"></div>
<div class="context-menu-actions" id="grpCtxActions"></div>
<div class="group-ctx-members-title" id="grpCtxMembersTitle"></div>
<div class="group-ctx-members" id="grpCtxMembers"></div>
<div class="group-ctx-members-title nm-hidden" id="grpCtxBannedTitle"></div>
<div class="group-ctx-members" id="grpCtxBanned"></div>
<input type="file" id="grpBannerFileInput" accept="image/*" class="nm-hidden">
</div>
<!-- PM / Group Modal -->
<div class="modal" id="newPMModal">
<div class="modal-content nm-h-1">
<button class="modal-close" data-action="closeModal" data-modal-id="newPMModal">✕</button>
<div class="modal-header" id="newPMModalTitle">New Message</div>
<div class="modal-body">
<div class="form-group">
<label class="form-label">To</label>
<div class="pm-recipient-box" id="pmRecipientBox" data-action="focusPmRecipient">
<div class="pm-recipient-chips" id="pmRecipientChips"></div>
<input type="text" class="pm-recipient-input" id="pmRecipientInput"
placeholder="Search nym or paste npub / hex pubkey..."
data-on-input="onNewPMRecipientInput"
data-on-keydown="onNewPMRecipientKeydown"
autocomplete="off">
</div>
<div class="pm-suggestions" id="pmSuggestions"></div>
</div>
<div class="form-group nm-hidden" id="pmGroupNameGroup">
<label class="form-label">Group Name <span class="nm-h-2">(optional)</span></label>
<input type="text" class="form-input" id="pmGroupNameInput" maxlength="40" placeholder="Enter a group name..." data-on-input="updateFieldCharCount" data-char-count="pmGroupNameCharCount">
<div class="input-char-count" id="pmGroupNameCharCount">0/40</div>
</div>
<div class="form-group nm-hidden" id="newGroupMediaGroup">
<label class="form-label">Group Avatar & Banner <span class="nm-h-2">(optional)</span></label>
<div class="new-group-media" id="newGroupMedia">
<div class="new-group-banner" id="newGroupBannerPreview" data-action="newGroupPickBanner" title="Add a banner image">
<span class="new-group-media-hint">Add banner</span>
</div>
<div class="new-group-avatar" id="newGroupAvatarPreview" data-action="newGroupPickAvatar" title="Add a group avatar">
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round"><circle cx="12" cy="7" r="2.75"/><path d="M5 21v-1.5a7 7 0 0 1 14 0V21"/><circle cx="4.5" cy="9.5" r="2"/><path d="M1 20v-1a4.5 4.5 0 0 1 5.5-4.35"/><circle cx="19.5" cy="9.5" r="2"/><path d="M23 20v-1a4.5 4.5 0 0 0-5.5-4.35"/></svg>
</div>
</div>
<div class="upload-progress new-group-progress" id="newGroupUploadProgress">
<div id="newGroupUploadLabel">Uploading…</div>
<div class="progress-bar"><div class="progress-fill" id="newGroupProgressFill"></div></div>
</div>
<input type="file" id="newGroupAvatarInput" accept="image/*" class="nm-hidden">
<input type="file" id="newGroupBannerInput" accept="image/*" class="nm-hidden">
</div>
<div class="form-group nm-hidden" id="newGroupDescGroup">
<label class="form-label">Description <span class="nm-h-2">(optional)</span></label>
<textarea class="form-textarea nm-h-4" id="newGroupDescInput" maxlength="150" placeholder="What's this group about?" data-on-input="updateFieldCharCount" data-char-count="newGroupDescCharCount"></textarea>
<div class="input-char-count" id="newGroupDescCharCount">0/150</div>
</div>
<div class="form-group nm-hidden" id="newGroupAllowInvitesGroup">
<label class="nm-h-78">
<input type="checkbox" id="newGroupAllowInvites" class="nm-h-79" checked>
Allow members to add others
</label>
<div class="form-hint">When off, only you (the group owner) can add new members.</div>
</div>
<div class="form-group nm-h-3">
<label class="form-label">Message <span class="nm-h-2">(optional)</span></label>
<textarea class="form-textarea nm-h-4" id="pmInitialMessage" placeholder="Start the conversation..."></textarea>
</div>
</div>
<div class="modal-actions">
<button class="icon-btn" data-action="closeModal" data-modal-id="newPMModal">Cancel</button>
<button class="send-btn" id="pmStartBtn" data-action="startNewPMFromModal" disabled>Start</button>
</div>
</div>
</div>
<!-- Report Modal -->
<div class="modal nm-hidden" id="reportModal">
<div class="modal-content nm-h-5">
<button class="modal-close" data-action="closeReportModal">✕</button>
<div class="modal-header">
<h2>Report User/Content</h2>
</div>
<div class="modal-body">
<p class="nm-h-6">
Reporting: <span id="reportTargetNym" class="nm-primary"></span>
</p>
<div class="nm-h-7">
<label class="nm-h-8">Report Type:</label>
<select id="reportType" class="nm-h-9">
<option value="nudity">Nudity - depictions of nudity, porn, etc.</option>
<option value="malware">Malware - virus, trojan, spyware, etc.</option>
<option value="profanity">Profanity - hateful speech, etc.</option>
<option value="illegal">Illegal - content that may be illegal</option>
<option value="spam">Spam</option>
<option value="impersonation">Impersonation - pretending to be someone else</option>
<option value="other">Other</option>
</select>
</div>
<div class="nm-h-7">
<label class="nm-h-8">Additional Details
<span class="nm-h-2">(optional)</span>:</label>
<textarea id="reportDetails" rows="4"
placeholder="Provide any additional context for this report..." class="nm-h-10"></textarea>
</div>
<div class="nm-h-11">
<label class="nm-h-12">
<input type="checkbox" id="reportMessage" class="nm-h-13">
Report specific message (if unchecked, reports the user profile)
</label>
</div>
<div class="modal-actions">
<button class="icon-btn" data-action="closeReportModal">Cancel</button>
<button class="send-btn" data-action="submitReport">Submit Report</button>
</div>
</div>
</div>
</div>
<div class="container">
<aside class="sidebar" id="sidebar">
<div class="sidebar-header">
<h1 class="visually-hidden">Nymchat — pseudonymous chat over Nostr</h1>
<pre class="logo-ascii nm-pointer" role="img" aria-label="Nymchat — log in with Nostr" data-action="openNostrLogin" title="Login with Nostr">
##\ ##\
## | ## |
#######\ ##\ ##\ ######\####\ #######\ #######\ ######\ ######\
## __##\ ## | ## |## _## _##\ ## _____|## __##\ \____##\\_## _|
## | ## |## | ## |## / ## / ## |## / ## | ## | ####### | ## |
## | ## |## | ## |## | ## | ## |## | ## | ## |## __## | ## |##\
## | ## |\####### |## | ## | ## |\#######\ ## | ## |\####### | \#### |
\__| \__| \____## |\__| \__| \__| \_______|\__| \__| \_______| \____/
##\ ## |
\###### |
\______/
</pre>
<div class="nym-display" data-action="editNick">
<div class="nym-label">Your Nym (click to edit)</div>
<div class="nym-identity is-loading">
<img id="sidebarAvatar" class="avatar nm-h-14"
src="data:image/svg+xml;utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 80 80'%3E%3Crect width='80' height='80' fill='%23222'/%3E%3C/svg%3E" alt=""
decoding="async" width="32" height="32">
<div class="nym-value" id="currentNym">pseudonymous</div>
<span class="nym-sk-avatar" aria-hidden="true"></span>
<span class="nym-sk-name" aria-hidden="true"></span>
</div>
</div>
<div class="status-indicator nm-pointer" data-action="openRelayStats" title="View network stats">
<span class="status-dot" id="statusDot"></span>
<span id="connectionStatus">Disconnected</span>
</div>
<button type="button" class="mesh-status-row nm-hidden" id="meshStatusRow"
data-action="openMeshPanel" title="Bluetooth mesh">
<svg class="mesh-status-icon" viewBox="0 0 24 24" width="12" height="12" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="m7 7 10 10-5 5V2l5 5L7 17"></path></svg>
<span id="meshStatusLabel">Mesh off</span>
<span id="meshStatusLinks" class="mesh-status-links"></span>
</button>
</div>
<div class="sidebar-actions">
<button class="icon-btn" data-action="openShopAndCloseSidebar" title="Flair">
<svg viewBox="0 0 24 24" width="16" height="16" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><polygon points="12 2 15.09 8.26 22 9.27 17 14.14 18.18 21.02 12 17.77 5.82 21.02 7 14.14 2 9.27 8.91 8.26 12 2"></polygon></svg>
<span class="btn-label">Flair</span>
</button>
<button class="icon-btn" data-action="showSettingsAndCloseSidebar" title="Settings">
<svg viewBox="0 0 24 24" width="16" height="16" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><circle cx="12" cy="12" r="3"></circle><path d="M19.4 15a1.65 1.65 0 0 0 .33 1.82l.06.06a2 2 0 0 1-2.83 2.83l-.06-.06a1.65 1.65 0 0 0-1.82-.33 1.65 1.65 0 0 0-1 1.51V21a2 2 0 0 1-4 0v-.09A1.65 1.65 0 0 0 9 19.4a1.65 1.65 0 0 0-1.82.33l-.06.06a2 2 0 0 1-2.83-2.83l.06-.06A1.65 1.65 0 0 0 4.68 15a1.65 1.65 0 0 0-1.51-1H3a2 2 0 0 1 0-4h.09A1.65 1.65 0 0 0 4.6 9a1.65 1.65 0 0 0-.33-1.82l-.06-.06a2 2 0 0 1 2.83-2.83l.06.06A1.65 1.65 0 0 0 9 4.68a1.65 1.65 0 0 0 1-1.51V3a2 2 0 0 1 4 0v.09a1.65 1.65 0 0 0 1 1.51 1.65 1.65 0 0 0 1.82-.33l.06-.06a2 2 0 0 1 2.83 2.83l-.06.06A1.65 1.65 0 0 0 19.4 9a1.65 1.65 0 0 0 1.51 1H21a2 2 0 0 1 0 4h-.09a1.65 1.65 0 0 0-1.51 1z"></path></svg>
<span class="btn-label">Settings</span>
</button>
<button class="icon-btn" data-action="showAboutAndCloseSidebar" title="About">
<svg viewBox="0 0 24 24" width="16" height="16" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><circle cx="12" cy="12" r="10"></circle><line x1="12" y1="16" x2="12" y2="12"></line><line x1="12" y1="8" x2="12.01" y2="8"></line></svg>
<span class="btn-label">About</span>
</button>
<button class="icon-btn" data-action="signOutAndCloseSidebar" title="Logout">
<svg viewBox="0 0 24 24" width="16" height="16" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4"></path><polyline points="16 17 21 12 16 7"></polyline><line x1="21" y1="12" x2="9" y2="12"></line></svg>
<span class="btn-label">Logout</span>
</button>
</div>
<div class="nav-section" data-section="channels">
<div class="nav-title">
<span class="section-reorder-arrows" aria-hidden="true">
<button class="section-reorder-btn" data-section-move="up" title="Move section up" aria-label="Move section up">
<svg viewBox="0 0 24 24" width="12" height="12" fill="none" stroke="currentColor" stroke-width="3" stroke-linecap="round" stroke-linejoin="round"><polyline points="18 15 12 9 6 15"></polyline></svg>
</button>
<button class="section-reorder-btn" data-section-move="down" title="Move section down" aria-label="Move section down">
<svg viewBox="0 0 24 24" width="12" height="12" fill="none" stroke="currentColor" stroke-width="3" stroke-linecap="round" stroke-linejoin="round"><polyline points="6 9 12 15 18 9"></polyline></svg>
</button>
</span>
<span class="nav-title-text">Public Channels</span>
<span class="discover-icon" data-action="showGeohashExplorer"
title="Explore geohash channels globally">
<svg viewBox="0 0 24 24">
<circle cx="12" cy="12" r="10" fill="none" stroke-width="2" />
<path
d="M2 12h20M12 2a15.3 15.3 0 0 1 4 10 15.3 15.3 0 0 1-4 10 15.3 15.3 0 0 1-4-10 15.3 15.3 0 0 1 4-10z"
fill="none" stroke-width="2" />
</svg>
</span>
<span class="search-icon" data-action="toggleSearch" data-search-target="channelSearch">
<svg viewBox="0 0 24 24">
<circle cx="11" cy="11" r="8"></circle>
<path d="m21 21-4.35-4.35"></path>
</svg>
</span>
<span class="collapse-icon" data-action="toggleSectionCollapse" data-section-target="channels" title="Collapse section" aria-label="Collapse section">
<svg viewBox="0 0 24 24"><polyline points="6 9 12 15 18 9"></polyline></svg>
</span>
</div>
<div class="search-input-wrapper" id="channelSearchWrapper">
<input type="text" class="search-input" id="channelSearch" placeholder="Search channels..."
data-on-input="channelSearchInput"
data-on-keyup="channelSearchKeyup">
<span class="search-clear" data-action="clearSearch" data-search-target="channelSearch">✕</span>
</div>
<div id="channelSearchResults"></div>
<div class="channel-list" id="channelList">
<div class="channel-item active" data-channel="nymchat" data-geohash="nymchat">
<span class="channel-name">#nymchat<span class="channel-sub"><span class="loc-city">Not a geohash</span></span></span>
<div class="channel-badges">
<span class="unread-badge nm-hidden">0</span>
<button class="row-menu-btn" data-action="sidebarRowMenu" aria-label="Channel menu" title="More" type="button"><svg width="16" height="16" viewBox="0 0 24 24" fill="currentColor" aria-hidden="true"><circle cx="12" cy="5" r="1.8"/><circle cx="12" cy="12" r="1.8"/><circle cx="12" cy="19" r="1.8"/></svg></button>
</div>
</div>
<div class="sidebar-skeleton ssk-channel ssk-w3" aria-hidden="true"><span class="sk-bar"></span></div>
<div class="sidebar-skeleton ssk-channel ssk-w1" aria-hidden="true"><span class="sk-bar"></span></div>
<div class="sidebar-skeleton ssk-channel ssk-w4" aria-hidden="true"><span class="sk-bar"></span></div>
<div class="sidebar-skeleton ssk-channel ssk-w2" aria-hidden="true"><span class="sk-bar"></span></div>
</div>
</div>
<div class="nav-section" data-section="pms">
<div class="nav-title">
<span class="section-reorder-arrows" aria-hidden="true">
<button class="section-reorder-btn" data-section-move="up" title="Move section up" aria-label="Move section up">
<svg viewBox="0 0 24 24" width="12" height="12" fill="none" stroke="currentColor" stroke-width="3" stroke-linecap="round" stroke-linejoin="round"><polyline points="18 15 12 9 6 15"></polyline></svg>
</button>
<button class="section-reorder-btn" data-section-move="down" title="Move section down" aria-label="Move section down">
<svg viewBox="0 0 24 24" width="12" height="12" fill="none" stroke="currentColor" stroke-width="3" stroke-linecap="round" stroke-linejoin="round"><polyline points="6 9 12 15 18 9"></polyline></svg>
</button>
</span>
<span class="nav-title-text">Private Messages</span>
<span class="search-icon new-pm-btn" data-action="openNewPMModal" title="New message">
<svg viewBox="0 0 24 24">
<line x1="12" y1="5" x2="12" y2="19"></line>
<line x1="5" y1="12" x2="19" y2="12"></line>
</svg>
</span>
<span class="search-icon" data-action="toggleSearch" data-search-target="pmSearch" title="Search PMs">
<svg viewBox="0 0 24 24">
<circle cx="11" cy="11" r="8"></circle>
<path d="m21 21-4.35-4.35"></path>
</svg>
</span>
<span class="collapse-icon" data-action="toggleSectionCollapse" data-section-target="pms" title="Collapse section" aria-label="Collapse section">
<svg viewBox="0 0 24 24"><polyline points="6 9 12 15 18 9"></polyline></svg>
</span>
</div>
<div class="search-input-wrapper" id="pmSearchWrapper">
<input type="text" class="search-input" id="pmSearch" placeholder="Search PMs..."
data-on-keyup="filterPMs">
<span class="search-clear" data-action="clearSearch" data-search-target="pmSearch">✕</span>
</div>
<div class="pm-list" id="pmList">
<div class="sidebar-skeleton ssk-pm ssk-w2" aria-hidden="true"><span class="sk-avatar"></span><span class="sk-bar"></span></div>
<div class="sidebar-skeleton ssk-pm ssk-w3" aria-hidden="true"><span class="sk-avatar"></span><span class="sk-bar"></span></div>
<div class="sidebar-skeleton ssk-pm ssk-w1" aria-hidden="true"><span class="sk-avatar"></span><span class="sk-bar"></span></div>
</div>
</div>
<div class="user-list" id="userList" data-section="nyms">
<div class="nav-title">
<span class="section-reorder-arrows" aria-hidden="true">
<button class="section-reorder-btn" data-section-move="up" title="Move section up" aria-label="Move section up">
<svg viewBox="0 0 24 24" width="12" height="12" fill="none" stroke="currentColor" stroke-width="3" stroke-linecap="round" stroke-linejoin="round"><polyline points="18 15 12 9 6 15"></polyline></svg>
</button>
<button class="section-reorder-btn" data-section-move="down" title="Move section down" aria-label="Move section down">
<svg viewBox="0 0 24 24" width="12" height="12" fill="none" stroke="currentColor" stroke-width="3" stroke-linecap="round" stroke-linejoin="round"><polyline points="6 9 12 15 18 9"></polyline></svg>
</button>
</span>
<span class="nav-title-text">Online Nyms</span>
<span class="search-icon" data-action="toggleSearch" data-search-target="userSearch">
<svg viewBox="0 0 24 24">
<circle cx="11" cy="11" r="8"></circle>
<path d="m21 21-4.35-4.35"></path>
</svg>
</span>
<span class="collapse-icon" data-action="toggleSectionCollapse" data-section-target="nyms" title="Collapse section" aria-label="Collapse section">
<svg viewBox="0 0 24 24"><polyline points="6 9 12 15 18 9"></polyline></svg>
</span>
</div>
<div class="search-input-wrapper" id="userSearchWrapper">
<input type="text" class="search-input" id="userSearch" placeholder="Search nyms..."
data-on-keyup="filterUsers">
<span class="search-clear" data-action="clearSearch" data-search-target="userSearch">✕</span>
</div>
<div id="userListContent">
<div class="sidebar-skeleton ssk-nym ssk-w3" aria-hidden="true"><span class="sk-avatar"></span><span class="sk-bar"></span></div>
<div class="sidebar-skeleton ssk-nym ssk-w1" aria-hidden="true"><span class="sk-avatar"></span><span class="sk-bar"></span></div>
<div class="sidebar-skeleton ssk-nym ssk-w4" aria-hidden="true"><span class="sk-avatar"></span><span class="sk-bar"></span></div>
<div class="sidebar-skeleton ssk-nym ssk-w2" aria-hidden="true"><span class="sk-avatar"></span><span class="sk-bar"></span></div>
<div class="sidebar-skeleton ssk-nym ssk-w3" aria-hidden="true"><span class="sk-avatar"></span><span class="sk-bar"></span></div>
</div>
</div>
</aside>
<main class="main-content">
<header class="chat-header">
<div class="channel-info">
<div class="nm-h-15">
<div class="channel-header-controls">
<div class="channel-nav-buttons">
<button class="channel-nav-btn" id="channelBackBtn" data-action="navigateBack" title="Go back (Alt+Left)" disabled>
<svg viewBox="0 0 24 24" width="18" height="18" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
<polyline points="15 18 9 12 15 6"></polyline>
</svg>
</button>
<button class="channel-nav-btn" id="channelForwardBtn" data-action="navigateForward" title="Go forward (Alt+Right)" disabled>
<svg viewBox="0 0 24 24" width="18" height="18" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
<polyline points="9 6 15 12 9 18"></polyline>
</svg>
</button>
</div>
<div class="channel-action-buttons">
<button class="favorite-channel-btn" id="favoriteChannelBtn" data-action="toggleFavoriteCurrentChannel"
title="Favorite channel">
<svg viewBox="0 0 24 24" width="18" height="18">
<path d="M12 2 L14.9 8.6 L22 9.3 L16.5 14 L18.2 21 L12 17.3 L5.8 21 L7.5 14 L2 9.3 L9.1 8.6 Z" />
</svg>
</button>
<button class="share-channel-btn" id="shareChannelBtn" data-action="shareChannel"
title="Share channel URL">
<svg viewBox="0 0 24 24" width="18" height="18">
<path
d="M18 16.08c-.76 0-1.44.3-1.96.77L8.91 12.7c.05-.23.09-.46.09-.7s-.04-.47-.09-.7l7.05-4.11c.54.5 1.25.81 2.04.81 1.66 0 3-1.34 3-3s-1.34-3-3-3-3 1.34-3 3c0 .24.04.47.09.7L8.04 9.81C7.5 9.31 6.79 9 6 9c-1.66 0-3 1.34-3 3s1.34 3 3 3c.79 0 1.5-.31 2.04-.81l7.12 4.16c-.05.21-.08.43-.08.65 0 1.61 1.31 2.92 2.92 2.92 1.61 0 2.92-1.31 2.92-2.92s-1.31-2.92-2.92-2.92z" />
</svg>
</button>
<button class="call-channel-btn nm-call-hidden" id="audioCallBtn" data-action="initiateAudioCall"
title="Start audio call">
<svg viewBox="0 0 24 24" width="18" height="18" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
<path d="M22 16.92v3a2 2 0 0 1-2.18 2 19.79 19.79 0 0 1-8.63-3.07 19.5 19.5 0 0 1-6-6 19.79 19.79 0 0 1-3.07-8.67A2 2 0 0 1 4.11 2h3a2 2 0 0 1 2 1.72 12.84 12.84 0 0 0 .7 2.81 2 2 0 0 1-.45 2.11L8.09 9.91a16 16 0 0 0 6 6l1.27-1.27a2 2 0 0 1 2.11-.45 12.84 12.84 0 0 0 2.81.7A2 2 0 0 1 22 16.92z"></path>
</svg>
</button>
<button class="call-channel-btn nm-call-hidden" id="videoCallBtn" data-action="initiateVideoCall"
title="Start video call">
<svg viewBox="0 0 24 24" width="18" height="18" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
<polygon points="23 7 16 12 23 17 23 7"></polygon>
<rect x="1" y="5" width="15" height="14" rx="2" ry="2"></rect>
</svg>
</button>
</div>
</div>
<div class="channel-title-wrap">
<div class="channel-title" id="currentChannel">#nymchat</div>
<div class="channel-meta" id="channelMeta">0 nyms in channel</div>
</div>
</div>
</div>
<div class="header-actions">
<button class="icon-btn notifications-btn" data-action="openNotificationsModal" title="Notifications">
<svg viewBox="0 0 24 24" width="16" height="16" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
<path d="M18 8A6 6 0 0 0 6 8c0 7-3 9-3 9h18s-3-2-3-9"></path>
<path d="M13.73 21a2 2 0 0 1-3.46 0"></path>
</svg>
<span class="notification-count-badge nm-hidden" id="notifBadgeDesktop">0</span>
</button>
<button class="icon-btn" data-action="openShop" title="Flair">
<svg viewBox="0 0 24 24" width="14" height="14" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><polygon points="12 2 15.09 8.26 22 9.27 17 14.14 18.18 21.02 12 17.77 5.82 21.02 7 14.14 2 9.27 8.91 8.26 12 2"></polygon></svg>
Flair
</button>
<button class="icon-btn" data-action="showSettings" title="Settings">
<svg viewBox="0 0 24 24" width="14" height="14" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><circle cx="12" cy="12" r="3"></circle><path d="M19.4 15a1.65 1.65 0 0 0 .33 1.82l.06.06a2 2 0 0 1-2.83 2.83l-.06-.06a1.65 1.65 0 0 0-1.82-.33 1.65 1.65 0 0 0-1 1.51V21a2 2 0 0 1-4 0v-.09A1.65 1.65 0 0 0 9 19.4a1.65 1.65 0 0 0-1.82.33l-.06.06a2 2 0 0 1-2.83-2.83l.06-.06A1.65 1.65 0 0 0 4.68 15a1.65 1.65 0 0 0-1.51-1H3a2 2 0 0 1 0-4h.09A1.65 1.65 0 0 0 4.6 9a1.65 1.65 0 0 0-.33-1.82l-.06-.06a2 2 0 0 1 2.83-2.83l.06.06A1.65 1.65 0 0 0 9 4.68a1.65 1.65 0 0 0 1-1.51V3a2 2 0 0 1 4 0v.09a1.65 1.65 0 0 0 1 1.51 1.65 1.65 0 0 0 1.82-.33l.06-.06a2 2 0 0 1 2.83 2.83l-.06.06A1.65 1.65 0 0 0 19.4 9a1.65 1.65 0 0 0 1.51 1H21a2 2 0 0 1 0 4h-.09a1.65 1.65 0 0 0-1.51 1z"></path></svg>
Settings
</button>
<button class="icon-btn" data-action="showAbout" title="About">
<svg viewBox="0 0 24 24" width="14" height="14" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><circle cx="12" cy="12" r="10"></circle><line x1="12" y1="16" x2="12" y2="12"></line><line x1="12" y1="8" x2="12.01" y2="8"></line></svg>
About
</button>
<button class="icon-btn" data-action="signOut" title="Logout">
<svg viewBox="0 0 24 24" width="14" height="14" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4"></path><polyline points="16 17 21 12 16 7"></polyline><line x1="21" y1="12" x2="9" y2="12"></line></svg>
Logout
</button>
</div>
<div class="mobile-header-actions">
<button class="mobile-notif-toggle" data-action="openNotificationsModal" title="Notifications">
<svg viewBox="0 0 24 24" width="20" height="20" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
<path d="M18 8A6 6 0 0 0 6 8c0 7-3 9-3 9h18s-3-2-3-9"></path>
<path d="M13.73 21a2 2 0 0 1-3.46 0"></path>
</svg>
<span class="notification-count-badge nm-hidden" id="notifBadgeMobile">0</span>
</button>
<button class="mobile-menu-toggle" data-action="toggleSidebar" title="Menu">
<svg viewBox="0 0 24 24" width="20" height="20" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
<line x1="3" y1="6" x2="21" y2="6"></line>
<line x1="3" y1="12" x2="21" y2="12"></line>
<line x1="3" y1="18" x2="21" y2="18"></line>
</svg>
</button>
</div>
</header>
<!-- Premium Nymbot control bar -->
<div class="bot-control-bar nm-hidden" id="botControlBar">
<div class="bot-tier-switch" id="botTierSwitch" role="tablist" aria-label="Nymbot tier">
<button class="bot-tier-btn" type="button" data-action="botSetTier" data-tier="standard" role="tab" aria-selected="true">Standard</button>
<button class="bot-tier-btn" type="button" data-action="botSetTier" data-tier="pro" role="tab" aria-selected="false">Pro</button>
</div>
<button class="bot-ctrl-btn" type="button" id="botModelBtn" data-action="openBotModelModal" title="Choose Pro model">
<svg viewBox="0 0 24 24" width="15" height="15" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="m12 3-1.9 5.8a2 2 0 0 1-1.3 1.3L3 12l5.8 1.9a2 2 0 0 1 1.3 1.3L12 21l1.9-5.8a2 2 0 0 1 1.3-1.3L21 12l-5.8-1.9a2 2 0 0 1-1.3-1.3Z"></path></svg>
<span class="bot-ctrl-label" id="botModelBtnLabel">Auto-routed</span>
</button>
<button class="bot-ctrl-btn" type="button" id="botGitBtn" data-action="openBotGitModal" title="Connect a git repo">
<svg viewBox="0 0 24 24" width="15" height="15" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><line x1="6" y1="3" x2="6" y2="15"></line><circle cx="18" cy="6" r="3"></circle><circle cx="6" cy="18" r="3"></circle><path d="M18 9a9 9 0 0 1-9 9"></path></svg>
<span class="bot-ctrl-label" id="botGitBtnLabel">Git</span>
</button>
<button class="bot-ctrl-btn" type="button" id="botAnonBtn" data-action="openBotAnonModal" title="Chat from a throwaway key">
<svg viewBox="0 0 24 24" width="15" height="15" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M2 12s3-7 10-7 10 7 10 7-3 7-10 7-10-7-10-7Z"></path><line x1="3" y1="21" x2="21" y2="3"></line></svg>
<span class="bot-ctrl-label" id="botAnonBtnLabel">Anon</span>
</button>
<button class="bot-ctrl-btn bot-ctrl-buy" type="button" id="botBuyBtn" data-action="openBotCreditsModal" title="Buy Nymbot credits">
<svg viewBox="0 0 24 24" width="15" height="15" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><polygon points="13 2 3 14 12 14 11 22 21 10 12 10 13 2"></polygon></svg>
<span class="bot-ctrl-label">Buy</span>
</button>
</div>
<div class="messages-container" id="messagesScroller"><div class="messages-list" id="messagesContainer"></div></div>
<div class="cv-strip" id="columnsStrip">
<div class="cv-column cv-skeleton-col"><div class="cv-column-header"><span class="cv-col-icon"><span class="sk-bar sk-colicon"></span></span><span class="cv-col-title"><span class="sk-bar sk-coltitle"></span></span></div><div class="cv-column-scroller messages-container cv-scroller"><div class="cv-column-list messages-list cv-list"></div></div></div>
<div class="cv-column cv-skeleton-col"><div class="cv-column-header"><span class="cv-col-icon"><span class="sk-bar sk-colicon"></span></span><span class="cv-col-title"><span class="sk-bar sk-coltitle"></span></span></div><div class="cv-column-scroller messages-container cv-scroller"><div class="cv-column-list messages-list cv-list"></div></div></div>
<div class="cv-column cv-skeleton-col"><div class="cv-column-header"><span class="cv-col-icon"><span class="sk-bar sk-colicon"></span></span><span class="cv-col-title"><span class="sk-bar sk-coltitle"></span></span></div><div class="cv-column-scroller messages-container cv-scroller"><div class="cv-column-list messages-list cv-list"></div></div></div>
<button class="cv-add-column" type="button">+ Add column</button>
</div>
<div class="typing-indicator" id="typingIndicator">
<div class="typing-indicator-avatars" id="typingIndicatorAvatars"></div>
<div class="typing-indicator-dots"><span></span><span></span><span></span></div>
<div class="typing-indicator-text" id="typingIndicatorText"></div>
</div>
<button class="scroll-to-bottom-btn" id="scrollToBottomBtn" data-action="scrollToBottom"
title="Scroll to bottom">
<svg viewBox="0 0 24 24" width="20" height="20">
<polyline points="6 9 12 15 18 9"></polyline>
</svg>
</button>
<div class="input-container">
<div class="input-wrapper">
<div class="autocomplete-dropdown" id="autocompleteDropdown"></div>
<div class="autocomplete-dropdown" id="channelAutocomplete"></div>
<div class="emoji-autocomplete" id="emojiAutocomplete"></div>
<div class="command-palette" id="commandPalette"></div>
<div class="command-palette kaomoji-autocomplete" id="kaomojiAutocomplete"></div>
<div class="upload-progress" id="uploadProgress">
<button class="upload-progress-close" data-action="cancelUpload" title="Cancel upload" aria-label="Cancel upload">
<svg viewBox="0 0 24 24" width="16" height="16" stroke="currentColor" stroke-width="2" fill="none">
<line x1="18" y1="6" x2="6" y2="18"></line>
<line x1="6" y1="6" x2="18" y2="18"></line>
</svg>
</button>
<div id="uploadProgressLabel">Uploading...</div>
<div class="progress-bar">
<div class="progress-fill" id="progressFill"></div>
</div>
</div>
<div class="edit-preview nm-hidden" id="editPreview">
<div class="edit-preview-bar"></div>
<div class="edit-preview-content">
<span class="edit-preview-label">Editing message</span>
<span class="edit-preview-text" id="editPreviewText"></span>
</div>
<button class="quote-preview-close" id="editPreviewClose" title="Cancel edit">
<svg viewBox="0 0 24 24" width="16" height="16" stroke="currentColor" stroke-width="2" fill="none">
<line x1="18" y1="6" x2="6" y2="18"></line>
<line x1="6" y1="6" x2="18" y2="18"></line>
</svg>
</button>
</div>
<div class="quote-preview nm-hidden" id="quotePreview">
<div class="quote-preview-bar"></div>
<div class="quote-preview-content">
<span class="quote-preview-author" id="quotePreviewAuthor"></span>
<span class="quote-preview-text" id="quotePreviewText"></span>
</div>
<button class="quote-preview-close" id="quotePreviewClose" title="Cancel reply">
<svg viewBox="0 0 24 24" width="16" height="16" stroke="currentColor" stroke-width="2" fill="none">
<line x1="18" y1="6" x2="6" y2="18"></line>
<line x1="6" y1="6" x2="18" y2="18"></line>
</svg>
</button>
</div>
<div class="composer-panels" id="composerPanels">
<div class="media-preview-strip nm-hidden" id="mediaPreviewStrip" data-sig=""></div>
<div class="format-toolbar nm-hidden" id="formatToolbar" role="toolbar" aria-label="Message formatting"></div>
</div>
<div class="message-input-row">
<div class="message-input input-disabled" id="messageInput" role="textbox" aria-multiline="true"
contenteditable="false" data-placeholder="Message, / for commands, ? for Nymbot..."></div>
<div class="input-inline-actions" id="inputInlineActions">
<button class="format-input-btn" id="formatInputBtn" title="Formatting" aria-label="Formatting" aria-pressed="false">
<svg viewBox="0 0 24 24" width="16" height="16" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
<polyline points="4 7 4 4 20 4 20 7"></polyline>
<line x1="9" y1="20" x2="15" y2="20"></line>
<line x1="12" y1="4" x2="12" y2="20"></line>
</svg>
</button>
<button class="translate-input-btn nm-hidden" id="translateInputBtn" title="Translate text">
<svg viewBox="0 0 24 24" width="16" height="16" fill="currentColor">
<path d="m12.87 15.07-2.54-2.51.03-.03A17.52 17.52 0 0 0 14.07 6H17V4h-7V2H8v2H1v1.99h11.17C11.5 7.92 10.44 9.75 9 11.35 8.07 10.32 7.3 9.19 6.69 8h-2c.73 1.63 1.73 3.17 2.98 4.56l-5.09 5.02L4 19l5-5 3.11 3.11.76-2.04zM18.5 10h-2L12 22h2l1.12-3h4.75L21 22h2l-4.5-12zm-2.62 7 1.62-4.33L19.12 17h-3.24z"/>
</svg>
</button>
</div>
<div class="translate-input-dropdown" id="translateInputDropdown">
</div>
</div>
</div>
<div class="input-buttons">
<input type="file" class="file-input" id="fileInput" multiple accept="image/*,video/mp4,video/webm,video/ogg,video/quicktime">
<button class="icon-btn input-btn" data-action="selectImage" title="Upload Image/Video">
<svg viewBox="0 0 24 24">
<rect x="3" y="3" width="18" height="18" rx="2" ry="2"></rect>
<circle cx="8.5" cy="8.5" r="1.5"></circle>
<polyline points="21 15 16 10 5 21"></polyline>
</svg>
</button>
<input type="file" class="file-input" id="p2pFileInput">
<button class="icon-btn input-btn" data-action="selectP2PFile" title="Share File (P2P)">
<svg viewBox="0 0 24 24">
<path d="M13 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V9z"></path>
<polyline points="13 2 13 9 20 9"></polyline>
<line x1="12" y1="18" x2="12" y2="12"></line>
<polyline points="9 15 12 12 15 15"></polyline>
</svg>
</button>
<button class="icon-btn input-btn" data-action="toggleEmojiPicker" title="Emoji">
<svg viewBox="0 0 24 24">
<circle cx="12" cy="12" r="10"></circle>
<path d="M8 14s1.5 2 4 2 4-2 4-2"></path>
<circle cx="9" cy="9" r="1"></circle>
<circle cx="15" cy="9" r="1"></circle>
</svg>
</button>
<button class="icon-btn input-btn" data-action="toggleGifPicker" title="GIF">
<svg viewBox="0 0 24 24">
<text x="12" y="16" text-anchor="middle" font-size="12" fill="currentColor">GIF</text>
</svg>
</button>
<button class="send-btn" id="sendBtn" disabled>SEND</button>
</div>
<div class="emoji-picker" id="emojiPicker"></div>
<div class="gif-picker" id="gifPicker"></div>
</div>
</main>
</div>
<!-- Shop Modal -->
<div class="shop-modal" id="shopModal">
<div class="shop-content">
<button class="shop-close" data-action="closeShop">✕</button>
<div class="shop-header">
<div class="shop-title">
<span>FLAIR<br />
<span class="nm-h-16">Get addon packs to change the styling of your messages and
nickname that others will see across all channels (only in the Nymchat app).</span></span>
</div>
<div class="shop-recovery">
<input type="text" id="recoveryCodeInput" placeholder="Recovery code">
<button data-action="restorePurchasesFromInput">Restore</button>
</div>
</div>
<div class="shop-tabs">
<button class="shop-tab active" data-action="switchShopTab" data-shop-tab="styles">Message Styles</button>
<button class="shop-tab" data-action="switchShopTab" data-shop-tab="flair">Nickname Flair</button>
<button class="shop-tab" data-action="switchShopTab" data-shop-tab="special">Special Items</button>
<button class="shop-tab" data-action="switchShopTab" data-shop-tab="limited">Limited & Bundles</button>
<button class="shop-tab" data-action="switchShopTab" data-shop-tab="inventory">My Items</button>
</div>
<div class="shop-body" id="shopBody">
<!-- Content will be dynamically generated -->
</div>
</div>
</div>
<!-- Image/Video Modal -->
<div class="image-modal" id="imageModal" data-action="closeImageModal">
<span class="image-modal-close" data-action="closeImageModal">×</span>
<span class="image-modal-download" data-action="downloadModalMedia" title="Download">⤓</span>
<button class="image-modal-nav image-modal-prev nm-hidden" id="imageModalPrev" data-action="imageModalPrev" title="Previous">‹</button>
<button class="image-modal-nav image-modal-next nm-hidden" id="imageModalNext" data-action="imageModalNext" title="Next">›</button>
<img id="modalImage" src="" alt="Expanded image" decoding="async" loading="lazy">
<video id="modalVideo" controls playsinline webkit-playsinline class="nm-hidden nm-h-17" data-action="videoModalStop"></video>
</div>
<!-- Poll Modal -->
<div class="modal" id="pollModal">
<div class="modal-content nm-h-18">
<button class="modal-close" data-action="closeModal" data-modal-id="pollModal">✕</button>
<div class="modal-header">Create Poll</div>
<div class="modal-body">
<div class="form-group">
<label class="form-label">Question</label>
<input type="text" class="form-input" id="pollQuestion" placeholder="Ask a question..." maxlength="280">
</div>
<div id="pollOptionsContainer">
<label class="form-label">Options</label>
<div class="poll-option-input-row">
<input type="text" class="form-input" placeholder="Option 1" maxlength="100" data-poll-option>
</div>
<div class="poll-option-input-row">
<input type="text" class="form-input" placeholder="Option 2" maxlength="100" data-poll-option>
</div>
</div>
<button class="poll-add-option-btn" id="pollAddOptionBtn" data-action="addPollOption">+ Add option</button>
</div>
<div class="modal-actions">
<button class="icon-btn" data-action="closeModal" data-modal-id="pollModal">Cancel</button>
<button class="send-btn" data-action="submitPoll">Create Poll</button>
</div>
</div>
</div>
<!-- P2P File Transfers Modal -->
<div class="modal" id="p2pTransfersModal">
<div class="modal-content p2p-modal-content">
<button class="modal-close" data-action="closeModal" data-modal-id="p2pTransfersModal">✕</button>
<div class="modal-header">P2P File Transfers</div>
<div class="modal-body">
<div class="p2p-transfers-list" id="p2pTransfersList">
<div class="p2p-empty-state">No active transfers</div>
</div>
</div>
<div class="modal-actions">
<button class="icon-btn" data-action="closeModal" data-modal-id="p2pTransfersModal">Close</button>
</div>
</div>
</div>
<!-- Incoming Call Modal -->
<div class="modal" id="incomingCallModal">
<div class="modal-content incoming-call-content">
<div class="incoming-call-avatar-wrap">
<img src="" id="incomingCallAvatar" class="incoming-call-avatar" alt="">
</div>
<div class="incoming-call-name" id="incomingCallName"></div>
<div class="incoming-call-sub" id="incomingCallSub">Incoming call</div>
<div class="incoming-call-actions">
<button class="incoming-call-btn decline" data-action="rejectIncomingCall" title="Decline">
<svg viewBox="0 0 24 24" width="26" height="26" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
<path d="M22 16.92v3a2 2 0 0 1-2.18 2 19.79 19.79 0 0 1-8.63-3.07 19.5 19.5 0 0 1-6-6 19.79 19.79 0 0 1-3.07-8.67A2 2 0 0 1 4.11 2h3a2 2 0 0 1 2 1.72 12.84 12.84 0 0 0 .7 2.81 2 2 0 0 1-.45 2.11L8.09 9.91a16 16 0 0 0 6 6l1.27-1.27a2 2 0 0 1 2.11-.45 12.84 12.84 0 0 0 2.81.7A2 2 0 0 1 22 16.92z"></path>
</svg>
</button>
<button class="incoming-call-btn accept" data-action="acceptIncomingCall" title="Accept">
<svg viewBox="0 0 24 24" width="26" height="26" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">