@jsenv/server 16.1.2 → 16.2.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/client/default_body_4xx_5xx/4xx.html +25 -24
- package/dist/client/route_inspector/route_inspector.html +597 -300
- package/dist/formidable_index/formidable_index.js +4 -4
- package/dist/formidable_index/jsenv_server_node_modules.js +1108 -260
- package/dist/jsenv_server.js +33 -9
- package/dist/ws/ws.js +15 -1
- package/package.json +37 -23
- package/src/cookies/cookie.js +42 -0
- package/src/cookies/cookie_map.js +18 -0
- package/src/interfacing_with_node/from_node_request.js +7 -6
- package/src/router/router.js +5 -3
- package/src/service_controller.js +13 -0
- package/src/services/autoreload_on_server_restart/client/autoreload_on_server_restart.js +25 -24
- package/src/services/open_file/jsenv_service_open_file.js +9 -1
- package/src/services/route_inspector/client/code_block.js +43 -21
- package/src/services/route_inspector/client/route_inspector.html +536 -264
- package/src/start_server.js +1 -1
|
@@ -55,19 +55,38 @@
|
|
|
55
55
|
`;
|
|
56
56
|
|
|
57
57
|
const html = /* html */ `<style>
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
58
|
+
${css}
|
|
59
|
+
</style>
|
|
60
|
+
<div class="clipboard_container">
|
|
61
|
+
<div id="copied_notif" aria-hidden="true">Copied !</div>
|
|
62
|
+
<button id="copy_button">
|
|
63
|
+
<svg
|
|
64
|
+
id="copy_icon"
|
|
65
|
+
aria-hidden="true"
|
|
66
|
+
viewBox="0 0 16 16"
|
|
67
|
+
width="16"
|
|
68
|
+
height="16"
|
|
69
|
+
>
|
|
70
|
+
<path
|
|
71
|
+
d="M0 6.75C0 5.784.784 5 1.75 5h1.5a.75.75 0 0 1 0 1.5h-1.5a.25.25 0 0 0-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 0 0 .25-.25v-1.5a.75.75 0 0 1 1.5 0v1.5A1.75 1.75 0 0 1 9.25 16h-7.5A1.75 1.75 0 0 1 0 14.25Z"
|
|
72
|
+
></path>
|
|
73
|
+
<path
|
|
74
|
+
d="M5 1.75C5 .784 5.784 0 6.75 0h7.5C15.216 0 16 .784 16 1.75v7.5A1.75 1.75 0 0 1 14.25 11h-7.5A1.75 1.75 0 0 1 5 9.25Zm1.75-.25a.25.25 0 0 0-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 0 0 .25-.25v-7.5a.25.25 0 0 0-.25-.25Z"
|
|
75
|
+
></path>
|
|
76
|
+
</svg>
|
|
77
|
+
<svg
|
|
78
|
+
id="copied_icon"
|
|
79
|
+
aria-hidden="true"
|
|
80
|
+
viewBox="0 0 16 16"
|
|
81
|
+
width="16"
|
|
82
|
+
height="16"
|
|
83
|
+
>
|
|
84
|
+
<path
|
|
85
|
+
d="M13.78 4.22a.75.75 0 0 1 0 1.06l-7.25 7.25a.75.75 0 0 1-1.06 0L2.22 9.28a.751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018L6 10.94l6.72-6.72a.75.75 0 0 1 1.06 0Z"
|
|
86
|
+
></path>
|
|
87
|
+
</svg>
|
|
88
|
+
</button>
|
|
89
|
+
</div>`;
|
|
71
90
|
class ClipboardCopy extends HTMLElement {
|
|
72
91
|
constructor() {
|
|
73
92
|
super();
|
|
@@ -138,14 +157,17 @@
|
|
|
138
157
|
`;
|
|
139
158
|
|
|
140
159
|
const html = /* html */ `<style>
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
160
|
+
${css}
|
|
161
|
+
</style>
|
|
162
|
+
<div id="code_block">
|
|
163
|
+
<pre id="pre"><code></code></pre>
|
|
164
|
+
<div
|
|
165
|
+
id="clipboard_copy_container"
|
|
166
|
+
style="position: absolute; right: 0; top: 0"
|
|
167
|
+
>
|
|
168
|
+
<clipboard-copy></clipboard-copy>
|
|
169
|
+
</div>
|
|
170
|
+
</div>
|
|
149
171
|
`;
|
|
150
172
|
|
|
151
173
|
let loadPromise;
|
|
@@ -224,35 +246,36 @@
|
|
|
224
246
|
</script>
|
|
225
247
|
<script>
|
|
226
248
|
const css = /* css */ `
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
249
|
+
dialog {
|
|
250
|
+
opacity: 0;
|
|
251
|
+
transition: all 0.3s allow-discrete;
|
|
252
|
+
}
|
|
253
|
+
dialog::backdrop {
|
|
254
|
+
background-image: linear-gradient(
|
|
255
|
+
45deg,
|
|
256
|
+
magenta,
|
|
257
|
+
rebeccapurple,
|
|
258
|
+
dodgerblue,
|
|
259
|
+
green
|
|
260
|
+
);
|
|
261
|
+
opacity: 0;
|
|
262
|
+
transition: all 0.3s allow-discrete;
|
|
263
|
+
}
|
|
264
|
+
dialog:open {
|
|
265
|
+
opacity: 1;
|
|
266
|
+
}
|
|
267
|
+
dialog:open::backdrop {
|
|
268
|
+
opacity: 0.75;
|
|
269
|
+
}
|
|
270
|
+
`;
|
|
248
271
|
|
|
249
272
|
const html = /* html */ `<style>
|
|
250
273
|
${css}
|
|
251
|
-
|
|
252
|
-
|
|
274
|
+
</style>
|
|
275
|
+
<dialog>
|
|
253
276
|
<p>Connection with server is lost</p>
|
|
254
277
|
<button autofocus name="reconnect">Retry</button>
|
|
255
|
-
|
|
278
|
+
</dialog>`;
|
|
256
279
|
|
|
257
280
|
class JsenvAutoreloadOnServerRestart extends HTMLElement {
|
|
258
281
|
constructor({ url } = {}) {
|
|
@@ -395,6 +418,10 @@
|
|
|
395
418
|
color: #1e90ff;
|
|
396
419
|
}
|
|
397
420
|
|
|
421
|
+
html {
|
|
422
|
+
scrollbar-gutter: stable both-edges;
|
|
423
|
+
}
|
|
424
|
+
|
|
398
425
|
body {
|
|
399
426
|
color: var(--text-color);
|
|
400
427
|
background-color: var(--background-color);
|
|
@@ -410,30 +437,35 @@ body {
|
|
|
410
437
|
}
|
|
411
438
|
|
|
412
439
|
aside {
|
|
413
|
-
background: var(--background-color);
|
|
414
|
-
border-radius: 6px;
|
|
415
440
|
flex-shrink: 0;
|
|
416
441
|
width: 250px;
|
|
417
|
-
|
|
442
|
+
height: 100%;
|
|
418
443
|
margin-right: 20px;
|
|
419
|
-
padding-top: 20px;
|
|
420
|
-
padding-left: 10px;
|
|
421
444
|
transition: width .3s, margin-left .3s;
|
|
422
|
-
|
|
445
|
+
position: fixed;
|
|
423
446
|
}
|
|
424
447
|
|
|
425
448
|
main {
|
|
426
449
|
flex-grow: 1;
|
|
427
450
|
flex-basis: 0;
|
|
428
451
|
min-width: 0;
|
|
429
|
-
|
|
452
|
+
margin-left: 280px;
|
|
453
|
+
padding-top: 20px;
|
|
430
454
|
padding-right: 20px;
|
|
431
455
|
transition: margin-left .3s;
|
|
432
456
|
}
|
|
433
457
|
|
|
434
458
|
.header_row {
|
|
459
|
+
align-items: flex-start;
|
|
460
|
+
gap: 10px;
|
|
461
|
+
display: flex;
|
|
462
|
+
}
|
|
463
|
+
|
|
464
|
+
.header_title {
|
|
435
465
|
align-items: center;
|
|
436
466
|
gap: 10px;
|
|
467
|
+
margin: 0;
|
|
468
|
+
line-height: 1;
|
|
437
469
|
display: flex;
|
|
438
470
|
}
|
|
439
471
|
|
|
@@ -666,12 +698,66 @@ main {
|
|
|
666
698
|
}
|
|
667
699
|
}
|
|
668
700
|
|
|
669
|
-
.
|
|
701
|
+
.route_container > * {
|
|
670
702
|
flex-grow: 1;
|
|
671
703
|
min-width: 0;
|
|
672
704
|
margin-top: 20px;
|
|
673
705
|
}
|
|
674
706
|
|
|
707
|
+
.route_group_details {
|
|
708
|
+
margin: 0 0 15px;
|
|
709
|
+
}
|
|
710
|
+
|
|
711
|
+
.summary_marker {
|
|
712
|
+
width: 24px;
|
|
713
|
+
height: 24px;
|
|
714
|
+
}
|
|
715
|
+
|
|
716
|
+
.route_group_details > summary {
|
|
717
|
+
cursor: pointer;
|
|
718
|
+
border-bottom: 1px solid var(--border-color);
|
|
719
|
+
margin-bottom: 7px;
|
|
720
|
+
list-style: none;
|
|
721
|
+
}
|
|
722
|
+
|
|
723
|
+
.route_group_details > summary::marker {
|
|
724
|
+
display: none;
|
|
725
|
+
}
|
|
726
|
+
|
|
727
|
+
.route_group_details[open] > summary .summary_marker {
|
|
728
|
+
transform: rotate(180deg);
|
|
729
|
+
}
|
|
730
|
+
|
|
731
|
+
.route_group_summary_container {
|
|
732
|
+
align-items: center;
|
|
733
|
+
padding: 5px;
|
|
734
|
+
display: flex;
|
|
735
|
+
}
|
|
736
|
+
|
|
737
|
+
.route_group_name {
|
|
738
|
+
text-align: center;
|
|
739
|
+
text-shadow: 0 1px #0000001a;
|
|
740
|
+
border-radius: 3px;
|
|
741
|
+
gap: .3em;
|
|
742
|
+
min-width: 80px;
|
|
743
|
+
padding: 6px 0;
|
|
744
|
+
font-family: sans-serif;
|
|
745
|
+
font-size: 14px;
|
|
746
|
+
font-weight: 700;
|
|
747
|
+
display: flex;
|
|
748
|
+
}
|
|
749
|
+
|
|
750
|
+
.route_group_description {
|
|
751
|
+
word-break: break-word;
|
|
752
|
+
user-select: none;
|
|
753
|
+
margin-top: 0;
|
|
754
|
+
margin-bottom: 0;
|
|
755
|
+
margin-left: 8px;
|
|
756
|
+
font-family: monospace;
|
|
757
|
+
font-size: 16px;
|
|
758
|
+
font-weight: 600;
|
|
759
|
+
}
|
|
760
|
+
|
|
675
761
|
.route_details {
|
|
676
762
|
border: 1px solid #000;
|
|
677
763
|
border-color: var(--method-color);
|
|
@@ -690,6 +776,10 @@ main {
|
|
|
690
776
|
display: none;
|
|
691
777
|
}
|
|
692
778
|
|
|
779
|
+
.route_details:open > summary .summary_marker {
|
|
780
|
+
transform: rotate(180deg);
|
|
781
|
+
}
|
|
782
|
+
|
|
693
783
|
.route_summary_container {
|
|
694
784
|
align-items: center;
|
|
695
785
|
padding: 5px;
|
|
@@ -719,31 +809,31 @@ main {
|
|
|
719
809
|
font-weight: 600;
|
|
720
810
|
}
|
|
721
811
|
|
|
722
|
-
.route_details[data-method="HEAD"] {
|
|
812
|
+
.route_details[data-method="HEAD"], .route_group_details[data-method="HEAD"] {
|
|
723
813
|
--method-color: var(--method-head-color);
|
|
724
814
|
}
|
|
725
815
|
|
|
726
|
-
.route_details[data-method="OPTIONS"] {
|
|
816
|
+
.route_details[data-method="OPTIONS"], .route_group_details[data-method="OPTIONS"] {
|
|
727
817
|
--method-color: var(--method-options-color);
|
|
728
818
|
}
|
|
729
819
|
|
|
730
|
-
.route_details[data-method="GET"] {
|
|
820
|
+
.route_details[data-method="GET"], .route_group_details[data-method="GET"] {
|
|
731
821
|
--method-color: var(--method-get-color);
|
|
732
822
|
}
|
|
733
823
|
|
|
734
|
-
.route_details[data-method="POST"] {
|
|
824
|
+
.route_details[data-method="POST"], .route_group_details[data-method="POST"] {
|
|
735
825
|
--method-color: var(--method-post-color);
|
|
736
826
|
}
|
|
737
827
|
|
|
738
|
-
.route_details[data-method="PUT"] {
|
|
828
|
+
.route_details[data-method="PUT"], .route_group_details[data-method="PUT"] {
|
|
739
829
|
--method-color: var(--method-put-color);
|
|
740
830
|
}
|
|
741
831
|
|
|
742
|
-
.route_details[data-method="PATCH"] {
|
|
832
|
+
.route_details[data-method="PATCH"], .route_group_details[data-method="PATCH"] {
|
|
743
833
|
--method-color: var(--method-patch-color);
|
|
744
834
|
}
|
|
745
835
|
|
|
746
|
-
.route_details[data-method="DELETE"] {
|
|
836
|
+
.route_details[data-method="DELETE"], .route_group_details[data-method="DELETE"] {
|
|
747
837
|
--method-color: var(--method-delete-color);
|
|
748
838
|
}
|
|
749
839
|
|
|
@@ -774,11 +864,11 @@ main {
|
|
|
774
864
|
}
|
|
775
865
|
|
|
776
866
|
.filter_container {
|
|
777
|
-
border: 1px solid var(--border-color);
|
|
867
|
+
border-right: 1px solid var(--border-color);
|
|
778
868
|
background: var(--secondary-color);
|
|
779
|
-
|
|
869
|
+
height: 100%;
|
|
780
870
|
margin-bottom: 20px;
|
|
781
|
-
overflow: hidden;
|
|
871
|
+
overflow: hidden auto;
|
|
782
872
|
}
|
|
783
873
|
|
|
784
874
|
.filter_container::marker {
|
|
@@ -795,18 +885,25 @@ main {
|
|
|
795
885
|
display: flex;
|
|
796
886
|
}
|
|
797
887
|
|
|
798
|
-
.filter:open .
|
|
888
|
+
.filter:open > summary .summary_marker {
|
|
799
889
|
transform: rotate(180deg);
|
|
800
890
|
}
|
|
801
891
|
|
|
892
|
+
.summary_text {
|
|
893
|
+
white-space: nowrap;
|
|
894
|
+
text-overflow: ellipsis;
|
|
895
|
+
width: 100%;
|
|
896
|
+
display: block;
|
|
897
|
+
overflow: hidden;
|
|
898
|
+
}
|
|
899
|
+
|
|
802
900
|
.filter_list {
|
|
803
901
|
background: var(--background-color);
|
|
804
|
-
border-top: 1px solid var(--border-color);
|
|
805
902
|
overflow: hidden;
|
|
806
903
|
}
|
|
807
904
|
|
|
808
905
|
.filter_item {
|
|
809
|
-
margin: 15px;
|
|
906
|
+
margin: 15px 15px 15px 0;
|
|
810
907
|
}
|
|
811
908
|
|
|
812
909
|
.filter_badge {
|
|
@@ -864,7 +961,6 @@ label .filter_text {
|
|
|
864
961
|
}
|
|
865
962
|
|
|
866
963
|
.filter_text[data-method] {
|
|
867
|
-
border-left: 5px solid var(--method-color);
|
|
868
964
|
padding-left: 4px;
|
|
869
965
|
}
|
|
870
966
|
|
|
@@ -930,19 +1026,27 @@ label .filter_text {
|
|
|
930
1026
|
.filter_button:hover {
|
|
931
1027
|
background-color: color-mix(in srgb, var(--primary-color) 15%, transparent);
|
|
932
1028
|
}
|
|
1029
|
+
|
|
1030
|
+
.status_pill {
|
|
1031
|
+
align-self: stretch;
|
|
1032
|
+
width: .4em;
|
|
1033
|
+
display: flex;
|
|
1034
|
+
}
|
|
933
1035
|
</style>
|
|
934
1036
|
<div class="container">
|
|
935
1037
|
<aside></aside>
|
|
936
1038
|
<main>
|
|
937
1039
|
<div class="header_row">
|
|
938
|
-
<h1
|
|
939
|
-
|
|
940
|
-
<
|
|
941
|
-
<
|
|
942
|
-
|
|
943
|
-
|
|
944
|
-
|
|
945
|
-
|
|
1040
|
+
<h1 class="header_title">
|
|
1041
|
+
Route inspector
|
|
1042
|
+
<button class="note_button_open" aria-label="Show information" title="About HTTP Methods">
|
|
1043
|
+
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" width="24" height="24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
|
|
1044
|
+
<circle cx="12" cy="12" r="10"></circle>
|
|
1045
|
+
<line x1="12" y1="16" x2="12" y2="12"></line>
|
|
1046
|
+
<line x1="12" y1="8" x2="12.01" y2="8"></line>
|
|
1047
|
+
</svg>
|
|
1048
|
+
</button>
|
|
1049
|
+
</h1>
|
|
946
1050
|
<div style="flex: 1"></div>
|
|
947
1051
|
<div class="theme-toggle">
|
|
948
1052
|
<button id="theme-toggle-btn" aria-label="Toggle dark/light mode">
|
|
@@ -1020,7 +1124,7 @@ label .filter_text {
|
|
|
1020
1124
|
});
|
|
1021
1125
|
</script>
|
|
1022
1126
|
<script type="module">/* esm.sh - preact@10.23.1 */
|
|
1023
|
-
var M$2,h$1,X,ie,x$1,J,Y,R,j,$,O$1,T$1={},ee=[],le=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i,I$1=Array.isArray;function b$3(_,e){for(var t in e)_[t]=e[t];return _}function _e(_){var e=_.parentNode;e&&e.removeChild(_);}function se(_,e,t){var i,n,r,l={};for(r in e)r=="key"?i=e[r]:r=="ref"?n=e[r]:l[r]=e[r];if(arguments.length>2&&(l.children=arguments.length>3?M$2.call(arguments,2):t),typeof _=="function"&&_.defaultProps!=null)for(r in _.defaultProps)l[r]===void 0&&(l[r]=_.defaultProps[r]);return U$2(_,l,i,n,null)}function U$2(_,e,t,i,n){var r={type:_,props:e,key:t,ref:i,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,constructor:void 0,__v:n??++X,__i:-1,__u:0};return n==null&&h$1.vnode!=null&&h$1.vnode(r),r}function N(_){return _.children}function F$1(_,e){this.props=_,this.context=e;}function C$2(_,e){if(e==null)return _.__?C$2(_.__,_.__i+1):null;for(var t;e<_.__k.length;e++)if((t=_.__k[e])!=null&&t.__e!=null)return t.__e;return typeof _.type=="function"?C$2(_):null}function te(_){var e,t;if((_=_.__)!=null&&_.__c!=null){for(_.__e=_.__c.base=null,e=0;e<_.__k.length;e++)if((t=_.__k[e])!=null&&t.__e!=null){_.__e=_.__c.base=t.__e;break}return te(_)}}function B$1(_){(!_.__d&&(_.__d=true)&&x$1.push(_)&&!H$1.__r++||J!==h$1.debounceRendering)&&((J=h$1.debounceRendering)||Y)(H$1);}function H$1(){var _,e,t,i,n,r,l,s;for(x$1.sort(R);_=x$1.shift();)_.__d&&(e=x$1.length,i=void 0,r=(n=(t=_).__v).__e,l=[],s=[],t.__P&&((i=b$3({},n)).__v=n.__v+1,h$1.vnode&&h$1.vnode(i),z$1(t.__P,i,n,t.__n,t.__P.namespaceURI,32&n.__u?[r]:null,l,r??C$2(n),!!(32&n.__u),s),i.__v=n.__v,i.__.__k[i.__i]=i,re(l,i,s),i.__e!=r&&te(i)),x$1.length>e&&x$1.sort(R));H$1.__r=0;}function ne(_,e,t,i,n,r,l,s,c,u,p){var o,m,f,v,g,y=i&&i.__k||ee,a=e.length;for(t.__d=c,ue(t,e,y),c=t.__d,o=0;o<a;o++)(f=t.__k[o])!=null&&typeof f!="boolean"&&typeof f!="function"&&(m=f.__i===-1?T$1:y[f.__i]||T$1,f.__i=o,z$1(_,f,m,n,r,l,s,c,u,p),v=f.__e,f.ref&&m.ref!=f.ref&&(m.ref&&q$1(m.ref,null,f),p.push(f.ref,f.__c||v,f)),g==null&&v!=null&&(g=v),65536&f.__u||m.__k===f.__k?c=oe(f,c,_):typeof f.type=="function"&&f.__d!==void 0?c=f.__d:v&&(c=v.nextSibling),f.__d=void 0,f.__u&=-196609);t.__d=c,t.__e=g;}function ue(_,e,t){var i,n,r,l,s,c=e.length,u=t.length,p=u,o=0;for(_.__k=[],i=0;i<c;i++)l=i+o,(n=_.__k[i]=(n=e[i])==null||typeof n=="boolean"||typeof n=="function"?null:typeof n=="string"||typeof n=="number"||typeof n=="bigint"||n.constructor==String?U$2(null,n,null,null,null):I$1(n)?U$2(N,{children:n},null,null,null):n.constructor===void 0&&n.__b>0?U$2(n.type,n.props,n.key,n.ref?n.ref:null,n.__v):n)!=null?(n.__=_,n.__b=_.__b+1,s=ce(n,t,l,p),n.__i=s,r=null,s!==-1&&(p--,(r=t[s])&&(r.__u|=131072)),r==null||r.__v===null?(s==-1&&o--,typeof n.type!="function"&&(n.__u|=65536)):s!==l&&(s==l-1?o=s-l:s==l+1?o++:s>l?p>c-l?o+=s-l:o--:s<l&&o++,s!==i+o&&(n.__u|=65536))):(r=t[l])&&r.key==null&&r.__e&&!(131072&r.__u)&&(r.__e==_.__d&&(_.__d=C$2(r)),V(r,r,false),t[l]=null,p--);if(p)for(i=0;i<u;i++)(r=t[i])!=null&&!(131072&r.__u)&&(r.__e==_.__d&&(_.__d=C$2(r)),V(r,r));}function oe(_,e,t){var i,n;if(typeof _.type=="function"){for(i=_.__k,n=0;i&&n<i.length;n++)i[n]&&(i[n].__=_,e=oe(i[n],e,t));return e}_.__e!=e&&(e&&_.type&&!t.contains(e)&&(e=C$2(_)),t.insertBefore(_.__e,e||null),e=_.__e);do e=e&&e.nextSibling;while(e!=null&&e.nodeType===8);return e}function ce(_,e,t,i){var n=_.key,r=_.type,l=t-1,s=t+1,c=e[t];if(c===null||c&&n==c.key&&r===c.type&&!(131072&c.__u))return t;if(i>(c!=null&&!(131072&c.__u)?1:0))for(;l>=0||s<e.length;){if(l>=0){if((c=e[l])&&!(131072&c.__u)&&n==c.key&&r===c.type)return l;l--;}if(s<e.length){if((c=e[s])&&!(131072&c.__u)&&n==c.key&&r===c.type)return s;s++;}}return -1}function K(_,e,t){e[0]==="-"?_.setProperty(e,t??""):_[e]=t==null?"":typeof t!="number"||le.test(e)?t:t+"px";}function W$1(_,e,t,i,n){var r;e:if(e==="style")if(typeof t=="string")_.style.cssText=t;else {if(typeof i=="string"&&(_.style.cssText=i=""),i)for(e in i)t&&e in t||K(_.style,e,"");if(t)for(e in t)i&&t[e]===i[e]||K(_.style,e,t[e]);}else if(e[0]==="o"&&e[1]==="n")r=e!==(e=e.replace(/(PointerCapture)$|Capture$/i,"$1")),e=e.toLowerCase()in _||e==="onFocusOut"||e==="onFocusIn"?e.toLowerCase().slice(2):e.slice(2),_.l||(_.l={}),_.l[e+r]=t,t?i?t.u=i.u:(t.u=j,_.addEventListener(e,r?O$1:$,r)):_.removeEventListener(e,r?O$1:$,r);else {if(n=="http://www.w3.org/2000/svg")e=e.replace(/xlink(H|:h)/,"h").replace(/sName$/,"s");else if(e!="width"&&e!="height"&&e!="href"&&e!="list"&&e!="form"&&e!="tabIndex"&&e!="download"&&e!="rowSpan"&&e!="colSpan"&&e!="role"&&e!="popover"&&e in _)try{_[e]=t??"";break e}catch{}typeof t=="function"||(t==null||t===false&&e[4]!=="-"?_.removeAttribute(e):_.setAttribute(e,e=="popover"&&t==1?"":t));}}function Q(_){return function(e){if(this.l){var t=this.l[e.type+_];if(e.t==null)e.t=j++;else if(e.t<t.u)return;return t(h$1.event?h$1.event(e):e)}}}function z$1(_,e,t,i,n,r,l,s,c,u){var p,o,m,f,v,g,y,a,d,P,w,D,S,G,E,A,k=e.type;if(e.constructor!==void 0)return null;128&t.__u&&(c=!!(32&t.__u),r=[s=e.__e=t.__e]),(p=h$1.__b)&&p(e);e:if(typeof k=="function")try{if(a=e.props,d="prototype"in k&&k.prototype.render,P=(p=k.contextType)&&i[p.__c],w=p?P?P.props.value:p.__:i,t.__c?y=(o=e.__c=t.__c).__=o.__E:(d?e.__c=o=new k(a,w):(e.__c=o=new F$1(a,w),o.constructor=k,o.render=ae),P&&P.sub(o),o.props=a,o.state||(o.state={}),o.context=w,o.__n=i,m=o.__d=!0,o.__h=[],o._sb=[]),d&&o.__s==null&&(o.__s=o.state),d&&k.getDerivedStateFromProps!=null&&(o.__s==o.state&&(o.__s=b$3({},o.__s)),b$3(o.__s,k.getDerivedStateFromProps(a,o.__s))),f=o.props,v=o.state,o.__v=e,m)d&&k.getDerivedStateFromProps==null&&o.componentWillMount!=null&&o.componentWillMount(),d&&o.componentDidMount!=null&&o.__h.push(o.componentDidMount);else {if(d&&k.getDerivedStateFromProps==null&&a!==f&&o.componentWillReceiveProps!=null&&o.componentWillReceiveProps(a,w),!o.__e&&(o.shouldComponentUpdate!=null&&o.shouldComponentUpdate(a,o.__s,w)===!1||e.__v===t.__v)){for(e.__v!==t.__v&&(o.props=a,o.state=o.__s,o.__d=!1),e.__e=t.__e,e.__k=t.__k,e.__k.forEach(function(L){L&&(L.__=e);}),D=0;D<o._sb.length;D++)o.__h.push(o._sb[D]);o._sb=[],o.__h.length&&l.push(o);break e}o.componentWillUpdate!=null&&o.componentWillUpdate(a,o.__s,w),d&&o.componentDidUpdate!=null&&o.__h.push(function(){o.componentDidUpdate(f,v,g);});}if(o.context=w,o.props=a,o.__P=_,o.__e=!1,S=h$1.__r,G=0,d){for(o.state=o.__s,o.__d=!1,S&&S(e),p=o.render(o.props,o.state,o.context),E=0;E<o._sb.length;E++)o.__h.push(o._sb[E]);o._sb=[];}else do o.__d=!1,S&&S(e),p=o.render(o.props,o.state,o.context),o.state=o.__s;while(o.__d&&++G<25);o.state=o.__s,o.getChildContext!=null&&(i=b$3(b$3({},i),o.getChildContext())),d&&!m&&o.getSnapshotBeforeUpdate!=null&&(g=o.getSnapshotBeforeUpdate(f,v)),ne(_,I$1(A=p!=null&&p.type===N&&p.key==null?p.props.children:p)?A:[A],e,t,i,n,r,l,s,c,u),o.base=e.__e,e.__u&=-161,o.__h.length&&l.push(o),y&&(o.__E=o.__=null);}catch(L){if(e.__v=null,c||r!=null){for(e.__u|=c?160:32;s&&s.nodeType===8&&s.nextSibling;)s=s.nextSibling;r[r.indexOf(s)]=null,e.__e=s;}else e.__e=t.__e,e.__k=t.__k;h$1.__e(L,e,t);}else r==null&&e.__v===t.__v?(e.__k=t.__k,e.__e=t.__e):e.__e=pe(t.__e,e,t,i,n,r,l,c,u);(p=h$1.diffed)&&p(e);}function re(_,e,t){e.__d=void 0;for(var i=0;i<t.length;i++)q$1(t[i],t[++i],t[++i]);h$1.__c&&h$1.__c(e,_),_.some(function(n){try{_=n.__h,n.__h=[],_.some(function(r){r.call(n);});}catch(r){h$1.__e(r,n.__v);}});}function pe(_,e,t,i,n,r,l,s,c){var u,p,o,m,f,v,g,y=t.props,a=e.props,d=e.type;if(d==="svg"?n="http://www.w3.org/2000/svg":d==="math"?n="http://www.w3.org/1998/Math/MathML":n||(n="http://www.w3.org/1999/xhtml"),r!=null){for(u=0;u<r.length;u++)if((f=r[u])&&"setAttribute"in f==!!d&&(d?f.localName===d:f.nodeType===3)){_=f,r[u]=null;break}}if(_==null){if(d===null)return document.createTextNode(a);_=document.createElementNS(n,d,a.is&&a),r=null,s=false;}if(d===null)y===a||s&&_.data===a||(_.data=a);else {if(r=r&&M$2.call(_.childNodes),y=t.props||T$1,!s&&r!=null)for(y={},u=0;u<_.attributes.length;u++)y[(f=_.attributes[u]).name]=f.value;for(u in y)if(f=y[u],u!="children"){if(u=="dangerouslySetInnerHTML")o=f;else if(u!=="key"&&!(u in a)){if(u=="value"&&"defaultValue"in a||u=="checked"&&"defaultChecked"in a)continue;W$1(_,u,null,f,n);}}for(u in a)f=a[u],u=="children"?m=f:u=="dangerouslySetInnerHTML"?p=f:u=="value"?v=f:u=="checked"?g=f:u==="key"||s&&typeof f!="function"||y[u]===f||W$1(_,u,f,y[u],n);if(p)s||o&&(p.__html===o.__html||p.__html===_.innerHTML)||(_.innerHTML=p.__html),e.__k=[];else if(o&&(_.innerHTML=""),ne(_,I$1(m)?m:[m],e,t,i,d==="foreignObject"?"http://www.w3.org/1999/xhtml":n,r,l,r?r[0]:t.__k&&C$2(t,0),s,c),r!=null)for(u=r.length;u--;)r[u]!=null&&_e(r[u]);s||(u="value",v!==void 0&&(v!==_[u]||d==="progress"&&!v||d==="option"&&v!==y[u])&&W$1(_,u,v,y[u],n),u="checked",g!==void 0&&g!==_[u]&&W$1(_,u,g,y[u],n));}return _}function q$1(_,e,t){try{if(typeof _=="function"){var i=typeof _.__u=="function";i&&_.__u(),i&&e==null||(_.__u=_(e));}else _.current=e;}catch(n){h$1.__e(n,t);}}function V(_,e,t){var i,n;if(h$1.unmount&&h$1.unmount(_),(i=_.ref)&&(i.current&&i.current!==_.__e||q$1(i,null,e)),(i=_.__c)!=null){if(i.componentWillUnmount)try{i.componentWillUnmount();}catch(r){h$1.__e(r,e);}i.base=i.__P=null;}if(i=_.__k)for(n=0;n<i.length;n++)i[n]&&V(i[n],e,t||typeof _.type!="function");t||_.__e==null||_e(_.__e),_.__c=_.__=_.__e=_.__d=void 0;}function ae(_,e,t){return this.constructor(_,t)}function de(_,e,t){var i,n,r,l;h$1.__&&h$1.__(_,e),n=(i="undefined"=="function")?null:e.__k,r=[],l=[],z$1(e,_=(e).__k=se(N,null,[_]),n||T$1,T$1,e.namespaceURI,n?null:e.firstChild?M$2.call(e.childNodes):null,r,n?n.__e:e.firstChild,i,l),re(r,_,l);}M$2=ee.slice,h$1={__e:function(_,e,t,i){for(var n,r,l;e=e.__;)if((n=e.__c)&&!n.__)try{if((r=n.constructor)&&r.getDerivedStateFromError!=null&&(n.setState(r.getDerivedStateFromError(_)),l=n.__d),n.componentDidCatch!=null&&(n.componentDidCatch(_,i||{}),l=n.__d),l)return n.__E=n}catch(s){_=s;}throw _}},X=0,ie=function(_){return _!=null&&_.constructor==null},F$1.prototype.setState=function(_,e){var t;t=this.__s!=null&&this.__s!==this.state?this.__s:this.__s=b$3({},this.state),typeof _=="function"&&(_=_(b$3({},t),this.props)),_&&b$3(t,_),_!=null&&this.__v&&(e&&this._sb.push(e),B$1(this));},F$1.prototype.forceUpdate=function(_){this.__v&&(this.__e=true,_&&this.__h.push(_),B$1(this));},F$1.prototype.render=N,x$1=[],Y=typeof Promise=="function"?Promise.prototype.then.bind(Promise.resolve()):setTimeout,R=function(_,e){return _.__v.__b-e.__v.__b},H$1.__r=0,j=0,$=Q(false),O$1=Q(true);
|
|
1127
|
+
var M$2,h$1,X,ie,x$2,J,Y,R,j,$,O$1,T$1={},ee=[],le=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i,I=Array.isArray;function b$3(_,e){for(var t in e)_[t]=e[t];return _}function _e(_){var e=_.parentNode;e&&e.removeChild(_);}function se(_,e,t){var i,n,r,l={};for(r in e)r=="key"?i=e[r]:r=="ref"?n=e[r]:l[r]=e[r];if(arguments.length>2&&(l.children=arguments.length>3?M$2.call(arguments,2):t),typeof _=="function"&&_.defaultProps!=null)for(r in _.defaultProps)l[r]===void 0&&(l[r]=_.defaultProps[r]);return U$1(_,l,i,n,null)}function U$1(_,e,t,i,n){var r={type:_,props:e,key:t,ref:i,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,constructor:void 0,__v:n??++X,__i:-1,__u:0};return n==null&&h$1.vnode!=null&&h$1.vnode(r),r}function N(_){return _.children}function F$1(_,e){this.props=_,this.context=e;}function C$2(_,e){if(e==null)return _.__?C$2(_.__,_.__i+1):null;for(var t;e<_.__k.length;e++)if((t=_.__k[e])!=null&&t.__e!=null)return t.__e;return typeof _.type=="function"?C$2(_):null}function te(_){var e,t;if((_=_.__)!=null&&_.__c!=null){for(_.__e=_.__c.base=null,e=0;e<_.__k.length;e++)if((t=_.__k[e])!=null&&t.__e!=null){_.__e=_.__c.base=t.__e;break}return te(_)}}function B(_){(!_.__d&&(_.__d=true)&&x$2.push(_)&&!H$1.__r++||J!==h$1.debounceRendering)&&((J=h$1.debounceRendering)||Y)(H$1);}function H$1(){var _,e,t,i,n,r,l,s;for(x$2.sort(R);_=x$2.shift();)_.__d&&(e=x$2.length,i=void 0,r=(n=(t=_).__v).__e,l=[],s=[],t.__P&&((i=b$3({},n)).__v=n.__v+1,h$1.vnode&&h$1.vnode(i),z$1(t.__P,i,n,t.__n,t.__P.namespaceURI,32&n.__u?[r]:null,l,r??C$2(n),!!(32&n.__u),s),i.__v=n.__v,i.__.__k[i.__i]=i,re(l,i,s),i.__e!=r&&te(i)),x$2.length>e&&x$2.sort(R));H$1.__r=0;}function ne(_,e,t,i,n,r,l,s,c,u,p){var o,m,f,v,g,y=i&&i.__k||ee,a=e.length;for(t.__d=c,ue(t,e,y),c=t.__d,o=0;o<a;o++)(f=t.__k[o])!=null&&typeof f!="boolean"&&typeof f!="function"&&(m=f.__i===-1?T$1:y[f.__i]||T$1,f.__i=o,z$1(_,f,m,n,r,l,s,c,u,p),v=f.__e,f.ref&&m.ref!=f.ref&&(m.ref&&q$1(m.ref,null,f),p.push(f.ref,f.__c||v,f)),g==null&&v!=null&&(g=v),65536&f.__u||m.__k===f.__k?c=oe(f,c,_):typeof f.type=="function"&&f.__d!==void 0?c=f.__d:v&&(c=v.nextSibling),f.__d=void 0,f.__u&=-196609);t.__d=c,t.__e=g;}function ue(_,e,t){var i,n,r,l,s,c=e.length,u=t.length,p=u,o=0;for(_.__k=[],i=0;i<c;i++)l=i+o,(n=_.__k[i]=(n=e[i])==null||typeof n=="boolean"||typeof n=="function"?null:typeof n=="string"||typeof n=="number"||typeof n=="bigint"||n.constructor==String?U$1(null,n,null,null,null):I(n)?U$1(N,{children:n},null,null,null):n.constructor===void 0&&n.__b>0?U$1(n.type,n.props,n.key,n.ref?n.ref:null,n.__v):n)!=null?(n.__=_,n.__b=_.__b+1,s=ce(n,t,l,p),n.__i=s,r=null,s!==-1&&(p--,(r=t[s])&&(r.__u|=131072)),r==null||r.__v===null?(s==-1&&o--,typeof n.type!="function"&&(n.__u|=65536)):s!==l&&(s==l-1?o=s-l:s==l+1?o++:s>l?p>c-l?o+=s-l:o--:s<l&&o++,s!==i+o&&(n.__u|=65536))):(r=t[l])&&r.key==null&&r.__e&&!(131072&r.__u)&&(r.__e==_.__d&&(_.__d=C$2(r)),V(r,r,false),t[l]=null,p--);if(p)for(i=0;i<u;i++)(r=t[i])!=null&&!(131072&r.__u)&&(r.__e==_.__d&&(_.__d=C$2(r)),V(r,r));}function oe(_,e,t){var i,n;if(typeof _.type=="function"){for(i=_.__k,n=0;i&&n<i.length;n++)i[n]&&(i[n].__=_,e=oe(i[n],e,t));return e}_.__e!=e&&(e&&_.type&&!t.contains(e)&&(e=C$2(_)),t.insertBefore(_.__e,e||null),e=_.__e);do e=e&&e.nextSibling;while(e!=null&&e.nodeType===8);return e}function ce(_,e,t,i){var n=_.key,r=_.type,l=t-1,s=t+1,c=e[t];if(c===null||c&&n==c.key&&r===c.type&&!(131072&c.__u))return t;if(i>(c!=null&&!(131072&c.__u)?1:0))for(;l>=0||s<e.length;){if(l>=0){if((c=e[l])&&!(131072&c.__u)&&n==c.key&&r===c.type)return l;l--;}if(s<e.length){if((c=e[s])&&!(131072&c.__u)&&n==c.key&&r===c.type)return s;s++;}}return -1}function K(_,e,t){e[0]==="-"?_.setProperty(e,t??""):_[e]=t==null?"":typeof t!="number"||le.test(e)?t:t+"px";}function W$1(_,e,t,i,n){var r;e:if(e==="style")if(typeof t=="string")_.style.cssText=t;else {if(typeof i=="string"&&(_.style.cssText=i=""),i)for(e in i)t&&e in t||K(_.style,e,"");if(t)for(e in t)i&&t[e]===i[e]||K(_.style,e,t[e]);}else if(e[0]==="o"&&e[1]==="n")r=e!==(e=e.replace(/(PointerCapture)$|Capture$/i,"$1")),e=e.toLowerCase()in _||e==="onFocusOut"||e==="onFocusIn"?e.toLowerCase().slice(2):e.slice(2),_.l||(_.l={}),_.l[e+r]=t,t?i?t.u=i.u:(t.u=j,_.addEventListener(e,r?O$1:$,r)):_.removeEventListener(e,r?O$1:$,r);else {if(n=="http://www.w3.org/2000/svg")e=e.replace(/xlink(H|:h)/,"h").replace(/sName$/,"s");else if(e!="width"&&e!="height"&&e!="href"&&e!="list"&&e!="form"&&e!="tabIndex"&&e!="download"&&e!="rowSpan"&&e!="colSpan"&&e!="role"&&e!="popover"&&e in _)try{_[e]=t??"";break e}catch{}typeof t=="function"||(t==null||t===false&&e[4]!=="-"?_.removeAttribute(e):_.setAttribute(e,e=="popover"&&t==1?"":t));}}function Q(_){return function(e){if(this.l){var t=this.l[e.type+_];if(e.t==null)e.t=j++;else if(e.t<t.u)return;return t(h$1.event?h$1.event(e):e)}}}function z$1(_,e,t,i,n,r,l,s,c,u){var p,o,m,f,v,g,y,a,d,P,w,D,S,G,E,A,k=e.type;if(e.constructor!==void 0)return null;128&t.__u&&(c=!!(32&t.__u),r=[s=e.__e=t.__e]),(p=h$1.__b)&&p(e);e:if(typeof k=="function")try{if(a=e.props,d="prototype"in k&&k.prototype.render,P=(p=k.contextType)&&i[p.__c],w=p?P?P.props.value:p.__:i,t.__c?y=(o=e.__c=t.__c).__=o.__E:(d?e.__c=o=new k(a,w):(e.__c=o=new F$1(a,w),o.constructor=k,o.render=ae),P&&P.sub(o),o.props=a,o.state||(o.state={}),o.context=w,o.__n=i,m=o.__d=!0,o.__h=[],o._sb=[]),d&&o.__s==null&&(o.__s=o.state),d&&k.getDerivedStateFromProps!=null&&(o.__s==o.state&&(o.__s=b$3({},o.__s)),b$3(o.__s,k.getDerivedStateFromProps(a,o.__s))),f=o.props,v=o.state,o.__v=e,m)d&&k.getDerivedStateFromProps==null&&o.componentWillMount!=null&&o.componentWillMount(),d&&o.componentDidMount!=null&&o.__h.push(o.componentDidMount);else {if(d&&k.getDerivedStateFromProps==null&&a!==f&&o.componentWillReceiveProps!=null&&o.componentWillReceiveProps(a,w),!o.__e&&(o.shouldComponentUpdate!=null&&o.shouldComponentUpdate(a,o.__s,w)===!1||e.__v===t.__v)){for(e.__v!==t.__v&&(o.props=a,o.state=o.__s,o.__d=!1),e.__e=t.__e,e.__k=t.__k,e.__k.forEach(function(L){L&&(L.__=e);}),D=0;D<o._sb.length;D++)o.__h.push(o._sb[D]);o._sb=[],o.__h.length&&l.push(o);break e}o.componentWillUpdate!=null&&o.componentWillUpdate(a,o.__s,w),d&&o.componentDidUpdate!=null&&o.__h.push(function(){o.componentDidUpdate(f,v,g);});}if(o.context=w,o.props=a,o.__P=_,o.__e=!1,S=h$1.__r,G=0,d){for(o.state=o.__s,o.__d=!1,S&&S(e),p=o.render(o.props,o.state,o.context),E=0;E<o._sb.length;E++)o.__h.push(o._sb[E]);o._sb=[];}else do o.__d=!1,S&&S(e),p=o.render(o.props,o.state,o.context),o.state=o.__s;while(o.__d&&++G<25);o.state=o.__s,o.getChildContext!=null&&(i=b$3(b$3({},i),o.getChildContext())),d&&!m&&o.getSnapshotBeforeUpdate!=null&&(g=o.getSnapshotBeforeUpdate(f,v)),ne(_,I(A=p!=null&&p.type===N&&p.key==null?p.props.children:p)?A:[A],e,t,i,n,r,l,s,c,u),o.base=e.__e,e.__u&=-161,o.__h.length&&l.push(o),y&&(o.__E=o.__=null);}catch(L){if(e.__v=null,c||r!=null){for(e.__u|=c?160:32;s&&s.nodeType===8&&s.nextSibling;)s=s.nextSibling;r[r.indexOf(s)]=null,e.__e=s;}else e.__e=t.__e,e.__k=t.__k;h$1.__e(L,e,t);}else r==null&&e.__v===t.__v?(e.__k=t.__k,e.__e=t.__e):e.__e=pe(t.__e,e,t,i,n,r,l,c,u);(p=h$1.diffed)&&p(e);}function re(_,e,t){e.__d=void 0;for(var i=0;i<t.length;i++)q$1(t[i],t[++i],t[++i]);h$1.__c&&h$1.__c(e,_),_.some(function(n){try{_=n.__h,n.__h=[],_.some(function(r){r.call(n);});}catch(r){h$1.__e(r,n.__v);}});}function pe(_,e,t,i,n,r,l,s,c){var u,p,o,m,f,v,g,y=t.props,a=e.props,d=e.type;if(d==="svg"?n="http://www.w3.org/2000/svg":d==="math"?n="http://www.w3.org/1998/Math/MathML":n||(n="http://www.w3.org/1999/xhtml"),r!=null){for(u=0;u<r.length;u++)if((f=r[u])&&"setAttribute"in f==!!d&&(d?f.localName===d:f.nodeType===3)){_=f,r[u]=null;break}}if(_==null){if(d===null)return document.createTextNode(a);_=document.createElementNS(n,d,a.is&&a),r=null,s=false;}if(d===null)y===a||s&&_.data===a||(_.data=a);else {if(r=r&&M$2.call(_.childNodes),y=t.props||T$1,!s&&r!=null)for(y={},u=0;u<_.attributes.length;u++)y[(f=_.attributes[u]).name]=f.value;for(u in y)if(f=y[u],u!="children"){if(u=="dangerouslySetInnerHTML")o=f;else if(u!=="key"&&!(u in a)){if(u=="value"&&"defaultValue"in a||u=="checked"&&"defaultChecked"in a)continue;W$1(_,u,null,f,n);}}for(u in a)f=a[u],u=="children"?m=f:u=="dangerouslySetInnerHTML"?p=f:u=="value"?v=f:u=="checked"?g=f:u==="key"||s&&typeof f!="function"||y[u]===f||W$1(_,u,f,y[u],n);if(p)s||o&&(p.__html===o.__html||p.__html===_.innerHTML)||(_.innerHTML=p.__html),e.__k=[];else if(o&&(_.innerHTML=""),ne(_,I(m)?m:[m],e,t,i,d==="foreignObject"?"http://www.w3.org/1999/xhtml":n,r,l,r?r[0]:t.__k&&C$2(t,0),s,c),r!=null)for(u=r.length;u--;)r[u]!=null&&_e(r[u]);s||(u="value",v!==void 0&&(v!==_[u]||d==="progress"&&!v||d==="option"&&v!==y[u])&&W$1(_,u,v,y[u],n),u="checked",g!==void 0&&g!==_[u]&&W$1(_,u,g,y[u],n));}return _}function q$1(_,e,t){try{if(typeof _=="function"){var i=typeof _.__u=="function";i&&_.__u(),i&&e==null||(_.__u=_(e));}else _.current=e;}catch(n){h$1.__e(n,t);}}function V(_,e,t){var i,n;if(h$1.unmount&&h$1.unmount(_),(i=_.ref)&&(i.current&&i.current!==_.__e||q$1(i,null,e)),(i=_.__c)!=null){if(i.componentWillUnmount)try{i.componentWillUnmount();}catch(r){h$1.__e(r,e);}i.base=i.__P=null;}if(i=_.__k)for(n=0;n<i.length;n++)i[n]&&V(i[n],e,t||typeof _.type!="function");t||_.__e==null||_e(_.__e),_.__c=_.__=_.__e=_.__d=void 0;}function ae(_,e,t){return this.constructor(_,t)}function de(_,e,t){var i,n,r,l;h$1.__&&h$1.__(_,e),n=(i="undefined"=="function")?null:e.__k,r=[],l=[],z$1(e,_=(e).__k=se(N,null,[_]),n||T$1,T$1,e.namespaceURI,n?null:e.firstChild?M$2.call(e.childNodes):null,r,n?n.__e:e.firstChild,i,l),re(r,_,l);}M$2=ee.slice,h$1={__e:function(_,e,t,i){for(var n,r,l;e=e.__;)if((n=e.__c)&&!n.__)try{if((r=n.constructor)&&r.getDerivedStateFromError!=null&&(n.setState(r.getDerivedStateFromError(_)),l=n.__d),n.componentDidCatch!=null&&(n.componentDidCatch(_,i||{}),l=n.__d),l)return n.__E=n}catch(s){_=s;}throw _}},X=0,ie=function(_){return _!=null&&_.constructor==null},F$1.prototype.setState=function(_,e){var t;t=this.__s!=null&&this.__s!==this.state?this.__s:this.__s=b$3({},this.state),typeof _=="function"&&(_=_(b$3({},t),this.props)),_&&b$3(t,_),_!=null&&this.__v&&(e&&this._sb.push(e),B(this));},F$1.prototype.forceUpdate=function(_){this.__v&&(this.__e=true,_&&this.__h.push(_),B(this));},F$1.prototype.render=N,x$2=[],Y=typeof Promise=="function"?Promise.prototype.then.bind(Promise.resolve()):setTimeout,R=function(_,e){return _.__v.__b-e.__v.__b},H$1.__r=0,j=0,$=Q(false),O$1=Q(true);
|
|
1024
1128
|
|
|
1025
1129
|
/* esm.sh - htm@3.1.1 */
|
|
1026
1130
|
var a$2=function(p,f,c,n){var l;f[0]=0;for(var u=1;u<f.length;u++){var g=f[u++],o=f[u]?(f[0]|=g?1:2,c[f[u++]]):f[++u];g===3?n[0]=o:g===4?n[1]=Object.assign(n[1]||{},o):g===5?(n[1]=n[1]||{})[f[++u]]=o:g===6?n[1][f[++u]]+=o+"":g?(l=p.apply(o,a$2(p,o,c,["",null])),n.push(l),o[0]?f[0]|=2:(f[u-2]=0,f[u]=l)):n.push(o);}return n},M$1=new Map;function b$2(p){var f=M$1.get(this);return f||(f=new Map,M$1.set(this,f)),(f=a$2(this,f.get(p)||(f.set(p,f=function(c){for(var n,l,u=1,g="",o="",i=[0],s=function(v){u===1&&(v||(g=g.replace(/^\s*\n\s*|\s*\n\s*$/g,"")))?i.push(0,v,g):u===3&&(v||g)?(i.push(3,v,g),u=2):u===2&&g==="..."&&v?i.push(4,v,0):u===2&&g&&!v?i.push(5,0,true,g):u>=5&&((g||!v&&u===5)&&(i.push(u,0,g,l),u=6),v&&(i.push(u,v,0,l),u=6)),g="";},t=0;t<c.length;t++){t&&(u===1&&s(),s(t));for(var w=0;w<c[t].length;w++)n=c[t][w],u===1?n==="<"?(s(),i=[i],u=3):g+=n:u===4?g==="--"&&n===">"?(u=1,g=""):g=n+g[0]:o?n===o?o="":g+=n:n==='"'||n==="'"?o=n:n===">"?(s(),u=1):u&&(n==="="?(u=5,l=g,g=""):n==="/"&&(u<5||c[t][w+1]===">")?(s(),u===3&&(i=i[0]),u=i,(i=i[0]).push(2,0,u),u=0):n===" "||n===" "||n===`
|
|
@@ -1029,14 +1133,14 @@ var a$2=function(p,f,c,n){var l;f[0]=0;for(var u=1;u<f.length;u++){var g=f[u++],
|
|
|
1029
1133
|
/* esm.sh - htm@3.1.1/preact */
|
|
1030
1134
|
var p$3=b$2.bind(se);
|
|
1031
1135
|
|
|
1032
|
-
/* esm.sh - @preact/signals-core@1.
|
|
1033
|
-
var
|
|
1136
|
+
/* esm.sh - @preact/signals-core@1.11.0 */
|
|
1137
|
+
var g$1=Symbol.for("preact-signals");function a$1(){if(s>1)s--;else {for(var t,i=false;v$1!==void 0;){var o=v$1;for(v$1=void 0,c$2++;o!==void 0;){var r=o.o;if(o.o=void 0,o.f&=-3,!(8&o.f)&&w$1(o))try{o.c();}catch(u){i||(t=u,i=true);}o=r;}}if(c$2=0,s--,i)throw t}}var n=void 0;function l$1(t){var i=n;n=void 0;try{return t()}finally{n=i;}}var v$1=void 0,s=0,c$2=0,d$1=0;function y(t){if(n!==void 0){var i=t.n;if(i===void 0||i.t!==n)return i={i:0,S:t,p:n.s,n:void 0,t:n,e:void 0,x:void 0,r:i},n.s!==void 0&&(n.s.n=i),n.s=i,t.n=i,32&n.f&&t.S(i),i;if(i.i===-1)return i.i=0,i.n!==void 0&&(i.n.p=i.p,i.p!==void 0&&(i.p.n=i.n),i.p=n.s,i.n=void 0,n.s.n=i,n.s=i),i}}function f(t,i){this.v=t,this.i=0,this.n=void 0,this.t=void 0,this.W=i?.watched,this.Z=i?.unwatched;}f.prototype.brand=g$1;f.prototype.h=function(){return true};f.prototype.S=function(t){var i=this,o=this.t;o!==t&&t.e===void 0&&(t.x=o,this.t=t,o!==void 0?o.e=t:l$1(function(){var r;(r=i.W)==null||r.call(i);}));};f.prototype.U=function(t){var i=this;if(this.t!==void 0){var o=t.e,r=t.x;o!==void 0&&(o.x=r,t.e=void 0),r!==void 0&&(r.e=o,t.x=void 0),t===this.t&&(this.t=r,r===void 0&&l$1(function(){var u;(u=i.Z)==null||u.call(i);}));}};f.prototype.subscribe=function(t){var i=this;return E$1(function(){var o=i.value,r=n;n=void 0;try{t(o);}finally{n=r;}})};f.prototype.valueOf=function(){return this.value};f.prototype.toString=function(){return this.value+""};f.prototype.toJSON=function(){return this.value};f.prototype.peek=function(){var t=n;n=void 0;try{return this.value}finally{n=t;}};Object.defineProperty(f.prototype,"value",{get:function(){var t=y(this);return t!==void 0&&(t.i=this.i),this.v},set:function(t){if(t!==this.v){if(c$2>100)throw new Error("Cycle detected");this.v=t,this.i++,d$1++,s++;try{for(var i=this.t;i!==void 0;i=i.x)i.t.N();}finally{a$1();}}}});function O(t,i){return new f(t,i)}function w$1(t){for(var i=t.s;i!==void 0;i=i.n)if(i.S.i!==i.i||!i.S.h()||i.S.i!==i.i)return true;return false}function S$2(t){for(var i=t.s;i!==void 0;i=i.n){var o=i.S.n;if(o!==void 0&&(i.r=o),i.S.n=i,i.i=-1,i.n===void 0){t.s=i;break}}}function x$1(t){for(var i=t.s,o=void 0;i!==void 0;){var r=i.p;i.i===-1?(i.S.U(i),r!==void 0&&(r.n=i.n),i.n!==void 0&&(i.n.p=r)):o=i,i.S.n=i.r,i.r!==void 0&&(i.r=void 0),i=r;}t.s=o;}function h(t,i){f.call(this,void 0),this.x=t,this.s=void 0,this.g=d$1-1,this.f=4,this.W=i?.watched,this.Z=i?.unwatched;}h.prototype=new f;h.prototype.h=function(){if(this.f&=-3,1&this.f)return false;if((36&this.f)==32||(this.f&=-5,this.g===d$1))return true;if(this.g=d$1,this.f|=1,this.i>0&&!w$1(this))return this.f&=-2,true;var t=n;try{S$2(this),n=this;var i=this.x();(16&this.f||this.v!==i||this.i===0)&&(this.v=i,this.f&=-17,this.i++);}catch(o){this.v=o,this.f|=16,this.i++;}return n=t,x$1(this),this.f&=-2,true};h.prototype.S=function(t){if(this.t===void 0){this.f|=36;for(var i=this.s;i!==void 0;i=i.n)i.S.S(i);}f.prototype.S.call(this,t);};h.prototype.U=function(t){if(this.t!==void 0&&(f.prototype.U.call(this,t),this.t===void 0)){this.f&=-33;for(var i=this.s;i!==void 0;i=i.n)i.S.U(i);}};h.prototype.N=function(){if(!(2&this.f)){this.f|=6;for(var t=this.t;t!==void 0;t=t.x)t.t.N();}};Object.defineProperty(h.prototype,"value",{get:function(){if(1&this.f)throw new Error("Cycle detected");var t=y(this);if(this.h(),t!==void 0&&(t.i=this.i),16&this.f)throw this.v;return this.v}});function k$1(t,i){return new h(t,i)}function b$1(t){var i=t.u;if(t.u=void 0,typeof i=="function"){s++;var o=n;n=void 0;try{i();}catch(r){throw t.f&=-2,t.f|=8,p$2(t),r}finally{n=o,a$1();}}}function p$2(t){for(var i=t.s;i!==void 0;i=i.n)i.S.U(i);t.x=void 0,t.s=void 0,b$1(t);}function U(t){if(n!==this)throw new Error("Out-of-order effect");x$1(this),n=t,this.f&=-2,8&this.f&&p$2(this),a$1();}function e(t){this.x=t,this.u=void 0,this.s=void 0,this.o=void 0,this.f=32;}e.prototype.c=function(){var t=this.S();try{if(8&this.f||this.x===void 0)return;var i=this.x();typeof i=="function"&&(this.u=i);}finally{t();}};e.prototype.S=function(){if(1&this.f)throw new Error("Cycle detected");this.f|=1,this.f&=-9,b$1(this),S$2(this),s++;var t=n;return n=this,U.bind(this,t)};e.prototype.N=function(){2&this.f||(this.f|=2,this.o=v$1,v$1=this);};e.prototype.d=function(){this.f|=8,1&this.f||p$2(this);};e.prototype.dispose=function(){this.d();};function E$1(t){var i=new e(t);try{i.c();}catch(r){throw i.d(),r}var o=i.d.bind(i);return o[Symbol.dispose]=o,o}
|
|
1034
1138
|
|
|
1035
1139
|
/* esm.sh - preact@10.23.1/hooks */
|
|
1036
|
-
var c$1,r,d,b,v=0,x=[],o=h$1,g=o.__b,C$1=o.__r,A=o.diffed,D=o.__c,F=o.unmount,k=o.__;function l(t,_){o.__h&&o.__h(r,t,v||_),v=0;var u=r.__H||(r.__H={__:[],__h:[]});return t>=u.__.length&&u.__.push({}),u.__[t]}function
|
|
1140
|
+
var c$1,r,d,b,v=0,x=[],o=h$1,g=o.__b,C$1=o.__r,A=o.diffed,D=o.__c,F=o.unmount,k=o.__;function l(t,_){o.__h&&o.__h(r,t,v||_),v=0;var u=r.__H||(r.__H={__:[],__h:[]});return t>=u.__.length&&u.__.push({}),u.__[t]}function z(t){return v=5,T(function(){return {current:t}},[])}function T(t,_){var u=l(c$1++,7);return E(u.__H,_)&&(u.__=t(),u.__H=_,u.__h=t),u.__}function M(t,_){return v=8,T(function(){return t},_)}function S$1(){for(var t;t=x.shift();)if(t.__P&&t.__H)try{t.__H.__h.forEach(p$1),t.__H.__h.forEach(H),t.__H.__h=[];}catch(_){t.__H.__h=[],o.__e(_,t.__v);}}o.__b=function(t){r=null,g&&g(t);},o.__=function(t,_){t&&_.__k&&_.__k.__m&&(t.__m=_.__k.__m),k&&k(t,_);},o.__r=function(t){C$1&&C$1(t),c$1=0;var _=(r=t.__c).__H;_&&(d===r?(_.__h=[],r.__h=[],_.__.forEach(function(u){u.__N&&(u.__=u.__N),u.i=u.__N=void 0;})):(_.__h.forEach(p$1),_.__h.forEach(H),_.__h=[],c$1=0)),d=r;},o.diffed=function(t){A&&A(t);var _=t.__c;_&&_.__H&&(_.__H.__h.length&&(x.push(_)!==1&&b===o.requestAnimationFrame||((b=o.requestAnimationFrame)||W)(S$1)),_.__H.__.forEach(function(u){u.i&&(u.__H=u.i),u.i=void 0;})),d=r=null;},o.__c=function(t,_){_.some(function(u){try{u.__h.forEach(p$1),u.__h=u.__h.filter(function(n){return !n.__||H(n)});}catch(n){_.some(function(i){i.__h&&(i.__h=[]);}),_=[],o.__e(n,u.__v);}}),D&&D(t,_);},o.unmount=function(t){F&&F(t);var _,u=t.__c;u&&u.__H&&(u.__H.__.forEach(function(n){try{p$1(n);}catch(i){_=i;}}),u.__H=void 0,_&&o.__e(_,u.__v));};var q=typeof requestAnimationFrame=="function";function W(t){var _,u=function(){clearTimeout(n),q&&cancelAnimationFrame(_),setTimeout(t);},n=setTimeout(u,100);q&&(_=requestAnimationFrame(u));}function p$1(t){var _=r,u=t.__c;typeof u=="function"&&(t.__c=void 0,u()),r=_;}function H(t){var _=r;t.__c=t.__(),r=_;}function E(t,_){return !t||t.length!==_.length||_.some(function(u,n){return u!==t[n]})}
|
|
1037
1141
|
|
|
1038
1142
|
/* esm.sh - @preact/signals@1.3.0 */
|
|
1039
|
-
var p;function a(e,n){h$1[e]=n.bind(null,h$1[e]||function(){});}function c(e){p&&p(),p=e&&e.S();}function S(e){var n=this,t=e.data,i=w(t);i.value=t;var u=T(function(){for(var r=n.__v;r=r.__;)if(r.__c){r.__c.__$f|=4;break}return n.__$u.c=function(){var f;!ie(u.peek())&&((f=n.base)==null?void 0:f.nodeType)===3?n.base.data=u.peek():(n.__$f|=1,n.setState({}));},k$1(function(){var f=i.value.value;return f===0?0:f===true?"":f||""})},[]);return u.value}S.displayName="_st";Object.defineProperties(
|
|
1143
|
+
var p;function a(e,n){h$1[e]=n.bind(null,h$1[e]||function(){});}function c(e){p&&p(),p=e&&e.S();}function S(e){var n=this,t=e.data,i=w(t);i.value=t;var u=T(function(){for(var r=n.__v;r=r.__;)if(r.__c){r.__c.__$f|=4;break}return n.__$u.c=function(){var f;!ie(u.peek())&&((f=n.base)==null?void 0:f.nodeType)===3?n.base.data=u.peek():(n.__$f|=1,n.setState({}));},k$1(function(){var f=i.value.value;return f===0?0:f===true?"":f||""})},[]);return u.value}S.displayName="_st";Object.defineProperties(f.prototype,{constructor:{configurable:true,value:void 0},type:{configurable:true,value:S},props:{configurable:true,get:function(){return {data:this}}},__b:{configurable:true,value:1}});a("__b",function(e,n){if(typeof n.type=="string"){var t,i=n.props;for(var u in i)if(u!=="children"){var r=i[u];r instanceof f&&(t||(n.__np=t={}),t[u]=r,i[u]=r.peek());}}e(n);});a("__r",function(e,n){c();var t,i=n.__c;i&&(i.__$f&=-2,(t=i.__$u)===void 0&&(i.__$u=t=function(u){var r;return E$1(function(){r=this;}),r.c=function(){i.__$f|=1,i.setState({});},r}())),c(t),e(n);});a("__e",function(e,n,t,i){c(),e(n,t,i);});a("diffed",function(e,n){c();var t;if(typeof n.type=="string"&&(t=n.__e)){var i=n.__np,u=n.props;if(i){var r=t.U;if(r)for(var f in r){var o=r[f];o!==void 0&&!(f in i)&&(o.d(),r[f]=void 0);}else t.U=r={};for(var _ in i){var v=r[_],m=i[_];v===void 0?(v=C(t,_,m,u),r[_]=v):v.o(m,u);}}}e(n);});function C(e,n,t,i){var u=n in e&&e.ownerSVGElement===void 0,r=O(t);return {o:function(f,o){r.value=f,i=o;},d:E$1(function(){var f=r.value.value;i[n]!==f&&(i[n]=f,u?e[n]=f:f?e.setAttribute(n,f):e.removeAttribute(n));})}}a("unmount",function(e,n){if(typeof n.type=="string"){var t=n.__e;if(t){var i=t.U;if(i){t.U=void 0;for(var u in i){var r=i[u];r&&r.d();}}}}else {var f=n.__c;if(f){var o=f.__$u;o&&(f.__$u=void 0,o.d());}}e(n);});a("__h",function(e,n,t,i){(i<3||i===9)&&(n.__$f|=2),e(n,t,i);});F$1.prototype.shouldComponentUpdate=function(e,n){var t=this.__$u;if(!(t&&t.s!==void 0||4&this.__$f)||3&this.__$f)return true;for(var i in n)return true;for(var u in e)if(u!=="__source"&&e[u]!==this.props[u])return true;for(var r in this.props)if(!(r in e))return true;return false};function w(e){return T(function(){return O(e)},[])}
|
|
1040
1144
|
|
|
1041
1145
|
const routesLoadingSignal = O(false);
|
|
1042
1146
|
const routeLoadingErrorSignal = O(null);
|
|
@@ -1099,11 +1203,18 @@ const routesLoadingSignal = O(false);
|
|
|
1099
1203
|
if (routes.length === 0) {
|
|
1100
1204
|
return null;
|
|
1101
1205
|
}
|
|
1102
|
-
return p$3`
|
|
1206
|
+
return p$3`
|
|
1207
|
+
<div>
|
|
1208
|
+
<${FiltersPanel} routes="${routes}" />
|
|
1209
|
+
</div>`;
|
|
1103
1210
|
};
|
|
1104
1211
|
|
|
1105
1212
|
const App = () => {
|
|
1106
|
-
return p$3`
|
|
1213
|
+
return p$3`
|
|
1214
|
+
<div>
|
|
1215
|
+
<${Toolbox} />
|
|
1216
|
+
<${RouteResults} />
|
|
1217
|
+
</div>`;
|
|
1107
1218
|
};
|
|
1108
1219
|
const ProgressBar = ({ width = "100%", height = 6, loading }) => {
|
|
1109
1220
|
if (!loading) {
|
|
@@ -1112,11 +1223,11 @@ const routesLoadingSignal = O(false);
|
|
|
1112
1223
|
return p$3`
|
|
1113
1224
|
<div
|
|
1114
1225
|
class="progress-bar"
|
|
1115
|
-
style
|
|
1226
|
+
style="${{
|
|
1116
1227
|
width: typeof Number(width) === "number" ? `${width}px` : width,
|
|
1117
1228
|
height:
|
|
1118
1229
|
typeof Number(height) === "number" ? `${height}px` : height,
|
|
1119
|
-
}}
|
|
1230
|
+
}}"
|
|
1120
1231
|
>
|
|
1121
1232
|
<div class="progress-container progress-indeterminate">
|
|
1122
1233
|
<div class="progress-bar-long"></div>
|
|
@@ -1125,19 +1236,20 @@ const routesLoadingSignal = O(false);
|
|
|
1125
1236
|
</div>
|
|
1126
1237
|
`;
|
|
1127
1238
|
};
|
|
1128
|
-
const
|
|
1239
|
+
const RouteResults = () => {
|
|
1129
1240
|
const routes = routesSignal.value;
|
|
1130
1241
|
const loading = routesLoadingSignal.value;
|
|
1131
1242
|
const routeLoadingError = routeLoadingErrorSignal.value;
|
|
1243
|
+
const [groupBy] = useGroupByUrlStringParam();
|
|
1132
1244
|
|
|
1133
1245
|
if (loading) {
|
|
1134
|
-
return p$3`<${ProgressBar} width="150" loading
|
|
1246
|
+
return p$3`<${ProgressBar} width="150" loading="${true}" />`;
|
|
1135
1247
|
}
|
|
1136
1248
|
|
|
1137
1249
|
if (routeLoadingError) {
|
|
1138
1250
|
return p$3`<p>
|
|
1139
|
-
|
|
1140
|
-
|
|
1251
|
+
Error loading routes: ${routeLoadingError.message}
|
|
1252
|
+
</p>`;
|
|
1141
1253
|
}
|
|
1142
1254
|
|
|
1143
1255
|
if (!routes || routes.length === 0) {
|
|
@@ -1145,10 +1257,74 @@ const routesLoadingSignal = O(false);
|
|
|
1145
1257
|
}
|
|
1146
1258
|
|
|
1147
1259
|
return p$3`<div class="route_container">
|
|
1148
|
-
|
|
1260
|
+
${groupBy
|
|
1261
|
+
? p$3`<${RouteGroups} groupBy="${groupBy}" routes="${routes}" />`
|
|
1262
|
+
: p$3`<${RouteList} routes="${routes}" />`}
|
|
1263
|
+
</div>`;
|
|
1264
|
+
};
|
|
1265
|
+
|
|
1266
|
+
const RouteGroups = ({ groupBy, routes }) => {
|
|
1267
|
+
const groups = {};
|
|
1268
|
+
for (const route of routes) {
|
|
1269
|
+
const groupKey =
|
|
1270
|
+
groupBy === "by_method"
|
|
1271
|
+
? route.method
|
|
1272
|
+
: route.meta.packageName || NO_PACKAGE_NAME;
|
|
1273
|
+
if (!groups[groupKey]) {
|
|
1274
|
+
groups[groupKey] = [];
|
|
1275
|
+
}
|
|
1276
|
+
groups[groupKey].push(route);
|
|
1277
|
+
}
|
|
1278
|
+
|
|
1279
|
+
return p$3`
|
|
1280
|
+
<ul style="margin-left: 0; padding: 0">
|
|
1281
|
+
<li style="list-style: none; padding: 0;">
|
|
1282
|
+
${Object.entries(groups).map(([groupKey, groupRoutes]) => {
|
|
1283
|
+
const groupText =
|
|
1284
|
+
groupBy === "by_method"
|
|
1285
|
+
? p$3`<span
|
|
1286
|
+
style="margin-left: 0.5em; display: inline-flex; gap: 0.5em;"
|
|
1287
|
+
>
|
|
1288
|
+
<${MethodsStatusPill} methodNames="${[groupKey]}" />
|
|
1289
|
+
<span>${groupKey}</span>
|
|
1290
|
+
</span>`
|
|
1291
|
+
: p$3`<span>${groupKey}</span>`;
|
|
1292
|
+
|
|
1293
|
+
return p$3`
|
|
1294
|
+
<details
|
|
1295
|
+
class="route_group_details"
|
|
1296
|
+
data-method="${groupBy === "by_method"
|
|
1297
|
+
? groupKey
|
|
1298
|
+
: undefined}"
|
|
1299
|
+
>
|
|
1300
|
+
<summary>
|
|
1301
|
+
<div class="route_group_summary_container">
|
|
1302
|
+
<span class="route_group_name">
|
|
1303
|
+
${groupBy === "by_method" ? "method" : "package"}:
|
|
1304
|
+
${groupText}
|
|
1305
|
+
</span>
|
|
1306
|
+
<span class="route_group_description">
|
|
1307
|
+
<span class="filter_count">
|
|
1308
|
+
${groupRoutes.length}
|
|
1309
|
+
</span>
|
|
1310
|
+
</span>
|
|
1311
|
+
<span style="flex: 1"></span>
|
|
1312
|
+
<span class="summary_marker">
|
|
1313
|
+
<${ArrowDown} />
|
|
1314
|
+
</span>
|
|
1315
|
+
</div>
|
|
1316
|
+
</summary>
|
|
1317
|
+
<${RouteList} routes="${groupRoutes}" />
|
|
1318
|
+
</details>`;
|
|
1319
|
+
})}
|
|
1320
|
+
</li>
|
|
1321
|
+
</ul>`;
|
|
1322
|
+
};
|
|
1323
|
+
|
|
1324
|
+
const RouteList = ({ routes }) => {
|
|
1325
|
+
return p$3`<div class="route_list">
|
|
1149
1326
|
${routes.map((route) => p$3`<${RouteDetails} ...${route} />`)}
|
|
1150
|
-
</div
|
|
1151
|
-
</div>`;
|
|
1327
|
+
</div>`;
|
|
1152
1328
|
};
|
|
1153
1329
|
|
|
1154
1330
|
const documentUrlSignal = O(window.location.href);
|
|
@@ -1227,6 +1403,13 @@ const routesLoadingSignal = O(false);
|
|
|
1227
1403
|
};
|
|
1228
1404
|
}
|
|
1229
1405
|
|
|
1406
|
+
const useGroupByUrlStringParam = () => {
|
|
1407
|
+
const availableGroupByValues = ["by_method", "by_package"];
|
|
1408
|
+
return useUrlStringParam("groupBy", {
|
|
1409
|
+
availableValues: availableGroupByValues,
|
|
1410
|
+
});
|
|
1411
|
+
};
|
|
1412
|
+
|
|
1230
1413
|
const useMethodUrlStringParam = () => {
|
|
1231
1414
|
const availableMethodNames = availableMethodNamesSignal.value;
|
|
1232
1415
|
return useUrlStringParam("method", {
|
|
@@ -1241,6 +1424,66 @@ const routesLoadingSignal = O(false);
|
|
|
1241
1424
|
});
|
|
1242
1425
|
};
|
|
1243
1426
|
|
|
1427
|
+
let Toolbox;
|
|
1428
|
+
{
|
|
1429
|
+
Toolbox = () => {
|
|
1430
|
+
return p$3``;
|
|
1431
|
+
};
|
|
1432
|
+
}
|
|
1433
|
+
|
|
1434
|
+
const StatusPill = ({ children, color }) => {
|
|
1435
|
+
return p$3`
|
|
1436
|
+
<span
|
|
1437
|
+
class="status_pill"
|
|
1438
|
+
style="${{
|
|
1439
|
+
background: color,
|
|
1440
|
+
}}"
|
|
1441
|
+
>
|
|
1442
|
+
${children}
|
|
1443
|
+
</span>`;
|
|
1444
|
+
};
|
|
1445
|
+
const buildLinearGradient = (colors) => {
|
|
1446
|
+
const percentagePerColor = Math.floor(100 / (colors.length - 1));
|
|
1447
|
+
const gradientSteps = [];
|
|
1448
|
+
let progress = 0;
|
|
1449
|
+
let index = 0;
|
|
1450
|
+
for (const color of colors) {
|
|
1451
|
+
if (index === colors.length - 1) {
|
|
1452
|
+
progress = 100;
|
|
1453
|
+
}
|
|
1454
|
+
gradientSteps.push(`${color} ${progress}%`);
|
|
1455
|
+
progress += percentagePerColor;
|
|
1456
|
+
index++;
|
|
1457
|
+
}
|
|
1458
|
+
const gradient = `linear-gradient(to bottom, ${gradientSteps.join(", ")})`;
|
|
1459
|
+
return gradient;
|
|
1460
|
+
};
|
|
1461
|
+
const MethodsStatusPill = ({ methodNames }) => {
|
|
1462
|
+
if (methodNames.length === 1) {
|
|
1463
|
+
return p$3`
|
|
1464
|
+
<${StatusPill}
|
|
1465
|
+
color="${getMethodColor(methodNames[0])}"
|
|
1466
|
+
/>
|
|
1467
|
+
`;
|
|
1468
|
+
}
|
|
1469
|
+
const colors = methodNames.map((methodName) =>
|
|
1470
|
+
getMethodColor(methodName),
|
|
1471
|
+
);
|
|
1472
|
+
const linearGradient = buildLinearGradient(colors);
|
|
1473
|
+
return p$3`
|
|
1474
|
+
<${StatusPill}
|
|
1475
|
+
color="${linearGradient}"
|
|
1476
|
+
/>
|
|
1477
|
+
`;
|
|
1478
|
+
};
|
|
1479
|
+
const getMethodColor = (methodName) => {
|
|
1480
|
+
const bodyStyle = window.getComputedStyle(document.body);
|
|
1481
|
+
const methodColor = bodyStyle.getPropertyValue(
|
|
1482
|
+
`--method-${methodName.toLowerCase()}-color`,
|
|
1483
|
+
);
|
|
1484
|
+
return methodColor;
|
|
1485
|
+
};
|
|
1486
|
+
|
|
1244
1487
|
let FiltersPanel;
|
|
1245
1488
|
{
|
|
1246
1489
|
FiltersPanel = ({ routes }) => {
|
|
@@ -1248,57 +1491,81 @@ const routesLoadingSignal = O(false);
|
|
|
1248
1491
|
<div class="filter_container">
|
|
1249
1492
|
<div class="filter_list">
|
|
1250
1493
|
<div class="filter_item">
|
|
1251
|
-
<${
|
|
1494
|
+
<${GroupSelector} />
|
|
1495
|
+
</div>
|
|
1496
|
+
<div class="filter_item">
|
|
1497
|
+
<${MethodFilter} routes="${routes}" />
|
|
1252
1498
|
</div>
|
|
1253
1499
|
<div class="filter_item">
|
|
1254
|
-
<${PackageFilter} routes
|
|
1500
|
+
<${PackageFilter} routes="${routes}" />
|
|
1255
1501
|
</div>
|
|
1256
1502
|
</div>
|
|
1257
1503
|
</div>
|
|
1258
1504
|
`;
|
|
1259
1505
|
};
|
|
1506
|
+
|
|
1507
|
+
const GroupSelector = () => {
|
|
1508
|
+
const [groupBy, setGroupBy] = useGroupByUrlStringParam();
|
|
1509
|
+
const label = p$3`
|
|
1510
|
+
<span>
|
|
1511
|
+
Group: ${groupBy || "none"}
|
|
1512
|
+
</span>`;
|
|
1513
|
+
const options = [
|
|
1514
|
+
{
|
|
1515
|
+
value: "",
|
|
1516
|
+
text: p$3`
|
|
1517
|
+
<span class="filter_text">
|
|
1518
|
+
none
|
|
1519
|
+
</span>
|
|
1520
|
+
`,
|
|
1521
|
+
selected: !groupBy,
|
|
1522
|
+
},
|
|
1523
|
+
{
|
|
1524
|
+
value: "by_method",
|
|
1525
|
+
text: p$3`
|
|
1526
|
+
<span class="filter_text">
|
|
1527
|
+
by method
|
|
1528
|
+
</span>
|
|
1529
|
+
`,
|
|
1530
|
+
selected: groupBy === "by_method",
|
|
1531
|
+
},
|
|
1532
|
+
{
|
|
1533
|
+
value: "by_package",
|
|
1534
|
+
text: p$3`
|
|
1535
|
+
<span class="filter_text">
|
|
1536
|
+
by package
|
|
1537
|
+
</span>
|
|
1538
|
+
`,
|
|
1539
|
+
selected: groupBy === "by_package",
|
|
1540
|
+
},
|
|
1541
|
+
];
|
|
1542
|
+
|
|
1543
|
+
return p$3`
|
|
1544
|
+
<${FilterSelector}
|
|
1545
|
+
label="${label}"
|
|
1546
|
+
options="${options}"
|
|
1547
|
+
onChange="${(groupByToSelect) => {
|
|
1548
|
+
setGroupBy(groupByToSelect);
|
|
1549
|
+
}}"
|
|
1550
|
+
/>
|
|
1551
|
+
`;
|
|
1552
|
+
};
|
|
1260
1553
|
const MethodFilter = ({ routes }) => {
|
|
1261
1554
|
const availableMethodNames = availableMethodNamesSignal.value;
|
|
1262
1555
|
const availableMethodRepartition = methodRepartitionSignal.value;
|
|
1263
1556
|
const [selectedMethod, setSelectedMethod] = useMethodUrlStringParam();
|
|
1264
1557
|
|
|
1265
|
-
// "all" border image is a combination of available method colors
|
|
1266
|
-
const getMethodColor = (methodName) => {
|
|
1267
|
-
const bodyStyle = window.getComputedStyle(document.body);
|
|
1268
|
-
const methodColor = bodyStyle.getPropertyValue(
|
|
1269
|
-
`--method-${methodName.toLowerCase()}-color`,
|
|
1270
|
-
);
|
|
1271
|
-
return methodColor;
|
|
1272
|
-
};
|
|
1273
|
-
const percentagePerColor = Math.floor(
|
|
1274
|
-
100 / (availableMethodNames.length - 1),
|
|
1275
|
-
);
|
|
1276
|
-
const gradientSteps = [];
|
|
1277
|
-
let progress = 0;
|
|
1278
|
-
let index = 0;
|
|
1279
|
-
for (const methodName of availableMethodNames) {
|
|
1280
|
-
if (index === availableMethodNames.length - 1) {
|
|
1281
|
-
progress = 100;
|
|
1282
|
-
}
|
|
1283
|
-
gradientSteps.push(`${getMethodColor(methodName)} ${progress}%`);
|
|
1284
|
-
progress += percentagePerColor;
|
|
1285
|
-
index++;
|
|
1286
|
-
}
|
|
1287
|
-
const gradient = `linear-gradient(to bottom, ${gradientSteps.join(", ")})`;
|
|
1288
|
-
|
|
1289
1558
|
const options = [
|
|
1290
1559
|
{
|
|
1291
1560
|
value: "",
|
|
1292
1561
|
text: p$3`
|
|
1293
|
-
|
|
1294
|
-
|
|
1295
|
-
|
|
1296
|
-
|
|
1297
|
-
|
|
1298
|
-
}
|
|
1299
|
-
|
|
1300
|
-
>
|
|
1301
|
-
<span class="filter_count">${routes.length}</span>
|
|
1562
|
+
<${MethodsStatusPill}
|
|
1563
|
+
methodNames="${availableMethodNames}"
|
|
1564
|
+
/>
|
|
1565
|
+
<span class="filter_text" data-method="all">all</span>
|
|
1566
|
+
<span class="filter_count">
|
|
1567
|
+
${routes.length}
|
|
1568
|
+
</span>
|
|
1302
1569
|
`,
|
|
1303
1570
|
selected: !selectedMethod,
|
|
1304
1571
|
},
|
|
@@ -1306,8 +1573,14 @@ const routesLoadingSignal = O(false);
|
|
|
1306
1573
|
return {
|
|
1307
1574
|
value: availableMethodName,
|
|
1308
1575
|
text: p$3`
|
|
1309
|
-
|
|
1310
|
-
|
|
1576
|
+
<${MethodsStatusPill}
|
|
1577
|
+
methodNames="${[availableMethodName]}"
|
|
1578
|
+
/>
|
|
1579
|
+
<span
|
|
1580
|
+
class="filter_text"
|
|
1581
|
+
data-method="${availableMethodName}"
|
|
1582
|
+
>
|
|
1583
|
+
${availableMethodName}
|
|
1311
1584
|
</span>
|
|
1312
1585
|
<span class="filter_count">
|
|
1313
1586
|
${availableMethodRepartition[availableMethodName]}
|
|
@@ -1318,13 +1591,24 @@ const routesLoadingSignal = O(false);
|
|
|
1318
1591
|
}),
|
|
1319
1592
|
];
|
|
1320
1593
|
|
|
1594
|
+
const label = p$3`<span
|
|
1595
|
+
style="display: flex; align-items: center; gap: 5px"
|
|
1596
|
+
>
|
|
1597
|
+
<${MethodsStatusPill}
|
|
1598
|
+
methodNames="${selectedMethod
|
|
1599
|
+
? [selectedMethod]
|
|
1600
|
+
: availableMethodNames}"
|
|
1601
|
+
/>
|
|
1602
|
+
<span>Methods: ${selectedMethod || "all"}</span>
|
|
1603
|
+
</span>`;
|
|
1604
|
+
|
|
1321
1605
|
return p$3`
|
|
1322
1606
|
<${FilterSelector}
|
|
1323
|
-
label="
|
|
1324
|
-
options
|
|
1325
|
-
onChange
|
|
1607
|
+
label="${label}"
|
|
1608
|
+
options="${options}"
|
|
1609
|
+
onChange="${(methodToSelect) => {
|
|
1326
1610
|
setSelectedMethod(methodToSelect);
|
|
1327
|
-
}}
|
|
1611
|
+
}}"
|
|
1328
1612
|
/>
|
|
1329
1613
|
`;
|
|
1330
1614
|
};
|
|
@@ -1356,13 +1640,20 @@ const routesLoadingSignal = O(false);
|
|
|
1356
1640
|
};
|
|
1357
1641
|
}),
|
|
1358
1642
|
];
|
|
1643
|
+
|
|
1644
|
+
const label = p$3`
|
|
1645
|
+
<span>
|
|
1646
|
+
Packages: ${selectedPackageName || "all"}
|
|
1647
|
+
</span>
|
|
1648
|
+
`;
|
|
1649
|
+
|
|
1359
1650
|
return p$3`
|
|
1360
1651
|
<${FilterSelector}
|
|
1361
|
-
label="
|
|
1362
|
-
options
|
|
1363
|
-
onChange
|
|
1652
|
+
label="${label}"
|
|
1653
|
+
options="${options}"
|
|
1654
|
+
onChange="${(packageNameToSelect) => {
|
|
1364
1655
|
setSelectedPackageName(packageNameToSelect);
|
|
1365
|
-
}}
|
|
1656
|
+
}}"
|
|
1366
1657
|
/>
|
|
1367
1658
|
`;
|
|
1368
1659
|
};
|
|
@@ -1377,66 +1668,68 @@ const routesLoadingSignal = O(false);
|
|
|
1377
1668
|
|
|
1378
1669
|
return p$3`<details open class="filter">
|
|
1379
1670
|
<summary class="filter_summary">
|
|
1380
|
-
|
|
1381
|
-
|
|
1671
|
+
<span class="summary_text">${label}</span>
|
|
1672
|
+
<span class="summary_marker">
|
|
1673
|
+
<${ArrowDown} />
|
|
1674
|
+
</span>
|
|
1382
1675
|
</summary>
|
|
1383
1676
|
<form ref=${formRef} class="filter_form">
|
|
1384
1677
|
${options.map((option) => {
|
|
1385
1678
|
return p$3`<label>
|
|
1386
|
-
|
|
1387
|
-
|
|
1388
|
-
|
|
1389
|
-
|
|
1390
|
-
|
|
1391
|
-
|
|
1392
|
-
|
|
1393
|
-
|
|
1394
|
-
|
|
1395
|
-
|
|
1396
|
-
|
|
1397
|
-
|
|
1398
|
-
|
|
1399
|
-
|
|
1400
|
-
|
|
1401
|
-
|
|
1402
|
-
|
|
1679
|
+
<input
|
|
1680
|
+
type="${multiple ? "checkbox" : "radio"}"
|
|
1681
|
+
name="${label}"
|
|
1682
|
+
checked="${option.selected}"
|
|
1683
|
+
value="${option.value}"
|
|
1684
|
+
onChange="${multiple
|
|
1685
|
+
? () => {
|
|
1686
|
+
const formNode = formRef.current;
|
|
1687
|
+
// even if we create a checkbox list the HTML spec
|
|
1688
|
+
// return a radio node list and we have to gather the checked values
|
|
1689
|
+
const radioNodeList = formNode.elements[label];
|
|
1690
|
+
const selectedValues = [];
|
|
1691
|
+
for (const checkboxNode of Array.from(
|
|
1692
|
+
radioNodeList,
|
|
1693
|
+
)) {
|
|
1694
|
+
if (checkboxNode.checked) {
|
|
1695
|
+
selectedValues.push(checkboxNode.value);
|
|
1696
|
+
}
|
|
1403
1697
|
}
|
|
1698
|
+
onChange(selectedValues);
|
|
1404
1699
|
}
|
|
1405
|
-
|
|
1406
|
-
|
|
1407
|
-
|
|
1408
|
-
|
|
1409
|
-
|
|
1410
|
-
|
|
1411
|
-
|
|
1412
|
-
|
|
1413
|
-
|
|
1414
|
-
${option.text}
|
|
1415
|
-
</label>`;
|
|
1700
|
+
: () => {
|
|
1701
|
+
const formNode = formRef.current;
|
|
1702
|
+
const radioNodeList = formNode.elements[label];
|
|
1703
|
+
const selectedValue = radioNodeList.value;
|
|
1704
|
+
onChange(selectedValue);
|
|
1705
|
+
}}"
|
|
1706
|
+
/>
|
|
1707
|
+
${option.text}
|
|
1708
|
+
</label>`;
|
|
1416
1709
|
})}
|
|
1417
1710
|
</form>
|
|
1418
1711
|
${
|
|
1419
1712
|
actions &&
|
|
1420
1713
|
p$3` <div class="filter_actions">
|
|
1421
|
-
|
|
1422
|
-
|
|
1423
|
-
|
|
1424
|
-
|
|
1425
|
-
|
|
1426
|
-
|
|
1427
|
-
|
|
1428
|
-
|
|
1429
|
-
|
|
1430
|
-
|
|
1431
|
-
|
|
1432
|
-
|
|
1433
|
-
|
|
1434
|
-
|
|
1435
|
-
|
|
1436
|
-
|
|
1437
|
-
|
|
1438
|
-
|
|
1439
|
-
|
|
1714
|
+
<button
|
|
1715
|
+
type="button"
|
|
1716
|
+
class="filter_button"
|
|
1717
|
+
onClick="${() => {
|
|
1718
|
+
onChange(options.map((option) => option.value));
|
|
1719
|
+
}}"
|
|
1720
|
+
>
|
|
1721
|
+
Select All
|
|
1722
|
+
</button>
|
|
1723
|
+
<button
|
|
1724
|
+
type="button"
|
|
1725
|
+
class="filter_button"
|
|
1726
|
+
onClick="${() => {
|
|
1727
|
+
onChange([]);
|
|
1728
|
+
}}"
|
|
1729
|
+
>
|
|
1730
|
+
Clear All
|
|
1731
|
+
</button>
|
|
1732
|
+
</div>`
|
|
1440
1733
|
}
|
|
1441
1734
|
</div>`;
|
|
1442
1735
|
};
|
|
@@ -1456,7 +1749,6 @@ const routesLoadingSignal = O(false);
|
|
|
1456
1749
|
clientCodeExample,
|
|
1457
1750
|
declarationSource,
|
|
1458
1751
|
}) => {
|
|
1459
|
-
const [opened, setOpened] = B(false);
|
|
1460
1752
|
const [selectedMethod] = useUrlStringParam("method");
|
|
1461
1753
|
const [selectedPackageName] = usePackageUrlStringParam();
|
|
1462
1754
|
|
|
@@ -1468,37 +1760,38 @@ const routesLoadingSignal = O(false);
|
|
|
1468
1760
|
return null;
|
|
1469
1761
|
}
|
|
1470
1762
|
|
|
1471
|
-
return p$3`<details
|
|
1472
|
-
|
|
1473
|
-
onToggle=${(e) => {
|
|
1474
|
-
setOpened(e.newState === "open");
|
|
1475
|
-
}}
|
|
1476
|
-
data-method=${method}
|
|
1477
|
-
>
|
|
1478
|
-
<summary>
|
|
1479
|
-
<div class="route_summary_container">
|
|
1763
|
+
return p$3`<details class="route_details" data-method="${method}">
|
|
1764
|
+
<summary class="route_summary_container">
|
|
1480
1765
|
<span class="route_method">${method}</span>
|
|
1481
1766
|
<p class="route_resource">${resource}</p>
|
|
1767
|
+
${method === "GET"
|
|
1768
|
+
? p$3`<a
|
|
1769
|
+
style="display:inline-flex; margin-left: 5px;"
|
|
1770
|
+
href="${resource}"
|
|
1771
|
+
><${OpenLink}
|
|
1772
|
+
/></a>`
|
|
1773
|
+
: null}
|
|
1482
1774
|
<span style="flex:1"></span>
|
|
1483
|
-
<${RouteBadge} meta
|
|
1484
|
-
|
|
1485
|
-
|
|
1486
|
-
|
|
1487
|
-
|
|
1488
|
-
|
|
1489
|
-
|
|
1490
|
-
|
|
1491
|
-
|
|
1492
|
-
|
|
1493
|
-
|
|
1494
|
-
|
|
1495
|
-
|
|
1496
|
-
|
|
1497
|
-
|
|
1498
|
-
|
|
1499
|
-
|
|
1500
|
-
|
|
1501
|
-
|
|
1775
|
+
<${RouteBadge} meta="${meta}" />
|
|
1776
|
+
<span class="summary_marker">
|
|
1777
|
+
<${ArrowDown} />
|
|
1778
|
+
</span>
|
|
1779
|
+
</summary>
|
|
1780
|
+
<${RouteDetailsContent}
|
|
1781
|
+
method="${method}"
|
|
1782
|
+
resource="${resource}"
|
|
1783
|
+
description="${description}"
|
|
1784
|
+
availableMediaTypes="${availableMediaTypes}"
|
|
1785
|
+
availableLanguages="${availableLanguages}"
|
|
1786
|
+
availableVersions="${availableVersions}"
|
|
1787
|
+
availableEncodings="${availableEncodings}"
|
|
1788
|
+
acceptedMediaTypes="${acceptedMediaTypes}"
|
|
1789
|
+
websocket="${websocket}"
|
|
1790
|
+
clientCodeExample="${clientCodeExample}"
|
|
1791
|
+
declarationSource="${declarationSource}"
|
|
1792
|
+
meta="${meta}"
|
|
1793
|
+
/>
|
|
1794
|
+
</details>`;
|
|
1502
1795
|
};
|
|
1503
1796
|
|
|
1504
1797
|
const RouteBadge = ({ meta }) => {
|
|
@@ -1507,9 +1800,9 @@ const routesLoadingSignal = O(false);
|
|
|
1507
1800
|
}
|
|
1508
1801
|
let text = meta.packageName;
|
|
1509
1802
|
let title = `This endpoint is declared by ${meta.packageName}`;
|
|
1510
|
-
return p$3`<span title
|
|
1511
|
-
|
|
1512
|
-
|
|
1803
|
+
return p$3`<span title="${title}" class="route_owner_name"
|
|
1804
|
+
>${text}</span
|
|
1805
|
+
>`;
|
|
1513
1806
|
};
|
|
1514
1807
|
|
|
1515
1808
|
const RouteDetailsContent = ({
|
|
@@ -1527,51 +1820,51 @@ const routesLoadingSignal = O(false);
|
|
|
1527
1820
|
meta,
|
|
1528
1821
|
}) => {
|
|
1529
1822
|
return p$3`<div class="route_details_content">
|
|
1530
|
-
|
|
1531
|
-
|
|
1532
|
-
|
|
1533
|
-
|
|
1534
|
-
|
|
1535
|
-
|
|
1536
|
-
|
|
1537
|
-
|
|
1538
|
-
|
|
1539
|
-
|
|
1540
|
-
|
|
1541
|
-
|
|
1542
|
-
|
|
1543
|
-
|
|
1544
|
-
|
|
1545
|
-
|
|
1546
|
-
|
|
1547
|
-
|
|
1548
|
-
|
|
1549
|
-
|
|
1550
|
-
|
|
1551
|
-
|
|
1552
|
-
|
|
1553
|
-
|
|
1554
|
-
|
|
1555
|
-
|
|
1556
|
-
|
|
1557
|
-
|
|
1558
|
-
|
|
1559
|
-
|
|
1560
|
-
|
|
1561
|
-
|
|
1562
|
-
|
|
1563
|
-
|
|
1564
|
-
|
|
1565
|
-
|
|
1566
|
-
|
|
1567
|
-
|
|
1568
|
-
|
|
1569
|
-
|
|
1570
|
-
|
|
1571
|
-
|
|
1572
|
-
|
|
1573
|
-
|
|
1574
|
-
|
|
1823
|
+
<${RoutedeclarationSource}
|
|
1824
|
+
meta="${meta}"
|
|
1825
|
+
declarationSource="${declarationSource}"
|
|
1826
|
+
/>
|
|
1827
|
+
<p style="margin-top: 0"><strong>Description:</strong></p>
|
|
1828
|
+
<p class="route_description">
|
|
1829
|
+
${description || "No description available"}
|
|
1830
|
+
</p>
|
|
1831
|
+
${availableMediaTypes.length > 0 &&
|
|
1832
|
+
p$3`<${RouteContentNegotiationSection}
|
|
1833
|
+
type="content-type"
|
|
1834
|
+
title="Available media types"
|
|
1835
|
+
availableValues="${availableMediaTypes}"
|
|
1836
|
+
/>`}
|
|
1837
|
+
${availableLanguages.length > 0 &&
|
|
1838
|
+
p$3`<${RouteContentNegotiationSection}
|
|
1839
|
+
type="language"
|
|
1840
|
+
title="Available languages"
|
|
1841
|
+
availableValues="${availableLanguages}"
|
|
1842
|
+
/>`}
|
|
1843
|
+
${availableVersions.length > 0 &&
|
|
1844
|
+
p$3`<${RouteContentNegotiationSection}
|
|
1845
|
+
type="version"
|
|
1846
|
+
title="Available versions"
|
|
1847
|
+
availableValues="${availableVersions}"
|
|
1848
|
+
/>`}
|
|
1849
|
+
${availableEncodings.length > 0 &&
|
|
1850
|
+
p$3`<${RouteContentNegotiationSection}
|
|
1851
|
+
type="encoding"
|
|
1852
|
+
title="Available encodings"
|
|
1853
|
+
availableValues="${availableEncodings}"
|
|
1854
|
+
/>`}
|
|
1855
|
+
${acceptedMediaTypes.length > 0 &&
|
|
1856
|
+
p$3`<${RouteAcceptableContentSection}
|
|
1857
|
+
acceptedMediaTypes="${acceptedMediaTypes}"
|
|
1858
|
+
/>`}
|
|
1859
|
+
<p style="margin-bottom:0; font-weight:bold">Example:</p>
|
|
1860
|
+
<${RouteCodeExample}
|
|
1861
|
+
method="${method}"
|
|
1862
|
+
resource="${resource}"
|
|
1863
|
+
availableMediaTypes="${availableMediaTypes}"
|
|
1864
|
+
websocket="${websocket}"
|
|
1865
|
+
clientCodeExample="${clientCodeExample}"
|
|
1866
|
+
/>
|
|
1867
|
+
</div>`;
|
|
1575
1868
|
};
|
|
1576
1869
|
const RoutedeclarationSource = ({ meta, declarationSource }) => {
|
|
1577
1870
|
if (!declarationSource) {
|
|
@@ -1580,8 +1873,8 @@ const routesLoadingSignal = O(false);
|
|
|
1580
1873
|
return p$3`<p style="margin-top: 0"><strong>Declaration:</strong></p>
|
|
1581
1874
|
<p>
|
|
1582
1875
|
<${RouteDeclarationText}
|
|
1583
|
-
ownerLink
|
|
1584
|
-
declarationLink
|
|
1876
|
+
ownerLink="${meta.ownerLink}"
|
|
1877
|
+
declarationLink="${meta.declarationLink}"
|
|
1585
1878
|
/>
|
|
1586
1879
|
</p>`;
|
|
1587
1880
|
};
|
|
@@ -1595,23 +1888,23 @@ const routesLoadingSignal = O(false);
|
|
|
1595
1888
|
availableValues,
|
|
1596
1889
|
}) => {
|
|
1597
1890
|
return p$3`<div class="route_content_nego" data-nego-type="${type}">
|
|
1598
|
-
|
|
1599
|
-
|
|
1600
|
-
|
|
1601
|
-
|
|
1602
|
-
|
|
1603
|
-
|
|
1604
|
-
|
|
1891
|
+
<p class="route_content_nego_title">${title}:</p>
|
|
1892
|
+
<ul>
|
|
1893
|
+
${availableValues.map(
|
|
1894
|
+
(availableValue) => p$3`<li>${availableValue}</li>`,
|
|
1895
|
+
)}
|
|
1896
|
+
</ul>
|
|
1897
|
+
</div>`;
|
|
1605
1898
|
};
|
|
1606
1899
|
const RouteAcceptableContentSection = ({ acceptedMediaTypes }) => {
|
|
1607
1900
|
return p$3`<div class="route_accepted_content_type">
|
|
1608
|
-
|
|
1609
|
-
|
|
1610
|
-
|
|
1611
|
-
|
|
1612
|
-
|
|
1613
|
-
|
|
1614
|
-
|
|
1901
|
+
<p><strong>Accepted content types:</strong></p>
|
|
1902
|
+
<ul>
|
|
1903
|
+
${acceptedMediaTypes.map(
|
|
1904
|
+
(acceptedMediaType) => p$3`<li>${acceptedMediaType}</li>`,
|
|
1905
|
+
)}
|
|
1906
|
+
</ul>
|
|
1907
|
+
</div>`;
|
|
1615
1908
|
};
|
|
1616
1909
|
|
|
1617
1910
|
const RouteCodeExample = ({
|
|
@@ -1663,33 +1956,37 @@ const routesLoadingSignal = O(false);
|
|
|
1663
1956
|
}
|
|
1664
1957
|
|
|
1665
1958
|
return p$3`<code-block lang="js" data-escaped data-copy-button
|
|
1666
|
-
|
|
1667
|
-
|
|
1959
|
+
>${jsSource}</code-block
|
|
1960
|
+
>`;
|
|
1668
1961
|
};
|
|
1669
1962
|
|
|
1670
|
-
const ArrowDown = () => {
|
|
1963
|
+
const ArrowDown = ({ width = 24, height = 24 }) => {
|
|
1671
1964
|
return p$3`<svg
|
|
1672
|
-
|
|
1673
|
-
|
|
1674
|
-
|
|
1675
|
-
|
|
1676
|
-
|
|
1677
|
-
|
|
1678
|
-
|
|
1679
|
-
|
|
1680
|
-
</svg>`;
|
|
1965
|
+
viewBox="0 -960 960 960"
|
|
1966
|
+
width="${width}"
|
|
1967
|
+
height="${height}"
|
|
1968
|
+
fill="currentColor"
|
|
1969
|
+
xmlns="http://www.w3.org/2000/svg"
|
|
1970
|
+
>
|
|
1971
|
+
<path d="M480-345 240-585l56-56 184 184 184-184 56 56-240 240Z" />
|
|
1972
|
+
</svg>`;
|
|
1681
1973
|
};
|
|
1682
|
-
const
|
|
1974
|
+
const OpenLink = () => {
|
|
1683
1975
|
return p$3`<svg
|
|
1684
|
-
|
|
1685
|
-
|
|
1686
|
-
|
|
1687
|
-
|
|
1688
|
-
|
|
1689
|
-
|
|
1690
|
-
|
|
1691
|
-
|
|
1692
|
-
|
|
1976
|
+
xmlns="http://www.w3.org/2000/svg"
|
|
1977
|
+
viewBox="0 0 64 64"
|
|
1978
|
+
stroke-width="3"
|
|
1979
|
+
stroke="currentColor"
|
|
1980
|
+
fill="none"
|
|
1981
|
+
width="24"
|
|
1982
|
+
height="24"
|
|
1983
|
+
>
|
|
1984
|
+
<path
|
|
1985
|
+
d="M55.4,32V53.58a1.81,1.81,0,0,1-1.82,1.82H10.42A1.81,1.81,0,0,1,8.6,53.58V10.42A1.81,1.81,0,0,1,10.42,8.6H32"
|
|
1986
|
+
/>
|
|
1987
|
+
<polyline points="40.32 8.6 55.4 8.6 55.4 24.18" />
|
|
1988
|
+
<line x1="19.32" y1="45.72" x2="54.61" y2="8.91" />
|
|
1989
|
+
</svg>`;
|
|
1693
1990
|
};
|
|
1694
1991
|
|
|
1695
1992
|
de(p$3`<${Sidebar} />`, document.querySelector("aside"));
|