@xiuper/mpp-core 0.0.2

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 (173) hide show
  1. package/Kotlin-DateTime-library-kotlinx-datetime.js +7836 -0
  2. package/Kotlin-DateTime-library-kotlinx-datetime.js.map +1 -0
  3. package/Kotlin-Immutable-Collections-kotlinx-collections-immutable.js +1241 -0
  4. package/Kotlin-Immutable-Collections-kotlinx-collections-immutable.js.map +1 -0
  5. package/Xiuper-mpp-codegraph.js +1471 -0
  6. package/Xiuper-mpp-codegraph.js.map +1 -0
  7. package/annotations.js +15 -0
  8. package/annotations.js.map +1 -0
  9. package/autodev-mpp-core.d.ts +1312 -0
  10. package/autodev-mpp-core.js +86483 -0
  11. package/autodev-mpp-core.js.map +1 -0
  12. package/kaml.js +3387 -0
  13. package/kaml.js.map +1 -0
  14. package/koog-agents-agents-core.js +22927 -0
  15. package/koog-agents-agents-core.js.map +1 -0
  16. package/koog-agents-agents-ext.js +15 -0
  17. package/koog-agents-agents-ext.js.map +1 -0
  18. package/koog-agents-agents-features-agents-features-event-handler.js +15 -0
  19. package/koog-agents-agents-features-agents-features-event-handler.js.map +1 -0
  20. package/koog-agents-agents-features-agents-features-memory.js +15 -0
  21. package/koog-agents-agents-features-agents-features-memory.js.map +1 -0
  22. package/koog-agents-agents-features-agents-features-opentelemetry.js +15 -0
  23. package/koog-agents-agents-features-agents-features-opentelemetry.js.map +1 -0
  24. package/koog-agents-agents-features-agents-features-snapshot.js +15 -0
  25. package/koog-agents-agents-features-agents-features-snapshot.js.map +1 -0
  26. package/koog-agents-agents-features-agents-features-tokenizer.js +15 -0
  27. package/koog-agents-agents-features-agents-features-tokenizer.js.map +1 -0
  28. package/koog-agents-agents-features-agents-features-trace.js +15 -0
  29. package/koog-agents-agents-features-agents-features-trace.js.map +1 -0
  30. package/koog-agents-agents-mcp.js +15 -0
  31. package/koog-agents-agents-mcp.js.map +1 -0
  32. package/koog-agents-agents-tools.js +322 -0
  33. package/koog-agents-agents-tools.js.map +1 -0
  34. package/koog-agents-agents-utils.js +232 -0
  35. package/koog-agents-agents-utils.js.map +1 -0
  36. package/koog-embeddings-embeddings-base.js +15 -0
  37. package/koog-embeddings-embeddings-base.js.map +1 -0
  38. package/koog-embeddings-embeddings-llm.js +15 -0
  39. package/koog-embeddings-embeddings-llm.js.map +1 -0
  40. package/koog-http-client-http-client-core.js +57 -0
  41. package/koog-http-client-http-client-core.js.map +1 -0
  42. package/koog-http-client-http-client-ktor.js +703 -0
  43. package/koog-http-client-http-client-ktor.js.map +1 -0
  44. package/koog-koog-agents.js +15 -0
  45. package/koog-koog-agents.js.map +1 -0
  46. package/koog-prompt-prompt-cache-prompt-cache-files.js +15 -0
  47. package/koog-prompt-prompt-cache-prompt-cache-files.js.map +1 -0
  48. package/koog-prompt-prompt-cache-prompt-cache-model.js +15 -0
  49. package/koog-prompt-prompt-cache-prompt-cache-model.js.map +1 -0
  50. package/koog-prompt-prompt-cache-prompt-cache-redis.js +15 -0
  51. package/koog-prompt-prompt-cache-prompt-cache-redis.js.map +1 -0
  52. package/koog-prompt-prompt-executor-prompt-executor-cached.js +15 -0
  53. package/koog-prompt-prompt-executor-prompt-executor-cached.js.map +1 -0
  54. package/koog-prompt-prompt-executor-prompt-executor-clients-prompt-executor-anthropic-client.js +4991 -0
  55. package/koog-prompt-prompt-executor-prompt-executor-clients-prompt-executor-anthropic-client.js.map +1 -0
  56. package/koog-prompt-prompt-executor-prompt-executor-clients-prompt-executor-bedrock-client.js +15 -0
  57. package/koog-prompt-prompt-executor-prompt-executor-clients-prompt-executor-bedrock-client.js.map +1 -0
  58. package/koog-prompt-prompt-executor-prompt-executor-clients-prompt-executor-dashscope-client.js +15 -0
  59. package/koog-prompt-prompt-executor-prompt-executor-clients-prompt-executor-dashscope-client.js.map +1 -0
  60. package/koog-prompt-prompt-executor-prompt-executor-clients-prompt-executor-deepseek-client.js +1249 -0
  61. package/koog-prompt-prompt-executor-prompt-executor-clients-prompt-executor-deepseek-client.js.map +1 -0
  62. package/koog-prompt-prompt-executor-prompt-executor-clients-prompt-executor-google-client.js +4675 -0
  63. package/koog-prompt-prompt-executor-prompt-executor-clients-prompt-executor-google-client.js.map +1 -0
  64. package/koog-prompt-prompt-executor-prompt-executor-clients-prompt-executor-mistralai-client.js +15 -0
  65. package/koog-prompt-prompt-executor-prompt-executor-clients-prompt-executor-mistralai-client.js.map +1 -0
  66. package/koog-prompt-prompt-executor-prompt-executor-clients-prompt-executor-ollama-client.js +2343 -0
  67. package/koog-prompt-prompt-executor-prompt-executor-clients-prompt-executor-ollama-client.js.map +1 -0
  68. package/koog-prompt-prompt-executor-prompt-executor-clients-prompt-executor-openai-client-base.js +6613 -0
  69. package/koog-prompt-prompt-executor-prompt-executor-clients-prompt-executor-openai-client-base.js.map +1 -0
  70. package/koog-prompt-prompt-executor-prompt-executor-clients-prompt-executor-openai-client.js +19901 -0
  71. package/koog-prompt-prompt-executor-prompt-executor-clients-prompt-executor-openai-client.js.map +1 -0
  72. package/koog-prompt-prompt-executor-prompt-executor-clients-prompt-executor-openrouter-client.js +2313 -0
  73. package/koog-prompt-prompt-executor-prompt-executor-clients-prompt-executor-openrouter-client.js.map +1 -0
  74. package/koog-prompt-prompt-executor-prompt-executor-clients.js +222 -0
  75. package/koog-prompt-prompt-executor-prompt-executor-clients.js.map +1 -0
  76. package/koog-prompt-prompt-executor-prompt-executor-llms-all.js +70 -0
  77. package/koog-prompt-prompt-executor-prompt-executor-llms-all.js.map +1 -0
  78. package/koog-prompt-prompt-executor-prompt-executor-llms.js +134 -0
  79. package/koog-prompt-prompt-executor-prompt-executor-llms.js.map +1 -0
  80. package/koog-prompt-prompt-executor-prompt-executor-model.js +42 -0
  81. package/koog-prompt-prompt-executor-prompt-executor-model.js.map +1 -0
  82. package/koog-prompt-prompt-llm.js +1710 -0
  83. package/koog-prompt-prompt-llm.js.map +1 -0
  84. package/koog-prompt-prompt-markdown.js +122 -0
  85. package/koog-prompt-prompt-markdown.js.map +1 -0
  86. package/koog-prompt-prompt-model.js +5848 -0
  87. package/koog-prompt-prompt-model.js.map +1 -0
  88. package/koog-prompt-prompt-structure.js +1513 -0
  89. package/koog-prompt-prompt-structure.js.map +1 -0
  90. package/koog-prompt-prompt-tokenizer.js +15 -0
  91. package/koog-prompt-prompt-tokenizer.js.map +1 -0
  92. package/koog-prompt-prompt-xml.js +15 -0
  93. package/koog-prompt-prompt-xml.js.map +1 -0
  94. package/koog-rag-rag-base.js +15 -0
  95. package/koog-rag-rag-base.js.map +1 -0
  96. package/koog-rag-vector-storage.js +15 -0
  97. package/koog-rag-vector-storage.js.map +1 -0
  98. package/koog-utils.js +63 -0
  99. package/koog-utils.js.map +1 -0
  100. package/kotlin-kotlin-stdlib.js +18965 -0
  101. package/kotlin-kotlin-stdlib.js.map +1 -0
  102. package/kotlin-logging.js +509 -0
  103. package/kotlin-logging.js.map +1 -0
  104. package/kotlin-sdk-kotlin-sdk-client.js +1340 -0
  105. package/kotlin-sdk-kotlin-sdk-client.js.map +1 -0
  106. package/kotlin-sdk-kotlin-sdk-core.js +15195 -0
  107. package/kotlin-sdk-kotlin-sdk-core.js.map +1 -0
  108. package/kotlin_org_jetbrains_kotlin_kotlin_dom_api_compat.js +15 -0
  109. package/kotlin_org_jetbrains_kotlin_kotlin_dom_api_compat.js.map +1 -0
  110. package/kotlinx-atomicfu.js +259 -0
  111. package/kotlinx-atomicfu.js.map +1 -0
  112. package/kotlinx-coroutines-core.js +13742 -0
  113. package/kotlinx-coroutines-core.js.map +1 -0
  114. package/kotlinx-io-kotlinx-io-bytestring.js +214 -0
  115. package/kotlinx-io-kotlinx-io-bytestring.js.map +1 -0
  116. package/kotlinx-io-kotlinx-io-core.js +2892 -0
  117. package/kotlinx-io-kotlinx-io-core.js.map +1 -0
  118. package/kotlinx-serialization-kotlinx-serialization-core.js +6563 -0
  119. package/kotlinx-serialization-kotlinx-serialization-core.js.map +1 -0
  120. package/kotlinx-serialization-kotlinx-serialization-json-io.js +15 -0
  121. package/kotlinx-serialization-kotlinx-serialization-json-io.js.map +1 -0
  122. package/kotlinx-serialization-kotlinx-serialization-json.js +5927 -0
  123. package/kotlinx-serialization-kotlinx-serialization-json.js.map +1 -0
  124. package/ktor-ktor-client-content-negotiation.js +775 -0
  125. package/ktor-ktor-client-content-negotiation.js.map +1 -0
  126. package/ktor-ktor-client-core.js +11110 -0
  127. package/ktor-ktor-client-core.js.map +1 -0
  128. package/ktor-ktor-client-logging.js +15 -0
  129. package/ktor-ktor-client-logging.js.map +1 -0
  130. package/ktor-ktor-events.js +126 -0
  131. package/ktor-ktor-events.js.map +1 -0
  132. package/ktor-ktor-http-cio.js +4257 -0
  133. package/ktor-ktor-http-cio.js.map +1 -0
  134. package/ktor-ktor-http.js +3671 -0
  135. package/ktor-ktor-http.js.map +1 -0
  136. package/ktor-ktor-io.js +4114 -0
  137. package/ktor-ktor-io.js.map +1 -0
  138. package/ktor-ktor-network.js +1399 -0
  139. package/ktor-ktor-network.js.map +1 -0
  140. package/ktor-ktor-serialization-kotlinx-json.js +67 -0
  141. package/ktor-ktor-serialization-kotlinx-json.js.map +1 -0
  142. package/ktor-ktor-serialization-kotlinx.js +881 -0
  143. package/ktor-ktor-serialization-kotlinx.js.map +1 -0
  144. package/ktor-ktor-serialization.js +388 -0
  145. package/ktor-ktor-serialization.js.map +1 -0
  146. package/ktor-ktor-server-cio.js +3735 -0
  147. package/ktor-ktor-server-cio.js.map +1 -0
  148. package/ktor-ktor-server-core.js +8696 -0
  149. package/ktor-ktor-server-core.js.map +1 -0
  150. package/ktor-ktor-server-sse.js +668 -0
  151. package/ktor-ktor-server-sse.js.map +1 -0
  152. package/ktor-ktor-server-websockets.js +15 -0
  153. package/ktor-ktor-server-websockets.js.map +1 -0
  154. package/ktor-ktor-sse.js +161 -0
  155. package/ktor-ktor-sse.js.map +1 -0
  156. package/ktor-ktor-utils.js +3589 -0
  157. package/ktor-ktor-utils.js.map +1 -0
  158. package/ktor-ktor-websocket-serialization.js +15 -0
  159. package/ktor-ktor-websocket-serialization.js.map +1 -0
  160. package/ktor-ktor-websockets.js +450 -0
  161. package/ktor-ktor-websockets.js.map +1 -0
  162. package/markdown.js +5174 -0
  163. package/markdown.js.map +1 -0
  164. package/okio-parent-okio.js +2628 -0
  165. package/okio-parent-okio.js.map +1 -0
  166. package/package.json +18 -0
  167. package/snakeyaml-engine-kmp.js +7079 -0
  168. package/snakeyaml-engine-kmp.js.map +1 -0
  169. package/urlencoder-urlencoder-lib.js +322 -0
  170. package/urlencoder-urlencoder-lib.js.map +1 -0
  171. package/xiuper-mpp-core.d.ts +1312 -0
  172. package/xiuper-mpp-core.js +86483 -0
  173. package/xiuper-mpp-core.js.map +1 -0
@@ -0,0 +1,3735 @@
1
+ (function (factory) {
2
+ if (typeof define === 'function' && define.amd)
3
+ define(['exports', './kotlin-kotlin-stdlib.js', './ktor-ktor-server-core.js', './kotlinx-coroutines-core.js', './ktor-ktor-utils.js', './ktor-ktor-http.js', './ktor-ktor-http-cio.js', './ktor-ktor-io.js', './ktor-ktor-events.js', './ktor-ktor-network.js', './kotlinx-io-kotlinx-io-core.js'], factory);
4
+ else if (typeof exports === 'object')
5
+ factory(module.exports, require('./kotlin-kotlin-stdlib.js'), require('./ktor-ktor-server-core.js'), require('./kotlinx-coroutines-core.js'), require('./ktor-ktor-utils.js'), require('./ktor-ktor-http.js'), require('./ktor-ktor-http-cio.js'), require('./ktor-ktor-io.js'), require('./ktor-ktor-events.js'), require('./ktor-ktor-network.js'), require('./kotlinx-io-kotlinx-io-core.js'));
6
+ else {
7
+ if (typeof globalThis['kotlin-kotlin-stdlib'] === 'undefined') {
8
+ throw new Error("Error loading module 'ktor-ktor-server-cio'. Its dependency 'kotlin-kotlin-stdlib' was not found. Please, check whether 'kotlin-kotlin-stdlib' is loaded prior to 'ktor-ktor-server-cio'.");
9
+ }
10
+ if (typeof globalThis['ktor-ktor-server-core'] === 'undefined') {
11
+ throw new Error("Error loading module 'ktor-ktor-server-cio'. Its dependency 'ktor-ktor-server-core' was not found. Please, check whether 'ktor-ktor-server-core' is loaded prior to 'ktor-ktor-server-cio'.");
12
+ }
13
+ if (typeof globalThis['kotlinx-coroutines-core'] === 'undefined') {
14
+ throw new Error("Error loading module 'ktor-ktor-server-cio'. Its dependency 'kotlinx-coroutines-core' was not found. Please, check whether 'kotlinx-coroutines-core' is loaded prior to 'ktor-ktor-server-cio'.");
15
+ }
16
+ if (typeof globalThis['ktor-ktor-utils'] === 'undefined') {
17
+ throw new Error("Error loading module 'ktor-ktor-server-cio'. Its dependency 'ktor-ktor-utils' was not found. Please, check whether 'ktor-ktor-utils' is loaded prior to 'ktor-ktor-server-cio'.");
18
+ }
19
+ if (typeof globalThis['ktor-ktor-http'] === 'undefined') {
20
+ throw new Error("Error loading module 'ktor-ktor-server-cio'. Its dependency 'ktor-ktor-http' was not found. Please, check whether 'ktor-ktor-http' is loaded prior to 'ktor-ktor-server-cio'.");
21
+ }
22
+ if (typeof globalThis['ktor-ktor-http-cio'] === 'undefined') {
23
+ throw new Error("Error loading module 'ktor-ktor-server-cio'. Its dependency 'ktor-ktor-http-cio' was not found. Please, check whether 'ktor-ktor-http-cio' is loaded prior to 'ktor-ktor-server-cio'.");
24
+ }
25
+ if (typeof globalThis['ktor-ktor-io'] === 'undefined') {
26
+ throw new Error("Error loading module 'ktor-ktor-server-cio'. Its dependency 'ktor-ktor-io' was not found. Please, check whether 'ktor-ktor-io' is loaded prior to 'ktor-ktor-server-cio'.");
27
+ }
28
+ if (typeof globalThis['ktor-ktor-events'] === 'undefined') {
29
+ throw new Error("Error loading module 'ktor-ktor-server-cio'. Its dependency 'ktor-ktor-events' was not found. Please, check whether 'ktor-ktor-events' is loaded prior to 'ktor-ktor-server-cio'.");
30
+ }
31
+ if (typeof globalThis['ktor-ktor-network'] === 'undefined') {
32
+ throw new Error("Error loading module 'ktor-ktor-server-cio'. Its dependency 'ktor-ktor-network' was not found. Please, check whether 'ktor-ktor-network' is loaded prior to 'ktor-ktor-server-cio'.");
33
+ }
34
+ if (typeof globalThis['kotlinx-io-kotlinx-io-core'] === 'undefined') {
35
+ throw new Error("Error loading module 'ktor-ktor-server-cio'. Its dependency 'kotlinx-io-kotlinx-io-core' was not found. Please, check whether 'kotlinx-io-kotlinx-io-core' is loaded prior to 'ktor-ktor-server-cio'.");
36
+ }
37
+ globalThis['ktor-ktor-server-cio'] = factory(typeof globalThis['ktor-ktor-server-cio'] === 'undefined' ? {} : globalThis['ktor-ktor-server-cio'], globalThis['kotlin-kotlin-stdlib'], globalThis['ktor-ktor-server-core'], globalThis['kotlinx-coroutines-core'], globalThis['ktor-ktor-utils'], globalThis['ktor-ktor-http'], globalThis['ktor-ktor-http-cio'], globalThis['ktor-ktor-io'], globalThis['ktor-ktor-events'], globalThis['ktor-ktor-network'], globalThis['kotlinx-io-kotlinx-io-core']);
38
+ }
39
+ }(function (_, kotlin_kotlin, kotlin_io_ktor_ktor_server_core, kotlin_org_jetbrains_kotlinx_kotlinx_coroutines_core, kotlin_io_ktor_ktor_utils, kotlin_io_ktor_ktor_http, kotlin_io_ktor_ktor_http_cio, kotlin_io_ktor_ktor_io, kotlin_io_ktor_ktor_events, kotlin_io_ktor_ktor_network, kotlin_org_jetbrains_kotlinx_kotlinx_io_core) {
40
+ 'use strict';
41
+ //region block: imports
42
+ var imul = Math.imul;
43
+ var protoOf = kotlin_kotlin.$_$.we;
44
+ var THROW_CCE = kotlin_kotlin.$_$.zk;
45
+ var ApplicationEngineFactory = kotlin_io_ktor_ktor_server_core.$_$.m;
46
+ var initMetadataForObject = kotlin_kotlin.$_$.ae;
47
+ var VOID = kotlin_kotlin.$_$.h;
48
+ var BaseApplicationCall = kotlin_io_ktor_ktor_server_core.$_$.n;
49
+ var Unit_instance = kotlin_kotlin.$_$.h6;
50
+ var CoroutineScope = kotlin_org_jetbrains_kotlinx_kotlinx_coroutines_core.$_$.c2;
51
+ var initMetadataForClass = kotlin_kotlin.$_$.ud;
52
+ var CoroutineImpl = kotlin_kotlin.$_$.tc;
53
+ var get_COROUTINE_SUSPENDED = kotlin_kotlin.$_$.dc;
54
+ var initMetadataForLambda = kotlin_kotlin.$_$.zd;
55
+ var isInterface = kotlin_kotlin.$_$.je;
56
+ var get_ApplicationStopPreparing = kotlin_io_ktor_ktor_server_core.$_$.f;
57
+ var Configuration = kotlin_io_ktor_ktor_server_core.$_$.o;
58
+ var toLong = kotlin_kotlin.$_$.ye;
59
+ var PipelinePhase = kotlin_io_ktor_ktor_utils.$_$.a1;
60
+ var Phases_getInstance = kotlin_io_ktor_ktor_server_core.$_$.e;
61
+ var HttpHeaders_getInstance = kotlin_io_ktor_ktor_http.$_$.i;
62
+ var toLong_0 = kotlin_kotlin.$_$.jj;
63
+ var Long = kotlin_kotlin.$_$.sk;
64
+ var withContext = kotlin_org_jetbrains_kotlinx_kotlinx_coroutines_core.$_$.m;
65
+ var CoroutineScope_0 = kotlin_org_jetbrains_kotlinx_kotlinx_coroutines_core.$_$.b2;
66
+ var CoroutineStart_LAZY_getInstance = kotlin_org_jetbrains_kotlinx_kotlinx_coroutines_core.$_$.a;
67
+ var launch = kotlin_org_jetbrains_kotlinx_kotlinx_coroutines_core.$_$.q2;
68
+ var Request = kotlin_io_ktor_ktor_http_cio.$_$.i;
69
+ var PipelineContext = kotlin_io_ktor_ktor_utils.$_$.z;
70
+ var Companion_getInstance = kotlin_io_ktor_ktor_http.$_$.k;
71
+ var get_httpVersion = kotlin_io_ktor_ktor_server_core.$_$.z;
72
+ var writeStringUtf8 = kotlin_io_ktor_ktor_io.$_$.s;
73
+ var Companion_getInstance_0 = kotlin_io_ktor_ktor_http.$_$.l;
74
+ var HttpStatusCode = kotlin_io_ktor_ktor_http.$_$.h1;
75
+ var getKClass = kotlin_kotlin.$_$.f;
76
+ var arrayOf = kotlin_kotlin.$_$.nl;
77
+ var createKType = kotlin_kotlin.$_$.c;
78
+ var TypeInfo = kotlin_io_ktor_ktor_utils.$_$.c1;
79
+ var initContextInDebugMode = kotlin_io_ktor_ktor_utils.$_$.d;
80
+ var handleFailure = kotlin_io_ktor_ktor_server_core.$_$.a;
81
+ var ArrayList_init_$Create$ = kotlin_kotlin.$_$.s;
82
+ var UnsupportedOperationException_init_$Create$ = kotlin_kotlin.$_$.b3;
83
+ var Companion_getInstance_1 = kotlin_io_ktor_ktor_server_core.$_$.d;
84
+ var collectionSizeOrDefault = kotlin_kotlin.$_$.p7;
85
+ var to = kotlin_kotlin.$_$.hm;
86
+ var withPort = kotlin_io_ktor_ktor_server_core.$_$.t;
87
+ var joinAll = kotlin_org_jetbrains_kotlinx_kotlinx_coroutines_core.$_$.k;
88
+ var get_ServerReady = kotlin_io_ktor_ktor_server_core.$_$.i;
89
+ var raiseCatching = kotlin_io_ktor_ktor_events.$_$.c;
90
+ var initMetadataForCoroutine = kotlin_kotlin.$_$.wd;
91
+ var withTimeoutOrNull = kotlin_org_jetbrains_kotlinx_kotlinx_coroutines_core.$_$.n;
92
+ var BaseApplicationEngine = kotlin_io_ktor_ktor_server_core.$_$.p;
93
+ var Dispatchers_getInstance = kotlin_org_jetbrains_kotlinx_kotlinx_coroutines_core.$_$.v;
94
+ var CompletableDeferred = kotlin_org_jetbrains_kotlinx_kotlinx_coroutines_core.$_$.x1;
95
+ var Job = kotlin_org_jetbrains_kotlinx_kotlinx_coroutines_core.$_$.d2;
96
+ var RequestCookies = kotlin_io_ktor_ktor_server_core.$_$.w;
97
+ var encodeParameters = kotlin_io_ktor_ktor_server_core.$_$.y;
98
+ var toString = kotlin_kotlin.$_$.af;
99
+ var _Char___init__impl__6a9atx = kotlin_kotlin.$_$.j3;
100
+ var indexOf = kotlin_kotlin.$_$.ch;
101
+ var Companion_getInstance_2 = kotlin_io_ktor_ktor_http.$_$.m;
102
+ var parseQueryString = kotlin_io_ktor_ktor_http.$_$.k2;
103
+ var BaseApplicationRequest = kotlin_io_ktor_ktor_server_core.$_$.q;
104
+ var lazy = kotlin_kotlin.$_$.yl;
105
+ var CIOHeaders = kotlin_io_ktor_ktor_http_cio.$_$.e;
106
+ var Companion_getInstance_3 = kotlin_io_ktor_ktor_http.$_$.j;
107
+ var KProperty1 = kotlin_kotlin.$_$.tf;
108
+ var getPropertyCallableRef = kotlin_kotlin.$_$.rd;
109
+ var Companion_getInstance_4 = kotlin_io_ktor_ktor_http.$_$.n;
110
+ var get_hostname = kotlin_io_ktor_ktor_utils.$_$.x;
111
+ var substringBefore = kotlin_kotlin.$_$.ti;
112
+ var get_port = kotlin_io_ktor_ktor_utils.$_$.y;
113
+ var substringAfter = kotlin_kotlin.$_$.qi;
114
+ var toInt = kotlin_kotlin.$_$.gj;
115
+ var substringAfterLast = kotlin_kotlin.$_$.oi;
116
+ var substringBeforeLast = kotlin_kotlin.$_$.ri;
117
+ var get_address = kotlin_io_ktor_ktor_utils.$_$.w;
118
+ var forEach = kotlin_io_ktor_ktor_utils.$_$.i1;
119
+ var Parameters = kotlin_io_ktor_ktor_http.$_$.j1;
120
+ var encodeChunked = kotlin_io_ktor_ktor_http_cio.$_$.j;
121
+ var ResponseHeaders = kotlin_io_ktor_ktor_server_core.$_$.b1;
122
+ var emptyList = kotlin_kotlin.$_$.m8;
123
+ var writeFully = kotlin_io_ktor_ktor_io.$_$.p;
124
+ var cancel = kotlin_io_ktor_ktor_io.$_$.e2;
125
+ var IllegalStateException_init_$Create$ = kotlin_kotlin.$_$.j2;
126
+ var ProtocolUpgrade = kotlin_io_ktor_ktor_http.$_$.u;
127
+ var BaseApplicationResponse = kotlin_io_ktor_ktor_server_core.$_$.r;
128
+ var RequestResponseBuilder = kotlin_io_ktor_ktor_http_cio.$_$.h;
129
+ var ensureNotNull = kotlin_kotlin.$_$.sl;
130
+ var writePacket = kotlin_io_ktor_ktor_io.$_$.q;
131
+ var HeadersBuilder = kotlin_io_ktor_ktor_http.$_$.f1;
132
+ var getStringHashCode = kotlin_kotlin.$_$.sd;
133
+ var getBooleanHashCode = kotlin_kotlin.$_$.od;
134
+ var CoroutineName = kotlin_org_jetbrains_kotlinx_kotlinx_coroutines_core.$_$.a2;
135
+ var initMetadataForInterface = kotlin_kotlin.$_$.yd;
136
+ var CoroutineStart_UNDISPATCHED_getInstance = kotlin_org_jetbrains_kotlinx_kotlinx_coroutines_core.$_$.b;
137
+ var SelectorManager = kotlin_io_ktor_ktor_network.$_$.b;
138
+ var Companion_getInstance_5 = kotlin_kotlin.$_$.w5;
139
+ var DurationUnit_SECONDS_getInstance = kotlin_kotlin.$_$.m;
140
+ var toDuration = kotlin_kotlin.$_$.bk;
141
+ var SupervisorJob = kotlin_org_jetbrains_kotlinx_kotlinx_coroutines_core.$_$.f2;
142
+ var aSocket = kotlin_io_ktor_ktor_network.$_$.e;
143
+ var Key_instance = kotlin_org_jetbrains_kotlinx_kotlinx_coroutines_core.$_$.t;
144
+ var DefaultUncaughtExceptionHandler_init_$Create$ = kotlin_io_ktor_ktor_server_core.$_$.b;
145
+ var IOException = kotlin_org_jetbrains_kotlinx_kotlinx_io_core.$_$.k;
146
+ var openReadChannel = kotlin_io_ktor_ktor_network.$_$.f;
147
+ var openWriteChannel = kotlin_io_ktor_ktor_network.$_$.g;
148
+ var cancel_0 = kotlin_org_jetbrains_kotlinx_kotlinx_coroutines_core.$_$.k2;
149
+ var ClosedChannelException = kotlin_io_ktor_ktor_server_core.$_$.l;
150
+ var awaitClosed = kotlin_io_ktor_ktor_network.$_$.a;
151
+ var closeFinally = kotlin_kotlin.$_$.ol;
152
+ var KtorSimpleLogger = kotlin_io_ktor_ktor_utils.$_$.s;
153
+ var close = kotlin_io_ktor_ktor_io.$_$.g2;
154
+ var close_0 = kotlin_io_ktor_ktor_io.$_$.f2;
155
+ var Channel = kotlin_org_jetbrains_kotlinx_kotlinx_coroutines_core.$_$.z;
156
+ var parseRequest = kotlin_io_ktor_ktor_http_cio.$_$.b;
157
+ var get_isTraceEnabled = kotlin_io_ktor_ktor_utils.$_$.u;
158
+ var CancellationException = kotlin_kotlin.$_$.cc;
159
+ var TooLongLineException = kotlin_io_ktor_ktor_io.$_$.y;
160
+ var ByteChannel = kotlin_io_ktor_ktor_io.$_$.t1;
161
+ var toList = kotlin_kotlin.$_$.dg;
162
+ var Companion_getInstance_6 = kotlin_io_ktor_ktor_http_cio.$_$.c;
163
+ var ParserException = kotlin_io_ktor_ktor_http_cio.$_$.g;
164
+ var parseDecLong = kotlin_io_ktor_ktor_http_cio.$_$.d;
165
+ var expectHttpBody = kotlin_io_ktor_ktor_http_cio.$_$.k;
166
+ var expectHttpUpgrade = kotlin_io_ktor_ktor_http_cio.$_$.l;
167
+ var copy = kotlin_io_ktor_ktor_io.$_$.i1;
168
+ var Companion_getInstance_7 = kotlin_io_ktor_ktor_io.$_$.v;
169
+ var copyAndClose = kotlin_io_ktor_ktor_io.$_$.a;
170
+ var ByteWriteChannel = kotlin_io_ktor_ktor_io.$_$.x1;
171
+ var parseHttpBody = kotlin_io_ktor_ktor_http_cio.$_$.a;
172
+ var ChannelReadException = kotlin_io_ktor_ktor_utils.$_$.i;
173
+ var ChannelResult = kotlin_org_jetbrains_kotlinx_kotlinx_coroutines_core.$_$.y;
174
+ var ChannelResult__getOrNull_impl_f5e07h = kotlin_org_jetbrains_kotlinx_kotlinx_coroutines_core.$_$.r;
175
+ var withTimeoutOrNull_0 = kotlin_org_jetbrains_kotlinx_kotlinx_coroutines_core.$_$.o;
176
+ var copyTo = kotlin_io_ktor_ktor_io.$_$.c;
177
+ var _ChannelResult___get_isSuccess__impl__odq1z9 = kotlin_org_jetbrains_kotlinx_kotlinx_coroutines_core.$_$.s;
178
+ var InetSocketAddress = kotlin_io_ktor_ktor_network.$_$.c;
179
+ var Path = kotlin_org_jetbrains_kotlinx_kotlinx_io_core.$_$.h;
180
+ var get_SystemFileSystem = kotlin_org_jetbrains_kotlinx_kotlinx_io_core.$_$.i;
181
+ var UnixSocketAddress = kotlin_io_ktor_ktor_network.$_$.d;
182
+ var NetworkAddress = kotlin_io_ktor_ktor_utils.$_$.v;
183
+ //endregion
184
+ //region block: pre-declaration
185
+ initMetadataForObject(CIO, 'CIO', VOID, VOID, [ApplicationEngineFactory]);
186
+ initMetadataForClass(CIOApplicationCall, 'CIOApplicationCall', VOID, BaseApplicationCall, [BaseApplicationCall, CoroutineScope], [1, 2]);
187
+ initMetadataForLambda(CIOApplicationEngine$handleRequest$slambda$slambda, CoroutineImpl, VOID, [0]);
188
+ initMetadataForLambda(CIOApplicationEngine$initServerJob$slambda$slambda, CoroutineImpl, VOID, [1]);
189
+ initMetadataForClass(Configuration_0, 'Configuration', Configuration_0, Configuration);
190
+ initMetadataForLambda(CIOApplicationEngine$start$slambda, CoroutineImpl, VOID, [1]);
191
+ initMetadataForLambda(CIOApplicationEngine$stopSuspend$slambda, CoroutineImpl, VOID, [1]);
192
+ initMetadataForLambda(CIOApplicationEngine$stopSuspend$slambda_1, CoroutineImpl, VOID, [1]);
193
+ initMetadataForLambda(CIOApplicationEngine$stop$slambda, CoroutineImpl, VOID, [1]);
194
+ initMetadataForLambda(CIOApplicationEngine$startConnector$slambda, CoroutineImpl, VOID, [2]);
195
+ initMetadataForLambda(CIOApplicationEngine$startConnector$slambda_1, CoroutineImpl, VOID, [2]);
196
+ initMetadataForLambda(CIOApplicationEngine$addHandlerForExpectedHeader$slambda, CoroutineImpl, VOID, [2]);
197
+ initMetadataForLambda(CIOApplicationEngine$handleRequest$slambda, CoroutineImpl, VOID, [1]);
198
+ initMetadataForLambda(CIOApplicationEngine$initServerJob$slambda, CoroutineImpl, VOID, [1]);
199
+ initMetadataForCoroutine($startSuspendCOROUTINE$, CoroutineImpl);
200
+ initMetadataForCoroutine($stopSuspendCOROUTINE$, CoroutineImpl);
201
+ initMetadataForClass(CIOApplicationEngine, 'CIOApplicationEngine', VOID, BaseApplicationEngine, VOID, [1, 2, 0]);
202
+ initMetadataForClass(CIOApplicationRequest, 'CIOApplicationRequest', VOID, BaseApplicationRequest);
203
+ initMetadataForClass(CIOConnectionPoint, 'CIOConnectionPoint');
204
+ initMetadataForClass(toQueryParameters$1, VOID, VOID, VOID, [Parameters]);
205
+ initMetadataForClass(CIOApplicationResponse$headers$1, VOID, VOID, ResponseHeaders);
206
+ initMetadataForLambda(CIOApplicationResponse$respondFromBytes$slambda, CoroutineImpl, VOID, [1]);
207
+ initMetadataForCoroutine($responseChannelCOROUTINE$, CoroutineImpl);
208
+ initMetadataForCoroutine($respondUpgradeCOROUTINE$, CoroutineImpl);
209
+ initMetadataForCoroutine($respondFromBytesCOROUTINE$, CoroutineImpl);
210
+ initMetadataForCoroutine($respondNoContentCOROUTINE$, CoroutineImpl);
211
+ initMetadataForCoroutine($respondOutgoingContentCOROUTINE$, CoroutineImpl);
212
+ initMetadataForCoroutine($sendResponseMessageCOROUTINE$, CoroutineImpl);
213
+ initMetadataForClass(CIOApplicationResponse, 'CIOApplicationResponse', VOID, BaseApplicationResponse, VOID, [0, 1]);
214
+ initMetadataForClass(HttpServer, 'HttpServer');
215
+ initMetadataForClass(UnixSocketServerSettings, 'UnixSocketServerSettings');
216
+ initMetadataForClass(HttpServerSettings, 'HttpServerSettings', HttpServerSettings);
217
+ initMetadataForInterface(UnixSocketConnectorConfig, 'UnixSocketConnectorConfig');
218
+ initMetadataForLambda(httpServer$slambda, CoroutineImpl, VOID, [1]);
219
+ initMetadataForLambda(httpServer$slambda_1, CoroutineImpl, VOID, [1]);
220
+ initMetadataForClass(ServerIncomingConnection, 'ServerIncomingConnection');
221
+ initMetadataForLambda(startServerConnectionPipeline$slambda$slambda, CoroutineImpl, VOID, [1]);
222
+ initMetadataForLambda(startServerConnectionPipeline$slambda$slambda_1, CoroutineImpl, VOID, [1]);
223
+ initMetadataForLambda(startServerConnectionPipeline$slambda, CoroutineImpl, VOID, [1]);
224
+ initMetadataForLambda(pipelineWriterLoop$slambda, CoroutineImpl, VOID, [1]);
225
+ initMetadataForCoroutine($pipelineWriterLoopCOROUTINE$, CoroutineImpl);
226
+ initMetadataForCoroutine($respondBadRequestCOROUTINE$, CoroutineImpl);
227
+ initMetadataForClass(ServerRequestScope, 'ServerRequestScope', VOID, VOID, [CoroutineScope]);
228
+ initMetadataForLambda(unixSocketServer$slambda, CoroutineImpl, VOID, [1]);
229
+ initMetadataForLambda(unixSocketServer$slambda_1, CoroutineImpl, VOID, [1]);
230
+ //endregion
231
+ function CIO() {
232
+ }
233
+ protoOf(CIO).fbn = function (configure) {
234
+ // Inline function 'kotlin.apply' call
235
+ var this_0 = new Configuration_0();
236
+ configure(this_0);
237
+ return this_0;
238
+ };
239
+ protoOf(CIO).kb2 = function (configure) {
240
+ return this.fbn(configure);
241
+ };
242
+ protoOf(CIO).gbn = function (environment, monitor, developmentMode, configuration, applicationProvider) {
243
+ return new CIOApplicationEngine(environment, monitor, developmentMode, configuration, applicationProvider);
244
+ };
245
+ protoOf(CIO).lb2 = function (environment, monitor, developmentMode, configuration, applicationProvider) {
246
+ return this.gbn(environment, monitor, developmentMode, configuration instanceof Configuration_0 ? configuration : THROW_CCE(), applicationProvider);
247
+ };
248
+ var CIO_instance;
249
+ function CIO_getInstance() {
250
+ return CIO_instance;
251
+ }
252
+ function CIOApplicationCall(application, _request, input, output, engineDispatcher, appDispatcher, upgraded, remoteAddress, localAddress, coroutineContext) {
253
+ BaseApplicationCall.call(this, application);
254
+ this.jbn_1 = coroutineContext;
255
+ this.kbn_1 = new CIOApplicationRequest(this, remoteAddress, localAddress, input, _request);
256
+ this.lbn_1 = new CIOApplicationResponse(this, output, input, engineDispatcher, appDispatcher, upgraded);
257
+ this.wam();
258
+ }
259
+ protoOf(CIOApplicationCall).z1v = function () {
260
+ return this.jbn_1;
261
+ };
262
+ protoOf(CIOApplicationCall).f67 = function () {
263
+ return this.kbn_1;
264
+ };
265
+ protoOf(CIOApplicationCall).w64 = function () {
266
+ return this.lbn_1;
267
+ };
268
+ protoOf(CIOApplicationCall).mbn = function () {
269
+ this.kbn_1.mbn();
270
+ };
271
+ function CIOApplicationEngine$handleRequest$slambda$slambda($this, $context, resultContinuation) {
272
+ this.hbo_1 = $this;
273
+ this.ibo_1 = $context;
274
+ CoroutineImpl.call(this, resultContinuation);
275
+ }
276
+ protoOf(CIOApplicationEngine$handleRequest$slambda$slambda).a4t = function ($completion) {
277
+ var tmp = this.b4t($completion);
278
+ tmp.z9_1 = Unit_instance;
279
+ tmp.aa_1 = null;
280
+ return tmp.fa();
281
+ };
282
+ protoOf(CIOApplicationEngine$handleRequest$slambda$slambda).wb = function ($completion) {
283
+ return this.a4t($completion);
284
+ };
285
+ protoOf(CIOApplicationEngine$handleRequest$slambda$slambda).fa = function () {
286
+ var suspendResult = this.z9_1;
287
+ $sm: do
288
+ try {
289
+ var tmp = this.x9_1;
290
+ switch (tmp) {
291
+ case 0:
292
+ this.y9_1 = 2;
293
+ this.x9_1 = 1;
294
+ suspendResult = this.hbo_1.a55(this.ibo_1, Unit_instance, this);
295
+ if (suspendResult === get_COROUTINE_SUSPENDED()) {
296
+ return suspendResult;
297
+ }
298
+
299
+ continue $sm;
300
+ case 1:
301
+ return Unit_instance;
302
+ case 2:
303
+ throw this.aa_1;
304
+ }
305
+ } catch ($p) {
306
+ var e = $p;
307
+ if (this.y9_1 === 2) {
308
+ throw e;
309
+ } else {
310
+ this.x9_1 = this.y9_1;
311
+ this.aa_1 = e;
312
+ }
313
+ }
314
+ while (true);
315
+ };
316
+ protoOf(CIOApplicationEngine$handleRequest$slambda$slambda).b4t = function (completion) {
317
+ return new CIOApplicationEngine$handleRequest$slambda$slambda(this.hbo_1, this.ibo_1, completion);
318
+ };
319
+ function CIOApplicationEngine$handleRequest$slambda$slambda_0($this, $context, resultContinuation) {
320
+ var i = new CIOApplicationEngine$handleRequest$slambda$slambda($this, $context, resultContinuation);
321
+ var l = function ($completion) {
322
+ return i.a4t($completion);
323
+ };
324
+ l.$arity = 0;
325
+ return l;
326
+ }
327
+ function CIOApplicationEngine$initServerJob$slambda$slambda(this$0, $environment, resultContinuation) {
328
+ this.rbo_1 = this$0;
329
+ this.sbo_1 = $environment;
330
+ CoroutineImpl.call(this, resultContinuation);
331
+ }
332
+ protoOf(CIOApplicationEngine$initServerJob$slambda$slambda).x2q = function ($this$withContext, $completion) {
333
+ var tmp = this.y2q($this$withContext, $completion);
334
+ tmp.z9_1 = Unit_instance;
335
+ tmp.aa_1 = null;
336
+ return tmp.fa();
337
+ };
338
+ protoOf(CIOApplicationEngine$initServerJob$slambda$slambda).ra = function (p1, $completion) {
339
+ return this.x2q((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
340
+ };
341
+ protoOf(CIOApplicationEngine$initServerJob$slambda$slambda).fa = function () {
342
+ var suspendResult = this.z9_1;
343
+ $sm: do
344
+ try {
345
+ var tmp = this.x9_1;
346
+ if (tmp === 0) {
347
+ this.y9_1 = 1;
348
+ this.rbo_1.lan_1.e63(get_ApplicationStopPreparing(), this.sbo_1);
349
+ return Unit_instance;
350
+ } else if (tmp === 1) {
351
+ throw this.aa_1;
352
+ }
353
+ } catch ($p) {
354
+ var e = $p;
355
+ throw e;
356
+ }
357
+ while (true);
358
+ };
359
+ protoOf(CIOApplicationEngine$initServerJob$slambda$slambda).y2q = function ($this$withContext, completion) {
360
+ var i = new CIOApplicationEngine$initServerJob$slambda$slambda(this.rbo_1, this.sbo_1, completion);
361
+ i.tbo_1 = $this$withContext;
362
+ return i;
363
+ };
364
+ function CIOApplicationEngine$initServerJob$slambda$slambda_0(this$0, $environment, resultContinuation) {
365
+ var i = new CIOApplicationEngine$initServerJob$slambda$slambda(this$0, $environment, resultContinuation);
366
+ var l = function ($this$withContext, $completion) {
367
+ return i.x2q($this$withContext, $completion);
368
+ };
369
+ l.$arity = 1;
370
+ return l;
371
+ }
372
+ function Configuration_0() {
373
+ Configuration.call(this);
374
+ this.bbp_1 = 45;
375
+ this.cbp_1 = false;
376
+ }
377
+ function startConnector($this, _this__u8e3s4, connectorSpec) {
378
+ var tmp;
379
+ if (isInterface(connectorSpec, UnixSocketConnectorConfig)) {
380
+ var settings = new UnixSocketServerSettings(connectorSpec.obp(), toLong($this.hbp_1.bbp_1));
381
+ tmp = unixSocketServer(_this__u8e3s4, settings, CIOApplicationEngine$startConnector$slambda_0($this, null));
382
+ } else {
383
+ var settings_0 = new HttpServerSettings(connectorSpec.vb2(), connectorSpec.l5i(), toLong($this.hbp_1.bbp_1), $this.hbp_1.cbp_1);
384
+ tmp = httpServer(_this__u8e3s4, settings_0, CIOApplicationEngine$startConnector$slambda_2($this, null));
385
+ }
386
+ return tmp;
387
+ }
388
+ function addHandlerForExpectedHeader($this, output, call) {
389
+ var continueResponse = 'HTTP/1.1 100 Continue\r\n';
390
+ var expectHeaderValue = '100-continue';
391
+ var expectedHeaderPhase = new PipelinePhase('ExpectedHeaderPhase');
392
+ call.kbn_1.xah().x54(Phases_getInstance().naz_1, expectedHeaderPhase);
393
+ var tmp = call.kbn_1.xah();
394
+ tmp.c55(expectedHeaderPhase, CIOApplicationEngine$addHandlerForExpectedHeader$slambda_0(call, $this, expectHeaderValue, output, continueResponse, null));
395
+ }
396
+ function hasBody($this, request) {
397
+ var tmp0_safe_receiver = request.k5d().cf(HttpHeaders_getInstance().u59_1);
398
+ var contentLength = tmp0_safe_receiver == null ? null : toLong_0(tmp0_safe_receiver);
399
+ var transferEncoding = request.k5d().cf(HttpHeaders_getInstance().b5c_1);
400
+ return !(transferEncoding == null) || (!(contentLength == null) && contentLength.j1(new Long(0, 0)) > 0);
401
+ }
402
+ function handleRequest($this, _this__u8e3s4, request, $completion) {
403
+ return withContext($this.kbp_1, CIOApplicationEngine$handleRequest$slambda_0($this, request, _this__u8e3s4, null), $completion);
404
+ }
405
+ function initServerJob($this) {
406
+ var environment = $this.kan_1;
407
+ var userDispatcher = $this.kbp_1;
408
+ var stopRequest = $this.mbp_1;
409
+ var startupJob = $this.lbp_1;
410
+ var cioConnectors = $this.nan_1;
411
+ var tmp = CoroutineScope_0($this.ibp_1().nac_1.am($this.jbp_1));
412
+ var tmp_0 = CoroutineStart_LAZY_getInstance();
413
+ return launch(tmp, VOID, tmp_0, CIOApplicationEngine$initServerJob$slambda_0($this, cioConnectors, stopRequest, startupJob, userDispatcher, environment, null));
414
+ }
415
+ function CIOApplicationEngine$lambda(this$0) {
416
+ return function (cause) {
417
+ if (cause == null)
418
+ null;
419
+ else {
420
+ // Inline function 'kotlin.let' call
421
+ this$0.mbp_1.x24(cause);
422
+ }
423
+ if (cause == null)
424
+ null;
425
+ else {
426
+ // Inline function 'kotlin.let' call
427
+ this$0.lbp_1.x24(cause);
428
+ }
429
+ return Unit_instance;
430
+ };
431
+ }
432
+ function CIOApplicationEngine$start$slambda(this$0, $wait, resultContinuation) {
433
+ this.xbp_1 = this$0;
434
+ this.ybp_1 = $wait;
435
+ CoroutineImpl.call(this, resultContinuation);
436
+ }
437
+ protoOf(CIOApplicationEngine$start$slambda).xal = function ($this$runBlockingBridge, $completion) {
438
+ var tmp = this.y2q($this$runBlockingBridge, $completion);
439
+ tmp.z9_1 = Unit_instance;
440
+ tmp.aa_1 = null;
441
+ return tmp.fa();
442
+ };
443
+ protoOf(CIOApplicationEngine$start$slambda).ra = function (p1, $completion) {
444
+ return this.xal((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
445
+ };
446
+ protoOf(CIOApplicationEngine$start$slambda).fa = function () {
447
+ var suspendResult = this.z9_1;
448
+ $sm: do
449
+ try {
450
+ var tmp = this.x9_1;
451
+ switch (tmp) {
452
+ case 0:
453
+ this.y9_1 = 2;
454
+ this.x9_1 = 1;
455
+ suspendResult = this.xbp_1.nam(this.ybp_1, this);
456
+ if (suspendResult === get_COROUTINE_SUSPENDED()) {
457
+ return suspendResult;
458
+ }
459
+
460
+ continue $sm;
461
+ case 1:
462
+ return suspendResult;
463
+ case 2:
464
+ throw this.aa_1;
465
+ }
466
+ } catch ($p) {
467
+ var e = $p;
468
+ if (this.y9_1 === 2) {
469
+ throw e;
470
+ } else {
471
+ this.x9_1 = this.y9_1;
472
+ this.aa_1 = e;
473
+ }
474
+ }
475
+ while (true);
476
+ };
477
+ protoOf(CIOApplicationEngine$start$slambda).y2q = function ($this$runBlockingBridge, completion) {
478
+ var i = new CIOApplicationEngine$start$slambda(this.xbp_1, this.ybp_1, completion);
479
+ i.zbp_1 = $this$runBlockingBridge;
480
+ return i;
481
+ };
482
+ function CIOApplicationEngine$start$slambda_0(this$0, $wait, resultContinuation) {
483
+ var i = new CIOApplicationEngine$start$slambda(this$0, $wait, resultContinuation);
484
+ var l = function ($this$runBlockingBridge, $completion) {
485
+ return i.xal($this$runBlockingBridge, $completion);
486
+ };
487
+ l.$arity = 1;
488
+ return l;
489
+ }
490
+ function CIOApplicationEngine$stopSuspend$slambda(this$0, resultContinuation) {
491
+ this.ibq_1 = this$0;
492
+ CoroutineImpl.call(this, resultContinuation);
493
+ }
494
+ protoOf(CIOApplicationEngine$stopSuspend$slambda).kbq = function ($this$withTimeoutOrNull, $completion) {
495
+ var tmp = this.y2q($this$withTimeoutOrNull, $completion);
496
+ tmp.z9_1 = Unit_instance;
497
+ tmp.aa_1 = null;
498
+ return tmp.fa();
499
+ };
500
+ protoOf(CIOApplicationEngine$stopSuspend$slambda).ra = function (p1, $completion) {
501
+ return this.kbq((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
502
+ };
503
+ protoOf(CIOApplicationEngine$stopSuspend$slambda).fa = function () {
504
+ var suspendResult = this.z9_1;
505
+ $sm: do
506
+ try {
507
+ var tmp = this.x9_1;
508
+ switch (tmp) {
509
+ case 0:
510
+ this.y9_1 = 2;
511
+ this.x9_1 = 1;
512
+ suspendResult = this.ibq_1.nbp_1.g1x(this);
513
+ if (suspendResult === get_COROUTINE_SUSPENDED()) {
514
+ return suspendResult;
515
+ }
516
+
517
+ continue $sm;
518
+ case 1:
519
+ return true;
520
+ case 2:
521
+ throw this.aa_1;
522
+ }
523
+ } catch ($p) {
524
+ var e = $p;
525
+ if (this.y9_1 === 2) {
526
+ throw e;
527
+ } else {
528
+ this.x9_1 = this.y9_1;
529
+ this.aa_1 = e;
530
+ }
531
+ }
532
+ while (true);
533
+ };
534
+ protoOf(CIOApplicationEngine$stopSuspend$slambda).y2q = function ($this$withTimeoutOrNull, completion) {
535
+ var i = new CIOApplicationEngine$stopSuspend$slambda(this.ibq_1, completion);
536
+ i.jbq_1 = $this$withTimeoutOrNull;
537
+ return i;
538
+ };
539
+ function CIOApplicationEngine$stopSuspend$slambda_0(this$0, resultContinuation) {
540
+ var i = new CIOApplicationEngine$stopSuspend$slambda(this$0, resultContinuation);
541
+ var l = function ($this$withTimeoutOrNull, $completion) {
542
+ return i.kbq($this$withTimeoutOrNull, $completion);
543
+ };
544
+ l.$arity = 1;
545
+ return l;
546
+ }
547
+ function CIOApplicationEngine$stopSuspend$slambda_1(this$0, resultContinuation) {
548
+ this.tbq_1 = this$0;
549
+ CoroutineImpl.call(this, resultContinuation);
550
+ }
551
+ protoOf(CIOApplicationEngine$stopSuspend$slambda_1).x2q = function ($this$withTimeoutOrNull, $completion) {
552
+ var tmp = this.y2q($this$withTimeoutOrNull, $completion);
553
+ tmp.z9_1 = Unit_instance;
554
+ tmp.aa_1 = null;
555
+ return tmp.fa();
556
+ };
557
+ protoOf(CIOApplicationEngine$stopSuspend$slambda_1).ra = function (p1, $completion) {
558
+ return this.x2q((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
559
+ };
560
+ protoOf(CIOApplicationEngine$stopSuspend$slambda_1).fa = function () {
561
+ var suspendResult = this.z9_1;
562
+ $sm: do
563
+ try {
564
+ var tmp = this.x9_1;
565
+ switch (tmp) {
566
+ case 0:
567
+ this.y9_1 = 2;
568
+ this.x9_1 = 1;
569
+ suspendResult = this.tbq_1.nbp_1.g1x(this);
570
+ if (suspendResult === get_COROUTINE_SUSPENDED()) {
571
+ return suspendResult;
572
+ }
573
+
574
+ continue $sm;
575
+ case 1:
576
+ return Unit_instance;
577
+ case 2:
578
+ throw this.aa_1;
579
+ }
580
+ } catch ($p) {
581
+ var e = $p;
582
+ if (this.y9_1 === 2) {
583
+ throw e;
584
+ } else {
585
+ this.x9_1 = this.y9_1;
586
+ this.aa_1 = e;
587
+ }
588
+ }
589
+ while (true);
590
+ };
591
+ protoOf(CIOApplicationEngine$stopSuspend$slambda_1).y2q = function ($this$withTimeoutOrNull, completion) {
592
+ var i = new CIOApplicationEngine$stopSuspend$slambda_1(this.tbq_1, completion);
593
+ i.ubq_1 = $this$withTimeoutOrNull;
594
+ return i;
595
+ };
596
+ function CIOApplicationEngine$stopSuspend$slambda_2(this$0, resultContinuation) {
597
+ var i = new CIOApplicationEngine$stopSuspend$slambda_1(this$0, resultContinuation);
598
+ var l = function ($this$withTimeoutOrNull, $completion) {
599
+ return i.x2q($this$withTimeoutOrNull, $completion);
600
+ };
601
+ l.$arity = 1;
602
+ return l;
603
+ }
604
+ function CIOApplicationEngine$stop$slambda(this$0, $gracePeriodMillis, $timeoutMillis, resultContinuation) {
605
+ this.dbr_1 = this$0;
606
+ this.ebr_1 = $gracePeriodMillis;
607
+ this.fbr_1 = $timeoutMillis;
608
+ CoroutineImpl.call(this, resultContinuation);
609
+ }
610
+ protoOf(CIOApplicationEngine$stop$slambda).x2q = function ($this$runBlockingBridge, $completion) {
611
+ var tmp = this.y2q($this$runBlockingBridge, $completion);
612
+ tmp.z9_1 = Unit_instance;
613
+ tmp.aa_1 = null;
614
+ return tmp.fa();
615
+ };
616
+ protoOf(CIOApplicationEngine$stop$slambda).ra = function (p1, $completion) {
617
+ return this.x2q((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
618
+ };
619
+ protoOf(CIOApplicationEngine$stop$slambda).fa = function () {
620
+ var suspendResult = this.z9_1;
621
+ $sm: do
622
+ try {
623
+ var tmp = this.x9_1;
624
+ switch (tmp) {
625
+ case 0:
626
+ this.y9_1 = 2;
627
+ this.x9_1 = 1;
628
+ suspendResult = this.dbr_1.oam(this.ebr_1, this.fbr_1, this);
629
+ if (suspendResult === get_COROUTINE_SUSPENDED()) {
630
+ return suspendResult;
631
+ }
632
+
633
+ continue $sm;
634
+ case 1:
635
+ return Unit_instance;
636
+ case 2:
637
+ throw this.aa_1;
638
+ }
639
+ } catch ($p) {
640
+ var e = $p;
641
+ if (this.y9_1 === 2) {
642
+ throw e;
643
+ } else {
644
+ this.x9_1 = this.y9_1;
645
+ this.aa_1 = e;
646
+ }
647
+ }
648
+ while (true);
649
+ };
650
+ protoOf(CIOApplicationEngine$stop$slambda).y2q = function ($this$runBlockingBridge, completion) {
651
+ var i = new CIOApplicationEngine$stop$slambda(this.dbr_1, this.ebr_1, this.fbr_1, completion);
652
+ i.gbr_1 = $this$runBlockingBridge;
653
+ return i;
654
+ };
655
+ function CIOApplicationEngine$stop$slambda_0(this$0, $gracePeriodMillis, $timeoutMillis, resultContinuation) {
656
+ var i = new CIOApplicationEngine$stop$slambda(this$0, $gracePeriodMillis, $timeoutMillis, resultContinuation);
657
+ var l = function ($this$runBlockingBridge, $completion) {
658
+ return i.x2q($this$runBlockingBridge, $completion);
659
+ };
660
+ l.$arity = 1;
661
+ return l;
662
+ }
663
+ function CIOApplicationEngine$startConnector$slambda(this$0, resultContinuation) {
664
+ this.pbr_1 = this$0;
665
+ CoroutineImpl.call(this, resultContinuation);
666
+ }
667
+ protoOf(CIOApplicationEngine$startConnector$slambda).sbr = function ($this$unixSocketServer, request, $completion) {
668
+ var tmp = this.tbr($this$unixSocketServer, request, $completion);
669
+ tmp.z9_1 = Unit_instance;
670
+ tmp.aa_1 = null;
671
+ return tmp.fa();
672
+ };
673
+ protoOf(CIOApplicationEngine$startConnector$slambda).sa = function (p1, p2, $completion) {
674
+ var tmp = p1 instanceof ServerRequestScope ? p1 : THROW_CCE();
675
+ return this.sbr(tmp, p2 instanceof Request ? p2 : THROW_CCE(), $completion);
676
+ };
677
+ protoOf(CIOApplicationEngine$startConnector$slambda).fa = function () {
678
+ var suspendResult = this.z9_1;
679
+ $sm: do
680
+ try {
681
+ var tmp = this.x9_1;
682
+ switch (tmp) {
683
+ case 0:
684
+ this.y9_1 = 2;
685
+ this.x9_1 = 1;
686
+ suspendResult = handleRequest(this.pbr_1, this.qbr_1, this.rbr_1, this);
687
+ if (suspendResult === get_COROUTINE_SUSPENDED()) {
688
+ return suspendResult;
689
+ }
690
+
691
+ continue $sm;
692
+ case 1:
693
+ return Unit_instance;
694
+ case 2:
695
+ throw this.aa_1;
696
+ }
697
+ } catch ($p) {
698
+ var e = $p;
699
+ if (this.y9_1 === 2) {
700
+ throw e;
701
+ } else {
702
+ this.x9_1 = this.y9_1;
703
+ this.aa_1 = e;
704
+ }
705
+ }
706
+ while (true);
707
+ };
708
+ protoOf(CIOApplicationEngine$startConnector$slambda).tbr = function ($this$unixSocketServer, request, completion) {
709
+ var i = new CIOApplicationEngine$startConnector$slambda(this.pbr_1, completion);
710
+ i.qbr_1 = $this$unixSocketServer;
711
+ i.rbr_1 = request;
712
+ return i;
713
+ };
714
+ function CIOApplicationEngine$startConnector$slambda_0(this$0, resultContinuation) {
715
+ var i = new CIOApplicationEngine$startConnector$slambda(this$0, resultContinuation);
716
+ var l = function ($this$unixSocketServer, request, $completion) {
717
+ return i.sbr($this$unixSocketServer, request, $completion);
718
+ };
719
+ l.$arity = 2;
720
+ return l;
721
+ }
722
+ function CIOApplicationEngine$startConnector$slambda_1(this$0, resultContinuation) {
723
+ this.cbs_1 = this$0;
724
+ CoroutineImpl.call(this, resultContinuation);
725
+ }
726
+ protoOf(CIOApplicationEngine$startConnector$slambda_1).sbr = function ($this$httpServer, request, $completion) {
727
+ var tmp = this.tbr($this$httpServer, request, $completion);
728
+ tmp.z9_1 = Unit_instance;
729
+ tmp.aa_1 = null;
730
+ return tmp.fa();
731
+ };
732
+ protoOf(CIOApplicationEngine$startConnector$slambda_1).sa = function (p1, p2, $completion) {
733
+ var tmp = p1 instanceof ServerRequestScope ? p1 : THROW_CCE();
734
+ return this.sbr(tmp, p2 instanceof Request ? p2 : THROW_CCE(), $completion);
735
+ };
736
+ protoOf(CIOApplicationEngine$startConnector$slambda_1).fa = function () {
737
+ var suspendResult = this.z9_1;
738
+ $sm: do
739
+ try {
740
+ var tmp = this.x9_1;
741
+ switch (tmp) {
742
+ case 0:
743
+ this.y9_1 = 2;
744
+ this.x9_1 = 1;
745
+ suspendResult = handleRequest(this.cbs_1, this.dbs_1, this.ebs_1, this);
746
+ if (suspendResult === get_COROUTINE_SUSPENDED()) {
747
+ return suspendResult;
748
+ }
749
+
750
+ continue $sm;
751
+ case 1:
752
+ return Unit_instance;
753
+ case 2:
754
+ throw this.aa_1;
755
+ }
756
+ } catch ($p) {
757
+ var e = $p;
758
+ if (this.y9_1 === 2) {
759
+ throw e;
760
+ } else {
761
+ this.x9_1 = this.y9_1;
762
+ this.aa_1 = e;
763
+ }
764
+ }
765
+ while (true);
766
+ };
767
+ protoOf(CIOApplicationEngine$startConnector$slambda_1).tbr = function ($this$httpServer, request, completion) {
768
+ var i = new CIOApplicationEngine$startConnector$slambda_1(this.cbs_1, completion);
769
+ i.dbs_1 = $this$httpServer;
770
+ i.ebs_1 = request;
771
+ return i;
772
+ };
773
+ function CIOApplicationEngine$startConnector$slambda_2(this$0, resultContinuation) {
774
+ var i = new CIOApplicationEngine$startConnector$slambda_1(this$0, resultContinuation);
775
+ var l = function ($this$httpServer, request, $completion) {
776
+ return i.sbr($this$httpServer, request, $completion);
777
+ };
778
+ l.$arity = 2;
779
+ return l;
780
+ }
781
+ function CIOApplicationEngine$addHandlerForExpectedHeader$slambda($call, this$0, $expectHeaderValue, $output, $continueResponse, resultContinuation) {
782
+ this.nbs_1 = $call;
783
+ this.obs_1 = this$0;
784
+ this.pbs_1 = $expectHeaderValue;
785
+ this.qbs_1 = $output;
786
+ this.rbs_1 = $continueResponse;
787
+ CoroutineImpl.call(this, resultContinuation);
788
+ }
789
+ protoOf(CIOApplicationEngine$addHandlerForExpectedHeader$slambda).maq = function ($this$intercept, it, $completion) {
790
+ var tmp = this.naq($this$intercept, it, $completion);
791
+ tmp.z9_1 = Unit_instance;
792
+ tmp.aa_1 = null;
793
+ return tmp.fa();
794
+ };
795
+ protoOf(CIOApplicationEngine$addHandlerForExpectedHeader$slambda).sa = function (p1, p2, $completion) {
796
+ var tmp = p1 instanceof PipelineContext ? p1 : THROW_CCE();
797
+ return this.maq(tmp, !(p2 == null) ? p2 : THROW_CCE(), $completion);
798
+ };
799
+ protoOf(CIOApplicationEngine$addHandlerForExpectedHeader$slambda).fa = function () {
800
+ var suspendResult = this.z9_1;
801
+ $sm: do
802
+ try {
803
+ var tmp = this.x9_1;
804
+ switch (tmp) {
805
+ case 0:
806
+ this.y9_1 = 5;
807
+ this.ubs_1 = this.nbs_1.kbn_1;
808
+ this.vbs_1 = Companion_getInstance().pr(get_httpVersion(this.ubs_1));
809
+ var tmp_0 = this;
810
+ var tmp0_safe_receiver = this.nbs_1.kbn_1.k5d().cf(HttpHeaders_getInstance().f5a_1);
811
+ var tmp_1;
812
+ if (tmp0_safe_receiver == null) {
813
+ tmp_1 = null;
814
+ } else {
815
+ tmp_1 = tmp0_safe_receiver.toLowerCase();
816
+ }
817
+
818
+ tmp_0.wbs_1 = tmp_1;
819
+ this.xbs_1 = hasBody(this.obs_1, this.ubs_1);
820
+ if (this.wbs_1 == null || this.vbs_1.equals(Companion_getInstance().x5d_1) || !this.xbs_1) {
821
+ return Unit_instance;
822
+ }
823
+
824
+ if (!(this.wbs_1 === this.pbs_1)) {
825
+ var tmp_2 = this;
826
+ tmp_2.zbs_1 = this.nbs_1;
827
+ var tmp_3 = this;
828
+ tmp_3.abt_1 = Companion_getInstance_0().p5f_1;
829
+ this.bbt_1 = this.zbs_1;
830
+ this.cbt_1 = this.abt_1;
831
+ this.x9_1 = 3;
832
+ var tmp_4 = getKClass(HttpStatusCode);
833
+ var tmp_5;
834
+ try {
835
+ tmp_5 = createKType(getKClass(HttpStatusCode), arrayOf([]), false);
836
+ } catch ($p) {
837
+ var tmp_6;
838
+ if ($p instanceof Error) {
839
+ var _unused_var__etf5q3 = $p;
840
+ tmp_6 = null;
841
+ } else {
842
+ throw $p;
843
+ }
844
+ tmp_5 = tmp_6;
845
+ }
846
+ suspendResult = this.bbt_1.kai(this.cbt_1, new TypeInfo(tmp_4, tmp_5), this);
847
+ if (suspendResult === get_COROUTINE_SUSPENDED()) {
848
+ return suspendResult;
849
+ }
850
+ continue $sm;
851
+ } else {
852
+ var tmp_7 = this;
853
+ tmp_7.dbt_1 = this.qbs_1;
854
+ this.ebt_1 = this.dbt_1;
855
+ var tmp_8 = this;
856
+ tmp_8.fbt_1 = this.ebt_1;
857
+ this.gbt_1 = this.fbt_1;
858
+ this.x9_1 = 1;
859
+ suspendResult = writeStringUtf8(this.qbs_1, this.rbs_1, this);
860
+ if (suspendResult === get_COROUTINE_SUSPENDED()) {
861
+ return suspendResult;
862
+ }
863
+ continue $sm;
864
+ }
865
+
866
+ case 1:
867
+ this.x9_1 = 2;
868
+ suspendResult = this.qbs_1.c4i(this);
869
+ if (suspendResult === get_COROUTINE_SUSPENDED()) {
870
+ return suspendResult;
871
+ }
872
+
873
+ continue $sm;
874
+ case 2:
875
+ this.ybs_1 = this.ebt_1;
876
+ this.x9_1 = 4;
877
+ continue $sm;
878
+ case 3:
879
+ this.ybs_1 = Unit_instance;
880
+ this.x9_1 = 4;
881
+ continue $sm;
882
+ case 4:
883
+ return Unit_instance;
884
+ case 5:
885
+ throw this.aa_1;
886
+ }
887
+ } catch ($p) {
888
+ var e = $p;
889
+ if (this.y9_1 === 5) {
890
+ throw e;
891
+ } else {
892
+ this.x9_1 = this.y9_1;
893
+ this.aa_1 = e;
894
+ }
895
+ }
896
+ while (true);
897
+ };
898
+ protoOf(CIOApplicationEngine$addHandlerForExpectedHeader$slambda).naq = function ($this$intercept, it, completion) {
899
+ var i = new CIOApplicationEngine$addHandlerForExpectedHeader$slambda(this.nbs_1, this.obs_1, this.pbs_1, this.qbs_1, this.rbs_1, completion);
900
+ i.sbs_1 = $this$intercept;
901
+ i.tbs_1 = it;
902
+ return i;
903
+ };
904
+ function CIOApplicationEngine$addHandlerForExpectedHeader$slambda_0($call, this$0, $expectHeaderValue, $output, $continueResponse, resultContinuation) {
905
+ var i = new CIOApplicationEngine$addHandlerForExpectedHeader$slambda($call, this$0, $expectHeaderValue, $output, $continueResponse, resultContinuation);
906
+ var l = function ($this$intercept, it, $completion) {
907
+ return i.maq($this$intercept, it, $completion);
908
+ };
909
+ l.$arity = 2;
910
+ return l;
911
+ }
912
+ function CIOApplicationEngine$handleRequest$slambda(this$0, $request, $this_handleRequest, resultContinuation) {
913
+ this.pbt_1 = this$0;
914
+ this.qbt_1 = $request;
915
+ this.rbt_1 = $this_handleRequest;
916
+ CoroutineImpl.call(this, resultContinuation);
917
+ }
918
+ protoOf(CIOApplicationEngine$handleRequest$slambda).x2q = function ($this$requestContext, $completion) {
919
+ var tmp = this.y2q($this$requestContext, $completion);
920
+ tmp.z9_1 = Unit_instance;
921
+ tmp.aa_1 = null;
922
+ return tmp.fa();
923
+ };
924
+ protoOf(CIOApplicationEngine$handleRequest$slambda).ra = function (p1, $completion) {
925
+ return this.x2q((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
926
+ };
927
+ protoOf(CIOApplicationEngine$handleRequest$slambda).fa = function () {
928
+ var suspendResult = this.z9_1;
929
+ $sm: do
930
+ try {
931
+ var tmp = this.x9_1;
932
+ switch (tmp) {
933
+ case 0:
934
+ this.y9_1 = 7;
935
+ this.tbt_1 = new CIOApplicationCall(this.pbt_1.ibp_1(), this.qbt_1, this.rbt_1.bbu_1, this.rbt_1.cbu_1, this.pbt_1.jbp_1, this.pbt_1.kbp_1, this.rbt_1.fbu_1, this.rbt_1.dbu_1, this.rbt_1.ebu_1, this.sbt_1.z1v());
936
+ this.x9_1 = 1;
937
+ continue $sm;
938
+ case 1:
939
+ this.y9_1 = 6;
940
+ this.y9_1 = 3;
941
+ addHandlerForExpectedHeader(this.pbt_1, this.rbt_1.cbu_1, this.tbt_1);
942
+ var tmp_0 = this;
943
+ tmp_0.vbt_1 = this.pbt_1.man_1;
944
+ var tmp_1 = this;
945
+ tmp_1.wbt_1 = this.tbt_1;
946
+ this.xbt_1 = this.vbt_1;
947
+ this.ybt_1 = this.wbt_1;
948
+ this.x9_1 = 2;
949
+ suspendResult = initContextInDebugMode(CIOApplicationEngine$handleRequest$slambda$slambda_0(this.xbt_1, this.ybt_1, null), this);
950
+ if (suspendResult === get_COROUTINE_SUSPENDED()) {
951
+ return suspendResult;
952
+ }
953
+
954
+ continue $sm;
955
+ case 2:
956
+ this.ubt_1 = Unit_instance;
957
+ this.y9_1 = 7;
958
+ this.x9_1 = 5;
959
+ continue $sm;
960
+ case 3:
961
+ this.y9_1 = 6;
962
+ var tmp_2 = this.aa_1;
963
+ if (tmp_2 instanceof Error) {
964
+ this.zbt_1 = this.aa_1;
965
+ this.x9_1 = 4;
966
+ suspendResult = handleFailure(this.tbt_1, this.zbt_1, this);
967
+ if (suspendResult === get_COROUTINE_SUSPENDED()) {
968
+ return suspendResult;
969
+ }
970
+ continue $sm;
971
+ } else {
972
+ throw this.aa_1;
973
+ }
974
+
975
+ case 4:
976
+ this.ubt_1 = suspendResult;
977
+ this.y9_1 = 7;
978
+ this.x9_1 = 5;
979
+ continue $sm;
980
+ case 5:
981
+ this.y9_1 = 7;
982
+ this.tbt_1.mbn();
983
+ return Unit_instance;
984
+ case 6:
985
+ this.y9_1 = 7;
986
+ var t = this.aa_1;
987
+ this.tbt_1.mbn();
988
+ throw t;
989
+ case 7:
990
+ throw this.aa_1;
991
+ }
992
+ } catch ($p) {
993
+ var e = $p;
994
+ if (this.y9_1 === 7) {
995
+ throw e;
996
+ } else {
997
+ this.x9_1 = this.y9_1;
998
+ this.aa_1 = e;
999
+ }
1000
+ }
1001
+ while (true);
1002
+ };
1003
+ protoOf(CIOApplicationEngine$handleRequest$slambda).y2q = function ($this$requestContext, completion) {
1004
+ var i = new CIOApplicationEngine$handleRequest$slambda(this.pbt_1, this.qbt_1, this.rbt_1, completion);
1005
+ i.sbt_1 = $this$requestContext;
1006
+ return i;
1007
+ };
1008
+ function CIOApplicationEngine$handleRequest$slambda_0(this$0, $request, $this_handleRequest, resultContinuation) {
1009
+ var i = new CIOApplicationEngine$handleRequest$slambda(this$0, $request, $this_handleRequest, resultContinuation);
1010
+ var l = function ($this$requestContext, $completion) {
1011
+ return i.x2q($this$requestContext, $completion);
1012
+ };
1013
+ l.$arity = 1;
1014
+ return l;
1015
+ }
1016
+ function CIOApplicationEngine$initServerJob$slambda(this$0, $cioConnectors, $stopRequest, $startupJob, $userDispatcher, $environment, resultContinuation) {
1017
+ this.obu_1 = this$0;
1018
+ this.pbu_1 = $cioConnectors;
1019
+ this.qbu_1 = $stopRequest;
1020
+ this.rbu_1 = $startupJob;
1021
+ this.sbu_1 = $userDispatcher;
1022
+ this.tbu_1 = $environment;
1023
+ CoroutineImpl.call(this, resultContinuation);
1024
+ }
1025
+ protoOf(CIOApplicationEngine$initServerJob$slambda).x2q = function ($this$launch, $completion) {
1026
+ var tmp = this.y2q($this$launch, $completion);
1027
+ tmp.z9_1 = Unit_instance;
1028
+ tmp.aa_1 = null;
1029
+ return tmp.fa();
1030
+ };
1031
+ protoOf(CIOApplicationEngine$initServerJob$slambda).ra = function (p1, $completion) {
1032
+ return this.x2q((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
1033
+ };
1034
+ protoOf(CIOApplicationEngine$initServerJob$slambda).fa = function () {
1035
+ var suspendResult = this.z9_1;
1036
+ $sm: do
1037
+ try {
1038
+ var tmp = this.x9_1;
1039
+ switch (tmp) {
1040
+ case 0:
1041
+ this.y9_1 = 9;
1042
+ this.vbu_1 = ArrayList_init_$Create$(this.obu_1.hbp_1.lal_1.s());
1043
+ this.y9_1 = 4;
1044
+ var _iterator__ex2g4s = this.obu_1.hbp_1.lal_1.p();
1045
+ while (_iterator__ex2g4s.q()) {
1046
+ var element = _iterator__ex2g4s.r();
1047
+ if (element.ub2().equals(Companion_getInstance_1().rb2_1)) {
1048
+ throw UnsupportedOperationException_init_$Create$('CIO Engine does not currently support HTTPS. Please consider using a different engine if you require HTTPS');
1049
+ }
1050
+ }
1051
+
1052
+ var tmp_0 = this;
1053
+ var this_0 = this.obu_1.hbp_1.lal_1;
1054
+ var destination = ArrayList_init_$Create$(collectionSizeOrDefault(this_0, 10));
1055
+ var _iterator__ex2g4s_0 = this_0.p();
1056
+ while (_iterator__ex2g4s_0.q()) {
1057
+ var item = _iterator__ex2g4s_0.r();
1058
+ destination.h(to(item, startConnector(this.obu_1, this.ubu_1, item)));
1059
+ }
1060
+
1061
+ tmp_0.xbu_1 = destination;
1062
+ var this_1 = this.xbu_1;
1063
+ var destination_0 = ArrayList_init_$Create$(collectionSizeOrDefault(this_1, 10));
1064
+ var _iterator__ex2g4s_1 = this_1.p();
1065
+ while (_iterator__ex2g4s_1.q()) {
1066
+ var item_0 = _iterator__ex2g4s_1.r();
1067
+ destination_0.h(item_0.ri_1);
1068
+ }
1069
+
1070
+ this.vbu_1.t(destination_0);
1071
+ var tmp_1 = this;
1072
+ tmp_1.ybu_1 = this.xbu_1;
1073
+ this.zbu_1 = this.ybu_1;
1074
+ var tmp_2 = this;
1075
+ tmp_2.abv_1 = this.zbu_1;
1076
+ var tmp_3 = this;
1077
+ tmp_3.bbv_1 = ArrayList_init_$Create$(collectionSizeOrDefault(this.zbu_1, 10));
1078
+ this.cbv_1 = this.abv_1;
1079
+ this.dbv_1 = this.bbv_1;
1080
+ this.ebv_1 = this.cbv_1.p();
1081
+ this.x9_1 = 1;
1082
+ continue $sm;
1083
+ case 1:
1084
+ if (!this.ebv_1.q()) {
1085
+ this.x9_1 = 3;
1086
+ continue $sm;
1087
+ }
1088
+
1089
+ this.fbv_1 = this.ebv_1.r();
1090
+ var tmp_4 = this;
1091
+ tmp_4.gbv_1 = this.fbv_1;
1092
+ this.hbv_1 = this.gbv_1;
1093
+ this.ibv_1 = this.hbv_1.si();
1094
+ this.jbv_1 = this.hbv_1.ti();
1095
+ this.x9_1 = 2;
1096
+ suspendResult = this.jbv_1.rbv_1.w21(this);
1097
+ if (suspendResult === get_COROUTINE_SUSPENDED()) {
1098
+ return suspendResult;
1099
+ }
1100
+
1101
+ continue $sm;
1102
+ case 2:
1103
+ this.kbv_1 = suspendResult;
1104
+ this.lbv_1 = to(this.ibv_1, this.kbv_1);
1105
+ this.dbv_1.h(this.lbv_1);
1106
+ this.x9_1 = 1;
1107
+ continue $sm;
1108
+ case 3:
1109
+ this.mbv_1 = this.dbv_1;
1110
+ var tmp_5 = this;
1111
+ var this_2 = this.mbv_1;
1112
+ var destination_1 = ArrayList_init_$Create$(collectionSizeOrDefault(this_2, 10));
1113
+ var _iterator__ex2g4s_2 = this_2.p();
1114
+ while (_iterator__ex2g4s_2.q()) {
1115
+ var item_1 = _iterator__ex2g4s_2.r();
1116
+ var connector = item_1.si();
1117
+ var socket = item_1.ti();
1118
+ var tmp0_safe_receiver = get_port_0(socket.jb4());
1119
+ var tmp_6;
1120
+ if (tmp0_safe_receiver == null) {
1121
+ tmp_6 = null;
1122
+ } else {
1123
+ tmp_6 = withPort(connector, tmp0_safe_receiver);
1124
+ }
1125
+ var tmp1_elvis_lhs = tmp_6;
1126
+ destination_1.h(tmp1_elvis_lhs == null ? connector : tmp1_elvis_lhs);
1127
+ }
1128
+
1129
+ tmp_5.nbv_1 = destination_1;
1130
+ this.wbu_1 = this.pbu_1.n24(this.nbv_1);
1131
+ this.y9_1 = 9;
1132
+ this.x9_1 = 5;
1133
+ continue $sm;
1134
+ case 4:
1135
+ this.y9_1 = 9;
1136
+ var tmp_7 = this.aa_1;
1137
+ if (tmp_7 instanceof Error) {
1138
+ this.obv_1 = this.aa_1;
1139
+ var tmp_8 = this;
1140
+ var _iterator__ex2g4s_3 = this.vbu_1.p();
1141
+ while (_iterator__ex2g4s_3.q()) {
1142
+ var element_0 = _iterator__ex2g4s_3.r();
1143
+ element_0.pbv_1.k1x();
1144
+ }
1145
+ this.qbu_1.x24(this.obv_1);
1146
+ this.rbu_1.x24(this.obv_1);
1147
+ throw this.obv_1;
1148
+ } else {
1149
+ throw this.aa_1;
1150
+ }
1151
+
1152
+ case 5:
1153
+ this.y9_1 = 9;
1154
+ this.rbu_1.n24(Unit_instance);
1155
+ this.x9_1 = 6;
1156
+ suspendResult = this.qbu_1.g1x(this);
1157
+ if (suspendResult === get_COROUTINE_SUSPENDED()) {
1158
+ return suspendResult;
1159
+ }
1160
+
1161
+ continue $sm;
1162
+ case 6:
1163
+ var _iterator__ex2g4s_4 = this.vbu_1.p();
1164
+ while (_iterator__ex2g4s_4.q()) {
1165
+ var element_1 = _iterator__ex2g4s_4.r();
1166
+ element_1.qbv_1.k1x();
1167
+ }
1168
+
1169
+ this.x9_1 = 7;
1170
+ suspendResult = withContext(this.sbu_1, CIOApplicationEngine$initServerJob$slambda$slambda_0(this.obu_1, this.tbu_1, null), this);
1171
+ if (suspendResult === get_COROUTINE_SUSPENDED()) {
1172
+ return suspendResult;
1173
+ }
1174
+
1175
+ continue $sm;
1176
+ case 7:
1177
+ this.x9_1 = 8;
1178
+ var this_3 = this.vbu_1;
1179
+ var destination_2 = ArrayList_init_$Create$(collectionSizeOrDefault(this_3, 10));
1180
+ var _iterator__ex2g4s_5 = this_3.p();
1181
+ while (_iterator__ex2g4s_5.q()) {
1182
+ var item_2 = _iterator__ex2g4s_5.r();
1183
+ destination_2.h(item_2.pbv_1);
1184
+ }
1185
+
1186
+ suspendResult = joinAll(destination_2, this);
1187
+ if (suspendResult === get_COROUTINE_SUSPENDED()) {
1188
+ return suspendResult;
1189
+ }
1190
+
1191
+ continue $sm;
1192
+ case 8:
1193
+ return Unit_instance;
1194
+ case 9:
1195
+ throw this.aa_1;
1196
+ }
1197
+ } catch ($p) {
1198
+ var e = $p;
1199
+ if (this.y9_1 === 9) {
1200
+ throw e;
1201
+ } else {
1202
+ this.x9_1 = this.y9_1;
1203
+ this.aa_1 = e;
1204
+ }
1205
+ }
1206
+ while (true);
1207
+ };
1208
+ protoOf(CIOApplicationEngine$initServerJob$slambda).y2q = function ($this$launch, completion) {
1209
+ var i = new CIOApplicationEngine$initServerJob$slambda(this.obu_1, this.pbu_1, this.qbu_1, this.rbu_1, this.sbu_1, this.tbu_1, completion);
1210
+ i.ubu_1 = $this$launch;
1211
+ return i;
1212
+ };
1213
+ function CIOApplicationEngine$initServerJob$slambda_0(this$0, $cioConnectors, $stopRequest, $startupJob, $userDispatcher, $environment, resultContinuation) {
1214
+ var i = new CIOApplicationEngine$initServerJob$slambda(this$0, $cioConnectors, $stopRequest, $startupJob, $userDispatcher, $environment, resultContinuation);
1215
+ var l = function ($this$launch, $completion) {
1216
+ return i.x2q($this$launch, $completion);
1217
+ };
1218
+ l.$arity = 1;
1219
+ return l;
1220
+ }
1221
+ function $startSuspendCOROUTINE$(_this__u8e3s4, wait, resultContinuation) {
1222
+ CoroutineImpl.call(this, resultContinuation);
1223
+ this.abw_1 = _this__u8e3s4;
1224
+ this.bbw_1 = wait;
1225
+ }
1226
+ protoOf($startSuspendCOROUTINE$).fa = function () {
1227
+ var suspendResult = this.z9_1;
1228
+ $sm: do
1229
+ try {
1230
+ var tmp = this.x9_1;
1231
+ switch (tmp) {
1232
+ case 0:
1233
+ this.y9_1 = 4;
1234
+ this.abw_1.nbp_1.x1w();
1235
+ this.x9_1 = 1;
1236
+ suspendResult = this.abw_1.lbp_1.w21(this);
1237
+ if (suspendResult === get_COROUTINE_SUSPENDED()) {
1238
+ return suspendResult;
1239
+ }
1240
+
1241
+ continue $sm;
1242
+ case 1:
1243
+ raiseCatching(this.abw_1.lan_1, get_ServerReady(), this.abw_1.kan_1, this.abw_1.kan_1.jan());
1244
+ if (this.bbw_1) {
1245
+ this.x9_1 = 2;
1246
+ suspendResult = this.abw_1.nbp_1.g1x(this);
1247
+ if (suspendResult === get_COROUTINE_SUSPENDED()) {
1248
+ return suspendResult;
1249
+ }
1250
+ continue $sm;
1251
+ } else {
1252
+ this.x9_1 = 3;
1253
+ continue $sm;
1254
+ }
1255
+
1256
+ case 2:
1257
+ this.x9_1 = 3;
1258
+ continue $sm;
1259
+ case 3:
1260
+ return this.abw_1;
1261
+ case 4:
1262
+ throw this.aa_1;
1263
+ }
1264
+ } catch ($p) {
1265
+ var e = $p;
1266
+ if (this.y9_1 === 4) {
1267
+ throw e;
1268
+ } else {
1269
+ this.x9_1 = this.y9_1;
1270
+ this.aa_1 = e;
1271
+ }
1272
+ }
1273
+ while (true);
1274
+ };
1275
+ function $stopSuspendCOROUTINE$(_this__u8e3s4, gracePeriodMillis, timeoutMillis, resultContinuation) {
1276
+ CoroutineImpl.call(this, resultContinuation);
1277
+ this.kbw_1 = _this__u8e3s4;
1278
+ this.lbw_1 = gracePeriodMillis;
1279
+ this.mbw_1 = timeoutMillis;
1280
+ }
1281
+ protoOf($stopSuspendCOROUTINE$).fa = function () {
1282
+ var suspendResult = this.z9_1;
1283
+ $sm: do
1284
+ try {
1285
+ var tmp = this.x9_1;
1286
+ switch (tmp) {
1287
+ case 0:
1288
+ this.y9_1 = 4;
1289
+ this.kbw_1.mbp_1.y24();
1290
+ this.x9_1 = 1;
1291
+ suspendResult = withTimeoutOrNull(this.lbw_1, CIOApplicationEngine$stopSuspend$slambda_0(this.kbw_1, null), this);
1292
+ if (suspendResult === get_COROUTINE_SUSPENDED()) {
1293
+ return suspendResult;
1294
+ }
1295
+
1296
+ continue $sm;
1297
+ case 1:
1298
+ this.nbw_1 = suspendResult;
1299
+ if (this.nbw_1 == null) {
1300
+ this.kbw_1.nbp_1.k1x();
1301
+ this.x9_1 = 2;
1302
+ var tmp_0 = this.mbw_1.c3(this.lbw_1);
1303
+ suspendResult = withTimeoutOrNull(tmp_0, CIOApplicationEngine$stopSuspend$slambda_2(this.kbw_1, null), this);
1304
+ if (suspendResult === get_COROUTINE_SUSPENDED()) {
1305
+ return suspendResult;
1306
+ }
1307
+ continue $sm;
1308
+ } else {
1309
+ this.x9_1 = 3;
1310
+ continue $sm;
1311
+ }
1312
+
1313
+ case 2:
1314
+ this.x9_1 = 3;
1315
+ continue $sm;
1316
+ case 3:
1317
+ return Unit_instance;
1318
+ case 4:
1319
+ throw this.aa_1;
1320
+ }
1321
+ } catch ($p) {
1322
+ var e = $p;
1323
+ if (this.y9_1 === 4) {
1324
+ throw e;
1325
+ } else {
1326
+ this.x9_1 = this.y9_1;
1327
+ this.aa_1 = e;
1328
+ }
1329
+ }
1330
+ while (true);
1331
+ };
1332
+ function CIOApplicationEngine(environment, monitor, developmentMode, configuration, applicationProvider) {
1333
+ BaseApplicationEngine.call(this, environment, monitor, developmentMode);
1334
+ this.hbp_1 = configuration;
1335
+ this.ibp_1 = applicationProvider;
1336
+ this.jbp_1 = get_IOBridge(Dispatchers_getInstance());
1337
+ this.kbp_1 = get_IOBridge(Dispatchers_getInstance());
1338
+ this.lbp_1 = CompletableDeferred();
1339
+ this.mbp_1 = Job();
1340
+ this.nbp_1 = Job();
1341
+ this.nbp_1 = initServerJob(this);
1342
+ var tmp = this.nbp_1;
1343
+ tmp.c1x(CIOApplicationEngine$lambda(this));
1344
+ }
1345
+ protoOf(CIOApplicationEngine).nam = function (wait, $completion) {
1346
+ var tmp = new $startSuspendCOROUTINE$(this, wait, $completion);
1347
+ tmp.z9_1 = Unit_instance;
1348
+ tmp.aa_1 = null;
1349
+ return tmp.fa();
1350
+ };
1351
+ protoOf(CIOApplicationEngine).yal = function (wait) {
1352
+ return runBlockingBridge(CIOApplicationEngine$start$slambda_0(this, wait, null));
1353
+ };
1354
+ protoOf(CIOApplicationEngine).oam = function (gracePeriodMillis, timeoutMillis, $completion) {
1355
+ var tmp = new $stopSuspendCOROUTINE$(this, gracePeriodMillis, timeoutMillis, $completion);
1356
+ tmp.z9_1 = Unit_instance;
1357
+ tmp.aa_1 = null;
1358
+ return tmp.fa();
1359
+ };
1360
+ protoOf(CIOApplicationEngine).lam = function (gracePeriodMillis, timeoutMillis) {
1361
+ return runBlockingBridge(CIOApplicationEngine$stop$slambda_0(this, gracePeriodMillis, timeoutMillis, null));
1362
+ };
1363
+ function CIOApplicationRequest$cookies$delegate$lambda(this$0) {
1364
+ return function () {
1365
+ return new RequestCookies(this$0);
1366
+ };
1367
+ }
1368
+ function CIOApplicationRequest$_get_cookies_$ref_25ojf9() {
1369
+ return function (p0) {
1370
+ return p0.waq();
1371
+ };
1372
+ }
1373
+ function CIOApplicationRequest$queryParameters$delegate$lambda(this$0) {
1374
+ return function () {
1375
+ return toQueryParameters(encodeParameters(this$0, this$0.vaq()));
1376
+ };
1377
+ }
1378
+ function CIOApplicationRequest$_get_queryParameters_$ref_pun7y() {
1379
+ return function (p0) {
1380
+ return p0.tam();
1381
+ };
1382
+ }
1383
+ function CIOApplicationRequest$rawQueryParameters$delegate$lambda(this$0) {
1384
+ return function () {
1385
+ var uri = toString(this$0.sbn_1.i5y_1);
1386
+ // Inline function 'kotlin.takeIf' call
1387
+ var this_0 = indexOf(uri, _Char___init__impl__6a9atx(63));
1388
+ var tmp;
1389
+ if (!(this_0 === -1)) {
1390
+ tmp = this_0;
1391
+ } else {
1392
+ tmp = null;
1393
+ }
1394
+ var tmp0_elvis_lhs = tmp;
1395
+ var tmp_0;
1396
+ if (tmp0_elvis_lhs == null) {
1397
+ return Companion_getInstance_2().k5g_1;
1398
+ } else {
1399
+ tmp_0 = tmp0_elvis_lhs;
1400
+ }
1401
+ var queryStartIndex = tmp_0;
1402
+ return parseQueryString(uri, queryStartIndex + 1 | 0, VOID, false);
1403
+ };
1404
+ }
1405
+ function CIOApplicationRequest$_get_rawQueryParameters_$ref_ciofdg() {
1406
+ return function (p0) {
1407
+ return p0.vaq();
1408
+ };
1409
+ }
1410
+ function CIOApplicationRequest(call, remoteAddress, localAddress, input, request) {
1411
+ BaseApplicationRequest.call(this, call);
1412
+ this.rbn_1 = input;
1413
+ this.sbn_1 = request;
1414
+ var tmp = this;
1415
+ tmp.tbn_1 = lazy(CIOApplicationRequest$cookies$delegate$lambda(this));
1416
+ this.ubn_1 = this.rbn_1;
1417
+ this.vbn_1 = new CIOHeaders(this.sbn_1.k5y_1);
1418
+ var tmp_0 = this;
1419
+ tmp_0.wbn_1 = lazy(CIOApplicationRequest$queryParameters$delegate$lambda(this));
1420
+ var tmp_1 = this;
1421
+ tmp_1.xbn_1 = lazy(CIOApplicationRequest$rawQueryParameters$delegate$lambda(this));
1422
+ var tmp_2 = this;
1423
+ var tmp_3 = toString(this.sbn_1.j5y_1);
1424
+ var tmp_4 = toString(this.sbn_1.i5y_1);
1425
+ var tmp0_safe_receiver = this.sbn_1.k5y_1.cf(HttpHeaders_getInstance().j5a_1);
1426
+ tmp_2.ybn_1 = new CIOConnectionPoint(remoteAddress, localAddress, tmp_3, tmp_4, tmp0_safe_receiver == null ? null : toString(tmp0_safe_receiver), Companion_getInstance_3().dt(this.sbn_1.h5y_1.t5d_1));
1427
+ }
1428
+ protoOf(CIOApplicationRequest).waq = function () {
1429
+ var tmp0 = this.tbn_1;
1430
+ var tmp = KProperty1;
1431
+ // Inline function 'kotlin.getValue' call
1432
+ getPropertyCallableRef('cookies', 1, tmp, CIOApplicationRequest$_get_cookies_$ref_25ojf9(), null);
1433
+ return tmp0.b1();
1434
+ };
1435
+ protoOf(CIOApplicationRequest).taq = function () {
1436
+ return this.ubn_1;
1437
+ };
1438
+ protoOf(CIOApplicationRequest).saq = function () {
1439
+ return this.vbn_1;
1440
+ };
1441
+ protoOf(CIOApplicationRequest).tam = function () {
1442
+ var tmp0 = this.wbn_1;
1443
+ var tmp = KProperty1;
1444
+ // Inline function 'kotlin.getValue' call
1445
+ getPropertyCallableRef('queryParameters', 1, tmp, CIOApplicationRequest$_get_queryParameters_$ref_pun7y(), null);
1446
+ return tmp0.b1();
1447
+ };
1448
+ protoOf(CIOApplicationRequest).vaq = function () {
1449
+ var tmp0 = this.xbn_1;
1450
+ var tmp = KProperty1;
1451
+ // Inline function 'kotlin.getValue' call
1452
+ getPropertyCallableRef('rawQueryParameters', 1, tmp, CIOApplicationRequest$_get_rawQueryParameters_$ref_ciofdg(), null);
1453
+ return tmp0.b1();
1454
+ };
1455
+ protoOf(CIOApplicationRequest).uaq = function () {
1456
+ return this.ybn_1;
1457
+ };
1458
+ protoOf(CIOApplicationRequest).mbn = function () {
1459
+ this.sbn_1.m1h();
1460
+ };
1461
+ function toQueryParameters(_this__u8e3s4) {
1462
+ var parameters = _this__u8e3s4;
1463
+ return new toQueryParameters$1(parameters);
1464
+ }
1465
+ function CIOConnectionPoint(remoteNetworkAddress, localNetworkAddress, version, uri, hostHeaderValue, method) {
1466
+ this.obw_1 = remoteNetworkAddress;
1467
+ this.pbw_1 = localNetworkAddress;
1468
+ this.qbw_1 = version;
1469
+ this.rbw_1 = uri;
1470
+ this.sbw_1 = hostHeaderValue;
1471
+ this.tbw_1 = method;
1472
+ this.ubw_1 = Companion_getInstance_4().k5i(this.db4()).y5g_1;
1473
+ }
1474
+ protoOf(CIOConnectionPoint).v67 = function () {
1475
+ return this.qbw_1;
1476
+ };
1477
+ protoOf(CIOConnectionPoint).ab4 = function () {
1478
+ return this.rbw_1;
1479
+ };
1480
+ protoOf(CIOConnectionPoint).n67 = function () {
1481
+ return this.tbw_1;
1482
+ };
1483
+ protoOf(CIOConnectionPoint).db4 = function () {
1484
+ return 'http';
1485
+ };
1486
+ protoOf(CIOConnectionPoint).vb2 = function () {
1487
+ var tmp0_safe_receiver = this.pbw_1;
1488
+ var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : get_hostname(tmp0_safe_receiver);
1489
+ var tmp;
1490
+ if (tmp1_elvis_lhs == null) {
1491
+ var tmp2_safe_receiver = this.sbw_1;
1492
+ tmp = tmp2_safe_receiver == null ? null : substringBefore(tmp2_safe_receiver, ':');
1493
+ } else {
1494
+ tmp = tmp1_elvis_lhs;
1495
+ }
1496
+ var tmp3_elvis_lhs = tmp;
1497
+ return tmp3_elvis_lhs == null ? 'localhost' : tmp3_elvis_lhs;
1498
+ };
1499
+ protoOf(CIOConnectionPoint).l5i = function () {
1500
+ var tmp0_safe_receiver = this.pbw_1;
1501
+ var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : get_port(tmp0_safe_receiver);
1502
+ var tmp;
1503
+ if (tmp1_elvis_lhs == null) {
1504
+ var tmp2_safe_receiver = this.sbw_1;
1505
+ var tmp3_safe_receiver = tmp2_safe_receiver == null ? null : substringAfter(tmp2_safe_receiver, ':', '80');
1506
+ tmp = tmp3_safe_receiver == null ? null : toInt(tmp3_safe_receiver);
1507
+ } else {
1508
+ tmp = tmp1_elvis_lhs;
1509
+ }
1510
+ var tmp4_elvis_lhs = tmp;
1511
+ return tmp4_elvis_lhs == null ? 80 : tmp4_elvis_lhs;
1512
+ };
1513
+ protoOf(CIOConnectionPoint).lb4 = function () {
1514
+ var tmp0_safe_receiver = this.pbw_1;
1515
+ var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : get_port(tmp0_safe_receiver);
1516
+ return tmp1_elvis_lhs == null ? this.ubw_1 : tmp1_elvis_lhs;
1517
+ };
1518
+ protoOf(CIOConnectionPoint).nb4 = function () {
1519
+ var tmp0_safe_receiver = this.sbw_1;
1520
+ var tmp1_safe_receiver = tmp0_safe_receiver == null ? null : substringAfterLast(tmp0_safe_receiver, ':', this.ubw_1.toString());
1521
+ var tmp2_elvis_lhs = tmp1_safe_receiver == null ? null : toInt(tmp1_safe_receiver);
1522
+ return tmp2_elvis_lhs == null ? this.lb4() : tmp2_elvis_lhs;
1523
+ };
1524
+ protoOf(CIOConnectionPoint).fb4 = function () {
1525
+ var tmp0_safe_receiver = this.pbw_1;
1526
+ var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : get_hostname(tmp0_safe_receiver);
1527
+ return tmp1_elvis_lhs == null ? 'localhost' : tmp1_elvis_lhs;
1528
+ };
1529
+ protoOf(CIOConnectionPoint).hb4 = function () {
1530
+ var tmp0_safe_receiver = this.sbw_1;
1531
+ var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : substringBeforeLast(tmp0_safe_receiver, ':');
1532
+ return tmp1_elvis_lhs == null ? this.fb4() : tmp1_elvis_lhs;
1533
+ };
1534
+ protoOf(CIOConnectionPoint).jb4 = function () {
1535
+ var tmp0_safe_receiver = this.pbw_1;
1536
+ var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : get_address(tmp0_safe_receiver);
1537
+ return tmp1_elvis_lhs == null ? 'localhost' : tmp1_elvis_lhs;
1538
+ };
1539
+ protoOf(CIOConnectionPoint).pb4 = function () {
1540
+ var tmp0_safe_receiver = this.obw_1;
1541
+ var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : get_hostname(tmp0_safe_receiver);
1542
+ return tmp1_elvis_lhs == null ? 'unknown' : tmp1_elvis_lhs;
1543
+ };
1544
+ protoOf(CIOConnectionPoint).rb4 = function () {
1545
+ var tmp0_safe_receiver = this.obw_1;
1546
+ var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : get_port(tmp0_safe_receiver);
1547
+ return tmp1_elvis_lhs == null ? 0 : tmp1_elvis_lhs;
1548
+ };
1549
+ protoOf(CIOConnectionPoint).tb4 = function () {
1550
+ var tmp0_safe_receiver = this.obw_1;
1551
+ var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : get_address(tmp0_safe_receiver);
1552
+ return tmp1_elvis_lhs == null ? 'unknown' : tmp1_elvis_lhs;
1553
+ };
1554
+ protoOf(CIOConnectionPoint).toString = function () {
1555
+ return 'CIOConnectionPoint(uri=' + this.rbw_1 + ', method=' + this.tbw_1.toString() + ', version=' + this.qbw_1 + ', localAddress=' + this.jb4() + ', ' + ('localPort=' + this.lb4() + ', remoteAddress=' + this.tb4() + ', remotePort=' + this.rb4() + ')');
1556
+ };
1557
+ function toQueryParameters$1($parameters) {
1558
+ this.vbw_1 = $parameters;
1559
+ }
1560
+ protoOf(toQueryParameters$1).a4z = function () {
1561
+ return this.vbw_1.a4z();
1562
+ };
1563
+ protoOf(toQueryParameters$1).b4z = function (name) {
1564
+ return this.vbw_1.b4z(name);
1565
+ };
1566
+ protoOf(toQueryParameters$1).c4z = function () {
1567
+ return this.vbw_1.c4z();
1568
+ };
1569
+ protoOf(toQueryParameters$1).d4z = function () {
1570
+ return this.vbw_1.d4z();
1571
+ };
1572
+ protoOf(toQueryParameters$1).m = function () {
1573
+ return this.vbw_1.m();
1574
+ };
1575
+ function sendResponseMessage($this, contentReady, $completion) {
1576
+ var tmp = new $sendResponseMessageCOROUTINE$($this, contentReady, $completion);
1577
+ tmp.z9_1 = Unit_instance;
1578
+ tmp.aa_1 = null;
1579
+ return tmp.fa();
1580
+ }
1581
+ function preparedBodyChannel($this) {
1582
+ var chunked = $this.xbx_1.cf(HttpHeaders_getInstance().b5c_1) === 'chunked';
1583
+ if (!chunked)
1584
+ return $this.obx_1;
1585
+ var encoderJob = encodeChunked($this.obx_1, Dispatchers_getInstance().x29_1);
1586
+ var chunkedOutput = encoderJob.o4r_1;
1587
+ $this.vbx_1 = chunkedOutput;
1588
+ $this.wbx_1 = encoderJob.p4r_1;
1589
+ return chunkedOutput;
1590
+ }
1591
+ function CIOApplicationResponse$headers$1(this$0) {
1592
+ this.zbx_1 = this$0;
1593
+ ResponseHeaders.call(this);
1594
+ }
1595
+ protoOf(CIOApplicationResponse$headers$1).wb5 = function (name, value) {
1596
+ this.zbx_1.ubx_1.n4z(name, value);
1597
+ };
1598
+ protoOf(CIOApplicationResponse$headers$1).vb5 = function (name) {
1599
+ // Inline function 'kotlin.collections.orEmpty' call
1600
+ var tmp0_elvis_lhs = this.zbx_1.ubx_1.b4z(name);
1601
+ return tmp0_elvis_lhs == null ? emptyList() : tmp0_elvis_lhs;
1602
+ };
1603
+ function CIOApplicationResponse$respondFromBytes$slambda($channel, $bytes, resultContinuation) {
1604
+ this.iby_1 = $channel;
1605
+ this.jby_1 = $bytes;
1606
+ CoroutineImpl.call(this, resultContinuation);
1607
+ }
1608
+ protoOf(CIOApplicationResponse$respondFromBytes$slambda).x2q = function ($this$withContext, $completion) {
1609
+ var tmp = this.y2q($this$withContext, $completion);
1610
+ tmp.z9_1 = Unit_instance;
1611
+ tmp.aa_1 = null;
1612
+ return tmp.fa();
1613
+ };
1614
+ protoOf(CIOApplicationResponse$respondFromBytes$slambda).ra = function (p1, $completion) {
1615
+ return this.x2q((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
1616
+ };
1617
+ protoOf(CIOApplicationResponse$respondFromBytes$slambda).fa = function () {
1618
+ var suspendResult = this.z9_1;
1619
+ $sm: do
1620
+ try {
1621
+ var tmp = this.x9_1;
1622
+ switch (tmp) {
1623
+ case 0:
1624
+ this.y9_1 = 3;
1625
+ this.x9_1 = 1;
1626
+ suspendResult = writeFully(this.iby_1, this.jby_1, VOID, VOID, this);
1627
+ if (suspendResult === get_COROUTINE_SUSPENDED()) {
1628
+ return suspendResult;
1629
+ }
1630
+
1631
+ continue $sm;
1632
+ case 1:
1633
+ this.x9_1 = 2;
1634
+ suspendResult = this.iby_1.o4i(this);
1635
+ if (suspendResult === get_COROUTINE_SUSPENDED()) {
1636
+ return suspendResult;
1637
+ }
1638
+
1639
+ continue $sm;
1640
+ case 2:
1641
+ return Unit_instance;
1642
+ case 3:
1643
+ throw this.aa_1;
1644
+ }
1645
+ } catch ($p) {
1646
+ var e = $p;
1647
+ if (this.y9_1 === 3) {
1648
+ throw e;
1649
+ } else {
1650
+ this.x9_1 = this.y9_1;
1651
+ this.aa_1 = e;
1652
+ }
1653
+ }
1654
+ while (true);
1655
+ };
1656
+ protoOf(CIOApplicationResponse$respondFromBytes$slambda).y2q = function ($this$withContext, completion) {
1657
+ var i = new CIOApplicationResponse$respondFromBytes$slambda(this.iby_1, this.jby_1, completion);
1658
+ i.kby_1 = $this$withContext;
1659
+ return i;
1660
+ };
1661
+ function CIOApplicationResponse$respondFromBytes$slambda_0($channel, $bytes, resultContinuation) {
1662
+ var i = new CIOApplicationResponse$respondFromBytes$slambda($channel, $bytes, resultContinuation);
1663
+ var l = function ($this$withContext, $completion) {
1664
+ return i.x2q($this$withContext, $completion);
1665
+ };
1666
+ l.$arity = 1;
1667
+ return l;
1668
+ }
1669
+ function $responseChannelCOROUTINE$(_this__u8e3s4, resultContinuation) {
1670
+ CoroutineImpl.call(this, resultContinuation);
1671
+ this.tby_1 = _this__u8e3s4;
1672
+ }
1673
+ protoOf($responseChannelCOROUTINE$).fa = function () {
1674
+ var suspendResult = this.z9_1;
1675
+ $sm: do
1676
+ try {
1677
+ var tmp = this.x9_1;
1678
+ switch (tmp) {
1679
+ case 0:
1680
+ this.y9_1 = 2;
1681
+ this.x9_1 = 1;
1682
+ suspendResult = sendResponseMessage(this.tby_1, false, this);
1683
+ if (suspendResult === get_COROUTINE_SUSPENDED()) {
1684
+ return suspendResult;
1685
+ }
1686
+
1687
+ continue $sm;
1688
+ case 1:
1689
+ return preparedBodyChannel(this.tby_1);
1690
+ case 2:
1691
+ throw this.aa_1;
1692
+ }
1693
+ } catch ($p) {
1694
+ var e = $p;
1695
+ if (this.y9_1 === 2) {
1696
+ throw e;
1697
+ } else {
1698
+ this.x9_1 = this.y9_1;
1699
+ this.aa_1 = e;
1700
+ }
1701
+ }
1702
+ while (true);
1703
+ };
1704
+ function $respondUpgradeCOROUTINE$(_this__u8e3s4, upgrade, resultContinuation) {
1705
+ CoroutineImpl.call(this, resultContinuation);
1706
+ this.cbz_1 = _this__u8e3s4;
1707
+ this.dbz_1 = upgrade;
1708
+ }
1709
+ protoOf($respondUpgradeCOROUTINE$).fa = function () {
1710
+ var suspendResult = this.z9_1;
1711
+ $sm: do
1712
+ try {
1713
+ var tmp = this.x9_1;
1714
+ switch (tmp) {
1715
+ case 0:
1716
+ this.y9_1 = 9;
1717
+ this.x9_1 = 1;
1718
+ suspendResult = sendResponseMessage(this.cbz_1, false, this);
1719
+ if (suspendResult === get_COROUTINE_SUSPENDED()) {
1720
+ return suspendResult;
1721
+ }
1722
+
1723
+ continue $sm;
1724
+ case 1:
1725
+ this.x9_1 = 2;
1726
+ continue $sm;
1727
+ case 2:
1728
+ this.y9_1 = 7;
1729
+ this.x9_1 = 3;
1730
+ suspendResult = this.dbz_1.r5k(this.cbz_1.pbx_1, this.cbz_1.obx_1, this.cbz_1.qbx_1, this.cbz_1.rbx_1, this);
1731
+ if (suspendResult === get_COROUTINE_SUSPENDED()) {
1732
+ return suspendResult;
1733
+ }
1734
+
1735
+ continue $sm;
1736
+ case 3:
1737
+ this.fbz_1 = suspendResult;
1738
+ this.x9_1 = 4;
1739
+ suspendResult = this.fbz_1.g1x(this);
1740
+ if (suspendResult === get_COROUTINE_SUSPENDED()) {
1741
+ return suspendResult;
1742
+ }
1743
+
1744
+ continue $sm;
1745
+ case 4:
1746
+ this.ebz_1 = suspendResult;
1747
+ this.y9_1 = 9;
1748
+ this.x9_1 = 5;
1749
+ continue $sm;
1750
+ case 5:
1751
+ this.y9_1 = 9;
1752
+ this.x9_1 = 6;
1753
+ suspendResult = this.cbz_1.obx_1.o4i(this);
1754
+ if (suspendResult === get_COROUTINE_SUSPENDED()) {
1755
+ return suspendResult;
1756
+ }
1757
+
1758
+ continue $sm;
1759
+ case 6:
1760
+ cancel(this.cbz_1.pbx_1);
1761
+ return Unit_instance;
1762
+ case 7:
1763
+ this.y9_1 = 9;
1764
+ this.gbz_1 = this.aa_1;
1765
+ this.x9_1 = 8;
1766
+ suspendResult = this.cbz_1.obx_1.o4i(this);
1767
+ if (suspendResult === get_COROUTINE_SUSPENDED()) {
1768
+ return suspendResult;
1769
+ }
1770
+
1771
+ continue $sm;
1772
+ case 8:
1773
+ cancel(this.cbz_1.pbx_1);
1774
+ throw this.gbz_1;
1775
+ case 9:
1776
+ throw this.aa_1;
1777
+ }
1778
+ } catch ($p) {
1779
+ var e = $p;
1780
+ if (this.y9_1 === 9) {
1781
+ throw e;
1782
+ } else {
1783
+ this.x9_1 = this.y9_1;
1784
+ this.aa_1 = e;
1785
+ }
1786
+ }
1787
+ while (true);
1788
+ };
1789
+ function $respondFromBytesCOROUTINE$(_this__u8e3s4, bytes, resultContinuation) {
1790
+ CoroutineImpl.call(this, resultContinuation);
1791
+ this.pbz_1 = _this__u8e3s4;
1792
+ this.qbz_1 = bytes;
1793
+ }
1794
+ protoOf($respondFromBytesCOROUTINE$).fa = function () {
1795
+ var suspendResult = this.z9_1;
1796
+ $sm: do
1797
+ try {
1798
+ var tmp = this.x9_1;
1799
+ switch (tmp) {
1800
+ case 0:
1801
+ this.y9_1 = 3;
1802
+ this.x9_1 = 1;
1803
+ suspendResult = sendResponseMessage(this.pbz_1, true, this);
1804
+ if (suspendResult === get_COROUTINE_SUSPENDED()) {
1805
+ return suspendResult;
1806
+ }
1807
+
1808
+ continue $sm;
1809
+ case 1:
1810
+ this.rbz_1 = preparedBodyChannel(this.pbz_1);
1811
+ this.x9_1 = 2;
1812
+ var tmp_0 = Dispatchers_getInstance().x29_1;
1813
+ suspendResult = withContext(tmp_0, CIOApplicationResponse$respondFromBytes$slambda_0(this.rbz_1, this.qbz_1, null), this);
1814
+ if (suspendResult === get_COROUTINE_SUSPENDED()) {
1815
+ return suspendResult;
1816
+ }
1817
+
1818
+ continue $sm;
1819
+ case 2:
1820
+ return Unit_instance;
1821
+ case 3:
1822
+ throw this.aa_1;
1823
+ }
1824
+ } catch ($p) {
1825
+ var e = $p;
1826
+ if (this.y9_1 === 3) {
1827
+ throw e;
1828
+ } else {
1829
+ this.x9_1 = this.y9_1;
1830
+ this.aa_1 = e;
1831
+ }
1832
+ }
1833
+ while (true);
1834
+ };
1835
+ function $respondNoContentCOROUTINE$(_this__u8e3s4, content, resultContinuation) {
1836
+ CoroutineImpl.call(this, resultContinuation);
1837
+ this.ac0_1 = _this__u8e3s4;
1838
+ this.bc0_1 = content;
1839
+ }
1840
+ protoOf($respondNoContentCOROUTINE$).fa = function () {
1841
+ var suspendResult = this.z9_1;
1842
+ $sm: do
1843
+ try {
1844
+ var tmp = this.x9_1;
1845
+ switch (tmp) {
1846
+ case 0:
1847
+ this.y9_1 = 3;
1848
+ this.x9_1 = 1;
1849
+ suspendResult = sendResponseMessage(this.ac0_1, true, this);
1850
+ if (suspendResult === get_COROUTINE_SUSPENDED()) {
1851
+ return suspendResult;
1852
+ }
1853
+
1854
+ continue $sm;
1855
+ case 1:
1856
+ this.x9_1 = 2;
1857
+ suspendResult = this.ac0_1.obx_1.o4i(this);
1858
+ if (suspendResult === get_COROUTINE_SUSPENDED()) {
1859
+ return suspendResult;
1860
+ }
1861
+
1862
+ continue $sm;
1863
+ case 2:
1864
+ return Unit_instance;
1865
+ case 3:
1866
+ throw this.aa_1;
1867
+ }
1868
+ } catch ($p) {
1869
+ var e = $p;
1870
+ if (this.y9_1 === 3) {
1871
+ throw e;
1872
+ } else {
1873
+ this.x9_1 = this.y9_1;
1874
+ this.aa_1 = e;
1875
+ }
1876
+ }
1877
+ while (true);
1878
+ };
1879
+ function $respondOutgoingContentCOROUTINE$(_this__u8e3s4, content, resultContinuation) {
1880
+ CoroutineImpl.call(this, resultContinuation);
1881
+ this.kc0_1 = _this__u8e3s4;
1882
+ this.lc0_1 = content;
1883
+ }
1884
+ protoOf($respondOutgoingContentCOROUTINE$).fa = function () {
1885
+ var suspendResult = this.z9_1;
1886
+ $sm: do
1887
+ try {
1888
+ var tmp = this.x9_1;
1889
+ switch (tmp) {
1890
+ case 0:
1891
+ this.y9_1 = 6;
1892
+ var tmp_0 = this.lc0_1;
1893
+ if (tmp_0 instanceof ProtocolUpgrade) {
1894
+ var tmp0_safe_receiver = this.kc0_1.sbx_1;
1895
+ if ((tmp0_safe_receiver == null ? null : tmp0_safe_receiver.n24(true)) == null)
1896
+ throw IllegalStateException_init_$Create$('Unable to perform upgrade as it is not requested by the client: request should have Upgrade and Connection headers filled properly');
1897
+ } else {
1898
+ var tmp2_safe_receiver = this.kc0_1.sbx_1;
1899
+ if (tmp2_safe_receiver == null)
1900
+ null;
1901
+ else
1902
+ tmp2_safe_receiver.n24(false);
1903
+ }
1904
+
1905
+ this.x9_1 = 1;
1906
+ suspendResult = protoOf(BaseApplicationResponse).uar.call(this.kc0_1, this.lc0_1, this);
1907
+ if (suspendResult === get_COROUTINE_SUSPENDED()) {
1908
+ return suspendResult;
1909
+ }
1910
+
1911
+ continue $sm;
1912
+ case 1:
1913
+ this.mc0_1 = this.kc0_1.vbx_1;
1914
+ if (this.mc0_1 == null) {
1915
+ this.nc0_1 = null;
1916
+ this.x9_1 = 3;
1917
+ continue $sm;
1918
+ } else {
1919
+ this.x9_1 = 2;
1920
+ suspendResult = this.mc0_1.o4i(this);
1921
+ if (suspendResult === get_COROUTINE_SUSPENDED()) {
1922
+ return suspendResult;
1923
+ }
1924
+ continue $sm;
1925
+ }
1926
+
1927
+ case 2:
1928
+ var tmp_1 = this;
1929
+ tmp_1.nc0_1 = Unit_instance;
1930
+ this.x9_1 = 3;
1931
+ continue $sm;
1932
+ case 3:
1933
+ this.oc0_1 = this.kc0_1.wbx_1;
1934
+ if (this.oc0_1 == null) {
1935
+ this.pc0_1 = null;
1936
+ this.x9_1 = 5;
1937
+ continue $sm;
1938
+ } else {
1939
+ this.x9_1 = 4;
1940
+ suspendResult = this.oc0_1.g1x(this);
1941
+ if (suspendResult === get_COROUTINE_SUSPENDED()) {
1942
+ return suspendResult;
1943
+ }
1944
+ continue $sm;
1945
+ }
1946
+
1947
+ case 4:
1948
+ var tmp_2 = this;
1949
+ tmp_2.pc0_1 = Unit_instance;
1950
+ this.x9_1 = 5;
1951
+ continue $sm;
1952
+ case 5:
1953
+ return Unit_instance;
1954
+ case 6:
1955
+ throw this.aa_1;
1956
+ }
1957
+ } catch ($p) {
1958
+ var e = $p;
1959
+ if (this.y9_1 === 6) {
1960
+ throw e;
1961
+ } else {
1962
+ this.x9_1 = this.y9_1;
1963
+ this.aa_1 = e;
1964
+ }
1965
+ }
1966
+ while (true);
1967
+ };
1968
+ function $sendResponseMessageCOROUTINE$(_this__u8e3s4, contentReady, resultContinuation) {
1969
+ CoroutineImpl.call(this, resultContinuation);
1970
+ this.ebx_1 = _this__u8e3s4;
1971
+ this.fbx_1 = contentReady;
1972
+ }
1973
+ protoOf($sendResponseMessageCOROUTINE$).fa = function () {
1974
+ var suspendResult = this.z9_1;
1975
+ $sm: do
1976
+ try {
1977
+ var tmp = this.x9_1;
1978
+ switch (tmp) {
1979
+ case 0:
1980
+ this.y9_1 = 7;
1981
+ this.gbx_1 = new RequestResponseBuilder();
1982
+ this.x9_1 = 1;
1983
+ continue $sm;
1984
+ case 1:
1985
+ this.y9_1 = 6;
1986
+ this.gbx_1.n5z('HTTP/1.1', this.ebx_1.tbx_1.h5g_1, this.ebx_1.tbx_1.i5g_1);
1987
+ var _iterator__ex2g4s = this.ebx_1.ubx_1.c4z().p();
1988
+ while (_iterator__ex2g4s.q()) {
1989
+ var name = _iterator__ex2g4s.r();
1990
+ var _iterator__ex2g4s_0 = ensureNotNull(this.ebx_1.ubx_1.b4z(name)).p();
1991
+ while (_iterator__ex2g4s_0.q()) {
1992
+ var value = _iterator__ex2g4s_0.r();
1993
+ this.gbx_1.o5z(name, value);
1994
+ }
1995
+ }
1996
+
1997
+ this.gbx_1.p5z();
1998
+ this.x9_1 = 2;
1999
+ suspendResult = writePacket(this.ebx_1.obx_1, this.gbx_1.o3o(), this);
2000
+ if (suspendResult === get_COROUTINE_SUSPENDED()) {
2001
+ return suspendResult;
2002
+ }
2003
+
2004
+ continue $sm;
2005
+ case 2:
2006
+ if (!this.fbx_1) {
2007
+ this.x9_1 = 3;
2008
+ suspendResult = this.ebx_1.obx_1.c4i(this);
2009
+ if (suspendResult === get_COROUTINE_SUSPENDED()) {
2010
+ return suspendResult;
2011
+ }
2012
+ continue $sm;
2013
+ } else {
2014
+ this.x9_1 = 4;
2015
+ continue $sm;
2016
+ }
2017
+
2018
+ case 3:
2019
+ this.x9_1 = 4;
2020
+ continue $sm;
2021
+ case 4:
2022
+ this.hbx_1 = Unit_instance;
2023
+ this.y9_1 = 7;
2024
+ this.x9_1 = 5;
2025
+ continue $sm;
2026
+ case 5:
2027
+ this.y9_1 = 7;
2028
+ this.gbx_1.m1h();
2029
+ return Unit_instance;
2030
+ case 6:
2031
+ this.y9_1 = 7;
2032
+ var t = this.aa_1;
2033
+ this.gbx_1.m1h();
2034
+ throw t;
2035
+ case 7:
2036
+ throw this.aa_1;
2037
+ }
2038
+ } catch ($p) {
2039
+ var e = $p;
2040
+ if (this.y9_1 === 7) {
2041
+ throw e;
2042
+ } else {
2043
+ this.x9_1 = this.y9_1;
2044
+ this.aa_1 = e;
2045
+ }
2046
+ }
2047
+ while (true);
2048
+ };
2049
+ function CIOApplicationResponse(call, output, input, engineDispatcher, userDispatcher, upgraded) {
2050
+ BaseApplicationResponse.call(this, call);
2051
+ this.obx_1 = output;
2052
+ this.pbx_1 = input;
2053
+ this.qbx_1 = engineDispatcher;
2054
+ this.rbx_1 = userDispatcher;
2055
+ this.sbx_1 = upgraded;
2056
+ this.tbx_1 = Companion_getInstance_0().h5e_1;
2057
+ this.ubx_1 = new HeadersBuilder();
2058
+ this.vbx_1 = null;
2059
+ this.wbx_1 = null;
2060
+ var tmp = this;
2061
+ tmp.xbx_1 = new CIOApplicationResponse$headers$1(this);
2062
+ }
2063
+ protoOf(CIOApplicationResponse).k5d = function () {
2064
+ return this.xbx_1;
2065
+ };
2066
+ protoOf(CIOApplicationResponse).vat = function ($completion) {
2067
+ var tmp = new $responseChannelCOROUTINE$(this, $completion);
2068
+ tmp.z9_1 = Unit_instance;
2069
+ tmp.aa_1 = null;
2070
+ return tmp.fa();
2071
+ };
2072
+ protoOf(CIOApplicationResponse).bav = function (upgrade, $completion) {
2073
+ var tmp = new $respondUpgradeCOROUTINE$(this, upgrade, $completion);
2074
+ tmp.z9_1 = Unit_instance;
2075
+ tmp.aa_1 = null;
2076
+ return tmp.fa();
2077
+ };
2078
+ protoOf(CIOApplicationResponse).aav = function (bytes, $completion) {
2079
+ var tmp = new $respondFromBytesCOROUTINE$(this, bytes, $completion);
2080
+ tmp.z9_1 = Unit_instance;
2081
+ tmp.aa_1 = null;
2082
+ return tmp.fa();
2083
+ };
2084
+ protoOf(CIOApplicationResponse).yau = function (content, $completion) {
2085
+ var tmp = new $respondNoContentCOROUTINE$(this, content, $completion);
2086
+ tmp.z9_1 = Unit_instance;
2087
+ tmp.aa_1 = null;
2088
+ return tmp.fa();
2089
+ };
2090
+ protoOf(CIOApplicationResponse).uar = function (content, $completion) {
2091
+ var tmp = new $respondOutgoingContentCOROUTINE$(this, content, $completion);
2092
+ tmp.z9_1 = Unit_instance;
2093
+ tmp.aa_1 = null;
2094
+ return tmp.fa();
2095
+ };
2096
+ protoOf(CIOApplicationResponse).naw = function (statusCode) {
2097
+ this.tbx_1 = statusCode;
2098
+ };
2099
+ function HttpServer(rootServerJob, acceptJob, serverSocket) {
2100
+ this.pbv_1 = rootServerJob;
2101
+ this.qbv_1 = acceptJob;
2102
+ this.rbv_1 = serverSocket;
2103
+ }
2104
+ function UnixSocketServerSettings(socketPath, connectionIdleTimeoutSeconds) {
2105
+ connectionIdleTimeoutSeconds = connectionIdleTimeoutSeconds === VOID ? new Long(45, 0) : connectionIdleTimeoutSeconds;
2106
+ this.qc0_1 = socketPath;
2107
+ this.rc0_1 = connectionIdleTimeoutSeconds;
2108
+ }
2109
+ function HttpServerSettings(host, port, connectionIdleTimeoutSeconds, reuseAddress) {
2110
+ host = host === VOID ? '0.0.0.0' : host;
2111
+ port = port === VOID ? 8080 : port;
2112
+ connectionIdleTimeoutSeconds = connectionIdleTimeoutSeconds === VOID ? new Long(45, 0) : connectionIdleTimeoutSeconds;
2113
+ reuseAddress = reuseAddress === VOID ? false : reuseAddress;
2114
+ this.sc0_1 = host;
2115
+ this.tc0_1 = port;
2116
+ this.uc0_1 = connectionIdleTimeoutSeconds;
2117
+ this.vc0_1 = reuseAddress;
2118
+ }
2119
+ protoOf(HttpServerSettings).toString = function () {
2120
+ return 'HttpServerSettings(host=' + this.sc0_1 + ', port=' + this.tc0_1 + ', connectionIdleTimeoutSeconds=' + this.uc0_1.toString() + ', reuseAddress=' + this.vc0_1 + ')';
2121
+ };
2122
+ protoOf(HttpServerSettings).hashCode = function () {
2123
+ var result = getStringHashCode(this.sc0_1);
2124
+ result = imul(result, 31) + this.tc0_1 | 0;
2125
+ result = imul(result, 31) + this.uc0_1.hashCode() | 0;
2126
+ result = imul(result, 31) + getBooleanHashCode(this.vc0_1) | 0;
2127
+ return result;
2128
+ };
2129
+ protoOf(HttpServerSettings).equals = function (other) {
2130
+ if (this === other)
2131
+ return true;
2132
+ if (!(other instanceof HttpServerSettings))
2133
+ return false;
2134
+ var tmp0_other_with_cast = other instanceof HttpServerSettings ? other : THROW_CCE();
2135
+ if (!(this.sc0_1 === tmp0_other_with_cast.sc0_1))
2136
+ return false;
2137
+ if (!(this.tc0_1 === tmp0_other_with_cast.tc0_1))
2138
+ return false;
2139
+ if (!this.uc0_1.equals(tmp0_other_with_cast.uc0_1))
2140
+ return false;
2141
+ if (!(this.vc0_1 === tmp0_other_with_cast.vc0_1))
2142
+ return false;
2143
+ return true;
2144
+ };
2145
+ function get_HttpPipelineCoroutine() {
2146
+ _init_properties_Pipeline_kt__6qev6();
2147
+ return HttpPipelineCoroutine;
2148
+ }
2149
+ var HttpPipelineCoroutine;
2150
+ function get_HttpPipelineWriterCoroutine() {
2151
+ _init_properties_Pipeline_kt__6qev6();
2152
+ return HttpPipelineWriterCoroutine;
2153
+ }
2154
+ var HttpPipelineWriterCoroutine;
2155
+ function get_RequestHandlerCoroutine() {
2156
+ _init_properties_Pipeline_kt__6qev6();
2157
+ return RequestHandlerCoroutine;
2158
+ }
2159
+ var RequestHandlerCoroutine;
2160
+ var properties_initialized_Pipeline_kt_lwb7x8;
2161
+ function _init_properties_Pipeline_kt__6qev6() {
2162
+ if (!properties_initialized_Pipeline_kt_lwb7x8) {
2163
+ properties_initialized_Pipeline_kt_lwb7x8 = true;
2164
+ HttpPipelineCoroutine = new CoroutineName('http-pipeline');
2165
+ HttpPipelineWriterCoroutine = new CoroutineName('http-pipeline-writer');
2166
+ RequestHandlerCoroutine = new CoroutineName('request-handler');
2167
+ }
2168
+ }
2169
+ function UnixSocketConnectorConfig() {
2170
+ }
2171
+ function get_LOGGER() {
2172
+ _init_properties_HttpServer_kt__ukirhx();
2173
+ return LOGGER;
2174
+ }
2175
+ var LOGGER;
2176
+ function httpServer(_this__u8e3s4, settings, handler) {
2177
+ _init_properties_HttpServer_kt__ukirhx();
2178
+ var socket = CompletableDeferred();
2179
+ var serverLatch = Job();
2180
+ var tmp = new CoroutineName('server-root-' + settings.toString());
2181
+ var tmp_0 = CoroutineStart_UNDISPATCHED_getInstance();
2182
+ var serverJob = launch(_this__u8e3s4, tmp, tmp_0, httpServer$slambda_0(serverLatch, null));
2183
+ var selector = SelectorManager(_this__u8e3s4.z1v());
2184
+ Companion_getInstance_5();
2185
+ // Inline function 'kotlin.time.Companion.seconds' call
2186
+ var this_0 = settings.uc0_1;
2187
+ var timeout = toDuration(this_0, DurationUnit_SECONDS_getInstance());
2188
+ var rootConnectionJob = SupervisorJob(serverJob);
2189
+ var tmp_1 = serverJob.am(new CoroutineName('accept-' + settings.toString()));
2190
+ var acceptJob = launch(_this__u8e3s4, tmp_1, VOID, httpServer$slambda_2(selector, settings, socket, rootConnectionJob, timeout, handler, null));
2191
+ acceptJob.c1x(httpServer$lambda(socket, serverLatch));
2192
+ serverJob.c1x(httpServer$lambda_0(selector));
2193
+ return new HttpServer(serverJob, acceptJob, socket);
2194
+ }
2195
+ function httpServer$slambda($serverLatch, resultContinuation) {
2196
+ this.ec1_1 = $serverLatch;
2197
+ CoroutineImpl.call(this, resultContinuation);
2198
+ }
2199
+ protoOf(httpServer$slambda).x2q = function ($this$launch, $completion) {
2200
+ var tmp = this.y2q($this$launch, $completion);
2201
+ tmp.z9_1 = Unit_instance;
2202
+ tmp.aa_1 = null;
2203
+ return tmp.fa();
2204
+ };
2205
+ protoOf(httpServer$slambda).ra = function (p1, $completion) {
2206
+ return this.x2q((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
2207
+ };
2208
+ protoOf(httpServer$slambda).fa = function () {
2209
+ var suspendResult = this.z9_1;
2210
+ $sm: do
2211
+ try {
2212
+ var tmp = this.x9_1;
2213
+ switch (tmp) {
2214
+ case 0:
2215
+ this.y9_1 = 2;
2216
+ this.x9_1 = 1;
2217
+ suspendResult = this.ec1_1.g1x(this);
2218
+ if (suspendResult === get_COROUTINE_SUSPENDED()) {
2219
+ return suspendResult;
2220
+ }
2221
+
2222
+ continue $sm;
2223
+ case 1:
2224
+ return Unit_instance;
2225
+ case 2:
2226
+ throw this.aa_1;
2227
+ }
2228
+ } catch ($p) {
2229
+ var e = $p;
2230
+ if (this.y9_1 === 2) {
2231
+ throw e;
2232
+ } else {
2233
+ this.x9_1 = this.y9_1;
2234
+ this.aa_1 = e;
2235
+ }
2236
+ }
2237
+ while (true);
2238
+ };
2239
+ protoOf(httpServer$slambda).y2q = function ($this$launch, completion) {
2240
+ var i = new httpServer$slambda(this.ec1_1, completion);
2241
+ i.fc1_1 = $this$launch;
2242
+ return i;
2243
+ };
2244
+ function httpServer$slambda_0($serverLatch, resultContinuation) {
2245
+ var i = new httpServer$slambda($serverLatch, resultContinuation);
2246
+ var l = function ($this$launch, $completion) {
2247
+ return i.x2q($this$launch, $completion);
2248
+ };
2249
+ l.$arity = 1;
2250
+ return l;
2251
+ }
2252
+ function httpServer$slambda$lambda($settings) {
2253
+ return function ($this$bind) {
2254
+ $this$bind.dbi_1 = $settings.vc0_1;
2255
+ return Unit_instance;
2256
+ };
2257
+ }
2258
+ function httpServer$slambda$lambda_0($client) {
2259
+ return function (it) {
2260
+ $client.u4();
2261
+ return Unit_instance;
2262
+ };
2263
+ }
2264
+ function httpServer$slambda_1($selector, $settings, $socket, $rootConnectionJob, $timeout, $handler, resultContinuation) {
2265
+ this.oc1_1 = $selector;
2266
+ this.pc1_1 = $settings;
2267
+ this.qc1_1 = $socket;
2268
+ this.rc1_1 = $rootConnectionJob;
2269
+ this.sc1_1 = $timeout;
2270
+ this.tc1_1 = $handler;
2271
+ CoroutineImpl.call(this, resultContinuation);
2272
+ }
2273
+ protoOf(httpServer$slambda_1).x2q = function ($this$launch, $completion) {
2274
+ var tmp = this.y2q($this$launch, $completion);
2275
+ tmp.z9_1 = Unit_instance;
2276
+ tmp.aa_1 = null;
2277
+ return tmp.fa();
2278
+ };
2279
+ protoOf(httpServer$slambda_1).ra = function (p1, $completion) {
2280
+ return this.x2q((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
2281
+ };
2282
+ protoOf(httpServer$slambda_1).fa = function () {
2283
+ var suspendResult = this.z9_1;
2284
+ $sm: do
2285
+ try {
2286
+ var tmp = this.x9_1;
2287
+ switch (tmp) {
2288
+ case 0:
2289
+ this.y9_1 = 23;
2290
+ this.x9_1 = 1;
2291
+ var tmp_0 = aSocket(this.oc1_1).abi();
2292
+ suspendResult = tmp_0.ibk(this.pc1_1.sc0_1, this.pc1_1.tc0_1, httpServer$slambda$lambda(this.pc1_1), this);
2293
+ if (suspendResult === get_COROUTINE_SUSPENDED()) {
2294
+ return suspendResult;
2295
+ }
2296
+
2297
+ continue $sm;
2298
+ case 1:
2299
+ this.vc1_1 = suspendResult;
2300
+ var tmp_1 = this;
2301
+ tmp_1.wc1_1 = this.vc1_1;
2302
+ this.x9_1 = 2;
2303
+ continue $sm;
2304
+ case 2:
2305
+ this.yc1_1 = this.wc1_1;
2306
+ this.zc1_1 = null;
2307
+ this.x9_1 = 3;
2308
+ continue $sm;
2309
+ case 3:
2310
+ this.x9_1 = 4;
2311
+ continue $sm;
2312
+ case 4:
2313
+ this.y9_1 = 20;
2314
+ this.y9_1 = 19;
2315
+ var tmp_2 = this;
2316
+ tmp_2.bc2_1 = this.yc1_1;
2317
+ this.cc2_1 = this.bc2_1;
2318
+ this.qc1_1.n24(this.cc2_1);
2319
+ var tmp_3 = this;
2320
+ var tmp0_elvis_lhs = this.uc1_1.z1v().ka(Key_instance);
2321
+ tmp_3.dc2_1 = tmp0_elvis_lhs == null ? DefaultUncaughtExceptionHandler_init_$Create$(get_LOGGER()) : tmp0_elvis_lhs;
2322
+ this.ec2_1 = CoroutineScope_0(this.uc1_1.z1v().am(this.rc1_1).am(this.dc2_1).am(new CoroutineName('request')));
2323
+ this.x9_1 = 5;
2324
+ continue $sm;
2325
+ case 5:
2326
+ this.y9_1 = 12;
2327
+ this.y9_1 = 11;
2328
+ this.x9_1 = 6;
2329
+ continue $sm;
2330
+ case 6:
2331
+ if (!true) {
2332
+ this.x9_1 = 10;
2333
+ continue $sm;
2334
+ }
2335
+
2336
+ this.y9_1 = 8;
2337
+ this.x9_1 = 7;
2338
+ suspendResult = this.cc2_1.bbl(this);
2339
+ if (suspendResult === get_COROUTINE_SUSPENDED()) {
2340
+ return suspendResult;
2341
+ }
2342
+
2343
+ continue $sm;
2344
+ case 7:
2345
+ this.gc2_1 = suspendResult;
2346
+ this.y9_1 = 11;
2347
+ this.x9_1 = 9;
2348
+ continue $sm;
2349
+ case 8:
2350
+ this.y9_1 = 11;
2351
+ var tmp_4 = this.aa_1;
2352
+ if (tmp_4 instanceof IOException) {
2353
+ this.hc2_1 = this.aa_1;
2354
+ get_LOGGER().i56('Failed to accept connection', this.hc2_1);
2355
+ this.x9_1 = 6;
2356
+ var tmp_5 = this;
2357
+ continue $sm;
2358
+ } else {
2359
+ throw this.aa_1;
2360
+ }
2361
+
2362
+ case 9:
2363
+ this.y9_1 = 11;
2364
+ this.ic2_1 = this.gc2_1;
2365
+ this.jc2_1 = new ServerIncomingConnection(openReadChannel(this.ic2_1), openWriteChannel(this.ic2_1), toNetworkAddress(this.ic2_1.tb4()), toNetworkAddress(this.ic2_1.jb4()));
2366
+ this.kc2_1 = startServerConnectionPipeline(this.ec2_1, this.jc2_1, this.sc1_1, this.tc1_1);
2367
+ this.kc2_1.c1x(httpServer$slambda$lambda_0(this.ic2_1));
2368
+ this.x9_1 = 6;
2369
+ continue $sm;
2370
+ case 10:
2371
+ this.fc2_1 = Unit_instance;
2372
+ this.x9_1 = 15;
2373
+ continue $sm;
2374
+ case 11:
2375
+ this.y9_1 = 12;
2376
+ var tmp_6 = this.aa_1;
2377
+ if (tmp_6 instanceof ClosedChannelException) {
2378
+ this.lc2_1 = this.aa_1;
2379
+ var tmp_7 = this;
2380
+ get_LOGGER().i56('Server socket closed', this.lc2_1);
2381
+ cancel_0(this.uc1_1.z1v());
2382
+ tmp_7.fc2_1 = Unit_instance;
2383
+ this.x9_1 = 15;
2384
+ continue $sm;
2385
+ } else {
2386
+ throw this.aa_1;
2387
+ }
2388
+
2389
+ case 12:
2390
+ this.y9_1 = 19;
2391
+ this.mc2_1 = this.aa_1;
2392
+ this.cc2_1.u4();
2393
+ this.rc1_1.y24();
2394
+ this.x9_1 = 13;
2395
+ suspendResult = this.rc1_1.g1x(this);
2396
+ if (suspendResult === get_COROUTINE_SUSPENDED()) {
2397
+ return suspendResult;
2398
+ }
2399
+
2400
+ continue $sm;
2401
+ case 13:
2402
+ this.x9_1 = 14;
2403
+ suspendResult = awaitClosed(this.cc2_1, this);
2404
+ if (suspendResult === get_COROUTINE_SUSPENDED()) {
2405
+ return suspendResult;
2406
+ }
2407
+
2408
+ continue $sm;
2409
+ case 14:
2410
+ throw this.mc2_1;
2411
+ case 15:
2412
+ this.y9_1 = 19;
2413
+ this.cc2_1.u4();
2414
+ this.rc1_1.y24();
2415
+ this.x9_1 = 16;
2416
+ suspendResult = this.rc1_1.g1x(this);
2417
+ if (suspendResult === get_COROUTINE_SUSPENDED()) {
2418
+ return suspendResult;
2419
+ }
2420
+
2421
+ continue $sm;
2422
+ case 16:
2423
+ this.x9_1 = 17;
2424
+ suspendResult = awaitClosed(this.cc2_1, this);
2425
+ if (suspendResult === get_COROUTINE_SUSPENDED()) {
2426
+ return suspendResult;
2427
+ }
2428
+
2429
+ continue $sm;
2430
+ case 17:
2431
+ var tmp_8 = this;
2432
+ tmp_8.ac2_1 = Unit_instance;
2433
+ this.y9_1 = 23;
2434
+ this.x9_1 = 18;
2435
+ var tmp_9 = this;
2436
+ continue $sm;
2437
+ case 18:
2438
+ this.y9_1 = 23;
2439
+ var tmp_10 = this;
2440
+ closeFinally(this.yc1_1, this.zc1_1);
2441
+ tmp_10.xc1_1 = Unit_instance;
2442
+ this.x9_1 = 22;
2443
+ continue $sm;
2444
+ case 19:
2445
+ this.y9_1 = 20;
2446
+ var tmp_11 = this.aa_1;
2447
+ if (tmp_11 instanceof Error) {
2448
+ var e = this.aa_1;
2449
+ var tmp_12 = this;
2450
+ this.zc1_1 = e;
2451
+ throw e;
2452
+ } else {
2453
+ throw this.aa_1;
2454
+ }
2455
+
2456
+ case 20:
2457
+ this.y9_1 = 23;
2458
+ var t = this.aa_1;
2459
+ closeFinally(this.yc1_1, this.zc1_1);
2460
+ throw t;
2461
+ case 21:
2462
+ this.y9_1 = 23;
2463
+ closeFinally(this.yc1_1, this.zc1_1);
2464
+ if (false) {
2465
+ this.x9_1 = 2;
2466
+ continue $sm;
2467
+ }
2468
+
2469
+ this.x9_1 = 22;
2470
+ continue $sm;
2471
+ case 22:
2472
+ return Unit_instance;
2473
+ case 23:
2474
+ throw this.aa_1;
2475
+ }
2476
+ } catch ($p) {
2477
+ var e_0 = $p;
2478
+ if (this.y9_1 === 23) {
2479
+ throw e_0;
2480
+ } else {
2481
+ this.x9_1 = this.y9_1;
2482
+ this.aa_1 = e_0;
2483
+ }
2484
+ }
2485
+ while (true);
2486
+ };
2487
+ protoOf(httpServer$slambda_1).y2q = function ($this$launch, completion) {
2488
+ var i = new httpServer$slambda_1(this.oc1_1, this.pc1_1, this.qc1_1, this.rc1_1, this.sc1_1, this.tc1_1, completion);
2489
+ i.uc1_1 = $this$launch;
2490
+ return i;
2491
+ };
2492
+ function httpServer$slambda_2($selector, $settings, $socket, $rootConnectionJob, $timeout, $handler, resultContinuation) {
2493
+ var i = new httpServer$slambda_1($selector, $settings, $socket, $rootConnectionJob, $timeout, $handler, resultContinuation);
2494
+ var l = function ($this$launch, $completion) {
2495
+ return i.x2q($this$launch, $completion);
2496
+ };
2497
+ l.$arity = 1;
2498
+ return l;
2499
+ }
2500
+ function httpServer$lambda($socket, $serverLatch) {
2501
+ return function (cause) {
2502
+ if (cause == null)
2503
+ null;
2504
+ else {
2505
+ // Inline function 'kotlin.let' call
2506
+ $socket.x24(cause);
2507
+ }
2508
+ $serverLatch.y24();
2509
+ return Unit_instance;
2510
+ };
2511
+ }
2512
+ function httpServer$lambda_0($selector) {
2513
+ return function (it) {
2514
+ $selector.u4();
2515
+ return Unit_instance;
2516
+ };
2517
+ }
2518
+ var properties_initialized_HttpServer_kt_dlfky5;
2519
+ function _init_properties_HttpServer_kt__ukirhx() {
2520
+ if (!properties_initialized_HttpServer_kt_dlfky5) {
2521
+ properties_initialized_HttpServer_kt_dlfky5 = true;
2522
+ LOGGER = KtorSimpleLogger('io.ktor.server.cio.HttpServer');
2523
+ }
2524
+ }
2525
+ function ServerIncomingConnection(input, output, remoteAddress, localAddress) {
2526
+ this.nc2_1 = input;
2527
+ this.oc2_1 = output;
2528
+ this.pc2_1 = remoteAddress;
2529
+ this.qc2_1 = localAddress;
2530
+ }
2531
+ function get_LOGGER_0() {
2532
+ _init_properties_ServerPipeline_kt__t0cag5();
2533
+ return LOGGER_0;
2534
+ }
2535
+ var LOGGER_0;
2536
+ function get_BadRequestPacket() {
2537
+ _init_properties_ServerPipeline_kt__t0cag5();
2538
+ return BadRequestPacket;
2539
+ }
2540
+ var BadRequestPacket;
2541
+ function startServerConnectionPipeline(_this__u8e3s4, connection, timeout, handler) {
2542
+ _init_properties_ServerPipeline_kt__t0cag5();
2543
+ var tmp = get_HttpPipelineCoroutine();
2544
+ return launch(_this__u8e3s4, tmp, VOID, startServerConnectionPipeline$slambda_0(connection, timeout, handler, null));
2545
+ }
2546
+ function pipelineWriterLoop(channel, timeout, connection, $completion) {
2547
+ var tmp = new $pipelineWriterLoopCOROUTINE$(channel, timeout, connection, $completion);
2548
+ tmp.z9_1 = Unit_instance;
2549
+ tmp.aa_1 = null;
2550
+ return tmp.fa();
2551
+ }
2552
+ function respondBadRequest(actorChannel, $completion) {
2553
+ var tmp = new $respondBadRequestCOROUTINE$(actorChannel, $completion);
2554
+ tmp.z9_1 = Unit_instance;
2555
+ tmp.aa_1 = null;
2556
+ return tmp.fa();
2557
+ }
2558
+ function isLastHttpRequest(version, connectionOptions) {
2559
+ _init_properties_ServerPipeline_kt__t0cag5();
2560
+ return connectionOptions == null && version.equals(Companion_getInstance().x5d_1) ? true : connectionOptions == null ? !version.equals(Companion_getInstance().w5d_1) : connectionOptions.z5q_1 ? false : connectionOptions.y5q_1 ? true : false;
2561
+ }
2562
+ function startServerConnectionPipeline$slambda$slambda($actorChannel, $timeout, $connection, resultContinuation) {
2563
+ this.xc3_1 = $actorChannel;
2564
+ this.yc3_1 = $timeout;
2565
+ this.zc3_1 = $connection;
2566
+ CoroutineImpl.call(this, resultContinuation);
2567
+ }
2568
+ protoOf(startServerConnectionPipeline$slambda$slambda).x2q = function ($this$launch, $completion) {
2569
+ var tmp = this.y2q($this$launch, $completion);
2570
+ tmp.z9_1 = Unit_instance;
2571
+ tmp.aa_1 = null;
2572
+ return tmp.fa();
2573
+ };
2574
+ protoOf(startServerConnectionPipeline$slambda$slambda).ra = function (p1, $completion) {
2575
+ return this.x2q((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
2576
+ };
2577
+ protoOf(startServerConnectionPipeline$slambda$slambda).fa = function () {
2578
+ var suspendResult = this.z9_1;
2579
+ $sm: do
2580
+ try {
2581
+ var tmp = this.x9_1;
2582
+ switch (tmp) {
2583
+ case 0:
2584
+ this.y9_1 = 5;
2585
+ this.x9_1 = 1;
2586
+ continue $sm;
2587
+ case 1:
2588
+ this.y9_1 = 4;
2589
+ this.y9_1 = 3;
2590
+ this.x9_1 = 2;
2591
+ suspendResult = pipelineWriterLoop(this.xc3_1, this.yc3_1, this.zc3_1, this);
2592
+ if (suspendResult === get_COROUTINE_SUSPENDED()) {
2593
+ return suspendResult;
2594
+ }
2595
+
2596
+ continue $sm;
2597
+ case 2:
2598
+ this.bc4_1 = suspendResult;
2599
+ this.y9_1 = 5;
2600
+ this.x9_1 = 6;
2601
+ continue $sm;
2602
+ case 3:
2603
+ this.y9_1 = 4;
2604
+ var tmp_0 = this.aa_1;
2605
+ if (tmp_0 instanceof Error) {
2606
+ var cause = this.aa_1;
2607
+ var tmp_1 = this;
2608
+ close(this.zc3_1.oc2_1, cause);
2609
+ tmp_1.bc4_1 = Unit_instance;
2610
+ this.y9_1 = 5;
2611
+ this.x9_1 = 6;
2612
+ continue $sm;
2613
+ } else {
2614
+ throw this.aa_1;
2615
+ }
2616
+
2617
+ case 4:
2618
+ this.y9_1 = 5;
2619
+ var t = this.aa_1;
2620
+ close_0(this.zc3_1.oc2_1);
2621
+ throw t;
2622
+ case 5:
2623
+ throw this.aa_1;
2624
+ case 6:
2625
+ this.y9_1 = 5;
2626
+ close_0(this.zc3_1.oc2_1);
2627
+ return Unit_instance;
2628
+ }
2629
+ } catch ($p) {
2630
+ var e = $p;
2631
+ if (this.y9_1 === 5) {
2632
+ throw e;
2633
+ } else {
2634
+ this.x9_1 = this.y9_1;
2635
+ this.aa_1 = e;
2636
+ }
2637
+ }
2638
+ while (true);
2639
+ };
2640
+ protoOf(startServerConnectionPipeline$slambda$slambda).y2q = function ($this$launch, completion) {
2641
+ var i = new startServerConnectionPipeline$slambda$slambda(this.xc3_1, this.yc3_1, this.zc3_1, completion);
2642
+ i.ac4_1 = $this$launch;
2643
+ return i;
2644
+ };
2645
+ function startServerConnectionPipeline$slambda$slambda_0($actorChannel, $timeout, $connection, resultContinuation) {
2646
+ var i = new startServerConnectionPipeline$slambda$slambda($actorChannel, $timeout, $connection, resultContinuation);
2647
+ var l = function ($this$launch, $completion) {
2648
+ return i.x2q($this$launch, $completion);
2649
+ };
2650
+ l.$arity = 1;
2651
+ return l;
2652
+ }
2653
+ function startServerConnectionPipeline$slambda$slambda_1($requestBody, $response, $connection, $upgraded, $handler, $request, resultContinuation) {
2654
+ this.kc4_1 = $requestBody;
2655
+ this.lc4_1 = $response;
2656
+ this.mc4_1 = $connection;
2657
+ this.nc4_1 = $upgraded;
2658
+ this.oc4_1 = $handler;
2659
+ this.pc4_1 = $request;
2660
+ CoroutineImpl.call(this, resultContinuation);
2661
+ }
2662
+ protoOf(startServerConnectionPipeline$slambda$slambda_1).x2q = function ($this$launch, $completion) {
2663
+ var tmp = this.y2q($this$launch, $completion);
2664
+ tmp.z9_1 = Unit_instance;
2665
+ tmp.aa_1 = null;
2666
+ return tmp.fa();
2667
+ };
2668
+ protoOf(startServerConnectionPipeline$slambda$slambda_1).ra = function (p1, $completion) {
2669
+ return this.x2q((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
2670
+ };
2671
+ protoOf(startServerConnectionPipeline$slambda$slambda_1).fa = function () {
2672
+ var suspendResult = this.z9_1;
2673
+ $sm: do
2674
+ try {
2675
+ var tmp = this.x9_1;
2676
+ switch (tmp) {
2677
+ case 0:
2678
+ this.y9_1 = 5;
2679
+ this.rc4_1 = new ServerRequestScope(this.qc4_1.z1v(), this.kc4_1, this.lc4_1, this.mc4_1.pc2_1, this.mc4_1.qc2_1, this.nc4_1);
2680
+ this.sc4_1 = Unit_instance;
2681
+ this.x9_1 = 1;
2682
+ continue $sm;
2683
+ case 1:
2684
+ this.y9_1 = 4;
2685
+ this.y9_1 = 3;
2686
+ this.x9_1 = 2;
2687
+ suspendResult = this.oc4_1(this.rc4_1, this.pc4_1, this);
2688
+ if (suspendResult === get_COROUTINE_SUSPENDED()) {
2689
+ return suspendResult;
2690
+ }
2691
+
2692
+ continue $sm;
2693
+ case 2:
2694
+ var tmp_0 = this;
2695
+ tmp_0.sc4_1 = Unit_instance;
2696
+ this.y9_1 = 5;
2697
+ this.x9_1 = 6;
2698
+ continue $sm;
2699
+ case 3:
2700
+ this.y9_1 = 4;
2701
+ var tmp_1 = this.aa_1;
2702
+ if (tmp_1 instanceof Error) {
2703
+ var cause = this.aa_1;
2704
+ var tmp_2 = this;
2705
+ close(this.lc4_1, cause);
2706
+ var tmp0_safe_receiver = this.nc4_1;
2707
+ tmp_2.sc4_1 = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.x24(cause);
2708
+ this.y9_1 = 5;
2709
+ this.x9_1 = 6;
2710
+ continue $sm;
2711
+ } else {
2712
+ throw this.aa_1;
2713
+ }
2714
+
2715
+ case 4:
2716
+ this.y9_1 = 5;
2717
+ var t = this.aa_1;
2718
+ this.lc4_1.u4();
2719
+ var tmp1_safe_receiver = this.nc4_1;
2720
+ if (tmp1_safe_receiver == null)
2721
+ null;
2722
+ else
2723
+ tmp1_safe_receiver.n24(false);
2724
+ throw t;
2725
+ case 5:
2726
+ throw this.aa_1;
2727
+ case 6:
2728
+ this.sc4_1;
2729
+ this.y9_1 = 5;
2730
+ this.lc4_1.u4();
2731
+ var tmp1_safe_receiver_0 = this.nc4_1;
2732
+ if (tmp1_safe_receiver_0 == null)
2733
+ null;
2734
+ else
2735
+ tmp1_safe_receiver_0.n24(false);
2736
+ return Unit_instance;
2737
+ }
2738
+ } catch ($p) {
2739
+ var e = $p;
2740
+ if (this.y9_1 === 5) {
2741
+ throw e;
2742
+ } else {
2743
+ this.x9_1 = this.y9_1;
2744
+ this.aa_1 = e;
2745
+ }
2746
+ }
2747
+ while (true);
2748
+ };
2749
+ protoOf(startServerConnectionPipeline$slambda$slambda_1).y2q = function ($this$launch, completion) {
2750
+ var i = new startServerConnectionPipeline$slambda$slambda_1(this.kc4_1, this.lc4_1, this.mc4_1, this.nc4_1, this.oc4_1, this.pc4_1, completion);
2751
+ i.qc4_1 = $this$launch;
2752
+ return i;
2753
+ };
2754
+ function startServerConnectionPipeline$slambda$slambda_2($requestBody, $response, $connection, $upgraded, $handler, $request, resultContinuation) {
2755
+ var i = new startServerConnectionPipeline$slambda$slambda_1($requestBody, $response, $connection, $upgraded, $handler, $request, resultContinuation);
2756
+ var l = function ($this$launch, $completion) {
2757
+ return i.x2q($this$launch, $completion);
2758
+ };
2759
+ l.$arity = 1;
2760
+ return l;
2761
+ }
2762
+ function startServerConnectionPipeline$slambda($connection, $timeout, $handler, resultContinuation) {
2763
+ this.bc5_1 = $connection;
2764
+ this.cc5_1 = $timeout;
2765
+ this.dc5_1 = $handler;
2766
+ CoroutineImpl.call(this, resultContinuation);
2767
+ }
2768
+ protoOf(startServerConnectionPipeline$slambda).x2q = function ($this$launch, $completion) {
2769
+ var tmp = this.y2q($this$launch, $completion);
2770
+ tmp.z9_1 = Unit_instance;
2771
+ tmp.aa_1 = null;
2772
+ return tmp.fa();
2773
+ };
2774
+ protoOf(startServerConnectionPipeline$slambda).ra = function (p1, $completion) {
2775
+ return this.x2q((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
2776
+ };
2777
+ protoOf(startServerConnectionPipeline$slambda).fa = function () {
2778
+ var suspendResult = this.z9_1;
2779
+ $sm: do
2780
+ try {
2781
+ var tmp = this.x9_1;
2782
+ switch (tmp) {
2783
+ case 0:
2784
+ this.y9_1 = 32;
2785
+ this.fc5_1 = Channel(3);
2786
+ var tmp_0 = get_HttpPipelineWriterCoroutine();
2787
+ var tmp_1 = CoroutineStart_UNDISPATCHED_getInstance();
2788
+ launch(this.ec5_1, tmp_0, tmp_1, startServerConnectionPipeline$slambda$slambda_0(this.fc5_1, this.cc5_1, this.bc5_1, null));
2789
+ this.gc5_1 = get_RequestHandlerCoroutine().am(Dispatchers_getInstance().x29_1);
2790
+ this.x9_1 = 1;
2791
+ continue $sm;
2792
+ case 1:
2793
+ this.y9_1 = 31;
2794
+ this.y9_1 = 30;
2795
+ this.x9_1 = 2;
2796
+ continue $sm;
2797
+ case 2:
2798
+ if (!true) {
2799
+ this.x9_1 = 29;
2800
+ continue $sm;
2801
+ }
2802
+
2803
+ this.y9_1 = 5;
2804
+ this.x9_1 = 3;
2805
+ suspendResult = parseRequest(this.bc5_1.nc2_1, this);
2806
+ if (suspendResult === get_COROUTINE_SUSPENDED()) {
2807
+ return suspendResult;
2808
+ }
2809
+
2810
+ continue $sm;
2811
+ case 3:
2812
+ this.jc5_1 = suspendResult;
2813
+ if (this.jc5_1 == null) {
2814
+ this.x9_1 = 29;
2815
+ var tmp_2 = this;
2816
+ continue $sm;
2817
+ } else {
2818
+ this.kc5_1 = this.jc5_1;
2819
+ this.x9_1 = 4;
2820
+ continue $sm;
2821
+ }
2822
+
2823
+ case 4:
2824
+ this.ic5_1 = this.kc5_1;
2825
+ this.y9_1 = 30;
2826
+ this.x9_1 = 8;
2827
+ continue $sm;
2828
+ case 5:
2829
+ this.y9_1 = 30;
2830
+ var tmp_3 = this.aa_1;
2831
+ if (tmp_3 instanceof TooLongLineException) {
2832
+ this.lc5_1 = this.aa_1;
2833
+ this.x9_1 = 6;
2834
+ suspendResult = respondBadRequest(this.fc5_1, this);
2835
+ if (suspendResult === get_COROUTINE_SUSPENDED()) {
2836
+ return suspendResult;
2837
+ }
2838
+ continue $sm;
2839
+ } else {
2840
+ var tmp_4 = this.aa_1;
2841
+ if (tmp_4 instanceof IOException) {
2842
+ this.mc5_1 = this.aa_1;
2843
+ var tmp_5 = this;
2844
+ throw this.mc5_1;
2845
+ } else {
2846
+ var tmp_6 = this.aa_1;
2847
+ if (tmp_6 instanceof CancellationException) {
2848
+ this.nc5_1 = this.aa_1;
2849
+ var tmp_7 = this;
2850
+ throw this.nc5_1;
2851
+ } else {
2852
+ var tmp_8 = this.aa_1;
2853
+ if (tmp_8 instanceof Error) {
2854
+ this.oc5_1 = this.aa_1;
2855
+ var this_0 = get_LOGGER_0();
2856
+ if (get_isTraceEnabled(this_0)) {
2857
+ this_0.h56('Request parsing failed with exception: ' + this.oc5_1.toString());
2858
+ }
2859
+ this.x9_1 = 7;
2860
+ suspendResult = respondBadRequest(this.fc5_1, this);
2861
+ if (suspendResult === get_COROUTINE_SUSPENDED()) {
2862
+ return suspendResult;
2863
+ }
2864
+ continue $sm;
2865
+ } else {
2866
+ throw this.aa_1;
2867
+ }
2868
+ }
2869
+ }
2870
+ }
2871
+
2872
+ case 6:
2873
+ this.x9_1 = 29;
2874
+ var tmp_9 = this;
2875
+ continue $sm;
2876
+ case 7:
2877
+ this.x9_1 = 29;
2878
+ var tmp_10 = this;
2879
+ continue $sm;
2880
+ case 8:
2881
+ this.y9_1 = 30;
2882
+ this.pc5_1 = this.ic5_1;
2883
+ this.qc5_1 = new ByteChannel();
2884
+ this.rc5_1 = this.pc5_1.k5y_1.cf('Transfer-Encoding');
2885
+ this.sc5_1 = this.pc5_1.k5y_1.cf('Upgrade');
2886
+ this.tc5_1 = this.pc5_1.k5y_1.cf('Content-Type');
2887
+ this.uc5_1 = Companion_getInstance().pr(this.pc5_1.j5y_1);
2888
+ this.y9_1 = 28;
2889
+ this.x9_1 = 9;
2890
+ suspendResult = this.fc5_1.m2i(this.qc5_1, this);
2891
+ if (suspendResult === get_COROUTINE_SUSPENDED()) {
2892
+ return suspendResult;
2893
+ }
2894
+
2895
+ continue $sm;
2896
+ case 9:
2897
+ this.y9_1 = 30;
2898
+ this.x9_1 = 10;
2899
+ continue $sm;
2900
+ case 10:
2901
+ this.y9_1 = 30;
2902
+ this.y9_1 = 11;
2903
+ var contentLengthHeaders = toList(this.pc5_1.k5y_1.b4z('Content-Length'));
2904
+ this.vc5_1 = Companion_getInstance_6().d5r(this.pc5_1.k5y_1.cf('Connection'));
2905
+ if (contentLengthHeaders.s() > 1) {
2906
+ throw new ParserException('Duplicate Content-Length header');
2907
+ }
2908
+
2909
+ this.wc5_1 = contentLengthHeaders.s() === 1 ? parseDecLong(contentLengthHeaders.u(0)) : new Long(-1, -1);
2910
+ this.xc5_1 = expectHttpBody(this.pc5_1.h5y_1, this.wc5_1, this.rc5_1, this.vc5_1, this.tc5_1);
2911
+ this.yc5_1 = (!this.xc5_1 && expectHttpUpgrade(this.pc5_1.h5y_1, this.sc5_1, this.vc5_1));
2912
+ this.y9_1 = 30;
2913
+ this.x9_1 = 13;
2914
+ continue $sm;
2915
+ case 11:
2916
+ this.y9_1 = 30;
2917
+ var tmp_11 = this.aa_1;
2918
+ if (tmp_11 instanceof Error) {
2919
+ this.zc5_1 = this.aa_1;
2920
+ this.pc5_1.m1h();
2921
+ this.x9_1 = 12;
2922
+ suspendResult = writePacket(this.qc5_1, copy(get_BadRequestPacket()), this);
2923
+ if (suspendResult === get_COROUTINE_SUSPENDED()) {
2924
+ return suspendResult;
2925
+ }
2926
+ continue $sm;
2927
+ } else {
2928
+ throw this.aa_1;
2929
+ }
2930
+
2931
+ case 12:
2932
+ this.qc5_1.u4();
2933
+ this.x9_1 = 29;
2934
+ continue $sm;
2935
+ case 13:
2936
+ this.y9_1 = 30;
2937
+ var tmp_12 = this;
2938
+ var tmp_13;
2939
+ if (this.xc5_1 || this.yc5_1) {
2940
+ tmp_13 = new ByteChannel(true);
2941
+ } else {
2942
+ tmp_13 = Companion_getInstance_7().n4k_1;
2943
+ }
2944
+
2945
+ tmp_12.ac6_1 = tmp_13;
2946
+ this.bc6_1 = this.yc5_1 ? CompletableDeferred() : null;
2947
+ var tmp_14 = CoroutineStart_UNDISPATCHED_getInstance();
2948
+ launch(this.ec5_1, this.gc5_1, tmp_14, startServerConnectionPipeline$slambda$slambda_2(this.ac6_1, this.qc5_1, this.bc5_1, this.bc6_1, this.dc5_1, this.pc5_1, null));
2949
+ if (!(this.bc6_1 == null)) {
2950
+ this.x9_1 = 14;
2951
+ suspendResult = this.bc6_1.w21(this);
2952
+ if (suspendResult === get_COROUTINE_SUSPENDED()) {
2953
+ return suspendResult;
2954
+ }
2955
+ continue $sm;
2956
+ } else {
2957
+ this.x9_1 = 16;
2958
+ continue $sm;
2959
+ }
2960
+
2961
+ case 14:
2962
+ if (suspendResult) {
2963
+ this.fc5_1.w2i();
2964
+ this.x9_1 = 27;
2965
+ var tmp_15 = this.ac6_1;
2966
+ suspendResult = copyAndClose(this.bc5_1.nc2_1, tmp_15 instanceof ByteChannel ? tmp_15 : THROW_CCE(), this);
2967
+ if (suspendResult === get_COROUTINE_SUSPENDED()) {
2968
+ return suspendResult;
2969
+ }
2970
+ continue $sm;
2971
+ } else {
2972
+ var tmp_16 = this.ac6_1;
2973
+ if (tmp_16 instanceof ByteChannel) {
2974
+ this.ac6_1.u4();
2975
+ this.x9_1 = 15;
2976
+ continue $sm;
2977
+ } else {
2978
+ this.x9_1 = 15;
2979
+ continue $sm;
2980
+ }
2981
+ }
2982
+
2983
+ case 15:
2984
+ this.x9_1 = 16;
2985
+ continue $sm;
2986
+ case 16:
2987
+ var tmp_17;
2988
+ if (this.xc5_1) {
2989
+ var tmp_18 = this.ac6_1;
2990
+ tmp_17 = isInterface(tmp_18, ByteWriteChannel);
2991
+ } else {
2992
+ tmp_17 = false;
2993
+ }
2994
+
2995
+ if (tmp_17) {
2996
+ this.x9_1 = 17;
2997
+ continue $sm;
2998
+ } else {
2999
+ this.x9_1 = 24;
3000
+ continue $sm;
3001
+ }
3002
+
3003
+ case 17:
3004
+ this.x9_1 = 18;
3005
+ continue $sm;
3006
+ case 18:
3007
+ this.y9_1 = 26;
3008
+ this.y9_1 = 20;
3009
+ this.x9_1 = 19;
3010
+ suspendResult = parseHttpBody(this.uc5_1, this.wc5_1, this.rc5_1, this.vc5_1, this.bc5_1.nc2_1, this.ac6_1, this);
3011
+ if (suspendResult === get_COROUTINE_SUSPENDED()) {
3012
+ return suspendResult;
3013
+ }
3014
+
3015
+ continue $sm;
3016
+ case 19:
3017
+ this.cc6_1 = suspendResult;
3018
+ this.x9_1 = 23;
3019
+ continue $sm;
3020
+ case 20:
3021
+ this.y9_1 = 26;
3022
+ var tmp_19 = this.aa_1;
3023
+ if (tmp_19 instanceof Error) {
3024
+ this.ec6_1 = this.aa_1;
3025
+ close(this.ac6_1, new ChannelReadException('Failed to read request body', this.ec6_1));
3026
+ this.x9_1 = 21;
3027
+ suspendResult = writePacket(this.qc5_1, copy(get_BadRequestPacket()), this);
3028
+ if (suspendResult === get_COROUTINE_SUSPENDED()) {
3029
+ return suspendResult;
3030
+ }
3031
+ continue $sm;
3032
+ } else {
3033
+ throw this.aa_1;
3034
+ }
3035
+
3036
+ case 21:
3037
+ this.qc5_1.u4();
3038
+ this.dc6_1 = Unit_instance;
3039
+ this.x9_1 = 22;
3040
+ var tmp_20 = this;
3041
+ continue $sm;
3042
+ case 22:
3043
+ this.y9_1 = 30;
3044
+ close_0(this.ac6_1);
3045
+ this.x9_1 = 29;
3046
+ continue $sm;
3047
+ case 23:
3048
+ this.y9_1 = 30;
3049
+ close_0(this.ac6_1);
3050
+ this.x9_1 = 24;
3051
+ continue $sm;
3052
+ case 24:
3053
+ if (isLastHttpRequest(this.uc5_1, this.vc5_1)) {
3054
+ this.x9_1 = 29;
3055
+ continue $sm;
3056
+ } else {
3057
+ this.x9_1 = 25;
3058
+ continue $sm;
3059
+ }
3060
+
3061
+ case 25:
3062
+ this.x9_1 = 2;
3063
+ continue $sm;
3064
+ case 26:
3065
+ this.y9_1 = 30;
3066
+ var t = this.aa_1;
3067
+ close_0(this.ac6_1);
3068
+ throw t;
3069
+ case 27:
3070
+ this.x9_1 = 29;
3071
+ continue $sm;
3072
+ case 28:
3073
+ this.y9_1 = 30;
3074
+ var tmp_21 = this.aa_1;
3075
+ if (tmp_21 instanceof Error) {
3076
+ var cause = this.aa_1;
3077
+ this.pc5_1.m1h();
3078
+ throw cause;
3079
+ } else {
3080
+ throw this.aa_1;
3081
+ }
3082
+
3083
+ case 29:
3084
+ this.hc5_1 = Unit_instance;
3085
+ this.y9_1 = 32;
3086
+ this.x9_1 = 33;
3087
+ continue $sm;
3088
+ case 30:
3089
+ this.y9_1 = 31;
3090
+ var tmp_22 = this.aa_1;
3091
+ if (tmp_22 instanceof IOException) {
3092
+ var cause_0 = this.aa_1;
3093
+ var tmp_23 = this;
3094
+ cancel_0(this.ec5_1.z1v());
3095
+ tmp_23.hc5_1 = Unit_instance;
3096
+ this.y9_1 = 32;
3097
+ this.x9_1 = 33;
3098
+ continue $sm;
3099
+ } else {
3100
+ throw this.aa_1;
3101
+ }
3102
+
3103
+ case 31:
3104
+ this.y9_1 = 32;
3105
+ var t_0 = this.aa_1;
3106
+ this.fc5_1.w2i();
3107
+ throw t_0;
3108
+ case 32:
3109
+ throw this.aa_1;
3110
+ case 33:
3111
+ this.y9_1 = 32;
3112
+ this.fc5_1.w2i();
3113
+ return Unit_instance;
3114
+ }
3115
+ } catch ($p) {
3116
+ var e = $p;
3117
+ if (this.y9_1 === 32) {
3118
+ throw e;
3119
+ } else {
3120
+ this.x9_1 = this.y9_1;
3121
+ this.aa_1 = e;
3122
+ }
3123
+ }
3124
+ while (true);
3125
+ };
3126
+ protoOf(startServerConnectionPipeline$slambda).y2q = function ($this$launch, completion) {
3127
+ var i = new startServerConnectionPipeline$slambda(this.bc5_1, this.cc5_1, this.dc5_1, completion);
3128
+ i.ec5_1 = $this$launch;
3129
+ return i;
3130
+ };
3131
+ function startServerConnectionPipeline$slambda_0($connection, $timeout, $handler, resultContinuation) {
3132
+ var i = new startServerConnectionPipeline$slambda($connection, $timeout, $handler, resultContinuation);
3133
+ var l = function ($this$launch, $completion) {
3134
+ return i.x2q($this$launch, $completion);
3135
+ };
3136
+ l.$arity = 1;
3137
+ return l;
3138
+ }
3139
+ function pipelineWriterLoop$slambda($channel, resultContinuation) {
3140
+ this.nc6_1 = $channel;
3141
+ CoroutineImpl.call(this, resultContinuation);
3142
+ }
3143
+ protoOf(pipelineWriterLoop$slambda).pc6 = function ($this$withTimeoutOrNull, $completion) {
3144
+ var tmp = this.y2q($this$withTimeoutOrNull, $completion);
3145
+ tmp.z9_1 = Unit_instance;
3146
+ tmp.aa_1 = null;
3147
+ return tmp.fa();
3148
+ };
3149
+ protoOf(pipelineWriterLoop$slambda).ra = function (p1, $completion) {
3150
+ return this.pc6((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
3151
+ };
3152
+ protoOf(pipelineWriterLoop$slambda).fa = function () {
3153
+ var suspendResult = this.z9_1;
3154
+ $sm: do
3155
+ try {
3156
+ var tmp = this.x9_1;
3157
+ switch (tmp) {
3158
+ case 0:
3159
+ this.y9_1 = 3;
3160
+ this.x9_1 = 1;
3161
+ suspendResult = this.nc6_1.r2i(this);
3162
+ if (suspendResult === get_COROUTINE_SUSPENDED()) {
3163
+ return suspendResult;
3164
+ }
3165
+
3166
+ this.x9_1 = 2;
3167
+ continue $sm;
3168
+ case 1:
3169
+ var unboxed = suspendResult.m2e_1;
3170
+ suspendResult = new ChannelResult(unboxed);
3171
+ this.x9_1 = 2;
3172
+ continue $sm;
3173
+ case 2:
3174
+ var ARGUMENT = suspendResult.m2e_1;
3175
+ return ChannelResult__getOrNull_impl_f5e07h(ARGUMENT);
3176
+ case 3:
3177
+ throw this.aa_1;
3178
+ }
3179
+ } catch ($p) {
3180
+ var e = $p;
3181
+ if (this.y9_1 === 3) {
3182
+ throw e;
3183
+ } else {
3184
+ this.x9_1 = this.y9_1;
3185
+ this.aa_1 = e;
3186
+ }
3187
+ }
3188
+ while (true);
3189
+ };
3190
+ protoOf(pipelineWriterLoop$slambda).y2q = function ($this$withTimeoutOrNull, completion) {
3191
+ var i = new pipelineWriterLoop$slambda(this.nc6_1, completion);
3192
+ i.oc6_1 = $this$withTimeoutOrNull;
3193
+ return i;
3194
+ };
3195
+ function pipelineWriterLoop$slambda_0($channel, resultContinuation) {
3196
+ var i = new pipelineWriterLoop$slambda($channel, resultContinuation);
3197
+ var l = function ($this$withTimeoutOrNull, $completion) {
3198
+ return i.pc6($this$withTimeoutOrNull, $completion);
3199
+ };
3200
+ l.$arity = 1;
3201
+ return l;
3202
+ }
3203
+ function $pipelineWriterLoopCOROUTINE$(channel, timeout, connection, resultContinuation) {
3204
+ CoroutineImpl.call(this, resultContinuation);
3205
+ this.zc2_1 = channel;
3206
+ this.ac3_1 = timeout;
3207
+ this.bc3_1 = connection;
3208
+ }
3209
+ protoOf($pipelineWriterLoopCOROUTINE$).fa = function () {
3210
+ var suspendResult = this.z9_1;
3211
+ $sm: do
3212
+ try {
3213
+ var tmp = this.x9_1;
3214
+ switch (tmp) {
3215
+ case 0:
3216
+ this.y9_1 = 8;
3217
+ this.x9_1 = 1;
3218
+ continue $sm;
3219
+ case 1:
3220
+ if (!true) {
3221
+ this.x9_1 = 9;
3222
+ continue $sm;
3223
+ }
3224
+
3225
+ this.x9_1 = 2;
3226
+ suspendResult = withTimeoutOrNull_0(this.ac3_1, pipelineWriterLoop$slambda_0(this.zc2_1, null), this);
3227
+ if (suspendResult === get_COROUTINE_SUSPENDED()) {
3228
+ return suspendResult;
3229
+ }
3230
+
3231
+ continue $sm;
3232
+ case 2:
3233
+ this.cc3_1 = suspendResult;
3234
+ if (this.cc3_1 == null) {
3235
+ this.x9_1 = 9;
3236
+ var tmp_0 = this;
3237
+ continue $sm;
3238
+ } else {
3239
+ this.dc3_1 = this.cc3_1;
3240
+ this.x9_1 = 3;
3241
+ continue $sm;
3242
+ }
3243
+
3244
+ case 3:
3245
+ this.ec3_1 = this.dc3_1;
3246
+ this.y9_1 = 6;
3247
+ this.x9_1 = 4;
3248
+ suspendResult = copyTo(this.ec3_1, this.bc3_1.oc2_1, this);
3249
+ if (suspendResult === get_COROUTINE_SUSPENDED()) {
3250
+ return suspendResult;
3251
+ }
3252
+
3253
+ continue $sm;
3254
+ case 4:
3255
+ this.x9_1 = 5;
3256
+ suspendResult = this.bc3_1.oc2_1.c4i(this);
3257
+ if (suspendResult === get_COROUTINE_SUSPENDED()) {
3258
+ return suspendResult;
3259
+ }
3260
+
3261
+ continue $sm;
3262
+ case 5:
3263
+ this.y9_1 = 8;
3264
+ this.x9_1 = 7;
3265
+ continue $sm;
3266
+ case 6:
3267
+ this.y9_1 = 8;
3268
+ var tmp_1 = this.aa_1;
3269
+ if (tmp_1 instanceof Error) {
3270
+ var cause = this.aa_1;
3271
+ var tmp_2 = this.ec3_1;
3272
+ if (isInterface(tmp_2, ByteWriteChannel)) {
3273
+ close(this.ec3_1, cause);
3274
+ }
3275
+ this.x9_1 = 7;
3276
+ continue $sm;
3277
+ } else {
3278
+ throw this.aa_1;
3279
+ }
3280
+
3281
+ case 7:
3282
+ this.y9_1 = 8;
3283
+ this.x9_1 = 1;
3284
+ continue $sm;
3285
+ case 8:
3286
+ throw this.aa_1;
3287
+ case 9:
3288
+ return Unit_instance;
3289
+ }
3290
+ } catch ($p) {
3291
+ var e = $p;
3292
+ if (this.y9_1 === 8) {
3293
+ throw e;
3294
+ } else {
3295
+ this.x9_1 = this.y9_1;
3296
+ this.aa_1 = e;
3297
+ }
3298
+ }
3299
+ while (true);
3300
+ };
3301
+ function $respondBadRequestCOROUTINE$(actorChannel, resultContinuation) {
3302
+ CoroutineImpl.call(this, resultContinuation);
3303
+ this.nc3_1 = actorChannel;
3304
+ }
3305
+ protoOf($respondBadRequestCOROUTINE$).fa = function () {
3306
+ var suspendResult = this.z9_1;
3307
+ $sm: do
3308
+ try {
3309
+ var tmp = this.x9_1;
3310
+ switch (tmp) {
3311
+ case 0:
3312
+ this.y9_1 = 3;
3313
+ this.oc3_1 = new ByteChannel();
3314
+ if (_ChannelResult___get_isSuccess__impl__odq1z9(this.nc3_1.n2i(this.oc3_1))) {
3315
+ this.x9_1 = 1;
3316
+ suspendResult = writePacket(this.oc3_1, copy(get_BadRequestPacket()), this);
3317
+ if (suspendResult === get_COROUTINE_SUSPENDED()) {
3318
+ return suspendResult;
3319
+ }
3320
+ continue $sm;
3321
+ } else {
3322
+ this.x9_1 = 2;
3323
+ continue $sm;
3324
+ }
3325
+
3326
+ case 1:
3327
+ this.oc3_1.u4();
3328
+ this.x9_1 = 2;
3329
+ continue $sm;
3330
+ case 2:
3331
+ this.nc3_1.w2i();
3332
+ return Unit_instance;
3333
+ case 3:
3334
+ throw this.aa_1;
3335
+ }
3336
+ } catch ($p) {
3337
+ var e = $p;
3338
+ if (this.y9_1 === 3) {
3339
+ throw e;
3340
+ } else {
3341
+ this.x9_1 = this.y9_1;
3342
+ this.aa_1 = e;
3343
+ }
3344
+ }
3345
+ while (true);
3346
+ };
3347
+ var properties_initialized_ServerPipeline_kt_ir8jmh;
3348
+ function _init_properties_ServerPipeline_kt__t0cag5() {
3349
+ if (!properties_initialized_ServerPipeline_kt_ir8jmh) {
3350
+ properties_initialized_ServerPipeline_kt_ir8jmh = true;
3351
+ LOGGER_0 = KtorSimpleLogger('io.ktor.server.cio.backend.ServerPipeline');
3352
+ // Inline function 'kotlin.apply' call
3353
+ var this_0 = new RequestResponseBuilder();
3354
+ this_0.n5z('HTTP/1.0', Companion_getInstance_0().y5e_1.h5g_1, 'Bad Request');
3355
+ this_0.o5z('Connection', 'close');
3356
+ this_0.p5z();
3357
+ BadRequestPacket = this_0.o3o();
3358
+ }
3359
+ }
3360
+ function ServerRequestScope(coroutineContext, input, output, remoteAddress, localAddress, upgraded) {
3361
+ this.abu_1 = coroutineContext;
3362
+ this.bbu_1 = input;
3363
+ this.cbu_1 = output;
3364
+ this.dbu_1 = remoteAddress;
3365
+ this.ebu_1 = localAddress;
3366
+ this.fbu_1 = upgraded;
3367
+ }
3368
+ protoOf(ServerRequestScope).z1v = function () {
3369
+ return this.abu_1;
3370
+ };
3371
+ function get_port_0(_this__u8e3s4) {
3372
+ var tmp0_safe_receiver = _this__u8e3s4 instanceof InetSocketAddress ? _this__u8e3s4 : null;
3373
+ return tmp0_safe_receiver == null ? null : tmp0_safe_receiver.ebn_1;
3374
+ }
3375
+ function get_LOGGER_1() {
3376
+ _init_properties_UnixSocketServer_kt__n05kma();
3377
+ return LOGGER_1;
3378
+ }
3379
+ var LOGGER_1;
3380
+ function unixSocketServer(_this__u8e3s4, settings, handler) {
3381
+ _init_properties_UnixSocketServer_kt__n05kma();
3382
+ var socket = CompletableDeferred();
3383
+ var serverLatch = Job();
3384
+ var tmp = new CoroutineName('server-root-' + toString(settings));
3385
+ var tmp_0 = CoroutineStart_UNDISPATCHED_getInstance();
3386
+ var serverJob = launch(_this__u8e3s4, tmp, tmp_0, unixSocketServer$slambda_0(serverLatch, null));
3387
+ var selector = SelectorManager(_this__u8e3s4.z1v());
3388
+ Companion_getInstance_5();
3389
+ // Inline function 'kotlin.time.Companion.seconds' call
3390
+ var this_0 = settings.rc0_1;
3391
+ var timeout = toDuration(this_0, DurationUnit_SECONDS_getInstance());
3392
+ var tmp_1 = serverJob.am(new CoroutineName('accept-' + toString(settings)));
3393
+ var acceptJob = launch(_this__u8e3s4, tmp_1, VOID, unixSocketServer$slambda_2(settings, selector, socket, serverJob, timeout, handler, null));
3394
+ acceptJob.c1x(unixSocketServer$lambda(socket, serverLatch));
3395
+ serverJob.c1x(unixSocketServer$lambda_0(selector));
3396
+ return new HttpServer(serverJob, acceptJob, socket);
3397
+ }
3398
+ function unixSocketServer$slambda($serverLatch, resultContinuation) {
3399
+ this.yc6_1 = $serverLatch;
3400
+ CoroutineImpl.call(this, resultContinuation);
3401
+ }
3402
+ protoOf(unixSocketServer$slambda).x2q = function ($this$launch, $completion) {
3403
+ var tmp = this.y2q($this$launch, $completion);
3404
+ tmp.z9_1 = Unit_instance;
3405
+ tmp.aa_1 = null;
3406
+ return tmp.fa();
3407
+ };
3408
+ protoOf(unixSocketServer$slambda).ra = function (p1, $completion) {
3409
+ return this.x2q((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
3410
+ };
3411
+ protoOf(unixSocketServer$slambda).fa = function () {
3412
+ var suspendResult = this.z9_1;
3413
+ $sm: do
3414
+ try {
3415
+ var tmp = this.x9_1;
3416
+ switch (tmp) {
3417
+ case 0:
3418
+ this.y9_1 = 2;
3419
+ this.x9_1 = 1;
3420
+ suspendResult = this.yc6_1.g1x(this);
3421
+ if (suspendResult === get_COROUTINE_SUSPENDED()) {
3422
+ return suspendResult;
3423
+ }
3424
+
3425
+ continue $sm;
3426
+ case 1:
3427
+ return Unit_instance;
3428
+ case 2:
3429
+ throw this.aa_1;
3430
+ }
3431
+ } catch ($p) {
3432
+ var e = $p;
3433
+ if (this.y9_1 === 2) {
3434
+ throw e;
3435
+ } else {
3436
+ this.x9_1 = this.y9_1;
3437
+ this.aa_1 = e;
3438
+ }
3439
+ }
3440
+ while (true);
3441
+ };
3442
+ protoOf(unixSocketServer$slambda).y2q = function ($this$launch, completion) {
3443
+ var i = new unixSocketServer$slambda(this.yc6_1, completion);
3444
+ i.zc6_1 = $this$launch;
3445
+ return i;
3446
+ };
3447
+ function unixSocketServer$slambda_0($serverLatch, resultContinuation) {
3448
+ var i = new unixSocketServer$slambda($serverLatch, resultContinuation);
3449
+ var l = function ($this$launch, $completion) {
3450
+ return i.x2q($this$launch, $completion);
3451
+ };
3452
+ l.$arity = 1;
3453
+ return l;
3454
+ }
3455
+ function unixSocketServer$slambda$lambda($client) {
3456
+ return function (it) {
3457
+ $client.u4();
3458
+ return Unit_instance;
3459
+ };
3460
+ }
3461
+ function unixSocketServer$slambda_1($settings, $selector, $socket, $serverJob, $timeout, $handler, resultContinuation) {
3462
+ this.ic7_1 = $settings;
3463
+ this.jc7_1 = $selector;
3464
+ this.kc7_1 = $socket;
3465
+ this.lc7_1 = $serverJob;
3466
+ this.mc7_1 = $timeout;
3467
+ this.nc7_1 = $handler;
3468
+ CoroutineImpl.call(this, resultContinuation);
3469
+ }
3470
+ protoOf(unixSocketServer$slambda_1).x2q = function ($this$launch, $completion) {
3471
+ var tmp = this.y2q($this$launch, $completion);
3472
+ tmp.z9_1 = Unit_instance;
3473
+ tmp.aa_1 = null;
3474
+ return tmp.fa();
3475
+ };
3476
+ protoOf(unixSocketServer$slambda_1).ra = function (p1, $completion) {
3477
+ return this.x2q((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
3478
+ };
3479
+ protoOf(unixSocketServer$slambda_1).fa = function () {
3480
+ var suspendResult = this.z9_1;
3481
+ $sm: do
3482
+ try {
3483
+ var tmp = this.x9_1;
3484
+ switch (tmp) {
3485
+ case 0:
3486
+ this.y9_1 = 21;
3487
+ this.pc7_1 = Path(this.ic7_1.qc0_1);
3488
+ if (get_SystemFileSystem().s3d(this.pc7_1)) {
3489
+ get_SystemFileSystem().u3d(this.pc7_1);
3490
+ }
3491
+
3492
+ this.x9_1 = 1;
3493
+ suspendResult = aSocket(this.jc7_1).abi().kbk(new UnixSocketAddress(this.ic7_1.qc0_1), VOID, this);
3494
+ if (suspendResult === get_COROUTINE_SUSPENDED()) {
3495
+ return suspendResult;
3496
+ }
3497
+
3498
+ continue $sm;
3499
+ case 1:
3500
+ this.qc7_1 = suspendResult;
3501
+ var tmp_0 = this;
3502
+ tmp_0.rc7_1 = this.qc7_1;
3503
+ this.x9_1 = 2;
3504
+ continue $sm;
3505
+ case 2:
3506
+ this.tc7_1 = this.rc7_1;
3507
+ this.uc7_1 = null;
3508
+ this.x9_1 = 3;
3509
+ continue $sm;
3510
+ case 3:
3511
+ this.x9_1 = 4;
3512
+ continue $sm;
3513
+ case 4:
3514
+ this.y9_1 = 18;
3515
+ this.y9_1 = 17;
3516
+ var tmp_1 = this;
3517
+ tmp_1.wc7_1 = this.tc7_1;
3518
+ this.xc7_1 = this.wc7_1;
3519
+ this.kc7_1.n24(this.xc7_1);
3520
+ var tmp_2 = this;
3521
+ var tmp0_elvis_lhs = this.oc7_1.z1v().ka(Key_instance);
3522
+ tmp_2.yc7_1 = tmp0_elvis_lhs == null ? DefaultUncaughtExceptionHandler_init_$Create$(get_LOGGER_1()) : tmp0_elvis_lhs;
3523
+ this.zc7_1 = CoroutineScope_0(this.oc7_1.z1v().am(SupervisorJob(this.lc7_1)).am(this.yc7_1).am(new CoroutineName('request')));
3524
+ this.x9_1 = 5;
3525
+ continue $sm;
3526
+ case 5:
3527
+ this.y9_1 = 12;
3528
+ this.y9_1 = 11;
3529
+ this.x9_1 = 6;
3530
+ continue $sm;
3531
+ case 6:
3532
+ if (!true) {
3533
+ this.x9_1 = 10;
3534
+ continue $sm;
3535
+ }
3536
+
3537
+ this.y9_1 = 8;
3538
+ this.x9_1 = 7;
3539
+ suspendResult = this.xc7_1.bbl(this);
3540
+ if (suspendResult === get_COROUTINE_SUSPENDED()) {
3541
+ return suspendResult;
3542
+ }
3543
+
3544
+ continue $sm;
3545
+ case 7:
3546
+ this.bc8_1 = suspendResult;
3547
+ this.y9_1 = 11;
3548
+ this.x9_1 = 9;
3549
+ continue $sm;
3550
+ case 8:
3551
+ this.y9_1 = 11;
3552
+ var tmp_3 = this.aa_1;
3553
+ if (tmp_3 instanceof IOException) {
3554
+ this.cc8_1 = this.aa_1;
3555
+ get_LOGGER_1().i56('Failed to accept connection', this.cc8_1);
3556
+ this.x9_1 = 6;
3557
+ var tmp_4 = this;
3558
+ continue $sm;
3559
+ } else {
3560
+ throw this.aa_1;
3561
+ }
3562
+
3563
+ case 9:
3564
+ this.y9_1 = 11;
3565
+ this.dc8_1 = this.bc8_1;
3566
+ this.ec8_1 = new ServerIncomingConnection(openReadChannel(this.dc8_1), openWriteChannel(this.dc8_1), toNetworkAddress(this.dc8_1.tb4()), toNetworkAddress(this.dc8_1.jb4()));
3567
+ this.fc8_1 = startServerConnectionPipeline(this.zc7_1, this.ec8_1, this.mc7_1, this.nc7_1);
3568
+ this.fc8_1.c1x(unixSocketServer$slambda$lambda(this.dc8_1));
3569
+ this.x9_1 = 6;
3570
+ continue $sm;
3571
+ case 10:
3572
+ this.ac8_1 = Unit_instance;
3573
+ this.x9_1 = 14;
3574
+ continue $sm;
3575
+ case 11:
3576
+ this.y9_1 = 12;
3577
+ var tmp_5 = this.aa_1;
3578
+ if (tmp_5 instanceof ClosedChannelException) {
3579
+ this.gc8_1 = this.aa_1;
3580
+ var tmp_6 = this;
3581
+ get_LOGGER_1().i56('Server socket closed', this.gc8_1);
3582
+ cancel_0(this.oc7_1.z1v());
3583
+ tmp_6.ac8_1 = Unit_instance;
3584
+ this.x9_1 = 14;
3585
+ continue $sm;
3586
+ } else {
3587
+ throw this.aa_1;
3588
+ }
3589
+
3590
+ case 12:
3591
+ this.y9_1 = 17;
3592
+ this.hc8_1 = this.aa_1;
3593
+ this.xc7_1.u4();
3594
+ this.x9_1 = 13;
3595
+ suspendResult = awaitClosed(this.xc7_1, this);
3596
+ if (suspendResult === get_COROUTINE_SUSPENDED()) {
3597
+ return suspendResult;
3598
+ }
3599
+
3600
+ continue $sm;
3601
+ case 13:
3602
+ cancel_0(this.zc7_1.z1v());
3603
+ throw this.hc8_1;
3604
+ case 14:
3605
+ this.y9_1 = 17;
3606
+ this.xc7_1.u4();
3607
+ this.x9_1 = 15;
3608
+ suspendResult = awaitClosed(this.xc7_1, this);
3609
+ if (suspendResult === get_COROUTINE_SUSPENDED()) {
3610
+ return suspendResult;
3611
+ }
3612
+
3613
+ continue $sm;
3614
+ case 15:
3615
+ cancel_0(this.zc7_1.z1v());
3616
+ var tmp_7 = this;
3617
+ tmp_7.vc7_1 = Unit_instance;
3618
+ this.y9_1 = 21;
3619
+ this.x9_1 = 16;
3620
+ var tmp_8 = this;
3621
+ continue $sm;
3622
+ case 16:
3623
+ this.y9_1 = 21;
3624
+ var tmp_9 = this;
3625
+ closeFinally(this.tc7_1, this.uc7_1);
3626
+ tmp_9.sc7_1 = Unit_instance;
3627
+ this.x9_1 = 20;
3628
+ continue $sm;
3629
+ case 17:
3630
+ this.y9_1 = 18;
3631
+ var tmp_10 = this.aa_1;
3632
+ if (tmp_10 instanceof Error) {
3633
+ var e = this.aa_1;
3634
+ var tmp_11 = this;
3635
+ this.uc7_1 = e;
3636
+ throw e;
3637
+ } else {
3638
+ throw this.aa_1;
3639
+ }
3640
+
3641
+ case 18:
3642
+ this.y9_1 = 21;
3643
+ var t = this.aa_1;
3644
+ closeFinally(this.tc7_1, this.uc7_1);
3645
+ throw t;
3646
+ case 19:
3647
+ this.y9_1 = 21;
3648
+ closeFinally(this.tc7_1, this.uc7_1);
3649
+ if (false) {
3650
+ this.x9_1 = 2;
3651
+ continue $sm;
3652
+ }
3653
+
3654
+ this.x9_1 = 20;
3655
+ continue $sm;
3656
+ case 20:
3657
+ return Unit_instance;
3658
+ case 21:
3659
+ throw this.aa_1;
3660
+ }
3661
+ } catch ($p) {
3662
+ var e_0 = $p;
3663
+ if (this.y9_1 === 21) {
3664
+ throw e_0;
3665
+ } else {
3666
+ this.x9_1 = this.y9_1;
3667
+ this.aa_1 = e_0;
3668
+ }
3669
+ }
3670
+ while (true);
3671
+ };
3672
+ protoOf(unixSocketServer$slambda_1).y2q = function ($this$launch, completion) {
3673
+ var i = new unixSocketServer$slambda_1(this.ic7_1, this.jc7_1, this.kc7_1, this.lc7_1, this.mc7_1, this.nc7_1, completion);
3674
+ i.oc7_1 = $this$launch;
3675
+ return i;
3676
+ };
3677
+ function unixSocketServer$slambda_2($settings, $selector, $socket, $serverJob, $timeout, $handler, resultContinuation) {
3678
+ var i = new unixSocketServer$slambda_1($settings, $selector, $socket, $serverJob, $timeout, $handler, resultContinuation);
3679
+ var l = function ($this$launch, $completion) {
3680
+ return i.x2q($this$launch, $completion);
3681
+ };
3682
+ l.$arity = 1;
3683
+ return l;
3684
+ }
3685
+ function unixSocketServer$lambda($socket, $serverLatch) {
3686
+ return function (cause) {
3687
+ if (cause == null)
3688
+ null;
3689
+ else {
3690
+ // Inline function 'kotlin.let' call
3691
+ $socket.x24(cause);
3692
+ }
3693
+ $serverLatch.y24();
3694
+ return Unit_instance;
3695
+ };
3696
+ }
3697
+ function unixSocketServer$lambda_0($selector) {
3698
+ return function (it) {
3699
+ $selector.u4();
3700
+ return Unit_instance;
3701
+ };
3702
+ }
3703
+ var properties_initialized_UnixSocketServer_kt_gb7juo;
3704
+ function _init_properties_UnixSocketServer_kt__n05kma() {
3705
+ if (!properties_initialized_UnixSocketServer_kt_gb7juo) {
3706
+ properties_initialized_UnixSocketServer_kt_gb7juo = true;
3707
+ LOGGER_1 = KtorSimpleLogger('io.ktor.server.cio.backend.UnixSocketServer');
3708
+ }
3709
+ }
3710
+ function get_IOBridge(_this__u8e3s4) {
3711
+ return _this__u8e3s4.w29_1;
3712
+ }
3713
+ function runBlockingBridge(block) {
3714
+ var message = 'runBlocking is not supported on JS and WASM';
3715
+ throw IllegalStateException_init_$Create$(toString(message));
3716
+ }
3717
+ function toNetworkAddress(_this__u8e3s4) {
3718
+ if (!(_this__u8e3s4 instanceof InetSocketAddress))
3719
+ return null;
3720
+ return NetworkAddress(_this__u8e3s4.dbn_1, _this__u8e3s4.ebn_1);
3721
+ }
3722
+ //region block: post-declaration
3723
+ protoOf(toQueryParameters$1).e4z = forEach;
3724
+ //endregion
3725
+ //region block: init
3726
+ CIO_instance = new CIO();
3727
+ //endregion
3728
+ //region block: exports
3729
+ _.$_$ = _.$_$ || {};
3730
+ _.$_$.a = CIO_instance;
3731
+ //endregion
3732
+ return _;
3733
+ }));
3734
+
3735
+ //# sourceMappingURL=ktor-ktor-server-cio.js.map