@jsenv/server 16.3.4 → 16.3.6
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 +2 -2
- package/dist/client/route_inspector/route_inspector.html +96 -90
- package/dist/formidable_index/formidable_index.js +2 -2
- package/dist/formidable_index/jsenv_server_node_modules.js +1 -1
- package/dist/jsenv_server.js +2 -3
- package/dist/ws/ws.js +19 -9
- package/package.json +6 -6
- package/src/services/default_body_4xx_5xx/client/4xx.html +14 -14
- package/src/services/route_inspector/client/code_block.js +58 -58
- package/src/services/route_inspector/client/route_inspector.html +127 -127
- package/src/services/route_inspector/jsenv_service_route_inspector.js +2 -3
|
@@ -30,16 +30,16 @@
|
|
|
30
30
|
}
|
|
31
31
|
|
|
32
32
|
.error_status_text {
|
|
33
|
-
word-break: break-word;
|
|
34
33
|
text-align: left;
|
|
34
|
+
word-break: break-word;
|
|
35
35
|
margin: 10px 0;
|
|
36
36
|
font-size: 1.5rem;
|
|
37
37
|
}
|
|
38
38
|
|
|
39
39
|
.error_message {
|
|
40
40
|
color: #555;
|
|
41
|
-
word-break: break-word;
|
|
42
41
|
text-align: left;
|
|
42
|
+
word-break: break-word;
|
|
43
43
|
font-size: 1rem;
|
|
44
44
|
}
|
|
45
45
|
|
|
@@ -16,43 +16,43 @@
|
|
|
16
16
|
*/
|
|
17
17
|
|
|
18
18
|
(() => {
|
|
19
|
-
const css = /*css*/ `
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
19
|
+
const css = /* css */ `
|
|
20
|
+
*[aria-hidden="true"] {
|
|
21
|
+
display: none;
|
|
22
|
+
}
|
|
23
23
|
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
24
|
+
.clipboard_container {
|
|
25
|
+
display: flex;
|
|
26
|
+
padding: 8px;
|
|
27
|
+
align-items: center;
|
|
28
|
+
gap: 5px;
|
|
29
|
+
}
|
|
30
30
|
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
31
|
+
#copied_notif {
|
|
32
|
+
padding: 0.2em 0.5em;
|
|
33
|
+
color: white;
|
|
34
|
+
font-size: 80%;
|
|
35
|
+
background: black;
|
|
36
|
+
border-radius: 3px;
|
|
37
|
+
}
|
|
38
38
|
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
39
|
+
button {
|
|
40
|
+
width: 32px;
|
|
41
|
+
height: 32px;
|
|
42
|
+
background: none;
|
|
43
|
+
background-color: rgb(246, 248, 250);
|
|
44
|
+
border: none;
|
|
45
|
+
border-width: 1px;
|
|
46
|
+
border-style: solid;
|
|
47
|
+
border-color: rgb(209, 217, 224);
|
|
48
|
+
border-radius: 6px;
|
|
49
|
+
cursor: pointer;
|
|
50
|
+
}
|
|
51
51
|
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
52
|
+
button:hover {
|
|
53
|
+
background-color: rgb(239, 242, 245);
|
|
54
|
+
}
|
|
55
|
+
`;
|
|
56
56
|
|
|
57
57
|
const html = /* html */ `<style>
|
|
58
58
|
${css}
|
|
@@ -134,27 +134,27 @@
|
|
|
134
134
|
})();
|
|
135
135
|
|
|
136
136
|
(() => {
|
|
137
|
-
const css = /*css*/ `
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
137
|
+
const css = /* css */ `
|
|
138
|
+
/* :host {
|
|
139
|
+
display: block;
|
|
140
|
+
}
|
|
141
|
+
:host code[class*="language-"], :host pre[class*="language-"]{
|
|
142
|
+
margin-top: 0;
|
|
143
|
+
} */
|
|
144
|
+
#code_block {
|
|
145
|
+
position: relative;
|
|
146
|
+
}
|
|
147
147
|
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
148
|
+
#pre {
|
|
149
|
+
margin-top: 16px;
|
|
150
|
+
margin-right: 0;
|
|
151
|
+
margin-bottom: 16px;
|
|
152
|
+
margin-left: 0;
|
|
153
|
+
padding: 16px;
|
|
154
|
+
font-size: 86%;
|
|
155
|
+
background: #333;
|
|
156
|
+
}
|
|
157
|
+
`;
|
|
158
158
|
|
|
159
159
|
const html = /* html */ `<style>
|
|
160
160
|
${css}
|
|
@@ -470,19 +470,21 @@ main {
|
|
|
470
470
|
}
|
|
471
471
|
|
|
472
472
|
.note_button_open {
|
|
473
|
-
|
|
473
|
+
height: 24px;
|
|
474
474
|
color: var(--text-color);
|
|
475
475
|
opacity: .7;
|
|
476
|
+
cursor: pointer;
|
|
476
477
|
background: none;
|
|
477
478
|
border: none;
|
|
478
479
|
border-radius: 50%;
|
|
479
|
-
height: 24px;
|
|
480
480
|
padding: 0;
|
|
481
481
|
transition: background-color .2s;
|
|
482
482
|
}
|
|
483
483
|
|
|
484
484
|
.note_button_open:hover {
|
|
485
|
-
background-color: color-mix(in srgb,
|
|
485
|
+
background-color: color-mix(in srgb,
|
|
486
|
+
var(--primary-color) 15%,
|
|
487
|
+
transparent);
|
|
486
488
|
opacity: 1;
|
|
487
489
|
}
|
|
488
490
|
|
|
@@ -530,9 +532,9 @@ main {
|
|
|
530
532
|
}
|
|
531
533
|
|
|
532
534
|
#theme-toggle-btn {
|
|
533
|
-
cursor: pointer;
|
|
534
535
|
background: none;
|
|
535
536
|
background-color: var(--secondary-color);
|
|
537
|
+
cursor: pointer;
|
|
536
538
|
border: none;
|
|
537
539
|
border-radius: 50%;
|
|
538
540
|
justify-content: center;
|
|
@@ -544,7 +546,9 @@ main {
|
|
|
544
546
|
}
|
|
545
547
|
|
|
546
548
|
#theme-toggle-btn:hover {
|
|
547
|
-
background-color: color-mix(in srgb,
|
|
549
|
+
background-color: color-mix(in srgb,
|
|
550
|
+
var(--primary-color) 15%,
|
|
551
|
+
transparent);
|
|
548
552
|
}
|
|
549
553
|
|
|
550
554
|
#theme-toggle-btn svg {
|
|
@@ -656,8 +660,8 @@ main {
|
|
|
656
660
|
}
|
|
657
661
|
|
|
658
662
|
.filters_sidebar {
|
|
659
|
-
border: 1px solid var(--border-color);
|
|
660
663
|
background: var(--secondary-color);
|
|
664
|
+
border: 1px solid var(--border-color);
|
|
661
665
|
border-radius: 6px;
|
|
662
666
|
flex-shrink: 0;
|
|
663
667
|
width: 250px;
|
|
@@ -679,8 +683,8 @@ main {
|
|
|
679
683
|
}
|
|
680
684
|
|
|
681
685
|
.filters_count {
|
|
682
|
-
background-color: var(--primary-color);
|
|
683
686
|
color: #fff;
|
|
687
|
+
background-color: var(--primary-color);
|
|
684
688
|
border-radius: 12px;
|
|
685
689
|
padding: 2px 8px;
|
|
686
690
|
font-size: .8rem;
|
|
@@ -714,8 +718,8 @@ main {
|
|
|
714
718
|
}
|
|
715
719
|
|
|
716
720
|
.route_group_details > summary {
|
|
717
|
-
cursor: pointer;
|
|
718
721
|
border-bottom: 1px solid var(--border-color);
|
|
722
|
+
cursor: pointer;
|
|
719
723
|
margin-bottom: 7px;
|
|
720
724
|
list-style: none;
|
|
721
725
|
}
|
|
@@ -759,9 +763,9 @@ main {
|
|
|
759
763
|
}
|
|
760
764
|
|
|
761
765
|
.route_details {
|
|
766
|
+
background: color-mix(in srgb, var(--method-color), transparent 90%);
|
|
762
767
|
border: 1px solid #000;
|
|
763
768
|
border-color: var(--method-color);
|
|
764
|
-
background: color-mix(in srgb, var(--method-color), transparent 90%);
|
|
765
769
|
border-radius: 4px;
|
|
766
770
|
margin: 0 0 15px;
|
|
767
771
|
box-shadow: 0 0 3px #00000030;
|
|
@@ -864,8 +868,8 @@ main {
|
|
|
864
868
|
}
|
|
865
869
|
|
|
866
870
|
.filter_container {
|
|
867
|
-
border-right: 1px solid var(--border-color);
|
|
868
871
|
background: var(--secondary-color);
|
|
872
|
+
border-right: 1px solid var(--border-color);
|
|
869
873
|
height: 100%;
|
|
870
874
|
margin-bottom: 20px;
|
|
871
875
|
overflow: hidden auto;
|
|
@@ -890,8 +894,8 @@ main {
|
|
|
890
894
|
}
|
|
891
895
|
|
|
892
896
|
.summary_text {
|
|
893
|
-
white-space: nowrap;
|
|
894
897
|
text-overflow: ellipsis;
|
|
898
|
+
white-space: nowrap;
|
|
895
899
|
width: 100%;
|
|
896
900
|
display: block;
|
|
897
901
|
overflow: hidden;
|
|
@@ -907,8 +911,8 @@ main {
|
|
|
907
911
|
}
|
|
908
912
|
|
|
909
913
|
.filter_badge {
|
|
910
|
-
background-color: var(--primary-color);
|
|
911
914
|
color: #fff;
|
|
915
|
+
background-color: var(--primary-color);
|
|
912
916
|
border-radius: 12px;
|
|
913
917
|
margin-left: 10px;
|
|
914
918
|
padding: 2px 8px;
|
|
@@ -916,10 +920,10 @@ main {
|
|
|
916
920
|
}
|
|
917
921
|
|
|
918
922
|
select {
|
|
919
|
-
border: 1px solid var(--border-color);
|
|
920
|
-
background-color: var(--background-color);
|
|
921
923
|
min-width: 200px;
|
|
922
924
|
color: var(--text-color);
|
|
925
|
+
background-color: var(--background-color);
|
|
926
|
+
border: 1px solid var(--border-color);
|
|
923
927
|
border-radius: 4px;
|
|
924
928
|
padding: 8px;
|
|
925
929
|
font-family: inherit;
|
|
@@ -930,8 +934,8 @@ select option {
|
|
|
930
934
|
}
|
|
931
935
|
|
|
932
936
|
select option:checked {
|
|
933
|
-
background-color: var(--primary-color);
|
|
934
937
|
color: #fff;
|
|
938
|
+
background-color: var(--primary-color);
|
|
935
939
|
}
|
|
936
940
|
|
|
937
941
|
.filter_form {
|
|
@@ -944,10 +948,10 @@ select option:checked {
|
|
|
944
948
|
}
|
|
945
949
|
|
|
946
950
|
.filter_form label {
|
|
947
|
-
cursor: pointer;
|
|
948
|
-
word-break: keep-all;
|
|
949
951
|
text-overflow: ellipsis;
|
|
950
952
|
white-space: nowrap;
|
|
953
|
+
word-break: keep-all;
|
|
954
|
+
cursor: pointer;
|
|
951
955
|
align-items: center;
|
|
952
956
|
gap: 5px;
|
|
953
957
|
width: 100%;
|
|
@@ -999,8 +1003,8 @@ label .filter_text {
|
|
|
999
1003
|
|
|
1000
1004
|
.filter_count {
|
|
1001
1005
|
color: #666;
|
|
1002
|
-
opacity: .8;
|
|
1003
1006
|
white-space: nowrap;
|
|
1007
|
+
opacity: .8;
|
|
1004
1008
|
background-color: #eee;
|
|
1005
1009
|
border-radius: 12px;
|
|
1006
1010
|
margin-left: auto;
|
|
@@ -1014,9 +1018,9 @@ label .filter_text {
|
|
|
1014
1018
|
}
|
|
1015
1019
|
|
|
1016
1020
|
.filter_button {
|
|
1021
|
+
color: var(--text-color);
|
|
1017
1022
|
background-color: var(--secondary-color);
|
|
1018
1023
|
border: 1px solid var(--border-color);
|
|
1019
|
-
color: var(--text-color);
|
|
1020
1024
|
cursor: pointer;
|
|
1021
1025
|
border-radius: 4px;
|
|
1022
1026
|
padding: 6px 12px;
|
|
@@ -1025,7 +1029,9 @@ label .filter_text {
|
|
|
1025
1029
|
}
|
|
1026
1030
|
|
|
1027
1031
|
.filter_button:hover {
|
|
1028
|
-
background-color: color-mix(in srgb,
|
|
1032
|
+
background-color: color-mix(in srgb,
|
|
1033
|
+
var(--primary-color) 15%,
|
|
1034
|
+
transparent);
|
|
1029
1035
|
}
|
|
1030
1036
|
|
|
1031
1037
|
.status_pill {
|
|
@@ -1125,30 +1131,30 @@ label .filter_text {
|
|
|
1125
1131
|
});
|
|
1126
1132
|
</script>
|
|
1127
1133
|
<script type="module">/* esm.sh - preact@10.23.1 */
|
|
1128
|
-
var M$2,h,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(_,l,i,n,null)}function U(_,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.vnode!=null&&h.vnode(r),r}function N$1(_){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.debounceRendering)&&((J=h.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.vnode&&h.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(null,n,null,null,null):I(n)?U(N$1,{children:n},null,null,null):n.constructor===void 0&&n.__b>0?U(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)==0&&(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)==0&&(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)==0)return t;if(i>(c!=null&&(131072&c.__u)==0?1:0))for(;l>=0||s<e.length;){if(l>=0){if((c=e[l])&&(131072&c.__u)==0&&n==c.key&&r===c.type)return l;l--;}if(s<e.length){if((c=e[s])&&(131072&c.__u)==0&&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.event?h.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.__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.__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$1&&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.__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.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.__c&&h.__c(e,_),_.some(function(n){try{_=n.__h,n.__h=[],_.some(function(r){r.call(n);});}catch(r){h.__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.__e(n,t);}}function V(_,e,t){var i,n;if(h.unmount&&h.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.__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.__&&h.__(_,e),n=(i="undefined"=="function")?null:e.__k,r=[],l=[],z$1(e,_=(e).__k=se(N$1,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={__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$1,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);
|
|
1134
|
+
var M$2,h$1,X,ie,x$1,J$1,Y,R,j$1,$,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$3(_,e){if(e==null)return _.__?C$3(_.__,_.__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$3(_):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$1.push(_)&&!H$1.__r++||J$1!==h$1.debounceRendering)&&((J$1=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$3(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$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)==0&&(r.__e==_.__d&&(_.__d=C$3(r)),V(r,r,false),t[l]=null,p--);if(p)for(i=0;i<u;i++)(r=t[i])!=null&&(131072&r.__u)==0&&(r.__e==_.__d&&(_.__d=C$3(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$3(_)),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)==0)return t;if(i>(c!=null&&(131072&c.__u)==0?1:0))for(;l>=0||s<e.length;){if(l>=0){if((c=e[l])&&(131072&c.__u)==0&&n==c.key&&r===c.type)return l;l--;}if(s<e.length){if((c=e[s])&&(131072&c.__u)==0&&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$2(_,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$1,_.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$1++;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$2(_,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$2(_,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$3(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$2(_,u,v,y[u],n),u="checked",g!==void 0&&g!==_[u]&&W$2(_,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$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$1=0,$=Q(false),O$1=Q(true);
|
|
1129
1135
|
|
|
1130
1136
|
/* esm.sh - htm@3.1.1 */
|
|
1131
|
-
var a$
|
|
1132
|
-
`||n==="\r"?(s(),u=2):g+=n),u===3&&g==="!--"&&(u=4,i=i[0]);}return s(),i}(p)),f),arguments,[])).length>1?f:f[0]}
|
|
1137
|
+
var a$1=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$1(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$1(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===`
|
|
1138
|
+
`||n==="\r"?(s(),u=2):g+=n),u===3&&g==="!--"&&(u=4,i=i[0]);}return s(),i})(p)),f),arguments,[])).length>1?f:f[0]}
|
|
1133
1139
|
|
|
1134
1140
|
/* esm.sh - htm@3.1.1/preact */
|
|
1135
1141
|
var p$3=b$2.bind(se);
|
|
1136
1142
|
|
|
1137
|
-
/* esm.sh - @preact/signals-core@1.
|
|
1138
|
-
var
|
|
1143
|
+
/* esm.sh - @preact/signals-core@1.14.0 */
|
|
1144
|
+
var C$2=Symbol.for("preact-signals");function y(){if(h>1)h--;else {var t,i=false;for((function(){var f=l$1;for(l$1=void 0;f!==void 0;)f.S.v===f.v&&(f.S.i=f.i),f=f.o;})();c$2!==void 0;){var o=c$2;for(c$2=void 0,d$1++;o!==void 0;){var r=o.u;if(o.u=void 0,o.f&=-3,!(8&o.f)&&g$1(o))try{o.c();}catch(f){i||(t=f,i=true);}o=r;}}if(d$1=0,h--,i)throw t}}var n=void 0;function w$1(t){var i=n;n=void 0;try{return t()}finally{n=i;}}var c$2=void 0,h=0,d$1=0,S$2=0,l$1=void 0,p$2=0;function b$1(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 s(t,i){this.v=t,this.i=0,this.n=void 0,this.t=void 0,this.l=0,this.W=i?.watched,this.Z=i?.unwatched,this.name=i?.name;}s.prototype.brand=C$2;s.prototype.h=function(){return true};s.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:w$1(function(){var r;(r=i.W)==null||r.call(i);}));};s.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&&w$1(function(){var f;(f=i.Z)==null||f.call(i);}));}};s.prototype.subscribe=function(t){var i=this;return W$1(function(){var o=i.value,r=n;n=void 0;try{t(o);}finally{n=r;}},{name:"sub"})};s.prototype.valueOf=function(){return this.value};s.prototype.toString=function(){return this.value+""};s.prototype.toJSON=function(){return this.value};s.prototype.peek=function(){var t=n;n=void 0;try{return this.value}finally{n=t;}};Object.defineProperty(s.prototype,"value",{get:function(){var t=b$1(this);return t!==void 0&&(t.i=this.i),this.v},set:function(t){if(t!==this.v){if(d$1>100)throw new Error("Cycle detected");((function(o){h!==0&&d$1===0&&o.l!==S$2&&(o.l=S$2,l$1={S:o,v:o.v,i:o.i,o:l$1});}))(this),this.v=t,this.i++,p$2++,h++;try{for(var i=this.t;i!==void 0;i=i.x)i.t.N();}finally{y();}}}});function P(t,i){return new s(t,i)}function g$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 E$1(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 O(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 v$1(t,i){s.call(this,void 0),this.x=t,this.s=void 0,this.g=p$2-1,this.f=4,this.W=i?.watched,this.Z=i?.unwatched,this.name=i?.name;}v$1.prototype=new s;v$1.prototype.h=function(){if(this.f&=-3,1&this.f)return false;if((36&this.f)==32||(this.f&=-5,this.g===p$2))return true;if(this.g=p$2,this.f|=1,this.i>0&&!g$1(this))return this.f&=-2,true;var t=n;try{E$1(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,O(this),this.f&=-2,true};v$1.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);}s.prototype.S.call(this,t);};v$1.prototype.U=function(t){if(this.t!==void 0&&(s.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);}};v$1.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(v$1.prototype,"value",{get:function(){if(1&this.f)throw new Error("Cycle detected");var t=b$1(this);if(this.h(),t!==void 0&&(t.i=this.i),16&this.f)throw this.v;return this.v}});function J(t,i){return new v$1(t,i)}function U(t){var i=t.m;if(t.m=void 0,typeof i=="function"){h++;var o=n;n=void 0;try{i();}catch(r){throw t.f&=-2,t.f|=8,m(t),r}finally{n=o,y();}}}function m(t){for(var i=t.s;i!==void 0;i=i.n)i.S.U(i);t.x=void 0,t.s=void 0,U(t);}function j(t){if(n!==this)throw new Error("Out-of-order effect");O(this),n=t,this.f&=-2,8&this.f&&m(this),y();}function u(t,i){this.x=t,this.m=void 0,this.s=void 0,this.u=void 0,this.f=32,this.name=i?.name;}u.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.m=i);}finally{t();}};u.prototype.S=function(){if(1&this.f)throw new Error("Cycle detected");this.f|=1,this.f&=-9,U(this),E$1(this),h++;var t=n;return n=this,j.bind(this,t)};u.prototype.N=function(){2&this.f||(this.f|=2,this.u=c$2,c$2=this);};u.prototype.d=function(){this.f|=8,1&this.f||m(this);};u.prototype.dispose=function(){this.d();};function W$1(t,i){var o=new u(t,i);try{o.c();}catch(f){throw o.d(),f}var r=o.d.bind(o);return r[Symbol.dispose]=r,r}
|
|
1139
1145
|
|
|
1140
1146
|
/* esm.sh - preact@10.23.1/hooks */
|
|
1141
|
-
var c$1,r,d,b,v=0,x=[],o=h,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]})}
|
|
1147
|
+
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]})}
|
|
1142
1148
|
|
|
1143
1149
|
/* esm.sh - @preact/signals@1.3.0 */
|
|
1144
|
-
var p;function a(e,n){h[e]=n.bind(null,h[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({}));},
|
|
1150
|
+
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({}));},J(function(){var f=i.value.value;return f===0?0:f===true?"":f||""})},[]);return u.value}S.displayName="_st";Object.defineProperties(s.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 s&&(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 W$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=P(t);return {o:function(f,o){r.value=f,i=o;},d:W$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 P(e)},[])}
|
|
1145
1151
|
|
|
1146
|
-
const routesLoadingSignal =
|
|
1147
|
-
const routeLoadingErrorSignal =
|
|
1148
|
-
const routesSignal =
|
|
1152
|
+
const routesLoadingSignal = P(false);
|
|
1153
|
+
const routeLoadingErrorSignal = P(null);
|
|
1154
|
+
const routesSignal = P([]);
|
|
1149
1155
|
const NO_PACKAGE_NAME = "unknown";
|
|
1150
1156
|
|
|
1151
|
-
const repartitionsSignal =
|
|
1157
|
+
const repartitionsSignal = J(() => {
|
|
1152
1158
|
const routes = routesSignal.value;
|
|
1153
1159
|
const methodRepartition = {};
|
|
1154
1160
|
const packageRepartition = {};
|
|
@@ -1170,16 +1176,16 @@ const routesLoadingSignal = N(false);
|
|
|
1170
1176
|
packageRepartition,
|
|
1171
1177
|
};
|
|
1172
1178
|
});
|
|
1173
|
-
const methodRepartitionSignal =
|
|
1179
|
+
const methodRepartitionSignal = J(() => {
|
|
1174
1180
|
return repartitionsSignal.value.methodRepartition;
|
|
1175
1181
|
});
|
|
1176
|
-
const packageRepartitionSignal =
|
|
1182
|
+
const packageRepartitionSignal = J(() => {
|
|
1177
1183
|
return repartitionsSignal.value.packageRepartition;
|
|
1178
1184
|
});
|
|
1179
|
-
const availableMethodNamesSignal =
|
|
1185
|
+
const availableMethodNamesSignal = J(() => {
|
|
1180
1186
|
return Object.keys(methodRepartitionSignal.value);
|
|
1181
1187
|
});
|
|
1182
|
-
const availablePackageNamesSignal =
|
|
1188
|
+
const availablePackageNamesSignal = J(() => {
|
|
1183
1189
|
return Object.keys(packageRepartitionSignal.value);
|
|
1184
1190
|
});
|
|
1185
1191
|
|
|
@@ -1328,7 +1334,7 @@ const routesLoadingSignal = N(false);
|
|
|
1328
1334
|
</div>`;
|
|
1329
1335
|
};
|
|
1330
1336
|
|
|
1331
|
-
const documentUrlSignal =
|
|
1337
|
+
const documentUrlSignal = P(window.location.href);
|
|
1332
1338
|
window.addEventListener("popstate", async (popstateEvent) => {
|
|
1333
1339
|
documentUrlSignal.value = popstateEvent.target.location.href;
|
|
1334
1340
|
});
|
|
@@ -1394,7 +1400,7 @@ const routesLoadingSignal = N(false);
|
|
|
1394
1400
|
if (existingSignal) {
|
|
1395
1401
|
return existingSignal;
|
|
1396
1402
|
}
|
|
1397
|
-
const signalForFirstCall =
|
|
1403
|
+
const signalForFirstCall = J(() => {
|
|
1398
1404
|
const url = documentUrlSignal.value;
|
|
1399
1405
|
const valueInUrl = getter(url);
|
|
1400
1406
|
return valueInUrl;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { IncomingForm } from "./jsenv_server_node_modules.js";
|
|
2
|
-
export { DummyParser, PersistentFile as File, JSONParser, MultipartParser, OctetStreamParser, OctetStreamParser as OctetstreamParser, PersistentFile, QuerystringParser as QueryStringParser, QuerystringParser, VolatileFile, DEFAULT_OPTIONS as defaultOptions, plugin
|
|
2
|
+
export { DummyParser, PersistentFile as File, JSONParser, MultipartParser, OctetStreamParser, OctetStreamParser as OctetstreamParser, PersistentFile, QuerystringParser as QueryStringParser, QuerystringParser, VolatileFile, DEFAULT_OPTIONS as defaultOptions, plugin as json, plugin$1 as multipart, plugin$2 as octetstream, plugin$3 as querystring } from "./jsenv_server_node_modules.js";
|
|
3
3
|
import "node:domain";
|
|
4
4
|
import "node:events";
|
|
5
5
|
import "node:fs/promises";
|
|
@@ -14,4 +14,4 @@ import "node:stream";
|
|
|
14
14
|
// if you want it access `const formidable.IncomingForm` as v1
|
|
15
15
|
const formidable = (...args) => new IncomingForm(...args);
|
|
16
16
|
|
|
17
|
-
export { IncomingForm as Formidable, IncomingForm, formidable
|
|
17
|
+
export { IncomingForm as Formidable, IncomingForm, formidable };
|
|
@@ -2846,4 +2846,4 @@ class IncomingForm extends EventEmitter {
|
|
|
2846
2846
|
}
|
|
2847
2847
|
}
|
|
2848
2848
|
|
|
2849
|
-
export { DEFAULT_OPTIONS, DummyParser, IncomingForm, JSONParser, MultipartParser$1 as MultipartParser, OctetStreamParser, PersistentFile, QuerystringParser, VolatileFile, plugin
|
|
2849
|
+
export { DEFAULT_OPTIONS, DummyParser, IncomingForm, JSONParser, MultipartParser$1 as MultipartParser, OctetStreamParser, PersistentFile, QuerystringParser, VolatileFile, plugin, plugin$1, plugin$3 as plugin$2, plugin$2 as plugin$3 };
|
package/dist/jsenv_server.js
CHANGED
|
@@ -6325,9 +6325,8 @@ const jsenvServiceOpenFile = () => {
|
|
|
6325
6325
|
};
|
|
6326
6326
|
};
|
|
6327
6327
|
|
|
6328
|
-
const routeInspectorHtmlFileUrl = import.meta
|
|
6329
|
-
"./client/route_inspector/route_inspector.html"
|
|
6330
|
-
);
|
|
6328
|
+
const routeInspectorHtmlFileUrl = import.meta
|
|
6329
|
+
.resolve("./client/route_inspector/route_inspector.html");
|
|
6331
6330
|
|
|
6332
6331
|
const jsenvServiceRouteInspector = () => {
|
|
6333
6332
|
return {
|
package/dist/ws/ws.js
CHANGED
|
@@ -29,6 +29,7 @@ function requireConstants () {
|
|
|
29
29
|
|
|
30
30
|
constants = {
|
|
31
31
|
BINARY_TYPES,
|
|
32
|
+
CLOSE_TIMEOUT: 30000,
|
|
32
33
|
EMPTY_BUFFER: Buffer.alloc(0),
|
|
33
34
|
GUID: '258EAFA5-E914-47DA-95CA-C5AB0DC85B11',
|
|
34
35
|
hasBlob,
|
|
@@ -2799,6 +2800,7 @@ function requireWebsocket () {
|
|
|
2799
2800
|
|
|
2800
2801
|
const {
|
|
2801
2802
|
BINARY_TYPES,
|
|
2803
|
+
CLOSE_TIMEOUT,
|
|
2802
2804
|
EMPTY_BUFFER,
|
|
2803
2805
|
GUID,
|
|
2804
2806
|
kForOnEventAttribute,
|
|
@@ -2813,7 +2815,6 @@ function requireWebsocket () {
|
|
|
2813
2815
|
const { format, parse } = requireExtension();
|
|
2814
2816
|
const { toBuffer } = requireBufferUtil();
|
|
2815
2817
|
|
|
2816
|
-
const closeTimeout = 30 * 1000;
|
|
2817
2818
|
const kAborted = Symbol('kAborted');
|
|
2818
2819
|
const protocolVersions = [8, 13];
|
|
2819
2820
|
const readyStates = ['CONNECTING', 'OPEN', 'CLOSING', 'CLOSED'];
|
|
@@ -2869,6 +2870,7 @@ function requireWebsocket () {
|
|
|
2869
2870
|
initAsClient(this, address, protocols, options);
|
|
2870
2871
|
} else {
|
|
2871
2872
|
this._autoPong = options.autoPong;
|
|
2873
|
+
this._closeTimeout = options.closeTimeout;
|
|
2872
2874
|
this._isServer = true;
|
|
2873
2875
|
}
|
|
2874
2876
|
}
|
|
@@ -3410,6 +3412,8 @@ function requireWebsocket () {
|
|
|
3410
3412
|
* times in the same tick
|
|
3411
3413
|
* @param {Boolean} [options.autoPong=true] Specifies whether or not to
|
|
3412
3414
|
* automatically send a pong in response to a ping
|
|
3415
|
+
* @param {Number} [options.closeTimeout=30000] Duration in milliseconds to wait
|
|
3416
|
+
* for the closing handshake to finish after `websocket.close()` is called
|
|
3413
3417
|
* @param {Function} [options.finishRequest] A function which can be used to
|
|
3414
3418
|
* customize the headers of each http request before it is sent
|
|
3415
3419
|
* @param {Boolean} [options.followRedirects=false] Whether or not to follow
|
|
@@ -3436,6 +3440,7 @@ function requireWebsocket () {
|
|
|
3436
3440
|
const opts = {
|
|
3437
3441
|
allowSynchronousEvents: true,
|
|
3438
3442
|
autoPong: true,
|
|
3443
|
+
closeTimeout: CLOSE_TIMEOUT,
|
|
3439
3444
|
protocolVersion: protocolVersions[1],
|
|
3440
3445
|
maxPayload: 100 * 1024 * 1024,
|
|
3441
3446
|
skipUTF8Validation: false,
|
|
@@ -3454,6 +3459,7 @@ function requireWebsocket () {
|
|
|
3454
3459
|
};
|
|
3455
3460
|
|
|
3456
3461
|
websocket._autoPong = opts.autoPong;
|
|
3462
|
+
websocket._closeTimeout = opts.closeTimeout;
|
|
3457
3463
|
|
|
3458
3464
|
if (!protocolVersions.includes(opts.protocolVersion)) {
|
|
3459
3465
|
throw new RangeError(
|
|
@@ -4071,7 +4077,7 @@ function requireWebsocket () {
|
|
|
4071
4077
|
function setCloseTimer(websocket) {
|
|
4072
4078
|
websocket._closeTimer = setTimeout(
|
|
4073
4079
|
websocket._socket.destroy.bind(websocket._socket),
|
|
4074
|
-
|
|
4080
|
+
websocket._closeTimeout
|
|
4075
4081
|
);
|
|
4076
4082
|
}
|
|
4077
4083
|
|
|
@@ -4089,23 +4095,23 @@ function requireWebsocket () {
|
|
|
4089
4095
|
|
|
4090
4096
|
websocket._readyState = WebSocket.CLOSING;
|
|
4091
4097
|
|
|
4092
|
-
let chunk;
|
|
4093
|
-
|
|
4094
4098
|
//
|
|
4095
4099
|
// The close frame might not have been received or the `'end'` event emitted,
|
|
4096
4100
|
// for example, if the socket was destroyed due to an error. Ensure that the
|
|
4097
4101
|
// `receiver` stream is closed after writing any remaining buffered data to
|
|
4098
4102
|
// it. If the readable side of the socket is in flowing mode then there is no
|
|
4099
|
-
// buffered data as everything has been already written
|
|
4100
|
-
//
|
|
4101
|
-
//
|
|
4103
|
+
// buffered data as everything has been already written. If instead, the
|
|
4104
|
+
// socket is paused, any possible buffered data will be read as a single
|
|
4105
|
+
// chunk.
|
|
4102
4106
|
//
|
|
4103
4107
|
if (
|
|
4104
4108
|
!this._readableState.endEmitted &&
|
|
4105
4109
|
!websocket._closeFrameReceived &&
|
|
4106
4110
|
!websocket._receiver._writableState.errorEmitted &&
|
|
4107
|
-
|
|
4111
|
+
this._readableState.length !== 0
|
|
4108
4112
|
) {
|
|
4113
|
+
const chunk = this.read(this._readableState.length);
|
|
4114
|
+
|
|
4109
4115
|
websocket._receiver.write(chunk);
|
|
4110
4116
|
}
|
|
4111
4117
|
|
|
@@ -4436,7 +4442,7 @@ function requireWebsocketServer () {
|
|
|
4436
4442
|
const PerMessageDeflate = requirePermessageDeflate();
|
|
4437
4443
|
const subprotocol = requireSubprotocol();
|
|
4438
4444
|
const WebSocket = requireWebsocket();
|
|
4439
|
-
const { GUID, kWebSocket } = requireConstants();
|
|
4445
|
+
const { CLOSE_TIMEOUT, GUID, kWebSocket } = requireConstants();
|
|
4440
4446
|
|
|
4441
4447
|
const keyRegex = /^[+/0-9A-Za-z]{22}==$/;
|
|
4442
4448
|
|
|
@@ -4463,6 +4469,9 @@ function requireWebsocketServer () {
|
|
|
4463
4469
|
* pending connections
|
|
4464
4470
|
* @param {Boolean} [options.clientTracking=true] Specifies whether or not to
|
|
4465
4471
|
* track clients
|
|
4472
|
+
* @param {Number} [options.closeTimeout=30000] Duration in milliseconds to
|
|
4473
|
+
* wait for the closing handshake to finish after `websocket.close()` is
|
|
4474
|
+
* called
|
|
4466
4475
|
* @param {Function} [options.handleProtocols] A hook to handle protocols
|
|
4467
4476
|
* @param {String} [options.host] The hostname where to bind the server
|
|
4468
4477
|
* @param {Number} [options.maxPayload=104857600] The maximum allowed message
|
|
@@ -4492,6 +4501,7 @@ function requireWebsocketServer () {
|
|
|
4492
4501
|
perMessageDeflate: false,
|
|
4493
4502
|
handleProtocols: null,
|
|
4494
4503
|
clientTracking: true,
|
|
4504
|
+
closeTimeout: CLOSE_TIMEOUT,
|
|
4495
4505
|
verifyClient: null,
|
|
4496
4506
|
noServer: false,
|
|
4497
4507
|
backlog: null, // use default (511 as implemented in net.js)
|