-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path8533-builder-5-focus-mode.html
More file actions
1172 lines (1112 loc) · 113 KB
/
Copy path8533-builder-5-focus-mode.html
File metadata and controls
1172 lines (1112 loc) · 113 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-theme="light">
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<title>Moderne — Builder · Focus mode (Morpheus)</title>
<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=Geist:wght@400;500;600;700&family=Geist+Mono:wght@400;500&display=swap" rel="stylesheet" />
<style>
/* ============================================================
Builder · Phase 5 — Focus mode (Morpheus)
Standalone prototype for moderne-ui#8531. Defaults to a
~2,000-step recipe. Groups collapse by default with total-step
counts; the recipe list is windowed (only visible rows render)
so it stays smooth at scale; a sticky "you are here" breadcrumb
tracks the topmost visible row while scrolling. Sample data.
============================================================ */
:root { --font-sans: 'Geist','Inter',system-ui,-apple-system,sans-serif; --font-mono: 'Geist Mono','JetBrains Mono',monospace; }
html[data-theme="light"] {
--bg:#F6F7FA; --field:#FFFFFF; --card:#FFFFFF; --card-head:#ECEEF3; --surface:#ECEEF3; --surface2:#E3E7EF; --row-hover:#ECEEF3;
--text:#1B2230; --muted:#6A7180; --line:rgba(27,34,48,.12); --line2:rgba(27,34,48,.08); --line-strong:rgba(27,34,48,.22);
--accent:#1055E2; --accent-deep:#16306B; --accent-tint:rgba(62,123,246,.10); --accent-brd:rgba(62,123,246,.30);
--primary-bg:#3E7BF6; --primary-fg:#FFFFFF; --ink-bg:#232342; --ink-fg:#FBFAF6;
--green-hi:#1D5937; --green:#30F284; --er:#C9291C; --wa:#B68B12; --violet:#9D5BE8; --teal-mid:#16A89B;
--ch-orange:#FFA83D; --ch-p1:#3E5BE8; --scrim:rgba(35,35,66,.14); --menu-shadow:0 16px 44px rgba(10,10,25,.20);
}
html[data-theme="dark"] {
--bg:#100C0A; --field:#100C0A; --card:#131319; --card-head:#1B1B26; --surface:#171722; --surface2:#1E1E2C; --row-hover:#202030;
--text:#E9EAF2; --muted:#9598AC; --line:rgba(228,232,250,.10); --line2:rgba(228,232,250,.06); --line-strong:rgba(228,232,250,.22);
--accent:#3E7BF6; --accent-deep:#3E7BF6; --accent-tint:rgba(62,123,246,.16); --accent-brd:rgba(62,123,246,.40);
--primary-bg:#3E7BF6; --primary-fg:#FFFFFF; --ink-bg:#F1F0EA; --ink-fg:#17171C;
--green-hi:#30F284; --green:#30F284; --er:#FA826F; --wa:#E8BA4C; --violet:#9D5BE8; --teal-mid:#25D0C0;
--ch-orange:#FFA83D; --ch-p1:#8CA0F5; --scrim:rgba(15,15,20,.45); --menu-shadow:0 16px 44px rgba(0,0,0,.5);
}
*,*::before,*::after { box-sizing:border-box; }
html,body { height:100%; margin:0; }
body { font-family:var(--font-sans); font-optical-sizing:auto; background:var(--bg); color:var(--text); -webkit-font-smoothing:antialiased; }
button { font:inherit; cursor:pointer; }
b { font-weight:600; }
.page { max-width:1360px; margin:0 auto; padding:16px 24px 40px; }
.topbar { display:flex; align-items:center; margin-bottom:10px; }
.title-btn { display:inline-flex; align-items:center; gap:8px; font-size:17px; font-weight:600; color:var(--text); background:transparent; border:none; border-radius:8px; padding:7px 10px; }
.title-btn:hover { background:var(--row-hover); }
.title-btn .blocks { width:18px; height:18px; }
.title-btn .chev { width:16px; height:16px; color:var(--muted); }
.topbar .spacer { margin-left:auto; }
.icon-btn { display:inline-flex; align-items:center; justify-content:center; width:34px; height:34px; border-radius:6px; border:1px solid var(--line-strong); background:var(--field); color:var(--text); }
.icon-btn:hover { background:var(--surface); }
.icon-btn svg { width:16px; height:16px; }
.recipe-toolbar { display:flex; align-items:center; gap:6px; flex-wrap:wrap; padding:6px 2px 14px; }
.rt-name { display:inline-flex; align-items:center; gap:8px; font-size:15px; font-weight:600; color:var(--text); background:transparent; border:1px solid transparent; border-radius:7px; padding:6px 4px; max-width:360px; }
.rt-name .txt { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.rt-name:hover { background:var(--row-hover); }
.rt-more { position:relative; margin-left:-8px; }
.rt-more .icon-btn { width:26px; height:32px; border-color:transparent; background:transparent; }
.rt-more .icon-btn:hover, .rt-more.open .icon-btn { background:var(--surface); }
.rt-spacer { margin-left:auto; }
.rt-org { margin-left:4px; font-size:12px; color:var(--muted); white-space:nowrap; }
.dry-run { display:inline-flex; align-items:center; gap:7px; font-size:13px; font-weight:600; background:var(--ink-bg); color:var(--ink-fg); border:1px solid transparent; border-radius:6px; padding:8px 15px; height:36px; }
.dry-run:hover { filter:brightness(1.12); }
.dry-run svg { width:15px; height:15px; }
.rt-save { display:inline-flex; align-items:center; gap:6px; font-size:12px; color:var(--muted); margin-left:4px; }
.rt-save svg { width:16px; height:16px; color:var(--green-hi); }
.rt-save.saving svg { color:var(--accent); }
.menu-pop { position:absolute; z-index:50; min-width:232px; background:var(--card); border:1px solid var(--line); border-radius:12px; box-shadow:var(--menu-shadow); padding:6px; }
.menu-pop[hidden] { display:none; }
.mp-item { display:flex; align-items:center; gap:10px; padding:9px 12px; font-size:14px; color:var(--text); border-radius:7px; }
.mp-item:hover { background:var(--row-hover); }
.mp-item svg { width:16px; height:16px; color:var(--muted); flex:none; }
.mp-sep { height:1px; background:var(--line2); margin:6px 0; }
/* Default layout: working tree on the left (under the title), graph on the right. */
.bl-wrap { display:grid; grid-template-columns:minmax(0,54fr) minmax(0,46fr); gap:14px; transition:grid-template-columns .28s ease; }
.bl-wrap.topo-main { grid-template-columns:minmax(0,46fr) minmax(0,54fr); }
.bl-canvas { position:relative; background:var(--field); border:1px solid var(--line); border-radius:12px; min-height:640px; overflow:hidden; }
.bl-graph, .bl-graph svg { position:absolute; inset:0; width:100%; height:100%; }
.bl-rail { position:absolute; left:14px; top:50%; transform:translateY(-50%); display:flex; flex-direction:column; gap:2px; padding:6px; background:var(--card); border:1px solid var(--line-strong); border-radius:10px; }
.bl-rail button { width:30px; height:30px; border:none; border-radius:6px; background:transparent; color:var(--muted); display:flex; align-items:center; justify-content:center; }
.bl-rail button:hover { background:var(--surface); color:var(--text); }
.bl-rail button.on { color:var(--accent); background:var(--accent-tint); }
.bl-rail svg { width:15px; height:15px; }
.bl-nodelabel { position:absolute; left:50%; top:50%; transform:translate(-50%,-165%); display:flex; align-items:center; gap:8px; pointer-events:none; z-index:2; }
.bl-nodelabel .lbl { background:var(--primary-bg); color:var(--primary-fg); font-size:12px; font-weight:600; padding:8px 15px; border-radius:999px; white-space:nowrap; box-shadow:0 4px 14px rgba(0,0,0,.18); max-width:300px; overflow:hidden; text-overflow:ellipsis; }
.bl-panel { background:var(--card); border:1px solid var(--line); border-radius:12px; display:flex; flex-direction:column; min-height:640px; max-height:78vh; overflow:hidden; }
.bl-search { display:flex; align-items:center; gap:9px; padding:12px 14px; font-size:13px; color:var(--muted); border-bottom:1px solid var(--line2); }
.bl-search svg { width:15px; height:15px; }
.tree-header { display:flex; align-items:center; gap:14px; padding:9px 14px; border-bottom:1px solid var(--line2); font-size:13px; }
.th-expand { display:inline-flex; align-items:center; justify-content:center; width:28px; height:28px; color:var(--muted); background:transparent; border:1px solid var(--line-strong); border-radius:6px; padding:0; }
.th-expand:hover { background:var(--row-hover); color:var(--text); }
.th-expand svg { width:17px; height:17px; }
.th-count { font-size:11.5px; font-weight:500; color:var(--muted); display:inline-flex; align-items:center; }
.bl-count { font-family:var(--font-mono); font-size:11px; font-weight:500; color:var(--muted); background:var(--surface); border-radius:999px; padding:2px 8px; margin-left:5px; }
.bl-count--pre { color:var(--violet); background:color-mix(in srgb,var(--violet) 9%,transparent); }
.bl-count--muted { color:var(--muted); background:var(--surface); }
.th-right { margin-left:auto; display:inline-flex; align-items:center; gap:12px; }
.th-undo { display:inline-flex; align-items:center; gap:7px; font-size:12px; font-weight:600; color:var(--text); background:var(--field); border:1px solid var(--line-strong); border-radius:6px; padding:5px 10px; }
.th-undo:hover:not([disabled]) { background:var(--surface); }
.th-undo[disabled] { opacity:.45; cursor:default; }
.th-undo svg { width:14px; height:14px; }
/* "you are here" — an omnipresent location bar (no show/hide flicker).
Shows the recipe at the top and the deepest group as you scroll into it.
An ancestry icon appears only when there are intermediate levels above
(deep recipes, e.g. Spring migrations), opening a clickable path. */
.tree-crumb { position:relative; display:flex; align-items:center; width:100%; height:30px; font-size:13px; color:var(--text); background:var(--card); border-bottom:1px solid var(--line); box-shadow:0 3px 8px -4px rgba(0,0,0,.18); }
.crumb-main { flex:1; min-width:0; display:flex; align-items:center; gap:7px; height:100%; padding:0 6px 0 14px; background:transparent; border:none; color:inherit; text-align:left; }
.crumb-main:not([disabled]):hover { background:var(--row-hover); }
.crumb-main[disabled] { cursor:default; }
.tree-crumb .tw { width:15px; height:15px; flex:none; color:var(--muted); display:inline-flex; align-items:center; }
.tree-crumb .tw[hidden] { display:none; }
.tree-crumb .tw svg { width:15px; height:15px; }
.tree-crumb .nm { font-weight:500; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.crumb-main .bl-cnt { margin-left:auto; }
.crumb-anc { flex:none; width:34px; height:100%; display:inline-flex; align-items:center; justify-content:center; background:transparent; border:none; border-left:1px solid var(--line2); color:var(--muted); }
.crumb-anc[hidden] { display:none; }
.crumb-anc:hover, .crumb-anc.open { background:var(--surface); color:var(--text); }
.crumb-anc svg { width:16px; height:16px; }
.crumb-pop { position:absolute; z-index:60; min-width:250px; max-width:440px; }
.crumb-pop[hidden] { display:none; }
.cp-head { padding:8px 12px 4px; font-size:11px; font-weight:700; color:var(--muted); text-transform:uppercase; letter-spacing:.04em; }
.cp-item { display:flex; align-items:center; gap:8px; padding:8px 12px; font-size:13px; color:var(--text); border-radius:7px; }
.cp-item:hover { background:var(--row-hover); }
.cp-item .cp-nm { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.cp-item .cp-cnt { margin-left:auto; font-family:var(--font-mono); font-size:11px; color:var(--muted); }
.cp-item.cur { color:var(--accent); font-weight:600; }
/* windowed tree */
.bl-tree { flex:1; overflow-y:auto; position:relative; font-size:13px; }
.bl-tree::-webkit-scrollbar { width:10px; }
.bl-tree::-webkit-scrollbar-thumb { background:var(--line-strong); border-radius:999px; }
.tree-viewport { position:relative; width:100%; }
.bl-row { position:absolute; left:0; right:0; height:30px; display:flex; align-items:center; gap:7px; color:var(--text); }
.bl-row:hover { background:var(--row-hover); }
.bl-row.sel { background:var(--accent-tint); }
.bl-row.pre { background:color-mix(in srgb,var(--violet) 7%,transparent); }
.bl-twist { width:15px; height:15px; flex:none; color:var(--muted); background:none; border:none; display:inline-flex; align-items:center; justify-content:center; padding:0; }
.bl-twist.spacer { cursor:default; }
.bl-twist svg { width:15px; height:15px; }
.bl-rowselect { flex:1; min-width:0; display:flex; align-items:center; gap:7px; padding:0 6px 0 0; background:none; border:none; color:inherit; text-align:left; height:100%; }
.bl-kebab { flex:none; width:26px; height:24px; margin-right:8px; display:inline-flex; align-items:center; justify-content:center; background:transparent; border:none; border-radius:5px; color:var(--muted); opacity:0; }
.bl-row:hover .bl-kebab, .bl-row.sel .bl-kebab, .bl-kebab.open { opacity:1; }
.bl-kebab:hover, .bl-kebab.open { background:var(--surface); color:var(--text); }
.bl-kebab svg { width:16px; height:16px; }
.bl-chip { background:var(--primary-bg); color:var(--primary-fg); font-size:12px; font-weight:600; padding:3px 10px; border-radius:5px; white-space:nowrap; }
.bl-prechip { border:1px solid color-mix(in srgb,var(--violet) 45%,transparent); color:var(--text); font-size:12px; padding:2.5px 9px; border-radius:5px; }
.bl-ok { color:var(--green-hi); width:15px; height:15px; flex:none; }
.bl-rooti { width:15px; height:15px; color:var(--accent); flex:none; }
.bl-java { width:15px; height:15px; border-radius:4px; background:var(--ch-orange); color:#FBFAF6; font-family:var(--font-mono); font-size:8px; font-weight:700; display:inline-flex; align-items:center; justify-content:center; font-style:normal; flex:none; }
.bl-txt { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
/* step count on a collapsed/expandable group */
.bl-cnt { font-family:var(--font-mono); font-size:11px; color:var(--muted); background:var(--surface); border-radius:999px; padding:1px 8px; flex:none; margin-left:auto; }
.bl-foot { display:flex; align-items:center; gap:6px; padding:9px 12px; border-top:1px solid var(--line); }
.opt-toggle { display:inline-flex; align-items:center; gap:5px; background:none; border:none; font:inherit; font-size:13px; font-weight:600; color:var(--text); padding:3px 5px; border-radius:6px; }
.opt-toggle:hover { background:var(--row-hover); }
.opt-edit, .opt-chev-btn { display:inline-flex; align-items:center; justify-content:center; width:26px; height:24px; border:none; border-radius:5px; background:transparent; color:var(--muted); }
.opt-edit:hover, .opt-chev-btn:hover { background:var(--surface); color:var(--text); }
.opt-edit svg { width:15px; height:15px; }
.opt-chev-btn { margin-left:auto; }
.opt-chev { width:14px; height:14px; transition:transform .15s; }
.bl-foot.open .opt-chev { transform:rotate(180deg); }
.opt-panel { border-top:1px solid var(--line2); max-height:200px; overflow:auto; padding:4px 0; }
.opt-panel[hidden] { display:none; }
.opt-row { display:flex; align-items:center; gap:10px; padding:7px 14px; font-size:13px; }
.opt-row .on { color:var(--text); overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.opt-row .ov { margin-left:auto; flex:none; font-family:var(--font-mono); font-size:12px; color:var(--muted); background:var(--surface); border-radius:4px; padding:1px 7px; }
.opt-empty { padding:14px; text-align:center; color:var(--muted); font-style:italic; font-size:13px; }
.mp-item.danger { color:var(--er); }
.mp-item.danger svg { color:var(--er); }
.mp-kbd { margin-left:auto; font-family:var(--font-mono); font-size:11px; color:var(--muted); border:1px solid var(--line-strong); border-radius:4px; padding:1px 7px; }
.viz-filter { position:absolute; top:14px; right:14px; z-index:3; display:flex; align-items:center; gap:8px; background:var(--card); border:1px solid var(--line-strong); border-radius:8px; padding:7px 11px; box-shadow:0 6px 18px -8px rgba(0,0,0,.25); }
.viz-filter svg { width:15px; height:15px; color:var(--muted); }
.viz-filter input { border:none; outline:none; background:transparent; font:inherit; font-size:13px; color:var(--text); width:130px; }
.viz-legend { position:absolute; left:14px; bottom:14px; z-index:3; background:var(--card); border:1px solid var(--line); border-radius:10px; box-shadow:var(--menu-shadow); padding:11px 13px; font-size:11px; color:var(--text); }
.viz-legend[hidden] { display:none; }
.viz-legend .lg-head { font-size:10px; font-weight:700; letter-spacing:.05em; text-transform:uppercase; color:var(--muted); margin-bottom:7px; }
.viz-legend .lg-row { display:flex; align-items:center; gap:8px; margin:5px 0; }
.viz-legend .dot { width:12px; height:12px; border-radius:999px; flex:none; }
.viz-legend .hint { color:var(--muted); margin-top:8px; font-size:10.5px; }
.toast { position:fixed; left:50%; bottom:26px; transform:translateX(-50%) translateY(12px); z-index:90; display:inline-flex; align-items:center; gap:9px; background:var(--card); color:var(--text); border:1px solid var(--line-strong); border-radius:10px; box-shadow:var(--menu-shadow); padding:11px 15px; font-size:13px; opacity:0; pointer-events:none; transition:opacity .18s, transform .18s; }
.toast.show { opacity:1; transform:translateX(-50%) translateY(0); }
.toast svg { width:16px; height:16px; color:var(--green-hi); }
.proto-note { margin-top:14px; font-size:12px; color:var(--muted); display:flex; gap:8px; flex-wrap:wrap; }
.proto-note code { font-family:var(--font-mono); background:var(--surface); border-radius:4px; padding:1px 6px; }
/* ---- Phase 4: add-recipe button + finder ---- */
.th-add { display:inline-flex; align-items:center; gap:6px; font-size:12px; font-weight:600; color:var(--accent); background:var(--accent-tint); border:1px solid var(--accent-brd); border-radius:6px; padding:5px 10px; }
.th-add:hover { background:color-mix(in srgb,var(--accent) 16%,transparent); }
.th-add svg { width:14px; height:14px; }
.fx-ov { position:fixed; inset:0; z-index:80; display:none; align-items:flex-start; justify-content:center; padding:8vh 16px 16px; background:var(--scrim); }
.fx-ov.open { display:flex; }
.fx { width:660px; max-width:94%; max-height:80vh; display:flex; flex-direction:column; background:var(--card); border:1px solid var(--line-strong); border-radius:14px; box-shadow:var(--menu-shadow); overflow:hidden; }
.fx-head { display:flex; align-items:center; gap:10px; padding:16px 18px 12px; }
.fx-head h2 { margin:0; font-size:16px; font-weight:600; color:var(--text); display:flex; align-items:baseline; gap:8px; }
.fx-target { font-size:13px; font-weight:400; color:var(--muted); }
.fx-x { margin-left:auto; display:inline-flex; align-items:center; justify-content:center; width:30px; height:30px; border:none; border-radius:7px; background:transparent; color:var(--muted); }
.fx-x:hover { background:var(--surface); color:var(--text); }
.fx-x svg { width:16px; height:16px; }
.fx-search { display:flex; align-items:center; gap:9px; margin:0 18px; border:1px solid var(--line-strong); border-radius:10px; padding:10px 12px; }
.fx-search svg { width:17px; height:17px; color:var(--muted); }
.fx-search input { flex:1; border:none; outline:none; background:transparent; color:var(--text); font:inherit; font-size:14px; }
.fx-chips { display:flex; gap:7px; padding:12px 18px 8px; }
.fx-chip { font-size:12.5px; font-weight:600; color:var(--text); background:var(--field); border:1px solid var(--line-strong); border-radius:999px; padding:5px 13px; }
.fx-chip:hover { background:var(--surface); }
.fx-chip.active { background:var(--accent); color:#fff; border-color:transparent; }
.fx-list { flex:1; overflow-y:auto; padding:2px 10px 8px; }
.fx-row { display:flex; align-items:flex-start; gap:12px; width:100%; text-align:left; padding:11px 12px; border:1px solid transparent; border-radius:10px; background:transparent; color:inherit; }
.fx-row:hover { background:var(--row-hover); }
.fx-row.sel { background:var(--accent-tint); border-color:var(--accent-brd); }
.fx-ico { flex:none; margin-top:1px; }
.fx-main { flex:1; min-width:0; display:flex; flex-direction:column; gap:2px; }
.fx-nm { font-size:14px; font-weight:500; color:var(--text); display:flex; align-items:center; gap:8px; }
.fx-badge { font-size:10px; font-weight:700; letter-spacing:.03em; text-transform:uppercase; color:var(--green-hi); background:color-mix(in srgb,var(--green) 16%,transparent); border-radius:4px; padding:1px 6px; flex:none; }
.fx-id { font-family:var(--font-mono); font-size:11.5px; color:var(--muted); overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.fx-desc { font-size:12.5px; color:var(--muted); overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.fx-src { flex:none; font-size:11px; font-weight:600; color:var(--muted); background:var(--surface); border-radius:999px; padding:3px 9px; margin-top:1px; }
.fx-empty { padding:26px; text-align:center; color:var(--muted); font-style:italic; font-size:13px; }
.fx-foot { display:flex; align-items:center; gap:10px; padding:12px 18px; border-top:1px solid var(--line2); }
.fx-count { font-size:12px; color:var(--muted); }
.fx-right { margin-left:auto; display:inline-flex; gap:8px; }
.fx-btn { font-size:13px; font-weight:600; border-radius:8px; padding:8px 15px; border:1px solid var(--line-strong); background:var(--field); color:var(--text); }
.fx-btn:hover { background:var(--surface); }
.fx-btn--primary { background:var(--ink-bg); color:var(--ink-fg); border-color:transparent; }
.fx-btn--primary:hover { filter:brightness(1.12); }
.fx-btn--primary[disabled] { opacity:.45; cursor:default; filter:none; }
.fx-mark { background:color-mix(in srgb,var(--accent) 22%,transparent); border-radius:3px; padding:0 1px; }
/* ---- modal ---- */
.mo-ov { position: fixed; inset: 0; z-index: 80; display: none; align-items: flex-start; justify-content: center; padding-top: 7vh; background: var(--scrim); }
.mo-ov.open { display: flex; }
.mo { width: 720px; max-width: 92%; max-height: 80vh; display: flex; flex-direction: column; background: var(--card); border: 1px solid var(--line-strong); border-radius: 14px; box-shadow: var(--modal-shadow); overflow: hidden; }
.mo-header { display: flex; align-items: center; padding: 16px 18px; border-bottom: 1px solid var(--line2); }
.mo-header h2 { margin: 0; font-size: 17px; font-weight: 600; }
.mo-x { margin-left: auto; width: 30px; height: 30px; border: none; border-radius: 6px; background: transparent; color: var(--muted); display: flex; align-items: center; justify-content: center; }
.mo-x:hover { background: var(--surface); color: var(--text); }
.mo-x svg { width: 16px; height: 16px; }
.mo-tabs { display: flex; gap: 4px; padding: 8px 12px 0; border-bottom: 1px solid var(--line2); }
.mo-tab { font-size: 13px; font-weight: 600; color: var(--muted); background: transparent; border: none; border-bottom: 2px solid transparent; padding: 9px 12px; }
.mo-tab:hover { color: var(--text); }
.mo-tab.active { color: var(--accent); border-bottom-color: var(--accent); }
.mo-body { flex: 1; overflow-y: auto; padding: 16px 18px; }
.mo-pane { display: none; }
.mo-pane.active { display: block; }
.mo-foot { display: flex; align-items: center; gap: 10px; padding: 12px 18px; border-top: 1px solid var(--line2); }
.mo-foot .right { margin-left: auto; display: inline-flex; gap: 10px; }
.btn { font-size: 13px; font-weight: 600; border-radius: 6px; padding: 8px 15px; border: 1px solid var(--line-strong); background: var(--field); color: var(--text); }
.btn:hover { background: var(--surface); }
.btn--primary { background: var(--ink-bg); color: var(--ink-fg); border-color: transparent; }
.btn--tertiary { border-color: transparent; background: transparent; }
.btn--tertiary:hover { background: var(--surface); }
/* open-existing */
.pills { display: flex; gap: 7px; margin-bottom: 12px; }
.pill { font-size: 13px; font-weight: 600; color: var(--text); background: var(--field); border: 1px solid var(--line-strong); border-radius: 999px; padding: 6px 13px; }
.pill.active { background: var(--accent); color: #fff; border-color: transparent; }
.search-field { display: flex; align-items: center; gap: 9px; border: 1px solid var(--line-strong); border-radius: 10px; padding: 9px 12px; margin-bottom: 12px; }
.search-field svg { width: 18px; height: 18px; color: var(--muted); }
.search-field input { flex: 1; border: none; outline: none; background: transparent; color: var(--text); font: inherit; font-size: 14px; }
.oe-list { border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.oe-row { display: flex; align-items: center; gap: 11px; padding: 11px 14px; border-bottom: 1px solid var(--line2); }
.oe-row:last-child { border-bottom: none; }
.oe-row:hover { background: var(--row-hover); }
.oe-row .ico { width: 17px; height: 17px; color: var(--muted); flex: none; }
.oe-row .nm { font-size: 14px; color: var(--text); }
.oe-row .sub { margin-left: auto; font-size: 12px; color: var(--muted); }
.oe-empty { padding: 20px; text-align: center; color: var(--muted); font-style: italic; font-size: 13px; }
/* create-new form */
.nr-label { display: block; font-size: 13px; font-weight: 600; margin: 14px 0 7px; }
.nr-label .req { color: var(--er); margin-left: 2px; }
.nr-label:first-child { margin-top: 0; }
.nr-input { width: 100%; box-sizing: border-box; font: inherit; font-size: 14px; color: var(--text); background: var(--field); border: 1px solid var(--line-strong); border-radius: 10px; padding: 10px 13px; }
.nr-input:focus { outline: 2px solid var(--accent); outline-offset: 1px; }
textarea.nr-input { resize: none; height: 92px; }
.id-toggle { display: flex; align-items: center; gap: 10px; margin: 8px 0; font-size: 13px; color: var(--text); }
.tgl { width: 38px; height: 22px; border-radius: 999px; background: var(--accent); position: relative; border: none; flex: none; }
.tgl::after { content: ''; position: absolute; top: 2px; left: 18px; width: 18px; height: 18px; border-radius: 999px; background: #fff; transition: left .15s; }
.tgl[aria-pressed="false"] { background: var(--line-strong); }
.tgl[aria-pressed="false"]::after { left: 2px; }
.id-help-btn { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; font-weight: 600; color: var(--accent); background: none; border: none; padding: 0; margin-left: 8px; }
.id-help-btn svg { width: 13px; height: 13px; transition: transform .15s; }
.id-help-btn.open svg { transform: rotate(180deg); }
.id-help { display: none; font-size: 12.5px; color: var(--muted); line-height: 1.5; margin: 4px 0 2px; }
.id-help.show { display: block; }
.id-line { font-family: var(--font-mono); font-size: 12px; color: var(--muted); margin-top: 6px; }
/* import */
.import-hint { font-size: 13px; color: var(--muted); margin: 0 0 10px; }
.yaml-box { width: 100%; box-sizing: border-box; font-family: var(--font-mono); font-size: 12.5px; color: var(--text); background: var(--surface); border: 1px solid var(--line-strong); border-radius: 10px; padding: 12px; height: 190px; resize: none; }
/* manage */
.mg-row { display: flex; align-items: center; gap: 11px; padding: 11px 12px; border-bottom: 1px solid var(--line2); font-size: 14px; }
.mg-row input { width: 16px; height: 16px; accent-color: var(--accent); }
.mg-row .sub { margin-left: auto; font-family: var(--font-mono); font-size: 12px; color: var(--muted); }
/* toast */
.toast { position: fixed; left: 50%; bottom: 26px; transform: translateX(-50%) translateY(12px); z-index: 90; display: inline-flex; align-items: center; gap: 9px; background: var(--card); color: var(--text); border: 1px solid var(--line-strong); border-radius: 10px; box-shadow: var(--menu-shadow); padding: 11px 15px; font-size: 13px; opacity: 0; pointer-events: none; transition: opacity .18s, transform .18s; }
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
.toast svg { width: 16px; height: 16px; color: var(--green-hi); }
.proto-note { margin-top: 14px; font-size: 12px; color: var(--muted); display: flex; gap: 8px; flex-wrap: wrap; }
.proto-note code { font-family: var(--font-mono); background: var(--surface); border-radius: 4px; padding: 1px 6px; }
.mo-list { max-height: 44vh; overflow-y: auto; margin: 0 -6px; }
/* ---- Phase 5: focus mode ---- */
.tree-crumb[hidden] { display:none; }
.focus-bar { display:flex; align-items:center; gap:9px; padding:8px 14px; background:var(--accent-tint); border-bottom:1px solid var(--accent-brd); font-size:13px; color:var(--text); }
.focus-bar[hidden] { display:none; }
.focus-bar .fb-ico { width:15px; height:15px; color:var(--accent); flex:none; }
.focus-bar .fb-txt { min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.focus-bar .fb-txt b { font-weight:600; }
.focus-bar .fb-cnt { font-family:var(--font-mono); font-size:11px; color:var(--muted); flex:none; }
.focus-bar .fb-exit { margin-left:auto; display:inline-flex; align-items:center; gap:6px; font-size:12px; font-weight:600; color:var(--accent); background:var(--field); border:1px solid var(--accent-brd); border-radius:6px; padding:5px 11px; flex:none; }
.focus-bar .fb-exit:hover { background:color-mix(in srgb,var(--accent) 12%,transparent); }
.focus-bar .fb-exit svg { width:13px; height:13px; }
</style>
</head>
<body>
<svg width="0" height="0" style="position:absolute" aria-hidden="true">
<symbol id="i-sparkles" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M12 3l1.9 4.6L18.5 9.5 13.9 11.4 12 16l-1.9-4.6L5.5 9.5 10.1 7.6z"/><path d="M19 14l.7 1.8L21.5 16.5l-1.8.7L19 19l-.7-1.8L16.5 16.5l1.8-.7z"/></symbol>
<symbol id="i-pie" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M21.2 15.9A10 10 0 118.1 2.8"/><path d="M22 12A10 10 0 0012 2v10z"/></symbol>
<symbol id="i-globe" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><circle cx="12" cy="12" r="10"/><path d="M2 12h20M12 2a15 15 0 010 20 15 15 0 010-20z"/></symbol>
<symbol id="i-blocks" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><rect x="2" y="2" width="8" height="8" rx="1"/><rect x="14" y="2" width="8" height="8" rx="1"/><rect x="2" y="14" width="8" height="8" rx="1"/><rect x="14" y="14" width="8" height="8" rx="1"/></symbol>
<symbol id="i-history" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M3 3v5h5"/><path d="M3.05 13A9 9 0 106 5.3L3 8"/><path d="M12 7v5l4 2"/></symbol>
<symbol id="i-activity" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M22 12h-4l-3 9L9 3l-3 9H2"/></symbol>
<symbol id="i-repo" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M22 19a2 2 0 01-2 2H4a2 2 0 01-2-2V5a2 2 0 012-2h5l2 3h9a2 2 0 012 2z"/><circle cx="12" cy="13" r="2"/><path d="M14 13h3"/><path d="M7 13h3"/></symbol>
<symbol id="i-package" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M16.5 9.4L7.5 4.2M21 16V8a2 2 0 00-1-1.7l-7-4a2 2 0 00-2 0l-7 4A2 2 0 003 8v8a2 2 0 001 1.7l7 4a2 2 0 002 0l7-4A2 2 0 0021 16z"/><path d="M3.3 7L12 12l8.7-5M12 22V12"/></symbol>
<symbol id="i-search" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><circle cx="11" cy="11" r="8"/><path d="M21 21l-4.3-4.3"/></symbol>
<symbol id="i-chevr" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M9 18l6-6-6-6"/></symbol>
<symbol id="i-chevd" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M6 9l6 6 6-6"/></symbol>
<symbol id="i-check" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.4" stroke-linecap="round" stroke-linejoin="round"><path d="M20 6L9 17l-5-5"/></symbol>
<symbol id="i-check-c" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><circle cx="12" cy="12" r="9"/><path d="M8.5 12.2l2.4 2.4 4.6-4.9"/></symbol>
<symbol id="i-clock" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><circle cx="12" cy="12" r="9"/><path d="M12 7v5l3 2"/></symbol>
<symbol id="i-pr" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><circle cx="6" cy="6" r="3"/><circle cx="6" cy="18" r="3"/><circle cx="18" cy="18" r="3"/><path d="M6 9v6M18 15V9a3 3 0 00-3-3h-3l2-2m0 4l-2-2"/></symbol>
<symbol id="i-git-commit" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><circle cx="12" cy="12" r="3"/><line x1="3" y1="12" x2="9" y2="12"/><line x1="15" y1="12" x2="21" y2="12"/></symbol>
<symbol id="i-git-merge" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><circle cx="18" cy="18" r="3"/><circle cx="6" cy="6" r="3"/><path d="M6 21V9a9 9 0 009 9"/></symbol>
<symbol id="i-git-draft" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><circle cx="18" cy="18" r="3"/><circle cx="6" cy="6" r="3"/><path d="M18 6V5M18 11v-1"/><line x1="6" y1="9" x2="6" y2="21"/></symbol>
<symbol id="i-git-branch" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><line x1="6" y1="3" x2="6" y2="15"/><circle cx="18" cy="6" r="3"/><circle cx="6" cy="18" r="3"/><path d="M18 9a9 9 0 01-9 9"/></symbol>
<symbol id="i-cal" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><rect x="3" y="4" width="18" height="18" rx="2"/><line x1="16" y1="2" x2="16" y2="6"/><line x1="8" y1="2" x2="8" y2="6"/><line x1="3" y1="10" x2="21" y2="10"/></symbol>
<symbol id="i-filter" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><polygon points="22 3 2 3 10 12.46 10 19 14 21 14 12.46 22 3"/></symbol>
<symbol id="i-cols" 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="18" rx="2"/><line x1="12" y1="3" x2="12" y2="21"/></symbol>
<symbol id="i-refresh" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M21 12a9 9 0 11-2.64-6.36L21 8"/><path d="M21 3v5h-5"/></symbol>
<symbol id="i-upcircle" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><circle cx="12" cy="12" r="9"/><path d="M12 16V8M8 12l4-4 4 4"/></symbol>
<symbol id="i-downcircle" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><circle cx="12" cy="12" r="9"/><path d="M12 8v8M8 12l4 4 4-4"/></symbol>
<symbol id="i-play" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><polygon points="6 4 19 12 6 20 6 4"/></symbol>
<symbol id="i-undo" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M3 7v6h6"/><path d="M21 17a9 9 0 00-9-9 9 9 0 00-6 2.3L3 13"/></symbol>
<symbol id="i-code" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M16 18l6-6-6-6M8 6l-6 6 6 6"/></symbol>
<symbol id="i-target" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><circle cx="12" cy="12" r="9"/><circle cx="12" cy="12" r="4"/></symbol>
<symbol id="i-tag" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M20.59 13.41l-7.17 7.17a2 2 0 01-2.83 0L2 12V2h10l8.59 8.59a2 2 0 010 2.83z"/><circle cx="7" cy="7" r="1.5"/></symbol>
<symbol id="i-info" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><circle cx="12" cy="12" r="9"/><path d="M12 16v-4M12 8h.01"/></symbol>
<symbol id="i-alert" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><circle cx="12" cy="12" r="9"/><path d="M12 8v4M12 16h.01"/></symbol>
<symbol id="i-warn" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M10.3 4.2l-8.1 14A2 2 0 004 21.2h16.2a2 2 0 001.7-3l-8.1-14a2 2 0 00-3.5 0z"/><path d="M12 10v4M12 17.5h.01"/></symbol>
<symbol id="i-minus" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M5 12h14"/></symbol>
<symbol id="i-list" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><line x1="9" y1="6" x2="21" y2="6"/><line x1="9" y1="12" x2="21" y2="12"/><line x1="9" y1="18" x2="21" y2="18"/><path d="M4 6h.01M4 12h.01M4 18h.01"/></symbol>
<symbol id="i-copy" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><rect x="9" y="9" width="13" height="13" rx="2"/><path d="M5 15H4a2 2 0 01-2-2V4a2 2 0 012-2h9a2 2 0 012 2v1"/></symbol>
<symbol id="i-plus" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><circle cx="12" cy="12" r="9"/><path d="M12 8v8M8 12h8"/></symbol>
<symbol id="i-logo-github" viewBox="0 0 24 24" fill="currentColor"><path d="M12 .297c-6.63 0-12 5.373-12 12 0 5.303 3.438 9.8 8.205 11.385.6.113.82-.258.82-.577 0-.285-.01-1.04-.015-2.04-3.338.724-4.042-1.61-4.042-1.61C4.422 18.07 3.633 17.7 3.633 17.7c-1.087-.744.084-.729.084-.729 1.205.084 1.838 1.236 1.838 1.236 1.07 1.835 2.809 1.305 3.495.998.108-.776.417-1.305.76-1.605-2.665-.3-5.466-1.332-5.466-5.93 0-1.31.465-2.38 1.235-3.22-.135-.303-.54-1.523.105-3.176 0 0 1.005-.322 3.3 1.23.96-.267 1.98-.399 3-.405 1.02.006 2.04.138 3 .405 2.28-1.552 3.285-1.23 3.285-1.23.645 1.653.24 2.873.12 3.176.765.84 1.23 1.91 1.23 3.22 0 4.61-2.805 5.625-5.475 5.92.42.36.81 1.096.81 2.22 0 1.606-.015 2.896-.015 3.286 0 .315.21.69.825.57C20.565 22.092 24 17.592 24 12.297c0-6.627-5.373-12-12-12"/></symbol>
<symbol id="i-logo-bitbucket" viewBox="0 0 24 24" fill="currentColor"><path d="M.778 1.213a.768.768 0 00-.768.892l3.263 19.81c.084.5.515.868 1.022.873H19.95a.772.772 0 00.77-.646l3.27-20.03a.768.768 0 00-.768-.891zM14.52 15.53H9.522L8.17 8.466h7.561z"/></symbol>
<symbol id="i-logo-slack" viewBox="0 0 24 24" fill="currentColor"><path d="M5.042 15.165a2.528 2.528 0 0 1-2.52 2.523A2.528 2.528 0 0 1 0 15.165a2.527 2.527 0 0 1 2.522-2.52h2.52v2.52zM6.313 15.165a2.527 2.527 0 0 1 2.521-2.52 2.527 2.527 0 0 1 2.521 2.52v6.313A2.528 2.528 0 0 1 8.834 24a2.528 2.528 0 0 1-2.521-2.522v-6.313zM8.834 5.042a2.528 2.528 0 0 1-2.521-2.52A2.528 2.528 0 0 1 8.834 0a2.528 2.528 0 0 1 2.521 2.522v2.52H8.834zM8.834 6.313a2.528 2.528 0 0 1 2.521 2.521 2.528 2.528 0 0 1-2.521 2.521H2.522A2.528 2.528 0 0 1 0 8.834a2.528 2.528 0 0 1 2.522-2.521h6.312zM18.956 8.834a2.528 2.528 0 0 1 2.522-2.521A2.528 2.528 0 0 1 24 8.834a2.528 2.528 0 0 1-2.522 2.521h-2.522V8.834zM17.688 8.834a2.528 2.528 0 0 1-2.523 2.521 2.527 2.527 0 0 1-2.52-2.521V2.522A2.527 2.527 0 0 1 15.165 0a2.528 2.528 0 0 1 2.523 2.522v6.312zM15.165 18.956a2.528 2.528 0 0 1 2.523 2.522A2.528 2.528 0 0 1 15.165 24a2.527 2.527 0 0 1-2.52-2.522v-2.522h2.52zM15.165 17.688a2.527 2.527 0 0 1-2.52-2.523 2.526 2.526 0 0 1 2.52-2.52h6.313A2.527 2.527 0 0 1 24 15.165a2.528 2.528 0 0 1-2.522 2.523h-6.313z"/></symbol>
<symbol id="i-logo-npm" viewBox="0 0 24 24" fill="currentColor"><path d="M1.763 0C.786 0 0 .786 0 1.763v20.474C0 23.214.786 24 1.763 24h20.474c.977 0 1.763-.786 1.763-1.763V1.763C24 .786 23.214 0 22.237 0zM5.13 5.323l13.837.019-.009 13.836h-3.464l.01-10.382h-3.456L12.04 19.17H5.113z"/></symbol>
<symbol id="i-logo-go" viewBox="0 0 24 24" fill="currentColor"><path d="M1.811 10.231c-.047 0-.058-.023-.035-.059l.246-.315c.023-.035.081-.058.128-.058h4.172c.046 0 .058.035.035.07l-.199.303c-.023.036-.082.07-.117.07zM.047 11.306c-.047 0-.059-.023-.035-.058l.245-.316c.023-.035.082-.058.129-.058h5.328c.047 0 .07.035.058.07l-.093.28c-.012.047-.058.07-.105.07zm2.828 1.075c-.047 0-.059-.035-.035-.07l.163-.292c.023-.035.07-.07.117-.07h2.337c.047 0 .07.035.07.082l-.023.28c0 .047-.047.082-.082.082zm12.129-2.36c-.736.187-1.239.327-1.963.514-.176.046-.187.058-.34-.117-.174-.199-.303-.327-.548-.444-.737-.362-1.45-.257-2.115.175-.795.514-1.204 1.274-1.192 2.22.011.935.654 1.706 1.577 1.835.795.105 1.46-.175 1.987-.77.105-.13.198-.27.315-.434H10.47c-.245 0-.304-.152-.222-.35.152-.362.432-.97.596-1.274a.315.315 0 01.292-.187h4.253c-.023.316-.023.631-.07.947a4.983 4.983 0 01-.958 2.29c-.841 1.11-1.94 1.8-3.33 1.986-1.145.152-2.209-.07-3.143-.77-.865-.655-1.356-1.52-1.484-2.595-.152-1.274.222-2.419.993-3.424.83-1.086 1.928-1.776 3.272-2.02 1.098-.2 2.15-.07 3.096.571.62.41 1.063.97 1.356 1.648.07.105.023.164-.117.2m3.868 6.461c-1.064-.024-2.034-.328-2.852-1.029a3.665 3.665 0 01-1.262-2.255c-.21-1.32.152-2.489.947-3.529.853-1.122 1.881-1.706 3.272-1.95 1.192-.21 2.314-.095 3.33.595.923.63 1.496 1.484 1.648 2.605.198 1.578-.257 2.863-1.344 3.962-.771.783-1.718 1.273-2.805 1.495-.315.06-.63.07-.934.106zm2.78-4.72c-.011-.153-.011-.27-.034-.387-.21-1.157-1.274-1.81-2.384-1.554-1.087.245-1.788.935-2.045 2.033-.21.912.234 1.835 1.075 2.21.643.28 1.285.244 1.905-.07.923-.48 1.425-1.228 1.484-2.233z"/></symbol>
<symbol id="i-logo-maven" viewBox="0 0 24 24" fill="currentColor"><path d="M4.237.001c-.312-.013-.665.072-.828.457-.158.374-.283 1.188-.34 2.276l1.223.591c-.02-.737.007-1.43.076-2.066-.026.299-.056.96.006 2.039.019.342.049.725.088 1.15.002.024.002.047.007.069a45.485 45.485 0 0 0 .309 2.412c.057.368.126.752.195 1.16l-.01.01c.014.01.015.018.014.023l.03.16c.03.162.06.328.093.494l.108.553.056.289a61.72 61.72 0 0 0 .457 2.068c.09.382.186.78.287 1.186.098.386.199.783.309 1.193.096.362.199.735.303 1.117.003.018.012.036.015.055a145.826 145.826 0 0 0 .34 1.185l.049.174c.078.261.158.533.242.805a4.2 4.2 0 0 1-.293-.135l-.19-.654c-.02-.077-.042-.148-.062-.225l-.002-.004-.004-.002c-.087-.3-.17-.607-.257-.916-.023-.087-.044-.173-.069-.263l-.314-1.178c-.1-.381-.194-.765-.29-1.154-.094-.39-.185-.78-.277-1.172-.093-.401-.181-.8-.265-1.203-.085-.396-.161-.798-.24-1.193a50.315 50.315 0 0 1-.211-1.17c-.004-.013-.006-.03-.01-.041l.004-.002c-.057-.386-.116-.77-.174-1.15a60.905 60.905 0 0 1-.154-1.204 27.447 27.447 0 0 1-.172-2.41l-1.22-.59c-.004.074-.01.15-.013.23-.012.294-.02.605-.023.93a45.3 45.3 0 0 0 .006 1.157c.009.37.025.755.045 1.148.02.336.042.675.07 1.022l.002.039.006.004c.003.023.007.05.006.076.033.368.064.739.107 1.115a34.493 34.493 0 0 0 .303 2.125c.01.064.024.131.035.195a23.418 23.418 0 0 0 .547 2.32c.07.237.14.464.21.68.063.182.13.365.194.545.155.422.327.832.512 1.232l.006.004a.318.318 0 0 0 .02.05c.225.485.475.95.755 1.395.01.013.02.033.03.047-.455-.183-1.259-.098-1.253-.097.83.288 1.557.64 2.016 1.175-.183.2-.523.352-.953.477.594.064.924-.039 1.045-.092-.31.26-.483.732-.635 1.24.35-.57.696-.949 1.033-1.094.078.258.162.524.244.788A147.532 147.532 0 0 0 5.157 24a.56.56 0 0 0 .43-.312c.13-.282.83-1.775 1.908-3.875.413 1.303.88 2.679 1.386 4.109a.494.494 0 0 0 .076-.465 103.735 103.735 0 0 1-1.308-3.945c.154-.299.316-.612.484-.932.125.04.255.094.389.155.203.186.352.491.482.84a1.515 1.515 0 0 0-.334-1.098c1.335.258 2.547.09 3.287-.81a3.97 3.97 0 0 0 .192-.258c-.325.304-.682.404-1.313.273.996-.281 1.523-.617 2.035-1.22.12-.145.244-.303.371-.48-.943.722-1.927.822-2.9.493l-.045-.018c.914.02 2.203-.474 3.092-1.189.41-.33.796-.73 1.17-1.21.28-.359.55-.76.82-1.216.234-.393.468-.824.7-1.293a2.83 2.83 0 0 1-.74.137l-.144.008c-.048.002-.093 0-.146.002.885-.198 1.5-.74 1.994-1.447-.24.117-.628.262-1.07.297-.058.006-.12.006-.182.006-.013-.002-.028 0-.047-.002.306-.078.574-.178.81-.309a3.363 3.363 0 0 0 .358-.236c.044-.037.088-.07.13-.106.099-.086.193-.18.28-.287.028-.034.056-.063.08-.098.036-.05.073-.098.104-.146a8.388 8.388 0 0 0 .51-.828c.015-.031.032-.057.046-.088.04-.084.08-.16.11-.227.042-.099.074-.179.092-.238a.515.515 0 0 1-.108.051c-.273.112-.727.187-1.086.201-.004 0-.008 0-.013.004h-.067c.72-.214 1.067-.45 1.422-.818a13.883 13.883 0 0 0 1.154-1.428c.264-.37.505-.738.692-1.072a6.5 6.5 0 0 0 .298-.592c.066-.157.122-.305.172-.45-.466.01-.986.011-1.48 0 .495.01 1.015.007 1.484-.005.5-1.485.063-2.262.063-2.262s-.526-1.212-1.4-.851c-.426.175-1.172.73-2.083 1.56l.514 1.45a17.561 17.561 0 0 1 1.703-1.602c-.257.22-.807.726-1.615 1.644-.256.29-.537.624-.844.997-.017.02-.035.038-.047.06a51.435 51.435 0 0 0-1.666 2.187c-.248.34-.498.704-.765 1.088h-.016c.002.02-.004.028-.01.032l-.101.152c-.104.155-.213.31-.318.47l-.352.534c-.061.09-.124.181-.186.277-.184.282-.367.573-.558.873a97.351 97.351 0 0 0-1.428 2.338 96.866 96.866 0 0 0-1.341 2.343c-.012.017-.02.04-.034.057a197.256 197.256 0 0 0-.668 1.223l-.097.181c-.17.318-.346.642-.52.979 0 .004-.005.008-.006.013-.026.048-.05.093-.072.141-.117.222-.218.424-.45.87a1.352 1.352 0 0 0-.233-.182l.345-.65c.047-.089.096-.177.143-.27l.04-.077.546-1.001.13-.233v-.006l-.001-.006c.169-.31.345-.62.52-.94.051-.087.102-.173.153-.265.224-.395.454-.794.684-1.197a91.685 91.685 0 0 1 2.135-3.504c.247-.386.503-.77.754-1.152.092-.138.182-.272.279-.41a72.9 72.9 0 0 1 .48-.701c.007-.012.019-.024.026-.037h.006c.26-.356.517-.713.773-1.065.278-.373.554-.735.83-1.09a31.075 31.075 0 0 1 1.777-2.075l-.515-1.446c-.06.057-.126.116-.192.178a32.37 32.37 0 0 0-.758.729c-.295.294-.597.606-.912.935a46.032 46.032 0 0 0-1.632 1.838l-.03.033.002.008c-.017.02-.033.044-.054.064-.266.323-.538.649-.801.985a39.105 39.105 0 0 0-1.445 1.95c-.043.06-.085.126-.127.186a26.458 26.458 0 0 0-1.403 2.303c-.13.247-.256.485-.37.715-.096.195-.187.395-.278.591-.21.463-.398.93-.566 1.399l.002.006a.36.36 0 0 0-.026.058c-.108.303-.203.608-.29.914-.14.174-.302.325-.483.46a3.505 3.505 0 0 0-.131-.153 5.148 5.148 0 0 0 .824-2.211 6.4 6.4 0 0 0-.016-1.488c-.046-.4-.126-.82-.238-1.274-.097-.393-.217-.81-.363-1.248-.091.185-.22.367-.379.545l-.086.094c-.029.032-.06.06-.092.094.434-.674.486-1.397.358-2.148a2.722 2.722 0 0 1-.49.85c-.033.038-.072.077-.11.116-.01.007-.019.018-.033.028.144-.24.25-.467.318-.698a1.29 1.29 0 0 0 .04-.146 2.85 2.85 0 0 0 .038-.225l.018-.146a2.11 2.11 0 0 0-.002-.354c-.003-.04-.004-.076-.01-.113-.01-.055-.016-.105-.027-.154a7.416 7.416 0 0 0-.193-.84c-.01-.028-.015-.056-.026-.084-.027-.079-.048-.149-.072-.209a2.1 2.1 0 0 0-.09-.209.455.455 0 0 1-.035.1c-.102.24-.34.57-.557.8-.003.003-.007.005-.007.01l-.04.043c.318-.58.39-.946.385-1.398a12.274 12.274 0 0 0-.16-1.615 10.68 10.68 0 0 0-.232-1.104 5.853 5.853 0 0 0-.18-.558 6.337 6.337 0 0 0-.172-.391 26.18 26.18 0 0 0 .002-.004C5.576.341 4.82.124 4.82.124s-.27-.11-.582-.123zm3.38 15.783l.032.082v.002c-.06.033-.116.067-.178.097-.012.004-.024.012-.039.018a2.41 2.41 0 0 0 .186-.2zm-.603 1.626c.13.136.25.242.354.32l.07.227a1.866 1.866 0 0 0-.246.053l-.03-.098c-.024-.084-.048-.17-.076-.257l-.021-.073zm.26.875a2.34 2.34 0 0 1 .271.01l.07.229a.778.778 0 0 1 .247-.004l-.326.627a127.643 127.643 0 0 1-.262-.862z"/></symbol>
<symbol id="i-logo-spring" viewBox="0 0 24 24" fill="currentColor"><path d="M21.8537 1.4158a10.4504 10.4504 0 0 1-1.284 2.2471A11.9666 11.9666 0 1 0 3.8518 20.7757l.4445.3951a11.9543 11.9543 0 0 0 19.6316-8.2971c.3457-3.0126-.568-6.8649-2.0743-11.458zM5.5805 20.8745a1.0174 1.0174 0 1 1-.1482-1.4323 1.0396 1.0396 0 0 1 .1482 1.4323zm16.1991-3.5806c-2.9385 3.9263-9.2601 2.5928-13.2852 2.7904 0 0-.7161.0494-1.4323.1481 0 0 .2717-.1234.6174-.2469 2.8398-.9877 4.1732-1.1853 5.9018-2.0743 3.2349-1.6545 6.4698-5.2844 7.1118-9.0379-1.2347 3.6053-4.9881 6.7167-8.3959 7.9761-2.3459.8643-6.5685 1.7039-6.5685 1.7039l-.1729-.0988c-2.8645-1.4076-2.9632-7.6304 2.2718-9.6306 2.2966-.889 4.4696-.395 6.9637-.9877 2.6422-.6174 5.7043-2.5929 6.939-5.1857 1.3828 4.1732 3.062 10.643.0493 14.6434z"/></symbol>
<symbol id="i-logo-springboot" viewBox="0 0 24 24" fill="currentColor"><path d="m23.693 10.7058-4.73-8.1844c-.4094-.7106-1.4166-1.2942-2.2402-1.2942H7.2725c-.819 0-1.8308.5836-2.2402 1.2942L.307 10.7058c-.4095.7106-.4095 1.873 0 2.5837l4.7252 8.189c.4094.7107 1.4166 1.2943 2.2402 1.2943h9.455c.819 0 1.826-.5836 2.2402-1.2942l4.7252-8.189c.4095-.7107.4095-1.8732 0-2.5838zM10.9763 5.7547c0-.5365.4377-.9742.9742-.9742s.9742.4377.9742.9742v5.8217c0 .5366-.4377.9742-.9742.9742s-.9742-.4376-.9742-.9742zm.9742 12.4294c-3.6427 0-6.6077-2.965-6.6077-6.6077.0047-2.0896.993-4.0521 2.6685-5.304a.8657.8657 0 0 1 1.2142.1788.8657.8657 0 0 1-.1788 1.2143c-2.1602 1.6048-2.612 4.6592-1.0072 6.8194 1.6049 2.1603 4.6593 2.612 6.8195 1.0072 1.2378-.9177 1.9673-2.372 1.9673-3.9157a4.8972 4.8972 0 0 0-1.9861-3.925c-.386-.2824-.466-.8284-.1836-1.2143.2824-.386.8283-.466 1.2143-.1835 1.6895 1.2471 2.6826 3.2238 2.6873 5.3228 0 3.6474-2.965 6.6077-6.6077 6.6077z"/></symbol>
<symbol id="i-logo-springsec" viewBox="0 0 24 24" fill="currentColor"><path d="M20.59 2.066 11.993 0 3.41 2.066v6.612h4.557a3.804 3.804 0 0 0 0 .954H3.41v3.106C3.41 19.867 11.994 24 11.994 24s8.582-4.133 8.582-11.258V9.635h-4.545a3.616 3.616 0 0 0 0-.954h4.558zM12 12.262h-.006a3.109 3.109 0 1 1 .006 0zm-.006-4.579a.804.804 0 0 0-.37 1.52v.208l.238.237v.159l.159.159v.159l-.14.14.15.246v.159l-.16.189.223.222.246-.246V9.218a.804.804 0 0 0-.346-1.535zm0 .836a.299.299 0 1 1 .298-.299.299.299 0 0 1-.298.3z"/></symbol>
<symbol id="i-logo-kotlin" viewBox="0 0 24 24" fill="currentColor"><path d="M24 24H0V0h24L12 12Z"/></symbol>
<symbol id="i-download" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M21 15v4a2 2 0 01-2 2H5a2 2 0 01-2-2v-4"/><path d="M7 10l5 5 5-5M12 15V3"/></symbol>
<symbol id="i-gql" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.8" stroke-linecap="round" stroke-linejoin="round"><path d="M12 3l7.8 4.5v9L12 21l-7.8-4.5v-9z"/><path d="M4.2 16.5L12 3l7.8 13.5z"/><circle cx="12" cy="3" r="1.4" fill="currentColor"/><circle cx="19.8" cy="7.5" r="1.4" fill="currentColor"/><circle cx="19.8" cy="16.5" r="1.4" fill="currentColor"/><circle cx="12" cy="21" r="1.4" fill="currentColor"/><circle cx="4.2" cy="16.5" r="1.4" fill="currentColor"/><circle cx="4.2" cy="7.5" r="1.4" fill="currentColor"/></symbol>
<symbol id="i-help" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><circle cx="12" cy="12" r="10"/><path d="M9.1 9a3 3 0 015.8 1c0 2-3 3-3 3"/><path d="M12 17h.01"/></symbol>
<symbol id="i-gear" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M12.22 2h-.44a2 2 0 00-2 2v.18a2 2 0 01-1 1.73l-.43.25a2 2 0 01-2 0l-.15-.08a2 2 0 00-2.73.73l-.22.38a2 2 0 00.73 2.73l.15.1a2 2 0 011 1.72v.51a2 2 0 01-1 1.74l-.15.09a2 2 0 00-.73 2.73l.22.38a2 2 0 002.73.73l.15-.08a2 2 0 012 0l.43.25a2 2 0 011 1.73V20a2 2 0 002 2h.44a2 2 0 002-2v-.18a2 2 0 011-1.73l.43-.25a2 2 0 012 0l.15.08a2 2 0 002.73-.73l.22-.39a2 2 0 00-.73-2.73l-.15-.08a2 2 0 01-1-1.74v-.5a2 2 0 011-1.74l.15-.09a2 2 0 00.73-2.73l-.22-.38a2 2 0 00-2.73-.73l-.15.08a2 2 0 01-2 0l-.43-.25a2 2 0 01-1-1.73V4a2 2 0 00-2-2z"/><circle cx="12" cy="12" r="3"/></symbol>
<symbol id="i-file" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M14 2H6a2 2 0 00-2 2v16a2 2 0 002 2h12a2 2 0 002-2V8z"/><path d="M14 2v6h6"/></symbol>
<symbol id="i-org" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M3 21h18M5 21V7l7-4 7 4v14M9 9h.01M9 13h.01M9 17h.01M15 9h.01M15 13h.01M15 17h.01"/></symbol>
<symbol id="i-people" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M17 21v-2a4 4 0 00-4-4H5a4 4 0 00-4 4v2"/><circle cx="9" cy="7" r="4"/><path d="M23 21v-2a4 4 0 00-3-3.87M16 3.13a4 4 0 010 7.75"/></symbol>
<symbol id="i-collapse" 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="18" rx="2"/><path d="M9 3v18"/><path d="M15 10l-2 2 2 2"/></symbol>
<symbol id="i-panel-right" 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="18" rx="2"/><path d="M15 3v18"/><path d="M9 10l2 2-2 2"/></symbol>
<symbol id="i-swap" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M8 3L4 7l4 4"/><path d="M4 7h16"/><path d="M16 21l4-4-4-4"/><path d="M20 17H4"/></symbol>
<symbol id="i-sun" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><circle cx="12" cy="12" r="4"/><path d="M12 2v2M12 20v2M4.9 4.9l1.4 1.4M17.7 17.7l1.4 1.4M2 12h2M20 12h2M4.9 19.1l1.4-1.4M17.7 6.3l1.4-1.4"/></symbol>
<symbol id="i-moon" viewBox="0 0 24 24" fill="currentColor"><path d="M21 12.8A9 9 0 1111.2 3a7 7 0 009.8 9.8z"/></symbol>
<filter id="cvd-deutan" color-interpolation-filters="sRGB"><feColorMatrix type="matrix" values="0.625 0.375 0 0 0 0.7 0.3 0 0 0 0 0.3 0.7 0 0 0 0 0 1 0"/></filter>
<filter id="cvd-protan" color-interpolation-filters="sRGB"><feColorMatrix type="matrix" values="0.567 0.433 0 0 0 0.558 0.442 0 0 0 0 0.242 0.758 0 0 0 0 0 1 0"/></filter>
<symbol id="i-x" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.2" stroke-linecap="round"><path d="M18 6L6 18M6 6l12 12"/></symbol>
<symbol id="i-link" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M10 13a5 5 0 007.54.54l3-3a5 5 0 00-7.07-7.07l-1.72 1.71"/><path d="M14 11a5 5 0 00-7.54-.54l-3 3a5 5 0 007.07 7.07l1.71-1.71"/></symbol>
<symbol id="i-eye" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M2 12s3.5-7 10-7 10 7 10 7-3.5 7-10 7-10-7-10-7z"/><circle cx="12" cy="12" r="3"/></symbol>
<symbol id="i-user" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M19 21v-2a4 4 0 00-4-4H9a4 4 0 00-4 4v2"/><circle cx="12" cy="7" r="4"/></symbol>
<symbol id="i-send" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.8" stroke-linecap="round" stroke-linejoin="round"><circle cx="12" cy="12" r="9.2"/><path d="M12 16V8M8.5 11.5L12 8l3.5 3.5"/></symbol>
<!-- Moderne flat mark (exact path from results-focus-view) -->
<symbol id="i-moderne-flat" viewBox="0 0 47 48" fill="none"><path d="M46.2205 0.092c-.4435-.1841-.9528-.0834-1.2933.2587L24.4951 20.8816C23.1532 9.1456 13.2189 0 1.1874 0 .8727 0 .5723.1265.3491.3508.1259.575 0 .8769 0 1.1932v44.7963C0 46.5273.5322 47.1856 1.1845 47.1856H45.7627c.6552 0 1.1874-.5348 1.1874-1.1932V1.1932c0-.483-.289-.9171-.7325-1.1012zM44.5781 4.0711v18.3257H26.3406L44.5781 4.0711zM44.5781 33.5951H24.661v-8.8149h19.9171v8.8149zM2.3748 43.1087V24.7831h18.2376L11.4936 33.9459 2.3748 43.1087zM2.3748 2.4179c10.6925.598 19.2877 9.2347 19.8828 19.9789H2.3748V2.4179zM13.1703 35.6335l9.1188-9.1628v18.3257H4.0515l9.1188-9.1629zM24.6639 44.7964v-8.815h19.9171v8.815H24.6639z" fill="currentColor" stroke="currentColor" stroke-width="1.4" stroke-linejoin="round"/></symbol>
<symbol id="i-levels" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><line x1="4" y1="6" x2="20" y2="6"/><line x1="9" y1="12" x2="20" y2="12"/><line x1="14" y1="18" x2="20" y2="18"/></symbol>
<symbol id="i-collapse-all" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M3 5h8"/><path d="M3 12h8"/><path d="M3 19h8"/><path d="m15 8 3-3 3 3"/><path d="m15 16 3 3 3-3"/></symbol>
<symbol id="i-expand-all" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M3 5h8"/><path d="M3 12h8"/><path d="M3 19h8"/><path d="m15 5 3 3 3-3"/><path d="m15 19 3-3 3 3"/></symbol>
<symbol id="i-pencil" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M12 20h9"/><path d="M16.5 3.5a2.12 2.12 0 0 1 3 3L7 19l-4 1 1-4Z"/></symbol>
<symbol id="i-trash" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><polyline points="3 6 5 6 21 6"/><path d="M19 6l-1 14a2 2 0 0 1-2 2H8a2 2 0 0 1-2-2L5 6"/><path d="M10 11v6"/><path d="M14 11v6"/><path d="M9 6V4a2 2 0 0 1 2-2h2a2 2 0 0 1 2 2v2"/></symbol>
<symbol id="i-more" viewBox="0 0 24 24" fill="currentColor" stroke="none"><circle cx="12" cy="5" r="1.6"/><circle cx="12" cy="12" r="1.6"/><circle cx="12" cy="19" r="1.6"/></symbol>
<symbol id="i-focus" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><circle cx="12" cy="12" r="3"/><path d="M3 7V5a2 2 0 0 1 2-2h2"/><path d="M17 3h2a2 2 0 0 1 2 2v2"/><path d="M21 17v2a2 2 0 0 1-2 2h-2"/><path d="M7 21H5a2 2 0 0 1-2-2v-2"/></symbol>
<symbol id="i-edit" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M12 3H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-7"/><path d="M18.5 2.5a2.12 2.12 0 0 1 3 3L12 15l-4 1 1-4Z"/></symbol>
</svg>
<div class="page">
<div class="topbar">
<button class="title-btn" id="titleBtn" aria-label="Open or create a recipe"><svg class="blocks"><use href="#i-blocks"/></svg> Builder <svg class="chev"><use href="#i-chevd"/></svg></button>
<span class="spacer"></span>
<button class="icon-btn" id="themeTop" title="Toggle light / dark"><svg><use href="#i-moon"/></svg></button>
</div>
<div class="recipe-toolbar">
<button class="rt-name" id="renameBtn" title="Click to rename"><span class="txt" id="recipeName">Enterprise baseline migration</span></button>
<div class="rt-more" id="moreWrap">
<button class="icon-btn" id="moreBtn" title="Recipe actions" aria-haspopup="true"><svg><use href="#i-more"/></svg></button>
<div class="menu-pop" id="moreMenu" hidden style="top:38px;left:0">
<div class="mp-item" data-toast="Opened “Edit details”"><svg><use href="#i-gear"/></svg> Edit details</div>
<div class="mp-item" data-toast="Opened YAML editor"><svg><use href="#i-code"/></svg> Edit as YAML</div>
<div class="mp-sep"></div>
<div class="mp-item" data-action="download"><svg><use href="#i-download"/></svg> Download YAML</div>
<div class="mp-item" data-action="copy"><svg><use href="#i-copy"/></svg> Copy as YAML to clipboard</div>
</div>
</div>
<span class="rt-save" id="saveInd" title="All changes saved"><svg><use href="#i-check-c"/></svg> Saved</span>
<span class="rt-spacer"></span>
<span class="rt-org" id="orgText">Will run on <b>271</b> repositories</span>
<button class="dry-run" id="dryRunBtn" title="Dry run on 271 repositories"><svg><use href="#i-play"/></svg> Dry run</button>
</div>
<div class="bl-wrap">
<div class="bl-panel">
<div class="bl-search"><svg><use href="#i-search"/></svg> Search and filter recipe</div>
<div class="tree-header">
<button class="th-expand" id="expandAllBtn" title="Expand all"><svg id="expandAllIcon"><use href="#i-expand-all"/></svg></button>
<span class="th-count">Recipe list<span class="bl-count" id="recipeCount">2000</span></span>
<span class="th-count">Preconditions<span class="bl-count bl-count--pre" id="preCount">1</span></span>
<span class="th-right">
<button class="th-add" id="addRecipeBtn" title="Add a recipe to this recipe"><svg><use href="#i-plus"/></svg> Add recipe</button>
<button class="th-undo" id="undoBtn" disabled title="Undo last change"><svg><use href="#i-undo"/></svg> Undo</button>
</span>
</div>
<div class="tree-crumb" id="crumb">
<button class="crumb-main" id="crumbMain" title="Collapse this group">
<svg class="tw" id="crumbTwist"><use href="#i-chevd"/></svg>
<span id="crumbIcon"></span>
<span class="nm" id="crumbName"></span>
<span class="bl-cnt" id="crumbCnt"></span>
</button>
<button class="crumb-anc" id="crumbAnc" title="Show all parent levels" aria-haspopup="true" hidden><svg><use href="#i-levels"/></svg></button>
<div class="menu-pop crumb-pop" id="crumbPop" hidden style="top:34px; right:8px"></div>
</div>
<div class="focus-bar" id="focusBar" hidden>
<svg class="fb-ico"><use href="#i-focus"/></svg>
<span class="fb-txt">Focused on <b id="focusName"></b></span>
<span class="fb-cnt" id="focusCnt"></span>
<button class="fb-exit" id="focusExit"><svg><use href="#i-x"/></svg> Exit focus</button>
</div>
<div class="bl-tree" id="tree"><div class="tree-viewport" id="viewport"></div></div>
<div class="opt-panel" id="optPanel" hidden></div>
<div class="bl-foot" id="optFoot">
<button class="opt-toggle" id="optToggle" aria-expanded="false" title="Show options for the selected recipe">Options<span class="bl-count bl-count--muted" id="optCount">0</span></button>
<button class="opt-edit" id="optEdit" title="Edit options"><svg><use href="#i-edit"/></svg></button>
<button class="opt-chev-btn" id="optChevBtn" title="Show options"><svg class="opt-chev"><use href="#i-chevd"/></svg></button>
</div>
</div>
<div class="bl-canvas">
<div class="bl-graph" id="graph"></div>
<div class="bl-rail">
<button id="viewSwitch" title="Move to main content"><svg id="viewSwitchIcon"><use href="#i-collapse"/></svg></button>
<button id="railRotate" class="on" title="Pause rotation"><svg><use href="#i-play"/></svg></button>
<button id="railFit" title="Move to fit"><svg><use href="#i-eye"/></svg></button>
<button id="railLocate" title="Move to selected node"><svg><use href="#i-target"/></svg></button>
<button id="railPane" class="on" title="Hide selected node floating pane"><svg><use href="#i-tag"/></svg></button>
<button id="railHelp" title="View builder documentation"><svg><use href="#i-help"/></svg></button>
<button id="railLegend" title="Show legend"><svg><use href="#i-info"/></svg></button>
</div>
<div class="viz-filter"><svg><use href="#i-search"/></svg><input id="vizFilter" placeholder="Filter nodes" /></div>
<div class="viz-legend" id="vizLegend" hidden>
<div class="lg-head">Legend</div>
<div class="lg-row"><span class="dot" id="lgRecipe"></span> Recipe node</div>
<div class="lg-row"><span class="dot" id="lgPre"></span> Precondition node</div>
<div class="lg-row"><span class="dot" id="lgMatch"></span> Filter results</div>
<div class="hint">Drag to rotate · scroll to zoom · right-drag to pan</div>
</div>
<div class="bl-nodelabel"><span class="lbl" id="nodeLabel">Enterprise baseline migration</span></div>
</div>
</div>
<div class="proto-note">
<span>Phase 5 — Focus mode · builds on Phases 1–4 (topology, recipe finder, recipe-actions modal all included) · open a group’s <b>⋮</b> menu and choose <b>Focus on this subtree</b> to narrow the list to just that branch · the <b>focus bar</b> shows where you are with a one-click <b>Exit focus</b> that returns you exactly where you left off · the graph <b>fades unrelated nodes</b> to match · Undo, options, search and the view switcher all keep working while focused ·</span>
<code>?recipe=small</code><span>loads the small sample.</span>
</div>
</div>
<!-- per-node (line-item) action menu, positioned on open -->
<!-- Phase 4 recipe finder: ranked search + source filters + rich results -->
<div class="fx-ov" id="finder">
<div class="fx" role="dialog" aria-label="Add a recipe">
<div class="fx-head"><h2>Add a recipe <span class="fx-target" id="fxTarget"></span></h2><button class="fx-x" data-close-finder title="Close"><svg><use href="#i-x"/></svg></button></div>
<div class="fx-search"><svg><use href="#i-search"/></svg><input id="fxSearch" placeholder="Search recipes by name or ID" autocomplete="off" /></div>
<div class="fx-chips" id="fxChips">
<button class="fx-chip active" data-src="all">All</button>
<button class="fx-chip" data-src="mine">Mine</button>
<button class="fx-chip" data-src="team">Team</button>
<button class="fx-chip" data-src="marketplace">Marketplace</button>
</div>
<div class="fx-list" id="fxList"></div>
<div class="fx-foot"><span class="fx-count" id="fxCount"></span><span class="fx-right"><button class="fx-btn" data-close-finder>Cancel</button><button class="fx-btn fx-btn--primary" id="fxAdd" disabled>Add recipe</button></span></div>
</div>
</div>
<!-- Builder recipe actions modal -->
<div class="mo-ov" id="modal">
<div class="mo" role="dialog" aria-label="Builder recipe actions">
<div class="mo-header"><h2>Builder recipe actions</h2><button class="mo-x" data-close-modal title="Close"><svg><use href="#i-x"/></svg></button></div>
<div class="mo-tabs" id="moTabs">
<button class="mo-tab active" data-tab="existing">Open existing</button>
<button class="mo-tab" data-tab="import">Import from Yaml</button>
<button class="mo-tab" data-tab="new">Create new</button>
<button class="mo-tab" data-tab="manage">Manage</button>
<button class="mo-tab" data-tab="v1">From V1</button>
</div>
<div class="mo-body">
<!-- Open existing -->
<div class="mo-pane active" data-pane="existing">
<div class="fx-search"><svg><use href="#i-search"/></svg><input id="moSearch" placeholder="Search recipes by name or ID" autocomplete="off" /></div>
<div class="fx-chips" id="moChips">
<button class="fx-chip active" data-src="all">All</button>
<button class="fx-chip" data-src="mine">Mine</button>
<button class="fx-chip" data-src="team">Team</button>
<button class="fx-chip" data-src="marketplace">Marketplace</button>
</div>
<div class="fx-list mo-list" id="moList"></div>
</div>
<!-- Import -->
<div class="mo-pane" data-pane="import">
<p class="import-hint">Insert a declarative YAML recipe to import into the builder:</p>
<textarea class="yaml-box" placeholder="type: specs.openrewrite.org/v1beta/recipe name: com.example.MyRecipe displayName: My recipe recipeList: - org.openrewrite.java.format.AutoFormat"></textarea>
</div>
<!-- Create new -->
<div class="mo-pane" data-pane="new">
<label class="nr-label">Name<span class="req">*</span></label>
<input class="nr-input" placeholder="Name this recipe, e.g. Migrate to Spring Boot 3" />
<label class="nr-label">Recipe ID
<button class="id-help-btn" id="idHelpBtn">How is the ID used? <svg><use href="#i-chevd"/></svg></button>
</label>
<div class="id-help" id="idHelp">The ID uniquely identifies your recipe on the platform and in exported YAML. It can’t be changed after creation, so keep it stable (e.g. reverse-domain style).</div>
<div class="id-toggle"><button class="tgl" id="idToggle" aria-pressed="true" aria-label="Auto-generate ID"></button> Auto-generate from name (recommended)</div>
<div class="id-line" id="idLine">ID: io.moderne.MigrateToSpringBoot3</div>
<label class="nr-label">Description</label>
<textarea class="nr-input" placeholder="Summarize what this recipe does (optional)"></textarea>
</div>
<!-- Manage -->
<div class="mo-pane" data-pane="manage">
<div class="oe-list" id="mgList"></div>
</div>
<!-- From V1 -->
<div class="mo-pane" data-pane="v1">
<p class="import-hint">You have recipes from the previous Builder. Import them to keep working with them here. Recipes you already have are skipped.</p>
</div>
</div>
<div class="mo-foot">
<span id="moFootLeft"></span>
<span class="right">
<button class="btn btn--tertiary" data-close-modal>Cancel</button>
<button class="btn btn--primary" id="moPrimary">Create recipe</button>
</span>
</div>
</div>
</div>
<div class="menu-pop" id="nodeMenu" hidden style="position:fixed"></div>
<div class="toast" id="toast"><svg id="toastIcon"><use href="#i-check-c"/></svg><span id="toastMsg"></span></div>
<script>
/* ---- dataset ---- */
/* A realistically DEEP + long recipe (like a Spring Boot migration): phases →
migration sets → rule groups → steps. ~2,000 steps, 4 levels of nesting,
so it exercises windowing (long) AND the ancestry path (deep). */
function buildLargeRecipe(){
var PHASES=['Upgrade Spring Boot 2.7 → 3.0','Migrate to Spring Security 6','Jakarta EE 9 namespace migration','Spring Data 2023 upgrade'];
var M=5,G=5,S=20,made=0;
var phases=PHASES.map(function(pname,pi){
var modules=[];
for(var m=0;m<M;m++){
var groups=[];
for(var g=0;g<G;g++){
var steps=[];
for(var s=0;s<S;s++){ made++; steps.push({id:'leaf-'+made,kind:'recipe',language:'java',label:['Migrate rule '+made+' to the current baseline'],options:[{name:'groupId',value:'org.springframework.boot'},{name:'newVersion',value:'3.'+(made%5)+'.x'}]}); }
groups.push({id:'p'+pi+'m'+m+'g'+g,kind:'composite',language:'java',label:['Rule group '+(g+1)],children:steps});
}
modules.push({id:'p'+pi+'m'+m,kind:'composite',language:'java',label:['Migration set '+(m+1)],children:groups});
}
return {id:'phase-'+pi,kind:'composite',language:'java',label:[pname],children:modules};
});
return {id:'org.openrewrite.java.spring.boot3.UpgradeSpringBoot_3_0',name:'Migrate to Spring Boot 3',runOnRepositoryCount:271,recipeCount:made,preconditionCount:1,
root:{id:'root',kind:'root',label:['Migrate to Spring Boot 3'],children:[{id:'pre-spring',kind:'precondition',label:['Is likely a Spring Framework project']}].concat(phases)}};
}
var sampleRecipe = { id:'new-name-spring-thing', name:'new name spring thing', runOnRepositoryCount:271, recipeCount:56, preconditionCount:1,
root:{ id:'root', kind:'root', label:['new name spring thing'], children:[
{ id:'pre-spring', kind:'precondition', label:['Is likely a Spring Framework project'] },
{ id:'dn5', kind:'composite', language:'java', label:['Migrate to DataNucleus 5.0'], children:[
{ id:'dn4', kind:'composite', language:'java', label:['Migrate to DataNucleus 4.0'], children:[
{ id:'upgrade-deps', kind:'recipe', language:'java', label:['Upgrade Gradle or Maven dependency versions'], options:[{name:'groupId',value:'org.datanucleus'}] },
{ id:'remove-dep', kind:'recipe', language:'java', label:['Remove a Gradle or Maven dependency'] },
{ id:'dn4-package-moves', kind:'composite', language:'java', label:['DataNucleus 4.0 package moves'], children:[
{ id:'rename-simple', kind:'recipe', language:'java', label:['Rename package name ',{code:'org.datanucleus.store.types.simple'},' to ',{code:'org.datanucleus.store.types.wrappers'}] },
{ id:'rename-backed', kind:'recipe', language:'java', label:['Rename package name ',{code:'org.datanucleus.store.types.backed'},' to ',{code:'org.datanucleus.store.types.wrappers'}] }
]}
]}
]}
]}
};
var sampleGraph = { seed:7, viewBox:'0 0 600 660', hubs:[{x:150,y:340,leaves:16},{x:262,y:250,leaves:7},{x:335,y:205,leaves:5},{x:305,y:430,leaves:9},{x:398,y:285,leaves:4,selected:true}], links:[[0,1],[1,2],[2,4],[3,4]] };
/* ---- Phase 4: recipe catalog (search & discovery) ---- */
var catalog = [
{ name:'Migrate to Spring Boot 3', id:'org.openrewrite.java.spring.boot3.UpgradeSpringBoot_3_0', src:'marketplace', when:'recent', desc:'Upgrade to Spring Boot 3.0 from any 2.x version, including dependency and configuration changes.' },
{ name:'Migrate to Spring Security 6', id:'org.openrewrite.java.spring.security6.UpgradeSpringSecurity_6_0', src:'marketplace', desc:'Migrate applications to Spring Security 6.0 and the Jakarta EE 9 baseline.' },
{ name:'Migrate to Java 17', id:'org.openrewrite.java.migrate.UpgradeToJava17', src:'marketplace', desc:'Adopt Java 17 language features and remove usages removed since Java 8.' },
{ name:'Common static analysis fixes', id:'org.openrewrite.staticanalysis.CommonStaticAnalysis', src:'marketplace', desc:'Apply a broad set of static analysis and code cleanup recipes.' },
{ name:'Find and fix vulnerable dependencies', id:'org.openrewrite.java.dependencies.DependencyVulnerabilityCheck', src:'marketplace', desc:'Identify and upgrade dependencies with known CVEs.' },
{ name:'Jakarta EE 9 namespace migration', id:'org.openrewrite.java.migrate.jakarta.JavaxToJakarta', src:'marketplace', desc:'Move javax.* imports and references to the jakarta.* namespace.' },
{ name:'Upgrade Gradle or Maven dependency versions', id:'org.openrewrite.java.dependencies.UpgradeDependencyVersion', src:'marketplace', desc:'Bump a group/artifact to a target version across build files.' },
{ name:'Migrate to JUnit 5', id:'org.openrewrite.java.testing.junit5.JUnit4to5Migration', src:'marketplace', desc:'Convert JUnit 4 tests and annotations to JUnit 5 (Jupiter).' },
{ name:'Enterprise baseline migration', id:'io.moderne.EnterpriseBaseline', src:'mine', when:'recent', desc:'Your standard upgrade bundle: Spring Boot 3, Java 17, and internal conventions.' },
{ name:'My Spring cleanup', id:'io.moderne.MySpringCleanup', src:'mine', desc:'Personal recipe: tidy Spring configuration and remove unused beans.' },
{ name:'Payments team standards', id:'io.acme.payments.TeamStandards', src:'team', desc:'Coding standards and required libraries for the Payments organization.' },
{ name:'Platform logging conventions', id:'io.acme.platform.LoggingConventions', src:'team', when:'recent', desc:'Enforce structured logging and the shared logging facade across services.' },
{ name:'Remove deprecated internal APIs', id:'io.acme.platform.RemoveDeprecatedApis', src:'team', desc:'Replace calls to internal APIs deprecated in the 2024 platform release.' },
{ name:'Order team imports', id:'io.acme.platform.OrderImports', src:'team', desc:'Apply the shared import ordering and formatting rules.' }
];
var FSRC_LABEL = { mine:'Mine', team:'Team', marketplace:'Marketplace' };
/* ---- helpers ---- */
function plainLabel(p){ return p.map(function(x){return typeof x==='string'?x:x.code;}).join(''); }
function labelHtml(p){ return p.map(function(x){return typeof x==='string'?esc(x):'<code>'+esc(x.code)+'</code>';}).join(''); }
function esc(s){ return s.replace(/[&<>]/g,function(c){return({'&':'&','<':'<','>':'>'})[c];}); }
function findNode(n,id){ if(n.id===id)return n; if(n.children)for(var i=0;i<n.children.length;i++){var r=findNode(n.children[i],id);if(r)return r;} return null; }
function isMac(){ return /Mac|iPhone|iPad/.test(navigator.platform); }
var _cnt = {};
function stepCount(n){ if(_cnt[n.id]!=null)return _cnt[n.id]; var c=0; (n.children||[]).forEach(function(ch){ if(ch.kind!=='precondition'){ c+=1+stepCount(ch); } }); _cnt[n.id]=c; return c; }
function leafCount(n){ var c=0; (n.children||[]).forEach(function(ch){ if(ch.kind==='precondition')return; if(ch.children&&ch.children.length){ c+=leafCount(ch); } else if(ch.kind==='recipe'){ c++; } }); return c; }
/* ---- state ---- */
var params = new URLSearchParams(location.search);
var recipe = params.get('recipe')==='small' ? sampleRecipe : buildLargeRecipe(2000);
var expanded = new Set(); /* collapse-by-default: top-level rows shown, groups folded */
var selectedId = 'root';
var focusId = null, preFocusScroll = 0;
var visibleRows = [];
/* ---- flatten (respecting expanded); each row carries its ancestor NODES ---- */
function rebuild(){
visibleRows = [];
function walk(node, depth, ancestors){
var ch = node.children||[]; var has = ch.length>0; var exp = expanded.has(node.id);
visibleRows.push({ node:node, depth:depth, has:has, exp:exp, ancestors:ancestors });
if(has && exp){ var next = ancestors.concat([node]); ch.forEach(function(c){ walk(c, depth+1, next); }); }
}
if(focusId){ var f=findNode(recipe.root, focusId); if(f){ (f.children||[]).forEach(function(c){ walk(c, 0, ancestorChain(f)); }); } }
else { (recipe.root.children||[]).forEach(function(c){ walk(c, 0, [recipe.root]); }); }
}
function rowIndexOf(id){ for(var i=0;i<visibleRows.length;i++){ if(visibleRows[i].node.id===id) return i; } return -1; }
/* ---- windowed render ---- */
var ROW_H = 30, BUFFER = 8;
var treeEl = document.getElementById('tree'), viewportEl = document.getElementById('viewport');
function rowHtml(r, i){
var pad = 14 + r.depth*20;
var tw = r.has
? '<button class="bl-twist" data-toggle="'+r.node.id+'" style="margin-left:'+pad+'px"><svg><use href="#'+(r.exp?'i-chevd':'i-chevr')+'"/></svg></button>'
: '<span class="bl-twist spacer" style="margin-left:'+pad+'px"></span>';
var ic = r.node.kind==='root' ? '<svg class="bl-rooti"><use href="#i-code"/></svg>'
: r.node.kind==='precondition' ? '<svg class="bl-ok"><use href="#i-check-c"/></svg>'
: ((r.node.kind==='recipe'||r.node.kind==='composite')&&r.node.language==='java') ? '<i class="bl-java">J</i>' : '';
var body = r.node.kind==='root' ? '<span class="bl-chip">'+labelHtml(r.node.label)+'</span>'
: r.node.kind==='precondition' ? '<span class="bl-prechip">'+labelHtml(r.node.label)+'</span>'
: '<span class="bl-txt">'+labelHtml(r.node.label)+'</span>';
var cnt = (r.has && r.node.kind!=='root') ? '<span class="bl-cnt">'+stepCount(r.node).toLocaleString()+'</span>' : '';
var cls = 'bl-row'+(r.node.id===selectedId?' sel':'')+(r.node.kind==='precondition'?' pre':'');
var kebab = '<button class="bl-kebab" data-menu="'+r.node.id+'" title="Recipe actions"><svg><use href="#i-more"/></svg></button>';
return '<div class="'+cls+'" style="top:'+(i*ROW_H)+'px">'+tw+'<button class="bl-rowselect" data-select="'+r.node.id+'">'+ic+body+cnt+'</button>'+kebab+'</div>';
}
var pending=false;
function renderWindow(){
pending=false;
viewportEl.style.height = (visibleRows.length*ROW_H)+'px';
var top=treeEl.scrollTop, h=treeEl.clientHeight;
var start=Math.max(0, Math.floor(top/ROW_H)-BUFFER);
var end=Math.min(visibleRows.length, Math.ceil((top+h)/ROW_H)+BUFFER);
var html=''; for(var i=start;i<end;i++){ html+=rowHtml(visibleRows[i], i); }
viewportEl.innerHTML=html;
updateCrumb(top);
}
function scheduleRender(){ if(!pending){ pending=true; requestAnimationFrame(renderWindow); } }
/* ---- "you are here" — omnipresent location bar ---- */
/* Context = deepest group of the topmost visible row, or the recipe at the top.
The bar is always shown (no flicker). An ancestry icon appears only when
there are intermediate group levels above the current one. */
var parentOf={};
function buildParentMap(){ parentOf={}; (function walk(n){ (n.children||[]).forEach(function(c){ parentOf[c.id]=n; walk(c); }); })(recipe.root); }
function ancestorChain(node){ var chain=[], p=node; while(p){ chain.unshift(p); p=parentOf[p.id]; } return chain; } /* [root, …, node] */
var crumbNode=null, crumbChain=[];
function iconFor(n){ return n.kind==='root' ? '<svg class="bl-rooti"><use href="#i-code"/></svg>' : '<i class="bl-java">J</i>'; }
function updateCrumb(top){
var idx=Math.min(visibleRows.length-1, Math.max(0, Math.floor(top/ROW_H)));
var r=visibleRows[idx];
var groups = r ? r.ancestors.filter(function(n){ return n.kind!=='root'; }) : [];
var ctx = groups.length ? groups[groups.length-1] : recipe.root;
crumbNode = ctx; crumbChain = ancestorChain(ctx);
var isRoot = ctx.kind==='root';
document.getElementById('crumbIcon').innerHTML = iconFor(ctx);
document.getElementById('crumbName').textContent = plainLabel(ctx.label);
var cnt=document.getElementById('crumbCnt'); cnt.style.display = isRoot?'none':''; if(!isRoot){ cnt.textContent=stepCount(ctx).toLocaleString(); }
document.getElementById('crumbTwist').hidden = isRoot;
document.getElementById('crumbMain').disabled = isRoot;
document.getElementById('crumbMain').title = isRoot ? '' : 'Collapse this group';
/* ancestry icon: only when there are group levels strictly between root and ctx */
var above = crumbChain.slice(1, crumbChain.length-1).filter(function(n){ return n.kind!=='root'; });
var anc=document.getElementById('crumbAnc');
anc.hidden = above.length===0;
if(anc.hidden){ document.getElementById('crumbPop').hidden=true; anc.classList.remove('open'); }
}
function openAncPop(){
var pop=document.getElementById('crumbPop');
pop.innerHTML='<div class="cp-head">Parent levels</div>' + crumbChain.map(function(n,i){
var isR=n.kind==='root', cur=(i===crumbChain.length-1);
var cnt=isR?'':'<span class="cp-cnt">'+stepCount(n).toLocaleString()+'</span>';
return '<div class="cp-item'+(cur?' cur':'')+'" data-jump="'+n.id+'" style="padding-left:'+(12+i*14)+'px">'+iconFor(n)+'<span class="cp-nm">'+esc(plainLabel(n.label))+'</span>'+cnt+'</div>';
}).join('');
pop.hidden=false; document.getElementById('crumbAnc').classList.add('open');
}
/* ---- graph ---- */
function renderGraph(){ var seed=sampleGraph.seed; function rnd(){seed=(seed*1103515245+12345)%2147483648;return seed/2147483648;} var e='',d='',s=''; sampleGraph.links.forEach(function(l){var a=sampleGraph.hubs[l[0]],b=sampleGraph.hubs[l[1]];e+='<line x1="'+a.x+'" y1="'+a.y+'" x2="'+b.x+'" y2="'+b.y+'" stroke="var(--line-strong)"/>';}); sampleGraph.hubs.forEach(function(h){for(var k=0;k<h.leaves;k++){var an=rnd()*Math.PI*2,r=34+rnd()*44,x=h.x+r*Math.cos(an),y=h.y+r*Math.sin(an);e+='<line x1="'+h.x+'" y1="'+h.y+'" x2="'+x.toFixed(1)+'" y2="'+y.toFixed(1)+'" stroke="var(--line-strong)"/>';d+='<circle cx="'+x.toFixed(1)+'" cy="'+y.toFixed(1)+'" r="4.2" fill="var(--accent)"/>';} if(h.selected){s+='<circle cx="'+h.x+'" cy="'+h.y+'" r="22" fill="var(--ch-p1)" opacity="0.25"/><circle cx="'+h.x+'" cy="'+h.y+'" r="11" fill="var(--ch-p1)"/>';}else{d+='<circle cx="'+h.x+'" cy="'+h.y+'" r="6" fill="var(--accent)"/>';}}); document.getElementById('graph').innerHTML='<svg viewBox="'+sampleGraph.viewBox+'" preserveAspectRatio="xMidYMid meet">'+e+s+d+'</svg>'; }
/* ---- meta ---- */
function syncMeta(){ document.getElementById('recipeName').textContent=recipe.name; document.getElementById('recipeCount').textContent=recipe.recipeCount.toLocaleString(); document.getElementById('preCount').textContent=recipe.preconditionCount; document.getElementById('dryRunBtn').title='Dry run on '+recipe.runOnRepositoryCount+' repositories'; document.getElementById('orgText').innerHTML='Will run on <b>'+recipe.runOnRepositoryCount+'</b> repositories'; var node=findNode(recipe.root,selectedId)||recipe.root; document.getElementById('nodeLabel').textContent=plainLabel(node.kind==='root'?recipe.root.label:node.label); document.getElementById('optCount').textContent=(node.options||[]).length; renderOptions(); }
function selectNode(id){ selectedId=id; syncMeta(); renderWindow(); if(window.viz){ window.viz.select(id); } }
window.__graphSelect = selectNode; window.BUILDER_RECIPE = recipe;
function renderOptions(){ var node=findNode(recipe.root,selectedId)||recipe.root; var opts=node.options||[]; document.getElementById('optCount').textContent=opts.length; document.getElementById('optPanel').innerHTML = opts.length ? opts.map(function(o){ return '<div class="opt-row"><span class="on">'+esc(optLabel(o.name))+'</span><span class="ov">'+esc(String(o.value))+'</span></div>'; }).join('') : '<div class="opt-empty">This recipe has no options.</div>'; }
function optLabel(name){ return name.replace(/([A-Z])/g,' $1').replace(/^./,function(c){return c.toUpperCase();}).replace(/\bId\b/g,'ID').trim(); }
function toggleOptions(){ var panel=document.getElementById('optPanel'), open=panel.hidden; panel.hidden=!open; document.getElementById('optFoot').classList.toggle('open', open); document.getElementById('optToggle').setAttribute('aria-expanded', String(open)); }
document.getElementById('optToggle').addEventListener('click', toggleOptions);
document.getElementById('optChevBtn').addEventListener('click', toggleOptions);
document.getElementById('optEdit').addEventListener('click', function(){ if(document.getElementById('optPanel').hidden){ toggleOptions(); } toast('Editing options (prototype)'); });
/* ---- YAML actions ---- */
function recipeToYaml(){ var out=['type: specs.openrewrite.org/v1beta/recipe','name: '+recipe.id,'displayName: '+recipe.name,'recipeList:']; (function walk(n){ (n.children||[]).forEach(function(c){ if(c.kind!=='precondition'){out.push(' - '+plainLabel(c.label));} walk(c); }); })(recipe.root); return out.join('\n')+'\n'; }
var toastTimer=null;
function toast(msg,icon){ var t=document.getElementById('toast'); document.getElementById('toastMsg').textContent=msg; document.getElementById('toastIcon').innerHTML='<use href="#'+(icon||'i-check-c')+'"/>'; t.classList.add('show'); if(toastTimer)clearTimeout(toastTimer); toastTimer=setTimeout(function(){t.classList.remove('show');},2200); }
function downloadYaml(){ var blob=new Blob([recipeToYaml()],{type:'text/yaml'}); var a=document.createElement('a'); a.href=URL.createObjectURL(blob); a.download=recipe.id+'.yml'; document.body.appendChild(a); a.click(); a.remove(); toast('Downloaded '+a.download,'i-download'); }
function copyYaml(){ var y=recipeToYaml(); if(navigator.clipboard&&navigator.clipboard.writeText){navigator.clipboard.writeText(y).catch(function(){});} toast('Copied recipe YAML to clipboard','i-copy'); }
/* ---- interactions ---- */
treeEl.addEventListener('scroll', function(){ if(!document.getElementById('nodeMenu').hidden){ closeNodeMenu(); } scheduleRender(); });
window.addEventListener('resize', scheduleRender);
function jumpTo(id){ var idx=rowIndexOf(id); if(idx>=0){ treeEl.scrollTop=idx*ROW_H; renderWindow(); } }
/* location bar: main = collapse current group + jump to it */
document.getElementById('crumbMain').addEventListener('click', function(){
if(!crumbNode || crumbNode.kind==='root') return;
var id=crumbNode.id; expanded.delete(id); rebuild(); jumpTo(id);
});
/* ancestry icon: toggle the clickable path popover */
document.getElementById('crumbAnc').addEventListener('click', function(e){
e.stopPropagation(); var pop=document.getElementById('crumbPop');
if(pop.hidden){ openAncPop(); } else { pop.hidden=true; this.classList.remove('open'); }
});
document.getElementById('crumbPop').addEventListener('click', function(e){
e.stopPropagation(); var it=e.target.closest('[data-jump]'); if(!it) return;
jumpTo(it.getAttribute('data-jump'));
this.hidden=true; document.getElementById('crumbAnc').classList.remove('open');
});
viewportEl.addEventListener('click', function(e){
var kb=e.target.closest('[data-menu]');
if(kb){ e.stopPropagation(); openNodeMenu(kb.getAttribute('data-menu'), kb); return; }
var tg=e.target.closest('[data-toggle]');
if(tg){ var id=tg.getAttribute('data-toggle'); if(expanded.has(id))expanded.delete(id); else expanded.add(id); rebuild(); renderWindow(); return; }
var sel=e.target.closest('[data-select]');
if(sel){ selectNode(sel.getAttribute('data-select')); }
});
var allExpanded=false;
document.getElementById('expandAllBtn').addEventListener('click', function(){
allExpanded=!allExpanded;
if(allExpanded){ expanded=new Set(); (function mark(n){ if(n.children&&n.children.length){expanded.add(n.id); n.children.forEach(mark);} })(recipe.root); }
else { expanded=new Set(); }
this.title = allExpanded?'Collapse all':'Expand all';
document.getElementById('expandAllIcon').innerHTML = '<use href="#'+(allExpanded?'i-collapse-all':'i-expand-all')+'"/>';
treeEl.scrollTop=0; rebuild(); renderWindow();
});
/* ---- per-node (line-item) actions + undo ---- */
var undoStack=[];
function updateUndo(){ document.getElementById('undoBtn').disabled = undoStack.length===0; }
function snapshot(){ undoStack.push(JSON.parse(JSON.stringify(recipe.root))); if(undoStack.length>50) undoStack.shift(); updateUndo(); }
function afterMutate(){ _cnt={}; buildParentMap(); recipe.recipeCount=leafCount(recipe.root); if(focusId && !findNode(recipe.root, focusId)){ clearFocusState(); } rebuild(); syncMeta(); renderWindow(); flashSaving(); }
/* ---- Phase 5: focus mode ---- */
function subtreeIds(node){ var s=[node.id]; (node.children||[]).forEach(function(c){ s=s.concat(subtreeIds(c)); }); return s; }
function clearFocusState(){ focusId=null; document.getElementById('focusBar').hidden=true; document.getElementById('crumb').hidden=false; if(window.viz && window.viz.focus){ window.viz.focus(null); } }
function enterFocus(id){
var f=findNode(recipe.root, id); if(!f || !(f.children && f.children.length)) return;
preFocusScroll = treeEl.scrollTop; focusId=id;
document.getElementById('focusName').textContent = plainLabel(f.label);
document.getElementById('focusCnt').textContent = stepCount(f).toLocaleString()+' steps';
document.getElementById('focusBar').hidden=false;
document.getElementById('crumb').hidden=true;
rebuild(); treeEl.scrollTop=0; renderWindow();
if(window.viz){ if(window.viz.focus){ window.viz.focus(subtreeIds(f)); } window.viz.select(id); }
toast('Focused on \u201C'+plainLabel(f.label)+'\u201D','i-focus');
}
function exitFocus(){ if(!focusId) return; var back=preFocusScroll; clearFocusState(); rebuild(); renderWindow(); treeEl.scrollTop=back; renderWindow(); }
document.getElementById('focusExit').addEventListener('click', exitFocus);
function findParentArr(id){ var p=parentOf[id]; return p ? {arr:p.children, idx:p.children.findIndex(function(c){return c.id===id;}), parent:p} : null; }
function nodeActions(n){
var isRoot=n.kind==='root', a=[];
a.push({k:'add',label:'Add recipe to node',icon:'i-plus',kbd:'shift + +'});
if(isRoot||n.kind==='composite'){ a.push({k:'rename',label:'Rename',icon:'i-pencil'}); }
if(!isRoot){ a.push({k:'remove',label:'Remove',icon:'i-trash',kbd:'\u232B',danger:true}); }
if(!isRoot){ a.push({k:'duplicate',label:'Duplicate',icon:'i-copy',kbd:'shift + D'}); }
if(n.options && n.options.length){ a.push({k:'editopts',label:'Edit options',icon:'i-edit'}); }
if(n.children && n.children.length && n.kind!=='root' && n.id!==focusId){ a.push({k:'focus',label:'Focus on this subtree',icon:'i-focus'}); }
a.push({k:'details',label:'View full details',icon:'i-link'});
if(!isRoot){ a.push({k:'run',label:'Run this recipe only',icon:'i-play'}); }
return a;
}
var nodeMenuId=null;
function openNodeMenu(id, anchor){
var n=findNode(recipe.root,id); if(!n) return;
nodeMenuId=id;
var m=document.getElementById('nodeMenu');
m.innerHTML = nodeActions(n).map(function(a){ return '<div class="mp-item'+(a.danger?' danger':'')+'" data-act="'+a.k+'"><svg><use href="#'+a.icon+'"/></svg> '+a.label+(a.kbd?'<span class="mp-kbd">'+a.kbd+'</span>':'')+'</div>'; }).join('');
m.hidden=false;
var r=anchor.getBoundingClientRect();
var mw=232, mh=m.offsetHeight;
var left=Math.min(r.right-mw, window.innerWidth-mw-8);
var top=(r.bottom+mh>window.innerHeight) ? r.top-mh-2 : r.bottom+2;
m.style.left=Math.max(8,left)+'px'; m.style.top=Math.max(8,top)+'px';
document.querySelectorAll('.bl-kebab').forEach(function(k){ k.classList.toggle('open', k.getAttribute('data-menu')===id); });
}
function closeNodeMenu(){ document.getElementById('nodeMenu').hidden=true; nodeMenuId=null; document.querySelectorAll('.bl-kebab.open').forEach(function(k){k.classList.remove('open');}); }
document.getElementById('nodeMenu').addEventListener('click', function(e){
var it=e.target.closest('[data-act]'); if(!it) return;
var act=it.getAttribute('data-act'); var n=findNode(recipe.root, nodeMenuId); if(!n){ closeNodeMenu(); return; }
if(act==='add'){ openFinder(n.id); }
else if(act==='duplicate'){ var loc=findParentArr(n.id); if(loc){ snapshot(); var clone=JSON.parse(JSON.stringify(n)); (function reid(x){ x.id=x.id+'-copy'; (x.children||[]).forEach(reid); })(clone); loc.arr.splice(loc.idx+1,0,clone); afterMutate(); toast('Duplicated “'+plainLabel(n.label)+'”','i-copy'); } }
else if(act==='remove'){ var loc2=findParentArr(n.id); if(loc2){ snapshot(); loc2.arr.splice(loc2.idx,1); if(selectedId===n.id)selectedId='root'; afterMutate(); toast('Removed “'+plainLabel(n.label)+'”','i-trash'); } }
else if(act==='rename'){ toast('Rename “'+plainLabel(n.label)+'” (prototype)'); }
else if(act==='editopts'){ selectNode(n.id); if(document.getElementById('optPanel').hidden){ toggleOptions(); } toast('Editing options for “'+plainLabel(n.label)+'”'); }
else if(act==='details'){ toast('Opened full details (prototype)','i-link'); }
else if(act==='focus'){ closeNodeMenu(); enterFocus(n.id); return; }
else if(act==='run'){ toast('Running only “'+plainLabel(n.label)+'”','i-play'); }
closeNodeMenu();
});
document.getElementById('undoBtn').addEventListener('click', function(){
if(!undoStack.length) return;
recipe.root=undoStack.pop(); updateUndo();
_cnt={}; buildParentMap(); recipe.recipeCount=leafCount(recipe.root); rebuild(); syncMeta(); renderWindow(); flashSaving();
toast('Undid last change','i-undo');
});
var saveTimer=null;
function flashSaving(){ var s=document.getElementById('saveInd'); s.classList.add('saving'); s.innerHTML='<svg><use href="#i-refresh"/></svg> Saving…'; if(saveTimer)clearTimeout(saveTimer); saveTimer=setTimeout(function(){ s.classList.remove('saving'); s.innerHTML='<svg><use href="#i-check-c"/></svg> Saved'; },700); }
var moreWrap=document.getElementById('moreWrap'), moreMenu=document.getElementById('moreMenu'), moreBtn=document.getElementById('moreBtn');
moreBtn.addEventListener('click', function(e){ e.stopPropagation(); var h=moreMenu.hidden; moreMenu.hidden=!h; moreWrap.classList.toggle('open',h); });
moreMenu.addEventListener('click', function(e){ var it=e.target.closest('.mp-item'); if(!it)return; var act=it.getAttribute('data-action'); if(act==='download'){downloadYaml();} else if(act==='copy'){copyYaml();} else if(it.getAttribute('data-toast')){toast(it.getAttribute('data-toast'));} moreMenu.hidden=true; moreWrap.classList.remove('open'); });
document.addEventListener('click', function(){ moreMenu.hidden=true; moreWrap.classList.remove('open'); var pop=document.getElementById('crumbPop'); if(!pop.hidden){ pop.hidden=true; document.getElementById('crumbAnc').classList.remove('open'); } if(!document.getElementById('nodeMenu').hidden){ closeNodeMenu(); } });
document.getElementById('dryRunBtn').addEventListener('click', function(){ toast('Dry run started on '+recipe.runOnRepositoryCount+' repositories','i-play'); });
document.getElementById('renameBtn').addEventListener('click', function(){ toast('Rename: type a new name (prototype)'); });
/* theme */
function setTheme(m){ document.documentElement.setAttribute('data-theme',m); var next=m==='dark'?'i-sun':'i-moon'; document.querySelector('#themeTop use').setAttribute('href','#'+next); if(window.viz){ window.viz.setTheme(); } }
function toggleTheme(){ setTheme(document.documentElement.getAttribute('data-theme')==='dark'?'light':'dark'); }
document.getElementById('themeTop').addEventListener('click', toggleTheme);
(function(){
var pane=document.getElementById('railPane'), lbl=document.querySelector('.bl-nodelabel');
if(pane){ pane.addEventListener('click', function(){ var on=!pane.classList.contains('on'); pane.classList.toggle('on', on); pane.title = on?'Hide selected node floating pane':'Show selected node floating pane'; if(lbl){ lbl.style.visibility = on?'':'hidden'; } }); }
var help=document.getElementById('railHelp'); if(help){ help.addEventListener('click', function(){ window.open('https://docs.moderne.io/user-documentation/moderne-platform/how-to-guides/new-recipe-builder','_blank','noopener'); }); }
})();
/* ---- rail + filter wiring (3D topology) ---- */
(function(){
var rot=document.getElementById('railRotate');
rot.addEventListener('click', function(){ if(!window.viz)return; var on=window.viz.toggleRotation(); rot.classList.toggle('on', on); rot.title = on?'Pause rotation':'Play rotation'; });
document.getElementById('railFit').addEventListener('click', function(){ if(window.viz) window.viz.fit(); });
document.getElementById('railLocate').addEventListener('click', function(){ if(window.viz) window.viz.locate(); });
var lg=document.getElementById('railLegend'), lgp=document.getElementById('vizLegend');
lg.addEventListener('click', function(e){ e.stopPropagation(); lgp.hidden=!lgp.hidden; lg.classList.toggle('on', !lgp.hidden); lg.title = lgp.hidden?'Show legend':'Hide legend'; });
document.getElementById('vizFilter').addEventListener('input', function(){ if(window.viz) window.viz.filter(this.value); });
var vsw=document.getElementById('viewSwitch'), topoMain=false;
vsw.addEventListener('click', function(){
topoMain=!topoMain;
document.querySelector('.bl-wrap').classList.toggle('topo-main', topoMain);
vsw.title = topoMain ? 'Move to side bar' : 'Move to main content';
document.getElementById('viewSwitchIcon').innerHTML = '<use href="#'+(topoMain?'i-panel-right':'i-collapse')+'"/>';
setTimeout(function(){ if(window.viz) window.viz.fit(); }, 90);
});
})();
/* ---- Phase 4: recipe finder (ranking, source filters, rich results) ---- */
var fxSrc='all', fxPick=null, fxTargetId='root';
function rankCatalog(q, src){
var base = catalog.filter(function(r){ return src==='all' || r.src===src; });
if(!q){ return base.slice().sort(function(a,b){ var ra=a.when==='recent'?0:1, rb=b.when==='recent'?0:1; return ra-rb || a.name.localeCompare(b.name); }); }
var ql=q.toLowerCase().trim(), scored=[];
base.forEach(function(r){ var n=r.name.toLowerCase(), id=r.id.toLowerCase(), s=null;
if(n===ql) s=0; else if(id===ql) s=1; else if(n.indexOf(ql)===0) s=2; else if(id.indexOf(ql)===0) s=3; else if(n.indexOf(ql)>=0) s=4; else if(id.indexOf(ql)>=0) s=5;
if(s!==null) scored.push({r:r,s:s}); });
scored.sort(function(a,b){ return a.s-b.s || a.r.name.localeCompare(b.r.name); });
return scored.map(function(x){ return x.r; });
}
function fxIsExact(r,q){ if(!q) return false; var ql=q.toLowerCase().trim(); return r.name.toLowerCase()===ql || r.id.toLowerCase()===ql; }
function fxMark(text,q){ if(!q) return esc(text); var ql=q.toLowerCase().trim(); var i=text.toLowerCase().indexOf(ql); if(i<0) return esc(text); return esc(text.slice(0,i))+'<mark class="fx-mark">'+esc(text.slice(i,i+ql.length))+'</mark>'+esc(text.slice(i+ql.length)); }
function renderFinder(){
var q=document.getElementById('fxSearch').value;
var rows=rankCatalog(q, fxSrc);
if(fxPick && !rows.some(function(r){return r.id===fxPick;})) fxPick=null;
if(!fxPick && rows.length) fxPick=rows[0].id; /* auto-select top so the exact match is ready to add */
var topExactId = (rows.length && fxIsExact(rows[0],q)) ? rows[0].id : null;
document.getElementById('fxList').innerHTML = rows.length ? rows.map(function(r){
var exact = r.id===topExactId;
return '<button class="fx-row'+(r.id===fxPick?' sel':'')+'" data-pick="'+esc(r.id)+'">'
+'<span class="fx-ico"><i class="bl-java">J</i></span>'
+'<span class="fx-main">'
+'<span class="fx-nm">'+fxMark(r.name,q)+(exact?'<span class="fx-badge">Exact match</span>':'')+'</span>'
+'<span class="fx-id">'+fxMark(r.id,q)+'</span>'
+'<span class="fx-desc">'+esc(r.desc)+'</span>'
+'</span>'
+'<span class="fx-src">'+FSRC_LABEL[r.src]+'</span>'
+'</button>';
}).join('') : '<div class="fx-empty">No recipes match your search.</div>';
document.getElementById('fxCount').textContent = rows.length + (rows.length===1?' recipe':' recipes');
document.getElementById('fxAdd').disabled = !fxPick;
}
function openFinder(targetId){
fxTargetId=targetId||'root'; fxSrc='all'; fxPick=null;
var t=findNode(recipe.root, fxTargetId)||recipe.root;
document.getElementById('fxTarget').textContent = 'to \u201C'+plainLabel(t.kind==='root'?recipe.root.label:t.label)+'\u201D';
document.querySelectorAll('#fxChips .fx-chip').forEach(function(c){ c.classList.toggle('active', c.getAttribute('data-src')==='all'); });
var s=document.getElementById('fxSearch'); s.value='';
renderFinder();
document.getElementById('finder').classList.add('open');
setTimeout(function(){ s.focus(); }, 30);
}
function closeFinder(){ document.getElementById('finder').classList.remove('open'); }
function finderAdd(){
if(!fxPick) return;
var rec=catalog.find(function(r){return r.id===fxPick;}); if(!rec) return;
var t=findNode(recipe.root, fxTargetId)||recipe.root;
snapshot();
if(!t.children) t.children=[];
t.children.push({ id:'add-'+Date.now(), kind:'recipe', language:'java', label:[rec.name], options:[] });
expanded.add(t.id);
afterMutate();
closeFinder();
toast('Added \u201C'+rec.name+'\u201D to \u201C'+plainLabel(t.label)+'\u201D','i-plus');
}
document.getElementById('addRecipeBtn').addEventListener('click', function(){ openFinder('root'); });
document.getElementById('fxSearch').addEventListener('input', renderFinder);
document.getElementById('fxChips').addEventListener('click', function(e){ var c=e.target.closest('.fx-chip'); if(!c)return; fxSrc=c.getAttribute('data-src'); document.querySelectorAll('#fxChips .fx-chip').forEach(function(x){x.classList.toggle('active',x===c);}); fxPick=null; renderFinder(); });
document.getElementById('fxList').addEventListener('click', function(e){ var row=e.target.closest('[data-pick]'); if(!row)return; fxPick=row.getAttribute('data-pick'); renderFinder(); if(e.detail>=2){ finderAdd(); } });
document.getElementById('fxAdd').addEventListener('click', finderAdd);
document.querySelectorAll('[data-close-finder]').forEach(function(b){ b.addEventListener('click', closeFinder); });
document.getElementById('finder').addEventListener('click', function(e){ if(e.target===this) closeFinder(); });
document.getElementById('fxSearch').addEventListener('keydown', function(e){
var rows=Array.prototype.slice.call(document.querySelectorAll('#fxList .fx-row'));
var idx=rows.map(function(r){return r.getAttribute('data-pick');}).indexOf(fxPick);
if(e.key==='ArrowDown'){ e.preventDefault(); if(rows.length){ idx=Math.min(rows.length-1, idx+1); fxPick=rows[idx].getAttribute('data-pick'); renderFinder(); var rr=document.querySelectorAll('#fxList .fx-row'); if(rr[idx])rr[idx].scrollIntoView({block:'nearest'}); } }
else if(e.key==='ArrowUp'){ e.preventDefault(); if(rows.length){ idx=Math.max(0, idx-1); fxPick=rows[idx].getAttribute('data-pick'); renderFinder(); var r2=document.querySelectorAll('#fxList .fx-row'); if(r2[idx])r2[idx].scrollIntoView({block:'nearest'}); } }
else if(e.key==='Enter'){ e.preventDefault(); finderAdd(); }
else if(e.key==='Escape'){ closeFinder(); }
});
/* ---- modal ---- */
var modal=document.getElementById('modal');
function openModal(tab){ modal.classList.add('open'); if(tab)selectTab(tab); }
function closeModal(){ modal.classList.remove('open'); }
function selectTab(name){ document.querySelectorAll('.mo-tab').forEach(function(t){t.classList.toggle('active',t.getAttribute('data-tab')===name);}); document.querySelectorAll('.mo-pane').forEach(function(p){p.classList.toggle('active',p.getAttribute('data-pane')===name);}); var prim=document.getElementById('moPrimary'); var map={existing:'Open recipe',import:'Import',new:'Save',manage:'',v1:'Import from V1'}; prim.style.display=map[name]?'':'none'; prim.textContent=map[name]||''; prim.disabled=false; if(name==='existing'){ resetModalFinder(); } }
document.getElementById('titleBtn').addEventListener('click',function(){openModal('existing');});
document.querySelectorAll('[data-open-modal]').forEach(function(b){b.addEventListener('click',function(){openModal('existing');});});
document.querySelectorAll('[data-close-modal]').forEach(function(b){b.addEventListener('click',closeModal);});
modal.addEventListener('click',function(e){if(e.target===modal)closeModal();});
document.getElementById('moTabs').addEventListener('click',function(e){var t=e.target.closest('.mo-tab');if(t)selectTab(t.getAttribute('data-tab'));});
/* open-existing list — harmonized recipe finder (ranked, source chips, rich rows) */
var moSrc='all', moPick=null;
function renderModalFinder(){
var q=document.getElementById('moSearch').value;
var rows=rankCatalog(q, moSrc);
if(moPick && !rows.some(function(r){return r.id===moPick;})) moPick=null;
if(!moPick && rows.length) moPick=rows[0].id;
var topExactId = (rows.length && fxIsExact(rows[0],q)) ? rows[0].id : null;
document.getElementById('moList').innerHTML = rows.length ? rows.map(function(r){
var exact = r.id===topExactId;
return '<button class="fx-row'+(r.id===moPick?' sel':'')+'" data-pick="'+esc(r.id)+'">'
+'<span class="fx-ico"><i class="bl-java">J</i></span>'
+'<span class="fx-main">'
+'<span class="fx-nm">'+fxMark(r.name,q)+(exact?'<span class="fx-badge">Exact match</span>':'')+'</span>'
+'<span class="fx-id">'+fxMark(r.id,q)+'</span>'
+'<span class="fx-desc">'+esc(r.desc)+'</span>'