ripple 0.3.11 → 0.3.13

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.
Files changed (190) hide show
  1. package/CHANGELOG.md +43 -0
  2. package/package.json +8 -2
  3. package/src/compiler/phases/1-parse/index.js +73 -30
  4. package/src/compiler/phases/2-analyze/index.js +28 -58
  5. package/src/compiler/phases/3-transform/client/index.js +127 -164
  6. package/src/compiler/phases/3-transform/segments.js +4 -8
  7. package/src/compiler/phases/3-transform/server/index.js +210 -360
  8. package/src/compiler/types/import.d.ts +0 -12
  9. package/src/compiler/types/index.d.ts +12 -5
  10. package/src/compiler/types/parse.d.ts +2 -0
  11. package/src/compiler/utils.js +39 -44
  12. package/src/helpers.d.ts +2 -0
  13. package/src/runtime/index-client.js +15 -13
  14. package/src/runtime/index-server.js +18 -11
  15. package/src/runtime/internal/client/blocks.js +19 -23
  16. package/src/runtime/internal/client/constants.js +20 -9
  17. package/src/runtime/internal/client/index.js +14 -4
  18. package/src/runtime/internal/client/runtime.js +435 -173
  19. package/src/runtime/internal/client/try.js +334 -156
  20. package/src/runtime/internal/client/types.d.ts +26 -0
  21. package/src/runtime/internal/server/blocks.js +183 -0
  22. package/src/runtime/internal/server/constants.js +7 -0
  23. package/src/runtime/internal/server/index.js +780 -148
  24. package/src/runtime/internal/server/types.d.ts +35 -0
  25. package/src/server/index.js +1 -1
  26. package/src/utils/async.js +35 -0
  27. package/src/utils/builders.js +3 -1
  28. package/tests/client/__snapshots__/computed-properties.test.rsrx.snap +49 -0
  29. package/tests/client/__snapshots__/for.test.rsrx.snap +319 -0
  30. package/tests/client/__snapshots__/html.test.rsrx.snap +40 -0
  31. package/tests/client/_etc.test.rsrx +7 -0
  32. package/tests/client/array/{array.static.test.ripple → array.static.test.rsrx} +18 -20
  33. package/tests/client/async-suspend.test.rsrx +662 -0
  34. package/tests/client/basic/__snapshots__/basic.attributes.test.rsrx.snap +60 -0
  35. package/tests/client/basic/__snapshots__/basic.rendering.test.rsrx.snap +59 -0
  36. package/tests/client/basic/{basic.errors.test.ripple → basic.errors.test.rsrx} +2 -2
  37. package/tests/client/compiler/__snapshots__/compiler.assignments.test.rsrx.snap +12 -0
  38. package/tests/client/compiler/__snapshots__/compiler.typescript.test.rsrx.snap +46 -0
  39. package/tests/client/compiler/{compiler.try-in-function.test.ripple → compiler.try-in-function.test.rsrx} +8 -6
  40. package/tests/client/composite/__snapshots__/composite.render.test.rsrx.snap +37 -0
  41. package/tests/client/{function-overload.test.ripple → function-overload.test.rsrx} +1 -1
  42. package/tests/client/try.test.rsrx +1702 -0
  43. package/tests/hydration/build-components.js +5 -3
  44. package/tests/hydration/compiled/client/head.js +11 -11
  45. package/tests/hydration/compiled/client/mixed-control-flow.js +55 -70
  46. package/tests/hydration/compiled/client/nested-control-flow.js +72 -88
  47. package/tests/hydration/compiled/client/try.js +42 -54
  48. package/tests/hydration/compiled/server/basic.js +491 -369
  49. package/tests/hydration/compiled/server/composite.js +153 -128
  50. package/tests/hydration/compiled/server/events.js +166 -145
  51. package/tests/hydration/compiled/server/for.js +821 -677
  52. package/tests/hydration/compiled/server/head.js +200 -165
  53. package/tests/hydration/compiled/server/hmr.js +62 -54
  54. package/tests/hydration/compiled/server/html-in-template.js +64 -55
  55. package/tests/hydration/compiled/server/html.js +1477 -1360
  56. package/tests/hydration/compiled/server/if-children.js +448 -408
  57. package/tests/hydration/compiled/server/if.js +204 -171
  58. package/tests/hydration/compiled/server/mixed-control-flow.js +237 -195
  59. package/tests/hydration/compiled/server/nested-control-flow.js +533 -467
  60. package/tests/hydration/compiled/server/portal.js +94 -107
  61. package/tests/hydration/compiled/server/reactivity.js +87 -64
  62. package/tests/hydration/compiled/server/return.js +1424 -1174
  63. package/tests/hydration/compiled/server/switch.js +268 -238
  64. package/tests/hydration/compiled/server/try.js +98 -87
  65. package/tests/hydration/components/{mixed-control-flow.ripple → mixed-control-flow.rsrx} +2 -2
  66. package/tests/hydration/components/{try.ripple → try.rsrx} +4 -2
  67. package/tests/hydration/mixed-control-flow.test.js +14 -0
  68. package/tests/hydration/nested-control-flow.test.js +50 -48
  69. package/tests/hydration/try.test.js +25 -0
  70. package/tests/server/__snapshots__/compiler.test.ripple.snap +0 -32
  71. package/tests/server/__snapshots__/compiler.test.rsrx.snap +95 -0
  72. package/tests/server/{compiler.test.ripple → compiler.test.rsrx} +0 -17
  73. package/tests/server/{html-nesting-validation.test.ripple → html-nesting-validation.test.rsrx} +3 -3
  74. package/tests/server/streaming-ssr.test.rsrx +115 -0
  75. package/tests/server/try.test.rsrx +503 -0
  76. package/tests/utils/compiler-compat-config.test.js +3 -3
  77. package/tests/utils/vite-plugin-config.test.js +1 -1
  78. package/tests/utils/vite-plugin-hmr.test.js +5 -5
  79. package/tsconfig.json +4 -0
  80. package/types/index.d.ts +13 -23
  81. package/types/server.d.ts +43 -16
  82. package/tests/client/_etc.test.ripple +0 -5
  83. package/tests/client/async-suspend.test.ripple +0 -94
  84. package/tests/client/try.test.ripple +0 -196
  85. package/tests/server/streaming-ssr.test.ripple +0 -68
  86. package/tests/server/try.test.ripple +0 -82
  87. /package/tests/client/array/{array.copy-within.test.ripple → array.copy-within.test.rsrx} +0 -0
  88. /package/tests/client/array/{array.derived.test.ripple → array.derived.test.rsrx} +0 -0
  89. /package/tests/client/array/{array.iteration.test.ripple → array.iteration.test.rsrx} +0 -0
  90. /package/tests/client/array/{array.mutations.test.ripple → array.mutations.test.rsrx} +0 -0
  91. /package/tests/client/array/{array.to-methods.test.ripple → array.to-methods.test.rsrx} +0 -0
  92. /package/tests/client/basic/{basic.attributes.test.ripple → basic.attributes.test.rsrx} +0 -0
  93. /package/tests/client/basic/{basic.collections.test.ripple → basic.collections.test.rsrx} +0 -0
  94. /package/tests/client/basic/{basic.components.test.ripple → basic.components.test.rsrx} +0 -0
  95. /package/tests/client/basic/{basic.events.test.ripple → basic.events.test.rsrx} +0 -0
  96. /package/tests/client/basic/{basic.get-set.test.ripple → basic.get-set.test.rsrx} +0 -0
  97. /package/tests/client/basic/{basic.hmr.test.ripple → basic.hmr.test.rsrx} +0 -0
  98. /package/tests/client/basic/{basic.reactivity.test.ripple → basic.reactivity.test.rsrx} +0 -0
  99. /package/tests/client/basic/{basic.rendering.test.ripple → basic.rendering.test.rsrx} +0 -0
  100. /package/tests/client/basic/{basic.styling.test.ripple → basic.styling.test.rsrx} +0 -0
  101. /package/tests/client/basic/{basic.utilities.test.ripple → basic.utilities.test.rsrx} +0 -0
  102. /package/tests/client/{boundaries.test.ripple → boundaries.test.rsrx} +0 -0
  103. /package/tests/client/compiler/{compiler.assignments.test.ripple → compiler.assignments.test.rsrx} +0 -0
  104. /package/tests/client/compiler/{compiler.attributes.test.ripple → compiler.attributes.test.rsrx} +0 -0
  105. /package/tests/client/compiler/{compiler.basic.test.ripple → compiler.basic.test.rsrx} +0 -0
  106. /package/tests/client/compiler/{compiler.regex.test.ripple → compiler.regex.test.rsrx} +0 -0
  107. /package/tests/client/compiler/{compiler.tracked-access.test.ripple → compiler.tracked-access.test.rsrx} +0 -0
  108. /package/tests/client/compiler/{compiler.typescript.test.ripple → compiler.typescript.test.rsrx} +0 -0
  109. /package/tests/client/composite/{composite.dynamic-components.test.ripple → composite.dynamic-components.test.rsrx} +0 -0
  110. /package/tests/client/composite/{composite.generics.test.ripple → composite.generics.test.rsrx} +0 -0
  111. /package/tests/client/composite/{composite.props.test.ripple → composite.props.test.rsrx} +0 -0
  112. /package/tests/client/composite/{composite.reactivity.test.ripple → composite.reactivity.test.rsrx} +0 -0
  113. /package/tests/client/composite/{composite.render.test.ripple → composite.render.test.rsrx} +0 -0
  114. /package/tests/client/{computed-properties.test.ripple → computed-properties.test.rsrx} +0 -0
  115. /package/tests/client/{context.test.ripple → context.test.rsrx} +0 -0
  116. /package/tests/client/css/{global-additional-cases.test.ripple → global-additional-cases.test.rsrx} +0 -0
  117. /package/tests/client/css/{global-advanced-selectors.test.ripple → global-advanced-selectors.test.rsrx} +0 -0
  118. /package/tests/client/css/{global-at-rules.test.ripple → global-at-rules.test.rsrx} +0 -0
  119. /package/tests/client/css/{global-basic.test.ripple → global-basic.test.rsrx} +0 -0
  120. /package/tests/client/css/{global-classes-ids.test.ripple → global-classes-ids.test.rsrx} +0 -0
  121. /package/tests/client/css/{global-combinators.test.ripple → global-combinators.test.rsrx} +0 -0
  122. /package/tests/client/css/{global-complex-nesting.test.ripple → global-complex-nesting.test.rsrx} +0 -0
  123. /package/tests/client/css/{global-edge-cases.test.ripple → global-edge-cases.test.rsrx} +0 -0
  124. /package/tests/client/css/{global-keyframes.test.ripple → global-keyframes.test.rsrx} +0 -0
  125. /package/tests/client/css/{global-nested.test.ripple → global-nested.test.rsrx} +0 -0
  126. /package/tests/client/css/{global-pseudo.test.ripple → global-pseudo.test.rsrx} +0 -0
  127. /package/tests/client/css/{global-scoping.test.ripple → global-scoping.test.rsrx} +0 -0
  128. /package/tests/client/css/{style-identifier.test.ripple → style-identifier.test.rsrx} +0 -0
  129. /package/tests/client/{date.test.ripple → date.test.rsrx} +0 -0
  130. /package/tests/client/{dynamic-elements.test.ripple → dynamic-elements.test.rsrx} +0 -0
  131. /package/tests/client/{events.test.ripple → events.test.rsrx} +0 -0
  132. /package/tests/client/{for.test.ripple → for.test.rsrx} +0 -0
  133. /package/tests/client/{function-overload-import.ripple → function-overload-import.rsrx} +0 -0
  134. /package/tests/client/{head.test.ripple → head.test.rsrx} +0 -0
  135. /package/tests/client/{html.test.ripple → html.test.rsrx} +0 -0
  136. /package/tests/client/{input-value.test.ripple → input-value.test.rsrx} +0 -0
  137. /package/tests/client/{lazy-destructuring.test.ripple → lazy-destructuring.test.rsrx} +0 -0
  138. /package/tests/client/{map.test.ripple → map.test.rsrx} +0 -0
  139. /package/tests/client/{media-query.test.ripple → media-query.test.rsrx} +0 -0
  140. /package/tests/client/{object.test.ripple → object.test.rsrx} +0 -0
  141. /package/tests/client/{portal.test.ripple → portal.test.rsrx} +0 -0
  142. /package/tests/client/{ref.test.ripple → ref.test.rsrx} +0 -0
  143. /package/tests/client/{return.test.ripple → return.test.rsrx} +0 -0
  144. /package/tests/client/{set.test.ripple → set.test.rsrx} +0 -0
  145. /package/tests/client/{svg.test.ripple → svg.test.rsrx} +0 -0
  146. /package/tests/client/{switch.test.ripple → switch.test.rsrx} +0 -0
  147. /package/tests/client/{tsx.test.ripple → tsx.test.rsrx} +0 -0
  148. /package/tests/client/{typescript-generics.test.ripple → typescript-generics.test.rsrx} +0 -0
  149. /package/tests/client/url/{url.derived.test.ripple → url.derived.test.rsrx} +0 -0
  150. /package/tests/client/url/{url.parsing.test.ripple → url.parsing.test.rsrx} +0 -0
  151. /package/tests/client/url/{url.partial-removal.test.ripple → url.partial-removal.test.rsrx} +0 -0
  152. /package/tests/client/url/{url.reactivity.test.ripple → url.reactivity.test.rsrx} +0 -0
  153. /package/tests/client/url/{url.serialization.test.ripple → url.serialization.test.rsrx} +0 -0
  154. /package/tests/client/url-search-params/{url-search-params.derived.test.ripple → url-search-params.derived.test.rsrx} +0 -0
  155. /package/tests/client/url-search-params/{url-search-params.initialization.test.ripple → url-search-params.initialization.test.rsrx} +0 -0
  156. /package/tests/client/url-search-params/{url-search-params.iteration.test.ripple → url-search-params.iteration.test.rsrx} +0 -0
  157. /package/tests/client/url-search-params/{url-search-params.mutation.test.ripple → url-search-params.mutation.test.rsrx} +0 -0
  158. /package/tests/client/url-search-params/{url-search-params.retrieval.test.ripple → url-search-params.retrieval.test.rsrx} +0 -0
  159. /package/tests/client/url-search-params/{url-search-params.serialization.test.ripple → url-search-params.serialization.test.rsrx} +0 -0
  160. /package/tests/client/url-search-params/{url-search-params.tracked-url.test.ripple → url-search-params.tracked-url.test.rsrx} +0 -0
  161. /package/tests/hydration/components/{basic.ripple → basic.rsrx} +0 -0
  162. /package/tests/hydration/components/{composite.ripple → composite.rsrx} +0 -0
  163. /package/tests/hydration/components/{events.ripple → events.rsrx} +0 -0
  164. /package/tests/hydration/components/{for.ripple → for.rsrx} +0 -0
  165. /package/tests/hydration/components/{head.ripple → head.rsrx} +0 -0
  166. /package/tests/hydration/components/{hmr.ripple → hmr.rsrx} +0 -0
  167. /package/tests/hydration/components/{html-in-template.ripple → html-in-template.rsrx} +0 -0
  168. /package/tests/hydration/components/{html.ripple → html.rsrx} +0 -0
  169. /package/tests/hydration/components/{if-children.ripple → if-children.rsrx} +0 -0
  170. /package/tests/hydration/components/{if.ripple → if.rsrx} +0 -0
  171. /package/tests/hydration/components/{nested-control-flow.ripple → nested-control-flow.rsrx} +0 -0
  172. /package/tests/hydration/components/{portal.ripple → portal.rsrx} +0 -0
  173. /package/tests/hydration/components/{reactivity.ripple → reactivity.rsrx} +0 -0
  174. /package/tests/hydration/components/{return.ripple → return.rsrx} +0 -0
  175. /package/tests/hydration/components/{switch.ripple → switch.rsrx} +0 -0
  176. /package/tests/server/{await.test.ripple → await.test.rsrx} +0 -0
  177. /package/tests/server/{basic.attributes.test.ripple → basic.attributes.test.rsrx} +0 -0
  178. /package/tests/server/{basic.components.test.ripple → basic.components.test.rsrx} +0 -0
  179. /package/tests/server/{basic.test.ripple → basic.test.rsrx} +0 -0
  180. /package/tests/server/{composite.props.test.ripple → composite.props.test.rsrx} +0 -0
  181. /package/tests/server/{composite.test.ripple → composite.test.rsrx} +0 -0
  182. /package/tests/server/{context.test.ripple → context.test.rsrx} +0 -0
  183. /package/tests/server/{dynamic-elements.test.ripple → dynamic-elements.test.rsrx} +0 -0
  184. /package/tests/server/{for.test.ripple → for.test.rsrx} +0 -0
  185. /package/tests/server/{head.test.ripple → head.test.rsrx} +0 -0
  186. /package/tests/server/{if.test.ripple → if.test.rsrx} +0 -0
  187. /package/tests/server/{lazy-destructuring.test.ripple → lazy-destructuring.test.rsrx} +0 -0
  188. /package/tests/server/{return.test.ripple → return.test.rsrx} +0 -0
  189. /package/tests/server/{style-identifier.test.ripple → style-identifier.test.rsrx} +0 -0
  190. /package/tests/server/{switch.test.ripple → switch.test.rsrx} +0 -0
@@ -1,7 +1,7 @@
1
1
  // @ts-nocheck
2
2
  import * as _$_ from 'ripple/internal/server';
3
3
 
4
- export function ForIf(__output) {
4
+ export function ForIf() {
5
5
  _$_.push_component();
6
6
 
7
7
  const items = [
@@ -10,39 +10,42 @@ export function ForIf(__output) {
10
10
  { id: 3, show: false, label: 'Three' }
11
11
  ];
12
12
 
13
- __output.push('<ul');
14
- __output.push(' class="for-if"');
15
- __output.push('>');
13
+ _$_.regular_block(() => {
14
+ _$_.output_push('<ul');
15
+ _$_.output_push(' class="for-if"');
16
+ _$_.output_push('>');
16
17
 
17
- {
18
- __output.push('<!--[-->');
18
+ {
19
+ _$_.output_push('<!--[-->');
19
20
 
20
- for (const item of items) {
21
- __output.push('<!--[-->');
21
+ for (const item of items) {
22
+ _$_.output_push('<!--[-->');
22
23
 
23
- if (item.show) {
24
- __output.push('<li');
25
- __output.push(_$_.attr('class', `item item-${item.id}`));
26
- __output.push('>');
24
+ if (item.show) {
25
+ _$_.output_push('<li');
26
+ _$_.output_push(_$_.attr('class', `item item-${item.id}`));
27
+ _$_.output_push('>');
27
28
 
28
- {
29
- __output.push(_$_.escape(item.label));
29
+ {
30
+ _$_.output_push(_$_.escape(item.label));
31
+ }
32
+
33
+ _$_.output_push('</li>');
30
34
  }
31
35
 
32
- __output.push('</li>');
36
+ _$_.output_push('<!--]-->');
33
37
  }
34
38
 
35
- __output.push('<!--]-->');
39
+ _$_.output_push('<!--]-->');
36
40
  }
37
41
 
38
- __output.push('<!--]-->');
39
- }
42
+ _$_.output_push('</ul>');
43
+ });
40
44
 
41
- __output.push('</ul>');
42
45
  _$_.pop_component();
43
46
  }
44
47
 
45
- export function ForSwitch(__output) {
48
+ export function ForSwitch() {
46
49
  _$_.push_component();
47
50
 
48
51
  const items = [
@@ -51,203 +54,215 @@ export function ForSwitch(__output) {
51
54
  { id: 3, kind: 'a' }
52
55
  ];
53
56
 
54
- __output.push('<ul');
55
- __output.push(' class="for-switch"');
56
- __output.push('>');
57
+ _$_.regular_block(() => {
58
+ _$_.output_push('<ul');
59
+ _$_.output_push(' class="for-switch"');
60
+ _$_.output_push('>');
57
61
 
58
- {
59
- __output.push('<!--[-->');
62
+ {
63
+ _$_.output_push('<!--[-->');
60
64
 
61
- for (const item of items) {
62
- __output.push('<!--[-->');
65
+ for (const item of items) {
66
+ _$_.output_push('<!--[-->');
63
67
 
64
- switch (item.kind) {
65
- case 'a':
66
- __output.push('<li');
67
- __output.push(_$_.attr('class', `item item-${item.id} kind-a`));
68
- __output.push('>');
69
- {
70
- __output.push(_$_.escape(`A-${item.id}`));
71
- }
72
- __output.push('</li>');
73
- break;
68
+ switch (item.kind) {
69
+ case 'a':
70
+ _$_.output_push('<li');
71
+ _$_.output_push(_$_.attr('class', `item item-${item.id} kind-a`));
72
+ _$_.output_push('>');
73
+ {
74
+ _$_.output_push(_$_.escape(`A-${item.id}`));
75
+ }
76
+ _$_.output_push('</li>');
77
+ break;
74
78
 
75
- default:
76
- __output.push('<li');
77
- __output.push(_$_.attr('class', `item item-${item.id} kind-b`));
78
- __output.push('>');
79
- {
80
- __output.push(_$_.escape(`B-${item.id}`));
81
- }
82
- __output.push('</li>');
79
+ default:
80
+ _$_.output_push('<li');
81
+ _$_.output_push(_$_.attr('class', `item item-${item.id} kind-b`));
82
+ _$_.output_push('>');
83
+ {
84
+ _$_.output_push(_$_.escape(`B-${item.id}`));
85
+ }
86
+ _$_.output_push('</li>');
87
+ }
88
+
89
+ _$_.output_push('<!--]-->');
83
90
  }
84
91
 
85
- __output.push('<!--]-->');
92
+ _$_.output_push('<!--]-->');
86
93
  }
87
94
 
88
- __output.push('<!--]-->');
89
- }
95
+ _$_.output_push('</ul>');
96
+ });
90
97
 
91
- __output.push('</ul>');
92
98
  _$_.pop_component();
93
99
  }
94
100
 
95
- export function IfSwitch(__output) {
101
+ export function IfSwitch() {
96
102
  _$_.push_component();
97
103
 
98
104
  const show = true;
99
105
  const kind = 'a';
100
106
 
101
- __output.push('<div');
102
- __output.push(' class="if-switch"');
103
- __output.push('>');
107
+ _$_.regular_block(() => {
108
+ _$_.output_push('<div');
109
+ _$_.output_push(' class="if-switch"');
110
+ _$_.output_push('>');
111
+
112
+ {
113
+ _$_.output_push('<!--[-->');
104
114
 
105
- {
106
- __output.push('<!--[-->');
115
+ if (show) {
116
+ _$_.output_push('<!--[-->');
107
117
 
108
- if (show) {
109
- __output.push('<!--[-->');
118
+ switch (kind) {
119
+ case 'a':
120
+ _$_.output_push('<p');
121
+ _$_.output_push(' class="case-a"');
122
+ _$_.output_push('>');
123
+ {
124
+ _$_.output_push('Case A');
125
+ }
126
+ _$_.output_push('</p>');
127
+ break;
110
128
 
111
- switch (kind) {
112
- case 'a':
113
- __output.push('<p');
114
- __output.push(' class="case-a"');
115
- __output.push('>');
116
- {
117
- __output.push('Case A');
118
- }
119
- __output.push('</p>');
120
- break;
129
+ default:
130
+ _$_.output_push('<p');
131
+ _$_.output_push(' class="case-default"');
132
+ _$_.output_push('>');
133
+ {
134
+ _$_.output_push('Default');
135
+ }
136
+ _$_.output_push('</p>');
137
+ }
121
138
 
122
- default:
123
- __output.push('<p');
124
- __output.push(' class="case-default"');
125
- __output.push('>');
126
- {
127
- __output.push('Default');
128
- }
129
- __output.push('</p>');
139
+ _$_.output_push('<!--]-->');
130
140
  }
131
141
 
132
- __output.push('<!--]-->');
142
+ _$_.output_push('<!--]-->');
133
143
  }
134
144
 
135
- __output.push('<!--]-->');
136
- }
145
+ _$_.output_push('</div>');
146
+ });
137
147
 
138
- __output.push('</div>');
139
148
  _$_.pop_component();
140
149
  }
141
150
 
142
- export function IfSwitchHidden(__output) {
151
+ export function IfSwitchHidden() {
143
152
  _$_.push_component();
144
153
 
145
154
  const show = false;
146
155
  const kind = 'a';
147
156
 
148
- __output.push('<div');
149
- __output.push(' class="if-switch-hidden"');
150
- __output.push('>');
157
+ _$_.regular_block(() => {
158
+ _$_.output_push('<div');
159
+ _$_.output_push(' class="if-switch-hidden"');
160
+ _$_.output_push('>');
151
161
 
152
- {
153
- __output.push('<!--[-->');
162
+ {
163
+ _$_.output_push('<!--[-->');
154
164
 
155
- if (show) {
156
- __output.push('<!--[-->');
165
+ if (show) {
166
+ _$_.output_push('<!--[-->');
157
167
 
158
- switch (kind) {
159
- case 'a':
160
- __output.push('<p');
161
- __output.push(' class="case-a"');
162
- __output.push('>');
163
- {
164
- __output.push('Case A');
165
- }
166
- __output.push('</p>');
167
- break;
168
+ switch (kind) {
169
+ case 'a':
170
+ _$_.output_push('<p');
171
+ _$_.output_push(' class="case-a"');
172
+ _$_.output_push('>');
173
+ {
174
+ _$_.output_push('Case A');
175
+ }
176
+ _$_.output_push('</p>');
177
+ break;
168
178
 
169
- default:
170
- __output.push('<p');
171
- __output.push(' class="case-default"');
172
- __output.push('>');
173
- {
174
- __output.push('Default');
175
- }
176
- __output.push('</p>');
179
+ default:
180
+ _$_.output_push('<p');
181
+ _$_.output_push(' class="case-default"');
182
+ _$_.output_push('>');
183
+ {
184
+ _$_.output_push('Default');
185
+ }
186
+ _$_.output_push('</p>');
187
+ }
188
+
189
+ _$_.output_push('<!--]-->');
177
190
  }
178
191
 
179
- __output.push('<!--]-->');
180
- }
192
+ _$_.output_push('<!--]-->');
193
+ _$_.output_push('<p');
194
+ _$_.output_push(' class="after"');
195
+ _$_.output_push('>');
181
196
 
182
- __output.push('<!--]-->');
183
- __output.push('<p');
184
- __output.push(' class="after"');
185
- __output.push('>');
197
+ {
198
+ _$_.output_push('after');
199
+ }
186
200
 
187
- {
188
- __output.push('after');
201
+ _$_.output_push('</p>');
189
202
  }
190
203
 
191
- __output.push('</p>');
192
- }
204
+ _$_.output_push('</div>');
205
+ });
193
206
 
194
- __output.push('</div>');
195
207
  _$_.pop_component();
196
208
  }
197
209
 
198
- export function ForIfSwitchSingle(__output) {
210
+ export function ForIfSwitchSingle() {
199
211
  _$_.push_component();
200
212
 
201
213
  const items = [{ id: 1, kind: 'a', show: true }];
202
214
 
203
- __output.push('<ul');
204
- __output.push(' class="for-if-switch-single"');
205
- __output.push('>');
215
+ _$_.regular_block(() => {
216
+ _$_.output_push('<ul');
217
+ _$_.output_push(' class="for-if-switch-single"');
218
+ _$_.output_push('>');
206
219
 
207
- {
208
- __output.push('<!--[-->');
220
+ {
221
+ _$_.output_push('<!--[-->');
209
222
 
210
- for (const item of items) {
211
- __output.push('<!--[-->');
223
+ for (const item of items) {
224
+ _$_.output_push('<!--[-->');
212
225
 
213
- if (item.show) {
214
- __output.push('<!--[-->');
226
+ if (item.show) {
227
+ _$_.output_push('<!--[-->');
215
228
 
216
- switch (item.kind) {
217
- case 'a':
218
- __output.push('<li');
219
- __output.push(_$_.attr('class', `item item-${item.id} kind-a`));
220
- __output.push('>');
221
- {
222
- __output.push(_$_.escape(`A-${item.id}`));
223
- }
224
- __output.push('</li>');
225
- break;
229
+ switch (item.kind) {
230
+ case 'a':
231
+ _$_.output_push('<li');
232
+ _$_.output_push(_$_.attr('class', `item item-${item.id} kind-a`));
233
+ _$_.output_push('>');
234
+ {
235
+ _$_.output_push(_$_.escape(`A-${item.id}`));
236
+ }
237
+ _$_.output_push('</li>');
238
+ break;
226
239
 
227
- default:
228
- __output.push('<li');
229
- __output.push(_$_.attr('class', `item item-${item.id} kind-default`));
230
- __output.push('>');
231
- {
232
- __output.push(_$_.escape(`D-${item.id}`));
233
- }
234
- __output.push('</li>');
240
+ default:
241
+ _$_.output_push('<li');
242
+ _$_.output_push(_$_.attr('class', `item item-${item.id} kind-default`));
243
+ _$_.output_push('>');
244
+ {
245
+ _$_.output_push(_$_.escape(`D-${item.id}`));
246
+ }
247
+ _$_.output_push('</li>');
248
+ }
249
+
250
+ _$_.output_push('<!--]-->');
235
251
  }
236
252
 
237
- __output.push('<!--]-->');
253
+ _$_.output_push('<!--]-->');
238
254
  }
239
255
 
240
- __output.push('<!--]-->');
256
+ _$_.output_push('<!--]-->');
241
257
  }
242
258
 
243
- __output.push('<!--]-->');
244
- }
259
+ _$_.output_push('</ul>');
260
+ });
245
261
 
246
- __output.push('</ul>');
247
262
  _$_.pop_component();
248
263
  }
249
264
 
250
- export function ForIfSwitchMulti(__output) {
265
+ export function ForIfSwitchMulti() {
251
266
  _$_.push_component();
252
267
 
253
268
  const items = [
@@ -255,54 +270,57 @@ export function ForIfSwitchMulti(__output) {
255
270
  { id: 2, kind: 'b', show: true }
256
271
  ];
257
272
 
258
- __output.push('<ul');
259
- __output.push(' class="for-if-switch-multi"');
260
- __output.push('>');
273
+ _$_.regular_block(() => {
274
+ _$_.output_push('<ul');
275
+ _$_.output_push(' class="for-if-switch-multi"');
276
+ _$_.output_push('>');
261
277
 
262
- {
263
- __output.push('<!--[-->');
278
+ {
279
+ _$_.output_push('<!--[-->');
264
280
 
265
- for (const item of items) {
266
- __output.push('<!--[-->');
281
+ for (const item of items) {
282
+ _$_.output_push('<!--[-->');
267
283
 
268
- if (item.show) {
269
- __output.push('<!--[-->');
284
+ if (item.show) {
285
+ _$_.output_push('<!--[-->');
270
286
 
271
- switch (item.kind) {
272
- case 'a':
273
- __output.push('<li');
274
- __output.push(_$_.attr('class', `item item-${item.id} kind-a`));
275
- __output.push('>');
276
- {
277
- __output.push(_$_.escape(`A-${item.id}`));
278
- }
279
- __output.push('</li>');
280
- break;
287
+ switch (item.kind) {
288
+ case 'a':
289
+ _$_.output_push('<li');
290
+ _$_.output_push(_$_.attr('class', `item item-${item.id} kind-a`));
291
+ _$_.output_push('>');
292
+ {
293
+ _$_.output_push(_$_.escape(`A-${item.id}`));
294
+ }
295
+ _$_.output_push('</li>');
296
+ break;
281
297
 
282
- default:
283
- __output.push('<li');
284
- __output.push(_$_.attr('class', `item item-${item.id} kind-b`));
285
- __output.push('>');
286
- {
287
- __output.push(_$_.escape(`B-${item.id}`));
288
- }
289
- __output.push('</li>');
298
+ default:
299
+ _$_.output_push('<li');
300
+ _$_.output_push(_$_.attr('class', `item item-${item.id} kind-b`));
301
+ _$_.output_push('>');
302
+ {
303
+ _$_.output_push(_$_.escape(`B-${item.id}`));
304
+ }
305
+ _$_.output_push('</li>');
306
+ }
307
+
308
+ _$_.output_push('<!--]-->');
290
309
  }
291
310
 
292
- __output.push('<!--]-->');
311
+ _$_.output_push('<!--]-->');
293
312
  }
294
313
 
295
- __output.push('<!--]-->');
314
+ _$_.output_push('<!--]-->');
296
315
  }
297
316
 
298
- __output.push('<!--]-->');
299
- }
317
+ _$_.output_push('</ul>');
318
+ });
300
319
 
301
- __output.push('</ul>');
302
320
  _$_.pop_component();
303
321
  }
304
322
 
305
- export function ForIfSwitchWithDisabled(__output) {
323
+ export function ForIfSwitchWithDisabled() {
306
324
  _$_.push_component();
307
325
 
308
326
  const items = [
@@ -311,423 +329,471 @@ export function ForIfSwitchWithDisabled(__output) {
311
329
  { id: 3, kind: 'a', show: true }
312
330
  ];
313
331
 
314
- __output.push('<ul');
315
- __output.push(' class="for-if-switch-disabled"');
316
- __output.push('>');
332
+ _$_.regular_block(() => {
333
+ _$_.output_push('<ul');
334
+ _$_.output_push(' class="for-if-switch-disabled"');
335
+ _$_.output_push('>');
317
336
 
318
- {
319
- __output.push('<!--[-->');
337
+ {
338
+ _$_.output_push('<!--[-->');
320
339
 
321
- for (const item of items) {
322
- __output.push('<!--[-->');
340
+ for (const item of items) {
341
+ _$_.output_push('<!--[-->');
323
342
 
324
- if (item.show) {
325
- __output.push('<!--[-->');
343
+ if (item.show) {
344
+ _$_.output_push('<!--[-->');
326
345
 
327
- switch (item.kind) {
328
- case 'a':
329
- __output.push('<li');
330
- __output.push(_$_.attr('class', `item item-${item.id} kind-a`));
331
- __output.push('>');
332
- {
333
- __output.push(_$_.escape(`A-${item.id}`));
334
- }
335
- __output.push('</li>');
336
- break;
346
+ switch (item.kind) {
347
+ case 'a':
348
+ _$_.output_push('<li');
349
+ _$_.output_push(_$_.attr('class', `item item-${item.id} kind-a`));
350
+ _$_.output_push('>');
351
+ {
352
+ _$_.output_push(_$_.escape(`A-${item.id}`));
353
+ }
354
+ _$_.output_push('</li>');
355
+ break;
337
356
 
338
- default:
339
- __output.push('<li');
340
- __output.push(_$_.attr('class', `item item-${item.id} kind-b`));
341
- __output.push('>');
342
- {
343
- __output.push(_$_.escape(`B-${item.id}`));
344
- }
345
- __output.push('</li>');
357
+ default:
358
+ _$_.output_push('<li');
359
+ _$_.output_push(_$_.attr('class', `item item-${item.id} kind-b`));
360
+ _$_.output_push('>');
361
+ {
362
+ _$_.output_push(_$_.escape(`B-${item.id}`));
363
+ }
364
+ _$_.output_push('</li>');
365
+ }
366
+
367
+ _$_.output_push('<!--]-->');
346
368
  }
347
369
 
348
- __output.push('<!--]-->');
370
+ _$_.output_push('<!--]-->');
349
371
  }
350
372
 
351
- __output.push('<!--]-->');
373
+ _$_.output_push('<!--]-->');
352
374
  }
353
375
 
354
- __output.push('<!--]-->');
355
- }
376
+ _$_.output_push('</ul>');
377
+ });
356
378
 
357
- __output.push('</ul>');
358
379
  _$_.pop_component();
359
380
  }
360
381
 
361
- export async function SwitchTry(__output) {
362
- return _$_.async(async () => {
363
- _$_.push_component();
382
+ export function SwitchTry() {
383
+ _$_.push_component();
364
384
 
365
- const kind = 'a';
385
+ const kind = 'a';
366
386
 
367
- __output.push('<div');
368
- __output.push(' class="switch-try"');
369
- __output.push('>');
387
+ _$_.regular_block(() => {
388
+ _$_.output_push('<div');
389
+ _$_.output_push(' class="switch-try"');
390
+ _$_.output_push('>');
370
391
 
371
392
  {
372
- __output.push('<!--[-->');
393
+ _$_.output_push('<!--[-->');
373
394
 
374
395
  switch (kind) {
375
396
  case 'a':
376
- __output.push('<!--[-->');
377
- var __pending_pos = __output.body.length;
378
- __output.push('<p');
379
- __output.push(' class="pending-a"');
380
- __output.push('>');
381
- {
382
- __output.push('A pending');
383
- }
384
- __output.push('</p>');
385
- await _$_.async(async () => {
386
- __output.body = __output.body.slice(0, __pending_pos);
387
- __output.push('<p');
388
- __output.push(' class="resolved-a"');
389
- __output.push('>');
397
+ _$_.try_block(
398
+ () => {
399
+ _$_.output_push('<!--[-->');
400
+ _$_.output_push('<p');
401
+ _$_.output_push(' class="resolved-a"');
402
+ _$_.output_push('>');
390
403
 
391
- {
392
- __output.push('A resolved');
393
- }
404
+ {
405
+ _$_.output_push('A resolved');
406
+ }
394
407
 
395
- __output.push('</p>');
396
- });
397
- __output.push('<!--]-->');
408
+ _$_.output_push('</p>');
409
+ _$_.output_push('<!--]-->');
410
+ },
411
+ null,
412
+ () => {
413
+ _$_.output_push('<!--[-->');
414
+ _$_.output_push('<p');
415
+ _$_.output_push(' class="pending-a"');
416
+ _$_.output_push('>');
417
+
418
+ {
419
+ _$_.output_push('A pending');
420
+ }
421
+
422
+ _$_.output_push('</p>');
423
+ _$_.output_push('<!--]-->');
424
+ }
425
+ );
398
426
  break;
399
427
 
400
428
  default:
401
- __output.push('<p');
402
- __output.push(' class="default"');
403
- __output.push('>');
429
+ _$_.output_push('<p');
430
+ _$_.output_push(' class="default"');
431
+ _$_.output_push('>');
404
432
  {
405
- __output.push('Default');
433
+ _$_.output_push('Default');
406
434
  }
407
- __output.push('</p>');
435
+ _$_.output_push('</p>');
408
436
  }
409
437
 
410
- __output.push('<!--]-->');
438
+ _$_.output_push('<!--]-->');
411
439
  }
412
440
 
413
- __output.push('</div>');
414
- _$_.pop_component();
441
+ _$_.output_push('</div>');
415
442
  });
416
- }
417
443
 
418
- SwitchTry.async = true;
444
+ _$_.pop_component();
445
+ }
419
446
 
420
- export async function ForSwitchTry(__output) {
421
- return _$_.async(async () => {
422
- _$_.push_component();
447
+ export function ForSwitchTry() {
448
+ _$_.push_component();
423
449
 
424
- const items = [{ id: 1, kind: 'a' }, { id: 2, kind: 'b' }];
450
+ const items = [{ id: 1, kind: 'a' }, { id: 2, kind: 'b' }];
425
451
 
426
- __output.push('<ul');
427
- __output.push(' class="for-switch-try"');
428
- __output.push('>');
452
+ _$_.regular_block(() => {
453
+ _$_.output_push('<ul');
454
+ _$_.output_push(' class="for-switch-try"');
455
+ _$_.output_push('>');
429
456
 
430
457
  {
431
- __output.push('<!--[-->');
458
+ _$_.output_push('<!--[-->');
432
459
 
433
460
  for (const item of items) {
434
- __output.push('<!--[-->');
461
+ _$_.output_push('<!--[-->');
435
462
 
436
463
  switch (item.kind) {
437
464
  case 'a':
438
- __output.push('<!--[-->');
439
- var __pending_pos_1 = __output.body.length;
440
- __output.push('<li');
441
- __output.push(_$_.attr('class', `pending pending-${item.id}`));
442
- __output.push('>');
443
- {
444
- __output.push(_$_.escape(`pending ${item.id}`));
445
- }
446
- __output.push('</li>');
447
- await _$_.async(async () => {
448
- __output.body = __output.body.slice(0, __pending_pos_1);
449
- __output.push('<li');
450
- __output.push(_$_.attr('class', `item item-${item.id} kind-a`));
451
- __output.push('>');
465
+ _$_.try_block(
466
+ () => {
467
+ _$_.output_push('<!--[-->');
468
+ _$_.output_push('<li');
469
+ _$_.output_push(_$_.attr('class', `item item-${item.id} kind-a`));
470
+ _$_.output_push('>');
452
471
 
453
- {
454
- __output.push(_$_.escape(`A-${item.id}`));
455
- }
472
+ {
473
+ _$_.output_push(_$_.escape(`A-${item.id}`));
474
+ }
475
+
476
+ _$_.output_push('</li>');
477
+ _$_.output_push('<!--]-->');
478
+ },
479
+ null,
480
+ () => {
481
+ _$_.output_push('<!--[-->');
482
+ _$_.output_push('<li');
483
+ _$_.output_push(_$_.attr('class', `pending pending-${item.id}`));
484
+ _$_.output_push('>');
485
+
486
+ {
487
+ _$_.output_push(_$_.escape(`pending ${item.id}`));
488
+ }
456
489
 
457
- __output.push('</li>');
458
- });
459
- __output.push('<!--]-->');
490
+ _$_.output_push('</li>');
491
+ _$_.output_push('<!--]-->');
492
+ }
493
+ );
460
494
  break;
461
495
 
462
496
  default:
463
- __output.push('<!--[-->');
464
- var __pending_pos_2 = __output.body.length;
465
- __output.push('<li');
466
- __output.push(_$_.attr('class', `pending pending-${item.id}`));
467
- __output.push('>');
468
- {
469
- __output.push(_$_.escape(`pending ${item.id}`));
470
- }
471
- __output.push('</li>');
472
- await _$_.async(async () => {
473
- __output.body = __output.body.slice(0, __pending_pos_2);
474
- __output.push('<li');
475
- __output.push(_$_.attr('class', `item item-${item.id} kind-b`));
476
- __output.push('>');
497
+ _$_.try_block(
498
+ () => {
499
+ _$_.output_push('<!--[-->');
500
+ _$_.output_push('<li');
501
+ _$_.output_push(_$_.attr('class', `item item-${item.id} kind-b`));
502
+ _$_.output_push('>');
477
503
 
478
- {
479
- __output.push(_$_.escape(`B-${item.id}`));
480
- }
504
+ {
505
+ _$_.output_push(_$_.escape(`B-${item.id}`));
506
+ }
481
507
 
482
- __output.push('</li>');
483
- });
484
- __output.push('<!--]-->');
508
+ _$_.output_push('</li>');
509
+ _$_.output_push('<!--]-->');
510
+ },
511
+ null,
512
+ () => {
513
+ _$_.output_push('<!--[-->');
514
+ _$_.output_push('<li');
515
+ _$_.output_push(_$_.attr('class', `pending pending-${item.id}`));
516
+ _$_.output_push('>');
517
+
518
+ {
519
+ _$_.output_push(_$_.escape(`pending ${item.id}`));
520
+ }
521
+
522
+ _$_.output_push('</li>');
523
+ _$_.output_push('<!--]-->');
524
+ }
525
+ );
485
526
  }
486
527
 
487
- __output.push('<!--]-->');
528
+ _$_.output_push('<!--]-->');
488
529
  }
489
530
 
490
- __output.push('<!--]-->');
531
+ _$_.output_push('<!--]-->');
491
532
  }
492
533
 
493
- __output.push('</ul>');
494
- _$_.pop_component();
534
+ _$_.output_push('</ul>');
495
535
  });
496
- }
497
536
 
498
- ForSwitchTry.async = true;
537
+ _$_.pop_component();
538
+ }
499
539
 
500
- export async function ForIfTry(__output) {
501
- return _$_.async(async () => {
502
- _$_.push_component();
540
+ export function ForIfTry() {
541
+ _$_.push_component();
503
542
 
504
- const items = [{ id: 1, show: true }, { id: 2, show: true }];
543
+ const items = [{ id: 1, show: true }, { id: 2, show: true }];
505
544
 
506
- __output.push('<ul');
507
- __output.push(' class="for-if-try"');
508
- __output.push('>');
545
+ _$_.regular_block(() => {
546
+ _$_.output_push('<ul');
547
+ _$_.output_push(' class="for-if-try"');
548
+ _$_.output_push('>');
509
549
 
510
550
  {
511
- __output.push('<!--[-->');
551
+ _$_.output_push('<!--[-->');
512
552
 
513
553
  for (const item of items) {
514
- __output.push('<!--[-->');
554
+ _$_.output_push('<!--[-->');
515
555
 
516
556
  if (item.show) {
517
- __output.push('<!--[-->');
518
-
519
- var __pending_pos_3 = __output.body.length;
520
-
521
- __output.push('<li');
522
- __output.push(_$_.attr('class', `pending pending-${item.id}`));
523
- __output.push('>');
557
+ _$_.try_block(
558
+ () => {
559
+ _$_.output_push('<!--[-->');
560
+ _$_.output_push('<li');
561
+ _$_.output_push(_$_.attr('class', `item item-${item.id}`));
562
+ _$_.output_push('>');
524
563
 
525
- {
526
- __output.push(_$_.escape(`pending ${item.id}`));
527
- }
564
+ {
565
+ _$_.output_push(_$_.escape(`item-${item.id}`));
566
+ }
528
567
 
529
- __output.push('</li>');
568
+ _$_.output_push('</li>');
569
+ _$_.output_push('<!--]-->');
570
+ },
571
+ null,
572
+ () => {
573
+ _$_.output_push('<!--[-->');
574
+ _$_.output_push('<li');
575
+ _$_.output_push(_$_.attr('class', `pending pending-${item.id}`));
576
+ _$_.output_push('>');
530
577
 
531
- await _$_.async(async () => {
532
- __output.body = __output.body.slice(0, __pending_pos_3);
533
- __output.push('<li');
534
- __output.push(_$_.attr('class', `item item-${item.id}`));
535
- __output.push('>');
578
+ {
579
+ _$_.output_push(_$_.escape(`pending ${item.id}`));
580
+ }
536
581
 
537
- {
538
- __output.push(_$_.escape(`item-${item.id}`));
582
+ _$_.output_push('</li>');
583
+ _$_.output_push('<!--]-->');
539
584
  }
540
-
541
- __output.push('</li>');
542
- });
543
-
544
- __output.push('<!--]-->');
585
+ );
545
586
  }
546
587
 
547
- __output.push('<!--]-->');
588
+ _$_.output_push('<!--]-->');
548
589
  }
549
590
 
550
- __output.push('<!--]-->');
591
+ _$_.output_push('<!--]-->');
551
592
  }
552
593
 
553
- __output.push('</ul>');
554
- _$_.pop_component();
594
+ _$_.output_push('</ul>');
555
595
  });
556
- }
557
596
 
558
- ForIfTry.async = true;
597
+ _$_.pop_component();
598
+ }
559
599
 
560
- export async function ForIfSwitchTrySingle(__output) {
561
- return _$_.async(async () => {
562
- _$_.push_component();
600
+ export function ForIfSwitchTrySingle() {
601
+ _$_.push_component();
563
602
 
564
- const items = [{ id: 1, kind: 'a', show: true }];
603
+ const items = [{ id: 1, kind: 'a', show: true }];
565
604
 
566
- __output.push('<ul');
567
- __output.push(' class="for-if-switch-try-single"');
568
- __output.push('>');
605
+ _$_.regular_block(() => {
606
+ _$_.output_push('<ul');
607
+ _$_.output_push(' class="for-if-switch-try-single"');
608
+ _$_.output_push('>');
569
609
 
570
610
  {
571
- __output.push('<!--[-->');
611
+ _$_.output_push('<!--[-->');
572
612
 
573
613
  for (const item of items) {
574
- __output.push('<!--[-->');
614
+ _$_.output_push('<!--[-->');
575
615
 
576
616
  if (item.show) {
577
- __output.push('<!--[-->');
617
+ _$_.output_push('<!--[-->');
578
618
 
579
619
  switch (item.kind) {
580
620
  case 'a':
581
- __output.push('<!--[-->');
582
- var __pending_pos_4 = __output.body.length;
583
- __output.push('<li');
584
- __output.push(_$_.attr('class', `pending pending-${item.id}`));
585
- __output.push('>');
586
- {
587
- __output.push(_$_.escape(`pending ${item.id}`));
588
- }
589
- __output.push('</li>');
590
- await _$_.async(async () => {
591
- __output.body = __output.body.slice(0, __pending_pos_4);
592
- __output.push('<li');
593
- __output.push(_$_.attr('class', `item item-${item.id} kind-a`));
594
- __output.push('>');
595
-
596
- {
597
- __output.push(_$_.escape(`A-${item.id}`));
621
+ _$_.try_block(
622
+ () => {
623
+ _$_.output_push('<!--[-->');
624
+ _$_.output_push('<li');
625
+ _$_.output_push(_$_.attr('class', `item item-${item.id} kind-a`));
626
+ _$_.output_push('>');
627
+
628
+ {
629
+ _$_.output_push(_$_.escape(`A-${item.id}`));
630
+ }
631
+
632
+ _$_.output_push('</li>');
633
+ _$_.output_push('<!--]-->');
634
+ },
635
+ null,
636
+ () => {
637
+ _$_.output_push('<!--[-->');
638
+ _$_.output_push('<li');
639
+ _$_.output_push(_$_.attr('class', `pending pending-${item.id}`));
640
+ _$_.output_push('>');
641
+
642
+ {
643
+ _$_.output_push(_$_.escape(`pending ${item.id}`));
644
+ }
645
+
646
+ _$_.output_push('</li>');
647
+ _$_.output_push('<!--]-->');
598
648
  }
599
-
600
- __output.push('</li>');
601
- });
602
- __output.push('<!--]-->');
649
+ );
603
650
  break;
604
651
 
605
652
  default:
606
- __output.push('<!--[-->');
607
- var __pending_pos_5 = __output.body.length;
608
- __output.push('<li');
609
- __output.push(_$_.attr('class', `pending pending-${item.id}`));
610
- __output.push('>');
611
- {
612
- __output.push(_$_.escape(`pending ${item.id}`));
613
- }
614
- __output.push('</li>');
615
- await _$_.async(async () => {
616
- __output.body = __output.body.slice(0, __pending_pos_5);
617
- __output.push('<li');
618
- __output.push(_$_.attr('class', `item item-${item.id} kind-default`));
619
- __output.push('>');
620
-
621
- {
622
- __output.push(_$_.escape(`D-${item.id}`));
653
+ _$_.try_block(
654
+ () => {
655
+ _$_.output_push('<!--[-->');
656
+ _$_.output_push('<li');
657
+ _$_.output_push(_$_.attr('class', `item item-${item.id} kind-default`));
658
+ _$_.output_push('>');
659
+
660
+ {
661
+ _$_.output_push(_$_.escape(`D-${item.id}`));
662
+ }
663
+
664
+ _$_.output_push('</li>');
665
+ _$_.output_push('<!--]-->');
666
+ },
667
+ null,
668
+ () => {
669
+ _$_.output_push('<!--[-->');
670
+ _$_.output_push('<li');
671
+ _$_.output_push(_$_.attr('class', `pending pending-${item.id}`));
672
+ _$_.output_push('>');
673
+
674
+ {
675
+ _$_.output_push(_$_.escape(`pending ${item.id}`));
676
+ }
677
+
678
+ _$_.output_push('</li>');
679
+ _$_.output_push('<!--]-->');
623
680
  }
624
-
625
- __output.push('</li>');
626
- });
627
- __output.push('<!--]-->');
681
+ );
628
682
  }
629
683
 
630
- __output.push('<!--]-->');
684
+ _$_.output_push('<!--]-->');
631
685
  }
632
686
 
633
- __output.push('<!--]-->');
687
+ _$_.output_push('<!--]-->');
634
688
  }
635
689
 
636
- __output.push('<!--]-->');
690
+ _$_.output_push('<!--]-->');
637
691
  }
638
692
 
639
- __output.push('</ul>');
640
- _$_.pop_component();
693
+ _$_.output_push('</ul>');
641
694
  });
642
- }
643
695
 
644
- ForIfSwitchTrySingle.async = true;
696
+ _$_.pop_component();
697
+ }
645
698
 
646
- export async function ForIfSwitchTryMulti(__output) {
647
- return _$_.async(async () => {
648
- _$_.push_component();
699
+ export function ForIfSwitchTryMulti() {
700
+ _$_.push_component();
649
701
 
650
- const items = [
651
- { id: 1, kind: 'a', show: true },
652
- { id: 2, kind: 'b', show: true }
653
- ];
702
+ const items = [
703
+ { id: 1, kind: 'a', show: true },
704
+ { id: 2, kind: 'b', show: true }
705
+ ];
654
706
 
655
- __output.push('<ul');
656
- __output.push(' class="for-if-switch-try-multi"');
657
- __output.push('>');
707
+ _$_.regular_block(() => {
708
+ _$_.output_push('<ul');
709
+ _$_.output_push(' class="for-if-switch-try-multi"');
710
+ _$_.output_push('>');
658
711
 
659
712
  {
660
- __output.push('<!--[-->');
713
+ _$_.output_push('<!--[-->');
661
714
 
662
715
  for (const item of items) {
663
- __output.push('<!--[-->');
716
+ _$_.output_push('<!--[-->');
664
717
 
665
718
  if (item.show) {
666
- __output.push('<!--[-->');
719
+ _$_.output_push('<!--[-->');
667
720
 
668
721
  switch (item.kind) {
669
722
  case 'a':
670
- __output.push('<!--[-->');
671
- var __pending_pos_6 = __output.body.length;
672
- __output.push('<li');
673
- __output.push(_$_.attr('class', `pending pending-${item.id}`));
674
- __output.push('>');
675
- {
676
- __output.push(_$_.escape(`pending ${item.id}`));
677
- }
678
- __output.push('</li>');
679
- await _$_.async(async () => {
680
- __output.body = __output.body.slice(0, __pending_pos_6);
681
- __output.push('<li');
682
- __output.push(_$_.attr('class', `item item-${item.id} kind-a`));
683
- __output.push('>');
684
-
685
- {
686
- __output.push(_$_.escape(`A-${item.id}`));
723
+ _$_.try_block(
724
+ () => {
725
+ _$_.output_push('<!--[-->');
726
+ _$_.output_push('<li');
727
+ _$_.output_push(_$_.attr('class', `item item-${item.id} kind-a`));
728
+ _$_.output_push('>');
729
+
730
+ {
731
+ _$_.output_push(_$_.escape(`A-${item.id}`));
732
+ }
733
+
734
+ _$_.output_push('</li>');
735
+ _$_.output_push('<!--]-->');
736
+ },
737
+ null,
738
+ () => {
739
+ _$_.output_push('<!--[-->');
740
+ _$_.output_push('<li');
741
+ _$_.output_push(_$_.attr('class', `pending pending-${item.id}`));
742
+ _$_.output_push('>');
743
+
744
+ {
745
+ _$_.output_push(_$_.escape(`pending ${item.id}`));
746
+ }
747
+
748
+ _$_.output_push('</li>');
749
+ _$_.output_push('<!--]-->');
687
750
  }
688
-
689
- __output.push('</li>');
690
- });
691
- __output.push('<!--]-->');
751
+ );
692
752
  break;
693
753
 
694
754
  default:
695
- __output.push('<!--[-->');
696
- var __pending_pos_7 = __output.body.length;
697
- __output.push('<li');
698
- __output.push(_$_.attr('class', `pending pending-${item.id}`));
699
- __output.push('>');
700
- {
701
- __output.push(_$_.escape(`pending ${item.id}`));
702
- }
703
- __output.push('</li>');
704
- await _$_.async(async () => {
705
- __output.body = __output.body.slice(0, __pending_pos_7);
706
- __output.push('<li');
707
- __output.push(_$_.attr('class', `item item-${item.id} kind-b`));
708
- __output.push('>');
709
-
710
- {
711
- __output.push(_$_.escape(`B-${item.id}`));
755
+ _$_.try_block(
756
+ () => {
757
+ _$_.output_push('<!--[-->');
758
+ _$_.output_push('<li');
759
+ _$_.output_push(_$_.attr('class', `item item-${item.id} kind-b`));
760
+ _$_.output_push('>');
761
+
762
+ {
763
+ _$_.output_push(_$_.escape(`B-${item.id}`));
764
+ }
765
+
766
+ _$_.output_push('</li>');
767
+ _$_.output_push('<!--]-->');
768
+ },
769
+ null,
770
+ () => {
771
+ _$_.output_push('<!--[-->');
772
+ _$_.output_push('<li');
773
+ _$_.output_push(_$_.attr('class', `pending pending-${item.id}`));
774
+ _$_.output_push('>');
775
+
776
+ {
777
+ _$_.output_push(_$_.escape(`pending ${item.id}`));
778
+ }
779
+
780
+ _$_.output_push('</li>');
781
+ _$_.output_push('<!--]-->');
712
782
  }
713
-
714
- __output.push('</li>');
715
- });
716
- __output.push('<!--]-->');
783
+ );
717
784
  }
718
785
 
719
- __output.push('<!--]-->');
786
+ _$_.output_push('<!--]-->');
720
787
  }
721
788
 
722
- __output.push('<!--]-->');
789
+ _$_.output_push('<!--]-->');
723
790
  }
724
791
 
725
- __output.push('<!--]-->');
792
+ _$_.output_push('<!--]-->');
726
793
  }
727
794
 
728
- __output.push('</ul>');
729
- _$_.pop_component();
795
+ _$_.output_push('</ul>');
730
796
  });
731
- }
732
797
 
733
- ForIfSwitchTryMulti.async = true;
798
+ _$_.pop_component();
799
+ }