-
-
Notifications
You must be signed in to change notification settings - Fork 16
/
yuna.html
1028 lines (967 loc) · 73.2 KB
/
yuna.html
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 data-bs-theme="dark" lang="en">
<head data-bs-theme="dark">
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="apple-mobile-web-app-status-bar-style" content="black-translucent">
<title>Yuna Ai</title>
<meta name="theme-color" content="#212529">
<link rel="canonical" href="http://www.yuna-ai.com">
<meta property="og:url" content="/">
<meta property="og:description" content="Your Private Companion">
<meta name="twitter:image" content="/static/img/yuna-ai.png">
<meta name="twitter:title" content="Yuna Ai">
<meta property="og:image" content="/static/img/yuna-ai.png">
<meta name="description" content="Your Private Companion">
<meta property="og:type" content="website">
<meta property="og:title" content="Yuna Ai">
<meta name="twitter:card" content="summary_large_image">
<meta name="twitter:description" content="Your Private Companion">
<meta name="apple-touch-fullscreen" content="yes" />
<meta name="apple-mobile-web-app-capable" content="yes">
<meta name="apple-mobile-web-app-status-bar-style" content="black-translucent">
<script type="application/ld+json">
{
"@context": "http://schema.org",
"@type": "WebSite",
"name": "Yuna Ai",
"url": "http://www.yuna-ai.com"
}
</script>
<link rel="icon" type="image/jpeg" sizes="60x60" href="/static/img/yuna-ai.png">
<link rel="manifest" href="/static/manifest.json">
<link rel="stylesheet" href="/static/css/bootstrap.min.css" rel="preload" as="style" media="all">
<link rel="stylesheet" href="/static/css/awesome.css" rel="preload" as="style" media="all">
<link rel="stylesheet" href="/static/css/kawai-v11-2.css" media="all">
<link rel="stylesheet" href="/static/css/index.css" media="all">
<script src="/static/js/kawai-v11-2.js" defer></script>
<script src="/static/js/kanojo.js" defer></script>
<script src="/static/js/index.js" defer></script>
<script src="/static/js/setup.js" defer></script>
<script src="/static/js/search.js" defer></script>
<script src="/static/js/pptxgen.js" defer></script>
<script src="/static/js/markdown.js" defer></script>
<script src="/static/js/creator.js" defer></script>
<script src="/static/js/diary.js" defer></script>
<style>
body {
margin: 0;
}
canvas {
display: block;
}
</style>
<script>
if ('serviceWorker' in navigator) {
window.addEventListener('load', function () {
navigator.serviceWorker.register('/static/sw.js').then(
function (registration) {
// Registration was successful
console.log('ServiceWorker registration successful with scope: ', registration
.scope);
},
function (err) {
// registration failed :(
console.log('ServiceWorker registration failed: ', err);
});
});
}
</script>
</head>
<body id="page-top">
<div id="wrapper">
<nav class="navbar sidebar sidebar-o bg-black align-items-start sidebar-dark accordion p-0 navbar-dark"
id="sidebar">
<div class="container-fluid d-flex flex-column p-0">
<div class="sidebar-header">
<a class="navbar-brand d-flex justify-content-center align-items-center sidebar-brand m-0" href="#">
<div class="sidebar-brand-icon">
<img src="/static/img/yuna-ai.png" alt="Yuna Ai Logo" style="width: 30px; height: 30px;">
</div>
<div class="sidebar-brand-text mx-3"><span>Yuna Ai</span></div>
</a>
</div>
<ul class="sidebar-menu">
<li><a href="#" class="nav-link side-link active" onclick="OpenTab('1')"><i class="fas fa-home"></i>
Home
<span class="badge badge-pill" id="messageCount">0</span></a></li>
<li><a href="#" class="nav-link side-link" onclick="OpenTab('2')"><i class="fas fa-compass"></i>
Explore
<span class="badge badge-pill" id="chatsCount">0</span></a>
</li>
<li><a href="#" class="nav-link side-link" onclick="OpenTab('4')"><i class="fas fa-user"></i>
Kanojo</a></li>
<li><a href="#" class="nav-link side-link" onclick="OpenTab('5')"><i class="fas fa-pencil-alt"></i>
Studio</a></li>
<li><a href="#" class="nav-link side-link"
onclick="OpenLink('https://www.patreon.com/YukiArimo')"><i class="fas fa-heart"></i>
Support</a>
</li>
</ul>
</div>
</nav>
<div class="d-flex flex-column" id="content-wrapper" style="background-color: none !important;">
<div id="content">
<nav class="navbar navbar-expand shadow mb-4 topbar static-top navbar-light topbar-o fixed-top">
<div class="container-fluid">
<ul class="navbar-nav">
<!-- Toggle Sidebar -->
<li
class="nav-item d-flex justify-content-center sidebarToggle align-items-center rounded-circle">
<a class="btn btn-link" href="#" onclick="toggleSidebar(); kawaiAutoScale();"
aria-label="Settings">
<i class="fas fa-bars"></i>
</a>
</li>
</ul>
<ul class="navbar-nav flex-nowrap ms-auto">
<!-- Profile Dropdown -->
<li class="nav-item dropdown no-arrow">
<a class="nav-link dropdown-toggle" href="#" id="userDropdown" role="button"
data-bs-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
<img class="border rounded-circle img-profile" src="/static/img/yuna-girl-head.webp"
alt="Profile Picture" style="height: 26px;">
</a>
<div class="dropdown-menu dropdown-menu-right shadow animated--grow-in"
aria-labelledby="userDropdown">
<!-- Home Tab -->
<a class="dropdown-item" href="#" onclick="OpenTab('1');">
<i class="fas fa-home fa-sm fa-fw mr-2 text-gray-400"></i>
Home
</a>
<!-- Explore Tab -->
<a class="dropdown-item" href="#" onclick="OpenTab('2');">
<i class="fas fa-compass fa-sm fa-fw mr-2 text-gray-400"></i>
Explore
</a>
<!-- Kanojo Tab -->
<a class="dropdown-item" href="#" onclick="OpenTab('4');">
<i class="fas fa-user fa-sm fa-fw mr-2 text-gray-400"></i>
Kanojo
</a>
<!-- Studio Tab -->
<a class="dropdown-item" href="#" onclick="OpenTab('5');">
<i class="fas fa-pencil-alt fa-sm fa-fw mr-2 text-gray-400"></i>
Studio
</a>
<!-- Search -->
<a class="dropdown-item" href="#" data-bs-toggle="modal"
data-bs-target="#searchModal">
<i class="fas fa-search fa-sm fa-fw mr-2 text-gray-400"></i>
Search
</a>
<!-- Call -->
<a class="dropdown-item" href="#" onclick="callYuna.show();">
<i class="fas fa-phone fa-sm fa-fw mr-2 text-gray-400"></i>
Call
</a>
</div>
</li>
</ul>
</div>
</nav>
<div class="container-fluid">
<div class="block-o">
<div class="tab-o tab-o-default" id="1">
<div class="" id="msgCol">
<div class="block-card block-scroll" id="message-container">
<!-- Dynamic HTML elements will be added here -->
</div>
</div>
<div class="search-container input-wrapper ui-container">
<div class="search-bar">
<!-- a button to open popup-->
<button class="search-button icon-left attach-button" data-bs-toggle="popover"
aria-label="Attach File" data-bs-placement="bottom" data-bs-html="true"
data-bs-content="<a class='btn btn-outline-primary btn-sm dropdown-item' onclick='handleTextFileClick()'>Text</a><a class='btn btn-outline-info btn-sm dropdown-item' onclick='handleImageFileClick()'>Image</a><a class='btn btn-outline-success btn-sm dropdown-item' onclick='handleAudioFileClick()'>Audio</a><a class='btn btn-outline-danger btn-sm dropdown-item' onclick='handleVideoFileClick()'>Video</a>">
<i class="fas fa-folder"></i>
</button>
<input type="file" id="textUpload" accept=".txt" style="display: none;"
onchange="captureTextViaFile()">
<input type="file" id="imageUpload" accept="image/*" style="display: none;"
onchange="captureImageViaFile(this)">
<input type="file" id="audioUpload" accept="audio/*" style="display: none;"
onchange="captureAudioViaFile()">
<input type="file" id="videoUpload" accept="video/*" style="display: none;"
onchange="captureVideoViaFile()">
<input id="input_text" type="text" class="input-field" placeholder="Ask Yuna..."
type="text" class="search-input">
<div class="form-check form-switch" style="display: none;">
<input class="form-check-input" type="checkbox" id="himitsuToggle">
<label class="form-check label" for="himitsuToggle">Himitsu Copilot</label>
</div>
<div class="form-check form-switch" id="himitsuToggle">
<input class="form-check-input" type="checkbox" id="himitsuToggle"
aria-label="Himitsu Copilot">
</div>
<button class="search-button icon-right" aria-label="Send">
<i class="fas fa-arrow-up" onclick="messageManagerInstance.sendMessage('')"></i>
</button>
</div>
</div>
</div>
<div class="tab-o" id="2">
<div class="coll-lo">
<div class="card settings-container el-9">
<div class="card-body card-full-stack">
<!-- Main Navigation Tabs: Explore, Himitsu, Diary -->
<ul class="nav nav-pills nav-fill mb-4" id="exploreTab" role="tablist">
<li class="nav-item" role="presentation">
<button class="nav-link active" id="explore-tab" data-bs-toggle="pill"
data-bs-target="#explore" type="button" role="tab"
aria-controls="explore" aria-selected="true">Explore</button>
</li>
<li class="nav-item" role="presentation">
<button class="nav-link" id="himitsu-tab" data-bs-toggle="pill"
data-bs-target="#himitsu" type="button" role="tab"
aria-controls="himitsu" aria-selected="false">Himitsu</button>
</li>
<li class="nav-item" role="presentation">
<button class="nav-link" id="diary-tab" data-bs-toggle="pill"
data-bs-target="#diary" type="button" role="tab"
aria-controls="diary" aria-selected="false">Diary</button>
</li>
</ul>
<!-- Main Tab Content -->
<div class="tab-content card-full-stack" id="exploreTabContent">
<!-- Explore Tab: Combines Chats and Collections -->
<div class="tab-pane fade show active" id="explore" role="tabpanel"
aria-labelledby="explore-tab">
<!-- Chats Section -->
<div class="d-flex justify-content-between align-items-center mb-3">
<h5 class="m-0 fw-bold">Chats</h5>
<div>
<button class="btn btn-primary btn-sm me-2"
onclick="historyManagerInstance.createHistoryFile();">
<i class="fas fa-plus"></i> Add
</button>
<button class="btn btn-secondary btn-sm"
onclick="historyManagerInstance.importHistory();">
<i class="fas fa-upload"></i> Load
</button>
</div>
</div>
<ul class="list-group mb-4" id="chat-items">
<!-- Dynamically Added Chat Items -->
</ul>
<!-- Collections Section -->
<ul class="list-group" id="collectionItems">
<!-- Collections Content -->
</ul>
</div>
<!-- Himitsu Tab: Himitsu Controls -->
<div class="tab-pane fade" id="himitsu" role="tabpanel"
aria-labelledby="himitsu-tab">
<div class="mb-3">
<h5 class="mb-3">Himitsu Controls</h5>
<!-- Add Himitsu Controls Content Here -->
<div class="list-group list-group" id="notifications-container">
<a class="list-group-item list-group-item-action d-flex align-items-center bg-dark text-white"
href="#">
<div>
<span class="font-weight-bold">Hello! Welcome to the
chat room!</span>
</div>
</a>
</div>
</div>
</div>
<!-- Diary Tab: Nested Sub-Tabs -->
<div class="tab-pane fade" id="diary" role="tabpanel"
aria-labelledby="diary-tab">
<!-- Nested Diary Sub-Tabs -->
<ul class="nav nav-pills nav-fill mb-3" id="diaryTab" role="tablist">
<li class="nav-item" role="presentation">
<button class="nav-link" id="entries-tab" data-bs-toggle="pill"
data-bs-target="#entries" type="button" role="tab"
aria-controls="entries" aria-selected="false">Diary
Entries</button>
</li>
<li class="nav-item" role="presentation">
<button class="nav-link active" id="notes-tab"
data-bs-toggle="pill" data-bs-target="#notes" type="button"
role="tab" aria-controls="notes"
aria-selected="true">Notes/Memories</button>
</li>
<li class="nav-item" role="presentation">
<button class="nav-link" id="schedule-tab" data-bs-toggle="pill"
data-bs-target="#schedule" type="button" role="tab"
aria-controls="schedule"
aria-selected="false">Timetable/Schedule</button>
</li>
</ul>
<!-- Nested Diary Tab Content -->
<div class="tab-content" id="diaryTabContent">
<!-- Diary Entries Sub-Tab -->
<div class="tab-pane fade" id="entries" role="tabpanel"
aria-labelledby="entries-tab">
<!-- New Diary Entry Form -->
<div class="card shadow-sm mb-5">
<div class="card-body">
<h5 class="card-title mb-3">New Diary Entry</h5>
<form id="entry-form">
<div class="mb-3">
<input type="text" class="form-control"
id="entry-title" name="title"
placeholder="Title" required>
</div>
<div class="mb-3">
<textarea class="form-control" id="entry-text"
name="text" rows="3"
placeholder="Write your thoughts..."
required></textarea>
</div>
<div class="mb-3">
<input type="datetime-local"
class="form-control" id="entry-date"
name="date" required>
</div>
<div class="mb-3">
<input type="file" class="form-control"
id="entry-image" name="image"
accept="image/*">
</div>
<button type="submit" class="btn btn-primary"
id="add-entry">Add Entry</button>
</form>
</div>
</div>
<!-- Entries Display Container -->
<div id="entries-container">
<!-- Diary Entries Will Be Displayed Here -->
</div>
</div>
<!-- Notes/Memories Sub-Tab -->
<div class="tab-pane fade active show" id="notes" role="tabpanel"
aria-labelledby="notes-tab">
<!-- New Note/Memory Form -->
<div class="card shadow-sm mb-5">
<div class="card-body">
<h5 class="card-title mb-3">New Note/Memory</h5>
<form id="note-form">
<div class="mb-3">
<input type="text" class="form-control"
id="note-title" name="title"
placeholder="Title" required>
</div>
<div class="mb-3">
<textarea class="form-control" id="note-text"
name="text" rows="3"
placeholder="Write your note or memory..."
required></textarea>
</div>
<button type="submit" class="btn btn-success"
id="add-note">Add Note</button>
</form>
</div>
</div>
<!-- Notes Display Container -->
<div id="notes-container">
<!-- Notes Will Be Displayed Here -->
</div>
</div>
<!-- Timetable/Schedule Sub-Tab -->
<div class="tab-pane fade" id="schedule" role="tabpanel"
aria-labelledby="schedule-tab">
<!-- New Schedule Item Form -->
<div class="card shadow-sm mb-5">
<div class="card-body">
<h5 class="card-title mb-3">New Schedule Item</h5>
<form id="schedule-form">
<div class="mb-3">
<input type="text" class="form-control"
id="schedule-title" name="title"
placeholder="Title" required>
</div>
<div class="mb-3">
<input type="datetime-local"
class="form-control" id="schedule-time"
name="time" required>
</div>
<button type="submit" class="btn btn-info"
id="add-schedule">Add Schedule</button>
</form>
</div>
</div>
<!-- Schedule Display Container -->
<div id="schedule-container">
<!-- Schedule Items Will Be Displayed Here -->
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<div class="tab-o" id="4">
<div class="coll-lo">
<div class="col-10 settings-container el-9 profile-card">
<div class="row align-items-stretch">
<div class="col-md-2 mb-3 mb-sm-0">
<div class="card">
<img src="/static/img/yuna-girl-head.webp" class="card-img-top"
alt="Profile Picture">
<div class="card-body">
<div style="display: flex; flex-direction: row;">
<h5 class="card-title" id="yuna-name">Yuna Ai</h5>
</div>
<p class="card-text">Calgary, Canada</p>
<button class="btn btn-primary">Upload</button>
</div>
</div>
</div>
<div class="col-md-10">
<div class="card">
<div class="card-body">
<h5 class="card-title">Kanojo Management</h5>
<div class="mb-3">
<label for="kanojoSelect" class="form-label">Select
Kanojo</label>
<select class="form-select" id="kanojoSelect"></select>
</div>
<div class="mb-3">
<button type="button" class="btn btn-primary"
id="saveKanojo">Save</button>
<button type="button" class="btn btn-primary"
id="addKanojo">Add</button>
<button type="button" class="btn btn-secondary"
id="deleteKanojo">Delete</button>
</div>
<div class="mb-3">
<button type="button" class="btn btn-primary"
id="exportKanojos">Export All</button>
<button type="button" class="btn btn-primary"
id="importKanojos">Import All</button>
</div>
<div class="mb-3">
<button type="button" class="btn btn-primary"
id="exportSingleKanojo">Export Single</button>
<button type="button" class="btn btn-primary"
data-bs-toggle="modal" data-bs-target="#fileModal">Import
Single</button>
</div>
</div>
</div>
</div>
</div>
<!-- Name, Memory, Character with Emotional Profile -->
<div class="row mt-4">
<div class="col-md-12">
<div class="card">
<div class="card-body">
<form>
<div class="mb-3">
<label for="yuna-ai-names" class="form-label">Name</label>
<input type="text" class="form-control" id="kanojoName">
</div>
<div class="mb-3">
<label for="yuna-ai-memory"
class="form-label">Memory</label>
<textarea class="form-control" id="kanojoMemory"></textarea>
</div>
<div class="mb-3">
<label for="character" class="form-label">Character</label>
<textarea class="form-control"
id="kanojoCharacter"></textarea>
</div>
<!-- Integrated Emotional Profile Sliders -->
<div class="mb-3">
<label for="uiuxDesign" class="form-label">Cuteness</label>
<input type="range" class="form-range" id="uiuxDesign">
</div>
<div class="mb-3">
<label for="uiuxDesigntwo"
class="form-label">Obsessive</label>
<input type="range" class="form-range" id="uiuxDesigntwo">
</div>
</form>
</div>
</div>
</div>
</div>
<!-- Combined Customization Section -->
<div class="row mt-4">
<div class="col-md-12">
<div class="card">
<div class="card-body">
<h5 class="card-title">Customization</h5>
<div class="d-flex flex-wrap">
<!-- Plugins Settings -->
<div class="me-4">
<label for="testNonIntegrated" class="form-label">Himitsu
Actions</label>
<div class="form-check form-switch">
<input class="form-check-input" type="checkbox"
id="testNonIntegrated">
<label class="form-check-label"
for="testNonIntegrated">Pseudo API</label>
</div>
<div class="form-check form-switch">
<input class="form-check-input" type="checkbox"
id="testNonIntegrated">
<label class="form-check-label"
for="testNonIntegrated">Functions</label>
</div>
<div class="form-check form-switch">
<input class="form-check-input" type="checkbox"
id="testNonIntegrated">
<label class="form-check-label"
for="testNonIntegrated">Notifications</label>
</div>
</div>
<!-- Customization Settings -->
<div class="me-4">
<label for="customConfig"
class="form-label">Configuration</label>
<div class="form-check form-switch">
<input class="form-check-input" type="checkbox"
id="customConfig">
<label class="form-check-label"
for="customConfig">Custom Config</label>
</div>
<div class="form-check form-switch">
<input class="form-check-input" type="checkbox"
id="soundsMode">
<label class="form-check-label"
for="soundsMode">Sounds</label>
</div>
<div class="form-check form-switch">
<input class="form-check-input" type="checkbox"
id="useHistory">
<label class="form-check-label" for="useHistory">Use
History</label>
</div>
</div>
<!-- Customization Settings -->
<div class="me-4">
<label for="backgroundCall"
class="form-label">General</label>
<div class="form-check form-switch">
<input class="form-check-input" type="checkbox"
id="backgroundCall">
<label class="form-check-label"
for="backgroundCall">Background Call</label>
</div>
<div class="form-check form-switch">
<input class="form-check-input" type="checkbox"
id="nsfw">
<label class="form-check-label" for="nsfw">NSFW</label>
</div>
<div class="form-check form-switch">
<input class="form-check-input" type="checkbox"
id="streamingChatMode">
<label class="form-check-label"
for="streamingChatMode">Streaming</label>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<!-- Prompt Templates Section -->
<div class="row mt-4">
<div class="col-md-12">
<div class="card">
<div class="card-body">
<h5 class="card-title">Prompt Templates</h5>
<div class="mb-3">
<label for="promptTemplateSelect" class="form-label">Select
Prompt Template</label>
<select class="form-select" id="promptTemplateSelect"></select>
</div>
<div class="mb-3">
<label for="promptTemplateName" class="form-label">Prompt
Template Name</label>
<input type="text" class="form-control" id="promptTemplateName">
</div>
<div class="mb-3">
<label for="promptTemplateContent" class="form-label">Prompt
Template Content</label>
<textarea class="form-control"
id="promptTemplateContent"></textarea>
</div>
<button type="button" class="btn btn-primary"
id="savePromptTemplate">Save</button>
<button type="button" class="btn btn-secondary"
id="cancelPromptTemplate">Cancel</button>
<button type="button" class="btn btn-danger"
id="deletePromptTemplate">Delete</button>
<button type="button" class="btn btn-primary"
id="exportPromptTemplates">Export All</button>
<button type="button" class="btn btn-primary"
id="importPromptTemplates">Import All</button>
</div>
</div>
</div>
</div>
<div class="row mt-4 mb-6">
<div class="col-md-12">
<div class="card">
<div class="card-body">
<div class="list-group-item" style="background-color: transparent;">
<h6>Config</h6>
<div id="parameter-container">
<!-- Dynamic HTML elements will be added here -->
</div>
<button class="btn btn-secondary" onclick="saveConfigParams()">
Save
</button>
<button class="btn btn-secondary"
onclick="localStorage.clear(); location.reload();">
Reset
</button>
</div>
</div>
</div>
</div>
</div>
<!-- File Import Modal -->
<div class="modal fade" id="fileModal" tabindex="-1"
aria-labelledby="fileModalLabel" aria-hidden="true">
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header">
<h5 class="modal-title" id="fileModalLabel">Import Kanojo</h5>
<button type="button" class="btn-close" data-bs-dismiss="modal"
aria-label="Close"></button>
</div>
<div class="modal-body">
<input type="file" id="fileInput" accept=".json">
</div>
<div class="modal-footer">
<button type="button" class="btn btn-secondary"
data-bs-dismiss="modal">Close</button>
<button type="button" class="btn btn-primary"
id="fileSubmit">Submit</button>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<div class="tab-o" id="5">
<div class="coll-lo">
<div class="card settings-container profile-card el-9">
<ul class="nav nav-pills nav-fill mb-4" role="tablist">
<li class="nav-item" role="presentation">
<button class="nav-link active" id="naked-tab" data-bs-toggle="pill"
data-bs-target="#naked" type="button" role="tab" aria-controls="naked"
aria-selected="false">Naked</button>
</li>
<li class="nav-item" role="presentation">
<button class="nav-link" id="article-tab" data-bs-toggle="pill"
data-bs-target="#article" type="button" role="tab"
aria-controls="article" aria-selected="true">Article</button>
</li>
<li class="nav-item" role="presentation">
<button class="nav-link" id="presentation-tab" data-bs-toggle="pill"
data-bs-target="#presentation" type="button" role="tab"
aria-controls="presentation" aria-selected="false">Presentation</button>
</li>
<li class="nav-item" role="presentation">
<button class="nav-link" id="audiobook-tab" data-bs-toggle="pill"
data-bs-target="#audiobook" type="button" role="tab"
aria-controls="audiobook" aria-selected="false">Audiobook</button>
</li>
</ul>
<div class="tab-content">
<div class="tab-pane fade show active" id="naked" role="tabpanel"
aria-labelledby="naked-tab">
<div class="row g-4">
<div class="row mt-4">
<div class="col-12">
<div class="form-group">
<h5 class="mb-3">Work Area</h5>
<textarea class="form-control"
id="naked-work-area"></textarea>
</div>
</div>
</div>
<div class="d-grid gap-2 mt-4 mb-6">
<button type="button" id="send-create-naked"
class="btn btn-primary">Create</button>
</div>
</div>
</div>
<div class="tab-pane fade" id="article" role="tabpanel"
aria-labelledby="article-tab">
<div class="row g-4">
<div class="col-md-6">
<div class="form-group">
<h5 class="mb-3">Prompt Template</h5>
<textarea class="form-control"
id="article-prompt-template"></textarea>
</div>
</div>
<div class="col-md-6" id="user-input-article-container">
<div class="form-group">
<h5 class="mb-3">User Input</h5>
<textarea class="form-control"
id="article-user-input"></textarea>
</div>
</div>
</div>
<div class="d-grid gap-2 mt-4">
<button type="button" id="send-create-article"
class="btn btn-primary">Create</button>
</div>
<div class="row g-4 mt-4">
<div class="col-md-6">
<div class="form-group">
<h5 class="mb-3">Output Text</h5>
<textarea class="form-control"
id="article-output-text"></textarea>
</div>
</div>
<div class="col-md-6">
<div class="form-group">
<h5 class="mb-3">Draft Text</h5>
<textarea class="form-control"
id="article-draft-text"></textarea>
</div>
</div>
</div>
<div class="d-grid gap-2 mt-4 mb-6">
<button type="button" id="copy-to-draft" class="btn btn-secondary">Copy
to Draft</button>
</div>
</div>
<div class="tab-pane fade" id="presentation" role="tabpanel"
aria-labelledby="presentation-tab">
<div class="row g-4">
<!-- Markdown and Controls Column -->
<div class="col-md-6">
<div class="form-group">
<h5 class="mb-3">Markdown Editor</h5>
<textarea class="form-control" id="markdown-input"
placeholder="Write your presentation in Markdown..."></textarea>
</div>
<div class="form-group mt-3">
<button class="btn btn-primary me-2"
id="save-button">Save</button>
<button class="btn btn-success me-2" id="export-button">Export
as PPTX</button>
<button class="btn btn-secondary"
id="clear-button">Clear</button>
</div>
</div>
<!-- Preview Column -->
<div class="col-md-6">
<div class="form-group">
<h5 class="mb-3">Preview</h5>
<div id="preview"></div>
</div>
</div>
</div>
</div>
<div class="tab-pane fade" id="audiobook" role="tabpanel" aria-labelledby="audiobook-tab">
<div class="row justify-content-center">
<div class="col-lg-10">
<div class="card shadow-sm">
<div class="card-header bg-primary text-white d-flex justify-content-between align-items-center">
<h3 class="card-title mb-0">📚 Audiobook Generator</h3>
<div class="d-flex align-items-center">
<select class="form-select me-2" id="projectSelect">
<option value="">Select Project</option>
</select>
<button class="btn btn-light btn-sm me-2" id="newProjectBtn">
<i class="fas fa-plus"></i> New Project
</button>
<div class="form-check form-switch">
<input class="form-check-input" type="checkbox" id="modeToggle">
<label class="form-check-label" for="modeToggle">Listening Mode</label>
</div>
</div>
</div>
<div class="card-body">
<!-- Project Info -->
<div class="mb-4" id="projectInfo">
<div class="d-flex justify-content-between align-items-center">
<h4 id="currentProject">No Project Selected</h4>
<button class="btn btn-outline-danger btn-sm" id="deleteProjectBtn" disabled>
<i class="fas fa-trash"></i> Delete Project
</button>
</div>
</div>
<!-- Text Input (Visible in Generation Mode) -->
<div class="mb-4 generation-mode">
<label for="textInput" class="form-label">Enter Your Text</label>
<textarea id="textInput" class="form-control" rows="6" placeholder="Enter your text here..."></textarea>
</div>
<!-- Actions -->
<div class="d-flex mb-4 generation-mode">
<button class="btn btn-success flex-grow-1 me-2" id="speakButton">🎤 Generate Audiobook</button>
<button class="btn btn-warning flex-grow-1 me-2" id="mergeButton" disabled>🔀 Merge Chunks</button>
<a href="#" class="btn btn-primary flex-grow-1" id="downloadButton" disabled>⬇️ Download Audiobook</a>
</div>
<!-- Progress Bar -->
<div class="progress mb-4" style="height: 25px;">
<div id="progressBar" class="progress-bar" role="progressbar" style="width: 0%;" aria-valuenow="0" aria-valuemin="0" aria-valuemax="100">0%</div>
</div>
<!-- Status Alert -->
<div class="alert alert-info" id="status" role="alert">Status: Idle</div>
<!-- Audio Player (Enhanced) -->
<div class="mt-4 mb-4">
<div class="card">
<div class="card-body">
<h5 class="card-title">Enhanced Audio Player</h5>
<div class="audio-player-wrapper">
<audio id="audioPlayer" class="w-100" controls></audio>
<div class="time-slider mt-2">
<input type="range" class="form-range" id="timeSlider" min="0" max="100" value="0">
<div class="d-flex justify-content-between">
<small id="currentTime">0:00</small>
<small id="duration">0:00</small>
</div>
</div>
<div class="btn-group mt-2">
<button class="btn btn-sm btn-outline-secondary" id="playPauseBtn">
<i class="fas fa-play"></i>
</button>
<button class="btn btn-sm btn-outline-secondary" id="stopBtn">
<i class="fas fa-stop"></i>
</button>
<button class="btn btn-sm btn-outline-secondary" id="prevChunkBtn">
<i class="fas fa-step-backward"></i>
</button>
<button class="btn btn-sm btn-outline-secondary" id="nextChunkBtn">
<i class="fas fa-step-forward"></i>
</button>
</div>
</div>
</div>
</div>
</div>
<!-- Block List -->
<div class="mt-4">
<div class="d-flex justify-content-between align-items-center mb-2">
<h5>Audio Chunks</h5>
<div class="btn-group">
<button class="btn btn-sm btn-outline-secondary" id="moveUpBtn" disabled>
<i class="fas fa-arrow-up"></i>
</button>
<button class="btn btn-sm btn-outline-secondary" id="moveDownBtn" disabled>
<i class="fas fa-arrow-down"></i>
</button>
</div>
</div>
<div class="list-group" id="blockList">
<!-- Blocks will be dynamically added here -->
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<div class="scroll-to-top" style="display: none;"></div>
<audio id="backgroundMusic">
<source src="/static/audio/audio.mp3" type="audio/mpeg">
</audio>
</div>
<!-- Video Call Modal -->
<div class="modal fade" id="videoCallModal" tabindex="-1" aria-labelledby="videoCallModalLabel" aria-hidden="true">
<div class="modal-dialog modal-lg modal-dialog-centered">
<div class="modal-content bg-dark text-light">
<div class="modal-header border-0">
<h5 class="modal-title" id="videoCallModalLabel">
<i class="fas fa-video me-2"></i>Video Call with Yuna
</h5>
<button type="button" class="btn-close btn-close-white" data-bs-dismiss="modal"
aria-label="Close"></button>
</div>
<div class="modal-body p-0">
<div class="row g-0">
<div class="col-md-6 video-container">
<div class="ratio ratio-16x9">
<img src="/static/img/yuna-girl-head.webp" class="img-fluid rounded" alt="Yuna">
</div>
</div>
<div class="col-md-6 video-container">
<div class="ratio ratio-16x9">
<video id="localVideo" class="rounded" muted autoplay playsinline></video>
</div>
</div>
</div>
</div>
<div class="modal-footer border-0 justify-content-center">
<div class="call-controls">
<button type="button" class="btn btn-outline-light rounded-circle me-2"
onclick="captureImage()">
<i class="fas fa-camera"></i>
</button>
<button type="button" class="btn btn-outline-light rounded-circle me-2" id="buttonAudioRec">
<i class="fas fa-microphone" id="iconAudioRec"></i>
</button>
<button type="button" class="btn btn-danger rounded-circle"
onclick="document.getElementById('videoCallModal').dispatchEvent(new Event('hidden.bs.modal'));">
<i class="fas fa-phone-slash"></i>
</button>
</div>
</div>
</div>
</div>
</div>
<canvas id="capture-canvas" style="display: none;"></canvas>
<div class="modal fade" id="searchModal" tabindex="-1" aria-labelledby="searchModalLabel" aria-hidden="true">
<div class="modal-dialog">
<div class="modal-content bg-dark text-light">
<div class="modal-header">
<h5 class="modal-title" id="videoCallModalLabel">Search</h5>
<button type="button" class="btn-close btn-close-white" data-bs-dismiss="modal"
aria-label="Close"></button>
</div>
<div class="modal-body">
<div class="input-group mb-3">
<input type="text" id="searchInput" class="form-control rounded-pill"
placeholder="Enter your search" aria-label="Search input">
<button id="searchButton" class="btn btn-outline-light rounded-pill ms-2">Search</button>
</div>
<div id="requestResults" class="alert alert-info d-none"></div>
<div id="answerResults"></div>
<div id="results" class="row row-cols-1 row-cols-md-3 g-4"></div>
<div id="analysisResult" class="row row-cols-1 row-cols-md-3 g-4"></div>
</div>
<div class="modal-footer">
<!-- Close button -->
<button type="button" class="btn btn-secondary" data-bs-dismiss="modal">Close</button>