Primiano Tucci | 3faad74 | 2018-05-16 19:30:48 +0100 | [diff] [blame] | 1 | # Copyright (C) 2018 The Android Open Source Project |
| 2 | # |
| 3 | # Licensed under the Apache License, Version 2.0 (the "License"); |
| 4 | # you may not use this file except in compliance with the License. |
| 5 | # You may obtain a copy of the License at |
| 6 | # |
| 7 | # http://www.apache.org/licenses/LICENSE-2.0 |
| 8 | # |
| 9 | # Unless required by applicable law or agreed to in writing, software |
| 10 | # distributed under the License is distributed on an "AS IS" BASIS, |
| 11 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 12 | # See the License for the specific language governing permissions and |
| 13 | # limitations under the License. |
| 14 | |
| 15 | import("../gn/perfetto.gni") |
| 16 | import("../gn/wasm.gni") |
| 17 | import("../protos/perfetto/trace_processor/proto_files.gni") |
| 18 | |
Hector Dearman | 262cbe2 | 2018-05-31 13:28:21 +0100 | [diff] [blame] | 19 | ui_dir = "$root_build_dir/ui" |
Primiano Tucci | 3faad74 | 2018-05-16 19:30:48 +0100 | [diff] [blame] | 20 | nodejs_root = "../buildtools/nodejs" |
| 21 | nodejs_bin = rebase_path("$nodejs_root/bin", root_build_dir) |
| 22 | |
| 23 | # +----------------------------------------------------------------------------+ |
| 24 | # | The outer "ui" target to just ninja -C out/xxx ui | |
| 25 | # +----------------------------------------------------------------------------+ |
| 26 | group("ui") { |
| 27 | deps = [ |
Hector Dearman | 262cbe2 | 2018-05-31 13:28:21 +0100 | [diff] [blame] | 28 | ":index_release", |
| 29 | ":main_bundle_release", |
| 30 | ":wasm_release", |
Hector Dearman | 5f11e52 | 2018-05-31 16:54:28 +0100 | [diff] [blame] | 31 | ":worker_bundle_release", |
Primiano Tucci | 3faad74 | 2018-05-16 19:30:48 +0100 | [diff] [blame] | 32 | ] |
| 33 | } |
| 34 | |
| 35 | # +----------------------------------------------------------------------------+ |
| 36 | # | Template used to run node binaries using the hermetic node toolchain. | |
| 37 | # +----------------------------------------------------------------------------+ |
| 38 | template("node_bin") { |
| 39 | action(target_name) { |
| 40 | forward_variables_from(invoker, |
| 41 | [ |
| 42 | "inputs", |
| 43 | "outputs", |
| 44 | ]) |
| 45 | deps = [ |
| 46 | ":node_modules", |
| 47 | ] |
| 48 | if (defined(invoker.deps)) { |
| 49 | deps += invoker.deps |
| 50 | } |
| 51 | script = "../gn/standalone/build_tool_wrapper.py" |
| 52 | _node_cmd = invoker.node_cmd |
Hector Dearman | b06d415 | 2018-05-31 16:55:04 +0100 | [diff] [blame] | 53 | args = [] |
| 54 | if (defined(invoker.suppress_stdout) && invoker.suppress_stdout) { |
| 55 | args += [ "--suppress_stdout" ] |
| 56 | } |
| 57 | if (defined(invoker.suppress_stderr) && invoker.suppress_stderr) { |
| 58 | args += [ "--suppress_stderr" ] |
| 59 | } |
| 60 | args += [ |
| 61 | "--path=$nodejs_bin", |
| 62 | "node", |
| 63 | rebase_path("node_modules/.bin/$_node_cmd", root_build_dir), |
| 64 | ] + invoker.args |
Primiano Tucci | 3faad74 | 2018-05-16 19:30:48 +0100 | [diff] [blame] | 65 | } |
| 66 | } |
| 67 | |
| 68 | # +----------------------------------------------------------------------------+ |
Hector Dearman | 92aec39 | 2018-06-19 14:33:38 +0100 | [diff] [blame^] | 69 | # | Template for "sorcery" the source map resolver. | |
| 70 | # +----------------------------------------------------------------------------+ |
| 71 | template("sorcery") { |
| 72 | node_bin(target_name) { |
| 73 | assert(defined(invoker.input)) |
| 74 | assert(defined(invoker.output)) |
| 75 | forward_variables_from(invoker, [ "deps" ]) |
| 76 | inputs = [ |
| 77 | invoker.input, |
| 78 | ] |
| 79 | outputs = [ |
| 80 | invoker.output, |
| 81 | invoker.output + ".map", |
| 82 | ] |
| 83 | node_cmd = "sorcery" |
| 84 | args = [ |
| 85 | "-i", |
| 86 | rebase_path(invoker.input, root_build_dir), |
| 87 | "-o", |
| 88 | rebase_path(invoker.output, root_build_dir), |
| 89 | ] |
| 90 | } |
| 91 | } |
| 92 | |
| 93 | # +----------------------------------------------------------------------------+ |
Primiano Tucci | 3faad74 | 2018-05-16 19:30:48 +0100 | [diff] [blame] | 94 | # | Bundles all *.js files together resolving CommonJS require() deps. | |
| 95 | # +----------------------------------------------------------------------------+ |
| 96 | |
| 97 | # Bundle together all js sources into a bundle.js file, that will ultimately be |
| 98 | # included by the .html files. |
Hector Dearman | 5f11e52 | 2018-05-31 16:54:28 +0100 | [diff] [blame] | 99 | |
Hector Dearman | 262cbe2 | 2018-05-31 13:28:21 +0100 | [diff] [blame] | 100 | node_bin("main_bundle") { |
Primiano Tucci | 3faad74 | 2018-05-16 19:30:48 +0100 | [diff] [blame] | 101 | deps = [ |
| 102 | ":transpile_all_ts", |
| 103 | ] |
Hector Dearman | b06d415 | 2018-05-31 16:55:04 +0100 | [diff] [blame] | 104 | node_cmd = "rollup" |
Primiano Tucci | 3faad74 | 2018-05-16 19:30:48 +0100 | [diff] [blame] | 105 | inputs = [ |
Hector Dearman | 262cbe2 | 2018-05-31 13:28:21 +0100 | [diff] [blame] | 106 | "$target_out_dir/main.js", |
Hector Dearman | b06d415 | 2018-05-31 16:55:04 +0100 | [diff] [blame] | 107 | "rollup.config.js", |
Primiano Tucci | 3faad74 | 2018-05-16 19:30:48 +0100 | [diff] [blame] | 108 | ] |
| 109 | outputs = [ |
Hector Dearman | 5f11e52 | 2018-05-31 16:54:28 +0100 | [diff] [blame] | 110 | "$target_out_dir/main_bundle.js", |
| 111 | ] |
| 112 | args = [ |
Hector Dearman | b06d415 | 2018-05-31 16:55:04 +0100 | [diff] [blame] | 113 | "-c", |
| 114 | rebase_path("rollup.config.js", root_build_dir), |
Hector Dearman | 5f11e52 | 2018-05-31 16:54:28 +0100 | [diff] [blame] | 115 | rebase_path(inputs[0], root_build_dir), |
Hector Dearman | 5f11e52 | 2018-05-31 16:54:28 +0100 | [diff] [blame] | 116 | "-o", |
| 117 | rebase_path(outputs[0], root_build_dir), |
Hector Dearman | b06d415 | 2018-05-31 16:55:04 +0100 | [diff] [blame] | 118 | "-f", |
| 119 | "iife", |
| 120 | "-m", |
| 121 | "--silent", |
Hector Dearman | 5f11e52 | 2018-05-31 16:54:28 +0100 | [diff] [blame] | 122 | ] |
| 123 | } |
| 124 | |
| 125 | node_bin("worker_bundle") { |
| 126 | deps = [ |
| 127 | ":transpile_all_ts", |
| 128 | ] |
Hector Dearman | b06d415 | 2018-05-31 16:55:04 +0100 | [diff] [blame] | 129 | node_cmd = "rollup" |
Hector Dearman | 5f11e52 | 2018-05-31 16:54:28 +0100 | [diff] [blame] | 130 | inputs = [ |
| 131 | "$target_out_dir/worker.js", |
Hector Dearman | b06d415 | 2018-05-31 16:55:04 +0100 | [diff] [blame] | 132 | "rollup.config.js", |
Hector Dearman | 5f11e52 | 2018-05-31 16:54:28 +0100 | [diff] [blame] | 133 | ] |
| 134 | outputs = [ |
| 135 | "$target_out_dir/worker_bundle.js", |
Primiano Tucci | 3faad74 | 2018-05-16 19:30:48 +0100 | [diff] [blame] | 136 | ] |
| 137 | args = [ |
Hector Dearman | b06d415 | 2018-05-31 16:55:04 +0100 | [diff] [blame] | 138 | "-c", |
| 139 | rebase_path("rollup.config.js", root_build_dir), |
Primiano Tucci | 3faad74 | 2018-05-16 19:30:48 +0100 | [diff] [blame] | 140 | rebase_path(inputs[0], root_build_dir), |
Primiano Tucci | 3faad74 | 2018-05-16 19:30:48 +0100 | [diff] [blame] | 141 | "-o", |
| 142 | rebase_path(outputs[0], root_build_dir), |
Hector Dearman | b06d415 | 2018-05-31 16:55:04 +0100 | [diff] [blame] | 143 | "-f", |
| 144 | "iife", |
| 145 | "-m", |
| 146 | "--silent", |
Primiano Tucci | 3faad74 | 2018-05-16 19:30:48 +0100 | [diff] [blame] | 147 | ] |
| 148 | } |
| 149 | |
| 150 | # +----------------------------------------------------------------------------+ |
| 151 | # | Protobuf: gen rules to create .js and .d.ts files from protos. | |
| 152 | # +----------------------------------------------------------------------------+ |
Hector Dearman | 262cbe2 | 2018-05-31 13:28:21 +0100 | [diff] [blame] | 153 | proto_gen_dir = "$target_out_dir/gen" |
Primiano Tucci | 3faad74 | 2018-05-16 19:30:48 +0100 | [diff] [blame] | 154 | |
| 155 | node_bin("protos_to_js") { |
| 156 | inputs = [] |
| 157 | foreach(proto, trace_processor_protos) { |
| 158 | inputs += [ "../protos/perfetto/trace_processor/$proto.proto" ] |
| 159 | } |
Hector Dearman | f5fd1e1 | 2018-06-12 18:23:49 +0100 | [diff] [blame] | 160 | inputs += [ "../protos/perfetto/config/perfetto_config.proto" ] |
Primiano Tucci | 3faad74 | 2018-05-16 19:30:48 +0100 | [diff] [blame] | 161 | outputs = [ |
| 162 | "$proto_gen_dir/protos.js", |
| 163 | ] |
| 164 | node_cmd = "pbjs" |
| 165 | args = [ |
| 166 | "-t", |
| 167 | "static-module", |
| 168 | "-w", |
| 169 | "commonjs", |
| 170 | "-p", |
| 171 | rebase_path("../protos", root_build_dir), |
| 172 | "-o", |
| 173 | rebase_path(outputs[0], root_build_dir), |
| 174 | ] + rebase_path(inputs, root_build_dir) |
| 175 | } |
| 176 | |
| 177 | # Protobuf.js requires to first generate .js files from the .proto and then |
| 178 | # create .ts definitions for them. |
| 179 | node_bin("protos_to_ts") { |
| 180 | deps = [ |
| 181 | ":protos_to_js", |
| 182 | ] |
| 183 | inputs = [ |
| 184 | "$proto_gen_dir/protos.js", |
| 185 | ] |
| 186 | outputs = [ |
| 187 | "$proto_gen_dir/protos.d.ts", |
| 188 | ] |
| 189 | node_cmd = "pbts" |
| 190 | args = [ |
| 191 | "-p", |
| 192 | rebase_path("../protos", root_build_dir), |
| 193 | "-o", |
| 194 | rebase_path(outputs[0], root_build_dir), |
| 195 | rebase_path(inputs[0], root_build_dir), |
| 196 | ] |
| 197 | } |
| 198 | |
| 199 | # +----------------------------------------------------------------------------+ |
| 200 | # | TypeScript: transpiles all *.ts into .js | |
| 201 | # +----------------------------------------------------------------------------+ |
| 202 | |
| 203 | # Builds all .ts sources in the repo that are reachable from |sources|. |
| 204 | node_bin("transpile_all_ts") { |
| 205 | sources = [ |
Hector Dearman | 3d858cc | 2018-05-24 17:09:48 +0100 | [diff] [blame] | 206 | "src/main.ts", |
Hector Dearman | 5f11e52 | 2018-05-31 16:54:28 +0100 | [diff] [blame] | 207 | "src/worker.ts", |
Primiano Tucci | 3faad74 | 2018-05-16 19:30:48 +0100 | [diff] [blame] | 208 | ] |
| 209 | deps = [ |
| 210 | ":dist_symlink", |
| 211 | ":protos_to_ts", |
| 212 | ] |
| 213 | inputs = sources + [ "tsconfig.json" ] |
| 214 | outputs = [ |
Hector Dearman | 262cbe2 | 2018-05-31 13:28:21 +0100 | [diff] [blame] | 215 | "$target_out_dir/main.js", |
Hector Dearman | 5f11e52 | 2018-05-31 16:54:28 +0100 | [diff] [blame] | 216 | "$target_out_dir/worker.js", |
Primiano Tucci | 3faad74 | 2018-05-16 19:30:48 +0100 | [diff] [blame] | 217 | ] |
| 218 | |
| 219 | # Find all *.ts files and pass them as input triggers. This does NOT affect |
| 220 | # which files will get built. This defines only the set of files that, when |
| 221 | # changes, will re-trigger this rule in ninja. The files that get transpiled |
| 222 | # are the transitive dependencies of |sources|. |
| 223 | all_ts_files = exec_script("../gn/standalone/glob.py", |
| 224 | [ |
| 225 | "--root=" + rebase_path(".", root_build_dir), |
| 226 | "--filter=*.ts", |
| 227 | "--exclude=node_modules", |
| 228 | "--exclude=dist", |
| 229 | ], |
| 230 | "list lines", |
| 231 | [ "." ]) |
| 232 | inputs += all_ts_files |
Primiano Tucci | 3faad74 | 2018-05-16 19:30:48 +0100 | [diff] [blame] | 233 | node_cmd = "tsc" |
| 234 | args = [ |
| 235 | "--project", |
| 236 | rebase_path(".", root_build_dir), |
| 237 | "--outDir", |
Hector Dearman | 262cbe2 | 2018-05-31 13:28:21 +0100 | [diff] [blame] | 238 | rebase_path(target_out_dir, root_build_dir), |
Primiano Tucci | 3faad74 | 2018-05-16 19:30:48 +0100 | [diff] [blame] | 239 | ] |
| 240 | } |
| 241 | |
| 242 | # +----------------------------------------------------------------------------+ |
Hector Dearman | 262cbe2 | 2018-05-31 13:28:21 +0100 | [diff] [blame] | 243 | # | Copy rules: create the final output directory. | |
Primiano Tucci | 3faad74 | 2018-05-16 19:30:48 +0100 | [diff] [blame] | 244 | # +----------------------------------------------------------------------------+ |
Hector Dearman | 262cbe2 | 2018-05-31 13:28:21 +0100 | [diff] [blame] | 245 | copy("index_release") { |
Primiano Tucci | 3faad74 | 2018-05-16 19:30:48 +0100 | [diff] [blame] | 246 | sources = [ |
| 247 | "index.html", |
| 248 | ] |
| 249 | outputs = [ |
Hector Dearman | 262cbe2 | 2018-05-31 13:28:21 +0100 | [diff] [blame] | 250 | "$ui_dir/index.html", |
Primiano Tucci | 3faad74 | 2018-05-16 19:30:48 +0100 | [diff] [blame] | 251 | ] |
| 252 | } |
| 253 | |
Hector Dearman | 92aec39 | 2018-06-19 14:33:38 +0100 | [diff] [blame^] | 254 | sorcery("main_bundle_release") { |
Hector Dearman | 262cbe2 | 2018-05-31 13:28:21 +0100 | [diff] [blame] | 255 | deps = [ |
| 256 | ":main_bundle", |
| 257 | ] |
Hector Dearman | 92aec39 | 2018-06-19 14:33:38 +0100 | [diff] [blame^] | 258 | input = "$target_out_dir/main_bundle.js" |
| 259 | output = "$ui_dir/main_bundle.js" |
Hector Dearman | 5f11e52 | 2018-05-31 16:54:28 +0100 | [diff] [blame] | 260 | } |
| 261 | |
Hector Dearman | 92aec39 | 2018-06-19 14:33:38 +0100 | [diff] [blame^] | 262 | sorcery("worker_bundle_release") { |
Hector Dearman | 5f11e52 | 2018-05-31 16:54:28 +0100 | [diff] [blame] | 263 | deps = [ |
| 264 | ":worker_bundle", |
| 265 | ] |
Hector Dearman | 92aec39 | 2018-06-19 14:33:38 +0100 | [diff] [blame^] | 266 | input = "$target_out_dir/worker_bundle.js" |
| 267 | output = "$ui_dir/worker_bundle.js" |
Hector Dearman | 262cbe2 | 2018-05-31 13:28:21 +0100 | [diff] [blame] | 268 | } |
| 269 | |
| 270 | copy("wasm_release") { |
Primiano Tucci | 3faad74 | 2018-05-16 19:30:48 +0100 | [diff] [blame] | 271 | deps = [ |
| 272 | "//src/trace_processor:trace_processor.js($wasm_toolchain)", |
| 273 | "//src/trace_processor:trace_processor.wasm($wasm_toolchain)", |
| 274 | ] |
| 275 | sources = [ |
| 276 | "$root_build_dir/wasm/trace_processor.js", |
| 277 | "$root_build_dir/wasm/trace_processor.wasm", |
| 278 | ] |
| 279 | outputs = [ |
Hector Dearman | a817a06 | 2018-06-01 11:01:07 +0100 | [diff] [blame] | 280 | "$ui_dir/wasm/{{source_file_part}}", |
Primiano Tucci | 3faad74 | 2018-05-16 19:30:48 +0100 | [diff] [blame] | 281 | ] |
| 282 | } |
| 283 | |
| 284 | # +----------------------------------------------------------------------------+ |
| 285 | # | Node JS: run npm install and creates a symlink in the out directory. | |
| 286 | # +----------------------------------------------------------------------------+ |
| 287 | |
| 288 | action("check_node_exists") { |
| 289 | script = "../gn/standalone/check_buildtool_exists.py" |
Hector Dearman | 48783b1 | 2018-05-22 08:26:06 +0100 | [diff] [blame] | 290 | args = [ |
| 291 | nodejs_bin, |
| 292 | "--touch", |
| 293 | rebase_path("$target_out_dir/node_exists", ""), |
| 294 | ] |
Primiano Tucci | 3faad74 | 2018-05-16 19:30:48 +0100 | [diff] [blame] | 295 | inputs = [] |
| 296 | outputs = [ |
Hector Dearman | 48783b1 | 2018-05-22 08:26:06 +0100 | [diff] [blame] | 297 | "$target_out_dir/node_exists", |
Primiano Tucci | 3faad74 | 2018-05-16 19:30:48 +0100 | [diff] [blame] | 298 | ] |
| 299 | } |
| 300 | |
| 301 | # Creates a symlink from out/xxx/ui/node_modules -> ../../../ui/node_modules. |
Hector Dearman | b06d415 | 2018-05-31 16:55:04 +0100 | [diff] [blame] | 302 | # This allows to run rollup and other node tools from the out/xxx directory. |
Primiano Tucci | 3faad74 | 2018-05-16 19:30:48 +0100 | [diff] [blame] | 303 | action("node_modules_symlink") { |
| 304 | deps = [ |
| 305 | ":check_node_exists", |
| 306 | ] |
Hector Dearman | 6186c87 | 2018-05-31 13:28:48 +0100 | [diff] [blame] | 307 | |
Primiano Tucci | 3faad74 | 2018-05-16 19:30:48 +0100 | [diff] [blame] | 308 | script = "../gn/standalone/build_tool_wrapper.py" |
Hector Dearman | 6186c87 | 2018-05-31 13:28:48 +0100 | [diff] [blame] | 309 | stamp_file = "$target_out_dir/.$target_name.stamp" |
Primiano Tucci | 3faad74 | 2018-05-16 19:30:48 +0100 | [diff] [blame] | 310 | args = [ |
Hector Dearman | 6186c87 | 2018-05-31 13:28:48 +0100 | [diff] [blame] | 311 | "--stamp", |
| 312 | rebase_path(stamp_file, root_build_dir), |
Primiano Tucci | 3faad74 | 2018-05-16 19:30:48 +0100 | [diff] [blame] | 313 | "/bin/ln", |
| 314 | "-fns", |
Hector Dearman | a817a06 | 2018-06-01 11:01:07 +0100 | [diff] [blame] | 315 | rebase_path("node_modules", target_out_dir), |
Hector Dearman | 6186c87 | 2018-05-31 13:28:48 +0100 | [diff] [blame] | 316 | rebase_path("$target_out_dir/node_modules", root_build_dir), |
| 317 | ] |
| 318 | outputs = [ |
| 319 | stamp_file, |
Primiano Tucci | 3faad74 | 2018-05-16 19:30:48 +0100 | [diff] [blame] | 320 | ] |
| 321 | } |
| 322 | |
| 323 | # Runs npm install. |
Hector Dearman | 6186c87 | 2018-05-31 13:28:48 +0100 | [diff] [blame] | 324 | action("node_modules_install") { |
Primiano Tucci | 3faad74 | 2018-05-16 19:30:48 +0100 | [diff] [blame] | 325 | script = "../gn/standalone/build_tool_wrapper.py" |
Hector Dearman | 262cbe2 | 2018-05-31 13:28:21 +0100 | [diff] [blame] | 326 | stamp_file = "$target_out_dir/.$target_name.stamp" |
Primiano Tucci | 3faad74 | 2018-05-16 19:30:48 +0100 | [diff] [blame] | 327 | args = [ |
| 328 | "--chdir", |
| 329 | rebase_path(".", root_build_dir), |
| 330 | "--stamp", |
| 331 | rebase_path(stamp_file, root_build_dir), |
| 332 | ] |
| 333 | args += [ |
| 334 | "--path=$nodejs_bin", |
| 335 | "node", |
| 336 | rebase_path("$nodejs_root/bin/npm", "."), |
| 337 | "install", |
| 338 | "--no-save", |
| 339 | "--silent", |
| 340 | ] |
| 341 | inputs = [ |
| 342 | "package.json", |
| 343 | "package-lock.json", |
| 344 | ] |
| 345 | outputs = [ |
| 346 | stamp_file, |
| 347 | ] |
Hector Dearman | 6186c87 | 2018-05-31 13:28:48 +0100 | [diff] [blame] | 348 | } |
| 349 | |
| 350 | group("node_modules") { |
Primiano Tucci | 3faad74 | 2018-05-16 19:30:48 +0100 | [diff] [blame] | 351 | deps = [ |
Hector Dearman | 6186c87 | 2018-05-31 13:28:48 +0100 | [diff] [blame] | 352 | ":node_modules_install", |
Primiano Tucci | 3faad74 | 2018-05-16 19:30:48 +0100 | [diff] [blame] | 353 | ":node_modules_symlink", |
| 354 | ] |
| 355 | } |
| 356 | |
| 357 | # Creates a symlink from //ui/dist -> ../../out/xxx/ui. Used only for |
| 358 | # autocompletion in IDEs. The problem this is solving is that in tsconfig.json |
| 359 | # we can't possibly know the path to ../../out/xxx for outDir. Instead, we set |
| 360 | # outDir to "./dist" and create a symlink on the first build. |
| 361 | action("dist_symlink") { |
| 362 | script = "../gn/standalone/build_tool_wrapper.py" |
Hector Dearman | 262cbe2 | 2018-05-31 13:28:21 +0100 | [diff] [blame] | 363 | stamp_file = "$target_out_dir/.$target_name.stamp" |
Primiano Tucci | 3faad74 | 2018-05-16 19:30:48 +0100 | [diff] [blame] | 364 | args = [ |
| 365 | "--stamp", |
| 366 | rebase_path(stamp_file, root_build_dir), |
| 367 | "/bin/ln", |
| 368 | "-fns", |
Hector Dearman | 262cbe2 | 2018-05-31 13:28:21 +0100 | [diff] [blame] | 369 | rebase_path(target_out_dir, "."), |
Primiano Tucci | 3faad74 | 2018-05-16 19:30:48 +0100 | [diff] [blame] | 370 | rebase_path("dist", root_build_dir), |
| 371 | ] |
| 372 | inputs = [ |
| 373 | "$root_build_dir", |
| 374 | ] |
| 375 | outputs = [ |
| 376 | stamp_file, |
| 377 | ] |
| 378 | } |