-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.html
More file actions
1499 lines (1449 loc) · 90.2 KB
/
Copy pathindex.html
File metadata and controls
1499 lines (1449 loc) · 90.2 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" data-query-app-ready="false">
<head>
<meta charset="UTF-8">
<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">
<meta http-equiv="Cache-Control" content="no-cache, no-store, must-revalidate">
<link rel="preconnect" href="https://fonts.googleapis.com">
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
<link href="https://fonts.googleapis.com/css2?family=Alex+Brush&display=swap" rel="stylesheet">
<meta http-equiv="Pragma" content="no-cache">
<meta http-equiv="Expires" content="0">
<meta name="theme-color" content="#0f172a">
<meta name="application-name" content="Library Item Reports">
<meta name="apple-mobile-web-app-title" content="Item Reports">
<title>Library Item Reports</title>
<script>
(() => {
const key = 'queryProjectTheme';
const root = document.documentElement;
const resolveSystemTheme = () => (
window.matchMedia && window.matchMedia('(prefers-color-scheme: dark)').matches
? 'dark'
: 'light'
);
try {
const savedTheme = localStorage.getItem(key);
if (savedTheme === 'light' || savedTheme === 'dark') {
root.dataset.theme = savedTheme;
root.dataset.themeResolved = savedTheme;
return;
}
} catch (_) {}
root.dataset.themeResolved = resolveSystemTheme();
})();
</script>
<link href="https://cdn.jsdelivr.net/npm/tailwindcss@2.2.19/dist/tailwind.min.css" rel="stylesheet">
<link href="src/styles/app.css" rel="stylesheet" data-app-stylesheet>
<link rel="icon" href="assets/favicon-32.png" type="image/png" sizes="32x32">
<link rel="icon" href="assets/favicon-16.png" type="image/png" sizes="16x16">
<link rel="icon" href="assets/favicon.svg" type="image/svg+xml" sizes="any">
<link rel="apple-touch-icon" href="assets/app-icon-180.png">
<link rel="manifest" href="site.webmanifest">
</head>
<body class="relative min-h-screen overflow-x-hidden overflow-y-auto pt-16 px-6 pb-6 app-starting" id="page-body">
<div id="overlay"></div>
<!-- New Header Bar -->
<div id="header-bar" class="fixed top-0 left-0 right-0 text-white py-3 px-6 flex justify-between items-center">
<span id="header-overlay-title" class="hidden" aria-live="polite" aria-atomic="true"></span>
<span id="header-arrange-status" class="header-arrange-status hidden" aria-live="polite" aria-atomic="true"></span>
<div id="header-controls" class="flex gap-2">
<button id="auth-session-button"
class="auth-session-button p-2 rounded-full bg-white hover:bg-gray-100 text-black focus:outline-none transition-colors border border-gray-200"
type="button" aria-label="Staff sign in" data-tooltip="Staff sign in" data-tooltip-delay="0">
<svg viewBox="0 0 24 24" class="w-5 h-5 pointer-events-none" fill="none" stroke="currentColor" stroke-width="1.9" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true">
<circle cx="12" cy="8" r="4"></circle>
<path d="M4.5 21a7.5 7.5 0 0 1 15 0"></path>
</svg>
</button>
<button id="auth-header-signout"
class="auth-header-signout hidden"
type="button" aria-label="Sign out">
<span class="auth-header-signout-label">Sign out</span>
</button>
<button id="run-query-btn"
class="p-2 rounded-full bg-green-500 hover:bg-green-600 text-white focus:outline-none transition-colors"
aria-label="Run query" data-tooltip="Run Query" data-tooltip-delay="0">
<!-- Play icon -->
<svg id="run-icon" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor" class="w-5 h-5">
<polygon points="5,3 19,12 5,21"></polygon>
</svg>
<!-- Refresh icon (hidden by default) -->
<svg id="refresh-icon" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="w-5 h-5 hidden">
<path d="M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8"/>
<path d="M21 3v5h-5"/>
<path d="M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16"/>
<path d="M3 21v-5h5"/>
</svg>
<!-- Stop icon (hidden by default) -->
<svg id="stop-icon" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor"
class="w-5 h-5 hidden">
<rect x="6" y="6" width="12" height="12" rx="2"/>
</svg>
</button>
<button id="toggle-json"
class="p-2 rounded-full bg-white hover:bg-gray-100 text-black focus:outline-none transition-colors border border-gray-200"
data-tooltip="Show Query JSON" data-tooltip-delay="0">
<svg class="json-icon w-5 h-5 pointer-events-none" viewBox="0 0 24 24" fill="none" aria-hidden="true">
<path class="json-brace json-brace-left" d="M8.25 4.75H7.6c-1.15 0-1.9.72-1.9 1.88v2.2c0 .9-.52 1.42-1.45 1.42H3.5v3.5h.75c.93 0 1.45.52 1.45 1.42v2.2c0 1.16.75 1.88 1.9 1.88h.65" stroke="currentColor" stroke-width="1.9" stroke-linecap="round" stroke-linejoin="round"/>
<path class="json-brace json-brace-right" d="M15.75 4.75h.65c1.15 0 1.9.72 1.9 1.88v2.2c0 .9.52 1.42 1.45 1.42h.75v3.5h-.75c-.93 0-1.45.52-1.45 1.42v2.2c0 1.16-.75 1.88-1.9 1.88h-.65" stroke="currentColor" stroke-width="1.9" stroke-linecap="round" stroke-linejoin="round"/>
<g class="json-nodes" fill="currentColor">
<circle cx="10" cy="8" r="1.1"/>
<circle cx="14" cy="12" r="1.1"/>
<circle cx="10" cy="16" r="1.1"/>
</g>
</svg>
</button>
<button id="toggle-bib-compare"
class="p-2 rounded-full bg-white hover:bg-gray-100 text-black focus:outline-none transition-colors border border-gray-200"
type="button"
aria-label="Hydration"
data-mobile-menu-label="Hydration"
data-tooltip="Hydration"
data-tooltip-delay="0">
<svg viewBox="0 0 24 24" class="hydration-drop-icon w-5 h-5 pointer-events-none" aria-hidden="true">
<path class="hydration-drop-icon__body" d="M12 2.4c-.8 2.1-6.4 7.7-6.4 12.2A6.4 6.4 0 0 0 12 21a6.4 6.4 0 0 0 6.4-6.4C18.4 10.1 12.8 4.5 12 2.4Z"/>
<path class="hydration-drop-icon__shade" d="M12 21a6.4 6.4 0 0 0 6.4-6.4c0-2.7-2.1-5.8-4-8.3.8 4.9-.7 10.7-6.3 12.7A6.35 6.35 0 0 0 12 21Z"/>
<path class="hydration-drop-icon__shine" d="M9 8.5c-1.1 1.6-1.8 3.2-1.8 4.7 0 .8.2 1.5.5 2.1"/>
</svg>
</button>
<button id="toggle-queries"
class="p-2 rounded-full bg-white hover:bg-gray-100 text-black focus:outline-none transition-colors border border-gray-200"
aria-label="Activity" data-tooltip="Show Shared History" data-tooltip-delay="0">
<svg class="history-animated w-5 h-5 pointer-events-none" viewBox="0 0 24 24" fill="none">
<circle cx="12" cy="12" r="10" stroke="currentColor" stroke-width="1.5" stroke-dasharray="0.5 3.5"/>
<path d="M22 12C22 6.47715 17.5228 2 12 2" stroke="currentColor" stroke-width="1.5" stroke-linecap="round"/>
<g class="clock-hour">
<line x1="12" y1="12" x2="12" y2="8.5" stroke="currentColor" stroke-width="2" stroke-linecap="round"/>
</g>
<g class="clock-minute">
<line x1="12" y1="12" x2="16.5" y2="10.5" stroke="currentColor" stroke-width="2" stroke-linecap="round"/>
</g>
</svg>
</button>
<button id="toggle-templates"
class="p-2 rounded-full bg-white hover:bg-gray-100 text-black focus:outline-none transition-colors border border-gray-200"
aria-label="Templates" data-tooltip="Show Query Templates" data-tooltip-delay="0">
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 64 64" class="template-default-icon template-blocks-icon w-5 h-5 pointer-events-none" aria-hidden="true">
<g class="template-block template-block-top">
<rect x="14" y="8" width="26" height="16" rx="5" fill="#FFFFFF" stroke="#111827" stroke-width="4"/>
<circle cx="23" cy="8" r="4" fill="#FFFFFF" stroke="#111827" stroke-width="4"/>
<circle cx="32" cy="8" r="4" fill="#FFFFFF" stroke="#111827" stroke-width="4"/>
</g>
<g class="template-block template-block-middle">
<rect x="24" y="26" width="30" height="16" rx="5" fill="#FFFFFF" stroke="#111827" stroke-width="4"/>
<circle cx="34" cy="26" r="4" fill="#FFFFFF" stroke="#111827" stroke-width="4"/>
<circle cx="44" cy="26" r="4" fill="#FFFFFF" stroke="#111827" stroke-width="4"/>
</g>
<g class="template-block template-block-bottom">
<rect x="10" y="44" width="32" height="14" rx="5" fill="#FFFFFF" stroke="#111827" stroke-width="4"/>
<circle cx="21" cy="44" r="4" fill="#FFFFFF" stroke="#111827" stroke-width="4"/>
<circle cx="31" cy="44" r="4" fill="#FFFFFF" stroke="#111827" stroke-width="4"/>
</g>
</svg>
</button>
<button id="toggle-api-settings"
class="p-2 rounded-full bg-white hover:bg-gray-100 text-black focus:outline-none transition-colors border border-gray-200"
aria-label="API Settings" data-tooltip="API Settings" data-tooltip-delay="0">
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" class="api-settings-gear-icon w-5 h-5 pointer-events-none" fill="none" stroke="currentColor" stroke-width="1.9" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true">
<g class="api-settings-gear-shape">
<path d="M10.25 2.75h3.5l.55 2.45c.55.18 1.08.4 1.58.68l2.15-1.27 2.47 2.47-1.27 2.15c.28.5.5 1.03.68 1.58l2.45.55v3.5l-2.45.55a7.5 7.5 0 0 1-.68 1.58l1.27 2.15-2.47 2.47-2.15-1.27c-.5.28-1.03.5-1.58.68l-.55 2.45h-3.5l-.55-2.45a7.5 7.5 0 0 1-1.58-.68l-2.15 1.27-2.47-2.47 1.27-2.15a7.5 7.5 0 0 1-.68-1.58l-2.45-.55v-3.5l2.45-.55c.18-.55.4-1.08.68-1.58L3.5 7.08l2.47-2.47 2.15 1.27c.5-.28 1.03-.5 1.58-.68l.55-2.45Z"/>
<circle cx="12" cy="12" r="3.45"/>
</g>
</svg>
</button>
<button id="toggle-help"
class="p-2 rounded-full bg-white hover:bg-gray-100 text-black focus:outline-none transition-colors border border-gray-200"
aria-label="Help" data-tooltip="Show Help" data-tooltip-delay="0">
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="help-icon w-5 h-5 pointer-events-none">
<circle cx="12" cy="12" r="10"></circle>
<path class="help-question-mark" d="M9.09 9a3 3 0 0 1 5.83 1c0 2-3 3-3 3"></path>
<line class="help-question-dot" x1="12" y1="17" x2="12.01" y2="17"></line>
</svg>
</button>
<button id="theme-toggle"
class="theme-toggle p-2 rounded-full bg-white hover:bg-gray-100 text-black focus:outline-none transition-colors border border-gray-200"
type="button"
data-theme-toggle
data-mobile-menu-label="Theme"
aria-label="Toggle color theme"
data-tooltip="Theme: Auto" data-tooltip-delay="0">
<span class="theme-toggle-icon" aria-hidden="true"></span>
<span class="theme-toggle-label">Auto</span>
</button>
</div>
<!-- Hamburger Menu Button (only visible on mobile) -->
<button id="mobile-menu-toggle" class="p-2 rounded-full bg-white hover:bg-gray-100 text-black focus:outline-none transition-colors border border-gray-200" type="button" aria-label="Open menu" aria-controls="mobile-menu-dropdown" aria-expanded="false" data-tooltip="Open Menu" data-tooltip-delay="0">
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="w-5 h-5">
<line x1="3" y1="12" x2="21" y2="12"></line>
<line x1="3" y1="6" x2="21" y2="6"></line>
<line x1="3" y1="18" x2="21" y2="18"></line>
</svg>
</button>
<!-- Mobile Menu Dropdown -->
<div id="mobile-menu-dropdown" class="modal-panel hidden text-black p-6 overflow-y-auto">
<div class="flex justify-end mb-4">
<button class="collapse-btn p-1.5 rounded hover:bg-gray-200 focus:outline-none transition-colors" data-target="mobile-menu-dropdown" aria-label="Close">
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20" fill="none" stroke="#374151" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="w-5 h-5">
<line x1="4" y1="4" x2="16" y2="16" />
<line x1="16" y1="4" x2="4" y2="16" />
</svg>
</button>
</div>
<div id="mobile-menu-items"></div>
</div>
</div>
<dialog id="auth-session-dialog" class="auth-dialog">
<button class="auth-dialog__close" type="button" data-auth-close aria-label="Close">
<svg viewBox="0 0 24 24" width="18" height="18" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" aria-hidden="true"><path d="m6 6 12 12M18 6 6 18"/></svg>
</button>
<h2>Staff sign in</h2>
<p id="auth-session-status" aria-live="polite"></p>
<div id="auth-rate-limit" class="auth-rate-limit hidden" role="status" aria-live="polite">
<strong>Sign-in temporarily paused</strong>
<span id="auth-rate-limit-countdown"></span>
<progress id="auth-rate-limit-progress" max="1" value="0" aria-label="Time remaining before sign-in is available"></progress>
</div>
<form id="auth-session-form">
<label>NetID<input name="username" autocomplete="username" required maxlength="64"></label>
<label>Password<span class="auth-password-control"><input name="password" type="password" autocomplete="current-password" required maxlength="1024"><button class="auth-password-toggle" type="button" aria-label="Show password" title="Show password"><svg class="auth-password-eye" viewBox="0 0 24 24" aria-hidden="true"><path d="M2.5 12s3.5-6 9.5-6 9.5 6 9.5 6-3.5 6-9.5 6-9.5-6-9.5-6Z"/><circle cx="12" cy="12" r="2.75"/></svg><svg class="auth-password-eye-off" viewBox="0 0 24 24" aria-hidden="true"><path d="m3 3 18 18M10.6 6.15A10.8 10.8 0 0 1 12 6c6 0 9.5 6 9.5 6a17.5 17.5 0 0 1-2.2 2.8M6.2 6.2C3.85 8 2.5 12 2.5 12s3.5 6 9.5 6c1.6 0 3-.42 4.2-1.05M9.9 9.9a3 3 0 0 0 4.2 4.2"/></svg></button></span></label>
<button type="submit">Sign in</button>
<button id="auth-forgot-button" class="auth-dialog__link" type="button">Forgot password?</button>
</form>
<form id="auth-forgot-form" class="hidden">
<p class="auth-dialog__note">Enter the recovery email on your staff account. If it matches, we’ll send a one-time link that expires in 30 minutes.</p>
<label>Recovery email<input name="email" type="email" autocomplete="email" required maxlength="254"></label>
<div class="auth-dialog__actions"><button type="button" data-forgot-back>Back</button><button type="submit">Send reset link</button></div>
</form>
<form id="auth-profile-form" class="hidden">
<h3>Account profile</h3>
<label>Display name<input name="display_name" autocomplete="name" required maxlength="80"></label>
<label>Username<input name="username" autocomplete="username" required maxlength="64" pattern="[A-Za-z0-9_.-]+"></label>
<label>Recovery email<input name="email" type="email" autocomplete="email" required maxlength="254"></label>
<label>Current password <small>Required when changing username or email</small><span class="auth-password-control"><input name="current_password" type="password" autocomplete="current-password" maxlength="1024"><button class="auth-password-toggle" type="button" aria-label="Show current password" title="Show current password"><svg class="auth-password-eye" viewBox="0 0 24 24" aria-hidden="true"><path d="M2.5 12s3.5-6 9.5-6 9.5 6 9.5 6-3.5 6-9.5 6-9.5-6-9.5-6Z"/><circle cx="12" cy="12" r="2.75"/></svg><svg class="auth-password-eye-off" viewBox="0 0 24 24" aria-hidden="true"><path d="m3 3 18 18M10.6 6.15A10.8 10.8 0 0 1 12 6c6 0 9.5 6 9.5 6a17.5 17.5 0 0 1-2.2 2.8M6.2 6.2C3.85 8 2.5 12 2.5 12s3.5 6 9.5 6c1.6 0 3-.42 4.2-1.05M9.9 9.9a3 3 0 0 0 4.2 4.2"/></svg></button></span></label>
<button type="submit">Save profile</button>
</form>
<form id="auth-password-form" class="hidden">
<label>Current password<span class="auth-password-control"><input name="current_password" type="password" autocomplete="current-password" required maxlength="1024"><button class="auth-password-toggle" type="button" aria-label="Show current password" title="Show current password"><svg class="auth-password-eye" viewBox="0 0 24 24" aria-hidden="true"><path d="M2.5 12s3.5-6 9.5-6 9.5 6 9.5 6-3.5 6-9.5 6-9.5-6-9.5-6Z"/><circle cx="12" cy="12" r="2.75"/></svg><svg class="auth-password-eye-off" viewBox="0 0 24 24" aria-hidden="true"><path d="m3 3 18 18M10.6 6.15A10.8 10.8 0 0 1 12 6c6 0 9.5 6 9.5 6a17.5 17.5 0 0 1-2.2 2.8M6.2 6.2C3.85 8 2.5 12 2.5 12s3.5 6 9.5 6c1.6 0 3-.42 4.2-1.05M9.9 9.9a3 3 0 0 0 4.2 4.2"/></svg></button></span></label>
<label>New password<span class="auth-password-control"><input name="new_password" type="password" autocomplete="new-password" required minlength="14" maxlength="1024"><button class="auth-password-toggle" type="button" aria-label="Show new password" title="Show new password"><svg class="auth-password-eye" viewBox="0 0 24 24" aria-hidden="true"><path d="M2.5 12s3.5-6 9.5-6 9.5 6 9.5 6-3.5 6-9.5 6-9.5-6-9.5-6Z"/><circle cx="12" cy="12" r="2.75"/></svg><svg class="auth-password-eye-off" viewBox="0 0 24 24" aria-hidden="true"><path d="m3 3 18 18M10.6 6.15A10.8 10.8 0 0 1 12 6c6 0 9.5 6 9.5 6a17.5 17.5 0 0 1-2.2 2.8M6.2 6.2C3.85 8 2.5 12 2.5 12s3.5 6 9.5 6c1.6 0 3-.42 4.2-1.05M9.9 9.9a3 3 0 0 0 4.2 4.2"/></svg></button></span></label>
<label>Confirm new password<span class="auth-password-control"><input name="confirm_password" type="password" autocomplete="new-password" required minlength="14" maxlength="1024"><button class="auth-password-toggle" type="button" aria-label="Show confirmed password" title="Show confirmed password"><svg class="auth-password-eye" viewBox="0 0 24 24" aria-hidden="true"><path d="M2.5 12s3.5-6 9.5-6 9.5 6 9.5 6-3.5 6-9.5 6-9.5-6-9.5-6Z"/><circle cx="12" cy="12" r="2.75"/></svg><svg class="auth-password-eye-off" viewBox="0 0 24 24" aria-hidden="true"><path d="m3 3 18 18M10.6 6.15A10.8 10.8 0 0 1 12 6c6 0 9.5 6 9.5 6a17.5 17.5 0 0 1-2.2 2.8M6.2 6.2C3.85 8 2.5 12 2.5 12s3.5 6 9.5 6c1.6 0 3-.42 4.2-1.05M9.9 9.9a3 3 0 0 0 4.2 4.2"/></svg></button></span></label>
<button type="submit">Change password</button>
</form>
<button id="auth-session-signout" class="hidden auth-dialog__secondary" type="button">Sign out</button>
</dialog>
<section id="app-startup-status"
class="app-startup-status"
role="status"
aria-live="polite"
aria-atomic="true">
<div class="app-startup-status__bubble" data-app-startup-space aria-hidden="true">
<div class="table-query-bubble-ripples app-startup-status__ripples" aria-hidden="true">
<span class="table-query-bubble-ripple" style="--ripple-delay: 0s"></span>
<span class="table-query-bubble-ripple" style="--ripple-delay: 1.05s"></span>
<span class="table-query-bubble-ripple" style="--ripple-delay: 2.1s"></span>
</div>
<div class="app-startup-status__bubble-copy">
<span class="app-startup-status__eyebrow">Backend Sync</span>
<strong data-app-startup-title>Loading field metadata</strong>
</div>
</div>
<p data-app-startup-detail>Pulling available fields from the backend and preparing the builder...</p>
</section>
<script>
import('./src/ui/startupStatus.js')
.then(({ StartupStatus }) => StartupStatus.initialize())
.catch(error => {
console.warn('Startup animation could not be started early.', error);
});
</script>
<div id="query-app-shell" class="w-full mx-auto">
<!-- Table + Filter Panel row -->
<div id="table-with-filter">
<!-- Display/filter side panel -->
<aside id="filter-side-panel" class="panel-hidden" aria-label="Filter panel">
<!-- Content area -->
<div id="filter-panel-content">
<div id="filter-panel-header">
<span id="filter-panel-title">Filters</span>
<button id="filter-panel-mobile-close"
class="filter-panel-mobile-close"
type="button"
aria-label="Close display and filters panel">
<svg xmlns="http://www.w3.org/2000/svg"
viewBox="0 0 24 24"
fill="none"
stroke="currentColor"
stroke-width="2"
stroke-linecap="round"
stroke-linejoin="round"
aria-hidden="true">
<path d="M18 6 6 18"/>
<path d="m6 6 12 12"/>
</svg>
</button>
</div>
<div id="filter-panel-body"></div>
</div>
</aside>
<!-- Table column -->
<div id="table-column">
<div id="table-shell" class="mb-6">
<div id="table-top-bar">
<div id="table-info-bar">
<div id="planning-badge" aria-live="polite" aria-label="Planning mode active">
<span class="planning-badge-dot" aria-hidden="true"></span>
<span>Planning</span>
</div>
<div id="partial-results-badge" aria-live="polite" aria-label="Partial results">
<span class="partial-results-badge-dot" aria-hidden="true"></span>
<span>Partial</span>
</div>
<div id="table-results-badge" class="hidden" aria-hidden="true">
<span class="table-info-metric">
<span id="table-results-count">0</span>
<span id="table-results-label">results</span>
</span>
<span class="table-info-separator" aria-hidden="true">•</span>
<span class="table-info-metric">
<span id="table-columns-count">0</span>
<span id="table-columns-label">columns</span>
</span>
</div>
</div>
<div id="table-name-shell">
<input
type="text"
id="table-name-input"
placeholder="Enter table name..."
/>
</div>
<div id="table-toolbar">
<button id="table-add-field-btn"
class="table-toolbar-btn table-toolbar-btn-icon"
type="button"
aria-label="Add field"
data-tooltip="Add Field" data-tooltip-delay="0">
<svg xmlns="http://www.w3.org/2000/svg"
viewBox="0 0 24 24"
fill="none"
stroke="currentColor"
stroke-width="2"
stroke-linecap="round"
stroke-linejoin="round"
class="w-4 h-4 pointer-events-none">
<path d="M12 5v14"/>
<path d="M5 12h14"/>
</svg>
</button>
<button id="table-refresh-query-btn"
class="table-toolbar-btn table-toolbar-btn-icon hidden"
type="button"
aria-label="Refresh results"
data-tooltip="Refresh Results" data-tooltip-delay="0">
<svg xmlns="http://www.w3.org/2000/svg"
viewBox="0 0 24 24"
fill="currentColor"
class="table-run-query-icon w-4 h-4 pointer-events-none hidden"
data-table-query-icon="run"
aria-hidden="true">
<polygon points="5,3 19,12 5,21"></polygon>
</svg>
<svg xmlns="http://www.w3.org/2000/svg"
viewBox="0 0 24 24"
fill="none"
stroke="currentColor"
stroke-width="2"
stroke-linecap="round"
stroke-linejoin="round"
class="table-refresh-query-icon w-4 h-4 pointer-events-none"
data-table-query-icon="refresh"
aria-hidden="true">
<path d="M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8"/>
<path d="M21 3v5h-5"/>
<path d="M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16"/>
<path d="M3 21v-5h5"/>
</svg>
</button>
<button id="download-btn"
class="table-toolbar-btn table-toolbar-btn-icon"
type="button"
aria-label="Download results"
data-tooltip="Download Results" data-tooltip-delay="0">
<svg xmlns="http://www.w3.org/2000/svg"
viewBox="0 0 24 24"
fill="none"
stroke="currentColor"
stroke-width="2"
stroke-linecap="round"
stroke-linejoin="round"
class="w-4 h-4 pointer-events-none">
<path d="M4 16v2a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2v-2"/>
<g id="download-arrow">
<path d="M7 10l5 5 5-5"/>
<path d="M12 15V4"/>
</g>
</svg>
</button>
<!-- Multi-value export mode toggle: stacked cells (default) vs split columns -->
<button id="split-columns-toggle"
class="table-toolbar-btn table-toolbar-btn-icon"
type="button"
aria-label="Use split columns for multi-value fields"
data-mobile-label="Split"
data-tooltip="Multi-value export: stacked in one cell (click to split into columns)" data-tooltip-delay="0">
<!-- Icon: two horizontal rows (stacked mode) -->
<svg id="split-toggle-icon-stack" xmlns="http://www.w3.org/2000/svg"
viewBox="0 0 24 24"
fill="none"
stroke="currentColor"
stroke-width="2"
stroke-linecap="round"
stroke-linejoin="round"
class="split-toggle-icon w-4 h-4 pointer-events-none">
<rect x="3" y="3" width="18" height="7" rx="1"/>
<rect x="3" y="14" width="18" height="7" rx="1"/>
</svg>
<!-- Icon: two vertical columns (split mode) hidden by default -->
<svg id="split-toggle-icon-cols" xmlns="http://www.w3.org/2000/svg"
viewBox="0 0 24 24"
fill="none"
stroke="currentColor"
stroke-width="2"
stroke-linecap="round"
stroke-linejoin="round"
class="split-toggle-icon w-4 h-4 pointer-events-none hidden">
<rect x="3" y="3" width="7" height="18" rx="1"/>
<rect x="14" y="3" width="7" height="18" rx="1"/>
</svg>
</button>
<button id="duplicate-rows-toggle"
class="table-toolbar-btn table-toolbar-btn-icon table-toolbar-btn-active"
type="button"
data-duplicate-rows-toggle
aria-pressed="true"
aria-label="Show duplicate visible rows"
data-mobile-label="Unique"
data-tooltip="Duplicate visible rows collapse into one row. Click to show all rows." data-tooltip-delay="0">
<svg xmlns="http://www.w3.org/2000/svg"
viewBox="0 0 24 24"
fill="none"
stroke="currentColor"
stroke-width="2"
stroke-linecap="round"
stroke-linejoin="round"
class="w-4 h-4 pointer-events-none duplicate-rows-toggle-icon">
<path d="M5 7h14"/>
<path d="M5 12h14"/>
<path d="M5 17h14"/>
<path class="duplicate-rows-toggle-slash" d="M4 4l16 16"/>
</svg>
</button>
<button id="post-filter-btn"
class="table-toolbar-btn table-toolbar-btn-icon"
type="button"
aria-label="Post filters"
data-tooltip="Post Filters" data-tooltip-delay="0">
<svg xmlns="http://www.w3.org/2000/svg"
viewBox="0 0 24 24"
fill="none"
stroke="currentColor"
stroke-width="2"
stroke-linecap="round"
stroke-linejoin="round"
class="w-4 h-4 pointer-events-none">
<path d="M4 6h16"/>
<path d="M7 12h10"/>
<path d="M10 18h4"/>
</svg>
</button>
<button id="clear-query-btn"
class="table-toolbar-btn table-toolbar-btn-icon table-toolbar-btn-danger"
type="button"
aria-label="Clear current query"
data-tooltip="Clear Query" data-tooltip-delay="0">
<svg xmlns="http://www.w3.org/2000/svg"
viewBox="0 0 16 16"
fill="none"
stroke="currentColor"
stroke-width="0"
class="w-4 h-4 pointer-events-none destructive-flame-icon">
<path class="destructive-flame-shape" fill="currentColor" d="M9.32 15.653a.812.812 0 0 1-.086-.855c.176-.342.245-.733.2-1.118a2.106 2.106 0 0 0-.267-.779 2.027 2.027 0 0 0-.541-.606 3.96 3.96 0 0 1-1.481-2.282c-1.708 2.239-1.053 3.51-.235 4.63a.748.748 0 0 1-.014.901.87.87 0 0 1-.394.283.838.838 0 0 1-.478.023c-1.105-.27-2.145-.784-2.85-1.603a4.686 4.686 0 0 1-.906-1.555 4.811 4.811 0 0 1-.263-1.797s-.133-2.463 2.837-4.876c0 0 3.51-2.978 2.292-5.18a.621.621 0 0 1 .112-.653.558.558 0 0 1 .623-.147l.146.058a7.63 7.63 0 0 1 2.96 3.5c.58 1.413.576 3.06.184 4.527.325-.292.596-.641.801-1.033l.029-.064c.198-.477.821-.325 1.055-.013.086.137 2.292 3.343 1.107 6.048a5.516 5.516 0 0 1-1.84 2.027 6.127 6.127 0 0 1-2.138.893.834.834 0 0 1-.472-.038.867.867 0 0 1-.381-.29zM7.554 7.892a.422.422 0 0 1 .55.146c.04.059.066.126.075.198l.045.349c.02.511.014 1.045.213 1.536.206.504.526.95.932 1.298a3.06 3.06 0 0 1 1.16 1.422c.22.564.25 1.19.084 1.773a4.123 4.123 0 0 0 1.39-.757l.103-.084c.336-.277.613-.623.813-1.017.201-.393.322-.825.354-1.269.065-1.025-.284-2.054-.827-2.972-.248.36-.59.639-.985.804-.247.105-.509.17-.776.19a.792.792 0 0 1-.439-.1.832.832 0 0 1-.321-.328.825.825 0 0 1-.035-.729c.412-.972.54-2.05.365-3.097a5.874 5.874 0 0 0-1.642-3.16c-.156 2.205-2.417 4.258-2.881 4.7a3.537 3.537 0 0 1-.224.194c-2.426 1.965-2.26 3.755-2.26 3.834a3.678 3.678 0 0 0 .459 2.043c.365.645.89 1.177 1.52 1.54C4.5 12.808 4.5 10.89 7.183 8.14l.372-.25z"/>
</svg>
</button>
<div id="table-zoom-controls" class="hidden" aria-label="Table zoom controls">
<button id="table-zoom-out-btn" class="table-toolbar-btn" type="button" aria-label="Zoom out table" data-tooltip="Zoom out" data-tooltip-delay="0">
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="w-4 h-4 pointer-events-none">
<path d="M5 12h14"/>
</svg>
</button>
<span id="table-zoom-label">100%</span>
<button id="table-zoom-in-btn" class="table-toolbar-btn" type="button" aria-label="Zoom in table" data-tooltip="Zoom in" data-tooltip-delay="0">
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="w-4 h-4 pointer-events-none">
<path d="M12 5v14"/>
<path d="M5 12h14"/>
</svg>
</button>
</div>
<button id="table-expand-btn" class="table-toolbar-btn table-expand-btn" type="button" aria-expanded="false" aria-label="Expand table" data-tooltip="Expand table" data-tooltip-delay="0">
<span class="table-expand-btn-icon" aria-hidden="true">
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="w-4 h-4 pointer-events-none">
<path d="M8 3H3v5"/>
<path d="M16 3h5v5"/>
<path d="M3 16v5h5"/>
<path d="M21 16v5h-5"/>
<path d="M3 8l6-5"/>
<path d="M21 8l-6-5"/>
<path d="M3 16l6 5"/>
<path d="M21 16l-6 5"/>
</svg>
</span>
</button>
</div>
</div>
<div id="table-container" class="overflow-x-auto shadow relative" style="height: 400px;">
<table id="example-table" class="min-w-full divide-y divide-gray-200 bg-white">
<thead></thead>
<tbody></tbody>
</table>
<div id="placeholder-message"
class="py-8 absolute inset-0 flex items-center justify-center text-center text-gray-500 italic pointer-events-none"
data-empty-table-message>
Add a field to show your first column
</div>
</div>
<nav id="mobile-table-action-bar" class="mobile-table-action-bar" aria-label="Table actions">
<button type="button" class="mobile-table-action" data-mobile-table-action-target="run-query-btn" data-default-label="Run query" aria-label="Run query">
<span class="mobile-table-action-icon" aria-hidden="true">
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor">
<path d="M7 5v14l11-7z"/>
</svg>
</span>
<span class="mobile-table-action-label">Run</span>
</button>
<button type="button" class="mobile-table-action" data-mobile-table-action="fields-panel" data-default-label="Display fields and filters" aria-label="Display fields and filters" aria-controls="filter-side-panel" aria-expanded="false">
<span class="mobile-table-action-icon" aria-hidden="true">
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
<path d="M8 6h13"/>
<path d="M8 12h13"/>
<path d="M8 18h13"/>
<path d="M3 6h.01"/>
<path d="M3 12h.01"/>
<path d="M3 18h.01"/>
</svg>
</span>
<span class="mobile-table-action-label">Fields</span>
</button>
<button type="button" class="mobile-table-action" data-mobile-table-action-target="table-add-field-btn" data-default-label="Add field" aria-label="Add field">
<span class="mobile-table-action-icon" aria-hidden="true">
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
<path d="M12 5v14"/>
<path d="M5 12h14"/>
</svg>
</span>
<span class="mobile-table-action-label">Add</span>
</button>
<button type="button" class="mobile-table-action" data-mobile-table-action-target="post-filter-btn" data-default-label="Post filters" aria-label="Post filters">
<span class="mobile-table-action-icon" aria-hidden="true">
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
<path d="M4 6h16"/>
<path d="M7 12h10"/>
<path d="M10 18h4"/>
</svg>
</span>
<span class="mobile-table-action-label">Filters</span>
</button>
<button type="button" class="mobile-table-action" data-mobile-table-action-target="download-btn" data-default-label="Download results" aria-label="Download results">
<span class="mobile-table-action-icon" aria-hidden="true">
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
<path d="M4 16v2a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2v-2"/>
<path d="M7 10l5 5 5-5"/>
<path d="M12 15V4"/>
</svg>
</span>
<span class="mobile-table-action-label">Export</span>
</button>
<button type="button" class="mobile-table-action" data-mobile-table-action-target="split-columns-toggle" data-default-label="Split multi-values" aria-label="Split multi-values">
<span class="mobile-table-action-icon" aria-hidden="true">
<svg xmlns="http://www.w3.org/2000/svg"
viewBox="0 0 24 24"
fill="none"
stroke="currentColor"
stroke-width="2"
stroke-linecap="round"
stroke-linejoin="round">
<rect x="3" y="3" width="18" height="7" rx="1"/>
<rect x="3" y="14" width="18" height="7" rx="1"/>
</svg>
</span>
<span class="mobile-table-action-label">Split</span>
</button>
<button type="button" class="mobile-table-action" data-mobile-table-action-target="table-expand-btn" data-default-label="Expand table" aria-label="Expand table">
<span class="mobile-table-action-icon" aria-hidden="true">
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
<path d="M8 3H3v5"/>
<path d="M16 3h5v5"/>
<path d="M3 16v5h5"/>
<path d="M21 16v5h-5"/>
</svg>
</span>
<span class="mobile-table-action-label">Expand</span>
</button>
<button type="button" class="mobile-table-action mobile-table-action-danger" data-mobile-table-action-target="clear-query-btn" data-default-label="Clear current query" aria-label="Clear current query">
<span class="mobile-table-action-icon" aria-hidden="true">
<svg xmlns="http://www.w3.org/2000/svg"
viewBox="0 0 16 16"
fill="none"
stroke="currentColor"
stroke-width="0"
class="destructive-flame-icon">
<path class="destructive-flame-shape" fill="currentColor" d="M9.32 15.653a.812.812 0 0 1-.086-.855c.176-.342.245-.733.2-1.118a2.106 2.106 0 0 0-.267-.779 2.027 2.027 0 0 0-.541-.606 3.96 3.96 0 0 1-1.481-2.282c-1.708 2.239-1.053 3.51-.235 4.63a.748.748 0 0 1-.014.901.87.87 0 0 1-.394.283.838.838 0 0 1-.478.023c-1.105-.27-2.145-.784-2.85-1.603a4.686 4.686 0 0 1-.906-1.555 4.811 4.811 0 0 1-.263-1.797s-.133-2.463 2.837-4.876c0 0 3.51-2.978 2.292-5.18a.621.621 0 0 1 .112-.653.558.558 0 0 1 .623-.147l.146.058a7.63 7.63 0 0 1 2.96 3.5c.58 1.413.576 3.06.184 4.527.325-.292.596-.641.801-1.033l.029-.064c.198-.477.821-.325 1.055-.013.086.137 2.292 3.343 1.107 6.048a5.516 5.516 0 0 1-1.84 2.027 6.127 6.127 0 0 1-2.138.893.834.834 0 0 1-.472-.038.867.867 0 0 1-.381-.29zM7.554 7.892a.422.422 0 0 1 .55.146c.04.059.066.126.075.198l.045.349c.02.511.014 1.045.213 1.536.206.504.526.95.932 1.298a3.06 3.06 0 0 1 1.16 1.422c.22.564.25 1.19.084 1.773a4.123 4.123 0 0 0 1.39-.757l.103-.084c.336-.277.613-.623.813-1.017.201-.393.322-.825.354-1.269.065-1.025-.284-2.054-.827-2.972-.248.36-.59.639-.985.804-.247.105-.509.17-.776.19a.792.792 0 0 1-.439-.1.832.832 0 0 1-.321-.328.825.825 0 0 1-.035-.729c.412-.972.54-2.05.365-3.097a5.874 5.874 0 0 0-1.642-3.16c-.156 2.205-2.417 4.258-2.881 4.7a3.537 3.537 0 0 1-.224.194c-2.426 1.965-2.26 3.755-2.26 3.834a3.678 3.678 0 0 0 .459 2.043c.365.645.89 1.177 1.52 1.54C4.5 12.808 4.5 10.89 7.183 8.14l.372-.25z"/>
</svg>
</span>
<span class="mobile-table-action-label">Clear</span>
</button>
</nav>
</div>
</div><!-- end table-column -->
</div><!-- end table-with-filter -->
<!--
<section id="pinned-templates-strip" class="pinned-templates-strip hidden" aria-label="Pinned templates">
<div id="pinned-templates-list" class="pinned-templates-strip__list" aria-live="polite"></div>
</section>
-->
<section id="mobile-builder-drawer" class="mobile-builder-drawer" aria-label="Query builder">
<button id="mobile-builder-toggle" class="mobile-builder-toggle" type="button" aria-expanded="false" aria-controls="mobile-builder-content">
<span class="mobile-builder-toggle-copy">
<span class="mobile-builder-toggle-title">Builder</span>
<span id="mobile-builder-summary" class="mobile-builder-toggle-summary">Edit fields and filters</span>
</span>
<span class="mobile-builder-toggle-icon" aria-hidden="true">
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
<path d="M5 7.5 10 12.5 15 7.5"/>
</svg>
</span>
</button>
<div id="mobile-builder-content" class="mobile-builder-content">
<div id="field-search-section" class="mb-6 text-center">
<div class="relative w-full max-w-3xl mx-auto">
<input
type="text"
placeholder="Type to find a specific field..."
class="w-full pr-14 px-6 py-3 rounded-full shadow backdrop-blur-md focus:outline-none text-center transition-all duration-300"
id="query-input"
/>
<!-- clear‑search "×" button -->
<button id="clear-search-btn"
class="hidden absolute right-4 top-1/2 transform -translate-y-1/2 p-1 rounded-full bg-gray-200 bg-opacity-80 hover:bg-gray-300 focus:outline-none"
aria-label="Clear search">
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20" fill="none" stroke="#374151" stroke-width="2"
stroke-linecap="round" stroke-linejoin="round" class="w-4 h-4">
<line x1="4" y1="4" x2="16" y2="16" />
<line x1="16" y1="4" x2="4" y2="16" />
</svg>
</button>
</div>
</div>
<div id="mobile-table-preferences" class="mobile-table-preferences" aria-label="Table preferences">
<button id="mobile-duplicate-rows-toggle"
class="mobile-preference-toggle table-toolbar-btn-active"
type="button"
data-duplicate-rows-toggle
aria-pressed="true"
aria-label="Show duplicate visible rows">
<span class="mobile-preference-toggle__icon" aria-hidden="true">
<svg xmlns="http://www.w3.org/2000/svg"
viewBox="0 0 24 24"
fill="none"
stroke="currentColor"
stroke-width="2"
stroke-linecap="round"
stroke-linejoin="round">
<path d="M5 7h14"/>
<path d="M5 12h14"/>
<path d="M5 17h14"/>
<path class="duplicate-rows-toggle-slash" d="M4 4l16 16"/>
</svg>
</span>
<span class="mobile-preference-toggle__copy">
<span data-duplicate-rows-toggle-title>Unique rows</span>
<small data-duplicate-rows-toggle-detail>Collapsing matching visible rows</small>
</span>
</button>
</div>
<div id="form-mode-stage" class="form-mode-stage"></div>
</div>
</section>
<!-- JSON PANEL -->
<div id="json-panel" class="w-full modal-panel hidden">
<h2 class="mt-8 mb-0 px-3 py-2 bg-yellow-100 text-yellow-800 font-semibold text-sm uppercase tracking-wider border border-yellow-200 flex items-center justify-between">
<span class="sr-only">Query JSON</span>
<div class="flex gap-2 ml-auto items-center">
<button id="copy-json-btn"
class="p-1.5 rounded hover:bg-yellow-200 focus:outline-none transition-colors"
aria-label="Copy JSON to clipboard">
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="#ca8a04" stroke-width="2"
stroke-linecap="round" stroke-linejoin="round" class="w-5 h-5">
<rect x="9" y="9" width="13" height="13" rx="2" ry="2"></rect>
<path d="M5 15H4a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h9a2 2 0 0 1 2 2v1"/>
</svg>
</button>
<button class="collapse-btn p-1.5 rounded hover:bg-yellow-200 focus:outline-none transition-colors ml-2" data-target="json-panel" aria-label="Close">
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20" fill="none" stroke="#ca8a04" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="w-5 h-5">
<line x1="4" y1="4" x2="16" y2="16" />
<line x1="16" y1="4" x2="4" y2="16" />
</svg>
</button>
</div>
</h2>
<div id="json-editor-shell" class="w-full -mt-px">
<div class="json-editor-topbar" aria-hidden="true">
<span class="json-editor-dot red"></span>
<span class="json-editor-dot amber"></span>
<span class="json-editor-dot green"></span>
<span class="json-editor-label">backend-query-payload.json</span>
</div>
<div id="query-json-tree" class="json-tree" role="tree" aria-label="Query JSON viewer"></div>
<textarea id="query-json"
class="w-full font-mono text-sm resize-none"
rows="10"
readonly
spellcheck="false"
aria-hidden="true"
tabindex="-1"
></textarea>
</div>
</div><!-- end json-panel -->
<!-- QUERIES PANEL -->
<div id="queries-panel" class="w-full modal-panel hidden">
<h2 class="mt-8 mb-0 px-3 py-2 bg-blue-100 text-blue-800 font-semibold text-sm uppercase tracking-wider border border-blue-200 flex items-center justify-between">
<span class="queries-panel-heading">
<span class="queries-panel-title">Shared History</span>
<span class="queries-panel-subtitle">Open saved query results and Hydration reviews from any staff account.</span>
</span>
<div class="flex gap-2 ml-auto items-center">
<button class="collapse-btn p-1.5 rounded hover:bg-blue-200 focus:outline-none transition-colors ml-2" data-target="queries-panel" aria-label="Close">
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20" fill="none" stroke="#2563eb" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="w-5 h-5">
<line x1="4" y1="4" x2="16" y2="16" />
<line x1="16" y1="4" x2="4" y2="16" />
</svg>
</button>
</div>
</h2>
<div id="queries-container"
class="w-full -mt-px border border-blue-200 border-t-0 rounded-b overflow-x-auto">
<div id="queries-search-wrapper" class="sticky top-0 z-10 pb-2 px-4 pt-4">
<div class="queries-history-toolbar">
<input id="queries-search" type="search" placeholder="Search history" class="w-full px-3 py-2 rounded-lg focus:outline-none text-sm" data-search-ui="enhanced" data-search-wrapper-class="queries-search-field" data-search-clear-label="Clear query search" />
<div class="queries-history-controls" aria-label="Query history filters and sort controls">
<label class="queries-history-control" for="queries-scope-filter">
<span>Scope</span>
<select id="queries-scope-filter">
<option value="all">All staff</option>
<option value="mine">My runs</option>
</select>
</label>
<label class="queries-history-control" for="queries-status-filter">
<span>Status</span>
<select id="queries-status-filter">
<option value="all">All statuses</option>
<option value="running">Running</option>
<option value="complete">Completed</option>
<option value="failed">Failed</option>
<option value="canceled">Cancelled</option>
</select>
</label>
<label class="queries-history-control" for="queries-result-filter">
<span>Results</span>
<select id="queries-result-filter">
<option value="all">Any result count</option>
<option value="has_results">Has rows</option>
<option value="no_results">No rows</option>
<option value="large_results">1,000+ rows</option>
<option value="unknown_results">Unknown count</option>
</select>
</label>
<label class="queries-history-control" for="queries-duration-filter">
<span>Duration</span>
<select id="queries-duration-filter">
<option value="all">Any duration</option>
<option value="over_5m">Over 5 minutes</option>
<option value="over_30m">Over 30 minutes</option>
</select>
</label>
<label class="queries-history-control" for="queries-sort">
<span>Sort</span>
<select id="queries-sort">
<option value="newest">Newest first</option>
<option value="oldest">Oldest first</option>
<option value="most_results">Most results</option>
<option value="longest_duration">Longest duration</option>
<option value="fastest_duration">Fastest duration</option>
<option value="name">Name A-Z</option>
</select>
</label>
</div>
</div>
</div>
<div id="queries-list">
<!-- list will be injected here -->
</div>
</div>
</div><!-- end queries-panel -->
<!-- TEMPLATES PANEL -->
<div id="templates-panel" class="w-full modal-panel hidden">
<h2 class="mt-8 mb-0 px-3 py-2 bg-emerald-100 text-emerald-800 font-semibold text-sm uppercase tracking-wider border border-emerald-200 flex items-center justify-between">
<span class="sr-only">Templates</span>
<div class="flex gap-2 ml-auto items-center">
<button class="collapse-btn p-1.5 rounded hover:bg-emerald-200 focus:outline-none transition-colors ml-2" data-target="templates-panel" aria-label="Close">
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20" fill="none" stroke="#047857" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="w-5 h-5">
<line x1="4" y1="4" x2="16" y2="16" />
<line x1="16" y1="4" x2="4" y2="16" />
</svg>
</button>
</div>
</h2>
<div id="templates-container" class="templates-panel-shell w-full -mt-px border border-emerald-200 border-t-0 rounded-b overflow-hidden bg-white">
<section class="templates-browser">
<div class="templates-browser-top">
<div class="templates-sidebar-header">
<div>
<div class="templates-sidebar-kicker">Server Templates</div>
<h3 class="templates-sidebar-title">Saved Queries</h3>
<p id="templates-mode-note" class="templates-sidebar-note">Create, edit, delete, and apply reusable query templates.</p>
</div>
</div>
<div class="templates-category-filter-shell">
<div class="templates-browser-toolbar templates-browser-toolbar--library">
<label class="templates-field templates-field--wide">
<span>Search Templates</span>
<input id="templates-search-input" type="search" maxlength="120" placeholder="Search templates">
</label>
<label class="templates-field">
<span>Filter By Category</span>
<select id="templates-category-filter"></select>
</label>
</div>
<div class="templates-sidebar-actions templates-sidebar-actions--library">
<button id="templates-refresh-btn" type="button" class="templates-secondary-btn">Refresh</button>
<button id="templates-manage-categories-btn" type="button" class="templates-secondary-btn" aria-label="Manage template categories">Categories</button>
<button id="templates-new-btn" type="button" class="templates-primary-btn" aria-label="Create template from current query">New Template</button>
</div>
<div id="templates-results-summary" class="templates-results-summary"></div>
</div>
</div>
<div class="templates-browser-list-shell">
<div id="templates-list-status" class="templates-status">Loading templates…</div>
<div id="templates-list" class="templates-list" aria-live="polite"></div>
</div>
<div id="templates-empty-state" class="templates-empty-state">
<div class="templates-empty-kicker">Templates</div>
<h3>No templates match the current view.</h3>
<p>Adjust the search or category filter, refresh from the server, or create a new template from the current query.</p>
</div>
</section>
<div id="templates-detail-overlay" class="templates-detail-overlay hidden" aria-hidden="true">
<div id="templates-detail-backdrop" class="templates-detail-backdrop" data-templates-detail-close></div>
<section id="templates-detail" class="templates-detail hidden" role="dialog" aria-modal="true" aria-labelledby="templates-detail-title">
<div class="templates-detail-header">
<div>
<div id="templates-detail-mode" class="templates-detail-mode">Template</div>
<h3 id="templates-detail-title" class="templates-detail-title">Template Details</h3>
</div>
<div class="templates-detail-actions">
<button id="template-use-btn" type="button" class="templates-primary-btn">Use Template</button>
<button id="template-pin-btn" type="button" class="templates-secondary-btn">Pin Template</button>
<button id="template-save-btn" type="button" class="templates-primary-btn">Save Changes</button>
<button id="template-delete-btn" type="button" class="templates-danger-btn">Delete</button>
<button id="templates-detail-close-btn" type="button" class="templates-categories-close" aria-label="Close template details">×</button>
</div>
</div>
<div class="templates-detail-body">
<div class="templates-form-grid">
<label class="templates-field">
<span>Name</span>
<input id="template-name-input" type="text" maxlength="120" placeholder="Monthly overdues by branch">
</label>
<label class="templates-field templates-field--wide">
<span>Description</span>
<textarea id="template-description-input" rows="5" maxlength="1000" placeholder="Explain what this template is for and when to use it."></textarea>
</label>
<div class="templates-field templates-field--wide">
<span>Categories</span>
<div id="template-category-assignment" class="template-category-assignment"></div>
</div>
</div>
<div id="templates-validation" class="templates-validation" aria-live="polite"></div>
<div id="templates-meta" class="templates-meta"></div>
</div>
</section>
</div>
<div id="templates-categories-overlay" class="templates-categories-overlay hidden" aria-hidden="true">
<div id="templates-categories-backdrop" class="templates-categories-backdrop" data-templates-categories-close></div>
<section class="templates-categories-dialog" role="dialog" aria-modal="true" aria-labelledby="templates-categories-title">
<div class="templates-categories-header">
<div>
<div class="templates-sidebar-kicker">Categories</div>
<h3 id="templates-categories-title" class="templates-categories-title">Manage Template Categories</h3>
<p class="templates-sidebar-note">Use categories to group templates and make the library easier to scan.</p>
</div>
<button id="templates-categories-close-btn" type="button" class="templates-categories-close" aria-label="Close category manager">×</button>
</div>
<div class="templates-categories-body">
<div id="templates-category-list" class="templates-category-list"></div>
<div id="templates-category-form" class="templates-category-form">
<label class="templates-field">
<span id="template-category-name-label">New Category</span>
<input id="template-category-name-input" type="text" maxlength="80" placeholder="Circulation">
</label>
<label class="templates-field templates-field--wide">
<span>Category Description</span>
<textarea id="template-category-description-input" rows="4" maxlength="400" placeholder="Explain what belongs in this category."></textarea>
</label>
<div class="templates-sidebar-actions">
<button id="template-category-save-btn" type="button" class="templates-secondary-btn">Add Category</button>
<button id="template-category-cancel-btn" type="button" class="templates-secondary-btn hidden">Cancel</button>
</div>
</div>
</div>
</section>
</div>
</div>
</div><!-- end templates-panel -->
<!-- API SETTINGS PANEL -->
<div id="api-settings-panel" class="w-full modal-panel hidden">
<h2 class="api-settings-heading mt-8 mb-0 px-3 py-2 font-semibold text-sm uppercase tracking-wider border flex items-center justify-between">
<span class="api-settings-panel-title">API Settings</span>
<span class="api-settings-panel-subtitle">Backend connection</span>
<div class="flex gap-2 ml-auto items-center">
<button class="collapse-btn p-1.5 rounded focus:outline-none transition-colors ml-2" data-target="api-settings-panel" aria-label="Close">
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="w-5 h-5">
<line x1="4" y1="4" x2="16" y2="16" />
<line x1="16" y1="4" x2="4" y2="16" />
</svg>
</button>
</div>
</h2>
<div id="api-settings-container" class="api-settings-shell w-full -mt-px border border-t-0 rounded-b overflow-y-auto">
<section class="api-settings-summary" aria-labelledby="api-settings-title">
<div>
<p class="api-settings-kicker">Connection</p>
<h3 id="api-settings-title">Choose the query API for this browser.</h3>
</div>
<div class="api-settings-status-card">
<span class="api-settings-status-label">Active mode</span>
<strong id="api-settings-mode">Site default</strong>
</div>
</section>
<section class="api-settings-grid" aria-label="API endpoint settings">
<article class="api-settings-card api-settings-card--primary">
<div class="api-settings-field-header">
<div>
<label for="api-settings-url-input">API URL</label>
<p>Use an absolute URL or a same-origin path.</p>
</div>
<button id="api-settings-reset-btn" type="button" class="api-settings-secondary-btn">Use Site Default</button>
</div>
<input id="api-settings-url-input" type="url" inputmode="url" autocomplete="off" spellcheck="false" placeholder="https://example.org/query-api">
<div class="api-settings-actions">
<button id="api-settings-save-btn" type="button" class="api-settings-primary-btn">Save Endpoint</button>
<button id="api-settings-test-btn" type="button" class="api-settings-secondary-btn">Test Connection</button>
<button id="api-settings-compatibility-btn" type="button" class="api-settings-secondary-btn">Run Compatibility Check</button>
<button id="api-settings-reload-btn" type="button" class="api-settings-secondary-btn hidden">Reload Fields</button>
</div>
<p id="api-settings-status" class="api-settings-status-text" aria-live="polite"></p>
</article>
<article class="api-settings-card api-settings-card--wide api-compatibility-card">
<div class="api-settings-field-header">
<div>
<span class="api-settings-card-label">Compatibility report</span>
<p>Checks field metadata, browser access, JSONL streaming, event order, multi-value arrays, and optional workflow actions.</p>
</div>
<span id="api-compatibility-summary" class="api-compatibility-summary" aria-live="polite">Run a compatibility check to test the API contract.</span>
</div>
<ul id="api-compatibility-results" class="api-compatibility-results" aria-label="API compatibility results"></ul>
</article>
<article class="api-settings-card">
<span class="api-settings-card-label">Current endpoint</span>
<code id="api-settings-current-url" class="api-settings-url-value"></code>
</article>
<article class="api-settings-card">
<span class="api-settings-card-label">Site default</span>
<code id="api-settings-default-url" class="api-settings-url-value"></code>
</article>
<article class="api-settings-card api-settings-card--wide">
<div class="api-settings-field-header">
<div>
<span class="api-settings-card-label">Launch link</span>
<p>Includes only the API URL override.</p>
</div>
<button id="api-settings-copy-link-btn" type="button" class="api-settings-secondary-btn">Copy Link</button>
</div>
<code id="api-settings-launch-url" class="api-settings-url-value api-settings-url-value--large"></code>
</article>
</section>